summaryrefslogtreecommitdiff
path: root/packages/univint/src/FPCMacOSAll.pas
diff options
context:
space:
mode:
Diffstat (limited to 'packages/univint/src/FPCMacOSAll.pas')
-rw-r--r--packages/univint/src/FPCMacOSAll.pas271136
1 files changed, 271136 insertions, 0 deletions
diff --git a/packages/univint/src/FPCMacOSAll.pas b/packages/univint/src/FPCMacOSAll.pas
new file mode 100644
index 0000000000..cb73648e17
--- /dev/null
+++ b/packages/univint/src/FPCMacOSAll.pas
@@ -0,0 +1,271136 @@
+{
+ This file is assembled from all the Interface files.
+}
+{$mode macpas}
+{$packenum 1}
+{$macro on}
+{$inline on}
+{$CALLING MWPASCAL}
+
+unit FPCMacOSAll;
+interface
+{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
+{$setc GAP_INTERFACES_VERSION := $0200}
+
+{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
+ {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
+{$endc}
+
+{$ifc defined CPUPOWERPC and defined CPUI386}
+ {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
+{$endc}
+{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
+ {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
+{$endc}
+
+{$ifc not defined __ppc__ and defined CPUPOWERPC}
+ {$setc __ppc__ := 1}
+{$elsec}
+ {$setc __ppc__ := 0}
+{$endc}
+{$ifc not defined __i386__ and defined CPUI386}
+ {$setc __i386__ := 1}
+{$elsec}
+ {$setc __i386__ := 0}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
+ {$error Conflicting definitions for __ppc__ and __i386__}
+{$endc}
+
+{$ifc defined __ppc__ and __ppc__}
+ {$setc TARGET_CPU_PPC := TRUE}
+ {$setc TARGET_CPU_X86 := FALSE}
+{$elifc defined __i386__ and __i386__}
+ {$setc TARGET_CPU_PPC := FALSE}
+ {$setc TARGET_CPU_X86 := TRUE}
+{$elsec}
+ {$error Neither __ppc__ nor __i386__ is defined.}
+{$endc}
+{$setc TARGET_CPU_PPC_64 := FALSE}
+
+{$ifc defined FPC_BIG_ENDIAN}
+ {$setc TARGET_RT_BIG_ENDIAN := TRUE}
+ {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
+{$elifc defined FPC_LITTLE_ENDIAN}
+ {$setc TARGET_RT_BIG_ENDIAN := FALSE}
+ {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
+{$elsec}
+ {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
+{$endc}
+{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
+{$setc CALL_NOT_IN_CARBON := FALSE}
+{$setc OLDROUTINENAMES := FALSE}
+{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
+{$setc OPAQUE_UPP_TYPES := TRUE}
+{$setc OTCARBONAPPLICATION := TRUE}
+{$setc OTKERNEL := FALSE}
+{$setc PM_USE_SESSION_APIS := TRUE}
+{$setc TARGET_API_MAC_CARBON := TRUE}
+{$setc TARGET_API_MAC_OS8 := FALSE}
+{$setc TARGET_API_MAC_OSX := TRUE}
+{$setc TARGET_CARBON := TRUE}
+{$setc TARGET_CPU_68K := FALSE}
+{$setc TARGET_CPU_MIPS := FALSE}
+{$setc TARGET_CPU_SPARC := FALSE}
+{$setc TARGET_OS_MAC := TRUE}
+{$setc TARGET_OS_UNIX := FALSE}
+{$setc TARGET_OS_WIN32 := FALSE}
+{$setc TARGET_RT_MAC_68881 := FALSE}
+{$setc TARGET_RT_MAC_CFM := FALSE}
+{$setc TARGET_RT_MAC_MACHO := TRUE}
+{$setc TYPED_FUNCTION_POINTERS := TRUE}
+{$setc TYPE_BOOL := FALSE}
+{$setc TYPE_EXTENDED := FALSE}
+{$setc TYPE_LONGLONG := TRUE}
+
+{unit ConditionalMacros}
+{
+ File: ConditionalMacros.p
+
+ Contains: Set up for compiler independent conditionals
+
+ Version: Technology: Universal Interface Files
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1993-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+{$ALIGN MAC68K}
+
+{***************************************************************************************************
+ UNIVERSAL_INTERFACES_VERSION
+
+ 0x0400 --> version 4.0 (Mac OS X only)
+ 0x0341 --> version 3.4.1
+ 0x0340 --> version 3.4
+ 0x0331 --> version 3.3.1
+ 0x0330 --> version 3.3
+ 0x0320 --> version 3.2
+ 0x0310 --> version 3.1
+ 0x0301 --> version 3.0.1
+ 0x0300 --> version 3.0
+ 0x0210 --> version 2.1
+ This conditional did not exist prior to version 2.1
+***************************************************************************************************}
+
+
+{***************************************************************************************************
+
+ TARGET_CPU_Å
+ These conditionals specify which microprocessor instruction set is being
+ generated. At most one of these is true, the rest are false.
+
+ TARGET_CPU_PPC - Compiler is generating PowerPC instructions
+ TARGET_CPU_68K - Compiler is generating 680x0 instructions
+ TARGET_CPU_X86 - Compiler is generating x86 instructions
+ TARGET_CPU_MIPS - Compiler is generating MIPS instructions
+ TARGET_CPU_SPARC - Compiler is generating Sparc instructions
+ TARGET_CPU_ALPHA - Compiler is generating Dec Alpha instructions
+
+
+ TARGET_OS_Å
+ These conditionals specify in which Operating System the generated code will
+ run. At most one of the these is true, the rest are false.
+
+ TARGET_OS_MAC - Generate code will run under Mac OS
+ TARGET_OS_WIN32 - Generate code will run under 32-bit Windows
+ TARGET_OS_UNIX - Generate code will run under some unix
+
+
+ TARGET_RT_Å
+ These conditionals specify in which runtime the generated code will
+ run. This is needed when the OS and CPU support more than one runtime
+ (e.g. MacOS on 68K supports CFM68K and Classic 68k).
+
+ TARGET_RT_LITTLE_ENDIAN - Generated code uses little endian format for integers
+ TARGET_RT_BIG_ENDIAN - Generated code uses big endian format for integers
+ TARGET_RT_MAC_CFM - TARGET_OS_MAC is true and CFM68K or PowerPC CFM (TVectors) are used
+ TARGET_RT_MAC_MACHO - TARGET_OS_MAC is true and Mach-O style runtime
+ TARGET_RT_MAC_68881 - TARGET_OS_MAC is true and 68881 floating point instructions used
+
+
+ TARGET__API_Å_Å
+ These conditionals are used to differentiate between sets of API's on the same
+ processor under the same OS. The first section after _API_ is the OS. The
+ second section is the API set. Unlike TARGET_OS_ and TARGET_CPU_, these
+ conditionals are not mutally exclusive. This file will attempt to auto-configure
+ all TARGET_API_Å_Å values, but will often need a TARGET_API_Å_Å value predefined
+ in order to disambiguate.
+
+ TARGET_API_MAC_OS8 - Code is being compiled to run on System 7 through Mac OS 8.x
+ TARGET_API_MAC_CARBON - Code is being compiled to run on Mac OS 8 and Mac OS X via CarbonLib
+ TARGET_API_MAC_OSX - Code is being compiled to run on Mac OS X
+
+
+ PRAGMA_Å
+ These conditionals specify whether the compiler supports particular #pragma's
+
+ PRAGMA_IMPORT - Compiler supports: #pragma import on/off/reset
+ PRAGMA_ONCE - Compiler supports: #pragma once
+ PRAGMA_STRUCT_ALIGN - Compiler supports: #pragma options align=mac68k/power/reset
+ PRAGMA_STRUCT_PACK - Compiler supports: #pragma pack(n)
+ PRAGMA_STRUCT_PACKPUSH - Compiler supports: #pragma pack(push, n)/pack(pop)
+ PRAGMA_ENUM_PACK - Compiler supports: #pragma options(!pack_enums)
+ PRAGMA_ENUM_ALWAYSINT - Compiler supports: #pragma enumsalwaysint on/off/reset
+ PRAGMA_ENUM_OPTIONS - Compiler supports: #pragma options enum=int/small/reset
+
+
+ FOUR_CHAR_CODE
+ This conditional does the proper byte swapping to assue that a four character code (e.g. 'TEXT')
+ is compiled down to the correct value on all compilers.
+
+ $61626364 (* 'abcd' *) - Convert a four-char-code to the correct 32-bit value
+
+
+ TYPE_Å
+ These conditionals specify whether the compiler supports particular types.
+
+ TYPE_LONGLONG - Compiler supports "long long" 64-bit integers
+ TYPE_BOOL - Compiler supports "bool"
+ TYPE_EXTENDED - Compiler supports "extended" 80/96 bit floating point
+ TYPE_LONGDOUBLE_IS_DOUBLE - Compiler implements "long double" same as "double"
+
+
+ FUNCTION_Å
+ These conditionals specify whether the compiler supports particular language extensions
+ to function prototypes and definitions.
+
+ FUNCTION_PASCAL - Compiler supports "pascal void Foo()"
+ FUNCTION_DECLSPEC - Compiler supports "__declspec(xxx) void Foo()"
+ FUNCTION_WIN32CC - Compiler supports "void __cdecl Foo()" and "void __stdcall Foo()"
+
+***************************************************************************************************}
+
+
+{***************************************************************************************************
+ Backward compatibility for clients expecting 2.x version on ConditionalMacros.h
+
+ GENERATINGPOWERPC - Compiler is generating PowerPC instructions
+ GENERATING68K - Compiler is generating 68k family instructions
+ GENERATING68881 - Compiler is generating mc68881 floating point instructions
+ GENERATINGCFM - Code being generated assumes CFM calling conventions
+ CFMSYSTEMCALLS - No A-traps. Systems calls are made using CFM and UPP's
+ PRAGMA_ALIGN_SUPPORTED - Compiler supports: #pragma options align=mac68k/power/reset
+ PRAGMA_IMPORT_SUPPORTED - Compiler supports: #pragma import on/off/reset
+ CGLUESUPPORTED - Clients can use all lowercase toolbox functions that take C strings instead of pascal strings
+
+***************************************************************************************************}
+
+
+{***************************************************************************************************
+
+ OLDROUTINENAMES - "Old" names for Macintosh system calls are allowed in source code.
+ (e.g. DisposPtr instead of DisposePtr). The names of system routine
+ are now more sensitive to change because CFM binds by name. In the
+ past, system routine names were compiled out to just an A-Trap.
+ Macros have been added that each map an old name to its new name.
+ This allows old routine names to be used in existing source files,
+ but the macros only work if OLDROUTINENAMES is true. This support
+ will be removed in the near future. Thus, all source code should
+ be changed to use the new names! You can set OLDROUTINENAMES to false
+ to see if your code has any old names left in it.
+
+***************************************************************************************************}
+
+
+{***************************************************************************************************
+
+ TARGET_CARBON - default: false. Switches all of the above as described. Overrides all others
+ - NOTE: If you set TARGET_CARBON to 1, then the other switches will be setup by
+ ConditionalMacros, and should not be set manually.
+
+ If you wish to do development for pre-Carbon Systems, you can set the following:
+
+ OPAQUE_TOOLBOX_STRUCTS - default: false. True for Carbon builds, hides struct fields.
+ OPAQUE_UPP_TYPES - default: false. True for Carbon builds, UPP types are unique and opaque.
+ ACCESSOR_CALLS_ARE_FUNCTIONS - default: false. True for Carbon builds, enables accessor functions.
+ CALL_NOT_IN_CARBON - default: true. False for Carbon builds, hides calls not supported in Carbon.
+
+ Specifically, if you are building a non-Carbon application (one that links against InterfaceLib)
+ but you wish to use some of the accessor functions, you can set ACCESSOR_CALLS_ARE_FUNCTIONS to 1
+ and link with CarbonAccessors.o, which implements just the accessor functions. This will help you
+ preserve source compatibility between your Carbon and non-Carbon application targets.
+
+ MIXEDMODE_CALLS_ARE_FUNCTIONS - deprecated.
+
+***************************************************************************************************}
+
+
+{unit MacTypes}
+{
+ File: CarbonCore/MacTypes.h
+
+ Contains: Basic Macintosh data types.
+
+ Version: CarbonCore-654.0.85~1
+
+ Copyright: © 1985-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+{*******************************************************************************
+
+ Base integer types for all target OS's and CPU's
+
+ UInt8 8-bit unsigned integer
+ SInt8 8-bit signed integer
+ UInt16 16-bit unsigned integer
+ SInt16 16-bit signed integer
+ UInt32 32-bit unsigned integer
+ SInt32 32-bit signed integer
+ UInt64 64-bit unsigned integer
+ SInt64 64-bit signed integer
+
+********************************************************************************}
+type
+ SInt8 = ShortInt;
+ UInt8 = Byte;
+ SInt16 = Integer;
+ UInt16 = Word;
+ SInt32 = LongInt;
+ UInt32 = Longword;
+ SInt64 = Int64;
+ UInt64 = QWord;
+
+
+
+{$ifc TARGET_RT_BIG_ENDIAN}
+
+type
+ wide = record
+ case boolean of
+ false:
+ ( hi: SInt32;
+ lo: UInt32);
+ true:
+ ( int: SInt64)
+ end;
+
+ UnsignedWide = record
+ case boolean of
+ false:
+ ( hi: UInt32;
+ lo: UInt32);
+ true:
+ ( int: UInt64)
+ end;
+
+{$elsec}
+
+type
+ wide = record
+ case boolean of
+ false:
+ ( lo: UInt32;
+ hi: SInt32);
+ true:
+ ( int: SInt64)
+ end;
+
+ UnsignedWide = record
+ case boolean of
+ false:
+ ( lo: UInt32;
+ hi: UInt32);
+ true:
+ ( int: UInt64)
+ end;
+
+{$endc} {TARGET_RT_BIG_ENDIAN}
+
+
+
+type
+ SInt8Ptr = ^SInt8;
+ UInt8Ptr = ^UInt8;
+ SInt16Ptr = ^SInt16;
+ UInt16Ptr = ^UInt16;
+ SInt32Ptr = ^SInt32;
+ UInt32Ptr = ^UInt32;
+ SInt64Ptr = ^SInt64;
+ UInt64Ptr = ^UInt64;
+ widePtr = ^wide;
+ UnsignedWidePtr = ^UnsignedWide;
+
+ { *******************************************************************************
+
+ Special types for pascal
+
+ ByteParameter UInt8 passed as an 8-bit parameter
+
+ Note: The conventions for Pascal on 68K require that a UInt8 when
+ passed as a parameter occupy 16-bits on the stack, whereas
+ an SInt8 would only occupy 8-bits. To make C and Pascal
+ compatable, in pascal all function parameters of type UInt8
+ or equivalent are changed to ByteParameter.
+
+ ******************************************************************************** }
+ ByteParameter = SInt8;
+
+// For interfaces that use Cs "bool" type, which is a 32 bit number
+ CBool = SInt32;
+
+{*******************************************************************************
+
+ Base fixed point types
+
+ Fixed 16-bit signed integer plus 16-bit fraction
+ UnsignedFixed 16-bit unsigned integer plus 16-bit fraction
+ Fract 2-bit signed integer plus 30-bit fraction
+ ShortFixed 8-bit signed integer plus 8-bit fraction
+
+********************************************************************************}
+type
+ Fixed = SInt32;
+ FixedPtr = ^Fixed;
+ Fract = SInt32;
+ FractPtr = ^Fract;
+ UnsignedFixed = UInt32;
+ UnsignedFixedPtr = ^UnsignedFixed;
+ ShortFixed = SInt16;
+ ShortFixedPtr = ^ShortFixed;
+
+
+{*******************************************************************************
+
+ Base floating point types
+
+ Float32 32 bit IEEE float: 1 sign bit, 8 exponent bits, 23 fraction bits
+ Float64 64 bit IEEE float: 1 sign bit, 11 exponent bits, 52 fraction bits
+ Float80 80 bit MacOS float: 1 sign bit, 15 exponent bits, 1 integer bit, 63 fraction bits
+ Float96 96 bit 68881 float: 1 sign bit, 15 exponent bits, 16 pad bits, 1 integer bit, 63 fraction bits
+
+ Note: These are fixed size floating point types, useful when writing a floating
+ point value to disk. If your compiler does not support a particular size
+ float, a struct is used instead.
+ Use of of the NCEG types (e.g. double_t) or an ANSI C type (e.g. double) if
+ you want a floating point representation that is natural for any given
+ compiler, but might be a different size on different compilers.
+
+********************************************************************************}
+type
+ Float32 = Single;
+ Float32Ptr = ^Float32;
+ Float64 = Double;
+ Float64Ptr = ^Float64;
+ LongDouble = Double;
+ Float80 = record
+ exp: SInt16;
+ man: array [0..3] of UInt16;
+ end;
+
+type
+ Float96 = record
+ exp: SInt16;
+ filler: SInt16;
+ man: array [0..3] of UInt16;
+ end;
+type
+ Float32Point = record
+ x: Float32;
+ y: Float32;
+ end;
+
+{*******************************************************************************
+ Unix compatibility types
+********************************************************************************}
+type
+ size_t = UInt32;
+ size_t_ptr = ^size_t;
+ ssize_t = SInt32;
+ ssize_t_ptr = ^ssize_t;
+
+{*******************************************************************************
+
+ MacOS Memory Manager types
+
+ Ptr Pointer to a non-relocatable block
+ Handle Pointer to a master pointer to a relocatable block
+ Size The number of bytes in a block (signed for historical reasons)
+
+********************************************************************************}
+type
+ Ptr = ^SInt8;
+ PtrPtr = ^Ptr;
+ Handle = ^Ptr;
+ Handle_fix = Handle; { used as field type when a record declaration contains a Handle field identifier }
+ Size = SInt32;
+ Size_fix = Size; { used as field type when a record declaration contains a Size field identifier }
+ SizePtr = ^Size;
+ UnivPtr = Pointer;
+ UnivPtrPtr = ^UnivPtr;
+
+{*******************************************************************************
+
+ Higher level basic types
+
+ OSErr 16-bit result error code
+ OSStatus 32-bit result error code
+ LogicalAddress Address in the clients virtual address space
+ ConstLogicalAddress Address in the clients virtual address space that will only be read
+ PhysicalAddress Real address as used on the hardware bus
+ BytePtr Pointer to an array of bytes
+ ByteCount The size of an array of bytes
+ ByteOffset An offset into an array of bytes
+ ItemCount 32-bit iteration count
+ OptionBits Standard 32-bit set of bit flags
+ PBVersion ?
+ Duration 32-bit millisecond timer for drivers
+ AbsoluteTime 64-bit clock
+ ScriptCode A particular set of written characters (e.g. Roman vs Cyrillic) and their encoding
+ LangCode A particular language (e.g. English), as represented using a particular ScriptCode
+ RegionCode Designates a language as used in a particular region (e.g. British vs American
+ English) together with other region-dependent characteristics (e.g. date format)
+ FourCharCode A 32-bit value made by packing four 1 byte characters together
+ OSType A FourCharCode used in the OS and file system (e.g. creator)
+ ResType A FourCharCode used to tag resources (e.g. 'DLOG')
+
+********************************************************************************}
+type
+ OSErr = SInt16;
+ OSStatus = SInt32;
+ LogicalAddress = UnivPtr;
+ ConstLogicalAddress = UnivPtr;
+ PhysicalAddress = UnivPtr;
+ BytePtr = UInt8Ptr;
+ ByteCount = UInt32;
+ ByteCountPtr = ^ByteCount;
+ ByteOffset = UInt32;
+ ByteOffsetPtr = ^ByteOffset;
+ Duration = SInt32;
+ AbsoluteTime = UnsignedWide;
+ AbsoluteTimePtr = ^AbsoluteTime;
+ OptionBits = UInt32;
+ OptionBitsPtr = ^OptionBits;
+ ItemCount = UInt32;
+ ItemCountPtr = ^ItemCount;
+ PBVersion = UInt32;
+ ScriptCode = SInt16;
+ ScriptCodePtr = ^ScriptCode;
+ LangCode = SInt16;
+ LangCodePtr = ^LangCode;
+ RegionCode = SInt16;
+ RegionCodePtr = ^RegionCode;
+ FourCharCode = UInt32;
+ OSType = FourCharCode;
+ OSType_fix = OSType; { used as field type when a record declaration contains a OSType field identifier }
+ ResType = FourCharCode;
+ OSTypePtr = ^OSType;
+ ResTypePtr = ^ResType;
+{*******************************************************************************
+
+ Boolean types and values
+
+ Boolean Mac OS historic type, sizeof(Boolean)==1
+ bool Defined in stdbool.h, ISO C/C++ standard type
+ false Now defined in stdbool.h
+ true Now defined in stdbool.h
+
+********************************************************************************}
+type
+{ "Boolean", "true", and "false" are built into the Pascal language }
+ BooleanPtr = ^Boolean;
+ boolean_fix = boolean; { used as field type when a record declaration contains a boolean field identifier }
+{*******************************************************************************
+
+ Function Pointer Types
+
+ ProcPtr Generic pointer to a function
+ Register68kProcPtr Pointer to a 68K function that expects parameters in registers
+ UniversalProcPtr Pointer to classic 68K code or a RoutineDescriptor
+
+ ProcHandle Pointer to a ProcPtr
+ UniversalProcHandle Pointer to a UniversalProcPtr
+
+********************************************************************************}
+type
+ ProcPtr = Ptr;
+ Register68kProcPtr = ProcPtr;
+ UniversalProcPtr = ProcPtr;
+
+type
+ ProcHandle = ^ProcPtr;
+ UniversalProcHandle = ^UniversalProcPtr;
+
+
+{*******************************************************************************
+
+ Common Constants
+
+ noErr OSErr: function performed properly - no error
+ kNilOptions OptionBits: all flags false
+ kInvalidID KernelID: NULL is for pointers as kInvalidID is for ID's
+ kVariableLengthArray array bounds: variable length array
+
+ Note: kVariableLengthArray is used in array bounds to specify a variable length array.
+ It is ususally used in variable length structs when the last field is an array
+ of any size. Before ANSI C, we used zero as the bounds of variable length
+ array, but zero length array are illegal in ANSI C. Example usage:
+
+ struct FooList
+ (
+ short listLength;
+ Foo elements[kVariableLengthArray];
+ );
+
+********************************************************************************}
+const
+ noErr = 0;
+
+const
+ kNilOptions = 0;
+
+const
+ kInvalidID = 0;
+const
+ kVariableLengthArray = 1;
+
+const
+ kUnknownType = $3F3F3F3F; { "????" QuickTime 3.0: default unknown ResType or OSType }
+
+
+{*******************************************************************************
+
+ String Types and Unicode Types
+
+ UnicodeScalarValue, A complete Unicode character in UTF-32 format, with
+ UTF32Char values from 0 through 0x10FFFF (excluding the surrogate
+ range 0xD800-0xDFFF and certain disallowed values).
+
+ UniChar, A 16-bit Unicode code value in the default UTF-16 format.
+ UTF16Char UnicodeScalarValues 0-0xFFFF are expressed in UTF-16
+ format using a single UTF16Char with the same value.
+ UnicodeScalarValues 0x10000-0x10FFFF are expressed in
+ UTF-16 format using a pair of UTF16Chars - one in the
+ high surrogate range (0xD800-0xDBFF) followed by one in
+ the low surrogate range (0xDC00-0xDFFF). All of the
+ characters defined in Unicode versions through 3.0 are
+ in the range 0-0xFFFF and can be expressed using a single
+ UTF16Char, thus the term "Unicode character" generally
+ refers to a UniChar = UTF16Char.
+
+ UTF8Char An 8-bit code value in UTF-8 format. UnicodeScalarValues
+ 0-0x7F are expressed in UTF-8 format using one UTF8Char
+ with the same value. UnicodeScalarValues above 0x7F are
+ expressed in UTF-8 format using 2-4 UTF8Chars, all with
+ values in the range 0x80-0xF4 (UnicodeScalarValues
+ 0x100-0xFFFF use two or three UTF8Chars,
+ UnicodeScalarValues 0x10000-0x10FFFF use four UTF8Chars).
+
+ UniCharCount A count of UTF-16 code values in an array or buffer.
+
+ StrNNN Pascal string holding up to NNN bytes
+ StringPtr Pointer to a pascal string
+ StringHandle Pointer to a StringPtr
+ ConstStringPtr Pointer to a read-only pascal string
+ ConstStrNNNParam For function parameters only - means string is const
+
+ CStringPtr Pointer to a C string (in C: char*)
+ ConstCStringPtr Pointer to a read-only C string (in C: const char*)
+
+ Note: The length of a pascal string is stored as the first byte.
+ A pascal string does not have a termination byte.
+ A pascal string can hold at most 255 bytes of data.
+ The first character in a pascal string is offset one byte from the start of the string.
+
+ A C string is terminated with a byte of value zero.
+ A C string has no length limitation.
+ The first character in a C string is the zeroth byte of the string.
+
+
+********************************************************************************}
+type
+ UnicodeScalarValue = UInt32;
+ UTF32Char = UInt32;
+ UniChar = UInt16;
+ UTF16Char = UInt16;
+ UTF8Char = UInt8;
+ UniCharPtr = ^UniChar;
+ ConstUniCharPtr = UniCharPtr;
+ UniCharCount = UInt32;
+ UniCharCountPtr = ^UniCharCount;
+ Str15 = STRING[15];
+ Str27 = STRING[27];
+ Str31 = STRING[31];
+ Str32 = STRING[32];
+ Str36 = STRING[36];
+ Str63 = STRING[63];
+ Str255 = STRING[255];
+ {
+ The type Str32 is used in many AppleTalk based data structures.
+ It holds up to 32 one byte chars. The problem is that with the
+ length byte it is 33 bytes long. This can cause weird alignment
+ problems in structures. To fix this the type "Str32Field" has
+ been created. It should only be used to hold 32 chars, but
+ it is 34 bytes long so that there are no alignment problems.
+ }
+ Str32Field = Str32;
+ {
+ QuickTime 3.0:
+ The type StrFileName is used to make MacOS structs work
+ cross-platform. For example FSSpec or SFReply previously
+ contained a Str63 field. They now contain a StrFileName
+ field which is the same when targeting the MacOS but is
+ a 256 char buffer for Win32 and unix, allowing them to
+ contain long file names.
+ }
+type
+ StrFileName = Str63;
+ StringPtr = ^Str255;
+ StringHandle = ^StringPtr;
+ ConstStringPtr = StringPtr;
+ CStringPtr = PChar;
+ ConstCStringPtr = CStringPtr;
+ CStringPtrPtr = ^CStringPtr;
+ ConstCStringPtrPtr = ^ConstCStringPtr;
+ ConstStr255Param = Str255;
+ ConstStr63Param = Str63;
+ ConstStr36Param = Str36;
+ ConstStr32Param = Str32;
+ ConstStr31Param = Str31;
+ ConstStr27Param = Str27;
+ ConstStr15Param = Str15;
+ ConstStrFileNameParam = ConstStr63Param;
+
+{*******************************************************************************
+
+ Process Manager type ProcessSerialNumber (previously in Processes.h)
+
+********************************************************************************}
+{ type for unique process identifier }
+type
+ ProcessSerialNumber = record
+ highLongOfPSN: UInt32;
+ lowLongOfPSN: UInt32;
+ end;
+ ProcessSerialNumberPtr = ^ProcessSerialNumber;
+{*******************************************************************************
+
+ Quickdraw Types
+
+ Point 2D Quickdraw coordinate, range: -32K to +32K
+ Rect Rectangular Quickdraw area
+ Style Quickdraw font rendering styles
+ StyleParameter Style when used as a parameter (historical 68K convention)
+ StyleField Style when used as a field (historical 68K convention)
+ CharParameter Char when used as a parameter (historical 68K convention)
+
+ Note: The original Macintosh toolbox in 68K Pascal defined Style as a SET.
+ Both Style and CHAR occupy 8-bits in packed records or 16-bits when
+ used as fields in non-packed records or as parameters.
+
+********************************************************************************}
+type
+ Point = record
+ case SInt16 of
+ 0: (
+ v: SInt16;
+ h: SInt16;
+ );
+ 1: (
+ vh: array [0..1] of SInt16;
+ );
+ end;
+ PointPtr = ^Point;
+type
+ Rect = record
+ case SInt16 of
+ 0: (
+ top: SInt16;
+ left: SInt16;
+ bottom: SInt16;
+ right: SInt16;
+ );
+ 1: (
+ topLeft: Point;
+ botRight: Point;
+ );
+ end;
+ RectPtr = ^Rect;
+type
+ FixedPoint = record
+ x: Fixed;
+ y: Fixed;
+ end;
+ FixedPointPtr = ^FixedPoint;
+type
+ FixedRect = record
+ left: Fixed;
+ top: Fixed;
+ right: Fixed;
+ bottom: Fixed;
+ end;
+ FixedRectPtr = ^FixedRect;
+
+type
+ CharParameter = Char;
+const
+ normal = 0;
+ bold = 1;
+ italic = 2;
+ underline = 4;
+ outline = 8;
+ shadow = $10;
+ condense = $20;
+ extend = $40;
+
+type
+ Style = SInt8;
+ Style_fix = Style; { used as field type when a record declaration contains a Style field identifier }
+ StyleParameter = SInt16;
+ StyleField = Style;
+
+
+{*******************************************************************************
+
+ QuickTime TimeBase types (previously in Movies.h)
+
+ TimeValue Count of units
+ TimeScale Units per second
+ CompTimeValue 64-bit count of units (always a struct)
+ TimeValue64 64-bit count of units (long long or struct)
+ TimeBase An opaque reference to a time base
+ TimeRecord Package of TimeBase, duration, and scale
+
+********************************************************************************}
+type
+ TimeValue = SInt32;
+ TimeScale = SInt32;
+ TimeScale_fix = TimeScale; { used as field type when a record declaration contains a TimeScale field identifier }
+ CompTimeValue = wide;
+ CompTimeValuePtr = ^CompTimeValue;
+ TimeValue64 = SInt64;
+ TimeValue64Ptr = ^TimeValue64;
+ TimeBase = ^SInt32; { an opaque 32-bit type }
+ TimeBase_fix = TimeBase; { used as field type when a record declaration contains a TimeBase field identifier }
+ TimeBasePtr = ^TimeBase;
+ TimeRecord = record
+ value: CompTimeValue; { units (duration or absolute) }
+ scale: TimeScale; { units per second }
+ base: TimeBase; { refernce to the time base }
+ end;
+ TimeRecordPtr = ^TimeRecord;
+
+{*******************************************************************************
+
+ MacOS versioning structures
+
+ VersRec Contents of a 'vers' resource
+ VersRecPtr Pointer to a VersRecPtr
+ VersRecHndl Resource Handle containing a VersRec
+ NumVersion Packed BCD version representation (e.g. "4.2.1a3" is 0x04214003)
+ UniversalProcPtr Pointer to classic 68K code or a RoutineDescriptor
+
+ ProcHandle Pointer to a ProcPtr
+ UniversalProcHandle Pointer to a UniversalProcPtr
+
+********************************************************************************}
+{$ifc TARGET_RT_BIG_ENDIAN}
+type
+ NumVersion = packed record
+{ Numeric version part of 'vers' resource }
+ majorRev: UInt8; {1st part of version number in BCD}
+ minorAndBugRev: UInt8; {2nd & 3rd part of version number share a byte}
+ stage: UInt8; {stage code: dev, alpha, beta, final}
+ nonRelRev: UInt8; {revision level of non-released version}
+ end;
+{$elsec}
+type
+ NumVersion = packed record
+{ Numeric version part of 'vers' resource accessable in little endian format }
+ nonRelRev: UInt8; {revision level of non-released version}
+ stage: UInt8; {stage code: dev, alpha, beta, final}
+ minorAndBugRev: UInt8; {2nd & 3rd part of version number share a byte}
+ majorRev: UInt8; {1st part of version number in BCD}
+ end;
+{$endc} {TARGET_RT_BIG_ENDIAN}
+ NumVersionPtr = ^NumVersion;
+
+const
+{ Version Release Stage Codes }
+ developStage = $20;
+ alphaStage = $40;
+ betaStage = $60;
+ finalStage = $80;
+
+type
+ NumVersionVariant = record
+ case SInt16 of
+ { NumVersionVariant is a wrapper so NumVersion can be accessed as a 32-bit value }
+ 0: (
+ parts: NumVersion;
+ );
+ 1: (
+ whole: UInt32;
+ );
+ end;
+ NumVersionVariantPtr = ^NumVersionVariant;
+ NumVersionVariantHandle = ^NumVersionVariantPtr;
+ VersRec = record
+{ 'vers' resource format }
+ numericVersion: NumVersion; {encoded version number}
+ countryCode: SInt16; {country code from intl utilities}
+ shortVersion: Str255; {version number string - worst case}
+ reserved: Str255; {longMessage string packed after shortVersion}
+ end;
+ VersRecPtr = ^VersRec;
+type
+ VersRecHndl = ^VersRecPtr;
+{********************************************************************************
+
+ Old names for types
+
+********************************************************************************}
+type
+ Byte = UInt8;
+ SignedByte = SInt8;
+ extended80 = Float80;
+ extended80Ptr = ^extended80;
+ extended96 = Float96;
+ extended96Ptr = ^extended96;
+ VHSelect = SInt8;
+{********************************************************************************
+
+ Debugger functions
+
+********************************************************************************}
+{
+ * Debugger()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure Debugger; external name '_Debugger';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DebugStr()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DebugStr( const (*var*) debuggerMsg: Str255 ); external name '_DebugStr';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * debugstr()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{ Only for Mac OS native drivers }
+{
+ * SysDebug()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in DriverServicesLib 1.0 and later
+ }
+
+
+{
+ * SysDebugStr()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in DriverServicesLib 1.0 and later
+ }
+
+
+
+{ SADE break points }
+{
+ * SysBreak()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SysBreak; external name '_SysBreak';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SysBreakStr()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SysBreakStr( const (*var*) debuggerMsg: Str255 ); external name '_SysBreakStr';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SysBreakFunc()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SysBreakFunc( const (*var*) debuggerMsg: Str255 ); external name '_SysBreakFunc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+
+
+
+
+{unit Math64}
+{
+ File: Math64.p
+
+ Contains: 64-bit SInt16 math Interfaces.
+
+ Version: Technology: Mac OS 9
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1994-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+{
+ * S64Max()
+ *
+ * Discussion:
+ * Returns largest possible SInt64 value
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64Max: SInt64; external name '_S64Max';
+
+{
+ * S64Min()
+ *
+ * Discussion:
+ * Returns smallest possible SInt64 value
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64Min: SInt64; external name '_S64Min';
+
+
+{
+ * S64Add()
+ *
+ * Discussion:
+ * Adds two integers, producing an SInt16 result. If an overflow
+ * occurs the result is congruent mod (2^64) as if the operands and
+ * result were unsigned. No overflow is signaled.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64Add(left: SInt64; right: SInt64): SInt64; external name '_S64Add';
+
+
+{
+ * S64Subtract()
+ *
+ * Discussion:
+ * Subtracts two integers, producing an SInt16 result. If an
+ * overflow occurs the result is congruent mod (2^64) as if the
+ * operands and result were unsigned. No overflow is signaled.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64Subtract(left: SInt64; right: SInt64): SInt64; external name '_S64Subtract';
+
+
+{
+ * S64Negate()
+ *
+ * Discussion:
+ * Returns the additive inverse of a signed number (i.e. it returns
+ * 0 - the number). S64Negate (S64Min) is not representable (in
+ * fact, it returns S64Min).
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64Negate(value: SInt64): SInt64; external name '_S64Negate';
+
+
+{$ifc NOT TYPE_LONGLONG}
+{
+ * S64Absolute()
+ *
+ * Discussion:
+ * Returns the absolute value of the number (i.e. the number if it
+ * is positive, or 0 - the number if it is negative). Disabled for
+ * compilers that support long long until llabs() is available
+ * everywhere.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64Absolute(value: SInt64): SInt64; external name '_S64Absolute';
+
+{$endc}
+
+{
+ * S64Multiply()
+ *
+ * Discussion:
+ * Multiplies two signed numbers, producing a signed result.
+ * Overflow is ignored and the low-order part of the product is
+ * returned. The sign of the result is not guaranteed to be correct
+ * if the magnitude of the product is not representable.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64Multiply(left: SInt64; right: SInt64): SInt64; external name '_S64Multiply';
+
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * S64Mod()
+ *
+ * Discussion:
+ * Returns the remainder of divide of dividend by divisor. The sign
+ * of the remainder is the same as the sign of the dividend (i.e.,
+ * it takes the absolute values of the operands, does the division,
+ * then fixes the sign of the quotient and remainder).
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function S64Mod(dividend: SInt64; divisor: SInt64): SInt64; external name '_S64Mod';
+
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * S64Divide()
+ *
+ * Discussion:
+ * Divides dividend by divisor, returning the quotient. The
+ * remainder is returned in *remainder if remainder (the pointer) is
+ * non-NULL. The sign of the remainder is the same as the sign of
+ * the dividend (i.e. it takes the absolute values of the operands,
+ * does the division, then fixes the sign of the quotient and
+ * remainder). If the divisor is zero, then S64Max() will be
+ * returned (or S64Min() if the dividend is negative), and the
+ * remainder will be the dividend; no error is reported.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64Divide(dividend: SInt64; divisor: SInt64; remainder: SInt64Ptr): SInt64; external name '_S64Divide';
+
+
+{
+ * S64Set()
+ *
+ * Discussion:
+ * Given an SInt32, returns an SInt64 with the same value. Use this
+ * routine instead of coding 64-bit constants (at least when the
+ * constant will fit in an SInt32).
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64Set(value: SInt32): SInt64; external name '_S64Set';
+
+
+{
+ * S64SetU()
+ *
+ * Discussion:
+ * Given a UInt32, returns a SInt64 with the same value.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64SetU(value: UInt32): SInt64; external name '_S64SetU';
+
+{
+ * S32Set()
+ *
+ * Discussion:
+ * Given an SInt64, returns an SInt32 by discarding the high-order
+ * 32 bits.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S32Set(value: SInt64): SInt32; external name '_S32Set';
+
+
+{
+ * S64And()
+ *
+ * Discussion:
+ * Returns one if left and right are non-zero, otherwise returns zero
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64And(left: SInt64; right: SInt64): boolean; external name '_S64And';
+
+
+{
+ * S64Or()
+ *
+ * Discussion:
+ * Returns one if left or right are non-zero, otherwise returns zero
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64Or(left: SInt64; right: SInt64): boolean; external name '_S64Or';
+
+
+{
+ * S64Eor()
+ *
+ * Discussion:
+ * Returns one if left xor right are non-zero, otherwise returns zero
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64Eor(left: SInt64; right: SInt64): boolean; external name '_S64Eor';
+
+
+{
+ * S64Not()
+ *
+ * Discussion:
+ * Returns one if value is non-zero, otherwisze returns zero.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64Not(value: SInt64): boolean; external name '_S64Not';
+
+
+{
+ * S64Compare()
+ *
+ * Discussion:
+ * Given two signed numbers, left and right, returns an SInt32 that
+ * compares with zero the same way left compares with right. If you
+ * wanted to perform a comparison on 64-bit integers of the
+ * form:
+ * operand_1 <operation> operand_2
+ * then you could use an expression of the form:
+ * xxxS64Compare(operand_1,operand_2) <operation> 0
+ * to test for the same condition. CAUTION: DO NOT depend on the
+ * exact value returned by this routine. Only the sign (i.e.
+ * positive, zero, or negative) of the result is guaranteed.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64Compare(left: SInt64; right: SInt64): SInt32; external name '_S64Compare';
+
+
+{
+ * S64BitwiseAnd()
+ *
+ * Discussion:
+ * bitwise AND
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64BitwiseAnd(left: SInt64; right: SInt64): SInt64; external name '_S64BitwiseAnd';
+
+
+{
+ * S64BitwiseOr()
+ *
+ * Discussion:
+ * bitwise OR
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64BitwiseOr(left: SInt64; right: SInt64): SInt64; external name '_S64BitwiseOr';
+
+
+{
+ * S64BitwiseEor()
+ *
+ * Discussion:
+ * bitwise XOR
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64BitwiseEor(left: SInt64; right: SInt64): SInt64; external name '_S64BitwiseEor';
+
+
+{
+ * S64BitwiseNot()
+ *
+ * Discussion:
+ * bitwise negate
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64BitwiseNot(value: SInt64): SInt64; external name '_S64BitwiseNot';
+
+
+{
+ * S64ShiftRight()
+ *
+ * Discussion:
+ * Arithmetic shift of value by the lower 7 bits of the shift.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64ShiftRight(value: SInt64; shift: UInt32): SInt64; external name '_S64ShiftRight';
+
+
+{
+ * S64ShiftLeft()
+ *
+ * Discussion:
+ * Logical shift of value by the lower 7 bits of the shift.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function S64ShiftLeft(value: SInt64; shift: UInt32): SInt64; external name '_S64ShiftLeft';
+
+
+{
+ * U64Max()
+ *
+ * Discussion:
+ * Returns largest possible UInt64 value
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64Max: UInt64; external name '_U64Max';
+
+{
+ * U64Add()
+ *
+ * Discussion:
+ * Adds two unsigned integers, producing an SInt16 result. If an
+ * overflow occurs the result is congruent mod (2^64) as if the
+ * operands and result were unsigned. No overflow is signaled.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64Add(left: UInt64; right: UInt64): UInt64; external name '_U64Add';
+
+{
+ * U64Subtract()
+ *
+ * Discussion:
+ * Subtracts two unsigned integers, producing an SInt16 result. If
+ * an overflow occurs the result is congruent mod (2^64) as if the
+ * operands and result were unsigned. No overflow is signaled.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64Subtract(left: UInt64; right: UInt64): UInt64; external name '_U64Subtract';
+
+
+{
+ * U64Multiply()
+ *
+ * Discussion:
+ * Multiplies two unsigned numbers, producing a signed result.
+ * Overflow is ignored and the low-order part of the product is
+ * returned. The sign of the result is not guaranteed to be correct
+ * if the magnitude of the product is not representable.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64Multiply(left: UInt64; right: UInt64): UInt64; external name '_U64Multiply';
+
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * U64Mod()
+ *
+ * Discussion:
+ * Returns the remainder of divide of dividend by divisor. The sign
+ * of the remainder is the same as the sign of the dividend (i.e.,
+ * it takes the absolute values of the operands, does the division,
+ * then fixes the sign of the quotient and remainder).
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function U64Mod(dividend: UInt64; divisor: UInt64): UInt64; external name '_U64Mod';
+
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * U64Divide()
+ *
+ * Discussion:
+ * Divides dividend by divisor, returning the quotient. The
+ * remainder is returned in *remainder if remainder (the pointer) is
+ * non-NULL. The sign of the remainder is the same as the sign of
+ * the dividend (i.e. it takes the absolute values of the operands,
+ * does the division, then fixes the sign of the quotient and
+ * remainder). If the divisor is zero, then U64Max() will be
+ * returned (or U64Min() if the dividend is negative), and the
+ * remainder will be the dividend; no error is reported.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64Divide(dividend: UInt64; divisor: UInt64; remainder: UInt64Ptr): UInt64; external name '_U64Divide';
+
+
+{
+ * U64Set()
+ *
+ * Discussion:
+ * Given an SInt32, returns an UInt64 with the same value. Use this
+ * routine instead of coding 64-bit constants (at least when the
+ * constant will fit in an SInt32).
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64Set(value: SInt32): UInt64; external name '_U64Set';
+
+
+{
+ * U64SetU()
+ *
+ * Discussion:
+ * Given a UInt32, returns a UInt64 with the same value.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64SetU(value: UInt32): UInt64; external name '_U64SetU';
+
+{
+ * U32SetU()
+ *
+ * Discussion:
+ * Given an UInt64, returns an UInt32 by discarding the high-order
+ * 32 bits.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U32SetU(value: UInt64): UInt32; external name '_U32SetU';
+
+
+{
+ * U64And()
+ *
+ * Discussion:
+ * Returns one if left and right are non-zero, otherwise returns zero
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64And(left: UInt64; right: UInt64): boolean; external name '_U64And';
+
+
+{
+ * U64Or()
+ *
+ * Discussion:
+ * Returns one if left or right are non-zero, otherwise returns zero
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64Or(left: UInt64; right: UInt64): boolean; external name '_U64Or';
+
+
+{
+ * U64Eor()
+ *
+ * Discussion:
+ * Returns one if left xor right are non-zero, otherwise returns zero
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64Eor(left: UInt64; right: UInt64): boolean; external name '_U64Eor';
+
+
+{
+ * U64Not()
+ *
+ * Discussion:
+ * Returns one if value is non-zero, otherwisze returns zero.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64Not(value: UInt64): boolean; external name '_U64Not';
+
+
+{
+ * U64Compare()
+ *
+ * Discussion:
+ * Given two unsigned numbers, left and right, returns an SInt32
+ * that compares with zero the same way left compares with right.
+ * If you wanted to perform a comparison on 64-bit integers of the
+ * form:
+ * operand_1 <operation> operand_2
+ * then you could use an expression of the form:
+ * xxxU64Compare(operand_1,operand_2) <operation> 0
+ * to test for the same condition. CAUTION: DO NOT depend on the
+ * exact value returned by this routine. Only the sign (i.e.
+ * positive, zero, or negative) of the result is guaranteed.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64Compare(left: UInt64; right: UInt64): SInt32; external name '_U64Compare';
+
+{
+ * U64BitwiseAnd()
+ *
+ * Discussion:
+ * bitwise AND
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64BitwiseAnd(left: UInt64; right: UInt64): UInt64; external name '_U64BitwiseAnd';
+
+
+{
+ * U64BitwiseOr()
+ *
+ * Discussion:
+ * bitwise OR
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64BitwiseOr(left: UInt64; right: UInt64): UInt64; external name '_U64BitwiseOr';
+
+
+{
+ * U64BitwiseEor()
+ *
+ * Discussion:
+ * bitwise XOR
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64BitwiseEor(left: UInt64; right: UInt64): UInt64; external name '_U64BitwiseEor';
+
+
+{
+ * U64BitwiseNot()
+ *
+ * Discussion:
+ * bitwise negate
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64BitwiseNot(value: UInt64): UInt64; external name '_U64BitwiseNot';
+
+
+{
+ * U64ShiftRight()
+ *
+ * Discussion:
+ * Arithmetic shift of value by the lower 7 bits of the shift.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64ShiftRight(value: UInt64; shift: UInt32): UInt64; external name '_U64ShiftRight';
+
+
+{
+ * U64ShiftLeft()
+ *
+ * Discussion:
+ * Logical shift of value by the lower 7 bits of the shift.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function U64ShiftLeft(value: UInt64; shift: UInt32): UInt64; external name '_U64ShiftLeft';
+
+
+{
+ * UInt64ToSInt64()
+ *
+ * Discussion:
+ * converts UInt64 -> SInt64
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UInt64ToSInt64(value: UInt64): SInt64; external name '_UInt64ToSInt64';
+
+
+{
+ * SInt64ToUInt64()
+ *
+ * Discussion:
+ * converts SInt64 -> UInt64
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SInt64ToUInt64(value: SInt64): UInt64; external name '_SInt64ToUInt64';
+
+
+{$ALIGN MAC68K}
+
+
+{unit MixedMode}
+{
+ File: CarbonCore/MixedMode.h
+
+ Contains: Mixed Mode Manager Interfaces.
+
+ Version: CarbonCore-654.0.85~1
+
+ Copyright: © 1992-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+ ===========================================================================
+
+ Notes on Mixed Mode and Mac OS X
+
+ Mac OS X doesn't have mixed mode, nor the Mixed Mode Manager, because
+ everything running is PowerPC code. Therefore, there is little need for
+ anything in this file unless the code still needs to run on Mac OS 9.x
+ CarbonLib, and on Mac OS X.
+
+ ===========================================================================
+}
+{ Mixed Mode constants }
+{ Current Routine Descriptor Version }
+const
+ kRoutineDescriptorVersion = 7;
+
+{ MixedModeMagic Magic Cookie/Trap number }
+const
+ _MixedModeMagic = $AAFE;
+
+{ MixedModeState Version for CFM68K Mixed Mode }
+const
+ kCurrentMixedModeStateRecord = 1;
+
+{ Calling Conventions }
+type
+ CallingConventionType = UInt16;
+const
+ kPascalStackBased = 0;
+ kCStackBased = 1;
+ kRegisterBased = 2;
+ kD0DispatchedPascalStackBased = 8;
+ kD1DispatchedPascalStackBased = 12;
+ kD0DispatchedCStackBased = 9;
+ kStackDispatchedPascalStackBased = 14;
+ kThinkCStackBased = 5;
+
+{ ISA Types }
+type
+ ISAType = SInt8;
+const
+ kM68kISA = 0;
+ kPowerPCISA = 1;
+
+const
+ kX86ISA = 2;
+
+{ RTA Types }
+type
+ RTAType = SInt8;
+const
+ kOld68kRTA = 0 shl 4;
+ kPowerPCRTA = 0 shl 4;
+ kCFM68kRTA = 1 shl 4;
+
+const
+ kX86RTA = 2 shl 4;
+
+
+const
+{$ifc TARGET_CPU_PPC}
+ GetCurrentISA = kPowerPCISA;
+ GetCurrentRTA = kPowerPCRTA;
+{$elsec}
+ {$ifc TARGET_CPU_X86}
+ GetCurrentISA = kX86ISA;
+ GetCurrentRTA = kX86RTA;
+ {$endc}
+{$endc}
+ GetCurrentArchitecture = GetCurrentISA or GetCurrentRTA;
+
+{ Constants for specifing 68k registers }
+const
+ kRegisterD0 = 0;
+ kRegisterD1 = 1;
+ kRegisterD2 = 2;
+ kRegisterD3 = 3;
+ kRegisterD4 = 8;
+ kRegisterD5 = 9;
+ kRegisterD6 = 10;
+ kRegisterD7 = 11;
+ kRegisterA0 = 4;
+ kRegisterA1 = 5;
+ kRegisterA2 = 6;
+ kRegisterA3 = 7;
+ kRegisterA4 = 12;
+ kRegisterA5 = 13;
+ kRegisterA6 = 14; { A7 is the same as the PowerPC SP }
+ kCCRegisterCBit = 16;
+ kCCRegisterVBit = 17;
+ kCCRegisterZBit = 18;
+ kCCRegisterNBit = 19;
+ kCCRegisterXBit = 20;
+
+type
+ registerSelectorType = UInt16;
+{ SizeCodes we use everywhere }
+const
+ kNoByteCode = 0;
+ kOneByteCode = 1;
+ kTwoByteCode = 2;
+ kFourByteCode = 3;
+
+{ Mixed Mode Routine Records }
+type
+ ProcInfoType = UInt32;
+{ Routine Flag Bits }
+type
+ RoutineFlagsType = UInt16;
+const
+ kProcDescriptorIsAbsolute = $00;
+ kProcDescriptorIsRelative = $01;
+
+const
+ kFragmentIsPrepared = $00;
+ kFragmentNeedsPreparing = $02;
+
+const
+ kUseCurrentISA = $00;
+ kUseNativeISA = $04;
+
+const
+ kPassSelector = $00;
+ kDontPassSelector = $08;
+
+const
+ kRoutineIsNotDispatchedDefaultRoutine = $00;
+ kRoutineIsDispatchedDefaultRoutine = $10;
+
+const
+ kProcDescriptorIsProcPtr = $00;
+ kProcDescriptorIsIndex = $20;
+
+type
+ RoutineRecord = record
+ procInfo: ProcInfoType; { calling conventions }
+ reserved1: SInt8; { Must be 0 }
+ ISA: ISAType; { Instruction Set Architecture }
+ routineFlags: RoutineFlagsType; { Flags for each routine }
+ procDescriptor: ProcPtr; { Where is the thing weÕre calling? }
+ reserved2: UInt32; { Must be 0 }
+ selector: UInt32; { For dispatched routines, the selector }
+ end;
+ RoutineRecordPtr = ^RoutineRecord;
+ RoutineRecordHandle = ^RoutineRecordPtr;
+{ Mixed Mode Routine Descriptors }
+{ Definitions of the Routine Descriptor Flag Bits }
+type
+ RDFlagsType = UInt8;
+const
+ kSelectorsAreNotIndexable = $00;
+ kSelectorsAreIndexable = $01;
+
+{ Routine Descriptor Structure }
+type
+ RoutineDescriptor = record
+ goMixedModeTrap: UInt16; { Our A-Trap }
+ version: SInt8; { Current Routine Descriptor version }
+ routineDescriptorFlags: RDFlagsType; { Routine Descriptor Flags }
+ reserved1: UInt32; { Unused, must be zero }
+ reserved2: UInt8; { Unused, must be zero }
+ selectorInfo: UInt8; { If a dispatched routine, calling convention, else 0 }
+ routineCount: UInt16; { Number of routines in this RD }
+ routineRecords: array [0..0] of RoutineRecord; { The individual routines }
+ end;
+ RoutineDescriptorPtr = ^RoutineDescriptor;
+ RoutineDescriptorHandle= ^RoutineDescriptorPtr;
+{ 68K MixedModeStateRecord }
+type
+ MixedModeStateRecordPtr = ^MixedModeStateRecord;
+ MixedModeStateRecord = record
+ state1: UInt32;
+ state2: UInt32;
+ state3: UInt32;
+ state4: UInt32;
+ end;
+{
+ * NewRoutineDescriptor() *** DEPRECATED ***
+ *
+ * Discussion:
+ * This function is deprecated on Mac OS X and in CarbonLib because
+ * routine descriptors existed to allow 68k code and PowerPC code to
+ * call each other and get parameter marshalling and other OS
+ * services. Mac OS X is entirely PowerPC native, and does not
+ * require the use of mixed mode.
+ * You should remove any calls to NewRoutineDescriptor() from your
+ * sources, and replace them with theProc parameter itself.
+ *
+ * Availability:
+ * Mac OS X: not available but deprecated in 10.4
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * DisposeRoutineDescriptor() *** DEPRECATED ***
+ *
+ * Discussion:
+ * DisposeRoutineDescriptor() is deprecated on Mac OS X.
+ * RoutineDescriptors are no longer used.
+ * You should delete any calls to DisposeRoutineDescriptor() from
+ * your sources.
+ *
+ * Availability:
+ * Mac OS X: not available but deprecated in 10.4
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+function NewRoutineDescriptor( theProc: ProcPtr; theProcInfo: ProcInfoType; theISA: ISAType ): UniversalProcPtr; inline;
+procedure DisposeRoutineDescriptor( theUPP: UniversalProcPtr ); inline;
+
+{ Mixed Mode ProcInfos }
+const
+{ Calling Convention Offsets }
+ kCallingConventionWidth = 4;
+ kCallingConventionPhase = 0;
+ kCallingConventionMask = $0F; { Result Offsets }
+ kResultSizeWidth = 2;
+ kResultSizePhase = kCallingConventionWidth;
+ kResultSizeMask = $30; { Parameter offsets & widths }
+ kStackParameterWidth = 2;
+ kStackParameterPhase = kCallingConventionWidth + kResultSizeWidth;
+ kStackParameterMask = $FFFFFFC0; { Register Result Location offsets & widths }
+ kRegisterResultLocationWidth = 5;
+ kRegisterResultLocationPhase = kCallingConventionWidth + kResultSizeWidth; { Register Parameter offsets & widths }
+ kRegisterParameterWidth = 5;
+ kRegisterParameterPhase = kCallingConventionWidth + kResultSizeWidth + kRegisterResultLocationWidth;
+ kRegisterParameterMask = $7FFFF800;
+ kRegisterParameterSizePhase = 0;
+ kRegisterParameterSizeWidth = 2;
+ kRegisterParameterWhichPhase = kRegisterParameterSizeWidth;
+ kRegisterParameterWhichWidth = 3; { Dispatched Stack Routine Selector offsets & widths }
+ kDispatchedSelectorSizeWidth = 2;
+ kDispatchedSelectorSizePhase = kCallingConventionWidth + kResultSizeWidth; { Dispatched Stack Routine Parameter offsets }
+ kDispatchedParameterPhase = kCallingConventionWidth + kResultSizeWidth + kDispatchedSelectorSizeWidth; { Special Case offsets & widths }
+ kSpecialCaseSelectorWidth = 6;
+ kSpecialCaseSelectorPhase = kCallingConventionWidth;
+ kSpecialCaseSelectorMask = $03F0;
+
+const
+ kSpecialCase = $000F; { (CallingConventionType) }
+
+const
+{ all of the special cases enumerated. The selector field is 6 bits wide }
+ kSpecialCaseHighHook = 0;
+ kSpecialCaseCaretHook = 0; { same as kSpecialCaseHighHook }
+ kSpecialCaseEOLHook = 1;
+ kSpecialCaseWidthHook = 2;
+ kSpecialCaseTextWidthHook = 2; { same as kSpecialCaseWidthHook }
+ kSpecialCaseNWidthHook = 3;
+ kSpecialCaseDrawHook = 4;
+ kSpecialCaseHitTestHook = 5;
+ kSpecialCaseTEFindWord = 6;
+ kSpecialCaseProtocolHandler = 7;
+ kSpecialCaseSocketListener = 8;
+ kSpecialCaseTERecalc = 9;
+ kSpecialCaseTEDoText = 10;
+ kSpecialCaseGNEFilterProc = 11;
+ kSpecialCaseMBarHook = 12;
+
+
+{ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ * Macros for building ProcInfos. Examples:
+ *
+ *
+ * uppModalFilterProcInfo = kPascalStackBased
+ * | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
+ * | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(DialogRef)))
+ * | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(EventRecord*)))
+ * | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(short*))),
+ *
+ * uppDeskHookProcInfo = kRegisterBased
+ * | REGISTER_ROUTINE_PARAMETER(1, kRegisterD0, SIZE_CODE(sizeof(Boolean)))
+ * | REGISTER_ROUTINE_PARAMETER(2, kRegisterA0, SIZE_CODE(sizeof(EventRecord*)))
+ *
+ * uppGXSpoolResourceProcInfo = kCStackBased
+ * | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
+ * | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxSpoolFile)))
+ * | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Handle)))
+ * | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(ResType)))
+ * | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
+ *
+ * uppTEFindWordProcInfo = SPECIAL_CASE_PROCINFO( 6 ),
+ *
+ }
+
+
+// Lots of #defines not converted over, request if needed.
+
+
+{unit Multiprocessing}
+{
+ File: Multiprocessing.p
+
+ Contains: Multiprocessing interfaces
+
+ Version: Technology: Multiprocessing API version 2.4, integrated NanoKernel support
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1995-2002 DayStar Digital, Inc.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ ===========================================================================================
+ *** WARNING: You must properly check the availability of MP services before calling them!
+ See the section titled "Checking API Availability".
+ ===========================================================================================
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN POWER}
+
+
+{
+ ===========================================================================================
+ This is the header file for version 2.4 of the Mac OS multiprocessing support. This version
+ has been totally reimplemented and has significant new services. The main goal of the
+ reimplementation has been to transfer task management into the core operating system to provide
+ much more reliable and more efficient operation, including on single processor machines.
+ The memory management has also been massively improved, it is much faster and wastes much
+ less space. New services include POSIX style per-task storage, timers with millisecond and
+ microsecond resolutions, memory allocation at a specified alignment, and system pageable
+ and RAM resident memory pools. See the MP API documentation for details.
+ The old "DayStar" debugging services (whose names began with an underscore) have been
+ removed from this header. A very few are still implemented for binary compatibility, or in
+ cases where they happened to be exposed inappropriately. (E.g. _MPIsFullyInitialized must
+ be called to see if the MP API is ReallyTrulyª usable.) New code and recompiles of old
+ code should avoid use of these defunct services, except for _MPIsFullyInitialized.
+ ===========================================================================================
+}
+
+
+{
+ ===========================================================================================
+ The following services are from the original MP API and remain supported in version 2.0:
+ MPProcessors
+ MPCreateTask
+ MPTerminateTask
+ MPCurrentTaskID
+ MPYield
+ MPExit
+ MPCreateQueue
+ MPDeleteQueue
+ MPNotifyQueue
+ MPWaitOnQueue
+ MPCreateSemaphore
+ MPCreateBinarySemaphore (In C only, a macro that calls MPCreateSemaphore.)
+ MPDeleteSemaphore
+ MPSignalSemaphore
+ MPWaitOnSemaphore
+ MPCreateCriticalRegion
+ MPDeleteCriticalRegion
+ MPEnterCriticalRegion
+ MPExitCriticalRegion
+ MPAllocate (Deprecated, use MPAllocateAligned for new builds.)
+ MPFree
+ MPBlockCopy
+ MPLibraryIsLoaded (In C only, a macro.)
+ _MPIsFullyInitialized (See comments about checking for MP API availability.)
+ ===========================================================================================
+}
+
+
+{
+ ===========================================================================================
+ The following services are new in version 2.0:
+ MPProcessorsScheduled
+ MPSetTaskWeight
+ MPTaskIsPreemptive
+ MPAllocateTaskStorageIndex
+ MPDeallocateTaskStorageIndex
+ MPSetTaskStorageValue
+ MPGetTaskStorageValue
+ MPSetQueueReserve
+ MPCreateEvent
+ MPDeleteEvent
+ MPSetEvent
+ MPWaitForEvent
+ UpTime
+ DurationToAbsolute
+ AbsoluteToDuration
+ MPDelayUntil
+ MPCreateTimer
+ MPDeleteTimer
+ MPSetTimerNotify
+ MPArmTimer
+ MPCancelTimer
+ MPSetExceptionHandler
+ MPThrowException
+ MPDisposeTaskException
+ MPExtractTaskState
+ MPSetTaskState
+ MPRegisterDebugger
+ MPUnregisterDebugger
+ MPAllocateAligned (Preferred over MPAllocate.)
+ MPGetAllocatedBlockSize
+ MPBlockClear
+ MPDataToCode
+ MPRemoteCall (Preferred over _MPRPC.)
+ ===========================================================================================
+}
+
+
+{
+ ===========================================================================================
+ The following services are new in version 2.1:
+ MPCreateNotification
+ MPDeleteNotification
+ MPModifyNotification
+ MPCauseNotification
+ MPGetNextTaskID
+ MPGetNextCpuID
+ ===========================================================================================
+}
+
+
+{
+ ===========================================================================================
+ The following services are "unofficial" extensions to the original API. They are not in
+ the multiprocessing API documentation, but were in previous versions of this header. They
+ remain supported in version 2.0. They may not be supported in other environments.
+ _MPRPC (Deprecated, use MPRemoteCall for new builds.)
+ _MPAllocateSys (Deprecated, use MPAllocateAligned for new builds.)
+ _MPTaskIsToolboxSafe
+ _MPLibraryVersion
+ _MPLibraryIsCompatible
+ ===========================================================================================
+}
+
+
+{
+ ===========================================================================================
+ The following services were in previous versions of this header for "debugging only" use.
+ They are NOT implemented in version 2.0. For old builds they can be accessed by defining
+ the symbol MPIncludeDefunctServices to have a nonzero value.
+ _MPInitializePrintf
+ _MPPrintf
+ _MPDebugStr
+ _MPStatusPString
+ _MPStatusCString
+ ===========================================================================================
+}
+
+
+{
+ ¤
+ ===========================================================================================
+ General Types and Constants
+ ===========================
+}
+
+
+const
+ MPLibrary_MajorVersion = 2; { ! When these change be sure to update the build versions }
+ MPLibrary_MinorVersion = 4; { ! used in the startup check in MPInitializeAPI! }
+ MPLibrary_Release = 1;
+ MPLibrary_DevelopmentRevision = 1;
+
+
+type
+ MPProcessID = ^SInt32; { an opaque 32-bit type }
+ MPProcessIDPtr = ^MPProcessID; { when a var xx:MPProcessID parameter can be nil, it is changed to xx: MPProcessIDPtr }
+ MPTaskID = ^SInt32; { an opaque 32-bit type }
+ MPTaskIDPtr = ^MPTaskID; { when a var xx:MPTaskID parameter can be nil, it is changed to xx: MPTaskIDPtr }
+ MPQueueID = ^SInt32; { an opaque 32-bit type }
+ MPQueueIDPtr = ^MPQueueID; { when a var xx:MPQueueID parameter can be nil, it is changed to xx: MPQueueIDPtr }
+ MPSemaphoreID = ^SInt32; { an opaque 32-bit type }
+ MPSemaphoreIDPtr = ^MPSemaphoreID; { when a var xx:MPSemaphoreID parameter can be nil, it is changed to xx: MPSemaphoreIDPtr }
+ MPCriticalRegionID = ^SInt32; { an opaque 32-bit type }
+ MPCriticalRegionIDPtr = ^MPCriticalRegionID; { when a var xx:MPCriticalRegionID parameter can be nil, it is changed to xx: MPCriticalRegionIDPtr }
+ MPTimerID = ^SInt32; { an opaque 32-bit type }
+ MPTimerIDPtr = ^MPTimerID; { when a var xx:MPTimerID parameter can be nil, it is changed to xx: MPTimerIDPtr }
+ MPEventID = ^SInt32; { an opaque 32-bit type }
+ MPEventIDPtr = ^MPEventID; { when a var xx:MPEventID parameter can be nil, it is changed to xx: MPEventIDPtr }
+ MPAddressSpaceID = ^SInt32; { an opaque 32-bit type }
+ MPAddressSpaceIDPtr = ^MPAddressSpaceID; { when a var xx:MPAddressSpaceID parameter can be nil, it is changed to xx: MPAddressSpaceIDPtr }
+ MPNotificationID = ^SInt32; { an opaque 32-bit type }
+ MPNotificationIDPtr = ^MPNotificationID; { when a var xx:MPNotificationID parameter can be nil, it is changed to xx: MPNotificationIDPtr }
+ MPCoherenceID = ^SInt32; { an opaque 32-bit type }
+ MPCoherenceIDPtr = ^MPCoherenceID; { when a var xx:MPCoherenceID parameter can be nil, it is changed to xx: MPCoherenceIDPtr }
+ MPCpuID = ^SInt32; { an opaque 32-bit type }
+ MPCpuIDPtr = ^MPCpuID; { when a var xx:MPCpuID parameter can be nil, it is changed to xx: MPCpuIDPtr }
+ MPAreaID = ^SInt32; { an opaque 32-bit type }
+ MPAreaIDPtr = ^MPAreaID; { when a var xx:MPAreaID parameter can be nil, it is changed to xx: MPAreaIDPtr }
+ MPConsoleID = ^SInt32; { an opaque 32-bit type }
+ MPConsoleIDPtr = ^MPConsoleID; { when a var xx:MPConsoleID parameter can be nil, it is changed to xx: MPConsoleIDPtr }
+ MPOpaqueID = ^SInt32; { an opaque 32-bit type }
+ MPOpaqueIDPtr = ^MPOpaqueID; { when a var xx:MPOpaqueID parameter can be nil, it is changed to xx: MPOpaqueIDPtr }
+
+const
+ { Values for MPOpaqueIDClass. }
+ kOpaqueAnyID = 0;
+ kOpaqueProcessID = 1;
+ kOpaqueTaskID = 2;
+ kOpaqueTimerID = 3;
+ kOpaqueQueueID = 4;
+ kOpaqueSemaphoreID = 5;
+ kOpaqueCriticalRegionID = 6;
+ kOpaqueCpuID = 7;
+ kOpaqueAddressSpaceID = 8;
+ kOpaqueEventID = 9;
+ kOpaqueCoherenceID = 10;
+ kOpaqueAreaID = 11;
+ kOpaqueNotificationID = 12;
+ kOpaqueConsoleID = 13;
+
+
+type
+ MPOpaqueIDClass = UInt32;
+
+
+const
+ kMPNoID = 0; { New code should use kInvalidID everywhere. }
+
+
+type
+ MPTaskOptions = OptionBits;
+ TaskStorageIndex = UInt32;
+ TaskStorageValue = UInt32;
+ MPSemaphoreCount = ItemCount;
+ MPTaskWeight = UInt32;
+ MPEventFlags = UInt32;
+ MPEventFlagsPtr = ^MPEventFlags; { when a VAR xx: MPEventFlags parameter can be nil, it is changed to xx: MPEventFlagsPtr }
+ MPExceptionKind = UInt32;
+ MPTaskStateKind = UInt32;
+ MPPageSizeClass = UInt32;
+
+
+const
+ kDurationImmediate = 0;
+ kDurationForever = $7FFFFFFF;
+ kDurationMillisecond = 1;
+ kDurationMicrosecond = -1;
+
+
+ {
+ ¤
+ ===========================================================================================
+ Process/Processor Services
+ ==========================
+ }
+
+
+ {
+ * MPProcessors()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPProcessors: ItemCount; external name '_MPProcessors';
+
+{ The physical total. }
+
+{
+ * MPProcessorsScheduled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPProcessorsScheduled: ItemCount; external name '_MPProcessorsScheduled';
+
+{ Those currently in use. }
+
+{
+ ¤
+ ===========================================================================================
+ Tasking Services
+ ================
+}
+
+
+const
+ { For MPCreateTask options }
+ kMPCreateTaskTakesAllExceptionsMask = $00000002;
+ kMPCreateTaskNotDebuggableMask = $00000004;
+ kMPCreateTaskValidOptionsMask = $00000006;
+
+
+ { ------------------------------------------------------------------------------------------- }
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ TaskProc = function(parameter: UnivPtr): OSStatus;
+{$elsec}
+ TaskProc = ProcPtr;
+{$endc}
+
+
+ {
+ * MPCreateTask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPCreateTask(entryPoint: TaskProc; parameter: UnivPtr; stackSize: ByteCount; notifyQueue: MPQueueID; terminationParameter1: UnivPtr; terminationParameter2: UnivPtr; options: MPTaskOptions; task: MPTaskIDPtr): OSStatus; external name '_MPCreateTask';
+
+
+{
+ * MPTerminateTask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPTerminateTask(task: MPTaskID; terminationStatus: OSStatus): OSStatus; external name '_MPTerminateTask';
+
+
+{
+ * MPSetTaskWeight()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPSetTaskWeight(task: MPTaskID; weight: MPTaskWeight): OSStatus; external name '_MPSetTaskWeight';
+
+
+{
+ * MPTaskIsPreemptive()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPTaskIsPreemptive(taskID: MPTaskID): boolean; external name '_MPTaskIsPreemptive';
+
+{ May be kInvalidID. }
+
+{
+ * MPExit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure MPExit(status: OSStatus); external name '_MPExit';
+
+
+{
+ * MPYield()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure MPYield; external name '_MPYield';
+
+
+{
+ * MPCurrentTaskID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPCurrentTaskID: MPTaskID; external name '_MPCurrentTaskID';
+
+
+{
+ * MPSetTaskType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.3 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPSetTaskType(task: MPTaskID; taskType: OSType): OSStatus; external name '_MPSetTaskType';
+
+
+{ ------------------------------------------------------------------------------------------- }
+
+
+{
+ ---------------------------------------------------
+ ! The task storage services are new in version 2.0.
+}
+
+
+{
+ * MPAllocateTaskStorageIndex()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPAllocateTaskStorageIndex(var index: TaskStorageIndex): OSStatus; external name '_MPAllocateTaskStorageIndex';
+
+
+{
+ * MPDeallocateTaskStorageIndex()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPDeallocateTaskStorageIndex(index: TaskStorageIndex): OSStatus; external name '_MPDeallocateTaskStorageIndex';
+
+
+{
+ * MPSetTaskStorageValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPSetTaskStorageValue(index: TaskStorageIndex; value: TaskStorageValue): OSStatus; external name '_MPSetTaskStorageValue';
+
+
+{
+ * MPGetTaskStorageValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPGetTaskStorageValue(index: TaskStorageIndex): TaskStorageValue; external name '_MPGetTaskStorageValue';
+
+
+{
+ ¤
+ ===========================================================================================
+ Synchronization Services
+ ========================
+}
+
+
+{
+ * MPCreateQueue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPCreateQueue(var queue: MPQueueID): OSStatus; external name '_MPCreateQueue';
+
+
+{
+ * MPDeleteQueue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPDeleteQueue(queue: MPQueueID): OSStatus; external name '_MPDeleteQueue';
+
+
+{
+ * MPNotifyQueue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPNotifyQueue(queue: MPQueueID; param1: UnivPtr; param2: UnivPtr; param3: UnivPtr): OSStatus; external name '_MPNotifyQueue';
+
+
+{
+ * MPWaitOnQueue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPWaitOnQueue(queue: MPQueueID; param1: UnivPtr; param2: UnivPtr; param3: UnivPtr; timeout: Duration): OSStatus; external name '_MPWaitOnQueue';
+
+
+{
+ * MPSetQueueReserve()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPSetQueueReserve(queue: MPQueueID; count: ItemCount): OSStatus; external name '_MPSetQueueReserve';
+
+
+{ ------------------------------------------------------------------------------------------- }
+
+
+{
+ * MPCreateSemaphore()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPCreateSemaphore(maximumValue: MPSemaphoreCount; initialValue: MPSemaphoreCount; var semaphore: MPSemaphoreID): OSStatus; external name '_MPCreateSemaphore';
+
+
+{
+ * MPDeleteSemaphore()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPDeleteSemaphore(semaphore: MPSemaphoreID): OSStatus; external name '_MPDeleteSemaphore';
+
+
+{
+ * MPSignalSemaphore()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPSignalSemaphore(semaphore: MPSemaphoreID): OSStatus; external name '_MPSignalSemaphore';
+
+
+{
+ * MPWaitOnSemaphore()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPWaitOnSemaphore(semaphore: MPSemaphoreID; timeout: Duration): OSStatus; external name '_MPWaitOnSemaphore';
+
+
+{ ------------------------------------------------------------------------------------------- }
+
+
+{
+ * MPCreateCriticalRegion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPCreateCriticalRegion(var criticalRegion: MPCriticalRegionID): OSStatus; external name '_MPCreateCriticalRegion';
+
+
+{
+ * MPDeleteCriticalRegion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPDeleteCriticalRegion(criticalRegion: MPCriticalRegionID): OSStatus; external name '_MPDeleteCriticalRegion';
+
+
+{
+ * MPEnterCriticalRegion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPEnterCriticalRegion(criticalRegion: MPCriticalRegionID; timeout: Duration): OSStatus; external name '_MPEnterCriticalRegion';
+
+
+{
+ * MPExitCriticalRegion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPExitCriticalRegion(criticalRegion: MPCriticalRegionID): OSStatus; external name '_MPExitCriticalRegion';
+
+
+{ ------------------------------------------------------------------------------------------- }
+
+
+{
+ * MPCreateEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPCreateEvent(var event: MPEventID): OSStatus; external name '_MPCreateEvent';
+
+
+{
+ * MPDeleteEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPDeleteEvent(event: MPEventID): OSStatus; external name '_MPDeleteEvent';
+
+
+{
+ * MPSetEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPSetEvent(event: MPEventID; flags: MPEventFlags): OSStatus; external name '_MPSetEvent';
+
+
+{
+ * MPWaitForEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPWaitForEvent(event: MPEventID; flags: MPEventFlagsPtr; timeout: Duration): OSStatus; external name '_MPWaitForEvent';
+
+{
+ ¤
+ ===========================================================================================
+ Notification Services (API)
+ =====================
+}
+
+
+{
+ * MPCreateNotification()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPCreateNotification(var notificationID: MPNotificationID): OSStatus; external name '_MPCreateNotification';
+
+
+{
+ * MPDeleteNotification()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPDeleteNotification(notificationID: MPNotificationID): OSStatus; external name '_MPDeleteNotification';
+
+
+{
+ * MPModifyNotification()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPModifyNotification(notificationID: MPNotificationID; anID: MPOpaqueID; notifyParam1: UnivPtr; notifyParam2: UnivPtr; notifyParam3: UnivPtr): OSStatus; external name '_MPModifyNotification';
+
+
+{
+ * MPModifyNotificationParameters()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.3 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPModifyNotificationParameters(notificationID: MPNotificationID; kind: MPOpaqueIDClass; notifyParam1: UnivPtr; notifyParam2: UnivPtr; notifyParam3: UnivPtr): OSStatus; external name '_MPModifyNotificationParameters';
+
+
+{
+ * MPCauseNotification()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPCauseNotification(notificationID: MPNotificationID): OSStatus; external name '_MPCauseNotification';
+
+
+{
+ ¤
+ ===========================================================================================
+ Timer Services
+ ==============
+}
+
+
+{
+ --------------------------------------------
+ ! The timer services are new in version 2.0.
+}
+
+
+{
+ Utilities you might want to use from DriverServices
+ extern AbsoluteTime UpTime ( void );
+ extern AbsoluteTime DurationToAbsolute ( Duration duration );
+ extern Duration AbsoluteToDuration ( AbsoluteTime time );
+}
+
+
+const
+ { For MPArmTimer options }
+ kMPPreserveTimerIDMask = $00000001;
+ kMPTimeIsDeltaMask = $00000002;
+ kMPTimeIsDurationMask = $00000004;
+
+
+ {
+ * MPDelayUntil()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPDelayUntil(var expirationTime: AbsoluteTime): OSStatus; external name '_MPDelayUntil';
+
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * MPDelayUntilSys()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function MPDelayUntilSys(var expirationTime: AbsoluteTime): OSStatus; external name '_MPDelayUntilSys';
+
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * MPCreateTimer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPCreateTimer(var timerID: MPTimerID): OSStatus; external name '_MPCreateTimer';
+
+
+{
+ * MPDeleteTimer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPDeleteTimer(timerID: MPTimerID): OSStatus; external name '_MPDeleteTimer';
+
+
+{
+ * MPSetTimerNotify()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPSetTimerNotify(timerID: MPTimerID; anID: MPOpaqueID; notifyParam1: UnivPtr; notifyParam2: UnivPtr; notifyParam3: UnivPtr): OSStatus; external name '_MPSetTimerNotify';
+
+
+{
+ * MPArmTimer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPArmTimer(timerID: MPTimerID; var expirationTime: AbsoluteTime; options: OptionBits): OSStatus; external name '_MPArmTimer';
+
+
+{
+ * MPCancelTimer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPCancelTimer(timerID: MPTimerID; timeRemaining: AbsoluteTimePtr): OSStatus; external name '_MPCancelTimer';
+
+
+{
+ ¤
+ ===========================================================================================
+ Memory Services
+ ===============
+}
+
+
+const
+ { Maximum allocation request size is 1GB. }
+ kMPMaxAllocSize = 1073741824;
+
+ { Values for the alignment parameter to MPAllocateAligned. }
+ kMPAllocateDefaultAligned = 0;
+ kMPAllocate8ByteAligned = 3;
+ kMPAllocate16ByteAligned = 4;
+ kMPAllocate32ByteAligned = 5;
+ kMPAllocate1024ByteAligned = 10;
+ kMPAllocate4096ByteAligned = 12;
+ kMPAllocateMaxAlignment = 16; { Somewhat arbitrary limit on expectations. }
+ kMPAllocateAltiVecAligned = 4; { The P.C. name. }
+ kMPAllocateVMXAligned = 4; { The older, common name. }
+ kMPAllocateVMPageAligned = 254; { Pseudo value, converted at runtime. }
+ kMPAllocateInterlockAligned = 255; { Pseudo value, converted at runtime. }
+
+
+ { Values for the options parameter to MPAllocateAligned. }
+ kMPAllocateClearMask = $0001; { Zero the allocated block. }
+ kMPAllocateGloballyMask = $0002; { Allocate from the globally visible pool. }
+ kMPAllocateResidentMask = $0004; { Allocate from the RAM-resident pool. }
+ kMPAllocateNoGrowthMask = $0010; { Do not attempt to grow the pool. }
+ kMPAllocateNoCreateMask = $0020; { Do not attempt to create the pool if it doesn't exist yet. }
+
+
+ { ------------------------------------------------------------------------------------------- }
+
+
+ {
+ * MPAllocateAligned()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPAllocateAligned(size: ByteCount; alignment: ByteParameter; options: OptionBits): LogicalAddress; external name '_MPAllocateAligned';
+
+{ ! MPAllocateAligned is new in version 2.0. }
+
+{
+ * MPAllocate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPAllocate(size: ByteCount): LogicalAddress; external name '_MPAllocate';
+
+{ Use MPAllocateAligned instead. }
+
+{
+ * MPFree()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure MPFree(objct: LogicalAddress); external name '_MPFree';
+
+
+{
+ * MPGetAllocatedBlockSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPGetAllocatedBlockSize(objct: LogicalAddress): ByteCount; external name '_MPGetAllocatedBlockSize';
+
+
+{ ------------------------------------------------------------------------------------------- }
+
+
+{
+ * MPBlockCopy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure MPBlockCopy(source: LogicalAddress; destination: LogicalAddress; size: ByteCount); external name '_MPBlockCopy';
+
+
+{
+ * MPBlockClear()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure MPBlockClear(address: LogicalAddress; size: ByteCount); external name '_MPBlockClear';
+
+{ ! MPBlockClear is new in version 2.0. }
+
+{
+ * MPDataToCode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure MPDataToCode(address: LogicalAddress; size: ByteCount); external name '_MPDataToCode';
+
+{ ! MPDataToCode is new in version 2.0. }
+{
+ ¤
+ ===========================================================================================
+ Exception/Debugging Services
+ ============================
+}
+
+
+{
+ -------------------------------------------------------------------------------------------
+ *** Important Note ***
+ ----------------------
+
+ The functions MPExtractTaskState and MPSetTaskState infer the size of the "info" buffer
+ from the "kind" parameter. A given value for MPTaskStateKind will always refer to a
+ single specific physical buffer layout. Should new register sets be added, or the size
+ or number of any registers change, new values of MPTaskStateKind will be introduced to
+ refer to the new buffer layouts.
+
+ The following types for the buffers are in MachineExceptions. The correspondence between
+ MPTaskStateKind values and MachineExceptions types is:
+
+ kMPTaskStateRegisters -> RegisterInformation
+ kMPTaskStateFPU -> FPUInformation
+ kMPTaskStateVectors -> VectorInformation
+ kMPTaskStateMachine -> MachineInformation
+ kMPTaskState32BitMemoryException -> ExceptionInfo for old-style 32-bit memory exceptions
+
+ For reference, on PowerPC the MachineExceptions types contain:
+
+ RegisterInformation -> The GPRs, 32 values of 64 bits each.
+ FPUInformation -> The FPRs plus FPSCR, 32 values of 64 bits each, one value of
+ 32 bits.
+ VectorInformation -> The AltiVec vector registers plus VSCR and VRSave, 32 values
+ of 128 bits each, one value of 128 bits, and one 32 bit value.
+ MachineInformation -> The CTR, LR, PC, each of 64 bits. The CR, XER, MSR, MQ,
+ exception kind, and DSISR, each of 32 bits. The 64 bit DAR.
+ ExceptionInfo -> Only memory exceptions are specified, 4 fields of 32 bits each.
+ Note that this type only covers memory exceptions on 32-bit CPUs!
+ The following types are declared here:
+ kMPTaskStateTaskInfo -> MPTaskInfo
+}
+
+
+const
+ { Values for the TaskStateKind to MPExtractTaskState and MPSetTaskState. }
+ kMPTaskStateRegisters = 0; { The task general registers. }
+ kMPTaskStateFPU = 1; { The task floating point registers }
+ kMPTaskStateVectors = 2; { The task vector registers }
+ kMPTaskStateMachine = 3; { The task machine registers }
+ kMPTaskState32BitMemoryException = 4; { The task memory exception information for 32-bit CPUs. }
+ kMPTaskStateTaskInfo = 5; { Static and dynamic information about the task. }
+
+
+ { Option bits and numbers for MPDisposeTaskException. }
+ kMPTaskPropagate = 0; { The exception is propagated. }
+ kMPTaskResumeStep = 1; { The task is resumed and single step is enabled. }
+ kMPTaskResumeBranch = 2; { The task is resumed and branch stepping is enabled. }
+ kMPTaskResumeMask = $0000; { The task is resumed. }
+ kMPTaskPropagateMask = $01; { The exception is propagated. }
+ kMPTaskResumeStepMask = $02; { The task is resumed and single step is enabled. }
+ kMPTaskResumeBranchMask = $04; { The task is resumed and branch stepping is enabled. }
+
+
+ { For kMPTaskStateTaskInfo, the task's runState }
+ kMPTaskBlocked = 0; { Task is blocked (queued on resource) }
+ kMPTaskReady = 1; { Task is runnable }
+ kMPTaskRunning = 2; { Task is running }
+
+ { For kMPTaskStateTaskInfo, the version of the MPTaskInfo structure requested. }
+ kMPTaskInfoVersion = 3;
+
+
+type
+ MPTaskInfoPtr = ^MPTaskInfo;
+ MPTaskInfo = record
+ version: PBVersion; { Version 3 of the data structure requested }
+ name: OSType; { Task name }
+ queueName: OSType; { Task's queue owner name }
+ runState: UInt16; { Running, ready, blocked }
+ lastCPU: UInt16; { Address of CPU where task previously ran }
+ weight: UInt32; { Processing weight: 1 - 10,000 }
+ processID: MPProcessID; { Owning process ID }
+ cpuTime: AbsoluteTime; { Accumulated task time }
+ schedTime: AbsoluteTime; { Time when last scheduled }
+ creationTime: AbsoluteTime; { Time when task created }
+ codePageFaults: ItemCount; { Page faults from code execution }
+ dataPageFaults: ItemCount; { Page faults from data access }
+ preemptions: ItemCount; { Number of times task was preempted }
+ cpuID: MPCpuID; { ID of CPU where task previously ran. }
+ blockedObject: MPOpaqueID; { ID of blocked object. }
+ spaceID: MPAddressSpaceID; { Address space ID of this task. }
+ stackBase: LogicalAddress; { Base of stack (lowest address). }
+ stackLimit: LogicalAddress; { Stack limit (highest address). }
+ stackCurr: LogicalAddress; { Current stack address. }
+ end;
+
+ {
+ Upon a task exception, the following message is sent to the designated queue:
+ 1. The MPTaskID,
+ 2. The exception kind. These are enumerated in the interfaces header MachineExceptions.h
+ 3. N/A
+ }
+
+
+ { ------------------------------------------------------------------------------------------- }
+
+
+ {
+ * MPSetExceptionHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPSetExceptionHandler(task: MPTaskID; exceptionQ: MPQueueID): OSStatus; external name '_MPSetExceptionHandler';
+
+
+{
+ * MPDisposeTaskException()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPDisposeTaskException(task: MPTaskID; action: OptionBits): OSStatus; external name '_MPDisposeTaskException';
+
+
+{
+ * MPExtractTaskState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPExtractTaskState(task: MPTaskID; kind: MPTaskStateKind; info: UnivPtr): OSStatus; external name '_MPExtractTaskState';
+
+
+{
+ * MPSetTaskState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPSetTaskState(task: MPTaskID; kind: MPTaskStateKind; info: UnivPtr): OSStatus; external name '_MPSetTaskState';
+
+
+{
+ * MPThrowException()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPThrowException(task: MPTaskID; kind: MPExceptionKind): OSStatus; external name '_MPThrowException';
+
+
+{ ------------------------------------------------------------------------------------------- }
+
+
+type
+ MPDebuggerLevel = UInt32;
+const
+ kMPLowLevelDebugger = $00000000; { MacsBug-like }
+ kMPMidLevelDebugger = $10000000; { Jasik-like }
+ kMPHighLevelDebugger = $20000000; { Metrowerks-like }
+
+
+ {
+ * MPRegisterDebugger()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPRegisterDebugger(queue: MPQueueID; level: MPDebuggerLevel): OSStatus; external name '_MPRegisterDebugger';
+
+
+{
+ * MPUnregisterDebugger()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPUnregisterDebugger(queue: MPQueueID): OSStatus; external name '_MPUnregisterDebugger';
+
+
+{
+ ¤
+ ===========================================================================================
+ Remote Call Services
+ ====================
+}
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ MPRemoteProcedure = function(parameter: UnivPtr): Ptr;
+{$elsec}
+ MPRemoteProcedure = ProcPtr;
+{$endc}
+
+ MPRemoteContext = UInt8;
+
+const
+ kMPAnyRemoteContext = 0;
+ kMPOwningProcessRemoteContext = 1;
+ kMPInterruptRemoteContext = 2;
+ kMPAsyncInterruptRemoteContext = 3;
+
+
+ {
+ * MPRemoteCall()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MPRemoteCall(remoteProc: MPRemoteProcedure; parameter: UnivPtr; context: ByteParameter): Ptr; external name '_MPRemoteCall';
+
+{ ! MPRemoteCall is new in version 2.0. }
+{
+ ¤
+ ===========================================================================================
+ Checking API Availability
+ =========================
+}
+
+
+{
+ ===========================================================================================
+ *** WARNING: You must properly check the availability of MP services before calling them!
+ ===========================================================================================
+
+ Checking for the availability of the MP API is rather ugly. This is a historical problem,
+ caused by the original implementation letting itself get prepared when it really wasn't
+ usable and complicated by some important clients then depending on weak linking to "work".
+ (And further complicated by CFM not supporting "deferred" imports, which is how many
+ programmers think weak imports work.)
+
+ The end result is that the MP API library may get prepared by CFM but be totally unusable.
+ This means that if you import from the MP API library, you cannot simply check for a
+ resolved import to decide if MP services are available. Worse, if you explicitly prepare
+ the MP API library you cannot assume that a noErr result from GetSharedLibrary means that
+ MP services are available.
+
+ ¥ If you import from the MP API library you MUST:
+
+ Use the MPLibraryIsLoaded macro (or equivalent code in languages other than C) to tell
+ if the MP API services are available. It is not sufficient to simply check that an
+ imported symbol is resolved as is commonly done for other libraries. The macro expands
+ to the expression:
+
+ ( ( (UInt32)_MPIsFullyInitialized != (UInt32)kUnresolvedCFragSymbolAddress ) &&
+ ( _MPIsFullyInitialized () ) )
+
+ This checks if the imported symbol _MPIsFullyInitialized is resolved and if resolved
+ calls it. Both parts must succeed for the MP API services to be available.
+
+ ¥ If you explicitly prepare the MP API library you MUST:
+
+ Use code similar to the following example to tell if the MP API services are available.
+ It is not sufficient to depend on just a noErr result from GetSharedLibrary.
+
+ OSErr err;
+ Boolean mpIsAvailable = false;
+ CFragConnectionID connID = kInvalidID;
+ MPIsFullyInitializedProc mpIsFullyInitialized = NULL;
+
+ err = GetSharedLibrary ( "\pMPLibrary", kCompiledCFragArch, kReferenceCFrag,
+ &connID, NULL, NULL );
+
+ if ( err == noErr ) (
+ err = FindSymbol ( connID, "\p_MPIsFullyInitialized",
+ (Ptr *) &mpIsFullyInitialized, NULL );
+ )
+
+ if ( err == noErr ) (
+ mpIsAvailable = (* mpIsFullyInitialized) ();
+ )
+
+ ===========================================================================================
+}
+
+
+{
+ * _MPIsFullyInitialized()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function _MPIsFullyInitialized: boolean; external name '__MPIsFullyInitialized';
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ MPIsFullyInitializedProc = function: boolean;
+{$elsec}
+ MPIsFullyInitializedProc = ProcPtr;
+{$endc}
+
+ {
+ ===========================================================================================
+ The MPLibraryIsLoaded service is a macro under C that expands to the logical expression:
+ ( (UInt32)MPProcessors != (UInt32)kUnresolvedCFragSymbolAddress )
+ The intention is to check if the imported symbol MPProcessors is resolved. For other
+ languages use the equivalent expression.
+ ===========================================================================================
+ }
+ {
+ ¤
+ ===========================================================================================
+ Miscellaneous Services
+ ======================
+ }
+
+
+ {
+ * _MPLibraryVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure _MPLibraryVersion(versionCString: ConstCStringPtrPtr; major: UInt32Ptr; minor: UInt32Ptr; release: UInt32Ptr; revision: UInt32Ptr); external name '__MPLibraryVersion';
+
+
+{
+ ¤
+ ===========================================================================================
+ Unofficial Services
+ ===================
+}
+
+
+{
+ ===========================================================================================
+ *** WARNING ***
+ These services are not part of the officially documented multiprocessing API. They may not
+ be avaliable in future versions of Mac OS multiprocessing support, or in environments that
+ have a different underlying OS architecture such as Mac OS on top of a microkernel, the
+ Mac OS Blue Box under Mac OS X, native MP support in Mac OS X, etc.
+ ===========================================================================================
+}
+
+{$ifc CALL_NOT_IN_CARBON}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * _MPAllocateSys()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function _MPAllocateSys(size: ByteCount): LogicalAddress; external name '__MPAllocateSys';
+
+{ Use MPAllocateAligned instead. }
+{
+ * _MPRPC()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function _MPRPC(remoteProc: MPRemoteProcedure; parameter: UnivPtr): Ptr; external name '__MPRPC';
+
+{ Use _MPRemoteCall instead. }
+{
+ * _MPTaskIsToolboxSafe()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function _MPTaskIsToolboxSafe(task: MPTaskID): boolean; external name '__MPTaskIsToolboxSafe';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * _MPLibraryIsCompatible()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibrary 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function _MPLibraryIsCompatible(versionCString: ConstCStringPtr; major: UInt32; minor: UInt32; release: UInt32; revision: UInt32): boolean; external name '__MPLibraryIsCompatible';
+
+
+{
+ ¤
+ ===========================================================================================
+ Defunct Services
+ ================
+}
+
+{$ifc CALL_NOT_IN_CARBON}
+{$ifc undefined MPIncludeDefunctServices}
+{$setc MPIncludeDefunctServices := 0}
+{$endc}
+{$ifc MPIncludeDefunctServices}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * _MPDebugStr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibraryObsolete 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure _MPDebugStr(const (*var*) msg: Str255); external name '__MPDebugStr';
+
+{
+ * _MPStatusPString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibraryObsolete 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function _MPStatusPString(status: OSStatus): StringPtr; external name '__MPStatusPString';
+
+{
+ * _MPStatusCString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MPLibraryObsolete 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function _MPStatusCString(status: OSStatus): ConstCStringPtr; external name '__MPStatusCString';
+
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {MPIncludeDefunctServices}
+{$endc} {CALL_NOT_IN_CARBON}
+
+{ =========================================================================================== }
+
+
+{$ALIGN MAC68K}
+
+
+{unit NameRegistry}
+{
+ File: NameRegistry.p
+
+ Contains: NameRegistry Interfaces
+
+ Version: Technology: MacOS
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1993-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN POWER}
+
+{******************************************************************************
+ *
+ * Foundation Types
+ *
+ }
+{ Value of a property }
+
+type
+ RegPropertyValue = Ptr;
+ { Length of property value }
+ RegPropertyValueSize = UInt32;
+ { ******************************************************************************
+ *
+ * RegEntryID : The Global x-Namespace Entry Identifier
+ *
+ }
+ RegEntryIDPtr = ^RegEntryID;
+ RegEntryID = record
+ contents: array [0..3] of UInt32;
+ end;
+
+ { ******************************************************************************
+ *
+ * Root Entry Name Definitions (Applies to all Names in the RootNameSpace)
+ *
+ * ¥ Names are a colon-separated list of name components. Name components
+ * may not themselves contain colons.
+ * ¥ Names are presented as null-terminated ASCII character strings.
+ * ¥ Names follow similar parsing rules to Apple file system absolute
+ * and relative paths. However the '::' parent directory syntax is
+ * not currently supported.
+ }
+ { Max length of Entry Name }
+
+const
+ kRegCStrMaxEntryNameLength = 47;
+
+ { Entry Names are single byte ASCII }
+
+type
+ RegCStrEntryName = char;
+ RegCStrEntryNamePtr = CStringPtr;
+ { length of RegCStrEntryNameBuf = kRegCStrMaxEntryNameLength+1 }
+ RegCStrEntryNameBuf = packed array [0..47] of char;
+ RegCStrPathName = char;
+ RegPathNameSize = UInt32;
+ RegCStrPathNamePtr = CStringPtr;
+
+const
+ kRegPathNameSeparator = 58; { 0x3A }
+ kRegEntryNameTerminator = $00; { '\0' }
+ kRegPathNameTerminator = $00; { '\0' }
+
+ { ******************************************************************************
+ *
+ * Property Name and ID Definitions
+ * (Applies to all Properties Regardless of NameSpace)
+ }
+ kRegMaximumPropertyNameLength = 31; { Max length of Property Name }
+ kRegPropertyNameTerminator = $00; { '\0' }
+
+
+type
+ RegPropertyNameBuf = packed array [0..31] of char;
+ RegPropertyName = char;
+ RegPropertyNamePtr = CStringPtr;
+ { ******************************************************************************
+ *
+ * Iteration Operations
+ *
+ * These specify direction when traversing the name relationships
+ }
+ RegIterationOp = UInt32;
+ RegEntryIterationOp = RegIterationOp;
+
+const
+ { Absolute locations }
+ kRegIterRoot = $00000002; { "Upward" Relationships }
+ kRegIterParents = $00000003; { include all parent(s) of entry }
+ { "Downward" Relationships }
+ kRegIterChildren = $00000004; { include all children }
+ kRegIterSubTrees = $00000005; { include all sub trees of entry }
+ kRegIterDescendants = $00000005; { include all descendants of entry }
+ { "Horizontal" Relationships }
+ kRegIterSibling = $00000006; { include all siblings }
+ { Keep doing the same thing }
+ kRegIterContinue = $00000001;
+
+ { ******************************************************************************
+ *
+ * Name Entry and Property Modifiers
+ *
+ *
+ *
+ * Modifiers describe special characteristics of names
+ * and properties. Modifiers might be supported for
+ * some names and not others.
+ *
+ * Device Drivers should not rely on functionality
+ * specified as a modifier.
+ }
+
+type
+ RegModifiers = UInt32;
+ RegEntryModifiers = RegModifiers;
+ RegPropertyModifiers = RegModifiers;
+
+const
+ kRegNoModifiers = $00000000; { no entry modifiers in place }
+ kRegUniversalModifierMask = $0000FFFF; { mods to all entries }
+ kRegNameSpaceModifierMask = $00FF0000; { mods to all entries within namespace }
+ kRegModifierMask = $FF000000; { mods to just this entry }
+
+ { Universal Property Modifiers }
+ kRegPropertyValueIsSavedToNVRAM = $00000020; { property is non-volatile (saved in NVRAM) }
+ kRegPropertyValueIsSavedToDisk = $00000040; { property is non-volatile (saved on disk) }
+
+ { NameRegistry version, Gestalt/PEF-style -- MUST BE KEPT IN SYNC WITH MAKEFILE !! }
+ LatestNR_PEFVersion = $01030000; { latest NameRegistryLib version (Gestalt/PEF-style) }
+
+ { ///////////////////////
+ //
+ // The Registry API
+ //
+ /////////////////////// }
+ { NameRegistry dispatch indexes }
+ kSelectRegistryEntryIDInit = 0;
+ kSelectRegistryEntryIDCompare = 1;
+ kSelectRegistryEntryIDCopy = 2;
+ kSelectRegistryEntryIDDispose = 3;
+ kSelectRegistryCStrEntryCreate = 4;
+ kSelectRegistryEntryDelete = 5;
+ kSelectRegistryEntryCopy = 6;
+ kSelectRegistryEntryIterateCreate = 7;
+ kSelectRegistryEntryIterateDispose = 8;
+ kSelectRegistryEntryIterateSet = 9;
+ kSelectRegistryEntryIterate = 10;
+ kSelectRegistryEntrySearch = 11;
+ kSelectRegistryCStrEntryLookup = 12;
+ kSelectRegistryEntryToPathSize = 13;
+ kSelectRegistryCStrEntryToPath = 14;
+ kSelectRegistryCStrEntryToName = 15;
+ kSelectRegistryPropertyCreate = 16;
+ kSelectRegistryPropertyDelete = 17;
+ kSelectRegistryPropertyRename = 18;
+ kSelectRegistryPropertyIterateCreate = 19;
+ kSelectRegistryPropertyIterateDispose = 20;
+ kSelectRegistryPropertyIterate = 21;
+ kSelectRegistryPropertyGetSize = 22;
+ kSelectRegistryPropertyGet = 23;
+ kSelectRegistryPropertySet = 24;
+ kSelectRegistryEntryGetMod = 25;
+ kSelectRegistryEntrySetMod = 26;
+ kSelectRegistryPropertyGetMod = 27;
+ kSelectRegistryPropertySetMod = 28;
+ kSelectRegistryEntryMod = 29;
+ kSelectRegistryEntryPropertyMod = 30; { if you add more selectors here, remember to change 'kSelectRegistryHighestSelector' below }
+ kSelectRegistryHighestSelector = 30;
+
+
+ { ///////////////////////
+ //
+ // Entry Management
+ //
+ /////////////////////// }
+
+ { -------------------------------
+ * EntryID handling
+ }
+ {
+ * Initialize an EntryID to a known invalid state
+ * note: invalid != uninitialized
+ }
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * RegistryEntryIDInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntryIDInit(var id: RegEntryID): OSStatus; external name '_RegistryEntryIDInit';
+{
+ * Compare EntryID's for equality or if invalid
+ *
+ * If a NULL value is given for either id1 or id2, the other id
+ * is compared with an invalid ID. If both are NULL, the id's
+ * are consided equal (result = true).
+ }
+{
+ * RegistryEntryIDCompare()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntryIDCompare(const (*var*) id1: RegEntryID; const (*var*) id2: RegEntryID): boolean; external name '_RegistryEntryIDCompare';
+{
+ * Copy an EntryID
+ }
+{
+ * RegistryEntryIDCopy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntryIDCopy(const (*var*) src: RegEntryID; var dst: RegEntryID): OSStatus; external name '_RegistryEntryIDCopy';
+{
+ * Free an ID so it can be reused.
+ }
+{
+ * RegistryEntryIDDispose()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntryIDDispose(var id: RegEntryID): OSStatus; external name '_RegistryEntryIDDispose';
+{-------------------------------
+ * Adding and removing entries
+ *
+ * If (parentEntry) is NULL, the name is assumed
+ * to be a rooted path. It is rooted to an anonymous, unnamed root.
+ }
+{
+ * RegistryCStrEntryCreate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryCStrEntryCreate(const (*var*) parentEntry: RegEntryID; {const} name: {variable-size-array} RegCStrPathNamePtr; var newEntry: RegEntryID): OSStatus; external name '_RegistryCStrEntryCreate';
+{
+ * RegistryEntryDelete()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntryDelete(const (*var*) id: RegEntryID): OSStatus; external name '_RegistryEntryDelete';
+{
+ * RegistryEntryCopy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntryCopy(var parentEntryID: RegEntryID; var sourceDevice: RegEntryID; var destDevice: RegEntryID): OSStatus; external name '_RegistryEntryCopy';
+{---------------------------
+ * Traversing the namespace
+ *
+ * To support arbitrary namespace implementations in the future,
+ * I have hidden the form that the place pointer takes. The previous
+ * interface exposed the place pointer by specifying it as a
+ * RegEntryID.
+ *
+ * I have also removed any notion of returning the entries
+ * in a particular order, because an implementation might
+ * return the names in semi-random order. Many name service
+ * implementations will store the names in a hashed lookup
+ * table.
+ *
+ * Writing code to traverse some set of names consists of
+ * a call to begin the iteration, the iteration loop, and
+ * a call to end the iteration. The begin call initializes
+ * the iteration cookie data structure. The call to end the
+ * iteration should be called even in the case of error so
+ * that allocated data structures can be freed.
+ *
+ * Create(...)
+ * do (
+ * Iterate(...);
+ * ) while (!done);
+ * Dispose(...);
+ *
+ * This is the basic code structure for callers of the iteration
+ * interface.
+ }
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+type
+ RegEntryIter = ^SInt32; { an opaque 32-bit type }
+ RegEntryIterPtr = ^RegEntryIter; { when a var xx:RegEntryIter parameter can be nil, it is changed to xx: RegEntryIterPtr }
+ {
+ * create/dispose the iterator structure
+ * defaults to root with relationship = kRegIterDescendants
+ }
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * RegistryEntryIterateCreate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntryIterateCreate(var cookie: RegEntryIter): OSStatus; external name '_RegistryEntryIterateCreate';
+{
+ * RegistryEntryIterateDispose()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntryIterateDispose(var cookie: RegEntryIter): OSStatus; external name '_RegistryEntryIterateDispose';
+{
+ * set Entry Iterator to specified entry
+ }
+{
+ * RegistryEntryIterateSet()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntryIterateSet(var cookie: RegEntryIter; const (*var*) startEntryID: RegEntryID): OSStatus; external name '_RegistryEntryIterateSet';
+{
+ * Return each value of the iteration
+ *
+ * return entries related to the current entry
+ * with the specified relationship
+ }
+{
+ * RegistryEntryIterate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntryIterate(var cookie: RegEntryIter; relationship: RegEntryIterationOp; var foundEntry: RegEntryID; var done: boolean): OSStatus; external name '_RegistryEntryIterate';
+{
+ * return entries with the specified property
+ *
+ * A NULL RegPropertyValue pointer will return an
+ * entry with the property containing any value.
+ }
+{
+ * RegistryEntrySearch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntrySearch(var cookie: RegEntryIter; relationship: RegEntryIterationOp; var foundEntry: RegEntryID; var done: boolean; {const} propertyName: {variable-size-array} RegPropertyNamePtr; propertyValue: UnivPtr; propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryEntrySearch';
+{--------------------------------
+ * Find a name in the namespace
+ *
+ * This is the fast lookup mechanism.
+ * NOTE: A reverse lookup mechanism
+ * has not been provided because
+ * some name services may not
+ * provide a fast, general reverse
+ * lookup.
+ }
+{
+ * RegistryCStrEntryLookup()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryCStrEntryLookup(const (*var*) searchPointID: RegEntryID; {const} pathName: {variable-size-array} RegCStrPathNamePtr; var foundEntry: RegEntryID): OSStatus; external name '_RegistryCStrEntryLookup';
+{---------------------------------------------
+ * Convert an entry to a rooted name string
+ *
+ * A utility routine to turn an Entry ID
+ * back into a name string.
+ }
+{
+ * RegistryEntryToPathSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntryToPathSize(const (*var*) entryID: RegEntryID; var pathSize: RegPathNameSize): OSStatus; external name '_RegistryEntryToPathSize';
+{
+ * RegistryCStrEntryToPath()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryCStrEntryToPath(const (*var*) entryID: RegEntryID; var pathName: RegCStrPathName; pathSize: RegPathNameSize): OSStatus; external name '_RegistryCStrEntryToPath';
+{
+ * Parse a path name.
+ *
+ * Retrieve the last component of the path, and
+ * return a spec for the parent.
+ }
+{
+ * RegistryCStrEntryToName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryCStrEntryToName(const (*var*) entryID: RegEntryID; var parentEntry: RegEntryID; var nameComponent: RegCStrEntryName; var done: boolean): OSStatus; external name '_RegistryCStrEntryToName';
+{ //////////////////////////////////////////////////////
+//
+// Property Management
+//
+////////////////////////////////////////////////////// }
+{-------------------------------
+ * Adding and removing properties
+ }
+{
+ * RegistryPropertyCreate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryPropertyCreate(const (*var*) entryID: RegEntryID; {const} propertyName: {variable-size-array} RegPropertyNamePtr; propertyValue: UnivPtr; propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertyCreate';
+{
+ * RegistryPropertyDelete()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryPropertyDelete(const (*var*) entryID: RegEntryID; {const} propertyName: {variable-size-array} RegPropertyNamePtr): OSStatus; external name '_RegistryPropertyDelete';
+{
+ * RegistryPropertyRename()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryPropertyRename(const (*var*) entry: RegEntryID; {const} oldName: {variable-size-array} RegPropertyNamePtr; {const} newName: {variable-size-array} RegPropertyNamePtr): OSStatus; external name '_RegistryPropertyRename';
+{---------------------------
+ * Traversing the Properties of a name
+ *
+ }
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+type
+ RegPropertyIter = ^SInt32; { an opaque 32-bit type }
+ RegPropertyIterPtr = ^RegPropertyIter; { when a var xx:RegPropertyIter parameter can be nil, it is changed to xx: RegPropertyIterPtr }
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * RegistryPropertyIterateCreate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryPropertyIterateCreate(const (*var*) entry: RegEntryID; var cookie: RegPropertyIter): OSStatus; external name '_RegistryPropertyIterateCreate';
+{
+ * RegistryPropertyIterateDispose()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryPropertyIterateDispose(var cookie: RegPropertyIter): OSStatus; external name '_RegistryPropertyIterateDispose';
+{
+ * RegistryPropertyIterate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryPropertyIterate(var cookie: RegPropertyIter; var foundProperty: RegPropertyName; var done: boolean): OSStatus; external name '_RegistryPropertyIterate';
+{
+ * Get the value of the specified property for the specified entry.
+ *
+ }
+{
+ * RegistryPropertyGetSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryPropertyGetSize(const (*var*) entryID: RegEntryID; {const} propertyName: {variable-size-array} RegPropertyNamePtr; var propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertyGetSize';
+{
+ * (*propertySize) is the maximum size of the value returned in the buffer
+ * pointed to by (propertyValue). Upon return, (*propertySize) is the size of the
+ * value returned.
+ }
+{
+ * RegistryPropertyGet()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryPropertyGet(const (*var*) entryID: RegEntryID; {const} propertyName: {variable-size-array} RegPropertyNamePtr; propertyValue: UnivPtr; var propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertyGet';
+{
+ * RegistryPropertySet()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryPropertySet(const (*var*) entryID: RegEntryID; {const} propertyName: {variable-size-array} RegPropertyNamePtr; propertyValue: UnivPtr; propertySize: RegPropertyValueSize): OSStatus; external name '_RegistryPropertySet';
+{ //////////////////////////////////////////////////////
+//
+// Modifier Management
+//
+////////////////////////////////////////////////////// }
+{
+ * Modifiers describe special characteristics of names
+ * and properties. Modifiers might be supported for
+ * some names and not others.
+ *
+ * Device Drivers should not rely on functionality
+ * specified as a modifier. These interfaces
+ * are for use in writing Experts.
+ }
+{
+ * Get and Set operators for entry modifiers
+ }
+{
+ * RegistryEntryGetMod()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntryGetMod(const (*var*) entry: RegEntryID; var modifiers: RegEntryModifiers): OSStatus; external name '_RegistryEntryGetMod';
+{
+ * RegistryEntrySetMod()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntrySetMod(const (*var*) entry: RegEntryID; modifiers: RegEntryModifiers): OSStatus; external name '_RegistryEntrySetMod';
+{
+ * Get and Set operators for property modifiers
+ }
+{
+ * RegistryPropertyGetMod()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryPropertyGetMod(const (*var*) entry: RegEntryID; {const} name: {variable-size-array} RegPropertyNamePtr; var modifiers: RegPropertyModifiers): OSStatus; external name '_RegistryPropertyGetMod';
+{
+ * RegistryPropertySetMod()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryPropertySetMod(const (*var*) entry: RegEntryID; {const} name: {variable-size-array} RegPropertyNamePtr; modifiers: RegPropertyModifiers): OSStatus; external name '_RegistryPropertySetMod';
+{
+ * Iterator operator for entry modifier search
+ }
+{
+ * RegistryEntryMod()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntryMod(var cookie: RegEntryIter; relationship: RegEntryIterationOp; var foundEntry: RegEntryID; var done: boolean; matchingModifiers: RegEntryModifiers): OSStatus; external name '_RegistryEntryMod';
+{
+ * Iterator operator for entries with matching
+ * property modifiers
+ }
+{
+ * RegistryEntryPropertyMod()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NameRegistryLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegistryEntryPropertyMod(var cookie: RegEntryIter; relationship: RegEntryIterationOp; var foundEntry: RegEntryID; var done: boolean; matchingModifiers: RegPropertyModifiers): OSStatus; external name '_RegistryEntryPropertyMod';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ALIGN MAC68K}
+
+
+{unit PEFBinaryFormat}
+{
+ File: PEFBinaryFormat.p
+
+ Contains: PEF Types and Macros
+
+ Version: Technology: Master Interfaces
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1993-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+{ -------------------------------------------------------------------------------------------- }
+{ Almost all types are padded for natural alignment. However the PEFExportedSymbol type is }
+{ 10 bytes long, containing two 32 bit fields and one 16 bit field. Arrays of it must be }
+{ packed, so it requires "68K" alignment. Setting this globally to 68K should also help }
+{ ensure consistent treatment across compilers. }
+
+{ ======================================================================================== }
+{ Overall Structure }
+{ ================= }
+
+{ -------------------------------------------------------------------------------------------- }
+{ This header contains a complete set of types and macros for dealing with the PEF executable }
+{ format. While some description is provided, this header is not meant as a primary source }
+{ of documentation on PEF. An excellent specification of PEF can be found in the Macintosh }
+{ Runtime Architectures book. This header is primarily a physical format description. Thus }
+{ it depends on as few other headers as possible and structure fields have obvious sizes. }
+{ }
+{ The physical storage for a PEF executable is known as a "container". This refers to just }
+{ the executable itself, not the file etc. E.g. if five DLLs are packaged in a single file's }
+{ data fork, that one data fork has five containers within it. }
+{ }
+{ A PEF container consists of an overall header, followed by one or more section headers, }
+{ followed by the section name table, followed by the contents for the sections. Some kinds }
+{ of sections have specific internal representation. The "loader" section is the most common }
+{ of these special sections. It contains information on the exports, imports, and runtime }
+{ relocations required to prepare the executable. PEF containers are self contained, all }
+{ portions are located via relative offsets. }
+{ }
+{ }
+{ +-------------------------------+ }
+{ | Container Header | 40 bytes }
+{ +-------------------------------+ }
+{ | Section 0 header | 28 bytes each }
+{ |...............................| }
+{ | - - - - | }
+{ |...............................| }
+{ | Section n-1 header | }
+{ +-------------------------------+ }
+{ | Section Name Table | }
+{ +-------------------------------+ }
+{ | Section x raw data | }
+{ +-------------------------------+ }
+{ | - - - - | }
+{ +-------------------------------+ }
+{ | Section y raw data | }
+{ +-------------------------------+ }
+{ }
+{ }
+{ The sections are implicitly numbered from 0 to n according to the order of their headers. }
+{ The headers of the instantiated sections must precede those of the non-instantiated }
+{ sections. The ordering of the raw data is independent of the section header ordering. }
+{ Each section header contains the offset for that section's raw data. }
+
+{ =========================================================================================== }
+{ Container Header }
+{ ================ }
+
+
+type
+ PEFContainerHeaderPtr = ^PEFContainerHeader;
+ PEFContainerHeader = record
+ tag1: OSType; { Must contain 'Joy!'. }
+ tag2: OSType; { Must contain 'peff'. (Yes, with two 'f's.) }
+ architecture: OSType; { The ISA for code sections. Constants in CodeFragments.h. }
+ formatVersion: UInt32; { The physical format version. }
+ dateTimeStamp: UInt32; { Macintosh format creation/modification stamp. }
+ oldDefVersion: UInt32; { Old definition version number for the code fragment. }
+ oldImpVersion: UInt32; { Old implementation version number for the code fragment. }
+ currentVersion: UInt32; { Current version number for the code fragment. }
+ sectionCount: UInt16; { Total number of section headers that follow. }
+ instSectionCount: UInt16; { Number of instantiated sections. }
+ reservedA: UInt32; { Reserved, must be written as zero. }
+ end;
+
+
+const
+ kPEFTag1 = $4A6F7921 (* 'Joy!' *); { For non-Apple compilers: 0x4A6F7921. }
+ kPEFTag2 = $70656666 (* 'peff' *); { For non-Apple compilers: 0x70656666. }
+ kPEFVersion = $00000001;
+
+
+ kPEFFirstSectionHeaderOffset = 40;
+
+
+ { =========================================================================================== }
+ { Section Headers }
+ { =============== }
+
+
+type
+ PEFSectionHeaderPtr = ^PEFSectionHeader;
+ PEFSectionHeader = record
+ nameOffset: SInt32; { Offset of name within the section name table, -1 => none. }
+ defaultAddress: UInt32; { Default address, affects relocations. }
+ totalLength: UInt32; { Fully expanded size in bytes of the section contents. }
+ unpackedLength: UInt32; { Size in bytes of the "initialized" part of the contents. }
+ containerLength: UInt32; { Size in bytes of the raw data in the container. }
+ containerOffset: UInt32; { Offset of section's raw data. }
+ sectionKind: SInt8; { Kind of section contents/usage. }
+ shareKind: SInt8; { Sharing level, if a writeable section. }
+ alignment: SInt8; { Preferred alignment, expressed as log 2. }
+ reservedA: SInt8; { Reserved, must be zero. }
+ end;
+
+
+const
+ { Values for the sectionKind field. }
+ { Section kind values for instantiated sections. }
+ kPEFCodeSection = 0; { Code, presumed pure & position independent. }
+ kPEFUnpackedDataSection = 1; { Unpacked writeable data. }
+ kPEFPackedDataSection = 2; { Packed writeable data. }
+ kPEFConstantSection = 3; { Read-only data. }
+ kPEFExecDataSection = 6; { Intermixed code and writeable data. }
+ { Section kind values for non-instantiated sections. }
+ kPEFLoaderSection = 4; { Loader tables. }
+ kPEFDebugSection = 5; { Reserved for future use. }
+ kPEFExceptionSection = 7; { Reserved for future use. }
+ kPEFTracebackSection = 8; { Reserved for future use. }
+
+
+ { Values for the shareKind field. }
+ kPEFProcessShare = 1; { Shared within a single process. }
+ kPEFGlobalShare = 4; { Shared across the entire system. }
+ kPEFProtectedShare = 5; { Readable across the entire system, writeable only to privileged code. }
+
+
+ { =========================================================================================== }
+ { Packed Data Contents }
+ { ==================== }
+
+ { -------------------------------------------------------------------------------------------- }
+ { The raw contents of a packed data section are a sequence of byte codes. The basic format }
+ { has a 3 bit opcode followed by a 5 bit count. Additional bytes might be used to contain }
+ { counts larger than 31, and to contain a second or third count. Further additional bytes }
+ { contain actual data values to transfer. }
+ { }
+ { All counts are represented in a variable length manner. A zero in the initial 5 bit count }
+ { indicates the actual value follows. In this case, and for the second and third counts, the }
+ { count is represented as a variable length sequence of bytes. The bytes are stored in big }
+ { endian manner, most significant part first. The high order bit is set in all but the last }
+ { byte. The value is accumulated by shifting the current value up 7 bits and adding in the }
+ { low order 7 bits of the next byte. }
+
+ { The packed data opcodes. }
+ kPEFPkDataZero = 0; { Zero fill "count" bytes. }
+ kPEFPkDataBlock = 1; { Block copy "count" bytes. }
+ kPEFPkDataRepeat = 2; { Repeat "count" bytes "count2"+1 times. }
+ kPEFPkDataRepeatBlock = 3; { Interleaved repeated and unique data. }
+ kPEFPkDataRepeatZero = 4; { Interleaved zero and unique data. }
+
+
+ kPEFPkDataOpcodeShift = 5;
+ kPEFPkDataCount5Mask = $1F;
+ kPEFPkDataMaxCount5 = 31;
+ kPEFPkDataVCountShift = 7;
+ kPEFPkDataVCountMask = $7F;
+ kPEFPkDataVCountEndMask = $80;
+
+
+ { -------------------------------------------------------------------------------------------- }
+ { The following code snippet can be used to input a variable length count. }
+ { }
+ { count = 0; }
+ { do ( }
+ { byte = *bytePtr++; }
+ { count = (count << kPEFPkDataVCountShift) | (byte & kPEFPkDataVCountMask); }
+ { ) while ( (byte & kPEFPkDataVCountEndMask) != 0 ); }
+ { }
+ { The following code snippet can be used to output a variable length count to a byte array. }
+ { This is more complex than the input code because the chunks are output in big endian order. }
+ { Think about handling values like 0 or 0x030000. }
+ { }
+ { count = 1;. }
+ { tempValue = value >> kPEFPkDataCountShift; }
+ { while ( tempValue != 0 ) ( }
+ { count += 1; }
+ { tempValue = tempValue >> kPEFPkDataCountShift; }
+ { ) }
+ { }
+ { bytePtr += count; }
+ { tempPtr = bytePtr - 1; }
+ { *tempPtr-- = value; // ! No need to mask, only the low order byte is stored. }
+ { for ( count -= 1; count != 0; count -= 1 ) ( }
+ { value = value >> kPEFPkDataCountShift; }
+ { *tempPtr-- = value | kPEFPkDataCountEndMask; }
+ { ) }
+
+ { =========================================================================================== }
+ { Loader Section }
+ { ============== }
+
+ { -------------------------------------------------------------------------------------------- }
+ { The loader section contains information needed to prepare the code fragment for execution. }
+ { This includes this fragment's exports, the import libraries and the imported symbols from }
+ { each library, and the relocations for the writeable sections. }
+ { }
+ { +-----------------------------------+ <-- containerOffset --------+ }
+ { | Loader Info Header | 56 bytes | }
+ { |-----------------------------------| | }
+ { | Imported Library 0 | 24 bytes each | }
+ { |...................................| | }
+ { | - - - | | }
+ { |...................................| | }
+ { | Imported Library l-1 | | }
+ { |-----------------------------------| | }
+ { | Imported Symbol 0 | 4 bytes each | }
+ { |...................................| | }
+ { | - - - | | }
+ { |...................................| | }
+ { | Imported Symbol i-1 | | }
+ { |-----------------------------------| | }
+ { | Relocation Header 0 | 12 bytes each | }
+ { |...................................| | }
+ { | - - - | | }
+ { |...................................| | }
+ { | Relocation Header r-1 | | }
+ { |-----------------------------------| <-- + relocInstrOffset -----| }
+ { | Relocation Instructions | | }
+ { |-----------------------------------| <-- + loaderStringsOffset --| }
+ { | Loader String Table | | }
+ { |-----------------------------------| <-- + exportHashOffset -----+ }
+ { | Export Hash Slot 0 | 4 bytes each }
+ { |...................................| }
+ { | - - - | }
+ { |...................................| }
+ { | Export Hash Slot h-1 | }
+ { |-----------------------------------| }
+ { | Export Symbol Key 0 | 4 bytes each }
+ { |...................................| }
+ { | - - - | }
+ { |...................................| }
+ { | Export Symbol Key e-1 | }
+ { |-----------------------------------| }
+ { | Export Symbol 0 | 10 bytes each }
+ { |...................................| }
+ { | - - - | }
+ { |...................................| }
+ { | Export Symbol e-1 | }
+ { +-----------------------------------+ }
+
+
+type
+ PEFLoaderInfoHeaderPtr = ^PEFLoaderInfoHeader;
+ PEFLoaderInfoHeader = record
+ mainSection: SInt32; { Section containing the main symbol, -1 => none. }
+ mainOffset: UInt32; { Offset of main symbol. }
+ initSection: SInt32; { Section containing the init routine's TVector, -1 => none. }
+ initOffset: UInt32; { Offset of the init routine's TVector. }
+ termSection: SInt32; { Section containing the term routine's TVector, -1 => none. }
+ termOffset: UInt32; { Offset of the term routine's TVector. }
+ importedLibraryCount: UInt32; { Number of imported libraries. ('l') }
+ totalImportedSymbolCount: UInt32; { Total number of imported symbols. ('i') }
+ relocSectionCount: UInt32; { Number of sections with relocations. ('r') }
+ relocInstrOffset: UInt32; { Offset of the relocation instructions. }
+ loaderStringsOffset: UInt32; { Offset of the loader string table. }
+ exportHashOffset: UInt32; { Offset of the export hash table. }
+ exportHashTablePower: UInt32; { Export hash table size as log 2. (Log2('h')) }
+ exportedSymbolCount: UInt32; { Number of exported symbols. ('e') }
+ end;
+
+ { =========================================================================================== }
+ { Imported Libraries }
+ { ------------------ }
+ PEFImportedLibraryPtr = ^PEFImportedLibrary;
+ PEFImportedLibrary = record
+ nameOffset: UInt32; { Loader string table offset of library's name. }
+ oldImpVersion: UInt32; { Oldest compatible implementation version. }
+ currentVersion: UInt32; { Current version at build time. }
+ importedSymbolCount: UInt32; { Imported symbol count for this library. }
+ firstImportedSymbol: UInt32; { Index of first imported symbol from this library. }
+ options: SInt8; { Option bits for this library. }
+ reservedA: SInt8; { Reserved, must be zero. }
+ reservedB: UInt16; { Reserved, must be zero. }
+ end;
+
+
+const
+ { Bits for the PEFImportedLibrary options field. }
+ kPEFWeakImportLibMask = $40; { The imported library is allowed to be missing. }
+ kPEFInitLibBeforeMask = $80; { The imported library must be initialized first. }
+
+
+ { =========================================================================================== }
+ { Imported Symbols }
+ { ---------------- }
+
+ { -------------------------------------------------------------------------------------------- }
+ { The PEFImportedSymbol type has the following bit field layout. }
+ { }
+ { 3 }
+ { 0 7 8 1 }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { | symbol class | offset of symbol name in loader string table | }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |<-- 8 bits --->|<-- 24 bits ---------------------------------->| }
+
+
+type
+ PEFImportedSymbolPtr = ^PEFImportedSymbol;
+ PEFImportedSymbol = record
+ classAndName: UInt32;
+ end;
+
+
+const
+ kPEFImpSymClassShift = 24;
+ kPEFImpSymNameOffsetMask = $00FFFFFF;
+ kPEFImpSymMaxNameOffset = $00FFFFFF; { 16,777,215 }
+
+
+ { Imported and exported symbol classes. }
+ kPEFCodeSymbol = $00;
+ kPEFDataSymbol = $01;
+ kPEFTVectorSymbol = $02;
+ kPEFTOCSymbol = $03;
+ kPEFGlueSymbol = $04;
+ kPEFUndefinedSymbol = $0F;
+ kPEFWeakImportSymMask = $80;
+
+
+ { =========================================================================================== }
+ { Exported Symbol Hash Table }
+ { -------------------------- }
+
+ { -------------------------------------------------------------------------------------------- }
+ { Exported symbols are described in four parts, optimized for speed of lookup. These parts }
+ { are the "export hash table", the "export key table", the "export symbol table", and the }
+ { "export name table". Overall they contain a flattened representation of a fairly normal }
+ { hashed symbol table. }
+ { }
+ { The export hash table is an array of small fixed size elements. The number of elements is }
+ { a power of 2. A 32 bit hash word for a symbol is converted into an index into this array. }
+ { Each hash slot contains a count of the number of exported symbols that map to this slot and }
+ { the index of the first of those symbols in the key and symbol tables. Of course some hash }
+ { slots will have a zero count. }
+ { }
+ { The key and symbol tables are also arrays of fixed size elements, one for each exported }
+ { symbol. Their entries are grouped by hash slot, those elements mapping to the same hash }
+ { slot are contiguous. The key table contains just the full 32 bit hash word for each }
+ { exported symbol. The symbol table contains the offset of the symbol's name in the string }
+ { table and other information about the exported symbol. }
+ { }
+ { To look up an export you take the hashword and compute the hash slot index. You then scan }
+ { the indicated portion of the key table for matching hashwords. If a hashword matches, you }
+ { look at the corresponding symbol table entry to find the full symbol name. If the names }
+ { match the symbol is found. }
+
+ { -------------------------------------------------------------------------------------------- }
+ { The following function may be used to compute the hash table size. Signed values are used }
+ { just to avoid potential code generation overhead for unsigned division. }
+ { }
+ { UInt8 PEFComputeHashTableExponent ( SInt32 exportCount ) }
+ { ( }
+ { SInt32 exponent; }
+ { }
+ { const SInt32 kExponentLimit = 16; // Arbitrary, but must not exceed 30. }
+ { const SInt32 kAverageChainLimit = 10; // Arbitrary, for space/time tradeoff. }
+ { }
+ { for ( exponent = 0; exponent < kExponentLimit; exponent += 1 ) ( }
+ { if ( (exportCount / (1 << exponent)) < kAverageChainLimit ) break; }
+ { ) }
+ { }
+ { return exponent; }
+ { }
+ { ) // PEFComputeHashTableExponent () }
+
+ { -------------------------------------------------------------------------------------------- }
+ { The PEFExportedSymbolHashSlot type has the following bit field layout. }
+ { }
+ { 1 1 3 }
+ { 0 3 4 1 }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { | symbol count | index of first export key | }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |<-- 14 bits -------------->|<-- 18 bits ---------------------->| }
+
+
+type
+ PEFExportedSymbolHashSlotPtr = ^PEFExportedSymbolHashSlot;
+ PEFExportedSymbolHashSlot = record
+ countAndStart: UInt32;
+ end;
+
+
+const
+ kPEFHashSlotSymCountShift = 18;
+ kPEFHashSlotFirstKeyMask = $0003FFFF;
+ kPEFHashSlotMaxSymbolCount = $00003FFF; { 16,383 }
+ kPEFHashSlotMaxKeyIndex = $0003FFFF; { 262,143 }
+
+
+ { =========================================================================================== }
+ { Exported Symbol Hash Key }
+ { ------------------------ }
+
+
+type
+ PEFSplitHashWordPtr = ^PEFSplitHashWord;
+ PEFSplitHashWord = record
+ nameLength: UInt16;
+ hashValue: UInt16;
+ end;
+
+ PEFExportedSymbolKeyPtr = ^PEFExportedSymbolKey;
+ PEFExportedSymbolKey = record
+ case SInt16 of
+ 0: (
+ fullHashWord: UInt32;
+ );
+ 1: (
+ splitHashWord: PEFSplitHashWord;
+ );
+ end;
+
+
+const
+ kPEFHashLengthShift = 16;
+ kPEFHashValueMask = $0000FFFF;
+ kPEFHashMaxLength = $0000FFFF; { 65,535 }
+
+
+ { ---------------------------------------------------------------------------------------------------- }
+ { The following function computes the full 32 bit hash word. }
+ { }
+ { UInt32 PEFComputeHashWord ( BytePtr nameText, // ! First "letter", not length byte. }
+ { UInt32 nameLength ) // ! The text may be zero terminated. }
+ { ( }
+ { BytePtr charPtr = nameText; }
+ { SInt32 hashValue = 0; // ! Signed to match old published algorithm. }
+ { UInt32 length = 0; }
+ { UInt32 limit; }
+ { UInt32 result; }
+ { UInt8 currChar; }
+ { }
+ { #define PseudoRotate(x) ( ( (x) << 1 ) - ( (x) >> 16 ) ) }
+ { }
+ { for ( limit = nameLength; limit > 0; limit -= 1 ) ( }
+ { currChar = *charPtr++; }
+ { if ( currChar == NULL ) break; }
+ { length += 1; }
+ { hashValue = PseudoRotate ( hashValue ) ^ currChar; }
+ { ) }
+ { }
+ { result = (length << kPEFHashLengthShift) | }
+ { ((UInt16) ((hashValue ^ (hashValue >> 16)) & kPEFHashValueMask)); }
+ { }
+ { return result; }
+ { }
+ { ) // PEFComputeHashWord () }
+
+ { =========================================================================================== }
+ { Exported Symbols }
+ { ---------------- }
+
+
+type
+ PEFExportedSymbolPtr = ^PEFExportedSymbol;
+ PEFExportedSymbol = record
+ { ! This structure is 10 bytes long and arrays are packed. }
+ classAndName: UInt32; { A combination of class and name offset. }
+ symbolValue: UInt32; { Typically the symbol's offset within a section. }
+ sectionIndex: SInt16; { The index of the section, or pseudo-section, for the symbol. }
+ end;
+
+ { -------------------------------------------------------------------------------------------- }
+ { The classAndName field of the PEFExportedSymbol type has the following bit field layout. }
+ { }
+ { 3 }
+ { 0 7 8 1 }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { | symbol class | offset of symbol name in loader string table | }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |<-- 8 bits --->|<-- 24 bits ---------------------------------->| }
+
+
+const
+ kPEFExpSymClassShift = 24;
+ kPEFExpSymNameOffsetMask = $00FFFFFF;
+ kPEFExpSymMaxNameOffset = $00FFFFFF; { 16,777,215 }
+
+
+ { Negative section indices indicate pseudo-sections. }
+ kPEFAbsoluteExport = -2; { The symbol value is an absolute address. }
+ kPEFReexportedImport = -3; { The symbol value is the index of a reexported import. }
+
+
+ { =========================================================================================== }
+ { Loader Relocations }
+ { ================== }
+
+ { -------------------------------------------------------------------------------------------- }
+ { The relocations for a section are defined by a sequence of instructions for an abstract }
+ { machine that is specifically geared to performing relocations commonly needed for the "CFM" }
+ { code generation model. These instructions occur in 16 bit chunks. Most instructions have }
+ { just a single chunk. Instructions that are larger than 16 bits have an opcode and some of }
+ { the operands in the first chunk, with other operands in following chunks. }
+ { }
+ { ! Note that the multi-chunk relocations have separate "Compose" macros for each chunk. The }
+ { ! macros have the same basic name with a positional suffix of "_1st", "_2nd", etc. }
+
+
+type
+ PEFRelocChunk = UInt16;
+ PEFLoaderRelocationHeaderPtr = ^PEFLoaderRelocationHeader;
+ PEFLoaderRelocationHeader = record
+ sectionIndex: UInt16; { Index of the section to be fixed up. }
+ reservedA: UInt16; { Reserved, must be zero. }
+ relocCount: UInt32; { Number of 16 bit relocation chunks. }
+ firstRelocOffset: UInt32; { Offset of first relocation instruction. }
+ end;
+
+ { -------------------------------------------------------------------------------------------- }
+ { ! Note that the relocCount field is the number of 16 bit relocation chunks, i.e. 1/2 the }
+ { ! total number of bytes of relocation instructions. While most relocation instructions are }
+ { ! 16 bits long, some are longer so the number of complete relocation instructions may be }
+ { ! less than the relocCount value. }
+
+ { ------------------------------------------------------------------------------------ }
+ { The PEFRelocField macro is a utility for extracting relocation instruction fields. }
+
+ { =========================================================================================== }
+ { Basic Relocation Opcodes }
+ { ------------------------ }
+ { -------------------------------------------------------------------------------------------- }
+ { The number of opcode bits varies from 2 to 7. The enumeration and switch table given here }
+ { are defined in terms of the most significant 7 bits of the first instruction chunk. An }
+ { instruction is decoded by using the most significant 7 bits as an index into the opcode }
+ { table, which in turn contains appropriately masked forms of the most significant 7 bits. }
+ { The macro PEFRelocBasicOpcode assumes a declaration of the form. }
+ { }
+ { UInt8 kPEFRelocBasicOpcodes [kPEFRelocBasicOpcodeRange] = ( PEFMaskedBasicOpcodes ); }
+
+
+const
+ kPEFRelocBasicOpcodeRange = 128;
+
+
+ { -------------------------------------------------------------------------------------------- }
+ { The relocation opcodes, clustered by major and minor groups. The instructions within a }
+ { cluster all have the same bit field layout. The enumeration values use the high order 7 }
+ { bits of the relocation instruction. Unused low order bits are set to zero. }
+ kPEFRelocBySectDWithSkip = $00; { Binary: 00x_xxxx }
+ kPEFRelocBySectC = $20; { Binary: 010_0000, group is "RelocRun" }
+ kPEFRelocBySectD = $21; { Binary: 010_0001 }
+ kPEFRelocTVector12 = $22; { Binary: 010_0010 }
+ kPEFRelocTVector8 = $23; { Binary: 010_0011 }
+ kPEFRelocVTable8 = $24; { Binary: 010_0100 }
+ kPEFRelocImportRun = $25; { Binary: 010_0101 }
+ kPEFRelocSmByImport = $30; { Binary: 011_0000, group is "RelocSmIndex" }
+ kPEFRelocSmSetSectC = $31; { Binary: 011_0001 }
+ kPEFRelocSmSetSectD = $32; { Binary: 011_0010 }
+ kPEFRelocSmBySection = $33; { Binary: 011_0011 }
+ kPEFRelocIncrPosition = $40; { Binary: 100_0xxx }
+ kPEFRelocSmRepeat = $48; { Binary: 100_1xxx }
+ kPEFRelocSetPosition = $50; { Binary: 101_000x }
+ kPEFRelocLgByImport = $52; { Binary: 101_001x }
+ kPEFRelocLgRepeat = $58; { Binary: 101_100x }
+ kPEFRelocLgSetOrBySection = $5A; { Binary: 101_101x }
+ kPEFRelocUndefinedOpcode = $FF; { Used in masking table for all undefined values. }
+
+
+ { ---------------------------------------------------------------------------- }
+ { The RelocLgSetOrBySection instruction has an additional 4 bits of subopcode }
+ { beyond the 7 used by the dispatch table. To be precise it has 6 plus 4 but }
+ { the dispatch table ignores the 7th bit, so the subdispatch is on all 4 extra }
+ { subopcode bits. }
+ kPEFRelocLgBySectionSubopcode = $00; { Binary: 0000 }
+ kPEFRelocLgSetSectCSubopcode = $01; { Binary: 0001 }
+ kPEFRelocLgSetSectDSubopcode = $02; { Binary: 0010 }
+
+
+ { -------------------------------------------------------------------------------------------- }
+ { The initial values for the opcode "masking" table. This has the enumeration values from }
+ { above with appropriate replications for "don't care" bits. It is almost certainly shorter }
+ { and faster to look up the masked value in a table than to use a branch tree. }
+
+ { =========================================================================================== }
+ { RelocBySectDWithSkip Instruction (DDAT) }
+ { --------------------------------------- }
+
+ { -------------------------------------------------------------------------------------------- }
+ { The "RelocBySectDWithSkip" (DDAT) instruction has the following bit field layout. }
+ { }
+ { 1 1 }
+ { 0 1 2 9 0 5 }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |0 0| skip count | rel count | }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { | 2 |<-- 8 bits --->|<-- 6 --->| }
+ { }
+ { ! Note that the stored skip count and reloc count are the actual values! }
+ kPEFRelocWithSkipMaxSkipCount = 255;
+ kPEFRelocWithSkipMaxRelocCount = 63;
+
+
+ { =========================================================================================== }
+ { RelocRun Group (CODE, DATA, DESC, DSC2, VTBL, SYMR) }
+ { --------------------------------------------------- }
+
+ { -------------------------------------------------------------------------------------------- }
+ { The "RelocRun" group includes the "RelocBySectC" (CODE), "RelocBySectD" (DATA), }
+ { "RelocTVector12" (DESC), "RelocTVector8" (DSC2), "RelocVTable8" (VTBL), and }
+ { "RelocImportRun" (SYMR) instructions. This group has the following bit field layout. }
+ { }
+ { 1 }
+ { 0 2 3 6 7 5 }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |0 1 0| subop.| run length | }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { | 3 |<- 4 ->|<-- 9 bits ----->| }
+ { }
+ { ! Note that the stored run length is the actual value minus 1, but the macros deal with the }
+ { ! actual value! }
+ kPEFRelocRunMaxRunLength = 512;
+
+
+ { =========================================================================================== }
+ { RelocSmIndex Group (SYMB, CDIS, DTIS, SECN) }
+ { ------------------------------------------- }
+
+ { -------------------------------------------------------------------------------------------- }
+ { The "RelocSmIndex" group includes the "RelocSmByImport" (SYMB), "RelocSmSetSectC" (CDIS), }
+ { "RelocSmSetSectD" (DTIS) and "RelocSmBySection" (SECN) instructions. This group has the }
+ { following bit field layout. }
+ { }
+ { 1 }
+ { 0 2 3 6 7 5 }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |0 1 1| subop.| index | }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { | 3 |<- 4 ->|<-- 9 bits ----->| }
+ { }
+ { ! Note that the stored index is the actual value! }
+ kPEFRelocSmIndexMaxIndex = 511;
+
+
+ { =========================================================================================== }
+ { RelocIncrPosition Instruction (DELT) }
+ { ------------------------------------ }
+
+ { -------------------------------------------------------------------------------------------- }
+ { The "RelocIncrPosition" (DELT) instruction has the following bit field layout. }
+ { }
+ { 1 }
+ { 0 3 4 5 }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |1 0 0 0| offset | }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |<- 4 ->|<-- 12 bits ---------->| }
+ { }
+ { ! Note that the stored offset is the actual value minus 1, but the macros deal with the }
+ { ! actual value! }
+ kPEFRelocIncrPositionMaxOffset = 4096;
+
+
+ { =========================================================================================== }
+ { RelocSmRepeat Instruction (RPT) }
+ { ------------------------------- }
+
+ { -------------------------------------------------------------------------------------------- }
+ { The "RelocSmRepeat" (RPT) instruction has the following bit field layout. }
+ { }
+ { 1 }
+ { 0 3 4 7 8 5 }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |1 0 0 1| chnks | repeat count | }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |<- 4 ->|<- 4 ->|<-- 8 bits --->| }
+ { }
+ { ! Note that the stored chunk count and repeat count are the actual values minus 1, but the }
+ { ! macros deal with the actual values! }
+ kPEFRelocSmRepeatMaxChunkCount = 16;
+ kPEFRelocSmRepeatMaxRepeatCount = 256;
+
+
+ { =========================================================================================== }
+ { RelocSetPosition Instruction (LABS) }
+ { ----------------------------------- }
+
+ { -------------------------------------------------------------------------------------------- }
+ { The "RelocSetPosition" (LABS) instruction has the following bit field layout. }
+ { }
+ { 1 1 }
+ { 0 5 6 5 0 5 }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |1 0 1 0 0 0| offset (high) | | offset (low) | }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |<-- 6 ---->|<-- 10 bits ------>| |<-- 16 bits ------------------>| }
+ { }
+ { ! Note that the stored offset is the actual value! }
+ kPEFRelocSetPosMaxOffset = $03FFFFFF; { 67,108,863 }
+
+
+ { =========================================================================================== }
+ { RelocLgByImport Instruction (LSYM) }
+ { ---------------------------------- }
+
+ { -------------------------------------------------------------------------------------------- }
+ { The "RelocLgByImport" (LSYM) instruction has the following bit field layout. }
+ { }
+ { 1 1 }
+ { 0 5 6 5 0 5 }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |1 0 1 0 0 1| index (high) | | index (low) | }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |<-- 6 ---->|<-- 10 bits ------>| |<-- 16 bits ------------------>| }
+ { }
+ { ! Note that the stored offset is the actual value! }
+ kPEFRelocLgByImportMaxIndex = $03FFFFFF; { 67,108,863 }
+
+
+ { =========================================================================================== }
+ { RelocLgRepeat Instruction (LRPT) }
+ { -------------------------------- }
+
+ { -------------------------------------------------------------------------------------------- }
+ { The "RelocLgRepeat" (LRPT) instruction has the following bit field layout. }
+ { }
+ { 1 1 1 }
+ { 0 5 6 9 0 5 0 5 }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |1 0 1 1 0 0| chnks | rpt (high)| | repeat count (low) | }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |<-- 6 --->|<- 4 ->|<-- 6 --->| |<-- 16 bits ------------------>| }
+ { }
+ { ! Note that the stored chunk count is the actual value minus 1, but the macros deal with }
+ { ! the actual value! The stored repeat count is the actual value! }
+ kPEFRelocLgRepeatMaxChunkCount = 16;
+ kPEFRelocLgRepeatMaxRepeatCount = $003FFFFF; { 4,194,303 }
+
+
+ { =========================================================================================== }
+ { RelocLgSetOrBySection Group (LSEC) }
+ { ---------------------------------- }
+
+ { -------------------------------------------------------------------------------------------- }
+ { The "RelocLgSetOrBySection" (LSEC) instruction is a group including the "RelocLgBySection", }
+ { "RelocLgSetSectC" and "RelocLgSetSectD" instructions. This group has the following bit }
+ { field layout. }
+ { }
+ { 1 1 1 }
+ { 0 5 6 9 0 5 0 5 }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |1 0 1 1 0 1| subop | idx (high)| | index (low) | }
+ { +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ }
+ { |<-- 6 --->|<- 4 ->|<-- 6 --->| |<-- 16 bits ------------------>| }
+ { }
+ { ! Note that the stored index is the actual value! }
+ kPEFRelocLgSetOrBySectionMaxIndex = $003FFFFF; { 4,194,303 }
+
+
+{$ALIGN MAC68K}
+
+
+{unit PLStringFuncs}
+{
+ File: PLStringFuncs.p
+
+ Contains: Pascal string manipulation routines that parallel ANSI C string.h
+
+ Version: Technology: Mac OS
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1999-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+ * PLstrcmp()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PLstrcmp(const (*var*) str1: Str255; const (*var*) str2: Str255): SInt16; external name '_PLstrcmp';
+
+{
+ * PLstrncmp()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PLstrncmp(const (*var*) str1: Str255; const (*var*) str2: Str255; num: SInt16): SInt16; external name '_PLstrncmp';
+
+{
+ * PLstrcpy()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PLstrcpy(str1: StringPtr; const (*var*) str2: Str255): StringPtr; external name '_PLstrcpy';
+
+{
+ * PLstrncpy()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PLstrncpy(str1: StringPtr; const (*var*) str2: Str255; num: SInt16): StringPtr; external name '_PLstrncpy';
+
+{
+ * PLstrcat()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PLstrcat(str1: StringPtr; const (*var*) str2: Str255): StringPtr; external name '_PLstrcat';
+
+{
+ * PLstrncat()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PLstrncat(str1: StringPtr; const (*var*) str2: Str255; num: SInt16): StringPtr; external name '_PLstrncat';
+
+{
+ * PLstrchr()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PLstrchr(const (*var*) str1: Str255; ch1: SInt16): Ptr; external name '_PLstrchr';
+
+{
+ * PLstrrchr()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PLstrrchr(const (*var*) str1: Str255; ch1: SInt16): Ptr; external name '_PLstrrchr';
+
+{
+ * PLstrpbrk()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PLstrpbrk(const (*var*) str1: Str255; const (*var*) str2: Str255): Ptr; external name '_PLstrpbrk';
+
+{
+ * PLstrspn()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PLstrspn(const (*var*) str1: Str255; const (*var*) str2: Str255): SInt16; external name '_PLstrspn';
+
+{
+ * PLstrstr()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PLstrstr(const (*var*) str1: Str255; const (*var*) str2: Str255): Ptr; external name '_PLstrstr';
+
+{
+ * PLstrlen()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PLstrlen(const (*var*) str: Str255): SInt16; external name '_PLstrlen';
+
+{
+ * PLpos()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PLpos(const (*var*) str1: Str255; const (*var*) str2: Str255): SInt16; external name '_PLpos';
+
+
+{$ALIGN MAC68K}
+
+
+{unit SFNTLayoutTypes}
+{
+ File: SFNTLayoutTypes.p
+
+ Contains: SFNT file layout structures and constants.
+
+ Version: Technology: Mac OS 9 / Carbon
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1994-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ ----------------------------------------------------------------------------------------- }
+{ CONSTANTS }
+{
+ The following values can be used to set run feature values. Note that unless the
+ feature is defaulted differently in different fonts, the zero value for the
+ selectors represents the default value. Check the following URL site for further info:
+ "http://fonts.apple.com/Registry"
+}
+
+
+{
+ * Summary:
+ * Feature types
+ }
+
+const
+ kAllTypographicFeaturesType = 0;
+ kLigaturesType = 1;
+ kCursiveConnectionType = 2;
+ kLetterCaseType = 3;
+ kVerticalSubstitutionType = 4;
+ kLinguisticRearrangementType = 5;
+ kNumberSpacingType = 6;
+ kSmartSwashType = 8;
+ kDiacriticsType = 9;
+ kVerticalPositionType = 10;
+ kFractionsType = 11;
+ kOverlappingCharactersType = 13;
+ kTypographicExtrasType = 14;
+ kMathematicalExtrasType = 15;
+ kOrnamentSetsType = 16;
+ kCharacterAlternativesType = 17;
+ kDesignComplexityType = 18;
+ kStyleOptionsType = 19;
+ kCharacterShapeType = 20;
+ kNumberCaseType = 21;
+ kTextSpacingType = 22;
+ kTransliterationType = 23;
+ kAnnotationType = 24;
+ kKanaSpacingType = 25;
+ kIdeographicSpacingType = 26;
+ kUnicodeDecompositionType = 27;
+ kRubyKanaType = 28;
+ kCJKSymbolAlternativesType = 29;
+ kIdeographicAlternativesType = 30;
+ kCJKVerticalRomanPlacementType = 31;
+ kItalicCJKRomanType = 32;
+ kCJKRomanSpacingType = 103;
+ kLastFeatureType = -1;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kAllTypographicFeaturesType
+ }
+ kAllTypeFeaturesOnSelector = 0;
+ kAllTypeFeaturesOffSelector = 1;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kLigaturesType
+ }
+ kRequiredLigaturesOnSelector = 0;
+ kRequiredLigaturesOffSelector = 1;
+ kCommonLigaturesOnSelector = 2;
+ kCommonLigaturesOffSelector = 3;
+ kRareLigaturesOnSelector = 4;
+ kRareLigaturesOffSelector = 5;
+ kLogosOnSelector = 6;
+ kLogosOffSelector = 7;
+ kRebusPicturesOnSelector = 8;
+ kRebusPicturesOffSelector = 9;
+ kDiphthongLigaturesOnSelector = 10;
+ kDiphthongLigaturesOffSelector = 11;
+ kSquaredLigaturesOnSelector = 12;
+ kSquaredLigaturesOffSelector = 13;
+ kAbbrevSquaredLigaturesOnSelector = 14;
+ kAbbrevSquaredLigaturesOffSelector = 15;
+ kSymbolLigaturesOnSelector = 16;
+ kSymbolLigaturesOffSelector = 17;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kCursiveConnectionType
+ }
+ kUnconnectedSelector = 0;
+ kPartiallyConnectedSelector = 1;
+ kCursiveSelector = 2;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kLetterCaseType
+ }
+ kUpperAndLowerCaseSelector = 0;
+ kAllCapsSelector = 1;
+ kAllLowerCaseSelector = 2;
+ kSmallCapsSelector = 3;
+ kInitialCapsSelector = 4;
+ kInitialCapsAndSmallCapsSelector = 5;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kVerticalSubstitutionType
+ }
+ kSubstituteVerticalFormsOnSelector = 0;
+ kSubstituteVerticalFormsOffSelector = 1;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kLinguisticRearrangementType
+ }
+ kLinguisticRearrangementOnSelector = 0;
+ kLinguisticRearrangementOffSelector = 1;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kNumberSpacingType
+ }
+ kMonospacedNumbersSelector = 0;
+ kProportionalNumbersSelector = 1;
+ kThirdWidthNumbersSelector = 2;
+ kQuarterWidthNumbersSelector = 3;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kSmartSwashType
+ }
+ kWordInitialSwashesOnSelector = 0;
+ kWordInitialSwashesOffSelector = 1;
+ kWordFinalSwashesOnSelector = 2;
+ kWordFinalSwashesOffSelector = 3;
+ kLineInitialSwashesOnSelector = 4;
+ kLineInitialSwashesOffSelector = 5;
+ kLineFinalSwashesOnSelector = 6;
+ kLineFinalSwashesOffSelector = 7;
+ kNonFinalSwashesOnSelector = 8;
+ kNonFinalSwashesOffSelector = 9;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kDiacriticsType
+ }
+ kShowDiacriticsSelector = 0;
+ kHideDiacriticsSelector = 1;
+ kDecomposeDiacriticsSelector = 2;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kVerticalPositionType
+ }
+ kNormalPositionSelector = 0;
+ kSuperiorsSelector = 1;
+ kInferiorsSelector = 2;
+ kOrdinalsSelector = 3;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kFractionsType
+ }
+ kNoFractionsSelector = 0;
+ kVerticalFractionsSelector = 1;
+ kDiagonalFractionsSelector = 2;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kOverlappingCharactersType
+ }
+ kPreventOverlapOnSelector = 0;
+ kPreventOverlapOffSelector = 1;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kTypographicExtrasType
+ }
+ kHyphensToEmDashOnSelector = 0;
+ kHyphensToEmDashOffSelector = 1;
+ kHyphenToEnDashOnSelector = 2;
+ kHyphenToEnDashOffSelector = 3;
+ kSlashedZeroOnSelector = 4;
+ kSlashedZeroOffSelector = 5;
+ kFormInterrobangOnSelector = 6;
+ kFormInterrobangOffSelector = 7;
+ kSmartQuotesOnSelector = 8;
+ kSmartQuotesOffSelector = 9;
+ kPeriodsToEllipsisOnSelector = 10;
+ kPeriodsToEllipsisOffSelector = 11;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kMathematicalExtrasType
+ }
+ kHyphenToMinusOnSelector = 0;
+ kHyphenToMinusOffSelector = 1;
+ kAsteriskToMultiplyOnSelector = 2;
+ kAsteriskToMultiplyOffSelector = 3;
+ kSlashToDivideOnSelector = 4;
+ kSlashToDivideOffSelector = 5;
+ kInequalityLigaturesOnSelector = 6;
+ kInequalityLigaturesOffSelector = 7;
+ kExponentsOnSelector = 8;
+ kExponentsOffSelector = 9;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kOrnamentSetsType
+ }
+ kNoOrnamentsSelector = 0;
+ kDingbatsSelector = 1;
+ kPiCharactersSelector = 2;
+ kFleuronsSelector = 3;
+ kDecorativeBordersSelector = 4;
+ kInternationalSymbolsSelector = 5;
+ kMathSymbolsSelector = 6;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kCharacterAlternativesType
+ }
+ kNoAlternatesSelector = 0;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kDesignComplexityType
+ }
+ kDesignLevel1Selector = 0;
+ kDesignLevel2Selector = 1;
+ kDesignLevel3Selector = 2;
+ kDesignLevel4Selector = 3;
+ kDesignLevel5Selector = 4;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kStyleOptionsType
+ }
+ kNoStyleOptionsSelector = 0;
+ kDisplayTextSelector = 1;
+ kEngravedTextSelector = 2;
+ kIlluminatedCapsSelector = 3;
+ kTitlingCapsSelector = 4;
+ kTallCapsSelector = 5;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kCharacterShapeType
+ }
+ kTraditionalCharactersSelector = 0;
+ kSimplifiedCharactersSelector = 1;
+ kJIS1978CharactersSelector = 2;
+ kJIS1983CharactersSelector = 3;
+ kJIS1990CharactersSelector = 4;
+ kTraditionalAltOneSelector = 5;
+ kTraditionalAltTwoSelector = 6;
+ kTraditionalAltThreeSelector = 7;
+ kTraditionalAltFourSelector = 8;
+ kTraditionalAltFiveSelector = 9;
+ kExpertCharactersSelector = 10;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kNumberCaseType
+ }
+ kLowerCaseNumbersSelector = 0;
+ kUpperCaseNumbersSelector = 1;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kTextSpacingType
+ }
+ kProportionalTextSelector = 0;
+ kMonospacedTextSelector = 1;
+ kHalfWidthTextSelector = 2;
+ kNormallySpacedTextSelector = 3;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kTransliterationType
+ }
+ kNoTransliterationSelector = 0;
+ kHanjaToHangulSelector = 1;
+ kHiraganaToKatakanaSelector = 2;
+ kKatakanaToHiraganaSelector = 3;
+ kKanaToRomanizationSelector = 4;
+ kRomanizationToHiraganaSelector = 5;
+ kRomanizationToKatakanaSelector = 6;
+ kHanjaToHangulAltOneSelector = 7;
+ kHanjaToHangulAltTwoSelector = 8;
+ kHanjaToHangulAltThreeSelector = 9;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kAnnotationType
+ }
+ kNoAnnotationSelector = 0;
+ kBoxAnnotationSelector = 1;
+ kRoundedBoxAnnotationSelector = 2;
+ kCircleAnnotationSelector = 3;
+ kInvertedCircleAnnotationSelector = 4;
+ kParenthesisAnnotationSelector = 5;
+ kPeriodAnnotationSelector = 6;
+ kRomanNumeralAnnotationSelector = 7;
+ kDiamondAnnotationSelector = 8;
+ kInvertedBoxAnnotationSelector = 9;
+ kInvertedRoundedBoxAnnotationSelector = 10;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kKanaSpacingType
+ }
+ kFullWidthKanaSelector = 0;
+ kProportionalKanaSelector = 1;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kIdeographicSpacingType
+ }
+ kFullWidthIdeographsSelector = 0;
+ kProportionalIdeographsSelector = 1;
+ kHalfWidthIdeographsSelector = 2;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kUnicodeDecompositionType
+ }
+ kCanonicalCompositionOnSelector = 0;
+ kCanonicalCompositionOffSelector = 1;
+ kCompatibilityCompositionOnSelector = 2;
+ kCompatibilityCompositionOffSelector = 3;
+ kTranscodingCompositionOnSelector = 4;
+ kTranscodingCompositionOffSelector = 5;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kRubyKanaType
+ }
+ kNoRubyKanaSelector = 0;
+ kRubyKanaSelector = 1;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kCJKSymbolAlternativesType
+ }
+ kNoCJKSymbolAlternativesSelector = 0;
+ kCJKSymbolAltOneSelector = 1;
+ kCJKSymbolAltTwoSelector = 2;
+ kCJKSymbolAltThreeSelector = 3;
+ kCJKSymbolAltFourSelector = 4;
+ kCJKSymbolAltFiveSelector = 5;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kIdeographicAlternativesType
+ }
+ kNoIdeographicAlternativesSelector = 0;
+ kIdeographicAltOneSelector = 1;
+ kIdeographicAltTwoSelector = 2;
+ kIdeographicAltThreeSelector = 3;
+ kIdeographicAltFourSelector = 4;
+ kIdeographicAltFiveSelector = 5;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kCJKVerticalRomanPlacementType
+ }
+ kCJKVerticalRomanCenteredSelector = 0;
+ kCJKVerticalRomanHBaselineSelector = 1;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kItalicCJKRomanType
+ }
+ kNoCJKItalicRomanSelector = 0;
+ kCJKItalicRomanSelector = 1;
+
+
+ {
+ * Summary:
+ * Selectors for feature type kCJKRomanSpacingType
+ }
+ kHalfWidthCJKRomanSelector = 0;
+ kProportionalCJKRomanSelector = 1;
+ kDefaultCJKRomanSelector = 2;
+ kFullWidthCJKRomanSelector = 3;
+
+ { --------------------------------------------------------------------------- }
+ { ---------------- Table Specific Typedefs and Constants -------------------- }
+ { --------------------------------------------------------------------------- }
+ { FORMATS FOR TABLE: lookup tables - used within various other tables }
+ kSFNTLookupSimpleArray = 0; { a simple array indexed by glyph code }
+ kSFNTLookupSegmentSingle = 2; { segment mapping to single value }
+ kSFNTLookupSegmentArray = 4; { segment mapping to lookup array }
+ kSFNTLookupSingleTable = 6; { sorted list of glyph, value pairs }
+ kSFNTLookupTrimmedArray = 8; { a simple trimmed array indexed by glyph code }
+
+
+type
+ SFNTLookupTableFormat = UInt16;
+ SFNTLookupValue = UInt16;
+ SFNTLookupOffset = UInt16;
+ SFNTLookupKind = UInt32;
+ {
+ A BinarySearchHeader defines the five standard fields needed to perform quick
+ lookups in a lookup table (note that using UInt16s, and not ItemCounts or
+ similar types, is important here, since these tables are in fonts, and the
+ documented font formats specify 16-bit quantities).
+ }
+ SFNTLookupBinarySearchHeaderPtr = ^SFNTLookupBinarySearchHeader;
+ SFNTLookupBinarySearchHeader = record
+ unitSize: UInt16; { size of a unit in bytes }
+ nUnits: UInt16; { number of units in table }
+ searchRange: UInt16; { (largest power of two <= nUnits) * unitSize }
+ entrySelector: UInt16; { log2 (largest power of two <= nUnits) }
+ rangeShift: UInt16; { (nUnits - largest power of two <= nUnits) * unitSize }
+ end;
+
+ { A format 0 lookup table maps all glyphs in the font to lookup values }
+ SFNTLookupArrayHeaderPtr = ^SFNTLookupArrayHeader;
+ SFNTLookupArrayHeader = record
+ lookupValues: array [0..0] of SFNTLookupValue;
+ end;
+
+ { A format 8 lookup table maps some range of glyphs in the font to lookup values }
+ SFNTLookupTrimmedArrayHeaderPtr = ^SFNTLookupTrimmedArrayHeader;
+ SFNTLookupTrimmedArrayHeader = record
+ firstGlyph: UInt16;
+ count: UInt16;
+ valueArray: array [0..0] of SFNTLookupValue;
+ end;
+
+ {
+ Format 2 and format 4 lookup tables map ranges of glyphs to either single lookup
+ values (format 2), or per-glyph lookup values (format 4). Since both formats
+ use the same kind of data, only one unified set of segment-related structures
+ is defined.
+ }
+ SFNTLookupSegmentPtr = ^SFNTLookupSegment;
+ SFNTLookupSegment = record
+ lastGlyph: UInt16;
+ firstGlyph: UInt16;
+ value: array [0..0] of UInt16;
+ end;
+
+ SFNTLookupSegmentHeaderPtr = ^SFNTLookupSegmentHeader;
+ SFNTLookupSegmentHeader = record
+ binSearch: SFNTLookupBinarySearchHeader;
+ segments: array [0..0] of SFNTLookupSegment;
+ end;
+
+ { A format 6 lookup table maps single glyphs to lookup values. }
+ SFNTLookupSinglePtr = ^SFNTLookupSingle;
+ SFNTLookupSingle = record
+ glyph: UInt16;
+ value: array [0..0] of UInt16;
+ end;
+
+ SFNTLookupSingleHeaderPtr = ^SFNTLookupSingleHeader;
+ SFNTLookupSingleHeader = record
+ binSearch: SFNTLookupBinarySearchHeader;
+ entries: array [0..0] of SFNTLookupSingle;
+ end;
+
+ { The format-specific part of the subtable header }
+ SFNTLookupFormatSpecificHeaderPtr = ^SFNTLookupFormatSpecificHeader;
+ SFNTLookupFormatSpecificHeader = record
+ case SInt16 of
+ 0: (
+ theArray: SFNTLookupArrayHeader;
+ );
+ 1: (
+ segment: SFNTLookupSegmentHeader;
+ );
+ 2: (
+ single: SFNTLookupSingleHeader;
+ );
+ 3: (
+ trimmedArray: SFNTLookupTrimmedArrayHeader;
+ );
+ end;
+
+ { The overall subtable header }
+ SFNTLookupTablePtr = ^SFNTLookupTable;
+ SFNTLookupTable = record
+ format: SFNTLookupTableFormat; { table format }
+ fsHeader: SFNTLookupFormatSpecificHeader; { format specific header }
+ end;
+
+ SFNTLookupTableHandle = ^SFNTLookupTablePtr;
+ { --------------------------------------------------------------------------- }
+ { GENERAL FORMATS FOR STATE TABLES -- prefix "ST" }
+
+const
+ kSTClassEndOfText = 0;
+ kSTClassOutOfBounds = 1;
+ kSTClassDeletedGlyph = 2;
+ kSTClassEndOfLine = 3;
+ kSTSetMark = $8000;
+ kSTNoAdvance = $4000;
+ kSTMarkEnd = $2000;
+ kSTLigActionMask = $3FFF;
+ kSTRearrVerbMask = $000F;
+
+
+type
+ STClass = UInt8;
+ STEntryIndex = UInt8;
+ STHeaderPtr = ^STHeader;
+ STHeader = record
+ filler: SInt8;
+ nClasses: SInt8;
+ classTableOffset: UInt16;
+ stateArrayOffset: UInt16;
+ entryTableOffset: UInt16;
+ end;
+
+ STClassTablePtr = ^STClassTable;
+ STClassTable = record
+ firstGlyph: UInt16;
+ nGlyphs: UInt16;
+ classes: SInt8;
+ end;
+
+ STEntryZeroPtr = ^STEntryZero;
+ STEntryZero = record
+ newState: UInt16;
+ flags: UInt16;
+ end;
+
+ STEntryOnePtr = ^STEntryOne;
+ STEntryOne = record
+ newState: UInt16;
+ flags: UInt16;
+ offset1: UInt16;
+ end;
+
+ STEntryTwoPtr = ^STEntryTwo;
+ STEntryTwo = record
+ newState: UInt16;
+ flags: UInt16;
+ offset1: UInt16;
+ offset2: UInt16;
+ end;
+
+ { --------------------------------------------------------------------------- }
+ { GENERAL FORMATS FOR STATE TABLES to be used with 'morx' tables -- prefix "STX" }
+
+const
+ kSTXHasLigAction = $2000;
+
+
+type
+ STXClass = UInt16;
+ STXStateIndex = UInt16;
+ STXEntryIndex = UInt16;
+ STXHeaderPtr = ^STXHeader;
+ STXHeader = record
+ nClasses: UInt32;
+ classTableOffset: UInt32;
+ stateArrayOffset: UInt32;
+ entryTableOffset: UInt32;
+ end;
+
+ STXClassTable = SFNTLookupTable;
+ STXClassTablePtr = ^STXClassTable;
+ STXEntryZeroPtr = ^STXEntryZero;
+ STXEntryZero = record
+ newState: STXStateIndex;
+ flags: UInt16;
+ end;
+
+ STXEntryOnePtr = ^STXEntryOne;
+ STXEntryOne = record
+ newState: STXStateIndex;
+ flags: UInt16;
+ index1: UInt16;
+ end;
+
+ STXEntryTwoPtr = ^STXEntryTwo;
+ STXEntryTwo = record
+ newState: STXStateIndex;
+ flags: UInt16;
+ index1: UInt16;
+ index2: UInt16;
+ end;
+
+ { --------------------------------------------------------------------------- }
+ { FORMATS FOR TABLE: 'lcar' }
+ { CONSTANTS }
+
+const
+ kLCARTag = $6C636172; { 'lcar' }
+ kLCARCurrentVersion = $00010000; { current version number for 'lcar' table }
+ kLCARLinearFormat = 0;
+ kLCARCtlPointFormat = 1;
+
+ { TYPES }
+
+type
+ LcarCaretClassEntryPtr = ^LcarCaretClassEntry;
+ LcarCaretClassEntry = record
+ count: UInt16;
+ partials: array [0..0] of UInt16; { these are either FUnits or control-point numbers }
+ end;
+
+ LcarCaretTablePtr = ^LcarCaretTable;
+ LcarCaretTable = record
+ version: Fixed;
+ format: UInt16;
+ lookup: SFNTLookupTable;
+ end;
+
+ { --------------------------------------------------------------------------- }
+ { FORMATS FOR TABLE: 'just' }
+ { CONSTANTS }
+
+const
+ kJUSTTag = $6A757374; { 'just' }
+ kJUSTCurrentVersion = $00010000;
+ kJUSTStandardFormat = 0;
+ kJUSTnoGlyphcode = $FFFF; { used in a pcConditionalAddAction }
+ kJUSTpcDecompositionAction = 0;
+ kJUSTpcUnconditionalAddAction = 1;
+ kJUSTpcConditionalAddAction = 2;
+ kJUSTpcGlyphStretchAction = 3;
+ kJUSTpcDuctilityAction = 4;
+ kJUSTpcGlyphRepeatAddAction = 5;
+
+ { Justification priority levels }
+ kJUSTKashidaPriority = 0;
+ kJUSTSpacePriority = 1;
+ kJUSTLetterPriority = 2;
+ kJUSTNullPriority = 3;
+ kJUSTPriorityCount = 4;
+
+ { Justification flags }
+ kJUSTOverridePriority = $8000;
+ kJUSTOverrideLimits = $4000;
+ kJUSTOverrideUnlimited = $2000;
+ kJUSTUnlimited = $1000;
+ kJUSTPriorityMask = $0003;
+
+ { TYPES }
+
+type
+ JustPCActionType = UInt16;
+ JustificationFlags = UInt16;
+ { A JustPCDecompositionAction defines a ligature decomposition action. }
+ JustPCDecompositionActionPtr = ^JustPCDecompositionAction;
+ JustPCDecompositionAction = record
+ lowerLimit: Fixed;
+ upperLimit: Fixed;
+ order: UInt16;
+ count: UInt16;
+ glyphs: array [0..0] of UInt16;
+ end;
+
+ { A JUSTPCUnconditionalAddAction defines an unconditional glyph add action. }
+ JustPCUnconditionalAddAction = UInt16;
+ {
+ A JUSTPCConditionalAddAction defines a glyph substitution and add action. If the addGlyph
+ is equal to kJUSTnoGlyphcode, then no glyph will be added, and the justification for
+ the line will be redone.
+ }
+ JustPCConditionalAddActionPtr = ^JustPCConditionalAddAction;
+ JustPCConditionalAddAction = record
+ substThreshhold: Fixed; { threshhold of growth factor at which subst occurs }
+ addGlyph: UInt16;
+ substGlyph: UInt16;
+ end;
+
+ { A PCDuctilityAction defines a ductile axis along which the glyph will be varied. }
+ JustPCDuctilityActionPtr = ^JustPCDuctilityAction;
+ JustPCDuctilityAction = record
+ ductilityAxis: UInt32;
+ minimumLimit: Fixed;
+ noStretchValue: Fixed;
+ maximumLimit: Fixed;
+ end;
+
+ {
+ A PCGlyphRepetitionAction defines a glyph which will not be stretched or otherwise
+ transformed, but rather which will be emplaced however many times are needed to fill
+ the needed gap.
+ }
+ JustPCGlyphRepeatAddActionPtr = ^JustPCGlyphRepeatAddAction;
+ JustPCGlyphRepeatAddAction = record
+ flags: UInt16;
+ glyph: UInt16;
+ end;
+
+ { PCActionSubrecords contain the actual postcompensation actions. }
+ JustPCActionSubrecordPtr = ^JustPCActionSubrecord;
+ JustPCActionSubrecord = record
+ theClass: UInt16; { justification class value associated with this rec }
+ theType: JustPCActionType;
+ length: UInt32;
+ data: UInt32; { not really a UInt32; cast as ptr to appropriate action }
+ end;
+
+ { The set of postcompensation records is defined in a PCAction struct. }
+ JustPCActionPtr = ^JustPCAction;
+ JustPCAction = record
+ actionCount: UInt32; { long for alignment purposes }
+ actions: array [0..0] of JustPCActionSubrecord;
+ end;
+
+ {
+ JustWidthDeltaEntry is the justification table entry structure. The justClass value (which is
+ actually limited to 7 bits by the state table structure) is defined as a long for PPC alignment reasons.
+ }
+ JustWidthDeltaEntryPtr = ^JustWidthDeltaEntry;
+ JustWidthDeltaEntry = record
+ justClass: UInt32;
+ beforeGrowLimit: Fixed; { ems AW can grow by at most on LT }
+ beforeShrinkLimit: Fixed; { ems AW can shrink by at most on LT }
+ afterGrowLimit: Fixed; { ems AW can grow by at most on RB }
+ afterShrinkLimit: Fixed; { ems AW can shrink by at most on RB }
+ growFlags: JustificationFlags; { flags controlling grow case }
+ shrinkFlags: JustificationFlags; { flags controlling shrink case }
+ end;
+
+ JustWidthDeltaGroupPtr = ^JustWidthDeltaGroup;
+ JustWidthDeltaGroup = record
+ count: UInt32;
+ entries: array [0..0] of JustWidthDeltaEntry;
+ end;
+
+ { Overall structure of a postcompensation table is defined in PostcompTable. }
+ JustPostcompTablePtr = ^JustPostcompTable;
+ JustPostcompTable = record
+ lookupTable: SFNTLookupTable;
+ { action records here }
+ end;
+
+ JustDirectionTablePtr = ^JustDirectionTable;
+ JustDirectionTable = record
+ justClass: UInt16; { offset to state table (0=none) }
+ widthDeltaClusters: UInt16; { offset to clusters }
+ postcomp: UInt16; { offset to postcomp table (0=none) }
+ lookup: SFNTLookupTable;
+ end;
+
+ JustTablePtr = ^JustTable;
+ JustTable = record
+ version: Fixed;
+ format: UInt16;
+ horizHeaderOffset: UInt16;
+ vertHeaderOffset: UInt16;
+ end;
+
+ { --------------------------------------------------------------------------- }
+ { FORMATS FOR TABLE: 'opbd' }
+ { CONSTANTS }
+
+const
+ kOPBDTag = $6F706264; { 'opbd' }
+ kOPBDCurrentVersion = $00010000;
+ kOPBDDistanceFormat = 0;
+ kOPBDControlPointFormat = 1;
+
+ { TYPES }
+
+type
+ OpbdTableFormat = UInt16;
+ {
+ The OpbdSideValues struct is the lookup result from the FindSingle call for the
+ optical tables. It contains the 4 FUnit values that are relevant to the specified
+ glyph, or the 4 control gxPoint values.
+ }
+ OpbdSideValuesPtr = ^OpbdSideValues;
+ OpbdSideValues = record
+ leftSideShift: SInt16;
+ topSideShift: SInt16;
+ rightSideShift: SInt16;
+ bottomSideShift: SInt16;
+ end;
+
+ OpbdTablePtr = ^OpbdTable;
+ OpbdTable = record
+ version: Fixed;
+ format: OpbdTableFormat;
+ lookupTable: SFNTLookupTable;
+ end;
+
+ { --------------------------------------------------------------------------- }
+ { FORMATS FOR TABLE: 'mort' }
+ { CONSTANTS }
+
+const
+ kMORTTag = $6D6F7274; { 'mort' }
+ kMORTCurrentVersion = $00010000; { current version number for 'mort' table }
+ { Coverage masks }
+ kMORTCoverVertical = $8000;
+ kMORTCoverDescending = $4000;
+ kMORTCoverIgnoreVertical = $2000;
+ kMORTCoverTypeMask = $000F; { Subtable types }
+ kMORTRearrangementType = 0;
+ kMORTContextualType = 1;
+ kMORTLigatureType = 2;
+ kMORTSwashType = 4;
+ kMORTInsertionType = 5; { Ligature subtable constants }
+ kMORTLigLastAction = $80000000;
+ kMORTLigStoreLigature = $40000000;
+ kMORTLigFormOffsetMask = $3FFFFFFF;
+ kMORTLigFormOffsetShift = 2; { Rearrangement subtable actions }
+ kMORTraNoAction = 0; { no action }
+ kMORTraxA = 1; { Ax => xA }
+ kMORTraDx = 2; { xD => Dx }
+ kMORTraDxA = 3; { AxD => DxA }
+ kMORTraxAB = 4; { ABx => xAB }
+ kMORTraxBA = 5; { ABx => xBA }
+ kMORTraCDx = 6; { xCD => CDx }
+ kMORTraDCx = 7; { xCD => DCx }
+ kMORTraCDxA = 8; { AxCD => CDxA }
+ kMORTraDCxA = 9; { AxCD => DCxA }
+ kMORTraDxAB = 10; { ABxD => DxAB }
+ kMORTraDxBA = 11; { ABxD => DxBA }
+ kMORTraCDxAB = 12; { ABxCD => CDxAB }
+ kMORTraCDxBA = 13; { ABxCD => CDxBA }
+ kMORTraDCxAB = 14; { ABxCD => DCxAB }
+ kMORTraDCxBA = 15; { ABxCD => DCxBA }
+ { Insertion subtable constants }
+ kMORTDoInsertionsBefore = $80;
+ kMORTIsSplitVowelPiece = $40;
+ kMORTInsertionsCountMask = $3F;
+ kMORTCurrInsertKashidaLike = $2000;
+ kMORTMarkInsertKashidaLike = $1000;
+ kMORTCurrInsertBefore = $0800;
+ kMORTMarkInsertBefore = $0400;
+ kMORTMarkJustTableCountMask = $3F80;
+ kMORTMarkJustTableCountShift = 7; { JustTableIndex for marked character }
+ kMORTCurrJustTableCountMask = $007F;
+ kMORTCurrJustTableCountShift = 0; { JustTableIndex for current character }
+ kMORTCurrInsertCountMask = $03E0;
+ kMORTCurrInsertCountShift = 5; { count to insert after current glyphRec }
+ kMORTMarkInsertCountMask = $001F;
+ kMORTMarkInsertCountShift = 0; { count to insert after marked glyphRec }
+
+ { TYPES }
+
+type
+ MortSubtableMaskFlags = UInt32;
+ MortLigatureActionEntry = UInt32;
+ MortRearrangementSubtablePtr = ^MortRearrangementSubtable;
+ MortRearrangementSubtable = record
+ header: STHeader;
+ end;
+
+ MortContextualSubtablePtr = ^MortContextualSubtable;
+ MortContextualSubtable = record
+ header: STHeader;
+ substitutionTableOffset: UInt16;
+ end;
+
+ MortLigatureSubtablePtr = ^MortLigatureSubtable;
+ MortLigatureSubtable = record
+ header: STHeader;
+ ligatureActionTableOffset: UInt16;
+ componentTableOffset: UInt16;
+ ligatureTableOffset: UInt16;
+ end;
+
+ MortSwashSubtablePtr = ^MortSwashSubtable;
+ MortSwashSubtable = record
+ lookup: SFNTLookupTable;
+ end;
+
+ MortInsertionSubtablePtr = ^MortInsertionSubtable;
+ MortInsertionSubtable = record
+ header: STHeader;
+ end;
+
+ MortSpecificSubtablePtr = ^MortSpecificSubtable;
+ MortSpecificSubtable = record
+ case SInt16 of
+ 0: (
+ rearrangement: MortRearrangementSubtable;
+ );
+ 1: (
+ contextual: MortContextualSubtable;
+ );
+ 2: (
+ ligature: MortLigatureSubtable;
+ );
+ 3: (
+ swash: MortSwashSubtable;
+ );
+ 4: (
+ insertion: MortInsertionSubtable;
+ );
+ end;
+
+ MortSubtablePtr = ^MortSubtable;
+ MortSubtable = record
+ length: UInt16;
+ coverage: UInt16;
+ flags: MortSubtableMaskFlags;
+ u: MortSpecificSubtable;
+ end;
+
+ MortFeatureEntryPtr = ^MortFeatureEntry;
+ MortFeatureEntry = record
+ featureType: UInt16;
+ featureSelector: UInt16;
+ enableFlags: MortSubtableMaskFlags;
+ disableFlags: MortSubtableMaskFlags;
+ end;
+
+ MortChainPtr = ^MortChain;
+ MortChain = record
+ defaultFlags: MortSubtableMaskFlags; { default flags for this chain }
+ length: UInt32; { byte length of this chain }
+ nFeatures: UInt16; { number of feature entries }
+ nSubtables: UInt16; { number of subtables }
+ featureEntries: array [0..0] of MortFeatureEntry;
+ { the subtables follow }
+ end;
+
+ MortTablePtr = ^MortTable;
+ MortTable = record
+ version: Fixed;
+ nChains: UInt32;
+ chains: array [0..0] of MortChain;
+ end;
+
+ { --------------------------------------------------------------------------- }
+ { FORMATS FOR TABLE: 'morx' (version 2 and beyond metamorphosis tables) }
+ { CONSTANTS }
+
+const
+ kMORXTag = $6D6F7278; { 'morx' }
+ kMORXCurrentVersion = $00020000; { version number for current 'morx' table }
+ { Coverage masks }
+ kMORXCoverVertical = $80000000;
+ kMORXCoverDescending = $40000000;
+ kMORXCoverIgnoreVertical = $20000000;
+ kMORXCoverTypeMask = $000000FF;
+
+ { TYPES }
+
+type
+ MorxRearrangementSubtablePtr = ^MorxRearrangementSubtable;
+ MorxRearrangementSubtable = record
+ header: STXHeader;
+ end;
+
+ MorxContextualSubtablePtr = ^MorxContextualSubtable;
+ MorxContextualSubtable = record
+ header: STXHeader;
+ substitutionTableOffset: UInt32;
+ end;
+
+ MorxLigatureSubtablePtr = ^MorxLigatureSubtable;
+ MorxLigatureSubtable = record
+ header: STXHeader;
+ ligatureActionTableOffset: UInt32;
+ componentTableOffset: UInt32;
+ ligatureTableOffset: UInt32;
+ end;
+
+ MorxInsertionSubtablePtr = ^MorxInsertionSubtable;
+ MorxInsertionSubtable = record
+ header: STXHeader;
+ insertionGlyphTableOffset: UInt32;
+ end;
+
+ MorxSpecificSubtablePtr = ^MorxSpecificSubtable;
+ MorxSpecificSubtable = record
+ case SInt16 of
+ 0: (
+ rearrangement: MorxRearrangementSubtable;
+ );
+ 1: (
+ contextual: MorxContextualSubtable;
+ );
+ 2: (
+ ligature: MorxLigatureSubtable;
+ );
+ 3: (
+ swash: MortSwashSubtable;
+ );
+ 4: (
+ insertion: MorxInsertionSubtable;
+ );
+ end;
+
+ MorxSubtablePtr = ^MorxSubtable;
+ MorxSubtable = record
+ length: UInt32;
+ coverage: UInt32;
+ flags: MortSubtableMaskFlags;
+ u: MorxSpecificSubtable;
+ end;
+
+ MorxChainPtr = ^MorxChain;
+ MorxChain = record
+ defaultFlags: MortSubtableMaskFlags; { default flags for this chain }
+ length: UInt32; { byte length of this chain }
+ nFeatures: UInt32; { number of feature entries }
+ nSubtables: UInt32; { number of subtables }
+ featureEntries: array [0..0] of MortFeatureEntry;
+ { the subtables follow }
+ end;
+
+ MorxTablePtr = ^MorxTable;
+ MorxTable = record
+ version: Fixed;
+ nChains: UInt32;
+ chains: array [0..0] of MorxChain;
+ end;
+
+ { --------------------------------------------------------------------------- }
+ { FORMATS FOR TABLE: 'prop' }
+ { CONSTANTS }
+
+const
+ kPROPTag = $70726F70; { 'prop' }
+ kPROPCurrentVersion = $00020000; { current version number for 'prop' table }
+ kPROPPairOffsetShift = 8;
+ kPROPPairOffsetSign = 7;
+ kPROPIsFloaterMask = $8000; { glyph is floater }
+ kPROPCanHangLTMask = $4000; { glyph can hang left/top }
+ kPROPCanHangRBMask = $2000; { glyph can hang right/bottom }
+ kPROPUseRLPairMask = $1000; { if glyph lands in RL streak, use paired glyph }
+ kPROPPairOffsetMask = $0F00; { 4-bit signed offset to other pair member }
+ kPROPRightConnectMask = $0080; { glyph connects to glyph on right }
+ kPROPZeroReserved = $0060; { must be zero }
+ kPROPDirectionMask = $001F; { direction bits }
+
+ { These are the Unicode direction classes (plus the Special European Number class). }
+ kPROPLDirectionClass = 0; { Left-to-Right }
+ kPROPRDirectionClass = 1; { Right-to-Left }
+ kPROPALDirectionClass = 2; { Right-to-Left Arabic Letter }
+ kPROPENDirectionClass = 3; { European Number }
+ kPROPESDirectionClass = 4; { European Number Seperator }
+ kPROPETDirectionClass = 5; { European Number Terminator }
+ kPROPANDirectionClass = 6; { Arabic Number }
+ kPROPCSDirectionClass = 7; { Common Number Seperator }
+ kPROPPSDirectionClass = 8; { Paragraph Seperator (also referred to as Block Separator) }
+ kPROPSDirectionClass = 9; { Segment Seperator }
+ kPROPWSDirectionClass = 10; { Whitespace }
+ kPROPONDirectionClass = 11; { Other Neutral }
+ kPROPSENDirectionClass = 12; { Special European Number (not a Unicode class) }
+ kPROPLREDirectionClass = 13; { Left-to-Right Embeding }
+ kPROPLRODirectionClass = 14; { Left-to-Right Override }
+ kPROPRLEDirectionClass = 15; { Right-to-Left Embeding }
+ kPROPRLODirectionClass = 16; { Right-to-Left Override }
+ kPROPPDFDirectionClass = 17; { Pop Directional Format }
+ kPROPNSMDirectionClass = 18; { Non-Spacing Mark }
+ kPROPBNDirectionClass = 19; { Boundary Neutral }
+ kPROPNumDirectionClasses = 20; { Number of Unicode directional types + Special European Number }
+
+ { TYPES }
+
+type
+ PropCharProperties = UInt16;
+ PropTablePtr = ^PropTable;
+ PropTable = record
+ version: Fixed;
+ format: UInt16;
+ defaultProps: PropCharProperties;
+ lookup: SFNTLookupTable;
+ end;
+
+ PropLookupSegmentPtr = ^PropLookupSegment;
+ PropLookupSegment = record
+ lastGlyph: UInt16;
+ firstGlyph: UInt16;
+ value: UInt16;
+ end;
+
+ PropLookupSinglePtr = ^PropLookupSingle;
+ PropLookupSingle = record
+ glyph: UInt16;
+ props: PropCharProperties;
+ end;
+
+ { --------------------------------------------------------------------------- }
+ { FORMATS FOR TABLE: 'trak' }
+ { CONSTANTS }
+
+const
+ kTRAKTag = $7472616B; { 'trak' }
+ kTRAKCurrentVersion = $00010000; { current version number for 'trak' table }
+ kTRAKUniformFormat = 0; { kTRAKPerGlyphFormat = 2 }
+
+ { TYPES }
+
+type
+ TrakValue = SInt16;
+ TrakTableEntryPtr = ^TrakTableEntry;
+ TrakTableEntry = record
+ track: Fixed;
+ nameTableIndex: UInt16;
+ sizesOffset: UInt16; { offset to array of TrackingValues }
+ end;
+
+ TrakTableDataPtr = ^TrakTableData;
+ TrakTableData = record
+ nTracks: UInt16;
+ nSizes: UInt16;
+ sizeTableOffset: UInt32;
+ trakTable: array [0..0] of TrakTableEntry;
+ end;
+
+ TrakTablePtr = ^TrakTable;
+ TrakTable = record
+ version: Fixed;
+ format: UInt16;
+ horizOffset: UInt16;
+ vertOffset: UInt16;
+ end;
+
+ { --------------------------------------------------------------------------- }
+ { FORMATS FOR TABLE: 'kern' }
+ { CONSTANTS }
+
+const
+ kKERNTag = $6B65726E; { 'kern' }
+ kKERNCurrentVersion = $00010000;
+ kKERNVertical = $8000; { set if this table has vertical kerning information }
+ kKERNResetCrossStream = $8000; { this value in a cross-stream table means reset to zero }
+ kKERNCrossStream = $4000; { set if this table contains cross-stream kerning values }
+ kKERNVariation = $2000; { set if this table contains variation kerning values }
+ kKERNUnusedBits = $1F00; { UNUSED, MUST BE ZERO }
+ kKERNFormatMask = $00FF; { format of this subtable }
+
+ kKERNOrderedList = 0; { ordered list of kerning pairs }
+ kKERNStateTable = 1; { state table for n-way contextual kerning }
+ kKERNSimpleArray = 2; { simple n X m array of kerning values }
+ kKERNIndexArray = 3; { modifed version of SimpleArray }
+
+ { Message Type Flags }
+ kKERNLineStart = $00000001; { Array of glyphs starts a line }
+ kKERNLineEndKerning = $00000002; { Array of glyphs ends a line }
+ kKERNNoCrossKerning = $00000004; { Prohibit cross kerning }
+ kKERNNotesRequested = $00000008; { Caller wants kerning notes }
+ kKERNNoStakeNote = 1; { Indicates a glyph was involved in a kerning pair/group }
+ kKERNCrossStreamResetNote = 2; { Indicates a return-to-baseline in cross-stream kerning }
+ kKERNNotApplied = $00000001; { All kerning values were zero, kerning call had no effect }
+
+ { TYPES }
+
+type
+ KernTableFormat = UInt8;
+ KernSubtableInfo = UInt16;
+ KernKerningValue = SInt16;
+ KernArrayOffset = UInt16;
+ { header for version 0 kerning table }
+ KernVersion0HeaderPtr = ^KernVersion0Header;
+ KernVersion0Header = record
+ version: UInt16; { font version number (will be 0!) }
+ nTables: UInt16; { number of subtables present }
+ firstSubtable: array [0..0] of UInt16; { first subtable starts here }
+ end;
+
+ { Header for a kerning table }
+ KernTableHeaderPtr = ^KernTableHeader;
+ KernTableHeader = record
+ version: Fixed; { font version number (currently 1.0) }
+ nTables: SInt32; { number of subtables present }
+ firstSubtable: array [0..0] of UInt16; { first subtable starts here }
+ end;
+
+ KernTableHeaderHandle = ^KernTableHeaderPtr;
+ {
+ F O R M A T S P E C I F I C D E F I N I T I O N S
+
+ kernOrderedList:
+
+ The table is a sorted list of [left glyph, right glyph, value] triples.
+ There's enough information in the header so that the list can be
+ efficiently binary searched.
+ }
+ { defines a single kerning pair of Glyphcodes }
+ KernKerningPairPtr = ^KernKerningPair;
+ KernKerningPair = record
+ left: UInt16;
+ right: UInt16;
+ end;
+
+ { a single list entry }
+ KernOrderedListEntryPtr = ^KernOrderedListEntry;
+ KernOrderedListEntry = record
+ pair: KernKerningPair; { the kerning pair }
+ value: KernKerningValue; { the kerning value for the above pair }
+ end;
+
+ { the header information for binary searching the list }
+ KernOrderedListHeaderPtr = ^KernOrderedListHeader;
+ KernOrderedListHeader = record
+ nPairs: UInt16; { number of kerning pairs in table }
+ searchRange: UInt16; { (largest power of two <= nPairs) * entry size }
+ entrySelector: UInt16; { log2 (largest power of two <= nPairs) }
+ rangeShift: UInt16; { (nPairs - largest power of two <= nPairs) * entry size }
+ table: array [0..0] of UInt16; { entries are first glyph, second glyph, and value }
+ end;
+
+ { KernStateTable: like the the generic state tables }
+ KernStateHeaderPtr = ^KernStateHeader;
+ KernStateHeader = record
+ header: STHeader; { state table header }
+ valueTable: UInt16; { offset to kerning value table }
+ firstTable: SInt8; { first table starts here }
+ end;
+
+ KernStateEntryPtr = ^KernStateEntry;
+ KernStateEntry = record
+ newState: UInt16;
+ flags: UInt16; { flags per above enum }
+ end;
+
+ {
+ Kern offset table header.
+ The offset table is a trimmed array from firstGlyph to limitGlyph.
+ Glyphs outside of this range should get zero for right-hand glyphs
+ and the offset of the beginning of the kerning array for left-hand glyphs.
+ }
+ KernOffsetTablePtr = ^KernOffsetTable;
+ KernOffsetTable = record
+ firstGlyph: UInt16; { first glyph in class range }
+ nGlyphs: UInt16; { number of glyphs in class range }
+ offsetTable: array [0..0] of KernArrayOffset; { offset table starts here }
+ end;
+
+ { Header information for accessing offset tables and kerning array }
+ {
+ KernSimpleArray:
+
+ The array is an nXm array of kenring values. Each row in the array
+ represents one left-hand glyph, and each column one right-hand glyph.
+ The zeroth row and column always represent glyphs that are out of bounds
+ and will always contain zero.
+
+ A pair is looked up by indexing the left-hand glyph through the left
+ offset table, the right-hand glyph through the right offset table,
+ adding both offsets to the starting address of the kerning array,
+ and fetching the kerning value pointed to.
+ }
+ { Kern offset table header. }
+ { The offset table is a trimmed array from firstGlyph to limitGlyph. }
+ { Glyphs outside of this range should get zero for right-hand glyphs }
+ { and the offset of the beginning of the kerning array for left- }
+ { hand glyphs. }
+ KernSimpleArrayHeaderPtr = ^KernSimpleArrayHeader;
+ KernSimpleArrayHeader = record
+ rowWidth: UInt16; { width, in bytes, of a row in the table }
+ leftOffsetTable: UInt16; { offset to left-hand offset table }
+ rightOffsetTable: UInt16; { offset to right-hand offset table }
+ theArray: KernArrayOffset; { offset to start of kerning array }
+ firstTable: array [0..0] of UInt16; { first offset table starts here... }
+ end;
+
+ { Index Array }
+ KernIndexArrayHeaderPtr = ^KernIndexArrayHeader;
+ KernIndexArrayHeader = record
+ glyphCount: UInt16;
+ kernValueCount: SInt8;
+ leftClassCount: SInt8;
+ rightClassCount: SInt8;
+ flags: SInt8; { set to 0 for now }
+ kernValue: array [0..0] of SInt16; { actual kerning values reference by index in kernIndex }
+ leftClass: SInt8; { maps left glyph to offset into kern index }
+ rightClass: SInt8; { maps right glyph to offset into kern index }
+ kernIndex: SInt8; { contains indicies into kernValue }
+ end;
+
+ { format specific part of subtable header }
+ KernFormatSpecificHeaderPtr = ^KernFormatSpecificHeader;
+ KernFormatSpecificHeader = record
+ case SInt16 of
+ 0: (
+ orderedList: KernOrderedListHeader;
+ );
+ 1: (
+ stateTable: KernStateHeader;
+ );
+ 2: (
+ simpleArray: KernSimpleArrayHeader;
+ );
+ 3: (
+ indexArray: KernIndexArrayHeader;
+ );
+ end;
+
+ { version 0 subtable header }
+ KernVersion0SubtableHeaderPtr = ^KernVersion0SubtableHeader;
+ KernVersion0SubtableHeader = record
+ version: UInt16; { kerning table version number }
+ length: UInt16; { length in bytes (including this header) }
+ stInfo: KernSubtableInfo; { sub-table info }
+ fsHeader: KernFormatSpecificHeader; { format specific sub-header }
+ end;
+
+ { Overall Subtable header format }
+ KernSubtableHeaderPtr = ^KernSubtableHeader;
+ KernSubtableHeader = record
+ length: SInt32; { length in bytes (including this header) }
+ stInfo: KernSubtableInfo; { subtable info }
+ tupleIndex: SInt16; { tuple index for variation subtables }
+ fsHeader: KernFormatSpecificHeader; { format specific sub-header }
+ end;
+
+ { --------------------------------------------------------------------------- }
+ { FORMATS FOR TABLE: 'bsln' }
+ { CONSTANTS }
+
+const
+ kBSLNTag = $62736C6E; { 'bsln' }
+ kBSLNCurrentVersion = $00010000; { current version number for 'bsln' table }
+ kBSLNDistanceFormatNoMap = 0;
+ kBSLNDistanceFormatWithMap = 1;
+ kBSLNControlPointFormatNoMap = 2;
+ kBSLNControlPointFormatWithMap = 3;
+
+ { Baseline classes and constants }
+ kBSLNRomanBaseline = 0;
+ kBSLNIdeographicCenterBaseline = 1;
+ kBSLNIdeographicLowBaseline = 2;
+ kBSLNHangingBaseline = 3;
+ kBSLNMathBaseline = 4;
+ kBSLNLastBaseline = 31;
+ kBSLNNumBaselineClasses = 32;
+ kBSLNNoBaselineOverride = 255;
+
+ { TYPES }
+
+type
+ BslnBaselineClass = UInt32;
+ { The BslnBaselineRecord array defines the baseline deltas for the line. }
+ BslnBaselineRecord = array [0..31] of Fixed;
+ {
+ BslnFormat0Part is the format-specific data for a distance table with no mapping (i.e.
+ all the glyphs belong to the defaultBaseline).
+ }
+ BslnFormat0PartPtr = ^BslnFormat0Part;
+ BslnFormat0Part = record
+ deltas: array [0..31] of SInt16;
+ end;
+
+ { BslnFormat1Part is the format-specific data for a distance table with a gxMapping. }
+ BslnFormat1PartPtr = ^BslnFormat1Part;
+ BslnFormat1Part = record
+ deltas: array [0..31] of SInt16;
+ mappingData: SFNTLookupTable;
+ end;
+
+ {
+ BslnFormat2Part is the format-specific data for a control-point table with no
+ mapping (i.e. all the glyphs belong to the defaultBaseline). It specifies a single
+ glyph to use and the set of control points in that glyph that designate each of
+ the baselines.
+ }
+ BslnFormat2PartPtr = ^BslnFormat2Part;
+ BslnFormat2Part = record
+ stdGlyph: UInt16;
+ ctlPoints: array [0..31] of SInt16;
+ end;
+
+ {
+ BslnFormat3Part is the format-specific data for a distance table with a mapping. Like
+ format 2, it contains a single glyph and its set of control-point values for each
+ of the baselines.
+ }
+ BslnFormat3PartPtr = ^BslnFormat3Part;
+ BslnFormat3Part = record
+ stdGlyph: UInt16;
+ ctlPoints: array [0..31] of SInt16;
+ mappingData: SFNTLookupTable;
+ end;
+
+ { The BslnFormatUnion is a union containing the format-specific parts of the baseline table. }
+ BslnFormatUnionPtr = ^BslnFormatUnion;
+ BslnFormatUnion = record
+ case SInt16 of
+ 0: (
+ fmt0Part: BslnFormat0Part;
+ );
+ 1: (
+ fmt1Part: BslnFormat1Part;
+ );
+ 2: (
+ fmt2Part: BslnFormat2Part;
+ );
+ 3: (
+ fmt3Part: BslnFormat3Part;
+ );
+ end;
+
+ { The table format used in BaselineTable }
+ BslnTableFormat = UInt16;
+ { BaselineTable defines the top-level format of the baseline table in the font. }
+ BslnTablePtr = ^BslnTable;
+ BslnTable = record
+ version: Fixed;
+ format: BslnTableFormat;
+ defaultBaseline: UInt16;
+ parts: BslnFormatUnion;
+ end;
+
+ { --------------------------------------------------------------------------- }
+{$ALIGN MAC68K}
+
+
+{unit SFNTTypes}
+{
+ File: SFNTTypes.p
+
+ Contains: Font file structures.
+
+ Version: Technology: Mac OS 9 / Carbon
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1994-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+ sfntDirectoryEntryPtr = ^sfntDirectoryEntry;
+ sfntDirectoryEntry = record
+ tableTag: FourCharCode;
+ checkSum: UInt32;
+ offset: UInt32;
+ length: UInt32;
+ end;
+
+ { The search fields limits numOffsets to 4096. }
+ sfntDirectoryPtr = ^sfntDirectory;
+ sfntDirectory = record
+ format: FourCharCode;
+ numOffsets: UInt16; { number of tables }
+ searchRange: UInt16; { (max2 <= numOffsets)*16 }
+ entrySelector: UInt16; { log2(max2 <= numOffsets) }
+ rangeShift: UInt16; { numOffsets*16-searchRange }
+ table: array [0..0] of sfntDirectoryEntry; { table[numOffsets] }
+ end;
+
+
+const
+ sizeof_sfntDirectory = 12;
+
+ { Cmap - character id to glyph id mapping }
+ cmapFontTableTag = $636D6170 (* 'cmap' *);
+
+ kFontUnicodePlatform = 0;
+ kFontMacintoshPlatform = 1;
+ kFontReservedPlatform = 2;
+ kFontMicrosoftPlatform = 3;
+ kFontCustomPlatform = 4;
+
+ kFontUnicodeDefaultSemantics = 0;
+ kFontUnicodeV1_1Semantics = 1;
+ kFontISO10646_1993Semantics = 2;
+
+ kFontRomanScript = 0;
+ kFontJapaneseScript = 1;
+ kFontTraditionalChineseScript = 2;
+ kFontChineseScript = 2;
+ kFontKoreanScript = 3;
+ kFontArabicScript = 4;
+ kFontHebrewScript = 5;
+ kFontGreekScript = 6;
+ kFontCyrillicScript = 7;
+ kFontRussian = 7;
+ kFontRSymbolScript = 8;
+ kFontDevanagariScript = 9;
+ kFontGurmukhiScript = 10;
+ kFontGujaratiScript = 11;
+ kFontOriyaScript = 12;
+ kFontBengaliScript = 13;
+ kFontTamilScript = 14;
+ kFontTeluguScript = 15;
+ kFontKannadaScript = 16;
+ kFontMalayalamScript = 17;
+ kFontSinhaleseScript = 18;
+ kFontBurmeseScript = 19;
+ kFontKhmerScript = 20;
+ kFontThaiScript = 21;
+ kFontLaotianScript = 22;
+ kFontGeorgianScript = 23;
+ kFontArmenianScript = 24;
+ kFontSimpleChineseScript = 25;
+ kFontTibetanScript = 26;
+ kFontMongolianScript = 27;
+ kFontGeezScript = 28;
+ kFontEthiopicScript = 28;
+ kFontAmharicScript = 28;
+ kFontSlavicScript = 29;
+ kFontEastEuropeanRomanScript = 29;
+ kFontVietnameseScript = 30;
+ kFontExtendedArabicScript = 31;
+ kFontSindhiScript = 31;
+ kFontUninterpretedScript = 32;
+
+ kFontMicrosoftSymbolScript = 0;
+ kFontMicrosoftStandardScript = 1;
+ kFontMicrosoftUCS4Script = 10;
+
+
+ kFontCustom8BitScript = 0;
+ kFontCustom816BitScript = 1;
+ kFontCustom16BitScript = 2;
+
+ { Language codes are zero based everywhere but within a 'cmap' table }
+ kFontEnglishLanguage = 0;
+ kFontFrenchLanguage = 1;
+ kFontGermanLanguage = 2;
+ kFontItalianLanguage = 3;
+ kFontDutchLanguage = 4;
+ kFontSwedishLanguage = 5;
+ kFontSpanishLanguage = 6;
+ kFontDanishLanguage = 7;
+ kFontPortugueseLanguage = 8;
+ kFontNorwegianLanguage = 9;
+ kFontHebrewLanguage = 10;
+ kFontJapaneseLanguage = 11;
+ kFontArabicLanguage = 12;
+ kFontFinnishLanguage = 13;
+ kFontGreekLanguage = 14;
+ kFontIcelandicLanguage = 15;
+ kFontMalteseLanguage = 16;
+ kFontTurkishLanguage = 17;
+ kFontCroatianLanguage = 18;
+ kFontTradChineseLanguage = 19;
+ kFontUrduLanguage = 20;
+ kFontHindiLanguage = 21;
+ kFontThaiLanguage = 22;
+ kFontKoreanLanguage = 23;
+ kFontLithuanianLanguage = 24;
+ kFontPolishLanguage = 25;
+ kFontHungarianLanguage = 26;
+ kFontEstonianLanguage = 27;
+ kFontLettishLanguage = 28;
+ kFontLatvianLanguage = 28;
+ kFontSaamiskLanguage = 29;
+ kFontLappishLanguage = 29;
+ kFontFaeroeseLanguage = 30;
+ kFontFarsiLanguage = 31;
+ kFontPersianLanguage = 31;
+ kFontRussianLanguage = 32;
+ kFontSimpChineseLanguage = 33;
+ kFontFlemishLanguage = 34;
+ kFontIrishLanguage = 35;
+ kFontAlbanianLanguage = 36;
+ kFontRomanianLanguage = 37;
+ kFontCzechLanguage = 38;
+ kFontSlovakLanguage = 39;
+ kFontSlovenianLanguage = 40;
+ kFontYiddishLanguage = 41;
+ kFontSerbianLanguage = 42;
+ kFontMacedonianLanguage = 43;
+ kFontBulgarianLanguage = 44;
+ kFontUkrainianLanguage = 45;
+ kFontByelorussianLanguage = 46;
+ kFontUzbekLanguage = 47;
+ kFontKazakhLanguage = 48;
+ kFontAzerbaijaniLanguage = 49;
+ kFontAzerbaijanArLanguage = 50;
+ kFontArmenianLanguage = 51;
+ kFontGeorgianLanguage = 52;
+ kFontMoldavianLanguage = 53;
+ kFontKirghizLanguage = 54;
+ kFontTajikiLanguage = 55;
+ kFontTurkmenLanguage = 56;
+ kFontMongolianLanguage = 57;
+ kFontMongolianCyrLanguage = 58;
+ kFontPashtoLanguage = 59;
+ kFontKurdishLanguage = 60;
+ kFontKashmiriLanguage = 61;
+ kFontSindhiLanguage = 62;
+ kFontTibetanLanguage = 63;
+ kFontNepaliLanguage = 64;
+ kFontSanskritLanguage = 65;
+ kFontMarathiLanguage = 66;
+ kFontBengaliLanguage = 67;
+ kFontAssameseLanguage = 68;
+ kFontGujaratiLanguage = 69;
+ kFontPunjabiLanguage = 70;
+ kFontOriyaLanguage = 71;
+ kFontMalayalamLanguage = 72;
+ kFontKannadaLanguage = 73;
+ kFontTamilLanguage = 74;
+ kFontTeluguLanguage = 75;
+ kFontSinhaleseLanguage = 76;
+ kFontBurmeseLanguage = 77;
+ kFontKhmerLanguage = 78;
+ kFontLaoLanguage = 79;
+ kFontVietnameseLanguage = 80;
+ kFontIndonesianLanguage = 81;
+ kFontTagalogLanguage = 82;
+ kFontMalayRomanLanguage = 83;
+ kFontMalayArabicLanguage = 84;
+ kFontAmharicLanguage = 85;
+ kFontTigrinyaLanguage = 86;
+ kFontGallaLanguage = 87;
+ kFontOromoLanguage = 87;
+ kFontSomaliLanguage = 88;
+ kFontSwahiliLanguage = 89;
+ kFontRuandaLanguage = 90;
+ kFontRundiLanguage = 91;
+ kFontChewaLanguage = 92;
+ kFontMalagasyLanguage = 93;
+ kFontEsperantoLanguage = 94;
+ kFontWelshLanguage = 128;
+ kFontBasqueLanguage = 129;
+ kFontCatalanLanguage = 130;
+ kFontLatinLanguage = 131;
+ kFontQuechuaLanguage = 132;
+ kFontGuaraniLanguage = 133;
+ kFontAymaraLanguage = 134;
+ kFontTatarLanguage = 135;
+ kFontUighurLanguage = 136;
+ kFontDzongkhaLanguage = 137;
+ kFontJavaneseRomLanguage = 138;
+ kFontSundaneseRomLanguage = 139;
+
+ { The following are special "don't care" values to be used in interfaces }
+ kFontNoPlatform = $FFFFFFFF;
+ kFontNoScript = $FFFFFFFF;
+ kFontNoLanguage = $FFFFFFFF;
+
+
+type
+ sfntCMapSubHeaderPtr = ^sfntCMapSubHeader;
+ sfntCMapSubHeader = record
+ format: UInt16;
+ length: UInt16;
+ languageID: UInt16; { base-1 }
+ end;
+
+
+const
+ sizeof_sfntCMapSubHeader = 6;
+
+
+type
+ sfntCMapEncodingPtr = ^sfntCMapEncoding;
+ sfntCMapEncoding = record
+ platformID: UInt16; { base-0 }
+ scriptID: UInt16; { base-0 }
+ offset: UInt32;
+ end;
+
+
+const
+ sizeof_sfntCMapEncoding = 8;
+
+
+type
+ sfntCMapHeaderPtr = ^sfntCMapHeader;
+ sfntCMapHeader = record
+ version: UInt16;
+ numTables: UInt16;
+ encoding: array [0..0] of sfntCMapEncoding;
+ end;
+
+
+const
+ sizeof_sfntCMapHeader = 4;
+
+ { Name table }
+ nameFontTableTag = $6E616D65 (* 'name' *);
+
+ kFontCopyrightName = 0;
+ kFontFamilyName = 1;
+ kFontStyleName = 2;
+ kFontUniqueName = 3;
+ kFontFullName = 4;
+ kFontVersionName = 5;
+ kFontPostscriptName = 6;
+ kFontTrademarkName = 7;
+ kFontManufacturerName = 8;
+ kFontDesignerName = 9;
+ kFontDescriptionName = 10;
+ kFontVendorURLName = 11;
+ kFontDesignerURLName = 12;
+ kFontLicenseDescriptionName = 13;
+ kFontLicenseInfoURLName = 14;
+ kFontLastReservedName = 255;
+
+ { The following is a special "don't care" value to be used in interfaces }
+ kFontNoName = $FFFFFFFF;
+
+
+type
+ sfntNameRecordPtr = ^sfntNameRecord;
+ sfntNameRecord = record
+ platformID: UInt16; { base-0 }
+ scriptID: UInt16; { base-0 }
+ languageID: UInt16; { base-0 }
+ nameID: UInt16; { base-0 }
+ length: UInt16;
+ offset: UInt16;
+ end;
+
+
+const
+ sizeof_sfntNameRecord = 12;
+
+
+type
+ sfntNameHeaderPtr = ^sfntNameHeader;
+ sfntNameHeader = record
+ format: UInt16;
+ count: UInt16;
+ stringOffset: UInt16;
+ rec: array [0..0] of sfntNameRecord;
+ end;
+
+
+const
+ sizeof_sfntNameHeader = 6;
+
+ { Fvar table - font variations }
+ variationFontTableTag = $66766172 (* 'fvar' *);
+
+ { These define each font variation }
+
+type
+ sfntVariationAxisPtr = ^sfntVariationAxis;
+ sfntVariationAxis = record
+ axisTag: FourCharCode;
+ minValue: Fixed;
+ defaultValue: Fixed;
+ maxValue: Fixed;
+ flags: SInt16;
+ nameID: SInt16;
+ end;
+
+
+const
+ sizeof_sfntVariationAxis = 20;
+
+ { These are named locations in style-space for the user }
+
+type
+ sfntInstancePtr = ^sfntInstance;
+ sfntInstance = record
+ nameID: SInt16;
+ flags: SInt16;
+ coord: array [0..0] of Fixed; { [axisCount] }
+ { room to grow since the header carries a tupleSize field }
+ end;
+
+
+const
+ sizeof_sfntInstance = 4;
+
+
+type
+ sfntVariationHeaderPtr = ^sfntVariationHeader;
+ sfntVariationHeader = record
+ version: Fixed; { 1.0 Fixed }
+ offsetToData: UInt16; { to first axis = 16 }
+ countSizePairs: UInt16; { axis+inst = 2 }
+ axisCount: UInt16;
+ axisSize: UInt16;
+ instanceCount: UInt16;
+ instanceSize: UInt16;
+ { Éother <count,size> pairs }
+ axis: array [0..0] of sfntVariationAxis; { [axisCount] }
+ instance: array [0..0] of sfntInstance; { [instanceCount] Éother arrays of data }
+ end;
+
+
+const
+ sizeof_sfntVariationHeader = 16;
+
+ { Fdsc table - font descriptor }
+ descriptorFontTableTag = $66647363 (* 'fdsc' *);
+
+
+type
+ sfntFontDescriptorPtr = ^sfntFontDescriptor;
+ sfntFontDescriptor = record
+ name: FourCharCode;
+ value: Fixed;
+ end;
+
+ sfntDescriptorHeaderPtr = ^sfntDescriptorHeader;
+ sfntDescriptorHeader = record
+ version: Fixed; { 1.0 in Fixed }
+ descriptorCount: SInt32;
+ descriptor: array [0..0] of sfntFontDescriptor;
+ end;
+
+
+const
+ sizeof_sfntDescriptorHeader = 8;
+
+ { Feat Table - layout feature table }
+ featureFontTableTag = $66656174 (* 'feat' *);
+
+
+type
+ sfntFeatureNamePtr = ^sfntFeatureName;
+ sfntFeatureName = record
+ featureType: UInt16;
+ settingCount: UInt16;
+ offsetToSettings: SInt32;
+ featureFlags: UInt16;
+ nameID: UInt16;
+ end;
+
+ sfntFontFeatureSettingPtr = ^sfntFontFeatureSetting;
+ sfntFontFeatureSetting = record
+ setting: UInt16;
+ nameID: UInt16;
+ end;
+
+ sfntFontRunFeaturePtr = ^sfntFontRunFeature;
+ sfntFontRunFeature = record
+ featureType: UInt16;
+ setting: UInt16;
+ end;
+
+ sfntFeatureHeaderPtr = ^sfntFeatureHeader;
+ sfntFeatureHeader = record
+ version: SInt32; { 1.0 }
+ featureNameCount: UInt16;
+ featureSetCount: UInt16;
+ reserved: SInt32; { set to 0 }
+ names: array [0..0] of sfntFeatureName;
+ settings: array [0..0] of sfntFontFeatureSetting;
+ runs: array [0..0] of sfntFontRunFeature;
+ end;
+
+ { OS/2 Table }
+
+const
+ os2FontTableTag = $4F532F32 (* 'OS/2' *);
+
+ { Special invalid glyph ID value, useful as a sentinel value, for example }
+ nonGlyphID = 65535;
+
+ { Data type used to access names from font name table }
+
+type
+ FontNameCode = UInt32;
+ FontNameCodePtr = ^FontNameCode; { when a VAR xx: FontNameCode parameter can be nil, it is changed to xx: FontNameCodePtr }
+ { Data types for encoding components as used in interfaces }
+ FontPlatformCode = UInt32;
+ FontPlatformCodePtr = ^FontPlatformCode; { when a VAR xx: FontPlatformCode parameter can be nil, it is changed to xx: FontPlatformCodePtr }
+ FontScriptCode = UInt32;
+ FontScriptCodePtr = ^FontScriptCode; { when a VAR xx: FontScriptCode parameter can be nil, it is changed to xx: FontScriptCodePtr }
+ FontLanguageCode = UInt32;
+ FontLanguageCodePtr = ^FontLanguageCode; { when a VAR xx: FontLanguageCode parameter can be nil, it is changed to xx: FontLanguageCodePtr }
+ {
+ ** FontVariation is used to specify a coordinate along a variation axis. The name
+ ** identifies the axes to be applied, and value is the setting to be used.
+ }
+ FontVariationPtr = ^FontVariation;
+ FontVariation = record
+ name: FourCharCode;
+ value: Fixed;
+ end;
+
+{$ALIGN MAC68K}
+
+
+{unit fenv}
+{
+ * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License"). You may not use this file except in compliance with the
+ * License. Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{******************************************************************************
+* *
+* File: fenv.h *
+* *
+* Contains: typedefs and prototypes for C99 floating point environment. *
+* *
+******************************************************************************}
+
+
+{
+ A collection of functions designed to provide access to the floating
+ point environment for numerical programming. It is modeled after
+ the floating-point requirements in C9X.
+
+ The file <fenv.h> declares many functions in support of numerical
+ programming. Programs that test flags or run under
+ non-default modes must do so under the effect of an enabling
+ "fenv_access" pragma.
+}
+
+{*******************************************************************************
+* *
+* fenv_t is a type for representing the entire floating-point *
+* environment in a single object. *
+* *
+* fexcept_t is a type for representing the floating-point *
+* exception flag state collectively. *
+* *
+*******************************************************************************}
+{$ifc TARGET_CPU_PPC}
+type
+ fenv_t = UInt32;
+ fexcept_t = UInt32;
+{$elsec}
+type
+ fenv_t = record
+ __control: UInt16;
+ __status: UInt16;
+ end;
+ fexcept_t = UInt16;
+{$endc}
+
+{ Definitions of floating-point exception macros }
+{$ifc TARGET_CPU_PPC}
+const
+ _FE_INEXACT = $02000000;
+ _FE_DIVBYZERO = $04000000;
+ _FE_UNDERFLOW = $08000000;
+ _FE_OVERFLOW = $10000000;
+ _FE_INVALID = $20000000;
+ _FE_ALL_EXCEPT = $3E000000; // FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID
+{$elsec}
+const
+ _FE_INEXACT = $0020;
+ _FE_DIVBYZERO = $0004;
+ _FE_UNDERFLOW = $0010;
+ _FE_OVERFLOW = $0008;
+ _FE_INVALID = $0001;
+ _FE_ALL_EXCEPT = $003D; // FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID
+{$endc}
+const
+ FE_INEXACT = _FE_INEXACT;
+ FE_DIVBYZERO = _FE_DIVBYZERO;
+ FE_UNDERFLOW = _FE_UNDERFLOW;
+ FE_OVERFLOW = _FE_OVERFLOW;
+ FE_INVALID = _FE_INVALID;
+ FE_ALL_EXCEPT = _FE_ALL_EXCEPT;
+
+{ Definitions of rounding direction macros }
+{$ifc TARGET_CPU_PPC}
+const
+ _FE_TONEAREST = $00000000;
+ _FE_TOWARDZERO = $00000001;
+ _FE_UPWARD = $00000002;
+ _FE_DOWNWARD = $00000003;
+{$elsec}
+const
+ _FE_TONEAREST = $0000;
+ _FE_TOWARDZERO = $0C00;
+ _FE_UPWARD = $0800;
+ _FE_DOWNWARD = $0400;
+{$endc}
+const
+ FE_TONEAREST = _FE_TONEAREST;
+ FE_TOWARDZERO = _FE_TOWARDZERO;
+ FE_UPWARD = _FE_UPWARD;
+ FE_DOWNWARD = _FE_DOWNWARD;
+
+{ default environment object }
+var _FE_DFL_ENV: fenv_t; external name '__FE_DFL_ENV'; (* attribute const *)
+// #define FE_DFL_ENV &_FE_DFL_ENV { pointer to default environment }
+
+{******************************************************************************
+* The following functions provide access to the exception flags. The *
+* "int" input argument can be constructed by bitwise ORs of the exception *
+* macros: for example: FE_OVERFLOW | FE_INEXACT. *
+******************************************************************************}
+
+{******************************************************************************
+* The function "feclearexcept" clears the supported exceptions represented *
+* by its argument. *
+******************************************************************************}
+
+function feclearexcept( excepts: SInt32 ): SInt32; external name '_feclearexcept';
+
+
+{******************************************************************************
+* The function "fegetexceptflag" stores a representation of the exception *
+* flags indicated by its integer argument through the fexcept_t pointer *
+* argument. *
+******************************************************************************}
+
+function fegetexceptflag( var flagp: fexcept_t; excepts: SInt32 ): SInt32; external name '_fegetexceptflag';
+
+
+{******************************************************************************
+* The function "feraiseexcept" raises the supported exceptions *
+* represented by its argument. *
+******************************************************************************}
+
+function feraiseexcept( excepts: SInt32 ): SInt32; external name '_feraiseexcept';
+
+
+{******************************************************************************
+* The function "fesetexceptflag" sets or clears the exception flags indicated *
+* by the its integer argument according to the representation in the *
+* object pointed to by the fexcept_t pointer argument. The value of the *
+* object must have been set by a previous call to "fegetexceptflag". *
+* This function does not raise exceptions; it just sets the state of *
+* the flags. *
+******************************************************************************}
+
+function fesetexceptflag( (*const*) var flagp: fexcept_t; excepts: SInt32 ): SInt32; external name '_fesetexceptflag';
+
+
+{******************************************************************************
+* The function "fetestexcept" determines which of the specified subset of *
+* the exception flags are currently set. The integer argument specifies *
+* the exception flags to be queried as a bitwise OR of the exception *
+* macros. This function returns the bitwise OR of the exception macros *
+* corresponding to the currently set exceptions included in "excepts". *
+******************************************************************************}
+
+function fetestexcept( excepts: SInt32 ): SInt32; external name '_fetestexcept';
+
+
+{******************************************************************************
+* The following functions provide control of rounding direction modes. *
+******************************************************************************}
+
+{******************************************************************************
+* The function "fegetround" returns the value of the rounding direction *
+* macro which represents the current rounding direction. *
+******************************************************************************}
+
+function fegetround: SInt32; external name '_fegetround';
+
+
+{******************************************************************************
+* The function "fesetround" establishes the rounding direction represented *
+* by its argument. It returns zero if and only if the argument matches *
+* a rounding direction macro. If not, the rounding direction is not *
+* changed. *
+******************************************************************************}
+
+function fesetround( round: SInt32 ): SInt32; external name '_fesetround';
+
+
+{******************************************************************************
+* The following functions manage the floating-point environment, exception *
+* flags and dynamic modes, as one entity. *
+******************************************************************************}
+
+function fegetenv( var envp: fenv_t ): SInt32; external name '_fegetenv';
+function feholdexcept( var envp: fenv_t ): SInt32; external name '_feholdexcept';
+function fesetenv( (*const*) var envp: fenv_t ): SInt32; external name '_fesetenv';
+function feupdateenv( (*const*) var envp: fenv_t ): SInt32; external name '_feupdateenv';
+
+
+{unit fp}
+{
+ File: fp.p
+
+ Contains: FPCE Floating-Point Definitions and Declarations.
+
+ Version: Technology: MathLib v2
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1987-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{*******************************************************************************
+* *
+* A collection of numerical functions designed to facilitate a wide *
+* range of numerical programming as required by C9X. *
+* *
+* The <fp.h> declares many functions in support of numerical programming. *
+* It provides a superset of <math.h> and <SANE.h> functions. Some *
+* functionality previously found in <SANE.h> and not in the FPCE <fp.h> *
+* can be found in this <fp.h> under the heading "__NOEXTENSIONS__". *
+* *
+* All of these functions are IEEE 754 aware and treat exceptions, NaNs, *
+* positive and negative zero and infinity consistent with the floating- *
+* point standard. *
+* *
+*******************************************************************************}
+
+
+{$ALIGN MAC68K}
+
+{*******************************************************************************
+* *
+* Efficient types *
+* *
+* float_t Most efficient type at least as wide as float *
+* double_t Most efficient type at least as wide as double *
+* *
+* CPU float_t(bits) double_t(bits) *
+* -------- ----------------- ----------------- *
+* PowerPC float(32) double(64) *
+* 68K long double(80/96) long double(80/96) *
+* x86 double(64) double(64) *
+* *
+*******************************************************************************}
+{$ifc TARGET_CPU_PPC}
+
+type
+ float_t = Float32;
+ double_t = Float64;
+{$elsec}
+ {$ifc TARGET_CPU_68K}
+type
+ float_t = extended;
+ double_t = extended;
+ {$elsec}
+ {$ifc TARGET_CPU_X86}
+
+type
+ float_t = Float64;
+ double_t = Float64;
+ {$elsec}
+ {$ifc TARGET_CPU_MIPS}
+
+type
+ float_t = Double;
+ double_t = Double;
+ {$elsec}
+ {$ifc TARGET_CPU_ALPHA}
+
+type
+ float_t = Double;
+ double_t = Double;
+ {$elsec}
+ {$ifc TARGET_CPU_SPARC}
+
+type
+ float_t = Double;
+ double_t = Double;
+ {$elsec}
+{ Unsupported CPU }
+ {$endc}
+ {$endc}
+ {$endc}
+ {$endc}
+ {$endc}
+{$endc}
+
+{*******************************************************************************
+* *
+* Define some constants. *
+* *
+* HUGE_VAL IEEE 754 value of infinity. *
+* INFINITY IEEE 754 value of infinity. *
+* NAN A generic NaN (Not A Number). *
+* DECIMAL_DIG Satisfies the constraint that the conversion from *
+* double to decimal and back is the identity function. *
+* *
+*******************************************************************************}
+const
+{$ifc TARGET_CPU_PPC}
+ DECIMAL_DIG = 17;
+{$elsec}
+ DECIMAL_DIG = 21;
+{$endc}
+{$ifc TARGET_OS_MAC}
+{*******************************************************************************
+* *
+* Trigonometric functions *
+* *
+* acos result is in [0,pi]. *
+* asin result is in [-pi/2,pi/2]. *
+* atan result is in [-pi/2,pi/2]. *
+* atan2 Computes the arc tangent of y/x in [-pi,pi] using the sign of *
+* both arguments to determine the quadrant of the computed value. *
+* *
+*******************************************************************************}
+{
+ * cos()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function cos(x: double_t): double_t; external name '_cos';
+
+{
+ * sin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function sin(x: double_t): double_t; external name '_sin';
+
+{
+ * tan()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function tan(x: double_t): double_t; external name '_tan';
+
+{
+ * acos()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function acos(x: double_t): double_t; external name '_acos';
+
+{
+ * asin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function asin(x: double_t): double_t; external name '_asin';
+
+{
+ * atan()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function atan(x: double_t): double_t; external name '_atan';
+
+{
+ * atan2()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function atan2(y: double_t; x: double_t): double_t; external name '_atan2';
+
+
+{*******************************************************************************
+* *
+* Hyperbolic functions *
+* *
+*******************************************************************************}
+{
+ * cosh()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function cosh(x: double_t): double_t; external name '_cosh';
+
+{
+ * sinh()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function sinh(x: double_t): double_t; external name '_sinh';
+
+{
+ * tanh()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function tanh(x: double_t): double_t; external name '_tanh';
+
+{
+ * acosh()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function acosh(x: double_t): double_t; external name '_acosh';
+
+{
+ * asinh()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function asinh(x: double_t): double_t; external name '_asinh';
+
+{
+ * atanh()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function atanh(x: double_t): double_t; external name '_atanh';
+
+
+{*******************************************************************************
+* *
+* Exponential functions *
+* *
+* expm1 expm1(x) = exp(x) - 1. But, for small enough arguments, *
+* expm1(x) is expected to be more accurate than exp(x) - 1. *
+* frexp Breaks a floating-point number into a normalized fraction *
+* and an integral power of 2. It stores the SInt16 in the *
+* object pointed by *exponent. *
+* ldexp Multiplies a floating-point number by an SInt16 power of 2. *
+* log1p log1p = log(1 + x). But, for small enough arguments, *
+* log1p is expected to be more accurate than log(1 + x). *
+* logb Extracts the exponent of its argument, as a signed integral *
+* value. A subnormal argument is treated as though it were first *
+* normalized. Thus: *
+* 1 <= x * 2^(-logb(x)) < 2 *
+* modf Returns fractional part of x as function result and returns *
+* integral part of x via iptr. Note C9X uses double not double_t. *
+* scalb Computes x * 2^n efficently. This is not normally done by *
+* computing 2^n explicitly. *
+* *
+*******************************************************************************}
+{
+ * exp()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function exp(x: double_t): double_t; external name '_exp';
+
+{
+ * expm1()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function expm1(x: double_t): double_t; external name '_expm1';
+
+{
+ * exp2()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function exp2(x: double_t): double_t; external name '_exp2';
+
+{
+ * frexp()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function frexp(x: double_t; var exponent: SInt32): double_t; external name '_frexp';
+
+{
+ * ldexp()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ldexp(x: double_t; n: SInt32): double_t; external name '_ldexp';
+
+{
+ * log()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function log(x: double_t): double_t; external name '_log';
+
+{
+ * log2()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function log2(x: double_t): double_t; external name '_log2';
+
+{
+ * log1p()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function log1p(x: double_t): double_t; external name '_log1p';
+
+{
+ * log10()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function log10(x: double_t): double_t; external name '_log10';
+
+{
+ * logb()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function logb(x: double_t): double_t; external name '_logb';
+
+{
+ * modf()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function modf(x: double_t; var iptr: double_t): double_t; external name '_modf';
+
+{
+ * modff()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function modff(x: Single; var iptrf: Single): Single; external name '_modff';
+
+
+{
+ Note: For compatiblity scalb(x,n) has n of type
+ int on Mac OS X
+ long on Mac OS
+}
+
+type
+ _scalb_n_type = SInt32;
+ {
+ * scalb()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function scalb(x: double_t; n: _scalb_n_type): double_t; external name '_scalb';
+
+
+{*******************************************************************************
+* *
+* Power and absolute value functions *
+* *
+* hypot Computes the square root of the sum of the squares of its *
+* arguments, without undue overflow or underflow. *
+* pow Returns x raised to the power of y. Result is more accurate *
+* than using exp(log(x)*y). *
+* *
+*******************************************************************************}
+{
+ * fabs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function fabs(x: double_t): double_t; external name '_fabs';
+
+{
+ * hypot()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function hypot(x: double_t; y: double_t): double_t; external name '_hypot';
+
+{
+ * pow()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function pow(x: double_t; y: double_t): double_t; external name '_pow';
+
+{
+ * sqrt()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function sqrt(x: double_t): double_t; external name '_sqrt';
+
+
+{*******************************************************************************
+* *
+* Gamma and Error functions *
+* *
+* erf The error function. *
+* erfc Complementary error function. *
+* gamma The gamma function. *
+* lgamma Computes the base-e logarithm of the absolute value of *
+* gamma of its argument x, for x > 0. *
+* *
+*******************************************************************************}
+{
+ * erf()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function erf(x: double_t): double_t; external name '_erf';
+
+{
+ * erfc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function erfc(x: double_t): double_t; external name '_erfc';
+
+{
+ * gamma()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function gamma(x: double_t): double_t; external name '_gamma';
+
+{
+ * lgamma()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function lgamma(x: double_t): double_t; external name '_lgamma';
+
+
+{*******************************************************************************
+* *
+* Nearest SInt16 functions *
+* *
+* rint Rounds its argument to an integral value in floating point *
+* format, honoring the current rounding direction. *
+* *
+* nearbyint Differs from rint only in that it does not raise the inexact *
+* exception. It is the nearbyint function recommended by the *
+* IEEE floating-point standard 854. *
+* *
+* rinttol Rounds its argument to the nearest long int using the current *
+* rounding direction. NOTE: if the rounded value is outside *
+* the range of long int, then the result is undefined. *
+* *
+* round Rounds the argument to the nearest integral value in floating *
+* point format similar to the Fortran "anint" function. That is: *
+* add half to the magnitude and chop. *
+* *
+* roundtol Similar to the Fortran function nint or to the Pascal round. *
+* NOTE: if the rounded value is outside the range of long int, *
+* then the result is undefined. *
+* *
+* trunc Computes the integral value, in floating format, nearest to *
+* but no larger in magnitude than its argument. NOTE: on 68K *
+* compilers when using -elems881, trunc must return an int *
+* *
+*******************************************************************************}
+{
+ * ceil()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ceil(x: double_t): double_t; external name '_ceil';
+
+{
+ * floor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function floor(x: double_t): double_t; external name '_floor';
+
+{
+ * rint()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function rint(x: double_t): double_t; external name '_rint';
+
+{
+ * nearbyint()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function nearbyint(x: double_t): double_t; external name '_nearbyint';
+
+{
+ * rinttol()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function rinttol(x: double_t): SInt32; external name '_rinttol';
+
+{
+ * round()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function roundd(x: double_t): double_t; external name '_round';
+
+{
+ * roundtol()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function roundtol(round: double_t): SInt32; external name '_roundtol';
+
+{
+ Note: For compatiblity trunc(x) has a return type of
+ int for classic 68K with FPU enabled
+ double_t everywhere else
+}
+{$ifc TARGET_RT_MAC_68881}
+
+type
+ _trunc_return_type = SInt32;
+{$elsec}
+
+type
+ _trunc_return_type = double_t;
+{$endc} {TARGET_RT_MAC_68881}
+ {
+ * trunc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function truncd(x: double_t): _trunc_return_type; external name '_trunc';
+
+
+{*******************************************************************************
+* *
+* Remainder functions *
+* *
+* remainder IEEE 754 floating point standard for remainder. *
+* remquo SANE remainder. It stores into 'quotient' the 7 low-order *
+* bits of the SInt16 quotient x/y, such that: *
+* -127 <= quotient <= 127. *
+* *
+*******************************************************************************}
+{
+ * fmod()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function fmod(x: double_t; y: double_t): double_t; external name '_fmod';
+
+{
+ * remainder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function remainder(x: double_t; y: double_t): double_t; external name '_remainder';
+
+{
+ * remquo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function remquo(x: double_t; y: double_t; var quo: SInt32): double_t; external name '_remquo';
+
+
+{*******************************************************************************
+* *
+* Auxiliary functions *
+* *
+* copysign Produces a value with the magnitude of its first argument *
+* and sign of its second argument. NOTE: the order of the *
+* arguments matches the recommendation of the IEEE 754 *
+* floating point standard, which is opposite from the SANE *
+* copysign function. *
+* *
+* nan The call 'nan("n-char-sequence")' returns a quiet NaN *
+* with content indicated through tagp in the selected *
+* data type format. *
+* *
+* nextafter Computes the next representable value after 'x' in the *
+* direction of 'y'. if x == y, then y is returned. *
+* *
+*******************************************************************************}
+{
+ * copysign()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function copysign(x: double_t; y: double_t): double_t; external name '_copysign';
+
+{
+ * nan()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function nan(tagp: ConstCStringPtr): Double; external name '_nan';
+
+{
+ * nanf()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function nanf(tagp: ConstCStringPtr): Single; external name '_nanf';
+
+{
+ * nextafterd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function nextafterd(x: Double; y: Double): Double; external name '_nextafterd';
+
+{
+ * nextafterf()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function nextafterf(x: Single; y: Single): Single; external name '_nextafterf';
+
+
+{
+ * __fpclassifyd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function __fpclassifyd(x: Double): SInt32; external name '___fpclassifyd';
+
+{
+ * __fpclassifyf()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function __fpclassifyf(x: Single): SInt32; external name '___fpclassifyf';
+
+{
+ * __isnormald()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function __isnormald(x: Double): SInt32; external name '___isnormald';
+
+{
+ * __isnormalf()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function __isnormalf(x: Single): SInt32; external name '___isnormalf';
+
+{
+ * __isfinited()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function __isfinited(x: Double): SInt32; external name '___isfinited';
+
+{
+ * __isfinitef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function __isfinitef(x: Single): SInt32; external name '___isfinitef';
+
+{
+ * __isnand()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function __isnand(x: Double): SInt32; external name '___isnand';
+
+{
+ * __isnanf()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function __isnanf(x: Single): SInt32; external name '___isnanf';
+
+{
+ * __signbitd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function __signbitd(x: Double): SInt32; external name '___signbitd';
+
+{
+ * __signbitf()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function __signbitf(x: Single): SInt32; external name '___signbitf';
+
+{
+ * __inf()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function __inf: double_t; external name '___inf';
+
+
+{*******************************************************************************
+* *
+* Inquiry macros *
+* *
+* fpclassify Returns one of the FP_Å values. *
+* isnormal Non-zero if and only if the argument x is normalized. *
+* isfinite Non-zero if and only if the argument x is finite. *
+* isnan Non-zero if and only if the argument x is a NaN. *
+* signbit Non-zero if and only if the sign of the argument x is *
+* negative. This includes, NaNs, infinities and zeros. *
+* *
+*******************************************************************************}
+
+const
+ FP_SNAN = 0; { signaling NaN }
+ FP_QNAN = 1; { quiet NaN }
+ FP_INFINITE = 2; { + or - infinity }
+ FP_ZERO = 3; { + or - zero }
+ FP_NORMAL = 4; { all normal numbers }
+ FP_SUBNORMAL = 5; { denormal numbers }
+
+
+ { *******************************************************************************
+ * *
+ * Max, Min and Positive Difference *
+ * *
+ * fdim Determines the 'positive difference' between its arguments: *
+ * ( x - y, if x > y ), ( +0, if x <= y ). If one argument is *
+ * NaN, then fdim returns that NaN. if both arguments are NaNs, *
+ * then fdim returns the first argument. *
+ * *
+ * fmax Returns the maximum of the two arguments. Corresponds to the *
+ * max function in FORTRAN. NaN arguments are treated as missing *
+ * data. If one argument is NaN and the other is a number, then *
+ * the number is returned. If both are NaNs then the first *
+ * argument is returned. *
+ * *
+ * fmin Returns the minimum of the two arguments. Corresponds to the *
+ * min function in FORTRAN. NaN arguments are treated as missing *
+ * data. If one argument is NaN and the other is a number, then *
+ * the number is returned. If both are NaNs then the first *
+ * argument is returned. *
+ * *
+ ******************************************************************************* }
+ {
+ * fdim()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function fdim(x: double_t; y: double_t): double_t; external name '_fdim';
+
+{
+ * fmax()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function fmax(x: double_t; y: double_t): double_t; external name '_fmax';
+
+{
+ * fmin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function fmin(x: double_t; y: double_t): double_t; external name '_fmin';
+
+
+{******************************************************************************
+* Constants *
+******************************************************************************}
+
+{*******************************************************************************
+* *
+* Non NCEG extensions *
+* *
+*******************************************************************************}
+{$ifc undefined __NOEXTENSIONS__}
+{*******************************************************************************
+* *
+* Financial functions *
+* *
+* compound Computes the compound interest factor "(1 + rate)^periods" *
+* more accurately than the straightforward computation with *
+* the Power function. This is SANE's compound function. *
+* *
+* annuity Computes the present value factor for an annuity *
+* "(1 - (1 + rate)^(-periods)) /rate" more accurately than *
+* the straightforward computation with the Power function. *
+* This is SANE's annuity function. *
+* *
+*******************************************************************************}
+{
+ * compound()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function compound(rate: double_t; periods: double_t): double_t; external name '_compound';
+
+{
+ * annuity()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function annuity(rate: double_t; periods: double_t): double_t; external name '_annuity';
+
+
+{*******************************************************************************
+* *
+* Random function *
+* *
+* randomx A pseudorandom number generator. It uses the iteration: *
+* (7^5*x)mod(2^31-1) *
+* *
+*******************************************************************************}
+{
+ * randomx()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function randomx(var x: double_t): double_t; external name '_randomx';
+
+
+{******************************************************************************
+* Relational operator *
+******************************************************************************}
+{ relational operator }
+
+type
+ relop = SInt16;
+
+const
+ GREATERTHAN = 0;
+ LESSTHAN = 1;
+ EQUALTO = 2;
+ UNORDERED = 3;
+
+ {
+ * relation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function relation(x: double_t; y: double_t): relop; external name '_relation';
+
+
+{*******************************************************************************
+* *
+* Binary to decimal conversions *
+* *
+* SIGDIGLEN Significant decimal digits. *
+* *
+* decimal A record which provides an intermediate unpacked form for *
+* programmers who wish to do their own parsing of numeric input *
+* or formatting of numeric output. *
+* *
+* decform Controls each conversion to a decimal string. The style field *
+* is either FLOATDECIMAL or FIXEDDECIMAL. If FLOATDECIMAL, the *
+* value of the field digits is the number of significant digits. *
+* If FIXEDDECIMAL value of the field digits is the number of *
+* digits to the right of the decimal point. *
+* *
+* num2dec Converts a double_t to a decimal record using a decform. *
+* dec2num Converts a decimal record d to a double_t value. *
+* dec2str Converts a decform and decimal to a string using a decform. *
+* str2dec Converts a string to a decimal struct. *
+* dec2d Similar to dec2num except a double is returned (68k only). *
+* dec2f Similar to dec2num except a float is returned. *
+* dec2s Similar to dec2num except a short is returned. *
+* dec2l Similar to dec2num except a long is returned. *
+* *
+*******************************************************************************}
+const
+ SIGDIGLEN = 36;
+ DECSTROUTLEN = 80;
+type
+ DecimalKindItem = (FLOATDECIMAL, FIXEDDECIMAL);
+ DecimalKind = DecimalKindItem;
+
+ decimal = record
+ sgn: 0..1; { sign 0 for +, 1 for - }
+ exp: SInt16;
+ sig: Str36;
+ end;
+
+ decform = record
+ style: DecimalKind;
+ digits: SInt16;
+ end;
+
+{
+ * num2dec()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure num2dec(const (*var*) f: decform; x: double_t; var d: decimal); external name '_num2dec';
+
+{
+ * dec2num()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function dec2num(const (*var*) d: decimal): double_t; external name '_dec2num';
+
+{
+ * dec2str()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure dec2str(const (*var*) f: decform; const (*var*) d: decimal; s: CStringPtr); external name '_dec2str';
+
+{
+ * str2dec()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure str2dec(s: ConstCStringPtr; var ix: SInt16; var d: decimal; var vp: SInt16); external name '_str2dec';
+
+{$ifc TARGET_CPU_68K}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * dec2d()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function dec2d(const (*var*) d: decimal): Double; external name '_dec2d';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {TARGET_CPU_68K}
+{
+ * dec2f()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function dec2f(const (*var*) d: decimal): Single; external name '_dec2f';
+
+{
+ * dec2s()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function dec2s(const (*var*) d: decimal): SInt16; external name '_dec2s';
+
+{
+ * dec2l()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function dec2l(const (*var*) d: decimal): SInt32; external name '_dec2l';
+
+
+{*******************************************************************************
+* *
+* 68k-only Transfer Function Prototypes *
+* *
+*******************************************************************************}
+{$ifc TARGET_CPU_68K}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * x96tox80()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure x96tox80(const (*var*) x: extended96; var x80: extended80); external name '_x96tox80';
+
+{
+ * x80tox96()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure x80tox96(const (*var*) x80: extended80; var x: extended96); external name '_x80tox96';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {TARGET_CPU_68K}
+{$endc}
+{*******************************************************************************
+* *
+* PowerPC-only Function Prototypes *
+* *
+*******************************************************************************}
+
+{$ifc TARGET_CPU_PPC}
+
+{
+ * cosl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function cosl(x: LongDouble): LongDouble; external name '_cosl';
+
+
+{
+ * sinl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function sinl(x: LongDouble): LongDouble; external name '_sinl';
+
+
+{
+ * tanl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function tanl(x: LongDouble): LongDouble; external name '_tanl';
+
+
+{
+ * acosl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function acosl(x: LongDouble): LongDouble; external name '_acosl';
+
+
+{
+ * asinl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function asinl(x: LongDouble): LongDouble; external name '_asinl';
+
+
+{
+ * atanl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function atanl(x: LongDouble): LongDouble; external name '_atanl';
+
+
+{
+ * atan2l()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function atan2l(y: LongDouble; x: LongDouble): LongDouble; external name '_atan2l';
+
+
+{
+ * coshl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function coshl(x: LongDouble): LongDouble; external name '_coshl';
+
+
+{
+ * sinhl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function sinhl(x: LongDouble): LongDouble; external name '_sinhl';
+
+
+{
+ * tanhl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function tanhl(x: LongDouble): LongDouble; external name '_tanhl';
+
+
+{
+ * acoshl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function acoshl(x: LongDouble): LongDouble; external name '_acoshl';
+
+
+{
+ * asinhl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function asinhl(x: LongDouble): LongDouble; external name '_asinhl';
+
+
+{
+ * atanhl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function atanhl(x: LongDouble): LongDouble; external name '_atanhl';
+
+
+{
+ * expl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function expl(x: LongDouble): LongDouble; external name '_expl';
+
+
+{
+ * expm1l()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function expm1l(x: LongDouble): LongDouble; external name '_expm1l';
+
+
+{
+ * exp2l()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function exp2l(x: LongDouble): LongDouble; external name '_exp2l';
+
+
+{
+ * frexpl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function frexpl(x: LongDouble; var exponent: SInt32): LongDouble; external name '_frexpl';
+
+
+{
+ * ldexpl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function ldexpl(x: LongDouble; n: SInt32): LongDouble; external name '_ldexpl';
+
+
+{
+ * logl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function logl(x: LongDouble): LongDouble; external name '_logl';
+
+
+{
+ * log1pl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function log1pl(x: LongDouble): LongDouble; external name '_log1pl';
+
+
+{
+ * log10l()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function log10l(x: LongDouble): LongDouble; external name '_log10l';
+
+
+{
+ * log2l()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function log2l(x: LongDouble): LongDouble; external name '_log2l';
+
+
+{
+ * logbl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function logbl(x: LongDouble): LongDouble; external name '_logbl';
+
+
+{
+ * scalbl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function scalbl(x: LongDouble; n: SInt32): LongDouble; external name '_scalbl';
+
+
+{
+ * fabsl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function fabsl(x: LongDouble): LongDouble; external name '_fabsl';
+
+
+{
+ * hypotl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function hypotl(x: LongDouble; y: LongDouble): LongDouble; external name '_hypotl';
+
+
+{
+ * powl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function powl(x: LongDouble; y: LongDouble): LongDouble; external name '_powl';
+
+
+{
+ * sqrtl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function sqrtl(x: LongDouble): LongDouble; external name '_sqrtl';
+
+
+{
+ * erfl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function erfl(x: LongDouble): LongDouble; external name '_erfl';
+
+
+{
+ * erfcl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function erfcl(x: LongDouble): LongDouble; external name '_erfcl';
+
+
+{
+ * gammal()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function gammal(x: LongDouble): LongDouble; external name '_gammal';
+
+
+{
+ * lgammal()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function lgammal(x: LongDouble): LongDouble; external name '_lgammal';
+
+
+{
+ * ceill()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 2.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function ceill(x: LongDouble): LongDouble; external name '_ceill';
+
+
+{
+ * floorl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function floorl(x: LongDouble): LongDouble; external name '_floorl';
+
+
+{
+ * rintl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function rintl(x: LongDouble): LongDouble; external name '_rintl';
+
+
+{
+ * nearbyintl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function nearbyintl(x: LongDouble): LongDouble; external name '_nearbyintl';
+
+
+{
+ * rinttoll()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function rinttoll(x: LongDouble): SInt32; external name '_rinttoll';
+
+
+{
+ * roundl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function roundl(x: LongDouble): LongDouble; external name '_roundl';
+
+
+{
+ * roundtoll()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function roundtoll(x: LongDouble): SInt32; external name '_roundtoll';
+
+
+{
+ * truncl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function truncl(x: LongDouble): LongDouble; external name '_truncl';
+
+
+{
+ * remainderl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function remainderl(x: LongDouble; y: LongDouble): LongDouble; external name '_remainderl';
+
+
+{
+ * remquol()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function remquol(x: LongDouble; y: LongDouble; var quo: SInt32): LongDouble; external name '_remquol';
+
+
+{
+ * copysignl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function copysignl(x: LongDouble; y: LongDouble): LongDouble; external name '_copysignl';
+
+
+{
+ * fdiml()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function fdiml(x: LongDouble; y: LongDouble): LongDouble; external name '_fdiml';
+
+
+{
+ * fmaxl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function fmaxl(x: LongDouble; y: LongDouble): LongDouble; external name '_fmaxl';
+
+
+{
+ * fminl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function fminl(x: LongDouble; y: LongDouble): LongDouble; external name '_fminl';
+
+{$ifc undefined __NOEXTENSIONS__}
+{
+ * relationl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function relationl(x: LongDouble; y: LongDouble): relop; external name '_relationl';
+
+
+{
+ * num2decl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure num2decl(const (*var*) f: decform; x: LongDouble; var d: decimal); external name '_num2decl';
+
+
+{
+ * dec2numl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function dec2numl(const (*var*) d: decimal): LongDouble; external name '_dec2numl';
+
+{$endc}
+{$endc} {TARGET_CPU_PPC}
+{$endc} {TARGET_OS_MAC}
+
+{$ifc undefined __NOEXTENSIONS__}
+{
+ MathLib v2 has two new transfer functions: x80tod and dtox80. They can
+ be used to directly transform 68k 80-bit extended data types to double
+ and back for PowerPC based machines without using the functions
+ x80told or ldtox80. Double rounding may occur.
+ }
+{
+ * x80tod()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function x80tod(const (*var*) x80: extended80): Double; external name '_x80tod';
+
+{
+ * dtox80()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure dtox80((*const*) var x: Double; var x80: extended80); external name '_dtox80';
+
+{$ifc TARGET_CPU_PPC}
+{
+ * x80told()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure x80told(const (*var*) x80: extended80; var x: LongDouble); external name '_x80told';
+
+
+{
+ * ldtox80()
+ *
+ * Availability:
+ * Non-Carbon CFM: in MathLib 1.0 and later or as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure ldtox80((*const*) var x: LongDouble; var x80: extended80); external name '_ldtox80';
+
+{$endc} {TARGET_CPU_PPC}
+{$endc}
+
+{$ALIGN MAC68K}
+
+
+{unit vBLAS}
+{
+ File: vBLAS.p
+
+ Contains: Header for the Basic Linear Algebra Subprograms, with Apple extensions.
+
+ Version: Technology: All
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 2000-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ ========================================================================================================================== }
+
+
+{
+ =================================================================================================
+ Definitions of the Basic Linear Algebra Subprograms (BLAS) as provided by Apple Computer. At
+ present this is a subset of the "legacy" FORTRAN and C interfaces. Only single precision forms
+ are provided, and only the most useful routines. For example only the general matrix forms are
+ provided, not the symmetric, Hermitian, or triangular forms. A few additional functions, unique
+ to Mac OS, have also been provided. These are clearly documented as Apple extensions.
+ Documentation on the BLAS standard, including reference implementations, can be found on the web
+ starting from the BLAS FAQ page at these URLs (at least as of August 2000):
+ http://www.netlib.org/blas/faq.html
+ http://www.netlib.org/blas/blast-forum/blast-forum.html
+ =================================================================================================
+}
+
+
+{
+ =================================================================================================
+ Matrix shape and storage
+ ========================
+ Keeping the various matrix shape and storage parameters straight can be difficult. The BLAS
+ documentation generally makes a distinction between the concpetual "matrix" and the physical
+ "array". However there are a number of places where this becomes fuzzy because of the overall
+ bias towards FORTRAN's column major storage. The confusion is made worse by style differences
+ between the level 2 and level 3 functions. It is amplified further by the explicit choice of row
+ or column major storage in the C interface.
+ The storage order does not affect the actual computation that is performed. That is, it does not
+ affect the results other than where they appear in memory. It does affect the values passed
+ for so-called "leading dimension" parameters, such as lda in sgemv. These are always the major
+ stride in storage, allowing operations on rectangular subsets of larger matrices. For row major
+ storage this is the number of columns in the parent matrix, and for column major storage this is
+ the number of rows in the parent matrix.
+ For the level 2 functions, which deal with only a single matrix, the matrix shape parameters are
+ always M and N. These are the logical shape of the matrix, M rows by N columns. The transpose
+ parameter, such as transA in sgemv, defines whether the regular matrix or its transpose is used
+ in the operation. This affects the implicit length of the input and output vectors. For example,
+ if the regular matrix A is used in sgemv, the input vector X has length N, the number of columns
+ of A, and the output vector Y has length M, the number of rows of A. The length of the input and
+ output vectors is not affected by the storage order of the matrix.
+ The level 3 functions deal with 2 input matrices and one output matrix, the matrix shape parameters
+ are M, N, and K. The logical shape of the output matrix is always M by N, while K is the common
+ dimension of the input matrices. Like level 2, the transpose parameters, such as transA and transB
+ in sgemm, define whether the regular input or its transpose is used in the operation. However
+ unlike level 2, in level 3 the transpose parameters affect the implicit shape of the input matrix.
+ Consider sgemm, which computes "C = (alpha * A * B) + (beta * C)", where A and B might be regular
+ or transposed. The logical shape of C is always M rows by N columns. The physical shape depends
+ on the storage order parameter. Using column major storage the declaration of C (the array) in C
+ (the language) would be something like "float C[N][M]". The logical shape of A without transposition
+ is M by K, and B is K by N. The one storage order parameter affects all three matrices.
+ For those readers still wondering about the style differences between level 2 and level 3, they
+ involve whether the input or output shapes are explicit. For level 2, the input matrix shape is
+ always M by N. The input and output vector lengths are implicit and vary according to the
+ transpose parameter. For level 3, the output matrix shape is always M by N. The input matrix
+ shapes are implicit and vary according to the transpose parameters.
+ =================================================================================================
+}
+
+
+{ ========================================================================================================================== }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN POWER}
+
+
+{
+ ==========================================================================================================================
+ Types and constants
+ ===================
+}
+
+
+type
+ CBLAS_ORDER = SInt32;
+const
+ CblasRowMajor = 101;
+ CblasColMajor = 102;
+
+
+type
+ CBLAS_TRANSPOSE = SInt32;
+const
+ CblasNoTrans = 111;
+ CblasTrans = 112;
+ CblasConjTrans = 113;
+
+
+type
+ CBLAS_UPLO = SInt32;
+const
+ CblasUpper = 121;
+ CblasLower = 122;
+
+
+type
+ CBLAS_DIAG = SInt32;
+const
+ CblasNonUnit = 131;
+ CblasUnit = 132;
+
+
+type
+ CBLAS_SIDE = SInt32;
+const
+ CblasLeft = 141;
+ CblasRight = 142;
+
+
+ {
+ ------------------------------------------------------------------------------------------------------------------
+ IsAlignedCount - True if an SInt16 is positive and a multiple of 4. Negative strides are considered unaligned.
+ IsAlignedAddr - True if an address is a multiple of 16.
+ }
+
+
+ {
+ ==========================================================================================================================
+ ==========================================================================================================================
+ Legacy BLAS Functions
+ ==========================================================================================================================
+ ==========================================================================================================================
+ }
+
+
+ {
+ ==========================================================================================================================
+ Level 1 Single Precision Functions
+ ==================================
+ }
+
+
+ {
+ * cblas_sdot()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0.2 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+function cblas_sdot(N: SInt32; (*const*) var X: Single; incX: SInt32; (*const*) var Y: Single; incY: SInt32): Single; external name '_cblas_sdot';
+
+{
+ * cblas_snrm2()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0.2 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+function cblas_snrm2(N: SInt32; (*const*) var X: Single; incX: SInt32): Single; external name '_cblas_snrm2';
+
+{
+ * cblas_sasum()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0.2 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+function cblas_sasum(N: SInt32; (*const*) var X: Single; incX: SInt32): Single; external name '_cblas_sasum';
+
+{
+ * cblas_isamax()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0.2 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+function cblas_isamax(N: SInt32; (*const*) var X: Single; incX: SInt32): SInt32; external name '_cblas_isamax';
+
+{
+ * cblas_sswap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0.2 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure cblas_sswap(N: SInt32; var X: Single; incX: SInt32; var Y: Single; incY: SInt32); external name '_cblas_sswap';
+
+{
+ * cblas_scopy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0.2 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure cblas_scopy(N: SInt32; (*const*) var X: Single; incX: SInt32; var Y: Single; incY: SInt32); external name '_cblas_scopy';
+
+{
+ * cblas_saxpy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0.2 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure cblas_saxpy(N: SInt32; alpha: Single; (*const*) var X: Single; incX: SInt32; var Y: Single; incY: SInt32); external name '_cblas_saxpy';
+
+{
+ * cblas_srot()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0.2 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure cblas_srot(N: SInt32; var X: Single; incX: SInt32; var Y: Single; incY: SInt32; c: Single; s: Single); external name '_cblas_srot';
+
+{
+ * cblas_sscal()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0.2 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure cblas_sscal(N: SInt32; alpha: Single; var X: Single; incX: SInt32); external name '_cblas_sscal';
+
+
+{
+ ==========================================================================================================================
+ Level 1 Double Precision Functions
+ ==================================
+}
+
+
+{ *** TBD *** }
+
+
+{
+ ==========================================================================================================================
+ Level 1 Complex Single Precision Functions
+ ==========================================
+}
+
+
+{ *** TBD *** }
+
+
+{
+ ==========================================================================================================================
+ Level 2 Single Precision Functions
+ ==================================
+}
+
+
+{
+ * cblas_sgemv()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0.2 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure cblas_sgemv(order: CBLAS_ORDER; transA: CBLAS_TRANSPOSE; M: SInt32; N: SInt32; alpha: Single; (*const*) var A: Single; lda: SInt32; (*const*) var X: Single; incX: SInt32; beta: Single; var Y: Single; incY: SInt32); external name '_cblas_sgemv';
+
+
+{
+ ==========================================================================================================================
+ Level 2 Double Precision Functions
+ ==================================
+}
+
+
+{ *** TBD *** }
+
+
+{
+ ==========================================================================================================================
+ Level 2 Complex Single Precision Functions
+ ==========================================
+}
+
+
+{ *** TBD *** }
+
+
+{
+ ==========================================================================================================================
+ Level 3 Single Precision Functions
+ ==================================
+}
+
+
+{
+ * cblas_sgemm()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0.2 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure cblas_sgemm(order: CBLAS_ORDER; transA: CBLAS_TRANSPOSE; transB: CBLAS_TRANSPOSE; M: SInt32; N: SInt32; K: SInt32; alpha: Single; (*const*) var A: Single; lda: SInt32; (*const*) var B: Single; ldb: SInt32; beta: Single; var C: Single; ldc: SInt32); external name '_cblas_sgemm';
+
+
+{
+ ==========================================================================================================================
+ Level 3 Double Precision Functions
+ ==================================
+}
+
+
+{ *** TBD *** }
+
+
+{
+ ==========================================================================================================================
+ Level 3 Complex Single Precision Functions
+ ==========================================
+}
+
+
+{ *** TBD *** }
+
+
+{
+ ==========================================================================================================================
+ ==========================================================================================================================
+ Latest Standard BLAS Functions
+ ==========================================================================================================================
+ ==========================================================================================================================
+}
+
+
+{ *** TBD *** }
+
+
+{
+ ==========================================================================================================================
+ ==========================================================================================================================
+ Additional Functions from Apple
+ ==========================================================================================================================
+ ==========================================================================================================================
+}
+
+
+{
+ -------------------------------------------------------------------------------------------------
+ These routines provide optimized, AltiVec-only support for common small matrix multiplications.
+ They do not check for the availability of AltiVec instructions or parameter errors. They just do
+ the multiplication as fast as possible. Matrices are presumed to use row major storage. Because
+ these are all square, column major matrices can be multiplied by simply reversing the parameters.
+}
+
+
+{
+ ==========================================================================================================================
+ Error handling
+ ==============
+}
+
+
+{
+ -------------------------------------------------------------------------------------------------
+ The BLAS standard requires that parameter errors be reported and cause the program to terminate.
+ The default behavior for the Mac OS implementation of the BLAS is to print a message in English
+ to stdout using printf and call exit with EXIT_FAILURE as the status. If this is adequate, then
+ you need do nothing more or worry about error handling.
+ The BLAS standard also mentions a function, cblas_xerbla, suggesting that a program provide its
+ own implementation to override the default error handling. This will not work in the shared
+ library environment of Mac OS 9. Instead the Mac OS implementation provides a means to install
+ an error handler. There can only be one active error handler, installing a new one causes any
+ previous handler to be forgotten. Passing a null function pointer installs the default handler.
+ The default handler is automatically installed at startup and implements the default behavior
+ defined above.
+ An error handler may return, it need not abort the program. If the error handler returns, the
+ BLAS routine also returns immediately without performing any processing. Level 1 functions that
+ return a numeric value return zero if the error handler returns.
+}
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ BLASParamErrorProc = procedure(funcName: ConstCStringPtr; paramName: ConstCStringPtr; (*const*) var paramPos: SInt32; (*const*) var paramValue: SInt32);
+{$elsec}
+ BLASParamErrorProc = ProcPtr;
+{$endc}
+
+ {
+ * SetBLASParamErrorProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0.2 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetBLASParamErrorProc(ErrorProc: BLASParamErrorProc); external name '_SetBLASParamErrorProc';
+
+
+{ ========================================================================================================================== }
+
+
+{$ALIGN MAC68K}
+
+
+{unit vDSP}
+{
+ File: vDSP.p
+
+ Contains: AltiVec DSP Interfaces
+
+ Version: Technology: 1.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 2000-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+ DSPComplexPtr = ^DSPComplex;
+ DSPComplex = record
+ real: Single;
+ imag: Single;
+ end;
+
+ DSPSplitComplexPtr = ^DSPSplitComplex;
+ DSPSplitComplex = record
+ realp: ^Single;
+ imagp: ^Single;
+ end;
+
+ FFTSetup = ^SInt32; { an opaque 32-bit type }
+ FFTSetupPtr = ^FFTSetup; { when a var xx:FFTSetup parameter can be nil, it is changed to xx: FFTSetupPtr }
+ FFTDirection = SInt32;
+const
+ kFFTDirection_Forward = 1;
+ kFFTDirection_Inverse = -1;
+
+
+type
+ FFTRadix = SInt32;
+const
+ kFFTRadix2 = 0;
+ kFFTRadix3 = 1;
+ kFFTRadix5 = 2;
+
+ {
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ The criteria to invoke the PowerPC vector implementation is subject to
+ change and become less restrictive in the future.
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ }
+ {
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Functions create_fftsetup and destroy_fftsetup.
+
+ create_fftsetup will allocate memory and setup a weight array used by
+ the FFT. The call destroy_fftsetup will free the array.
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ }
+ {
+ * create_fftsetup()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+function create_fftsetup(log2n: UInt32; radix: FFTRadix): FFTSetup; external name '_create_fftsetup';
+
+{
+ * destroy_fftsetup()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure destroy_fftsetup(setup: FFTSetup); external name '_destroy_fftsetup';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Functions ctoz and ztoc.
+
+ ctoz converts a complex array to a complex-split array
+ ztoc converts a complex-split array to a complex array
+
+ Criteria to invoke PowerPC vector code:
+ 1. size > 3
+ 2. strideC = 2
+ 3. strideZ = 1
+ 4. Z.realp and Z.imagp are relatively aligned.
+ 5. C is 8-byte aligned if Z.realp and Z.imagp are 4-byte- aligned
+ or C is 16-byte aligned if Z.realp and Z.imagp are at least
+ 8-byte aligned.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * ctoz()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure ctoz(const (*var*) C: DSPComplex; strideC: SInt32; var Z: DSPSplitComplex; strideZ: SInt32; size: UInt32); external name '_ctoz';
+
+{
+ * ztoc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure ztoc(const (*var*) Z: DSPSplitComplex; strideZ: SInt32; var C: DSPComplex; strideC: SInt32; size: UInt32); external name '_ztoc';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Functions fft_zip and fft_zipt
+
+ In-place Split Complex Fourier Transform with or without temporary memory.
+
+ Criteria to invoke PowerPC vector code:
+
+ 1. ioData.realp and ioData.imagp must be 16-byte aligned.
+ 2. stride = 1
+ 3. 2 <= log2n <= 20
+ 4. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used. The size of temporary memory for each part
+ is the lower value of 4*n and 16k. Direction can be either
+ kFFTDirection_Forward or kFFTDirection_Inverse.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * fft_zip()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft_zip(setup: FFTSetup; var ioData: DSPSplitComplex; stride: SInt32; log2n: UInt32; direction: FFTDirection); external name '_fft_zip';
+
+{
+ * fft_zipt()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft_zipt(setup: FFTSetup; var ioData: DSPSplitComplex; stride: SInt32; var bufferTemp: DSPSplitComplex; log2n: UInt32; direction: FFTDirection); external name '_fft_zipt';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Functions fft_zop and fft_zopt
+
+ Out-of-place Split Complex Fourier Transform with or without temporary
+ memory
+
+ Criteria to invoke PowerPC vector code:
+
+ 1. signal.realp and signal.imagp must be 16-byte aligned.
+ 2. signalStride = 1
+ 3. result.realp and result.imagp must be 16-byte aligned.
+ 4. strideResult = 1
+ 5. 2 <= log2n <= 20
+ 6. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used. The size of temporary memory for each part
+ is the lower value of 4*n and 16k. Direction can be either
+ kFFTDirection_Forward or kFFTDirection_Inverse.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * fft_zop()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft_zop(setup: FFTSetup; var signal: DSPSplitComplex; signalStride: SInt32; var result: DSPSplitComplex; strideResult: SInt32; log2n: UInt32; direction: FFTDirection); external name '_fft_zop';
+
+{
+ * fft_zopt()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft_zopt(setup: FFTSetup; var signal: DSPSplitComplex; signalStride: SInt32; var result: DSPSplitComplex; strideResult: SInt32; var bufferTemp: DSPSplitComplex; log2n: UInt32; direction: FFTDirection); external name '_fft_zopt';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Functions fft_zrip and fft_zript
+
+ In-Place Real Fourier Transform with or without temporary memory,
+ split Complex Format
+
+ Criteria to invoke PowerPC vector code:
+ 1. ioData.realp and ioData.imagp must be 16-byte aligned.
+ 2. stride = 1
+ 3. 3 <= log2n <= 13
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used. The size of temporary memory for each part
+ is the lower value of 4*n and 16k. Direction can be either
+ kFFTDirection_Forward or kFFTDirection_Inverse.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * fft_zrip()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft_zrip(setup: FFTSetup; var ioData: DSPSplitComplex; stride: SInt32; log2n: UInt32; direction: FFTDirection); external name '_fft_zrip';
+
+{
+ * fft_zript()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft_zript(setup: FFTSetup; var ioData: DSPSplitComplex; stride: SInt32; var bufferTemp: DSPSplitComplex; log2n: UInt32; direction: FFTDirection); external name '_fft_zript';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Functions fft_zrop and fft_zropt
+
+ Out-of-Place Real Fourier Transform with or without temporary memory,
+ split Complex Format
+
+ Criteria to invoke PowerPC vector code:
+ 1. signal.realp and signal.imagp must be 16-byte aligned.
+ 2. signalStride = 1
+ 3. result.realp and result.imagp must be be 16-byte aligned.
+ 4. strideResult = 1
+ 5. 3 <= log2n <= 13
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used. The size of temporary memory for each part
+ is the lower value of 4*n and 16k. Direction can be either
+ kFFTDirection_Forward or kFFTDirection_Inverse.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * fft_zrop()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft_zrop(setup: FFTSetup; var signal: DSPSplitComplex; signalStride: SInt32; var result: DSPSplitComplex; strideResult: SInt32; log2n: UInt32; direction: FFTDirection); external name '_fft_zrop';
+
+{
+ * fft_zropt()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft_zropt(setup: FFTSetup; var signal: DSPSplitComplex; signalStride: SInt32; var result: DSPSplitComplex; strideResult: SInt32; var bufferTemp: DSPSplitComplex; log2n: UInt32; direction: FFTDirection); external name '_fft_zropt';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Functions fft2d_zip and fft2d_zipt
+
+ In-place two dimensional Split Complex Fourier Transform with or without
+ temporary memory
+
+ Criteria to invoke PowerPC vector code:
+ 1. ioData.realp and ioData.imagp must be 16-byte aligned.
+ 2. strideInRow = 1;
+ 3. strideInCol must be a multiple of 4
+ 4. 2 <= log2nInRow <= 12
+ 5. 2 <= log2nInCol <= 12
+ 6. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used. The size of temporary memory for each part
+ is the lower value of 4*n and 16k. ( log2n = log2nInRow + log2nInCol )
+ Direction can be either kFFTDirection_Forward or kFFTDirection_Inverse.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * fft2d_zip()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft2d_zip(setup: FFTSetup; var ioData: DSPSplitComplex; strideInRow: SInt32; strideInCol: SInt32; log2nInCol: UInt32; log2nInRow: UInt32; direction: FFTDirection); external name '_fft2d_zip';
+
+{
+ * fft2d_zipt()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft2d_zipt(setup: FFTSetup; var ioData: DSPSplitComplex; strideInRow: SInt32; strideInCol: SInt32; var bufferTemp: DSPSplitComplex; log2nInCol: UInt32; log2nInRow: UInt32; direction: FFTDirection); external name '_fft2d_zipt';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Functions fft2d_zop and fft2d_zopt
+
+ Out-of-Place two dimemsional Split Complex Fourier Transform with or
+ without temporary memory
+
+ Criteria to invoke PowerPC vector code:
+
+ 1. signal.realp and signal.imagp must be 16-byte aligned.
+ 2. signalStrideInRow = 1;
+ 3. signalStrideInCol must be a multiple of 4
+ 4. result.realp and result.imagp must be 16-byte aligned.
+ 5. strideResultInRow = 1;
+ 6. strideResultInCol must be a multiple of 4
+ 7. 2 <= log2nInRow <= 12
+ 8. 2 <= log2nInCol <= 12
+ 9. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used. The size of temporary memory for each part
+ is the lower value of 4*n and 16k. ( log2n = log2nInRow + log2nInCol )
+ Direction can be either kFFTDirection_Forward or kFFTDirection_Inverse.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * fft2d_zop()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft2d_zop(setup: FFTSetup; var signal: DSPSplitComplex; signalStrideInRow: SInt32; signalStrideInCol: SInt32; var result: DSPSplitComplex; strideResultInRow: SInt32; strideResultInCol: SInt32; log2nInCol: UInt32; log2nInRow: UInt32; flag: SInt32); external name '_fft2d_zop';
+
+{
+ * fft2d_zopt()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft2d_zopt(setup: FFTSetup; var signal: DSPSplitComplex; signalStrideInRow: SInt32; signalStrideInCol: SInt32; var result: DSPSplitComplex; strideResultInRow: SInt32; strideResultInCol: SInt32; var bufferTemp: DSPSplitComplex; log2nInCol: UInt32; log2nInRow: UInt32; flag: SInt32); external name '_fft2d_zopt';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Functions fft2d_zrip and fft2d_zript
+
+ In-place two dimensional Real Fourier Transform with or without temporary
+ memory, Split Complex Format
+
+ Criteria to invoke PowerPC vector code:
+ 1. ioData.realp and ioData.imagp must be 16-byte aligned.
+ 2. strideInRow = 1;
+ 3. strideInCol must be a multiple of 4
+ 4. 3 <= log2nInRow <= 12
+ 5. 3 <= log2nInCol <= 13
+ 6. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used. The size of temporary memory for each part
+ is the lower value of 4*n and 16k. ( log2n = log2nInRow + log2nInCol )
+ Direction can be either kFFTDirection_Forward or kFFTDirection_Inverse.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * fft2d_zrip()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft2d_zrip(setup: FFTSetup; var ioData: DSPSplitComplex; strideInRow: SInt32; strideInCol: SInt32; log2nInCol: UInt32; log2nInRow: UInt32; direction: FFTDirection); external name '_fft2d_zrip';
+
+{
+ * fft2d_zript()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft2d_zript(setup: FFTSetup; var ioData: DSPSplitComplex; strideInRow: SInt32; strideInCol: SInt32; var bufferTemp: DSPSplitComplex; log2nInCol: UInt32; log2nInRow: UInt32; direction: FFTDirection); external name '_fft2d_zript';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Functions fft2d_zrop and fft2d_zropt
+
+ Out-of-Place Two-Dimemsional Real Fourier Transform with or without
+ temporary memory, Split Complex Format
+
+ Criteria to invoke PowerPC vector code:
+ 1. signal.realp and signal.imagp must be 16-byte aligned.
+ 2. signalStrideInRow = 1;
+ 3. signalStrideInCol must be a multiple of 4
+ 4. result.realp and result.imagp must be 16-byte aligned.
+ 5. strideResultInRow = 1;
+ 6. strideResultInCol must be a multiple of 4
+ 7. 3 <= log2nInRow <= 12
+ 8. 3 <= log2nInCol <= 13
+ 9. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used. The size of temporary memory for each part
+ is the lower value of 4*n and 16k. ( log2n = log2nInRow + log2nInCol )
+ Direction can be either kFFTDirection_Forward or kFFTDirection_Inverse.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * fft2d_zrop()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft2d_zrop(setup: FFTSetup; var signal: DSPSplitComplex; signalStrideInRow: SInt32; signalStrideInCol: SInt32; var result: DSPSplitComplex; strideResultInRow: SInt32; strideResultInCol: SInt32; log2nInCol: UInt32; log2nInRow: UInt32; flag: SInt32); external name '_fft2d_zrop';
+
+{
+ * fft2d_zropt()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure fft2d_zropt(setup: FFTSetup; var signal: DSPSplitComplex; signalStrideInRow: SInt32; signalStrideInCol: SInt32; var result: DSPSplitComplex; strideResultInRow: SInt32; strideResultInCol: SInt32; var bufferTemp: DSPSplitComplex; log2nInCol: UInt32; log2nInRow: UInt32; flag: SInt32); external name '_fft2d_zropt';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function conv
+
+ Floating Point Convolution and Correlation
+
+ Criteria to invoke PowerPC vector code:
+ 1. signal and result must have relative alignement.
+ 2. 4 <= lenFilter <= 256
+ 3. lenResult > 36
+ 4. signalStride = 1
+ 5. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used. strideFilter can be positive for
+ correlation or negative for convolution.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * conv()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure conv((*const*) var signal: Single; signalStride: SInt32; (*const*) var filter: Single; strideFilter: SInt32; var result: Single; strideResult: SInt32; lenResult: SInt32; lenFilter: SInt32); external name '_conv';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function vadd
+
+ Floating Point Add
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1 and input2 and result are all relatively aligned.
+ 2. size >= 8
+ 3. stride1 = 1
+ 4. stride2 = 1
+ 5. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * vadd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure vadd((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vadd';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function vsub
+
+ Floating Point Substract
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1 and input2 and result are all relatively aligned.
+ 2. size >= 8
+ 3. stride1 = 1
+ 4. stride2 = 1
+ 5. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * vsub()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure vsub((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vsub';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function vmul
+
+ Floating Point Multiply
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1 and input2 and result must be all relatively aligned.
+ 2. size >= 8
+ 3. stride1 = 1
+ 4. stride2 = 1
+ 5. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * vmul()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure vmul((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vmul';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function vsmul
+
+ Floating Point - Scalar Multiply
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1 and result are all relatively aligned.
+ 2. size >= 8
+ 3. stride1 = 1
+ 5. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * vsmul()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure vsmul((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; var result: Single; strideResult: SInt32; size: UInt32); external name '_vsmul';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function vsq
+
+ Floating Point Square
+
+ Criteria to invoke PowerPC vector code:
+ 1. input and result are relatively aligned.
+ 2. size >= 8
+ 3. strideInput = 1
+ 4. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * vsq()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure vsq((*const*) var input: Single; strideInput: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vsq';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function vssq
+
+ Floating Point Signed Square
+
+ Criteria to invoke PowerPC vector code:
+ 1. input and result must be all relatively aligned.
+ 2. size >= 8
+ 3. strideInput = 1
+ 4. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * vssq()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure vssq((*const*) var input: Single; strideInput: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vssq';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function dotpr
+
+ Floating Point Dot product
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1 and input2 are relatively aligned.
+ 2. size >= 20
+ 3. stride1 = 1
+ 4. stride2 = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * dotpr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure dotpr((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: Single; size: UInt32); external name '_dotpr';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function vam
+
+ Floating Point vadd and Multiply
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1, input2, input_3 and result are all relatively aligned.
+ 2. size >= 8
+ 3. stride1 = 1
+ 4. stride2 = 1
+ 5. stride_3 = 1
+ 6. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * vam()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure vam((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; (*const*) var input3: Single; stride3: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vam';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function zconv
+
+ Split Complex Convolution and Correlation
+
+ Criteria to invoke PowerPC vector code:
+ 1. signal->realp, signal->imagp, result->realp, result->imagp
+ must be relatively aligned.
+ 2. 4 <= lenFilter <= 128
+ 3. lenResult > 20
+ 4. signalStride = 1
+ 5. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used. strideFilter can be positive for correlation
+ or negative for convolution
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * zconv()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure zconv(var signal: DSPSplitComplex; signalStride: SInt32; var filter: DSPSplitComplex; strideFilter: SInt32; var result: DSPSplitComplex; strideResult: SInt32; lenResult: SInt32; lenFilter: SInt32); external name '_zconv';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function zvadd
+
+ Split Complex vadd
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1.realp, input1.imagp, input2.realp, input2.imagp,
+ result.realp, result.imagp must be all relatively aligned.
+ 2. size >= 8
+ 3. stride1 = 1
+ 4. stride2 = 1
+ 5. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * zvadd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure zvadd(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zvadd';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function zvsub
+
+ Split Complex Substract
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1.realp, input1.imagp, input2.realp, input2.imagp,
+ result.realp, result.imagp must be all relatively aligned.
+ 2. size >= 8
+ 3. stride1 = 1
+ 4. stride2 = 1
+ 5. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * zvsub()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure zvsub(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zvsub';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function zvmul
+
+ Split Complex Multiply
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1.realp, input1.imagp, input2.realp, input2.imagp,
+ result.realp, result.imagp must be all relatively aligned.
+ 2. size >= 8
+ 3. stride1 = 1
+ 4. stride2 = 1
+ 5. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used. The conjugate value can be 1 or -1.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * zvmul()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure zvmul(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32; conjugate: SInt32); external name '_zvmul';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function zdotpr
+
+ Split Complex Dot product
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1.realp, input1.imagp, input2.realp, input2.imagp are all
+ relatively aligned.
+ 2. size >= 20
+ 3. stride1 = 1
+ 4. stride2 = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * zdotpr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure zdotpr(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var result: DSPSplitComplex; size: UInt32); external name '_zdotpr';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function zidotpr
+
+ Split Complex Inner Dot product
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1.realp, input1.imagp, input2.realp, input2.imagp must be
+ all relatively aligned.
+ 2. size >= 20
+ 3. stride1 = 1
+ 4. stride2 = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * zidotpr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure zidotpr(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var result: DSPSplitComplex; size: UInt32); external name '_zidotpr';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function zrdotpr
+
+ Split Complex - Real Dot product
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1.realp, input1.imagp, input2 are must be relatively aligned.
+ 2. size >= 16
+ 3. stride1 = 1
+ 4. stride2 = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * zrdotpr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure zrdotpr(var input1: DSPSplitComplex; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: DSPSplitComplex; size: UInt32); external name '_zrdotpr';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function zvcma
+
+ Split Complex Conjugate Multiply And vadd
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1.realp, input1.imagp, input2.realp, input2.imagp,
+ input_3.realp, input_3.imagp, result.realp, result.imagp
+ must be all relatively aligned.
+ 2. size >= 8
+ 3. stride1 = 1
+ 4. stride2 = 1
+ 5. stride_3 = 1
+ 6. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * zvcma()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure zvcma(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var input3: DSPSplitComplex; stride3: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zvcma';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function zrvadd
+
+ Split Complex - Real Add
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1.realp, input1.imagp, input2, result.realp, result.imagp
+ are all relatively aligned.
+ 2. size >= 8
+ 3. stride1 = 1
+ 4. stride2 = 1
+ 5. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * zrvadd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure zrvadd(var input1: DSPSplitComplex; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zrvadd';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function zrvsub
+
+ Split Complex - Real Substract
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1.realp, input1.imagp, input2, result.realp, result.imagp
+ must be all relatively aligned.
+ 2. size >= 8
+ 3. stride1 = 1
+ 4. stride2 = 1
+ 5. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * zrvsub()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure zrvsub(var input1: DSPSplitComplex; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zrvsub';
+
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Function zrvmul
+
+ Split Complex - Real Multiply
+
+ Criteria to invoke PowerPC vector code:
+ 1. input1.realp, input1.imagp, input2, result.realp, result.imagp
+ must be all relatively aligned.
+ 2. size >= 8
+ 3. stride1 = 1
+ 4. stride2 = 1
+ 5. strideResult = 1
+
+ If any of the above criteria are not satisfied, the PowerPC scalor code
+ implementation will be used.
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{
+ * zrvmul()
+ *
+ * Availability:
+ * Non-Carbon CFM: in vecLib 1.0 and later
+ * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
+ * Mac OS X: in version 10.0 and later
+ }
+procedure zrvmul(var input1: DSPSplitComplex; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zrvmul';
+
+
+{$ifc undefined USE_NONE_APPLE_STANDARD_DATATYPES}
+{$setc USE_NONE_APPLE_STANDARD_DATATYPES := 1}
+{$endc}
+
+{$ifc USE_NONE_APPLE_STANDARD_DATATYPES}
+
+const
+ FFT_FORWARD = 1;
+ FFT_INVERSE = -1;
+
+ FFT_RADIX2 = 0;
+ FFT_RADIX3 = 1;
+ FFT_RADIX5 = 2;
+
+
+type
+ COMPLEX = DSPComplex;
+ COMPLEXPtr = ^COMPLEX;
+ COMPLEX_SPLIT = DSPSplitComplex;
+ COMPLEX_SPLITPtr = ^COMPLEX_SPLIT;
+{$endc} {USE_NONE_APPLE_STANDARD_DATATYPES}
+
+{$ALIGN MAC68K}
+
+
+{unit xattr}
+{
+ * Copyright (c) 2004-2005 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License"). You may not use this file except in compliance with the
+ * License. Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2006 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+const
+// Options for pathname based xattr calls
+ XATTR_NOFOLLOW = $0001; // Don't follow symbolic links
+
+// Options for setxattr calls
+ XATTR_CREATE = $0002; // set the value, fail if attr already exists
+ XATTR_REPLACE = $0004; // set the value, fail if attr does not exist
+
+// Set this to bypass authorization checking (eg. if doing auth-related work)
+ XATTR_NOSECURITY = $0008;
+
+const
+ XATTR_MAXNAMELEN = 127;
+
+const
+ XATTR_FINDERINFO_NAME = 'com.apple.FinderInfo';
+
+const
+ XATTR_RESOURCEFORK_NAME = 'com.apple.ResourceFork';
+
+
+function getxattr( path: ConstCStringPtr; name: ConstCStringPtr; value: UnivPtr; siz: size_t; position: UInt32; options: SInt32 ): ssize_t; external name '_getxattr';
+
+function fgetxattr( fd: SInt32; name: ConstCStringPtr; value: UnivPtr; siz: size_t; position: UInt32; options: SInt32 ): ssize_t; external name '_fgetxattr';
+
+function setxattr( path: ConstCStringPtr; name: ConstCStringPtr; value: {const} UnivPtr; siz: size_t; position: UInt32; options: SInt32 ): SInt32; external name '_setxattr';
+
+function fsetxattr( fd: SInt32; name: ConstCStringPtr; value: {const} UnivPtr; siz: size_t; position: UInt32; options: SInt32 ): SInt32; external name '_fsetxattr';
+
+function removexattr( path: ConstCStringPtr; name: ConstCStringPtr; options: SInt32 ): SInt32; external name '_removexattr';
+
+function fremovexattr( fd: SInt32; name: ConstCStringPtr; options: SInt32 ): SInt32; external name '_fremovexattr';
+
+function listxattr( path: ConstCStringPtr; namebuff: UnivPtr; siz: size_t; options: SInt32 ): ssize_t; external name '_listxattr';
+
+function flistxattr( fd: SInt32; namebuff: UnivPtr; siz: size_t; options: SInt32 ): ssize_t; external name '_flistxattr';
+
+{unit ABTypedefs}
+{
+ * ABTypedefs.h
+ * AddressBook Framework
+ *
+ * Copyright (c) 2002-2003 Apple Computer. All rights reserved.
+ *
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+const
+ kABMultiValueMask = $100;
+
+type
+ ABPropertyType = SInt32;
+const
+ kABErrorInProperty = 0;
+ kABStringProperty = 1;
+ kABIntegerProperty = 2;
+ kABRealProperty = 3;
+ kABDateProperty = 4;
+ kABArrayProperty = 5;
+ kABDictionaryProperty = 6;
+ kABDataProperty = 7;
+ kABMultiStringProperty = kABMultiValueMask or kABStringProperty;
+ kABMultiIntegerProperty = kABMultiValueMask or kABIntegerProperty;
+ kABMultiRealProperty = kABMultiValueMask or kABRealProperty;
+ kABMultiDateProperty = kABMultiValueMask or kABDateProperty;
+ kABMultiArrayProperty = kABMultiValueMask or kABArrayProperty;
+ kABMultiDictionaryProperty = kABMultiValueMask or kABDictionaryProperty;
+ kABMultiDataProperty = kABMultiValueMask or kABDataProperty;
+
+// ================================================================
+// Search APIs
+// ================================================================
+
+type
+ ABSearchComparison = SInt32;
+const
+ kABEqual = 0;
+ kABNotEqual = 1;
+ kABLessThan = 2;
+ kABLessThanOrEqual = 3;
+ kABGreaterThan = 4;
+ kABGreaterThanOrEqual = 5;
+
+ kABEqualCaseInsensitive = 6;
+ kABContainsSubString = 7;
+ kABContainsSubStringCaseInsensitive = 8;
+ kABPrefixMatch = 9;
+ kABPrefixMatchCaseInsensitive = 10;
+// #if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED
+ kABBitsInBitFieldMatch = 11;
+// #endif
+
+type
+ ABSearchConjunction = SInt32;
+const
+ kABSearchAnd = 0;
+ kABSearchOr = 1;
+
+{unit AEDataModel}
+{
+ File: AEDataModel.p
+
+ Contains: AppleEvent Data Model Interfaces.
+
+ Version: Technology: Mac OS 9
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1996-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ Apple event descriptor types }
+
+const
+ typeBoolean = $626F6F6C (* 'bool' *);
+ typeChar = $54455854 (* 'TEXT' *); { Deprecated, use typeUTF8Text instead. }
+
+{ The preferred unicode text types. In both cases, there is no explicit null termination or length byte. }
+
+ typeUTF16ExternalRepresentation = $75743136 (* 'ut16' *); { big-endian 16 bit unicode with optional byte-order-mark, or little-endian 16 bit unicode with required byte-order-mark. }
+ typeUTF8Text = $75746638 (* 'utf8' *); { 8 bit unicode }
+
+ { Preferred numeric Apple event descriptor types }
+ typeSInt16 = $73686F72 (* 'shor' *);
+ typeSInt32 = $6C6F6E67 (* 'long' *);
+ typeUInt32 = $6D61676E (* 'magn' *);
+ typeSInt64 = $636F6D70 (* 'comp' *);
+ typeIEEE32BitFloatingPoint = $73696E67 (* 'sing' *);
+ typeIEEE64BitFloatingPoint = $646F7562 (* 'doub' *);
+ type128BitFloatingPoint = $6C64626C (* 'ldbl' *);
+ typeDecimalStruct = $6465636D (* 'decm' *);
+
+ { Non-preferred Apple event descriptor types }
+ typeSMInt = $73686F72 (* 'shor' *);
+ typeShortInteger = $73686F72 (* 'shor' *);
+ typeInteger = $6C6F6E67 (* 'long' *);
+ typeLongInteger = $6C6F6E67 (* 'long' *);
+ typeMagnitude = $6D61676E (* 'magn' *);
+ typeComp = $636F6D70 (* 'comp' *);
+ typeSMFloat = $73696E67 (* 'sing' *);
+ typeShortFloat = $73696E67 (* 'sing' *);
+ typeFloat = $646F7562 (* 'doub' *);
+ typeLongFloat = $646F7562 (* 'doub' *);
+ typeExtended = $65787465 (* 'exte' *);
+
+ { More Apple event descriptor types }
+ typeAEList = $6C697374 (* 'list' *);
+ typeAERecord = $7265636F (* 'reco' *);
+ typeAppleEvent = $61657674 (* 'aevt' *);
+ typeEventRecord = $65767263 (* 'evrc' *);
+ typeTrue = $74727565 (* 'true' *);
+ typeFalse = $66616C73 (* 'fals' *);
+ typeAlias = $616C6973 (* 'alis' *);
+ typeEnumerated = $656E756D (* 'enum' *);
+ typeType = $74797065 (* 'type' *);
+ typeAppParameters = $61707061 (* 'appa' *);
+ typeProperty = $70726F70 (* 'prop' *);
+ typeFSS = $66737320 (* 'fss ' *);
+ typeFSRef = $66737266 (* 'fsrf' *);
+ typeFileURL = $6675726C (* 'furl' *);
+ typeKeyword = $6B657977 (* 'keyw' *);
+ typeSectionH = $73656374 (* 'sect' *);
+ typeWildCard = $2A2A2A2A (* '****' *);
+ typeApplSignature = $7369676E (* 'sign' *);
+ typeQDRectangle = $71647274 (* 'qdrt' *);
+ typeFixed = $66697864 (* 'fixd' *);
+ typeProcessSerialNumber = $70736E20 (* 'psn ' *);
+ typeApplicationURL = $6170726C (* 'aprl' *);
+ typeNull = $6E756C6C (* 'null' *); { null or nonexistent data }
+
+{$ifc CALL_NOT_IN_CARBON}
+ { Deprecated addressing modes under Carbon }
+ typeSessionID = $73736964 (* 'ssid' *);
+ typeTargetID = $74617267 (* 'targ' *);
+ typeDispatcherID = $64737074 (* 'dspt' *);
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+ { New addressing modes for MacOS X }
+ typeKernelProcessID = $6B706964 (* 'kpid' *);
+ typeMachPort = $706F7274 (* 'port' *);
+
+ { Targeting applications by bundle ID is only available in Mac OS X 10.3 or later. }
+ typeApplicationBundleID = $62756E64 (* 'bund' *);
+
+ { Keywords for Apple event attributes }
+ keyTransactionIDAttr = $7472616E (* 'tran' *);
+ keyReturnIDAttr = $72746964 (* 'rtid' *);
+ keyEventClassAttr = $6576636C (* 'evcl' *);
+ keyEventIDAttr = $65766964 (* 'evid' *);
+ keyAddressAttr = $61646472 (* 'addr' *);
+ keyOptionalKeywordAttr = $6F70746B (* 'optk' *);
+ keyTimeoutAttr = $74696D6F (* 'timo' *);
+ keyInteractLevelAttr = $696E7465 (* 'inte' *); { this attribute is read only - will be set in AESend }
+ keyEventSourceAttr = $65737263 (* 'esrc' *); { this attribute is read only - returned as typeShortInteger }
+ keyMissedKeywordAttr = $6D697373 (* 'miss' *); { this attribute is read only }
+ keyOriginalAddressAttr = $66726F6D (* 'from' *); { new in 1.0.1 }
+ keyAcceptTimeoutAttr = $6163746D (* 'actm' *); { new for Mac OS X }
+ keyReplyRequestedAttr = $72657071 (* 'repq' *); { Was a reply requested for this event - returned as typeBoolean }
+
+ { These bits are specified in the keyXMLDebuggingAttr (an SInt32) }
+ kAEDebugPOSTHeader = 1 shl 0; { headers of the HTTP post we sent - typeChar }
+ kAEDebugReplyHeader = 1 shl 1; { headers returned by the server }
+ kAEDebugXMLRequest = 1 shl 2; { the XML request we sent }
+ kAEDebugXMLResponse = 1 shl 3; { the XML reply from the server }
+ kAEDebugXMLDebugAll = $FFFFFFFF; { everything! }
+
+ { These values can be added as a parameter to the direct object of a
+ SOAP message to specify the serialization schema. If not
+ specified, kSOAP1999Schema is the default. These should be added as
+ typeType. }
+ kSOAP1999Schema = $73733939 (* 'ss99' *);
+ kSOAP2001Schema = $73733031 (* 'ss01' *);
+
+ { outgoing event attributes }
+ keyUserNameAttr = $756E616D (* 'unam' *);
+ keyUserPasswordAttr = $70617373 (* 'pass' *); { not sent with the event }
+ keyDisableAuthenticationAttr = $61757468 (* 'auth' *); { When present and with a non zero value (that is, false, or integer 0), }
+ { AESend will not authenticate the user. If not present, or with a non-zero}
+ { value, AESend will prompt for authentication information from the user if the interaction level allows. }
+ keyXMLDebuggingAttr = $78646267 (* 'xdbg' *); { a bitfield of specifying which XML debugging data is to be returned with the event }
+ { Event class / id }
+ kAERPCClass = $72706320 (* 'rpc ' *); { for outgoing XML events }
+ kAEXMLRPCScheme = $52504332 (* 'RPC2' *); { event ID: event should be sent to an XMLRPC endpoint }
+ kAESOAPScheme = $534F4150 (* 'SOAP' *); { event ID: event should be sent to a SOAP endpoint }
+ kAESharedScriptHandler = $77736370 (* 'wscp' *); { event ID: handler for incoming XML requests }
+ { these parameters exist as part of the direct object of the event for both incoming and outgoing requests }
+ keyRPCMethodName = $6D657468 (* 'meth' *); { name of the method to call }
+ keyRPCMethodParam = $7061726D (* 'parm' *); { the list (or structure) of parameters }
+ keyRPCMethodParamOrder = $2F6F7264 (* '/ord' *); { if a structure, the order of parameters (a list) }
+ { when keyXMLDebugginAttr so specifies, these additional parameters will be part of the reply. }
+ keyAEPOSTHeaderData = $70686564 (* 'phed' *); { what we sent to the server }
+ keyAEReplyHeaderData = $72686564 (* 'rhed' *); { what the server sent to us }
+ keyAEXMLRequestData = $78726571 (* 'xreq' *); { what we sent to the server }
+ keyAEXMLReplyData = $78726570 (* 'xrep' *); { what the server sent to us }
+ { additional parameters that can be specified in the direct object of the event }
+ keyAdditionalHTTPHeaders = $61686564 (* 'ahed' *); { list of additional HTTP headers (a list of 2 element lists) }
+ keySOAPAction = $73616374 (* 'sact' *); { the SOAPAction header (required for SOAP messages) }
+ keySOAPMethodNameSpace = $6D737063 (* 'mspc' *); { Optional namespace (defaults to m:) }
+ keySOAPMethodNameSpaceURI = $6D737075 (* 'mspu' *); { Required namespace URI }
+ keySOAPSchemaVersion = $73736368 (* 'ssch' *); { Optional XML Schema version, defaults to kSOAP1999Schama }
+
+{
+ When serializing AERecords as SOAP structures, it is possible
+ to specify the namespace and type of the structure. To do this,
+ add a keySOAPStructureMetaData record to the top level of the
+ record to be serialized. If present, this will be used to specify
+ the structure namespace. This will produce a structure elment that
+ looks like:
+
+ <myStruct
+ xmlns:myNamespace="http://myUri.org/xsd",
+ xsi:type="myNamespace:MyStructType">
+ ...
+ </myStruct>
+
+}
+ keySOAPStructureMetaData = $2F736D64 (* '/smd' *);
+ keySOAPSMDNamespace = $73736E73 (* 'ssns' *); { "myNamespace"}
+ keySOAPSMDNamespaceURI = $73736E75 (* 'ssnu' *); { "http://myUri.org/xsd"}
+ keySOAPSMDType = $73737470 (* 'sstp' *); { "MyStructType"}
+
+{
+ * Web Services Proxy support. Available only on Mac OS X 10.2 or later.
+ * These constants should be added as attributes on the event that is
+ * being sent (not part of the direct object.)
+ }
+ { Automatically configure the proxy based on System Configuration }
+ kAEUseHTTPProxyAttr = $78757072 (* 'xupr' *); { a typeBoolean. Defaults to true.}
+ { manually specify the proxy host and port. }
+ kAEHTTPProxyPortAttr = $78687470 (* 'xhtp' *); { a typeSInt32}
+ kAEHTTPProxyHostAttr = $78687468 (* 'xhth' *); { a typeChar}
+
+{
+ * Web Services SOCKS support. kAEUseSocksAttr is a boolean that
+ * specifies whether to automatically configure SOCKS proxies by
+ * querying System Configuration.
+ }
+ kAESocks4Protocol = 4;
+ kAESocks5Protocol = 5;
+
+ kAEUseSocksAttr = $78736373 (* 'xscs' *); { a typeBoolean. Defaults to true.}
+ { This attribute specifies a specific SOCKS protocol to be used }
+ kAESocksProxyAttr = $78736F6B (* 'xsok' *); { a typeSInt32}
+ { if version >= 4 }
+ kAESocksHostAttr = $78736873 (* 'xshs' *); { a typeChar}
+ kAESocksPortAttr = $78736870 (* 'xshp' *); { a typeSInt32}
+ kAESocksUserAttr = $78736875 (* 'xshu' *); { a typeChar}
+ { if version >= 5 }
+ kAESocksPasswordAttr = $78736877 (* 'xshw' *); { a typeChar}
+
+
+
+ { Constants used for specifying the factoring of AEDescLists. }
+ kAEDescListFactorNone = 0;
+ kAEDescListFactorType = 4;
+ kAEDescListFactorTypeAndSize = 8;
+
+ { Constants used creating an AppleEvent }
+ { Constant for the returnID param of AECreateAppleEvent }
+ kAutoGenerateReturnID = -1; { AECreateAppleEvent will generate a session-unique ID }
+ { Constant for transaction IDÕs }
+ kAnyTransactionID = 0; { no transaction is in use }
+
+ { Apple event manager data types }
+
+type
+ DescType = ResType;
+ DescTypePtr = ^DescType;
+ AEKeyword = FourCharCode;
+ AEKeywordPtr = ^AEKeyword;
+{$ifc OPAQUE_TOOLBOX_STRUCTS}
+ AEDataStorage = ^SInt32; { an opaque 32-bit type }
+ AEDataStoragePtr = ^AEDataStorage; { when a var xx:AEDataStorage parameter can be nil, it is changed to xx: AEDataStoragePtr }
+{$elsec}
+ AEDataStorage = Handle;
+{$endc} {OPAQUE_TOOLBOX_STRUCTS}
+
+ AEDescPtr = ^AEDesc;
+ AEDesc = record
+ descriptorType: DescType;
+ dataHandle: AEDataStorage;
+ end;
+
+ AEKeyDescPtr = ^AEKeyDesc;
+ AEKeyDesc = record
+ descKey: AEKeyword;
+ descContent: AEDesc;
+ end;
+
+ { a list of AEDesc's is a special kind of AEDesc }
+ AEDescList = AEDesc;
+ AEDescListPtr = ^AEDescList;
+ { AERecord is a list of keyworded AEDesc's }
+ AERecord = AEDescList;
+ AERecordPtr = ^AERecord;
+ { an AEDesc which contains address data }
+ AEAddressDesc = AEDesc;
+ AEAddressDescPtr = ^AEAddressDesc;
+ { an AERecord that contains an AppleEvent, and related data types }
+ AppleEvent = AERecord;
+ AppleEventPtr = ^AppleEvent;
+ AEReturnID = SInt16;
+ AETransactionID = SInt32;
+ AEEventClass = FourCharCode;
+ AEEventID = FourCharCode;
+ AEArrayType = SInt8;
+
+const
+ kAEDataArray = 0;
+ kAEPackedArray = 1;
+ kAEDescArray = 3;
+ kAEKeyDescArray = 4;
+
+
+ kAEHandleArray = 2;
+
+
+type
+ AEArrayDataPtr = ^AEArrayData;
+ AEArrayData = record
+ case SInt16 of
+ 0: (
+ kAEDataArray: array [0..0] of SInt16;
+ );
+ 1: (
+ kAEPackedArray: SInt8;
+ );
+ 2: (
+ kAEHandleArray: array [0..0] of Handle;
+ );
+ 3: (
+ kAEDescArray: array [0..0] of AEDesc;
+ );
+ 4: (
+ kAEKeyDescArray: array [0..0] of AEKeyDesc;
+ );
+ end;
+
+ AEArrayDataPointer = ^AEArrayData;
+ AEArrayDataPointerPtr = ^AEArrayDataPointer;
+ { *************************************************************************
+ These constants are used by AEMach and AEInteraction APIs. They are not
+ strictly part of the data format, but are declared here due to layering.
+ ************************************************************************* }
+ AESendPriority = SInt16;
+const
+ kAENormalPriority = $00000000; { post message at the end of the event queue }
+ kAEHighPriority = $00000001; { post message at the front of the event queue (same as nAttnMsg) }
+
+
+type
+ AESendMode = SInt32;
+const
+ kAENoReply = $00000001; { sender doesn't want a reply to event }
+ kAEQueueReply = $00000002; { sender wants a reply but won't wait }
+ kAEWaitReply = $00000003; { sender wants a reply and will wait }
+ kAEDontReconnect = $00000080; { don't reconnect if there is a sessClosedErr from PPCToolbox }
+ kAEWantReceipt = $00000200; { (nReturnReceipt) sender wants a receipt of message }
+ kAENeverInteract = $00000010; { server should not interact with user }
+ kAECanInteract = $00000020; { server may try to interact with user }
+ kAEAlwaysInteract = $00000030; { server should always interact with user where appropriate }
+ kAECanSwitchLayer = $00000040; { interaction may switch layer }
+ kAEDontRecord = $00001000; { don't record this event - available only in vers 1.0.1 and greater }
+ kAEDontExecute = $00002000; { don't send the event for recording - available only in vers 1.0.1 and greater }
+ kAEProcessNonReplyEvents = $00008000; { allow processing of non-reply events while awaiting synchronous AppleEvent reply }
+
+
+ { Constants for timeout durations }
+ kAEDefaultTimeout = -1; { timeout value determined by AEM }
+ kNoTimeOut = -2; { wait until reply comes back, however long it takes }
+
+
+ { *************************************************************************
+ These calls are used to set up and modify the coercion dispatch table.
+ ************************************************************************* }
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ AECoerceDescProcPtr = function(const (*var*) fromDesc: AEDesc; toType: DescType; handlerRefcon: SInt32; var toDesc: AEDesc): OSErr;
+{$elsec}
+ AECoerceDescProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ AECoercePtrProcPtr = function(typeCode: DescType; dataPtr: UnivPtr; dataSize: Size; toType: DescType; handlerRefcon: SInt32; var result: AEDesc): OSErr;
+{$elsec}
+ AECoercePtrProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ AECoerceDescUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ AECoerceDescUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ AECoercePtrUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ AECoercePtrUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppAECoerceDescProcInfo = $00003FE0;
+ uppAECoercePtrProcInfo = $0003FFE0;
+ {
+ * NewAECoerceDescUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewAECoerceDescUPP(userRoutine: AECoerceDescProcPtr): AECoerceDescUPP; external name '_NewAECoerceDescUPP'; { old name was NewAECoerceDescProc }
+{
+ * NewAECoercePtrUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewAECoercePtrUPP(userRoutine: AECoercePtrProcPtr): AECoercePtrUPP; external name '_NewAECoercePtrUPP'; { old name was NewAECoercePtrProc }
+{
+ * DisposeAECoerceDescUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeAECoerceDescUPP(userUPP: AECoerceDescUPP); external name '_DisposeAECoerceDescUPP';
+{
+ * DisposeAECoercePtrUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeAECoercePtrUPP(userUPP: AECoercePtrUPP); external name '_DisposeAECoercePtrUPP';
+{
+ * InvokeAECoerceDescUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeAECoerceDescUPP(const (*var*) fromDesc: AEDesc; toType: DescType; handlerRefcon: SInt32; var toDesc: AEDesc; userRoutine: AECoerceDescUPP): OSErr; external name '_InvokeAECoerceDescUPP'; { old name was CallAECoerceDescProc }
+{
+ * InvokeAECoercePtrUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeAECoercePtrUPP(typeCode: DescType; dataPtr: UnivPtr; dataSize: Size; toType: DescType; handlerRefcon: SInt32; var result: AEDesc; userRoutine: AECoercePtrUPP): OSErr; external name '_InvokeAECoercePtrUPP'; { old name was CallAECoercePtrProc }
+{ a AECoercionHandlerUPP is by default a AECoerceDescUPP. If you are registering a
+ Ptr based coercion handler you will have to add a cast to AECoerceDescUPP from
+ your AECoercePtrUPP type. A future release of the interfaces will fix this by
+ introducing seperate Desc and Ptr coercion handler installation/remove/query routines. }
+
+type
+ AECoercionHandlerUPP = AECoerceDescUPP;
+ {
+ * AEInstallCoercionHandler()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEInstallCoercionHandler(fromType: DescType; toType: DescType; handler: AECoercionHandlerUPP; handlerRefcon: SInt32; fromTypeIsDesc: boolean; isSysHandler: boolean): OSErr; external name '_AEInstallCoercionHandler';
+{
+ * AERemoveCoercionHandler()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AERemoveCoercionHandler(fromType: DescType; toType: DescType; handler: AECoercionHandlerUPP; isSysHandler: boolean): OSErr; external name '_AERemoveCoercionHandler';
+{
+ * AEGetCoercionHandler()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEGetCoercionHandler(fromType: DescType; toType: DescType; var handler: AECoercionHandlerUPP; var handlerRefcon: SInt32; var fromTypeIsDesc: boolean; isSysHandler: boolean): OSErr; external name '_AEGetCoercionHandler';
+{*************************************************************************
+ The following calls provide for a coercion interface.
+*************************************************************************}
+{
+ * AECoercePtr()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AECoercePtr(typeCode: DescType; dataPtr: UnivPtr; dataSize: Size; toType: DescType; var result: AEDesc): OSErr; external name '_AECoercePtr';
+{
+ * AECoerceDesc()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AECoerceDesc(const (*var*) theAEDesc: AEDesc; toType: DescType; var result: AEDesc): OSErr; external name '_AECoerceDesc';
+{*************************************************************************
+ The following calls apply to any AEDesc. Every 'result' descriptor is
+ created for you, so you will be responsible for memory management
+ (including disposing) of the descriptors so created.
+*************************************************************************}
+{ because AEDescs are opaque under Carbon, this AEInitializeDesc provides a
+ 'clean' way of initializating them to be empty. }
+{
+ * AEInitializeDesc()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure AEInitializeDesc(var desc: AEDesc); external name '_AEInitializeDesc';
+
+
+{
+ * AECreateDesc()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AECreateDesc(typeCode: DescType; dataPtr: UnivPtr; dataSize: Size; var result: AEDesc): OSErr; external name '_AECreateDesc';
+{
+ * AEDisposeDesc()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEDisposeDesc(var theAEDesc: AEDesc): OSErr; external name '_AEDisposeDesc';
+{
+ * AEDuplicateDesc()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEDuplicateDesc(const (*var*) theAEDesc: AEDesc; var result: AEDesc): OSErr; external name '_AEDuplicateDesc';
+
+{
+ * Create an AEDesc with memory "borrowed" from the application. The
+ * data passed in *must* be immutable and not freed until the Dispose
+ * callback is made.
+ * The dispose callback may be made at any time, including during the
+ * creation of the descriptor.
+ * If possible, the descriptor will be copied to the address space of
+ * any recipient process using virtual memory APIs and avoid an
+ * actual memory copy.
+ }
+type
+ AEDisposeExternalProcPtr = procedure( dataPtr: {const} UnivPtr; dataLength: Size; refcon: SInt32 );
+
+{$ifc OPAQUE_UPP_TYPES}
+ AEDisposeExternalUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ AEDisposeExternalUPP = UniversalProcPtr;
+{$endc}
+
+{
+ * AECreateDescFromExternalPtr()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function AECreateDescFromExternalPtr( descriptorType: OSType; dataPtr: {const} UnivPtr; dataLength: Size; disposeCallback: AEDisposeExternalUPP; disposeRefcon: SInt32; var theDesc: AEDesc ): OSStatus; external name '_AECreateDescFromExternalPtr';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{*************************************************************************
+ The following calls apply to AEDescList. Since AEDescList is a subtype of
+ AEDesc, the calls in the previous section can also be used for AEDescList.
+ All list and array indices are 1-based. If the data was greater than
+ maximumSize in the routines below, then actualSize will be greater than
+ maximumSize, but only maximumSize bytes will actually be retrieved.
+*************************************************************************}
+{
+ * AECreateList()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AECreateList(factoringPtr: UnivPtr; factoredSize: Size; isRecord: boolean; var resultList: AEDescList): OSErr; external name '_AECreateList';
+{
+ * AECountItems()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AECountItems(const (*var*) theAEDescList: AEDescList; var theCount: SInt32): OSErr; external name '_AECountItems';
+{
+ * AEPutPtr()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEPutPtr(var theAEDescList: AEDescList; index: SInt32; typeCode: DescType; dataPtr: UnivPtr; dataSize: Size): OSErr; external name '_AEPutPtr';
+{
+ * AEPutDesc()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEPutDesc(var theAEDescList: AEDescList; index: SInt32; const (*var*) theAEDesc: AEDesc): OSErr; external name '_AEPutDesc';
+{
+ * AEGetNthPtr()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEGetNthPtr(const (*var*) theAEDescList: AEDescList; index: SInt32; desiredType: DescType; theAEKeywordPtr: AEKeywordPtr; typeCode: DescTypePtr; dataPtr: UnivPtr; maximumSize: Size; actualSize: SizePtr): OSErr; external name '_AEGetNthPtr';
+{
+ * AEGetNthDesc()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEGetNthDesc(const (*var*) theAEDescList: AEDescList; index: SInt32; desiredType: DescType; theAEKeywordPtr: AEKeywordPtr; var result: AEDesc): OSErr; external name '_AEGetNthDesc';
+{
+ * AESizeOfNthItem()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AESizeOfNthItem(const (*var*) theAEDescList: AEDescList; index: SInt32; typeCode: DescTypePtr; dataSize: SizePtr): OSErr; external name '_AESizeOfNthItem';
+{
+ * AEGetArray()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEGetArray(const (*var*) theAEDescList: AEDescList; arrayType: AEArrayType; arrayPtr: AEArrayDataPointer; maximumSize: Size; var itemType: DescType; var itemSize: Size; var itemCount: SInt32): OSErr; external name '_AEGetArray';
+{
+ * AEPutArray()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEPutArray(var theAEDescList: AEDescList; arrayType: AEArrayType; const (*var*) arrayPtr: AEArrayData; itemType: DescType; itemSize: Size; itemCount: SInt32): OSErr; external name '_AEPutArray';
+{
+ * AEDeleteItem()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEDeleteItem(var theAEDescList: AEDescList; index: SInt32): OSErr; external name '_AEDeleteItem';
+{*************************************************************************
+ The following calls apply to AERecord. Since AERecord is a subtype of
+ AEDescList, the calls in the previous sections can also be used for
+ AERecord an AERecord can be created by using AECreateList with isRecord
+ set to true.
+*************************************************************************}
+{************************************************************************
+ AERecords can have an abitrary descriptorType. This allows you to
+ check if desc is truly an AERecord
+***********************************************************************}
+{
+ * AECheckIsRecord()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AECheckIsRecord(const (*var*) theDesc: AEDesc): boolean; external name '_AECheckIsRecord';
+
+{
+ Note: none of the ÒkeyÓ calls were available in the PowerPC 7.x IntefaceLib.
+ In C, a #define is used to map ÒkeyÓ calls to ÒparamÓ calls. In pascal
+ this mapping is done in externally linked glue code.
+}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * AEPutKeyPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AEPutKeyPtr(var theAERecord: AERecord; theAEKeyword: AEKeyword; typeCode: DescType; dataPtr: UnivPtr; dataSize: Size): OSErr; external name '_AEPutKeyPtr';
+{
+ * AEPutKeyDesc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AEPutKeyDesc(var theAERecord: AERecord; theAEKeyword: AEKeyword; const (*var*) theAEDesc: AEDesc): OSErr; external name '_AEPutKeyDesc';
+{
+ * AEGetKeyPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AEGetKeyPtr(const (*var*) theAERecord: AERecord; theAEKeyword: AEKeyword; desiredType: DescType; var typeCode: DescType; dataPtr: UnivPtr; maximumSize: Size; var actualSize: Size): OSErr; external name '_AEGetKeyPtr';
+{
+ * AEGetKeyDesc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AEGetKeyDesc(const (*var*) theAERecord: AERecord; theAEKeyword: AEKeyword; desiredType: DescType; var result: AEDesc): OSErr; external name '_AEGetKeyDesc';
+{
+ * AESizeOfKeyDesc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AESizeOfKeyDesc(const (*var*) theAERecord: AERecord; theAEKeyword: AEKeyword; var typeCode: DescType; var dataSize: Size): OSErr; external name '_AESizeOfKeyDesc';
+{
+ * AEDeleteKeyDesc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AEDeleteKeyDesc(var theAERecord: AERecord; theAEKeyword: AEKeyword): OSErr; external name '_AEDeleteKeyDesc';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{*************************************************************************
+ The following calls create and manipulate the AppleEvent data type.
+*************************************************************************}
+{
+ * AECreateAppleEvent()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AECreateAppleEvent(theAEEventClass: AEEventClass; theAEEventID: AEEventID; const (*var*) target: AEAddressDesc; returnID: AEReturnID; transactionID: AETransactionID; var result: AppleEvent): OSErr; external name '_AECreateAppleEvent';
+{*************************************************************************
+ The following calls are used to pack and unpack parameters from records
+ of type AppleEvent. Since AppleEvent is a subtype of AERecord, the calls
+ in the previous sections can also be used for variables of type
+ AppleEvent. The next six calls are in fact identical to the six calls
+ for AERecord.
+*************************************************************************}
+{
+ * AEPutParamPtr()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEPutParamPtr(var theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; typeCode: DescType; dataPtr: UnivPtr; dataSize: Size): OSErr; external name '_AEPutParamPtr';
+{
+ * AEPutParamDesc()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEPutParamDesc(var theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; const (*var*) theAEDesc: AEDesc): OSErr; external name '_AEPutParamDesc';
+{
+ * AEGetParamPtr()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEGetParamPtr(const (*var*) theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; desiredType: DescType; actualType: DescTypePtr; dataPtr: UnivPtr; maximumSize: Size; actualSize: SizePtr): OSErr; external name '_AEGetParamPtr';
+{
+ * AEGetParamDesc()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEGetParamDesc(const (*var*) theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; desiredType: DescType; var result: AEDesc): OSErr; external name '_AEGetParamDesc';
+{
+ * AESizeOfParam()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AESizeOfParam(const (*var*) theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; typeCode: DescTypePtr; dataSize: SizePtr): OSErr; external name '_AESizeOfParam';
+{
+ * AEDeleteParam()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEDeleteParam(var theAppleEvent: AppleEvent; theAEKeyword: AEKeyword): OSErr; external name '_AEDeleteParam';
+{*************************************************************************
+ The following calls also apply to type AppleEvent. Message attributes are
+ far more restricted, and can only be accessed through the following 5
+ calls. The various list and record routines cannot be used to access the
+ attributes of an event.
+*************************************************************************}
+{
+ * AEGetAttributePtr()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEGetAttributePtr(const (*var*) theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; desiredType: DescType; typeCode: DescTypePtr; dataPtr: UnivPtr; maximumSize: Size; actualSize: SizePtr): OSErr; external name '_AEGetAttributePtr';
+{
+ * AEGetAttributeDesc()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEGetAttributeDesc(const (*var*) theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; desiredType: DescType; var result: AEDesc): OSErr; external name '_AEGetAttributeDesc';
+{
+ * AESizeOfAttribute()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AESizeOfAttribute(const (*var*) theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; typeCode: DescTypePtr; dataSize: SizePtr): OSErr; external name '_AESizeOfAttribute';
+{
+ * AEPutAttributePtr()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEPutAttributePtr(var theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; typeCode: DescType; dataPtr: UnivPtr; dataSize: Size): OSErr; external name '_AEPutAttributePtr';
+{
+ * AEPutAttributeDesc()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEPutAttributeDesc(var theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; const (*var*) theAEDesc: AEDesc): OSErr; external name '_AEPutAttributeDesc';
+{*************************************************************************
+ AppleEvent Serialization Support
+
+ AESizeOfFlattenedDesc, AEFlattenDesc, AEUnflattenDesc
+
+ These calls will work for all AppleEvent data types and between different
+ versions of the OS (including between Mac OS 9 and X)
+
+ Basic types, AEDesc, AEList and AERecord are OK, but AppleEvent records
+ themselves may not be reliably flattened for storage.
+*************************************************************************}
+{
+ AEFlattenDesc
+ Returns the amount of buffer space needed to flatten the
+ AEDesc. Call this before AEFlattenDesc to make sure your
+ buffer has enough room for the operation.
+}
+
+{
+ * AESizeOfFlattenedDesc()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AESizeOfFlattenedDesc(const (*var*) theAEDesc: AEDesc): Size; external name '_AESizeOfFlattenedDesc';
+
+{
+ AEFlattenDesc
+ Fills a buffer with a flattened representation of the
+ AEDesc and returns the amount of buffer used in actualSize.
+ If bufferSize was too small it returns errAEBufferTooSmall
+ (-1741) and does not fill in any of the buffer. The resulting
+ buffer is only useful with an AEUnflattenDesc call.
+
+ Note: if you pass a NULL buffer pointer it returns noErr but
+ fills in the actualSize field anyway.
+}
+
+{
+ * AEFlattenDesc()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEFlattenDesc(const (*var*) theAEDesc: AEDesc; buffer: Ptr; bufferSize: Size; var actualSize: Size): OSStatus; external name '_AEFlattenDesc';
+
+{
+ AEUnflattenDesc
+ Allocates an AEDesc (given a Null Desc) given a flattened
+ data buffer. It assumes it was given a good buffer filled
+ in by AEFlattenDesc. It returns paramErr if it discovers
+ something fishy about the buffer.
+}
+
+{
+ * AEUnflattenDesc()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEUnflattenDesc(buffer: Ptr; var result: AEDesc): OSStatus; external name '_AEUnflattenDesc';
+
+{*************************************************************************
+ The following calls are necessary to deal with opaque data in AEDescs, because the
+ traditional way of dealing with a basic AEDesc has been to dereference the dataHandle
+ directly. This is not supported under Carbon.
+*************************************************************************}
+{$ifc ACCESSOR_CALLS_ARE_FUNCTIONS}
+{
+ AEGetDescData no longer supports automatic coercion. If you'd like to
+ coerce the descriptor use AECoerceDesc.
+ }
+{
+ * AEGetDescData()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEGetDescData(const (*var*) theAEDesc: AEDesc; dataPtr: UnivPtr; maximumSize: Size): OSErr; external name '_AEGetDescData';
+
+{
+ * AEGetDescDataSize()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEGetDescDataSize(const (*var*) theAEDesc: AEDesc): Size; external name '_AEGetDescDataSize';
+
+{
+ * AEReplaceDescData()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEReplaceDescData(typeCode: DescType; dataPtr: UnivPtr; dataSize: Size; var theAEDesc: AEDesc): OSErr; external name '_AEReplaceDescData';
+
+{$endc} {ACCESSOR_CALLS_ARE_FUNCTIONS}
+
+{
+ * Retrieve a range of bytes from an AEDesc. This obviates the need
+ * to retrieve the entire data from the event using AEGetDescData.
+ * This is only valid for data type AEDescs. If the requested length
+ * and offset are such that they do not fit entirely with the data of the
+ * desc, errAEBufferTooSmall is returned.
+ }
+{
+ * AEGetDescDataRange()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function AEGetDescDataRange( const (*var*) dataDesc: AEDesc; buffer: UnivPtr; offset: Size; length: Size ): OSStatus; external name '_AEGetDescDataRange';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{*************************************************************************
+ A AEEventHandler is installed to process an AppleEvent
+*************************************************************************}
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ AEEventHandlerProcPtr = function(const (*var*) theAppleEvent: AppleEvent; var reply: AppleEvent; handlerRefcon: SInt32): OSErr;
+{$elsec}
+ AEEventHandlerProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ AEEventHandlerUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ AEEventHandlerUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppAEEventHandlerProcInfo = $00000FE0;
+
+{
+ * NewAEDisposeExternalUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewAEDisposeExternalUPP( userRoutine: AEDisposeExternalProcPtr ): AEDisposeExternalUPP; external name '_NewAEDisposeExternalUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+ {
+ * NewAEEventHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewAEEventHandlerUPP(userRoutine: AEEventHandlerProcPtr): AEEventHandlerUPP; external name '_NewAEEventHandlerUPP'; { old name was NewAEEventHandlerProc }
+
+{
+ * DisposeAEDisposeExternalUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeAEDisposeExternalUPP( userUPP: AEDisposeExternalUPP ); external name '_DisposeAEDisposeExternalUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{
+ * DisposeAEEventHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeAEEventHandlerUPP(userUPP: AEEventHandlerUPP); external name '_DisposeAEEventHandlerUPP';
+
+{
+ * InvokeAEDisposeExternalUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeAEDisposeExternalUPP( dataPtr: {const} UnivPtr; dataLength: Size; refcon: SInt32; userUPP: AEDisposeExternalUPP ); external name '_InvokeAEDisposeExternalUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{
+ * InvokeAEEventHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeAEEventHandlerUPP(const (*var*) theAppleEvent: AppleEvent; var reply: AppleEvent; handlerRefcon: SInt32; userRoutine: AEEventHandlerUPP): OSErr; external name '_InvokeAEEventHandlerUPP'; { old name was CallAEEventHandlerProc }
+{$ALIGN MAC68K}
+
+
+{unit AEMach}
+{
+ File: AEMach.p
+
+ Contains: AppleEvent over mach_msg interfaces
+
+ Version: Technology: For Mac OS X
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 2000-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{-
+ * AE Mach API --
+ *
+ * AppleEvents on OS X are implemented in terms of mach messages.
+ * To facilitate writing server processes that can send and receive
+ * AppleEvents, the following APIs are provided.
+ *
+ * AppleEvents are directed to a well known port uniquely tied to a
+ * process. The AE framework will discover this port based on the
+ * keyAddressAttr of the event (as specifed in AECreateAppleEvent by
+ * the target parameter.) If a port cannot be found,
+ * procNotFound (-600) will be returned on AESend.
+ *
+ * Of note is a new attribute for an AppleEvent, typeReplyPortAttr.
+ * 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
+ * event stream if there is an outstanding AESend + kAEWaitReply.
+ * But it may be desirable for a client to specify their own port to
+ * receive quued replies.
+ * (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
+ * process AppleEvents. This implementation will be detailed in a
+ * tech note.
+ *}
+
+const
+ typeReplyPortAttr = $72657070 (* 'repp' *);
+
+{$ifc TARGET_RT_MAC_MACHO}
+{$ifc not undefined _MACH_MESSAGE_H_}
+ { -
+ * Return the mach_port_t that was registered with the bootstrap
+ * server for this process. This port is considered public, and
+ * will be used by other applications to target your process. You
+ * are free to use this mach_port_t to add to a port set, if and
+ * 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.
+ * }
+ {
+ * AEGetRegisteredMachPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function AEGetRegisteredMachPort: mach_port_t; external name '_AEGetRegisteredMachPort';
+
+{-
+ * 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
+ * routine if you wish to dispatch or handle the event yourself. To
+ * return a reply to the sender, you should call:
+ *
+ * AESendMessage(reply, NULL, kAENoReply, kAENormalPriority, kAEDefaultTimeout);
+ *
+ * The contents of the header are invalid after this call.
+ *}
+{
+ * AEDecodeMessage()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function AEDecodeMessage(var header: mach_msg_header_t; var event: AppleEvent; reply: AppleEventPtr): OSStatus; external name '_AEDecodeMessage';
+
+{-
+ * 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.
+ *}
+{
+ * AEProcessMessage()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function AEProcessMessage(var header: mach_msg_header_t): OSStatus; external name '_AEProcessMessage';
+
+{-
+ * 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.
+ *}
+{
+ * AESendMessage()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function AESendMessage(const (*var*) event: AppleEvent; reply: AppleEventPtr; sendMode: AESendMode; timeOutInTicks: SInt32): OSStatus; external name '_AESendMessage';
+
+{$endc} {_MACH_MESSAGE_H_}
+{$endc} {TARGET_RT_MAC_MACHO}
+
+{$ALIGN MAC68K}
+
+
+{unit AEUserTermTypes}
+{
+ File: AEUserTermTypes.p
+
+ Contains: AppleEvents AEUT resource format Interfaces.
+
+ Version: Technology: System 7.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1991-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ kAEUserTerminology = $61657574 (* 'aeut' *); { 0x61657574 }
+ kAETerminologyExtension = $61657465 (* 'aete' *); { 0x61657465 }
+ kAEScriptingSizeResource = $7363737A (* 'scsz' *); { 0x7363737a }
+ kAEOSAXSizeResource = $6F73697A (* 'osiz' *);
+
+ kAEUTHasReturningParam = 31; { if event has a keyASReturning param }
+ kAEUTOptional = 15; { if something is optional }
+ kAEUTlistOfItems = 14; { if property or reply is a list. }
+ kAEUTEnumerated = 13; { if property or reply is of an enumerated type. }
+ kAEUTReadWrite = 12; { if property is writable. }
+ kAEUTChangesState = 12; { if an event changes state. }
+ kAEUTTightBindingFunction = 12; { if this is a tight-binding precedence function. }
+ { AppleScript 1.3: new bits for reply, direct parameter, parameter, and property flags }
+ kAEUTEnumsAreTypes = 11; { if the enumeration is a list of types, not constants }
+ kAEUTEnumListIsExclusive = 10; { if the list of enumerations is a proper set }
+ kAEUTReplyIsReference = 9; { if the reply is a reference, not a value }
+ kAEUTDirectParamIsReference = 9; { if the direct parameter is a reference, not a value }
+ kAEUTParamIsReference = 9; { if the parameter is a reference, not a value }
+ kAEUTPropertyIsReference = 9; { if the property is a reference, not a value }
+ kAEUTNotDirectParamIsTarget = 8; { if the direct parameter is not the target of the event }
+ kAEUTParamIsTarget = 8; { if the parameter is the target of the event }
+ kAEUTApostrophe = 3; { if a term contains an apostrophe. }
+ kAEUTFeminine = 2; { if a term is feminine gender. }
+ kAEUTMasculine = 1; { if a term is masculine gender. }
+ kAEUTPlural = 0; { if a term is plural. }
+
+
+type
+ TScriptingSizeResourcePtr = ^TScriptingSizeResource;
+ TScriptingSizeResource = record
+ scriptingSizeFlags: SInt16;
+ minStackSize: UInt32;
+ preferredStackSize: UInt32;
+ maxStackSize: UInt32;
+ minHeapSize: UInt32;
+ preferredHeapSize: UInt32;
+ maxHeapSize: UInt32;
+ end;
+
+
+const
+ kLaunchToGetTerminology = $8000; { If kLaunchToGetTerminology is 0, 'aete' is read directly from res file. If set to 1, then launch and use 'gdut' to get terminology. }
+ kDontFindAppBySignature = $4000; { If kDontFindAppBySignature is 0, then find app with signature if lost. If 1, then don't }
+ kAlwaysSendSubject = $2000; { If kAlwaysSendSubject 0, then send subject when appropriate. If 1, then every event has Subject Attribute }
+
+ { old names for above bits. }
+ kReadExtensionTermsMask = $8000;
+
+ { AppleScript 1.3: Bit positions for osiz resource }
+ { AppleScript 1.3: Bit masks for osiz resources }
+ kOSIZDontOpenResourceFile = 15; { If set, resource file is not opened when osax is loaded }
+ kOSIZdontAcceptRemoteEvents = 14; { If set, handler will not be called with events from remote machines }
+ kOSIZOpenWithReadPermission = 13; { If set, file will be opened with read permission only }
+ kOSIZCodeInSharedLibraries = 11; { If set, loader will look for handler in shared library, not osax resources }
+
+{$ALIGN MAC68K}
+
+
+{unit AIFF}
+{
+ File: AIFF.p
+
+ Contains: Definition of AIFF file format components.
+
+ Version: Technology: System 8.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1989-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ AIFFID = $41494646 (* 'AIFF' *);
+ AIFCID = $41494643 (* 'AIFC' *);
+ FormatVersionID = $46564552 (* 'FVER' *);
+ CommonID = $434F4D4D (* 'COMM' *);
+ FORMID = $464F524D (* 'FORM' *);
+ SoundDataID = $53534E44 (* 'SSND' *);
+ MarkerID = $4D41524B (* 'MARK' *);
+ InstrumentID = $494E5354 (* 'INST' *);
+ MIDIDataID = $4D494449 (* 'MIDI' *);
+ AudioRecordingID = $41455344 (* 'AESD' *);
+ ApplicationSpecificID = $4150504C (* 'APPL' *);
+ CommentID = $434F4D54 (* 'COMT' *);
+ NameID = $4E414D45 (* 'NAME' *);
+ AuthorID = $41555448 (* 'AUTH' *);
+ CopyrightID = $28632920 (* '(c) ' *);
+ AnnotationID = $414E4E4F (* 'ANNO' *);
+
+ NoLooping = 0;
+ ForwardLooping = 1;
+ ForwardBackwardLooping = 2;
+
+ { AIFF-C Versions }
+ AIFCVersion1 = $A2805140;
+
+ { Compression Names }
+ NoneName = 'not compressed';
+ ACE2to1Name = 'ACE 2-to-1';
+ ACE8to3Name = 'ACE 8-to-3';
+ MACE3to1Name = 'MACE 3-to-1';
+ MACE6to1Name = 'MACE 6-to-1';
+ { Compression Types }
+ NoneType = $4E4F4E45 (* 'NONE' *);
+ ACE2Type = $41434532 (* 'ACE2' *);
+ ACE8Type = $41434538 (* 'ACE8' *);
+ MACE3Type = $4D414333 (* 'MAC3' *);
+ MACE6Type = $4D414336 (* 'MAC6' *);
+
+
+type
+ ID = UInt32;
+ MarkerIdType = SInt16;
+ ChunkHeaderPtr = ^ChunkHeader;
+ ChunkHeader = record
+ ckID: ID;
+ ckSize: SInt32;
+ end;
+
+ ContainerChunkPtr = ^ContainerChunk;
+ ContainerChunk = record
+ ckID: ID;
+ ckSize: SInt32;
+ formType: ID;
+ end;
+
+ FormatVersionChunkPtr = ^FormatVersionChunk;
+ FormatVersionChunk = record
+ ckID: ID;
+ ckSize: SInt32;
+ timestamp: UInt32;
+ end;
+
+ CommonChunkPtr = ^CommonChunk;
+ CommonChunk = record
+ ckID: ID;
+ ckSize: SInt32;
+ numChannels: SInt16;
+ numSampleFrames: UInt32;
+ sampleSize: SInt16;
+ sampleRate: extended80;
+ end;
+
+ ExtCommonChunkPtr = ^ExtCommonChunk;
+ ExtCommonChunk = record
+ ckID: ID;
+ ckSize: SInt32;
+ numChannels: SInt16;
+ numSampleFrames: UInt32;
+ sampleSize: SInt16;
+ sampleRate: extended80;
+ compressionType: ID;
+ compressionName: SInt8; { variable length array, Pascal string }
+ end;
+
+ SoundDataChunkPtr = ^SoundDataChunk;
+ SoundDataChunk = record
+ ckID: ID;
+ ckSize: SInt32;
+ offset: UInt32;
+ blockSize: UInt32;
+ end;
+
+ MarkerPtr = ^Marker;
+ Marker = record
+ id: MarkerIdType;
+ position: UInt32;
+ markerName: Str255;
+ end;
+
+ MarkerChunkPtr = ^MarkerChunk;
+ MarkerChunk = record
+ ckID: ID;
+ ckSize: SInt32;
+ numMarkers: UInt16;
+ Markers: array [0..0] of Marker; { variable length array }
+ end;
+
+ AIFFLoopPtr = ^AIFFLoop;
+ AIFFLoop = record
+ playMode: SInt16;
+ beginLoop: MarkerIdType;
+ endLoop: MarkerIdType;
+ end;
+
+ InstrumentChunkPtr = ^InstrumentChunk;
+ InstrumentChunk = packed record
+ ckID: ID;
+ ckSize: SInt32;
+ baseFrequency: UInt8;
+ detune: UInt8;
+ lowFrequency: UInt8;
+ highFrequency: UInt8;
+ lowVelocity: UInt8;
+ highVelocity: UInt8;
+ gain: SInt16;
+ sustainLoop: AIFFLoop;
+ releaseLoop: AIFFLoop;
+ end;
+
+ MIDIDataChunkPtr = ^MIDIDataChunk;
+ MIDIDataChunk = record
+ ckID: ID;
+ ckSize: SInt32;
+ MIDIdata: SInt8; { variable length array }
+ end;
+
+ AudioRecordingChunkPtr = ^AudioRecordingChunk;
+ AudioRecordingChunk = record
+ ckID: ID;
+ ckSize: SInt32;
+ AESChannelStatus: packed array [0..23] of UInt8;
+ end;
+
+ ApplicationSpecificChunkPtr = ^ApplicationSpecificChunk;
+ ApplicationSpecificChunk = record
+ ckID: ID;
+ ckSize: SInt32;
+ applicationSignature: OSType;
+ data: SInt8; { variable length array }
+ end;
+
+ CommentPtr = ^Comment;
+ Comment = record
+ timeStamp: UInt32;
+ marker: MarkerIdType;
+ count: UInt16;
+ text: SInt8; { variable length array, Pascal string }
+ end;
+
+ CommentsChunkPtr = ^CommentsChunk;
+ CommentsChunk = record
+ ckID: ID;
+ ckSize: SInt32;
+ numComments: UInt16;
+ comments: array [0..0] of Comment; { variable length array }
+ end;
+
+ TextChunkPtr = ^TextChunk;
+ TextChunk = record
+ ckID: ID;
+ ckSize: SInt32;
+ text: SInt8; { variable length array, Pascal string }
+ end;
+
+{$ALIGN MAC68K}
+
+
+{unit AVLTree}
+{
+ File: AVLTree.p
+
+ Contains: Prototypes for routines which create, destroy, allow for
+
+ Version: Universal Interfaces 3.4.2
+
+ Copyright: © 1999-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+ AVLFlags = UInt32;
+const
+ kAVLFlagUseHandleForDataStorageMask = $00000001;
+
+ { The visit stage for AVLWalk() walkProcs }
+
+type
+ AVLVisitStage = UInt16;
+const
+ kAVLPreOrder = 0;
+ kAVLInOrder = 1;
+ kAVLPostOrder = 2;
+
+ { The order the tree is walked or disposed of. }
+
+type
+ AVLOrder = UInt16;
+const
+ kAVLLeftToRight = 0;
+ kAVLRightToLeft = 1;
+
+ { The type of the node being passed to a callback proc. }
+
+type
+ AVLNodeType = UInt16;
+const
+ kAVLIsTree = 0;
+ kAVLIsLeftBranch = 1;
+ kAVLIsRightBranch = 2;
+ kAVLIsLeaf = 3;
+ kAVLNullNode = 4;
+
+ errItemAlreadyInTree = -960;
+ errNotValidTree = -961;
+ errItemNotFoundInTree = -962;
+ errCanNotInsertWhileWalkProcInProgress = -963;
+ errTreeIsLocked = -964;
+ errTreeIsCorrupt = -965;
+
+ { The structure of a tree. It's opaque; don't assume it's 52 bytes in size. }
+
+type
+ AVLTreeStructPtr = ^AVLTreeStruct;
+ AVLTreeStruct = record
+ signature: OSType;
+ privateStuff: array [0..11] of UInt32;
+ end;
+
+ AVLTreePtr = ^AVLTreeStruct;
+ {
+ Every tree must have a function which compares the data for two items and returns < 0, 0, or >0
+ for the items - < 0 if the first item is 'before' the second item according to some criteria,
+ == 0 if the two items are identical according to the criteria, or > 0 if the first item is
+ 'after' the second item according to the criteria. The comparison function is also passed the
+ node type, but most of the time this can be ignored.
+ }
+{$ifc TYPED_FUNCTION_POINTERS}
+ AVLCompareItemsProcPtr = function(tree: AVLTreePtr; i1: UnivPtr; i2: UnivPtr; nd_typ: AVLNodeType): SInt32;
+{$elsec}
+ AVLCompareItemsProcPtr = ProcPtr;
+{$endc}
+
+ {
+ 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.
+ }
+{$ifc TYPED_FUNCTION_POINTERS}
+ AVLItemSizeProcPtr = function(tree: AVLTreePtr; itemPtr: UnivPtr): UInt32;
+{$elsec}
+ AVLItemSizeProcPtr = ProcPtr;
+{$endc}
+
+ {
+ 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.
+ }
+{$ifc TYPED_FUNCTION_POINTERS}
+ AVLDisposeItemProcPtr = procedure(tree: AVLTreePtr; dataP: UnivPtr);
+{$elsec}
+ AVLDisposeItemProcPtr = ProcPtr;
+{$endc}
+
+ {
+ The common way to iterate across all of the items in a tree is via AVLWalk(), which takes
+ a walkProcPtr. This function will get called for every item in the tree three times, as
+ the tree is being walked across. First, the walkProc will get called with visitStage ==
+ kAVLPreOrder, at which point internally the node of the tree for the given data has just
+ been reached. Later, this function will get called with visitStage == kAVLInOrder, and
+ lastly this function will get called with visitStage == kAVLPostOrder.
+ The 'minimum' item in the tree will get called with visitStage == kInOrder first, followed
+ by the 'next' item in the tree, up until the last item in the tree structure is called.
+ In general, you'll only care about calls to this function when visitStage == kAVLInOrder.
+ }
+{$ifc TYPED_FUNCTION_POINTERS}
+ AVLWalkProcPtr = function(tree: AVLTreePtr; dataP: UnivPtr; visitStage: AVLVisitStage; node: AVLNodeType; level: UInt32; balance: SInt32; refCon: UnivPtr): OSErr;
+{$elsec}
+ AVLWalkProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ AVLCompareItemsUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ AVLCompareItemsUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ AVLItemSizeUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ AVLItemSizeUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ AVLDisposeItemUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ AVLDisposeItemUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ AVLWalkUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ AVLWalkUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppAVLCompareItemsProcInfo = $00002FF0;
+ uppAVLItemSizeProcInfo = $000003F0;
+ uppAVLDisposeItemProcInfo = $000003C0;
+ uppAVLWalkProcInfo = $000FEBE0;
+ {
+ * NewAVLCompareItemsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewAVLCompareItemsUPP(userRoutine: AVLCompareItemsProcPtr): AVLCompareItemsUPP; external name '_NewAVLCompareItemsUPP'; { old name was NewAVLCompareItemsProc }
+{
+ * NewAVLItemSizeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewAVLItemSizeUPP(userRoutine: AVLItemSizeProcPtr): AVLItemSizeUPP; external name '_NewAVLItemSizeUPP'; { old name was NewAVLItemSizeProc }
+{
+ * NewAVLDisposeItemUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewAVLDisposeItemUPP(userRoutine: AVLDisposeItemProcPtr): AVLDisposeItemUPP; external name '_NewAVLDisposeItemUPP'; { old name was NewAVLDisposeItemProc }
+{
+ * NewAVLWalkUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewAVLWalkUPP(userRoutine: AVLWalkProcPtr): AVLWalkUPP; external name '_NewAVLWalkUPP'; { old name was NewAVLWalkProc }
+{
+ * DisposeAVLCompareItemsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeAVLCompareItemsUPP(userUPP: AVLCompareItemsUPP); external name '_DisposeAVLCompareItemsUPP';
+{
+ * DisposeAVLItemSizeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeAVLItemSizeUPP(userUPP: AVLItemSizeUPP); external name '_DisposeAVLItemSizeUPP';
+{
+ * DisposeAVLDisposeItemUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeAVLDisposeItemUPP(userUPP: AVLDisposeItemUPP); external name '_DisposeAVLDisposeItemUPP';
+{
+ * DisposeAVLWalkUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeAVLWalkUPP(userUPP: AVLWalkUPP); external name '_DisposeAVLWalkUPP';
+{
+ * InvokeAVLCompareItemsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeAVLCompareItemsUPP(tree: AVLTreePtr; i1: UnivPtr; i2: UnivPtr; nd_typ: AVLNodeType; userRoutine: AVLCompareItemsUPP): SInt32; external name '_InvokeAVLCompareItemsUPP'; { old name was CallAVLCompareItemsProc }
+{
+ * InvokeAVLItemSizeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeAVLItemSizeUPP(tree: AVLTreePtr; itemPtr: UnivPtr; userRoutine: AVLItemSizeUPP): UInt32; external name '_InvokeAVLItemSizeUPP'; { old name was CallAVLItemSizeProc }
+{
+ * InvokeAVLDisposeItemUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeAVLDisposeItemUPP(tree: AVLTreePtr; dataP: UnivPtr; userRoutine: AVLDisposeItemUPP); external name '_InvokeAVLDisposeItemUPP'; { old name was CallAVLDisposeItemProc }
+{
+ * InvokeAVLWalkUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeAVLWalkUPP(tree: AVLTreePtr; dataP: UnivPtr; visitStage: AVLVisitStage; node: AVLNodeType; level: UInt32; balance: SInt32; refCon: UnivPtr; userRoutine: AVLWalkUPP): OSErr; external name '_InvokeAVLWalkUPP'; { old name was CallAVLWalkProc }
+{
+ Create an AVL tree. The compareItemsProc and the sizeItemProc are required; disposeItemProc is
+ optional and can be nil. The refCon is stored with the list, and is passed back to the
+ compareItemsProc, sizeItemProc, and disposeItemsProc calls. The allocation of the tree ( and all
+ nodes later added to the list with AVLInsert ) will be created in what is the current zone at the
+ time AVLInit() is called. Always call AVLDispose() to dispose of a list created with AVLInit().
+}
+{
+ * AVLInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AVLInit(flags: UInt32; compareItemsProc: AVLCompareItemsUPP; sizeItemProc: AVLItemSizeUPP; disposeItemProc: AVLDisposeItemUPP; refCon: UnivPtr; var tree: AVLTreePtr): OSErr; external name '_AVLInit';
+{
+ 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.
+}
+{
+ * AVLDispose()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AVLDispose(var tree: AVLTreePtr; order: AVLOrder): OSErr; external name '_AVLDispose';
+{
+ Iterate across all of the items in the tree, in the order specified. kLeftToRight is
+ basically lowest-to-highest order, kRightToLeft is highest-to-lowest order. For each
+ node in the tree, it will call the walkProc with three messages ( at the appropriate
+ time ). First, with kAVLPreOrder when the walking gets to this node in the tree,
+ before handling either the left or right subtree, secondly, with kAVLInOrder after
+ handling one subtree but before handling the other, and lastly with kAVLPostOrder after
+ handling both subtrees. If you want to handle items in order, then only do something
+ if the visit stage is kAVLInOrder. You can only call AVLRemove() from inside a walkProc
+ if visit stage is kAVLPostOrder ( because if you remove a node during the pre or in order
+ stages you will corrupt the list ) OR if you return a non-zero result from the walkProc
+ call which called AVLRemove() to immediately terminate the walkProc. Do not call AVLInsert()
+ to insert a node into the tree from inside a walkProc.
+ The walkProc function gets called with the AVLTreePtr, a pointer to the data for the
+ current node ( which you can change in place as long as you do not affect the order within
+ the tree ), the visit stage, the type of the current node ( leaf node, right or left branch,
+ or full tree ), the level within the tree ( the root is level 1 ), the balance for the
+ current node, and the refCon passed to AVLWalk(). This refCon is different from the one passed
+ into AVLInit(); use AVLGetRefCon() to get that refCon if you want it inside a walkProc.
+ ( Most walkProcs will not care about the values for node type, level, or balance. )
+}
+{
+ * AVLWalk()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AVLWalk(tree: AVLTreePtr; walkProc: AVLWalkUPP; order: AVLOrder; walkRefCon: UnivPtr): OSErr; external name '_AVLWalk';
+{ Return the number of items in the given tree. }
+{
+ * AVLCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AVLCount(tree: AVLTreePtr; var count: UInt32): OSErr; external name '_AVLCount';
+{
+ Return the one-based index-th item from the tree by putting it's data at dataPtr
+ if dataPtr is non-nil, and it's size into *itemSize if itemSize is non-nil.
+ If index is out of range, return errItemNotFoundInTree. ( Internally, this does
+ an AVLWalk(), so the tree can not be modified while this call is in progress ).
+}
+{
+ * AVLGetIndItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AVLGetIndItem(tree: AVLTreePtr; index: UInt32; dataPtr: UnivPtr; var itemSize: UInt32): OSErr; external name '_AVLGetIndItem';
+{
+ Insert the given item into the tree. This will call the tree's sizeItemProc
+ to determine how big the item at data is, and then will make a copy of the
+ item and insert it into the tree in the appropriate place. If an item already
+ exists in the tree with the same key ( so that the compareItemsUPP returns 0
+ when asked to compare this item to an existing one ), then it will return
+ errItemNotFoundInTree.
+}
+{
+ * AVLInsert()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AVLInsert(tree: AVLTreePtr; data: UnivPtr): OSErr; external name '_AVLInsert';
+{
+ Remove any item from the tree with the given key. If dataPtr != nil, then
+ copy the item's data to dataPtr before removing it from the tree. Before
+ removing the item, call the tree's disposeItemProc to let it release anything
+ used by the data in the tree. It is not necessary to fill in a complete
+ record for key, only that the compareItemsProc return 0 when asked to compare
+ the data at key with the node in the tree to be deleted. If the item cannot
+ be found in the tree, this will return errItemNotFoundInTree.
+}
+{
+ * AVLRemove()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AVLRemove(tree: AVLTreePtr; key: UnivPtr; dataPtr: UnivPtr; var itemSize: UInt32): OSErr; external name '_AVLRemove';
+{
+ Find the item in the tree with the given key, and return it's data in
+ dataPtr ( if dataPtr != nil ), and it's size in *itemSize ( if itemSize
+ != nil ). It is not necessary to fill in a complete record for key,
+ only that the compareItemsProc return 0 when asked to compare the data
+ at key with the node in the tree to be deleted. If the item cannot
+ be found in the tree, this will return errItemNotFoundInTree.
+}
+{
+ * AVLFind()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AVLFind(tree: AVLTreePtr; key: UnivPtr; dataPtr: UnivPtr; var itemSize: UInt32): OSErr; external name '_AVLFind';
+{
+ Get the refCon for the given tree ( set in AVLInit ) and return it.
+ If the given tree is invalid, then return nil.
+}
+{
+ * AVLGetRefcon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AVLGetRefcon(tree: AVLTreePtr; var refCon: UnivPtr): OSErr; external name '_AVLGetRefcon';
+{
+ Get the refCon for the given tree ( set in AVLInit ) and return it.
+ If the given tree is invalid, then return nil.
+}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * AVLLockTree()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AVLLockTree(tree: AVLTreePtr): OSErr; external name '_AVLLockTree';
+{
+ Get the refCon for the given tree ( set in AVLInit ) and return it.
+ If the given tree is invalid, then return nil.
+}
+{
+ * AVLUnlockTree()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AVLUnlockTree(tree: AVLTreePtr): OSErr; external name '_AVLUnlockTree';
+{
+ Get the refCon for the given tree ( set in AVLInit ) and return it.
+ If the given tree is invalid, then return nil.
+}
+{
+ * AVLCheckTree()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AVLCheckTree(tree: AVLTreePtr): OSErr; external name '_AVLCheckTree';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ALIGN MAC68K}
+
+
+{unit AXActionConstants}
+{
+ * AXActionConstants.h
+ * HIServices
+ *
+ * Created by John Louch on Wed Feb 25 2004.
+ * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{
+ TBD: Explain general philosophy on whether to expose an action or not.
+ Our initial philopsophy is to not to have an action where there is a menu item
+ or button that does the same thing.
+}
+
+// standard actions
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXPressAction CFSTRP('AXPress')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIncrementAction CFSTRP('AXIncrement')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDecrementAction CFSTRP('AXDecrement')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXConfirmAction CFSTRP('AXConfirm')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXCancelAction CFSTRP('AXCancel')}
+{$endc}
+
+// new actions
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRaiseAction CFSTRP('AXRaise')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXShowMenuAction CFSTRP('AXShowMenu')}
+{$endc}
+
+// obsolete actions will be removed soon
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXPickAction CFSTRP('AXPick')}
+{$endc}
+
+
+{unit AXAttributeConstants}
+{
+ * AXAttributeConstants.h
+ * HIServices
+ *
+ * Created by John Louch on Wed Feb 25 2004.
+ * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Attributes }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ Quick reference:
+
+ // informational attributes
+ kAXRoleAttribute
+ kAXSubroleAttribute
+ kAXRoleDescriptionAttribute
+ kAXTitleAttribute
+ kAXDescriptionAttribute
+ kAXHelpAttribute
+
+ // hierarchy or relationship attributes
+ kAXParentAttribute
+ kAXChildrenAttribute
+ kAXSelectedChildrenAttribute
+ kAXVisibleChildrenAttribute
+ kAXWindowAttribute
+ kAXTopLevelUIElementAttribute
+ kAXTitleUIElementAttribute
+ kAXServesAsTitleForUIElementsAttribute
+ kAXLinkedUIElementsAttribute
+
+ // visual state attributes
+ kAXEnabledAttribute
+ kAXFocusedAttribute
+ kAXPositionAttribute
+ kAXSizeAttribute
+
+ // value attributes
+ kAXValueAttribute
+ kAXMinValueAttribute
+ kAXMaxValueAttribute
+ kAXValueIncrementAttribute
+ kAXValueWrapsAttribute
+ kAXAllowedValuesAttribute
+
+ // text-specific attributes
+ kAXSelectedTextAttribute
+ kAXSelectedTextRangeAttribute
+ kAXVisibleCharacterRangeAttribute
+ kAXNumberOfCharactersAttribute
+ kAXSharedTextUIElementsAttribute
+ kAXSharedCharacterRangeAttribute
+
+ // window, sheet, or drawer-specific attributes
+ kAXMainAttribute
+ kAXMinimizedAttribute
+ kAXCloseButtonAttribute
+ kAXZoomButtonAttribute
+ kAXMinimizeButtonAttribute
+ kAXToolbarButtonAttribute
+ kAXProxyAttribute
+ kAXGrowAreaAttribute
+ kAXModalAttribute
+ kAXDefaultButtonAttribute
+ kAXCancelButtonAttribute
+
+ // menu or menu item-specific attributes
+ kAXMenuItemCmdCharAttribute
+ kAXMenuItemCmdVirtualKeyAttribute
+ kAXMenuItemCmdGlyphAttribute
+ kAXMenuItemCmdModifiersAttribute
+ kAXMenuItemMarkCharAttribute
+ kAXMenuItemPrimaryUIElementAttribute
+
+ // application element-specific attributes
+ kAXMenuBarAttribute
+ kAXWindowsAttribute
+ kAXFrontmostAttribute
+ kAXHiddenAttribute
+ kAXMainWindowAttribute
+ kAXFocusedWindowAttribute
+ kAXFocusedUIElementAttribute
+
+ // date/time-specific attributes
+ kAXHourFieldAttribute
+ kAXMinuteFieldAttribute
+ kAXSecondFieldAttribute
+ kAXAMPMFieldAttribute
+ kAXDayFieldAttribute
+ kAXMonthFieldAttribute
+ kAXYearFieldAttribute
+
+ // table, outline, or browser-specific attributes
+ kAXRowsAttribute
+ kAXVisibleRowsAttribute
+ kAXSelectedRowsAttribute
+ kAXColumnsAttribute
+ kAXVisibleColumnsAttribute
+ kAXSelectedColumnsAttribute
+ kAXSortDirectionAttribute
+ kAXColumnHeaderUIElementsAttribute
+ kAXIndexAttribute
+ kAXDisclosingAttribute
+ kAXDisclosedRowsAttribute
+ kAXDisclosedByRowAttribute
+
+ // matte-specific attributes
+ kAXMatteHoleAttribute
+ kAXMatteContentUIElementAttribute
+
+ // ruler-specific attributes
+ kAXMarkerUIElementsAttribute
+ kAXUnitsAttribute
+ kAXUnitDescriptionAttribute
+ kAXMarkerTypeAttribute
+ kAXMarkerTypeDescriptionAttribute
+
+ // miscellaneous or role-specific attributes
+ kAXHorizontalScrollBarAttribute
+ kAXVerticalScrollBarAttribute
+ kAXOrientationAttribute
+ kAXHeaderAttribute
+ kAXEditedAttribute
+ kAXTabsAttribute
+ kAXOverflowButtonAttribute
+ kAXFilenameAttribute
+ kAXExpandedAttribute
+ kAXSelectedAttribute
+ kAXSplittersAttribute
+ kAXContentsAttribute
+ kAXNextContentsAttribute
+ kAXPreviousContentsAttribute
+ kAXDocumentAttribute
+ kAXIncrementorAttribute
+ kAXDecrementButtonAttribute
+ kAXIncrementButtonAttribute
+ kAXColumnTitleAttribute
+ kAXURLAttribute
+ kAXLabelUIElementsAttribute
+ kAXLabelValueAttribute
+ kAXShownMenuUIElementAttribute
+ kAXIsApplicationRunningAttribute
+ kAXFocusedApplicationAttribute
+}
+
+
+{
+ kAXRoleAttribute
+
+ Identifies the basic type of an element.
+
+ Value: A CFStringRef of one of the role strings defined in this header, or a new
+ role string of your own invention. The string should not be localized, and it does
+ not need to be human-readable. Instead of inventing new role strings, see if a
+ custom element can be identified by an existing role string and a new subrole. See
+ kAXSubroleAttribute.
+
+ Writable? No.
+
+ Required for all elements. Even in the worst case scenario where an element cannot
+ figure out what its basic type is, it can still supply the value kAXUnknownRole.
+
+ Carbon Accessorization Notes: If your HIObjectClass or Carbon Event handler provides
+ the kAXRoleAttribute, it must also provide the kAXRoleDescriptionAttribute.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRoleAttribute CFSTRP('AXRole')}
+{$endc}
+
+
+{
+ kAXSubroleAttribute
+
+ More specifically identifies the type of an element beyond the basic type provided
+ by kAXRoleAttribute.
+
+ Value: A CFStringRef of one of the subrole strings defined in this header, or a new
+ subrole string of your own invention. The string should not be localized, and it does
+ not need to be human-readable.
+
+ Writable? No.
+
+ Required only when an element's kAXRoleAttribute alone doesn't provide an assistive
+ application with enough information to convey the meaning of this element to the user.
+
+ An example element that offers the kAXSubroleAttribute is a window's close box. Its
+ kAXRoleAttribute value is kAXButtonRole and its kAXSubroleAttribute is
+ kAXCloseButtonSubrole. It is of role kAXButtonRole because it offers no additional
+ actions or attributes above and beyond what other kAXButtonRole elements provide; it
+ was given a subrole in order to allow an assistive app to communicate the close box's
+ semantic difference to the user.
+
+ Carbon Accessorization Notes: If your HIObjectClass or Carbon Event handler provides
+ the kAXSubroleAttribute, it must also provide the kAXRoleDescriptionAttribute.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSubroleAttribute CFSTRP('AXSubrole')}
+{$endc}
+
+
+{
+ kAXRoleDescriptionAttribute
+
+ A localized, human-readable string that an assistive application can present to the user
+ as an explanation of an element's basic type or purpose. Examples would be "push button"
+ or "secure text field". The string's language should match the language of the app that
+ the element lives within. The string should be all lower-case and contain no punctuation.
+
+ Two elements with the same kAXRoleAttribute and kAXSubroleAttribute should have the
+ same kAXRoleDescriptionAttribute.
+
+ Value: A localized, human-readable CFStringRef.
+
+ Writable? No.
+
+ Required for all elements. Even in the worst case scenario where an element cannot
+ figure out what its basic type is, it can still supply the value "unknown".
+
+ Carbon Accessorization Notes: The HIObjectClass or Carbon Event handler that provides
+ the AXRole and/or AXSubrole for an element is the one that must also handle the
+ AXRoleDescription attribute. If an HIObjectClass or Carbon Event handler does not
+ provide either the AXRole or AXSubrole, it must not provide the AXRoleDescription.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRoleDescriptionAttribute CFSTRP('AXRoleDescription')}
+{$endc}
+
+
+{
+ kAXHelpAttribute
+
+ A localized, human-readable CFStringRef that offers help content for an element.
+ This is often the same information that would be provided in a help tag for the element.
+
+ Value: A localized, human-readable CFStringRef.
+
+ Writable? No.
+
+ Recommended for any element that has help data available.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHelpAttribute CFSTRP('AXHelp')}
+{$endc}
+
+
+{
+ kAXTitleAttribute
+
+ The localized, human-readable string that is displayed as part of the element's
+ normal visual interface. For example, a OK button's kAXTitleElement is the string
+ "OK", and a menu item's kAXTitleElement is the text of the menu item.
+
+ Value: A localized, human-readable CFStringRef.
+
+ Writable? No.
+
+ Required if the element draws a string as part of its normal visual interface.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTitleAttribute CFSTRP('AXTitle')}
+{$endc}
+
+
+{
+ kAXValueAttribute
+
+ A catch-all attribute that represents a user modifiable setting of an element. For
+ example, the contents of an editable text field, the position of a scroll bar thumb,
+ and whether a check box is checked are all communicated by the kAXValueAttribute of
+ their respective elements.
+
+ Value: Varies, but will always be the same type for a given kind of element. Each
+ role that offers kAXValueAttribute will specify the type of data that will be used
+ for its value.
+
+ Writable? Generally yes. However, it does not need to be writable if some other form
+ of direct manipulation is more appropriate for causing a value change. For example,
+ a kAXScrollBar's kAXValueAttribute is writable because it allows an efficient way
+ for the user to get to a specific position in the element being scrolled. By
+ contrast, a kAXCheckBox's kAXValueAttribute is not settable because underlying
+ functionality of the check box widget relies on it being clicked on; therefore, it
+ changes its own kAXValueAttribute appropriately in response to the kAXPressAction.
+
+ Required for many user manipulatable elements, or those whose value state conveys
+ important information.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXValueAttribute CFSTRP('AXValue')}
+{$endc}
+
+
+{
+ kAXMinValueAttribute
+
+ Only used in conjunction with kAXValueAttribute and kAXMaxValueAttribute, this
+ attribute represents the minimum value that an element can display. This is useful
+ for things like sliders and scroll bars, where the user needs to have an understanding
+ of how much the kAXValueAttribute can vary.
+
+ Value: Same data type as the element's kAXValueAttribute.
+
+ Writable? No.
+
+ Required for many user maniipulatable elements. See kAXValueAttribute for more
+ details.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMinValueAttribute CFSTRP('AXMinValue')}
+{$endc}
+
+
+{
+ kAXMaxValueAttribute
+
+ Only used in conjunction with kAXValueAttribute and kAXMinValueAttribute, this
+ attribute represents the maximum value that an element can display. This is useful
+ for things like sliders and scroll bars, where the user needs to have an understanding
+ of how much the kAXValueAttribute can vary.
+
+ Value: Same data type as the element's kAXValueAttribute.
+
+ Writable? No.
+
+ Required for many user maniipulatable elements. See kAXValueAttribute for more
+ details.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMaxValueAttribute CFSTRP('AXMaxValue')}
+{$endc}
+
+
+{
+ kAXValueIncrementAttribute
+
+ Only used in conjunction with kAXValueAttribute, this attribute represents the amount
+ a value will change in one action on the given element. In particular, it is used on
+ elements of role kAXIncrementorRole in order to give the user an idea of how much its
+ value will change with a single click on the up or down arrow.
+
+ Value: Same data type as the element's kAXValueAttribute.
+
+ Writable? No.
+
+ Recommended for kAXIncrementorRole and other similar elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXValueIncrementAttribute CFSTRP('AXValueIncrement')}
+{$endc}
+
+
+{
+ kAXAllowedValuesAttribute
+
+ An array of the allowed values for a slider or other widget that displays
+ a large value range, but which can only be set to a small subset of values
+ within that range.
+
+ Value: A CFArrayRef of whatever type the element uses for its kAXValueAttribute.
+
+ Writable? No.
+
+ Recommended for sliders or other elements that can only be set to a small
+ set of values.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXAllowedValuesAttribute CFSTRP('AXAllowedValues')}
+{$endc}
+
+
+{
+ kAXEnabledAttribute
+
+ Indicates whether the element can be interacted with by the user. For example,
+ a disabled push button's kAXEnabledAttribute will be false.
+
+ Value: A CFBooleanRef. True means enabled, false means disabled.
+
+ Writable? No.
+
+ Required for all views, menus, and menu items. Not required for windows.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXEnabledAttribute CFSTRP('AXEnabled')}
+{$endc}
+
+
+{
+ kAXFocusedAttribute
+
+ Indicates whether the element is the current keyboard focus. It should be writable
+ for any element that can accept keyboard focus, though you can only set the value
+ of kAXFocusedAttribute to true. You cannot unfocus an element by setting the value
+ to false. Only one element in a window's entire accessibility hierarchy should be
+ marked as focused.
+
+ Value: A CFBooleanRef. True means focused, false means not focused.
+
+ Writable? Yes, for any focusable element. No in all other cases.
+
+ Required for any focusable element. Not required for other elements, though it is
+ often offered for non-focusable elements in a read-only fashion.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFocusedAttribute CFSTRP('AXFocused')}
+{$endc}
+
+
+{
+ kAXParentAttribute
+
+ Indicates the element's container element in the visual element hierarchy. A push
+ button's kAXParentElement might be a window element or a group. A sheet's
+ kAXParentElement will be a window element. A window's kAXParentElement will be the
+ application element. A menu item's kAXParentElement will be a menu element.
+
+ Value: An AXUIElementRef.
+
+ Writable? No.
+
+ Required for every element except the application. Everything else in the visual
+ element hierarchy must have a parent.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXParentAttribute CFSTRP('AXParent')}
+{$endc}
+
+
+{
+ kAXChildrenAttribute
+
+ Indicates the sub elements of a given element in the visual element hierarchy. A tab
+ group's kAXChildrenAttribute is an array of tab radio button elements. A window's
+ kAXChildrenAttribute is an array of the first-order views elements within the window.
+ A menu's kAXChildrenAttribute is an array of the menu item elements.
+
+ A given element may only be in the child array of one other element. If an element is
+ in the child array of some other element, the element's kAXParentAttribute must be
+ the other element.
+
+ Value: A CFArrayRef of AXUIElementRefs.
+
+ Writable? No.
+
+ Required for elements that contain sub elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXChildrenAttribute CFSTRP('AXChildren')}
+{$endc}
+
+
+{
+ kAXSelectedChildrenAttribute
+
+ Indicates the selected sub elements of a given element in the visual element hierarchy.
+ This is a the subset of the element's kAXChildrenAttribute that are selected. This is
+ commonly used in lists so an assistive app can know which list item are selected.
+
+ Value: A CFArrayRef of AXUIElementRefs.
+
+ Writable? Only if there is no other way to manipulate the set of selected elements via
+ accessibilty attributes or actions. Even if other ways exist, this attribute can be
+ writable as a convenience to assistive applications and their users. If
+ kAXSelectedChildrenAttribute is writable, a write request with a value of an empty
+ array should deselect all selected children.
+
+ Required for elements that contain selectable sub elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedChildrenAttribute CFSTRP('AXSelectedChildren')}
+{$endc}
+
+
+{
+ kAXVisibleChildrenAttribute
+
+ Indicates the visible sub elements of a given element in the visual element hierarchy.
+ This is a the subset of the element's kAXChildrenAttribute that a sighted user can
+ see on the screen. In a list element, kAXVisibleChildrenAttribute would be an array
+ of child elements that are currently scrolled into view.
+
+ Value: A CFArrayRef of AXUIElementRefs.
+
+ Writable? No.
+
+ Recommended for elements whose child elements can be occluded or scrolled out of view.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXVisibleChildrenAttribute CFSTRP('AXVisibleChildren')}
+{$endc}
+
+
+{
+ kAXWindowAttribute
+
+ A short cut for traversing an element's parent hierarchy until an element of role
+ kAXWindowRole is found. Note that the value for kAXWindowAttribute should not be
+ an element of role kAXSheetRole or kAXDrawerRole; instead, the value should be the
+ element of kAXWindowRole that the sheet or drawer is attached to.
+
+ Value: an AXUIElementRef of role kAXWindowRole.
+
+ Writable? No.
+
+ Required for any element that has an element of role kAXWindowRole somewhere
+ in its parent chain.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowAttribute CFSTRP('AXWindow')}
+{$endc}
+
+
+{
+ kAXTopLevelUIElementAttribute
+
+ This is very much like the kAXWindowAttribute, except that the value of this
+ attribute can be an element with role kAXSheetRole or kAXDrawerRole. It is
+ a short cut for traversing an element's parent hierarchy until an element of
+ role kAXWindowRole, kAXSheetRole, or kAXDrawerRole is found.
+
+ Value: An AXUIElementRef of role kAXWindowRole, kAXSheetRole, or kAXDrawerRole.
+
+ Writable? No.
+
+ Required for any element that has an appropriate element somewhere in its
+ parent chain.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTopLevelUIElementAttribute CFSTRP('AXTopLevelUIElement')}
+{$endc}
+
+
+{
+ kAXPositionAttribute
+
+ The global screen position of the top-left corner of an element.
+
+ Value: An AXValueRef with type kAXValueCGPointType. 0,0 is the top-left
+ corner of the screen that displays the menu bar. The value of the horizontal
+ axis increases to the right. The value of the vertical axis increases
+ downward. Units are pixels.
+
+ Writable? Generally no. However, some elements that can be moved by the user
+ through direct manipulation (like windows) should offer a writable position
+ attribute.
+
+ Required for all elements that are visible on the screen, which is virtually
+ all elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXPositionAttribute CFSTRP('AXPosition')}
+{$endc}
+
+
+{
+ kAXSizeAttribute
+
+ The vertical and horizontal dimensions of the element.
+
+ Value: An AXValueRef with type kAXValueCGSizeType. Units are pixels.
+
+ Writable? Generally no. However, some elements that can be resized by the user
+ through direct manipulation (like windows) should offer a writable size attribute.
+
+ Required for all elements that are visible on the screen, which is virtually
+ all elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSizeAttribute CFSTRP('AXSize')}
+{$endc}
+
+
+{
+ kAXOrientationAttribute
+
+ An indiciation of whether an element is drawn and/or interacted with in a
+ vertical or horizontal manner. Elements such as scroll bars and sliders offer
+ the kAXOrientationAttribute.
+
+ Value: kAXHorizontalOrientationValue, kAXVerticalOrientationValue, or rarely
+ kAXUnknownOrientationValue.
+
+ Writable? No.
+
+ Required for scroll bars, sliders, or other elements whose semantic or
+ associative meaning changes based on their orientation.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXOrientationAttribute CFSTRP('AXOrientation')}
+{$endc}
+
+
+{
+ kAXDescriptionAttribute
+
+ An indication of an element's purpose, in a way that is slightly more specific
+ than the kAXRoleDescriptionAttribute, but which is less wordy than the
+ kAXHelpAttribute. In English, the description should typically be a concatenation
+ of a usage adjective with the element's role description. For example, the
+ description of a slider in a font panel might be "font size slider". The string
+ should be all lower-case and contain no punctuation.
+
+ Value: A localized, human-readable CFStringRef.
+
+ Writable? No.
+
+ Recommended for all elements because it gives the user a concise indication of
+ an element's purpose.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDescriptionAttribute CFSTRP('AXDescription')}
+{$endc}
+// old name
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDescription CFSTRP('AXDescription')}
+{$endc}
+
+
+{
+ kAXSelectedTextAttribute
+
+ The selected text of an editable text element.
+
+ Value: A CFStringRef with the currently selected text of the element.
+
+ Writable? No.
+
+ Required for all editable text elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedTextAttribute CFSTRP('AXSelectedText')}
+{$endc}
+
+
+{
+ kAXSelectedTextRangeAttribute
+
+ The range of characters (not bytes) that defines the current selection of an
+ editable text element.
+
+ Value: An AXValueRef of type kAXValueCFRange.
+
+ Writable? Yes.
+
+ Required for all editable text elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedTextRangeAttribute CFSTRP('AXSelectedTextRange')}
+{$endc}
+
+
+{
+ kAXVisibleCharacterRangeAttribute
+
+ The range of characters (not bytes) that are scrolled into view in the editable
+ text element.
+
+ Value: An AXValueRef of type kAXValueCFRange.
+
+ Writable? No.
+
+ Required for elements of role kAXTextAreaRole. Not required for any other
+ elements, including those of role kAXTextFieldRole.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXVisibleCharacterRangeAttribute CFSTRP('AXVisibleCharacterRange')}
+{$endc}
+
+
+{
+ kAXNumberOfCharactersAttribute
+
+ The total number of characters (not bytes) in an editable text element.
+
+ Value: CFNumberRef
+
+ Writable? No.
+
+ Required for editable text elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXNumberOfCharactersAttribute CFSTRP('AXNumberOfCharacters')}
+{$endc}
+
+
+{
+ kAXSharedTextUIElementsAttribute
+
+ Value: CFArrayRef of AXUIElementRefs
+
+ Writable? No.
+
+ Optional?
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSharedTextUIElementsAttribute CFSTRP('AXSharedTextUIElements')}
+{$endc}
+
+
+{
+ kAXSharedCharacterRangeAttribute
+
+ Value: AXValueRef of type kAXValueCFRangeType
+
+ Writable? No.
+
+ Optional?
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSharedCharacterRangeAttribute CFSTRP('AXSharedCharacterRange')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXInsertionPointLineNumberAttribute CFSTRP('AXInsertionPointLineNumber')}
+{$endc}
+
+{
+ kAXMainAttribute
+
+ Whether a window is the main document window of an application. For an active
+ app, the main window is the single active document window. For an inactive app,
+ the main window is the single document window which would be active if the app
+ were active. Main does not necessarily imply that the window has key focus.
+
+ Value: A CFBooleanRef. True means the window is main. False means it is not.
+
+ Writable? Yes.
+
+ Required for all window elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMainAttribute CFSTRP('AXMain')}
+{$endc}
+
+
+{
+ kAXMinimizedAttribute
+
+ Whether a window is currently minimized to the dock.
+
+ Value: A CFBooleanRef. True means minimized.
+
+ Writable? Yes.
+
+ Required for all window elements that can be minimized.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMinimizedAttribute CFSTRP('AXMinimized')}
+{$endc}
+
+
+{
+ kAXCloseButtonAttribute
+
+ A convenience attribute so assistive apps can quickly access a window's close
+ button element.
+
+ Value: An AXUIElementRef of the window's close button element.
+
+ Writable? No.
+
+ Required for all window elements that have a close button.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXCloseButtonAttribute CFSTRP('AXCloseButton')}
+{$endc}
+
+
+{
+ kAXZoomButtonAttribute
+
+ A convenience attribute so assistive apps can quickly access a window's zoom
+ button element.
+
+ Value: An AXUIElementRef of the window's zoom button element.
+
+ Writable? No.
+
+ Required for all window elements that have a zoom button.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXZoomButtonAttribute CFSTRP('AXZoomButton')}
+{$endc}
+
+
+{
+ kAXMinimizeButtonAttribute
+
+ A convenience attribute so assistive apps can quickly access a window's minimize
+ button element.
+
+ Value: An AXUIElementRef of the window's minimize button element.
+
+ Writable? No.
+
+ Required for all window elements that have a minimize button.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMinimizeButtonAttribute CFSTRP('AXMinimizeButton')}
+{$endc}
+
+
+{
+ kAXToolbarButtonAttribute
+
+ A convenience attribute so assistive apps can quickly access a window's toolbar
+ button element.
+
+ Value: An AXUIElementRef of the window's toolbar button element.
+
+ Writable? No.
+
+ Required for all window elements that have a toolbar button.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXToolbarButtonAttribute CFSTRP('AXToolbarButton')}
+{$endc}
+
+
+{
+ kAXProxyAttribute
+
+ A convenience attribute so assistive apps can quickly access a window's document
+ proxy element.
+
+ Value: An AXUIElementRef of the window's document proxy element.
+
+ Writable? No.
+
+ Required for all window elements that have a document proxy.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXProxyAttribute CFSTRP('AXProxy')}
+{$endc}
+
+
+{
+ kAXGrowAreaAttribute
+
+ A convenience attribute so assistive apps can quickly access a window's grow
+ area element.
+
+ Value: An AXUIElementRef of the window's grow area element.
+
+ Writable? No.
+
+ Required for all window elements that have a grow area.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXGrowAreaAttribute CFSTRP('AXGrowArea')}
+{$endc}
+
+
+{
+ kAXModalAttribute
+
+ Whether a window is modal.
+
+ Value: A CFBooleanRef. True means the window is modal.
+
+ Writable? No.
+
+ Required for all window elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXModalAttribute CFSTRP('AXModal')}
+{$endc}
+
+
+{
+ kAXDefaultButtonAttribute
+
+ A convenience attribute so assistive apps can quickly access a window's default
+ button element, if any.
+
+ Value: An AXUIElementRef of the window's default button element.
+
+ Writable? No.
+
+ Required for all window elements that have a default button.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDefaultButtonAttribute CFSTRP('AXDefaultButton')}
+{$endc}
+
+
+{
+ kAXCancelButtonAttribute
+
+ A convenience attribute so assistive apps can quickly access a window's cancel
+ button element, if any.
+
+ Value: An AXUIElementRef of the window's cancel button element.
+
+ Writable? No.
+
+ Required for all window elements that have a cancel button.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXCancelButtonAttribute CFSTRP('AXCancelButton')}
+{$endc}
+
+// menu-specific attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemCmdCharAttribute CFSTRP('AXMenuItemCmdChar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemCmdVirtualKeyAttribute CFSTRP('AXMenuItemCmdVirtualKey')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemCmdGlyphAttribute CFSTRP('AXMenuItemCmdGlyph')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemCmdModifiersAttribute CFSTRP('AXMenuItemCmdModifiers')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemMarkCharAttribute CFSTRP('AXMenuItemMarkChar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemPrimaryUIElementAttribute CFSTRP('AXMenuItemPrimaryUIElement')}
+{$endc}
+
+// application-specific attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuBarAttribute CFSTRP('AXMenuBar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowsAttribute CFSTRP('AXWindows')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFrontmostAttribute CFSTRP('AXFrontmost')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHiddenAttribute CFSTRP('AXHidden')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMainWindowAttribute CFSTRP('AXMainWindow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFocusedWindowAttribute CFSTRP('AXFocusedWindow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFocusedUIElementAttribute CFSTRP('AXFocusedUIElement')}
+{$endc}
+
+
+{
+ kAXHeaderAttribute
+
+ A convenience attribute whose value is an element that is a header for another
+ element. For example, an outline element has a header attribute whose value is
+ a element of role AXGroup that contains the header buttons for each column.
+ Used for things like tables, outlines, columns, etc.
+
+ Value: An AXUIElementRef whose role varies.
+
+ Writable? No.
+
+ Recommended for elements that have header elements contained within them that an
+ assistive application might want convenient access to.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHeaderAttribute CFSTRP('AXHeader')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXEditedAttribute CFSTRP('AXEdited')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXValueWrapsAttribute CFSTRP('AXValueWraps')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTabsAttribute CFSTRP('AXTabs')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTitleUIElementAttribute CFSTRP('AXTitleUIElement')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHorizontalScrollBarAttribute CFSTRP('AXHorizontalScrollBar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXVerticalScrollBarAttribute CFSTRP('AXVerticalScrollBar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXOverflowButtonAttribute CFSTRP('AXOverflowButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFilenameAttribute CFSTRP('AXFilename')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXExpandedAttribute CFSTRP('AXExpanded')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedAttribute CFSTRP('AXSelected')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSplittersAttribute CFSTRP('AXSplitters')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXNextContentsAttribute CFSTRP('AXNextContents')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDocumentAttribute CFSTRP('AXDocument')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDecrementButtonAttribute CFSTRP('AXDecrementButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIncrementButtonAttribute CFSTRP('AXIncrementButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXPreviousContentsAttribute CFSTRP('AXPreviousContents')}
+{$endc}
+
+
+{
+ kAXContentsAttribute
+
+ A convenience attribute so assistive apps can find interesting child elements
+ of a given element, while at the same time avoiding non-interesting child
+ elements. For example, the contents of a scroll area are the children that get
+ scrolled, and not the horizontal and/or vertical scroll bars. The contents of
+ a tab group does not include the tabs themselves.
+
+ Value: A CFArrayRef of AXUIElementRefs.
+
+ Writable? No.
+
+ Recommended for elements that have children that act upon or are separate from
+ other children.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXContentsAttribute CFSTRP('AXContents')}
+{$endc}
+
+
+{
+ kAXIncrementorAttribute
+
+ Convenience attribute that yields the incrementor of a time field or date
+ field element.
+
+ Value: A AXUIElementRef of role kAXIncrementorRole.
+
+ Writable? No.
+
+ Required for time field and date field elements that display an incrementor.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIncrementorAttribute CFSTRP('AXIncrementor')}
+{$endc}
+
+
+{
+ kAXHourFieldAttribute
+
+ Convenience attribute that yields the hour field of a time field element.
+
+ Value: A AXUIElementRef of role kAXTextFieldRole that is used to edit the
+ hours in a time field element.
+
+ Writable? No.
+
+ Required for time field elements that display hours.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHourFieldAttribute CFSTRP('AXHourField')}
+{$endc}
+
+
+{
+ kAXMinuteFieldAttribute
+
+ Convenience attribute that yields the minute field of a time field element.
+
+ Value: A AXUIElementRef of role kAXTextFieldRole that is used to edit the
+ minutes in a time field element.
+
+ Writable? No.
+
+ Required for time field elements that display minutes.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMinuteFieldAttribute CFSTRP('AXMinuteField')}
+{$endc}
+
+
+{
+ kAXSecondFieldAttribute
+
+ Convenience attribute that yields the seconds field of a time field element.
+
+ Value: A AXUIElementRef of role kAXTextFieldRole that is used to edit the
+ seconds in a time field element.
+
+ Writable? No.
+
+ Required for time field elements that display seconds.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSecondFieldAttribute CFSTRP('AXSecondField')}
+{$endc}
+
+
+{
+ kAXAMPMFieldAttribute
+
+ Convenience attribute that yields the AM/PM field of a time field element.
+
+ Value: A AXUIElementRef of role kAXTextFieldRole that is used to edit the
+ AM/PM setting in a time field element.
+
+ Writable? No.
+
+ Required for time field elements that displays an AM/PM setting.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXAMPMFieldAttribute CFSTRP('AXAMPMField')}
+{$endc}
+
+
+{
+ kAXDayFieldAttribute
+
+ Convenience attribute that yields the day field of a date field element.
+
+ Value: A AXUIElementRef of role kAXTextFieldRole that is used to edit the
+ day in a date field element.
+
+ Writable? No.
+
+ Required for date field elements that display days.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDayFieldAttribute CFSTRP('AXDayField')}
+{$endc}
+
+
+{
+ kAXMonthFieldAttribute
+
+ Convenience attribute that yields the month field of a date field element.
+
+ Value: A AXUIElementRef of role kAXTextFieldRole that is used to edit the
+ month in a date field element.
+
+ Writable? No.
+
+ Required for date field elements that display months.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMonthFieldAttribute CFSTRP('AXMonthField')}
+{$endc}
+
+
+{
+ kAXYearFieldAttribute
+
+ Convenience attribute that yields the year field of a date field element.
+
+ Value: A AXUIElementRef of role kAXTextFieldRole that is used to edit the
+ year in a date field element.
+
+ Writable? No.
+
+ Required for date field elements that display years.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXYearFieldAttribute CFSTRP('AXYearField')}
+{$endc}
+
+
+{
+ kAXColumnTitleAttribute
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXColumnTitleAttribute CFSTRP('AXColumnTitles')}
+{$endc}
+
+
+{
+ kAXURLAttribute
+
+ Value: A CFURLRef.
+
+ Writable? No.
+
+ Required for elements that represent a disk or network item.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXURLAttribute CFSTRP('AXURL')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXLabelUIElementsAttribute CFSTRP('AXLabelUIElements')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXLabelValueAttribute CFSTRP('AXLabelValue')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXShownMenuUIElementAttribute CFSTRP('AXShownMenuUIElement')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXServesAsTitleForUIElementsAttribute CFSTRP('AXServesAsTitleForUIElements')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXLinkedUIElementsAttribute CFSTRP('AXLinkedUIElements')}
+{$endc}
+
+// table/outline view attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRowsAttribute CFSTRP('AXRows')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXVisibleRowsAttribute CFSTRP('AXVisibleRows')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedRowsAttribute CFSTRP('AXSelectedRows')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXColumnsAttribute CFSTRP('AXColumns')}
+{$endc}
+
+
+{
+ kAXVisibleColumnsAttribute
+
+ Indicates the visible column sub-elements of a kAXBrowserRole element.
+ This is the subset of a browser's kAXColumnsAttribute where each column in the
+ array is one that is currently scrolled into view within the browser. It does
+ not include any columns that are currently scrolled out of view.
+
+ Value: A CFArrayRef of AXUIElementRefs representing the columns of a browser.
+ The columns will be grandchild elements of the browser, and will generally be
+ of role kAXScrollArea.
+
+ Writable? No.
+
+ Required for all browser elements.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXVisibleColumnsAttribute CFSTRP('AXVisibleColumns')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedColumnsAttribute CFSTRP('AXSelectedColumns')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSortDirectionAttribute CFSTRP('AXSortDirection')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXColumnHeaderUIElementsAttribute CFSTRP('AXColumnHeaderUIElements')}
+{$endc}
+
+// row/column attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIndexAttribute CFSTRP('AXIndex')}
+{$endc}
+
+// outline attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDisclosingAttribute CFSTRP('AXDisclosing')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDisclosedRowsAttribute CFSTRP('AXDisclosedRows')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDisclosedByRowAttribute CFSTRP('AXDisclosedByRow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDisclosureLevelAttribute CFSTRP('AXDisclosureLevel')}
+{$endc}
+
+// matte attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMatteHoleAttribute CFSTRP('AXMatteHole')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMatteContentUIElementAttribute CFSTRP('AXMatteContentUIElement')}
+{$endc}
+
+// ruler attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMarkerUIElementsAttribute CFSTRP('AXMarkerUIElements')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXUnitsAttribute CFSTRP('AXUnits')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXUnitDescriptionAttribute CFSTRP('AXUnitDescription')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMarkerTypeAttribute CFSTRP('AXMarkerType')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMarkerTypeDescriptionAttribute CFSTRP('AXMarkerTypeDescription')}
+{$endc}
+
+// Dock attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIsApplicationRunningAttribute CFSTRP('AXIsApplicationRunning')}
+{$endc}
+
+// search field attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSearchButtonAttribute CFSTRP('AXSearchButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXClearButtonAttribute CFSTRP('AXClearButton')}
+{$endc}
+
+// system-wide attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFocusedApplicationAttribute CFSTRP('AXFocusedApplication')}
+{$endc}
+
+// obsolete/unknown attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTextAttribute CFSTRP('AXText')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXVisibleTextAttribute CFSTRP('AXVisibleText')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIsEditableAttribute CFSTRP('AXIsEditable')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXColumnTitlesAttribute CFSTRP('AXColumnTitles')}
+{$endc}
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Parameterized Attributes }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+// Text Suite Parameterized Attributes
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXLineForIndexParameterizedAttribute CFSTRP('AXLineForIndex')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRangeForLineParameterizedAttribute CFSTRP('AXRangeForLine')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXStringForRangeParameterizedAttribute CFSTRP('AXStringForRange')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRangeForPositionParameterizedAttribute CFSTRP('AXRangeForPosition')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRangeForIndexParameterizedAttribute CFSTRP('AXRangeForIndex')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXBoundsForRangeParameterizedAttribute CFSTRP('AXBoundsForRange')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRTFForRangeParameterizedAttribute CFSTRP('AXRTFForRange')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXAttributedStringForRangeParameterizedAttribute CFSTRP('AXAttributedStringForRange')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXStyleRangeForIndexParameterizedAttribute CFSTRP('AXStyleRangeForIndex')}
+{$endc}
+
+
+{unit AXErrors}
+{
+ * AXError.h
+ *
+ * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ *
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+{ Unit name changed to AXErrors to avoid conflict with AXError type }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+const
+ kAXErrorSuccess = 0;
+ kAXErrorFailure = -25200;
+ kAXErrorIllegalArgument = -25201;
+ kAXErrorInvalidUIElement = -25202;
+ kAXErrorInvalidUIElementObserver = -25203;
+ kAXErrorCannotComplete = -25204;
+ kAXErrorAttributeUnsupported = -25205;
+ kAXErrorActionUnsupported = -25206;
+ kAXErrorNotificationUnsupported = -25207;
+ kAXErrorNotImplemented = -25208;
+ kAXErrorNotificationAlreadyRegistered = -25209;
+ kAXErrorNotificationNotRegistered = -25210;
+ kAXErrorAPIDisabled = -25211;
+ kAXErrorNoValue = -25212;
+ kAXErrorParameterizedAttributeUnsupported = -25213;
+
+type
+ AXError = SInt32;
+
+{unit AXNotificationConstants}
+{
+ * AXNotificationConstants.h
+ * HIServices
+ *
+ * Created by John Louch on Wed Feb 25 2004.
+ * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+// focus notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMainWindowChangedNotification CFSTRP('AXMainWindowChanged')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFocusedWindowChangedNotification CFSTRP('AXFocusedWindowChanged')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFocusedUIElementChangedNotification CFSTRP('AXFocusedUIElementChanged')}
+{$endc}
+
+// application notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXApplicationActivatedNotification CFSTRP('AXApplicationActivated')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXApplicationDeactivatedNotification CFSTRP('AXApplicationDeactivated')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXApplicationHiddenNotification CFSTRP('AXApplicationHidden')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXApplicationShownNotification CFSTRP('AXApplicationShown')}
+{$endc}
+
+// window notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowCreatedNotification CFSTRP('AXWindowCreated')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowMovedNotification CFSTRP('AXWindowMoved')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowResizedNotification CFSTRP('AXWindowResized')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowMiniaturizedNotification CFSTRP('AXWindowMiniaturized')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowDeminiaturizedNotification CFSTRP('AXWindowDeminiaturized')}
+{$endc}
+
+// new drawer, sheet, and help tag notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDrawerCreatedNotification CFSTRP('AXDrawerCreated')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSheetCreatedNotification CFSTRP('AXSheetCreated')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHelpTagCreatedNotification CFSTRP('AXHelpTagCreated')}
+{$endc}
+
+// element notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXValueChangedNotification CFSTRP('AXValueChanged')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXUIElementDestroyedNotification CFSTRP('AXUIElementDestroyed')}
+{$endc}
+
+// menu notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuOpenedNotification CFSTRP('AXMenuOpened')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuClosedNotification CFSTRP('AXMenuClosed')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemSelectedNotification CFSTRP('AXMenuItemSelected')}
+{$endc}
+
+// table/outline notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRowCountChangedNotification CFSTRP('AXRowCountChanged')}
+{$endc}
+
+// other notifications
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedChildrenChangedNotification CFSTRP('AXSelectedChildrenChanged')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXResizedNotification CFSTRP('AXResized')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMovedNotification CFSTRP('AXMoved')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXCreatedNotification CFSTRP('AXCreated')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedRowsChangedNotification CFSTRP('AXSelectedRowsChanged')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedColumnsChangedNotification CFSTRP('AXSelectedColumnsChanged')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSelectedTextChangedNotification CFSTRP('AXSelectedTextChanged')}
+{$endc}
+
+
+{unit AXRoleConstants}
+{
+ * AXRoleConstants.h
+ * HIServices
+ *
+ * Created by John Louch on Wed Feb 25 2004.
+ * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Roles }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ Every role offers a variety of attributes. There are some attributes that must be
+ supported by every element, regardless of role. Other attributes will be supported
+ by an element if/when appropriate data is supplied by the application. These
+ attributes' meanings and values are generally obvious. In order to save space, the
+ following attributes are not listed in the role documentation unless the role
+ handles them in a special fashion:
+
+ AXRole
+ AXRoleDescription
+ AXDescription
+ AXHelp
+ AXParent
+ AXChildren
+ AXWindow
+ AXTopLevelUIElement
+ AXEnabled
+ AXSize
+ AXPosition
+
+ Every attribute supported by a given role may have one or more symbols after its
+ name:
+ w means the attribute is writable.
+ o means it is an optional attribute that doesn't necessarily need to be
+ supported by all elements with that role.
+
+ TBD:
+ Add a general section answering the following questions:
+ When and why would a developer create a new role?
+ When and why would a developer create a new subrole?
+ Add a Quick Reference section, like the one at the top of the attributes.
+}
+
+// standard roles
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXApplicationRole CFSTRP('AXApplication')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSystemWideRole CFSTRP('AXSystemWide')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXWindowRole CFSTRP('AXWindow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSheetRole CFSTRP('AXSheet')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDrawerRole CFSTRP('AXDrawer')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXGrowAreaRole CFSTRP('AXGrowArea')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXImageRole CFSTRP('AXImage')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXUnknownRole CFSTRP('AXUnknown')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXButtonRole CFSTRP('AXButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRadioButtonRole CFSTRP('AXRadioButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXCheckBoxRole CFSTRP('AXCheckBox')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXPopUpButtonRole CFSTRP('AXPopUpButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuButtonRole CFSTRP('AXMenuButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTabGroupRole CFSTRP('AXTabGroup')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTableRole CFSTRP('AXTable')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXColumnRole CFSTRP('AXColumn')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRowRole CFSTRP('AXRow')}
+{$endc}
+
+
+{
+ kAXOutlineRole
+
+ An element that contains row-based data. It may use disclosure triangles to manage the
+ display of hierarchies within the data. It may arrange each row's data into columns and
+ offer a header button above each column. The best example is the list view in a Finder
+ window or Open/Save dialog.
+
+ Outlines are typically children of AXScrollAreas, which manages the horizontal and/or
+ vertical scrolling for the outline. Outlines are expected to follow certain conventions
+ with respect to their hierarchy of sub-elements. In particular, if the outline uses
+ columns, the data should be accessible via either rows or columns. Thus, the data in a
+ given cell will be represented as two diffrent elements. Here's a hierarchy for a
+ typical outline:
+
+ AXScrollArea (parent of the outline)
+ AXScrollBar (if necessary, horizontal)
+ AXScrollBar (if necessary, vertical)
+ AXOutline
+ AXGroup (header buttons, optional)
+ AXButton, AXMenuButton, or <Varies> (header button)
+ ...
+ AXRow (first row)
+ AXStaticText (just one possible example)
+ AXButton (just another possible example)
+ AXTextField (ditto)
+ AXCheckBox (ditto)
+ AXRow (as above)
+ ...
+ AXColumn (first column)
+ AXStaticText (assumes the first column displays text)
+ AXStaticText
+ ...
+ AXColumn (second column)
+ AXButton (assumes the second column displays buttons)
+ AXButton
+ ...
+ ...
+
+ Attributes:
+ AXFocused (w)
+ AXRows - Array of subset of AXChildren that are rows.
+ AXVisibleRows - Array of subset of AXRows that are visible.
+ AXSelectedRows (w) Array of subset of AXRows that are selected.
+ AXColumns - Array of subset of children that are columns.
+ AXVisibleColumns - Array of subset of columns that are visible.
+ AXSelectedColumns (o) Array of subset of columns that are selected.
+ AXHeader (o) The AXGroup element that contains the header buttons.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXOutlineRole CFSTRP('AXOutline')}
+{$endc}
+
+
+{
+ kAXBrowserRole
+
+ An element that contains columns of hierarchical data. Examples include the column view
+ in Finder windows and Open/Save dialogs. Carbon's Data Browser in column view mode
+ represents itself as an AXBrowser. Cocoa's NSBrowser represents itself as an AXBrowser.
+
+ Browser elements are expected to have a particular hierarchy of sub-elements within it.
+ In particular, the child of an AXBrowser must be an AXScrollArea that manages the
+ horizontal scrolling. The horizontal AXScrollArea must include a child for each column
+ the interface displays. Columns can be any role that makes sense. Typically, columns
+ are vertical AXScrollAreas with AXList children. Here's a hierarchy for a typical
+ browser:
+
+ AXBrowser
+ AXScrollArea (manages the horizontal scrolling)
+ AXScrollBar (horizontal scroll bar)
+ AXScrollArea (first column)
+ AXScrollBar (column's vertical scroll bar)
+ AXList (column content is typically a list, but it could be another role)
+ <Varies> (cell)
+ ...
+ <Varies> (cell)
+ AXScrollArea (second column)
+ ...
+ AXScrollArea (third column)
+ ...
+ AXGroup (preview column)
+ ...
+
+ Attributes:
+ AXFocused (w)
+ AXColumns - Array of the grandchild column elements, which are typically
+ of the AXScrollArea role.
+ AXVisibleColumns - Array of the subset of elements in the AXColumns array
+ that are currently visible.
+ AXColumnTitles (o)
+ AXHorizontalScrollBar - The horizontal AXScrollBar of the browser's child
+ AXScrollArea.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXBrowserRole CFSTRP('AXBrowser')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXScrollAreaRole CFSTRP('AXScrollArea')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXScrollBarRole CFSTRP('AXScrollBar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRadioGroupRole CFSTRP('AXRadioGroup')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXListRole CFSTRP('AXList')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXGroupRole CFSTRP('AXGroup')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXValueIndicatorRole CFSTRP('AXValueIndicator')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXComboBoxRole CFSTRP('AXComboBox')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSliderRole CFSTRP('AXSlider')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIncrementorRole CFSTRP('AXIncrementor')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXBusyIndicatorRole CFSTRP('AXBusyIndicator')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXProgressIndicatorRole CFSTRP('AXProgressIndicator')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRelevanceIndicatorRole CFSTRP('AXRelevanceIndicator')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXToolbarRole CFSTRP('AXToolbar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDisclosureTriangleRole CFSTRP('AXDisclosureTriangle')}
+{$endc}
+
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTextFieldRole CFSTRP('AXTextField')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTextAreaRole CFSTRP('AXTextArea')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXStaticTextRole CFSTRP('AXStaticText')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuBarRole CFSTRP('AXMenuBar')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuBarItemRole CFSTRP('AXMenuBarItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuRole CFSTRP('AXMenu')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMenuItemRole CFSTRP('AXMenuItem')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSplitGroupRole CFSTRP('AXSplitGroup')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSplitterRole CFSTRP('AXSplitter')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXColorWellRole CFSTRP('AXColorWell')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTimeFieldRole CFSTRP('AXTimeField')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDateFieldRole CFSTRP('AXDateField')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHelpTagRole CFSTRP('AXHelpTag')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMatteRole CFSTRP('AXMatteRole')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDockItemRole CFSTRP('AXDockItem')}
+{$endc}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRulerRole CFSTRP('AXRuler')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXRulerMarkerRole CFSTRP('AXRulerMarker')}
+{$endc}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Subroles }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+// standard subroles
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXCloseButtonSubrole CFSTRP('AXCloseButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMinimizeButtonSubrole CFSTRP('AXMinimizeButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXZoomButtonSubrole CFSTRP('AXZoomButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXToolbarButtonSubrole CFSTRP('AXToolbarButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSecureTextFieldSubrole CFSTRP('AXSecureTextField')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTableRowSubrole CFSTRP('AXTableRow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXOutlineRowSubrole CFSTRP('AXOutlineRow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXUnknownSubrole CFSTRP('AXUnknown')}
+{$endc}
+
+// new subroles
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXStandardWindowSubrole CFSTRP('AXStandardWindow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDialogSubrole CFSTRP('AXDialog')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSystemDialogSubrole CFSTRP('AXSystemDialog')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFloatingWindowSubrole CFSTRP('AXFloatingWindow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSystemFloatingWindowSubrole CFSTRP('AXSystemFloatingWindow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIncrementArrowSubrole CFSTRP('AXIncrementArrow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDecrementArrowSubrole CFSTRP('AXDecrementArrow')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXIncrementPageSubrole CFSTRP('AXIncrementPage')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDecrementPageSubrole CFSTRP('AXDecrementPage')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSortButtonSubrole CFSTRP('AXSortButton')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXSearchFieldSubrole CFSTRP('AXSearchField')}
+{$endc}
+
+// dock subroles
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXApplicationDockItemSubrole CFSTRP('AXApplicationDockItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDocumentDockItemSubrole CFSTRP('AXDocumentDockItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXFolderDockItemSubrole CFSTRP('AXFolderDockItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXMinimizedWindowDockItemSubrole CFSTRP('AXMinimizedWindowDockItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXURLDockItemSubrole CFSTRP('AXURLDockItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDockExtraDockItemSubrole CFSTRP('AXDockExtraDockItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXTrashDockItemSubrole CFSTRP('AXTrashDockItem')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXProcessSwitcherListSubrole CFSTRP('AXProcessSwitcherList')}
+{$endc}
+
+
+{unit AXValueConstants}
+{
+ * AXValueConstants.h
+ * HIServices
+ *
+ * Created by John Louch on Wed Feb 25 2004.
+ * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+// orientations (see kAXOrientationAttribute in AXAttributeConstants.h)
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXHorizontalOrientationValue CFSTRP('AXHorizontalOrientation')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXVerticalOrientationValue CFSTRP('AXVerticalOrientation')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXUnknownOrientationValue CFSTRP('AXUnknownOrientation')}
+{$endc}
+
+// sort directions (see kAXSortDirectionAttribute in AXAttributeConstants.h)
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXAscendingSortDirectionValue CFSTRP('AXAscendingSortDirection')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXDescendingSortDirectionValue CFSTRP('AXDescendingSortDirection')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kAXUnknownSortDirectionValue CFSTRP('AXUnknownSortDirection')}
+{$endc}
+
+
+{unit AppleDiskPartitions}
+{
+ File: AppleDiskPartitions.p
+
+ Contains: The Apple disk partition scheme as defined in Inside Macintosh: Volume V.
+
+ Version: Technology: Mac OS 9
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 2000-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ Block 0 Definitions }
+
+const
+ sbSIGWord = $4552; { signature word for Block 0 ('ER') }
+ sbMac = 1; { system type for Mac }
+
+ { Partition Map Signatures }
+ pMapSIG = $504D; { partition map signature ('PM') }
+ pdSigWord = $5453; { partition map signature ('TS') }
+ oldPMSigWord = $5453;
+ newPMSigWord = $504D;
+
+
+ { Driver Descriptor Map }
+
+type
+ Block0Ptr = ^Block0;
+ Block0 = packed record
+ sbSig: UInt16; { unique value for SCSI block 0 }
+ sbBlkSize: UInt16; { block size of device }
+ sbBlkCount: UInt32; { number of blocks on device }
+ sbDevType: UInt16; { device type }
+ sbDevId: UInt16; { device id }
+ sbData: UInt32; { not used }
+ sbDrvrCount: UInt16; { driver descriptor count }
+ ddBlock: UInt32; { 1st driver's starting block }
+ ddSize: UInt16; { size of 1st driver (512-byte blks) }
+ ddType: UInt16; { system type (1 for Mac+) }
+ ddPad: array [0..242] of UInt16; { array[0..242] of SInt16; not used }
+ end;
+
+ { Driver descriptor }
+ DDMapPtr = ^DDMap;
+ DDMap = record
+ ddBlock: UInt32; { 1st driver's starting block }
+ ddSize: UInt16; { size of 1st driver (512-byte blks) }
+ ddType: UInt16; { system type (1 for Mac+) }
+ end;
+
+ { Constants for the ddType field of the DDMap structure. }
+
+const
+ kDriverTypeMacSCSI = $0001;
+ kDriverTypeMacATA = $0701;
+ kDriverTypeMacSCSIChained = $FFFF;
+ kDriverTypeMacATAChained = $F8FF;
+
+ { Partition Map Entry }
+
+type
+ PartitionPtr = ^Partition;
+ Partition = packed record
+ pmSig: UInt16; { unique value for map entry blk }
+ pmSigPad: UInt16; { currently unused }
+ pmMapBlkCnt: UInt32; { # of blks in partition map }
+ pmPyPartStart: UInt32; { physical start blk of partition }
+ pmPartBlkCnt: UInt32; { # of blks in this partition }
+ pmPartName: packed array [0..31] of UInt8; { ASCII partition name }
+ pmParType: packed array [0..31] of UInt8; { ASCII partition type }
+ pmLgDataStart: UInt32; { log. # of partition's 1st data blk }
+ pmDataCnt: UInt32; { # of blks in partition's data area }
+ pmPartStatus: UInt32; { bit field for partition status }
+ pmLgBootStart: UInt32; { log. blk of partition's boot code }
+ pmBootSize: UInt32; { number of bytes in boot code }
+ pmBootAddr: UInt32; { memory load address of boot code }
+ pmBootAddr2: UInt32; { currently unused }
+ pmBootEntry: UInt32; { entry point of boot code }
+ pmBootEntry2: UInt32; { currently unused }
+ pmBootCksum: UInt32; { checksum of boot code }
+ pmProcessor: packed array [0..15] of UInt8; { ASCII for the processor type }
+ pmPad: array [0..187] of UInt16; { array[0..187] of SInt16; not used }
+ end;
+
+
+ { Flags for the pmPartStatus field of the Partition data structure. }
+
+const
+ kPartitionAUXIsValid = $00000001;
+ kPartitionAUXIsAllocated = $00000002;
+ kPartitionAUXIsInUse = $00000004;
+ kPartitionAUXIsBootValid = $00000008;
+ kPartitionAUXIsReadable = $00000010;
+ kPartitionAUXIsWriteable = $00000020;
+ kPartitionAUXIsBootCodePositionIndependent = $00000040;
+ kPartitionIsWriteable = $00000020;
+ kPartitionIsMountedAtStartup = $40000000;
+ kPartitionIsStartup = $80000000;
+ kPartitionIsChainCompatible = $00000100;
+ kPartitionIsRealDeviceDriver = $00000200;
+ kPartitionCanChainToNext = $00000400;
+
+
+ { Well known driver signatures, stored in the first four byte of pmPad. }
+ kPatchDriverSignature = $70744452 (* 'ptDR' *); { SCSI and ATA[PI] patch driver }
+ kSCSIDriverSignature = $00010600; { SCSI hard disk driver }
+ kATADriverSignature = $77696B69 (* 'wiki' *); { ATA hard disk driver }
+ kSCSICDDriverSignature = $43447672 (* 'CDvr' *); { SCSI CD-ROM driver }
+ kATAPIDriverSignature = $41545049 (* 'ATPI' *); { ATAPI CD-ROM driver }
+ kDriveSetupHFSSignature = $44535531 (* 'DSU1' *); { Drive Setup HFS partition }
+
+
+{$ALIGN MAC68K}
+
+
+{unit Authorization}
+{
+ * Copyright (c) 2000-2002 Apple Computer, Inc. All Rights Reserved.
+ *
+ * The contents of this file constitute Original Code as defined in and are
+ * subject to the Apple Public Source License Version 1.2 (the 'License').
+ * You may not use this file except in compliance with the License. Please obtain
+ * a copy of the License at http://www.apple.com/publicsource and read it before
+ * using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY of ANY KIND, EITHER EXPRESS
+ * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
+ * LIMITATION, ANY WARRANTIES of MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
+ * specific language governing rights and limitations under the License.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ * Authorization.h -- APIs for implementing access control in applications
+ * and daemons.
+ }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+{!
+ @header Authorization
+ 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 desision 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 aquired.
+
+ 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.
+
+}
+
+
+{!
+ @defined kAuthorizationEmptyEnvironment
+ Parameter to specify to AuthorizationCreate when no environment is being provided.
+}
+const kAuthorizationEmptyEnvironment = nil;
+
+
+{!
+ @enum AuthorizationStatus
+ Error codes returned by Authorization API.
+}
+
+{
+ Note: the comments that appear after these errors are used to create SecErrorMessages.strings.
+ The comments must not be multi-line, and should be in a form meaningful to an end user. If
+ a different or additional comment is needed, it can be put in the header doc format, or on a
+ line that does not start with errZZZ.
+}
+
+const
+ errAuthorizationSuccess = 0; { The operation completed successfully. }
+ errAuthorizationInvalidSet = -60001; { The set parameter is invalid. }
+ errAuthorizationInvalidRef = -60002; { The authorization parameter is invalid. }
+ errAuthorizationInvalidTag = -60003; { The tag parameter is invalid. }
+ errAuthorizationInvalidPointer = -60004; { The authorizedRights parameter is invalid. }
+ errAuthorizationDenied = -60005; { The authorization was denied. }
+ errAuthorizationCanceled = -60006; { The authorization was cancelled by the user. }
+ errAuthorizationInteractionNotAllowed = -60007; { The authorization was denied since no user interaction was possible. }
+ errAuthorizationInternal = -60008; { something else went wrong }
+ errAuthorizationExternalizeNotAllowed = -60009; { authorization externalization denied }
+ errAuthorizationInternalizeNotAllowed = -60010; { authorization internalization denied }
+ errAuthorizationInvalidFlags = -60011; { invalid option flag(s) }
+ errAuthorizationToolExecuteFailure = -60031; { cannot execute privileged tool }
+ errAuthorizationToolEnvironmentError = -60032; { privileged tool environment error }
+ errAuthorizationBadAddress = -60033; { invalid socket address requested }
+
+
+{!
+ @enum AuthorizationFlags
+ Optional flags passed in to serveral Authorization APIs. See the description of AuthorizationCreate, AuthorizationCopyRights and AuthorizationFree for a description of how they affect those calls.
+}
+const
+ kAuthorizationFlagDefaults = 0;
+ kAuthorizationFlagInteractionAllowed = (1 shl 0);
+ kAuthorizationFlagExtendRights = (1 shl 1);
+ kAuthorizationFlagPartialRights = (1 shl 2);
+ kAuthorizationFlagDestroyRights = (1 shl 3);
+ kAuthorizationFlagPreAuthorize = (1 shl 4);
+
+ // private bits (do not use)
+ kAuthorizationFlagNoData = (1 shl 20);
+
+
+{!
+ @typedef AuthorizationFlags
+ Optional flags passed in to AuthorizationCreate.
+}
+type AuthorizationFlags = UInt32;
+
+
+{!
+ @enum AuthorizationRightFlags
+ Flags returned in the flags field of ItemSet Items when calling AuthorizationCopyRights().
+}
+const
+ kAuthorizationFlagCanNotPreAuthorize = (1 shl 0);
+
+
+{!
+ @typedef AuthorizationRef
+ Opaque reference to an authorization object.
+}
+type
+ AuthorizationRef = ^SInt32;
+
+
+{!
+ @typedef AuthorizationString
+ A zero terminated string in UTF-8 encoding.
+}
+type AuthorizationString = CStringPtr;
+
+
+{!
+ @struct AuthorizationItem
+ Each AuthorizationItem describes a single string-named item with optional
+ parameter value. The value must be contiguous memory of valueLength bytes;
+ internal structure is defined separately for each name.
+
+ @field name name of the item, as an AuthorizationString. Mandatory.
+ @field valueLength Number of bytes in parameter value. Must be 0 if no parameter value.
+ @field value Pointer to the optional parameter value associated with name.
+ Must be NULL if no parameter value.
+ @field flags Reserved field. Must be set to 0 on creation. Do not modify after that.
+}
+type
+ AuthorizationItem = record
+ name: AuthorizationString;
+ valueLength: UInt32;
+ value: Ptr;
+ flags: UInt32;
+ end;
+ AuthorizationItemPtr = ^AuthorizationItem;
+
+
+{!
+ @struct AuthorizationItemSet
+ An AuthorizationItemSet structure represents a set of zero or more AuthorizationItems. Since it is a set it should not contain any identical AuthorizationItems.
+
+ @field count Number of items identified by items.
+ @field items Pointer to an array of items.
+}
+type
+ AuthorizationItemSet = record
+ count: UInt32;
+ items: AuthorizationItemPtr;
+ end;
+ AuthorizationItemSetPtr = ^AuthorizationItemSet;
+
+{!
+ @struct AuthorizationExternalForm
+ An AuthorizationExternalForm structure can hold the externalized form of
+ an AuthorizationRef. As such, it can be transmitted across IPC channels
+ to other processes, which can re-internalize it to recover a valid AuthorizationRef
+ handle.
+ The data contained in an AuthorizationExternalForm should be considered opaque.
+
+ SECURITY NOTE: Applications should take care to not disclose the AuthorizationExternalForm to
+ potential attackers since it would authorize rights to them.
+}
+const kAuthorizationExternalFormLength = 32;
+
+type
+ AuthorizationExternalForm = record
+ bytes: packed array[0..(kAuthorizationExternalFormLength)-1] of char;
+ end;
+
+
+{!
+ @typedef AuthorizationRights
+ An AuthorizationItemSet representing a set of rights each with an associated argument (value).
+ Each argument value is as defined for the specific right they belong to. Argument values may not contain pointers as the should be copyable to different address spaces.
+}
+type AuthorizationRights = AuthorizationItemSet;
+type AuthorizationRightsPtr = ^AuthorizationRights;
+type AuthorizationRightsPtrPtr = ^AuthorizationRightsPtr;
+
+
+{!
+ @typedef AuthorizationEnvironment
+ An AuthorizationItemSet representing environmental information of potential use
+ to authorization decisions.
+}
+type AuthorizationEnvironment = AuthorizationItemSet;
+type AuthorizationEnvironmentPtr = ^AuthorizationEnvironment;
+
+
+{!
+ @function AuthorizationCreate
+ Create a new autorization object which can be used in other authorization calls. When the authorization is no longer needed AuthorizationFree should be called.
+
+ When the kAuthorizationFlagInteractionAllowed flag is set, user interaction will happen when required. Failing to set this flag will result in this call failing with a errAuthorizationInteractionNotAllowed status when interaction is required.
+
+ Setting the kAuthorizationFlagExtendRights flag will extend the currently available rights. If this flag is set the returned AuthorizationRef will grant all the rights requested when errAuthorizationSuccess is returned. If this flag is not set the operation will almost certainly succeed, but no attempt will be made to make the requested rights availible.
+ Call AuthorizationCopyRights to figure out which of the requested rights are granted by the returned AuthorizationRef.
+
+ Setting the kAuthorizationFlagPartialRights flag will cause this call to succeed if only some of the requested rights are being granted by the returned AuthorizationRef. Unless this flag is set this API will fail if not all the requested rights could be obtained.
+
+ Setting the kAuthorizationFlagDestroyRights flag will prevent any rights obtained during this call from being preserved after returning from this API (This is most useful when the authorization parameter is NULL and the caller doesn't want to affect the session state in any way).
+
+ Setting the kAuthorizationFlagPreAuthorize flag will pre authorize the requested rights so that at a later time -- by calling AuthorizationMakeExternalForm() follow by AuthorizationCreateFromExternalForm() -- the obtained rights can be used in a different process. Rights that can't be preauthorized will be treated as if they were authorized for the sake of returning an error (in other words if all rights are either authorized or could not be preauthorized this call will still succeed).
+ The rights which could not be preauthorized are not currently authorized and may fail to authorize when a later call to AuthorizationCopyRights() is made, unless the kAuthorizationFlagExtendRights and kAuthorizationFlagInteractionAllowed flags are set. Even then they might still fail if the user does not supply the correct credentials.
+ The reason for passing in this flag is to provide correct audit trail information and to avoid unnecessary user interaction.
+
+ @param rights (input/optional) An AuthorizationItemSet containing rights for which authorization is being requested. If none are specified the resulting AuthorizationRef will authorize nothing at all.
+ @param environment (input/optional) An AuthorizationItemSet containing enviroment state used when making the autorization decision. See the AuthorizationEnvironment type for details.
+ @param flags (input) options specified by the AuthorizationFlags enum. set all unused bits to zero to allow for future expansion.
+ @param authorization (output optional) A pointer to an AuthorizationRef to be returned. When the returned AuthorizationRef is no longer needed AuthorizationFree should be called to prevent anyone from using the aquired rights. If NULL is specified no new rights are returned, but the system will attempt to authorize all the requested rights and return the appropriate status.
+
+ @result errAuthorizationSuccess 0 authorization or all requested rights succeeded.
+
+ errAuthorizationDenied -60005 The authorization for one or more of the requested rights was denied.
+
+ errAuthorizationCanceled -60006 The authorization was cancelled by the user.
+
+ errAuthorizationInteractionNotAllowed -60007 The authorization was denied since no interaction with the user was allowed.
+}
+function AuthorizationCreate(rights: AuthorizationRightsPtr; environment: AuthorizationEnvironmentPtr; flags: AuthorizationFlags; var authorization: AuthorizationRef): OSStatus; external name '_AuthorizationCreate';
+
+
+{!
+ @function AuthorizationFree
+ Destroy an AutorizationRef object. If the kAuthorizationFlagDestroyRights flag is passed,
+ any rights associated with the authorization are lost. Otherwise, only local resources
+ are released, and the rights may still be available to other clients.
+
+ 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 effectivaly 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.
+
+ errAuthorizationInvalidRef -60002 The authorization parameter is invalid.
+}
+function AuthorizationFree(authorization: AuthorizationRef;flags: AuthorizationFlags): OSStatus; external name '_AuthorizationFree';
+
+{!
+ @function AuthorizationCopyRights
+ Given a set of rights, return the subset that is currently authorized
+ by the AuthorizationRef given.
+
+ When the kAuthorizationFlagInteractionAllowed flag is set, user interaction will happen when required. Failing to set this flag will result in this call failing with a errAuthorizationInteractionNotAllowed status when interaction is required.
+
+ Setting the kAuthorizationFlagExtendRights flag will extend the currently available rights.
+
+ Setting the kAuthorizationFlagPartialRights flag will cause this call to succeed if only some of the requested rights are being granted by the returned AuthorizationRef. Unless this flag is set this API will fail if not all the requested rights could be obtained.
+
+ Setting the kAuthorizationFlagDestroyRights flag will prevent any additional rights obtained during this call from being preserved after returning from this API.
+
+ Setting the kAuthorizationFlagPreAuthorize flag will pre authorize the requested rights so that at a later time -- by calling AuthorizationMakeExternalForm() follow by AuthorizationCreateFromExternalForm() -- the obtained rights can be used in a different process. Rights that can't be preauthorized will be treated as if they were authorized for the sake of returning an error (in other words if all rights are either authorized or could not be preauthorized this call will still succeed), and they will be returned in authorizedRights with their kAuthorizationFlagCanNotPreAuthorize bit in the flags field set to 1.
+ The rights which could not be preauthorized are not currently authorized and may fail to authorize when a later call to AuthorizationCopyRights() is made, unless the kAuthorizationFlagExtendRights and kAuthorizationFlagInteractionAllowed flags are set. Even then they might still fail if the user does not supply the correct credentials.
+ The reason for passing in this flag is to provide correct audit trail information and to avoid unnecessary user interaction.
+
+ Setting the kAuthorizationFlagPreAuthorize flag will pre authorize the requested rights so that at a later time -- by calling AuthorizationMakeExternalForm() follow by AuthorizationCreateFromExternalForm() -- the obtained rights can be used in a different process. When this flags is specified rights that can't be preauthorized will be returned as if they were authorized with their kAuthorizationFlagCanNotPreAuthorize bit in the flags field set to 1. These rights are not currently authorized and may fail to authorize later unless kAuthorizationFlagExtendRights and kAuthorizationFlagInteractionAllowed flags are set when the actual authorization is done. And even then they might still fail if the user does not supply the correct credentials.
+
+ @param authorization (input) The authorization object on which this operation is performed.
+ @param rights (input) A rights set (see AuthorizationCreate).
+ @param environment (input/optional) An AuthorizationItemSet containing enviroment state used when making the autorization decision. See the AuthorizationEnvironment type for details.
+ @param flags (input) options specified by the AuthorizationFlags enum. set all unused bits to zero to allow for future expansion.
+ @param authorizedRights (output/optional) A pointer to a newly allocated AuthorizationInfoSet in which the authorized subset of rights are returned (authorizedRights should be deallocated by calling AuthorizationFreeItemSet() when it is no longer needed). If NULL the only information returned is the status. Note that if the kAuthorizationFlagPreAuthorize flag was specified rights that could not be preauthorized are returned in authorizedRights, but their flags contains the kAuthorizationFlagCanNotPreAuthorize bit.
+
+ @result errAuthorizationSuccess 0 No error.
+
+ errAuthorizationInvalidRef -60002 The authorization parameter is invalid.
+
+ errAuthorizationInvalidSet -60001 The rights parameter is invalid.
+
+ errAuthorizationInvalidPointer -60004 The authorizedRights parameter is invalid.
+}
+function AuthorizationCopyRights(authorization: AuthorizationRef; const (*var*) rights: AuthorizationRights; environment: AuthorizationEnvironmentPtr; flags: AuthorizationFlags; authorizedRights: AuthorizationRightsPtrPtr): OSStatus; external name '_AuthorizationCopyRights';
+
+{!
+ @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 specifing 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.
+ @param info (output) A pointer to a newly allocated AuthorizationInfoSet in which the requested sideband infomation is returned (info should be deallocated by calling AuthorizationFreeItemSet() when it is no longer needed).
+
+ @result errAuthorizationSuccess 0 No error.
+
+ errAuthorizationInvalidRef -60002 The authorization parameter is invalid.
+
+ errAuthorizationInvalidTag -60003 The tag parameter is invalid.
+
+ errAuthorizationInvalidPointer -60004 The info parameter is invalid.
+}
+function AuthorizationCopyInfo(authorization: AuthorizationRef; tag: AuthorizationString; var info: AuthorizationItemSetPtr): OSStatus; external name '_AuthorizationCopyInfo';
+
+{!
+ @function AuthorizationMakeExternalForm
+ Turn an Authorization into an external "byte blob" form so it can be
+ transmitted to another process.
+ 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.
+
+ errAuthorizationInvalidRef -60002 The authorization parameter is invalid.
+
+
+}
+function AuthorizationMakeExternalForm(authorization: AuthorizationRef; var extForm: AuthorizationExternalForm): OSStatus; external name '_AuthorizationMakeExternalForm';
+
+
+{!
+ @function AuthorizationCreateFromExternalForm
+ Turn an Authorization into an external "byte blob" form so it can be
+ transmitted to another process.
+ 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 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';
+
+
+{!
+ @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.
+
+ errAuthorizationInvalidSet -60001 The set parameter is invalid.
+}
+function AuthorizationFreeItemSet(var setx: AuthorizationItemSet): OSStatus; external name '_AuthorizationFreeItemSet';
+
+
+{!
+ @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.
+ @param pathToTool Full pathname to the tool that should be executed
+ with enhanced privileges.
+ @param options Option bits (reserved). Must be zero.
+ @param arguments An argv-style vector of strings to be passed to the tool.
+ @param communicationsPipe Assigned a UNIX stdio FILE pointer for
+ a bidirectional pipe to communicate with the tool. The tool will have
+ this pipe as its standard I/O channels (stdin/stdout). If NULL, do not
+ establish a communications pipe.
+ }
+type
+ Arg10000Type = array[0..10000] of CStringPtr;
+ Arg10000TypePtr = ^Arg10000Type;
+function AuthorizationExecuteWithPrivileges(authorization: AuthorizationRef; pathToTool: CStringPtr; options: AuthorizationFlags; arguments: Arg10000TypePtr; communicationsPipe: UnivPtr): OSStatus; external name '_AuthorizationExecuteWithPrivileges';
+// communicationsPipe not yet supported
+
+
+{!
+ @function AuthorizationCopyPrivilegedReference
+ From within a tool launched via the AuthorizationExecuteWithPrivileges function
+ ONLY, retrieve the AuthorizationRef originally passed to that function.
+ 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.
+ }
+function AuthorizationCopyPrivilegedReference(var authorization: AuthorizationRef; flags: AuthorizationFlags): OSStatus; external name '_AuthorizationCopyPrivilegedReference';
+
+{unit AuthorizationTags}
+{
+ * Copyright (c) 2000-2002 Apple Computer, Inc. All Rights Reserved.
+ *
+ * The contents of this file constitute Original Code as defined in and are
+ * subject to the Apple Public Source License Version 1.2 (the 'License').
+ * You may not use this file except in compliance with the License. Please obtain
+ * a copy of the License at http://www.apple.com/publicsource and read it before
+ * using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY of ANY KIND, EITHER EXPRESS
+ * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
+ * LIMITATION, ANY WARRANTIES of MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
+ * specific language governing rights and limitations under the License.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ * AuthorizationTags.h -- Right tags for implementing access control in
+ * applications and daemons
+ }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+{!
+ @header AuthorizationTags
+ Draft version 2 01/23/2001
+
+ This header defines some of the supported rights tags to be used in the Authorization API.
+}
+
+
+{!
+ @define kAuthorizationEnvironmentUsername
+ The name of the AuthorizationItem that should be passed into the environment when specifying a username. The value and valueLength should contain the username itself.
+}
+const kAuthorizationEnvironmentUsername = 'username';
+
+{!
+ @define kAuthorizationEnvironmentPassword
+ The name of the AuthorizationItem that should be passed into the environment when specifying a password for a given username. The value and valueLength should contain the actual password data.
+}
+const kAuthorizationEnvironmentPassword = 'password';
+
+{!
+ @define kAuthorizationEnvironmentShared
+ The name of the AuthorizationItem that should be passed into the environment when specifying a username and password. Adding this entry to the environment will cause the username/password to be added to the shared credential pool of the calling applications session. This means that further calls by other applications in this session will automatically have this credential availible to them. The value is ignored.
+}
+const kAuthorizationEnvironmentShared = 'shared';
+
+{!
+ @define kAuthorizationRightExecute
+ The name of the AuthorizationItem that should be passed into the rights when preauthorizing for a call to AuthorizationExecuteWithPrivileges().
+
+ You need to aquire this right to be able to perform a AuthorizationExecuteWithPrivileges() operation. In addtion 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 kAuthorizationRightExecute= 'system.privilege.admin';
+
+{!
+ @define kAuthorizationEnvironmentPrompt
+ The name of the AuthorizationItem that should be passed into the environment when specifying a invocation specific additional text. The value should be a localized UTF8 string.
+}
+const kAuthorizationEnvironmentPrompt = 'prompt';
+
+{!
+ @define kAuthorizationEnvironmentIcon
+ The name of the AuthorizationItem that should be passed into the environment when specifying an alternate icon to be used. The value should be a full path to and image NSImage can deal with.
+}
+const kAuthorizationEnvironmentIcon = 'icon';
+
+{unit CFBase}
+{ CFBase.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+var kCFCoreFoundationVersionNumber: Float64; external name '_kCFCoreFoundationVersionNumber'; (* attribute const *)
+
+const
+ kCFCoreFoundationVersionNumber10_0 = 196.4;
+const
+ kCFCoreFoundationVersionNumber10_0_3 = 196.5;
+const
+ kCFCoreFoundationVersionNumber10_1 = 226.0;
+{ Note the next two do not follow the usual numbering policy from the base release }
+const
+ kCFCoreFoundationVersionNumber10_1_2 = 227.2;
+const
+ kCFCoreFoundationVersionNumber10_1_4 = 227.3;
+const
+ kCFCoreFoundationVersionNumber10_2 = 263.0;
+const
+ kCFCoreFoundationVersionNumber10_3 = 299.0;
+const
+ kCFCoreFoundationVersionNumber10_3_3 = 299.3;
+const
+ kCFCoreFoundationVersionNumber10_3_4 = 299.31;
+
+{$ifc TARGET_CPU_PPC_64}
+type
+ CFTypeID = UInt32;
+ CFOptionFlags = UInt64;
+ CFHashCode = UInt32;
+ CFIndex = SInt64;
+ CFIndexPtr = ^CFIndex;
+{$elsec}
+type
+ CFTypeID = UInt32;
+ CFOptionFlags = UInt32;
+ CFHashCode = UInt32;
+ CFIndex = SInt32;
+ CFIndexPtr = ^CFIndex;
+{$endc}
+
+{ Base "type" of all "CF objects", and polymorphic functions on them }
+type
+ CFTypeRef = ^SInt32; { an opaque 32-bit type }
+
+type
+ CFStringRef = ^SInt32; { an opaque 32-bit type }
+ CFStringRefPtr = ^CFStringRef;
+ CFMutableStringRef = ^SInt32; { an opaque 32-bit type }
+ CFMutableStringRefPtr = ^CFMutableStringRef;
+
+{
+ Type to mean any instance of a property list type;
+ currently, CFString, CFData, CFNumber, CFBoolean, CFDate,
+ CFArray, and CFDictionary.
+}
+type
+ CFPropertyListRef = CFTypeRef;
+
+{ Values returned from comparison functions }
+ CFComparisonResult = SInt32;
+const
+ kCFCompareLessThan = -1;
+ kCFCompareEqualTo = 0;
+ kCFCompareGreaterThan = 1;
+
+{ A standard comparison function }
+type
+ CFComparatorFunction = function( val1: {const} UnivPtr; val2: {const} UnivPtr; context: UnivPtr ): CFComparisonResult;
+
+{ Constant used by some functions to indicate failed searches. }
+{ This is of type CFIndex. }
+const
+ kCFNotFound = -1;
+
+
+{ Range type }
+type
+ CFRangePtr = ^CFRange;
+ CFRange = record
+ location: CFIndex;
+ length: CFIndex;
+ end;
+
+function CFRangeMake( loc: CFIndex; len: CFIndex ): CFRange; external name '___CFRangeMake';
+
+{ Private; do not use }
+function __CFRangeMake( loc: CFIndex; len: CFIndex ): CFRange; external name '___CFRangeMake';
+
+
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+{ Null representant }
+
+type
+ CFNullRef = ^SInt32; { an opaque 32-bit type }
+
+function CFNullGetTypeID: CFTypeID; external name '_CFNullGetTypeID';
+
+var kCFNull: CFNullRef; external name '_kCFNull'; (* attribute const *) // the singleton null instance
+
+{#endif}
+
+
+{ Allocator API
+
+ Most of the time when specifying an allocator to Create functions, the NULL
+ argument indicates "use the default"; this is the same as using kCFAllocatorDefault
+ or the return value from CFAllocatorGetDefault(). This assures that you will use
+ the allocator in effect at that time.
+
+ You should rarely use kCFAllocatorSystemDefault, the default default allocator.
+}
+type
+ CFAllocatorRef = ^SInt32; { an opaque 32-bit type }
+ CFAllocatorRefPtr = ^CFAllocatorRef;
+
+{ This is a synonym for NULL, if you'd rather use a named constant. }
+var kCFAllocatorDefault: CFAllocatorRef; external name '_kCFAllocatorDefault'; (* attribute const *)
+
+{ Default system allocator; you rarely need to use this. }
+var kCFAllocatorSystemDefault: CFAllocatorRef; external name '_kCFAllocatorSystemDefault'; (* attribute const *)
+
+{ This allocator uses malloc(), realloc(), and free(). This should not be
+ generally used; stick to kCFAllocatorDefault whenever possible. This
+ allocator is useful as the "bytesDeallocator" in CFData or
+ "contentsDeallocator" in CFString where the memory was obtained as a
+ result of malloc() type functions.
+}
+var kCFAllocatorMalloc: CFAllocatorRef; external name '_kCFAllocatorMalloc'; (* attribute const *)
+
+{ This allocator explicitly uses the default malloc zone, returned by
+ malloc_default_zone(). It should only be used when an object is
+ safe to be allocated in non-scanned memory.
+ }
+var kCFAllocatorMallocZone: CFAllocatorRef; external name '_kCFAllocatorMallocZone'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ 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.
+}
+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".
+}
+var kCFAllocatorUseContext: CFAllocatorRef; external name '_kCFAllocatorUseContext'; (* attribute const *)
+
+type
+ CFAllocatorRetainCallBack = function( info: {const} UnivPtr ): UnivPtr;
+ CFAllocatorReleaseCallBack = procedure( info: {const} UnivPtr );
+ CFAllocatorCopyDescriptionCallBack = function( info: {const} UnivPtr ): CFStringRef;
+ CFAllocatorAllocateCallBack = function( allocSize: CFIndex; hint: CFOptionFlags; info: UnivPtr ): UnivPtr;
+ CFAllocatorReallocateCallBack = function( ptr: UnivPtr; newsize: CFIndex; hint: CFOptionFlags; info: UnivPtr ): UnivPtr;
+ CFAllocatorDeallocateCallBack = procedure( ptr: UnivPtr; info: UnivPtr );
+ CFAllocatorPreferredSizeCallBack = function( size: CFIndex; hint: CFOptionFlags; info: UnivPtr ): CFIndex;
+ CFAllocatorContextPtr = ^CFAllocatorContext;
+ CFAllocatorContext = record
+ version: CFIndex;
+ info: UnivPtr;
+ retain: CFAllocatorRetainCallBack;
+ release: CFAllocatorReleaseCallBack;
+ copyDescription: CFAllocatorCopyDescriptionCallBack;
+ allocate: CFAllocatorAllocateCallBack;
+ reallocate: CFAllocatorReallocateCallBack;
+ deallocate: CFAllocatorDeallocateCallBack;
+ preferredSize: CFAllocatorPreferredSizeCallBack;
+ end;
+
+function CFAllocatorGetTypeID: CFTypeID; external name '_CFAllocatorGetTypeID';
+
+{
+ CFAllocatorSetDefault() sets the allocator that is used in the current
+ thread whenever NULL is specified as an allocator argument. This means
+ that most, if not all allocations will go through this allocator. It
+ also means that any allocator set as the default needs to be ready to
+ deal with arbitrary memory allocation requests; in addition, the size
+ and number of requests will change between releases.
+
+ An allocator set as the default will never be released, even if later
+ another allocator replaces it as the default. Not only is it impractical
+ for it to be released (as there might be caches created under the covers
+ that refer to the allocator), in general it's also safer and more
+ efficient to keep it around.
+
+ If you wish to use a custom allocator in a context, it's best to provide
+ it as the argument to the various creation functions rather than setting
+ it as the default. Setting the default allocator is not encouraged.
+
+ If you do set an allocator as the default, either do it for all time in
+ your app, or do it in a nested fashion (by restoring the previous allocator
+ when you exit your context). The latter might be appropriate for plug-ins
+ or libraries that wish to set the default allocator.
+}
+procedure CFAllocatorSetDefault( allocator: CFAllocatorRef ); external name '_CFAllocatorSetDefault';
+
+function CFAllocatorGetDefault: CFAllocatorRef; external name '_CFAllocatorGetDefault';
+
+function CFAllocatorCreate( allocator: CFAllocatorRef; var context: CFAllocatorContext ): CFAllocatorRef; external name '_CFAllocatorCreate';
+
+function CFAllocatorAllocate( allocator: CFAllocatorRef; size: CFIndex; hint: CFOptionFlags ): UnivPtr; external name '_CFAllocatorAllocate';
+
+function CFAllocatorReallocate( allocator: CFAllocatorRef; ptr: UnivPtr; newsize: CFIndex; hint: CFOptionFlags ): UnivPtr; external name '_CFAllocatorReallocate';
+
+procedure CFAllocatorDeallocate( allocator: CFAllocatorRef; ptr: UnivPtr ); external name '_CFAllocatorDeallocate';
+
+function CFAllocatorGetPreferredSizeForSize( allocator: CFAllocatorRef; size: CFIndex; hint: CFOptionFlags ): CFIndex; external name '_CFAllocatorGetPreferredSizeForSize';
+
+procedure CFAllocatorGetContext( allocator: CFAllocatorRef; var context: CFAllocatorContext ); external name '_CFAllocatorGetContext';
+
+
+{ Polymorphic CF functions }
+
+function CFGetTypeID( cf: CFTypeRef ): CFTypeID; external name '_CFGetTypeID';
+
+function CFCopyTypeIDDescription( type_id: CFTypeID ): CFStringRef; external name '_CFCopyTypeIDDescription';
+
+function CFRetain( cf: CFTypeRef ): CFTypeRef; external name '_CFRetain';
+
+procedure CFRelease( cf: CFTypeRef ); external name '_CFRelease';
+
+function CFGetRetainCount( cf: CFTypeRef ): CFIndex; external name '_CFGetRetainCount';
+
+function CFMakeCollectable( cf: CFTypeRef ): CFTypeRef; external name '_CFMakeCollectable';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CFEqual( cf1: CFTypeRef; cf2: CFTypeRef ): Boolean; external name '_CFEqual';
+
+function CFHash( cf: CFTypeRef ): CFHashCode; external name '_CFHash';
+
+function CFCopyDescription( cf: CFTypeRef ): CFStringRef; external name '_CFCopyDescription';
+
+function CFGetAllocator( cf: CFTypeRef ): CFAllocatorRef; external name '_CFGetAllocator';
+
+
+{unit CFBinaryHeap}
+{ CFBinaryHeap.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+{!
+ @header CFBinaryHeap
+ CFBinaryHeap implements a container which stores values sorted using
+ a binary search algorithm. CFBinaryHeaps can be useful as priority
+ queues.
+}
+
+
+type
+ CFBinaryHeapCompareContext = record
+ version: CFIndex;
+ info: UnivPtr;
+ retain: function( info: {const} UnivPtr ): UnivPtr;
+ release: procedure( info: {const} UnivPtr );
+ copyDescription: function( info: {const} UnivPtr ): CFStringRef;
+ end;
+ CFBinaryHeapCompareContextPtr = ^CFBinaryHeapCompareContext;
+
+{!
+ @typedef CFBinaryHeapCallBacks
+ Structure containing the callbacks for values of a CFBinaryHeap.
+ @field version The version number of the structure type being passed
+ in as a parameter to the CFBinaryHeap creation functions.
+ This structure is version 0.
+ @field retain The callback used to add a retain for the binary heap
+ on values as they are put into the binary heap.
+ This callback returns the value to use as the value in the
+ binary heap, which is usually the value parameter passed to
+ this callback, but may be a different value if a different
+ value should be added to the binary heap. The binary heap's
+ allocator is passed as the first argument.
+ @field release The callback used to remove a retain previously added
+ for the binary heap from values as they are removed from
+ the binary heap. The binary heap's allocator is passed as the
+ first argument.
+ @field copyDescription The callback used to create a descriptive
+ string representation of each value in the binary heap. This
+ is used by the CFCopyDescription() function.
+ @field compare The callback used to compare values in the binary heap for
+ equality in some operations.
+}
+type
+ CFBinaryHeapCallBacks = record
+ version: CFIndex;
+ retain: function( allocator: CFAllocatorRef; info: {const} UnivPtr ): UnivPtr;
+ release: procedure( allocator: CFAllocatorRef; info: {const} UnivPtr );
+ copyDescription: function( info: {const} UnivPtr ): CFStringRef;
+ compare: function( info1, info2: {const} UnivPtr; context: UnivPtr ): CFComparisonResult;
+ end;
+ CFBinaryHeapCallBacksPtr = ^CFBinaryHeapCallBacks;
+
+{!
+ @constant kCFStringBinaryHeapCallBacks
+ Predefined CFBinaryHeapCallBacks structure containing a set
+ of callbacks appropriate for use when the values in a CFBinaryHeap
+ are all CFString types.
+}
+var kCFStringBinaryHeapCallBacks: CFBinaryHeapCallBacks; external name '_kCFStringBinaryHeapCallBacks'; (* attribute const *)
+
+{!
+ @typedef CFBinaryHeapApplierFunction
+ Type of the callback function used by the apply functions of
+ CFBinaryHeap.
+ @param value The current value from the binary heap.
+ @param context The user-defined context parameter given to the apply
+ function.
+}
+type
+ CFBinaryHeapApplierFunction = procedure( val: {const} UnivPtr; context: UnivPtr );
+
+{!
+ @typedef CFBinaryHeapRef
+ This is the type of a reference to CFBinaryHeaps.
+}
+type
+ CFBinaryHeapRef = ^SInt32; { an opaque 32-bit type }
+
+{!
+ @function CFBinaryHeapGetTypeID
+ Returns the type identifier of all CFBinaryHeap instances.
+}
+function CFBinaryHeapGetTypeID: CFTypeID; external name '_CFBinaryHeapGetTypeID';
+
+{!
+ @function CFBinaryHeapCreate
+ Creates a new mutable or fixed-mutable binary heap with the given values.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the binary heap and its storage for values. 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 capacity The maximum number of values that can be contained
+ by the CFBinaryHeap. The binary heap starts empty, and can grow to this
+ number of values (and it can have less). If this parameter
+ is 0, the binary heap's maximum capacity is unlimited (or rather,
+ only limited by address space and available memory
+ constraints). If this parameter is negative, the behavior is
+ undefined.
+ @param callBacks A pointer to a CFBinaryHeapCallBacks structure
+ initialized with the callbacks for the binary heap to use on
+ each value in the binary heap. A copy of the contents of the
+ callbacks structure is made, so that a pointer to a structure
+ on the stack can be passed in, or can be reused for multiple
+ binary heap creations. If the version field of this callbacks
+ structure is not one of the defined ones for CFBinaryHeap, the
+ behavior is undefined. The retain field may be NULL, in which
+ case the CFBinaryHeap will do nothing to add a retain to values
+ as they are put into the binary heap. The release field may be
+ NULL, in which case the CFBinaryHeap will do nothing to remove
+ the binary heap's retain (if any) on the values when the
+ heap is destroyed or a key-value pair is removed. If the
+ copyDescription field is NULL, the binary heap will create a
+ simple description for a value. If the equal field is NULL, the
+ binary heap will use pointer equality to test for equality of
+ values. This callbacks parameter itself may be NULL, which is
+ treated as if a valid structure of version 0 with all fields
+ NULL had been passed in. Otherwise,
+ if any of the fields are not valid pointers to functions
+ of the correct type, or this parameter is not a valid
+ pointer to a CFBinaryHeapCallBacks callbacks structure,
+ the behavior is undefined. If any of the values put into the
+ binary heap is not one understood by one of the callback functions
+ the behavior when that callback function is used is undefined.
+ @param compareContext A pointer to a CFBinaryHeapCompareContext structure.
+ @result A reference to the new CFBinaryHeap.
+}
+function CFBinaryHeapCreate( allocator: CFAllocatorRef; capacity: CFIndex; callBacks: CFBinaryHeapCallBacksPtr; const (*var*) compareContext: CFBinaryHeapCompareContext ): CFBinaryHeapRef; external name '_CFBinaryHeapCreate';
+
+{!
+ @function CFBinaryHeapCreateCopy
+ Creates a new mutable or fixed-mutable binary heap with the values from the given binary heap.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the binary heap and its storage for values. 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 capacity The maximum number of values that can be contained
+ by the CFBinaryHeap. The binary heap starts empty, and can grow to this
+ number of values (and it can have less). If this parameter
+ is 0, the binary heap's maximum capacity is unlimited (or rather,
+ only limited by address space and available memory
+ constraints). If this parameter is negative, or less than the number of
+ values in the given binary heap, the behavior is undefined.
+ @param heap The binary heap which is to be copied. The values from the
+ binary heap are copied as pointers into the new binary heap (that is,
+ the values themselves are copied, not that which the values
+ point to, if anything). However, the values are also
+ retained by the new binary heap. The count of the new binary will
+ be the same as the given binary heap. The new binary heap uses the same
+ callbacks as the binary heap to be copied. If this parameter is
+ not a valid CFBinaryHeap, the behavior is undefined.
+ @result A reference to the new mutable or fixed-mutable binary heap.
+}
+function CFBinaryHeapCreateCopy( allocator: CFAllocatorRef; capacity: CFIndex; heap: CFBinaryHeapRef ): CFBinaryHeapRef; external name '_CFBinaryHeapCreateCopy';
+
+{!
+ @function CFBinaryHeapGetCount
+ Returns the number of values currently in the binary heap.
+ @param heap The binary heap to be queried. If this parameter is not a valid
+ CFBinaryHeap, the behavior is undefined.
+ @result The number of values in the binary heap.
+}
+function CFBinaryHeapGetCount( heap: CFBinaryHeapRef ): CFIndex; external name '_CFBinaryHeapGetCount';
+
+{!
+ @function CFBinaryHeapGetCountOfValue
+ Counts the number of times the given value occurs in the binary heap.
+ @param heap The binary heap to be searched. If this parameter is not a
+ valid CFBinaryHeap, the behavior is undefined.
+ @param value The value for which to find matches in the binary heap. The
+ compare() callback provided when the binary heap was created is
+ used to compare. If the compare() callback was NULL, pointer
+ equality (in C, ==) is used. If value, or any of the values
+ in the binary heap, are not understood by the compare() callback,
+ the behavior is undefined.
+ @result The number of times the given value occurs in the binary heap.
+}
+function CFBinaryHeapGetCountOfValue( heap: CFBinaryHeapRef; value: {const} UnivPtr ): CFIndex; external name '_CFBinaryHeapGetCountOfValue';
+
+{!
+ @function CFBinaryHeapContainsValue
+ Reports whether or not the value is in the binary heap.
+ @param heap The binary heap to be searched. If this parameter is not a
+ valid CFBinaryHeap, the behavior is undefined.
+ @param value The value for which to find matches in the binary heap. The
+ compare() callback provided when the binary heap was created is
+ used to compare. If the compare() callback was NULL, pointer
+ equality (in C, ==) is used. If value, or any of the values
+ in the binary heap, are not understood by the compare() callback,
+ the behavior is undefined.
+ @result true, if the value is in the specified binary heap, otherwise false.
+}
+function CFBinaryHeapContainsValue( heap: CFBinaryHeapRef; value: {const} UnivPtr ): Boolean; external name '_CFBinaryHeapContainsValue';
+
+{!
+ @function CFBinaryHeapGetMinimum
+ Returns the minimum value is in the binary heap. If the heap contains several equal
+ 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.
+ @result A reference to the minimum value in the binary heap, or NULL if the
+ binary heap contains no values.
+}
+function CFBinaryHeapGetMinimum( heap: CFBinaryHeapRef ): UnivPtr; external name '_CFBinaryHeapGetMinimum';
+
+{!
+ @function CFBinaryHeapGetMinimumIfPresent
+ Returns the minimum value is in the binary heap, if present. If the heap contains several equal
+ 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
+ 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.
+ @result true, if a minimum value was found in the specified binary heap, otherwise false.
+}
+function CFBinaryHeapGetMinimumIfPresent( heap: CFBinaryHeapRef; {const} value: {variable-size-array} UnivPtrPtr ): Boolean; external name '_CFBinaryHeapGetMinimumIfPresent';
+
+{!
+ @function CFBinaryHeapGetValues
+ Fills the buffer with values from the binary heap.
+ @param heap The binary heap to be queried. If this parameter is not a
+ 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
+ C array of at least CFBinaryHeapGetCount() pointers, the behavior is undefined.
+}
+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';
+
+{!
+ @function CFBinaryHeapApplyFunction
+ Calls a function once for each value in the binary heap.
+ @param heap The binary heap to be operated upon. If this parameter is not a
+ valid CFBinaryHeap, the behavior is undefined.
+ @param applier The callback function to call once for each value in
+ the given binary heap. If this parameter is not a
+ 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.
+ @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
+ what is expected by the applier function, the behavior is
+ undefined.
+}
+procedure CFBinaryHeapApplyFunction( heap: CFBinaryHeapRef; applier: CFBinaryHeapApplierFunction; context: UnivPtr ); external name '_CFBinaryHeapApplyFunction';
+
+{!
+ @function CFBinaryHeapAddValue
+ Adds the value to the binary heap.
+ @param heap The binary heap to which the value is to be added. If this parameter is not a
+ valid mutable CFBinaryHeap, the behavior is undefined.
+ If the binary heap is a fixed-capacity binary heap and it
+ is full before this operation, the behavior is undefined.
+ @param value The value to add to the binary heap. The value is retained by
+ the binary heap using the retain callback provided when the binary heap
+ was created. If the value is not of the sort expected by the
+ retain callback, the behavior is undefined.
+}
+procedure CFBinaryHeapAddValue( heap: CFBinaryHeapRef; value: {const} UnivPtr ); external name '_CFBinaryHeapAddValue';
+
+{!
+ @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
+ parameter is not a valid mutable CFBinaryHeap, the behavior is undefined.
+}
+procedure CFBinaryHeapRemoveMinimumValue( heap: CFBinaryHeapRef ); external name '_CFBinaryHeapRemoveMinimumValue';
+
+{!
+ @function CFBinaryHeapRemoveAllValues
+ Removes all the values from the binary heap, making it empty.
+ @param heap The binary heap from which all of the values are to be
+ removed. If this parameter is not a valid mutable CFBinaryHeap,
+ the behavior is undefined.
+}
+procedure CFBinaryHeapRemoveAllValues( heap: CFBinaryHeapRef ); external name '_CFBinaryHeapRemoveAllValues';
+
+
+{unit CFBitVector}
+{ CFBitVector.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFBit = UInt32;
+
+type
+ CFBitVectorRef = ^SInt32; { an opaque 32-bit type }
+ CFMutableBitVectorRef = ^SInt32; { an opaque 32-bit type }
+
+function CFBitVectorGetTypeID: CFTypeID; external name '_CFBitVectorGetTypeID';
+
+function CFBitVectorCreate( allocator: CFAllocatorRef; bytes: UnivPtr; numBits: CFIndex ): CFBitVectorRef; external name '_CFBitVectorCreate';
+function CFBitVectorCreateCopy( allocator: CFAllocatorRef; bv: CFBitVectorRef ): CFBitVectorRef; external name '_CFBitVectorCreateCopy';
+function CFBitVectorCreateMutable( allocator: CFAllocatorRef; capacity: CFIndex ): CFMutableBitVectorRef; external name '_CFBitVectorCreateMutable';
+function CFBitVectorCreateMutableCopy( allocator: CFAllocatorRef; capacity: CFIndex; bv: CFBitVectorRef ): CFMutableBitVectorRef; external name '_CFBitVectorCreateMutableCopy';
+
+function CFBitVectorGetCount( bv: CFBitVectorRef ): CFIndex; external name '_CFBitVectorGetCount';
+function CFBitVectorGetCountOfBit( bv: CFBitVectorRef; range: CFRange; value: CFBit ): CFIndex; external name '_CFBitVectorGetCountOfBit';
+function CFBitVectorContainsBit( bv: CFBitVectorRef; range: CFRange; value: CFBit ): Boolean; external name '_CFBitVectorContainsBit';
+function CFBitVectorGetBitAtIndex( bv: CFBitVectorRef; idx: CFIndex ): CFBit; external name '_CFBitVectorGetBitAtIndex';
+procedure CFBitVectorGetBits( bv: CFBitVectorRef; range: CFRange; bytes: UnivPtr ); external name '_CFBitVectorGetBits';
+function CFBitVectorGetFirstIndexOfBit( bv: CFBitVectorRef; range: CFRange; value: CFBit ): CFIndex; external name '_CFBitVectorGetFirstIndexOfBit';
+function CFBitVectorGetLastIndexOfBit( bv: CFBitVectorRef; range: CFRange; value: CFBit ): CFIndex; external name '_CFBitVectorGetLastIndexOfBit';
+
+procedure CFBitVectorSetCount( bv: CFMutableBitVectorRef; count: CFIndex ); external name '_CFBitVectorSetCount';
+procedure CFBitVectorFlipBitAtIndex( bv: CFMutableBitVectorRef; idx: CFIndex ); external name '_CFBitVectorFlipBitAtIndex';
+procedure CFBitVectorFlipBits( bv: CFMutableBitVectorRef; range: CFRange ); external name '_CFBitVectorFlipBits';
+procedure CFBitVectorSetBitAtIndex( bv: CFMutableBitVectorRef; idx: CFIndex; value: CFBit ); external name '_CFBitVectorSetBitAtIndex';
+procedure CFBitVectorSetBits( bv: CFMutableBitVectorRef; range: CFRange; value: CFBit ); external name '_CFBitVectorSetBits';
+procedure CFBitVectorSetAllBits( bv: CFMutableBitVectorRef; value: CFBit ); external name '_CFBitVectorSetAllBits';
+
+
+{unit CFByteOrders}
+{ CFByteOrder.h
+ Copyright (c) 1995-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{ Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, April 2006 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFByteOrder = SInt32;
+const
+ CFByteOrderUnknown = 0;
+ CFByteOrderLittleEndian = 1;
+ CFByteOrderBigEndian = 2;
+
+function CFByteOrderGetCurrent: CFByteOrder; inline;
+function CFSwapInt16( arg: UInt16 ): UInt16; inline;
+function CFSwapInt32( arg: UInt32 ): UInt32; inline;
+function CFSwapInt64( arg: UInt64 ): UInt64; inline;
+
+function CFSwapInt16BigToHost( arg: UInt16 ): UInt16; inline;
+function CFSwapInt32BigToHost( arg: UInt32 ): UInt32; inline;
+function CFSwapInt64BigToHost( arg: UInt64 ): UInt64; inline;
+function CFSwapInt16HostToBig( arg: UInt16 ): UInt16; inline;
+function CFSwapInt32HostToBig( arg: UInt32 ): UInt32; inline;
+function CFSwapInt64HostToBig( arg: UInt64 ): UInt64; inline;
+
+{$ifc TARGET_RT_BIG_ENDIAN}
+
+
+{$elsec}
+
+
+
+{$endc}
+
+function CFSwapInt16LittleToHost( arg: UInt16 ): UInt16; inline;
+function CFSwapInt32LittleToHost( arg: UInt32 ): UInt32; inline;
+function CFSwapInt64LittleToHost( arg: UInt64 ): UInt64; inline;
+function CFSwapInt16HostToLittle( arg: UInt16 ): UInt16; inline;
+function CFSwapInt32HostToLittle( arg: UInt32 ): UInt32; inline;
+function CFSwapInt64HostToLittle( arg: UInt64 ): UInt64; inline;
+
+{$ifc TARGET_RT_LITTLE_ENDIAN}
+
+
+{$elsec}
+
+
+
+{$endc}
+
+type
+ CFSwappedFloat32 = record
+ v: UInt32;
+ end;
+type
+ CFSwappedFloat64 = record
+ v: UInt64;
+ end;
+
+function CFConvertFloat32HostToSwapped( arg: Float32 ): CFSwappedFloat32; inline;
+function CFConvertFloat32SwappedToHost( arg: Float32 ): CFSwappedFloat32; inline;
+function CFConvertFloat64HostToSwapped( arg: Float64 ): CFSwappedFloat64; inline;
+function CFConvertFloat64SwappedToHost( arg: Float64 ): CFSwappedFloat64; inline;
+function CFConvertFloatHostToSwapped( arg: Float32 ): CFSwappedFloat32; inline;
+function CFConvertFloatSwappedToHost( arg: Float32 ): CFSwappedFloat32; inline;
+function CFConvertDoubleHostToSwapped( arg: Float64 ): CFSwappedFloat64; inline;
+function CFConvertDoubleSwappedToHost( arg: Float64 ): CFSwappedFloat64; inline;
+
+{$ifc TARGET_RT_LITTLE_ENDIAN}
+
+
+
+{$elsec}
+
+
+{$endc}
+
+
+{unit CFData}
+{ CFData.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+
+type
+ CFDataRef = ^SInt32; { an opaque 32-bit type }
+ CFDataRefPtr = ^CFDataRef;
+ CFMutableDataRef = CFDataRef;
+ CFMutableDataRefPtr = ^CFMutableDataRef;
+
+function CFDataGetTypeID: CFTypeID; external name '_CFDataGetTypeID';
+
+function CFDataCreate( allocator: CFAllocatorRef; bytes: UnivPtr; length: CFIndex ): CFDataRef; external name '_CFDataCreate';
+
+function CFDataCreateWithBytesNoCopy( allocator: CFAllocatorRef; bytes: UnivPtr; length: CFIndex; bytesDeallocator: CFAllocatorRef ): CFDataRef; external name '_CFDataCreateWithBytesNoCopy';
+ { Pass kCFAllocatorNull as bytesDeallocator to assure the bytes aren't freed }
+
+function CFDataCreateCopy( allocator: CFAllocatorRef; theData: CFDataRef ): CFDataRef; external name '_CFDataCreateCopy';
+
+function CFDataCreateMutable( allocator: CFAllocatorRef; capacity: CFIndex ): CFMutableDataRef; external name '_CFDataCreateMutable';
+
+function CFDataCreateMutableCopy( allocator: CFAllocatorRef; capacity: CFIndex; theData: CFDataRef ): CFMutableDataRef; external name '_CFDataCreateMutableCopy';
+
+function CFDataGetLength( theData: CFDataRef ): CFIndex; external name '_CFDataGetLength';
+
+function CFDataGetBytePtr( theData: CFDataRef ): UnivPtr; external name '_CFDataGetBytePtr';
+
+function CFDataGetMutableBytePtr( theData: CFMutableDataRef ): UnivPtr; external name '_CFDataGetMutableBytePtr';
+
+procedure CFDataGetBytes( theData: CFDataRef; range: CFRange; buffer: UnivPtr ); external name '_CFDataGetBytes';
+
+procedure CFDataSetLength( theData: CFMutableDataRef; length: CFIndex ); external name '_CFDataSetLength';
+
+procedure CFDataIncreaseLength( theData: CFMutableDataRef; extraLength: CFIndex ); external name '_CFDataIncreaseLength';
+
+procedure CFDataAppendBytes( theData: CFMutableDataRef; bytes: UnivPtr; length: CFIndex ); external name '_CFDataAppendBytes';
+
+procedure CFDataReplaceBytes( theData: CFMutableDataRef; range: CFRange; newBytes: UnivPtr; newLength: CFIndex ); external name '_CFDataReplaceBytes';
+
+procedure CFDataDeleteBytes( theData: CFMutableDataRef; range: CFRange ); external name '_CFDataDeleteBytes';
+
+
+{unit CFDate}
+{ CFDate.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFTimeInterval = Float64;
+ CFAbsoluteTime = CFTimeInterval;
+ CFAbsoluteTimePtr = ^CFAbsoluteTime;
+{ absolute time is the time interval since the reference date }
+{ the reference date (epoch) is 00:00:00 1 January 2001. }
+
+function CFAbsoluteTimeGetCurrent: CFAbsoluteTime; external name '_CFAbsoluteTimeGetCurrent';
+
+var kCFAbsoluteTimeIntervalSince1970: CFTimeInterval; external name '_kCFAbsoluteTimeIntervalSince1970'; (* attribute const *)
+var kCFAbsoluteTimeIntervalSince1904: CFTimeInterval; external name '_kCFAbsoluteTimeIntervalSince1904'; (* attribute const *)
+
+type
+ CFDateRef = ^SInt32; { an opaque 32-bit type }
+ CFDateRefPtr = ^CFDateRef;
+
+function CFDateGetTypeID: CFTypeID; external name '_CFDateGetTypeID';
+
+function CFDateCreate( allocator: CFAllocatorRef; at: CFAbsoluteTime ): CFDateRef; external name '_CFDateCreate';
+
+function CFDateGetAbsoluteTime( theDate: CFDateRef ): CFAbsoluteTime; external name '_CFDateGetAbsoluteTime';
+
+function CFDateGetTimeIntervalSinceDate( theDate: CFDateRef; otherDate: CFDateRef ): CFTimeInterval; external name '_CFDateGetTimeIntervalSinceDate';
+
+function CFDateCompare( theDate: CFDateRef; otherDate: CFDateRef; context: UnivPtr ): CFComparisonResult; external name '_CFDateCompare';
+
+type
+ CFTimeZoneRef = ^SInt32; { an opaque 32-bit type }
+ CFTimeZoneRefPtr = ^CFTimeZoneRef;
+
+type
+ CFGregorianDate = record
+ year: SInt32;
+ month: SInt8;
+ day: SInt8;
+ hour: SInt8;
+ minute: SInt8;
+ second: Float64;
+ end;
+ CFGregorianDatePtr = ^CFGregorianDate;
+
+type
+ CFGregorianUnits = record
+ years: SInt32;
+ months: SInt32;
+ days: SInt32;
+ hours: SInt32;
+ minutes: SInt32;
+ seconds: Float64;
+ end;
+ CFGregorianUnitsPtr = ^CFGregorianUnits;
+
+type
+ CFGregorianUnitFlags = SInt32;
+const
+ kCFGregorianUnitsYears = 1 shl 0;
+ kCFGregorianUnitsMonths = 1 shl 1;
+ kCFGregorianUnitsDays = 1 shl 2;
+ kCFGregorianUnitsHours = 1 shl 3;
+ kCFGregorianUnitsMinutes = 1 shl 4;
+ kCFGregorianUnitsSeconds = 1 shl 5;
+ kCFGregorianAllUnits = $00FFFFFF;
+
+function CFGregorianDateIsValid( gdate: CFGregorianDate; unitFlags: CFOptionFlags ): Boolean; external name '_CFGregorianDateIsValid';
+
+function CFGregorianDateGetAbsoluteTime( gdate: CFGregorianDate; tz: CFTimeZoneRef ): CFAbsoluteTime; external name '_CFGregorianDateGetAbsoluteTime';
+
+function CFAbsoluteTimeGetGregorianDate( at: CFAbsoluteTime; tz: CFTimeZoneRef ): CFGregorianDate; external name '_CFAbsoluteTimeGetGregorianDate';
+
+function CFAbsoluteTimeAddGregorianUnits( at: CFAbsoluteTime; tz: CFTimeZoneRef; units: CFGregorianUnits ): CFAbsoluteTime; external name '_CFAbsoluteTimeAddGregorianUnits';
+
+function CFAbsoluteTimeGetDifferenceAsGregorianUnits( at1: CFAbsoluteTime; at2: CFAbsoluteTime; tz: CFTimeZoneRef; unitFlags: CFOptionFlags ): CFGregorianUnits; external name '_CFAbsoluteTimeGetDifferenceAsGregorianUnits';
+
+function CFAbsoluteTimeGetDayOfWeek( at: CFAbsoluteTime; tz: CFTimeZoneRef ): SInt32; external name '_CFAbsoluteTimeGetDayOfWeek';
+
+function CFAbsoluteTimeGetDayOfYear( at: CFAbsoluteTime; tz: CFTimeZoneRef ): SInt32; external name '_CFAbsoluteTimeGetDayOfYear';
+
+function CFAbsoluteTimeGetWeekOfYear( at: CFAbsoluteTime; tz: CFTimeZoneRef ): SInt32; external name '_CFAbsoluteTimeGetWeekOfYear';
+
+
+{unit CFDictionary}
+{ CFDictionary.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{!
+ @header CFDictionary
+ CFDictionary implements a container which pairs pointer-sized keys
+ with pointer-sized values. Values are accessed via arbitrary
+ user-defined keys. A CFDictionary differs from a CFArray in that
+ the key used to access a particular value in the dictionary remains
+ the same as values are added to or removed from the dictionary,
+ unless a value associated with its particular key is replaced or
+ removed. In a CFArray, the key (or index) used to retrieve a
+ particular value can change over time as values are added to or
+ deleted from the array. Also unlike an array, there is no ordering
+ among values in a dictionary. To enable later retrieval of a value,
+ the key of the key-value pair should be constant (or treated as
+ constant); if the key changes after being used to put a value in
+ the dictionary, the value may not be retrievable. The keys of a
+ dictionary form a set; that is, no two keys which are equal to
+ one another are present in the dictionary at any time.
+
+ Dictionaries come in two flavors, immutable, which cannot have
+ values added to them or removed from them after the dictionary is
+ created, and mutable, to which you can add values or from which
+ remove values. Mutable dictionaries have two subflavors,
+ fixed-capacity, for which there is a maximum number set at creation
+ time of values which can be put into the dictionary, and variable
+ capacity, which can have an unlimited number of values (or rather,
+ limited only by constraints external to CFDictionary, like the
+ amount of available memory). Fixed-capacity dictionaries can be
+ somewhat higher performing, if you can put a definate upper limit
+ on the number of values that might be put into the dictionary.
+
+ As with all CoreFoundation collection types, dictionaries maintain
+ hard references on the values you put in them, but the retaining and
+ releasing functions are user-defined callbacks that can actually do
+ whatever the user wants (for example, nothing).
+
+ Although a particular implementation of CFDictionary may not use
+ hashing and a hash table for storage of the values, the keys have
+ a hash-code generating function defined for them, and a function
+ to test for equality of two keys. These two functions together
+ must maintain the invariant that if equal(X, Y), then hash(X) ==
+ hash(Y). Note that the converse will not generally be true (but
+ the contrapositive, if hash(X) != hash(Y), then !equal(X, Y),
+ will be as required by Boolean logic). If the hash() and equal()
+ key callbacks are NULL, the key is used as a pointer-sized integer,
+ and pointer equality is used. Care should be taken to provide a
+ hash() callback which will compute sufficiently dispersed hash
+ codes for the key set for best performance.
+
+ Computational Complexity
+ The access time for a value in the dictionary is guaranteed to be at
+ worst O(lg N) for any implementation, current and future, but will
+ often be O(1) (constant time). Insertion or deletion operations
+ will typically be constant time as well, but are O(N*lg N) in the
+ worst case in some implementations. Access of values through a key
+ is faster than accessing values directly (if there are any such
+ operations). Dictionaries will tend to use significantly more memory
+ than a array with the same number of values.
+}
+
+
+{!
+ @typedef CFDictionaryKeyCallBacks
+ Structure containing the callbacks for keys of a CFDictionary.
+ @field version The version number of the structure type being passed
+ in as a parameter to the CFDictionary creation functions.
+ This structure is version 0.
+ @field retain The callback used to add a retain for the dictionary
+ on keys as they are used to put values into the dictionary.
+ This callback returns the value to use as the key in the
+ dictionary, which is usually the value parameter passed to
+ this callback, but may be a different value if a different
+ value should be used as the key. The dictionary's allocator
+ is passed as the first argument.
+ @field release The callback used to remove a retain previously added
+ for the dictionary from keys as their values are removed from
+ the dictionary. The dictionary's allocator is passed as the
+ first argument.
+ @field copyDescription The callback used to create a descriptive
+ string representation of each key in the dictionary. This
+ is used by the CFCopyDescription() function.
+ @field equal The callback used to compare keys in the dictionary for
+ equality.
+ @field hash The callback used to compute a hash code for keys as they
+ are used to access, add, or remove values in the dictionary.
+}
+type
+ CFDictionaryRetainCallBack = function( allocator: CFAllocatorRef; value: {const} UnivPtr ): UnivPtr;
+ CFDictionaryReleaseCallBack = procedure( allocator: CFAllocatorRef; value: {const} UnivPtr );
+ CFDictionaryCopyDescriptionCallBack = function( value: {const} UnivPtr ): CFStringRef;
+ CFDictionaryEqualCallBack = function( value1: {const} UnivPtr; value2: {const} UnivPtr ): Boolean;
+ CFDictionaryHashCallBack = function( value: {const} UnivPtr ): CFHashCode;
+ CFDictionaryKeyCallBacks = record
+ version: CFIndex;
+ retain: CFDictionaryRetainCallBack;
+ release: CFDictionaryReleaseCallBack;
+ copyDescription: CFDictionaryCopyDescriptionCallBack;
+ equal: CFDictionaryEqualCallBack;
+ hash: CFDictionaryHashCallBack;
+ end;
+ CFDictionaryKeyCallBacksPtr = ^CFDictionaryKeyCallBacks;
+
+{!
+ @constant kCFTypeDictionaryKeyCallBacks
+ Predefined CFDictionaryKeyCallBacks structure containing a
+ set of callbacks appropriate for use when the keys of a
+ CFDictionary are all CFTypes.
+}
+var kCFTypeDictionaryKeyCallBacks: CFDictionaryKeyCallBacks; external name '_kCFTypeDictionaryKeyCallBacks'; (* attribute const *)
+
+{!
+ @constant kCFCopyStringDictionaryKeyCallBacks
+ Predefined CFDictionaryKeyCallBacks structure containing a
+ set of callbacks appropriate for use when the keys of a
+ CFDictionary are all CFStrings, which may be mutable and
+ need to be copied in order to serve as constant keys for
+ the values in the dictionary.
+}
+var kCFCopyStringDictionaryKeyCallBacks: CFDictionaryKeyCallBacks; external name '_kCFCopyStringDictionaryKeyCallBacks'; (* attribute const *)
+
+{!
+ @typedef CFDictionaryValueCallBacks
+ Structure containing the callbacks for values of a CFDictionary.
+ @field version The version number of the structure type being passed
+ in as a parameter to the CFDictionary creation functions.
+ This structure is version 0.
+ @field retain The callback used to add a retain for the dictionary
+ on values as they are put into the dictionary.
+ This callback returns the value to use as the value in the
+ dictionary, which is usually the value parameter passed to
+ this callback, but may be a different value if a different
+ value should be added to the dictionary. The dictionary's
+ allocator is passed as the first argument.
+ @field release The callback used to remove a retain previously added
+ for the dictionary from values as they are removed from
+ the dictionary. The dictionary's allocator is passed as the
+ first argument.
+ @field copyDescription The callback used to create a descriptive
+ string representation of each value in the dictionary. This
+ is used by the CFCopyDescription() function.
+ @field equal The callback used to compare values in the dictionary for
+ equality in some operations.
+}
+type
+ CFDictionaryValueCallBacks = record
+ version: CFIndex;
+ retain: CFDictionaryRetainCallBack;
+ release: CFDictionaryReleaseCallBack;
+ copyDescription: CFDictionaryCopyDescriptionCallBack;
+ equal: CFDictionaryEqualCallBack;
+ end;
+ CFDictionaryValueCallBacksPtr = ^CFDictionaryValueCallBacks;
+
+{!
+ @constant kCFTypeDictionaryValueCallBacks
+ Predefined CFDictionaryValueCallBacks structure containing a set
+ of callbacks appropriate for use when the values in a CFDictionary
+ are all CFTypes.
+}
+var kCFTypeDictionaryValueCallBacks: CFDictionaryValueCallBacks; external name '_kCFTypeDictionaryValueCallBacks'; (* attribute const *)
+
+{!
+ @typedef CFDictionaryApplierFunction
+ Type of the callback function used by the apply functions of
+ CFDictionarys.
+ @param key The current key for the value.
+ @param value The current value from the dictionary.
+ @param context The user-defined context parameter given to the apply
+ function.
+}
+type
+ CFDictionaryApplierFunction = procedure( key: {const} UnivPtr; value: {const} UnivPtr; context: UnivPtr );
+
+{!
+ @typedef CFDictionaryRef
+ This is the type of a reference to immutable CFDictionarys.
+}
+type
+ CFDictionaryRef = ^SInt32; { an opaque 32-bit type }
+ CFDictionaryRefPtr = ^CFDictionaryRef;
+
+{!
+ @typedef CFMutableDictionaryRef
+ This is the type of a reference to mutable CFDictionarys.
+}
+type
+ CFMutableDictionaryRef = CFDictionaryRef;
+ CFMutableDictionaryRefPtr = ^CFMutableDictionaryRef;
+
+{!
+ @function CFDictionaryGetTypeID
+ Returns the type identifier of all CFDictionary instances.
+}
+function CFDictionaryGetTypeID: CFTypeID; external name '_CFDictionaryGetTypeID';
+
+{!
+ @function CFDictionaryCreate
+ Creates a new immutable dictionary with the given values.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the dictionary and its storage for values. 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 keys A C array of the pointer-sized keys to be used for
+ the parallel C array of values to be put into the dictionary.
+ This parameter may be NULL if the numValues parameter is 0.
+ 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 values A C array of the pointer-sized values to be in the
+ dictionary. This parameter may be NULL if the numValues
+ parameter is 0. 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 keys and
+ values C arrays into the CFDictionary. This number will be
+ the count of the dictionary. If this parameter is
+ negative, or greater than the number of values actually
+ in the keys or values C arrays, the behavior is undefined.
+ @param keyCallBacks A pointer to a CFDictionaryKeyCallBacks structure
+ initialized with the callbacks for the dictionary to use on
+ each key in the dictionary. The retain callback will be used
+ within this function, for example, to retain all of the new
+ keys from the keys C array. A copy of the contents of the
+ callbacks structure is made, so that a pointer to a structure
+ on the stack can be passed in, or can be reused for multiple
+ dictionary creations. If the version field of this
+ callbacks structure is not one of the defined ones for
+ CFDictionary, the behavior is undefined. The retain field may
+ be NULL, in which case the CFDictionary will do nothing to add
+ a retain to the keys of the contained values. The release field
+ may be NULL, in which case the CFDictionary will do nothing
+ to remove the dictionary's retain (if any) on the keys when the
+ dictionary is destroyed or a key-value pair is removed. If the
+ copyDescription field is NULL, the dictionary will create a
+ simple description for a key. If the equal field is NULL, the
+ dictionary will use pointer equality to test for equality of
+ keys. If the hash field is NULL, a key will be converted from
+ a pointer to an integer to compute the hash code. This callbacks
+ parameter itself may be NULL, which is treated as if a valid
+ structure of version 0 with all fields NULL had been passed in.
+ Otherwise, if any of the fields are not valid pointers to
+ functions of the correct type, or this parameter is not a
+ valid pointer to a CFDictionaryKeyCallBacks callbacks structure,
+ the behavior is undefined. If any of the keys put into the
+ dictionary is not one understood by one of the callback functions
+ the behavior when that callback function is used is undefined.
+ @param valueCallBacks A pointer to a CFDictionaryValueCallBacks structure
+ initialized with the callbacks for the dictionary to use on
+ each value in the dictionary. The retain callback will be used
+ within this function, for example, to retain all of the new
+ values from the values C array. A copy of the contents of the
+ callbacks structure is made, so that a pointer to a structure
+ on the stack can be passed in, or can be reused for multiple
+ dictionary creations. If the version field of this callbacks
+ structure is not one of the defined ones for CFDictionary, the
+ behavior is undefined. The retain field may be NULL, in which
+ case the CFDictionary will do nothing to add a retain to values
+ as they are put into the dictionary. The release field may be
+ NULL, in which case the CFDictionary will do nothing to remove
+ the dictionary's retain (if any) on the values when the
+ dictionary is destroyed or a key-value pair is removed. If the
+ copyDescription field is NULL, the dictionary will create a
+ simple description for a value. If the equal field is NULL, the
+ dictionary will use pointer equality to test for equality of
+ values. This callbacks parameter itself may be NULL, which is
+ treated as if a valid structure of version 0 with all fields
+ NULL had been passed in. Otherwise,
+ if any of the fields are not valid pointers to functions
+ of the correct type, or this parameter is not a valid
+ pointer to a CFDictionaryValueCallBacks callbacks structure,
+ the behavior is undefined. If any of the values put into the
+ dictionary is not one understood by one of the callback functions
+ the behavior when that callback function is used is undefined.
+ @result A reference to the new immutable CFDictionary.
+}
+function CFDictionaryCreate( allocator: CFAllocatorRef; {const} keys: UnivPtrPtr; {const} values: UnivPtrPtr; numValues: CFIndex; {const} keyCallBacks: CFDictionaryKeyCallBacksPtr { can be NULL }; {const} valueCallBacks: CFDictionaryValueCallBacksPtr { can be NULL } ): CFDictionaryRef; external name '_CFDictionaryCreate';
+
+{!
+ @function CFDictionaryCreateCopy
+ Creates a new immutable dictionary with the key-value pairs from
+ the given dictionary.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the dictionary and its storage for values. 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 theDict The dictionary which is to be copied. The keys and values
+ from the dictionary are copied as pointers into the new
+ dictionary (that is, the values themselves are copied, not
+ that which the values point to, if anything). However, the
+ keys and values are also retained by the new dictionary using
+ the retain function of the original dictionary.
+ The count of the new dictionary will be the same as the
+ given dictionary. The new dictionary uses the same callbacks
+ as the dictionary to be copied. If this parameter is
+ not a valid CFDictionary, the behavior is undefined.
+ @result A reference to the new immutable CFDictionary.
+}
+function CFDictionaryCreateCopy( allocator: CFAllocatorRef; theDict: CFDictionaryRef ): CFDictionaryRef; external name '_CFDictionaryCreateCopy';
+
+{!
+ @function CFDictionaryCreateMutable
+ Creates a new mutable dictionary.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the dictionary and its storage for values. 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 capacity The maximum number of values that can be contained by
+ the CFDictionary. The dictionary starts empty, and can grow
+ to this number of values (and it can have less). If this
+ parameter is 0, the dictionary's maximum capacity is unlimited
+ (or rather, only limited by address space and available memory
+ constraints). If this parameter is negative, the behavior is
+ undefined.
+ @param keyCallBacks A pointer to a CFDictionaryKeyCallBacks structure
+ initialized with the callbacks for the dictionary to use on
+ each key in the dictionary. A copy of the contents of the
+ callbacks structure is made, so that a pointer to a structure
+ on the stack can be passed in, or can be reused for multiple
+ dictionary creations. If the version field of this
+ callbacks structure is not one of the defined ones for
+ CFDictionary, the behavior is undefined. The retain field may
+ be NULL, in which case the CFDictionary will do nothing to add
+ a retain to the keys of the contained values. The release field
+ may be NULL, in which case the CFDictionary will do nothing
+ to remove the dictionary's retain (if any) on the keys when the
+ dictionary is destroyed or a key-value pair is removed. If the
+ copyDescription field is NULL, the dictionary will create a
+ simple description for a key. If the equal field is NULL, the
+ dictionary will use pointer equality to test for equality of
+ keys. If the hash field is NULL, a key will be converted from
+ a pointer to an integer to compute the hash code. This callbacks
+ parameter itself may be NULL, which is treated as if a valid
+ structure of version 0 with all fields NULL had been passed in.
+ Otherwise, if any of the fields are not valid pointers to
+ functions of the correct type, or this parameter is not a
+ valid pointer to a CFDictionaryKeyCallBacks callbacks structure,
+ the behavior is undefined. If any of the keys put into the
+ dictionary is not one understood by one of the callback functions
+ the behavior when that callback function is used is undefined.
+ @param valueCallBacks A pointer to a CFDictionaryValueCallBacks structure
+ initialized with the callbacks for the dictionary to use on
+ each value in the dictionary. The retain callback will be used
+ within this function, for example, to retain all of the new
+ values from the values C array. A copy of the contents of the
+ callbacks structure is made, so that a pointer to a structure
+ on the stack can be passed in, or can be reused for multiple
+ dictionary creations. If the version field of this callbacks
+ structure is not one of the defined ones for CFDictionary, the
+ behavior is undefined. The retain field may be NULL, in which
+ case the CFDictionary will do nothing to add a retain to values
+ as they are put into the dictionary. The release field may be
+ NULL, in which case the CFDictionary will do nothing to remove
+ the dictionary's retain (if any) on the values when the
+ dictionary is destroyed or a key-value pair is removed. If the
+ copyDescription field is NULL, the dictionary will create a
+ simple description for a value. If the equal field is NULL, the
+ dictionary will use pointer equality to test for equality of
+ values. This callbacks parameter itself may be NULL, which is
+ treated as if a valid structure of version 0 with all fields
+ NULL had been passed in. Otherwise,
+ if any of the fields are not valid pointers to functions
+ of the correct type, or this parameter is not a valid
+ pointer to a CFDictionaryValueCallBacks callbacks structure,
+ the behavior is undefined. If any of the values put into the
+ dictionary is not one understood by one of the callback functions
+ the behavior when that callback function is used is undefined.
+ @result A reference to the new mutable CFDictionary.
+}
+function CFDictionaryCreateMutable( allocator: CFAllocatorRef; capacity: CFIndex; {const} keyCallBacks: CFDictionaryKeyCallBacksPtr { can be NULL }; {const} valueCallBacks: CFDictionaryValueCallBacksPtr { can be NULL } ): CFMutableDictionaryRef; external name '_CFDictionaryCreateMutable';
+
+{!
+ @function CFDictionaryCreateMutableCopy
+ Creates a new mutable dictionary with the key-value pairs from
+ the given dictionary.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the dictionary and its storage for values. 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 capacity The maximum number of values that can be contained
+ by the CFDictionary. The dictionary starts empty, and can grow
+ to this number of values (and it can have less). If this
+ parameter is 0, the dictionary'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 dictionary which is to be copied, or the
+ behavior is undefined. If this parameter is negative, the
+ behavior is undefined.
+ @param theDict The dictionary which is to be copied. The keys and values
+ from the dictionary are copied as pointers into the new
+ dictionary (that is, the values themselves are copied, not
+ that which the values point to, if anything). However, the
+ keys and values are also retained by the new dictionary using
+ the retain function of the original dictionary.
+ The count of the new dictionary will be the same as the
+ given dictionary. The new dictionary uses the same callbacks
+ as the dictionary to be copied. If this parameter is
+ not a valid CFDictionary, the behavior is undefined.
+ @result A reference to the new mutable CFDictionary.
+}
+function CFDictionaryCreateMutableCopy( allocator: CFAllocatorRef; capacity: CFIndex; theDict: CFDictionaryRef ): CFMutableDictionaryRef; external name '_CFDictionaryCreateMutableCopy';
+
+{!
+ @function CFDictionaryGetCount
+ Returns the number of values currently in the dictionary.
+ @param theDict The dictionary to be queried. If this parameter is
+ not a valid CFDictionary, the behavior is undefined.
+ @result The number of values in the dictionary.
+}
+function CFDictionaryGetCount( theDict: CFDictionaryRef ): CFIndex; external name '_CFDictionaryGetCount';
+
+{!
+ @function CFDictionaryGetCountOfKey
+ Counts the number of times the given key occurs in the dictionary.
+ @param theDict The dictionary to be searched. If this parameter is
+ not a valid CFDictionary, the behavior is undefined.
+ @param key The key for which to find matches in the dictionary. The
+ hash() and equal() key callbacks provided when the dictionary
+ was created are used to compare. If the hash() key callback
+ was NULL, the key is treated as a pointer and converted to
+ an integer. If the equal() key callback was NULL, pointer
+ equality (in C, ==) is used. If key, or any of the keys in
+ the dictionary, are not understood by the equal() callback,
+ the behavior is undefined.
+ @result Returns 1 if a matching key is used by the dictionary,
+ 0 otherwise.
+}
+function CFDictionaryGetCountOfKey( theDict: CFDictionaryRef; key: {const} UnivPtr ): CFIndex; external name '_CFDictionaryGetCountOfKey';
+
+{!
+ @function CFDictionaryGetCountOfValue
+ Counts the number of times the given value occurs in the dictionary.
+ @param theDict The dictionary to be searched. If this parameter is
+ not a valid CFDictionary, the behavior is undefined.
+ @param value The value for which to find matches in the dictionary. The
+ equal() callback provided when the dictionary was created is
+ used to compare. If the equal() value callback was NULL, pointer
+ equality (in C, ==) is used. If value, or any of the values in
+ the dictionary, are not understood by the equal() callback,
+ the behavior is undefined.
+ @result The number of times the given value occurs in the dictionary.
+}
+function CFDictionaryGetCountOfValue( theDict: CFDictionaryRef; value: {const} UnivPtr ): CFIndex; external name '_CFDictionaryGetCountOfValue';
+
+{!
+ @function CFDictionaryContainsKey
+ Reports whether or not the key is in the dictionary.
+ @param theDict The dictionary to be searched. If this parameter is
+ not a valid CFDictionary, the behavior is undefined.
+ @param key The key for which to find matches in the dictionary. The
+ hash() and equal() key callbacks provided when the dictionary
+ was created are used to compare. If the hash() key callback
+ was NULL, the key is treated as a pointer and converted to
+ an integer. If the equal() key callback was NULL, pointer
+ equality (in C, ==) is used. If key, or any of the keys in
+ the dictionary, are not understood by the equal() callback,
+ the behavior is undefined.
+ @result true, if the key is in the dictionary, otherwise false.
+}
+function CFDictionaryContainsKey( theDict: CFDictionaryRef; key: {const} UnivPtr ): Boolean; external name '_CFDictionaryContainsKey';
+
+{!
+ @function CFDictionaryContainsValue
+ Reports whether or not the value is in the dictionary.
+ @param theDict The dictionary to be searched. If this parameter is
+ not a valid CFDictionary, the behavior is undefined.
+ @param value The value for which to find matches in the dictionary. The
+ equal() callback provided when the dictionary was created is
+ used to compare. If the equal() callback was NULL, pointer
+ equality (in C, ==) is used. If value, or any of the values
+ in the dictionary, are not understood by the equal() callback,
+ the behavior is undefined.
+ @result true, if the value is in the dictionary, otherwise false.
+}
+function CFDictionaryContainsValue( theDict: CFDictionaryRef; value: {const} UnivPtr ): Boolean; external name '_CFDictionaryContainsValue';
+
+{!
+ @function CFDictionaryGetValue
+ Retrieves the value associated with the given key.
+ @param theDict The dictionary to be queried. If this parameter is
+ not a valid CFDictionary, the behavior is undefined.
+ @param key The key for which to find a match in the dictionary. The
+ hash() and equal() key callbacks provided when the dictionary
+ was created are used to compare. If the hash() key callback
+ was NULL, the key is treated as a pointer and converted to
+ an integer. If the equal() key callback was NULL, pointer
+ equality (in C, ==) is used. If key, or any of the keys in
+ the dictionary, are not understood by the equal() callback,
+ the behavior is undefined.
+ @result The value with the given key in the dictionary, or NULL if
+ no key-value pair with a matching key exists. Since NULL
+ can be a valid value in some dictionaries, the function
+ CFDictionaryGetValueIfPresent() must be used to distinguish
+ NULL-no-found from NULL-is-the-value.
+}
+function CFDictionaryGetValue( theDict: CFDictionaryRef; key: {const} UnivPtr ): UnivPtr; external name '_CFDictionaryGetValue';
+
+{!
+ @function CFDictionaryGetValueIfPresent
+ Retrieves the value associated with the given key.
+ @param theDict The dictionary to be queried. If this parameter is
+ not a valid CFDictionary, the behavior is undefined.
+ @param key The key for which to find a match in the dictionary. The
+ hash() and equal() key callbacks provided when the dictionary
+ was created are used to compare. If the hash() key callback
+ was NULL, the key is treated as a pointer and converted to
+ an integer. If the equal() key callback was NULL, pointer
+ equality (in C, ==) is used. If key, or any of the keys in
+ the dictionary, are not understood by the equal() callback,
+ the behavior is undefined.
+ @param value A pointer to memory which should be filled with the
+ pointer-sized value if a matching key is found. If no key
+ match is found, the contents of the storage pointed to by
+ this parameter are undefined. This parameter may be NULL,
+ in which case the value from the dictionary is not returned
+ (but the return value of this function still indicates
+ whether or not the key-value pair was present).
+ @result true, if a matching key was found, false otherwise.
+}
+function CFDictionaryGetValueIfPresent( theDict: CFDictionaryRef; key: {const} UnivPtr; {const} value: UnivPtrPtr ): Boolean; external name '_CFDictionaryGetValueIfPresent';
+
+{!
+ @function CFDictionaryGetKeysAndValues
+ Fills the two buffers with the keys and values from the dictionary.
+ @param theDict The dictionary to be queried. If this parameter is
+ not a valid CFDictionary, the behavior is undefined.
+ @param keys A C array of pointer-sized values to be filled with keys
+ from the dictionary. The keys and values C arrays are parallel
+ to each other (that is, the items at the same indices form a
+ key-value pair from the dictionary). This parameter may be NULL
+ if the keys are not desired. If this parameter is not a valid
+ pointer to a C array of at least CFDictionaryGetCount() pointers,
+ or NULL, the behavior is undefined.
+ @param values A C array of pointer-sized values to be filled with values
+ from the dictionary. The keys and values C arrays are parallel
+ to each other (that is, the items at the same indices form a
+ key-value pair from the dictionary). This parameter may be NULL
+ if the values are not desired. If this parameter is not a valid
+ pointer to a C array of at least CFDictionaryGetCount() pointers,
+ or NULL, the behavior is undefined.
+}
+procedure CFDictionaryGetKeysAndValues( theDict: CFDictionaryRef; {const} keys: UnivPtrPtr; {const} values: UnivPtrPtr ); external name '_CFDictionaryGetKeysAndValues';
+
+{!
+ @function CFDictionaryApplyFunction
+ Calls a function once for each value in the dictionary.
+ @param theDict The dictionary to be queried. If this parameter is
+ not a valid CFDictionary, the behavior is undefined.
+ @param applier The callback function to call once for each value in
+ the dictionary. If this parameter is not a
+ 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.
+ @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
+ what is expected by the applier function, the behavior is
+ undefined.
+}
+procedure CFDictionaryApplyFunction( theDict: CFDictionaryRef; applier: CFDictionaryApplierFunction; context: UnivPtr ); external name '_CFDictionaryApplyFunction';
+
+{!
+ @function CFDictionaryAddValue
+ Adds the key-value pair to the dictionary if no such key already exists.
+ @param theDict The dictionary to which the value is to be added. If this
+ parameter is not a valid mutable CFDictionary, the behavior is
+ undefined. If the dictionary is a fixed-capacity dictionary and
+ it is full before this operation, the behavior is undefined.
+ @param key The key of the value to add to the dictionary. The key is
+ retained by the dictionary using the retain callback provided
+ when the dictionary was created. If the key is not of the sort
+ expected by the retain callback, the behavior is undefined. If
+ a key which matches this key is already present in the dictionary,
+ this function does nothing ("add if absent").
+ @param value The value to add to the dictionary. The value is retained
+ by the dictionary using the retain callback provided when the
+ dictionary was created. If the value is not of the sort expected
+ by the retain callback, the behavior is undefined.
+}
+procedure CFDictionaryAddValue( theDict: CFMutableDictionaryRef; key: {const} UnivPtr; value: {const} UnivPtr ); external name '_CFDictionaryAddValue';
+
+{!
+ @function CFDictionarySetValue
+ Sets the value of the key in the dictionary.
+ @param theDict The dictionary to which the value is to be set. If this
+ parameter is not a valid mutable CFDictionary, the behavior is
+ undefined. If the dictionary is a fixed-capacity dictionary and
+ it is full before this operation, and the key does not exist in
+ the dictionary, the behavior is undefined.
+ @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
+ dictionary. If added, the key is retained by the dictionary,
+ using the retain callback provided
+ when the dictionary was created. If the key is not of the sort
+ expected by the key retain callback, the behavior is undefined.
+ @param value The value to add to or replace into the dictionary. The value
+ is retained by the dictionary using the retain callback provided
+ when the dictionary was created, and the previous value if any is
+ released. If the value is not of the sort expected by the
+ retain or release callbacks, the behavior is undefined.
+}
+procedure CFDictionarySetValue( theDict: CFMutableDictionaryRef; key: {const} UnivPtr; value: {const} UnivPtr ); external name '_CFDictionarySetValue';
+
+{!
+ @function CFDictionaryReplaceValue
+ Replaces the value of the key in the dictionary.
+ @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
+ 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").
+ @param value The value to replace into the dictionary. The value
+ is retained by the dictionary using the retain callback provided
+ when the dictionary was created, and the previous value is
+ released. If the value is not of the sort expected by the
+ retain or release callbacks, the behavior is undefined.
+}
+procedure CFDictionaryReplaceValue( theDict: CFMutableDictionaryRef; key: {const} UnivPtr; value: {const} UnivPtr ); external name '_CFDictionaryReplaceValue';
+
+{!
+ @function CFDictionaryRemoveValue
+ Removes the value of the key from the dictionary.
+ @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
+ 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").
+}
+procedure CFDictionaryRemoveValue( theDict: CFMutableDictionaryRef; key: {const} UnivPtr ); external name '_CFDictionaryRemoveValue';
+
+{!
+ @function CFDictionaryRemoveAllValues
+ Removes all the values from the dictionary, making it empty.
+ @param theDict The dictionary from which all of the values are to be
+ removed. If this parameter is not a valid mutable
+ CFDictionary, the behavior is undefined.
+}
+procedure CFDictionaryRemoveAllValues( theDict: CFMutableDictionaryRef ); external name '_CFDictionaryRemoveAllValues';
+
+
+{unit CFNotificationCenter}
+{ CFNotificationCenter.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFNotificationCenterRef = ^SInt32; { an opaque 32-bit type }
+
+type
+ CFNotificationCallback = procedure( center: CFNotificationCenterRef; observer: UnivPtr; name: CFStringRef; objct: {const} UnivPtr; userInfo: CFDictionaryRef );
+
+type
+ CFNotificationSuspensionBehavior = SInt32;
+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.
+ 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;
+ // The server will deliver notifications matching this registration whether or not the process is in the background. When a notification with this suspension behavior is matched, it has the effect of first flushing any queued notifications.
+
+function CFNotificationCenterGetTypeID: CFTypeID; external name '_CFNotificationCenterGetTypeID';
+
+function CFNotificationCenterGetLocalCenter: CFNotificationCenterRef; external name '_CFNotificationCenterGetLocalCenter';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CFNotificationCenterGetDistributedCenter: CFNotificationCenterRef; external name '_CFNotificationCenterGetDistributedCenter';
+
+function CFNotificationCenterGetDarwinNotifyCenter: CFNotificationCenterRef; external name '_CFNotificationCenterGetDarwinNotifyCenter';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+// The Darwin Notify Center is based on the <notify.h> API.
+// For this center, there are limitations in the API. There are no notification "objects",
+// "userInfo" cannot be passed in the notification, and there are no suspension behaviors
+// (always "deliver immediately"). Other limitations in the <notify.h> API as described in
+// that header will also apply.
+// - In the CFNotificationCallback, the 'object' and 'userInfo' parameters must be ignored.
+// - CFNotificationCenterAddObserver(): the 'object' and 'suspensionBehavior' arguments are ignored.
+// - CFNotificationCenterAddObserver(): the 'name' argument may not be NULL (for this center).
+// - CFNotificationCenterRemoveObserver(): the 'object' argument is ignored.
+// - CFNotificationCenterPostNotification(): the 'object', 'userInfo', and 'deliverImmediately' arguments are ignored.
+// - CFNotificationCenterPostNotificationWithOptions(): the 'object', 'userInfo', and 'options' arguments are ignored.
+// The Darwin Notify Center has no notion of per-user sessions, all notifications are system-wide.
+// As with distributed notifications, the main thread's run loop must be running in one of the
+// common modes (usually kCFRunLoopDefaultMode) for Darwin-style notifications to be delivered.
+// NOTE: NULL or 0 should be passed for all ignored arguments to ensure future compatibility.
+
+
+procedure CFNotificationCenterAddObserver( center: CFNotificationCenterRef; observer: {const} UnivPtr; callBack: CFNotificationCallback; name: CFStringRef; objct: {const} UnivPtr; suspensionBehavior: CFNotificationSuspensionBehavior ); external name '_CFNotificationCenterAddObserver';
+
+procedure CFNotificationCenterRemoveObserver( center: CFNotificationCenterRef; observer: {const} UnivPtr; name: CFStringRef; objct: {const} UnivPtr ); external name '_CFNotificationCenterRemoveObserver';
+procedure CFNotificationCenterRemoveEveryObserver( center: CFNotificationCenterRef; observer: {const} UnivPtr ); external name '_CFNotificationCenterRemoveEveryObserver';
+
+procedure CFNotificationCenterPostNotification( center: CFNotificationCenterRef; name: CFStringRef; objct: {const} UnivPtr; userInfo: CFDictionaryRef; deliverImmediately: Boolean ); external name '_CFNotificationCenterPostNotification';
+
+{#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+
+const
+ kCFNotificationDeliverImmediately = 1 shl 0;
+ kCFNotificationPostToAllSessions = 1 shl 1;
+
+procedure CFNotificationCenterPostNotificationWithOptions( center: CFNotificationCenterRef; name: CFStringRef; objct: {const} UnivPtr; userInfo: CFDictionaryRef; options: CFOptionFlags ); external name '_CFNotificationCenterPostNotificationWithOptions';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{#endif}
+
+
+{unit CFNumber}
+{ CFNumber.h
+ Copyright (c) 1999-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFBooleanRef = ^SInt32; { an opaque 32-bit type }
+ CFBooleanRefPtr = ^CFBooleanRef;
+
+var kCFBooleanTrue: CFBooleanRef; external name '_kCFBooleanTrue'; (* attribute const *)
+var kCFBooleanFalse: CFBooleanRef; external name '_kCFBooleanFalse'; (* attribute const *)
+
+function CFBooleanGetTypeID: CFTypeID; external name '_CFBooleanGetTypeID';
+
+function CFBooleanGetValue( value: CFBooleanRef ): Boolean; external name '_CFBooleanGetValue';
+
+type
+ CFNumberType = SInt32;
+const
+ { Types from MacTypes.h }
+ kCFNumberSInt8Type = 1;
+ kCFNumberSInt16Type = 2;
+ kCFNumberSInt32Type = 3;
+ kCFNumberSInt64Type = 4;
+ kCFNumberFloat32Type = 5;
+ kCFNumberFloat64Type = 6; { 64-bit IEEE 754 }
+ { Basic C types }
+ kCFNumberCharType = 7;
+ kCFNumberShortType = 8;
+ kCFNumberIntType = 9;
+ kCFNumberLongType = 10;
+ kCFNumberLongLongType = 11;
+ kCFNumberFloatType = 12;
+ kCFNumberDoubleType = 13; { Other }
+ kCFNumberCFIndexType = 14;
+ kCFNumberMaxType = 14;
+
+type
+ CFNumberRef = ^SInt32; { an opaque 32-bit type }
+ CFNumberRefPtr = ^CFNumberRef;
+
+var kCFNumberPositiveInfinity: CFNumberRef; external name '_kCFNumberPositiveInfinity'; (* attribute const *)
+var kCFNumberNegativeInfinity: CFNumberRef; external name '_kCFNumberNegativeInfinity'; (* attribute const *)
+var kCFNumberNaN: CFNumberRef; external name '_kCFNumberNaN'; (* attribute const *)
+
+function CFNumberGetTypeID: CFTypeID; external name '_CFNumberGetTypeID';
+
+{
+ Creates a CFNumber with the given value. The type of number pointed
+ to by the valuePtr is specified by type. If type is a floating point
+ type and the value represents one of the infinities or NaN, the
+ well-defined CFNumber for that value is returned. If either of
+ valuePtr or type is an invalid value, the result is undefined.
+}
+function CFNumberCreate( allocator: CFAllocatorRef; theType: CFNumberType; valuePtr: {const} UnivPtr ): CFNumberRef; external name '_CFNumberCreate';
+
+{
+ Returns the storage format of the CFNumber's value. Note that
+ this is not necessarily the type provided in CFNumberCreate().
+}
+function CFNumberGetType( number: CFNumberRef ): CFNumberType; external name '_CFNumberGetType';
+
+{
+ Returns the size in bytes of the type of the number.
+}
+function CFNumberGetByteSize( number: CFNumberRef ): CFIndex; external name '_CFNumberGetByteSize';
+
+{
+ Returns true if the type of the CFNumber's value is one of
+ the defined floating point types.
+}
+function CFNumberIsFloatType( number: CFNumberRef ): Boolean; external name '_CFNumberIsFloatType';
+
+{
+ Copies the CFNumber's value into the space pointed to by
+ valuePtr, as the specified type. If conversion needs to take
+ place, the conversion rules follow human expectation and not
+ C's promotion and truncation rules. If the conversion is
+ lossy, or the value is out of range, false is returned. Best
+ attempt at conversion will still be in *valuePtr.
+}
+function CFNumberGetValue( number: CFNumberRef; theType: CFNumberType; valuePtr: UnivPtr ): Boolean; external name '_CFNumberGetValue';
+
+{
+ Compares the two CFNumber instances. If conversion of the
+ types of the values is needed, the conversion and comparison
+ follow human expectations and not C's promotion and comparison
+ rules. Negative zero compares less than positive zero.
+ Positive infinity compares greater than everything except
+ itself, to which it compares equal. Negative infinity compares
+ less than everything except itself, to which it compares equal.
+ Unlike standard practice, if both numbers are NaN, then they
+ compare equal; if only one of the numbers is NaN, then the NaN
+ compares greater than the other number if it is negative, and
+ smaller than the other number if it is positive. (Note that in
+ CFEqual() with two CFNumbers, if either or both of the numbers
+ is NaN, true is returned.)
+}
+function CFNumberCompare( number: CFNumberRef; otherNumber: CFNumberRef; context: UnivPtr ): CFComparisonResult; external name '_CFNumberCompare';
+
+
+{unit CFSet}
+{ CFSet.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+{!
+ @header CFSet
+ CFSet implements a container which stores unique values.
+}
+
+
+{!
+ @typedef CFSetRetainCallBack
+ Type of the callback function used by CFSets for retaining values.
+ @param allocator The allocator of the CFSet.
+ @param value The value to retain.
+ @result The value to store in the set, which is usually the value
+ parameter passed to this callback, but may be a different
+ value if a different value should be stored in the set.
+}
+type
+ CFSetRetainCallBack = function( allocator: CFAllocatorRef; value: {const} UnivPtr ): UnivPtr;
+
+{!
+ @typedef CFSetReleaseCallBack
+ Type of the callback function used by CFSets for releasing a retain on values.
+ @param allocator The allocator of the CFSet.
+ @param value The value to release.
+}
+type
+ CFSetReleaseCallBack = procedure( allocator: CFAllocatorRef; value: {const} UnivPtr );
+
+{!
+ @typedef CFSetCopyDescriptionCallBack
+ Type of the callback function used by CFSets for describing values.
+ @param value The value to describe.
+ @result A description of the specified value.
+}
+type
+ CFSetCopyDescriptionCallBack = function( value: {const} UnivPtr ): CFStringRef;
+
+{!
+ @typedef CFSetEqualCallBack
+ Type of the callback function used by CFSets for comparing values.
+ @param value1 The first value to compare.
+ @param value2 The second value to compare.
+ @result True if the values are equal, otherwise false.
+}
+type
+ CFSetEqualCallBack = function( value1: {const} UnivPtr; value2: {const} UnivPtr ): Boolean;
+
+{!
+ @typedef CFSetHashCallBack
+ Type of the callback function used by CFSets for hashing values.
+ @param value The value to hash.
+ @result The hash of the value.
+}
+type
+ CFSetHashCallBack = function( value: {const} UnivPtr ): CFHashCode;
+
+{!
+ @typedef CFSetCallBacks
+ Structure containing the callbacks of a CFSet.
+ @field version The version number of the structure type being passed
+ in as a parameter to the CFSet creation functions. This
+ structure is version 0.
+ @field retain The callback used to add a retain for the set on
+ values as they are put into the set. This callback returns
+ the value to store in the set, which is usually the value
+ parameter passed to this callback, but may be a different
+ value if a different value should be stored in the set.
+ The set's allocator is passed as the first argument.
+ @field release The callback used to remove a retain previously added
+ for the set from values as they are removed from the
+ set. The set's allocator is passed as the first
+ argument.
+ @field copyDescription The callback used to create a descriptive
+ string representation of each value in the set. This is
+ used by the CFCopyDescription() function.
+ @field equal The callback used to compare values in the set for
+ equality for some operations.
+ @field hash The callback used to compare values in the set for
+ uniqueness for some operations.
+}
+type
+ CFSetCallBacks = record
+ version: CFIndex;
+ retain: CFSetRetainCallBack;
+ release: CFSetReleaseCallBack;
+ copyDescription: CFSetCopyDescriptionCallBack;
+ equal: CFSetEqualCallBack;
+ hash: CFSetHashCallBack;
+ end;
+ CFSetCallBacksPtr = ^CFSetCallBacks;
+
+{!
+ @constant kCFTypeSetCallBacks
+ Predefined CFSetCallBacks structure containing a set of callbacks
+ appropriate for use when the values in a CFSet are all CFTypes.
+}
+var kCFTypeSetCallBacks: CFSetCallBacks; external name '_kCFTypeSetCallBacks'; (* attribute const *)
+
+{!
+ @constant kCFCopyStringSetCallBacks
+ Predefined CFSetCallBacks structure containing a set of callbacks
+ appropriate for use when the values in a CFSet should be copies
+ of a CFString.
+}
+var kCFCopyStringSetCallBacks: CFSetCallBacks; external name '_kCFCopyStringSetCallBacks'; (* attribute const *)
+
+{!
+ @typedef CFSetApplierFunction
+ Type of the callback function used by the apply functions of
+ CFSets.
+ @param value The current value from the set.
+ @param context The user-defined context parameter given to the apply
+ function.
+}
+type
+ CFSetApplierFunction = procedure( value: {const} UnivPtr; context: UnivPtr );
+
+{!
+ @typedef CFSetRef
+ This is the type of a reference to immutable CFSets.
+}
+type
+ CFSetRef = ^SInt32; { an opaque 32-bit type }
+ CFSetRefPtr = ^CFSetRef;
+
+{!
+ @typedef CFMutableSetRef
+ This is the type of a reference to mutable CFSets.
+}
+type
+ CFMutableSetRef = CFSetRef;
+ CFMutableSetRefPtr = ^CFMutableSetRef;
+
+{!
+ @function CFSetGetTypeID
+ Returns the type identifier of all CFSet instances.
+}
+function CFSetGetTypeID: CFTypeID; external name '_CFSetGetTypeID';
+
+{!
+ @function CFSetCreate
+ Creates a new immutable set with the given values.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the set and its storage for values. 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 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.
+ 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
+ behavior is undefined.
+ @param callBacks A C pointer to a CFSetCallBacks structure
+ initialized with the callbacks for the set to use on each
+ value in the set. A copy of the contents of the
+ callbacks structure is made, so that a pointer to a
+ structure on the stack can be passed in, or can be reused
+ for multiple set creations. If the version field of this
+ callbacks structure is not one of the defined ones for
+ CFSet, the behavior is undefined. The retain field may be
+ NULL, in which case the CFSet will do nothing to add a
+ retain to the contained values for the set. The release
+ field may be NULL, in which case the CFSet will do nothing
+ to remove the set's retain (if any) on the values when the
+ set is destroyed. If the copyDescription field is NULL,
+ the set will create a simple description for the value. If
+ the equal field is NULL, the set will use pointer equality
+ to test for equality of values. The hash field may be NULL,
+ in which case the CFSet will determine uniqueness by pointer
+ equality. This callbacks parameter
+ itself may be NULL, which is treated as if a valid structure
+ of version 0 with all fields NULL had been passed in.
+ Otherwise, if any of the fields are not valid pointers to
+ functions of the correct type, or this parameter is not a
+ valid pointer to a CFSetCallBacks callbacks structure,
+ the behavior is undefined. If any of the values put into the
+ set is not one understood by one of the callback functions
+ the behavior when that callback function is used is
+ undefined.
+ @result A reference to the new immutable CFSet.
+}
+function CFSetCreate( allocator: CFAllocatorRef; {const} values: UnivPtrPtr; numValues: CFIndex; {const} callBacks: CFSetCallBacksPtr { can be NULL } ): CFSetRef; external name '_CFSetCreate';
+
+{!
+ @function CFSetCreateCopy
+ Creates a new immutable set with the values from the given set.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the set and its storage for values. 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 theSet The set which is to be copied. The values from the
+ set are copied as pointers into the new set (that is,
+ the values themselves are copied, not that which the values
+ point to, if anything). However, the values are also
+ retained by the new set. The count of the new set will
+ be the same as the copied set. The new set uses the same
+ callbacks as the set to be copied. If this parameter is
+ not a valid CFSet, the behavior is undefined.
+ @result A reference to the new immutable CFSet.
+}
+function CFSetCreateCopy( allocator: CFAllocatorRef; theSet: CFSetRef ): CFSetRef; external name '_CFSetCreateCopy';
+
+{!
+ @function CFSetCreateMutable
+ Creates a new empty mutable set.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the set and its storage for values. 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 capacity The maximum number of values that can be contained
+ by the CFSet. The set starts empty, and can grow to this
+ number of values (and it can have less). If this parameter
+ is 0, the set's maximum capacity is unlimited (or rather,
+ only limited by address space and available memory
+ constraints). If this parameter is negative, the behavior is
+ undefined.
+ @param callBacks A C pointer to a CFSetCallBacks structure
+ initialized with the callbacks for the set to use on each
+ value in the set. A copy of the contents of the
+ callbacks structure is made, so that a pointer to a
+ structure on the stack can be passed in, or can be reused
+ for multiple set creations. If the version field of this
+ callbacks structure is not one of the defined ones for
+ CFSet, the behavior is undefined. The retain field may be
+ NULL, in which case the CFSet will do nothing to add a
+ retain to the contained values for the set. The release
+ field may be NULL, in which case the CFSet will do nothing
+ to remove the set's retain (if any) on the values when the
+ set is destroyed. If the copyDescription field is NULL,
+ the set will create a simple description for the value. If
+ the equal field is NULL, the set will use pointer equality
+ to test for equality of values. The hash field may be NULL,
+ in which case the CFSet will determine uniqueness by pointer
+ equality. This callbacks parameter
+ itself may be NULL, which is treated as if a valid structure
+ of version 0 with all fields NULL had been passed in.
+ Otherwise, if any of the fields are not valid pointers to
+ functions of the correct type, or this parameter is not a
+ valid pointer to a CFSetCallBacks callbacks structure,
+ the behavior is undefined. If any of the values put into the
+ set is not one understood by one of the callback functions
+ the behavior when that callback function is used is
+ undefined.
+ @result A reference to the new mutable CFSet.
+}
+function CFSetCreateMutable( allocator: CFAllocatorRef; capacity: CFIndex; {const} callBacks: CFSetCallBacksPtr { can be NULL } ): CFMutableSetRef; external name '_CFSetCreateMutable';
+
+{!
+ @function CFSetCreateMutableCopy
+ Creates a new immutable set with the values from the given set.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the set and its storage for values. 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 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
+ greater than or equal to the count of the set which is to
+ be copied, or the behavior is undefined.
+ @param theSet The set which is to be copied. The values from the
+ set are copied as pointers into the new set (that is,
+ the values themselves are copied, not that which the values
+ point to, if anything). However, the values are also
+ retained by the new set. The count of the new set will
+ be the same as the copied set. The new set uses the same
+ callbacks as the set to be copied. If this parameter is
+ not a valid CFSet, the behavior is undefined.
+ @result A reference to the new mutable CFSet.
+}
+function CFSetCreateMutableCopy( allocator: CFAllocatorRef; capacity: CFIndex; theSet: CFSetRef ): CFMutableSetRef; external name '_CFSetCreateMutableCopy';
+
+{!
+ @function CFSetGetCount
+ Returns the number of values currently in the set.
+ @param theSet The set to be queried. If this parameter is not a valid
+ CFSet, the behavior is undefined.
+ @result The number of values in the set.
+}
+function CFSetGetCount( theSet: CFSetRef ): CFIndex; external name '_CFSetGetCount';
+
+{!
+ @function CFSetGetCountOfValue
+ 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 synomous to SFSetContainsValue.
+ @param theSet The set to be searched. If this parameter is not a
+ valid CFSet, the behavior is undefined.
+ @param value The value for which to find matches in the set. The
+ equal() callback provided when the set was created is
+ used to compare. If the equal() callback was NULL, pointer
+ equality (in C, ==) is used. If value, or any of the values
+ in the set, are not understood by the equal() callback,
+ the behavior is undefined.
+ @result The number of times the given value occurs in the set.
+}
+function CFSetGetCountOfValue( theSet: CFSetRef; value: {const} UnivPtr ): CFIndex; external name '_CFSetGetCountOfValue';
+
+{!
+ @function CFSetContainsValue
+ Reports whether or not the value is in the set.
+ @param theSet The set to be searched. If this parameter is not a
+ valid CFSet, the behavior is undefined.
+ @param value The value for which to find matches in the set. The
+ equal() callback provided when the set was created is
+ used to compare. If the equal() callback was NULL, pointer
+ equality (in C, ==) is used. If value, or any of the values
+ in the set, are not understood by the equal() callback,
+ the behavior is undefined.
+ @result true, if the value is in the set, otherwise false.
+}
+function CFSetContainsValue( theSet: CFSetRef; value: {const} UnivPtr ): Boolean; external name '_CFSetContainsValue';
+
+{!
+ @function CFSetGetValue
+ Retrieves a value in the set which hashes the same as the specified value.
+ @param theSet The set to be queried. If this parameter is not a
+ valid CFSet, the behavior is undefined.
+ @param value The value to retrieve. The equal() callback provided when
+ the set was created is used to compare. If the equal() callback
+ was NULL, pointer equality (in C, ==) is used. If a value, or
+ any of the values in the set, are not understood by the equal()
+ callback, the behavior is undefined.
+ @result The value in the set with the given hash.
+}
+function CFSetGetValue( theSet: CFSetRef; value: {const} UnivPtr ): UnivPtr; external name '_CFSetGetValue';
+
+{!
+ @function CFSetGetValue
+ Retrieves a value in the set which hashes the same as the specified value,
+ if present.
+ @param theSet The set to be queried. If this parameter is not a
+ valid CFSet, the behavior is undefined.
+ @param candidate This value is hashed and compared with values in the
+ set to determine which value to retrieve. The equal() callback provided when
+ the set was created is used to compare. If the equal() callback
+ was NULL, pointer equality (in C, ==) is used. If a value, or
+ any of the values in the set, are not understood by the equal()
+ callback, the behavior is undefined.
+ @param value A pointer to memory which should be filled with the
+ pointer-sized value if a matching value is found. If no
+ match is found, the contents of the storage pointed to by
+ this parameter are undefined. This parameter may be NULL,
+ in which case the value from the dictionary is not returned
+ (but the return value of this function still indicates
+ whether or not the value was present).
+ @result True if the value was present in the set, otherwise false.
+}
+function CFSetGetValueIfPresent( theSet: CFSetRef; candidate: {const} UnivPtr; {const} value: UnivPtrPtr ): Boolean; external name '_CFSetGetValueIfPresent';
+
+{!
+ @function CFSetGetValues
+ Fills the buffer with values from the set.
+ @param theSet The set to be queried. If this parameter is not a
+ valid CFSet, the behavior is undefined.
+ @param values A C array of pointer-sized values to be filled with
+ values from the set. The values in the C array are ordered
+ in the same order in which they appear in the set. If this
+ parameter is not a valid pointer to a C array of at least
+ CFSetGetCount() pointers, the behavior is undefined.
+}
+procedure CFSetGetValues( theSet: CFSetRef; {const} values: UnivPtrPtr ); external name '_CFSetGetValues';
+
+{!
+ @function CFSetApplyFunction
+ Calls a function once for each value in the set.
+ @param theSet The set to be operated upon. If this parameter is not
+ a valid CFSet, the behavior is undefined.
+ @param applier The callback function to call once for each value in
+ the given set. If this parameter is not a
+ 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.
+ @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
+ what is expected by the applier function, the behavior is
+ undefined.
+}
+procedure CFSetApplyFunction( theSet: CFSetRef; applier: CFSetApplierFunction; context: UnivPtr ); external name '_CFSetApplyFunction';
+
+{!
+ @function CFSetAddValue
+ Adds the value to the set if it is not already present.
+ @param theSet The set to which the value is to be added. If this
+ parameter is not a valid mutable CFSet, the behavior is
+ undefined. If the set is a fixed-capacity set and it
+ is full before this operation, the behavior is undefined.
+ @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
+ set is increased by one.
+}
+procedure CFSetAddValue( theSet: CFMutableSetRef; value: {const} UnivPtr ); external name '_CFSetAddValue';
+
+{!
+ @function CFSetReplaceValue
+ Replaces the value in the set if it is present.
+ @param theSet The set to which the value is to be replaced. If this
+ parameter is not a valid mutable CFSet, the behavior is
+ undefined.
+ @param value The value to replace in the set. The equal() callback provided when
+ the set was created is used to compare. If the equal() callback
+ was NULL, pointer equality (in C, ==) is used. If a value, or
+ any of the values in the set, are not understood by the equal()
+ 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
+ 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
+ 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
+ undefined.
+ @param value The value to set in the CFSet. The equal() callback provided when
+ the set was created is used to compare. If the equal() callback
+ was NULL, pointer equality (in C, ==) is used. If a value, or
+ any of the values in the set, are not understood by the equal()
+ 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
+ set is increased by one.
+}
+procedure CFSetSetValue( theSet: CFMutableSetRef; value: {const} UnivPtr ); external name '_CFSetSetValue';
+
+{!
+ @function CFSetRemoveValue
+ Removes the specified value from the set.
+ @param theSet The set from which the value is to be removed.
+ If this parameter is not a valid mutable CFSet,
+ the behavior is undefined.
+ @param value The value to remove. The equal() callback provided when
+ the set was created is used to compare. If the equal() callback
+ was NULL, pointer equality (in C, ==) is used. If a value, or
+ any of the values in the set, are not understood by the equal()
+ callback, the behavior is undefined.
+}
+procedure CFSetRemoveValue( theSet: CFMutableSetRef; value: {const} UnivPtr ); external name '_CFSetRemoveValue';
+
+{!
+ @function CFSetRemoveAllValues
+ Removes all the values from the set, making it empty.
+ @param theSet The set from which all of the values are to be
+ removed. If this parameter is not a valid mutable CFSet,
+ the behavior is undefined.
+}
+procedure CFSetRemoveAllValues( theSet: CFMutableSetRef ); external name '_CFSetRemoveAllValues';
+
+
+{unit CFStringEncodingExt}
+{ CFStringEncodingExt.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFStringEncodings = SInt32;
+const
+{ kCFStringEncodingMacRoman = 0L, defined in CoreFoundation/CFString.h }
+ kCFStringEncodingMacJapanese = 1;
+ kCFStringEncodingMacChineseTrad = 2;
+ kCFStringEncodingMacKorean = 3;
+ kCFStringEncodingMacArabic = 4;
+ kCFStringEncodingMacHebrew = 5;
+ kCFStringEncodingMacGreek = 6;
+ kCFStringEncodingMacCyrillic = 7;
+ kCFStringEncodingMacDevanagari = 9;
+ kCFStringEncodingMacGurmukhi = 10;
+ kCFStringEncodingMacGujarati = 11;
+ kCFStringEncodingMacOriya = 12;
+ kCFStringEncodingMacBengali = 13;
+ kCFStringEncodingMacTamil = 14;
+ kCFStringEncodingMacTelugu = 15;
+ kCFStringEncodingMacKannada = 16;
+ kCFStringEncodingMacMalayalam = 17;
+ kCFStringEncodingMacSinhalese = 18;
+ kCFStringEncodingMacBurmese = 19;
+ kCFStringEncodingMacKhmer = 20;
+ kCFStringEncodingMacThai = 21;
+ kCFStringEncodingMacLaotian = 22;
+ kCFStringEncodingMacGeorgian = 23;
+ kCFStringEncodingMacArmenian = 24;
+ kCFStringEncodingMacChineseSimp = 25;
+ kCFStringEncodingMacTibetan = 26;
+ kCFStringEncodingMacMongolian = 27;
+ kCFStringEncodingMacEthiopic = 28;
+ kCFStringEncodingMacCentralEurRoman = 29;
+ kCFStringEncodingMacVietnamese = 30;
+ kCFStringEncodingMacExtArabic = 31;
+ { The following use script code 0, smRoman }
+ kCFStringEncodingMacSymbol = 33;
+ kCFStringEncodingMacDingbats = 34;
+ kCFStringEncodingMacTurkish = 35;
+ kCFStringEncodingMacCroatian = 36;
+ kCFStringEncodingMacIcelandic = 37;
+ kCFStringEncodingMacRomanian = 38;
+ kCFStringEncodingMacCeltic = 39;
+ kCFStringEncodingMacGaelic = 40;
+ { The following use script code 4, smArabic }
+ kCFStringEncodingMacFarsi = $8C; { Like MacArabic but uses Farsi digits }
+ { The following use script code 7, smCyrillic }
+ kCFStringEncodingMacUkrainian = $98;
+ { The following use script code 32, smUnimplemented }
+ kCFStringEncodingMacInuit = $EC;
+ kCFStringEncodingMacVT100 = $FC; { VT100/102 font from Comm Toolbox: Latin-1 repertoire + box drawing etc }
+ { Special Mac OS encodings }
+ kCFStringEncodingMacHFS = $FF; { Meta-value, should never appear in a table }
+
+ { Unicode & ISO UCS encodings begin at 0x100 }
+ { We don't use Unicode variations defined in TextEncoding; use the ones in CFString.h, instead. }
+
+ { ISO 8-bit and 7-bit encodings begin at 0x200 }
+ { kCFStringEncodingISOLatin1 = 0x0201, defined in CoreFoundation/CFString.h }
+ kCFStringEncodingISOLatin2 = $0202; { ISO 8859-2 }
+ kCFStringEncodingISOLatin3 = $0203; { ISO 8859-3 }
+ kCFStringEncodingISOLatin4 = $0204; { ISO 8859-4 }
+ kCFStringEncodingISOLatinCyrillic = $0205; { ISO 8859-5 }
+ kCFStringEncodingISOLatinArabic = $0206; { ISO 8859-6, =ASMO 708, =DOS CP 708 }
+ kCFStringEncodingISOLatinGreek = $0207; { ISO 8859-7 }
+ kCFStringEncodingISOLatinHebrew = $0208; { ISO 8859-8 }
+ kCFStringEncodingISOLatin5 = $0209; { ISO 8859-9 }
+ kCFStringEncodingISOLatin6 = $020A; { ISO 8859-10 }
+ kCFStringEncodingISOLatinThai = $020B; { ISO 8859-11 }
+ kCFStringEncodingISOLatin7 = $020D; { ISO 8859-13 }
+ kCFStringEncodingISOLatin8 = $020E; { ISO 8859-14 }
+ kCFStringEncodingISOLatin9 = $020F; { ISO 8859-15 }
+{#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
+ kCFStringEncodingISOLatin10 = $0210; { ISO 8859-16 }
+{#endif} { MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 }
+
+ { MS-DOS & Windows encodings begin at 0x400 }
+ kCFStringEncodingDOSLatinUS = $0400; { code page 437 }
+ kCFStringEncodingDOSGreek = $0405; { code page 737 (formerly code page 437G) }
+ kCFStringEncodingDOSBalticRim = $0406; { code page 775 }
+ kCFStringEncodingDOSLatin1 = $0410; { code page 850, "Multilingual" }
+ kCFStringEncodingDOSGreek1 = $0411; { code page 851 }
+ kCFStringEncodingDOSLatin2 = $0412; { code page 852, Slavic }
+ kCFStringEncodingDOSCyrillic = $0413; { code page 855, IBM Cyrillic }
+ kCFStringEncodingDOSTurkish = $0414; { code page 857, IBM Turkish }
+ kCFStringEncodingDOSPortuguese = $0415; { code page 860 }
+ kCFStringEncodingDOSIcelandic = $0416; { code page 861 }
+ kCFStringEncodingDOSHebrew = $0417; { code page 862 }
+ kCFStringEncodingDOSCanadianFrench = $0418; { code page 863 }
+ kCFStringEncodingDOSArabic = $0419; { code page 864 }
+ kCFStringEncodingDOSNordic = $041A; { code page 865 }
+ kCFStringEncodingDOSRussian = $041B; { code page 866 }
+ kCFStringEncodingDOSGreek2 = $041C; { code page 869, IBM Modern Greek }
+ kCFStringEncodingDOSThai = $041D; { code page 874, also for Windows }
+ kCFStringEncodingDOSJapanese = $0420; { code page 932, also for Windows }
+ kCFStringEncodingDOSChineseSimplif = $0421; { code page 936, also for Windows }
+ kCFStringEncodingDOSKorean = $0422; { code page 949, also for Windows; Unified Hangul Code }
+ kCFStringEncodingDOSChineseTrad = $0423; { code page 950, also for Windows }
+ { kCFStringEncodingWindowsLatin1 = 0x0500, defined in CoreFoundation/CFString.h }
+ kCFStringEncodingWindowsLatin2 = $0501; { code page 1250, Central Europe }
+ kCFStringEncodingWindowsCyrillic = $0502; { code page 1251, Slavic Cyrillic }
+ kCFStringEncodingWindowsGreek = $0503; { code page 1253 }
+ kCFStringEncodingWindowsLatin5 = $0504; { code page 1254, Turkish }
+ kCFStringEncodingWindowsHebrew = $0505; { code page 1255 }
+ kCFStringEncodingWindowsArabic = $0506; { code page 1256 }
+ kCFStringEncodingWindowsBalticRim = $0507; { code page 1257 }
+ kCFStringEncodingWindowsVietnamese = $0508; { code page 1258 }
+ kCFStringEncodingWindowsKoreanJohab = $0510; { code page 1361, for Windows NT }
+
+ { Various national standards begin at 0x600 }
+ { kCFStringEncodingASCII = 0x0600, defined in CoreFoundation/CFString.h }
+{#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
+ kCFStringEncodingANSEL = $0601; { ANSEL (ANSI Z39.47) }
+{#endif} { MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 }
+ kCFStringEncodingJIS_X0201_76 = $0620;
+ kCFStringEncodingJIS_X0208_83 = $0621;
+ kCFStringEncodingJIS_X0208_90 = $0622;
+ kCFStringEncodingJIS_X0212_90 = $0623;
+ kCFStringEncodingJIS_C6226_78 = $0624;
+ kCFStringEncodingShiftJIS_X0213_00 = $0628; { Shift-JIS format encoding of JIS X0213 planes 1 and 2}
+{#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
+ kCFStringEncodingShiftJIS_X0213_MenKuTen = $0629; { JIS X0213 in plane-row-column notation }
+{#endif} { MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 }
+ kCFStringEncodingGB_2312_80 = $0630;
+ kCFStringEncodingGBK_95 = $0631; { annex to GB 13000-93; for Windows 95 }
+ kCFStringEncodingKSC_5601_87 = $0640; { same as KSC 5601-92 without Johab annex }
+ kCFStringEncodingKSC_5601_92_Johab = $0641; { KSC 5601-92 Johab annex }
+ kCFStringEncodingCNS_11643_92_P1 = $0651; { CNS 11643-1992 plane 1 }
+ kCFStringEncodingCNS_11643_92_P2 = $0652; { CNS 11643-1992 plane 2 }
+ kCFStringEncodingCNS_11643_92_P3 = $0653; { CNS 11643-1992 plane 3 (was plane 14 in 1986 version) }
+
+ { ISO 2022 collections begin at 0x800 }
+ kCFStringEncodingISO_2022_JP = $0820;
+ kCFStringEncodingISO_2022_JP_2 = $0821;
+ kCFStringEncodingISO_2022_JP_1 = $0822; { RFC 2237}
+ kCFStringEncodingISO_2022_JP_3 = $0823; { JIS X0213}
+ kCFStringEncodingISO_2022_CN = $0830;
+ kCFStringEncodingISO_2022_CN_EXT = $0831;
+ kCFStringEncodingISO_2022_KR = $0840;
+
+ { EUC collections begin at 0x900 }
+ kCFStringEncodingEUC_JP = $0920; { ISO 646, 1-byte katakana, JIS 208, JIS 212 }
+ kCFStringEncodingEUC_CN = $0930; { ISO 646, GB 2312-80 }
+ kCFStringEncodingEUC_TW = $0931; { ISO 646, CNS 11643-1992 Planes 1-16 }
+ kCFStringEncodingEUC_KR = $0940; { ISO 646, KS C 5601-1987 }
+
+ { Misc standards begin at 0xA00 }
+ kCFStringEncodingShiftJIS = $0A01; { plain Shift-JIS }
+ kCFStringEncodingKOI8_R = $0A02; { Russian internet standard }
+ kCFStringEncodingBig5 = $0A03; { Big-5 (has variants) }
+ kCFStringEncodingMacRomanLatin1 = $0A04; { Mac OS Roman permuted to align with ISO Latin-1 }
+ kCFStringEncodingHZ_GB_2312 = $0A05; { HZ (RFC 1842, for Chinese mail & news) }
+ kCFStringEncodingBig5_HKSCS_1999 = $0A06; { Big-5 with Hong Kong special char set supplement}
+{#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
+ kCFStringEncodingVISCII = $0A07; { RFC 1456, Vietnamese }
+ kCFStringEncodingKOI8_U = $0A08; { RFC 2319, Ukrainian }
+ kCFStringEncodingBig5_E = $0A09; { Taiwan Big-5E standard }
+{#endif} { MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 }
+
+ { Other platform encodings }
+{ kCFStringEncodingNextStepLatin = 0x0B01, defined in CoreFoundation/CFString.h }
+{#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
+ kCFStringEncodingNextStepJapanese = $0B02; { NextStep Japanese encoding }
+{#endif} { MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 }
+ { EBCDIC & IBM host encodings begin at 0xC00 }
+ kCFStringEncodingEBCDIC_US = $0C01; { basic EBCDIC-US }
+ kCFStringEncodingEBCDIC_CP037 = $0C02; { code page 037, extended EBCDIC (Latin-1 set) for US,Canada... }
+
+
+{unit CFTree}
+{ CFTree.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+{!
+ @header CFTree
+ CFTree implements a container which stores references to other CFTrees.
+ Each tree may have a parent, and a variable number of children.
+}
+
+
+{!
+ @typedef CFTreeRetainCallBack
+ Type of the callback function used to add a retain to the user-specified
+ info parameter. This callback may returns the value to use whenever the
+ info parameter is retained, which is usually the value parameter passed
+ to this callback, but may be a different value if a different value
+ should be used.
+ @param info A user-supplied info parameter provided in a CFTreeContext.
+ @result The retained info parameter.
+}
+type
+ CFTreeRetainCallBack = function( info: {const} UnivPtr ): UnivPtr;
+
+{!
+ @typedef CFTreeReleaseCallBack
+ Type of the callback function used to remove a retain previously
+ added to the user-specified info parameter.
+ @param info A user-supplied info parameter provided in a CFTreeContext.
+}
+type
+ CFTreeReleaseCallBack = procedure( info: {const} UnivPtr );
+
+{!
+ @typedef CFTreeCopyDescriptionCallBack
+ Type of the callback function used to provide a description of the
+ user-specified info parameter.
+ @param info A user-supplied info parameter provided in a CFTreeContext.
+ @result A description of the info parameter.
+}
+type
+ CFTreeCopyDescriptionCallBack = function( info: {const} UnivPtr ): CFStringRef;
+
+{!
+ @typedef CFTreeContext
+ Structure containing user-specified data and callbacks for a CFTree.
+ @field version The version number of the structure type being passed
+ in as a parameter to the CFTree creation function.
+ This structure is version 0.
+ @field info A C pointer to a user-specified block of data.
+ @field retain The callback used to add a retain 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 release The calllback used to remove a retain previously added
+ 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
+ the info field.
+}
+type
+ CFTreeContext = record
+ version: CFIndex;
+ info: UnivPtr;
+ retain: CFTreeRetainCallBack;
+ release: CFTreeReleaseCallBack;
+ copyDescription: CFTreeCopyDescriptionCallBack;
+ end;
+ CFTreeContextPtr = ^CFTreeContext;
+
+{!
+ @typedef CFTreeApplierFunction
+ Type of the callback function used by the apply functions of
+ CFTree.
+ @param value The current value from the CFTree
+ @param context The user-defined context parameter give to the apply
+ function.
+}
+type
+ CFTreeApplierFunction = procedure( value: {const} UnivPtr; context: UnivPtr );
+
+{!
+ @typedef CFTreeRef
+ This is the type of a reference to CFTrees.
+}
+type
+ CFTreeRef = ^SInt32; { an opaque 32-bit type }
+ CFTreeRefPtr = ^CFTreeRef;
+
+{!
+ @function CFTreeGetTypeID
+ Returns the type identifier of all CFTree instances.
+}
+function CFTreeGetTypeID: CFTypeID; external name '_CFTreeGetTypeID';
+
+{!
+ @function CFTreeCreate
+ Creates a new mutable tree.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the tree and storage for its children. 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 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 the version number of the storage is not a valid CFTreeContext
+ version number, the result is undefined.
+ @result A reference to the new CFTree.
+}
+function CFTreeCreate( allocator: CFAllocatorRef; const (*var*) context: CFTreeContext ): CFTreeRef; external name '_CFTreeCreate';
+
+{!
+ @function CFTreeGetParent
+ Returns the parent of the specified tree.
+ @param tree The tree to be queried. If this parameter is not a valid
+ CFTree, the behavior is undefined.
+ @result The parent of the tree.
+}
+function CFTreeGetParent( tree: CFTreeRef ): CFTreeRef; external name '_CFTreeGetParent';
+
+{!
+ @function CFTreeGetNextSibling
+ Returns the sibling after the specified tree in the parent tree's list.
+ @param tree The tree to be queried. If this parameter is not a valid
+ CFTree, the behavior is undefined.
+ @result The next sibling of the tree.
+}
+function CFTreeGetNextSibling( tree: CFTreeRef ): CFTreeRef; external name '_CFTreeGetNextSibling';
+
+{!
+ @function CFTreeGetFirstChild
+ Returns the first child of the tree.
+ @param tree The tree to be queried. If this parameter is not a valid
+ CFTree, the behavior is undefined.
+ @result The first child of the tree.
+}
+function CFTreeGetFirstChild( tree: CFTreeRef ): CFTreeRef; external name '_CFTreeGetFirstChild';
+
+{!
+ @function CFTreeGetContext
+ Returns the context of the specified tree.
+ @param tree The tree to be queried. If this parameter is not a valid
+ CFTree, the behavior is undefined.
+ @param context A C pointer to a CFTreeContext structure to be filled in with
+ the context of the specified tree. 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.
+}
+procedure CFTreeGetContext( tree: CFTreeRef; var context: CFTreeContext ); external name '_CFTreeGetContext';
+
+{!
+ @function CFTreeGetChildCount
+ Returns the number of children of the specified tree.
+ @param tree The tree to be queried. If this parameter is not a valid
+ CFTree, the behavior is undefined.
+ @result The number of children.
+}
+function CFTreeGetChildCount( tree: CFTreeRef ): CFIndex; external name '_CFTreeGetChildCount';
+
+{!
+ @function CFTreeGetChildAtIndex
+ Returns the nth child of the specified tree.
+ @param tree The tree to be queried. If this parameter is not a valid
+ CFTree, the behavior is undefined.
+ @param idx The index of the child tree to be returned. If this parameter
+ is less than zero or greater than the number of children of the
+ tree, the result is undefined.
+ @result A reference to the specified child tree.
+}
+function CFTreeGetChildAtIndex( tree: CFTreeRef; idx: CFIndex ): CFTreeRef; external name '_CFTreeGetChildAtIndex';
+
+{!
+ @function CFTreeGetChildren
+ Fills the buffer with children from the tree.
+ @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
+ C array of at least CFTreeGetChildCount() pointers, the behavior is undefined.
+ @result A reference to the specified child tree.
+}
+procedure CFTreeGetChildren( tree: CFTreeRef; var children: CFTreeRef ); external name '_CFTreeGetChildren';
+
+{!
+ @function CFTreeApplyFunctionToChildren
+ Calls a function once for each child of the tree. Note that the applier
+ only operates one level deep, and does not operate on descendents further
+ removed than the immediate children of the tree.
+ @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
+ 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.
+ @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
+ what is expected by the applier function, the behavior is
+ undefined.
+}
+procedure CFTreeApplyFunctionToChildren( tree: CFTreeRef; applier: CFTreeApplierFunction; context: UnivPtr ); external name '_CFTreeApplyFunctionToChildren';
+
+{!
+ @function CFTreeFindRoot
+ Returns the root tree of which the specified tree is a descendent.
+ @param tree The tree to be queried. If this parameter is not a valid
+ CFTree, the behavior is undefined.
+ @result A reference to the root of the tree.
+}
+function CFTreeFindRoot( tree: CFTreeRef ): CFTreeRef; external name '_CFTreeFindRoot';
+
+{!
+ @function CFTreeSetContext
+ Replaces the context of a tree. The tree releases its retain on the
+ 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
+ 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 the version number of the storage is not a valid CFTreeContext
+ version number, the result is undefined.
+}
+procedure CFTreeSetContext( tree: CFTreeRef; const (*var*) context: CFTreeContext ); external name '_CFTreeSetContext';
+
+{!
+ @function CFTreePrependChild
+ Adds the newChild to the specified tree as the first in its list of children.
+ @param tree The tree to be operated on. If this parameter is not a valid
+ CFTree, the behavior is undefined.
+ @param newChild The child 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.
+}
+procedure CFTreePrependChild( tree: CFTreeRef; newChild: CFTreeRef ); external name '_CFTreePrependChild';
+
+{!
+ @function CFTreeAppendChild
+ Adds the newChild to the specified tree as the last in its list of children.
+ @param tree The tree to be operated on. If this parameter is not a valid
+ CFTree, the behavior is undefined.
+ @param newChild The child 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.
+}
+procedure CFTreeAppendChild( tree: CFTreeRef; newChild: CFTreeRef ); external name '_CFTreeAppendChild';
+
+{!
+ @function CFTreeInsertSibling
+ Inserts newSibling into the the parent tree's linked list of children after
+ tree. The newSibling will have the same parent as tree.
+ @param tree The tree to insert newSibling after. If this parameter is not a valid
+ CFTree, the behavior is undefined. If the tree does not have a
+ parent, the behavior is undefined.
+ @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.
+}
+procedure CFTreeInsertSibling( tree: CFTreeRef; newSibling: CFTreeRef ); external name '_CFTreeInsertSibling';
+
+{!
+ @function CFTreeRemove
+ Removes the tree from its parent.
+ @param tree The tree to be removed. If this parameter is not a valid
+ CFTree, the behavior is undefined.
+}
+procedure CFTreeRemove( tree: CFTreeRef ); external name '_CFTreeRemove';
+
+{!
+ @function CFTreeRemoveAllChildren
+ Removes all the children of the tree.
+ @param tree The tree to remove all children from. If this parameter is not a valid
+ CFTree, the behavior is undefined.
+}
+procedure CFTreeRemoveAllChildren( tree: CFTreeRef ); external name '_CFTreeRemoveAllChildren';
+
+{!
+ @function CFTreeSortChildren
+ Sorts the children of the specified tree using the specified comparator function.
+ @param tree The tree to be operated on. If this parameter is not a valid
+ CFTree, the behavior is undefined.
+ @param comparator The function with the comparator function type
+ 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
+ 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
+ otherwise unused by this function. If the context is not
+ what is expected by the comparator function, the behavior is
+ undefined.
+}
+procedure CFTreeSortChildren( tree: CFTreeRef; comparator: CFComparatorFunction; context: UnivPtr ); external name '_CFTreeSortChildren';
+
+
+{unit CGBase}
+{ CoreGraphics - CGBase.h
+ * Copyright (c) 2000 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ boolean_t = SInt32;
+
+// Avoid cyclic dependencises by putting CGRefs here
+
+type
+ CGColorRef = ^SInt32; { an opaque 32-bit type }
+ CGPatternRef = ^SInt32; { an opaque 32-bit type }
+ CGPDFStringRef = ^SInt32; { an opaque 32-bit type }
+ CGPDFStreamRef = ^SInt32; { an opaque 32-bit type }
+ CGPDFScannerRef = ^SInt32; { an opaque 32-bit type }
+ CGPDFContentStreamRef = ^SInt32; { an opaque 32-bit type }
+ CGPDFOperatorTableRef = ^SInt32; { an opaque 32-bit type }
+ CGPDFPageRef = ^SInt32; { an opaque 32-bit type }
+ CGPDFDictionaryRef = ^SInt32; { an opaque 32-bit type }
+ CGPDFArrayRef = ^SInt32; { an opaque 32-bit type }
+ CGPSConverterRef = ^SInt32; { an opaque 32-bit type }
+
+{unit CGErrors}
+{
+ * CGError.h
+ * CoreGraphics
+ *
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ Types used for error and error handler }
+type
+ CGError = SInt32;
+const
+ kCGErrorSuccess = 0;
+ kCGErrorFirst = 1000;
+ kCGErrorFailure = kCGErrorFirst;
+ kCGErrorIllegalArgument = 1001;
+ kCGErrorInvalidConnection = 1002;
+ kCGErrorInvalidContext = 1003;
+ kCGErrorCannotComplete = 1004;
+ kCGErrorNameTooLong = 1005;
+ kCGErrorNotImplemented = 1006;
+ kCGErrorRangeCheck = 1007;
+ kCGErrorTypeCheck = 1008;
+ kCGErrorNoCurrentPoint = 1009;
+ kCGErrorInvalidOperation = 1010;
+ kCGErrorNoneAvailable = 1011;
+ { internal errors have taken 1012, 1013, and 1014 }
+
+ 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 }
+
+ 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
+ that it must handle this launch on its own. }
+
+ kCGErrorForkFailed = 1028;
+ { CPS was unable to fork a new process in order to launch an application. }
+
+ kCGErrorLast = kCGErrorForkFailed;
+
+
+{unit CGFunction}
+{ CoreGraphics - CGFunction.h
+ * Copyright (c) 1999-2002 Apple Computer, Inc. (unpublished)
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{! @header CGFunction
+ * A general floating-point function evaluator, using a callback mapping
+ * an arbitrary number of float inputs to an arbitrary number of float
+ * outputs.
+ }
+
+type
+ CGFunctionRef = ^SInt32; { an opaque 32-bit type }
+
+
+{! @typedef CGFunctionEvaluateCallback
+ * This callback evaluates a function, using <tt>in</tt> as inputs, and
+ * places the result in <tt>out</tt>.
+ *
+ * @param info
+ * The info parameter passed to CGFunctionCreate.
+ *
+ * @param inData
+ * An array of <tt>domainDimension</tt> floats.
+ *
+ * @param outData
+ * An array of <tt>rangeDimension</tt> floats.
+ }
+
+type
+ CGFunctionEvaluateCallback = procedure( info: UnivPtr; inp: {const} Float32Ptr; out: Float32Ptr );
+
+{! @typedef CGFunctionReleaseInfoCallback
+ * This callback releases the info parameter passed to the CGFunction
+ * creation functions when the function is deallocated.
+ *
+ * @param info
+ * The info parameter passed to CGFunctionCreate.
+ }
+
+type
+ CGFunctionReleaseInfoCallback = procedure( info: UnivPtr );
+
+{! @typedef CGFunctionCallbacks
+ * Structure containing the callbacks of a CGFunction.
+ *
+ * @field version
+ * The version number of the structure passed to the CGFunction creation
+ * functions. This structure is version 0.
+ *
+ * @field evaluate
+ * The callback used to evaluate the function.
+ *
+ * @field releaseInfo
+ * If non-NULL, the callback used to release the info parameter passed to
+ * the CGFunction creation functions when the function is deallocated.
+ }
+
+type
+ CGFunctionCallbacks = record
+ version: UInt32;
+ evaluate: CGFunctionEvaluateCallback;
+ releaseInfo: CGFunctionReleaseInfoCallback;
+ end;
+
+
+{! @function CGFunctionGetTypeID
+ * Return the CFTypeID for CGFunctionRefs.
+ }
+
+function CGFunctionGetTypeID: CFTypeID; external name '_CGFunctionGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{! @function CGFunctionCreate
+ * Create a function.
+ *
+ * @param info
+ * The parameter passed to the callback functions.
+ *
+ * @param domainDimension
+ * The number of inputs to the function.
+ *
+ * @param domain
+ * An array of <tt>2*domainDimension</tt> floats used to specify the
+ * valid intervals of input values. For each <tt>k</tt> from <tt>0</tt>
+ * to <tt>domainDimension - 1</tt>, <tt>domain[2*k]</tt> must be less
+ * than or equal to <tt>domain[2*k+1]</tt>, and the <tt>k</tt>'th input
+ * value <tt>in[k]</tt> will be clipped to lie in the interval
+ * <tt>domain[2*k] <= in[k] <= domain[2*k+1]</tt>. If this parameter is
+ * NULL, then the input values are not clipped. However, it's strongly
+ * recommended that this parameter be specified; each domain interval
+ * should specify reasonable values for the minimum and maximum in each
+ * dimension.
+ *
+ * @param rangeDimension
+ * The number of outputs from the function.
+ *
+ * @param range
+ * An array of <tt>2*rangeDimension</tt> floats used to specify the valid
+ * intervals of output values. For each <tt>k</tt> from <tt>0</tt> to
+ * <tt>rangeDimension - 1</tt>, <tt>range[2*k]</tt> must be less than or
+ * equal to <tt>range[2*k+1]</tt>, and the <tt>k</tt>'th output value
+ * <tt>out[k]</tt> will be clipped to lie in the interval <tt>range[2*k]
+ * <= out[k] <= range[2*k+1]</tt>. If this parameter is NULL, then the
+ * output values are not clipped. However, it's strongly recommended
+ * that this parameter be specified; each range interval should specify
+ * reasonable values for the minimum and maximum in each dimension.
+ *
+ * @param callbacks
+ * A pointer to a CGFunctionCallbacks structure. The function uses these
+ * callbacks to evaluate values. The contents of the callbacks structure
+ * is copied, so, for example, a pointer to a structure on the stack can
+ * be passed in. }
+
+function CGFunctionCreate( info: UnivPtr; domainDimension: size_t; domain: {const} Float32Ptr; rangeDimension: size_t; range: {const} Float32Ptr; const (*var*) callbacks: CGFunctionCallbacks ): CGFunctionRef; external name '_CGFunctionCreate'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{! @function CGFunctionRetain
+ *
+ * Equivalent to <tt>CFRetain(function)</tt>.
+ }
+
+function CGFunctionRetain( func: CGFunctionRef ): CGFunctionRef; external name '_CGFunctionRetain'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{! @function CGFunctionRelease
+ *
+ * Equivalent to <tt>CFRelease(function)</tt>.
+ }
+
+procedure CGFunctionRelease( func: CGFunctionRef ); external name '_CGFunctionRelease'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{unit CGGeometry}
+{ CoreGraphics - CGGeometry.h
+ * Copyright (c) 1998-2003 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ Points. }
+
+type
+ CGPointPtr = ^CGPoint;
+ CGPoint = record
+ x: Float32;
+ y: Float32;
+ end;
+
+{ Sizes. }
+
+type
+ CGSizePtr = ^CGSize;
+ CGSize = record
+ width: Float32;
+ height: Float32;
+ end;
+
+{ Rectangles. }
+
+type
+ CGRectPtr = ^CGRect;
+ CGRect = record
+ origin: CGPoint;
+ size: CGSize;
+ end;
+
+{ Rectangle edges. }
+
+type
+ CGRectEdge = SInt32;
+const
+ CGRectMinXEdge = 0;
+ CGRectMinYEdge = 1;
+ CGRectMaxXEdge = 2;
+ CGRectMaxYEdge = 3;
+
+{ The "zero" point -- equivalent to CGPointMake(0, 0). }
+
+var CGPointZero: CGPoint; external name '_CGPointZero'; (* attribute const *)
+
+{ The "zero" size -- equivalent to CGSizeMake(0, 0). }
+
+var CGSizeZero: CGSize; external name '_CGSizeZero'; (* attribute const *)
+
+{ The "zero" rectangle -- equivalent to CGRectMake(0, 0, 0, 0). }
+
+var CGRectZero: CGRect; external name '_CGRectZero'; (* attribute const *)
+
+{ The "empty" rect. This is the rectangle returned when, for example, we
+ * intersect two disjoint rectangles. Note that the null rect is not the
+ * same as the zero rect. }
+
+var CGRectNull: CGRect; external name '_CGRectNull'; (* attribute const *)
+
+{ The infinite rectangle. }
+
+var CGRectInfinite: CGRect; external name '_CGRectInfinite'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Make a point from `(x, y)'. }
+// CG_INLINE CGPoint CGPointMake(float x, float y);
+
+{ Make a size from `(width, height)'. }
+// CG_INLINE CGSize CGSizeMake(float width, float height);
+
+{ Make a rect from `(x, y; width, height)'. }
+// CG_INLINE CGRect CGRectMake(float x, float y, float width, float height);
+
+{ Return the leftmost x-value of `rect'. }
+
+function CGRectGetMinX( rect: CGRect ): Float32; external name '_CGRectGetMinX';
+
+{ Return the midpoint x-value of `rect'. }
+
+function CGRectGetMidX( rect: CGRect ): Float32; external name '_CGRectGetMidX';
+
+{ Return the rightmost x-value of `rect'. }
+
+function CGRectGetMaxX( rect: CGRect ): Float32; external name '_CGRectGetMaxX';
+
+{ Return the bottommost y-value of `rect'. }
+
+function CGRectGetMinY( rect: CGRect ): Float32; external name '_CGRectGetMinY';
+
+{ Return the midpoint y-value of `rect'. }
+
+function CGRectGetMidY( rect: CGRect ): Float32; external name '_CGRectGetMidY';
+
+{ Return the topmost y-value of `rect'. }
+
+function CGRectGetMaxY( rect: CGRect ): Float32; external name '_CGRectGetMaxY';
+
+{ Return the width of `rect'. }
+
+function CGRectGetWidth( rect: CGRect ): Float32; external name '_CGRectGetWidth';
+
+{ Return the height of `rect'. }
+
+function CGRectGetHeight( rect: CGRect ): Float32; external name '_CGRectGetHeight';
+
+{ Return 1 if `point1' and `point2' are the same, 0 otherwise. }
+
+function CGPointEqualToPoint( point1: CGPoint; point2: CGPoint ): SInt32; external name '_CGPointEqualToPoint';
+
+{ Return 1 if `size1' and `size2' are the same, 0 otherwise. }
+
+function CGSizeEqualToSize( size1: CGSize; size2: CGSize ): SInt32; external name '_CGSizeEqualToSize';
+
+{ Return 1 if `rect1' and `rect2' are the same, 0 otherwise. }
+
+function CGRectEqualToRect( rect1: CGRect; rect2: CGRect ): SInt32; external name '_CGRectEqualToRect';
+
+{ Standardize `rect' -- i.e., convert it to an equivalent rect which has
+ * positive width and height. }
+
+function CGRectStandardize( rect: CGRect ): CGRect; external name '_CGRectStandardize';
+
+{ Return 1 if `rect' is empty -- i.e., if it has zero width or height. A
+ * null rect is defined to be empty. }
+
+function CGRectIsEmpty( rect: CGRect ): SInt32; external name '_CGRectIsEmpty';
+
+{ Return 1 if `rect' is null -- e.g., the result of intersecting two
+ * disjoint rectangles is a null rect. }
+
+function CGRectIsNull( rect: CGRect ): SInt32; external name '_CGRectIsNull';
+
+{ Return true if `rect' is the infinite rectangle, false otherwise. }
+
+function CGRectIsInfinite( rect: CGRect ): CBool; external name '_CGRectIsInfinite'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Inset `rect' by `(dx, dy)' -- i.e., offset its origin by `(dx, dy)', and
+ * decrease its size by `(2*dx, 2*dy)'. }
+
+function CGRectInset( rect: CGRect; dx: Float32; dy: Float32 ): CGRect; external name '_CGRectInset';
+
+{ Expand `rect' to the smallest rect containing it with integral origin
+ * and size. }
+
+function CGRectIntegral( rect: CGRect ): CGRect; external name '_CGRectIntegral';
+
+{ Return the union of `r1' and `r2'. }
+
+function CGRectUnion( r1: CGRect; r2: CGRect ): CGRect; external name '_CGRectUnion';
+
+{ Return the intersection of `r1' and `r2'. This may return a null
+ * rect. }
+
+function CGRectIntersection( r1: CGRect; r2: CGRect ): CGRect; external name '_CGRectIntersection';
+
+{ Offset `rect' by `(dx, dy)'. }
+
+function CGRectOffset( rect: CGRect; dx: Float32; dy: Float32 ): CGRect; external name '_CGRectOffset';
+
+{ Make two new rectangles, `slice' and `remainder', by dividing `rect'
+ * with a line that's parallel to one of its sides, specified by `edge' --
+ * either `CGRectMinXEdge', `CGRectMinYEdge', `CGRectMaxXEdge', or
+ * `CGRectMaxYEdge'. The size of `slice' is determined by `amount', which
+ * measures the distance from the specified edge. }
+
+procedure CGRectDivide( rect: CGRect; var slice: CGRect; var remainder: CGRect; amount: Float32; edge: CGRectEdge ); external name '_CGRectDivide';
+
+{ Return 1 if `point' is contained in `rect', 0 otherwise. }
+
+function CGRectContainsPoint( rect: CGRect; point: CGPoint ): SInt32; external name '_CGRectContainsPoint';
+
+{ Return 1 if `rect2' is contained in `rect1', 0 otherwise. `rect2' is
+ * contained in `rect1' if the union of `rect1' and `rect2' is equal to
+ * `rect1'. }
+
+function CGRectContainsRect( rect1: CGRect; rect2: CGRect ): SInt32; external name '_CGRectContainsRect';
+
+{ Return 1 if `rect1' intersects `rect2', 0 otherwise. `rect1' intersects
+ * `rect2' if the intersection of `rect1' and `rect2' is not the null
+ * rect. }
+
+function CGRectIntersectsRect( rect1: CGRect; rect2: CGRect ): SInt32; external name '_CGRectIntersectsRect';
+
+(*
+{** Definitions of inline functions. **}
+// CG_INLINE CGPoint CGPointMake(float x, float y)
+{
+ CGPoint p; p.x = x; p.y = y; return p;
+}
+// CG_INLINE CGSize CGSizeMake(float width, float height)
+{
+ CGSize size; size.width = width; size.height = height; return size;
+}
+// CG_INLINE CGRect CGRectMake(float x, float y, float width, float height)
+{
+ CGRect rect;
+ rect.origin.x = x; rect.origin.y = y;
+ rect.size.width = width; rect.size.height = height;
+ return rect;
+}
+*)
+
+{unit CGImageProperties}
+{
+ * ImageIO - CGImageProperties.h
+ * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ Properties that, if returned by CGImageSourceCopyProperties or
+ * CGImageSourceCopyPropertiesAtIndex, contain a dictionary of file-format
+ * or metadata-format specific key-values. }
+
+var kCGImagePropertyTIFFDictionary: CFStringRef; external name '_kCGImagePropertyTIFFDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGIFDictionary: CFStringRef; external name '_kCGImagePropertyGIFDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyJFIFDictionary: CFStringRef; external name '_kCGImagePropertyJFIFDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifDictionary: CFStringRef; external name '_kCGImagePropertyExifDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyPNGDictionary: CFStringRef; external name '_kCGImagePropertyPNGDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCDictionary: CFStringRef; external name '_kCGImagePropertyIPTCDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDictionary: CFStringRef; external name '_kCGImagePropertyGPSDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyRawDictionary: CFStringRef; external name '_kCGImagePropertyRawDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyCIFFDictionary: CFStringRef; external name '_kCGImagePropertyCIFFDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImageProperty8BIMDictionary: CFStringRef; external name '_kCGImageProperty8BIMDictionary'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{* Properties which may be returned by "CGImageSourceCopyProperties". The
+ ** values apply to the container in general but not necessarily to any
+ ** individual image that it contains. *}
+
+{ The size of the image file in bytes, if known. If present, the value of
+ * this key is a CFNumberRef. }
+
+var kCGImagePropertyFileSize: CFStringRef; external name '_kCGImagePropertyFileSize'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{* Properties which may be returned by "CGImageSourceCopyPropertiesAtIndex".
+ ** The values apply to a single image of an image source file. *}
+
+{ The number of pixels in the x- and y-dimensions. The value of these keys
+ * is a CFNumberRef. }
+
+var kCGImagePropertyPixelHeight: CFStringRef; external name '_kCGImagePropertyPixelHeight'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyPixelWidth: CFStringRef; external name '_kCGImagePropertyPixelWidth'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The DPI in the x- and y-dimensions, if known. If present, the value of
+ * these keys is a CFNumberRef. }
+
+var kCGImagePropertyDPIHeight: CFStringRef; external name '_kCGImagePropertyDPIHeight'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyDPIWidth: CFStringRef; external name '_kCGImagePropertyDPIWidth'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The number of bits in each color sample of each pixel. The value of this
+ * key is a CFNumberRef. }
+
+var kCGImagePropertyDepth: CFStringRef; external name '_kCGImagePropertyDepth'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The intended display orientation of the image. If present, the value
+ * of this key is a CFNumberRef with the same value as defined by the
+ * TIFF and Exif specifications. That is:
+ * 1 = 0th row is at the top, and 0th column is on the left.
+ * 2 = 0th row is at the top, and 0th column is on the right.
+ * 3 = 0th row is at the bottom, and 0th column is on the right.
+ * 4 = 0th row is at the bottom, and 0th column is on the left.
+ * 5 = 0th row is on the left, and 0th column is the top.
+ * 6 = 0th row is on the right, and 0th column is the top.
+ * 7 = 0th row is on the right, and 0th column is the bottom.
+ * 8 = 0th row is on the left, and 0th column is the bottom.
+ * If not present, a value of 1 is assumed. }
+
+var kCGImagePropertyOrientation: CFStringRef; external name '_kCGImagePropertyOrientation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The value of this key is kCFBooleanTrue if the image contains floating-
+ * point pixel samples }
+
+var kCGImagePropertyIsFloat: CFStringRef; external name '_kCGImagePropertyIsFloat'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The value of this key is kCFBooleanTrue if the image contains indexed
+ * (a.k.a. paletted) pixel samples }
+
+var kCGImagePropertyIsIndexed: CFStringRef; external name '_kCGImagePropertyIsIndexed'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The value of this key is kCFBooleanTrue if the image contains an alpha
+ * (a.k.a. coverage) channel }
+
+var kCGImagePropertyHasAlpha: CFStringRef; external name '_kCGImagePropertyHasAlpha'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The color model of the image such as "RGB", "CMYK", "Gray", or "Lab".
+ * The value of this key is CFStringRef. }
+
+var kCGImagePropertyColorModel: CFStringRef; external name '_kCGImagePropertyColorModel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The name of the optional ICC profile embedded in the image, if known.
+ * If present, the value of this key is a CFStringRef. }
+
+var kCGImagePropertyProfileName: CFStringRef; external name '_kCGImagePropertyProfileName'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ Possible values for kCGImagePropertyColorModel property }
+
+var kCGImagePropertyColorModelRGB: CFStringRef; external name '_kCGImagePropertyColorModelRGB'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyColorModelGray: CFStringRef; external name '_kCGImagePropertyColorModelGray'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyColorModelCMYK: CFStringRef; external name '_kCGImagePropertyColorModelCMYK'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyColorModelLab: CFStringRef; external name '_kCGImagePropertyColorModelLab'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ Possible keys for kCGImagePropertyTIFFDictionary }
+
+var kCGImagePropertyTIFFCompression: CFStringRef; external name '_kCGImagePropertyTIFFCompression'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFPhotometricInterpretation: CFStringRef; external name '_kCGImagePropertyTIFFPhotometricInterpretation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFDocumentName: CFStringRef; external name '_kCGImagePropertyTIFFDocumentName'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFImageDescription: CFStringRef; external name '_kCGImagePropertyTIFFImageDescription'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFMake: CFStringRef; external name '_kCGImagePropertyTIFFMake'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFModel: CFStringRef; external name '_kCGImagePropertyTIFFModel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFOrientation: CFStringRef; external name '_kCGImagePropertyTIFFOrientation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFXResolution: CFStringRef; external name '_kCGImagePropertyTIFFXResolution'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFYResolution: CFStringRef; external name '_kCGImagePropertyTIFFYResolution'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFResolutionUnit: CFStringRef; external name '_kCGImagePropertyTIFFResolutionUnit'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFSoftware: CFStringRef; external name '_kCGImagePropertyTIFFSoftware'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFTransferFunction: CFStringRef; external name '_kCGImagePropertyTIFFTransferFunction'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFDateTime: CFStringRef; external name '_kCGImagePropertyTIFFDateTime'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFArtist: CFStringRef; external name '_kCGImagePropertyTIFFArtist'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFHostComputer: CFStringRef; external name '_kCGImagePropertyTIFFHostComputer'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFCopyright: CFStringRef; external name '_kCGImagePropertyTIFFCopyright'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFWhitePoint: CFStringRef; external name '_kCGImagePropertyTIFFWhitePoint'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyTIFFPrimaryChromaticities: CFStringRef; external name '_kCGImagePropertyTIFFPrimaryChromaticities'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Possible keys for kCGImagePropertyJFIFDictionary }
+
+var kCGImagePropertyJFIFVersion: CFStringRef; external name '_kCGImagePropertyJFIFVersion'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyJFIFXDensity: CFStringRef; external name '_kCGImagePropertyJFIFXDensity'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyJFIFYDensity: CFStringRef; external name '_kCGImagePropertyJFIFYDensity'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyJFIFDensityUnit: CFStringRef; external name '_kCGImagePropertyJFIFDensityUnit'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyJFIFIsProgressive: CFStringRef; external name '_kCGImagePropertyJFIFIsProgressive'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ Possible keys for kCGImagePropertyExifDictionary }
+
+var kCGImagePropertyExifExposureTime: CFStringRef; external name '_kCGImagePropertyExifExposureTime'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFNumber: CFStringRef; external name '_kCGImagePropertyExifFNumber'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifExposureProgram: CFStringRef; external name '_kCGImagePropertyExifExposureProgram'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSpectralSensitivity: CFStringRef; external name '_kCGImagePropertyExifSpectralSensitivity'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifISOSpeedRatings: CFStringRef; external name '_kCGImagePropertyExifISOSpeedRatings'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifOECF: CFStringRef; external name '_kCGImagePropertyExifOECF'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifVersion: CFStringRef; external name '_kCGImagePropertyExifVersion'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifDateTimeOriginal: CFStringRef; external name '_kCGImagePropertyExifDateTimeOriginal'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifDateTimeDigitized: CFStringRef; external name '_kCGImagePropertyExifDateTimeDigitized'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifComponentsConfiguration: CFStringRef; external name '_kCGImagePropertyExifComponentsConfiguration'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifCompressedBitsPerPixel: CFStringRef; external name '_kCGImagePropertyExifCompressedBitsPerPixel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifShutterSpeedValue: CFStringRef; external name '_kCGImagePropertyExifShutterSpeedValue'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifApertureValue: CFStringRef; external name '_kCGImagePropertyExifApertureValue'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifBrightnessValue: CFStringRef; external name '_kCGImagePropertyExifBrightnessValue'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifExposureBiasValue: CFStringRef; external name '_kCGImagePropertyExifExposureBiasValue'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifMaxApertureValue: CFStringRef; external name '_kCGImagePropertyExifMaxApertureValue'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSubjectDistance: CFStringRef; external name '_kCGImagePropertyExifSubjectDistance'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifMeteringMode: CFStringRef; external name '_kCGImagePropertyExifMeteringMode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifLightSource: CFStringRef; external name '_kCGImagePropertyExifLightSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFlash: CFStringRef; external name '_kCGImagePropertyExifFlash'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFocalLength: CFStringRef; external name '_kCGImagePropertyExifFocalLength'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSubjectArea: CFStringRef; external name '_kCGImagePropertyExifSubjectArea'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifMakerNote: CFStringRef; external name '_kCGImagePropertyExifMakerNote'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifUserComment: CFStringRef; external name '_kCGImagePropertyExifUserComment'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSubsecTime: CFStringRef; external name '_kCGImagePropertyExifSubsecTime'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSubsecTimeOrginal: CFStringRef; external name '_kCGImagePropertyExifSubsecTimeOrginal'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSubsecTimeDigitized: CFStringRef; external name '_kCGImagePropertyExifSubsecTimeDigitized'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFlashPixVersion: CFStringRef; external name '_kCGImagePropertyExifFlashPixVersion'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifColorSpace: CFStringRef; external name '_kCGImagePropertyExifColorSpace'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifPixelXDimension: CFStringRef; external name '_kCGImagePropertyExifPixelXDimension'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifPixelYDimension: CFStringRef; external name '_kCGImagePropertyExifPixelYDimension'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifRelatedSoundFile: CFStringRef; external name '_kCGImagePropertyExifRelatedSoundFile'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFlashEnergy: CFStringRef; external name '_kCGImagePropertyExifFlashEnergy'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSpatialFrequencyResponse: CFStringRef; external name '_kCGImagePropertyExifSpatialFrequencyResponse'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFocalPlaneXResolution: CFStringRef; external name '_kCGImagePropertyExifFocalPlaneXResolution'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFocalPlaneYResolution: CFStringRef; external name '_kCGImagePropertyExifFocalPlaneYResolution'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFocalPlaneResolutionUnit: CFStringRef; external name '_kCGImagePropertyExifFocalPlaneResolutionUnit'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSubjectLocation: CFStringRef; external name '_kCGImagePropertyExifSubjectLocation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifExposureIndex: CFStringRef; external name '_kCGImagePropertyExifExposureIndex'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSensingMethod: CFStringRef; external name '_kCGImagePropertyExifSensingMethod'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFileSource: CFStringRef; external name '_kCGImagePropertyExifFileSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSceneType: CFStringRef; external name '_kCGImagePropertyExifSceneType'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifCFAPattern: CFStringRef; external name '_kCGImagePropertyExifCFAPattern'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifCustomRendered: CFStringRef; external name '_kCGImagePropertyExifCustomRendered'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifExposureMode: CFStringRef; external name '_kCGImagePropertyExifExposureMode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifWhiteBalance: CFStringRef; external name '_kCGImagePropertyExifWhiteBalance'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifDigitalZoomRatio: CFStringRef; external name '_kCGImagePropertyExifDigitalZoomRatio'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifFocalLenIn35mmFilm: CFStringRef; external name '_kCGImagePropertyExifFocalLenIn35mmFilm'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSceneCaptureType: CFStringRef; external name '_kCGImagePropertyExifSceneCaptureType'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifGainControl: CFStringRef; external name '_kCGImagePropertyExifGainControl'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifContrast: CFStringRef; external name '_kCGImagePropertyExifContrast'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSaturation: CFStringRef; external name '_kCGImagePropertyExifSaturation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSharpness: CFStringRef; external name '_kCGImagePropertyExifSharpness'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifDeviceSettingDescription: CFStringRef; external name '_kCGImagePropertyExifDeviceSettingDescription'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifSubjectDistRange: CFStringRef; external name '_kCGImagePropertyExifSubjectDistRange'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifImageUniqueID: CFStringRef; external name '_kCGImagePropertyExifImageUniqueID'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyExifGamma: CFStringRef; external name '_kCGImagePropertyExifGamma'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Possible keys for kCGImagePropertyGIFDictionary }
+
+var kCGImagePropertyGIFLoopCount: CFStringRef; external name '_kCGImagePropertyGIFLoopCount'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGIFDelayTime: CFStringRef; external name '_kCGImagePropertyGIFDelayTime'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGIFImageColorMap: CFStringRef; external name '_kCGImagePropertyGIFImageColorMap'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGIFHasGlobalColorMap: CFStringRef; external name '_kCGImagePropertyGIFHasGlobalColorMap'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Possible keys for kCGImagePropertyPNGDictionary }
+
+var kCGImagePropertyPNGGamma: CFStringRef; external name '_kCGImagePropertyPNGGamma'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyPNGInterlaceType: CFStringRef; external name '_kCGImagePropertyPNGInterlaceType'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyPNGXPixelsPerMeter: CFStringRef; external name '_kCGImagePropertyPNGXPixelsPerMeter'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyPNGYPixelsPerMeter: CFStringRef; external name '_kCGImagePropertyPNGYPixelsPerMeter'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyPNGsRGBIntent: CFStringRef; external name '_kCGImagePropertyPNGsRGBIntent'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyPNGChromaticities: CFStringRef; external name '_kCGImagePropertyPNGChromaticities'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Possible keys for kCGImagePropertyGPSDictionary }
+
+var kCGImagePropertyGPSVersion: CFStringRef; external name '_kCGImagePropertyGPSVersion'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSLatitudeRef: CFStringRef; external name '_kCGImagePropertyGPSLatitudeRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSLatitude: CFStringRef; external name '_kCGImagePropertyGPSLatitude'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSLongitudeRef: CFStringRef; external name '_kCGImagePropertyGPSLongitudeRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSLongitude: CFStringRef; external name '_kCGImagePropertyGPSLongitude'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSAltitudeRef: CFStringRef; external name '_kCGImagePropertyGPSAltitudeRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSAltitude: CFStringRef; external name '_kCGImagePropertyGPSAltitude'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSTimeStamp: CFStringRef; external name '_kCGImagePropertyGPSTimeStamp'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSSatellites: CFStringRef; external name '_kCGImagePropertyGPSSatellites'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSStatus: CFStringRef; external name '_kCGImagePropertyGPSStatus'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSMeasureMode: CFStringRef; external name '_kCGImagePropertyGPSMeasureMode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDOP: CFStringRef; external name '_kCGImagePropertyGPSDOP'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSSpeedRef: CFStringRef; external name '_kCGImagePropertyGPSSpeedRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSSpeed: CFStringRef; external name '_kCGImagePropertyGPSSpeed'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSTrackRef: CFStringRef; external name '_kCGImagePropertyGPSTrackRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSTrack: CFStringRef; external name '_kCGImagePropertyGPSTrack'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSImgDirectionRef: CFStringRef; external name '_kCGImagePropertyGPSImgDirectionRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSImgDirection: CFStringRef; external name '_kCGImagePropertyGPSImgDirection'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSMapDatum: CFStringRef; external name '_kCGImagePropertyGPSMapDatum'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestLatitudeRef: CFStringRef; external name '_kCGImagePropertyGPSDestLatitudeRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestLatitude: CFStringRef; external name '_kCGImagePropertyGPSDestLatitude'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestLongitudeRef: CFStringRef; external name '_kCGImagePropertyGPSDestLongitudeRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestLongitude: CFStringRef; external name '_kCGImagePropertyGPSDestLongitude'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestBearingRef: CFStringRef; external name '_kCGImagePropertyGPSDestBearingRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestBearing: CFStringRef; external name '_kCGImagePropertyGPSDestBearing'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestDistanceRef: CFStringRef; external name '_kCGImagePropertyGPSDestDistanceRef'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDestDistance: CFStringRef; external name '_kCGImagePropertyGPSDestDistance'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSProcessingMethod: CFStringRef; external name '_kCGImagePropertyGPSProcessingMethod'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSAreaInformation: CFStringRef; external name '_kCGImagePropertyGPSAreaInformation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDateStamp: CFStringRef; external name '_kCGImagePropertyGPSDateStamp'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyGPSDifferental: CFStringRef; external name '_kCGImagePropertyGPSDifferental'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Possible keys for kCGImagePropertyIPTCDictionary }
+
+var kCGImagePropertyIPTCObjectTypeReference: CFStringRef; external name '_kCGImagePropertyIPTCObjectTypeReference'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCObjectAttributeReference: CFStringRef; external name '_kCGImagePropertyIPTCObjectAttributeReference'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCObjectName: CFStringRef; external name '_kCGImagePropertyIPTCObjectName'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCEditStatus: CFStringRef; external name '_kCGImagePropertyIPTCEditStatus'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCEditorialUpdate: CFStringRef; external name '_kCGImagePropertyIPTCEditorialUpdate'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCUrgency: CFStringRef; external name '_kCGImagePropertyIPTCUrgency'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCSubjectReference: CFStringRef; external name '_kCGImagePropertyIPTCSubjectReference'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCCategory: CFStringRef; external name '_kCGImagePropertyIPTCCategory'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCSupplementalCategory: CFStringRef; external name '_kCGImagePropertyIPTCSupplementalCategory'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCFixtureIdentifier: CFStringRef; external name '_kCGImagePropertyIPTCFixtureIdentifier'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCKeywords: CFStringRef; external name '_kCGImagePropertyIPTCKeywords'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCContentLocationCode: CFStringRef; external name '_kCGImagePropertyIPTCContentLocationCode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCContentLocationName: CFStringRef; external name '_kCGImagePropertyIPTCContentLocationName'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCReleaseDate: CFStringRef; external name '_kCGImagePropertyIPTCReleaseDate'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCReleaseTime: CFStringRef; external name '_kCGImagePropertyIPTCReleaseTime'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCExpirationDate: CFStringRef; external name '_kCGImagePropertyIPTCExpirationDate'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCExpirationTime: CFStringRef; external name '_kCGImagePropertyIPTCExpirationTime'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCSpecialInstructions: CFStringRef; external name '_kCGImagePropertyIPTCSpecialInstructions'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCActionAdvised: CFStringRef; external name '_kCGImagePropertyIPTCActionAdvised'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCReferenceService: CFStringRef; external name '_kCGImagePropertyIPTCReferenceService'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCReferenceDate: CFStringRef; external name '_kCGImagePropertyIPTCReferenceDate'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCReferenceNumber: CFStringRef; external name '_kCGImagePropertyIPTCReferenceNumber'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCDateCreated: CFStringRef; external name '_kCGImagePropertyIPTCDateCreated'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCTimeCreated: CFStringRef; external name '_kCGImagePropertyIPTCTimeCreated'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCDigitalCreationDate: CFStringRef; external name '_kCGImagePropertyIPTCDigitalCreationDate'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCDigitalCreationTime: CFStringRef; external name '_kCGImagePropertyIPTCDigitalCreationTime'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCOriginatingProgram: CFStringRef; external name '_kCGImagePropertyIPTCOriginatingProgram'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCProgramVersion: CFStringRef; external name '_kCGImagePropertyIPTCProgramVersion'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCObjectCycle: CFStringRef; external name '_kCGImagePropertyIPTCObjectCycle'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCByline: CFStringRef; external name '_kCGImagePropertyIPTCByline'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCBylineTitle: CFStringRef; external name '_kCGImagePropertyIPTCBylineTitle'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCCity: CFStringRef; external name '_kCGImagePropertyIPTCCity'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCSubLocation: CFStringRef; external name '_kCGImagePropertyIPTCSubLocation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCProvinceState: CFStringRef; external name '_kCGImagePropertyIPTCProvinceState'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCCountryPrimaryLocationCode: CFStringRef; external name '_kCGImagePropertyIPTCCountryPrimaryLocationCode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCCountryPrimaryLocationName: CFStringRef; external name '_kCGImagePropertyIPTCCountryPrimaryLocationName'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCOriginalTransmissionReference: CFStringRef; external name '_kCGImagePropertyIPTCOriginalTransmissionReference'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCHeadline: CFStringRef; external name '_kCGImagePropertyIPTCHeadline'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCCredit: CFStringRef; external name '_kCGImagePropertyIPTCCredit'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCSource: CFStringRef; external name '_kCGImagePropertyIPTCSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCCopyrightNotice: CFStringRef; external name '_kCGImagePropertyIPTCCopyrightNotice'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCContact: CFStringRef; external name '_kCGImagePropertyIPTCContact'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCCaptionAbstract: CFStringRef; external name '_kCGImagePropertyIPTCCaptionAbstract'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCWriterEditor: CFStringRef; external name '_kCGImagePropertyIPTCWriterEditor'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCImageType: CFStringRef; external name '_kCGImagePropertyIPTCImageType'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCImageOrientation: CFStringRef; external name '_kCGImagePropertyIPTCImageOrientation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCLanguageIdentifier: CFStringRef; external name '_kCGImagePropertyIPTCLanguageIdentifier'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCGImagePropertyIPTCStarRating: CFStringRef; external name '_kCGImagePropertyIPTCStarRating'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit CGPDFObject}
+{ CoreGraphics - CGPDFObject.h
+ * Copyright (c) 2002-2004 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ A type for boolean values. }
+
+type
+ CGPDFBoolean = UInt8;
+
+{ A type for integer values. }
+
+type
+ CGPDFInteger = SInt32;
+
+{ A type for real values. }
+
+type
+ CGPDFReal = Float32;
+
+{ A type to hold any object. }
+
+type
+ CGPDFObjectRef = ^SInt32; { an opaque 32-bit type }
+
+{ An identifier to describe an object's type. }
+
+type
+ CGPDFObjectType = SInt32;
+const
+ kCGPDFObjectTypeNull = 1;
+ kCGPDFObjectTypeBoolean = 2;
+ kCGPDFObjectTypeInteger = 3;
+ kCGPDFObjectTypeReal = 4;
+ kCGPDFObjectTypeName = 5;
+ kCGPDFObjectTypeString = 6;
+ kCGPDFObjectTypeArray = 7;
+ kCGPDFObjectTypeDictionary = 8;
+ kCGPDFObjectTypeStream = 9;
+
+
+{ Return the type of `object'. }
+
+function CGPDFObjectGetType( objct: CGPDFObjectRef ): CGPDFObjectType; external name '_CGPDFObjectGetType'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Get the value of `object'. If the type of `object' is equal to `type',
+ * then copy the value of `object' to `value' (if it's non-NULL) and return
+ * true. Otherwise, if the type of `object' is `kCGPDFObjectTypeInteger'
+ * and `type' is equal to `kCGPDFObjectTypeReal', then convert the value of
+ * `object' to floating point and copy the result to `value' (if it's
+ * non-NULL) and return true. Otherwise, return false. }
+
+function CGPDFObjectGetValue( objct: CGPDFObjectRef; typ: CGPDFObjectType; value: UnivPtr ): CBool; external name '_CGPDFObjectGetValue'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{unit CGPDFOperatorTable}
+{ CoreGraphics - CGPDFOperatorTable.h
+ * Copyright (c) 2004 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+// CGPDFOperatorTableRef defined in CGBase
+
+
+type
+ CGPDFOperatorCallback = procedure( scanner: CGPDFScannerRef; info: UnivPtr );
+
+
+{ Return an empty operator table. }
+
+function CGPDFOperatorTableCreate: CGPDFOperatorTableRef; external name '_CGPDFOperatorTableCreate'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Increment the retain count of `table'. }
+
+function CGPDFOperatorTableRetain( table: CGPDFOperatorTableRef ): CGPDFOperatorTableRef; external name '_CGPDFOperatorTableRetain'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Decrement the retain count of `table'. }
+
+procedure CGPDFOperatorTableRelease( table: CGPDFOperatorTableRef ); external name '_CGPDFOperatorTableRelease'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Set the callback for the operator named `name' to `callback' }
+
+procedure CGPDFOperatorTableSetCallback( table: CGPDFOperatorTableRef; name: ConstCStringPtr; callback: CGPDFOperatorCallback ); external name '_CGPDFOperatorTableSetCallback'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit CGPDFScanner}
+{ CoreGraphics - CGPDFScanner.h
+ * Copyright (c) 2004 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+// CGPDFScannerRef defined in CGBase
+
+
+{ Create a scanner. }
+
+function CGPDFScannerCreate( cs: CGPDFContentStreamRef; table: CGPDFOperatorTableRef; info: UnivPtr ): CGPDFScannerRef; external name '_CGPDFScannerCreate'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Retain `scanner'. }
+
+function CGPDFScannerRetain( scanner: CGPDFScannerRef ): CGPDFScannerRef; external name '_CGPDFScannerRetain'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Release `scanner'. }
+
+procedure CGPDFScannerRelease( scanner: CGPDFScannerRef ); external name '_CGPDFScannerRelease'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Scan the content stream of `scanner'. Returns true if the entire stream
+ * was scanned successfully; false if scanning failed for some reason (for
+ * example, if the stream's data is corrupted). }
+
+function CGPDFScannerScan( scanner: CGPDFScannerRef ): CBool; external name '_CGPDFScannerScan'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the content stream associated with `scanner'. }
+
+function CGPDFScannerGetContentStream( scanner: CGPDFScannerRef ): CGPDFContentStreamRef; external name '_CGPDFScannerGetContentStream'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Pop an object from the stack of `scanner' and return it in `value'. }
+
+function CGPDFScannerPopObject( scanner: CGPDFScannerRef; var value: CGPDFObjectRef ): CBool; external name '_CGPDFScannerPopObject'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Pop an object from the stack of `scanner' and, if it's a boolean, return
+ * it in `value'. Return false if the top of the stack isn't a boolean. }
+
+function CGPDFScannerPopBoolean( scanner: CGPDFScannerRef; var value: CGPDFBoolean ): CBool; external name '_CGPDFScannerPopBoolean'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Pop an object from the stack of `scanner' and, if it's an integer,
+ * return it in `value'. Return false if the top of the stack isn't an
+ * integer. }
+
+function CGPDFScannerPopInteger( scanner: CGPDFScannerRef; var value: CGPDFInteger ): CBool; external name '_CGPDFScannerPopInteger'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Pop an object from the stack of `scanner' and, if it's a number, return
+ * it in `value'. Return false if the top of the stack isn't a number. }
+
+function CGPDFScannerPopNumber( scanner: CGPDFScannerRef; var value: CGPDFReal ): CBool; external name '_CGPDFScannerPopNumber'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Pop an object from the stack of `scanner' and, if it's a name, return it
+ * in `value'. Return false if the top of the stack isn't a name. }
+
+function CGPDFScannerPopName( scanner: CGPDFScannerRef; var value: ConstCStringPtr ): CBool; external name '_CGPDFScannerPopName'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Pop an object from the stack of `scanner' and, if it's a string, return
+ * it in `value'. Return false if the top of the stack isn't a string. }
+
+function CGPDFScannerPopString( scanner: CGPDFScannerRef; var value: CGPDFStringRef ): CBool; external name '_CGPDFScannerPopString'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Pop an object from the stack of `scanner' and, if it's an array, return
+ * it in `value'. Return false if the top of the stack isn't an array. }
+
+function CGPDFScannerPopArray( scanner: CGPDFScannerRef; var value: CGPDFArrayRef ): CBool; external name '_CGPDFScannerPopArray'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Pop an object from the stack of `scanner' and, if it's a dictionary,
+ * return it in `value'. Return false if the top of the stack isn't a
+ * dictionary. }
+
+function CGPDFScannerPopDictionary( scanner: CGPDFScannerRef; var value: CGPDFDictionaryRef ): CBool; external name '_CGPDFScannerPopDictionary'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Pop an object from the stack of `scanner' and, if it's a stream, return
+ * it in `value'. Return false if the top of the stack isn't a stream. }
+
+function CGPDFScannerPopStream( scanner: CGPDFScannerRef; var value: CGPDFStreamRef ): CBool; external name '_CGPDFScannerPopStream'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit CGPDFStream}
+{ CoreGraphics - CGPDFStream.h
+ * Copyright (c) 2002-2004 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+// CGPDFStreamRef defined in CGBase
+
+type
+ CGPDFDataFormat = SInt32;
+const
+ CGPDFDataFormatRaw = 0; CGPDFDataFormatJPEGEncoded = 1; CGPDFDataFormatJPEG2000 = 2;
+
+
+{ Return the dictionary of `stream'. }
+
+function CGPDFStreamGetDictionary( stream: CGPDFStreamRef ): CGPDFDictionaryRef; external name '_CGPDFStreamGetDictionary'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return the data of `stream'. }
+
+function CGPDFStreamCopyData( stream: CGPDFStreamRef; var format: CGPDFDataFormat ): CFDataRef; external name '_CGPDFStreamCopyData'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{unit CGPDFString}
+{ CoreGraphics - CGPDFString.h
+ * Copyright (c) 2002-2004 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+// CGPDFStringRef defined in CGBase
+
+
+{ Return the length of `string'. }
+
+function CGPDFStringGetLength( strng: CGPDFStringRef ): size_t; external name '_CGPDFStringGetLength'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return a pointer to the bytes of `string'. }
+
+function CGPDFStringGetBytePtr( strng: CGPDFStringRef ): UInt8Ptr; external name '_CGPDFStringGetBytePtr'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return a CFString representing `string' as a "text string". See Section
+ * 3.8.1 "Text Strings", PDF Reference: Adobe PDF version 1.4 (3rd ed.)
+ * for more information. }
+
+function CGPDFStringCopyTextString( strng: CGPDFStringRef ): CFStringRef; external name '_CGPDFStringCopyTextString'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Convert `string' to a CFDate. See Section 3.8.3 "Dates", PDF Reference:
+ * Adobe PDF version 1.4 (3rd ed.) for more information. }
+
+function CGPDFStringCopyDate( strng: CGPDFStringRef ): CFDateRef; external name '_CGPDFStringCopyDate'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit CGSession}
+{
+ * CGSession.h
+ * CoreGraphics
+ *
+ * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
+ *
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{
+ * Fetch the current session's dictionary
+ * Returns NULL if the caller is not within a GUI session, as when the caller is a UNIX daemon,
+ * or if a system is configured to not run a Quartz GUI (window server disabled)
+ }
+function CGSessionCopyCurrentDictionary: CFDictionaryRef; external name '_CGSessionCopyCurrentDictionary';
+
+{
+ * Predefined keys for the Session dictionaries
+ * Values are provided as CFSTR() macros rather than extern C data for PEF/CFM support.
+ * Constant values will remain unchanged in future releases for PEF/CFM compatibility.
+ *
+ * These keys are guaranteed by the system to be present in a session dictionary.
+ * Additional keys and values may be defined and added to the dictionary by
+ * other system components as needed.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGSessionUserIDKey CFSTRP('kCGSSessionUserIDKey')}
+{$endc}
+ { value is a CFNumber encoding a uid_t for the session's current user. }
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGSessionUserNameKey CFSTRP('kCGSSessionUserNameKey')}
+{$endc}
+ { value is a CFString encoding the session's short user name as set by loginwindow }
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGSessionConsoleSetKey CFSTRP('kCGSSessionConsoleSetKey')}
+{$endc}
+ { value is a CFNumber encoding a 32 bit unsigned integer value representing a set of hardware composing a console }
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGSessionOnConsoleKey CFSTRP('kCGSSessionOnConsoleKey')}
+{$endc}
+ { value is a CFBoolean, kCFBooleanTrue if the session is on a console, otherwise kCFBooleanFalse }
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGSessionLoginDoneKey CFSTRP('kCGSessionLoginDoneKey')}
+{$endc}
+ { value is a CFBoolean, kCFBooleanTrue if login operation has been done, otherwise kCFBooleanFalse }
+
+{
+ * When the GUI session on a console changes, a notification
+ * is posted via the notify_post() API. See notify (3) and
+ * notify.h for details.
+ }
+const
+ kCGNotifyGUIConsoleSessionChanged = 'com.apple.coregraphics.GUIConsoleSessionChanged';
+{ When a user logs in or out of a session we post a notification via notify_post() }
+const
+ kCGNotifyGUISessionUserChanged = 'com.apple.coregraphics.GUISessionUserChanged';
+
+
+{unit CGWindowLevels}
+{
+ * CGWindowLevel.h
+ * CoreGraphics
+ *
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{
+ * Windows may be assigned to a particular level. When assigned to a level,
+ * the window is ordered relative to all other windows in that level.
+ * Windows with a higher level are sorted in front of windows with a lower
+ * level.
+ *
+ * A common set of window levels is defined here for use within higher
+ * level frameworks. The levels are accessed via a key and function,
+ * so that levels may be changed or adjusted in future releases without
+ * breaking binary compatability.
+ }
+
+type
+ CGWindowLevel = SInt32;
+type
+ CGWindowLevelKey = SInt32;
+
+type
+ _CGCommonWindowLevelKey = SInt32;
+const
+ kCGBaseWindowLevelKey = 0;
+ kCGMinimumWindowLevelKey = 1;
+ kCGDesktopWindowLevelKey = 2;
+ kCGBackstopMenuLevelKey = 3;
+ kCGNormalWindowLevelKey = 4;
+ kCGFloatingWindowLevelKey = 5;
+ kCGTornOffMenuWindowLevelKey = 6;
+ kCGDockWindowLevelKey = 7;
+ kCGMainMenuWindowLevelKey = 8;
+ kCGStatusWindowLevelKey = 9;
+ kCGModalPanelWindowLevelKey = 10;
+ kCGPopUpMenuWindowLevelKey = 11;
+ kCGDraggingWindowLevelKey = 12;
+ kCGScreenSaverWindowLevelKey = 13;
+ kCGMaximumWindowLevelKey = 14;
+ kCGOverlayWindowLevelKey = 15;
+ kCGHelpWindowLevelKey = 16;
+ kCGUtilityWindowLevelKey = 17;
+ kCGDesktopIconWindowLevelKey = 18;
+ kCGCursorWindowLevelKey = 19;
+ kCGAssistiveTechHighWindowLevelKey = 20;
+ kCGNumberOfWindowLevelKeys = 21; { Internal bookkeeping; must be last }
+
+function CGWindowLevelForKey( key: CGWindowLevelKey ): CGWindowLevel; external name '_CGWindowLevelForKey';
+
+{ number of levels above kCGMaximumWindowLevel reserved for internal use }
+const
+ kCGNumReservedWindowLevels = 16;
+
+(*
+{ Definitions of older constant values as calls }
+#define kCGBaseWindowLevel CGWindowLevelForKey(kCGBaseWindowLevelKey) { LONG_MIN }
+#define kCGMinimumWindowLevel CGWindowLevelForKey(kCGMinimumWindowLevelKey) { (kCGBaseWindowLevel + 1) }
+#define kCGDesktopWindowLevel CGWindowLevelForKey(kCGDesktopWindowLevelKey) { kCGMinimumWindowLevel }
+#define kCGDesktopIconWindowLevel CGWindowLevelForKey(kCGDesktopIconWindowLevelKey) { kCGMinimumWindowLevel + 20 }
+#define kCGBackstopMenuLevel CGWindowLevelForKey(kCGBackstopMenuLevelKey) { -20 }
+#define kCGNormalWindowLevel CGWindowLevelForKey(kCGNormalWindowLevelKey) { 0 }
+#define kCGFloatingWindowLevel CGWindowLevelForKey(kCGFloatingWindowLevelKey) { 3 }
+#define kCGTornOffMenuWindowLevel CGWindowLevelForKey(kCGTornOffMenuWindowLevelKey) { 3 }
+#define kCGDockWindowLevel CGWindowLevelForKey(kCGDockWindowLevelKey) { 20 }
+#define kCGMainMenuWindowLevel CGWindowLevelForKey(kCGMainMenuWindowLevelKey) { 24 }
+#define kCGStatusWindowLevel CGWindowLevelForKey(kCGStatusWindowLevelKey) { 25 }
+#define kCGModalPanelWindowLevel CGWindowLevelForKey(kCGModalPanelWindowLevelKey) { 8 }
+#define kCGPopUpMenuWindowLevel CGWindowLevelForKey(kCGPopUpMenuWindowLevelKey) { 101 }
+#define kCGDraggingWindowLevel CGWindowLevelForKey(kCGDraggingWindowLevelKey) { 500 }
+#define kCGScreenSaverWindowLevel CGWindowLevelForKey(kCGScreenSaverWindowLevelKey) { 1000 }
+#define kCGCursorWindowLevel CGWindowLevelForKey(kCGCursorWindowLevelKey) { 2000 }
+#define kCGOverlayWindowLevel CGWindowLevelForKey(kCGOverlayWindowLevelKey) { 102 }
+#define kCGHelpWindowLevel CGWindowLevelForKey(kCGHelpWindowLevelKey) { 102 }
+#define kCGUtilityWindowLevel CGWindowLevelForKey(kCGUtilityWindowLevelKey) { 19 }
+
+#define kCGAssistiveTechHighWindowLevel CGWindowLevelForKey(kCGAssistiveTechHighWindowLevelKey) { 1500 }
+
+#define kCGMaximumWindowLevel CGWindowLevelForKey(kCGMaximumWindowLevelKey) { LONG_MAX - kCGNumReservedWindowLevels }
+*)
+
+{unit CMICCProfile}
+{
+ File: ColorSync/CMICCProfile.h
+
+ Contains: ICC Profile Format Definitions
+
+ Version: ColorSync-174.1~229
+
+ Copyright: © 1994-2006 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Gale R Paeper, <gpaeper@empirenet.com>, 2007 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ ICC Profile version constants }
+
+const
+ cmICCProfileVersion4 = $04000000;
+ cmICCProfileVersion2 = $02000000;
+ cmICCProfileVersion21 = $02100000;
+ cmCS2ProfileVersion = $02000000;
+ cmCS1ProfileVersion = $00000100; { ColorSync 1.0 profile version }
+
+ { Current Major version number }
+ cmProfileMajorVersionMask = $FF000000;
+ cmCurrentProfileMajorVersion = $02000000;
+
+ { magic cookie number for anonymous file ID }
+ cmMagicNumber = $61637370 (* 'acsp' *);
+
+
+ { ********************************************************************** }
+ { ************** ColorSync 2.0 profile specification ******************* }
+ { ********************************************************************** }
+ { *** flags field *** }
+ cmICCReservedFlagsMask = $0000FFFF; { these bits of the flags field are defined and reserved by ICC }
+ cmEmbeddedMask = $00000001; { if bit 0 is 0 then not embedded profile, if 1 then embedded profile }
+ cmEmbeddedUseMask = $00000002; { if bit 1 is 0 then ok to use anywhere, if 1 then ok to use as embedded profile only }
+ cmBlackPointCompensationMask = $00000004; { if bit 1 is 0 then ok to use anywhere, if 1 then ok to use as embedded profile only }
+ cmCMSReservedFlagsMask = $FFFF0000; { these bits of the flags field are defined and reserved by CMS vendor }
+ cmQualityMask = $00030000; { if bits 16-17 is 0 then normal, if 1 then draft, if 2 then best }
+ cmInterpolationMask = $00040000; { if bit 18 is 0 then interpolation, if 1 then lookup only }
+ cmGamutCheckingMask = $00080000; { if bit 19 is 0 then create gamut checking info, if 1 then no gamut checking info }
+
+ { copyright-protection flag options }
+ cmEmbeddedProfile = 0; { 0 is not embedded profile, 1 is embedded profile }
+ cmEmbeddedUse = 1; { 0 is to use anywhere, 1 is to use as embedded profile only }
+
+ { speed and quality flag options }
+ cmNormalMode = 0; { it uses the least significent two bits in the high word of flag }
+ cmDraftMode = 1; { it should be evaulated like this: right shift 16 bits first, mask off the }
+ cmBestMode = 2; { high 14 bits, and then compare with the enum to determine the option value }
+
+ { black point compensation flag option }
+ cmBlackPointCompensation = 1; { 0 do not apply Black Point Compensation, 1 apply }
+
+ { *** deviceAttributes fields *** }
+ { deviceAttributes[0] is defined by and reserved for device vendors }
+ { deviceAttributes[1] is defined by and reserved for ICC }
+ { The following bits of deviceAttributes[1] are currently defined }
+ cmReflectiveTransparentMask = $00000001; { if bit 0 is 0 then reflective media, if 1 then transparency media }
+ cmGlossyMatteMask = $00000002; { if bit 1 is 0 then glossy, if 1 then matte }
+
+ { device/media attributes element values }
+ cmReflective = 0; { if bit 0 is 0 then reflective media, if 1 then transparency media }
+ cmGlossy = 1; { if bit 1 is 0 then glossy, if 1 then matte }
+
+
+ { *** renderingIntent field *** }
+ cmPerceptual = 0; { Photographic images }
+ cmRelativeColorimetric = 1; { Logo Colors }
+ cmSaturation = 2; { Business graphics }
+ cmAbsoluteColorimetric = 3; { Logo Colors }
+
+
+ { data type element values }
+ cmAsciiData = 0;
+ cmBinaryData = 1;
+
+ { screen encodings }
+ cmPrtrDefaultScreens = 0; { Use printer default screens. 0 is false, 1 is ture }
+ cmLinesPer = 1; { 0 is LinesPerCm, 1 is LinesPerInch }
+
+ { 2.0 tag type information }
+ cmNumHeaderElements = 10;
+
+ { public tags }
+ cmAToB0Tag = $41324230 (* 'A2B0' *);
+ cmAToB1Tag = $41324231 (* 'A2B1' *);
+ cmAToB2Tag = $41324232 (* 'A2B2' *);
+ cmBlueColorantTag = $6258595A (* 'bXYZ' *);
+ cmBlueTRCTag = $62545243 (* 'bTRC' *);
+ cmBToA0Tag = $42324130 (* 'B2A0' *);
+ cmBToA1Tag = $42324131 (* 'B2A1' *);
+ cmBToA2Tag = $42324132 (* 'B2A2' *);
+ cmCalibrationDateTimeTag = $63616C74 (* 'calt' *);
+ cmChromaticAdaptationTag = $63686164 (* 'chad' *);
+ cmCharTargetTag = $74617267 (* 'targ' *);
+ cmCopyrightTag = $63707274 (* 'cprt' *);
+ cmDeviceMfgDescTag = $646D6E64 (* 'dmnd' *);
+ cmDeviceModelDescTag = $646D6464 (* 'dmdd' *);
+ cmGamutTag = $67616D74 (* 'gamt' *);
+ cmGrayTRCTag = $6B545243 (* 'kTRC' *);
+ cmGreenColorantTag = $6758595A (* 'gXYZ' *);
+ cmGreenTRCTag = $67545243 (* 'gTRC' *);
+ cmLuminanceTag = $6C756D69 (* 'lumi' *);
+ cmMeasurementTag = $6D656173 (* 'meas' *);
+ cmMediaBlackPointTag = $626B7074 (* 'bkpt' *);
+ cmMediaWhitePointTag = $77747074 (* 'wtpt' *);
+ cmNamedColorTag = $6E636F6C (* 'ncol' *);
+ cmNamedColor2Tag = $6E636C32 (* 'ncl2' *);
+ cmPreview0Tag = $70726530 (* 'pre0' *);
+ cmPreview1Tag = $70726531 (* 'pre1' *);
+ cmPreview2Tag = $70726532 (* 'pre2' *);
+ cmProfileDescriptionTag = $64657363 (* 'desc' *);
+ cmProfileSequenceDescTag = $70736571 (* 'pseq' *);
+ cmPS2CRD0Tag = $70736430 (* 'psd0' *);
+ cmPS2CRD1Tag = $70736431 (* 'psd1' *);
+ cmPS2CRD2Tag = $70736432 (* 'psd2' *);
+ cmPS2CRD3Tag = $70736433 (* 'psd3' *);
+ cmPS2CSATag = $70733273 (* 'ps2s' *);
+ cmPS2RenderingIntentTag = $70733269 (* 'ps2i' *);
+ cmRedColorantTag = $7258595A (* 'rXYZ' *);
+ cmRedTRCTag = $72545243 (* 'rTRC' *);
+ cmScreeningDescTag = $73637264 (* 'scrd' *);
+ cmScreeningTag = $7363726E (* 'scrn' *);
+ cmTechnologyTag = $74656368 (* 'tech' *);
+ cmUcrBgTag = $62666420 (* 'bfd ' *);
+ cmViewingConditionsDescTag = $76756564 (* 'vued' *);
+ cmViewingConditionsTag = $76696577 (* 'view' *);
+
+ { custom tags }
+ cmPS2CRDVMSizeTag = $7073766D (* 'psvm' *);
+ cmVideoCardGammaTag = $76636774 (* 'vcgt' *);
+ cmMakeAndModelTag = $6D6D6F64 (* 'mmod' *);
+ cmProfileDescriptionMLTag = $6473636D (* 'dscm' *);
+ cmNativeDisplayInfoTag = $6E64696E (* 'ndin' *);
+
+ { public type signatures }
+ cmSigCrdInfoType = $63726469 (* 'crdi' *);
+ cmSigCurveType = $63757276 (* 'curv' *);
+ cmSigDataType = $64617461 (* 'data' *);
+ cmSigDateTimeType = $6474696D (* 'dtim' *);
+ cmSigLut16Type = $6D667432 (* 'mft2' *);
+ cmSigLut8Type = $6D667431 (* 'mft1' *);
+ cmSigMeasurementType = $6D656173 (* 'meas' *);
+ cmSigMultiFunctA2BType = $6D414220 (* 'mAB ' *);
+ cmSigMultiFunctB2AType = $6D424120 (* 'mBA ' *);
+ cmSigNamedColorType = $6E636F6C (* 'ncol' *);
+ cmSigNamedColor2Type = $6E636C32 (* 'ncl2' *);
+ cmSigParametricCurveType = $70617261 (* 'para' *);
+ cmSigProfileDescriptionType = $64657363 (* 'desc' *);
+ cmSigProfileSequenceDescType = $70736571 (* 'pseq' *);
+ cmSigScreeningType = $7363726E (* 'scrn' *);
+ cmSigS15Fixed16Type = $73663332 (* 'sf32' *);
+ cmSigSignatureType = $73696720 (* 'sig ' *);
+ cmSigTextType = $74657874 (* 'text' *);
+ cmSigU16Fixed16Type = $75663332 (* 'uf32' *);
+ cmSigU1Fixed15Type = $75663136 (* 'uf16' *);
+ cmSigUInt8Type = $75693038 (* 'ui08' *);
+ cmSigUInt16Type = $75693136 (* 'ui16' *);
+ cmSigUInt32Type = $75693332 (* 'ui32' *);
+ cmSigUInt64Type = $75693634 (* 'ui64' *);
+ cmSigUcrBgType = $62666420 (* 'bfd ' *);
+ cmSigUnicodeTextType = $75747874 (* 'utxt' *);
+ cmSigViewingConditionsType = $76696577 (* 'view' *);
+ cmSigXYZType = $58595A20 (* 'XYZ ' *);
+
+ { custom type signatures }
+ cmSigPS2CRDVMSizeType = $7073766D (* 'psvm' *);
+ cmSigVideoCardGammaType = $76636774 (* 'vcgt' *);
+ cmSigMakeAndModelType = $6D6D6F64 (* 'mmod' *);
+ cmSigNativeDisplayInfoType = $6E64696E (* 'ndin' *);
+ cmSigMultiLocalizedUniCodeType = $6D6C7563 (* 'mluc' *);
+
+ { technology tag descriptions }
+ cmTechnologyDigitalCamera = $6463616D (* 'dcam' *);
+ cmTechnologyFilmScanner = $6673636E (* 'fscn' *);
+ cmTechnologyReflectiveScanner = $7273636E (* 'rscn' *);
+ cmTechnologyInkJetPrinter = $696A6574 (* 'ijet' *);
+ cmTechnologyThermalWaxPrinter = $74776178 (* 'twax' *);
+ cmTechnologyElectrophotographicPrinter = $6570686F (* 'epho' *);
+ cmTechnologyElectrostaticPrinter = $65737461 (* 'esta' *);
+ cmTechnologyDyeSublimationPrinter = $64737562 (* 'dsub' *);
+ cmTechnologyPhotographicPaperPrinter = $7270686F (* 'rpho' *);
+ cmTechnologyFilmWriter = $6670726E (* 'fprn' *);
+ cmTechnologyVideoMonitor = $7669646D (* 'vidm' *);
+ cmTechnologyVideoCamera = $76696463 (* 'vidc' *);
+ cmTechnologyProjectionTelevision = $706A7476 (* 'pjtv' *);
+ cmTechnologyCRTDisplay = $43525420 (* 'CRT ' *);
+ cmTechnologyPMDisplay = $504D4420 (* 'PMD ' *);
+ cmTechnologyAMDisplay = $414D4420 (* 'AMD ' *);
+ cmTechnologyPhotoCD = $4B504344 (* 'KPCD' *);
+ cmTechnologyPhotoImageSetter = $696D6773 (* 'imgs' *);
+ cmTechnologyGravure = $67726176 (* 'grav' *);
+ cmTechnologyOffsetLithography = $6F666673 (* 'offs' *);
+ cmTechnologySilkscreen = $73696C6B (* 'silk' *);
+ cmTechnologyFlexography = $666C6578 (* 'flex' *);
+
+
+ { Measurement type encodings }
+ { Measurement Flare }
+ cmFlare0 = $00000000;
+ cmFlare100 = $00000001;
+
+ { Measurement Geometry }
+ cmGeometryUnknown = $00000000;
+ cmGeometry045or450 = $00000001;
+ cmGeometry0dord0 = $00000002;
+
+ { Standard Observer }
+ cmStdobsUnknown = $00000000;
+ cmStdobs1931TwoDegrees = $00000001;
+ cmStdobs1964TenDegrees = $00000002;
+
+ { Standard Illuminant }
+ cmIlluminantUnknown = $00000000;
+ cmIlluminantD50 = $00000001;
+ cmIlluminantD65 = $00000002;
+ cmIlluminantD93 = $00000003;
+ cmIlluminantF2 = $00000004;
+ cmIlluminantD55 = $00000005;
+ cmIlluminantA = $00000006;
+ cmIlluminantEquiPower = $00000007;
+ cmIlluminantF8 = $00000008;
+
+ { Spot Function Value }
+ cmSpotFunctionUnknown = 0;
+ cmSpotFunctionDefault = 1;
+ cmSpotFunctionRound = 2;
+ cmSpotFunctionDiamond = 3;
+ cmSpotFunctionEllipse = 4;
+ cmSpotFunctionLine = 5;
+ cmSpotFunctionSquare = 6;
+ cmSpotFunctionCross = 7;
+
+ { Color Space Signatures }
+ cmXYZData = $58595A20 (* 'XYZ ' *);
+ cmLabData = $4C616220 (* 'Lab ' *);
+ cmLuvData = $4C757620 (* 'Luv ' *);
+ cmYCbCrData = $59436272 (* 'YCbr' *);
+ cmYxyData = $59787920 (* 'Yxy ' *);
+ cmRGBData = $52474220 (* 'RGB ' *);
+ cmSRGBData = $73524742 (* 'sRGB' *);
+ cmGrayData = $47524159 (* 'GRAY' *);
+ cmHSVData = $48535620 (* 'HSV ' *);
+ cmHLSData = $484C5320 (* 'HLS ' *);
+ cmCMYKData = $434D594B (* 'CMYK' *);
+ cmCMYData = $434D5920 (* 'CMY ' *);
+ cmMCH5Data = $4D434835 (* 'MCH5' *);
+ cmMCH6Data = $4D434836 (* 'MCH6' *);
+ cmMCH7Data = $4D434837 (* 'MCH7' *);
+ cmMCH8Data = $4D434838 (* 'MCH8' *);
+ cm3CLRData = $33434C52 (* '3CLR' *);
+ cm4CLRData = $34434C52 (* '4CLR' *);
+ cm5CLRData = $35434C52 (* '5CLR' *);
+ cm6CLRData = $36434C52 (* '6CLR' *);
+ cm7CLRData = $37434C52 (* '7CLR' *);
+ cm8CLRData = $38434C52 (* '8CLR' *);
+ cm9CLRData = $39434C52 (* '9CLR' *);
+ cm10CLRData = $41434C52 (* 'ACLR' *);
+ cm11CLRData = $42434C52 (* 'BCLR' *);
+ cm12CLRData = $43434C52 (* 'CCLR' *);
+ cm13CLRData = $44434C52 (* 'DCLR' *);
+ cm14CLRData = $45434C52 (* 'ECLR' *);
+ cm15CLRData = $46434C52 (* 'FCLR' *);
+ cmNamedData = $4E414D45 (* 'NAME' *);
+
+ { profileClass enumerations }
+ cmInputClass = $73636E72 (* 'scnr' *);
+ cmDisplayClass = $6D6E7472 (* 'mntr' *);
+ cmOutputClass = $70727472 (* 'prtr' *);
+ cmLinkClass = $6C696E6B (* 'link' *);
+ cmAbstractClass = $61627374 (* 'abst' *);
+ cmColorSpaceClass = $73706163 (* 'spac' *);
+ cmNamedColorClass = $6E6D636C (* 'nmcl' *);
+
+ { platform enumerations }
+ cmMacintosh = $4150504C (* 'APPL' *);
+ cmMicrosoft = $4D534654 (* 'MSFT' *);
+ cmSolaris = $53554E57 (* 'SUNW' *);
+ cmSiliconGraphics = $53474920 (* 'SGI ' *);
+ cmTaligent = $54474E54 (* 'TGNT' *);
+
+ { parametric curve type enumerations }
+ cmParametricType0 = 0; { Y = X^gamma }
+ cmParametricType1 = 1; { Y = (aX+b)^gamma [X>=-b/a], Y = 0 [X<-b/a] }
+ cmParametricType2 = 2; { Y = (aX+b)^gamma + c [X>=-b/a], Y = c [X<-b/a] }
+ cmParametricType3 = 3; { Y = (aX+b)^gamma [X>=d], Y = cX [X<d] }
+ cmParametricType4 = 4; { Y = (aX+b)^gamma + e [X>=d], Y = cX+f [X<d] }
+
+
+ { ColorSync 1.0 elements }
+ cmCS1ChromTag = $6368726D (* 'chrm' *);
+ cmCS1TRCTag = $74726320 (* 'trc ' *);
+ cmCS1NameTag = $6E616D65 (* 'name' *);
+ cmCS1CustTag = $63757374 (* 'cust' *);
+
+ { General element data types }
+
+type
+ CMDateTimePtr = ^CMDateTime;
+ CMDateTime = record
+ year: UInt16;
+ month: UInt16;
+ dayOfTheMonth: UInt16;
+ hours: UInt16;
+ minutes: UInt16;
+ seconds: UInt16;
+ end;
+
+ CMFixedXYColorPtr = ^CMFixedXYColor;
+ CMFixedXYColor = record
+ x: Fixed;
+ y: Fixed;
+ end;
+
+ CMFixedXYZColorPtr = ^CMFixedXYZColor;
+ CMFixedXYZColor = record
+ X: Fixed;
+ Y: Fixed;
+ Z: Fixed;
+ end;
+
+ CMXYZComponent = UInt16;
+ CMXYZColorPtr = ^CMXYZColor;
+ CMXYZColor = record
+ X: CMXYZComponent;
+ Y: CMXYZComponent;
+ Z: CMXYZComponent;
+ end;
+
+{ Type for Profile MD5 message digest }
+{ Derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm }
+
+ CMProfileMD5 = packed array[0..15] of UInt8;
+ CMProfileMD5Ptr = ^CMProfileMD5;
+
+{
+ * CMProfileMD5AreEqual()
+ *
+ * Availability: available as macro/inline
+ }
+// #define CMProfileMD5AreEqual(a, b) (\
+// ((long*)a)[0]==((long*)b)[0] && ((long*)a)[1]==((long*)b)[1] && \
+// ((long*)a)[2]==((long*)b)[2] && ((long*)a)[3]==((long*)b)[3])
+
+
+ CM2HeaderPtr = ^CM2Header;
+ CM2Header = record
+ size: UInt32; { This is the total size of the Profile }
+ CMMType: OSType; { CMM signature, Registered with CS2 consortium }
+ profileVersion: UInt32; { Version of CMProfile format }
+ profileClass: OSType; { input, display, output, devicelink, abstract, or color conversion profile type }
+ dataColorSpace: OSType; { color space of data }
+ profileConnectionSpace: OSType; { profile connection color space }
+ dateTime: CMDateTime; { date and time of profile creation }
+ CS2profileSignature: OSType; { 'acsp' constant ColorSync 2.0 file ID }
+ platform: OSType; { primary profile platform, Registered with CS2 consortium }
+ flags: UInt32; { profile flags }
+ deviceManufacturer: OSType; { Registered with ICC consortium }
+ deviceModel: UInt32; { Registered with ICC consortium }
+ deviceAttributes: array [0..1] of UInt32; { Attributes[0] is for device vendors, [1] is for ICC }
+ renderingIntent: UInt32; { preferred rendering intent of tagged object }
+ white: CMFixedXYZColor; { profile illuminant }
+ creator: OSType; { profile creator }
+ reserved: packed array [0..43] of char; { reserved for future use }
+ end;
+
+ CM4HeaderPtr = ^ CM4Header;
+ CM4Header = record
+ size: UInt32; { This is the total size of the Profile }
+ CMMType: OSType; { CMM signature, Registered with CS2 consortium }
+ profileVersion: UInt32; { Version of CMProfile format }
+ profileClass: OSType; { input, display, output, devicelink, abstract, or color conversion profile type }
+ dataColorSpace: OSType; { color space of data }
+ profileConnectionSpace: OSType; { profile connection color space }
+ dateTime: CMDateTime; { date and time of profile creation }
+ CS2profileSignature: OSType; { 'acsp' constant ColorSync 2.0 file ID }
+ platform: OSType; { primary profile platform, Registered with CS2 consortium }
+ flags: UInt32; { profile flags }
+ deviceManufacturer: OSType; { Registered with ICC consortium }
+ deviceModel: UInt32; { Registered with ICC consortium }
+ deviceAttributes: array[0..1] of UInt32; { Attributes[0] is for device vendors, [1] is for ICC }
+ renderingIntent: UInt32; { preferred rendering intent of tagged object }
+ white: CMFixedXYZColor; { profile illuminant }
+ creator: OSType; { profile creator }
+ digest: CMProfileMD5; { Profile message digest }
+ reserved: packed array[0..27] of char; { reserved for future use }
+ end;
+
+ CMTagRecordPtr = ^CMTagRecord;
+ CMTagRecord = record
+ tag: OSType; { Registered with CS2 consortium }
+ elementOffset: UInt32; { Relative to start of CMProfile }
+ elementSize: UInt32;
+ end;
+
+ CMTagElemTablePtr = ^CMTagElemTable;
+ CMTagElemTable = record
+ count: UInt32;
+ tagList: array [0..0] of CMTagRecord; { variable size, determined by count }
+ end;
+
+ CM2ProfilePtr = ^CM2Profile;
+ CM2Profile = record
+ header: CM2Header;
+ tagTable: CMTagElemTable;
+ elemData: SInt8; { variable size data for tagged element storage }
+ end;
+
+ CM2ProfileHandle = ^CM2ProfilePtr;
+ { Tag Type Definitions }
+ CMAdaptationMatrixTypePtr = ^CMAdaptationMatrixType;
+ CMAdaptationMatrixType = record
+ typeDescriptor: OSType; { 'sf32' = cmSigS15Fixed16Type }
+ reserved: UInt32; { fill with 0x00 }
+ adaptationMatrix: array [0..8] of Fixed; { fixed size of nine matrix entries }
+ end;
+
+ CMCurveTypePtr = ^CMCurveType;
+ CMCurveType = record
+ typeDescriptor: OSType; { 'curv' = cmSigCurveType }
+ reserved: UInt32; { fill with 0x00 }
+ countValue: UInt32; { number of entries in table that follows }
+ data: array [0..0] of UInt16; { variable size, determined by countValue }
+ end;
+
+ CMDataTypePtr = ^CMDataType;
+ CMDataType = record
+ typeDescriptor: OSType; { 'data' = cmSigDataType }
+ reserved: UInt32; { fill with 0x00 }
+ dataFlag: UInt32; { 0 = ASCII, 1 = binary }
+ data: SInt8; { variable size, determined by tag element size }
+ end;
+
+ CMDateTimeTypePtr = ^CMDateTimeType;
+ CMDateTimeType = record
+ typeDescriptor: OSType; { 'dtim' = cmSigDateTimeType }
+ reserved: UInt32; { fill with 0x00 }
+ dateTime: CMDateTime; { }
+ end;
+
+ CMLut16TypePtr = ^CMLut16Type;
+ CMLut16Type = record
+ typeDescriptor: OSType; { 'mft2' = cmSigLut16Type }
+ reserved: UInt32; { fill with 0x00 }
+ inputChannels: SInt8; { Number of input channels }
+ outputChannels: SInt8; { Number of output channels }
+ gridPoints: SInt8; { Number of clutTable grid points }
+ reserved2: SInt8; { fill with 0x00 }
+ matrix: array [0..2,0..2] of Fixed; { }
+ inputTableEntries: UInt16; { Number of entries in 1-D input luts }
+ outputTableEntries: UInt16; { Number of entries in 1-D output luts }
+ inputTable: array [0..0] of UInt16; { variable size, determined by inputChannels*inputTableEntries }
+ end;
+
+ CMLut8TypePtr = ^CMLut8Type;
+ CMLut8Type = record
+ typeDescriptor: OSType; { 'mft1' = cmSigLut8Type }
+ reserved: UInt32; { fill with 0x00 }
+ inputChannels: SInt8; { Number of input channels }
+ outputChannels: SInt8; { Number of output channels }
+ gridPoints: SInt8; { Number of clutTable grid points }
+ reserved2: SInt8; { fill with 0x00 }
+ matrix: array [0..2,0..2] of Fixed; { }
+ inputTable: SInt8; { variable size, determined by inputChannels*256 }
+ end;
+
+ CMMultiFunctLutTypePtr = ^CMMultiFunctLutType;
+ CMMultiFunctLutType = record
+ typeDescriptor: OSType; { 'mAB ' = cmSigMultiFunctA2BType or 'mBA ' = cmSigMultiFunctB2AType }
+ reserved: UInt32; { fill with 0x00 }
+ inputChannels: SInt8; { Number of input channels }
+ outputChannels: SInt8; { Number of output channels }
+ reserved2: UInt16; { fill with 0x00 }
+ offsetBcurves: UInt32; { offset to first "B" curve }
+ offsetMatrix: UInt32; { offset to 3x4 matrix }
+ offsetMcurves: UInt32; { offset to first "M" curve }
+ offsetCLUT: UInt32; { offset to multi-dimensional LUT of type CMMultiFunctCLUTType }
+ offsetAcurves: UInt32; { offset to first "A" curve }
+ data: SInt8; { variable size }
+ end;
+
+ CMMultiFunctLutA2BType = CMMultiFunctLutType;
+ CMMultiFunctLutA2BTypePtr = ^CMMultiFunctLutA2BType;
+ CMMultiFunctLutB2AType = CMMultiFunctLutType;
+ CMMultiFunctLutB2ATypePtr = ^CMMultiFunctLutB2AType;
+
+ CMMultiFunctCLUTTypePtr = ^CMMultiFunctCLUTType;
+ CMMultiFunctCLUTType = record
+ gridPoints: packed array[0..15] of UInt8; { grigpoints for each input channel dimension (remaining are 0) }
+ entrySize: SInt8; { bytes per lut enrty (1 or 2) }
+ reserved: array[0..2] of SInt8; { fill with 0x00 }
+ data: SInt8; { variable size, determined by above }
+ pad: SInt8; { pad byte needed for correct record size. Critical to accessing CMMultiFunctLutType's variable sized data field contents. }
+ end;
+
+
+ CMMeasurementTypePtr = ^CMMeasurementType;
+ CMMeasurementType = record
+ typeDescriptor: OSType; { 'meas' = cmSigMeasurementType }
+ reserved: UInt32; { fill with 0x00 }
+ standardObserver: UInt32; { cmStdobsUnknown, cmStdobs1931TwoDegrees, cmStdobs1964TenDegrees }
+ backingXYZ: CMFixedXYZColor; { absolute XYZ values of backing }
+ geometry: UInt32; { cmGeometryUnknown, cmGeometry045or450 (0/45), cmGeometry0dord0 (0/d or d/0) }
+ flare: UInt32; { cmFlare0, cmFlare100 }
+ illuminant: UInt32; { cmIlluminantUnknown, cmIlluminantD50, ... }
+ end;
+
+ CMNamedColorTypePtr = ^CMNamedColorType;
+ CMNamedColorType = record
+ typeDescriptor: OSType; { 'ncol' = cmSigNamedColorType }
+ reserved: UInt32; { fill with 0x00 }
+ vendorFlag: UInt32; { }
+ count: UInt32; { count of named colors in array that follows }
+ prefixName: SInt8; { variable size, max = 32 }
+ end;
+
+ CMNamedColor2EntryTypePtr = ^CMNamedColor2EntryType;
+ CMNamedColor2EntryType = record
+ rootName: packed array [0..31] of UInt8; { 32 byte field. 7 bit ASCII null terminated }
+ PCSColorCoords: array [0..2] of UInt16; { Lab or XYZ color }
+ DeviceColorCoords: array [0..0] of UInt16; { variable size }
+ end;
+
+ CMNamedColor2TypePtr = ^CMNamedColor2Type;
+ CMNamedColor2Type = record
+ typeDescriptor: OSType; { 'ncl2' = cmSigNamedColor2Type }
+ reserved: UInt32; { fill with 0x00 }
+ vendorFlag: UInt32; { lower 16 bits reserved for ICC use }
+ count: UInt32; { count of named colors in array that follows }
+ deviceChannelCount: UInt32; { number of device channels, 0 indicates no device value available }
+ prefixName: packed array [0..31] of UInt8; { Fixed 32 byte size. 7 bit ASCII null terminated }
+ suffixName: packed array [0..31] of UInt8; { Fixed 32 byte size. 7 bit ASCII null terminated }
+ data: SInt8; { variable size data for CMNamedColor2EntryType }
+ end;
+
+ CMNativeDisplayInfoPtr = ^CMNativeDisplayInfo;
+ CMNativeDisplayInfo = record
+ dataSize: UInt32; { Size of this structure }
+ redPhosphor: CMFixedXYColor; { Phosphors - native cromaticity values of the display }
+ greenPhosphor: CMFixedXYColor;
+ bluePhosphor: CMFixedXYColor;
+ whitePoint: CMFixedXYColor;
+ redGammaValue: Fixed; { Gammas - native gamma values of the display }
+ greenGammaValue: Fixed;
+ blueGammaValue: Fixed;
+ { Gamma tables - if if gammaChannels is not zero, }
+ { native gamma tables are preferred over values }
+ { redGammaValue, greenGammaValue, blueGammaValue }
+ gammaChannels: UInt16; { # of gamma channels (1 or 3) }
+ gammaEntryCount: UInt16; { 1-based number of entries per channel }
+ gammaEntrySize: UInt16; { size in bytes of each entry }
+ gammaData: SInt8; { variable size, determined by channels*entryCount*entrySize }
+ end;
+
+ CMNativeDisplayInfoTypePtr = ^CMNativeDisplayInfoType;
+ CMNativeDisplayInfoType = record
+ typeDescriptor: OSType; { 'ndin' = cmSigNativeDisplayInfoType }
+ reserved: UInt32; { fill with 0x00 }
+ nativeDisplayInfo: CMNativeDisplayInfo; { data of type CMNativeDisplayInfo }
+ end;
+
+ CMParametricCurveTypePtr = ^CMParametricCurveType;
+ CMParametricCurveType = record
+ typeDescriptor: OSType; { 'para' = cmSigParametricCurveType }
+ reserved: UInt32; { fill with 0x00 }
+ functionType: UInt16; { cmParametricType0, cmParametricType1, etc. }
+ reserved2: UInt16; { fill with 0x00 }
+ value: array[0..0] of Fixed; { variable size, determined by functionType }
+ end;
+
+ CMTextDescriptionTypePtr = ^CMTextDescriptionType;
+ CMTextDescriptionType = packed record
+ typeDescriptor: OSType; { 'desc' = cmSigProfileDescriptionType }
+ reserved: UInt32; { fill with 0x00 }
+ ASCIICount: UInt32; { Count of bytes (including null terminator) }
+ ASCIIName: packed array [0..1] of UInt8; { variable size, determined by ASCIICount. 7 bit ASCII null terminated }
+ end;
+
+ CMTextTypePtr = ^CMTextType;
+ CMTextType = record
+ typeDescriptor: OSType; { 'text' = cmSigTextType }
+ reserved: UInt32; { fill with 0x00 }
+ text: SInt8; { variable size, determined by tag element size }
+ end;
+
+ CMUnicodeTextTypePtr = ^CMUnicodeTextType;
+ CMUnicodeTextType = record
+ typeDescriptor: OSType; { 'utxt' = cmSigUnicodeTextType }
+ reserved: UInt32; { fill with 0x00 }
+ text: array [0..0] of UniChar; { variable size, determined by tag element size }
+ end;
+
+ CMScreeningChannelRecPtr = ^CMScreeningChannelRec;
+ CMScreeningChannelRec = record
+ frequency: Fixed;
+ angle: Fixed;
+ spotFunction: UInt32;
+ end;
+
+ CMScreeningTypePtr = ^CMScreeningType;
+ CMScreeningType = record
+ typeDescriptor: OSType; { 'scrn' = cmSigScreeningType }
+ reserved: UInt32; { fill with 0x00 }
+ screeningFlag: UInt32; { bit 0 : use printer default screens, bit 1 : inch/cm }
+ channelCount: UInt32; { }
+ channelInfo: array [0..0] of CMScreeningChannelRec; { variable size, determined by channelCount }
+ end;
+
+ CMSignatureTypePtr = ^CMSignatureType;
+ CMSignatureType = record
+ typeDescriptor: OSType; { 'sig ' = cmSigSignatureType }
+ reserved: UInt32; { fill with 0x00 }
+ signature: OSType;
+ end;
+
+ CMS15Fixed16ArrayTypePtr = ^CMS15Fixed16ArrayType;
+ CMS15Fixed16ArrayType = record
+ typeDescriptor: OSType; { 'sf32' = cmSigS15Fixed16Type }
+ reserved: UInt32; { fill with 0x00 }
+ value: array [0..0] of Fixed; { variable size, determined by tag element size }
+ end;
+
+ CMU16Fixed16ArrayTypePtr = ^CMU16Fixed16ArrayType;
+ CMU16Fixed16ArrayType = record
+ typeDescriptor: OSType; { 'uf32' = cmSigU16Fixed16Type }
+ reserved: UInt32; { fill with 0x00 }
+ value: array [0..0] of UInt32; { variable size, determined by tag element size }
+ end;
+
+ CMUInt8ArrayTypePtr = ^CMUInt8ArrayType;
+ CMUInt8ArrayType = record
+ typeDescriptor: OSType; { 'ui08' = cmSigUInt8Type }
+ reserved: UInt32; { fill with 0x00 }
+ value: SInt8; { variable size, determined by tag element size }
+ end;
+
+ CMUInt16ArrayTypePtr = ^CMUInt16ArrayType;
+ CMUInt16ArrayType = record
+ typeDescriptor: OSType; { 'ui16' = cmSigUInt16Type }
+ reserved: UInt32; { fill with 0x00 }
+ value: array [0..0] of UInt16; { variable size, determined by tag element size }
+ end;
+
+ CMUInt32ArrayTypePtr = ^CMUInt32ArrayType;
+ CMUInt32ArrayType = record
+ typeDescriptor: OSType; { 'ui32' = cmSigUInt32Type }
+ reserved: UInt32; { fill with 0x00 }
+ value: array [0..0] of UInt32; { variable size, determined by tag element size }
+ end;
+
+ CMUInt64ArrayTypePtr = ^CMUInt64ArrayType;
+ CMUInt64ArrayType = record
+ typeDescriptor: OSType; { 'ui64' = cmSigUInt64Type }
+ reserved: UInt32; { fill with 0x00 }
+ value: array [0..0] of UInt32; { variable size, determined by tag element size }
+ end;
+
+ CMViewingConditionsTypePtr = ^CMViewingConditionsType;
+ CMViewingConditionsType = record
+ typeDescriptor: OSType; { 'view' = cmSigViewingConditionsType }
+ reserved: UInt32; { fill with 0x00 }
+ illuminant: CMFixedXYZColor; { absolute XYZs of illuminant in cd/m^2 }
+ surround: CMFixedXYZColor; { absolute XYZs of surround in cd/m^2 }
+ stdIlluminant: UInt32; { see definitions of std illuminants }
+ end;
+
+ CMXYZTypePtr = ^CMXYZType;
+ CMXYZType = record
+ typeDescriptor: OSType; { 'XYZ ' = cmSigXYZType }
+ reserved: UInt32; { fill with 0x00 }
+ XYZ: array [0..0] of CMFixedXYZColor; { variable size, determined by tag element size }
+ end;
+
+ CMProfileSequenceDescTypePtr = ^CMProfileSequenceDescType;
+ CMProfileSequenceDescType = record
+ typeDescriptor: OSType; { 'pseq' = cmProfileSequenceDescTag }
+ reserved: UInt32; { fill with 0x00 }
+ count: UInt32; { Number of descriptions }
+ data: SInt8; { variable size data explained in ICC spec }
+ end;
+
+ CMUcrBgTypePtr = ^CMUcrBgType;
+ CMUcrBgType = record
+ typeDescriptor: OSType; { 'bfd ' = cmSigUcrBgType }
+ reserved: UInt32; { fill with 0x00 }
+ ucrCount: UInt32; { Number of UCR entries }
+ ucrValues: array [0..0] of UInt16; { variable size, determined by ucrCount }
+ end;
+
+ { Private Tag Type Definitions }
+ CMIntentCRDVMSizePtr = ^CMIntentCRDVMSize;
+ CMIntentCRDVMSize = record
+ renderingIntent: SInt32; { rendering intent }
+ VMSize: UInt32; { VM size taken up by the CRD }
+ end;
+
+ CMPS2CRDVMSizeTypePtr = ^CMPS2CRDVMSizeType;
+ CMPS2CRDVMSizeType = record
+ typeDescriptor: OSType; { 'psvm' = cmSigPS2CRDVMSizeType }
+ reserved: UInt32; { fill with 0x00 }
+ count: UInt32; { number of intent entries }
+ intentCRD: array [0..0] of CMIntentCRDVMSize; { variable size, determined by count }
+ end;
+
+
+const
+ cmVideoCardGammaTableType = 0;
+ cmVideoCardGammaFormulaType = 1;
+
+
+type
+ CMVideoCardGammaTablePtr = ^CMVideoCardGammaTable;
+ CMVideoCardGammaTable = record
+ channels: UInt16; { # of gamma channels (1 or 3) }
+ entryCount: UInt16; { 1-based number of entries per channel }
+ entrySize: UInt16; { size in bytes of each entry }
+ data: SInt8; { variable size, determined by channels*entryCount*entrySize }
+ end;
+
+ CMVideoCardGammaFormulaPtr = ^CMVideoCardGammaFormula;
+ CMVideoCardGammaFormula = record
+ redGamma: Fixed; { must be > 0.0 }
+ redMin: Fixed; { must be > 0.0 and < 1.0 }
+ redMax: Fixed; { must be > 0.0 and < 1.0 }
+ greenGamma: Fixed; { must be > 0.0 }
+ greenMin: Fixed; { must be > 0.0 and < 1.0 }
+ greenMax: Fixed; { must be > 0.0 and < 1.0 }
+ blueGamma: Fixed; { must be > 0.0 }
+ blueMin: Fixed; { must be > 0.0 and < 1.0 }
+ blueMax: Fixed; { must be > 0.0 and < 1.0 }
+ end;
+
+ CMVideoCardGammaPtr = ^CMVideoCardGamma;
+ CMVideoCardGamma = record
+ tagType: UInt32;
+ case SInt16 of
+ 0: (
+ table: CMVideoCardGammaTable;
+ );
+ 1: (
+ formula: CMVideoCardGammaFormula;
+ );
+ end;
+
+ CMVideoCardGammaTypePtr = ^CMVideoCardGammaType;
+ CMVideoCardGammaType = record
+ typeDescriptor: OSType; { 'vcgt' = cmSigVideoCardGammaType }
+ reserved: UInt32; { fill with 0x00 }
+ gamma: CMVideoCardGamma;
+ end;
+
+ CMMakeAndModelPtr = ^CMMakeAndModel;
+ CMMakeAndModel = record
+ manufacturer: OSType;
+ model: UInt32;
+ serialNumber: UInt32;
+ manufactureDate: UInt32;
+ reserved1: UInt32; { fill with 0x00 }
+ reserved2: UInt32; { fill with 0x00 }
+ reserved3: UInt32; { fill with 0x00 }
+ reserved4: UInt32; { fill with 0x00 }
+ end;
+
+ CMMakeAndModelTypePtr = ^CMMakeAndModelType;
+ CMMakeAndModelType = record
+ typeDescriptor: OSType; { 'mmod' = cmSigMakeAndModelType }
+ reserved: UInt32; { fill with 0x00 }
+ makeAndModel: CMMakeAndModel;
+ end;
+
+ CMMultiLocalizedUniCodeEntryRecPtr = ^CMMultiLocalizedUniCodeEntryRec;
+ CMMultiLocalizedUniCodeEntryRec = record
+ languageCode: packed array [0..1] of char; { language code from ISO-639 }
+ regionCode: packed array [0..1] of char; { region code from ISO-3166 }
+ textLength: UInt32; { the length in bytes of the string }
+ textOffset: UInt32; { the offset from the start of tag in bytes }
+ end;
+
+ CMMultiLocalizedUniCodeTypePtr = ^CMMultiLocalizedUniCodeType;
+ CMMultiLocalizedUniCodeType = record
+ typeDescriptor: OSType; { 'mluc' = cmSigMultiLocalizedUniCodeType }
+ reserved: UInt32; { fill with 0x00 }
+ entryCount: UInt32; { 1-based number of name records that follow }
+ entrySize: UInt32; { size in bytes of name records that follow }
+ { variable-length data for storage of CMMultiLocalizedUniCodeEntryRec }
+ { variable-length data for storage of Unicode strings }
+ end;
+
+ { ********************************************************************** }
+ { ************** ColorSync 1.0 profile specification ******************* }
+ { ********************************************************************** }
+
+const
+ cmGrayResponse = 0;
+ cmRedResponse = 1;
+ cmGreenResponse = 2;
+ cmBlueResponse = 3;
+ cmCyanResponse = 4;
+ cmMagentaResponse = 5;
+ cmYellowResponse = 6;
+ cmUcrResponse = 7;
+ cmBgResponse = 8;
+ cmOnePlusLastResponse = 9;
+
+
+ { Device types }
+ cmMonitorDevice = $6D6E7472 (* 'mntr' *);
+ cmScannerDevice = $73636E72 (* 'scnr' *);
+ cmPrinterDevice = $70727472 (* 'prtr' *);
+
+
+type
+ CMIStringPtr = ^CMIString;
+ CMIString = record
+ theScript: ScriptCode;
+ theString: Str63;
+ end;
+
+ { Profile options }
+
+const
+ cmPerceptualMatch = $0000; { Default. For photographic images }
+ cmColorimetricMatch = $0001; { Exact matching when possible }
+ cmSaturationMatch = $0002; { For solid colors }
+
+ { Profile flags }
+ cmNativeMatchingPreferred = $00000001; { Default to native not preferred }
+ cmTurnOffCache = $00000002; { Default to turn on CMM cache }
+
+
+type
+ CMMatchOption = SInt32;
+ CMMatchFlag = SInt32;
+ CMHeaderPtr = ^CMHeader;
+ CMHeader = record
+ size: UInt32;
+ CMMType: OSType;
+ applProfileVersion: UInt32;
+ dataType: OSType;
+ deviceType: OSType;
+ deviceManufacturer: OSType;
+ deviceModel: UInt32;
+ deviceAttributes: array [0..1] of UInt32;
+ profileNameOffset: UInt32;
+ customDataOffset: UInt32;
+ flags: CMMatchFlag;
+ options: CMMatchOption;
+ white: CMXYZColor;
+ black: CMXYZColor;
+ end;
+
+ CMProfileChromaticitiesPtr = ^CMProfileChromaticities;
+ CMProfileChromaticities = record
+ red: CMXYZColor;
+ green: CMXYZColor;
+ blue: CMXYZColor;
+ cyan: CMXYZColor;
+ magenta: CMXYZColor;
+ yellow: CMXYZColor;
+ end;
+
+ CMProfileResponsePtr = ^CMProfileResponse;
+ CMProfileResponse = record
+ counts: array [0..8] of UInt16;
+ data: array [0..0] of UInt16; { Variable size }
+ end;
+
+ CMProfilePtr = ^CMProfile;
+ CMProfile = record
+ header: CMHeader;
+ profile: CMProfileChromaticities;
+ response: CMProfileResponse;
+ profileName: CMIString;
+ customData: SInt8; { Variable size }
+ end;
+
+ CMProfileHandle = ^CMProfilePtr;
+{$ifc OLDROUTINENAMES}
+
+const
+ kCMApplProfileVersion = $00000100;
+
+ grayResponse = 0;
+ redResponse = 1;
+ greenResponse = 2;
+ blueResponse = 3;
+ cyanResponse = 4;
+ magentaResponse = 5;
+ yellowResponse = 6;
+ ucrResponse = 7;
+ bgResponse = 8;
+ onePlusLastResponse = 9;
+
+ rgbData = $52474220 (* 'RGB ' *);
+ cmykData = $434D594B (* 'CMYK' *);
+ grayData = $47524159 (* 'GRAY' *);
+ xyzData = $58595A20 (* 'XYZ ' *);
+
+ monitorDevice = $6D6E7472 (* 'mntr' *);
+ scannerDevice = $73636E72 (* 'scnr' *);
+ printerDevice = $70727472 (* 'prtr' *);
+
+
+type
+ XYZComponent = UInt16;
+ XYZColor = CMXYZColor;
+ XYZColorPtr = ^XYZColor;
+ CMResponseData = UInt16;
+ IString = CMIString;
+ IStringPtr = ^IString;
+ CMResponseColor = SInt32;
+ responseColor = CMResponseColor;
+{$endc} {OLDROUTINENAMES}
+
+
+{$ALIGN MAC68K}
+
+
+{unit CMTypes}
+{
+ File: ColorSync/CMTypes.h
+
+ Contains: ColorSync types
+
+ Version: ColorSync-174.1~229
+
+ Copyright: © 2000-2006 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Gale R Paeper, <gpaeper@empirenet.com>, 2007 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{ Standard type for ColorSync and other system error codes }
+
+{$ALIGN MAC68K}
+
+
+type
+ CMError = SInt32;
+ { Abstract data type for memory-based Profile }
+ CMProfileRef = ^SInt32; { an opaque 32-bit type }
+ CMProfileRefPtr = ^CMProfileRef; { when a var xx:CMProfileRef parameter can be nil, it is changed to xx: CMProfileRefPtr }
+ { Abstract data type for Profile search result }
+ CMProfileSearchRef = ^SInt32; { an opaque 32-bit type }
+ CMProfileSearchRefPtr = ^CMProfileSearchRef; { when a var xx:CMProfileSearchRef parameter can be nil, it is changed to xx: CMProfileSearchRefPtr }
+ { Abstract data type for BeginMatching(É) reference }
+ CMMatchRef = ^SInt32; { an opaque 32-bit type }
+ CMMatchRefPtr = ^CMMatchRef; { when a var xx:CMMatchRef parameter can be nil, it is changed to xx: CMMatchRefPtr }
+ { Abstract data type for ColorWorld reference }
+ CMWorldRef = ^SInt32; { an opaque 32-bit type }
+ CMWorldRefPtr = ^CMWorldRef; { when a var xx:CMWorldRef parameter can be nil, it is changed to xx: CMWorldRefPtr }
+ { Data type for ColorSync DisplayID reference }
+ { On 8 & 9 this is a AVIDType }
+ { On X this is a CGSDisplayID }
+ CMDisplayIDType = UInt32;
+ CMChromaticAdaptation = UInt32;
+
+const
+ cmUseDefaultChromaticAdaptation = 0;
+ cmLinearChromaticAdaptation = 1;
+ cmVonKriesChromaticAdaptation = 2;
+ cmBradfordChromaticAdaptation = 3;
+
+type
+ { Caller-supplied flatten function }
+{$ifc TYPED_FUNCTION_POINTERS}
+ CMFlattenProcPtr = function(command: SInt32; var size: SInt32; data: UnivPtr; refCon: UnivPtr): OSErr;
+{$elsec}
+ CMFlattenProcPtr = ProcPtr;
+{$endc}
+
+ { Caller-supplied progress function for Bitmap & PixMap matching routines }
+{$ifc TYPED_FUNCTION_POINTERS}
+ CMBitmapCallBackProcPtr = function(progress: SInt32; refCon: UnivPtr): boolean;
+{$elsec}
+ CMBitmapCallBackProcPtr = ProcPtr;
+{$endc}
+
+ { Caller-supplied progress function for NCMMConcatInit & NCMMNewLinkProfile routines }
+{$ifc TYPED_FUNCTION_POINTERS}
+ CMConcatCallBackProcPtr = function(progress: SInt32; refCon: UnivPtr): boolean;
+{$elsec}
+ CMConcatCallBackProcPtr = ProcPtr;
+{$endc}
+
+ { Caller-supplied filter function for Profile search }
+{$ifc TYPED_FUNCTION_POINTERS}
+ CMProfileFilterProcPtr = function(prof: CMProfileRef; refCon: UnivPtr): boolean;
+{$elsec}
+ CMProfileFilterProcPtr = ProcPtr;
+{$endc}
+
+ { Caller-supplied function for profile access }
+{$ifc TYPED_FUNCTION_POINTERS}
+ CMProfileAccessProcPtr = function(command: SInt32; offset: SInt32; var size: SInt32; data: UnivPtr; refCon: UnivPtr): OSErr;
+{$elsec}
+ CMProfileAccessProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ CMFlattenUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CMFlattenUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ CMBitmapCallBackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CMBitmapCallBackUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ CMConcatCallBackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CMConcatCallBackUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ CMProfileFilterUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CMProfileFilterUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ CMProfileAccessUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CMProfileAccessUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppCMFlattenProcInfo = $00003FE0;
+ uppCMBitmapCallBackProcInfo = $000003D0;
+ uppCMConcatCallBackProcInfo = $000003D0;
+ uppCMProfileFilterProcInfo = $000003D0;
+ uppCMProfileAccessProcInfo = $0000FFE0;
+{
+ * NewCMFlattenUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewCMFlattenUPP(userRoutine: CMFlattenProcPtr): CMFlattenUPP; external name '_NewCMFlattenUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewCMBitmapCallBackUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewCMBitmapCallBackUPP(userRoutine: CMBitmapCallBackProcPtr): CMBitmapCallBackUPP; external name '_NewCMBitmapCallBackUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewCMConcatCallBackUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewCMConcatCallBackUPP(userRoutine: CMConcatCallBackProcPtr): CMConcatCallBackUPP; external name '_NewCMConcatCallBackUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewCMProfileFilterUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewCMProfileFilterUPP(userRoutine: CMProfileFilterProcPtr): CMProfileFilterUPP; external name '_NewCMProfileFilterUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewCMProfileAccessUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewCMProfileAccessUPP(userRoutine: CMProfileAccessProcPtr): CMProfileAccessUPP; external name '_NewCMProfileAccessUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeCMFlattenUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeCMFlattenUPP(userUPP: CMFlattenUPP); external name '_DisposeCMFlattenUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeCMBitmapCallBackUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeCMBitmapCallBackUPP(userUPP: CMBitmapCallBackUPP); external name '_DisposeCMBitmapCallBackUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeCMConcatCallBackUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeCMConcatCallBackUPP(userUPP: CMConcatCallBackUPP); external name '_DisposeCMConcatCallBackUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeCMProfileFilterUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeCMProfileFilterUPP(userUPP: CMProfileFilterUPP); external name '_DisposeCMProfileFilterUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeCMProfileAccessUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeCMProfileAccessUPP(userUPP: CMProfileAccessUPP); external name '_DisposeCMProfileAccessUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeCMFlattenUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeCMFlattenUPP(command: SInt32; var size: SInt32; data: UnivPtr; refCon: UnivPtr; userRoutine: CMFlattenUPP): OSErr; external name '_InvokeCMFlattenUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeCMBitmapCallBackUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeCMBitmapCallBackUPP(progress: SInt32; refCon: UnivPtr; userRoutine: CMBitmapCallBackUPP): boolean; external name '_InvokeCMBitmapCallBackUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeCMConcatCallBackUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeCMConcatCallBackUPP(progress: SInt32; refCon: UnivPtr; userRoutine: CMConcatCallBackUPP): boolean; external name '_InvokeCMConcatCallBackUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeCMProfileFilterUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeCMProfileFilterUPP(prof: CMProfileRef; refCon: UnivPtr; userRoutine: CMProfileFilterUPP): boolean; external name '_InvokeCMProfileFilterUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeCMProfileAccessUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeCMProfileAccessUPP(command: SInt32; offset: SInt32; var size: SInt32; data: UnivPtr; refCon: UnivPtr; userRoutine: CMProfileAccessUPP): OSErr; external name '_InvokeCMProfileAccessUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{$ALIGN MAC68K}
+
+
+{unit CarbonEventsCore}
+{
+ File: HIToolbox/CarbonEventsCore.h
+
+ Contains: Carbon Event Manager
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1999-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{======================================================================================}
+{ The core data structure of the Carbon Event system }
+{======================================================================================}
+type
+ EventRef = ^SInt32; { an opaque 32-bit type }
+{======================================================================================}
+{ EVENT COMMON }
+{======================================================================================}
+
+
+{
+ * Discussion:
+ * The following are all errors which can be returned from the
+ * routines contained in this file.
+ }
+const
+{
+ * This is returned from PostEventToQueue if the event in question is
+ * already in the queue you are posting it to (or any other queue).
+ }
+ eventAlreadyPostedErr = -9860;
+
+ {
+ * You are attemtping to modify a target that is currently in use,
+ * such as when dispatching.
+ }
+ eventTargetBusyErr = -9861;
+
+ {
+ * This is obsolete and will be removed.
+ }
+ eventClassInvalidErr = -9862;
+
+ {
+ * This is obsolete and will be removed.
+ }
+ eventClassIncorrectErr = -9864;
+
+ {
+ * This is what you should return from a kEventClassAccessibility
+ * event handler when asked to process a directly dispached event
+ * that would cause your handler proc to not return after more than a
+ * split-second. This will cause the accessibility engine to defer
+ * the event until a later time when your handler will be able to
+ * take all the time it needs without causing timeout problems for
+ * the assistive application. See kEventClassAccessibility and
+ * kEventAccessiblePerformNamedAction for more information. You
+ * should only return this on Mac OS X 10.3 and later; earlier
+ * versions will treat this like a true failure, which prevents
+ * assistive applications from getting the functionality they need.
+ }
+ eventDeferAccessibilityEventErr = -9865;
+
+ {
+ * Returned from InstallEventHandler if the handler proc you pass is
+ * already installed for a given event type you are trying to
+ * register.
+ }
+ eventHandlerAlreadyInstalledErr = -9866;
+
+ {
+ * A generic error.
+ }
+ eventInternalErr = -9868;
+
+ {
+ * This is obsolete and will be removed.
+ }
+ eventKindIncorrectErr = -9869;
+
+ {
+ * The piece of data you are requesting from an event is not present.
+ }
+ eventParameterNotFoundErr = -9870;
+
+ {
+ * This is what you should return from an event handler when your
+ * handler has received an event it doesn't currently want to (or
+ * isn't able to) handle. If you handle an event, you should return
+ * noErr from your event handler. Any return value other than
+ * eventNotHandledErr will cause event handling to stop; the event
+ * will not be sent to any other event handler, and the return value
+ * will be provided to the original caller of SendEventToTarget.
+ }
+ eventNotHandledErr = -9874;
+
+ {
+ * The event loop has timed out. This can be returned from calls to
+ * ReceiveNextEvent or RunCurrentEventLoop.
+ }
+ eventLoopTimedOutErr = -9875;
+
+ {
+ * The event loop was quit, probably by a call to QuitEventLoop. This
+ * can be returned from ReceiveNextEvent or RunCurrentEventLoop.
+ }
+ eventLoopQuitErr = -9876;
+
+ {
+ * Returned from RemoveEventFromQueue when trying to remove an event
+ * that's not in any queue.
+ }
+ eventNotInQueueErr = -9877;
+
+ {
+ * Returned from RegisterEventHotKey when an attempt is made to
+ * register a hotkey that is already registered in the current
+ * process. (Note that it is not an error to register the same hotkey
+ * in multiple processes.)
+ }
+ eventHotKeyExistsErr = -9878;
+
+ {
+ * This error code is not currently used.
+ }
+ eventHotKeyInvalidErr = -9879;
+
+ {
+ * When returned from an event handler, causes the event dispatcher
+ * to abandon event dispatching on this target, and pass the event to
+ * the first handler on the next event target. Any event handlers
+ * installed beneath the current handler on the current target will
+ * not receive the event. Although newly documented in Mac OS X 10.3,
+ * this error code is actually available on Mac OS X 10.0 and
+ * CarbonLib 1.3 and later.
+ }
+ eventPassToNextTargetErr = -9880;
+
+{======================================================================================}
+{ EVENT CORE }
+{======================================================================================}
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Core Event Parameters }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kEventParamDirectObject = $2D2D2D2D (* '----' *); { type varies depending on event}
+ kEventParamDragRef = $64726167 (* 'drag' *); { typeDragRef}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Core Event Types }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ Some Carbon event data types will be retained when added to an EventRef in
+ Mac OS X 10.2 and later, and released when the EventRef is destroyed.
+
+ Retained in 10.2 and later:
+
+ typeCFStringRef
+ typeCFMutableStringRef
+ typeCFMutableArrayRef
+ typeCFTypeRef
+ typeHIAccessibleObjectRef
+
+ Retained in Panther and later:
+
+ typeEventRef
+ typeCFArrayRef
+ typeCFDictionaryRef:
+ typeCFMutableDictionaryRef
+
+ Retained in Tiger and later:
+
+ typeHIShapeRef
+ typeMenuRef
+
+ Note that other data types may be retained in future releases of Mac OS X.
+ Apple recommends that if you need to know whether a particular data type
+ (other than the ones documented here) is retained, that you check the retain
+ count of an instance of that data type before and after adding it to an EventRef.
+}
+const
+ typeCFStringRef = $63667374 (* 'cfst' *); { CFStringRef}
+ typeCFMutableStringRef = $63666D73 (* 'cfms' *); { CFMutableStringRef}
+ typeCFArrayRef = $63666172 (* 'cfar' *); { CFArrayRef}
+ typeCFMutableArrayRef = $63666D61 (* 'cfma' *); { CFMutableArrayRef}
+ typeCFDictionaryRef = $63666463 (* 'cfdc' *); { CFDictionaryRef}
+ typeCFMutableDictionaryRef = $63666D64 (* 'cfmd' *); { CFMutableDictionaryRef}
+ typeCFTypeRef = $63667479 (* 'cfty' *); { CFTypeRef}
+ typeDragRef = $64726167 (* 'drag' *); { DragRef}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Event Flags, options }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * EventPriority
+ *
+ * Discussion:
+ * These values define the relative priority of an event, and are
+ * used when posting events with PostEventToQueue. In general events
+ * are pulled from the queue in order of first posted to last
+ * posted. These priorities are a way to alter that when posting
+ * events. You can post a standard priority event and then a high
+ * priority event and the high priority event will be pulled from
+ * the queue first.
+ }
+type
+ EventPriority = SInt16;
+const
+{
+ * Lowest priority. Currently only window update events are posted at
+ * this priority.
+ }
+ kEventPriorityLow = 0;
+
+ {
+ * Normal priority of events. Most events are standard priority.
+ }
+ kEventPriorityStandard = 1;
+
+ {
+ * Highest priority.
+ }
+ kEventPriorityHigh = 2;
+
+const
+ kEventLeaveInQueue = false;
+ kEventRemoveFromQueue = true;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Event Times }
+{ EventTime is in seconds since boot. Use the constants to make life easy. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ EventTime = Float64;
+ EventTimePtr = ^EventTime;
+type
+ EventTimeout = EventTime;
+ EventTimeoutPtr = ^EventTimeout;
+type
+ EventTimerInterval = EventTime;
+ EventTimerIntervalPtr = ^EventTimerInterval;
+
+const
+ kEventDurationSecond = 1.0;
+ kEventDurationMillisecond = kEventDurationSecond/1000;
+ kEventDurationMicrosecond = kEventDurationSecond/1000000;
+ kEventDurationNanosecond = kEventDurationSecond/1000000000;
+ kEventDurationMinute = kEventDurationSecond*60;
+ kEventDurationHour = kEventDurationMinute*60;
+ kEventDurationDay = kEventDurationHour*24;
+ kEventDurationNoWait = 0.0;
+ kEventDurationForever = -1.0;
+
+{ Helpful doodads to convert to and from ticks and event times}
+// #define TicksToEventTime( t ) ((EventTime)( (t) / 60.0 ))
+// #define EventTimeToTicks( t ) ((UInt32)( ((t) * 60) + 0.5 ))
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ EventTypeSpec structure }
+{ This structure is used in many routines to pass a list of event types to a function. }
+{ You typically would declare a const array of these types to pass in. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * EventTypeSpec
+ *
+ * Discussion:
+ * This structure is used to specify an event. Typically, a static
+ * array of EventTypeSpecs are passed into functions such as
+ * InstallEventHandler, as well as routines such as
+ * FlushEventsMatchingListFromQueue.
+ }
+type
+ EventTypeSpec = record
+ eventClass: UInt32;
+ eventKind: UInt32;
+ end;
+ EventTypeSpecPtr = ^EventTypeSpec;
+{A helpful macro for dealing with EventTypeSpecs }
+// #define GetEventTypeCount( t ) (sizeof( (t) ) / sizeof( EventTypeSpec ))
+
+type
+ EventParamName = OSType;
+ EventParamNamePtr = ^EventParamName;
+ EventParamType = OSType;
+ EventParamTypePtr = ^EventParamType;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ EventLoop }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * EventLoopRef
+ *
+ * Discussion:
+ * An EventLoopRef represents an 'event loop', which is the
+ * conceptual entity that you 'run' to fetch events from hardware
+ * and other sources and also fires timers that might be installed
+ * with InstallEventLoopTimer. The term 'run' is a bit of a
+ * misnomer, as the event loop's goal is to stay as blocked as
+ * possible to minimize CPU usage for the current application. The
+ * event loop is run implicitly thru APIs like ReceiveNextEvent,
+ * RunApplicationEventLoop, or even WaitNextEvent. It can also be
+ * run explicitly thru a call to RunCurrentEventLoop. Each
+ * preemptive thread can have an event loop. Cooperative threads
+ * share the main thread's event loop.
+ }
+type
+ EventLoopRef = ^SInt32; { an opaque 32-bit type }
+{
+ * GetCurrentEventLoop()
+ *
+ * Discussion:
+ * Returns the current event loop for the current thread. If the
+ * current thread is a cooperative thread, the main event loop is
+ * returned.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Result:
+ * An event loop reference.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetCurrentEventLoop: EventLoopRef; external name '_GetCurrentEventLoop';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMainEventLoop()
+ *
+ * Discussion:
+ * Returns the event loop object for the main application thread.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Result:
+ * An event loop reference.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMainEventLoop: EventLoopRef; external name '_GetMainEventLoop';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RunCurrentEventLoop()
+ *
+ * Discussion:
+ * This routine 'runs' the event loop, returning only if aborted or
+ * the timeout specified is reached. The event loop is mostly
+ * blocked while in this function, occasionally waking up to fire
+ * timers or pick up events. The typical use of this function is to
+ * cause the current thread to wait for some operation to complete,
+ * most likely on another thread of execution.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inTimeout:
+ * The time to wait until returning (can be kEventDurationForever).
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function RunCurrentEventLoop( inTimeout: EventTimeout ): OSStatus; external name '_RunCurrentEventLoop';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * QuitEventLoop()
+ *
+ * Discussion:
+ * Causes a specific event loop to terminate. Usage of this is
+ * similar to WakeUpProcess, in that it causes the eventloop
+ * specified to return immediately (as opposed to timing out).
+ * Typically this call is used in conjunction with
+ * RunCurrentEventLoop.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inEventLoop:
+ * The event loop to terminate.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function QuitEventLoop( inEventLoop: EventLoopRef ): OSStatus; external name '_QuitEventLoop';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetCFRunLoopFromEventLoop()
+ *
+ * Discussion:
+ * Returns the corresponding CFRunLoopRef for the given EventLoop.
+ * This is not necessarily a one-to-one mapping, hence the need for
+ * this function. In Carbon, all cooperative threads use the same
+ * run loop under the covers, so using CFRunLoopGetCurrent might
+ * yield the wrong result. In general, you would only need to use
+ * this function if you wished to add your own sources to the run
+ * loop. If you don't know what I'm talking about, then you probably
+ * don't need to use this.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inEventLoop:
+ * The event loop to get the CFRunLoop for.
+ *
+ * Result:
+ * The CFRunLoopRef for inEventLoop.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetCFRunLoopFromEventLoop( inEventLoop: EventLoopRef ): CFTypeRef; external name '_GetCFRunLoopFromEventLoop';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Low-level event fetching }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * ReceiveNextEvent()
+ *
+ * Discussion:
+ * This routine tries to fetch the next event of a specified type.
+ * If no events in the event queue match, this routine will run the
+ * current event loop until an event that matches arrives, or the
+ * timeout expires. Except for timers firing, your application is
+ * blocked waiting for events to arrive when inside this function.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inNumTypes:
+ * The number of event types we are waiting for (0 if any event
+ * should cause this routine to return).
+ *
+ * inList:
+ * The list of event types we are waiting for (pass NULL if any
+ * event should cause this routine to return).
+ *
+ * inTimeout:
+ * The time to wait (passing kEventDurationForever is preferred).
+ *
+ * inPullEvent:
+ * Pass true for this parameter to actually remove the next
+ * matching event from the queue.
+ *
+ * outEvent:
+ * The next event that matches the list passed in. If inPullEvent
+ * is true, the event is owned by you, and you will need to
+ * release it when done.
+ *
+ * Result:
+ * A result indicating whether an event was received, the timeout
+ * expired, or the current event loop was quit.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function ReceiveNextEvent( inNumTypes: UInt32; {const} inList: {variable-size-array} EventTypeSpecPtr; inTimeout: EventTimeout; inPullEvent: Boolean; var outEvent: EventRef ): OSStatus; external name '_ReceiveNextEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Core event lifetime APIs }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * EventAttributes
+ *
+ * Summary:
+ * Attributes of a Carbon event.
+ }
+type
+ EventAttributes = UInt32;
+const
+{
+ * The absence of any attributes.
+ }
+ kEventAttributeNone = 0;
+
+ {
+ * Indicates that the event is considered user input; for example, a
+ * mouse event or keyboard event. Not appropriate for higher-level
+ * events such as a window update or activate.
+ }
+ kEventAttributeUserEvent = 1 shl 0;
+
+ {
+ * This event was not originally targeted to this process, but has
+ * been provided to this process because someone has installed an
+ * event handler for this event type on the event monitoring target.
+ * Events with this attribute are sent directly to the event monitor
+ * target by the event dispatcher.
+ }
+ kEventAttributeMonitored = 1 shl 3;
+
+{
+ * [Mac]CreateEvent()
+ *
+ * Summary:
+ * Creates a new Carbon event.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inAllocator:
+ * The CFAllocator to use to allocate the event data. You can pass
+ * NULL or kCFAllocatorDefault to use the standard allocator.
+ *
+ * inClassID:
+ * The event class for the event.
+ *
+ * inKind:
+ * The event kind for the event.
+ *
+ * inWhen:
+ * The event timestamp to be recorded in the event. You may pass 0
+ * to indicate the current time.
+ *
+ * inAttributes:
+ * The event attributes. Typically this should be
+ * kEventAttributeNone.
+ *
+ * outEvent:
+ * On exit, contains the new event.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateEvent( inAllocator: CFAllocatorRef { can be NULL }; inClassID: UInt32; inKind: UInt32; inWhen: EventTime; inAttributes: EventAttributes; var outEvent: EventRef ): OSStatus; external name '_CreateEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+function MacCreateEvent__NAMED_CreateEvent( inAllocator: CFAllocatorRef { can be NULL }; inClassID: UInt32; inKind: UInt32; inWhen: EventTime; inAttributes: EventAttributes; var outEvent: EventRef ): OSStatus; external name '_MacCreateEvent__NAMED_CreateEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CopyEvent()
+ *
+ * Summary:
+ * Copies an existing event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inOther:
+ * The original event to copy.
+ *
+ * Result:
+ * The newly created event, or NULL if either the input event was
+ * NULL or the memory for the event could not be allocated. The new
+ * event is allocated using the same allocator as the original event.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CopyEvent( inOther: EventRef ): EventRef; external name '_CopyEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CopyEventAs()
+ *
+ * Summary:
+ * Copies an existing event, allowing you to change the class and
+ * kind of the event.
+ *
+ * Discussion:
+ * CopyEventAs may be useful during event flow and transformation.
+ * For example, this API is used when upgrading a raw mouse down to
+ * a window click event, to ensure that the window click event has
+ * exactly the same parameters as the original mouse down event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inAllocator:
+ * The CFAllocator to use to allocate the event data. You can pass
+ * NULL or kCFAllocatorDefault to use the standard allocator.
+ *
+ * inOther:
+ * The original event to copy.
+ *
+ * inEventClass:
+ * The new event class for the copy of the event.
+ *
+ * inEventKind:
+ * The new event kind for the copy of the event.
+ *
+ * Result:
+ * The newly created event, or NULL if either the input event was
+ * NULL or the memory for the event could not be allocated.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function CopyEventAs( inAllocator: CFAllocatorRef { can be NULL }; inOther: EventRef; inEventClass: UInt32; inEventKind: UInt32 ): EventRef; external name '_CopyEventAs';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * RetainEvent()
+ *
+ * Summary:
+ * Increments the retain count of an event.
+ *
+ * Discussion:
+ * Note that EventRefs are not CoreFoundation types, and therefore
+ * you cannot use CFRetain on an EventRef; you must use RetainEvent.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The event to retain.
+ *
+ * Result:
+ * The event that was retained.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function RetainEvent( inEvent: EventRef ): EventRef; external name '_RetainEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetEventRetainCount()
+ *
+ * Summary:
+ * Returns the retain count of an event.
+ *
+ * Discussion:
+ * Note that EventRefs are not CoreFoundation types, and therefore
+ * you cannot use CFGetRetainCount on an EventRef; you must use
+ * GetEventRetainCount.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The event whose retain count to return.
+ *
+ * Result:
+ * The event's retain count.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetEventRetainCount( inEvent: EventRef ): UInt32; external name '_GetEventRetainCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ReleaseEvent()
+ *
+ * Summary:
+ * Decrements the retain count of an event. If the retain count
+ * reaches zero, the event is destroyed.
+ *
+ * Discussion:
+ * Note that EventRefs are not CoreFoundation types, and therefore
+ * you cannot use CFRelease on an EventRef; you must use
+ * ReleaseEvent.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The event to release.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure ReleaseEvent( inEvent: EventRef ); external name '_ReleaseEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetEventParameter()
+ *
+ * Summary:
+ * Sets a piece of data for the given event.
+ *
+ * Discussion:
+ * SetEventParameter is thread-safe to the extent of allowing
+ * multiple threads to each modify a separate event, but it is not
+ * safe to have multiple threads call SetEventParameter on the same
+ * event. Multiple threads modifying the same event can cause
+ * corruption of the event data.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The event to set the data for.
+ *
+ * inName:
+ * The symbolic name of the parameter.
+ *
+ * inType:
+ * The symbolic type of the parameter.
+ *
+ * inSize:
+ * The size of the parameter data.
+ *
+ * inDataPtr:
+ * The pointer to the parameter data.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetEventParameter( inEvent: EventRef; inName: EventParamName; inType: EventParamType; inSize: UInt32; inDataPtr: {const} UnivPtr ): OSStatus; external name '_SetEventParameter';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetEventParameter()
+ *
+ * Discussion:
+ * Gets a piece of data from the given event, if it exists.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The event to get the parameter from.
+ *
+ * inName:
+ * The symbolic name of the parameter.
+ *
+ * inDesiredType:
+ * The desired type of the parameter. The Carbon Event Manager
+ * will automatically use AppleEvent coercion handlers to convert
+ * the data in the event into the desired type, if possible. You
+ * may also pass typeWildCard to request that the data be returned
+ * in its original format.
+ *
+ * outActualType:
+ * The actual type of the parameter, or NULL if you are not
+ * interested in receiving this information.
+ *
+ * inBufferSize:
+ * The size of the output buffer specified by ioBuffer. You may
+ * pass zero for this parameter and NULL for the outData parameter
+ * if you don't want the data returned.
+ *
+ * outActualSize:
+ * The actual size of the data, or NULL if you don't want this
+ * information.
+ *
+ * outData:
+ * The pointer to the buffer which will receive the parameter
+ * data, or NULL if you don't want the data returned. If you pass
+ * NULL, you must also pass zero for the inBufferSize parameter.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetEventParameter( inEvent: EventRef; inName: EventParamName; inDesiredType: EventParamType; outActualType: EventParamTypePtr { can be NULL }; inBufferSize: UInt32; outActualSize: UInt32Ptr { can be NULL }; outData: UnivPtr { can be NULL } ): OSStatus; external name '_GetEventParameter';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Getters for 'base-class' event info }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * GetEventClass()
+ *
+ * Discussion:
+ * Returns the class of the given event, such as mouse, keyboard,
+ * etc.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The event in question.
+ *
+ * Result:
+ * The class ID of the event.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetEventClass( inEvent: EventRef ): UInt32; external name '_GetEventClass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetEventKind()
+ *
+ * Discussion:
+ * Returns the kind of the given event (mousedown, etc.). Event
+ * kinds overlap between event classes, e.g. kEventMouseDown and
+ * kEventAppActivated have the same value (1). The combination of
+ * class and kind is what determines an event signature.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The event in question.
+ *
+ * Result:
+ * The kind of the event.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetEventKind( inEvent: EventRef ): UInt32; external name '_GetEventKind';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetEventTime()
+ *
+ * Discussion:
+ * Returns the time the event specified occurred, specified in
+ * EventTime, which is a floating point number representing seconds
+ * since the last system startup.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The event in question.
+ *
+ * Result:
+ * The time the event occurred.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetEventTime( inEvent: EventRef ): EventTime; external name '_GetEventTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Setters for 'base-class' event info }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * SetEventTime()
+ *
+ * Discussion:
+ * This routine allows you to set the time of a given event, if you
+ * so desire. In general, you would never use this routine, except
+ * for those special cases where you reuse an event from time to
+ * time instead of creating a new event each time.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The event in question.
+ *
+ * inTime:
+ * The new time.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetEventTime( inEvent: EventRef; inTime: EventTime ): OSStatus; external name '_SetEventTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Event Queue routines (posting, finding, flushing) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+type
+ EventQueueRef = ^SInt32; { an opaque 32-bit type }
+{
+ * GetCurrentEventQueue()
+ *
+ * Discussion:
+ * Returns the current event queue for the current thread. If the
+ * current thread is a cooperative thread, the main event queue is
+ * returned.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Result:
+ * An event queue reference.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetCurrentEventQueue: EventQueueRef; external name '_GetCurrentEventQueue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMainEventQueue()
+ *
+ * Discussion:
+ * Returns the event queue object for the main application thread.
+ *
+ *
+ * GetMainEventQueue is threadsafe in Mac OS X 10.4 and later. On
+ * earlier versions of Mac OS X, you should call GetMainEventQueue
+ * once before creating any other threads if those other threads
+ * will be calling GetMainEventQueue themselves.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.4
+ *
+ * Result:
+ * An event queue reference.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMainEventQueue: EventQueueRef; external name '_GetMainEventQueue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * EventComparatorProcPtr
+ *
+ * Discussion:
+ * Type of a callback function used by queue searches.
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The event to compare.
+ *
+ * inCompareData:
+ * The data used to compare the event.
+ *
+ * Result:
+ * A boolean value indicating whether the event matches (true) or
+ * not (false).
+ }
+type
+ EventComparatorProcPtr = function( inEvent: EventRef; inCompareData: UnivPtr ): Boolean;
+type
+ EventComparatorUPP = EventComparatorProcPtr;
+{
+ * NewEventComparatorUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewEventComparatorUPP( userRoutine: EventComparatorProcPtr ): EventComparatorUPP; external name '_NewEventComparatorUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeEventComparatorUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeEventComparatorUPP( userUPP: EventComparatorUPP ); external name '_DisposeEventComparatorUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeEventComparatorUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeEventComparatorUPP( inEvent: EventRef; inCompareData: UnivPtr; userUPP: EventComparatorUPP ): Boolean; external name '_InvokeEventComparatorUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * PostEventToQueue()
+ *
+ * Discussion:
+ * Posts an event to the specified queue and increments the event's
+ * retain count. This automatically wakes up the event loop of the
+ * thread the queue belongs to. After posting the event, you may
+ * release the event, since it is retained by the queue.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inQueue:
+ * The event queue to post the event onto.
+ *
+ * inEvent:
+ * The event to post.
+ *
+ * inPriority:
+ * The priority of the event.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function PostEventToQueue( inQueue: EventQueueRef; inEvent: EventRef; inPriority: EventPriority ): OSStatus; external name '_PostEventToQueue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * FlushEventsMatchingListFromQueue()
+ *
+ * Discussion:
+ * Flushes events matching a specified list of classes and kinds
+ * from an event queue.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inQueue:
+ * The event queue to flush events from.
+ *
+ * inNumTypes:
+ * The number of event kinds to flush.
+ *
+ * inList:
+ * The list of event classes and kinds to flush from the queue.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function FlushEventsMatchingListFromQueue( inQueue: EventQueueRef; inNumTypes: UInt32; {const} inList: {variable-size-array} EventTypeSpecPtr ): OSStatus; external name '_FlushEventsMatchingListFromQueue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * FlushSpecificEventsFromQueue()
+ *
+ * Discussion:
+ * Flushes events that match a comparator function.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inQueue:
+ * The event queue to flush events from.
+ *
+ * inComparator:
+ * The comparison function to invoke for each event in the queue.
+ *
+ * inCompareData:
+ * The data you wish to pass to your comparison function.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function FlushSpecificEventsFromQueue( inQueue: EventQueueRef; inComparator: EventComparatorUPP; inCompareData: UnivPtr ): OSStatus; external name '_FlushSpecificEventsFromQueue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * FlushEventQueue()
+ *
+ * Discussion:
+ * Flushes all events from an event queue.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inQueue:
+ * The event queue to flush.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function FlushEventQueue( inQueue: EventQueueRef ): OSStatus; external name '_FlushEventQueue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * FindSpecificEventInQueue()
+ *
+ * Discussion:
+ * Returns the first event that matches a comparator function, or
+ * NULL if no events match.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inQueue:
+ * The event queue to search.
+ *
+ * inComparator:
+ * The comparison function to invoke for each event in the queue.
+ *
+ * inCompareData:
+ * The data you wish to pass to your comparison function.
+ *
+ * Result:
+ * An event reference. The event is still in the queue when
+ * FindSpecificEventInQueue returns; you can remove it from the
+ * queue with RemoveEventFromQueue. The returned event does not need
+ * to be released by the caller.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function FindSpecificEventInQueue( inQueue: EventQueueRef; inComparator: EventComparatorUPP; inCompareData: UnivPtr ): EventRef; external name '_FindSpecificEventInQueue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetNumEventsInQueue()
+ *
+ * Discussion:
+ * Returns the number of events in an event queue.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inQueue:
+ * The event queue to query.
+ *
+ * Result:
+ * The number of items in the queue.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetNumEventsInQueue( inQueue: EventQueueRef ): UInt32; external name '_GetNumEventsInQueue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RemoveEventFromQueue()
+ *
+ * Discussion:
+ * Removes the given event from the specified queue and decrements
+ * the event's retain count. If it was your intention to hold onto
+ * the event, you must retain the event before removing it from the
+ * queue.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inQueue:
+ * The queue to remove the event from.
+ *
+ * inEvent:
+ * The event to remove.
+ *
+ * Result:
+ * An operating system result code. eventNotInQueueErr is returned
+ * if the event is not actually contained in the specified queue.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function RemoveEventFromQueue( inQueue: EventQueueRef; inEvent: EventRef ): OSStatus; external name '_RemoveEventFromQueue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsEventInQueue()
+ *
+ * Discussion:
+ * Returns true if the specified event is posted to a queue.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inQueue:
+ * The queue to check.
+ *
+ * inEvent:
+ * The event in question.
+ *
+ * Result:
+ * A boolean value.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function IsEventInQueue( inQueue: EventQueueRef; inEvent: EventRef ): Boolean; external name '_IsEventInQueue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+const
+{
+ * Currently, the only value you can pass to
+ * AcquireFirstMatchingEventInQueue in its inOptions parameter.
+ }
+ kEventQueueOptionsNone = 0;
+
+{
+ * AcquireFirstMatchingEventInQueue()
+ *
+ * Discussion:
+ * Returns the first event that matches the list of event classes
+ * and kinds passed in. This call does not call the event loop, and
+ * hence no timers will fire nor will any window flushing occur when
+ * this API is called. New events will be pulled from the window
+ * server, however. Overall this API should have better performance
+ * characteristics than the older EventAvail API.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inQueue:
+ * The queue to check.
+ *
+ * inNumTypes:
+ * The number of event kinds to search for. You may pass zero for
+ * this parameter if you also pass NULL for inList.
+ *
+ * inList:
+ * The list of event classes and kinds to search for in the queue.
+ * You may pass NULL for this parameter if you also pass zero for
+ * inNumTypes. This effectively matches ANY event in the queue,
+ * and will merely return the first event in the queue.
+ *
+ * inOptions:
+ * Currently, you must pass kEventQueueOptionsNone for this
+ * parameter.
+ *
+ * Result:
+ * An event reference, or NULL if no events match the list passed.
+ * The event returned has had its refcount incremented (i.e. it has
+ * been retained). As a result, you must release this value
+ * (assuming it's non-NULL). The event is not removed from the queue
+ * by this API; you should call RemoveEventFromQueue if necessary.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function AcquireFirstMatchingEventInQueue( inQueue: EventQueueRef; inNumTypes: UInt32; {const} inList: {variable-size-array} EventTypeSpecPtr; inOptions: OptionBits ): EventRef; external name '_AcquireFirstMatchingEventInQueue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Queue-synchronized event state }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * GetCurrentEvent()
+ *
+ * Summary:
+ * Returns the user input event currently being handled.
+ *
+ * Discussion:
+ * When an event with kEventAttributeUserEvent is dispatched by the
+ * event dispatcher target, it is recorded internally by the Event
+ * Manager. At any time during the handling of that event (or of any
+ * other event which is created and sent during the handling of the
+ * original event), GetCurrentEvent may be used to retrieve the
+ * original EventRef.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * The user input (mouse or keyboard) event currently being handled.
+ * May be NULL if no event is currently being handled, or if the
+ * current event was not a user input event. The returned event is
+ * not retained, and its lifetime should be considered to be no
+ * longer than the current function; if you need to keep the event
+ * alive past that time, you should retain it.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetCurrentEvent: EventRef; external name '_GetCurrentEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * GetCurrentEventButtonState()
+ *
+ * Summary:
+ * Returns the current queue-synchronized mouse button state on the
+ * primary input device.
+ *
+ * Discussion:
+ * At any point in the handling of user input, there are two
+ * different mouse button states: the queue-synchronized state and
+ * the hardware state. The hardware state reflects the actual
+ * current state of the mouse attached to the user's machine. The
+ * queue-synchronized state reflects the state according to the
+ * events that have been processed at that point by the application.
+ * These two states may be different if there are unprocessed events
+ * in the event queue, or if events are being artificially
+ * introduced into the event queue from an outside source.
+ * GetCurrentEventButtonState returns the queue-synchronized button
+ * state. This state is determined by user input events that are
+ * sent through the event dispatcher target; whenever a user input
+ * event (mouse or keyboard) is handled by the Carbon event
+ * dispatcher, its button state is recorded, and that button state
+ * will be returned by GetCurrentEventButtonState.
+ *
+ * The "current event" referenced in the API name is the event most
+ * recently dispatched through the event dispatcher target, which is
+ * not necessarily the event that your event handler is handling.
+ * For example, if a mouse-down event occurs, and you have a handler
+ * for the kEventWindowHandleContentClick event that is generated
+ * from the mouse-down, then the button state will be that which was
+ * attached to the mouse-down. The ContentClick event itself does
+ * also have MouseButton and MouseChord parameters, which are copied
+ * from the the mouse-down event, but GetCurrentEventButtonState
+ * returns the button state from the mouse-down, not from the
+ * ContentClick event, since it was the mouse-down that was most
+ * recently dispatched through the event dispatcher. Usually, this
+ * is the behavior that you want anyways.
+ *
+ * Note that events that are not sent through the event dispatcher
+ * target will not update the current event button state. Also, note
+ * that events arriving from outside the application, such as an
+ * AppleEvent or an Accessibility event, also will not update the
+ * modifiers. If your application modifies its behavior based on
+ * button state, we recommend that you parameterize your core code
+ * with the event buttons, and determine the button state based on
+ * the origin of the behavior request. For a request that originates
+ * directly from user input, you can use GetCurrentEventButtonState,
+ * but for a request that originates from an AppleEvent or
+ * Accessibility event, you would probably use no button state, or
+ * perhaps just left-button-pressed.
+ *
+ * It is generally better to use this API than to use the Button
+ * function or the GetCurrentButtonState function (which return the
+ * hardware state). This gives a more consistent user experience
+ * when the user input queue is being remoted controlled or
+ * manipulated via non-hardware event sources such as speech or
+ * AppleEvents; using GetCurrentEventButtonState is also much faster
+ * than using Button or GetCurrentButtonState.
+ *
+ * Note that GetCurrentEventButtonState only returns a valid button
+ * state if your application is the active application. If your
+ * application is not active, then user input events are not flowing
+ * through the event dispatcher and the queue-synchronized state is
+ * not updated.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * The queue-synchronized state of the mouse buttons. Bit zero
+ * indicates the state of the primary button, bit one the state of
+ * the secondary button, and so on.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetCurrentEventButtonState: UInt32; external name '_GetCurrentEventButtonState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * GetCurrentEventKeyModifiers()
+ *
+ * Summary:
+ * Returns the current queue-synchronized keyboard modifier state.
+ *
+ * Discussion:
+ * At any point in the handling of user input, there are two
+ * different keyboard modifier states: the queue-synchronized state
+ * and the hardware state. The hardware state reflects the actual
+ * current state of the keyboard attached to the user's machine. The
+ * queue-synchronized state reflects the state according to the
+ * events that have been processed at that point by the application.
+ * These two states may be different if there are unprocessed events
+ * in the event queue, or if events are being artificially
+ * introduced into the event queue from an outside source.
+ * GetCurrentEventKeyModifiers returns the queue-synchronized
+ * modifier state. This state is determined by user input events
+ * that are sent through the event dispatcher target; whenever a
+ * user input event (mouse or keyboard) is handled by the Carbon
+ * event dispatcher, its modifiers are recorded, and those modifiers
+ * will be returned by GetCurrentEventKeyModifiers.
+ *
+ * The "current event" referenced in the API name is the event most
+ * recently dispatched through the event dispatcher target, which is
+ * not necessarily the event that your event handler is handling.
+ * For example, if a mouse-down event occurs, and you have a handler
+ * for the kEventWindowHandleContentClick event that is generated
+ * from the mouse-down, then the modifiers will be those that were
+ * attached to the mouse-down. The ContentClick event itself does
+ * also have a KeyModifiers parameter, which is copied from the
+ * mouse-down event, but GetCurrentEventKeyModifiers returns the
+ * modifiers from the mouse-down, not from the ContentClick event,
+ * since it was the mouse-down that was most recently dispatched
+ * through the event dispatcher. Usually, this is the behavior that
+ * you want anyways.
+ *
+ * Note that events that are not sent through the event dispatcher
+ * target will not update the current event key modifiers. Also,
+ * note that events arriving from outside the application, such as
+ * an AppleEvent or an Accessibility event, also will not update the
+ * modifiers. If your application modifies its behavior based on
+ * modifier state, we recommend that you parameterize your core code
+ * with the event modifiers, and determine the modifiers based on
+ * the origin of the behavior request. For a request that originates
+ * directly from user input, you can use
+ * GetCurrentEventKeyModifiers, but for a request that originates
+ * from an AppleEvent or Accessibility event, you would probably use
+ * no modifiers.
+ * BR> It is generally better to use this API than to use the
+ * GetCurrentKeyModifiers API (which returns the hardware state).
+ * This gives a more consistent user experience when the user input
+ * queue is being remoted controlled or manipulated via non-hardware
+ * event sources such as speech or AppleEvents; using
+ * GetCurrentEventKeyModifiers is also much faster than using
+ * EventAvail(0, &eventRecord) or GetCurrentKeyModifiers.
+ *
+ * Note that GetCurrentEventKeyModifiers only returns a valid
+ * modifier state if your application is the active application. If
+ * your application is not active, then user input events are not
+ * flowing through the event dispatcher and the queue-synchronized
+ * state is not updated.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * The queue-synchronized state of the keyboard modifiers. The
+ * format of the return value is the same as the modifiers field of
+ * an EventRecord (but only includes keyboard modifiers and not the
+ * other modifier flags included in an EventRecord).
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetCurrentEventKeyModifiers: UInt32; external name '_GetCurrentEventKeyModifiers';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Multiple-button support }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * GetCurrentButtonState()
+ *
+ * Summary:
+ * Returns the current hardware mouse button state on the primary
+ * input device.
+ *
+ * Discussion:
+ * In most cases, you should not use GetCurrentButtonState, but
+ * should use the GetCurrentEventButtonState function instead.
+ * GetCurrentEventButtonState is much faster than
+ * GetCurrentButtonState because it returns the locally cached
+ * button state; GetCurrentButtonState must get the mouse button
+ * state from the window server, which is slower. Using
+ * GetCurrentButtonState also can prevent your application from
+ * being operated by remote posting of events, since the hardware
+ * input device is not actually changing state in that case. Most
+ * commonly, you might need to use GetCurrentButtonState when your
+ * application is not the active application (as determined by the
+ * Process Manager function GetFrontProcess). In that case, the
+ * cached button state returned by GetCurrentEventButtonState is not
+ * valid because mouse button events are not flowing to your
+ * application, and you must use GetCurrentButtonState to determine
+ * the current hardware state.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * The state of the mouse buttons on the mouse hardware. Bit zero
+ * indicates the state of the primary button, bit one the state of
+ * the secondary button, and so on.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetCurrentButtonState: UInt32; external name '_GetCurrentButtonState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Helpful utilities }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * GetCurrentEventTime()
+ *
+ * Discussion:
+ * Returns the current time since last system startup in seconds.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Result:
+ * EventTime.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetCurrentEventTime: EventTime; external name '_GetCurrentEventTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Timers }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * EventLoopTimerRef
+ *
+ * Discussion:
+ * An EventLoopTimerRef represents what we term a 'timer'. A timer
+ * is a function that is called either once or at regular intervals.
+ * It executes at task level and should not be confused with Time
+ * Manager Tasks or any other interrupt-level callback. This means
+ * you can call Toolbox routines, allocate memory and draw. When a
+ * timer 'fires', it calls a callback that you specify when the
+ * timer is installed. Timers in general have two uses - as a
+ * timeout mechanism and as a periodic task. An everyday example of
+ * using a timer for a timeout might be a light that goes out if no
+ * motion is detected in a room for 5 minutes. For this, you might
+ * install a timer which will fire in 5 minutes. If motion is
+ * detected, you would reset the timer fire time and let the clock
+ * start over. If no motion is detected for the full 5 minutes, the
+ * timer will fire and you could power off the light. A periodic
+ * timer is one that fires at regular intervals (say every second or
+ * so). You might use such a timer to blink the insertion point in
+ * your editor, etc. One advantage of timers is that you can install
+ * the timer right from the code that wants the time. For example,
+ * the standard Toolbox Edit Text control can install a timer to
+ * blink the cursor when it's active, meaning that IdleControls is a
+ * no-op for that control and doesn't need to be called. When the
+ * control is inactive, it removes its timer and doesn't waste CPU
+ * time in that state. NOTE: Currently, if you do decide to draw
+ * when your timer is called, be sure to save and restore the
+ * current port so that calling your timer doesn't inadvertently
+ * change the port out from under someone.
+ }
+type
+ EventLoopTimerRef = ^SInt32; { an opaque 32-bit type }
+
+{
+ * EventLoopTimerProcPtr
+ *
+ * Discussion:
+ * Called when a timer fires.
+ *
+ * Parameters:
+ *
+ * inTimer:
+ * The timer that fired.
+ *
+ * inUserData:
+ * The data passed into InstallEventLoopTimer.
+ }
+type
+ EventLoopTimerProcPtr = procedure( inTimer: EventLoopTimerRef; inUserData: UnivPtr );
+
+{
+ * Discussion:
+ * Event Loop Idle Timer Messages
+ }
+const
+{
+ * The user has gone idle (not touched an input device) for the
+ * duration specified in your idle timer. This is the first message
+ * you will receive. Start your engines!
+ }
+ kEventLoopIdleTimerStarted = 1;
+
+ {
+ * If you specified an interval on your idle timer, your idle timer
+ * proc will be called with this message, letting you know it is
+ * merely firing at the interval specified. You will receive this
+ * message for the first time at the specified interval after you
+ * receive kEventLoopIdleTimerStarted. If you did not specify an
+ * interval, this message is not sent.
+ }
+ kEventLoopIdleTimerIdling = 2;
+
+ {
+ * The user is back! Stop everything! This is your cue to stop any
+ * processing if you need to.
+ }
+ kEventLoopIdleTimerStopped = 3;
+
+type
+ EventLoopIdleTimerMessage = UInt16;
+
+{
+ * EventLoopIdleTimerProcPtr
+ *
+ * Discussion:
+ * Called when an idle timer fires.
+ *
+ * Parameters:
+ *
+ * inTimer:
+ * The timer that fired.
+ *
+ * inState:
+ * The current state of the timer.
+ *
+ * inUserData:
+ * The data passed into InstallEventLoopTimer.
+ }
+type
+ EventLoopIdleTimerProcPtr = procedure( inTimer: EventLoopTimerRef; inState: EventLoopIdleTimerMessage; inUserData: UnivPtr );
+type
+ EventLoopTimerUPP = EventLoopTimerProcPtr;
+type
+ EventLoopIdleTimerUPP = EventLoopIdleTimerProcPtr;
+{
+ * NewEventLoopTimerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewEventLoopTimerUPP( userRoutine: EventLoopTimerProcPtr ): EventLoopTimerUPP; external name '_NewEventLoopTimerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewEventLoopIdleTimerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewEventLoopIdleTimerUPP( userRoutine: EventLoopIdleTimerProcPtr ): EventLoopIdleTimerUPP; external name '_NewEventLoopIdleTimerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{
+ * DisposeEventLoopTimerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeEventLoopTimerUPP( userUPP: EventLoopTimerUPP ); external name '_DisposeEventLoopTimerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeEventLoopIdleTimerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeEventLoopIdleTimerUPP( userUPP: EventLoopIdleTimerUPP ); external name '_DisposeEventLoopIdleTimerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{
+ * InvokeEventLoopTimerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeEventLoopTimerUPP( inTimer: EventLoopTimerRef; inUserData: UnivPtr; userUPP: EventLoopTimerUPP ); external name '_InvokeEventLoopTimerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeEventLoopIdleTimerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeEventLoopIdleTimerUPP( inTimer: EventLoopTimerRef; inState: EventLoopIdleTimerMessage; inUserData: UnivPtr; userUPP: EventLoopIdleTimerUPP ); external name '_InvokeEventLoopIdleTimerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{
+ * InstallEventLoopTimer()
+ *
+ * Discussion:
+ * Installs a timer onto the event loop specified. The timer can
+ * either fire once or repeatedly at a specified interval depending
+ * on the parameters passed to this function.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inEventLoop:
+ * The event loop to add the timer.
+ *
+ * inFireDelay:
+ * The delay before first firing this timer (can be 0, to request
+ * that the timer be fired as soon as control returns to your
+ * event loop). In Mac OS X and CarbonLib 1.5 and later, you may
+ * pass kEventDurationForever to stop the timer from firing at all
+ * until SetEventLoopTimerNextFireTime is used to start it; in
+ * earlier CarbonLibs, to achieve the same effect, just pass zero
+ * and then immediately call SetEventLoopTimerNextFireTime( timer,
+ * kEventDurationForever ) before returning control to your event
+ * loop.
+ *
+ * inInterval:
+ * The timer interval (pass 0 for a one-shot timer, which executes
+ * once but does not repeat). In Mac OS X and CarbonLib 1.5 and
+ * later, you may also pass kEventDurationForever to create a
+ * one-shot timer.
+ *
+ * inTimerProc:
+ * The routine to call when the timer fires.
+ *
+ * inTimerData:
+ * Data to pass to the timer proc when called.
+ *
+ * outTimer:
+ * A reference to the newly installed timer.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InstallEventLoopTimer( inEventLoop: EventLoopRef; inFireDelay: EventTimerInterval; inInterval: EventTimerInterval; inTimerProc: EventLoopTimerUPP; inTimerData: UnivPtr; var outTimer: EventLoopTimerRef ): OSStatus; external name '_InstallEventLoopTimer';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * InstallEventLoopIdleTimer()
+ *
+ * Discussion:
+ * Installs a timer onto the event loop specified. Idle timers are
+ * only called when there is no user activity occuring in the
+ * application. This means that the user is not actively
+ * clicking/typing, and is also not in the middle of tracking a
+ * control, menu, or window. TrackMouseLocation actually disables
+ * all idle timers automatically for you.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inEventLoop:
+ * The event loop to add the timer.
+ *
+ * inDelay:
+ * The delay before firing this timer after a user input event has
+ * come in. For example, if you want to start your timer 2 seconds
+ * after the user stops typing, etc. you would pass 2.0 into this
+ * parameter. Each time the user types a key (or whatever), this
+ * timer is reset. If we are considered to be idle when an idle
+ * timer is installed, the first time it fires will be inDelay
+ * seconds from the time it is installed. So if you installed it
+ * in the middle of control tracking, say, it wouldn't fire until
+ * the user stopped tracking. But if you installed it at app
+ * startup and the user hasn't typed/clicked, it would fire in
+ * inDelay seconds. On Mac OS X 10.3 and earlier, the delay must
+ * be greater than zero. On Mac OS X 10.4 and later, the delay
+ * must be greather than or equal to zero. You cannot use
+ * kEventDurationForever for the delay.
+ *
+ * inInterval:
+ * The timer interval (pass 0 for a one-shot timer, which executes
+ * once but does not repeat). You may also pass
+ * kEventDurationForever to create a one-shot timer.
+ *
+ * inTimerProc:
+ * The routine to call when the timer fires.
+ *
+ * inTimerData:
+ * Data to pass to the timer proc when called.
+ *
+ * outTimer:
+ * A reference to the newly installed timer.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function InstallEventLoopIdleTimer( inEventLoop: EventLoopRef; inDelay: EventTimerInterval; inInterval: EventTimerInterval; inTimerProc: EventLoopIdleTimerUPP; inTimerData: UnivPtr; var outTimer: EventLoopTimerRef ): OSStatus; external name '_InstallEventLoopIdleTimer';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * RemoveEventLoopTimer()
+ *
+ * Discussion:
+ * Removes a timer that was previously installed by a call to
+ * InstallEventLoopTimer. You call this function when you are done
+ * using a timer.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inTimer:
+ * The timer to remove.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function RemoveEventLoopTimer( inTimer: EventLoopTimerRef ): OSStatus; external name '_RemoveEventLoopTimer';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetEventLoopTimerNextFireTime()
+ *
+ * Discussion:
+ * This routine is used to 'reset' a timer. It controls the next
+ * time the timer fires. This will override any interval you might
+ * have set. For example, if you have a timer that fires every
+ * second, and you call this function setting the next time to five
+ * seconds from now, the timer will sleep for five seconds, then
+ * fire. It will then resume its one-second interval after that. It
+ * is as if you removed the timer and reinstalled it with a new
+ * first-fire delay.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inTimer:
+ * The timer to adjust
+ *
+ * inNextFire:
+ * The interval from the current time to wait until firing the
+ * timer again. You may pass kEventDurationForever to stop the
+ * timer from firing at all.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetEventLoopTimerNextFireTime( inTimer: EventLoopTimerRef; inNextFire: EventTimerInterval ): OSStatus; external name '_SetEventLoopTimerNextFireTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{======================================================================================}
+{ EVENT HANDLERS }
+{======================================================================================}
+
+type
+ EventHandlerRef = ^SInt32; { an opaque 32-bit type }
+ EventHandlerRefPtr = ^EventHandlerRef;
+ EventHandlerCallRef = ^SInt32; { an opaque 32-bit type }
+ EventHandlerCallRefPtr = ^EventHandlerCallRef;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ EventHandler specification }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ C++ Methods as Event Handlers }
+{ To use a C++ method as an Event Handler callback, it must be declared in its class }
+{ as a static method. Otherwise, the implicit "this" parameter will make the function }
+{ not match the EventHandlerProcPtr prototype. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * EventHandlerProcPtr
+ *
+ * Discussion:
+ * Callback for receiving events sent to a target this callback is
+ * installed on.
+ *
+ * Parameters:
+ *
+ * inHandlerCallRef:
+ * A reference to the current handler call chain. This is sent to
+ * your handler so that you can call CallNextEventHandler if you
+ * need to.
+ *
+ * inEvent:
+ * The Event.
+ *
+ * inUserData:
+ * The app-specified data you passed in a call to
+ * InstallEventHandler.
+ *
+ * Result:
+ * An operating system result code. Returning noErr indicates you
+ * handled the event. Returning eventNotHandledErr indicates you did
+ * not handle the event and perhaps the toolbox should take other
+ * action.
+ }
+type
+ EventHandlerProcPtr = function( inHandlerCallRef: EventHandlerCallRef; inEvent: EventRef; inUserData: UnivPtr ): OSStatus;
+type
+ EventHandlerUPP = EventHandlerProcPtr;
+{
+ * NewEventHandlerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewEventHandlerUPP( userRoutine: EventHandlerProcPtr ): EventHandlerUPP; external name '_NewEventHandlerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeEventHandlerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeEventHandlerUPP( userUPP: EventHandlerUPP ); external name '_DisposeEventHandlerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeEventHandlerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeEventHandlerUPP( inHandlerCallRef: EventHandlerCallRef; inEvent: EventRef; inUserData: UnivPtr; userUPP: EventHandlerUPP ): OSStatus; external name '_InvokeEventHandlerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+type
+ EventTargetRef = ^SInt32; { an opaque 32-bit type }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Installing Event Handlers }
+{ Use these routines to install event handlers for a specific toolbox object. You may }
+{ pass zero for inNumTypes and NULL for inList if you need to be in a situation where }
+{ you know you will be receiving events, but not exactly which ones at the time you }
+{ are installing the handler. Later, your application can call the Add/Remove routines }
+{ listed below this section. }
+{ You can only install a specific handler once. The combination of inHandler and }
+{ inUserData is considered the 'signature' of a handler. Any attempt to install a new }
+{ handler with the same proc and user data as an already-installed handler will result }
+{ in eventHandlerAlreadyInstalledErr. Installing the same proc and user data on a }
+{ different object is legal. }
+{ Upon successful completion of this routine, you are returned an EventHandlerRef, }
+{ which you can use in various other calls. It is not possible to retrieve any }
+{ information from an EventHandlerRef about which object the handler is attached to; }
+{ to keep track of the target object of an event handler, use the inUserData paramter }
+{ to InstallEventHandler to specify the object. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * InstallEventHandler()
+ *
+ * Discussion:
+ * Installs an event handler on a specified target. Your handler
+ * proc will be called with the events you registered with when an
+ * event of the corresponding type and class are send to the target
+ * you are installing your handler on.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inTarget:
+ * The target to register your handler with.
+ *
+ * inHandler:
+ * A pointer to your handler function.
+ *
+ * inNumTypes:
+ * The number of events you are registering for.
+ *
+ * inList:
+ * A pointer to an array of EventTypeSpec entries representing the
+ * events you are interested in.
+ *
+ * inUserData:
+ * The value passed in this parameter is passed on to your event
+ * handler proc when it is called.
+ *
+ * outRef:
+ * Receives an EventHandlerRef, which you can use later to remove
+ * the handler. You can pass null if you don't want the reference
+ * - when the target is disposed, the handler will be disposed as
+ * well.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InstallEventHandler( inTarget: EventTargetRef; inHandler: EventHandlerUPP; inNumTypes: UInt32; {const} inList: {variable-size-array} EventTypeSpecPtr; inUserData: UnivPtr; outRef: EventHandlerRefPtr { can be NULL } ): OSStatus; external name '_InstallEventHandler';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * InstallStandardEventHandler()
+ *
+ * Summary:
+ * Installs the standard event handler (if any) for an event target.
+ *
+ * Discussion:
+ * All event targets have default handlers installed on them by the
+ * toolbox to perform certain basic operations common to that type
+ * of target. Some targets also have standard handlers which are not
+ * installed by default, but may be requested. A standard handler
+ * typically provides higher-level behavior for its target.
+ * Currently, only window event targets have a standard handler; the
+ * window standard event hander may also be installed by setting the
+ * kWindowStandardHandlerAttribute flag. Calling
+ * InstallStandardEventHandler on any other type of target
+ * (application, control, menu, etc.) has no effect.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inTarget:
+ * The target whose standard handler should be installed.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InstallStandardEventHandler( inTarget: EventTargetRef ): OSStatus; external name '_InstallStandardEventHandler';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RemoveEventHandler()
+ *
+ * Summary:
+ * Removes an event handler from the target it was bound to.
+ *
+ * Discussion:
+ * As of Mac OS X 10.1, it is safe to remove an event handler from
+ * inside the handler function. This is not safe to do in CarbonLib
+ * or earlier releases of Mac OS X.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inHandlerRef:
+ * The handler ref to remove (returned in a call to
+ * InstallEventHandler). After you call this function, the handler
+ * ref is considered to be invalid and can no longer be used.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function RemoveEventHandler( inHandlerRef: EventHandlerRef ): OSStatus; external name '_RemoveEventHandler';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Adjusting set of event types after a handler is created }
+{ After installing a handler with the routine above, you can adjust the event type }
+{ list telling the toolbox what events to send to that handler by calling the two }
+{ routines below. If you add an event type twice for the same handler, your handler }
+{ will only be called once, but it will take two RemoveEventType calls to stop your }
+{ handler from being called with that event type. In other words, the install count }
+{ for each event type is maintained by the toolbox. This might allow you, for example }
+{ to have subclasses of a window object register for types without caring if the base }
+{ class has already registered for that type. When the subclass removes its types, it }
+{ can successfully do so without affecting the base class's reception of its event }
+{ types, yielding eternal bliss. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * AddEventTypesToHandler()
+ *
+ * Discussion:
+ * Adds additional events to an event handler that has already been
+ * installed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inHandlerRef:
+ * The event handler to add the additional events to.
+ *
+ * inNumTypes:
+ * The number of events to add.
+ *
+ * inList:
+ * A pointer to an array of EventTypeSpec entries.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function AddEventTypesToHandler( inHandlerRef: EventHandlerRef; inNumTypes: UInt32; {const} inList: {variable-size-array} EventTypeSpecPtr ): OSStatus; external name '_AddEventTypesToHandler';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RemoveEventTypesFromHandler()
+ *
+ * Discussion:
+ * Removes events from an event handler that has already been
+ * installed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inHandlerRef:
+ * The event handler to remove the events from.
+ *
+ * inNumTypes:
+ * The number of events to remove.
+ *
+ * inList:
+ * A pointer to an array of EventTypeSpec entries.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function RemoveEventTypesFromHandler( inHandlerRef: EventHandlerRef; inNumTypes: UInt32; {const} inList: {variable-size-array} EventTypeSpecPtr ): OSStatus; external name '_RemoveEventTypesFromHandler';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Explicit Propagation }
+{ CallNextEventHandler can be used to call thru to all handlers below the current }
+{ handler being called. You pass the EventHandlerCallRef passed to your EventHandler }
+{ into this call so that we know how to properly forward the event. The result of }
+{ this function should normally be the result of your own handler that you called }
+{ this API from. The typical use of this routine would be to allow the toolbox to do }
+{ its standard processing and then follow up with some type of embellishment. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * CallNextEventHandler()
+ *
+ * Discussion:
+ * Calls thru to the event handlers below you in the event handler
+ * stack of the target to which your handler is bound. You might use
+ * this to call thru to the default toolbox handling in order to
+ * post-process the event. You can only call this routine from
+ * within an event handler.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inCallRef:
+ * The event handler call ref passed into your event handler.
+ *
+ * inEvent:
+ * The event to pass thru.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CallNextEventHandler( inCallRef: EventHandlerCallRef; inEvent: EventRef ): OSStatus; external name '_CallNextEventHandler';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Sending Events }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * Summary:
+ * Options for the SendEventToEventTargetWithOptions API.
+ }
+const
+{
+ * The event should be sent to the target given only, and should not
+ * propagate to any other target. CallNextEventHandler, when passed
+ * an event sent with this option, will only call other event
+ * handlers installed on the current event target; it will not
+ * propagate the event to other event targets.
+ }
+ kEventTargetDontPropagate = 1 shl 0;
+
+ {
+ * The event is a notification-style event, and should be received by
+ * all handlers. The result is usually meaningless when sent in this
+ * manner, though we do maintain the strongest result code while the
+ * event falls through each handler. This means that if the first
+ * handler to receive the event returned noErr, and the next returned
+ * eventNotHandledErr, the result returned would actually be noErr.
+ * No handler can stop this event from propagating; i.e., the result
+ * code does not alter event flow.
+ }
+ kEventTargetSendToAllHandlers = 1 shl 1;
+
+{
+ * SendEventToEventTarget()
+ *
+ * Discussion:
+ * Sends an event to the specified event target.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The event to send.
+ *
+ * inTarget:
+ * The target to send it to.
+ *
+ * Result:
+ * An operating system result code. The result is determined by both
+ * the SendEventToEventTarget API and also the event handlers that
+ * receive the event. SendEventToEventTarget will return paramErr if
+ * the event or the target are invalid, or eventNotHandledErr if the
+ * event is not wanted by any handler. If the event is received by a
+ * handler, however, then the result code returned by the API is
+ * determined by the handler; a handler may return any error code,
+ * and your code should not make any assumptions about exactly which
+ * errors will be returned by SendEventToEventTarget.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SendEventToEventTarget( inEvent: EventRef; inTarget: EventTargetRef ): OSStatus; external name '_SendEventToEventTarget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SendEventToEventTargetWithOptions()
+ *
+ * Discussion:
+ * Sends an event to the specified event target, optionally
+ * controlling how the event propagates. See the discussion of the
+ * event send options above for more detail.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The event to send.
+ *
+ * inTarget:
+ * The target to send it to.
+ *
+ * inOptions:
+ * The options to modify the send behavior. Passing zero for this
+ * makes it behave just like SendEventToEventTarget.
+ *
+ * Result:
+ * An operating system result code. The result is determined by both
+ * the SendEventToEventTargetWithOptions API and also the event
+ * handlers that receive the event.
+ * SendEventToEventTargetWithOptions will return paramErr if the
+ * event or the target are invalid, or eventNotHandledErr if the
+ * event is not wanted by any handler. If the event is received by a
+ * handler, however, then the result code returned by the API is
+ * determined by the handler; a handler may return any error code,
+ * and your code should not make any assumptions about exactly which
+ * errors will be returned by SendEventToEventTargetWithOptions.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function SendEventToEventTargetWithOptions( inEvent: EventRef; inTarget: EventTargetRef; inOptions: OptionBits ): OSStatus; external name '_SendEventToEventTargetWithOptions';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Secure Event Input }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * EnableSecureEventInput()
+ *
+ * Summary:
+ * Enables secure event input mode.
+ *
+ * Discussion:
+ * When secure event input is enabled, keyboard input will only go
+ * to the application with keyboard focus, and will not be echoed to
+ * other applications that might be using the event monitor target
+ * to watch keyboard input. The EditText and EditUnicodeText
+ * controls automatically enter secure input mode when a password
+ * control has the focus; if your application implements its own
+ * password entry, you should enable secure event input while the
+ * user is entering text.
+ *
+ * This API maintains a count of the number of times that it has
+ * been called. Secure event input is not disabled until
+ * DisableSecureEventInput has been called the same number of
+ * times.
+ *
+ * Be sure to disable secure event input if your application becomes
+ * inactive. If your application crashes, secure event input will
+ * automatically be disabled if no other application has enabled it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function EnableSecureEventInput: OSStatus; external name '_EnableSecureEventInput';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * DisableSecureEventInput()
+ *
+ * Summary:
+ * Disables secure event input mode.
+ *
+ * Discussion:
+ * When secure event input is enabled, keyboard input will only go
+ * to the application with keyboard focus, and will not be echoed to
+ * other applications that might be using the event monitor target
+ * to watch keyboard input. The EditText and EditUnicodeText
+ * controls automatically enter secure input mode when a password
+ * control has the focus; if your application implements its own
+ * password entry, you should enable secure event input while the
+ * user is entering text.
+ *
+ * The EnableSecureEventInput API maintains a count of the number of
+ * times that it has been called. Secure event input is not disabled
+ * until this API has been called the same number of times.
+ *
+ * Be sure to disable secure event input if your application becomes
+ * inactive. If your application crashes, secure event input will
+ * automatically be disabled if no other application has enabled it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function DisableSecureEventInput: OSStatus; external name '_DisableSecureEventInput';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * IsSecureEventInputEnabled()
+ *
+ * Summary:
+ * Indicates whether secure event input is currently enabled.
+ *
+ * Discussion:
+ * This API returns whether secure event input is enabled by any
+ * process, not just the current process. Secure event input may be
+ * disabled in the current process but enabled in some other
+ * process; in that case, this API will return true.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function IsSecureEventInputEnabled: Boolean; external name '_IsSecureEventInputEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+
+
+{unit Collections}
+{
+ File: Collections.p
+
+ Contains: Collection Manager Interfaces
+
+ Version: Technology: Carbon
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1989-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{***********}
+{ Constants }
+{***********}
+{ Convenience constants for functions which optionally return values }
+
+const
+ kCollectionDontWantTag = 0;
+ kCollectionDontWantId = 0;
+ kCollectionDontWantSize = 0;
+ kCollectionDontWantAttributes = 0;
+ kCollectionDontWantIndex = 0;
+ kCollectionDontWantData = 0;
+
+
+ { attributes bits }
+ kCollectionNoAttributes = $00000000; { no attributes bits set }
+ kCollectionAllAttributes = $FFFFFFFF; { all attributes bits set }
+ kCollectionUserAttributes = $0000FFFF; { user attributes bits }
+ kCollectionDefaultAttributes = $40000000; { default attributes - unlocked, persistent }
+
+
+ {
+ Attribute bits 0 through 15 (entire low word) are reserved for use by the application.
+ Attribute bits 16 through 31 (entire high word) are reserved for use by the Collection Manager.
+ Only bits 31 (kCollectionLockBit) and 30 (kCollectionPersistenceBit) currently have meaning.
+ }
+ kCollectionUser0Bit = 0;
+ kCollectionUser1Bit = 1;
+ kCollectionUser2Bit = 2;
+ kCollectionUser3Bit = 3;
+ kCollectionUser4Bit = 4;
+ kCollectionUser5Bit = 5;
+ kCollectionUser6Bit = 6;
+ kCollectionUser7Bit = 7;
+ kCollectionUser8Bit = 8;
+ kCollectionUser9Bit = 9;
+ kCollectionUser10Bit = 10;
+ kCollectionUser11Bit = 11;
+ kCollectionUser12Bit = 12;
+ kCollectionUser13Bit = 13;
+ kCollectionUser14Bit = 14;
+ kCollectionUser15Bit = 15;
+ kCollectionReserved0Bit = 16;
+ kCollectionReserved1Bit = 17;
+ kCollectionReserved2Bit = 18;
+ kCollectionReserved3Bit = 19;
+ kCollectionReserved4Bit = 20;
+ kCollectionReserved5Bit = 21;
+ kCollectionReserved6Bit = 22;
+ kCollectionReserved7Bit = 23;
+ kCollectionReserved8Bit = 24;
+ kCollectionReserved9Bit = 25;
+ kCollectionReserved10Bit = 26;
+ kCollectionReserved11Bit = 27;
+ kCollectionReserved12Bit = 28;
+ kCollectionReserved13Bit = 29;
+ kCollectionPersistenceBit = 30;
+ kCollectionLockBit = 31;
+
+
+ { attribute masks }
+ kCollectionUser0Mask = $00000001;
+ kCollectionUser1Mask = $00000002;
+ kCollectionUser2Mask = $00000004;
+ kCollectionUser3Mask = $00000008;
+ kCollectionUser4Mask = $00000010;
+ kCollectionUser5Mask = $00000020;
+ kCollectionUser6Mask = $00000040;
+ kCollectionUser7Mask = $00000080;
+ kCollectionUser8Mask = $00000100;
+ kCollectionUser9Mask = $00000200;
+ kCollectionUser10Mask = $00000400;
+ kCollectionUser11Mask = $00000800;
+ kCollectionUser12Mask = $00001000;
+ kCollectionUser13Mask = $00002000;
+ kCollectionUser14Mask = $00004000;
+ kCollectionUser15Mask = $00008000;
+ kCollectionReserved0Mask = $00010000;
+ kCollectionReserved1Mask = $00020000;
+ kCollectionReserved2Mask = $00040000;
+ kCollectionReserved3Mask = $00080000;
+ kCollectionReserved4Mask = $00100000;
+ kCollectionReserved5Mask = $00200000;
+ kCollectionReserved6Mask = $00400000;
+ kCollectionReserved7Mask = $00800000;
+ kCollectionReserved8Mask = $01000000;
+ kCollectionReserved9Mask = $02000000;
+ kCollectionReserved10Mask = $04000000;
+ kCollectionReserved11Mask = $08000000;
+ kCollectionReserved12Mask = $10000000;
+ kCollectionReserved13Mask = $20000000;
+ kCollectionPersistenceMask = $40000000;
+ kCollectionLockMask = $80000000;
+
+
+ { ********* }
+ { Types }
+ { ********* }
+ { abstract data type for a collection }
+
+type
+ Collection = ^SInt32; { an opaque 32-bit type }
+ CollectionPtr = ^Collection; { when a var xx:Collection parameter can be nil, it is changed to xx: CollectionPtr }
+ { collection member 4 byte tag }
+ CollectionTag = FourCharCode;
+{$ifc TYPED_FUNCTION_POINTERS}
+ CollectionFlattenProcPtr = function(size: SInt32; data: UnivPtr; refCon: UnivPtr): OSErr;
+{$elsec}
+ CollectionFlattenProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ CollectionExceptionProcPtr = function(c: Collection; status: OSErr): OSErr;
+{$elsec}
+ CollectionExceptionProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ CollectionFlattenUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CollectionFlattenUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ CollectionExceptionUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CollectionExceptionUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppCollectionFlattenProcInfo = $00000FE0;
+ uppCollectionExceptionProcInfo = $000002E0;
+ {
+ * NewCollectionFlattenUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewCollectionFlattenUPP(userRoutine: CollectionFlattenProcPtr): CollectionFlattenUPP; external name '_NewCollectionFlattenUPP'; { old name was NewCollectionFlattenProc }
+{
+ * NewCollectionExceptionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewCollectionExceptionUPP(userRoutine: CollectionExceptionProcPtr): CollectionExceptionUPP; external name '_NewCollectionExceptionUPP'; { old name was NewCollectionExceptionProc }
+{
+ * DisposeCollectionFlattenUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeCollectionFlattenUPP(userUPP: CollectionFlattenUPP); external name '_DisposeCollectionFlattenUPP';
+{
+ * DisposeCollectionExceptionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeCollectionExceptionUPP(userUPP: CollectionExceptionUPP); external name '_DisposeCollectionExceptionUPP';
+{
+ * InvokeCollectionFlattenUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeCollectionFlattenUPP(size: SInt32; data: UnivPtr; refCon: UnivPtr; userRoutine: CollectionFlattenUPP): OSErr; external name '_InvokeCollectionFlattenUPP'; { old name was CallCollectionFlattenProc }
+{
+ * InvokeCollectionExceptionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeCollectionExceptionUPP(c: Collection; status: OSErr; userRoutine: CollectionExceptionUPP): OSErr; external name '_InvokeCollectionExceptionUPP'; { old name was CallCollectionExceptionProc }
+{*******************************************}
+{************ Public interfaces ************}
+{*******************************************}
+{
+ * NewCollection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewCollection: Collection; external name '_NewCollection';
+{
+ * DisposeCollection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeCollection(c: Collection); external name '_DisposeCollection';
+{
+ * CloneCollection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CloneCollection(c: Collection): Collection; external name '_CloneCollection';
+{
+ * CountCollectionOwners()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CountCollectionOwners(c: Collection): SInt32; external name '_CountCollectionOwners';
+{
+ * RetainCollection()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RetainCollection(c: Collection): OSStatus; external name '_RetainCollection';
+
+
+{
+ * ReleaseCollection()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ReleaseCollection(c: Collection): OSStatus; external name '_ReleaseCollection';
+
+
+{
+ * GetCollectionRetainCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetCollectionRetainCount(c: Collection): ItemCount; external name '_GetCollectionRetainCount';
+
+
+{
+ * CopyCollection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CopyCollection(srcCollection: Collection; dstCollection: Collection): Collection; external name '_CopyCollection';
+{
+ * GetCollectionDefaultAttributes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetCollectionDefaultAttributes(c: Collection): SInt32; external name '_GetCollectionDefaultAttributes';
+{
+ * SetCollectionDefaultAttributes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetCollectionDefaultAttributes(c: Collection; whichAttributes: SInt32; newAttributes: SInt32); external name '_SetCollectionDefaultAttributes';
+{
+ * CountCollectionItems()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CountCollectionItems(c: Collection): SInt32; external name '_CountCollectionItems';
+{
+ * AddCollectionItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AddCollectionItem(c: Collection; tag: CollectionTag; id: SInt32; itemSize: SInt32; itemData: UnivPtr): OSErr; external name '_AddCollectionItem';
+{
+ * GetCollectionItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetCollectionItem(c: Collection; tag: CollectionTag; id: SInt32; var itemSize: SInt32; itemData: UnivPtr): OSErr; external name '_GetCollectionItem';
+{
+ * RemoveCollectionItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RemoveCollectionItem(c: Collection; tag: CollectionTag; id: SInt32): OSErr; external name '_RemoveCollectionItem';
+{
+ * SetCollectionItemInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetCollectionItemInfo(c: Collection; tag: CollectionTag; id: SInt32; whichAttributes: SInt32; newAttributes: SInt32): OSErr; external name '_SetCollectionItemInfo';
+{
+ * GetCollectionItemInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetCollectionItemInfo(c: Collection; tag: CollectionTag; id: SInt32; var index: SInt32; var itemSize: SInt32; var attributes: SInt32): OSErr; external name '_GetCollectionItemInfo';
+{
+ * ReplaceIndexedCollectionItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ReplaceIndexedCollectionItem(c: Collection; index: SInt32; itemSize: SInt32; itemData: UnivPtr): OSErr; external name '_ReplaceIndexedCollectionItem';
+{
+ * GetIndexedCollectionItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIndexedCollectionItem(c: Collection; index: SInt32; var itemSize: SInt32; itemData: UnivPtr): OSErr; external name '_GetIndexedCollectionItem';
+{
+ * RemoveIndexedCollectionItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RemoveIndexedCollectionItem(c: Collection; index: SInt32): OSErr; external name '_RemoveIndexedCollectionItem';
+{
+ * SetIndexedCollectionItemInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetIndexedCollectionItemInfo(c: Collection; index: SInt32; whichAttributes: SInt32; newAttributes: SInt32): OSErr; external name '_SetIndexedCollectionItemInfo';
+{
+ * GetIndexedCollectionItemInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIndexedCollectionItemInfo(c: Collection; index: SInt32; var tag: CollectionTag; var id: SInt32; var itemSize: SInt32; var attributes: SInt32): OSErr; external name '_GetIndexedCollectionItemInfo';
+{
+ * CollectionTagExists()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CollectionTagExists(c: Collection; tag: CollectionTag): boolean; external name '_CollectionTagExists';
+{
+ * CountCollectionTags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CountCollectionTags(c: Collection): SInt32; external name '_CountCollectionTags';
+{
+ * GetIndexedCollectionTag()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIndexedCollectionTag(c: Collection; tagIndex: SInt32; var tag: CollectionTag): OSErr; external name '_GetIndexedCollectionTag';
+{
+ * CountTaggedCollectionItems()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CountTaggedCollectionItems(c: Collection; tag: CollectionTag): SInt32; external name '_CountTaggedCollectionItems';
+{
+ * GetTaggedCollectionItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetTaggedCollectionItem(c: Collection; tag: CollectionTag; whichItem: SInt32; var itemSize: SInt32; itemData: UnivPtr): OSErr; external name '_GetTaggedCollectionItem';
+{
+ * GetTaggedCollectionItemInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetTaggedCollectionItemInfo(c: Collection; tag: CollectionTag; whichItem: SInt32; var id: SInt32; var index: SInt32; var itemSize: SInt32; var attributes: SInt32): OSErr; external name '_GetTaggedCollectionItemInfo';
+{
+ * PurgeCollection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PurgeCollection(c: Collection; whichAttributes: SInt32; matchingAttributes: SInt32); external name '_PurgeCollection';
+{
+ * PurgeCollectionTag()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PurgeCollectionTag(c: Collection; tag: CollectionTag); external name '_PurgeCollectionTag';
+{
+ * EmptyCollection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure EmptyCollection(c: Collection); external name '_EmptyCollection';
+{
+ * FlattenCollection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FlattenCollection(c: Collection; flattenProc: CollectionFlattenUPP; refCon: UnivPtr): OSErr; external name '_FlattenCollection';
+{
+ * FlattenPartialCollection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FlattenPartialCollection(c: Collection; flattenProc: CollectionFlattenUPP; refCon: UnivPtr; whichAttributes: SInt32; matchingAttributes: SInt32): OSErr; external name '_FlattenPartialCollection';
+{
+ * UnflattenCollection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UnflattenCollection(c: Collection; flattenProc: CollectionFlattenUPP; refCon: UnivPtr): OSErr; external name '_UnflattenCollection';
+{
+ * GetCollectionExceptionProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetCollectionExceptionProc(c: Collection): CollectionExceptionUPP; external name '_GetCollectionExceptionProc';
+{
+ * SetCollectionExceptionProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetCollectionExceptionProc(c: Collection; exceptionProc: CollectionExceptionUPP); external name '_SetCollectionExceptionProc';
+{
+ * GetNewCollection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetNewCollection(collectionID: SInt16): Collection; external name '_GetNewCollection';
+{********************************************************************}
+{************* Utility routines for handle-based access *************}
+{********************************************************************}
+{
+ * AddCollectionItemHdl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AddCollectionItemHdl(aCollection: Collection; tag: CollectionTag; id: SInt32; itemData: Handle): OSErr; external name '_AddCollectionItemHdl';
+{
+ * GetCollectionItemHdl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetCollectionItemHdl(aCollection: Collection; tag: CollectionTag; id: SInt32; itemData: Handle): OSErr; external name '_GetCollectionItemHdl';
+{
+ * ReplaceIndexedCollectionItemHdl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ReplaceIndexedCollectionItemHdl(aCollection: Collection; index: SInt32; itemData: Handle): OSErr; external name '_ReplaceIndexedCollectionItemHdl';
+{
+ * GetIndexedCollectionItemHdl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIndexedCollectionItemHdl(aCollection: Collection; index: SInt32; itemData: Handle): OSErr; external name '_GetIndexedCollectionItemHdl';
+{
+ * FlattenCollectionToHdl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FlattenCollectionToHdl(aCollection: Collection; flattened: Handle): OSErr; external name '_FlattenCollectionToHdl';
+{
+ * UnflattenCollectionFromHdl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CollectionsLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UnflattenCollectionFromHdl(aCollection: Collection; flattened: Handle): OSErr; external name '_UnflattenCollectionFromHdl';
+{$ifc OLDROUTINENAMES}
+
+const
+ dontWantTag = 0;
+ dontWantId = 0;
+ dontWantSize = 0;
+ dontWantAttributes = 0;
+ dontWantIndex = 0;
+ dontWantData = 0;
+
+ noCollectionAttributes = $00000000;
+ allCollectionAttributes = $FFFFFFFF;
+ userCollectionAttributes = $0000FFFF;
+ defaultCollectionAttributes = $40000000;
+
+ collectionUser0Bit = 0;
+ collectionUser1Bit = 1;
+ collectionUser2Bit = 2;
+ collectionUser3Bit = 3;
+ collectionUser4Bit = 4;
+ collectionUser5Bit = 5;
+ collectionUser6Bit = 6;
+ collectionUser7Bit = 7;
+ collectionUser8Bit = 8;
+ collectionUser9Bit = 9;
+ collectionUser10Bit = 10;
+ collectionUser11Bit = 11;
+ collectionUser12Bit = 12;
+ collectionUser13Bit = 13;
+ collectionUser14Bit = 14;
+ collectionUser15Bit = 15;
+ collectionReserved0Bit = 16;
+ collectionReserved1Bit = 17;
+ collectionReserved2Bit = 18;
+ collectionReserved3Bit = 19;
+ collectionReserved4Bit = 20;
+ collectionReserved5Bit = 21;
+ collectionReserved6Bit = 22;
+ collectionReserved7Bit = 23;
+ collectionReserved8Bit = 24;
+ collectionReserved9Bit = 25;
+ collectionReserved10Bit = 26;
+ collectionReserved11Bit = 27;
+ collectionReserved12Bit = 28;
+ collectionReserved13Bit = 29;
+ collectionPersistenceBit = 30;
+ collectionLockBit = 31;
+
+ collectionUser0Mask = $00000001;
+ collectionUser1Mask = $00000002;
+ collectionUser2Mask = $00000004;
+ collectionUser3Mask = $00000008;
+ collectionUser4Mask = $00000010;
+ collectionUser5Mask = $00000020;
+ collectionUser6Mask = $00000040;
+ collectionUser7Mask = $00000080;
+ collectionUser8Mask = $00000100;
+ collectionUser9Mask = $00000200;
+ collectionUser10Mask = $00000400;
+ collectionUser11Mask = $00000800;
+ collectionUser12Mask = $00001000;
+ collectionUser13Mask = $00002000;
+ collectionUser14Mask = $00004000;
+ collectionUser15Mask = $00008000;
+ collectionReserved0Mask = $00010000;
+ collectionReserved1Mask = $00020000;
+ collectionReserved2Mask = $00040000;
+ collectionReserved3Mask = $00080000;
+ collectionReserved4Mask = $00100000;
+ collectionReserved5Mask = $00200000;
+ collectionReserved6Mask = $00400000;
+ collectionReserved7Mask = $00800000;
+ collectionReserved8Mask = $01000000;
+ collectionReserved9Mask = $02000000;
+ collectionReserved10Mask = $04000000;
+ collectionReserved11Mask = $08000000;
+ collectionReserved12Mask = $10000000;
+ collectionReserved13Mask = $20000000;
+ collectionPersistenceMask = $40000000;
+ collectionLockMask = $80000000;
+
+{$endc} {OLDROUTINENAMES}
+
+
+{$ALIGN MAC68K}
+
+
+{unit CoreAudioTypes}
+{==================================================================================================
+ File: CoreAudio/CoreAudioTypes.h
+
+ Contains: Definitions types common to the Core Audio APIs
+
+ Version: Technology: Mac OS X
+ Release: Mac OS X
+
+ Copyright: (c) 1985-2005 by Apple Computer, Inc., all rights reserved.
+
+==================================================================================================}
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+{!
+ @header CoreAudioTypes
+ This header defines the types and constants that all the CoreAudio APIs have in common.
+}
+
+//==================================================================================================
+
+
+{!
+ @struct AudioValueRange
+ @abstract This structure holds a pair of numbers that represent a continuous range of
+ values.
+ @field mMinimum
+ The minimum value.
+ @field mMaximum
+ The maximum value.
+}
+type
+ AudioValueRange = record
+ mMinimum: Float64;
+ mMaximum: Float64;
+ end;
+
+{!
+ @struct AudioValueTranslation
+ @abstract This stucture holds the buffers necessary for translation operations.
+ @field mInputData
+ The buffer containing the data to be translated.
+ @field mInputDataSize
+ The number of bytes in the buffer pointed at by mInputData.
+ @field mOutputData
+ The buffer to hold the result of the translation.
+ @field mOutputDataSize
+ The number of bytes in the buffer pointed at by mOutputData.
+}
+type
+ AudioValueTranslation = record
+ mInputData: UnivPtr;
+ mInputDataSize: UInt32;
+ mOutputData: UnivPtr;
+ mOutputDataSize: UInt32;
+ end;
+
+{!
+ @struct AudioBuffer
+ @abstract A structure to hold a buffer of audio data.
+ @field mNumberChannels
+ The number of interleaved channels in the buffer.
+ @field mDataByteSize
+ The number of bytes in the buffer pointed at by mData.
+ @field mData
+ A pointer to the buffer of audio data.
+}
+type
+ AudioBuffer = record
+ mNumberChannels: UInt32;
+ mDataByteSize: UInt32;
+ mData: UnivPtr;
+ end;
+
+{!
+ @struct AudioBufferList
+ @abstract A variable length array of AudioBuffer structures.
+ @field mNumberBuffers
+ The number of AudioBuffers in the mBuffers array.
+ @field mBuffers
+ A variable length array of AudioBuffers.
+}
+type
+ AudioBufferList = record
+ mNumberBuffers: UInt32;
+ mBuffers: array[0..0] of AudioBuffer;
+ end;
+
+{!
+ @struct AudioStreamBasicDescription
+ @abstract This structure encapsulates all the information for describing the basic
+ format properties of a stream of audio data.
+ @discussion This structure is sufficient to describe any constant bit rate format that has
+ channels that are the same size. Extensions are required for variable bit rate
+ data and for constant bit rate data where the channels have unequal sizes.
+ However, where applicable, the appropriate fields will be filled out correctly
+ for these kinds of formats (the extra data is provided via separate properties).
+ In all fields, a value of 0 indicates that the field is either unknown, not
+ applicable or otherwise is inapproprate for the format and should be ignored.
+ Note that 0 is still a valid value for most formats in the mFormatFlags field.
+
+ In audio data a frame is one sample across all channels. In non-interleaved
+ audio, the per frame fields identify one channel. In interleaved audio, the per
+ frame fields identify the set of n channels. In uncompressed audio, a Packet is
+ one frame, (mFramesPerPacket == 1). In compressed audio, a Packet is an
+ indivisible chunk of compressed data, for example an AAC packet will contain
+ 1024 sample frames.
+ @field mSampleRate
+ The number of sample frames per second of the data in the stream.
+ @field mFormatID
+ A four char code indicating the general kind of data in the stream.
+ @field mFormatFlags
+ Flags specific to each format.
+ @field mBytesPerPacket
+ The number of bytes in a packet of data.
+ @field mFramesPerPacket
+ The number of sample frames in each packet of data.
+ @field mBytesPerFrame
+ The number of bytes in a single sample frame of data.
+ @field mChannelsPerFrame
+ The number of channels in each frame of data.
+ @field mBitsPerChannel
+ The number of bits of sample data for each channel in a frame of data.
+ @field mReserved
+ Pads the structure out to force an even 8 byte alignment.
+}
+type
+ AudioStreamBasicDescription = record
+ mSampleRate: Float64;
+ mFormatID: UInt32;
+ mFormatFlags: UInt32;
+ mBytesPerPacket: UInt32;
+ mFramesPerPacket: UInt32;
+ mBytesPerFrame: UInt32;
+ mChannelsPerFrame: UInt32;
+ mBitsPerChannel: UInt32;
+ mReserved: UInt32;
+ end;
+
+{!
+ @enum AudioStreamBasicDescription Constants
+ @abstract Constants for use with AudioStreamBasicDescription
+ @constant kAudioStreamAnyRate
+ The format can use any sample rate. Note that this constant can only appear
+ in listings of supported formats. It will never appear in a current format.
+}
+const
+ kAudioStreamAnyRate = 0;
+
+{!
+ @enum Format IDs
+ @abstract The four char code IDs used to identify individual formats of audio data.
+ @constant kAudioFormatLinearPCM
+ Linear PCM, uses the standard flags.
+ @constant kAudioFormatAC3
+ AC-3, has no flags.
+ @constant kAudioFormat60958AC3
+ AC-3 packaged for transport over an IEC 60958 compliant digital audio
+ interface. Uses the standard flags.
+ @constant kAudioFormatAppleIMA4
+ Apples implementation of IMA 4:1 ADPCM, has no flags.
+ @constant kAudioFormatMPEG4AAC
+ MPEG-4 AAC, the flags field contains the MPEG-4 audio object type constant
+ indicating the specific kind of data.
+ @constant kAudioFormatMPEG4CELP
+ MPEG-4 CELP, the flags field contains the MPEG-4 audio object type constant
+ indicating the specific kind of data.
+ @constant kAudioFormatMPEG4HVXC
+ MPEG-4 HVXC, the flags field contains the MPEG-4 audio object type constant
+ indicating the specific kind of data.
+ @constant kAudioFormatMPEG4TwinVQ
+ MPEG-4 TwinVQ, the flags field contains the MPEG-4 audio object type
+ constant indicating the specific kind of data.
+ @constant kAudioFormatMACE3
+ MACE 3:1, has no flags.
+ @constant kAudioFormatMACE6
+ MACE 6:1, has no flags.
+ @constant kAudioFormatULaw
+ µLaw 2:1, has no flags.
+ @constant kAudioFormatALaw
+ aLaw 2:1, has no flags.
+ @constant kAudioFormatQDesign
+ QDesign music, has no flags
+ @constant kAudioFormatQDesign2
+ QDesign2 music, has no flags
+ @constant kAudioFormatQUALCOMM
+ QUALCOMM PureVoice, has no flags
+ @constant kAudioFormatMPEGLayer1
+ MPEG-1/2, Layer 1 audio, has no flags
+ @constant kAudioFormatMPEGLayer2
+ MPEG-1/2, Layer 2 audio, has no flags
+ @constant kAudioFormatMPEGLayer3
+ MPEG-1/2, Layer 3 audio, has no flags
+ @constant kAudioFormatDVAudio
+ DV Audio, has no flags
+ @constant kAudioFormatVariableDurationDVAudio
+ Variable duration DV Audio, has no flags.
+ @constant kAudioFormatTimeCode
+ A stream of IOAudioTimeStamps, uses the IOAudioTimeStamp flags (see
+ IOKit/audio/IOAudioTypes.h).
+ @constant kAudioFormatMIDIStream
+ A stream of MIDIPacketLists where the time stamps in the MIDIPacketList are
+ sample offsets in the stream. The mSampleRate field is used to describe how
+ time is passed in this kind of stream and an AudioUnit that receives or
+ generates this stream can use this sample rate, the number of frames it is
+ rendering and the sample offsets within the MIDIPacketList to define the
+ time for any MIDI event within this list. It has no flags.
+ @constant kAudioFormatParameterValueStream
+ A "side-chain" of Float32 data that can be fed or generated by an AudioUnit
+ and is used to send a high density of parameter value control information.
+ An AU will typically run a ParameterValueStream at either the sample rate of
+ the AudioUnit's audio data, or some integer divisor of this (say a half or a
+ third of the sample rate of the audio). The Sample Rate of the ASBD
+ describes this relationship. It has no flags.
+ @constant kAudioFormatAppleLossless
+ Apple Lossless, has no flags.
+}
+const
+ kAudioFormatLinearPCM = $6C70636D (* 'lpcm' *);
+ kAudioFormatAC3 = $61632D33 (* 'ac-3' *);
+ kAudioFormat60958AC3 = $63616333 (* 'cac3' *);
+ kAudioFormatAppleIMA4 = $696D6134 (* 'ima4' *);
+ kAudioFormatMPEG4AAC = $61616320 (* 'aac ' *);
+ kAudioFormatMPEG4CELP = $63656C70 (* 'celp' *);
+ kAudioFormatMPEG4HVXC = $68767863 (* 'hvxc' *);
+ kAudioFormatMPEG4TwinVQ = $74777671 (* 'twvq' *);
+ kAudioFormatMACE3 = $4D414333 (* 'MAC3' *);
+ kAudioFormatMACE6 = $4D414336 (* 'MAC6' *);
+ kAudioFormatULaw = $756C6177 (* 'ulaw' *);
+ kAudioFormatALaw = $616C6177 (* 'alaw' *);
+ kAudioFormatQDesign = $51444D43 (* 'QDMC' *);
+ kAudioFormatQDesign2 = $51444D32 (* 'QDM2' *);
+ kAudioFormatQUALCOMM = $51636C70 (* 'Qclp' *);
+ kAudioFormatMPEGLayer1 = $2E6D7031 (* '.mp1' *);
+ kAudioFormatMPEGLayer2 = $2E6D7032 (* '.mp2' *);
+ kAudioFormatMPEGLayer3 = $2E6D7033 (* '.mp3' *);
+ kAudioFormatDVAudio = $64766361 (* 'dvca' *);
+ kAudioFormatVariableDurationDVAudio = $76647661 (* 'vdva' *);
+ kAudioFormatTimeCode = $74696D65 (* 'time' *);
+ kAudioFormatMIDIStream = $6D696469 (* 'midi' *);
+ kAudioFormatParameterValueStream = $61707673 (* 'apvs' *);
+ kAudioFormatAppleLossless = $616C6163 (* 'alac' *);
+
+{!
+ @enum Standard Flag Values for AudioStreamBasicDescription
+ @abstract These are the standard flags for use in the mFormatFlags field of the
+ AudioStreamBasicDescription structure.
+ @discussion Typically, when an ASBD is being used, the fields describe the complete layout
+ of the sample data in the buffers that are represented by this description -
+ where typically those buffers are represented by an AudioBuffer that is
+ contained in an AudioBufferList.
+
+ However, when an ASBD has the kAudioFormatFlagIsNonInterleaved flag, the
+ AudioBufferList has a different structure and semantic. In this case, the ASBD
+ fields will describe the format of ONE of the AudioBuffers that are contained in
+ the list, AND each AudioBuffer in the list is determined to have a single (mono)
+ channel of audio data. Then, the ASBD's mChannelsPerFrame will indicate the
+ total number of AudioBuffers that are contained within the AudioBufferList -
+ where each buffer contains one channel. This is used primarily with the
+ AudioUnit (and AudioConverter) representation of this list - and won't be found
+ in the AudioHardware usage of this structure.
+ @constant kAudioFormatFlagIsFloat
+ Set for floating point, clear for integer.
+ @constant kAudioFormatFlagIsBigEndian
+ Set for big endian, clear for little endian.
+ @constant kAudioFormatFlagIsSignedInteger
+ Set for signed integer, clear for unsigned integer. This is only valid if
+ kAudioFormatFlagIsFloat is clear.
+ @constant kAudioFormatFlagIsPacked
+ Set if the sample bits occupy the entire available bits for the channel,
+ clear if they are high or low aligned within the channel.
+ @constant kAudioFormatFlagIsAlignedHigh
+ Set if the sample bits are placed into the high bits of the channel, clear
+ for low bit placement. This is only valid if kAudioFormatFlagIsPacked is
+ clear.
+ @constant kAudioFormatFlagIsNonInterleaved
+ Set if the samples for each channel are located contiguously and the
+ channels are layed out end to end, clear if the samples for each frame are
+ layed out contiguously and the frames layed out end to end.
+ @constant kAudioFormatFlagIsNonMixable
+ Set to indicate when a format is non-mixable. Note that this flag is only
+ used when interacting with the HAL's stream format information. It is not a
+ valid flag for any other uses.
+ @constant kAudioFormatFlagsAreAllClear
+ Set if all the flags would be clear in order to preserve 0 as the wild card
+ value.
+ @constant kLinearPCMFormatFlagIsFloat
+ Synonym for kAudioFormatFlagIsFloat.
+ @constant kLinearPCMFormatFlagIsBigEndian
+ Synonym for kAudioFormatFlagIsBigEndian.
+ @constant kLinearPCMFormatFlagIsSignedInteger
+ Synonym for kAudioFormatFlagIsSignedInteger.
+ @constant kLinearPCMFormatFlagIsPacked
+ Synonym for kAudioFormatFlagIsPacked.
+ @constant kLinearPCMFormatFlagIsAlignedHigh
+ Synonym for kAudioFormatFlagIsAlignedHigh.
+ @constant kLinearPCMFormatFlagIsNonInterleaved
+ Synonym for kAudioFormatFlagIsNonInterleaved.
+ @constant kLinearPCMFormatFlagIsNonMixable
+ Synonym for kAudioFormatFlagIsNonMixable.
+ @constant kLinearPCMFormatFlagsAreAllClear
+ Synonym for kAudioFormatFlagsAreAllClear.
+ @constant kAppleLosslessFormatFlag_16BitSourceData
+ This flag is set for Apple Lossless data that was sourced from 16 bit native
+ endian signed integer data.
+ @constant kAppleLosslessFormatFlag_20BitSourceData
+ This flag is set for Apple Lossless data that was sourced from 20 bit native
+ endian signed integer data aligned high in 24 bits.
+ @constant kAppleLosslessFormatFlag_24BitSourceData
+ This flag is set for Apple Lossless data that was sourced from 24 bit native
+ endian signed integer data.
+ @constant kAppleLosslessFormatFlag_32BitSourceData
+ This flag is set for Apple Lossless data that was sourced from 32 bit native
+ endian signed integer data.
+}
+const
+ kAudioFormatFlagIsFloat = 1 shl 0;
+ kAudioFormatFlagIsBigEndian = 1 shl 1;
+ kAudioFormatFlagIsSignedInteger = 1 shl 2;
+ kAudioFormatFlagIsPacked = 1 shl 3;
+ kAudioFormatFlagIsAlignedHigh = 1 shl 4;
+ kAudioFormatFlagIsNonInterleaved = 1 shl 5;
+ kAudioFormatFlagIsNonMixable = 1 shl 6;
+ kAudioFormatFlagsAreAllClear = 1 shl 31;
+
+ kLinearPCMFormatFlagIsFloat = kAudioFormatFlagIsFloat;
+ kLinearPCMFormatFlagIsBigEndian = kAudioFormatFlagIsBigEndian;
+ kLinearPCMFormatFlagIsSignedInteger = kAudioFormatFlagIsSignedInteger;
+ kLinearPCMFormatFlagIsPacked = kAudioFormatFlagIsPacked;
+ kLinearPCMFormatFlagIsAlignedHigh = kAudioFormatFlagIsAlignedHigh;
+ kLinearPCMFormatFlagIsNonInterleaved = kAudioFormatFlagIsNonInterleaved;
+ kLinearPCMFormatFlagIsNonMixable = kAudioFormatFlagIsNonMixable;
+ kLinearPCMFormatFlagsAreAllClear = kAudioFormatFlagsAreAllClear;
+
+ kAppleLosslessFormatFlag_16BitSourceData = 1;
+ kAppleLosslessFormatFlag_20BitSourceData = 2;
+ kAppleLosslessFormatFlag_24BitSourceData = 3;
+ kAppleLosslessFormatFlag_32BitSourceData = 4;
+
+{!
+ @enum Commonly Used Combinations of ASBD Flags
+ @abstract Some commonly used combinations of flags for AudioStreamBasicDescriptions.
+ @constant kAudioFormatFlagsNativeEndian
+ Defined to set or clear kAudioFormatFlagIsBigEndian depending on the
+ endianness of the processor at build time.
+ @constant kAudioFormatFlagsNativeFloatPacked
+ The flags for the canonical format of fully packed, native endian floating
+ point data.
+}
+const
+{$ifc TARGET_RT_BIG_ENDIAN}
+ kAudioFormatFlagsNativeEndian = kAudioFormatFlagIsBigEndian;
+{$elsec}
+ kAudioFormatFlagsNativeEndian = 0;
+{$endc} {TARGET_RT_BIG_ENDIAN}
+ kAudioFormatFlagsNativeFloatPacked = kAudioFormatFlagIsFloat or kAudioFormatFlagsNativeEndian or kAudioFormatFlagIsPacked;
+
+{!
+ @defined TestAudioFormatNativeEndian
+ @abstract A macro for checking if an ASBD indicates native endian linear PCM data.
+}
+// #define TestAudioFormatNativeEndian(f) ((f.mFormatID == kAudioFormatLinearPCM) && ((f.mFormatFlags & kAudioFormatFlagIsBigEndian) == kAudioFormatFlagsNativeEndian))
+
+{!
+ @function IsAudioFormatNativeEndian
+ @abstract A C++ inline function for checking if an ASBD indicates native endian linear PCM
+ data.
+ @param f
+ The AudioStreamBasicDescription to examine.
+ @result Whether or not the ASBD indicates native endian linear PCM data.
+}
+
+{! @enum MPEG-4 Audio Object IDs
+ @abstract Constants that describe the various kinds of MPEG-4 audio data.
+ @discussion These constants are used in the flags field of an AudioStreamBasicDescription
+ that describes an MPEG-4 audio stream.
+}
+const
+ kMPEG4Object_AAC_Main = 1;
+ kMPEG4Object_AAC_LC = 2;
+ kMPEG4Object_AAC_SSR = 3;
+ kMPEG4Object_AAC_LTP = 4;
+ kMPEG4Object_AAC_SBR = 5;
+ kMPEG4Object_AAC_Scalable = 6;
+
+ kMPEG4Object_TwinVQ = 7;
+ kMPEG4Object_CELP = 8;
+ kMPEG4Object_HVXC = 9;
+
+{!
+ @struct AudioStreamPacketDescription
+ @abstract This structure describes the packet layout of a buffer of data where the size of
+ each packet may not be the same or where there is extraneous data between
+ packets.
+ @field mStartOffset
+ The number of bytes from the start of the buffer to the beginning of the
+ packet.
+ @field mVariableFramesInPacket
+ The number of sample frames of data in the packet. For formats with a
+ constant number of frames per packet, this field is set to 0.
+ @field mDataByteSize
+ The number of bytes in the packet.
+}
+type
+ AudioStreamPacketDescription = record
+ mStartOffset: SInt64;
+ mVariableFramesInPacket: UInt32;
+ mDataByteSize: UInt32;
+ end;
+
+// SMPTETime is also defined in the CoreVideo headers.
+//#if !defined(__SMPTETime__)
+//#define __SMPTETime__
+{GRP translation note: As far as MacOSX10.4u.sdk public headers is concerned, this
+ header/interface is the only place these declarations are made. }
+
+{!
+ @struct SMPTETime
+ @abstract A structure for holding a SMPTE time.
+ @field mSubframes
+ The number of subframes in the full message.
+ @field mSubframeDivisor
+ The number of subframes per frame (typically 80).
+ @field mCounter
+ The total number of messages received.
+ @field mType
+ The kind of SMPTE time using the SMPTE time type constants.
+ @field mFlags
+ A set of flags that indicate the SMPTE state.
+ @field mHours
+ The number of hourse in the full message.
+ @field mMinutes
+ The number of minutes in the full message.
+ @field mSeconds
+ The number of seconds in the full message.
+ @field mFrames
+ The number of frames in the full message.
+}
+type
+ SMPTETime = record
+ mSubframes: SInt16;
+ mSubframeDivisor: SInt16;
+ mCounter: UInt32;
+ mType: UInt32;
+ mFlags: UInt32;
+ mHours: SInt16;
+ mMinutes: SInt16;
+ mSeconds: SInt16;
+ mFrames: SInt16;
+ end;
+
+{!
+ @enum SMPTE Time Types
+ @abstract Constants that describe the type of SMPTE time.
+ @constant kSMPTETimeType24
+ 24 Frame
+ @constant kSMPTETimeType25
+ 25 Frame
+ @constant kSMPTETimeType30Drop
+ 30 Drop Frame
+ @constant kSMPTETimeType30
+ 30 Frame
+ @constant kSMPTETimeType2997
+ 29.97 Frame
+ @constant kSMPTETimeType2997Drop
+ 29.97 Drop Frame
+ @constant kSMPTETimeType60
+ 60 Frame
+ @constant kSMPTETimeType5994
+ 59.94 Frame
+}
+const
+ kSMPTETimeType24 = 0;
+ kSMPTETimeType25 = 1;
+ kSMPTETimeType30Drop = 2;
+ kSMPTETimeType30 = 3;
+ kSMPTETimeType2997 = 4;
+ kSMPTETimeType2997Drop = 5;
+ kSMPTETimeType60 = 6;
+ kSMPTETimeType5994 = 7;
+
+{!
+ @enum SMPTE State Flags
+ @abstract Flags that describe the SMPTE time state.
+ @constant kSMPTETimeValid
+ The full time is valid.
+ @constant kSMPTETimeRunning
+ Time is running.
+}
+const
+ kSMPTETimeValid = 1 shl 0;
+ kSMPTETimeRunning = 1 shl 1;
+
+//#endif
+
+{!
+ @struct AudioTimeStamp
+ @abstract A strucutre that holds different representations of the same point in time.
+ @field mSampleTime
+ The absolute sample frame time.
+ @field mHostTime
+ The host machine's time base (see <CoreAudio/HostTime.h>).
+ @field mRateScalar
+ The ratio of actual host ticks per sample frame to the nominal host ticks
+ per sample frame.
+ @field mWordClockTime
+ The word clock time.
+ @field mSMPTETime
+ The SMPTE time.
+ @field mFlags
+ A set of flags indicating which representations of the time are valid.
+ @field mReserved
+ Pads the structure out to force an even 8 byte alignment.
+}
+type
+ AudioTimeStamp = record
+ mSampleTime: Float64;
+ mHostTime: UInt64;
+ mRateScalar: Float64;
+ mWordClockTime: UInt64;
+ mSMPTETime: SMPTETime;
+ mFlags: UInt32;
+ mReserved: UInt32;
+ end;
+ AudioTimeStampPtr = ^AudioTimeStamp;
+
+{!
+ @enum AudioTimeStamp Flags
+ @abstract The flags that indicate which fields in an AudioTimeStamp structure are valid.
+ @constant kAudioTimeStampSampleTimeValid
+ The sample frame time is valid.
+ @constant kAudioTimeStampHostTimeValid
+ The host time is valid.
+ @constant kAudioTimeStampRateScalarValid
+ The rate scalar is valid.
+ @constant kAudioTimeStampWordClockTimeValid
+ The word clock time is valid.
+ @constant kAudioTimeStampSMPTETimeValid
+ The SMPTE time is valid.
+}
+const
+ kAudioTimeStampSampleTimeValid = 1 shl 0;
+ kAudioTimeStampHostTimeValid = 1 shl 1;
+ kAudioTimeStampRateScalarValid = 1 shl 2;
+ kAudioTimeStampWordClockTimeValid = 1 shl 3;
+ kAudioTimeStampSMPTETimeValid = 1 shl 4;
+
+{!
+ @enum Commonly Used Combinations of AudioTimeStamp Flags
+ @abstract Some commonly used combinations of AudioTimeStamp flags.
+ @constant kAudioTimeStampSampleHostTimeValid
+ The sample frame time and the host time are valid.
+}
+const
+ kAudioTimeStampSampleHostTimeValid = kAudioTimeStampSampleTimeValid or kAudioTimeStampHostTimeValid;
+
+{!
+ @struct AudioClassDescription
+ @abstract This structure is used to describe codecs installed on the system.
+ @field mType
+ The four char code codec type.
+ @field mSubType
+ The four char code codec subtype.
+ @field mManufacturer
+ The four char code codec manufacturer.
+}
+type
+ AudioClassDescription = record
+ mType: OSType;
+ mSubType: OSType;
+ mManufacturer: OSType;
+ end;
+
+
+{!
+ @typedef AudioChannelLabel
+ @abstract A tag idenitfying how the channel is to be used.
+}
+type
+ AudioChannelLabel = UInt32;
+
+{!
+ @typedef AudioChannelLayoutTag
+ @abstract A tag identifying a particular pre-defined channel layout.
+}
+type
+ AudioChannelLayoutTag = UInt32;
+
+{!
+ @struct AudioChannelDescription
+ @abstract This structure describes a single channel.
+ @field mChannelLabel
+ The AudioChannelLabel that describes the channel.
+ @field mChannelFlags
+ Flags that control the interpretation of mCoordinates.
+ @field mCoordinates
+ An ordered triple that specifies a precise speaker location.
+}
+type
+ AudioChannelDescription = record
+ mChannelLabel: AudioChannelLabel;
+ mChannelFlags: UInt32;
+ mCoordinates: array[0..2] of Float32;
+ end;
+
+{!
+ @struct AudioChannelLayout
+ @abstract This structure is used to specify channel layouts in files and hardware.
+ @field mChannelLayoutTag
+ The AudioChannelLayoutTag that indicates the layout.
+ @field mChannelBitmap
+ If mChannelLayoutTag is set to kAudioChannelLayoutTag_UseChannelBitmap, this
+ field is the channel usage bitmap.
+ @field mNumberChannelDescriptions
+ The number of items in the mChannelDescriptions array.
+ @field mChannelDescriptions
+ A variable length array of AudioChannelDescriptions that describe the
+ layout.
+}
+type
+ AudioChannelLayout = record
+ mChannelLayoutTag: AudioChannelLayoutTag;
+ mChannelBitmap: UInt32;
+ mNumberChannelDescriptions: UInt32;
+ mChannelDescriptions: array[0..0] of AudioChannelDescription;
+ end;
+
+{!
+ @enum AudioChannelLabel Constants
+ @abstract These constants are for use in the mChannelLabel field of an
+ AudioChannelDescription structure.
+ @discussion These channel labels attempt to list all labels in common use. Due to the
+ ambiguities in channel labeling by various groups, there may be some overlap or
+ duplication in the labels below. Use the label which most clearly describes what
+ you mean.
+
+ WAVE files seem to follow the USB spec for the channel flags. A channel map lets
+ you put these channels in any order, however a WAVE file only supports labels
+ 1-18 and if present, they must be in the order given below. The integer values
+ for the labels below match the bit position of the label in the USB bitmap and
+ thus also the WAVE file bitmap.
+}
+const
+ kAudioChannelLabel_Unknown = $FFFFFFFF; // unknown or unspecified other use
+ kAudioChannelLabel_Unused = 0; // channel is present, but has no intended use or destination
+ kAudioChannelLabel_UseCoordinates = 100; // channel is described by the mCoordinates fields.
+
+ kAudioChannelLabel_Left = 1;
+ kAudioChannelLabel_Right = 2;
+ kAudioChannelLabel_Center = 3;
+ kAudioChannelLabel_LFEScreen = 4;
+ kAudioChannelLabel_LeftSurround = 5; // WAVE: "Back Left"
+ kAudioChannelLabel_RightSurround = 6; // WAVE: "Back Right"
+ kAudioChannelLabel_LeftCenter = 7;
+ kAudioChannelLabel_RightCenter = 8;
+ kAudioChannelLabel_CenterSurround = 9; // WAVE: "Back Center" or plain "Rear Surround"
+ kAudioChannelLabel_LeftSurroundDirect = 10; // WAVE: "Side Left"
+ kAudioChannelLabel_RightSurroundDirect = 11; // WAVE: "Side Right"
+ kAudioChannelLabel_TopCenterSurround = 12;
+ kAudioChannelLabel_VerticalHeightLeft = 13; // WAVE: "Top Front Left"
+ kAudioChannelLabel_VerticalHeightCenter = 14; // WAVE: "Top Front Center"
+ kAudioChannelLabel_VerticalHeightRight = 15; // WAVE: "Top Front Right"
+
+ kAudioChannelLabel_TopBackLeft = 16;
+ kAudioChannelLabel_TopBackCenter = 17;
+ kAudioChannelLabel_TopBackRight = 18;
+
+ kAudioChannelLabel_RearSurroundLeft = 33;
+ kAudioChannelLabel_RearSurroundRight = 34;
+ kAudioChannelLabel_LeftWide = 35;
+ kAudioChannelLabel_RightWide = 36;
+ kAudioChannelLabel_LFE2 = 37;
+ kAudioChannelLabel_LeftTotal = 38; // matrix encoded 4 channels
+ kAudioChannelLabel_RightTotal = 39; // matrix encoded 4 channels
+ kAudioChannelLabel_HearingImpaired = 40;
+ kAudioChannelLabel_Narration = 41;
+ kAudioChannelLabel_Mono = 42;
+ kAudioChannelLabel_DialogCentricMix = 43;
+
+ kAudioChannelLabel_CenterSurroundDirect = 44; // back center, non diffuse
+
+ // first order ambisonic channels
+ kAudioChannelLabel_Ambisonic_W = 200;
+ kAudioChannelLabel_Ambisonic_X = 201;
+ kAudioChannelLabel_Ambisonic_Y = 202;
+ kAudioChannelLabel_Ambisonic_Z = 203;
+
+ // Mid/Side Recording
+ kAudioChannelLabel_MS_Mid = 204;
+ kAudioChannelLabel_MS_Side = 205;
+
+ // X-Y Recording
+ kAudioChannelLabel_XY_X = 206;
+ kAudioChannelLabel_XY_Y = 207;
+
+ // other
+ kAudioChannelLabel_HeadphonesLeft = 301;
+ kAudioChannelLabel_HeadphonesRight = 302;
+ kAudioChannelLabel_ClickTrack = 304;
+ kAudioChannelLabel_ForeignLanguage = 305;
+
+ // generic discrete channel
+ kAudioChannelLabel_Discrete = 400;
+
+ // numbered discrete channel
+ kAudioChannelLabel_Discrete_0 = (1 shl 16) or 0;
+ kAudioChannelLabel_Discrete_1 = (1 shl 16) or 1;
+ kAudioChannelLabel_Discrete_2 = (1 shl 16) or 2;
+ kAudioChannelLabel_Discrete_3 = (1 shl 16) or 3;
+ kAudioChannelLabel_Discrete_4 = (1 shl 16) or 4;
+ kAudioChannelLabel_Discrete_5 = (1 shl 16) or 5;
+ kAudioChannelLabel_Discrete_6 = (1 shl 16) or 6;
+ kAudioChannelLabel_Discrete_7 = (1 shl 16) or 7;
+ kAudioChannelLabel_Discrete_8 = (1 shl 16) or 8;
+ kAudioChannelLabel_Discrete_9 = (1 shl 16) or 9;
+ kAudioChannelLabel_Discrete_10 = (1 shl 16) or 10;
+ kAudioChannelLabel_Discrete_11 = (1 shl 16) or 11;
+ kAudioChannelLabel_Discrete_12 = (1 shl 16) or 12;
+ kAudioChannelLabel_Discrete_13 = (1 shl 16) or 13;
+ kAudioChannelLabel_Discrete_14 = (1 shl 16) or 14;
+ kAudioChannelLabel_Discrete_15 = (1 shl 16) or 15;
+ kAudioChannelLabel_Discrete_65535 = (1 shl 16) or 65535;
+
+{!
+ @enum Channel Bitmap Constants
+ @abstract These constants are for use in the mChannelBitmap field of an
+ AudioChannelLayout structure.
+}
+const
+ kAudioChannelBit_Left = 1 shl 0;
+ kAudioChannelBit_Right = 1 shl 1;
+ kAudioChannelBit_Center = 1 shl 2;
+ kAudioChannelBit_LFEScreen = 1 shl 3;
+ kAudioChannelBit_LeftSurround = 1 shl 4; // WAVE: "Back Left"
+ kAudioChannelBit_RightSurround = 1 shl 5; // WAVE: "Back Right"
+ kAudioChannelBit_LeftCenter = 1 shl 6;
+ kAudioChannelBit_RightCenter = 1 shl 7;
+ kAudioChannelBit_CenterSurround = 1 shl 8; // WAVE: "Back Center"
+ kAudioChannelBit_LeftSurroundDirect = 1 shl 9; // WAVE: "Side Left"
+ kAudioChannelBit_RightSurroundDirect = 1 shl 10; // WAVE: "Side Right"
+ kAudioChannelBit_TopCenterSurround = 1 shl 11;
+ kAudioChannelBit_VerticalHeightLeft = 1 shl 12; // WAVE: "Top Front Left"
+ kAudioChannelBit_VerticalHeightCenter = 1 shl 13; // WAVE: "Top Front Center"
+ kAudioChannelBit_VerticalHeightRight = 1 shl 14; // WAVE: "Top Front Right"
+ kAudioChannelBit_TopBackLeft = 1 shl 15;
+ kAudioChannelBit_TopBackCenter = 1 shl 16;
+ kAudioChannelBit_TopBackRight = 1 shl 17;
+
+{!
+ @enum Channel Coordinate Flags
+ @abstract These constants are used in the mChannelFlags field of an
+ AudioChannelDescription structure.
+ @constant kAudioChannelFlags_RectangularCoordinates
+ The channel is specified by the cartesioan coordinates of the speaker
+ position. This flag is mutally exclusive with
+ kAudioChannelFlags_SphericalCoordinates.
+ @constant kAudioChannelFlags_SphericalCoordinates
+ The channel is specified by the spherical coordinates of the speaker
+ position. This flag is mutally exclusive with
+ kAudioChannelFlags_RectangularCoordinates.
+ @constant kAudioChannelFlags_Meters
+ Set to indicate the units are in meters, clear to indicate the units are
+ relative to the unit cube or unit sphere.
+}
+const
+ kAudioChannelFlags_AllOff = 0;
+ kAudioChannelFlags_RectangularCoordinates = 1 shl 0;
+ kAudioChannelFlags_SphericalCoordinates = 1 shl 1;
+ kAudioChannelFlags_Meters = 1 shl 2;
+
+// these are indices for acessing the mCoordinates array in struct AudioChannelDescription
+{!
+ @enum Channel Coordinate Index Constants
+ @abstract Constants for indexing the mCoordinates array in an AudioChannelDescription
+ structure.
+ @constant kAudioChannelCoordinates_LeftRight
+ For rectangulare coordinates, negative is left and positive is right.
+ @constant kAudioChannelCoordinates_BackFront
+ For rectangulare coordinates, negative is back and positive is front.
+ @constant kAudioChannelCoordinates_DownUp
+ For rectangulare coordinates, negative is below ground level, 0 is ground
+ level, and positive is above ground level.
+ @constant kAudioChannelCoordinates_Azimuth
+ For spherical coordinates, 0 is front center, positive is right, negative is
+ left. This is measured in degrees.
+ @constant kAudioChannelCoordinates_Elevation
+ For spherical coordinates, +90 is zenith, 0 is horizontal, -90 is nadir.
+ This is measured in degrees.
+ @constant kAudioChannelCoordinates_Distance
+ For spherical coordinates, the units are described by flags.
+}
+const
+ kAudioChannelCoordinates_LeftRight = 0;
+ kAudioChannelCoordinates_BackFront = 1;
+ kAudioChannelCoordinates_DownUp = 2;
+ kAudioChannelCoordinates_Azimuth = 0;
+ kAudioChannelCoordinates_Elevation = 1;
+ kAudioChannelCoordinates_Distance = 2;
+
+{!
+ @function AudioChannelLayoutTag_GetNumberOfChannels
+ @abstract A macro to get the number of channels out of an AudioChannelLayoutTag
+ @discussion The low 16 bits of an AudioChannelLayoutTag gives the number of channels except
+ for kAudioChannelLayoutTag_UseChannelDescriptions and
+ kAudioChannelLayoutTag_UseChannelBitmap.
+ @param layoutTag
+ The AudioChannelLayoutTag to examine.
+ @result The number of channels the tag indicates.
+}
+//#define AudioChannelLayoutTag_GetNumberOfChannels(layoutTag) ((UInt32)((layoutTag) & 0x0000FFFF))
+
+{!
+ @enum AudioChannelLayoutTag Constants
+ @abstract These constants are used in the mChannelLayoutTag field of an AudioChannelLayout
+ structure.
+}
+const
+// Some channel abbreviations used below:
+ // L - left
+ // R - right
+ // C - center
+ // Ls - left surround
+ // Rs - right surround
+ // Cs - center surround
+ // Rls - rear left surround
+ // Rrs - rear right surround
+ // Lw - left wide
+ // Rw - right wide
+ // Lsd - left surround direct
+ // Rsd - right surround direct
+ // Lc - left center
+ // Rc - right center
+ // Ts - top surround
+ // Vhl - vertical height left
+ // Vhc - vertical height center
+ // Vhr - vertical height right
+ // Lt - left matrix total. for matrix encoded stereo.
+ // Rt - right matrix total. for matrix encoded stereo.
+
+ // General layouts
+ kAudioChannelLayoutTag_UseChannelDescriptions = (0 shl 16) or 0; // use the array of AudioChannelDescriptions to define the mapping.
+ kAudioChannelLayoutTag_UseChannelBitmap = (1 shl 16) or 0; // use the bitmap to define the mapping.
+
+ kAudioChannelLayoutTag_Mono = (100 shl 16) or 1; // a standard mono stream
+ kAudioChannelLayoutTag_Stereo = (101 shl 16) or 2; // a standard stereo stream (L R) - implied playback
+ kAudioChannelLayoutTag_StereoHeadphones = (102 shl 16) or 2; // a standard stereo stream (L R) - implied headphone playbac
+ kAudioChannelLayoutTag_MatrixStereo = (103 shl 16) or 2; // a matrix encoded stereo stream (Lt, Rt)
+ kAudioChannelLayoutTag_MidSide = (104 shl 16) or 2; // mid/side recording
+ kAudioChannelLayoutTag_XY = (105 shl 16) or 2; // coincident mic pair (often 2 figure 8's)
+ kAudioChannelLayoutTag_Binaural = (106 shl 16) or 2; // binaural stereo (left, right)
+ kAudioChannelLayoutTag_Ambisonic_B_Format = (107 shl 16) or 4; // W, X, Y, Z
+
+ kAudioChannelLayoutTag_Quadraphonic = (108 shl 16) or 4; // front left, front right, back left, back right
+
+ kAudioChannelLayoutTag_Pentagonal = (109 shl 16) or 5; // left, right, rear left, rear right, center
+
+ kAudioChannelLayoutTag_Hexagonal = (110 shl 16) or 6; // left, right, rear left, rear right, center, rear
+
+ kAudioChannelLayoutTag_Octagonal = (111 shl 16) or 8; // front left, front right, rear left, rear right,
+ // front center, rear center, side left, side right
+
+ kAudioChannelLayoutTag_Cube = (112 shl 16) or 8; // left, right, rear left, rear right
+ // top left, top right, top rear left, top rear right
+
+ // MPEG defined layouts
+ kAudioChannelLayoutTag_MPEG_1_0 = kAudioChannelLayoutTag_Mono; // C
+ kAudioChannelLayoutTag_MPEG_2_0 = kAudioChannelLayoutTag_Stereo; // L R
+ kAudioChannelLayoutTag_MPEG_3_0_A = (113 shl 16) or 3; // L R C
+ kAudioChannelLayoutTag_MPEG_3_0_B = (114 shl 16) or 3; // C L R
+ kAudioChannelLayoutTag_MPEG_4_0_A = (115 shl 16) or 4; // L R C Cs
+ kAudioChannelLayoutTag_MPEG_4_0_B = (116 shl 16) or 4; // C L R Cs
+ kAudioChannelLayoutTag_MPEG_5_0_A = (117 shl 16) or 5; // L R C Ls Rs
+ kAudioChannelLayoutTag_MPEG_5_0_B = (118 shl 16) or 5; // L R Ls Rs C
+ kAudioChannelLayoutTag_MPEG_5_0_C = (119 shl 16) or 5; // L C R Ls Rs
+ kAudioChannelLayoutTag_MPEG_5_0_D = (120 shl 16) or 5; // C L R Ls Rs
+ kAudioChannelLayoutTag_MPEG_5_1_A = (121 shl 16) or 6; // L R C LFE Ls Rs
+ kAudioChannelLayoutTag_MPEG_5_1_B = (122 shl 16) or 6; // L R Ls Rs C LFE
+ kAudioChannelLayoutTag_MPEG_5_1_C = (123 shl 16) or 6; // L C R Ls Rs LFE
+ kAudioChannelLayoutTag_MPEG_5_1_D = (124 shl 16) or 6; // C L R Ls Rs LFE
+ kAudioChannelLayoutTag_MPEG_6_1_A = (125 shl 16) or 7; // L R C LFE Ls Rs Cs
+ kAudioChannelLayoutTag_MPEG_7_1_A = (126 shl 16) or 8; // L R C LFE Ls Rs Lc Rc
+ kAudioChannelLayoutTag_MPEG_7_1_B = (127 shl 16) or 8; // C Lc Rc L R Ls Rs LFE (doc: IS-13818-7 MPEG2-AAC Table 3.1)
+ kAudioChannelLayoutTag_MPEG_7_1_C = (128 shl 16) or 8; // L R C LFE Ls R Rls Rrs
+ kAudioChannelLayoutTag_Emagic_Default_7_1 = (129 shl 16) or 8; // L R Ls Rs C LFE Lc Rc
+ kAudioChannelLayoutTag_SMPTE_DTV = (130 shl 16) or 8; // L R C LFE Ls Rs Lt Rt
+ // (kAudioChannelLayoutTag_ITU_5_1 plus a matrix encoded stereo mix)
+
+ // ITU defined layouts
+ kAudioChannelLayoutTag_ITU_1_0 = kAudioChannelLayoutTag_Mono; // C
+ kAudioChannelLayoutTag_ITU_2_0 = kAudioChannelLayoutTag_Stereo; // L R
+
+ kAudioChannelLayoutTag_ITU_2_1 = (131 shl 16) or 3; // L R Cs
+ kAudioChannelLayoutTag_ITU_2_2 = (132 shl 16) or 4; // L R Ls Rs
+ kAudioChannelLayoutTag_ITU_3_0 = kAudioChannelLayoutTag_MPEG_3_0_A; // L R C
+ kAudioChannelLayoutTag_ITU_3_1 = kAudioChannelLayoutTag_MPEG_4_0_A; // L R C Cs
+
+ kAudioChannelLayoutTag_ITU_3_2 = kAudioChannelLayoutTag_MPEG_5_0_A; // L R C Ls Rs
+ kAudioChannelLayoutTag_ITU_3_2_1 = kAudioChannelLayoutTag_MPEG_5_1_A; // L R C LFE Ls Rs
+ kAudioChannelLayoutTag_ITU_3_4_1 = kAudioChannelLayoutTag_MPEG_7_1_C; // L R C LFE Ls Rs Rls Rrs
+
+ // DVD defined layouts
+ kAudioChannelLayoutTag_DVD_0 = kAudioChannelLayoutTag_Mono; // C (mono)
+ kAudioChannelLayoutTag_DVD_1 = kAudioChannelLayoutTag_Stereo; // L R
+ kAudioChannelLayoutTag_DVD_2 = kAudioChannelLayoutTag_ITU_2_1; // L R Cs
+ kAudioChannelLayoutTag_DVD_3 = kAudioChannelLayoutTag_ITU_2_2; // L R Ls Rs
+ kAudioChannelLayoutTag_DVD_4 = (133 shl 16) or 3; // L R LFE
+ kAudioChannelLayoutTag_DVD_5 = (134 shl 16) or 4; // L R LFE Cs
+ kAudioChannelLayoutTag_DVD_6 = (135 shl 16) or 5; // L R LFE Ls Rs
+ kAudioChannelLayoutTag_DVD_7 = kAudioChannelLayoutTag_MPEG_3_0_A; // L R C
+ kAudioChannelLayoutTag_DVD_8 = kAudioChannelLayoutTag_MPEG_4_0_A; // L R C Cs
+ kAudioChannelLayoutTag_DVD_9 = kAudioChannelLayoutTag_MPEG_5_0_A; // L R C Ls Rs
+ kAudioChannelLayoutTag_DVD_10 = (136 shl 16) or 4; // L R C LFE
+ kAudioChannelLayoutTag_DVD_11 = (137 shl 16) or 5; // L R C LFE Cs
+ kAudioChannelLayoutTag_DVD_12 = kAudioChannelLayoutTag_MPEG_5_1_A; // L R C LFE Ls Rs
+ // 13 through 17 are duplicates of 8 through 12.
+ kAudioChannelLayoutTag_DVD_13 = kAudioChannelLayoutTag_DVD_8; // L R C Cs
+ kAudioChannelLayoutTag_DVD_14 = kAudioChannelLayoutTag_DVD_9; // L R C Ls Rs
+ kAudioChannelLayoutTag_DVD_15 = kAudioChannelLayoutTag_DVD_10; // L R C LFE
+ kAudioChannelLayoutTag_DVD_16 = kAudioChannelLayoutTag_DVD_11; // L R C LFE Cs
+ kAudioChannelLayoutTag_DVD_17 = kAudioChannelLayoutTag_DVD_12; // L R C LFE Ls Rs
+ kAudioChannelLayoutTag_DVD_18 = (138 shl 16) or 5; // L R Ls Rs LFE
+ kAudioChannelLayoutTag_DVD_19 = kAudioChannelLayoutTag_MPEG_5_0_B; // L R Ls Rs C
+ kAudioChannelLayoutTag_DVD_20 = kAudioChannelLayoutTag_MPEG_5_1_B; // L R Ls Rs C LFE
+
+ // These layouts are recommended for AudioUnit usage
+ // These are the symmetrical layouts
+ kAudioChannelLayoutTag_AudioUnit_4 = kAudioChannelLayoutTag_Quadraphonic;
+ kAudioChannelLayoutTag_AudioUnit_5 = kAudioChannelLayoutTag_Pentagonal;
+ kAudioChannelLayoutTag_AudioUnit_6 = kAudioChannelLayoutTag_Hexagonal;
+ kAudioChannelLayoutTag_AudioUnit_8 = kAudioChannelLayoutTag_Octagonal;
+ // These are the surround-based layouts
+ kAudioChannelLayoutTag_AudioUnit_5_0 = kAudioChannelLayoutTag_MPEG_5_0_B; // L R Ls Rs C
+ kAudioChannelLayoutTag_AudioUnit_6_0 = (139 shl 16) or 6; // L R Ls Rs C Cs
+ kAudioChannelLayoutTag_AudioUnit_7_0 = (140 shl 16) or 7; // L R Ls Rs C Rls Rrs
+ kAudioChannelLayoutTag_AudioUnit_5_1 = kAudioChannelLayoutTag_MPEG_5_1_A; // L R C LFE Ls Rs
+ kAudioChannelLayoutTag_AudioUnit_6_1 = kAudioChannelLayoutTag_MPEG_6_1_A; // L R C LFE Ls Rs Cs
+ kAudioChannelLayoutTag_AudioUnit_7_1 = kAudioChannelLayoutTag_MPEG_7_1_C; // L R C LFE Ls Rs Rls Rrs
+
+ kAudioChannelLayoutTag_AAC_Quadraphonic = kAudioChannelLayoutTag_Quadraphonic; // L R Ls Rs
+ kAudioChannelLayoutTag_AAC_4_0 = kAudioChannelLayoutTag_MPEG_4_0_B; // C L R Cs
+ kAudioChannelLayoutTag_AAC_5_0 = kAudioChannelLayoutTag_MPEG_5_0_D; // C L R Ls Rs
+ kAudioChannelLayoutTag_AAC_5_1 = kAudioChannelLayoutTag_MPEG_5_1_D; // C L R Ls Rs Lfe
+ kAudioChannelLayoutTag_AAC_6_0 = (141 shl 16) or 6; // C L R Ls Rs Cs
+ kAudioChannelLayoutTag_AAC_6_1 = (142 shl 16) or 7; // C L R Ls Rs Cs Lfe
+ kAudioChannelLayoutTag_AAC_7_0 = (143 shl 16) or 7; // C L R Ls Rs Rls Rrs
+ kAudioChannelLayoutTag_AAC_7_1 = kAudioChannelLayoutTag_MPEG_7_1_B; // C Lc Rc L R Ls Rs Lfe
+ kAudioChannelLayoutTag_AAC_Octagonal = (144 shl 16) or 8; // C L R Ls Rs Rls Rrs Cs
+
+ kAudioChannelLayoutTag_TMH_10_2_std = (145 shl 16) or 16; // L R C Vhc Lsd Rsd Ls Rs Vhl Vhr Lw Rw Csd Cs LFE1 LFE2
+ kAudioChannelLayoutTag_TMH_10_2_full = (146 shl 16) or 21; // TMH_10_2_std plus: Lc Rc HI VI Haptic
+
+ kAudioChannelLayoutTag_DiscreteInOrder = (147 shl 16) or 0; // needs to be ORed with the actual number of channels
+
+//==================================================================================================
+
+
+{unit DHCPClientPreferences}
+{
+ * Copyright (c) 2001 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,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES of MERCHANTABILITY,
+ * 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, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{!
+ @header DHCPClientPreferences.h
+ }
+
+{!
+ @function DHCPClientPreferencesSetApplicationOptions
+ @discussion Updates the DHCP client preferences to include the
+ given list of options for the given "applicationID".
+ @param applicationID The application's preference ID, for example:
+ "com.apple.SystemPreferences".
+ @param options An array of 8-bit values containing the
+ DHCP option codes (see RFC 2132) for this applicationID.
+ A NULL value will clear the list of options for this
+ application ID.
+ @param count The number of elements in "options".
+ @result TRUE if the operation succeeded, FALSE otherwise.
+ }
+
+function DHCPClientPreferencesSetApplicationOptions( applicationID: CFStringRef; options: UInt8Ptr; count: CFIndex ): Boolean; external name '_DHCPClientPreferencesSetApplicationOptions';
+
+{!
+ @function DHCPClientPreferencesCopyApplicationOptions
+ @discussion Copies the requested DHCP options for the
+ given "applicationID".
+ @param applicationID The application's preference ID, for example
+ "com.apple.SystemPreferences".
+ @param count The number of elements in the returned array.
+ @result The list of options for the given "applicationID", or
+ NULL if no options are defined or an error occurred.
+
+ When done, use free() to release a non-NULL return value.
+ }
+
+function DHCPClientPreferencesCopyApplicationOptions( applicationID: CFStringRef; var count: CFIndex ): UInt8Ptr; external name '_DHCPClientPreferencesCopyApplicationOptions';
+
+{unit DateTimeUtils}
+{
+ File: DateTimeUtils.p
+
+ Contains: International Date and Time Interfaces (previously in TextUtils)
+
+ Version: Technology: Mac OS 8.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1994-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+
+ Here are the current routine names and the translations to the older forms.
+ Please use the newer forms in all new code and migrate the older names out of existing
+ code as maintainance permits.
+
+ New Name Old Name(s)
+
+ DateString IUDatePString IUDateString
+ InitDateCache
+ LongDateString IULDateString
+ LongTimeString IULTimeString
+ StringToDate String2Date
+ StringToTime
+ TimeString IUTimeString IUTimePString
+ LongDateToSeconds LongDate2Secs
+ LongSecondsToDate LongSecs2Date
+ DateToSeconds Date2Secs
+ SecondsToDate Secs2Date
+
+
+ Carbon only supports the new names. The old names are undefined for Carbon targets.
+ This is true for C, Assembly and Pascal.
+
+ InterfaceLib always has exported the old names. For C macros have been defined to allow
+ the use of the new names. For Pascal and Assembly using the new names will result
+ in link errors.
+
+}
+
+
+type
+ ToggleResults = SInt16;
+const
+ { Toggle results }
+ toggleUndefined = 0;
+ toggleOK = 1;
+ toggleBadField = 2;
+ toggleBadDelta = 3;
+ toggleBadChar = 4;
+ toggleUnknown = 5;
+ toggleBadNum = 6;
+ toggleOutOfRange = 7; { synonym for toggleErr3 }
+ toggleErr3 = 7;
+ toggleErr4 = 8;
+ toggleErr5 = 9;
+
+ { Date equates }
+ smallDateBit = 31; { Restrict valid date/time to range of Time global }
+ togChar12HourBit = 30; { If toggling hour by char, accept hours 1..12 only }
+ togCharZCycleBit = 29; { Modifier for togChar12HourBit: accept hours 0..11 only }
+ togDelta12HourBit = 28; { If toggling hour up/down, restrict to 12-hour range (am/pm) }
+ genCdevRangeBit = 27; { Restrict date/time to range used by genl CDEV }
+ validDateFields = -1;
+ maxDateField = 10;
+
+ eraMask = $0001;
+ yearMask = $0002;
+ monthMask = $0004;
+ dayMask = $0008;
+ hourMask = $0010;
+ minuteMask = $0020;
+ secondMask = $0040;
+ dayOfWeekMask = $0080;
+ dayOfYearMask = $0100;
+ weekOfYearMask = $0200;
+ pmMask = $0400;
+ dateStdMask = $007F; { default for ValidDate flags and ToggleDate TogglePB.togFlags }
+
+
+type
+ LongDateField = SInt8;
+const
+ eraField = 0;
+ yearField = 1;
+ monthField = 2;
+ dayField = 3;
+ hourField = 4;
+ minuteField = 5;
+ secondField = 6;
+ dayOfWeekField = 7;
+ dayOfYearField = 8;
+ weekOfYearField = 9;
+ pmField = 10;
+ res1Field = 11;
+ res2Field = 12;
+ res3Field = 13;
+
+
+type
+ DateForm = SInt8;
+const
+ shortDate = 0;
+ longDate = 1;
+ abbrevDate = 2;
+
+ { StringToDate status values }
+ fatalDateTime = $8000; { StringToDate and String2Time mask to a fatal error }
+ longDateFound = 1; { StringToDate mask to long date found }
+ leftOverChars = 2; { StringToDate & Time mask to warn of left over characters }
+ sepNotIntlSep = 4; { StringToDate & Time mask to warn of non-standard separators }
+ fieldOrderNotIntl = 8; { StringToDate & Time mask to warn of non-standard field order }
+ extraneousStrings = 16; { StringToDate & Time mask to warn of unparsable strings in text }
+ tooManySeps = 32; { StringToDate & Time mask to warn of too many separators }
+ sepNotConsistent = 64; { StringToDate & Time mask to warn of inconsistent separators }
+ tokenErr = $8100; { StringToDate & Time mask for 'tokenizer err encountered' }
+ cantReadUtilities = $8200;
+ dateTimeNotFound = $8400;
+ dateTimeInvalid = $8800;
+
+
+type
+ StringToDateStatus = SInt16;
+ String2DateStatus = StringToDateStatus;
+ DateCacheRecordPtr = ^DateCacheRecord;
+ DateCacheRecord = packed record
+ hidden: array [0..255] of SInt16; { only for temporary use }
+ end;
+
+ DateCachePtr = ^DateCacheRecord;
+ DateTimeRecPtr = ^DateTimeRec;
+ DateTimeRec = record
+ year: SInt16;
+ month: SInt16;
+ day: SInt16;
+ hour: SInt16;
+ minute: SInt16;
+ second: SInt16;
+ dayOfWeek: SInt16;
+ end;
+
+ LongDateTime = SInt64;
+ LongDateTimePtr = ^LongDateTime;
+{$ifc TARGET_RT_BIG_ENDIAN}
+ LongDateCvt = record
+ case SInt16 of
+ 0: (
+ c: SInt64;
+ );
+ 1: (
+ lHigh: UInt32;
+ lLow: UInt32;
+ );
+ end;
+{$elsec}
+ LongDateCvt = record
+ case SInt16 of
+ 0: (
+ c: SInt64;
+ );
+ 1: (
+ lLow: UInt32;
+ lHigh: UInt32;
+ );
+ end;
+{$endc}
+ LongDateCvtPtr = ^LongDateCvt;
+
+ LongDateRecPtr = ^LongDateRec;
+ LongDateRec = record
+ case SInt16 of
+ 0: (
+ era: SInt16;
+ year: SInt16;
+ month: SInt16;
+ day: SInt16;
+ hour: SInt16;
+ minute: SInt16;
+ second: SInt16;
+ dayOfWeek: SInt16;
+ dayOfYear: SInt16;
+ weekOfYear: SInt16;
+ pm: SInt16;
+ res1: SInt16;
+ res2: SInt16;
+ res3: SInt16;
+ );
+ 1: (
+ list: array [0..13] of SInt16; { Index by LongDateField! }
+ );
+ 2: (
+ eraAlt: SInt16;
+ oldDate: DateTimeRec;
+ );
+ end;
+
+ DateDelta = SInt8;
+ TogglePBPtr = ^TogglePB;
+ TogglePB = record
+ togFlags: SInt32; { caller normally sets low word to dateStdMask=$7F }
+ amChars: ResType; { from 'itl0', but uppercased }
+ pmChars: ResType; { from 'itl0', but uppercased }
+ reserved: array [0..3] of SInt32;
+ end;
+
+ {
+ These routine are available in Carbon with their new name
+ }
+ {
+ * DateString()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DateString(dateTime: UInt32; longFlag: ByteParameter; var result: Str255; intlHandle: Handle); external name '_DateString';
+{
+ * TimeString()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure TimeString(dateTime: UInt32; wantSeconds: boolean; var result: Str255; intlHandle: Handle); external name '_TimeString';
+{
+ * LongDateString()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LongDateString((*const*) var dateTime: LongDateTime; longFlag: ByteParameter; var result: Str255; intlHandle: Handle); external name '_LongDateString';
+{
+ * LongTimeString()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LongTimeString((*const*) var dateTime: LongDateTime; wantSeconds: boolean; var result: Str255; intlHandle: Handle); external name '_LongTimeString';
+{
+ These routine are available in Carbon and InterfaceLib with their new name
+}
+{
+ * InitDateCache()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InitDateCache(theCache: DateCachePtr): OSErr; external name '_InitDateCache';
+{
+ * StringToDate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function StringToDate(textPtr: Ptr; textLen: SInt32; theCache: DateCachePtr; var lengthUsed: SInt32; var dateTime: LongDateRec): StringToDateStatus; external name '_StringToDate';
+{
+ * StringToTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function StringToTime(textPtr: Ptr; textLen: SInt32; theCache: DateCachePtr; var lengthUsed: SInt32; var dateTime: LongDateRec): StringToDateStatus; external name '_StringToTime';
+{
+ * LongDateToSeconds()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LongDateToSeconds(const (*var*) lDate: LongDateRec; var lSecs: LongDateTime); external name '_LongDateToSeconds';
+{
+ * LongSecondsToDate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LongSecondsToDate((*const*) var lSecs: LongDateTime; var lDate: LongDateRec); external name '_LongSecondsToDate';
+{
+ * ToggleDate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ToggleDate(var lSecs: LongDateTime; field: ByteParameter; delta: DateDelta; ch: SInt16; const (*var*) params: TogglePB): ToggleResults; external name '_ToggleDate';
+{
+ * ValidDate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ValidDate(const (*var*) vDate: LongDateRec; flags: SInt32; var newSecs: LongDateTime): SInt16; external name '_ValidDate';
+{
+ * ReadDateTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ReadDateTime(var time: UInt32): OSErr; external name '_ReadDateTime';
+{
+ * GetDateTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetDateTime(var secs: UInt32); external name '_GetDateTime';
+{
+ * SetDateTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetDateTime(time: UInt32): OSErr; external name '_SetDateTime';
+{
+ * SetTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetTime(const (*var*) d: DateTimeRec); external name '_SetTime';
+{
+ * GetTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetTime(var d: DateTimeRec); external name '_GetTime';
+{
+ * DateToSeconds()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DateToSeconds(const (*var*) d: DateTimeRec; var secs: UInt32); external name '_DateToSeconds';
+
+{
+ * SecondsToDate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SecondsToDate(secs: UInt32; var d: DateTimeRec); external name '_SecondsToDate';
+{
+ These routine are available in InterfaceLib using their old name.
+ Macros allow using the new names in all source code.
+}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * IUDateString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure IUDateString(dateTime: SInt32; longFlag: ByteParameter; var result: Str255); external name '_IUDateString';
+{
+ * IUTimeString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure IUTimeString(dateTime: SInt32; wantSeconds: boolean; var result: Str255); external name '_IUTimeString';
+{
+ * IUDatePString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure IUDatePString(dateTime: SInt32; longFlag: ByteParameter; var result: Str255; intlHandle: Handle); external name '_IUDatePString';
+{
+ * IUTimePString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure IUTimePString(dateTime: SInt32; wantSeconds: boolean; var result: Str255; intlHandle: Handle); external name '_IUTimePString';
+{
+ * IULDateString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure IULDateString(var dateTime: LongDateTime; longFlag: ByteParameter; var result: Str255; intlHandle: Handle); external name '_IULDateString';
+{
+ * IULTimeString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure IULTimeString(var dateTime: LongDateTime; wantSeconds: boolean; var result: Str255; intlHandle: Handle); external name '_IULTimeString';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ifc OLDROUTINENAMES}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LongDate2Secs()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LongDate2Secs(const (*var*) lDate: LongDateRec; var lSecs: LongDateTime); external name '_LongDate2Secs';
+{
+ * LongSecs2Date()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LongSecs2Date(var lSecs: LongDateTime; var lDate: LongDateRec); external name '_LongSecs2Date';
+{
+ * Date2Secs()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure Date2Secs(const (*var*) d: DateTimeRec; var secs: UInt32); external name '_Date2Secs';
+
+{
+ * Secs2Date()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure Secs2Date(secs: UInt32; var d: DateTimeRec); external name '_Secs2Date';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {OLDROUTINENAMES}
+
+
+{$ALIGN MAC68K}
+
+
+{unit DriverSynchronization}
+{
+ File: DriverSynchronization.p
+
+ Contains: Driver Synchronization Interfaces.
+
+ Version: Technology: MacOS 8
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * SynchronizeIO()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure SynchronizeIO; external name '_SynchronizeIO';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * CompareAndSwap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CompareAndSwap(oldVvalue: UInt32; newValue: UInt32; var OldValueAdr: UInt32): boolean; external name '_CompareAndSwap';
+
+{
+ * TestAndClear()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TestAndClear(bit: UInt32; startAddress: UnivPtr): boolean; external name '_TestAndClear';
+
+{
+ * TestAndSet()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TestAndSet(bit: UInt32; startAddress: UnivPtr): boolean; external name '_TestAndSet';
+
+{
+ * IncrementAtomic8()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IncrementAtomic8(var value: SInt8): SInt8; external name '_IncrementAtomic8';
+
+{
+ * DecrementAtomic8()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DecrementAtomic8(var value: SInt8): SInt8; external name '_DecrementAtomic8';
+
+{
+ * AddAtomic8()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AddAtomic8(amount: SInt32; var value: SInt8): SInt8; external name '_AddAtomic8';
+
+{
+ * BitAndAtomic8()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BitAndAtomic8(mask: UInt32; var value: UInt8): ByteParameter; external name '_BitAndAtomic8';
+
+{
+ * BitOrAtomic8()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BitOrAtomic8(mask: UInt32; var value: UInt8): ByteParameter; external name '_BitOrAtomic8';
+
+{
+ * BitXorAtomic8()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BitXorAtomic8(mask: UInt32; var value: UInt8): ByteParameter; external name '_BitXorAtomic8';
+
+{
+ * IncrementAtomic16()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IncrementAtomic16(var value: SInt16): SInt16; external name '_IncrementAtomic16';
+
+{
+ * DecrementAtomic16()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DecrementAtomic16(var value: SInt16): SInt16; external name '_DecrementAtomic16';
+
+{
+ * AddAtomic16()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AddAtomic16(amount: SInt32; var value: SInt16): SInt16; external name '_AddAtomic16';
+
+{
+ * BitAndAtomic16()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BitAndAtomic16(mask: UInt32; var value: UInt16): UInt16; external name '_BitAndAtomic16';
+
+{
+ * BitOrAtomic16()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BitOrAtomic16(mask: UInt32; var value: UInt16): UInt16; external name '_BitOrAtomic16';
+
+{
+ * BitXorAtomic16()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BitXorAtomic16(mask: UInt32; var value: UInt16): UInt16; external name '_BitXorAtomic16';
+
+{
+ * IncrementAtomic()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IncrementAtomic(var value: SInt32): SInt32; external name '_IncrementAtomic';
+
+{
+ * DecrementAtomic()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DecrementAtomic(var value: SInt32): SInt32; external name '_DecrementAtomic';
+
+{
+ * AddAtomic()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AddAtomic(amount: SInt32; var value: SInt32): SInt32; external name '_AddAtomic';
+
+{
+ * BitAndAtomic()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BitAndAtomic(mask: UInt32; var value: UInt32): UInt32; external name '_BitAndAtomic';
+
+{
+ * BitOrAtomic()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BitOrAtomic(mask: UInt32; var value: UInt32): UInt32; external name '_BitOrAtomic';
+
+{
+ * BitXorAtomic()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BitXorAtomic(mask: UInt32; var value: UInt32): UInt32; external name '_BitXorAtomic';
+
+
+{$ALIGN MAC68K}
+
+
+{unit Endian}
+{
+ File: CarbonCore/Endian.h
+
+ Contains: Endian swapping utilties
+
+ Version: CarbonCore-654.0.85~1
+
+ Copyright: © 1997-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+ This file provides Endian Flipping routines for dealing with converting data
+ between Big-Endian and Little-Endian machines. These routines are useful
+ when writing code to compile for both Big and Little Endian machines and
+ which must handle other endian number formats, such as reading or writing
+ to a file or network packet.
+
+ These routines are named as follows:
+
+ Endian<U><W>_<S>to<D>
+
+ where
+ <U> is whether the integer is signed ('S') or unsigned ('U')
+ <W> is integer bit width: 16, 32, or 64
+ <S> is the source endian format: 'B' for big, 'L' for little, or 'N' for native
+ <D> is the destination endian format: 'B' for big, 'L' for little, or 'N' for native
+
+ For example, to convert a Big Endian 32-bit unsigned integer to the current native format use:
+
+ long i = EndianU32_BtoN(data);
+
+ This file is set up so that the function macro to nothing when the target runtime already
+ is the desired format (e.g. on Big Endian machines, EndianU32_BtoN() macros away).
+
+ If long long's are not supported, you cannot get 64-bit quantities as a single value.
+ The macros are not defined in that case.
+
+ For gcc, the macros build on top of the inline byte swapping
+ routines from <libkern/OSByteOrder.h>, which may have better performance.
+
+
+ <<< W A R N I N G >>>
+
+ It is very important not to put any autoincrements inside the macros. This
+ will produce erroneous results because each time the address is accessed in the macro,
+ the increment occurs.
+
+ }
+ // Macros might be better solutions
+function Endian16_Swap( arg: UInt16 ): UInt16; inline;
+function Endian32_Swap( arg: UInt32 ): UInt32; inline;
+function Endian64_Swap_Pascal( arg: UInt64 ): UInt64; inline;
+function EndianS16_Swap( arg: SInt16 ): SInt16; inline;
+function EndianS32_Swap( arg: SInt32 ): SInt32; inline;
+function EndianS64_Swap( arg: SInt64 ): SInt64; inline;
+
+
+function Endian64_Swap( arg: UInt64 ): UInt64; inline;
+// Macro away no-op functions
+
+{$ifc TARGET_RT_BIG_ENDIAN}
+
+function EndianS16_BtoN( arg: SInt16 ): SInt16; inline;
+function EndianS16_NtoB( arg: SInt16 ): SInt16; inline;
+function EndianU16_BtoN( arg: UInt16 ): UInt16; inline;
+function EndianU16_NtoB( arg: UInt16 ): UInt16; inline;
+function EndianS32_BtoN( arg: SInt32 ): SInt32; inline;
+function EndianS32_NtoB( arg: SInt32 ): SInt32; inline;
+function EndianU32_BtoN( arg: UInt32 ): UInt32; inline;
+function EndianU32_NtoB( arg: UInt32 ): UInt32; inline;
+function EndianS64_BtoN( arg: SInt64 ): SInt64; inline;
+function EndianS64_NtoB( arg: SInt64 ): SInt64; inline;
+function EndianU64_BtoN( arg: UInt64 ): UInt64; inline;
+function EndianU64_NtoB( arg: UInt64 ): UInt64; inline;
+
+{$elsec}
+
+function EndianS16_LtoN( arg: SInt16 ): SInt16; inline;
+function EndianS16_NtoL( arg: SInt16 ): SInt16; inline;
+function EndianU16_LtoN( arg: UInt16 ): UInt16; inline;
+function EndianU16_NtoL( arg: UInt16 ): UInt16; inline;
+function EndianS32_LtoN( arg: SInt32 ): SInt32; inline;
+function EndianS32_NtoL( arg: SInt32 ): SInt32; inline;
+function EndianU32_LtoN( arg: UInt32 ): UInt32; inline;
+function EndianU32_NtoL( arg: UInt32 ): UInt32; inline;
+function EndianS64_LtoN( arg: SInt64 ): SInt64; inline;
+function EndianS64_NtoL( arg: SInt64 ): SInt64; inline;
+function EndianU64_LtoN( arg: UInt64 ): UInt64; inline;
+function EndianU64_NtoL( arg: UInt64 ): UInt64; inline;
+
+{$endc}
+
+// Map native to actual
+
+{$ifc TARGET_RT_BIG_ENDIAN}
+
+function EndianS16_LtoN( arg: SInt16 ): SInt16; inline;
+function EndianS16_NtoL( arg: SInt16 ): SInt16; inline;
+function EndianU16_LtoN( arg: UInt16 ): UInt16; inline;
+function EndianU16_NtoL( arg: UInt16 ): UInt16; inline;
+function EndianS32_LtoN( arg: SInt32 ): SInt32; inline;
+function EndianS32_NtoL( arg: SInt32 ): SInt32; inline;
+function EndianU32_LtoN( arg: UInt32 ): UInt32; inline;
+function EndianU32_NtoL( arg: UInt32 ): UInt32; inline;
+function EndianS64_LtoN( arg: SInt64 ): SInt64; inline;
+function EndianS64_NtoL( arg: SInt64 ): SInt64; inline;
+function EndianU64_LtoN( arg: UInt64 ): UInt64; inline;
+function EndianU64_NtoL( arg: UInt64 ): UInt64; inline;
+
+{$elsec}
+
+function EndianS16_BtoN( arg: SInt16 ): SInt16; inline;
+function EndianS16_NtoB( arg: SInt16 ): SInt16; inline;
+function EndianU16_BtoN( arg: UInt16 ): UInt16; inline;
+function EndianU16_NtoB( arg: UInt16 ): UInt16; inline;
+function EndianS32_BtoN( arg: SInt32 ): SInt32; inline;
+function EndianS32_NtoB( arg: SInt32 ): SInt32; inline;
+function EndianU32_BtoN( arg: UInt32 ): UInt32; inline;
+function EndianU32_NtoB( arg: UInt32 ): UInt32; inline;
+function EndianS64_BtoN( arg: SInt64 ): SInt64; inline;
+function EndianS64_NtoB( arg: SInt64 ): SInt64; inline;
+function EndianU64_BtoN( arg: UInt64 ): UInt64; inline;
+function EndianU64_NtoB( arg: UInt64 ): UInt64; inline;
+
+{$endc}
+
+// Implement *LtoB and *BtoL
+
+function EndianS16_LtoB( arg: SInt16 ): SInt16; inline;
+function EndianS16_BtoL( arg: SInt16 ): SInt16; inline;
+function EndianU16_LtoB( arg: UInt16 ): UInt16; inline;
+function EndianU16_BtoL( arg: UInt16 ): UInt16; inline;
+function EndianS32_LtoB( arg: SInt32 ): SInt32; inline;
+function EndianS32_BtoL( arg: SInt32 ): SInt32; inline;
+function EndianU32_LtoB( arg: UInt32 ): UInt32; inline;
+function EndianU32_BtoL( arg: UInt32 ): UInt32; inline;
+function EndianS64_LtoB( arg: SInt64 ): SInt64; inline;
+function EndianS64_BtoL( arg: SInt64 ): SInt64; inline;
+function EndianU64_LtoB( arg: UInt64 ): UInt64; inline;
+function EndianU64_BtoL( arg: UInt64 ): UInt64; inline;
+
+{
+ These types are used for structures that contain data that is
+ always in BigEndian format. This extra typing prevents little
+ endian code from directly changing the data, thus saving much
+ time in the debugger.
+}
+
+{$ifc TARGET_RT_LITTLE_ENDIAN}
+
+type
+ BigEndianLong = record
+ bigEndianValue: SInt32;
+ end;
+
+ BigEndianUnsignedLong = record
+ bigEndianValue: UInt32;
+ end;
+
+ BigEndianShort = record
+ bigEndianValue: SInt16;
+ end;
+
+ BigEndianUnsignedShort = record
+ bigEndianValue: UInt16;
+ end;
+
+ BigEndianFixed = record
+ bigEndianValue: Fixed;
+ end;
+
+ BigEndianUnsignedFixed = record
+ bigEndianValue: UnsignedFixed;
+ end;
+
+ BigEndianOSType = record
+ bigEndianValue: OSType;
+ end;
+
+{$elsec}
+
+type
+ BigEndianLong = SInt32;
+ BigEndianUnsignedLong = UInt32;
+ BigEndianShort = SInt16;
+ BigEndianUnsignedShort = UInt16;
+ BigEndianFixed = Fixed;
+ BigEndianUnsignedFixed = UnsignedFixed;
+ BigEndianOSType = OSType;
+{$endc} {TARGET_RT_LITTLE_ENDIAN}
+
+type
+ BigEndianLongPtr = ^BigEndianLong;
+ BigEndianUnsignedLongPtr = ^BigEndianUnsignedLong;
+ BigEndianShortPtr = ^BigEndianShort;
+ BigEndianUnsignedShortPtr = ^BigEndianUnsignedShort;
+ BigEndianFixedPtr = ^BigEndianFixed;
+ BigEndianUnsignedFixedPtr = ^BigEndianUnsignedFixed;
+ BigEndianOSTypePtr = ^BigEndianOSType;
+
+{
+ CoreEndian flipping API.
+
+ This API is used to generically massage data buffers, in
+ place, from one endian architecture to another. In effect,
+ the API supports registering a set of callbacks that can
+ effect this translation.
+
+ The data types have specific meanings within their domain,
+ although some data types can be registered with the same
+ callback in several domains. There is no wildcard domain.
+
+ A set of pre-defined flippers are implemented by the Carbon
+ frameworks for most common resource manager and AppleEvent data
+ types.
+ }
+const
+ kCoreEndianResourceManagerDomain = $72737263 (* 'rsrc' *);
+ kCoreEndianAppleEventManagerDomain = $61657674 (* 'aevt' *);
+
+
+{
+ * CoreEndianFlipProc
+ *
+ * Discussion:
+ * Callback use to flip endian-ness of typed data
+ *
+ * Parameters:
+ *
+ * dataDomain:
+ * Domain of the data type
+ *
+ * dataType:
+ * Type of data being flipped
+ *
+ * id:
+ * resource id (if being flipped on behalf of the resource
+ * manager, otherwise will be zero)
+ *
+ * dataPtr:
+ * Pointer to the data
+ *
+ * dataSize:
+ * Length of the data
+ *
+ * currentlyNative:
+ * Boolean indicating which direction to flip: false means flip
+ * from disk big endian to native (from disk), true means flip
+ * from native to disk big endian (to disk)
+ *
+ * refcon:
+ * An optional user reference supplied when the flipper is
+ * installed
+ *
+ * Result:
+ * Error code indicating whether the data was flipped. noErr would
+ * indicate that the data was flipped as appropriate; any other
+ * error will be propagated back to the caller.
+ }
+type
+ CoreEndianFlipProc = function( dataDomain: OSType; dataType: OSType; id: SInt16; dataPtr: UnivPtr; dataSize: UInt32; currentlyNative: Boolean; refcon: UnivPtr ): OSStatus;
+{
+ * Install a flipper for this application
+ }
+{
+ * CoreEndianInstallFlipper()
+ *
+ * Summary:
+ * Installs a flipper proc for the given data type. If the flipper
+ * is already registered, this flipper will take replace it.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * dataDomain:
+ * Domain of the data type
+ *
+ * dataType:
+ * Type of data for which this flipper should be installed
+ *
+ * proc:
+ * Flipper callback to be called for data of this type
+ *
+ * refcon:
+ * Optional user reference for the flipper
+ *
+ * Result:
+ * Error code indicating whether or not the flipper could be
+ * installed
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function CoreEndianInstallFlipper( dataDomain: OSType; dataType: OSType; proc: CoreEndianFlipProc; refcon: UnivPtr { can be NULL } ): OSStatus; external name '_CoreEndianInstallFlipper';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * CoreEndianGetFlipper()
+ *
+ * Summary:
+ * Gets an existing data flipper proc for the given data type
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * dataDomain:
+ * Domain of the data type
+ *
+ * dataType:
+ * Type of the data for which this flipper should be installed
+ *
+ * proc:
+ * Pointer to a flipper callback
+ *
+ * refcon:
+ * Pointer to the callback refcon
+ *
+ * Result:
+ * noErr if the given flipper could be found; otherwise
+ * handlerNotFoundErr will be returned.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function CoreEndianGetFlipper( dataDomain: OSType; dataType: OSType; var proc: CoreEndianFlipProc; refcon: UnivPtrPtr ): OSStatus; external name '_CoreEndianGetFlipper';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * CoreEndianFlipData()
+ *
+ * Summary:
+ * Calls the flipper for the given data type with the associated data
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * dataDomain:
+ * Domain of the data type
+ *
+ * dataType:
+ * type of the data
+ *
+ * id:
+ * resource id (if not a resource, pass zero)
+ *
+ * data:
+ * a pointer to the data to be flipped (in place)
+ *
+ * dataLen:
+ * length of the data to flip
+ *
+ * currentlyNative:
+ * a boolean indicating the direction to flip (whether the data is
+ * currently native endian or big-endian)
+ *
+ * Result:
+ * Error code indicating whether the data was flipped. If
+ * handlerNotFound is returned, then no flipping took place (which
+ * is not necessarily an error condtion)
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function CoreEndianFlipData( dataDomain: OSType; dataType: OSType; id: SInt16; data: UnivPtr; dataLen: UInt32; currentlyNative: Boolean ): OSStatus; external name '_CoreEndianFlipData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+
+
+{unit FileTypesAndCreators}
+{
+ File: FileTypesAndCreators.p
+
+ Contains: Symbolic constants for FileTypes and signatures of popular documents.
+
+ Version: Technology: Macintosh Easy Open 1.1
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1992-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+
+Motivation for FileTypesAndCreators.h
+
+ The TranslationMgr (Macintosh Easy Open) uses ÒFileTypesÓ to express and manage
+ translation capabilities. This works well for most Macintosh applications. It
+ simply uses the file type stored in the catalog info by HFS. But, the TranslationMgr
+ needs to work with non-Macintosh files. These do not have file types (or creators).
+ Another problem is some Macintosh applications keep the same file type for a file
+ after changing the file format from one version to the next. Thus, the HFS file type
+ cannot be used to distinguish between formats.
+
+ This file is an effort to define FileTypes and creator codes for non-Macintosh file
+ formats and define FileTypes that distinguish between formats.
+
+
+There are two main categories of constants defined in FileTypesAndCreators.h. One is
+creator signatures of applications the other is file types. To make this easier to use,
+some style guidelines are provided.
+
+Creators:
+
+ The symbolic constant for all creator codes begin with ÒsigÓ. Following ÒsigÓ is the
+ application name. Example:
+
+ sigSurfWriter = 'SURF'
+
+ If the application name is localized for different markets, the name of the U.S.
+ version is always used. It is optional to make symbolic constants for localized names.
+ If a U.S. is not available, another Roman name is used (this is for ease of editing
+ in MPW.) Example:
+
+ sigSurfWriter = 'SURF',
+ sigSkiWriter = 'SURF' // optional definition of Canadian name of app
+
+ If multiple versions of an application exist, and the creator codes are different,
+ then the version number is added to the end of the symbolic name, for the first version
+ in which the signature changed. Example:
+
+ sigDirtWriter = 'DIRT', // version 1 and 2 used same signature
+ sigDirtWriter3 = 'DRT3'
+
+ If a developer has the same application on another platform as is on the Mac, then the
+ creator for a file from the other platform should be the same as the creator of the
+ Macintosh application. Example:
+
+ sigMicrosoftWord = 'MSWD' // used for Mac and Windows documents
+
+ If there is no similar Macintosh product, then the signature of the platform is used.
+ Example:
+
+ sigPCDOS = 'mdos', // for DOS and Windows
+ sigAppleProDos = 'pdos'
+
+
+FileTypes:
+
+ The symbolic constant for all file types begin with ÒftÓ. Following ÒftÓ is the ideal
+ kind for that document. Example:
+
+ ftSurfWriterDocument = 'SRFD'
+
+ If the application name is localized for different markets, the kind string of the U.S.
+ version is always used. It is optional to make symbolic constants for localized kind
+ strings. If a U.S. is not available, another Roman kind string is used (this is for
+ ease of editing in MPW.) Example:
+
+ ftSurfWriterDocument = 'SRFD,
+ ftSkiWriterDocument = 'SRFD' // optional Canadian name
+
+ If multiple versions of an application exist, and the document for files created by each
+ are different (meaning one version of the app can not read the documents of a newer
+ version), then the version number is added to the end of the symbolic name, for the
+ first version in which the format changed. Example:
+
+ // version 1 and 2 docs have same format, version 3 has a different format
+ ftDirtWriterDocument = 'DDRT',
+ ftDirtWriter3Document = '3DRT'
+
+ If multiple versions of an application exist, and the document for files created by each
+ are different, but the catInfo file type has always been the same, then constants are
+ made for each unique format and one is made for the catInfo type actually used.
+
+ ftWordDocument = 'WDBN',
+ ftWord3Document = 'WDB3',
+ ftWord4Document = 'WDB4',
+ ftWord5Document = 'WDB5'
+
+ If a developer has the same application on another platform as is on the Mac and the file
+ formats are the same (binary interchangeable), then the file type for a file from the other
+ platform should be the same as the file type of the Macintosh document. Example:
+
+ ftPageMakerPublication = 'ALB4' // used for Mac and PC documents
+
+ If there is no similar Macintosh document format, then a file type is made up. If the
+ program is used on two different non-Mac platforms and their file formats are not the
+ same, the platform name is added to the name. Typically after the program name and before
+ document. Example:
+
+ ftXyWriteIIIDocument = 'XyWr' // XyWriteIII only has a PC format
+ ftSurfWindowsDocument = 'SRFW' // Surf Windows file format
+ ftSurfPCDocument = 'SRFP' // Surf PC file format
+}
+
+{************* Macintosh applications and FileTypes *************}
+
+
+const
+ { Mac word processors }
+ sigWord = $4D535744 (* 'MSWD' *);
+ ftWord3Document = $4D535733 (* 'MSW3' *);
+ ftWord4Document = $4D535734 (* 'MSW4' *);
+ ftWord5Document = $4D535735 (* 'MSW5' *);
+ ftWordDocument = $5744424E (* 'WDBN' *);
+ ftWordDocumentPC = $4D575043 (* 'MWPC' *); { not registered }
+ ftWord1DocumentWindows = $57573120 (* 'WW1 ' *); { not registered }
+ ftWord2DocumentWindows = $57573220 (* 'WW2 ' *); { not registered }
+ ftRTFDocument = $52544620 (* 'RTF ' *); { not registered }
+ sigWordPerfect = $53534957 (* 'SSIW' *);
+ ftWordPerfectDocument = $57504430 (* 'WPD0' *);
+ sigWordPerfect2 = $57504332 (* 'WPC2' *);
+ ftWordPerfect2Document = $57504431 (* 'WPD1' *);
+ ftWordPerfect21Document = $57504432 (* 'WPD2' *);
+ ftWordPerfect42DocumentPC = $2E575034 (* '.WP4' *); { not registered }
+ ftWordPerfect50DocumentPC = $2E575035 (* '.WP5' *); { not registered }
+ ftWordPerfect51DocumentPC = $57503531 (* 'WP51' *); { not registered }
+ ftWordPerfectGraphicsPC = $57504766 (* 'WPGf' *); { not registered }
+ sigMacWriteII = $4D574949 (* 'MWII' *);
+ ftMacWriteIIDocument = $4D573244 (* 'MW2D' *);
+ sigWriteNow = $6E585E6E (* 'nX^n' *);
+ ftWriteNow2Document = $6E585E64 (* 'nX^d' *);
+ ftWriteNow3Document = $6E585E32 (* 'nX^2' *);
+ sigMacWrite = $4D414341 (* 'MACA' *);
+ ftMacWrite5Document = $574F5244 (* 'WORD' *);
+ sigFrameMaker = $4672616D (* 'Fram' *);
+ ftFrameMakerDocument = $4641534C (* 'FASL' *);
+ ftFrameMakerMIFDocument = $4D494620 (* 'MIF ' *);
+ ftFrameMakerMIF2Document = $4D494632 (* 'MIF2' *);
+ ftFrameMakerMIF3Document = $4D494633 (* 'MIF3' *);
+ sigMSWrite = $4D535754 (* 'MSWT' *);
+ sigActa = $41435441 (* 'ACTA' *);
+ sigTHINKPascal = $504A4D4D (* 'PJMM' *);
+ sigTHINKC = $4B41484C (* 'KAHL' *);
+ sigFullWrite = $46575254 (* 'FWRT' *);
+ sigTeachText = $74747874 (* 'ttxt' *);
+ ftTeachTextDocument = $7474726F (* 'ttro' *);
+ sigSimpleText = $74747874 (* 'ttxt' *);
+ ftSimpleTextDocument = $7474726F (* 'ttro' *);
+ sigMPWShell = $4D505320 (* 'MPS ' *);
+ sigQuarkXPress = $58505233 (* 'XPR3' *);
+ sigNisus = $4E495349 (* 'NISI' *);
+ sigOmniPage = $50525443 (* 'PRTC' *);
+ sigPersonalPress = $53435047 (* 'SCPG' *);
+ sigPublishItEZ = $32435459 (* '2CTY' *);
+ sigReadySetGo = $4D454D52 (* 'MEMR' *);
+ sigRagTime = $52232B41 (* 'R#+A' *);
+ sigLetraStudio = $4C535450 (* 'LSTP' *);
+ sigLetterPerfect = $57504349 (* 'WPCI' *);
+ sigTheWritingCenter = $0A1A5750; { this 'unprintable unprintable WP' One of the unprintables is a line feed. }
+ sigInstantUpdate = $49554130 (* 'IUA0' *);
+
+ { databases }
+ sig4thDimension = $34443033 (* '4D03' *);
+ ft4thDimensionDB = $42415333 (* 'BAS3' *);
+ sigFileMakerPro = $464D5052 (* 'FMPR' *);
+ ftFileMakerProDatabase = $464D5052 (* 'FMPR' *);
+ sigHyperCard = $57494C44 (* 'WILD' *);
+ ftHyperCard = $5354414B (* 'STAK' *);
+ sigSmartFormAsst = $4B43464D (* 'KCFM' *);
+ ftSmartFormAsst = $5354434B (* 'STCK' *);
+ sigSmartFormDesign = $4B434644 (* 'KCFD' *);
+ ftSmartFormDesign = $4346524D (* 'CFRM' *);
+ sigFileForce = $34443933 (* '4D93' *);
+ ftFileForceDatabase = $46494C33 (* 'FIL3' *);
+ sigFileMaker2 = $464D4B34 (* 'FMK4' *);
+ ftFileMaker2Database = $464D4B24 (* 'FMK$' *);
+ sigSuperCard = $52554E54 (* 'RUNT' *);
+ sigDoubleHelix = $48454C58 (* 'HELX' *);
+ sigGeoQuery = $52476771 (* 'RGgq' *);
+ sigFoxBASE = $464F582B (* 'FOX+' *);
+ sigINSPIRATION = $43455233 (* 'CER3' *);
+ sigPanorama = $4B415331 (* 'KAS1' *);
+ sigSilverrunLDM = $43444D4C (* 'CDML' *);
+ sigSilverrunDFD = $43444446 (* 'CDDF' *); { finance }
+ sigQuicken = $494E5455 (* 'INTU' *);
+ sigMacInTax91 = $4D495431 (* 'MIT1' *);
+ ftMacInTax91 = $4D495446 (* 'MITF' *);
+ sigAccountantInc = $4150524F (* 'APRO' *);
+ sigAtOnce = $4B495353 (* 'KISS' *);
+ sigCAT3 = $74436174 (* 'tCat' *);
+ sigDollarsNSense = $45414750 (* 'EAGP' *);
+ sigInsightExpert = $4C53474C (* 'LSGL' *);
+ sigMYOB = $4D594F42 (* 'MYOB' *);
+ sigMacMoney = $53534C41 (* 'SSLA' *);
+ sigManagingYourMoney = $4D594D43 (* 'MYMC' *);
+ sigPlainsAndSimple = $50454747 (* 'PEGG' *); { scheduling }
+ sigMacProject2 = $4D505258 (* 'MPRX' *);
+ ftMacProject = $4D505244 (* 'MPRD' *);
+ sigMSProject = $4D53504A (* 'MSPJ' *);
+ sigMacProjectPro = $4D505250 (* 'MPRP' *); { utilities }
+ sigStuffIt = $53495421 (* 'SIT!' *);
+ ftStuffItArchive = $53495421 (* 'SIT!' *);
+ sigCompactPro = $43504354 (* 'CPCT' *);
+ ftCompactProArchive = $50414354 (* 'PACT' *);
+ sigFontographer = $61436132 (* 'aCa2' *);
+ sigMetamorphosis = $4D457450 (* 'MEtP' *);
+ sigCorrectGrammar = $4C734347 (* 'LsCG' *);
+ sigDynodex = $44594E4F (* 'DYNO' *);
+ sigMariah = $4D617248 (* 'MarH' *);
+ sigAddressBook = $4164426B (* 'AdBk' *);
+ sigThePrintShop = $50534850 (* 'PSHP' *);
+ sigQuicKeys2 = $516B7932 (* 'Qky2' *);
+ sigReadStar2Plus = $494E4F56 (* 'INOV' *);
+ sigSoftPC = $50435854 (* 'PCXT' *);
+ sigMacMenlo = $4D4E4C4F (* 'MNLO' *);
+ sigDisinfectant = $44324354 (* 'D2CT' *); { communications }
+ sigSmartcom2 = $53434F4D (* 'SCOM' *);
+ sigVersaTermPRO = $5650524F (* 'VPRO' *);
+ sigVersaTerm = $5641544D (* 'VATM' *);
+ sigWhiteKnight = $574B3131 (* 'WK11' *);
+ sigNCSATelnet = $4E435341 (* 'NCSA' *);
+ sigDynaComm = $50415232 (* 'PAR2' *);
+ sigQMForms = $4D4C544D (* 'MLTM' *); { math and statistics }
+ sigMathematica = $4F4D4547 (* 'OMEG' *);
+ sigMathCAD = $4D434144 (* 'MCAD' *);
+ sigStatView2 = $53544154 (* 'STAT' *);
+ sigDataDesk = $4444534B (* 'DDSK' *);
+ sigPowerMath2 = $4D415448 (* 'MATH' *);
+ sigSuperANOVA = $53757041 (* 'SupA' *);
+ sigSystat = $53595431 (* 'SYT1' *);
+ sigTheorist = $5468656F (* 'Theo' *);
+
+ { spreadsheets }
+ sigExcel = $5843454C (* 'XCEL' *);
+ ftExcel2Spreadsheet = $584C5320 (* 'XLS ' *);
+ ftExcel2Macro = $584C4D20 (* 'XLM ' *);
+ ftExcel2Chart = $584C4320 (* 'XLC ' *);
+ ftExcel3Spreadsheet = $584C5333 (* 'XLS3' *);
+ ftExcel3Macro = $584C4D33 (* 'XLM3' *);
+ ftExcel3Chart = $584C4333 (* 'XLC3' *);
+ ftExcel4Spreadsheet = $584C5334 (* 'XLS4' *);
+ ftExcel4Macro = $584C4D34 (* 'XLM4' *);
+ ftSYLKSpreadsheet = $53594C4B (* 'SYLK' *);
+ sigLotus123 = $4C313233 (* 'L123' *);
+ ft123Spreadsheet = $4C574B53 (* 'LWKS' *);
+ sigWingz = $574E475A (* 'WNGZ' *);
+ ftWingzSpreadsheet = $575A5353 (* 'WZSS' *);
+ ftWingzScript = $575A5343 (* 'WZSC' *);
+ sigResolve = $52736C76 (* 'Rslv' *);
+ ftResolve = $52735773 (* 'RsWs' *);
+ ftResolveScript = $52735763 (* 'RsWc' *);
+ sigFullImpact2 = $466C7632 (* 'Flv2' *);
+
+ { graphics }
+ sigIllustrator = $41525435 (* 'ART5' *);
+ ftPostScriptMac = $45505346 (* 'EPSF' *);
+ sigMacPaint = $4D504E54 (* 'MPNT' *);
+ ftMacPaintGraphic = $504E5447 (* 'PNTG' *);
+ sigSuperPaint = $53504E54 (* 'SPNT' *);
+ ftSuperPaintGraphic = $53505447 (* 'SPTG' *);
+ sigCanvas = $44414432 (* 'DAD2' *);
+ ftCanvasGraphic = $64727732 (* 'drw2' *);
+ sigUltraPaint = $554C5452 (* 'ULTR' *);
+ ftUltraPaint = $55504E54 (* 'UPNT' *);
+ sigPhotoshop = $3842494D (* '8BIM' *);
+ ftPhotoshopGraphic = $3842494D (* '8BIM' *);
+ sigMacDrawPro = $6450726F (* 'dPro' *);
+ ftMacDrawProDrawing = $64446F63 (* 'dDoc' *);
+ sigPageMaker = $414C4434 (* 'ALD4' *);
+ ftPageMakerPublication = $414C4234 (* 'ALB4' *);
+ sigFreeHand = $46484133 (* 'FHA3' *);
+ ftFreeHandDrawing = $46484433 (* 'FHD3' *);
+ sigClarisCAD = $43434144 (* 'CCAD' *);
+ ftClarisCAD = $43414432 (* 'CAD2' *);
+ sigMacDrawII = $4D44504C (* 'MDPL' *);
+ ftMacDrawIIDrawing = $44525747 (* 'DRWG' *);
+ sigMacroMindDirector = $4D4D4452 (* 'MMDR' *);
+ ftMMDirectorMovie = $56574D44 (* 'VWMD' *);
+ ftMMDirectorSound = $4D4D5344 (* 'MMSD' *);
+ sigOptix = $5049584C (* 'PIXL' *); { was previously PixelPerfect }
+ sigPixelPaint = $50495852 (* 'PIXR' *);
+ ftPixelPaint = $50583031 (* 'PX01' *);
+ sigAldusSuper3D = $53503344 (* 'SP3D' *);
+ ftSuper3DDrawing = $33444258 (* '3DBX' *);
+ sigSwivel3D = $5357564C (* 'SWVL' *);
+ ftSwivel3DDrawing = $534D444C (* 'SMDL' *);
+ sigCricketDraw = $43524457 (* 'CRDW' *);
+ ftCricketDrawing = $434B4454 (* 'CKDT' *);
+ sigCricketGraph = $43475246 (* 'CGRF' *);
+ ftCricketChart = $43475043 (* 'CGPC' *);
+ sigDesignCAD = $41534243 (* 'ASBC' *);
+ ftDesignCADDrawing = $44434144 (* 'DCAD' *);
+ sigImageStudio = $46535045 (* 'FSPE' *);
+ ftImageStudioGraphic = $52494646 (* 'RIFF' *);
+ sigVersaCad = $56434144 (* 'VCAD' *);
+ ftVersaCADDrawing = $32442020 (* '2D ' *);
+ sigAdobePremiere = $50724D72 (* 'PrMr' *); { was previously misspelled as sigAdobePremier }
+ ftAdobePremiereMovie = $4D6F6F56 (* 'MooV' *); { was previously misspelled as ftAdobePremierMovie }
+ sigAfterDark = $4144726B (* 'ADrk' *);
+ ftAfterDarkModule = $4144676D (* 'ADgm' *);
+ sigClip3D = $455A3345 (* 'EZ3E' *);
+ ftClip3Dgraphic = $455A3344 (* 'EZ3D' *);
+ sigKaleidaGraph = $514B5054 (* 'QKPT' *);
+ ftKaleidaGraphGraphic = $51504354 (* 'QPCT' *);
+ sigMacFlow = $4D43464C (* 'MCFL' *);
+ ftMacFlowChart = $464C4348 (* 'FLCH' *);
+ sigMoviePlayer = $54564F44 (* 'TVOD' *);
+ ftMoviePlayerMovie = $4D6F6F56 (* 'MooV' *);
+ sigMacSpin = $44325350 (* 'D2SP' *);
+ ftMacSpinDataSet = $4432424E (* 'D2BN' *);
+ sigAutoCAD = $41434144 (* 'ACAD' *);
+ sigLabVIEW = $4C425657 (* 'LBVW' *);
+ sigColorMacCheese = $434D43E2 (* 'CMCÆ' *);
+ sigMiniCad = $43445033 (* 'CDP3' *);
+ sigDreams = $50484E58 (* 'PHNX' *);
+ sigOmnis5 = $51322424 (* 'Q2$$' *);
+ sigPhotoMac = $504D4143 (* 'PMAC' *);
+ sigGraphMaster = $4752414D (* 'GRAM' *);
+ sigInfiniD = $5349E288 (* 'SI°D' *);
+ sigOfoto = $41504C53 (* 'APLS' *);
+ sigMacDraw = $4D445257 (* 'MDRW' *);
+ sigDeltagraphPro = $44475248 (* 'DGRH' *);
+ sigDesign2 = $44455347 (* 'DESG' *);
+ sigDesignStudio = $4D524A4E (* 'MRJN' *);
+ sigDynaperspective = $50455253 (* 'PERS' *);
+ sigGenericCADD = $43414433 (* 'CAD3' *);
+ sigMacDraft = $4D443230 (* 'MD20' *);
+ sigModelShop = $4D445350 (* 'MDSP' *);
+ sigOasis = $54414F41 (* 'TAOA' *);
+ sigOBJECTMASTER = $42524F57 (* 'BROW' *);
+ sigMovieRecorder = $6D726372 (* 'mrcr' *);
+ sigPictureCompressor = $70707869 (* 'ppxi' *);
+ sigPICTViewer = $4D445453 (* 'MDTS' *);
+ sigSmoothie = $536D6F6F (* 'Smoo' *);
+ sigScreenPlay = $53504C59 (* 'SPLY' *);
+ sigStudio1 = $53542F31 (* 'ST/1' *);
+ sigStudio32 = $53543332 (* 'ST32' *);
+ sigStudio8 = $53542F38 (* 'ST/8' *);
+ sigKidPix = $4B696432 (* 'Kid2' *);
+ sigDigDarkroom = $44494452 (* 'DIDR' *);
+
+ { presentations }
+ sigMore = $4D4F5232 (* 'MOR2' *);
+ ftMore3Document = $4D4F5233 (* 'MOR3' *);
+ ftMore2Document = $4D4F5232 (* 'MOR2' *);
+ sigPersuasion = $504C5032 (* 'PLP2' *);
+ ftPersuasion1Presentation = $50525331 (* 'PRS1' *);
+ ftPersuasion2Presentation = $50525332 (* 'PRS2' *);
+ sigPowerPoint = $50504E54 (* 'PPNT' *);
+ ftPowerPointPresentation = $534C4453 (* 'SLDS' *);
+ sigCricketPresents = $43525052 (* 'CRPR' *);
+ ftCricketPresentation = $50524446 (* 'PRDF' *); { works }
+ sigMSWorks = $50534932 (* 'PSI2' *);
+ sigMSWorks3 = $4D53574B (* 'MSWK' *);
+ ftMSWorksWordProcessor = $41575750 (* 'AWWP' *);
+ ftMSWorksSpreadsheet = $41575353 (* 'AWSS' *);
+ ftMSWorksDataBase = $41574442 (* 'AWDB' *);
+ ftMSWorksComm = $41574443 (* 'AWDC' *);
+ ftMSWorksMacros = $41574D43 (* 'AWMC' *);
+ ftMSWorks1WordProcessor = $41575731 (* 'AWW1' *); { not registered }
+ ftMSWorks1Spreadsheet = $41575331 (* 'AWS1' *); { not registered }
+ ftMSWorks1DataBase = $41574431 (* 'AWD1' *); { not registered }
+ ftMSWorks2WordProcessor = $41575732 (* 'AWW2' *); { not registered }
+ ftMSWorks2Spreadsheet = $41575332 (* 'AWS2' *); { not registered }
+ ftMSWorks2DataBase = $41574432 (* 'AWD2' *); { not registered }
+ ftMSWorks3WordProcessor = $41575733 (* 'AWW3' *); { not registered }
+ ftMSWorks3Spreadsheet = $41575333 (* 'AWS3' *); { not registered }
+ ftMSWorks3DataBase = $41574433 (* 'AWD3' *); { not registered }
+ ftMSWorks3Comm = $41574333 (* 'AWC3' *); { not registered }
+ ftMSWorks3Macro = $41574D33 (* 'AWM3' *); { not registered }
+ ftMSWorks3Draw = $41575233 (* 'AWR3' *); { not registered }
+ ftMSWorks2WordProcessorPC = $50575732 (* 'PWW2' *); { not registered }
+ ftMSWorks2DatabasePC = $50574442 (* 'PWDB' *); { not registered }
+ sigGreatWorks = $5A454252 (* 'ZEBR' *);
+ ftGreatWorksWordProcessor = $5A575254 (* 'ZWRT' *);
+ ftGreatWorksSpreadsheet = $5A43414C (* 'ZCAL' *);
+ ftGreatWorksPaint = $5A504E54 (* 'ZPNT' *);
+ sigClarisWorks = $424F424F (* 'BOBO' *);
+ ftClarisWorksWordProcessor = $43575750 (* 'CWWP' *);
+ ftClarisWorksSpreadsheet = $43575353 (* 'CWSS' *);
+ ftClarisWorksGraphics = $43574752 (* 'CWGR' *);
+ sigBeagleWorks = $42576B73 (* 'BWks' *);
+ ftBeagleWorksWordProcessor = $42577770 (* 'BWwp' *);
+ ftBeagleWorksDatabase = $42576462 (* 'BWdb' *);
+ ftBeagleWorksSpreadsheet = $42577373 (* 'BWss' *);
+ ftBeagleWorksComm = $4257636D (* 'BWcm' *);
+ ftBeagleWorksDrawing = $42576472 (* 'BWdr' *);
+ ftBeagleWorksGraphic = $42577074 (* 'BWpt' *);
+ ftPICTFile = $50494354 (* 'PICT' *);
+
+ { entertainment }
+ sigPGATourGolf = $674F4C46 (* 'gOLF' *);
+ sigSimCity = $4D435250 (* 'MCRP' *);
+ sigHellCats = $48454C4C (* 'HELL' *); { education }
+ sigReaderRabbit3 = $52445233 (* 'RDR3' *); { Translation applications }
+ sigDataVizDesktop = $44564454 (* 'DVDT' *);
+ sigSotwareBridge = $6D646F73 (* 'mdos' *);
+ sigWordForWord = $4D535452 (* 'MSTR' *);
+ sigAppleFileExchange = $50535054 (* 'PSPT' *); { Apple software }
+ sigAppleLink = $47454F4C (* 'GEOL' *);
+ ftAppleLinkAddressBook = $41445253 (* 'ADRS' *);
+ ftAppleLinkImageFile = $53494D41 (* 'SIMA' *);
+ ftAppleLinkPackage = $48425346 (* 'HBSF' *);
+ ftAppleLinkConnFile = $50455445 (* 'PETE' *);
+ ftAppleLinkHelp = $484C5046 (* 'HLPF' *);
+ sigInstaller = $626A6263 (* 'bjbc' *);
+ ftInstallerScript = $626A6263 (* 'bjbc' *);
+ sigDiskCopy = $64437079 (* 'dCpy' *);
+ ftDiskCopyImage = $64496D67 (* 'dImg' *);
+ sigResEdit = $52534544 (* 'RSED' *);
+ ftResEditResourceFile = $72737263 (* 'rsrc' *);
+ sigAardvark = $41415244 (* 'AARD' *);
+ sigCompatibilityChkr = $776B7270 (* 'wkrp' *);
+ sigMacTerminal = $5465726D (* 'Term' *);
+ sigSADE = $73616465 (* 'sade' *);
+ sigCurare = $43757261 (* 'Cura' *);
+ sigPCXChange = $646F7361 (* 'dosa' *);
+ sigAtEase = $6D666472 (* 'mfdr' *);
+ sigStockItToMe = $5349544D (* 'SITM' *);
+ sigAppleSearch = $61736973 (* 'asis' *);
+ sigAppleSearchToo = $686F6273 (* 'hobs' *); { the following are files types for system files }
+ ftScriptSystemResourceCollection = $6966696C (* 'ifil' *);
+ ftSoundFile = $7366696C (* 'sfil' *);
+ ftFontFile = $6666696C (* 'ffil' *);
+ ftTrueTypeFontFile = $7466696C (* 'tfil' *);
+ ftKeyboardLayout = $6B66696C (* 'kfil' *);
+ ftFontSuitcase = $4646494C (* 'FFIL' *);
+ ftDASuitcase = $4446494C (* 'DFIL' *);
+ ftSystemExtension = $494E4954 (* 'INIT' *);
+ ftDAMQueryDocument = $71657279 (* 'qery' *);
+
+
+ { ************* Special FileTypes and creators ************* }
+ ftApplicationName = $61706E6D (* 'apnm' *); { this is the type used to define the application name in a kind resource }
+ sigIndustryStandard = $69737464 (* 'istd' *); { this is the creator used to define a kind string in a kind resource for a FileType that has many creators }
+ ftXTND13TextImport = $78743133 (* 'xt13' *); { this is a pseduo-format used by "XTND for Apps". The taDstIsAppTranslation bit is set }
+
+
+ { ************* Apple][ applications and FileTypes ************* }
+ sigAppleProDOS = $70646F73 (* 'pdos' *); { not registered }
+ ftAppleWorksWordProcessor = $31412020 (* '1A ' *); { not registered }
+ ftAppleWorks1WordProcessor = $31413120 (* '1A1 ' *); { not registered }
+ ftAppleWorks2WordProcessor = $31413220 (* '1A2 ' *); { not registered }
+ ftAppleWorks3WordProcessor = $31413320 (* '1A3 ' *); { not registered }
+ ftAppleWorksDataBase = $31392020 (* '19 ' *); { not registered }
+ ftAppleWorks1DataBase = $31393120 (* '191 ' *); { not registered }
+ ftAppleWorks2DataBase = $31393220 (* '192 ' *); { not registered }
+ ftAppleWorks3DataBase = $31393320 (* '193 ' *); { not registered }
+ ftAppleWorksSpreadsheet = $31422020 (* '1B ' *); { not registered }
+ ftAppleWorks1Spreadsheet = $31423120 (* '1B1 ' *); { not registered }
+ ftAppleWorks2Spreadsheet = $31423220 (* '1B2 ' *); { not registered }
+ ftAppleWorks3Spreadsheet = $31423320 (* '1B3 ' *); { not registered }
+ ftAppleWorksWordProcessorGS = $35302020 (* '50 ' *); { not registered }
+ ftApple2GS_SuperHiRes = $41325355 (* 'A2SU' *); { not registered }
+ ftApple2GS_SuperHiResPacked = $41325350 (* 'A2SP' *); { not registered }
+ ftApple2GS_PaintWorks = $41325057 (* 'A2PW' *); { not registered }
+ ftApple2_DoubleHiRes = $41324455 (* 'A2DU' *); { not registered }
+ ftApple2_DoubleHiResPacked = $41324450 (* 'A2DP' *); { not registered }
+ ftApple2_DoubleHiRes16colors = $41324443 (* 'A2DC' *); { not registered }
+ ftApple2_SingleHiRes = $41324855 (* 'A2HU' *); { not registered }
+ ftApple2_SingleHiResPacked = $41324850 (* 'A2HP' *); { not registered }
+ ftApple2_SingleHiRes8colors = $41324843 (* 'A2HC' *); { not registered }
+
+
+ { ************* PC-DOS applications and FileTypes ************* }
+ sigPCDOS = $6D646F73 (* 'mdos' *); { not registered }
+ ftGenericDocumentPC = $54455854 (* 'TEXT' *); { word processor formats }
+ ftWordStarDocumentPC = $57537472 (* 'WStr' *); { not registered }
+ ftWordStar4DocumentPC = $57537434 (* 'WSt4' *); { not registered }
+ ftWordStar5DocumentPC = $57537435 (* 'WSt5' *); { not registered }
+ ftWordStar55DocumentPC = $57533535 (* 'WS55' *); { not registered }
+ ftWordStar6DocumentPC = $57537436 (* 'WSt6' *); { not registered }
+ ftWordStar2000DocumentPC = $57533230 (* 'WS20' *); { not registered }
+ ftXyWriteIIIDocumentPC = $58795772 (* 'XyWr' *); { registered??? }
+ ftDecDXDocumentPC = $44582020 (* 'DX ' *); { registered??? }
+ ftDecWPSPlusDocumentPC = $5750532B (* 'WPS+' *); { registered??? }
+ ftDisplayWrite3DocumentPC = $44573320 (* 'DW3 ' *); { registered??? }
+ ftDisplayWrite4DocumentPC = $44573420 (* 'DW4 ' *); { registered??? }
+ ftDisplayWrite5DocumentPC = $44573520 (* 'DW5 ' *); { registered??? }
+ ftIBMWritingAsstDocumentPC = $41535354 (* 'ASST' *); { registered??? }
+ ftManuscript1DocumentPC = $4D414E31 (* 'MAN1' *); { registered??? }
+ ftManuscript2DocumentPC = $4D414E32 (* 'MAN2' *); { registered??? }
+ ftMass11PCDocumentPC = $4D313150 (* 'M11P' *); { registered??? }
+ ftMass11VaxDocumentPC = $4D313156 (* 'M11V' *); { registered??? }
+ ftMultiMateDocumentPC = $4D4D4154 (* 'MMAT' *); { registered??? }
+ ftMultiMate36DocumentPC = $4D4D3336 (* 'MM36' *); { registered??? }
+ ftMultiMate40DocumentPC = $4D4D3430 (* 'MM40' *); { registered??? }
+ ftMultiMateAdvDocumentPC = $4D4D4144 (* 'MMAD' *); { registered??? }
+ ftMultiMateNoteDocumentPC = $4D4D4E54 (* 'MMNT' *); { registered??? }
+ ftOfficeWriterDocumentPC = $4F464657 (* 'OFFW' *); { registered??? }
+ ftPCFileLetterDocumentPC = $5043464C (* 'PCFL' *); { registered??? }
+ ftPFSWriteADocumentPC = $50465341 (* 'PFSA' *); { registered??? }
+ ftPFSWriteBDocumentPC = $50465342 (* 'PFSB' *); { registered??? }
+ ftPFSPlanDocumentPC = $50465350 (* 'PFSP' *); { registered??? }
+ ftProWrite1DocumentPC = $50573120 (* 'PW1 ' *); { registered??? }
+ ftProWrite2DocumentPC = $50573220 (* 'PW2 ' *); { registered??? }
+ ftProWritePlusDocumentPC = $50572B20 (* 'PW+ ' *); { registered??? }
+ ftFirstChoiceDocumentPC = $46434820 (* 'FCH ' *); { registered??? }
+ ftFirstChoice3DocumentPC = $46434833 (* 'FCH3' *); { registered??? }
+ ftDCARFTDocumentPC = $52465420 (* 'RFT ' *); { registered??? }
+ ftSamnaDocumentPC = $53414D4E (* 'SAMN' *); { registered??? }
+ ftSmartDocumentPC = $534D5254 (* 'SMRT' *); { registered??? }
+ ftSprintDocumentPC = $53505254 (* 'SPRT' *); { registered??? }
+ ftTotalWordDocumentPC = $544F544C (* 'TOTL' *); { registered??? }
+ ftVolksWriterDocumentPC = $564F4C4B (* 'VOLK' *); { registered??? }
+ ftWangWPSDocumentPC = $57505320 (* 'WPS ' *); { registered??? }
+ ftWordMarcDocumentPC = $4D415243 (* 'MARC' *); { registered??? }
+ ftAmiDocumentPC = $414D4920 (* 'AMI ' *); { registered??? }
+ ftAmiProDocumentPC = $4150524F (* 'APRO' *); { registered??? }
+ ftAmiPro2DocumentPC = $41505232 (* 'APR2' *); { registered??? }
+ ftEnableDocumentPC = $454E5750 (* 'ENWP' *); { registered??? }
+ { data base formats }
+ ftdBaseDatabasePC = $44424620 (* 'DBF ' *); { registered??? }
+ ftdBase3DatabasePC = $44423320 (* 'DB3 ' *); { registered??? }
+ ftdBase4DatabasePC = $44423420 (* 'DB4 ' *); { registered??? }
+ ftDataEaseDatabasePC = $4454455A (* 'DTEZ' *); { registered??? }
+ ftFrameWorkIIIDatabasePC = $46574B33 (* 'FWK3' *); { registered??? }
+ ftRBaseVDatabasePC = $52427356 (* 'RBsV' *); { registered??? }
+ ftRBase5000DatabasePC = $52423530 (* 'RB50' *); { registered??? }
+ ftRBaseFile1DatabasePC = $52427331 (* 'RBs1' *); { registered??? }
+ ftRBaseFile3DatabasePC = $52427333 (* 'RBs3' *); { registered??? }
+ ftReflexDatabasePC = $52464C58 (* 'RFLX' *); { registered??? }
+ ftQAWriteDatabasePC = $51415754 (* 'QAWT' *); { registered??? }
+ ftQADBaseDatabasePC = $51414442 (* 'QADB' *); { registered??? }
+ ftSmartDataBasePC = $534D5444 (* 'SMTD' *); { registered??? }
+ ftFirstChoiceDataBasePC = $46434442 (* 'FCDB' *); { registered??? }
+
+ { spread sheet formats }
+ ftDIFSpreadsheetPC = $44494620 (* 'DIF ' *); { registered??? }
+ ftEnableSpreadsheetPC = $454E4142 (* 'ENAB' *); { registered??? }
+ ft123R1SpreadsheetPC = $574B5331 (* 'WKS1' *); { registered??? }
+ ft123R2SpreadsheetPC = $574B5332 (* 'WKS2' *); { registered??? }
+ ft123R3SpreadsheetPC = $574B5333 (* 'WKS3' *); { registered??? }
+ ftParadox3SpreadsheetPC = $50445833 (* 'PDX3' *); { registered??? }
+ ftParadox35SpreadsheetPC = $50443335 (* 'PD35' *); { registered??? }
+ ftQuattroSpreadsheetPC = $5154524F (* 'QTRO' *); { registered??? }
+ ftQuattroProSpreadsheetPC = $51545235 (* 'QTR5' *); { registered??? }
+ ftSuperCalc5SpreadsheetPC = $53504335 (* 'SPC5' *); { registered??? }
+ ftSymphony1SpreadsheetPC = $53594D31 (* 'SYM1' *); { registered??? }
+ ftTwinSpreadsheetPC = $5457494E (* 'TWIN' *); { registered??? }
+ ftVPPlannerSpreadsheetPC = $5650504C (* 'VPPL' *); { registered??? }
+ ftSmartSpeadsheetPC = $534D5348 (* 'SMSH' *); { registered??? }
+ ftFirstChoiceSpeadsheetPC = $46435353 (* 'FCSS' *); { registered??? }
+ { graphics formats }
+ ftPCPaintBrushGraphicPC = $50435820 (* 'PCX ' *); { not registered }
+ ftLotusPICGraphicPC = $2E504943 (* '.PIC' *); { not registered }
+ ftCGMGraphicPC = $2E43474D (* '.CGM' *); { not registered }
+ ftGEMGraphicPC = $2E47454D (* '.GEM' *); { not registered }
+ ftIMGGraphicPC = $2E494D47 (* '.IMG' *); { not registered }
+ ftDXFGraphicPC = $2E445846 (* '.DXF' *); { not registered }
+ ftBitmapWindows = $2E424D50 (* '.BMP' *); { not registered }
+ ftMetaFileWindows = $2E574D46 (* '.WMF' *); { not registered }
+ ftTIFFGraphic = $54494646 (* 'TIFF' *); { not registered }
+ ftPostScriptPC = $45505350 (* 'EPSP' *);
+ ftPostScriptWindows = $45505357 (* 'EPSW' *); { not registered }
+ ftDigitalFX_TitleMan = $5444494D (* 'TDIM' *); { registered??? }
+ ftDigitalFX_VideoFX = $47524146 (* 'GRAF' *); { registered??? }
+ ftAutodeskFLIandFLC = $464C4943 (* 'FLIC' *); { registered??? }
+ ftGIF = $47494666 (* 'GIFf' *); { registered??? }
+ ftIFF = $494C424D (* 'ILBM' *); { registered??? }
+ ftMicrosoftPaint = $2E4D5350 (* '.MSP' *); { registered??? }
+ ftPixar = $50584152 (* 'PXAR' *); { registered??? }
+ ftQDV = $2E514456 (* '.QDV' *); { registered??? }
+ ftRLE_Compuserve = $524C4543 (* 'RLEC' *); { registered??? }
+ { Generic vector formats }
+ ftIGESGraphicPC = $49474553 (* 'IGES' *); { not registered }
+ ftDDES2GraphicPC = $44444553 (* 'DDES' *); { not registered }
+ ft3DGFGraphicPC = $33444746 (* '3DGF' *); { not registered }
+ { Plotter formats }
+ ftHPGLGraphicPC = $4850474C (* 'HPGL' *); { not registered }
+ ftDMPLGraphicPC = $444D504C (* 'DMPL' *); { not registered }
+ ftCalComp906GraphicPC = $43393036 (* 'C906' *); { not registered }
+ ftCalComp907GraphicPC = $43393037 (* 'C907' *); { not registered }
+ { Vendor-specific formats }
+ ftStereoLithographyGraphicPC = $53544C20 (* 'STL ' *); { 3D Systems - not registered }
+ ftZoomGraphicPC = $5A4F4F4D (* 'ZOOM' *); { Abvent - not registered }
+ ftFocusGraphicPC = $464F4353 (* 'FOCS' *); { Abvent - not registered }
+ ftWaveFrontGraphicPC = $574F424A (* 'WOBJ' *); { WaveFront - not registered }
+ ftSculpt4DGraphicPC = $53636E32 (* 'Scn2' *); { Byte By Byte - not registered }
+ ftMiniPascal3GraphicPC = $4D505433 (* 'MPT3' *); { Graphsoft - not registered }
+ ftMiniPascal4GraphicPC = $4D505434 (* 'MPT4' *); { Graphsoft - not registered }
+ ftWalkThroughGraphicPC = $56574C4B (* 'VWLK' *); { Virtus - not registered }
+ ftSiliconGraphics = $2E534749 (* '.SGI' *); { registered??? }
+ ftSunRaster = $2E53554E (* '.SUN' *); { registered??? }
+ ftTarga = $54504943 (* 'TPIC' *); { registered??? }
+ { misc DOS }
+ ftDOSComPC = $2E434F4D (* '.COM' *); { registered??? }
+ ftDOSExecutablePC = $2E455845 (* '.EXE' *); { registered??? }
+ ftDOSArcPC = $2E415243 (* '.ARC' *); { registered??? }
+ ftAbekas = $4142454B (* 'ABEK' *); { registered??? }
+ ftDrHaloCUT = $2E435554 (* '.CUT' *); { registered??? }
+ { misc Atari }
+ ftDegas = $44454741 (* 'DEGA' *); { not registered }
+ ftNEO = $2E4E454F (* '.NEO' *); { not registered }
+
+
+{$ALIGN MAC68K}
+
+
+{unit Finder}
+{
+ File: Finder.p
+
+ Contains: Finder flags and container types.
+
+ Version: Technology: Mac OS 8.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1990-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ Creator and type of clipping files }
+
+const
+ kClippingCreator = $64726167 (* 'drag' *);
+ kClippingPictureType = $636C7070 (* 'clpp' *);
+ kClippingTextType = $636C7074 (* 'clpt' *);
+ kClippingSoundType = $636C7073 (* 'clps' *);
+ kClippingUnknownType = $636C7075 (* 'clpu' *);
+
+
+ { Creator and type of Internet Location files }
+ kInternetLocationCreator = $64726167 (* 'drag' *);
+ kInternetLocationHTTP = $696C6874 (* 'ilht' *);
+ kInternetLocationFTP = $696C6674 (* 'ilft' *);
+ kInternetLocationFile = $696C6669 (* 'ilfi' *);
+ kInternetLocationMail = $696C6D61 (* 'ilma' *);
+ kInternetLocationNNTP = $696C6E77 (* 'ilnw' *);
+ kInternetLocationAFP = $696C6166 (* 'ilaf' *);
+ kInternetLocationAppleTalk = $696C6174 (* 'ilat' *);
+ kInternetLocationNSL = $696C6E73 (* 'ilns' *);
+ kInternetLocationGeneric = $696C6765 (* 'ilge' *);
+
+
+ kCustomIconResource = -16455; { Custom icon family resource ID }
+
+ { In order to specify any of the information described in the }
+ { CustomBadgeResource data structure you must clear the kExtendedFlagsAreInvalid }
+ { and set kExtendedFlagHasCustomBadge of the FXInfo.fdXFlags or DXInfo.frXFlags field, }
+ { and add a resource of type kCustomBadgeResourceType and ID kCustomBadgeResourceID to }
+ { the file or to the "Icon/n" file for a folder }
+ kCustomBadgeResourceType = $62616467 (* 'badg' *);
+ kCustomBadgeResourceID = -16455;
+ kCustomBadgeResourceVersion = 0;
+
+
+type
+ CustomBadgeResourcePtr = ^CustomBadgeResource;
+ CustomBadgeResource = record
+ version: SInt16; { This is version kCustomBadgeResourceVersion }
+ customBadgeResourceID: SInt16; { If not 0, the ID of a resource to use on top }
+ { of the icon for this file or folder }
+ customBadgeType: OSType; { If not 0, the type and creator of an icon }
+ customBadgeCreator: OSType; { to use on top of the icon }
+ windowBadgeType: OSType; { If not 0, the type and creator of an icon }
+ windowBadgeCreator: OSType; { to display in the header of the window for this }
+ { file or folder }
+ overrideType: OSType; { If not 0, the type and creator of an icon to }
+ overrideCreator: OSType; { use INSTEAD of the icon for this file or folder }
+ end;
+
+ CustomBadgeResourceHandle = ^CustomBadgeResourcePtr;
+ { You can specify routing information for a file by including a 'rout' 0
+ resource in it and setting the kExtendedFlagHasRoutingInfo bit in the extended
+ Finder flags.
+ The 'rout' resource is an array of RoutingResourceEntry. Each entry is considered
+ in turn. The first matching entry is used.
+ If the creator and fileType match the file being dropped and targetFolder match
+ the folder ID of the folder being dropped onto, then the file is rerouted
+ into the specified destination folder.
+ The only target folder currently supported is the system folder,
+ kSystemFolderType = 'macs'.
+ }
+
+const
+ kRoutingResourceType = $726F7574 (* 'rout' *);
+ kRoutingResourceID = 0;
+
+
+type
+ RoutingResourceEntryPtr = ^RoutingResourceEntry;
+ RoutingResourceEntry = record
+ creator: OSType; { Use '****' or 0 to match any creator }
+ fileType: OSType; { Use '****' or 0 to match any file type }
+ targetFolder: OSType; { Folder ID of the folder this file was dropped onto }
+ destinationFolder: OSType; { Folder that the source will be routed to }
+ reservedField: OSType; { Set to 0 }
+ end;
+
+ RoutingResourcePtr = ^RoutingResourceEntry;
+ RoutingResourceHandle = ^RoutingResourcePtr;
+
+ { Types for special container aliases }
+
+const
+ kContainerFolderAliasType = $66647270 (* 'fdrp' *); { type for folder aliases }
+ kContainerTrashAliasType = $74727368 (* 'trsh' *); { type for trash folder aliases }
+ kContainerHardDiskAliasType = $6864736B (* 'hdsk' *); { type for hard disk aliases }
+ kContainerFloppyAliasType = $666C7079 (* 'flpy' *); { type for floppy aliases }
+ kContainerServerAliasType = $73727672 (* 'srvr' *); { type for server aliases }
+ kApplicationAliasType = $61647270 (* 'adrp' *); { type for application aliases }
+ kContainerAliasType = $64726F70 (* 'drop' *); { type for all other containers }
+ kDesktopPrinterAliasType = $64747061 (* 'dtpa' *); { type for Desktop Printer alias }
+ kContainerCDROMAliasType = $63646472 (* 'cddr' *); { type for CD-ROM alias }
+ kApplicationCPAliasType = $61636470 (* 'acdp' *); { type for application control panel alias }
+ kApplicationDAAliasType = $61646470 (* 'addp' *); { type for application DA alias }
+ kPackageAliasType = $66706B61 (* 'fpka' *); { type for plain package alias }
+ kAppPackageAliasType = $66617061 (* 'fapa' *); { type for application package alias }
+
+ { Types for Special folder aliases }
+ kSystemFolderAliasType = $66617379 (* 'fasy' *);
+ kAppleMenuFolderAliasType = $6661616D (* 'faam' *);
+ kStartupFolderAliasType = $66617374 (* 'fast' *);
+ kPrintMonitorDocsFolderAliasType = $6661706E (* 'fapn' *);
+ kPreferencesFolderAliasType = $66617066 (* 'fapf' *);
+ kControlPanelFolderAliasType = $66616374 (* 'fact' *);
+ kExtensionFolderAliasType = $66616578 (* 'faex' *);
+
+ { Types for AppleShare folder aliases }
+ kExportedFolderAliasType = $66616574 (* 'faet' *);
+ kDropFolderAliasType = $66616472 (* 'fadr' *);
+ kSharedFolderAliasType = $66617368 (* 'fash' *);
+ kMountedFolderAliasType = $66616D6E (* 'famn' *);
+
+ { Finder flags (finderFlags, fdFlags and frFlags) }
+ { Any flag reserved or not specified should be set to 0. }
+ { If a flag applies to a file, but not to a folder, make sure to check }
+ { that the item is not a folder by checking ((ParamBlockRec.ioFlAttrib & ioDirMask) == 0) }
+ kIsOnDesk = $0001; { Files and folders (System 6) }
+ kColor = $000E; { Files and folders }
+ { bit 0x0020 was kRequireSwitchLaunch, but is now reserved for future use }
+ kIsShared = $0040; { Files only (Applications only) }
+ { If clear, the application needs to write to }
+ { its resource fork, and therefore cannot be }
+ { shared on a server }
+ kHasNoINITs = $0080; { Files only (Extensions/Control Panels only) }
+ { This file contains no INIT resource }
+ kHasBeenInited = $0100; { Files only }
+ { Clear if the file contains desktop database }
+ { resources ('BNDL', 'FREF', 'open', 'kind'...) }
+ { that have not been added yet. Set only by the Finder }
+ { Reserved for folders - make sure this bit is cleared for folders }
+ { bit 0x0200 was the letter bit for AOCE, but is now reserved for future use }
+ kHasCustomIcon = $0400; { Files and folders }
+ kIsStationery = $0800; { Files only }
+ kNameLocked = $1000; { Files and folders }
+ kHasBundle = $2000; { Files only }
+ kIsInvisible = $4000; { Files and folders }
+ kIsAlias = $8000; { Files only }
+
+ { Obsolete. Use names defined above. }
+ fOnDesk = $0001;
+ fHasBundle = $2000;
+ fInvisible = $4000;
+
+ { Obsolete }
+ fTrash = -3;
+ fDesktop = -2;
+ fDisk = 0;
+
+{$ifc OLDROUTINENAMES}
+ kIsStationary = $0800;
+
+{$endc} {OLDROUTINENAMES}
+
+ { Extended flags (extendedFinderFlags, fdXFlags and frXFlags) }
+ { Any flag not specified should be set to 0. }
+ kExtendedFlagsAreInvalid = $8000; { If set the other extended flags are ignored }
+ kExtendedFlagHasCustomBadge = $0100; { Set if the file or folder has a badge resource }
+ kExtendedFlagHasRoutingInfo = $0004; { Set if the file contains routing info resource }
+
+
+ { Use a filetype in this range to indicate that a file is temporarily busy }
+ { (while it is being downloaded or installed, for example). This prevents }
+ { Finder 8.5 and later from trying to change the item's attributes before it }
+ { is fully created. -- If you provide a series of 'BNDL' icons for your creator }
+ { and some of these filetypes, you can achieve limited icon animation while }
+ { the file creation progresses. }
+ kFirstMagicBusyFiletype = $627A7920 (* 'bzy ' *);
+ kLastMagicBusyFiletype = $627A793F (* 'bzy?' *);
+
+ { Use this date as a file's or folder's creation date to indicate that it is }
+ { temporarily busy (while it is being downloaded or installed, for example). }
+ { This prevents Finder from trying to change the item's attributes before it }
+ { is fully created (Finder 8.5 and 8.6 check file creation dates; later Finders }
+ { may check folder creation dates as well). }
+ kMagicBusyCreationDate = $4F3AFDB0;
+
+
+ { ------------------------------------------------------------------------ }
+ {
+ The following data structures are binary compatible with FInfo, DInfo,
+ FXInfo and DXInfo but represent the Mac OS 8 semantic of the fields.
+ Use these data structures preferably to FInfo, etc...
+ }
+ { ------------------------------------------------------------------------ }
+
+
+type
+ FileInfoPtr = ^FileInfo;
+ FileInfo = record
+ fileType: OSType; { The type of the file }
+ fileCreator: OSType; { The file's creator }
+ finderFlags: UInt16; { ex: kHasBundle, kIsInvisible... }
+ location: Point; { File's location in the folder }
+ { If set to (0, 0), the Finder will place the item automatically }
+ reservedField: UInt16; { (set to 0) }
+ end;
+
+ FolderInfoPtr = ^FolderInfo;
+ FolderInfo = record
+ windowBounds: Rect; { The position and dimension of the folder's window }
+ finderFlags: UInt16; { ex. kIsInvisible, kNameLocked, etc. }
+ location: Point; { Folder's location in the parent folder }
+ { If set to (0, 0), the Finder will place the item automatically }
+ reservedField: UInt16; { (set to 0) }
+ end;
+
+ ExtendedFileInfoPtr = ^ExtendedFileInfo;
+ ExtendedFileInfo = record
+ reserved1: array [0..3] of SInt16; { Reserved (set to 0) }
+ extendedFinderFlags: UInt16; { Extended flags (custom badge, routing info...) }
+ reserved2: SInt16; { Reserved (set to 0). Comment ID if high-bit is clear }
+ putAwayFolderID: SInt32; { Put away folder ID }
+ end;
+
+ ExtendedFolderInfoPtr = ^ExtendedFolderInfo;
+ ExtendedFolderInfo = record
+ scrollPosition: Point; { Scroll position (for icon views) }
+ reserved1: SInt32; { Reserved (set to 0) }
+ extendedFinderFlags: UInt16; { Extended flags (custom badge, routing info...) }
+ reserved2: SInt16; { Reserved (set to 0). Comment ID if high-bit is clear }
+ putAwayFolderID: SInt32; { Put away folder ID }
+ end;
+
+ { ------------------------------------------------------------------------ }
+ {
+ The following data structures are here for compatibility.
+ Use the new data structures replacing them if possible (i.e. FileInfo
+ instead of FInfo, etc...)
+ }
+ { ------------------------------------------------------------------------ }
+ { File info }
+ {
+ IMPORTANT:
+ In MacOS 8, the fdFldr field has become reserved for the Finder.
+ }
+ FInfoPtr = ^FInfo;
+ FInfo = record
+ fdType: OSType; { The type of the file }
+ fdCreator: OSType; { The file's creator }
+ fdFlags: UInt16; { Flags ex. kHasBundle, kIsInvisible, etc. }
+ fdLocation: Point; { File's location in folder. }
+ { If set to (0, 0), the Finder will place the item automatically }
+ fdFldr: SInt16; { Reserved (set to 0) }
+ end;
+
+ { Extended file info }
+ {
+ IMPORTANT:
+ In MacOS 8, the fdIconID and fdComment fields were changed
+ to become reserved fields for the Finder.
+ The fdScript has become an extended flag.
+ }
+ FXInfoPtr = ^FXInfo;
+ FXInfo = record
+ fdIconID: SInt16; { Reserved (set to 0) }
+ fdReserved: array [0..2] of SInt16; { Reserved (set to 0) }
+ fdScript: SInt8; { Extended flags. Script code if high-bit is set }
+ fdXFlags: SInt8; { Extended flags }
+ fdComment: SInt16; { Reserved (set to 0). Comment ID if high-bit is clear }
+ fdPutAway: SInt32; { Put away folder ID }
+ end;
+
+ { Folder info }
+ {
+ IMPORTANT:
+ In MacOS 8, the frView field was changed to become reserved
+ field for the Finder.
+ }
+ DInfoPtr = ^DInfo;
+ DInfo = record
+ frRect: Rect; { Folder's window bounds }
+ frFlags: UInt16; { Flags ex. kIsInvisible, kNameLocked, etc. }
+ frLocation: Point; { Folder's location in parent folder }
+ { If set to (0, 0), the Finder will place the item automatically }
+ frView: SInt16; { Reserved (set to 0) }
+ end;
+
+ { Extended folder info }
+ {
+ IMPORTANT:
+ In MacOS 8, the frOpenChain and frComment fields were changed
+ to become reserved fields for the Finder.
+ The frScript has become an extended flag.
+ }
+ DXInfoPtr = ^DXInfo;
+ DXInfo = record
+ frScroll: Point; { Scroll position }
+ frOpenChain: SInt32; { Reserved (set to 0) }
+ frScript: SInt8; { Extended flags. Script code if high-bit is set }
+ frXFlags: SInt8; { Extended flags }
+ frComment: SInt16; { Reserved (set to 0). Comment ID if high-bit is clear }
+ frPutAway: SInt32; { Put away folder ID }
+ end;
+
+ { ControlPanelDefProcPtr and cdev constants have all been moved to Processes.i }
+{$ALIGN MAC68K}
+
+
+{unit FixMath}
+{
+ File: FixMath.p
+
+ Contains: Fixed Math Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ fixed1 = $00010000;
+ fract1 = $40000000;
+ positiveInfinity = $7FFFFFFF;
+ negativeInfinity = $80000000;
+
+ {
+ FixRatio, FixMul, and FixRound were previously in ToolUtils.h
+ }
+ {
+ * FixRatio()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FixRatio(numer: SInt16; denom: SInt16): Fixed; external name '_FixRatio';
+{
+ * FixMul()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FixMul(a: Fixed; b: Fixed): Fixed; external name '_FixMul';
+{
+ * FixRound()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FixRound(x: Fixed): SInt16; external name '_FixRound';
+{
+ * Fix2Frac()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function Fix2Frac(x: Fixed): Fract; external name '_Fix2Frac';
+{
+ * Fix2Long()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function Fix2Long(x: Fixed): SInt32; external name '_Fix2Long';
+{
+ * Long2Fix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function Long2Fix(x: SInt32): Fixed; external name '_Long2Fix';
+{
+ * Frac2Fix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function Frac2Fix(x: Fract): Fixed; external name '_Frac2Fix';
+{
+ * FracMul()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FracMul(x: Fract; y: Fract): Fract; external name '_FracMul';
+{
+ * FixDiv()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FixDiv(x: Fixed; y: Fixed): Fixed; external name '_FixDiv';
+{
+ * FracDiv()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FracDiv(x: Fract; y: Fract): Fract; external name '_FracDiv';
+{
+ * FracSqrt()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FracSqrt(x: Fract): Fract; external name '_FracSqrt';
+{
+ * FracSin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FracSin(x: Fixed): Fract; external name '_FracSin';
+{
+ * FracCos()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FracCos(x: Fixed): Fract; external name '_FracCos';
+{
+ * FixATan2()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FixATan2(x: SInt32; y: SInt32): Fixed; external name '_FixATan2';
+{
+ Frac2X, Fix2X, X2Fix, and X2Frac translate to and from
+ the floating point type "extended" (that's what the X is for).
+ On the original Mac this was 80-bits and the functions could be
+ accessed via A-Traps. When the 68881 co-processor was added,
+ it used 96-bit floating point types, so the A-Traps could not
+ be used. When PowerPC was added, it used 64-bit floating point
+ types, so yet another prototype was added.
+}
+{$ifc TARGET_CPU_68K}
+{$ifc TARGET_RT_MAC_68881}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * Frac2X()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Frac2X(x: Fract): extended; external name '_Frac2X';
+
+{
+ * Fix2X()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Fix2X(x: Fixed): extended; external name '_Fix2X';
+
+{
+ * X2Fix()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function X2Fix(x: extended): Fixed; external name '_X2Fix';
+
+{
+ * X2Frac()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function X2Frac(x: extended): Fract; external name '_X2Frac';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$elsec}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * Frac2X()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Frac2X(x: Fract): extended; external name '_Frac2X';
+{
+ * Fix2X()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Fix2X(x: Fixed): extended; external name '_Fix2X';
+{
+ * X2Fix()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function X2Fix(x: extended): Fixed; external name '_X2Fix';
+{
+ * X2Frac()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function X2Frac(x: extended): Fract; external name '_X2Frac';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {TARGET_RT_MAC_68881}
+{$elsec}
+{
+ * Frac2X()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function Frac2X(x: Fract): Double; external name '_Frac2X';
+
+{
+ * Fix2X()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function Fix2X(x: Fixed): Double; external name '_Fix2X';
+
+{
+ * X2Fix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function X2Fix(x: Double): Fixed; external name '_X2Fix';
+
+{
+ * X2Frac()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function X2Frac(x: Double): Fract; external name '_X2Frac';
+
+{$endc} {TARGET_CPU_68K}
+
+{ QuickTime 3.0 makes these Wide routines available on other platforms }
+{$ifc TARGET_CPU_PPC OR NOT TARGET_OS_MAC}
+{
+ * WideCompare()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function WideCompare(const (*var*) target: wide; const (*var*) source: wide): SInt16; external name '_WideCompare';
+
+{
+ * WideAdd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function WideAdd(var target: wide; const (*var*) source: wide): widePtr; external name '_WideAdd';
+
+{
+ * WideSubtract()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function WideSubtract(var target: wide; const (*var*) source: wide): widePtr; external name '_WideSubtract';
+
+{
+ * WideNegate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function WideNegate(var target: wide): widePtr; external name '_WideNegate';
+
+{
+ * WideShift()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function WideShift(var target: wide; shift: SInt32): widePtr; external name '_WideShift';
+
+{
+ * WideSquareRoot()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function WideSquareRoot(const (*var*) source: wide): UInt32; external name '_WideSquareRoot';
+
+{
+ * WideMultiply()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function WideMultiply(multiplicand: SInt32; multiplier: SInt32; var target: wide): widePtr; external name '_WideMultiply';
+
+{ returns the quotient }
+{
+ * WideDivide()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function WideDivide(const (*var*) dividend: wide; divisor: SInt32; var remainder: SInt32): SInt32; external name '_WideDivide';
+
+{ quotient replaces dividend }
+{
+ * WideWideDivide()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function WideWideDivide(var dividend: wide; divisor: SInt32; var remainder: SInt32): widePtr; external name '_WideWideDivide';
+
+{
+ * WideBitShift()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function WideBitShift(var src: wide; shift: SInt32): widePtr; external name '_WideBitShift';
+
+{$endc}
+
+
+{$ALIGN MAC68K}
+
+
+{unit GXTypes}
+{
+ File: GXTypes.p
+
+ Contains: QuickDraw GX object and constant definitions
+
+ Version: Technology: Quickdraw GX 1.1
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1994-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+ gxShape = ^SInt32; { an opaque 32-bit type }
+ gxShapePtr = ^gxShape; { when a var xx:gxShape parameter can be nil, it is changed to xx: gxShapePtr }
+ gxStyle = ^SInt32; { an opaque 32-bit type }
+ gxStylePtr = ^gxStyle; { when a var xx:gxStyle parameter can be nil, it is changed to xx: gxStylePtr }
+ gxInk = ^SInt32; { an opaque 32-bit type }
+ gxInkPtr = ^gxInk; { when a var xx:gxInk parameter can be nil, it is changed to xx: gxInkPtr }
+ gxTransform = ^SInt32; { an opaque 32-bit type }
+ gxTransformPtr = ^gxTransform; { when a var xx:gxTransform parameter can be nil, it is changed to xx: gxTransformPtr }
+ gxTag = ^SInt32; { an opaque 32-bit type }
+ gxTagPtr = ^gxTag; { when a var xx:gxTag parameter can be nil, it is changed to xx: gxTagPtr }
+ gxColorSet = ^SInt32; { an opaque 32-bit type }
+ gxColorSetPtr = ^gxColorSet; { when a var xx:gxColorSet parameter can be nil, it is changed to xx: gxColorSetPtr }
+ gxColorProfile = ^SInt32; { an opaque 32-bit type }
+ gxColorProfilePtr = ^gxColorProfile; { when a var xx:gxColorProfile parameter can be nil, it is changed to xx: gxColorProfilePtr }
+ gxGraphicsClient = ^SInt32; { an opaque 32-bit type }
+ gxGraphicsClientPtr = ^gxGraphicsClient; { when a var xx:gxGraphicsClient parameter can be nil, it is changed to xx: gxGraphicsClientPtr }
+ gxViewGroup = ^SInt32; { an opaque 32-bit type }
+ gxViewGroupPtr = ^gxViewGroup; { when a var xx:gxViewGroup parameter can be nil, it is changed to xx: gxViewGroupPtr }
+ gxViewPort = ^SInt32; { an opaque 32-bit type }
+ gxViewPortPtr = ^gxViewPort; { when a var xx:gxViewPort parameter can be nil, it is changed to xx: gxViewPortPtr }
+ gxViewDevice = ^SInt32; { an opaque 32-bit type }
+ gxViewDevicePtr = ^gxViewDevice; { when a var xx:gxViewDevice parameter can be nil, it is changed to xx: gxViewDevicePtr }
+
+ gxColorSpace = SInt32;
+ { gxShape enumerations }
+
+const
+ gxEmptyType = 1;
+ gxPointType = 2;
+ gxLineType = 3;
+ gxCurveType = 4;
+ gxRectangleType = 5;
+ gxPolygonType = 6;
+ gxPathType = 7;
+ gxBitmapType = 8;
+ gxTextType = 9;
+ gxGlyphType = 10;
+ gxLayoutType = 11;
+ gxFullType = 12;
+ gxPictureType = 13;
+
+
+type
+ gxShapeType = SInt32;
+
+const
+ gxNoFill = 0;
+ gxOpenFrameFill = 1;
+ gxFrameFill = 1;
+ gxClosedFrameFill = 2;
+ gxHollowFill = 2;
+ gxEvenOddFill = 3;
+ gxSolidFill = 3;
+ gxWindingFill = 4;
+ gxInverseEvenOddFill = 5;
+ gxInverseSolidFill = 5;
+ gxInverseFill = 5;
+ gxInverseWindingFill = 6;
+
+
+type
+ gxShapeFill = SInt32;
+
+const
+ gxNoAttributes = 0;
+ gxDirectShape = $0001;
+ gxRemoteShape = $0002;
+ gxCachedShape = $0004;
+ gxLockedShape = $0008;
+ gxGroupShape = $0010;
+ gxMapTransformShape = $0020;
+ gxUniqueItemsShape = $0040;
+ gxIgnorePlatformShape = $0080;
+ gxNoMetricsGridShape = $0100;
+ gxDiskShape = $0200;
+ gxMemoryShape = $0400;
+
+
+type
+ gxShapeAttribute = SInt32;
+ { gxShape editing enumerations }
+
+const
+ gxBreakNeitherEdit = 0;
+ gxBreakLeftEdit = $0001;
+ gxBreakRightEdit = $0002;
+ gxRemoveDuplicatePointsEdit = $0004;
+
+ { if the new first (or last) point exactly matches the point before it in }
+ { the same contour, then remove it) }
+
+type
+ gxEditShapeFlag = SInt32;
+
+const
+ gxSelectToEnd = -1;
+
+ gxAnyNumber = 1;
+ gxSetToNil = -1;
+
+ gxCounterclockwiseDirection = 0;
+ gxClockwiseDirection = 1;
+
+
+type
+ gxPointPtr = ^gxPoint;
+ gxPoint = record
+ x: Fixed;
+ y: Fixed;
+ end;
+ gxColorValue = UInt16;
+ gxPolarPtr = ^gxPolar;
+ gxPolar = record
+ radius: Fixed;
+ angle: Fixed;
+ end;
+
+ gxMappingPtr = ^gxMapping;
+ gxMapping = record
+ map: array [0..2,0..2] OF Fixed;
+ end;
+
+type
+
+ gxContourDirection = SInt32;
+ { gxShape structures }
+ { The type 'gxPoint' is defined in "GXMath.h" }
+ gxLinePtr = ^gxLine;
+ gxLine = record
+ first: gxPoint;
+ last: gxPoint;
+ end;
+
+ gxCurvePtr = ^gxCurve;
+ gxCurve = record
+ first: gxPoint;
+ control: gxPoint;
+ last: gxPoint;
+ end;
+
+ gxRectanglePtr = ^gxRectangle;
+ gxRectangle = record
+ left: Fixed;
+ top: Fixed;
+ right: Fixed;
+ bottom: Fixed;
+ end;
+
+ gxPolygonPtr = ^gxPolygon;
+ gxPolygon = record
+ vectors: SInt32;
+ vector: array [0..0] of gxPoint;
+ end;
+
+ gxPolygonsPtr = ^gxPolygons;
+ gxPolygons = record
+ contours: SInt32;
+ contour: array [0..0] of gxPolygon;
+ end;
+
+ gxPathPtr = ^gxPath;
+ gxPath = record
+ vectors: SInt32;
+ controlBits: array [0..0] of SInt32;
+ vector: array [0..0] of gxPoint;
+ end;
+
+ gxPathsPtr = ^gxPaths;
+ gxPaths = record
+ contours: SInt32;
+ contour: array [0..0] of gxPath;
+ end;
+
+ gxBitmapPtr = ^gxBitmap;
+ gxBitmap = record
+ image: CStringPtr; { pointer to pixels }
+ width: SInt32; { width in pixels }
+ height: SInt32; { height in pixels }
+ rowBytes: SInt32; { width in bytes }
+ pixelSize: SInt32; { physical bits per pixel }
+ space: gxColorSpace;
+ colorSet: gxColorSet;
+ profile: gxColorProfile;
+ end;
+
+ gxLongRectanglePtr = ^gxLongRectangle;
+ gxLongRectangle = record
+ left: SInt32;
+ top: SInt32;
+ right: SInt32;
+ bottom: SInt32;
+ end;
+
+ { gxStyle enumerations }
+
+const
+ gxCenterFrameStyle = 0;
+ gxSourceGridStyle = $0001;
+ gxDeviceGridStyle = $0002;
+ gxInsideFrameStyle = $0004;
+ gxOutsideFrameStyle = $0008;
+ gxAutoInsetStyle = $0010;
+
+
+type
+ gxStyleAttribute = SInt32;
+
+const
+ gxBendDash = $0001;
+ gxBreakDash = $0002;
+ gxClipDash = $0004;
+ gxLevelDash = $0008;
+ gxAutoAdvanceDash = $0010;
+
+
+type
+ gxDashAttribute = SInt32;
+
+const
+ gxPortAlignPattern = $0001;
+ gxPortMapPattern = $0002;
+
+
+type
+ gxPatternAttribute = SInt32;
+
+const
+ gxSharpJoin = $0000;
+ gxCurveJoin = $0001;
+ gxLevelJoin = $0002;
+ gxSnapJoin = $0004;
+
+
+type
+ gxJoinAttribute = SInt32;
+
+const
+ gxLevelStartCap = $0001;
+ gxLevelEndCap = $0002;
+
+
+type
+ gxCapAttribute = SInt32;
+
+const
+ gxAutoAdvanceText = $0001;
+ gxNoContourGridText = $0002;
+ gxNoMetricsGridText = $0004;
+ gxAnchorPointsText = $0008;
+ gxVerticalText = $0010;
+ gxNoOpticalScaleText = $0020;
+
+
+type
+ gxTextAttribute = SInt32;
+
+const
+ gxLeftJustify = 0;
+ gxCenterJustify = $20000000;
+ gxRightJustify = $40000000;
+ gxFillJustify = -1;
+
+ gxUnderlineAdvanceLayer = $0001; { a gxLine is drawn through the advances }
+ gxSkipWhiteSpaceLayer = $0002; { except characters describing white space }
+ gxUnderlineIntervalLayer = $0004; { (+ gxStringLayer) a gxLine is drawn through the gaps between advances }
+ gxUnderlineContinuationLayer = $0008; { (+ gxStringLayer) join this underline with another face }
+ gxWhiteLayer = $0010; { the layer draws to white instead of black }
+ gxClipLayer = $0020; { the characters define a clip }
+ gxStringLayer = $0040; { all characters in run are combined }
+
+
+type
+ gxLayerFlag = SInt32;
+ { gxStyle structures }
+ gxFaceLayerPtr = ^gxFaceLayer;
+ gxFaceLayer = record
+ outlineFill: gxShapeFill; { outline framed or filled }
+ flags: gxLayerFlag; { various additional effects }
+ outlineStyle: gxStyle; { outline }
+ outlineTransform: gxTransform; { italic, condense, extend }
+ boldOutset: gxPoint; { bold }
+ end;
+
+ gxTextFacePtr = ^gxTextFace;
+ gxTextFace = record
+ faceLayers: SInt32; { layer to implement shadow }
+ advanceMapping: gxMapping; { algorithmic change to advance width }
+ faceLayer: array [0..0] of gxFaceLayer; { zero or more face layers describing the face }
+ end;
+
+ gxJoinRecordPtr = ^gxJoinRecord;
+ gxJoinRecord = record
+ attributes: gxJoinAttribute;
+ join: gxShape;
+ miter: Fixed;
+ end;
+
+ gxDashRecordPtr = ^gxDashRecord;
+ gxDashRecord = record
+ attributes: gxDashAttribute;
+ dash: gxShape; { similar to pattern, except rotated to gxLine slope }
+ advance: Fixed; { specifies repeating frequency of dash }
+ phase: Fract; { specifies offset into the gxPath to start dashing }
+ scale: Fixed; { specifies height of dash to be mapped to penWidth }
+ end;
+
+ gxPatternRecordPtr = ^gxPatternRecord;
+ gxPatternRecord = record
+ attributes: gxPatternAttribute;
+ pattern: gxShape;
+ u: gxPoint;
+ v: gxPoint;
+ end;
+
+ gxCapRecordPtr = ^gxCapRecord;
+ gxCapRecord = record
+ attributes: gxCapAttribute;
+ startCap: gxShape;
+ endCap: gxShape;
+ end;
+
+
+ { gxInk enumerations }
+
+const
+ gxPortAlignDitherInk = $0001;
+ gxForceDitherInk = $0002;
+ gxSuppressDitherInk = $0004;
+ gxSuppressHalftoneInk = $0008;
+
+
+type
+ gxInkAttribute = SInt32;
+
+const
+ gxNoMode = 0;
+ gxCopyMode = 1;
+ gxAddMode = 2;
+ gxBlendMode = 3;
+ gxMigrateMode = 4;
+ gxMinimumMode = 5;
+ gxMaximumMode = 6;
+ gxHighlightMode = 7;
+ gxAndMode = 8;
+ gxOrMode = 9;
+ gxXorMode = 10;
+ gxRampAndMode = 11;
+ gxRampOrMode = 12;
+ gxRampXorMode = 13;
+ gxOverMode = 14; { Alpha channel modes }
+ gxAtopMode = 15; { Note: In England = Beta channel modes }
+ gxExcludeMode = 16;
+ gxFadeMode = 17;
+
+
+type
+ gxComponentMode = SInt8;
+
+const
+ gxRejectSourceTransfer = $0001; { at least one component must be out of range }
+ gxRejectDeviceTransfer = $0002; { at least one component must be out of range }
+ gxSingleComponentTransfer = $0004; { duplicate gxTransferComponent[0] for all components in transfer }
+
+
+type
+ gxTransferFlag = SInt32;
+
+const
+ gxOverResultComponent = $01; { & result gxColor with 0xFFFF before clamping }
+ gxReverseComponent = $02; { reverse source and device before moding }
+
+
+type
+ gxComponentFlag = SInt8;
+ { gxInk structures }
+ gxTransferComponentPtr = ^gxTransferComponent;
+ gxTransferComponent = record
+ mode: gxComponentMode; { how the component is operated upon }
+ flags: gxComponentFlag; { flags for each component }
+ sourceMinimum: gxColorValue;
+ sourceMaximum: gxColorValue; { input filter range }
+ deviceMinimum: gxColorValue;
+ deviceMaximum: gxColorValue; { output filter range }
+ clampMinimum: gxColorValue;
+ clampMaximum: gxColorValue; { output clamping range }
+ operand: gxColorValue; { ratio for blend, step for migrate, gxColor for highlight }
+ end;
+
+ gxTransferModePtr = ^gxTransferMode;
+ gxTransferMode = record
+ space: gxColorSpace; { the gxColor-space the transfer mode is to operate in }
+ colorSet: gxColorSet;
+ profile: gxColorProfile;
+ sourceMatrix: array [0..4,0..3] of Fixed;
+ deviceMatrix: array [0..4,0..3] of Fixed;
+ resultMatrix: array [0..4,0..3] of Fixed;
+ flags: gxTransferFlag;
+ component: array [0..3] of gxTransferComponent; { how each component is operated upon }
+ end;
+
+
+ { gxColor space enumerations }
+
+const
+ gxNoColorPacking = $0000; { 16 bits per channel }
+ gxAlphaSpace = $0080; { space includes alpha channel }
+ gxWord5ColorPacking = $0500; { 5 bits per channel, right-justified }
+ gxLong8ColorPacking = $0800; { 8 bits per channel, right-justified }
+ gxLong10ColorPacking = $0A00; { 10 bits per channel, right-justified }
+ gxAlphaFirstPacking = $1000; { alpha channel is the first field in the packed space }
+
+ gxNoSpace = 0;
+ gxRGBSpace = 1;
+ gxCMYKSpace = 2;
+ gxHSVSpace = 3;
+ gxHLSSpace = 4;
+ gxYXYSpace = 5;
+ gxXYZSpace = 6;
+ gxLUVSpace = 7;
+ gxLABSpace = 8;
+ gxYIQSpace = 9;
+ gxNTSCSpace = 9;
+ gxPALSpace = 9;
+ gxGraySpace = 10;
+ gxIndexedSpace = 11;
+ gxRGBASpace = 129;
+ gxGrayASpace = 138;
+ gxRGB16Space = $0501;
+ gxRGB32Space = $0801;
+ gxARGB32Space = $1881;
+ gxCMYK32Space = $0802;
+ gxHSV32Space = $0A03;
+ gxHLS32Space = $0A04;
+ gxYXY32Space = $0A05;
+ gxXYZ32Space = $0A06;
+ gxLUV32Space = $0A07;
+ gxLAB32Space = $0A08;
+ gxYIQ32Space = $0A09;
+ gxNTSC32Space = $0A09;
+ gxPAL32Space = $0A09;
+
+ { gxColor space structures }
+
+type
+ gxRGBColorPtr = ^gxRGBColor;
+ gxRGBColor = record
+ red: gxColorValue;
+ green: gxColorValue;
+ blue: gxColorValue;
+ end;
+
+ gxRGBAColorPtr = ^gxRGBAColor;
+ gxRGBAColor = record
+ red: gxColorValue;
+ green: gxColorValue;
+ blue: gxColorValue;
+ alpha: gxColorValue;
+ end;
+
+ gxHSVColorPtr = ^gxHSVColor;
+ gxHSVColor = record
+ hue: gxColorValue;
+ saturation: gxColorValue;
+ value: gxColorValue;
+ end;
+
+ gxHLSColorPtr = ^gxHLSColor;
+ gxHLSColor = record
+ hue: gxColorValue;
+ lightness: gxColorValue;
+ saturation: gxColorValue;
+ end;
+
+ gxCMYKColorPtr = ^gxCMYKColor;
+ gxCMYKColor = record
+ cyan: gxColorValue;
+ magenta: gxColorValue;
+ yellow: gxColorValue;
+ black: gxColorValue;
+ end;
+
+ gxXYZColorPtr = ^gxXYZColor;
+ gxXYZColor = record
+ x: gxColorValue;
+ y: gxColorValue;
+ z: gxColorValue;
+ end;
+
+ gxYXYColorPtr = ^gxYXYColor;
+ gxYXYColor = record
+ capY: gxColorValue;
+ x: gxColorValue;
+ y: gxColorValue;
+ end;
+
+ gxLUVColorPtr = ^gxLUVColor;
+ gxLUVColor = record
+ l: gxColorValue;
+ u: gxColorValue;
+ v: gxColorValue;
+ end;
+
+ gxLABColorPtr = ^gxLABColor;
+ gxLABColor = record
+ l: gxColorValue;
+ a: gxColorValue;
+ b: gxColorValue;
+ end;
+
+ gxYIQColorPtr = ^gxYIQColor;
+ gxYIQColor = record
+ y: gxColorValue;
+ i: gxColorValue;
+ q: gxColorValue;
+ end;
+
+ gxGrayAColorPtr = ^gxGrayAColor;
+ gxGrayAColor = record
+ gray: gxColorValue;
+ alpha: gxColorValue;
+ end;
+
+ gxColorIndex = SInt32;
+ gxIndexedColorPtr = ^gxIndexedColor;
+ gxIndexedColor = record
+ index: gxColorIndex;
+ colorSet: gxColorSet;
+ end;
+
+ gxColorPtr = ^gxColor;
+ gxColor = record
+ space: gxColorSpace;
+ profile: gxColorProfile;
+ case SInt16 of
+ 0: (
+ cmyk: gxCMYKColor;
+ );
+ 1: (
+ rgb: gxRGBColor;
+ );
+ 2: (
+ rgba: gxRGBAColor;
+ );
+ 3: (
+ hsv: gxHSVColor;
+ );
+ 4: (
+ hls: gxHLSColor;
+ );
+ 5: (
+ xyz: gxXYZColor;
+ );
+ 6: (
+ yxy: gxYXYColor;
+ );
+ 7: (
+ luv: gxLUVColor;
+ );
+ 8: (
+ lab: gxLABColor;
+ );
+ 9: (
+ yiq: gxYIQColor;
+ );
+ 10: (
+ gray: gxColorValue;
+ );
+ 11: (
+ graya: gxGrayAColor;
+ );
+ 12: (
+ pixel16: UInt16;
+ );
+ 13: (
+ pixel32: UInt32;
+ );
+ 14: (
+ indexed: gxIndexedColor;
+ );
+ 15: (
+ component: array [0..3] of gxColorValue;
+ );
+ end;
+
+
+ { gxColorSet structures }
+ gxSetColorPtr = ^gxSetColor;
+ gxSetColor = record
+ case SInt16 of
+ 0: (
+ cmyk: gxCMYKColor;
+ );
+ 1: (
+ rgb: gxRGBColor;
+ );
+ 2: (
+ rgba: gxRGBAColor;
+ );
+ 3: (
+ hsv: gxHSVColor;
+ );
+ 4: (
+ hls: gxHLSColor;
+ );
+ 5: (
+ xyz: gxXYZColor;
+ );
+ 6: (
+ yxy: gxYXYColor;
+ );
+ 7: (
+ luv: gxLUVColor;
+ );
+ 8: (
+ lab: gxLABColor;
+ );
+ 9: (
+ yiq: gxYIQColor;
+ );
+ 10: (
+ gray: gxColorValue;
+ );
+ 11: (
+ graya: gxGrayAColor;
+ );
+ 12: (
+ pixel16: UInt16;
+ );
+ 13: (
+ pixel32: UInt32;
+ );
+ 14: (
+ component: array [0..3] of gxColorValue;
+ );
+ end;
+
+ { gxTransform enumerations }
+ { parts of a gxShape considered in hit testing: }
+
+const
+ gxNoPart = 0; { (in order of evaluation) }
+ gxBoundsPart = $0001;
+ gxGeometryPart = $0002;
+ gxPenPart = $0004;
+ gxCornerPointPart = $0008;
+ gxControlPointPart = $0010;
+ gxEdgePart = $0020;
+ gxJoinPart = $0040;
+ gxStartCapPart = $0080;
+ gxEndCapPart = $0100;
+ gxDashPart = $0200;
+ gxPatternPart = $0400;
+ gxGlyphBoundsPart = $0040;
+ gxGlyphFirstPart = $0080;
+ gxGlyphLastPart = $0100;
+ gxSideBearingPart = $0200;
+ gxAnyPart = $07FF;
+
+
+type
+ gxShapePart = SInt32;
+ { gxTransform structures }
+ gxHitTestInfoPtr = ^gxHitTestInfo;
+ gxHitTestInfo = record
+ what: gxShapePart; { which part of gxShape }
+ index: SInt32; { control gxPoint index }
+ distance: Fixed; { how far from gxPoint or outside of area click was }
+ { these fields are only set by GXHitTestPicture }
+ which: gxShape;
+ containerPicture: gxShape; { picture which contains gxShape hit }
+ containerIndex: SInt32; { the index within that picture }
+ totalIndex: SInt32; { the total index within the root picture }
+ end;
+
+ { gxViewPort enumerations }
+
+const
+ gxGrayPort = $0001;
+ gxAlwaysGridPort = $0002;
+ gxEnableMatchPort = $0004;
+
+
+type
+ gxPortAttribute = SInt32;
+ { gxViewDevice enumerations }
+
+const
+ gxDirectDevice = $01; { for the device gxBitmap baseAddr pointer }
+ gxRemoteDevice = $02;
+ gxInactiveDevice = $04;
+
+
+type
+ gxDeviceAttribute = SInt32;
+
+const
+ gxRoundDot = 1;
+ gxSpiralDot = 2;
+ gxSquareDot = 3;
+ gxLineDot = 4;
+ gxEllipticDot = 5;
+ gxTriangleDot = 6;
+ gxDispersedDot = 7;
+ gxCustomDot = 8;
+
+
+type
+ gxDotType = SInt32;
+ { gxViewPort structures }
+
+const
+ gxNoTint = 0;
+ gxLuminanceTint = 1; { use the luminance of the gxColor }
+ gxAverageTint = 2; { add all the components and divide by the number of components }
+ gxMixtureTint = 3; { find the closest gxColor on the axis between the foreground and background }
+ gxComponent1Tint = 4; { use the value of the first component of the gxColor }
+ gxComponent2Tint = 5; { ... etc. }
+ gxComponent3Tint = 6;
+ gxComponent4Tint = 7;
+
+
+type
+ gxTintType = SInt32;
+ gxHalftonePtr = ^gxHalftone;
+ gxHalftone = record
+ angle: Fixed;
+ frequency: Fixed;
+ method: gxDotType;
+ tinting: gxTintType;
+ dotColor: gxColor;
+ backgroundColor: gxColor;
+ tintSpace: gxColorSpace;
+ end;
+
+ gxHalftoneMatrixPtr = ^gxHalftoneMatrix;
+ gxHalftoneMatrix = record
+ dpiX: Fixed; { intended resolution }
+ dpiY: Fixed;
+ width: SInt32; { width of matrix (in device pixels) }
+ height: SInt32; { height of matrix (in device pixels) }
+ tileShift: SInt32; { shift amount (in samples) for rectangular tiling }
+ samples: array [0..0] of UInt16; { samples from 0..MAX(halftone tintSpace) }
+ end;
+
+ { gxViewGroup enumerations }
+
+const
+ gxAllViewDevices = 0;
+ gxScreenViewDevices = 1;
+
+ { graphics stream constants and structures }
+ gxOpenReadSpool = 1;
+ gxOpenWriteSpool = 2;
+ gxReadSpool = 3;
+ gxWriteSpool = 4;
+ gxCloseSpool = 5;
+
+
+type
+ gxSpoolCommand = SInt32;
+ gxGraphicsOpcode = SInt8;
+ gxSpoolBlockPtr = ^gxSpoolBlock;
+{$ifc TYPED_FUNCTION_POINTERS}
+ gxSpoolProcPtr = function(command: gxSpoolCommand; block: gxSpoolBlockPtr): SInt32;
+{$elsec}
+ gxSpoolProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ gxSpoolUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ gxSpoolUPP = UniversalProcPtr;
+{$endc}
+ gxSpoolBlock = record
+ spoolProcedure: gxSpoolUPP; { these fields are read only }
+ buffer: Ptr; { source/destination pointer to data }
+ bufferSize: SInt32; { how many bytes for the system to read (flatten) / write (unflatten) }
+ { these fields are written to (but are not read from) }
+ count: SInt32; { how many bytes for the caller to read (unflatten) /write (flatten) }
+ operationSize: SInt32; { operation size (including operand byte) }
+ operationOffset: SInt32; { the data offset, if any, within the current operation }
+ lastTypeOpcode: gxGraphicsOpcode; { type of last created object }
+ currentOperation: gxGraphicsOpcode; { operation emitted by flatten, or intrepreted by last unflatten }
+ currentOperand: gxGraphicsOpcode; { e.g., gxTransformTypeOpcode, gxInkTagOpcode }
+ compressed: SInt8; { one of: gxTwoBitCompressionValues }
+ end;
+
+
+const
+ uppgxSpoolProcInfo = $000003F1;
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * NewgxSpoolUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewgxSpoolUPP(userRoutine: gxSpoolProcPtr): gxSpoolUPP; external name '_NewgxSpoolUPP'; { old name was NewgxSpoolProc }
+{
+ * DisposegxSpoolUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposegxSpoolUPP(userUPP: gxSpoolUPP); external name '_DisposegxSpoolUPP';
+{
+ * InvokegxSpoolUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InvokegxSpoolUPP(command: gxSpoolCommand; block: gxSpoolBlockPtr; userRoutine: gxSpoolUPP): SInt32; external name '_InvokegxSpoolUPP'; { old name was CallgxSpoolProc }
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+const
+ gxFontListFlatten = $01; { if set, generate a gxTag containing list of each gxFont referenced }
+ gxFontGlyphsFlatten = $02; { if set, generate a gxTag containing the list of glyphs referenced inside the gxFont }
+ gxFontVariationsFlatten = $04; { if set, append the gxTag with separate [variation] coordinates }
+ gxBitmapAliasFlatten = $08; { if set, open bitmap alias files and flatten out their image data }
+
+
+type
+ gxFlattenFlag = SInt32;
+ { gxGraphicsClient constants }
+
+const
+ gxGraphicsSystemClient = -1;
+
+ gxStaticHeapClient = $0001;
+
+
+type
+ gxClientAttribute = SInt32;
+ { graphics patching constants }
+
+const
+ gxOriginalGraphicsFunction = -1;
+ gxOriginalGraphicsIdentifier = $67726678 (* 'grfx' *);
+
+
+type
+ gxBitmapDataSourceAliasPtr = ^gxBitmapDataSourceAlias;
+ gxBitmapDataSourceAlias = record
+ fileOffset: UInt32; { file offset (in bytes) of top-left pixel }
+ aliasRecordSize: UInt32; { size of alias record below }
+ aliasRecord: SInt8; { the actual alias record data }
+ end;
+
+
+const
+ gxBitmapFileAliasTagType = $6266696C (* 'bfil' *);
+ gxPICTFileAliasTagType = $70696374 (* 'pict' *);
+ gxBitmapFileAliasImageValue = 1;
+
+
+type
+ gxFont = ^SInt32; { an opaque 32-bit type }
+ gxFontPtr = ^gxFont; { when a var xx:gxFont parameter can be nil, it is changed to xx: gxFontPtr }
+
+const
+ gxNoPlatform = 0;
+ gxNoScript = 0;
+ gxNoLanguage = 0;
+ gxNoFontName = 0;
+ gxGlyphPlatform = -1;
+
+ gxUnicodePlatform = 1;
+ gxMacintoshPlatform = 2;
+ gxReservedPlatform = 3;
+ gxMicrosoftPlatform = 4;
+ gxCustomPlatform = 5;
+
+
+type
+ gxFontPlatform = SInt32;
+
+const
+ gxUnicodeDefaultSemantics = 1;
+ gxUnicodeV1_1Semantics = 2;
+ gxISO10646_1993Semantics = 3;
+
+ gxRomanScript = 1;
+ gxJapaneseScript = 2;
+ gxTraditionalChineseScript = 3;
+ gxChineseScript = 3;
+ gxKoreanScript = 4;
+ gxArabicScript = 5;
+ gxHebrewScript = 6;
+ gxGreekScript = 7;
+ gxCyrillicScript = 8;
+ gxRussian = 8;
+ gxRSymbolScript = 9;
+ gxDevanagariScript = 10;
+ gxGurmukhiScript = 11;
+ gxGujaratiScript = 12;
+ gxOriyaScript = 13;
+ gxBengaliScript = 14;
+ gxTamilScript = 15;
+ gxTeluguScript = 16;
+ gxKannadaScript = 17;
+ gxMalayalamScript = 18;
+ gxSinhaleseScript = 19;
+ gxBurmeseScript = 20;
+ gxKhmerScript = 21;
+ gxThaiScript = 22;
+ gxLaotianScript = 23;
+ gxGeorgianScript = 24;
+ gxArmenianScript = 25;
+ gxSimpleChineseScript = 26;
+ gxTibetanScript = 27;
+ gxMongolianScript = 28;
+ gxGeezScript = 29;
+ gxEthiopicScript = 29;
+ gxAmharicScript = 29;
+ gxSlavicScript = 30;
+ gxEastEuropeanRomanScript = 30;
+ gxVietnameseScript = 31;
+ gxExtendedArabicScript = 32;
+ gxSindhiScript = 32;
+ gxUninterpretedScript = 33;
+
+ gxMicrosoftSymbolScript = 1;
+ gxMicrosoftStandardScript = 2;
+
+ gxCustom8BitScript = 1;
+ gxCustom816BitScript = 2;
+ gxCustom16BitScript = 3;
+
+
+type
+ gxFontScript = SInt32;
+
+const
+ gxEnglishLanguage = 1;
+ gxFrenchLanguage = 2;
+ gxGermanLanguage = 3;
+ gxItalianLanguage = 4;
+ gxDutchLanguage = 5;
+ gxSwedishLanguage = 6;
+ gxSpanishLanguage = 7;
+ gxDanishLanguage = 8;
+ gxPortugueseLanguage = 9;
+ gxNorwegianLanguage = 10;
+ gxHebrewLanguage = 11;
+ gxJapaneseLanguage = 12;
+ gxArabicLanguage = 13;
+ gxFinnishLanguage = 14;
+ gxGreekLanguage = 15;
+ gxIcelandicLanguage = 16;
+ gxMalteseLanguage = 17;
+ gxTurkishLanguage = 18;
+ gxCroatianLanguage = 19;
+ gxTradChineseLanguage = 20;
+ gxUrduLanguage = 21;
+ gxHindiLanguage = 22;
+ gxThaiLanguage = 23;
+ gxKoreanLanguage = 24;
+ gxLithuanianLanguage = 25;
+ gxPolishLanguage = 26;
+ gxHungarianLanguage = 27;
+ gxEstonianLanguage = 28;
+ gxLettishLanguage = 29;
+ gxLatvianLanguage = 29;
+ gxSaamiskLanguage = 30;
+ gxLappishLanguage = 30;
+ gxFaeroeseLanguage = 31;
+ gxFarsiLanguage = 32;
+ gxPersianLanguage = 32;
+ gxRussianLanguage = 33;
+ gxSimpChineseLanguage = 34;
+ gxFlemishLanguage = 35;
+ gxIrishLanguage = 36;
+ gxAlbanianLanguage = 37;
+ gxRomanianLanguage = 38;
+ gxCzechLanguage = 39;
+ gxSlovakLanguage = 40;
+ gxSlovenianLanguage = 41;
+ gxYiddishLanguage = 42;
+ gxSerbianLanguage = 43;
+ gxMacedonianLanguage = 44;
+ gxBulgarianLanguage = 45;
+ gxUkrainianLanguage = 46;
+ gxByelorussianLanguage = 47;
+ gxUzbekLanguage = 48;
+ gxKazakhLanguage = 49;
+ gxAzerbaijaniLanguage = 50;
+ gxAzerbaijanArLanguage = 51;
+ gxArmenianLanguage = 52;
+ gxGeorgianLanguage = 53;
+ gxMoldavianLanguage = 54;
+ gxKirghizLanguage = 55;
+ gxTajikiLanguage = 56;
+ gxTurkmenLanguage = 57;
+ gxMongolianLanguage = 58;
+ gxMongolianCyrLanguage = 59;
+ gxPashtoLanguage = 60;
+ gxKurdishLanguage = 61;
+ gxKashmiriLanguage = 62;
+ gxSindhiLanguage = 63;
+ gxTibetanLanguage = 64;
+ gxNepaliLanguage = 65;
+ gxSanskritLanguage = 66;
+ gxMarathiLanguage = 67;
+ gxBengaliLanguage = 68;
+ gxAssameseLanguage = 69;
+ gxGujaratiLanguage = 70;
+ gxPunjabiLanguage = 71;
+ gxOriyaLanguage = 72;
+ gxMalayalamLanguage = 73;
+ gxKannadaLanguage = 74;
+ gxTamilLanguage = 75;
+ gxTeluguLanguage = 76;
+ gxSinhaleseLanguage = 77;
+ gxBurmeseLanguage = 78;
+ gxKhmerLanguage = 79;
+ gxLaoLanguage = 80;
+ gxVietnameseLanguage = 81;
+ gxIndonesianLanguage = 82;
+ gxTagalogLanguage = 83;
+ gxMalayRomanLanguage = 84;
+ gxMalayArabicLanguage = 85;
+ gxAmharicLanguage = 86;
+ gxTigrinyaLanguage = 87;
+ gxGallaLanguage = 88;
+ gxOromoLanguage = 88;
+ gxSomaliLanguage = 89;
+ gxSwahiliLanguage = 90;
+ gxRuandaLanguage = 91;
+ gxRundiLanguage = 92;
+ gxChewaLanguage = 93;
+ gxMalagasyLanguage = 94;
+ gxEsperantoLanguage = 95;
+ gxWelshLanguage = 129;
+ gxBasqueLanguage = 130;
+ gxCatalanLanguage = 131;
+ gxLatinLanguage = 132;
+ gxQuechuaLanguage = 133;
+ gxGuaraniLanguage = 134;
+ gxAymaraLanguage = 135;
+ gxTatarLanguage = 136;
+ gxUighurLanguage = 137;
+ gxDzongkhaLanguage = 138;
+ gxJavaneseRomLanguage = 139;
+ gxSundaneseRomLanguage = 140;
+
+
+type
+ gxFontLanguage = SInt32;
+
+const
+ gxCopyrightFontName = 1;
+ gxFamilyFontName = 2;
+ gxStyleFontName = 3;
+ gxUniqueFontName = 4;
+ gxFullFontName = 5;
+ gxVersionFontName = 6;
+ gxPostscriptFontName = 7;
+ gxTrademarkFontName = 8;
+ gxManufacturerFontName = 9;
+ gxLastReservedFontName = 256;
+
+
+type
+ gxFontName = SInt32;
+ gxFontTableTag = SInt32;
+ gxFontVariationTag = SInt32;
+ gxFontFormatTag = SInt32;
+ gxFontStorageTag = SInt32;
+ gxFontDescriptorTag = gxFontVariationTag;
+ gxFontVariationPtr = ^gxFontVariation;
+ gxFontVariation = record
+ name: gxFontVariationTag;
+ value: Fixed;
+ end;
+
+ gxFontDescriptor = gxFontVariation;
+ gxFontDescriptorPtr = ^gxFontDescriptor;
+ gxFontFeatureSettingPtr = ^gxFontFeatureSetting;
+ gxFontFeatureSetting = record
+ setting: UInt16;
+ nameID: UInt16;
+ end;
+
+
+const
+ gxSystemFontAttribute = $0001;
+ gxReadOnlyFontAttribute = $0002;
+
+
+type
+ gxFontAttribute = SInt32;
+
+const
+ gxMutuallyExclusiveFeature = $00008000;
+
+
+type
+ gxFontFeatureFlag = SInt32;
+ gxFontFeature = SInt32;
+
+const
+ gxResourceFontStorage = $72737263 (* 'rsrc' *);
+ gxHandleFontStorage = $686E646C (* 'hndl' *);
+ gxFileFontStorage = $62617373 (* 'bass' *);
+ gxNfntFontStorage = $6E666E74 (* 'nfnt' *);
+
+
+type
+ gxFontStorageReference = Ptr;
+ gxGlyphcode = UInt16;
+ { single glyph in a font }
+ { byte offset within backing store }
+ gxByteOffset = SInt32;
+ { The actual constants for feature types and selectors have been moved to a library. }
+ gxRunFeatureType = UInt16;
+ gxRunFeatureSelector = UInt16;
+ { If tracking is not desired, specify the following value in the track field in the
+ gxRunControls record (note that a track of 0 does *not* mean to turn tracking off;
+ rather, it means to use normal tracking). }
+
+const
+ gxNoTracking = $80000000;
+
+ { The special "gxNoStake" value is returned by the GXGetLayoutBreakOffset call to
+ indicate the absence of a character offset that is stable with respect to
+ metamorphosis and contextual kerning. }
+ gxNoStake = -1;
+
+ { A glyph's behavior with respect to other glyphs on its line is defined in part by its
+ gxBaselineType. These types allow correct alignment of the baselines of all glyphs on
+ the line. }
+ gxRomanBaseline = 0;
+ gxIdeographicCenterBaseline = 1;
+ gxIdeographicLowBaseline = 2;
+ gxHangingBaseline = 3;
+ gxMathBaseline = 4;
+ gxLastBaseline = 31;
+ gxNumberOfBaselineTypes = 32;
+ gxNoOverrideBaseline = 255;
+
+
+type
+ gxBaselineType = UInt32;
+ gxBaselineDeltas = array [0..31] of Fixed;
+ { gxJustificationPriority defines the point during the justification process at which a
+ glyph will begin to receive deltas before and after itself. }
+
+const
+ gxKashidaPriority = 0;
+ gxWhiteSpacePriority = 1;
+ gxInterCharPriority = 2;
+ gxNullJustificationPriority = 3;
+ gxNumberOfJustificationPriorities = 4;
+
+
+type
+ gxJustificationPriority = UInt8;
+ { gxJustificationFlags are used to control which fields of a gxWidthDeltaRecord are to
+ be overridden and which are not if a gxPriorityJustificationOverride or
+ gxGlyphJustificationOverride (qq.v.) is specified. }
+
+const
+ gxOverridePriority = $8000; { use priority value from override }
+ gxOverrideLimits = $4000; { use limits values from override }
+ gxOverrideUnlimited = $2000; { use unlimited flag from override }
+ gxUnlimitedGapAbsorption = $1000; { glyph can take unlimited gap }
+ gxJustificationPriorityMask = $000F; { justification priority }
+ gxAllJustificationFlags = $F00F;
+
+
+type
+ gxJustificationFlags = UInt16;
+ { The directional behavior of a glyph can be overridden using a gxDirectionOverride. }
+
+const
+ gxNoDirectionOverride = 0;
+ gxImposeLeftToRight = 1;
+ gxImposeRightToLeft = 2;
+ gxImposeArabic = 3;
+
+
+type
+ gxDirectionOverride = UInt16;
+ { gxRunControlFlags describe the nonparametric layout options contained in a gxStyle. }
+
+const
+ gxNoCaretAngle = $40000000;
+ gxImposeWidth = $20000000;
+ gxNoCrossKerning = $10000000;
+ gxNoOpticalAlignment = $08000000;
+ gxForceHanging = $04000000;
+ gxNoSpecialJustification = $02000000;
+ gxDirectionOverrideMask = $00000003;
+ gxNoLigatureSplits = $80000000;
+
+ gxAllRunControlFlags = $FE000003;
+
+
+type
+ gxRunControlFlags = UInt32;
+ { gxHighlightType is used to distinguish various highlighting methods, both in terms of
+ character offset based vs. visual based, and in terms of angled sides vs. non-angled
+ sides. }
+
+const
+ gxHighlightStraight = 0; { straight-edged simple highlighting }
+ gxHighlightAverageAngle = 1; { takes average of two edge angles }
+
+
+type
+ gxHighlightType = UInt32;
+ { gxCaretType is used to control whether the caret that is returned from GXGetLayoutCaret
+ is a split caret or a (keyboard-syncronized) single caret. }
+
+const
+ gxSplitCaretType = 0; { returns Mac-style split caret (default) }
+ gxLeftRightKeyboardCaret = 1; { single caret in left-right position }
+ gxRightLeftKeyboardCaret = 2; { single caret in right-left position }
+
+
+type
+ gxCaretType = UInt32;
+ { gxLayoutOffsetState describes the characteristics of a given gxByteOffset in some
+ layout. It is returned by the GXGetOffsetGlyphs call. Note that the
+ gxOffsetInsideLigature value is returned in addition to the 8/16 (or invalid)
+ indication. }
+
+const
+ gxOffset8_8 = 0;
+ gxOffset8_16 = 1;
+ gxOffset16_8 = 2;
+ gxOffset16_16 = 3;
+ gxOffsetInvalid = 4;
+
+ gxOffsetInsideLigature = $8000;
+
+
+type
+ gxLayoutOffsetState = UInt16;
+ { gxLayoutOptionsFlags are single-bit flags contained in a gxLayoutOptions record. We
+ also define here some utility constants that are useful in setting various fields in
+ the gxLayoutOptions record. }
+
+const
+ gxNoLayoutOptions = 0;
+ gxLineIsDisplayOnly = $00000001;
+ gxKeepSpacesInMargin = $00000002;
+ gxLimitReorderingToTwoLevels = $00000004;
+ gxLineLeftEdgeNotAtMargin = $00000008;
+ gxLineRightEdgeNotAtMargin = $00000010;
+ gxAllLayoutOptionsFlags = $0000001F;
+ gxMaxRunLevel = 15;
+ gxFlushLeft = 0;
+ gxFlushCenter = $20000000;
+ gxFlushRight = $40000000;
+ gxNoJustification = 0;
+ gxFullJustification = $40000000;
+
+
+type
+ gxLayoutOptionsFlags = UInt32;
+ { A gxRunFeature describes a feature and a level for that feature. }
+ gxRunFeaturePtr = ^gxRunFeature;
+ gxRunFeature = record
+ featureType: gxRunFeatureType;
+ featureSelector: gxRunFeatureSelector;
+ end;
+
+ { A gxWidthDeltaRecord contains all of the information needed to describe the behavior of one
+ class of glyphs during the justification process. }
+ gxWidthDeltaRecordPtr = ^gxWidthDeltaRecord;
+ gxWidthDeltaRecord = record
+ beforeGrowLimit: Fixed; { ems AW can grow by at most on LT }
+ beforeShrinkLimit: Fixed; { ems AW can shrink by at most on LT }
+ afterGrowLimit: Fixed; { ems AW can grow by at most on RB }
+ afterShrinkLimit: Fixed; { ems AW can shrink by at most on RB }
+ growFlags: gxJustificationFlags; { flags controlling grow case }
+ shrinkFlags: gxJustificationFlags; { flags controlling shrink case }
+ end;
+
+ { A gxPriorityJustificationOverride contains an array of WidthDeltaRecords, one for each
+ gxJustificationPriority. }
+ gxPriorityJustificationOverridePtr = ^gxPriorityJustificationOverride;
+ gxPriorityJustificationOverride = record
+ deltas: array [0..3] of gxWidthDeltaRecord; { overrides for each of the priorities }
+ end;
+
+ { A gxGlyphJustificationOverride contains a gxWidthDeltaRecord that is to be used for a
+ specific glyph in a specific run (this limitation is because glyphcodes vary by font). }
+ gxGlyphJustificationOverridePtr = ^gxGlyphJustificationOverride;
+ gxGlyphJustificationOverride = record
+ glyph: gxGlyphcode;
+ override: gxWidthDeltaRecord;
+ end;
+
+
+ { gxRunControls contains flags, shifts, imposed widths and overrides for a run. }
+ { NOTE: a value of "gxNoTracking" (see above) in track disables tracking }
+ gxRunControlsPtr = ^gxRunControls;
+ gxRunControls = record
+ flags: gxRunControlFlags;
+ beforeWithStreamShift: Fixed;
+ afterWithStreamShift: Fixed;
+ crossStreamShift: Fixed;
+ imposedWidth: Fixed;
+ track: Fixed;
+ hangingInhibitFactor: Fract;
+ kerningInhibitFactor: Fract;
+ decompositionAdjustmentFactor: Fixed;
+ baselineType: gxBaselineType;
+ end;
+
+ { A gxGlyphSubstitution describes one client-provided substitution that occurs after all
+ other automatic glyph changes have happened. }
+ gxGlyphSubstitutionPtr = ^gxGlyphSubstitution;
+ gxGlyphSubstitution = record
+ originalGlyph: gxGlyphcode; { Whenever you see this glyph... }
+ substituteGlyph: gxGlyphcode; { ...change it to this one. }
+ end;
+
+ { gxKerningAdjustmentFactors specify an adjustment to automatic kerning. The adjustment
+ is ax + b where x is the automatic kerning value, a is scaleFactor, and b is
+ adjustmentPointSizeFactor times the run's point size. }
+ gxKerningAdjustmentFactorsPtr = ^gxKerningAdjustmentFactors;
+ gxKerningAdjustmentFactors = record
+ scaleFactor: Fract;
+ adjustmentPointSizeFactor: Fixed;
+ end;
+
+ { A gxKerningAdjustment identifies with- and cross-stream kerning adjustments
+ for specific glyph pairs. }
+ gxKerningAdjustmentPtr = ^gxKerningAdjustment;
+ gxKerningAdjustment = record
+ firstGlyph: gxGlyphcode;
+ secondGlyph: gxGlyphcode;
+ withStreamFactors: gxKerningAdjustmentFactors;
+ crossStreamFactors: gxKerningAdjustmentFactors;
+ end;
+
+ { A value of gxResetCrossStreamFactor in crossStreamFactors.adjustmentPointSizeFactor
+ will reset the cross-stream kerning to the baseline. }
+
+const
+ gxResetCrossStreamFactor = $80000000;
+
+ { gxLayoutHitInfo contains the output from the GXHitTestLayout call. }
+
+type
+ gxLayoutHitInfoPtr = ^gxLayoutHitInfo;
+ gxLayoutHitInfo = record
+ firstPartialDist: Fixed;
+ lastPartialDist: Fixed;
+ hitSideOffset: gxByteOffset;
+ nonHitSideOffset: gxByteOffset;
+ leadingEdge: boolean;
+ inLoose: boolean;
+ end;
+
+ { A gxLineBaselineRecord contains the deltas from 0 to all the different baselines for
+ the layout. It can be filled via a call to GetBaselineDeltas (q.v.). }
+ gxLineBaselineRecordPtr = ^gxLineBaselineRecord;
+ gxLineBaselineRecord = record
+ deltas: gxBaselineDeltas;
+ end;
+
+ { The gxLayoutOptions type contains information about the layout characteristics of the
+ whole line. }
+ gxLayoutOptionsPtr = ^gxLayoutOptions;
+ gxLayoutOptions = record
+ width: Fixed;
+ flush: Fract;
+ just: Fract;
+ flags: gxLayoutOptionsFlags;
+ baselineRec: gxLineBaselineRecordPtr;
+ end;
+
+
+const
+ gxNewObjectOpcode = $00; { create new object }
+ gxSetDataOpcode = $40; { add reference to current object }
+ gxSetDefaultOpcode = $80; { replace current default with this object }
+ gxReservedOpcode = $C0; { (may be used in future expansion) }
+ gxNextOpcode = $FF; { used by currentOperand field to say opcode is coming }
+
+ { new object types (new object opcode) }
+ gxHeaderTypeOpcode = $00; { byte following new object uses bottom 6 bits for type }
+ { gxShape types use values 1 (gxEmptyType) through 13 (gxPictureType) }
+ gxStyleTypeOpcode = $28;
+ gxInkTypeOpcode = $29;
+ gxTransformTypeOpcode = $2A;
+ gxColorProfileTypeOpcode = $2B;
+ gxColorSetTypeOpcode = $2C;
+ gxTagTypeOpcode = $2D;
+ gxBitImageOpcode = $2E;
+ gxFontNameTypeOpcode = $2F;
+ gxTrailerTypeOpcode = $3F;
+
+ { fields of objects (set data opcodes) }
+ gxShapeAttributesOpcode = 0;
+ gxShapeTagOpcode = 1;
+ gxShapeFillOpcode = 2;
+
+ gxOmitPathPositionXMask = $C0;
+ gxOmitPathPositionYMask = $30;
+ gxOmitPathDeltaXMask = $0C;
+ gxOmitPathDeltaYMask = $03;
+
+ gxOmitPathPositionXShift = 6;
+ gxOmitPathPositionYShift = 4;
+ gxOmitPathDeltaXShift = 2;
+ gxOmitPathDeltaYShift = 0;
+
+ gxOmitBitmapImageMask = $C0;
+ gxOmitBitmapWidthMask = $30;
+ gxOmitBitmapHeightMask = $0C;
+ gxOmitBitmapRowBytesMask = $03;
+
+ gxOmitBitmapImageShift = 6;
+ gxOmitBitmapWidthShift = 4;
+ gxOmitBitmapHeightShift = 2;
+ gxOmitBitmapRowBytesShift = 0;
+
+ gxOmitBitmapPixelSizeMask = $C0;
+ gxOmitBitmapSpaceMask = $30;
+ gxOmitBitmapSetMask = $0C;
+ gxOmitBitmapProfileMask = $03;
+
+ gxOmitBitmapPixelSizeShift = 6;
+ gxOmitBitmapSpaceShift = 4;
+ gxOmitBitmapSetShift = 2;
+ gxOmitBitmapProfileShift = 0;
+
+ gxOmitBitmapPositionXMask = $C0;
+ gxOmitBitmapPositionYMask = $30;
+
+ gxOmitBitmapPositionXShift = 6;
+ gxOmitBitmapPositionYShift = 4;
+
+ gxOmitBitImageRowBytesMask = $C0;
+ gxOmitBitImageHeightMask = $30;
+ gxOmitBitImageDataMask = $08;
+
+ gxOmitBitImageRowBytesShift = 6;
+ gxOmitBitImageHeightShift = 4;
+ gxOmitBitImageDataShift = 3;
+
+ gxCopyBitImageBytesOpcode = $00;
+ gxRepeatBitImageBytesOpcode = $40;
+ gxLookupBitImageBytesOpcode = $80;
+ gxRepeatBitImageScanOpcode = $C0;
+
+ gxOmitTextCharactersMask = $C0;
+ gxOmitTextPositionXMask = $30;
+ gxOmitTextPositionYMask = $0C;
+ gxOmitTextDataMask = $02;
+
+ gxOmitTextCharactersShift = 6;
+ gxOmitTextPositionXShift = 4;
+ gxOmitTextPositionYShift = 2;
+ gxOmitTextDataShift = 1;
+
+ gxOmitGlyphCharactersMask = $C0;
+ gxOmitGlyphLengthMask = $30;
+ gxOmitGlyphRunNumberMask = $0C;
+ gxOmitGlyphOnePositionMask = $02;
+ gxOmitGlyphDataMask = $01;
+
+ gxOmitGlyphCharactersShift = 6;
+ gxOmitGlyphLengthShift = 4;
+ gxOmitGlyphRunNumberShift = 2;
+ gxOmitGlyphOnePositionShift = 1;
+ gxOmitGlyphDataShift = 0;
+
+ gxOmitGlyphPositionsMask = $C0;
+ gxOmitGlyphAdvancesMask = $20;
+ gxOmitGlyphTangentsMask = $18;
+ gxOmitGlyphRunsMask = $04;
+ gxOmitGlyphStylesMask = $03;
+
+ gxOmitGlyphPositionsShift = 6;
+ gxOmitGlyphAdvancesShift = 5;
+ gxOmitGlyphTangentsShift = 3;
+ gxOmitGlyphRunsShift = 2;
+ gxOmitGlyphStylesShift = 0;
+
+ gxOmitLayoutLengthMask = $C0;
+ gxOmitLayoutPositionXMask = $30;
+ gxOmitLayoutPositionYMask = $0C;
+ gxOmitLayoutDataMask = $02;
+
+ gxOmitLayoutLengthShift = 6;
+ gxOmitLayoutPositionXShift = 4;
+ gxOmitLayoutPositionYShift = 2;
+ gxOmitLayoutDataShift = 1;
+
+ gxOmitLayoutWidthMask = $C0;
+ gxOmitLayoutFlushMask = $30;
+ gxOmitLayoutJustMask = $0C;
+ gxOmitLayoutOptionsMask = $03;
+
+ gxOmitLayoutWidthShift = 6;
+ gxOmitLayoutFlushShift = 4;
+ gxOmitLayoutJustShift = 2;
+ gxOmitLayoutOptionsShift = 0;
+
+ gxOmitLayoutStyleRunNumberMask = $C0;
+ gxOmitLayoutLevelRunNumberMask = $30;
+ gxOmitLayoutHasBaselineMask = $08;
+ gxOmitLayoutStyleRunsMask = $04;
+ gxOmitLayoutStylesMask = $03;
+
+ gxOmitLayoutStyleRunNumberShift = 6;
+ gxOmitLayoutLevelRunNumberShift = 4;
+ gxOmitLayoutHasBaselineShift = 3;
+ gxOmitLayoutStyleRunsShift = 2;
+ gxOmitLayoutStylesShift = 0;
+
+ gxOmitLayoutLevelRunsMask = $80;
+ gxOmitLayoutLevelsMask = $40;
+
+ gxOmitLayoutLevelRunsShift = 7;
+ gxOmitLayoutLevelsShift = 6;
+
+ gxInkAttributesOpcode = 0;
+ gxInkTagOpcode = 1;
+ gxInkColorOpcode = 2;
+ gxInkTransferModeOpcode = 3;
+
+ gxOmitColorsSpaceMask = $C0;
+ gxOmitColorsProfileMask = $30;
+ gxOmitColorsComponentsMask = $0F;
+ gxOmitColorsIndexMask = $0C;
+ gxOmitColorsIndexSetMask = $03;
+
+ gxOmitColorsSpaceShift = 6;
+ gxOmitColorsProfileShift = 4;
+ gxOmitColorsComponentsShift = 0;
+ gxOmitColorsIndexShift = 2;
+ gxOmitColorsIndexSetShift = 0;
+
+ gxOmitTransferSpaceMask = $C0;
+ gxOmitTransferSetMask = $30;
+ gxOmitTransferProfileMask = $0C;
+
+ gxOmitTransferSpaceShift = 6;
+ gxOmitTransferSetShift = 4;
+ gxOmitTransferProfileShift = 2;
+
+ gxOmitTransferSourceMatrixMask = $C0;
+ gxOmitTransferDeviceMatrixMask = $30;
+ gxOmitTransferResultMatrixMask = $0C;
+ gxOmitTransferFlagsMask = $03;
+
+ gxOmitTransferSourceMatrixShift = 6;
+ gxOmitTransferDeviceMatrixShift = 4;
+ gxOmitTransferResultMatrixShift = 2;
+ gxOmitTransferFlagsShift = 0;
+
+ gxOmitTransferComponentModeMask = $80;
+ gxOmitTransferComponentFlagsMask = $40;
+ gxOmitTransferComponentSourceMinimumMask = $30;
+ gxOmitTransferComponentSourceMaximumMask = $0C;
+ gxOmitTransferComponentDeviceMinimumMask = $03;
+
+ gxOmitTransferComponentModeShift = 7;
+ gxOmitTransferComponentFlagsShift = 6;
+ gxOmitTransferComponentSourceMinimumShift = 4;
+ gxOmitTransferComponentSourceMaximumShift = 2;
+ gxOmitTransferComponentDeviceMinimumShift = 0;
+
+ gxOmitTransferComponentDeviceMaximumMask = $C0;
+ gxOmitTransferComponentClampMinimumMask = $30;
+ gxOmitTransferComponentClampMaximumMask = $0C;
+ gxOmitTransferComponentOperandMask = $03;
+
+ gxOmitTransferComponentDeviceMaximumShift = 6;
+ gxOmitTransferComponentClampMinimumShift = 4;
+ gxOmitTransferComponentClampMaximumShift = 2;
+ gxOmitTransferComponentOperandShift = 0;
+
+ gxStyleAttributesOpcode = 0;
+ gxStyleTagOpcode = 1;
+ gxStyleCurveErrorOpcode = 2;
+ gxStylePenOpcode = 3;
+ gxStyleJoinOpcode = 4;
+ gxStyleDashOpcode = 5;
+ gxStyleCapsOpcode = 6;
+ gxStylePatternOpcode = 7;
+ gxStyleTextAttributesOpcode = 8;
+ gxStyleTextSizeOpcode = 9;
+ gxStyleFontOpcode = 10;
+ gxStyleTextFaceOpcode = 11;
+ gxStylePlatformOpcode = 12;
+ gxStyleFontVariationsOpcode = 13;
+ gxStyleRunControlsOpcode = 14;
+ gxStyleRunPriorityJustOverrideOpcode = 15;
+ gxStyleRunGlyphJustOverridesOpcode = 16;
+ gxStyleRunGlyphSubstitutionsOpcode = 17;
+ gxStyleRunFeaturesOpcode = 18;
+ gxStyleRunKerningAdjustmentsOpcode = 19;
+ gxStyleJustificationOpcode = 20;
+
+ gxOmitDashAttributesMask = $C0;
+ gxOmitDashShapeMask = $30;
+ gxOmitDashAdvanceMask = $0C;
+ gxOmitDashPhaseMask = $03;
+
+ gxOmitDashAttributesShift = 6;
+ gxOmitDashShapeShift = 4;
+ gxOmitDashAdvanceShift = 2;
+ gxOmitDashPhaseShift = 0;
+
+ gxOmitDashScaleMask = $C0;
+
+ gxOmitDashScaleShift = 6;
+
+ gxOmitPatternAttributesMask = $C0;
+ gxOmitPatternShapeMask = $30;
+ gxOmitPatternUXMask = $0C;
+ gxOmitPatternUYMask = $03;
+
+ gxOmitPatternAttributesShift = 6;
+ gxOmitPatternShapeShift = 4;
+ gxOmitPatternUXShift = 2;
+ gxOmitPatternUYShift = 0;
+
+ gxOmitPatternVXMask = $C0;
+ gxOmitPatternVYMask = $30;
+
+ gxOmitPatternVXShift = 6;
+ gxOmitPatternVYShift = 4;
+
+ gxOmitJoinAttributesMask = $C0;
+ gxOmitJoinShapeMask = $30;
+ gxOmitJoinMiterMask = $0C;
+
+ gxOmitJoinAttributesShift = 6;
+ gxOmitJoinShapeShift = 4;
+ gxOmitJoinMiterShift = 2;
+
+ gxOmitCapAttributesMask = $C0;
+ gxOmitCapStartShapeMask = $30;
+ gxOmitCapEndShapeMask = $0C;
+
+ gxOmitCapAttributesShift = 6;
+ gxOmitCapStartShapeShift = 4;
+ gxOmitCapEndShapeShift = 2;
+
+ gxOmitFaceLayersMask = $C0;
+ gxOmitFaceMappingMask = $30;
+
+ gxOmitFaceLayersShift = 6;
+ gxOmitFaceMappingShift = 4;
+
+ gxOmitFaceLayerFillMask = $C0;
+ gxOmitFaceLayerFlagsMask = $30;
+ gxOmitFaceLayerStyleMask = $0C;
+ gxOmitFaceLayerTransformMask = $03;
+
+ gxOmitFaceLayerFillShift = 6;
+ gxOmitFaceLayerFlagsShift = 4;
+ gxOmitFaceLayerStyleShift = 2;
+ gxOmitFaceLayerTransformShift = 0;
+
+ gxOmitFaceLayerBoldXMask = $C0;
+ gxOmitFaceLayerBoldYMask = $30;
+
+ gxOmitFaceLayerBoldXShift = 6;
+ gxOmitFaceLayerBoldYShift = 4;
+
+ gxColorSetReservedOpcode = 0;
+ gxColorSetTagOpcode = 1;
+
+ gxColorProfileReservedOpcode = 0;
+ gxColorProfileTagOpcode = 1;
+
+ gxTransformReservedOpcode = 0;
+ gxTransformTagOpcode = 1;
+ gxTransformClipOpcode = 2;
+ gxTransformMappingOpcode = 3;
+ gxTransformPartMaskOpcode = 4;
+ gxTransformToleranceOpcode = 5;
+
+ gxTypeOpcode = 0;
+ gxSizeOpcode = 1;
+
+ { used by currentOperand when currentOperation is gxNextOpcode }
+ { format of top byte:
+ xx yyyyyy xx == 0x00, 0x40, 0x80, 0xC0: defines graphics operation (see gxGraphicsOperationOpcode)
+ yyyyyy == size of operation in bytes
+ if (yyyyyy == 0), byte size follows. If byte following == 0, word size follows; if == 0, long follows
+ word and long, if present, are specified in high-endian order (first byte is largest magnitude)
+
+ format of byte following size specifiers, if any:
+ xx yyyyyy xx == 0x00, 0x40, 0x80, 0xC0: defines compression level (0 == none, 0xC0 == most)
+ exact method of compression is defined by type of data
+ yyyyyy == data type selector (0 to 63): see gxGraphicsNewOpcode, __DataOpcode
+ }
+ gxOpcodeShift = 6;
+ gxObjectSizeMask = $3F;
+ gxCompressionShift = 6;
+ gxObjectTypeMask = $3F;
+ gxBitImageOpcodeMask = $C0;
+ gxBitImageCountMask = $3F;
+ gxBitImageOpcodeShift = 6;
+
+ gxNoCompression = 0;
+ gxWordCompression = 1;
+ gxByteCompression = 2;
+ gxOmitCompression = 3;
+ gxCompressionMask = $03;
+
+ { the following structures define how primitives without a public geometry
+ are stored (their format mirrors that of the New call to create them) }
+
+type
+ gxFlatFontNamePtr = ^gxFlatFontName;
+ gxFlatFontName = record
+ name: SInt8; { gxFontName }
+ platform: SInt8; { gxFontPlatform }
+ script: SInt8; { gxFontScript }
+ language: SInt8; { gxFontLanguage }
+ length: SInt16; { byte length }
+ end;
+
+
+const
+ gxFlatFontListItemTag = $666C7374 (* 'flst' *);
+
+
+type
+ gxFlatFontListItemPtr = ^gxFlatFontListItem;
+ gxFlatFontListItem = record
+ fontID: gxFont; { ** if we get rid of this, remove #include "font types.h", above }
+ name: SInt8; { gxFontName }
+ platform: SInt8; { gxFontPlatform }
+ script: SInt8; { gxFontScript }
+ language: SInt8; { gxFontLanguage }
+ length: SInt16; { byte length of the name that follows }
+ glyphCount: UInt16; { CountFontGlyphs or 0 if gxFontGlyphsFlatten is false }
+ axisCount: UInt16; { CountFontVariations or 0 if gxFontVariationsFlatten is false }
+ variationCount: UInt16; { number of bitsVariationPairs that follow the (optional) glyphBits }
+ end;
+
+ gxFlatFontListPtr = ^gxFlatFontList;
+ gxFlatFontList = record
+ count: SInt32;
+ items: array [0..0] of gxFlatFontListItem;
+ end;
+
+ gxFlattenHeaderPtr = ^gxFlattenHeader;
+ gxFlattenHeader = record
+ version: Fixed;
+ flatFlags: SInt8;
+ padding: SInt8;
+ end;
+
+
+const
+ gxOmitPictureShapeMask = $C0;
+ gxOmitOverrideStyleMask = $30;
+ gxOmitOverrideInkMask = $0C;
+ gxOmitOverrideTransformMask = $03;
+
+ gxOmitPictureShapeShift = $06;
+ gxOmitOverrideStyleShift = $04;
+ gxOmitOverrideInkShift = $02;
+ gxOmitOverrideTransformShift = $00;
+
+ gxPostScriptTag = $706F7374 (* 'post' *);
+ gxPostControlTag = $70736374 (* 'psct' *);
+
+ gxNoSave = 1; { don't do save-restore around PS data }
+ gxPSContinueNext = 2; { next shape is continuation of this shape's PS -- only obeyed if gxNoSave is true }
+
+
+type
+ gxPostControlPtr = ^gxPostControl;
+ gxPostControl = record
+ flags: SInt32; { PostScript state flags }
+ end;
+
+
+const
+ gxDashSynonymTag = $73647368 (* 'sdsh' *);
+
+
+type
+ gxDashSynonymPtr = ^gxDashSynonym;
+ gxDashSynonym = record
+ size: SInt32; { number of elements in array }
+ dashLength: array [0..0] of Fixed; { Array of dash lengths }
+ end;
+
+
+const
+ gxLineCapSynonymTag = $6C636170 (* 'lcap' *);
+
+ gxButtCap = 0;
+ gxRoundCap = 1;
+ gxSquareCap = 2;
+ gxTriangleCap = 3;
+
+ { gxLine cap type }
+
+type
+ gxLineCapSynonym = SInt32;
+
+const
+ gxCubicSynonymTag = $63756278 (* 'cubx' *);
+
+ gxIgnoreFlag = $0000; { Ignore this word, get next one }
+ gxLineToFlag = $0001; { Draw a gxLine to gxPoint following this flag }
+ gxCurveToFlag = $0002; { Draw a gxCurve through the 3 points following this flag }
+ gxMoveToFlag = $0003; { Start a new contour at the gxPoint following this flag }
+ gxClosePathFlag = $0004; { Close the contour }
+
+
+type
+ gxCubicSynonym = SInt32;
+
+const
+ gxCubicInstructionMask = $000F; { low four bits are gxPoint instructions }
+
+ { Low four bits are instruction (moveto, lineto, curveto, closepath) }
+
+type
+ gxCubicSynonymFlags = SInt16;
+
+const
+ gxPatternSynonymTag = $7074726E (* 'ptrn' *);
+
+ gxHatch = 0;
+ gxCrossHatch = 1;
+
+
+type
+ gxPatternSynonymPtr = ^gxPatternSynonym;
+ gxPatternSynonym = record
+ patternType: SInt32; { one of the gxPatterns: gxHatch or gxCrossHatch }
+ angle: Fixed; { angle at which pattern is drawn }
+ spacing: Fixed; { distance between two parallel pattern lines }
+ thickness: Fixed; { thickness of the pattern }
+ anchorPoint: gxPoint; { gxPoint with with respect to which pattern position is calculated }
+ end;
+
+
+const
+ gxURLTag = $75726C74 (* 'urlt' *);
+
+{$ALIGN MAC68K}
+
+
+{unit GestaltEqu}
+{
+ File: GestaltEqu.p
+
+ Contains: Gestalt Interfaces.
+
+ Version: Technology: Mac OS 9.1
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1988-2002 by Apple Computer, Inc. All rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ SelectorFunctionProcPtr = function(selector: OSType; var response: SInt32): OSErr;
+{$elsec}
+ SelectorFunctionProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ SelectorFunctionUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SelectorFunctionUPP = UniversalProcPtr;
+{$endc}
+{
+ * Gestalt()
+ *
+ * Summary:
+ * Gestalt returns information about the operating environment.
+ *
+ * Discussion:
+ * The Gestalt function places the information requested by the
+ * selector parameter in the variable parameter response . Note that
+ * Gestalt returns the response from all selectors in a long word,
+ * which occupies 4 bytes. When not all 4 bytes are needed, the
+ * significant information appears in the low-order byte or bytes.
+ * Although the response parameter is declared as a variable
+ * parameter, you cannot use it to pass information to Gestalt or to
+ * a Gestalt selector function. Gestalt interprets the response
+ * parameter as an address at which it is to place the result
+ * returned by the selector function specified by the selector
+ * parameter. Gestalt ignores any information already at that
+ * address.
+ *
+ * The Apple-defined selector codes fall into two categories:
+ * environmental selectors, which supply specific environmental
+ * information you can use to control the behavior of your
+ * application, and informational selectors, which supply
+ * information you can't use to determine what hardware or software
+ * features are available. You can use one of the selector codes
+ * defined by Apple (listed in the "Constants" section beginning on
+ * page 1-14 ) or a selector code defined by a third-party
+ * product.
+ *
+ * The meaning of the value that Gestalt returns in the response
+ * parameter depends on the selector code with which it was called.
+ * For example, if you call Gestalt using the gestaltTimeMgrVersion
+ * selector, it returns a version code in the response parameter. In
+ * this case, a returned value of 3 indicates that the extended Time
+ * Manager is available.
+ *
+ * In most cases, the last few characters in the selector's symbolic
+ * name form a suffix that indicates what type of value you can
+ * expect Gestalt to place in the response parameter. For example,
+ * if the suffix in a Gestalt selector is Size , then Gestalt
+ * returns a size in the response parameter.
+ *
+ * Attr: A range of 32 bits, the meanings of which are defined by a
+ * list of constants. Bit 0 is the least significant bit of the long
+ * word.
+ * Count: A number indicating how many of the indicated type of item
+ * exist.
+ * Size: A size, usually in bytes.
+ * Table: The base address of a table.
+ * Type: An index to a list of feature descriptions.
+ * Version: A version number, which can be either a constant with a
+ * defined meaning or an actual version number, usually stored as
+ * four hexadecimal digits in the low-order word of the return
+ * value. Implied decimal points may separate digits. The value
+ * $0701, for example, returned in response to the
+ * gestaltSystemVersion selector, represents system software version
+ * 7.0.1.
+ *
+ * Selectors that have the suffix Attr deserve special attention.
+ * They cause Gestalt to return a bit field that your application
+ * must interpret to determine whether a desired feature is present.
+ * For example, the application-defined sample function
+ * MyGetSoundAttr , defined in Listing 1-2 on page 1-6 , returns a
+ * LongInt that contains the Sound Manager attributes field
+ * retrieved from Gestalt . To determine whether a particular
+ * feature is available, you need to look at the designated bit.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * selector:
+ * The selector to return information for
+ *
+ * response:
+ * On exit, the requested information whose format depends on the
+ * selector specified.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function Gestalt(selector: OSType; var response: SInt32): OSErr; external name '_Gestalt';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * ReplaceGestalt() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use NewGestaltValue instead wherever possible.
+ *
+ * Summary:
+ * Replaces the gestalt function associated with a selector.
+ *
+ * Discussion:
+ * The ReplaceGestalt function replaces the selector function
+ * associated with an existing selector code.
+ *
+ * So that your function can call the function previously associated
+ * with the selector, ReplaceGestalt places the address of the old
+ * selector function in the oldGestaltFunction parameter. If
+ * ReplaceGestalt returns an error of any type, then the value of
+ * oldGestaltFunction is undefined.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * selector:
+ * the selector to replace
+ *
+ * gestaltFunction:
+ * a UPP for the new selector function
+ *
+ * oldGestaltFunction:
+ * on exit, a pointer to the UPP of the previously associated with
+ * the specified selector
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function ReplaceGestalt(selector: OSType; gestaltFunction: SelectorFunctionUPP; var oldGestaltFunction: SelectorFunctionUPP): OSErr; external name '_ReplaceGestalt';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+{
+ * NewGestalt() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use NewGestaltValue instead wherever possible.
+ *
+ * Summary:
+ * Adds a selector code to those already recognized by Gestalt.
+ *
+ * Discussion:
+ * The NewGestalt function registers a specified selector code with
+ * the Gestalt Manager so that when the Gestalt function is called
+ * with that selector code, the specified selector function is
+ * executed. Before calling NewGestalt, you must define a selector
+ * function callback. See SelectorFunctionProcPtr for a description
+ * of how to define your selector function.
+ *
+ * Registering with the Gestalt Manager is a way for software such
+ * as system extensions to make their presence known to potential
+ * users of their services.
+ *
+ * In Mac OS X, the selector and replacement value are on a
+ * per-context basis. That means they are available only to the
+ * application or other code that installs them. You cannot use this
+ * function to make information available to another process.
+ *
+ * A Gestalt selector registered with NewGestalt() can not be
+ * deleted.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * selector:
+ * the selector to create
+ *
+ * gestaltFunction:
+ * a UPP for the new selector function, which Gestalt executes
+ * when it receives the new selector code. See
+ * SelectorFunctionProcPtr for more information on the callback
+ * you need to provide.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function NewGestalt(selector: OSType; gestaltFunction: SelectorFunctionUPP): OSErr; external name '_NewGestalt';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+{ The GestaltValue functions are available in System 7.5 and later }
+
+{
+ * NewGestaltValue()
+ *
+ * Summary:
+ * Adds a selector code to those already recognized by Gestalt.
+ *
+ * Discussion:
+ * The NewGestalt function registers a specified selector code with
+ * the Gestalt Manager so that when the Gestalt function is called
+ * with that selector code, the specified selector function is
+ * executed. Before calling NewGestalt, you must define a selector
+ * function callback. See SelectorFunctionProcPtr for a description
+ * of how to define your selector function.
+ *
+ * Registering with the Gestalt Manager is a way for software such
+ * as system extensions to make their presence known to potential
+ * users of their services.
+ *
+ * In Mac OS X, the selector and replacement value are on a
+ * per-context basis. That means they are available only to the
+ * application or other code that installs them. You cannot use this
+ * function to make information available to another process.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * selector:
+ * the selector to create
+ *
+ * newValue:
+ * the value to return for the new selector code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ }
+function NewGestaltValue(selector: OSType; newValue: SInt32): OSErr; external name '_NewGestaltValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * ReplaceGestaltValue()
+ *
+ * Summary:
+ * Replaces the value that the function Gestalt returns for a
+ * specified selector code with the value provided to the function.
+ *
+ * Discussion:
+ * You use the function ReplaceGestaltValue to replace an existing
+ * value. You should not call this function to introduce a value
+ * that doesn't already exist; instead call the function
+ * NewGestaltValue.
+ *
+ * In Mac OS X, the selector and replacement value are on a
+ * per-context basis. That means they are available only to the
+ * application or other code that installs them. You cannot use this
+ * function to make information available to another process.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * selector:
+ * the selector to create
+ *
+ * replacementValue:
+ * the new value to return for the new selector code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ }
+function ReplaceGestaltValue(selector: OSType; replacementValue: SInt32): OSErr; external name '_ReplaceGestaltValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * SetGestaltValue()
+ *
+ * Summary:
+ * Sets the value the function Gestalt will return for a specified
+ * selector code, installing the selector if it was not already
+ * installed.
+ *
+ * Discussion:
+ * You use SetGestaltValue to establish a value for a selector,
+ * without regard to whether the selector was already installed.
+ *
+ * In Mac OS X, the selector and replacement value are on a
+ * per-context basis. That means they are available only to the
+ * application or other code that installs them. You cannot use this
+ * function to make information available to another process.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * selector:
+ * the selector to create
+ *
+ * newValue:
+ * the new value to return for the new selector code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ }
+function SetGestaltValue(selector: OSType; newValue: SInt32): OSErr; external name '_SetGestaltValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DeleteGestaltValue()
+ *
+ * Summary:
+ * Deletes a Gestalt selector code so that it is no longer
+ * recognized by Gestalt.
+ *
+ * Discussion:
+ * After calling this function, subsequent query or replacement
+ * calls for the selector code will fail as if the selector had
+ * never been installed
+ *
+ * In Mac OS X, the selector and replacement value are on a
+ * per-context basis. That means they are available only to the
+ * application or other code that installs them.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * selector:
+ * the selector to delete
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ }
+function DeleteGestaltValue(selector: OSType): OSErr; external name '_DeleteGestaltValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+const
+ uppSelectorFunctionProcInfo = $000003E0;
+ {
+ * NewSelectorFunctionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSelectorFunctionUPP(userRoutine: SelectorFunctionProcPtr): SelectorFunctionUPP; external name '_NewSelectorFunctionUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeSelectorFunctionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSelectorFunctionUPP(userUPP: SelectorFunctionUPP); external name '_DisposeSelectorFunctionUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeSelectorFunctionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSelectorFunctionUPP(selector: OSType; var response: SInt32; userRoutine: SelectorFunctionUPP): OSErr; external name '_InvokeSelectorFunctionUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ Environment Selectors }
+
+const
+ gestaltAddressingModeAttr = $61646472 (* 'addr' *); { addressing mode attributes }
+ gestalt32BitAddressing = 0; { using 32-bit addressing mode }
+ gestalt32BitSysZone = 1; { 32-bit compatible system zone }
+ gestalt32BitCapable = 2; { Machine is 32-bit capable }
+
+ gestaltAFPClient = $61667073 (* 'afps' *);
+ gestaltAFPClientVersionMask = $0000FFFF; { low word of long is the }
+ { client version 0x0001 -> 0x0007 }
+ gestaltAFPClient3_5 = $0001;
+ gestaltAFPClient3_6 = $0002;
+ gestaltAFPClient3_6_1 = $0003;
+ gestaltAFPClient3_6_2 = $0004;
+ gestaltAFPClient3_6_3 = $0005; { including 3.6.4, 3.6.5 }
+ gestaltAFPClient3_7 = $0006; { including 3.7.1 }
+ gestaltAFPClient3_7_2 = $0007; { including 3.7.3, 3.7.4 }
+ gestaltAFPClient3_8 = $0008;
+ gestaltAFPClient3_8_1 = $0009; { including 3.8.2 }
+ gestaltAFPClient3_8_3 = $000A;
+ gestaltAFPClient3_8_4 = $000B; { including 3.8.5, 3.8.6 }
+ gestaltAFPClientAttributeMask = $FFFF0000; { high word of long is a }
+ { set of attribute bits }
+ gestaltAFPClientCfgRsrc = 16; { Client uses config resources }
+ gestaltAFPClientSupportsIP = 29; { Client supports AFP over TCP/IP }
+ gestaltAFPClientVMUI = 30; { Client can put up UI from the PBVolMount trap }
+ gestaltAFPClientMultiReq = 31; { Client supports multiple outstanding requests }
+
+
+ gestaltAliasMgrAttr = $616C6973 (* 'alis' *); { Alias Mgr Attributes }
+ gestaltAliasMgrPresent = 0; { True if the Alias Mgr is present }
+ gestaltAliasMgrSupportsRemoteAppletalk = 1; { True if the Alias Mgr knows about Remote Appletalk }
+ gestaltAliasMgrSupportsAOCEKeychain = 2; { True if the Alias Mgr knows about the AOCE Keychain }
+ gestaltAliasMgrResolveAliasFileWithMountOptions = 3; { True if the Alias Mgr implements gestaltAliasMgrResolveAliasFileWithMountOptions() and IsAliasFile() }
+ gestaltAliasMgrFollowsAliasesWhenResolving = 4;
+ gestaltAliasMgrSupportsExtendedCalls = 5;
+ gestaltAliasMgrSupportsFSCalls = 6; { true if Alias Mgr supports HFS+ Calls }
+ gestaltAliasMgrPrefersPath = 7; { True if the Alias Mgr prioritizes the path over file id during resolution by default }
+ gestaltAliasMgrRequiresAccessors = 8; { Set if Alias Manager requires accessors for size and usertype }
+
+ { Gestalt selector and values for the Appearance Manager }
+ gestaltAppearanceAttr = $61707072 (* 'appr' *);
+ gestaltAppearanceExists = 0;
+ gestaltAppearanceCompatMode = 1;
+
+ { Gestalt selector for determining Appearance Manager version }
+ { If this selector does not exist, but gestaltAppearanceAttr }
+ { does, it indicates that the 1.0 version is installed. This }
+ { gestalt returns a BCD number representing the version of the }
+ { Appearance Manager that is currently running, e.g. 0x0101 for }
+ { version 1.0.1. }
+ gestaltAppearanceVersion = $61707672 (* 'apvr' *);
+
+ gestaltArbitorAttr = $61726220 (* 'arb ' *);
+ gestaltSerialArbitrationExists = 0; { this bit if the serial port arbitrator exists }
+
+ gestaltAppleScriptVersion = $61736376 (* 'ascv' *); { AppleScript version }
+
+ gestaltAppleScriptAttr = $61736372 (* 'ascr' *); { AppleScript attributes }
+ gestaltAppleScriptPresent = 0;
+ gestaltAppleScriptPowerPCSupport = 1;
+
+ gestaltATAAttr = $61746120 (* 'ata ' *); { ATA is the driver to support IDE hard disks }
+ gestaltATAPresent = 0; { if set, ATA Manager is present }
+
+ gestaltATalkVersion = $61746B76 (* 'atkv' *); { Detailed AppleTalk version; see comment above for format }
+
+ gestaltAppleTalkVersion = $61746C6B (* 'atlk' *); { appletalk version }
+
+ {
+ FORMAT of gestaltATalkVersion RESPONSE
+ --------------------------------------
+ The version is stored in the high three bytes of the response value. Let us number
+ the bytes in the response value from 0 to 3, where 0 is the least-significant byte.
+
+ Byte#: 3 2 1 0
+ Value: 0xMMNNRR00
+
+ Byte 3 (MM) contains the major revision number, byte 2 (NN) contains the minor
+ revision number, and byte 1 (RR) contains a constant that represents the release
+ stage. Byte 0 always contains 0x00. The constants for the release stages are:
+
+ development = 0x20
+ alpha = 0x40
+ beta = 0x60
+ final = 0x80
+ release = 0x80
+
+ For example, if you call Gestalt with the 'atkv' selector when AppleTalk version 57
+ is loaded, you receive the long SInt16 response value 0x39008000.
+ }
+ gestaltAUXVersion = $612F7578 (* 'a/ux' *); { a/ux version, if present }
+
+ gestaltMacOSCompatibilityBoxAttr = $62626F78 (* 'bbox' *); { Classic presence and features }
+ gestaltMacOSCompatibilityBoxPresent = 0; { True if running under the Classic }
+ gestaltMacOSCompatibilityBoxHasSerial = 1; { True if Classic serial support is implemented. }
+ gestaltMacOSCompatibilityBoxless = 2; { True if we're Boxless (screen shared with Carbon/Cocoa) }
+
+ gestaltBusClkSpeed = $62636C6B (* 'bclk' *); { main I/O bus clock speed in hertz }
+
+ gestaltBusClkSpeedMHz = $62636C6D (* 'bclm' *); { main I/O bus clock speed in megahertz ( an unsigned long ) }
+
+ gestaltCloseViewAttr = $42534461 (* 'BSDa' *); { CloseView attributes }
+ gestaltCloseViewEnabled = 0; { Closeview enabled (dynamic bit - returns current state) }
+ gestaltCloseViewDisplayMgrFriendly = 1; { Closeview compatible with Display Manager (FUTURE) }
+
+ gestaltCarbonVersion = $63626F6E (* 'cbon' *); { version of Carbon API present in system }
+
+ gestaltCFMAttr = $63667267 (* 'cfrg' *); { Selector for information about the Code Fragment Manager }
+ gestaltCFMPresent = 0; { True if the Code Fragment Manager is present }
+ gestaltCFMPresentMask = $0001;
+ gestaltCFM99Present = 2; { True if the CFM-99 features are present. }
+ gestaltCFM99PresentMask = $0004;
+
+ gestaltProcessorCacheLineSize = $6373697A (* 'csiz' *); { The size, in bytes, of the processor cache line. }
+
+ gestaltCollectionMgrVersion = $636C746E (* 'cltn' *); { Collection Manager version }
+
+ gestaltColorMatchingAttr = $636D7461 (* 'cmta' *); { ColorSync attributes }
+ gestaltHighLevelMatching = 0;
+ gestaltColorMatchingLibLoaded = 1;
+
+ gestaltColorMatchingVersion = $636D7463 (* 'cmtc' *);
+ gestaltColorSync10 = $0100; { 0x0100 & 0x0110 _Gestalt versions for 1.0-1.0.3 product }
+ gestaltColorSync11 = $0110; { 0x0100 == low-level matching only }
+ gestaltColorSync104 = $0104; { Real version, by popular demand }
+ gestaltColorSync105 = $0105;
+ gestaltColorSync20 = $0200; { ColorSync 2.0 }
+ gestaltColorSync21 = $0210;
+ gestaltColorSync211 = $0211;
+ gestaltColorSync212 = $0212;
+ gestaltColorSync213 = $0213;
+ gestaltColorSync25 = $0250;
+ gestaltColorSync26 = $0260;
+ gestaltColorSync261 = $0261;
+ gestaltColorSync30 = $0300;
+
+ gestaltControlMgrVersion = $636D7672 (* 'cmvr' *); { NOTE: The first version we return is 3.0.1, on Mac OS X plus update 2 }
+
+ gestaltControlMgrAttr = $636E746C (* 'cntl' *); { Control Mgr }
+ gestaltControlMgrPresent = $00000001; { NOTE: this is a bit mask, whereas all other Gestalt constants of }
+ { this type are bit index values. Universal Interfaces 3.2 slipped }
+ { out the door with this mistake. }
+ gestaltControlMgrPresentBit = 0; { bit number }
+ gestaltControlMsgPresentMask = $00000001;
+
+ gestaltConnMgrAttr = $636F6E6E (* 'conn' *); { connection mgr attributes }
+ gestaltConnMgrPresent = 0;
+ gestaltConnMgrCMSearchFix = 1; { Fix to CMAddSearch? }
+ gestaltConnMgrErrorString = 2; { has CMGetErrorString() }
+ gestaltConnMgrMultiAsyncIO = 3; { CMNewIOPB, CMDisposeIOPB, CMPBRead, CMPBWrite, CMPBIOKill }
+
+ gestaltColorPickerVersion = $63706B72 (* 'cpkr' *); { returns version of ColorPicker }
+ gestaltColorPicker = $63706B72 (* 'cpkr' *); { gestaltColorPicker is old name for gestaltColorPickerVersion }
+
+ gestaltComponentMgr = $63706E74 (* 'cpnt' *); { Component Mgr version }
+ gestaltComponentPlatform = $636F706C (* 'copl' *); { Component Platform number }
+
+ {
+ The gestaltNativeCPUtype ('cput') selector can be used to determine the
+ native CPU type for all Macs running System 7.5 or later.
+
+ The 'cput' selector is not available when running System 7.0 (or earlier)
+ on most 68K machines. If 'cput' is not available, then the 'proc' selector
+ should be used to determine the processor type.
+
+ An application should always try the 'cput' selector first. This is because,
+ on PowerPC machines, the 'proc' selector will reflect the CPU type of the
+ emulator's "virtual processor" rather than the native CPU type.
+
+ The values specified below are accurate. Prior versions of the Gestalt
+ interface file contained values that were off by one.
+
+ The Quadra 840AV and the Quadra 660AV contain a bug in the ROM code that
+ causes the 'cput' selector to respond with the value 5. This behavior
+ occurs only when running System 7.1. System 7.5 fixes the bug by replacing
+ the faulty 'cput' selector function with the correct one.
+
+ The gestaltNativeCPUfamily ('cpuf') selector can be used to determine the
+ general family the native CPU is in. This can be helpful for determing how
+ blitters and things should be written. In general, it is smarter to use this
+ selector (when available) than gestaltNativeCPUtype since newer processors
+ in the same family can be handled without revising your code.
+
+ gestaltNativeCPUfamily uses the same results as gestaltNativeCPUtype, but
+ will only return certain CPU values.
+ }
+ gestaltNativeCPUtype = $63707574 (* 'cput' *); { Native CPU type }
+ gestaltNativeCPUfamily = $63707566 (* 'cpuf' *); { Native CPU family }
+ gestaltCPU68000 = 0; { Various 68k CPUs... }
+ gestaltCPU68010 = 1;
+ gestaltCPU68020 = 2;
+ gestaltCPU68030 = 3;
+ gestaltCPU68040 = 4;
+ gestaltCPU601 = $0101; { IBM 601 }
+ gestaltCPU603 = $0103;
+ gestaltCPU604 = $0104;
+ gestaltCPU603e = $0106;
+ gestaltCPU603ev = $0107;
+ gestaltCPU750 = $0108; { Also 740 - "G3" }
+ gestaltCPU604e = $0109;
+ gestaltCPU604ev = $010A; { Mach 5, 250Mhz and up }
+ gestaltCPUG4 = $010C; { Max }
+ gestaltCPUG47450 = $0110; { Vger , Altivec }
+
+ gestaltCPUApollo = $0111; { Apollo , Altivec, G4 7455 }
+ gestaltCPUG47447 = $0112;
+ gestaltCPU750FX = $0120; { Sahara,G3 like thing }
+ gestaltCPU970 = $0139; { G5 }
+ gestaltCPU970FX = $013C; { another G5 }
+
+ { x86 CPUs all start with 'i' in the high nybble }
+ gestaltCPU486 = $69343836 (* 'i486' *);
+ gestaltCPUPentium = $69353836 (* 'i586' *);
+ gestaltCPUPentiumPro = $69357072 (* 'i5pr' *);
+ gestaltCPUPentiumII = $69356969 (* 'i5ii' *);
+ gestaltCPUX86 = $69787878 (* 'ixxx' *);
+ gestaltCPUPentium4 = $69356976 (* 'i5iv' *);
+
+
+ gestaltCRMAttr = $63726D20 (* 'crm ' *); { comm resource mgr attributes }
+ gestaltCRMPresent = 0;
+ gestaltCRMPersistentFix = 1; { fix for persistent tools }
+ gestaltCRMToolRsrcCalls = 2; { has CRMGetToolResource/ReleaseToolResource }
+
+ gestaltControlStripVersion = $63737672 (* 'csvr' *); { Control Strip version (was 'sdvr') }
+
+ gestaltCountOfCPUs = $63707573 (* 'cpus' *); { the number of CPUs on the computer, Mac OS X 10.4 and later }
+
+ gestaltCTBVersion = $63746276 (* 'ctbv' *); { CommToolbox version }
+
+ gestaltDBAccessMgrAttr = $64626163 (* 'dbac' *); { Database Access Mgr attributes }
+ gestaltDBAccessMgrPresent = 0; { True if Database Access Mgr present }
+
+ gestaltDiskCacheSize = $6463737A (* 'dcsz' *); { Size of disk cache's buffers, in bytes }
+
+ gestaltSDPFindVersion = $64666E64 (* 'dfnd' *); { OCE Standard Directory Panel }
+
+ gestaltDictionaryMgrAttr = $64696374 (* 'dict' *); { Dictionary Manager attributes }
+ gestaltDictionaryMgrPresent = 0; { Dictionary Manager attributes }
+
+ gestaltDITLExtAttr = $6469746C (* 'ditl' *); { AppenDITL, etc. calls from CTB }
+ gestaltDITLExtPresent = 0; { True if calls are present }
+ gestaltDITLExtSupportsIctb = 1; { True if AppendDITL, ShortenDITL support 'ictb's }
+
+ gestaltDialogMgrAttr = $646C6F67 (* 'dlog' *); { Dialog Mgr }
+ gestaltDialogMgrPresent = $00000001; { NOTE: this is a bit mask, whereas all other Gestalt constants of }
+ { this type are bit index values. Universal Interfaces 3.2 slipped }
+ { out the door with this mistake. }
+ gestaltDialogMgrPresentBit = 0; { bit number }
+ gestaltDialogMgrHasAquaAlertBit = 2; { bit number }
+ gestaltDialogMgrPresentMask = $00000001;
+ gestaltDialogMgrHasAquaAlertMask = $00000004;
+ gestaltDialogMsgPresentMask = $00000001; { compatibility mask }
+
+ gestaltDesktopPicturesAttr = $646B7078 (* 'dkpx' *); { Desktop Pictures attributes }
+ gestaltDesktopPicturesInstalled = 0; { True if control panel is installed }
+ gestaltDesktopPicturesDisplayed = 1; { True if a picture is currently displayed }
+
+ gestaltDisplayMgrVers = $64706C76 (* 'dplv' *); { Display Manager version }
+
+ gestaltDisplayMgrAttr = $64706C79 (* 'dply' *); { Display Manager attributes }
+ gestaltDisplayMgrPresent = 0; { True if Display Mgr is present }
+ gestaltDisplayMgrCanSwitchMirrored = 2; { True if Display Mgr can switch modes on mirrored displays }
+ gestaltDisplayMgrSetDepthNotifies = 3; { True SetDepth generates displays mgr notification }
+ gestaltDisplayMgrCanConfirm = 4; { True Display Manager supports DMConfirmConfiguration }
+ gestaltDisplayMgrColorSyncAware = 5; { True if Display Manager supports profiles for displays }
+ gestaltDisplayMgrGeneratesProfiles = 6; { True if Display Manager will automatically generate profiles for displays }
+ gestaltDisplayMgrSleepNotifies = 7; { True if Display Mgr generates "displayWillSleep", "displayDidWake" notifications }
+
+ gestaltDragMgrAttr = $64726167 (* 'drag' *); { Drag Manager attributes }
+ gestaltDragMgrPresent = 0; { Drag Manager is present }
+ gestaltDragMgrFloatingWind = 1; { Drag Manager supports floating windows }
+ gestaltPPCDragLibPresent = 2; { Drag Manager PPC DragLib is present }
+ gestaltDragMgrHasImageSupport = 3; { Drag Manager allows SetDragImage call }
+ gestaltCanStartDragInFloatWindow = 4; { Drag Manager supports starting a drag in a floating window }
+ gestaltSetDragImageUpdates = 5; { Drag Manager supports drag image updating via SetDragImage }
+
+ gestaltDrawSprocketVersion = $64737076 (* 'dspv' *); { Draw Sprocket version (as a NumVersion) }
+
+ gestaltDigitalSignatureVersion = $64736967 (* 'dsig' *); { returns Digital Signature Toolbox version in low-order word }
+
+ {
+ Desktop Printing Feature Gestalt
+ Use this gestalt to check if third-party printer driver support is available
+ }
+ gestaltDTPFeatures = $64747066 (* 'dtpf' *);
+ kDTPThirdPartySupported = $00000004; { mask for checking if third-party drivers are supported }
+
+
+ {
+ Desktop Printer Info Gestalt
+ Use this gestalt to get a hold of information for all of the active desktop printers
+ }
+ gestaltDTPInfo = $64747078 (* 'dtpx' *); { returns GestaltDTPInfoHdle }
+
+ gestaltEasyAccessAttr = $65617379 (* 'easy' *); { Easy Access attributes }
+ gestaltEasyAccessOff = 0; { if Easy Access present, but off (no icon) }
+ gestaltEasyAccessOn = 1; { if Easy Access "On" }
+ gestaltEasyAccessSticky = 2; { if Easy Access "Sticky" }
+ gestaltEasyAccessLocked = 3; { if Easy Access "Locked" }
+
+ gestaltEditionMgrAttr = $6564746E (* 'edtn' *); { Edition Mgr attributes }
+ gestaltEditionMgrPresent = 0; { True if Edition Mgr present }
+ gestaltEditionMgrTranslationAware = 1; { True if edition manager is translation manager aware }
+
+ gestaltAppleEventsAttr = $65766E74 (* 'evnt' *); { Apple Events attributes }
+ gestaltAppleEventsPresent = 0; { True if Apple Events present }
+ gestaltScriptingSupport = 1;
+ gestaltOSLInSystem = 2; { OSL is in system so donÕt use the one linked in to app }
+ gestaltSupportsApplicationURL = 4; { Supports the typeApplicationURL addressing mode }
+
+ gestaltExtensionTableVersion = $6574626C (* 'etbl' *); { ExtensionTable version }
+
+
+ gestaltFBCIndexingState = $66626369 (* 'fbci' *); { Find By Content indexing state }
+ gestaltFBCindexingSafe = 0; { any search will result in synchronous wait }
+ gestaltFBCindexingCritical = 1; { any search will execute immediately }
+
+ gestaltFBCVersion = $66626376 (* 'fbcv' *); { Find By Content version }
+ gestaltFBCCurrentVersion = $0011; { First release for OS 8/9 }
+ gestaltOSXFBCCurrentVersion = $0100; { First release for OS X }
+
+
+ gestaltFileMappingAttr = $666C6D70 (* 'flmp' *); { File mapping attributes }
+ gestaltFileMappingPresent = 0; { bit is set if file mapping APIs are present }
+ gestaltFileMappingMultipleFilesFix = 1; { bit is set if multiple files per volume can be mapped }
+
+ gestaltFloppyAttr = $666C7079 (* 'flpy' *); { Floppy disk drive/driver attributes }
+ gestaltFloppyIsMFMOnly = 0; { Floppy driver only supports MFM disk formats }
+ gestaltFloppyIsManualEject = 1; { Floppy drive, driver, and file system are in manual-eject mode }
+ gestaltFloppyUsesDiskInPlace = 2; { Floppy drive must have special DISK-IN-PLACE output; standard DISK-CHANGED not used }
+
+ gestaltFinderAttr = $666E6472 (* 'fndr' *); { Finder attributes }
+ gestaltFinderDropEvent = 0; { Finder recognizes drop event }
+ gestaltFinderMagicPlacement = 1; { Finder supports magic icon placement }
+ gestaltFinderCallsAEProcess = 2; { Finder calls AEProcessAppleEvent }
+ gestaltOSLCompliantFinder = 3; { Finder is scriptable and recordable }
+ gestaltFinderSupports4GBVolumes = 4; { Finder correctly handles 4GB volumes }
+ gestaltFinderHasClippings = 6; { Finder supports Drag Manager clipping files }
+ gestaltFinderFullDragManagerSupport = 7; { Finder accepts 'hfs ' flavors properly }
+ gestaltFinderFloppyRootComments = 8; { in MacOS 8 and later, will be set if Finder ever supports comments on Floppy icons }
+ gestaltFinderLargeAndNotSavedFlavorsOK = 9; { in MacOS 8 and later, this bit is set if drags with >1024-byte flavors and flavorNotSaved flavors work reliably }
+ gestaltFinderUsesExtensibleFolderManager = 10; { Finder uses Extensible Folder Manager (for example, for Magic Routing) }
+ gestaltFinderUnderstandsRedirectedDesktopFolder = 11; { Finder deals with startup disk's desktop folder residing on another disk }
+
+ gestaltFindFolderAttr = $666F6C64 (* 'fold' *); { Folder Mgr attributes }
+ gestaltFindFolderPresent = 0; { True if Folder Mgr present }
+ gestaltFolderDescSupport = 1; { True if Folder Mgr has FolderDesc calls }
+ gestaltFolderMgrFollowsAliasesWhenResolving = 2; { True if Folder Mgr follows folder aliases }
+ gestaltFolderMgrSupportsExtendedCalls = 3; { True if Folder Mgr supports the Extended calls }
+ gestaltFolderMgrSupportsDomains = 4; { True if Folder Mgr supports domains for the first parameter to FindFolder }
+ gestaltFolderMgrSupportsFSCalls = 5; { True if FOlder manager supports __FindFolderFSRef & __FindFolderExtendedFSRef }
+
+ gestaltFindFolderRedirectionAttr = $666F6C65 (* 'fole' *);
+
+
+ gestaltFontMgrAttr = $666F6E74 (* 'font' *); { Font Mgr attributes }
+ gestaltOutlineFonts = 0; { True if Outline Fonts supported }
+
+ gestaltFPUType = $66707520 (* 'fpu ' *); { fpu type }
+ gestaltNoFPU = 0; { no FPU }
+ gestalt68881 = 1; { 68881 FPU }
+ gestalt68882 = 2; { 68882 FPU }
+ gestalt68040FPU = 3; { 68040 built-in FPU }
+
+ gestaltFSAttr = $66732020 (* 'fs ' *); { file system attributes }
+ gestaltFullExtFSDispatching = 0; { has really cool new HFSDispatch dispatcher }
+ gestaltHasFSSpecCalls = 1; { has FSSpec calls }
+ gestaltHasFileSystemManager = 2; { has a file system manager }
+ gestaltFSMDoesDynamicLoad = 3; { file system manager supports dynamic loading }
+ gestaltFSSupports4GBVols = 4; { file system supports 4 gigabyte volumes }
+ gestaltFSSupports2TBVols = 5; { file system supports 2 terabyte volumes }
+ gestaltHasExtendedDiskInit = 6; { has extended Disk Initialization calls }
+ gestaltDTMgrSupportsFSM = 7; { Desktop Manager support FSM-based foreign file systems }
+ gestaltFSNoMFSVols = 8; { file system doesn't supports MFS volumes }
+ gestaltFSSupportsHFSPlusVols = 9; { file system supports HFS Plus volumes }
+ gestaltFSIncompatibleDFA82 = 10; { VCB and FCB structures changed; DFA 8.2 is incompatible }
+
+ gestaltFSSupportsDirectIO = 11; { file system supports DirectIO }
+
+ gestaltHasHFSPlusAPIs = 12; { file system supports HFS Plus APIs }
+ gestaltMustUseFCBAccessors = 13; { FCBSPtr and FSFCBLen are invalid - must use FSM FCB accessor functions }
+ gestaltFSUsesPOSIXPathsForConversion = 14; { The path interchange routines operate on POSIX paths instead of HFS paths }
+ gestaltFSSupportsExclusiveLocks = 15; { File system uses POSIX O_EXLOCK for opens }
+ gestaltFSSupportsHardLinkDetection = 16; { File system returns if an item is a hard link }
+ gestaltFSAllowsConcurrentAsyncIO = 17; { File Manager supports concurrent async reads and writes }
+
+ gestaltAdminFeaturesFlagsAttr = $66726564 (* 'fred' *); { a set of admin flags, mostly useful internally. }
+ gestaltFinderUsesSpecialOpenFoldersFile = 0; { the Finder uses a special file to store the list of open folders }
+
+ gestaltFSMVersion = $66736D20 (* 'fsm ' *); { returns version of HFS External File Systems Manager (FSM) }
+
+ gestaltFXfrMgrAttr = $66786672 (* 'fxfr' *); { file transfer manager attributes }
+ gestaltFXfrMgrPresent = 0;
+ gestaltFXfrMgrMultiFile = 1; { supports FTSend and FTReceive }
+ gestaltFXfrMgrErrorString = 2; { supports FTGetErrorString }
+ gestaltFXfrMgrAsync = 3; { supports FTSendAsync, FTReceiveAsync, FTCompletionAsync }
+
+ gestaltGraphicsAttr = $67667861 (* 'gfxa' *); { Quickdraw GX attributes selector }
+ gestaltGraphicsIsDebugging = $00000001;
+ gestaltGraphicsIsLoaded = $00000002;
+ gestaltGraphicsIsPowerPC = $00000004;
+
+ gestaltGraphicsVersion = $67726678 (* 'grfx' *); { Quickdraw GX version selector }
+ gestaltCurrentGraphicsVersion = $00010200; { the version described in this set of headers }
+
+ gestaltHardwareAttr = $68647772 (* 'hdwr' *); { hardware attributes }
+ gestaltHasVIA1 = 0; { VIA1 exists }
+ gestaltHasVIA2 = 1; { VIA2 exists }
+ gestaltHasASC = 3; { Apple Sound Chip exists }
+ gestaltHasSCC = 4; { SCC exists }
+ gestaltHasSCSI = 7; { SCSI exists }
+ gestaltHasSoftPowerOff = 19; { Capable of software power off }
+ gestaltHasSCSI961 = 21; { 53C96 SCSI controller on internal bus }
+ gestaltHasSCSI962 = 22; { 53C96 SCSI controller on external bus }
+ gestaltHasUniversalROM = 24; { Do we have a Universal ROM? }
+ gestaltHasEnhancedLtalk = 30; { Do we have Enhanced LocalTalk? }
+
+ gestaltHelpMgrAttr = $68656C70 (* 'help' *); { Help Mgr Attributes }
+ gestaltHelpMgrPresent = 0; { true if help mgr is present }
+ gestaltHelpMgrExtensions = 1; { true if help mgr extensions are installed }
+ gestaltAppleGuideIsDebug = 30;
+ gestaltAppleGuidePresent = 31; { true if AppleGuide is installed }
+
+ gestaltHardwareVendorCode = $68726164 (* 'hrad' *); { Returns hardware vendor information }
+ gestaltHardwareVendorApple = $4170706C (* 'Appl' *); { Hardware built by Apple }
+
+ gestaltCompressionMgr = $69636D70 (* 'icmp' *); { returns version of the Image Compression Manager }
+
+ gestaltIconUtilitiesAttr = $69636F6E (* 'icon' *); { Icon Utilities attributes (Note: available in System 7.0, despite gestalt) }
+ gestaltIconUtilitiesPresent = 0; { true if icon utilities are present }
+ gestaltIconUtilitiesHas48PixelIcons = 1; { true if 48x48 icons are supported by IconUtilities }
+ gestaltIconUtilitiesHas32BitIcons = 2; { true if 32-bit deep icons are supported }
+ gestaltIconUtilitiesHas8BitDeepMasks = 3; { true if 8-bit deep masks are supported }
+ gestaltIconUtilitiesHasIconServices = 4; { true if IconServices is present }
+
+ gestaltInternalDisplay = $69647370 (* 'idsp' *); { slot number of internal display location }
+
+ {
+ To obtain information about the connected keyboard(s), one should
+ use the ADB Manager API. See Technical Note OV16 for details.
+ }
+ gestaltKeyboardType = $6B626420 (* 'kbd ' *); { keyboard type }
+ gestaltMacKbd = 1;
+ gestaltMacAndPad = 2;
+ gestaltMacPlusKbd = 3;
+ gestaltExtADBKbd = 4;
+ gestaltStdADBKbd = 5;
+ gestaltPrtblADBKbd = 6;
+ gestaltPrtblISOKbd = 7;
+ gestaltStdISOADBKbd = 8;
+ gestaltExtISOADBKbd = 9;
+ gestaltADBKbdII = 10;
+ gestaltADBISOKbdII = 11;
+ gestaltPwrBookADBKbd = 12;
+ gestaltPwrBookISOADBKbd = 13;
+ gestaltAppleAdjustKeypad = 14;
+ gestaltAppleAdjustADBKbd = 15;
+ gestaltAppleAdjustISOKbd = 16;
+ gestaltJapanAdjustADBKbd = 17; { Japan Adjustable Keyboard }
+ gestaltPwrBkExtISOKbd = 20; { PowerBook Extended International Keyboard with function keys }
+ gestaltPwrBkExtJISKbd = 21; { PowerBook Extended Japanese Keyboard with function keys }
+ gestaltPwrBkExtADBKbd = 24; { PowerBook Extended Domestic Keyboard with function keys }
+ gestaltPS2Keyboard = 27; { PS2 keyboard }
+ gestaltPwrBkSubDomKbd = 28; { PowerBook Subnote Domestic Keyboard with function keys w/ inverted T }
+ gestaltPwrBkSubISOKbd = 29; { PowerBook Subnote International Keyboard with function keys w/ inverted T }
+ gestaltPwrBkSubJISKbd = 30; { PowerBook Subnote Japanese Keyboard with function keys w/ inverted T }
+ gestaltPortableUSBANSIKbd = 37; { Powerbook USB-based internal keyboard, ANSI layout }
+ gestaltPortableUSBISOKbd = 38; { Powerbook USB-based internal keyboard, ISO layout }
+ gestaltPortableUSBJISKbd = 39; { Powerbook USB-based internal keyboard, JIS layout }
+ gestaltThirdPartyANSIKbd = 40; { Third party keyboard, ANSI layout. Returned in Mac OS X Tiger and later. }
+ gestaltThirdPartyISOKbd = 41; { Third party keyboard, ISO layout. Returned in Mac OS X Tiger and later. }
+ gestaltThirdPartyJISKbd = 42; { Third party keyboard, JIS layout. Returned in Mac OS X Tiger and later. }
+ gestaltPwrBkEKDomKbd = 195; { (0xC3) PowerBook Domestic Keyboard with Embedded Keypad, function keys & inverted T }
+ gestaltPwrBkEKISOKbd = 196; { (0xC4) PowerBook International Keyboard with Embedded Keypad, function keys & inverted T }
+ gestaltPwrBkEKJISKbd = 197; { (0xC5) PowerBook Japanese Keyboard with Embedded Keypad, function keys & inverted T }
+ gestaltUSBCosmoANSIKbd = 198; { (0xC6) original USB Domestic (ANSI) Keyboard }
+ gestaltUSBCosmoISOKbd = 199; { (0xC7) original USB International (ISO) Keyboard }
+ gestaltUSBCosmoJISKbd = 200; { (0xC8) original USB Japanese (JIS) Keyboard }
+ gestaltPwrBk99JISKbd = 201; { (0xC9) '99 PowerBook JIS Keyboard with Embedded Keypad, function keys & inverted T }
+ gestaltUSBAndyANSIKbd = 204; { (0xCC) USB Pro Keyboard Domestic (ANSI) Keyboard }
+ gestaltUSBAndyISOKbd = 205; { (0xCD) USB Pro Keyboard International (ISO) Keyboard }
+ gestaltUSBAndyJISKbd = 206; { (0xCE) USB Pro Keyboard Japanese (JIS) Keyboard }
+
+ gestaltPortable2001ANSIKbd = 202; { (0xCA) PowerBook and iBook Domestic (ANSI) Keyboard with 2nd cmd key right & function key moves. }
+ gestaltPortable2001ISOKbd = 203; { (0xCB) PowerBook and iBook International (ISO) Keyboard with 2nd cmd key right & function key moves. }
+ gestaltPortable2001JISKbd = 207; { (0xCF) PowerBook and iBook Japanese (JIS) Keyboard with function key moves. }
+
+ gestaltUSBProF16ANSIKbd = 34; { (0x22) USB Pro Keyboard w/ F16 key Domestic (ANSI) Keyboard }
+ gestaltUSBProF16ISOKbd = 35; { (0x23) USB Pro Keyboard w/ F16 key International (ISO) Keyboard }
+ gestaltUSBProF16JISKbd = 36; { (0x24) USB Pro Keyboard w/ F16 key Japanese (JIS) Keyboard }
+ gestaltProF16ANSIKbd = 31; { (0x1F) Pro Keyboard w/F16 key Domestic (ANSI) Keyboard }
+ gestaltProF16ISOKbd = 32; { (0x20) Pro Keyboard w/F16 key International (ISO) Keyboard }
+ gestaltProF16JISKbd = 33; { (0x21) Pro Keyboard w/F16 key Japanese (JIS) Keyboard }
+
+ {
+ This gestalt indicates the highest UDF version that the active UDF implementation supports.
+ The value should be assembled from a read version (upper word) and a write version (lower word)
+ }
+ gestaltUDFSupport = $6B756466 (* 'kudf' *); { Used for communication between UDF implementations }
+
+ gestaltLowMemorySize = $6C6D656D (* 'lmem' *); { size of low memory area }
+
+ gestaltLogicalRAMSize = $6C72616D (* 'lram' *); { logical ram size }
+
+ {
+ MACHINE type CONSTANTS NAMING CONVENTION
+
+ All future machine type constant names take the following form:
+
+ gestalt<lineName><modelNumber>
+
+ Line Names
+
+ The following table contains the lines currently produced by Apple and the
+ lineName substrings associated with them:
+
+ Line lineName
+ ------------------------- ------------
+ Macintosh LC "MacLC"
+ Macintosh Performa "Performa"
+ Macintosh PowerBook "PowerBook"
+ Macintosh PowerBook Duo "PowerBookDuo"
+ Power Macintosh "PowerMac"
+ Apple Workgroup Server "AWS"
+
+ The following table contains lineNames for some discontinued lines:
+
+ Line lineName
+ ------------------------- ------------
+ Macintosh Quadra "MacQuadra" (preferred)
+ "Quadra" (also used, but not preferred)
+ Macintosh Centris "MacCentris"
+
+ Model Numbers
+
+ The modelNumber is a string representing the specific model of the machine
+ within its particular line. For example, for the Power Macintosh 8100/80,
+ the modelNumber is "8100".
+
+ Some Performa & LC model numbers contain variations in the rightmost 1 or 2
+ digits to indicate different RAM and Hard Disk configurations. A single
+ machine type is assigned for all variations of a specific model number. In
+ this case, the modelNumber string consists of the constant leftmost part
+ of the model number with 0s for the variant digits. For example, the
+ Performa 6115 and Performa 6116 are both return the same machine type
+ constant: gestaltPerforma6100.
+
+
+ OLD NAMING CONVENTIONS
+
+ The "Underscore Speed" suffix
+
+ In the past, Apple differentiated between machines that had the same model
+ number but different speeds. For example, the Power Macintosh 8100/80 and
+ Power Macintosh 8100/100 return different machine type constants. This is
+ why some existing machine type constant names take the form:
+
+ gestalt<lineName><modelNumber>_<speed>
+
+ e.g.
+
+ gestaltPowerMac8100_110
+ gestaltPowerMac7100_80
+ gestaltPowerMac7100_66
+
+ It is no longer necessary to use the "underscore speed" suffix. Starting with
+ the Power Surge machines (Power Macintosh 7200, 7500, 8500 and 9500), speed is
+ no longer used to differentiate between machine types. This is why a Power
+ Macintosh 7200/75 and a Power Macintosh 7200/90 return the same machine type
+ constant: gestaltPowerMac7200.
+
+ The "Screen Type" suffix
+
+ All PowerBook models prior to the PowerBook 190, and all PowerBook Duo models
+ before the PowerBook Duo 2300 take the form:
+
+ gestalt<lineName><modelNumber><screenType>
+
+ Where <screenType> is "c" or the empty string.
+
+ e.g.
+
+ gestaltPowerBook100
+ gestaltPowerBookDuo280
+ gestaltPowerBookDuo280c
+ gestaltPowerBook180
+ gestaltPowerBook180c
+
+ Starting with the PowerBook 190 series and the PowerBook Duo 2300 series, machine
+ types are no longer differentiated based on screen type. This is why a PowerBook
+ 5300cs/100 and a PowerBook 5300c/100 both return the same machine type constant:
+ gestaltPowerBook5300.
+
+ Macintosh LC 630 gestaltMacLC630
+ Macintosh Performa 6200 gestaltPerforma6200
+ Macintosh Quadra 700 gestaltQuadra700
+ Macintosh PowerBook 5300 gestaltPowerBook5300
+ Macintosh PowerBook Duo 2300 gestaltPowerBookDuo2300
+ Power Macintosh 8500 gestaltPowerMac8500
+ }
+
+ gestaltMachineType = $6D616368 (* 'mach' *); { machine type }
+ gestaltClassic = 1;
+ gestaltMacXL = 2;
+ gestaltMac512KE = 3;
+ gestaltMacPlus = 4;
+ gestaltMacSE = 5;
+ gestaltMacII = 6;
+ gestaltMacIIx = 7;
+ gestaltMacIIcx = 8;
+ gestaltMacSE030 = 9;
+ gestaltPortable = 10;
+ gestaltMacIIci = 11;
+ gestaltPowerMac8100_120 = 12;
+ gestaltMacIIfx = 13;
+ gestaltMacClassic = 17;
+ gestaltMacIIsi = 18;
+ gestaltMacLC = 19;
+ gestaltMacQuadra900 = 20;
+ gestaltPowerBook170 = 21;
+ gestaltMacQuadra700 = 22;
+ gestaltClassicII = 23;
+ gestaltPowerBook100 = 24;
+ gestaltPowerBook140 = 25;
+ gestaltMacQuadra950 = 26;
+ gestaltMacLCIII = 27;
+ gestaltPerforma450 = 27;
+ gestaltPowerBookDuo210 = 29;
+ gestaltMacCentris650 = 30;
+ gestaltPowerBookDuo230 = 32;
+ gestaltPowerBook180 = 33;
+ gestaltPowerBook160 = 34;
+ gestaltMacQuadra800 = 35;
+ gestaltMacQuadra650 = 36;
+ gestaltMacLCII = 37;
+ gestaltPowerBookDuo250 = 38;
+ gestaltAWS9150_80 = 39;
+ gestaltPowerMac8100_110 = 40;
+ gestaltAWS8150_110 = 40;
+ gestaltPowerMac5200 = 41;
+ gestaltPowerMac5260 = 41;
+ gestaltPerforma5300 = 41;
+ gestaltPowerMac6200 = 42;
+ gestaltPerforma6300 = 42;
+ gestaltMacIIvi = 44;
+ gestaltMacIIvm = 45;
+ gestaltPerforma600 = 45;
+ gestaltPowerMac7100_80 = 47;
+ gestaltMacIIvx = 48;
+ gestaltMacColorClassic = 49;
+ gestaltPerforma250 = 49;
+ gestaltPowerBook165c = 50;
+ gestaltMacCentris610 = 52;
+ gestaltMacQuadra610 = 53;
+ gestaltPowerBook145 = 54;
+ gestaltPowerMac8100_100 = 55;
+ gestaltMacLC520 = 56;
+ gestaltAWS9150_120 = 57;
+ gestaltPowerMac6400 = 58;
+ gestaltPerforma6400 = 58;
+ gestaltPerforma6360 = 58;
+ gestaltMacCentris660AV = 60;
+ gestaltMacQuadra660AV = 60;
+ gestaltPerforma46x = 62;
+ gestaltPowerMac8100_80 = 65;
+ gestaltAWS8150_80 = 65;
+ gestaltPowerMac9500 = 67;
+ gestaltPowerMac9600 = 67;
+ gestaltPowerMac7500 = 68;
+ gestaltPowerMac7600 = 68;
+ gestaltPowerMac8500 = 69;
+ gestaltPowerMac8600 = 69;
+ gestaltAWS8550 = 68;
+ gestaltPowerBook180c = 71;
+ gestaltPowerBook520 = 72;
+ gestaltPowerBook520c = 72;
+ gestaltPowerBook540 = 72;
+ gestaltPowerBook540c = 72;
+ gestaltPowerMac5400 = 74;
+ gestaltPowerMac6100_60 = 75;
+ gestaltAWS6150_60 = 75;
+ gestaltPowerBookDuo270c = 77;
+ gestaltMacQuadra840AV = 78;
+ gestaltPerforma550 = 80;
+ gestaltPowerBook165 = 84;
+ gestaltPowerBook190 = 85;
+ gestaltMacTV = 88;
+ gestaltMacLC475 = 89;
+ gestaltPerforma47x = 89;
+ gestaltMacLC575 = 92;
+ gestaltMacQuadra605 = 94;
+ gestaltMacQuadra630 = 98;
+ gestaltMacLC580 = 99;
+ gestaltPerforma580 = 99;
+ gestaltPowerMac6100_66 = 100;
+ gestaltAWS6150_66 = 100;
+ gestaltPowerBookDuo280 = 102;
+ gestaltPowerBookDuo280c = 103;
+ gestaltPowerMacLC475 = 104; { Mac LC 475 & PPC Processor Upgrade Card }
+ gestaltPowerMacPerforma47x = 104;
+ gestaltPowerMacLC575 = 105; { Mac LC 575 & PPC Processor Upgrade Card }
+ gestaltPowerMacPerforma57x = 105;
+ gestaltPowerMacQuadra630 = 106; { Quadra 630 & PPC Processor Upgrade Card }
+ gestaltPowerMacLC630 = 106; { Mac LC 630 & PPC Processor Upgrade Card }
+ gestaltPowerMacPerforma63x = 106; { Performa 63x & PPC Processor Upgrade Card }
+ gestaltPowerMac7200 = 108;
+ gestaltPowerMac7300 = 109;
+ gestaltPowerMac7100_66 = 112;
+ gestaltPowerBook150 = 115;
+ gestaltPowerMacQuadra700 = 116; { Quadra 700 & Power PC Upgrade Card }
+ gestaltPowerMacQuadra900 = 117; { Quadra 900 & Power PC Upgrade Card }
+ gestaltPowerMacQuadra950 = 118; { Quadra 950 & Power PC Upgrade Card }
+ gestaltPowerMacCentris610 = 119; { Centris 610 & Power PC Upgrade Card }
+ gestaltPowerMacCentris650 = 120; { Centris 650 & Power PC Upgrade Card }
+ gestaltPowerMacQuadra610 = 121; { Quadra 610 & Power PC Upgrade Card }
+ gestaltPowerMacQuadra650 = 122; { Quadra 650 & Power PC Upgrade Card }
+ gestaltPowerMacQuadra800 = 123; { Quadra 800 & Power PC Upgrade Card }
+ gestaltPowerBookDuo2300 = 124;
+ gestaltPowerBook500PPCUpgrade = 126;
+ gestaltPowerBook5300 = 128;
+ gestaltPowerBook1400 = 310;
+ gestaltPowerBook3400 = 306;
+ gestaltPowerBook2400 = 307;
+ gestaltPowerBookG3Series = 312;
+ gestaltPowerBookG3 = 313;
+ gestaltPowerBookG3Series2 = 314;
+ gestaltPowerMacNewWorld = 406; { All NewWorld architecture Macs (iMac, blue G3, etc.) }
+ gestaltPowerMacG3 = 510;
+ gestaltPowerMac5500 = 512;
+ gestalt20thAnniversary = 512;
+ gestaltPowerMac6500 = 513;
+ gestaltPowerMac4400_160 = 514; { slower machine has different machine ID }
+ gestaltPowerMac4400 = 515;
+ gestaltMacOSCompatibility = 1206; { Mac OS Compatibility on Mac OS X (Classic) }
+
+
+ gestaltQuadra605 = 94;
+ gestaltQuadra610 = 53;
+ gestaltQuadra630 = 98;
+ gestaltQuadra650 = 36;
+ gestaltQuadra660AV = 60;
+ gestaltQuadra700 = 22;
+ gestaltQuadra800 = 35;
+ gestaltQuadra840AV = 78;
+ gestaltQuadra900 = 20;
+ gestaltQuadra950 = 26;
+
+ kMachineNameStrID = -16395;
+
+ gestaltSMPMailerVersion = $6D616C72 (* 'malr' *); { OCE StandardMail }
+
+ gestaltMediaBay = $6D626568 (* 'mbeh' *); { media bay driver type }
+ gestaltMBLegacy = 0; { media bay support in PCCard 2.0 }
+ gestaltMBSingleBay = 1; { single bay media bay driver }
+ gestaltMBMultipleBays = 2; { multi-bay media bay driver }
+
+ gestaltMessageMgrVersion = $6D657373 (* 'mess' *); { GX Printing Message Manager Gestalt Selector }
+
+
+ { Menu Manager Gestalt (Mac OS 8.5 and later) }
+ gestaltMenuMgrAttr = $6D656E75 (* 'menu' *); { If this Gestalt exists, the Mac OS 8.5 Menu Manager is installed }
+ gestaltMenuMgrPresent = $00000001; { NOTE: this is a bit mask, whereas all other Gestalt constants of this nature }
+ { are bit index values. 3.2 interfaces slipped out with this mistake unnoticed. }
+ { Sincere apologies for any inconvenience. }
+ gestaltMenuMgrPresentBit = 0; { bit number }
+ gestaltMenuMgrAquaLayoutBit = 1; { menus have the Aqua 1.0 layout }
+ gestaltMenuMgrMultipleItemsWithCommandIDBit = 2; { CountMenuItemsWithCommandID/GetIndMenuItemWithCommandID support multiple items with the same command ID }
+ gestaltMenuMgrRetainsIconRefBit = 3; { SetMenuItemIconHandle, when passed an IconRef, calls AcquireIconRef }
+ gestaltMenuMgrSendsMenuBoundsToDefProcBit = 4; { kMenuSizeMsg and kMenuPopUpMsg have menu bounding rect information }
+ gestaltMenuMgrMoreThanFiveMenusDeepBit = 5; { the Menu Manager supports hierarchical menus more than five deep}
+ gestaltMenuMgrCGImageMenuTitleBit = 6; { SetMenuTitleIcon supports CGImageRefs}
+ { masks for the above bits }
+ gestaltMenuMgrPresentMask = $00000001;
+ gestaltMenuMgrAquaLayoutMask = $00000002;
+ gestaltMenuMgrMultipleItemsWithCommandIDMask = $00000004;
+ gestaltMenuMgrRetainsIconRefMask = $00000008;
+ gestaltMenuMgrSendsMenuBoundsToDefProcMask = $00000010;
+ gestaltMenuMgrMoreThanFiveMenusDeepMask = 1 shl gestaltMenuMgrMoreThanFiveMenusDeepBit;
+ gestaltMenuMgrCGImageMenuTitleMask = 1 shl gestaltMenuMgrCGImageMenuTitleBit;
+
+
+ gestaltMultipleUsersState = $6D666472 (* 'mfdr' *); { Gestalt selector returns MultiUserGestaltHandle (in Folders.h) }
+
+
+ gestaltMachineIcon = $6D69636E (* 'micn' *); { machine icon }
+
+ gestaltMiscAttr = $6D697363 (* 'misc' *); { miscellaneous attributes }
+ gestaltScrollingThrottle = 0; { true if scrolling throttle on }
+ gestaltSquareMenuBar = 2; { true if menu bar is square }
+
+
+ {
+ The name gestaltMixedModeVersion for the 'mixd' selector is semantically incorrect.
+ The same selector has been renamed gestaltMixedModeAttr to properly reflect the
+ Inside Mac: PowerPC System Software documentation. The gestaltMixedModeVersion
+ symbol has been preserved only for backwards compatibility.
+
+ Developers are forewarned that gestaltMixedModeVersion has a limited lifespan and
+ will be removed in a future release of the Interfaces.
+
+ For the first version of Mixed Mode, both meanings of the 'mixd' selector are
+ functionally identical. They both return 0x00000001. In subsequent versions
+ of Mixed Mode, however, the 'mixd' selector will not respond with an increasing
+ version number, but rather, with 32 attribute bits with various meanings.
+ }
+ gestaltMixedModeVersion = $6D697864 (* 'mixd' *); { returns version of Mixed Mode }
+
+ gestaltMixedModeAttr = $6D697864 (* 'mixd' *); { returns Mixed Mode attributes }
+ gestaltMixedModePowerPC = 0; { true if Mixed Mode supports PowerPC ABI calling conventions }
+ gestaltPowerPCAware = 0; { old name for gestaltMixedModePowerPC }
+ gestaltMixedModeCFM68K = 1; { true if Mixed Mode supports CFM-68K calling conventions }
+ gestaltMixedModeCFM68KHasTrap = 2; { true if CFM-68K Mixed Mode implements _MixedModeDispatch (versions 1.0.1 and prior did not) }
+ gestaltMixedModeCFM68KHasState = 3; { true if CFM-68K Mixed Mode exports Save/RestoreMixedModeState }
+
+ gestaltQuickTimeConferencing = $6D746C6B (* 'mtlk' *); { returns QuickTime Conferencing version }
+
+ gestaltMemoryMapAttr = $6D6D6170 (* 'mmap' *); { Memory map type }
+ gestaltMemoryMapSparse = 0; { Sparse memory is on }
+
+ gestaltMMUType = $6D6D7520 (* 'mmu ' *); { mmu type }
+ gestaltNoMMU = 0; { no MMU }
+ gestaltAMU = 1; { address management unit }
+ gestalt68851 = 2; { 68851 PMMU }
+ gestalt68030MMU = 3; { 68030 built-in MMU }
+ gestalt68040MMU = 4; { 68040 built-in MMU }
+ gestaltEMMU1 = 5; { Emulated MMU type 1 }
+
+ { On Mac OS X, the user visible machine name may something like "PowerMac3,4", which is}
+ { a unique string for each signifigant Macintosh computer which Apple creates, but is}
+ { not terribly useful as a user visible string.}
+ gestaltUserVisibleMachineName = $6D6E616D (* 'mnam' *); { Coerce response into a StringPtr to get a user visible machine name }
+
+ gestaltMPCallableAPIsAttr = $6D707363 (* 'mpsc' *); { Bitmap of toolbox/OS managers that can be called from MPLibrary MPTasks }
+ gestaltMPFileManager = 0; { True if File Manager calls can be made from MPTasks }
+ gestaltMPDeviceManager = 1; { True if synchronous Device Manager calls can be made from MPTasks }
+ gestaltMPTrapCalls = 2; { True if most trap-based calls can be made from MPTasks }
+
+ gestaltStdNBPAttr = $6E6C7570 (* 'nlup' *); { standard nbp attributes }
+ gestaltStdNBPPresent = 0;
+ gestaltStdNBPSupportsAutoPosition = 1; { StandardNBP takes (-1,-1) to mean alert position main screen }
+
+ gestaltNotificationMgrAttr = $6E6D6772 (* 'nmgr' *); { notification manager attributes }
+ gestaltNotificationPresent = 0; { notification manager exists }
+
+ gestaltNameRegistryVersion = $6E726567 (* 'nreg' *); { NameRegistryLib version number, for System 7.5.2+ usage }
+
+ gestaltNuBusSlotCount = $6E756273 (* 'nubs' *); { count of logical NuBus slots present }
+
+ gestaltOCEToolboxVersion = $6F636574 (* 'ocet' *); { OCE Toolbox version }
+ gestaltOCETB = $0102; { OCE Toolbox version 1.02 }
+ gestaltSFServer = $0100; { S&F Server version 1.0 }
+
+ gestaltOCEToolboxAttr = $6F636575 (* 'oceu' *); { OCE Toolbox attributes }
+ gestaltOCETBPresent = $01; { OCE toolbox is present, not running }
+ gestaltOCETBAvailable = $02; { OCE toolbox is running and available }
+ gestaltOCESFServerAvailable = $04; { S&F Server is running and available }
+ gestaltOCETBNativeGlueAvailable = $10; { Native PowerPC Glue routines are availible }
+
+ gestaltOpenFirmwareInfo = $6F706677 (* 'opfw' *); { Open Firmware info }
+
+ gestaltOSAttr = $6F732020 (* 'os ' *); { o/s attributes }
+ gestaltSysZoneGrowable = 0; { system heap is growable }
+ gestaltLaunchCanReturn = 1; { can return from launch }
+ gestaltLaunchFullFileSpec = 2; { can launch from full file spec }
+ gestaltLaunchControl = 3; { launch control support available }
+ gestaltTempMemSupport = 4; { temp memory support }
+ gestaltRealTempMemory = 5; { temp memory handles are real }
+ gestaltTempMemTracked = 6; { temporary memory handles are tracked }
+ gestaltIPCSupport = 7; { IPC support is present }
+ gestaltSysDebuggerSupport = 8; { system debugger support is present }
+ gestaltNativeProcessMgrBit = 19; { the process manager itself is native }
+ gestaltAltivecRegistersSwappedCorrectlyBit = 20; { Altivec registers are saved correctly on process switches }
+
+ gestaltOSTable = $6F737474 (* 'ostt' *); { OS trap table base }
+
+
+ { ******************************************************************************
+ * Gestalt Selectors for Open Transport Network Setup
+ *
+ * Note: possible values for the version "stage" byte are:
+ * development = 0x20, alpha = 0x40, beta = 0x60, final & release = 0x80
+ ******************************************************************************* }
+ gestaltOpenTptNetworkSetup = $6F746366 (* 'otcf' *);
+ gestaltOpenTptNetworkSetupLegacyImport = 0;
+ gestaltOpenTptNetworkSetupLegacyExport = 1;
+ gestaltOpenTptNetworkSetupSupportsMultihoming = 2;
+
+ gestaltOpenTptNetworkSetupVersion = $6F746376 (* 'otcv' *);
+
+ { ******************************************************************************
+ * Gestalt Selectors for Open Transport-based Remote Access/PPP
+ *
+ * Note: possible values for the version "stage" byte are:
+ * development = 0x20, alpha = 0x40, beta = 0x60, final & release = 0x80
+ ******************************************************************************* }
+ gestaltOpenTptRemoteAccess = $6F747261 (* 'otra' *);
+ gestaltOpenTptRemoteAccessPresent = 0;
+ gestaltOpenTptRemoteAccessLoaded = 1;
+ gestaltOpenTptRemoteAccessClientOnly = 2;
+ gestaltOpenTptRemoteAccessPServer = 3;
+ gestaltOpenTptRemoteAccessMPServer = 4;
+ gestaltOpenTptPPPPresent = 5;
+ gestaltOpenTptARAPPresent = 6;
+
+ gestaltOpenTptRemoteAccessVersion = $6F747276 (* 'otrv' *);
+
+
+ { ***** Open Transport Gestalt ***** }
+
+
+ gestaltOpenTptVersions = $6F747672 (* 'otvr' *); { Defined by OT 1.1 and higher, response is NumVersion. }
+
+ gestaltOpenTpt = $6F74616E (* 'otan' *); { Defined by all versions, response is defined below. }
+ gestaltOpenTptPresentMask = $00000001;
+ gestaltOpenTptLoadedMask = $00000002;
+ gestaltOpenTptAppleTalkPresentMask = $00000004;
+ gestaltOpenTptAppleTalkLoadedMask = $00000008;
+ gestaltOpenTptTCPPresentMask = $00000010;
+ gestaltOpenTptTCPLoadedMask = $00000020;
+ gestaltOpenTptIPXSPXPresentMask = $00000040;
+ gestaltOpenTptIPXSPXLoadedMask = $00000080;
+ gestaltOpenTptPresentBit = 0;
+ gestaltOpenTptLoadedBit = 1;
+ gestaltOpenTptAppleTalkPresentBit = 2;
+ gestaltOpenTptAppleTalkLoadedBit = 3;
+ gestaltOpenTptTCPPresentBit = 4;
+ gestaltOpenTptTCPLoadedBit = 5;
+ gestaltOpenTptIPXSPXPresentBit = 6;
+ gestaltOpenTptIPXSPXLoadedBit = 7;
+
+
+ gestaltPCCard = $70636364 (* 'pccd' *); { PC Card attributes }
+ gestaltCardServicesPresent = 0; { PC Card 2.0 (68K) API is present }
+ gestaltPCCardFamilyPresent = 1; { PC Card 3.x (PowerPC) API is present }
+ gestaltPCCardHasPowerControl = 2; { PCCardSetPowerLevel is supported }
+ gestaltPCCardSupportsCardBus = 3; { CardBus is supported }
+
+ gestaltProcClkSpeed = $70636C6B (* 'pclk' *); { processor clock speed in hertz }
+
+ gestaltProcClkSpeedMHz = $6D636C6B (* 'mclk' *); { processor clock speed in megahertz (an unsigned long) }
+
+ gestaltPCXAttr = $70637867 (* 'pcxg' *); { PC Exchange attributes }
+ gestaltPCXHas8and16BitFAT = 0; { PC Exchange supports both 8 and 16 bit FATs }
+ gestaltPCXHasProDOS = 1; { PC Exchange supports ProDOS }
+ gestaltPCXNewUI = 2;
+ gestaltPCXUseICMapping = 3; { PC Exchange uses InternetConfig for file mappings }
+
+ gestaltLogicalPageSize = $7067737A (* 'pgsz' *); { logical page size }
+
+ { System 7.6 and later. If gestaltScreenCaptureMain is not implemented,
+ PictWhap proceeds with screen capture in the usual way.
+
+ The high word of gestaltScreenCaptureMain is reserved (use 0).
+
+ To disable screen capture to disk, put zero in the low word. To
+ specify a folder for captured pictures, put the vRefNum in the
+ low word of gestaltScreenCaptureMain, and put the directory ID in
+ gestaltScreenCaptureDir.
+ }
+ gestaltScreenCaptureMain = $70696331 (* 'pic1' *); { Zero, or vRefNum of disk to hold picture }
+ gestaltScreenCaptureDir = $70696332 (* 'pic2' *); { Directory ID of folder to hold picture }
+
+ gestaltGXPrintingMgrVersion = $706D6772 (* 'pmgr' *); { QuickDraw GX Printing Manager Version }
+
+ gestaltPopupAttr = $706F7021 (* 'pop!' *); { popup cdef attributes }
+ gestaltPopupPresent = 0;
+
+ gestaltPowerMgrAttr = $706F7772 (* 'powr' *); { power manager attributes }
+ gestaltPMgrExists = 0;
+ gestaltPMgrCPUIdle = 1;
+ gestaltPMgrSCC = 2;
+ gestaltPMgrSound = 3;
+ gestaltPMgrDispatchExists = 4;
+ gestaltPMgrSupportsAVPowerStateAtSleepWake = 5;
+
+ gestaltPowerMgrVers = $70777276 (* 'pwrv' *); { power manager version }
+
+ {
+ * PPC will return the combination of following bit fields.
+ * e.g. gestaltPPCSupportsRealTime +gestaltPPCSupportsIncoming + gestaltPPCSupportsOutGoing
+ * indicates PPC is cuurently is only supports real time delivery
+ * and both incoming and outgoing network sessions are allowed.
+ * By default local real time delivery is supported as long as PPCInit has been called. }
+ gestaltPPCToolboxAttr = $70706320 (* 'ppc ' *); { PPC toolbox attributes }
+ gestaltPPCToolboxPresent = $0000; { PPC Toolbox is present Requires PPCInit to be called }
+ gestaltPPCSupportsRealTime = $1000; { PPC Supports real-time delivery }
+ gestaltPPCSupportsIncoming = $0001; { PPC will allow incoming network requests }
+ gestaltPPCSupportsOutGoing = $0002; { PPC will allow outgoing network requests }
+ gestaltPPCSupportsTCP_IP = $0004; { PPC supports TCP/IP transport }
+ gestaltPPCSupportsIncomingAppleTalk = $0010;
+ gestaltPPCSupportsIncomingTCP_IP = $0020;
+ gestaltPPCSupportsOutgoingAppleTalk = $0100;
+ gestaltPPCSupportsOutgoingTCP_IP = $0200;
+
+{
+ Programs which need to know information about particular features of the processor should
+ migrate to using sysctl() and sysctlbyname() to get this kind of information. No new
+ information will be added to the 'ppcf' selector going forward.
+}
+ gestaltPowerPCProcessorFeatures = $70706366 (* 'ppcf' *); { Optional PowerPC processor features }
+ gestaltPowerPCHasGraphicsInstructions = 0; { has fres, frsqrte, and fsel instructions }
+ gestaltPowerPCHasSTFIWXInstruction = 1; { has stfiwx instruction }
+ gestaltPowerPCHasSquareRootInstructions = 2; { has fsqrt and fsqrts instructions }
+ gestaltPowerPCHasDCBAInstruction = 3; { has dcba instruction }
+ gestaltPowerPCHasVectorInstructions = 4; { has vector instructions }
+ gestaltPowerPCHasDataStreams = 5; { has dst, dstt, dstst, dss, and dssall instructions }
+ gestaltPowerPCHas64BitSupport = 6; { double word LSU/ALU, etc. }
+ gestaltPowerPCHasDCBTStreams = 7; { TH field of DCBT recognized }
+ gestaltPowerPCASArchitecture = 8; { chip uses new 'A/S' architecture }
+ gestaltPowerPCIgnoresDCBST = 9; { }
+
+ gestaltProcessorType = $70726F63 (* 'proc' *); { processor type }
+ gestalt68000 = 1;
+ gestalt68010 = 2;
+ gestalt68020 = 3;
+ gestalt68030 = 4;
+ gestalt68040 = 5;
+
+ gestaltSDPPromptVersion = $70727076 (* 'prpv' *); { OCE Standard Directory Panel }
+
+ gestaltParityAttr = $70727479 (* 'prty' *); { parity attributes }
+ gestaltHasParityCapability = 0; { has ability to check parity }
+ gestaltParityEnabled = 1; { parity checking enabled }
+
+ gestaltQD3DVersion = $71337620 (* 'q3v ' *); { Quickdraw 3D version in pack BCD }
+
+ gestaltQD3DViewer = $71337663 (* 'q3vc' *); { Quickdraw 3D viewer attributes }
+ gestaltQD3DViewerPresent = 0; { bit 0 set if QD3D Viewer is available }
+
+{$ifc OLDROUTINENAMES}
+ gestaltQD3DViewerNotPresent = $00;
+ gestaltQD3DViewerAvailable = $01;
+
+{$endc} {OLDROUTINENAMES}
+
+ gestaltQuickdrawVersion = $71642020 (* 'qd ' *); { quickdraw version }
+ gestaltOriginalQD = $0000; { original 1-bit QD }
+ gestalt8BitQD = $0100; { 8-bit color QD }
+ gestalt32BitQD = $0200; { 32-bit color QD }
+ gestalt32BitQD11 = $0201; { 32-bit color QDv1.1 }
+ gestalt32BitQD12 = $0220; { 32-bit color QDv1.2 }
+ gestalt32BitQD13 = $0230; { 32-bit color QDv1.3 }
+ gestaltAllegroQD = $0250; { Allegro QD OS 8.5 }
+ gestaltMacOSXQD = $0300; { 0x310, 0x320 etc. for 10.x.y }
+
+ gestaltQD3D = $71643364 (* 'qd3d' *); { Quickdraw 3D attributes }
+ gestaltQD3DPresent = 0; { bit 0 set if QD3D available }
+
+{$ifc OLDROUTINENAMES}
+ gestaltQD3DNotPresent = $00;
+ gestaltQD3DAvailable = $01;
+
+{$endc} {OLDROUTINENAMES}
+
+ gestaltGXVersion = $71646778 (* 'qdgx' *); { Overall QuickDraw GX Version }
+
+ gestaltQuickdrawFeatures = $71647277 (* 'qdrw' *); { quickdraw features }
+ gestaltHasColor = 0; { color quickdraw present }
+ gestaltHasDeepGWorlds = 1; { GWorlds can be deeper than 1-bit }
+ gestaltHasDirectPixMaps = 2; { PixMaps can be direct (16 or 32 bit) }
+ gestaltHasGrayishTextOr = 3; { supports text mode grayishTextOr }
+ gestaltSupportsMirroring = 4; { Supports video mirroring via the Display Manager. }
+ gestaltQDHasLongRowBytes = 5; { Long rowBytes supported in GWorlds }
+
+ gestaltQDTextVersion = $71647478 (* 'qdtx' *); { QuickdrawText version }
+ gestaltOriginalQDText = $0000; { up to and including 8.1 }
+ gestaltAllegroQDText = $0100; { starting with 8.5 }
+ gestaltMacOSXQDText = $0200; { we are in Mac OS X }
+
+ gestaltQDTextFeatures = $71647466 (* 'qdtf' *); { QuickdrawText features }
+ gestaltWSIISupport = 0; { bit 0: WSII support included }
+ gestaltSbitFontSupport = 1; { sbit-only fonts supported }
+ gestaltAntiAliasedTextAvailable = 2; { capable of antialiased text }
+ gestaltOFA2available = 3; { OFA2 available }
+ gestaltCreatesAliasFontRsrc = 4; { "real" datafork font support }
+ gestaltNativeType1FontSupport = 5; { we have scaler for Type1 fonts }
+ gestaltCanUseCGTextRendering = 6;
+
+
+ gestaltQuickTimeConferencingInfo = $71746369 (* 'qtci' *); { returns pointer to QuickTime Conferencing information }
+
+ gestaltQuickTimeVersion = $7174696D (* 'qtim' *); { returns version of QuickTime }
+ gestaltQuickTime = $7174696D (* 'qtim' *); { gestaltQuickTime is old name for gestaltQuickTimeVersion }
+
+ gestaltQuickTimeFeatures = $71747273 (* 'qtrs' *);
+ gestaltPPCQuickTimeLibPresent = 0; { PowerPC QuickTime glue library is present }
+
+ gestaltQuickTimeStreamingFeatures = $71747366 (* 'qtsf' *);
+
+ gestaltQuickTimeStreamingVersion = $71747374 (* 'qtst' *);
+
+ gestaltQuickTimeThreadSafeFeaturesAttr = $71747468 (* 'qtth' *); { Quicktime thread safety attributes }
+ gestaltQuickTimeThreadSafeICM = 0;
+ gestaltQuickTimeThreadSafeMovieToolbox = 1;
+ gestaltQuickTimeThreadSafeMovieImport = 2;
+ gestaltQuickTimeThreadSafeMovieExport = 3;
+ gestaltQuickTimeThreadSafeGraphicsImport = 4;
+ gestaltQuickTimeThreadSafeGraphicsExport = 5;
+ gestaltQuickTimeThreadSafeMoviePlayback = 6;
+
+ gestaltQTVRMgrAttr = $71747672 (* 'qtvr' *); { QuickTime VR attributes }
+ gestaltQTVRMgrPresent = 0; { QTVR API is present }
+ gestaltQTVRObjMoviesPresent = 1; { QTVR runtime knows about object movies }
+ gestaltQTVRCylinderPanosPresent = 2; { QTVR runtime knows about cylindrical panoramic movies }
+ gestaltQTVRCubicPanosPresent = 3; { QTVR runtime knows about cubic panoramic movies }
+
+ gestaltQTVRMgrVers = $71747676 (* 'qtvv' *); { QuickTime VR version }
+
+{
+ Because some PowerPC machines now support very large physical memory capacities, including
+ some above the maximum value which can held in a 32 bit quantity, there is now a new selector,
+ gestaltPhysicalRAMSizeInMegabytes, which returns the size of physical memory scaled
+ in megabytes. It is recommended that code transition to using this new selector if
+ it wants to get a useful value for the amount of physical memory on the system. Code can
+ also use the sysctl() and sysctlbyname() BSD calls to get these kinds of values.
+
+ For compatability with code which assumed that the value in returned by the
+ gestaltPhysicalRAMSize selector would be a signed quantity of bytes, this selector will
+ now return 2 gigabytes-1 ( LONG_MAX ) if the system has 2 gigabytes of physical memory or more.
+}
+ gestaltPhysicalRAMSize = $72616D20 (* 'ram ' *); { physical RAM size }
+
+ gestaltPhysicalRAMSizeInMegabytes = $72616D6D (* 'ramm' *); { physical RAM size, scaled in megabytes }
+
+ gestaltRBVAddr = $72627620 (* 'rbv ' *); { RBV base address }
+
+ gestaltROMSize = $726F6D20 (* 'rom ' *); { rom size }
+
+ gestaltROMVersion = $726F6D76 (* 'romv' *); { rom version }
+
+ gestaltResourceMgrAttr = $72737263 (* 'rsrc' *); { Resource Mgr attributes }
+ gestaltPartialRsrcs = 0; { True if partial resources exist }
+ gestaltHasResourceOverrides = 1; { Appears in the ROM; so put it here. }
+
+ gestaltResourceMgrBugFixesAttrs = $726D6267 (* 'rmbg' *); { Resource Mgr bug fixes }
+ gestaltRMForceSysHeapRolledIn = 0;
+ gestaltRMFakeAppleMenuItemsRolledIn = 1;
+ gestaltSanityCheckResourceFiles = 2; { Resource manager does sanity checking on resource files before opening them }
+ gestaltSupportsFSpResourceFileAlreadyOpenBit = 3; { The resource manager supports GetResFileRefNum and FSpGetResFileRefNum and FSpResourceFileAlreadyOpen }
+ gestaltRMSupportsFSCalls = 4; { The resource manager supports OpenResFileFSRef, CreateResFileFSRef and ResourceFileAlreadyOpenFSRef }
+ gestaltRMTypeIndexOrderingReverse = 8; { GetIndType() calls return resource types in opposite order to original 68k resource manager }
+
+
+ gestaltRealtimeMgrAttr = $72746D72 (* 'rtmr' *); { Realtime manager attributes }
+ gestaltRealtimeMgrPresent = 0; { true if the Realtime manager is present }
+
+
+ gestaltSafeOFAttr = $73616665 (* 'safe' *);
+ gestaltVMZerosPagesBit = 0;
+ gestaltInitHeapZerosOutHeapsBit = 1;
+ gestaltNewHandleReturnsZeroedMemoryBit = 2;
+ gestaltNewPtrReturnsZeroedMemoryBit = 3;
+ gestaltFileAllocationZeroedBlocksBit = 4;
+
+
+ gestaltSCCReadAddr = $73636372 (* 'sccr' *); { scc read base address }
+
+ gestaltSCCWriteAddr = $73636377 (* 'sccw' *); { scc read base address }
+
+ gestaltScrapMgrAttr = $73637261 (* 'scra' *); { Scrap Manager attributes }
+ gestaltScrapMgrTranslationAware = 0; { True if scrap manager is translation aware }
+
+ gestaltScriptMgrVersion = $73637269 (* 'scri' *); { Script Manager version number }
+
+ gestaltScriptCount = $73637223 (* 'scr#' *); { number of active script systems }
+
+ gestaltSCSI = $73637369 (* 'scsi' *); { SCSI Manager attributes }
+ gestaltAsyncSCSI = 0; { Supports Asynchronous SCSI }
+ gestaltAsyncSCSIINROM = 1; { Async scsi is in ROM (available for booting) }
+ gestaltSCSISlotBoot = 2; { ROM supports Slot-style PRAM for SCSI boots (PDM and later) }
+ gestaltSCSIPollSIH = 3; { SCSI Manager will poll for interrupts if Secondary Interrupts are busy. }
+
+ gestaltControlStripAttr = $73646576 (* 'sdev' *); { Control Strip attributes }
+ gestaltControlStripExists = 0; { Control Strip is installed }
+ gestaltControlStripVersionFixed = 1; { Control Strip version Gestalt selector was fixed }
+ gestaltControlStripUserFont = 2; { supports user-selectable font/size }
+ gestaltControlStripUserHotKey = 3; { support user-selectable hot key to show/hide the window }
+
+ gestaltSDPStandardDirectoryVersion = $73647672 (* 'sdvr' *); { OCE Standard Directory Panel }
+
+ gestaltSerialAttr = $73657220 (* 'ser ' *); { Serial attributes }
+ gestaltHasGPIaToDCDa = 0; { GPIa connected to DCDa }
+ gestaltHasGPIaToRTxCa = 1; { GPIa connected to RTxCa clock input }
+ gestaltHasGPIbToDCDb = 2; { GPIb connected to DCDb }
+ gestaltHidePortA = 3; { Modem port (A) should be hidden from users }
+ gestaltHidePortB = 4; { Printer port (B) should be hidden from users }
+ gestaltPortADisabled = 5; { Modem port (A) disabled and should not be used by SW }
+ gestaltPortBDisabled = 6; { Printer port (B) disabled and should not be used by SW }
+
+ gestaltShutdownAttributes = $73687574 (* 'shut' *); { ShutDown Manager Attributes }
+ gestaltShutdownHassdOnBootVolUnmount = 0; { True if ShutDown Manager unmounts boot & VM volume at shutdown time. }
+
+ gestaltNuBusConnectors = $736C7463 (* 'sltc' *); { bitmap of NuBus connectors }
+
+ gestaltSlotAttr = $736C6F74 (* 'slot' *); { slot attributes }
+ gestaltSlotMgrExists = 0; { true is slot mgr exists }
+ gestaltNuBusPresent = 1; { NuBus slots are present }
+ gestaltSESlotPresent = 2; { SE PDS slot present }
+ gestaltSE30SlotPresent = 3; { SE/30 slot present }
+ gestaltPortableSlotPresent = 4; { PortableÕs slot present }
+
+ gestaltFirstSlotNumber = $736C7431 (* 'slt1' *); { returns first physical slot }
+
+ gestaltSoundAttr = $736E6420 (* 'snd ' *); { sound attributes }
+ gestaltStereoCapability = 0; { sound hardware has stereo capability }
+ gestaltStereoMixing = 1; { stereo mixing on external speaker }
+ gestaltSoundIOMgrPresent = 3; { The Sound I/O Manager is present }
+ gestaltBuiltInSoundInput = 4; { built-in Sound Input hardware is present }
+ gestaltHasSoundInputDevice = 5; { Sound Input device available }
+ gestaltPlayAndRecord = 6; { built-in hardware can play and record simultaneously }
+ gestalt16BitSoundIO = 7; { sound hardware can play and record 16-bit samples }
+ gestaltStereoInput = 8; { sound hardware can record stereo }
+ gestaltLineLevelInput = 9; { sound input port requires line level }
+ { the following bits are not defined prior to Sound Mgr 3.0 }
+ gestaltSndPlayDoubleBuffer = 10; { SndPlayDoubleBuffer available, set by Sound Mgr 3.0 and later }
+ gestaltMultiChannels = 11; { multiple channel support, set by Sound Mgr 3.0 and later }
+ gestalt16BitAudioSupport = 12; { 16 bit audio data supported, set by Sound Mgr 3.0 and later }
+
+ gestaltSplitOSAttr = $73706F73 (* 'spos' *);
+ gestaltSplitOSBootDriveIsNetworkVolume = 0; { the boot disk is a network 'disk', from the .LANDisk drive. }
+ gestaltSplitOSAware = 1; { the system includes the code to deal with a split os situation. }
+ gestaltSplitOSEnablerVolumeIsDifferentFromBootVolume = 2; { the active enabler is on a different volume than the system file. }
+ gestaltSplitOSMachineNameSetToNetworkNameTemp = 3; { The machine name was set to the value given us from the BootP server }
+ gestaltSplitOSMachineNameStartupDiskIsNonPersistent = 5; { The startup disk ( vRefNum == -1 ) is non-persistent, meaning changes won't persist across a restart. }
+
+ gestaltSMPSPSendLetterVersion = $7370736C (* 'spsl' *); { OCE StandardMail }
+
+ gestaltSpeechRecognitionAttr = $73727461 (* 'srta' *); { speech recognition attributes }
+ gestaltDesktopSpeechRecognition = 1; { recognition thru the desktop microphone is available }
+ gestaltTelephoneSpeechRecognition = 2; { recognition thru the telephone is available }
+
+ gestaltSpeechRecognitionVersion = $73727462 (* 'srtb' *); { speech recognition version (0x0150 is the first version that fully supports the API) }
+
+ gestaltSoftwareVendorCode = $73726164 (* 'srad' *); { Returns system software vendor information }
+ gestaltSoftwareVendorApple = $4170706C (* 'Appl' *); { System software sold by Apple }
+ gestaltSoftwareVendorLicensee = $4C636E73 (* 'Lcns' *); { System software sold by licensee }
+
+ gestaltStandardFileAttr = $73746466 (* 'stdf' *); { Standard File attributes }
+ gestaltStandardFile58 = 0; { True if selectors 5-8 (StandardPutFile-CustomGetFile) are supported }
+ gestaltStandardFileTranslationAware = 1; { True if standard file is translation manager aware }
+ gestaltStandardFileHasColorIcons = 2; { True if standard file has 16x16 color icons }
+ gestaltStandardFileUseGenericIcons = 3; { Standard file LDEF to use only the system generic icons if true }
+ gestaltStandardFileHasDynamicVolumeAllocation = 4; { True if standard file supports more than 20 volumes }
+
+ gestaltSysArchitecture = $73797361 (* 'sysa' *); { Native System Architecture }
+ gestalt68k = 1; { Motorola MC68k architecture }
+ gestaltPowerPC = 2; { IBM PowerPC architecture }
+ gestaltIntel = 10; { Intel x86 architecture }
+
+ gestaltSystemUpdateVersion = $73797375 (* 'sysu' *); { System Update version }
+
+{
+ Returns the system version as a 32 bit packed BCD ( binary coded decimal )
+ version representation. Bits 0 through 3 are the "bug fix" revision number.
+ Bits 4 through 7 are the minor revision, and bits 8 through 31 are the bcd
+ decimal digits of the major release version.
+
+ Value: 0xMMMMMMRB = M.R.B Example: 0x00001023 = 10.2.3
+ ^^^^^^ major rev ^^^^^^ major rev = 10
+ ^ minor rev ^ minor rev = 2
+ ^ bug fix rev ^ bug fix rev = 3
+
+ If the values of the minor or bug fix revision are larger than 9, then
+ gestaltSystemVersion will substitute the value 9 for them. For example,
+ Mac OS X 10.3.15 will be returned as 0x1039, and Mac OS X 10.10.5 will
+ return 0x1095.
+
+ A better way to get version information on Mac OS X would be to read in the
+ system version information from the file /System/Library/CoreServices/SystemVersion.plist.
+}
+ gestaltSystemVersion = $73797376 (* 'sysv' *); { system version }
+ gestaltSystemVersionMajor = $73797331 (* 'sys1' *); { The major system version number; in 10.4.17 this would be the decimal value 10 }
+ gestaltSystemVersionMinor = $73797332 (* 'sys2' *); { The minor system version number; in 10.4.17 this would be the decimal value 4 }
+ gestaltSystemVersionBugFix = $73797333 (* 'sys3' *); { The bug fix system version number; in 10.4.17 this would be the decimal value 17 }
+
+ gestaltToolboxTable = $74627474 (* 'tbtt' *); { OS trap table base }
+
+ gestaltTextEditVersion = $74652020 (* 'te ' *); { TextEdit version number }
+ gestaltTE1 = 1; { TextEdit in MacIIci ROM }
+ gestaltTE2 = 2; { TextEdit with 6.0.4 Script Systems on MacIIci (Script bug fixes for MacIIci) }
+ gestaltTE3 = 3; { TextEdit with 6.0.4 Script Systems all but MacIIci }
+ gestaltTE4 = 4; { TextEdit in System 7.0 }
+ gestaltTE5 = 5; { TextWidthHook available in TextEdit }
+
+ gestaltTE6 = 6; { TextEdit with integrated TSMTE and improved UI }
+
+ gestaltTEAttr = $74656174 (* 'teat' *); { TextEdit attributes }
+ gestaltTEHasGetHiliteRgn = 0; { TextEdit has TEGetHiliteRgn }
+ gestaltTESupportsInlineInput = 1; { TextEdit does Inline Input }
+ gestaltTESupportsTextObjects = 2; { TextEdit does Text Objects }
+ gestaltTEHasWhiteBackground = 3; { TextEdit supports overriding the TERec's background to white }
+
+ gestaltTeleMgrAttr = $74656C65 (* 'tele' *); { Telephone manager attributes }
+ gestaltTeleMgrPresent = 0;
+ gestaltTeleMgrPowerPCSupport = 1;
+ gestaltTeleMgrSoundStreams = 2;
+ gestaltTeleMgrAutoAnswer = 3;
+ gestaltTeleMgrIndHandset = 4;
+ gestaltTeleMgrSilenceDetect = 5;
+ gestaltTeleMgrNewTELNewSupport = 6;
+
+ gestaltTermMgrAttr = $7465726D (* 'term' *); { terminal mgr attributes }
+ gestaltTermMgrPresent = 0;
+ gestaltTermMgrErrorString = 2;
+
+ gestaltThreadMgrAttr = $74686473 (* 'thds' *); { Thread Manager attributes }
+ gestaltThreadMgrPresent = 0; { bit true if Thread Mgr is present }
+ gestaltSpecificMatchSupport = 1; { bit true if Thread Mgr supports exact match creation option }
+ gestaltThreadsLibraryPresent = 2; { bit true if Thread Mgr shared library is present }
+
+ gestaltTimeMgrVersion = $746D6772 (* 'tmgr' *); { time mgr version }
+ gestaltStandardTimeMgr = 1; { standard time mgr is present }
+ gestaltRevisedTimeMgr = 2; { revised time mgr is present }
+ gestaltExtendedTimeMgr = 3; { extended time mgr is present }
+ gestaltNativeTimeMgr = 4; { PowerPC native TimeMgr is present }
+
+ gestaltTSMTEVersion = $746D5456 (* 'tmTV' *);
+ gestaltTSMTE1 = $0100; { Original version of TSMTE }
+ gestaltTSMTE15 = $0150; { System 8.0 }
+ gestaltTSMTE152 = $0152; { System 8.2 }
+
+ gestaltTSMTEAttr = $746D5445 (* 'tmTE' *);
+ gestaltTSMTEPresent = 0;
+ gestaltTSMTE = 0; { gestaltTSMTE is old name for gestaltTSMTEPresent }
+
+ gestaltAVLTreeAttr = $74726565 (* 'tree' *); { AVLTree utility routines attributes. }
+ gestaltAVLTreePresentBit = 0; { if set, then the AVL Tree routines are available. }
+ gestaltAVLTreeSupportsHandleBasedTreeBit = 1; { if set, then the AVL Tree routines can store tree data in a single handle }
+ gestaltAVLTreeSupportsTreeLockingBit = 2; { if set, the AVLLockTree() and AVLUnlockTree() routines are available. }
+
+ gestaltALMAttr = $74726970 (* 'trip' *); { Settings Manager attributes (see also gestaltALMVers) }
+ gestaltALMPresent = 0; { bit true if ALM is available }
+ gestaltALMHasSFGroup = 1; { bit true if Put/Get/Merge Group calls are implmented }
+ gestaltALMHasCFMSupport = 2; { bit true if CFM-based modules are supported }
+ gestaltALMHasRescanNotifiers = 3; { bit true if Rescan notifications/events will be sent to clients }
+
+ gestaltALMHasSFLocation = 1;
+
+ gestaltTSMgrVersion = $74736D76 (* 'tsmv' *); { Text Services Mgr version, if present }
+ gestaltTSMgr15 = $0150;
+ gestaltTSMgr20 = $0200; { Version 2.0 as of MacOSX 10.0 }
+ gestaltTSMgr22 = $0220; { Version 2.2 as of MacOSX 10.3 }
+ gestaltTSMgr23 = $0230; { Version 2.3 as of MacOSX 10.4 }
+
+ gestaltTSMgrAttr = $74736D61 (* 'tsma' *); { Text Services Mgr attributes, if present }
+ gestaltTSMDisplayMgrAwareBit = 0; { TSM knows about display manager }
+ gestaltTSMdoesTSMTEBit = 1; { TSM has integrated TSMTE }
+
+ gestaltSpeechAttr = $74747363 (* 'ttsc' *); { Speech Manager attributes }
+ gestaltSpeechMgrPresent = 0; { bit set indicates that Speech Manager exists }
+ gestaltSpeechHasPPCGlue = 1; { bit set indicates that native PPC glue for Speech Manager API exists }
+
+ gestaltTVAttr = $74762020 (* 'tv ' *); { TV version }
+ gestaltHasTVTuner = 0; { supports Philips FL1236F video tuner }
+ gestaltHasSoundFader = 1; { supports Philips TEA6330 Sound Fader chip }
+ gestaltHasHWClosedCaptioning = 2; { supports Philips SAA5252 Closed Captioning }
+ gestaltHasIRRemote = 3; { supports CyclopsII Infra Red Remote control }
+ gestaltHasVidDecoderScaler = 4; { supports Philips SAA7194 Video Decoder/Scaler }
+ gestaltHasStereoDecoder = 5; { supports Sony SBX1637A-01 stereo decoder }
+ gestaltHasSerialFader = 6; { has fader audio in serial with system audio }
+ gestaltHasFMTuner = 7; { has FM Tuner from donnybrook card }
+ gestaltHasSystemIRFunction = 8; { Infra Red button function is set up by system and not by Video Startup }
+ gestaltIRDisabled = 9; { Infra Red remote is not disabled. }
+ gestaltINeedIRPowerOffConfirm = 10; { Need IR power off confirm dialog. }
+ gestaltHasZoomedVideo = 11; { Has Zoomed Video PC Card video input. }
+
+
+ gestaltATSUVersion = $75697376 (* 'uisv' *);
+ gestaltOriginalATSUVersion = $00010000; { ATSUI version 1.0 }
+ gestaltATSUUpdate1 = $00020000; { ATSUI version 1.1 }
+ gestaltATSUUpdate2 = $00030000; { ATSUI version 1.2 }
+ gestaltATSUUpdate3 = $00040000; { ATSUI version 2.0 }
+ gestaltATSUUpdate4 = $00050000; { ATSUI version in Mac OS X - SoftwareUpdate 1-4 for Mac OS 10.0.1 - 10.0.4 }
+ gestaltATSUUpdate5 = $00060000; { ATSUI version 2.3 in MacOS 10.1 }
+ gestaltATSUUpdate6 = 7 shl 16; { ATSUI version 2.4 in MacOS 10.2 }
+ gestaltATSUUpdate7 = 8 shl 16; { ATSUI version 2.5 in MacOS 10.3 }
+
+ gestaltATSUFeatures = $75697366 (* 'uisf' *);
+ gestaltATSUTrackingFeature = $00000001; { feature introduced in ATSUI version 1.1 }
+ gestaltATSUMemoryFeature = $00000001; { feature introduced in ATSUI version 1.1 }
+ gestaltATSUFallbacksFeature = $00000001; { feature introduced in ATSUI version 1.1 }
+ gestaltATSUGlyphBoundsFeature = $00000001; { feature introduced in ATSUI version 1.1 }
+ gestaltATSULineControlFeature = $00000001; { feature introduced in ATSUI version 1.1 }
+ gestaltATSULayoutCreateAndCopyFeature = $00000001; { feature introduced in ATSUI version 1.1 }
+ gestaltATSULayoutCacheClearFeature = $00000001; { feature introduced in ATSUI version 1.1 }
+ gestaltATSUTextLocatorUsageFeature = $00000002; { feature introduced in ATSUI version 1.2 }
+ gestaltATSULowLevelOrigFeatures = $00000004; { first low-level features introduced in ATSUI version 2.0 }
+ gestaltATSUFallbacksObjFeatures = $00000008; { feature introduced - ATSUFontFallbacks objects introduced in ATSUI version 2.3 }
+ gestaltATSUIgnoreLeadingFeature = $00000008; { feature introduced - kATSLineIgnoreFontLeading LineLayoutOption introduced in ATSUI version 2.3 }
+ gestaltATSUByCharacterClusterFeature = $00000010; { ATSUCursorMovementTypes introduced in ATSUI version 2.4 }
+ gestaltATSUAscentDescentControlsFeature = $00000010; { attributes introduced in ATSUI version 2.4 }
+ gestaltATSUHighlightInactiveTextFeature = $00000010; { feature introduced in ATSUI version 2.4 }
+ gestaltATSUPositionToCursorFeature = $00000010; { features introduced in ATSUI version 2.4 }
+ gestaltATSUBatchBreakLinesFeature = $00000010; { feature introduced in ATSUI version 2.4 }
+ gestaltATSUTabSupportFeature = $00000010; { features introduced in ATSUI version 2.4 }
+ gestaltATSUDirectAccess = $00000010; { features introduced in ATSUI version 2.4 }
+ gestaltATSUDecimalTabFeature = $00000020; { feature introduced in ATSUI version 2.5 }
+ gestaltATSUBiDiCursorPositionFeature = $00000020; { feature introduced in ATSUI version 2.5 }
+ gestaltATSUNearestCharLineBreakFeature = $00000020; { feature introduced in ATSUI version 2.5 }
+ gestaltATSUHighlightColorControlFeature = $00000020; { feature introduced in ATSUI version 2.5 }
+ gestaltATSUUnderlineOptionsStyleFeature = $00000020; { feature introduced in ATSUI version 2.5 }
+ gestaltATSUStrikeThroughStyleFeature = $00000020; { feature introduced in ATSUI version 2.5 }
+ gestaltATSUDropShadowStyleFeature = $00000020; { feature introduced in ATSUI version 2.5 }
+
+ gestaltUSBAttr = $75736220 (* 'usb ' *); { USB Attributes }
+ gestaltUSBPresent = 0; { USB Support available }
+ gestaltUSBHasIsoch = 1; { USB Isochronous features available }
+
+ gestaltUSBVersion = $75736276 (* 'usbv' *); { USB version }
+
+ gestaltVersion = $76657273 (* 'vers' *); { gestalt version }
+ gestaltValueImplementedVers = 5; { version of gestalt where gestaltValue is implemented. }
+
+ gestaltVIA1Addr = $76696131 (* 'via1' *); { via 1 base address }
+
+ gestaltVIA2Addr = $76696132 (* 'via2' *); { via 2 base address }
+
+ gestaltVMAttr = $766D2020 (* 'vm ' *); { virtual memory attributes }
+ gestaltVMPresent = 0; { true if virtual memory is present }
+ gestaltVMHasLockMemoryForOutput = 1; { true if LockMemoryForOutput is available }
+ gestaltVMFilemappingOn = 3; { true if filemapping is available }
+ gestaltVMHasPagingControl = 4; { true if MakeMemoryResident, MakeMemoryNonResident, FlushMemory, and ReleaseMemoryData are available }
+
+ gestaltVMInfoType = $766D696E (* 'vmin' *); { Indicates how the Finder should display information about VM in }
+ { the Finder about box. }
+ gestaltVMInfoSizeStorageType = 0; { Display VM on/off, backing store size and name }
+ gestaltVMInfoSizeType = 1; { Display whether VM is on or off and the size of the backing store }
+ gestaltVMInfoSimpleType = 2; { Display whether VM is on or off }
+ gestaltVMInfoNoneType = 3; { Display no VM information }
+
+ gestaltVMBackingStoreFileRefNum = $766D6273 (* 'vmbs' *); { file refNum of virtual memory's main backing store file (returned in low word of result) }
+
+
+ gestaltALMVers = $77616C6B (* 'walk' *); { Settings Manager version (see also gestaltALMAttr) }
+
+ gestaltWindowMgrAttr = $77696E64 (* 'wind' *); { If this Gestalt exists, the Mac OS 8.5 Window Manager is installed }
+ gestaltWindowMgrPresent = $00000001; { NOTE: this is a bit mask, whereas all other Gestalt constants of }
+ { this type are bit index values. Universal Interfaces 3.2 slipped }
+ { out the door with this mistake. }
+ gestaltWindowMgrPresentBit = 0; { bit number }
+ gestaltExtendedWindowAttributes = 1; { Has ChangeWindowAttributes; GetWindowAttributes works for all windows }
+ gestaltExtendedWindowAttributesBit = 1; { Has ChangeWindowAttributes; GetWindowAttributes works for all windows }
+ gestaltHasFloatingWindows = 2; { Floating window APIs work }
+ gestaltHasFloatingWindowsBit = 2; { Floating window APIs work }
+ gestaltHasWindowBuffering = 3; { This system has buffering available }
+ gestaltHasWindowBufferingBit = 3; { This system has buffering available }
+ gestaltWindowLiveResizeBit = 4; { live resizing of windows is available }
+ gestaltWindowMinimizeToDockBit = 5; { windows minimize to the dock and do not windowshade (Mac OS X) }
+ gestaltHasWindowShadowsBit = 6; { windows have shadows }
+ gestaltSheetsAreWindowModalBit = 7; { sheet windows are modal only to their parent window }
+ gestaltFrontWindowMayBeHiddenBit = 8; { FrontWindow and related APIs will return the front window even when the app is hidden}
+ { masks for the above bits }
+ gestaltWindowMgrPresentMask = $00000001;
+ gestaltExtendedWindowAttributesMask = $00000002;
+ gestaltHasFloatingWindowsMask = $00000004;
+ gestaltHasWindowBufferingMask = $00000008;
+ gestaltWindowLiveResizeMask = $00000010;
+ gestaltWindowMinimizeToDockMask = $00000020;
+ gestaltHasWindowShadowsMask = $00000040;
+ gestaltSheetsAreWindowModalMask = $00000080;
+ gestaltFrontWindowMayBeHiddenMask = 1 shl gestaltFrontWindowMayBeHiddenBit;
+
+ gestaltHasSingleWindowModeBit = 8; { This system supports single window mode}
+ gestaltHasSingleWindowModeMask = 1 shl gestaltHasSingleWindowModeBit;
+
+
+{ gestaltX86Features is a convenience for 'cpuid' instruction. Note
+ that even though the processor may support a specific feature, the
+ OS may not support all of these features. These bitfields
+ correspond directly to the bits returned by cpuid }
+
+ gestaltX86Features = $78383666 (* 'x86f' *);
+ gestaltX86HasFPU = 0; { has an FPU that supports the 387 instructions }
+ gestaltX86HasVME = 1; { supports Virtual-8086 Mode Extensions }
+ gestaltX86HasDE = 2; { supports I/O breakpoints (Debug Extensions) }
+ gestaltX86HasPSE = 3; { supports 4-Mbyte pages (Page Size Extension) }
+ gestaltX86HasTSC = 4; { supports RTDSC instruction (Time Stamp Counter) }
+ gestaltX86HasMSR = 5; { supports Model Specific Registers }
+ gestaltX86HasPAE = 6; { supports physical addresses > 32 bits (Physical Address Extension) }
+ gestaltX86HasMCE = 7; { supports Machine Check Exception }
+ gestaltX86HasCX8 = 8; { supports CMPXCHG8 instructions (Compare Exchange 8 bytes) }
+ gestaltX86HasAPIC = 9; { contains local APIC }
+ gestaltX86Reserved10 = 10; { do not count on this bit value }
+ gestaltX86HasSEP = 11; { supports fast system call (SysEnter Present) }
+ gestaltX86HasMTRR = 12; { supports Memory Type Range Registers }
+ gestaltX86HasPGE = 13; { supports Page Global Enable }
+ gestaltX86HasMCA = 14; { supports Machine Check Architecture }
+ gestaltX86HasCMOV = 15; { supports CMOVcc instruction (Conditional Move). }
+ { If FPU bit is also set, supports FCMOVcc and FCOMI, too }
+ gestaltX86HasPAT = 16; { supports Page Attribute Table }
+ gestaltX86HasPSE36 = 17; { supports 36-bit Page Size Extension }
+ gestaltX86HasPSN = 18; { Processor Serial Number}
+ gestaltX86HasCLFSH = 19; { CLFLUSH Instruction supported}
+ gestaltX86Serviced20 = 20; { do not count on this bit value}
+ gestaltX86HasDS = 21; { Debug Store}
+ gestaltX86ResACPI = 22; { Thermal Monitor, SW-controlled clock}
+ gestaltX86HasMMX = 23; { supports MMX instructions }
+ gestaltX86HasFXSR = 24; { Supports FXSAVE and FXRSTOR instructions (fast FP save/restore) }
+ gestaltX86HasSSE = 25; { Streaming SIMD extensions}
+ gestaltX86HasSSE2 = 26; { Streaming SIMD extensions 2}
+ gestaltX86HasSS = 27; { Self-Snoop}
+ gestaltX86HasHTT = 28; { Hyper-Threading Technology}
+ gestaltX86HasTM = 29; { Thermal Monitor}
+
+{ 'cpuid' now returns a 64 bit value, and the following
+ gestalt selector and field definitions apply
+ to the extended form of this instruction }
+
+ gestaltX86AdditionalFeatures = $78383661 (* 'x86a' *);
+ gestaltX86HasSSE3 = 0; { Prescott New Inst.}
+ gestaltX86HasMONITOR = 3; { Monitor/mwait}
+ gestaltX86HasDSCPL = 4; { Debug Store CPL}
+ gestaltX86HasVMX = 5; { VMX}
+ gestaltX86HasSMX = 6; { SMX}
+ gestaltX86HasEST = 7; { Enhanced SpeedsTep (GV3)}
+ gestaltX86HasTM2 = 8; { Thermal Monitor 2}
+ gestaltX86HasSupplementalSSE3 = 9; { Supplemental SSE3 instructions}
+ gestaltX86HasCID = 10; { L1 Context ID}
+ gestaltX86HasCX16 = 13; { CmpXchg16b instruction}
+ gestaltX86HasxTPR = 14; { Send Task PRiority msgs}
+
+
+ gestaltTranslationAttr = $786C6174 (* 'xlat' *); { Translation Manager attributes }
+ gestaltTranslationMgrExists = 0; { True if translation manager exists }
+ gestaltTranslationMgrHintOrder = 1; { True if hint order reversal in effect }
+ gestaltTranslationPPCAvail = 2;
+ gestaltTranslationGetPathAPIAvail = 3;
+
+ gestaltExtToolboxTable = $78747474 (* 'xttt' *); { Extended Toolbox trap table base }
+
+ gestaltUSBPrinterSharingVersion = $7A616B20 (* 'zak ' *); { USB Printer Sharing Version }
+ gestaltUSBPrinterSharingVersionMask = $0000FFFF; { mask for bits in version }
+ gestaltUSBPrinterSharingAttr = $7A616B20 (* 'zak ' *); { USB Printer Sharing Attributes }
+ gestaltUSBPrinterSharingAttrMask = $FFFF0000; { mask for attribute bits }
+ gestaltUSBPrinterSharingAttrRunning = $80000000; { printer sharing is running }
+ gestaltUSBPrinterSharingAttrBooted = $40000000; { printer sharing was installed at boot time }
+
+ { WorldScript settings; }
+ gestaltWorldScriptIIVersion = $646F7562 (* 'doub' *);
+ gestaltWorldScriptIIAttr = $77736174 (* 'wsat' *);
+ gestaltWSIICanPrintWithoutPrGeneralBit = 0; { bit 0 is on if WS II knows about PrinterStatus callback }
+
+
+{$ALIGN MAC68K}
+
+
+{unit HIGeometry}
+{
+ File: HIToolbox/HIGeometry.h
+
+ Contains: HIToolbox interfaces for geometry
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1984-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+{
+ * HIPoint
+ *
+ * Discussion:
+ * HIPoint is a new, floating point-based type to help express
+ * coordinates in a much richer fashion than the classic QuickDraw
+ * points. It will, in time, be more heavily used throughout the
+ * Toolbox. For now, it is replacing our use of typeQDPoint in mouse
+ * events. This is to better support sub-pixel tablet coordinates.
+ * If you ask for a mouse location with typeQDPoint, and the point
+ * is actually stored as typeHIPoint, it will automatically be
+ * coerced to typeQDPoint for you, so this change should be largely
+ * transparent to applications. HIPoints are in screen space, i.e.
+ * the top left of the screen is 0, 0.
+ }
+type
+ HIPoint = CGPoint;
+ HIPointPtr = ^HIPoint;
+
+{
+ * HISize
+ *
+ * Discussion:
+ * HISize is a floating point-based type to help express dimensions
+ * in a much richer fashion than the classic QuickDraw coordinates.
+ }
+type
+ HISize = CGSize;
+ HISizePtr = ^HISize;
+
+{
+ * HIRect
+ *
+ * Discussion:
+ * HIRect is a new, floating point-based type to help express
+ * rectangles in a much richer fashion than the classic QuickDraw
+ * rects. It will, in time, be more heavily used throughout the
+ * Toolbox. HIRects are in screen space, i.e. the top left of the
+ * screen is 0, 0.
+ }
+type
+ HIRect = CGRect;
+ HIRectPtr = ^HIRect;
+{
+ * HIGetScaleFactor()
+ *
+ * Discussion:
+ * Returns the resolution independence scale factor.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * A float indicating the resolution independence scale factor.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIGetScaleFactor: Float32; external name '_HIGetScaleFactor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HICoordinateSpace
+ *
+ * Summary:
+ * Coordinate spaces for use with HIPointConvert, HIRectConvert, and
+ * HISizeConvert.
+ }
+type
+ HICoordinateSpace = UInt32;
+const
+{
+ * The coordinate space defined by the position and sizes of the
+ * screen GDevices. More correctly, this is a 72 DPI coordinate space
+ * covering the screens. When the scale factor is not 1.0, this is
+ * the compatibility notion of global coordinates. When the scale
+ * factor is 1.0, this and kHICoordSpaceScreenPixel are the same.
+ }
+ kHICoordSpace72DPIGlobal = 1;
+
+ {
+ * The coordinate space defined by physical screen pixels. When the
+ * scale factor is 1.0, this and kHICoordSpace72DPIGlobal are the
+ * same.
+ }
+ kHICoordSpaceScreenPixel = 2;
+
+ {
+ * The coordinate space of a specified WindowRef, with ( 0, 0 ) at
+ * the top left of the window's structure. When this is passed to a
+ * conversion routine as a source or destination coordinate space,
+ * you must also pass a WindowRef as a source or destination object.
+ }
+ kHICoordSpaceWindow = 3;
+
+ {
+ * The coordinate space of a given HIViewRef, with ( 0, 0 ) at the
+ * top left of the view unless changed by HIViewSetBoundsOrigin. When
+ * this is passed to a conversion routine as a source or destination
+ * coordinate space, you must also pass an HIViewRef as a source or
+ * destination object.
+ }
+ kHICoordSpaceView = 4;
+
+{
+ * HIPointConvert()
+ *
+ * Discussion:
+ * This routine converts an HIPoint from one coordinate space to
+ * another. It takes into account the resolution-independent display
+ * scale factor as appropriate.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * ioPoint:
+ * The HIPoint to convert.
+ *
+ * inSourceSpace:
+ * The HICoordinateSpace constant specifying the source coordinate
+ * space that the point is to be converted from. Some coordinate
+ * spaces require the caller to pass extra information in the
+ * inSourceObject parameter.
+ *
+ * inSourceObject:
+ * An specific object defining the source coordinate space that
+ * the point is to be converted from. You might pass a WindowRef
+ * or an HIViewRef. If no object is necessary, you must pass NULL.
+ * See the HICoordinateSpace documentation for details on which
+ * HICoordinateSpaces require objects.
+ *
+ * inDestinationSpace:
+ * The HICoordinateSpace constant specifying the destination
+ * coordinate space that the point is to be converted to. Some
+ * coordinate spaces require the caller to pass extra information
+ * in the inDestinationObject parameter.
+ *
+ * inDestinationObject:
+ * An specific object defining the destination coordinate space
+ * that the point is to be converted to. You might pass a
+ * WindowRef or an HIViewRef. If no object is necessary, you must
+ * pass NULL. See the HICoordinateSpace documentation for details
+ * on which HICoordinateSpaces require objects.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+procedure HIPointConvert( var ioPoint: HIPoint; inSourceSpace: HICoordinateSpace; inSourceObject: UnivPtr { can be NULL }; inDestinationSpace: HICoordinateSpace; inDestinationObject: UnivPtr { can be NULL } ); external name '_HIPointConvert';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIRectConvert()
+ *
+ * Discussion:
+ * This routine converts an HIRect from one coordinate space to
+ * another. It takes into account the resolution-independent display
+ * scale factor as appropriate.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * ioRect:
+ * The HIRect to convert.
+ *
+ * inSourceSpace:
+ * The HICoordinateSpace constant specifying the source coordinate
+ * space that the rect is to be converted from. Some coordinate
+ * spaces require the caller to pass extra information in the
+ * inSourceObject parameter.
+ *
+ * inSourceObject:
+ * An specific object defining the source coordinate space that
+ * the rect is to be converted from. You might pass a WindowRef or
+ * an HIViewRef. If no object is necessary, you must pass NULL.
+ * See the HICoordinateSpace documentation for details on which
+ * HICoordinateSpaces require objects.
+ *
+ * inDestinationSpace:
+ * The HICoordinateSpace constant specifying the destination
+ * coordinate space that the rect is to be converted to. Some
+ * coordinate spaces require the caller to pass extra information
+ * in the inDestinationObject parameter.
+ *
+ * inDestinationObject:
+ * An specific object defining the destination coordinate space
+ * that the rect is to be converted to. You might pass a WindowRef
+ * or an HIViewRef. If no object is necessary, you must pass NULL.
+ * See the HICoordinateSpace documentation for details on which
+ * HICoordinateSpaces require objects.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+procedure HIRectConvert( var ioRect: HIRect; inSourceSpace: HICoordinateSpace; inSourceObject: UnivPtr { can be NULL }; inDestinationSpace: HICoordinateSpace; inDestinationObject: UnivPtr { can be NULL } ); external name '_HIRectConvert';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HISizeConvert()
+ *
+ * Discussion:
+ * This routine converts an HISize from one coordinate space to
+ * another. It takes into account the resolution-independent display
+ * scale factor as appropriate.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * ioSize:
+ * The HISize to convert.
+ *
+ * inSourceSpace:
+ * The HICoordinateSpace constant specifying the source coordinate
+ * space that the size is to be converted from. Some coordinate
+ * spaces require the caller to pass extra information in the
+ * inSourceObject parameter.
+ *
+ * inSourceObject:
+ * An specific object defining the source coordinate space that
+ * the size is to be converted from. You might pass a WindowRef or
+ * an HIViewRef. If no object is necessary, you must pass NULL.
+ * See the HICoordinateSpace documentation for details on which
+ * HICoordinateSpaces require objects.
+ *
+ * inDestinationSpace:
+ * The HICoordinateSpace constant specifying the destination
+ * coordinate space that the size is to be converted to. Some
+ * coordinate spaces require the caller to pass extra information
+ * in the inDestinationObject parameter.
+ *
+ * inDestinationObject:
+ * An specific object defining the destination coordinate space
+ * that the size is to be converted to. You might pass a WindowRef
+ * or an HIViewRef. If no object is necessary, you must pass NULL.
+ * See the HICoordinateSpace documentation for details on which
+ * HICoordinateSpaces require objects.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+procedure HISizeConvert( var ioSize: HISize; inSourceSpace: HICoordinateSpace; inSourceObject: UnivPtr { can be NULL }; inDestinationSpace: HICoordinateSpace; inDestinationObject: UnivPtr { can be NULL } ); external name '_HISizeConvert';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+
+
+{unit HIObjectCore}
+{ HIObjectCore.h
+ Copyright (c) 2000-2003, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{
+ This file contains the base HIObjectxxx type declarations which
+ should normally be in HIObject.p[.pas]. The declarations have been
+ moved to this "core" file to fix a cyclic dependency which occurs
+ with the present monlithic CarbonEvents.p[.pas] and an unfixed
+ HIObject.p[.pas]. If/when the monlithic CarbonEvents.p[.pas] is
+ broken up into two files corresponding to the Mac OS X headers
+ CarbonEvents.h and CarbonEventsCore.h this file will no longer be
+ needed and the type declarations can be returned to the
+ HIObject.p[.pas] unit.
+}
+
+type
+ HIObjectClassRef = ^SInt32; { an opaque 32-bit type }
+ HIObjectClassRefPtr = ^HIObjectClassRef; { when a var xx:HIObjectClassRef parameter can be nil, it is changed to xx: HIObjectClassRefPtr }
+ HIObjectRef = ^SInt32; { an opaque 32-bit type }
+
+{unit HostTime}
+{==================================================================================================
+ File: CoreAudio/HostTime.h
+
+ Contains: Routines for accessing the host's time base
+
+ Version: Technology: Mac OS X
+ Release: Mac OS X
+
+ Copyright: (c) 1985-2005 by Apple Computer, Inc., all rights reserved.
+
+==================================================================================================}
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+//==================================================================================================
+//#pragma mark Theory of Operation
+
+{!
+ @header HostTime
+ This collection of functions provides access to the host's time base. It also provides
+ discriptive information about the time base and translations to and from nanoseconds.
+}
+
+
+{!
+ @functiongroup HostTime
+}
+
+{!
+ @function AudioGetCurrentHostTime
+ @abstract Gets the current host time.
+ @result A UInt64 containing the current host time.
+}
+function AudioGetCurrentHostTime: UInt64; external name '_AudioGetCurrentHostTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioGetHostClockFrequency
+ @abstract Gets the number of ticks per second in the host time base.
+ @result A Float64 containing the number of ticks per second in the host time base.
+}
+function AudioGetHostClockFrequency: Float64; external name '_AudioGetHostClockFrequency';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioGetHostClockMinimumTimeDelta
+ @abstract Gets the smallest number of ticks that two succeeding values will ever differ.
+ by.
+ @result A UInt32 containing the smallest number of ticks that two succeeding values will
+ ever differ.
+}
+function AudioGetHostClockMinimumTimeDelta: UInt32; external name '_AudioGetHostClockMinimumTimeDelta';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioConvertHostTimeToNanos
+ @abstract Convert the given host time into a time in nanoseconds.
+ @param inHostTime
+ A UInt64 containing the host time to convert.
+ @result A UInt64 containining the converted host time.
+}
+function AudioConvertHostTimeToNanos( inHostTime: UInt64 ): UInt64; external name '_AudioConvertHostTimeToNanos';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioConvertNanosToHostTime
+ @abstract Convert the given nanosecond time into a host time.
+ @param inNanos
+ A UInt64 containing the nanosecond time to convert.
+ @result A UInt64 containining the converted nanosecond time.
+}
+function AudioConvertNanosToHostTime( inNanos: UInt64 ): UInt64; external name '_AudioConvertNanosToHostTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{unit ICACamera}
+{
+ File: ICACamera.p
+
+ Contains: Digital still camera-specific selectors and structures
+
+ Version: Technology: 1.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 2000-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{
+ -------------------------------------------------------------------------
+ Selectors
+ -------------------------------------------------------------------------
+}
+
+const
+ { Camera properties }
+ { Refer to section 13 of the PIMA 15740 (PTP) specification for }
+ { descriptions and usage notes for these standard properties }
+ kICAPropertyCameraBatteryLevel = $35303031 (* '5001' *); { UInt8 enum/range }
+ kICAPropertyCameraFunctionalMode = $35303032 (* '5002' *); { UInt16 enum }
+ kICAPropertyCameraImageSize = $35303033 (* '5003' *); { CFString enum/range }
+ kICAPropertyCameraCompressionSetting = $35303034 (* '5004' *); { UInt8 enum/range }
+ kICAPropertyCameraWhiteBalance = $35303035 (* '5005' *); { UInt16 enum }
+ kICAPropertyCameraRGBGain = $35303036 (* '5006' *); { null terminated string enum/range }
+ kICAPropertyCameraFNumber = $35303037 (* '5007' *); { UInt16 enum }
+ kICAPropertyCameraFocalLength = $35303038 (* '5008' *); { UInt32 enum/range }
+ kICAPropertyCameraFocusDistance = $35303039 (* '5009' *); { UInt16 enum/range }
+ kICAPropertyCameraFocusMode = $35303041 (* '500A' *); { UInt16 enum }
+ kICAPropertyCameraExposureMeteringMode = $35303042 (* '500B' *); { UInt16 enum }
+ kICAPropertyCameraFlashMode = $35303043 (* '500C' *); { UInt16 enum }
+ kICAPropertyCameraExposureTime = $35303044 (* '500D' *); { UInt32 enum/range }
+ kICAPropertyCameraExposureProgramMode = $35303045 (* '500E' *); { UInt16 enum }
+ kICAPropertyCameraExposureIndex = $35303046 (* '500F' *); { UInt16 enum/range }
+ kICAPropertyCameraExposureBiasCompensation = $35303130 (* '5010' *); { UInt16 enum/range }
+ kICAPropertyCameraDateTime = $35303131 (* '5011' *); { null terminated string none }
+ kICAPropertyCameraCaptureDelay = $35303132 (* '5012' *); { UInt32 enum/range }
+ kICAPropertyCameraStillCaptureMode = $35303133 (* '5013' *); { UInt16 enum }
+ kICAPropertyCameraContrast = $35303134 (* '5014' *); { UInt8 enum/range }
+ kICAPropertyCameraSharpness = $35303135 (* '5015' *); { UInt8 enum/range }
+ kICAPropertyCameraDigitalZoom = $35303136 (* '5016' *); { UInt8 enum/range }
+ kICAPropertyCameraEffectMode = $35303137 (* '5017' *); { UInt16 enum }
+ kICAPropertyCameraBurstNumber = $35303138 (* '5018' *); { UInt16 enum/range }
+ kICAPropertyCameraBurstInterval = $35303139 (* '5019' *); { UInt16 enum/range }
+ kICAPropertyCameraTimelapseNumber = $35303141 (* '501A' *); { UInt16 enum/range }
+ kICAPropertyCameraTimelapseInterval = $35303142 (* '501B' *); { UInt32 enum/range }
+ kICAPropertyCameraFocusMeteringMode = $35303143 (* '501C' *); { UInt16 enum }
+
+ { Refer to section 5.5.3 of the PTP spec }
+ kICAPropertyCameraStorageType = $73746F72 (* 'stor' *); { UInt16 }
+ kICAPropertyCameraFilesystemType = $66737973 (* 'fsys' *); { UInt16 }
+ kICAPropertyCameraAccessCapability = $61636170 (* 'acap' *); { UInt16 }
+ kICAPropertyCameraMaxCapacity = $6D617863 (* 'maxc' *); { UInt64 }
+ kICAPropertyCameraFreeSpaceInBytes = $66726573 (* 'fres' *); { UInt64 }
+ kICAPropertyCameraFreeSpaceInImages = $66726569 (* 'frei' *); { UInt32 }
+ kICAPropertyCameraStorageDescription = $73746F64 (* 'stod' *); { null terminated string }
+ kICAPropertyCameraVolumeLabel = $766F6C6C (* 'voll' *); { null terminated string }
+
+ { ICA specific }
+ kICAPropertyCameraIcon = $69636F6E (* 'icon' *); { ICAThumbnail }
+ kICAPropertyCameraSupportedMessages = $6D736773 (* 'msgs' *); { array of OSTypes }
+
+ { Values for kICAPropertyCameraStorageType }
+ kICAStorageFixedROM = $0001;
+ kICAStorageRemovableROM = $0002;
+ kICAStorageFixedRAM = $0003;
+ kICAStorageRemovableRAM = $0004;
+
+ { Values for kICAPropertyCameraFilesystemType }
+ kICAFileystemGenericFlat = $0001;
+ kICAFileystemGenericHierarchical = $0002;
+ kICAFileystemDCF = $0003;
+
+ { Values for kICAPropertyCameraAccessCapability }
+ kICAAccessReadWrite = $0000;
+ kICAAccessReadOnly = $0001;
+ kICAAccessReadOnlyWithObjectDeletion = $0002;
+
+ { Camera messages }
+ kICAMessageCameraCaptureNewImage = $63636E69 (* 'ccni' *);
+ kICAMessageCameraDeleteOne = $64656C31 (* 'del1' *);
+ kICAMessageCameraDeleteAll = $64656C61 (* 'dela' *);
+ kICAMessageCameraSyncClock = $73636C6B (* 'sclk' *);
+ kICAMessageCameraUploadData = $6C6F6164 (* 'load' *);
+
+{$ALIGN MAC68K}
+
+
+{unit IntlResources}
+{
+ File: IntlResources.p
+
+ Contains: International Resource definitions.
+
+ Version: Technology: System 7.5+
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1983-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ { Bits in the itlcFlags byte }
+ itlcShowIcon = 7; { Show icon even if only one script }
+ itlcDualCaret = 6; { Use dual caret for mixed direction text }
+ { Bits in the itlcSysFlags word }
+ itlcSysDirection = 15; { System direction - left to right/right to left }
+
+ { One more flag in the itlcFlags byte }
+ itlcDisableKeyScriptSync = 3; { Disable font and keyboard script synchrinozation }
+
+ { We should define masks, too. }
+ itlcDisableKeyScriptSyncMask = $08; { Disable font and keyboard script synchrinozation mask }
+
+
+ tokLeftQuote = 1; { NumberParts.data[] enumerators }
+ tokRightQuote = 2; { In general, these are NOT to be considered indices into the data[] array }
+ tokLeadPlacer = 3;
+ tokLeader = 4;
+ tokNonLeader = 5;
+ tokZeroLead = 6;
+ tokPercent = 7;
+ tokPlusSign = 8;
+ tokMinusSign = 9;
+ tokThousands = 10;
+ tokReserved = 11; { 11 is reserved field }
+ tokSeparator = 12;
+ tokEscape = 13;
+ tokDecPoint = 14;
+ tokEPlus = 15;
+ tokEMinus = 16;
+ tokMaxSymbols = 31;
+ curNumberPartsVersion = 1; { current version of NumberParts record }
+
+ currSymLead = 16;
+ currNegSym = 32;
+ currTrailingZ = 64;
+ currLeadingZ = 128;
+
+ mdy = 0;
+ dmy = 1;
+ ymd = 2;
+ myd = 3;
+ dym = 4;
+ ydm = 5;
+
+
+type
+ DateOrders = SInt8;
+
+const
+ timeCycle24 = 0; { time sequence 0:00 - 23:59 }
+ timeCycleZero = 1; { time sequence 0:00-11:59, 0:00 - 11:59 }
+ timeCycle12 = 255; { time sequence 12:00 - 11:59, 12:00 - 11:59 }
+ zeroCycle = 1; { old name for timeCycleZero }
+ longDay = 0; { day of the month }
+ longWeek = 1; { day of the week }
+ longMonth = 2; { month of the year }
+ longYear = 3; { year }
+ supDay = 1; { suppress day of month }
+ supWeek = 2; { suppress day of week }
+ supMonth = 4; { suppress month }
+ supYear = 8; { suppress year }
+ dayLdingZ = 32;
+ mntLdingZ = 64;
+ century = 128;
+ secLeadingZ = 32;
+ minLeadingZ = 64;
+ hrLeadingZ = 128;
+
+ { moved OffsetTable back here from QuickdrawText }
+
+type
+ OffPairPtr = ^OffPair;
+ OffPair = record
+ offFirst: SInt16;
+ offSecond: SInt16;
+ end;
+
+ OffsetTable = array [0..2] of OffPair;
+ Intl0RecPtr = ^Intl0Rec;
+ Intl0Rec = packed record
+ decimalPt: char; { decimal point character }
+ thousSep: char; { thousands separator character }
+ listSep: char; { list separator character }
+ currSym1: char; { currency symbol }
+ currSym2: char;
+ currSym3: char;
+ currFmt: UInt8; { currency format flags }
+ dateOrder: UInt8; { order of short date elements: mdy, dmy, etc. }
+ shrtDateFmt: UInt8; { format flags for each short date element }
+ dateSep: char; { date separator character }
+ timeCycle: UInt8; { specifies time cycle: 0..23, 1..12, or 0..11 }
+ timeFmt: UInt8; { format flags for each time element }
+ mornStr: packed array [1..4] of char; { trailing string for AM if 12-hour cycle }
+ eveStr: packed array [1..4] of char; { trailing string for PM if 12-hour cycle }
+ timeSep: char; { time separator character }
+ time1Suff: char; { trailing string for AM if 24-hour cycle }
+ time2Suff: char;
+ time3Suff: char;
+ time4Suff: char;
+ time5Suff: char; { trailing string for PM if 24-hour cycle }
+ time6Suff: char;
+ time7Suff: char;
+ time8Suff: char;
+ metricSys: UInt8; { 255 if metric, 0 if inches etc. }
+ intl0Vers: SInt16; { region code (hi byte) and version (lo byte) }
+ end;
+
+ Intl0Ptr = ^Intl0Rec;
+ Intl0Hndl = ^Intl0Ptr;
+ Intl1RecPtr = ^Intl1Rec;
+ Intl1Rec = packed record
+ days: array [1..7] of Str15; { day names }
+ months: array [1..12] of Str15; { month names }
+ suppressDay: UInt8; { 255 for no day, or flags to suppress any element }
+ lngDateFmt: UInt8; { order of long date elements }
+ dayLeading0: UInt8; { 255 for leading 0 in day number }
+ abbrLen: UInt8; { length for abbreviating names }
+ st0: packed array [1..4] of char; { separator strings for long date format }
+ st1: packed array [1..4] of char;
+ st2: packed array [1..4] of char;
+ st3: packed array [1..4] of char;
+ st4: packed array [1..4] of char;
+ intl1Vers: SInt16; { region code (hi byte) and version (lo byte) }
+ localRtn: array [0..0] of SInt16; { now a flag for opt extension }
+ end;
+
+ Intl1Ptr = ^Intl1Rec;
+ Intl1Hndl = ^Intl1Ptr;
+ { fields for optional itl1 extension }
+ Itl1ExtRecPtr = ^Itl1ExtRec;
+ Itl1ExtRec = record
+ base: Intl1Rec; { un-extended Intl1Rec }
+ version: SInt16;
+ format: SInt16;
+ calendarCode: SInt16; { calendar code for this itl1 resource }
+ extraDaysTableOffset: SInt32; { offset in itl1 to extra days table }
+ extraDaysTableLength: SInt32; { length of extra days table }
+ extraMonthsTableOffset: SInt32; { offset in itl1 to extra months table }
+ extraMonthsTableLength: SInt32; { length of extra months table }
+ abbrevDaysTableOffset: SInt32; { offset in itl1 to abbrev days table }
+ abbrevDaysTableLength: SInt32; { length of abbrev days table }
+ abbrevMonthsTableOffset: SInt32; { offset in itl1 to abbrev months table }
+ abbrevMonthsTableLength: SInt32; { length of abbrev months table }
+ extraSepsTableOffset: SInt32; { offset in itl1 to extra seps table }
+ extraSepsTableLength: SInt32; { length of extra seps table }
+ tables: array [0..0] of SInt16; { now a flag for opt extension }
+ end;
+
+ UntokenTablePtr = ^UntokenTable;
+ UntokenTable = record
+ len: SInt16;
+ lastToken: SInt16;
+ index: array [0..255] of SInt16; { index table; last = lastToken }
+ end;
+
+ UntokenTableHandle = ^UntokenTablePtr;
+ WideCharPtr = ^WideChar;
+ WideChar = packed record
+ case SInt16 of
+ 0: (
+ a: packed array [0..1] of char; { 0 is the high order character [for PPC] }
+ );
+ 2: (
+{$ifc TARGET_RT_BIG_ENDIAN}
+ hi: char;
+ lo: char;
+{$elsec}
+ lo: char;
+ hi: char;
+{$endc}
+ );
+ 1: (
+ b: SInt16;
+ );
+ end;
+
+ WideCharArrPtr = ^WideCharArr;
+ WideCharArr = record
+ size: SInt16;
+ data: array [0..9] of WideChar;
+ end;
+
+ NumberPartsPtr = ^NumberParts;
+ NumberParts = record
+ version: SInt16;
+ data: array [0..30] of WideChar; { index by [tokLeftQuote..tokMaxSymbols] }
+ pePlus: WideCharArr;
+ peMinus: WideCharArr;
+ peMinusPlus: WideCharArr;
+ altNumTable: WideCharArr;
+ reserved: packed array [0..19] of char;
+ end;
+
+
+ Itl4RecPtr = ^Itl4Rec;
+ Itl4Rec = record
+ flags: SInt16; { reserved }
+ resourceType: SInt32; { contains 'itl4' }
+ resourceNum: SInt16; { resource ID }
+ version: SInt16; { version number }
+ resHeader1: SInt32; { reserved }
+ resHeader2: SInt32; { reserved }
+ numTables: SInt16; { number of tables, one-based }
+ mapOffset: SInt32; { offset to table that maps byte to token }
+ strOffset: SInt32; { offset to routine that copies canonical string }
+ fetchOffset: SInt32; { offset to routine that gets next byte of character }
+ unTokenOffset: SInt32; { offset to table that maps token to canonical string }
+ defPartsOffset: SInt32; { offset to default number parts table }
+ resOffset6: SInt32; { reserved }
+ resOffset7: SInt32; { reserved }
+ resOffset8: SInt32; { reserved }
+ end;
+
+ Itl4Ptr = ^Itl4Rec;
+ Itl4Handle = ^Itl4Ptr;
+ { New NItl4Rec for System 7.0: }
+ NItl4RecPtr = ^NItl4Rec;
+ NItl4Rec = record
+ flags: SInt16; { reserved }
+ resourceType: SInt32; { contains 'itl4' }
+ resourceNum: SInt16; { resource ID }
+ version: SInt16; { version number }
+ format: SInt16; { format code }
+ resHeader: SInt16; { reserved }
+ resHeader2: SInt32; { reserved }
+ numTables: SInt16; { number of tables, one-based }
+ mapOffset: SInt32; { offset to table that maps byte to token }
+ strOffset: SInt32; { offset to routine that copies canonical string }
+ fetchOffset: SInt32; { offset to routine that gets next byte of character }
+ unTokenOffset: SInt32; { offset to table that maps token to canonical string }
+ defPartsOffset: SInt32; { offset to default number parts table }
+ whtSpListOffset: SInt32; { offset to white space code list }
+ resOffset7: SInt32; { reserved }
+ resOffset8: SInt32; { reserved }
+ resLength1: SInt16; { reserved }
+ resLength2: SInt16; { reserved }
+ resLength3: SInt16; { reserved }
+ unTokenLength: SInt16; { length of untoken table }
+ defPartsLength: SInt16; { length of default number parts table }
+ whtSpListLength: SInt16; { length of white space code list }
+ resLength7: SInt16; { reserved }
+ resLength8: SInt16; { reserved }
+ end;
+
+ NItl4Ptr = ^NItl4Rec;
+ NItl4Handle = ^NItl4Ptr;
+
+ TableDirectoryRecordPtr = ^TableDirectoryRecord;
+ TableDirectoryRecord = record
+ tableSignature: OSType; { 4 byte long table name }
+ reserved: UInt32; { Reserved for internal use }
+ tableStartOffset: UInt32; { Table start offset in byte }
+ tableSize: UInt32; { Table size in byte }
+ end;
+
+ Itl5RecordPtr = ^Itl5Record;
+ Itl5Record = record
+ versionNumber: Fixed; { itl5 resource version number }
+ numberOfTables: UInt16; { Number of tables it contains }
+ reserved: array [0..2] of UInt16; { Reserved for internal use }
+ tableDirectory: array [0..0] of TableDirectoryRecord; { Table directory records }
+ end;
+
+ RuleBasedTrslRecordPtr = ^RuleBasedTrslRecord;
+ RuleBasedTrslRecord = record
+ sourceType: SInt16; { Transliterate target type for the LHS of the rule }
+ targetType: SInt16; { Transliterate target type for the RHS of the rule }
+ formatNumber: SInt16; { Transliterate resource format number }
+ propertyFlag: SInt16; { Transliterate property flags }
+ numberOfRules: SInt16; { Number of rules following this field }
+ end;
+
+
+ ItlcRecordPtr = ^ItlcRecord;
+ ItlcRecord = record
+ itlcSystem: SInt16; { default system script }
+ itlcReserved: SInt16; { reserved }
+ itlcFontForce: SInt8; { default font force flag }
+ itlcIntlForce: SInt8; { default intl force flag }
+ itlcOldKybd: SInt8; { MacPlus intl keybd flag }
+ itlcFlags: SInt8; { general flags }
+ itlcIconOffset: SInt16; { keyboard icon offset; not used in 7.0 }
+ itlcIconSide: SInt8; { keyboard icon side; not used in 7.0 }
+ itlcIconRsvd: SInt8; { rsvd for other icon info }
+ itlcRegionCode: SInt16; { preferred verXxx code }
+ itlcSysFlags: SInt16; { flags for setting system globals }
+ itlcReserved4: array [0..31] of SInt8; { for future use }
+ end;
+
+ ItlbRecordPtr = ^ItlbRecord;
+ ItlbRecord = record
+ itlbNumber: SInt16; { itl0 id number }
+ itlbDate: SInt16; { itl1 id number }
+ itlbSort: SInt16; { itl2 id number }
+ itlbFlags: SInt16; { Script flags }
+ itlbToken: SInt16; { itl4 id number }
+ itlbEncoding: SInt16; { itl5 ID # (optional; char encoding) }
+ itlbLang: SInt16; { current language for script }
+ itlbNumRep: SInt8; { number representation code }
+ itlbDateRep: SInt8; { date representation code }
+ itlbKeys: SInt16; { KCHR id number }
+ itlbIcon: SInt16; { ID # of SICN or kcs#/kcs4/kcs8 suite. }
+ end;
+
+ { New ItlbExtRecord structure for System 7.0 }
+ ItlbExtRecordPtr = ^ItlbExtRecord;
+ ItlbExtRecord = packed record
+ base: ItlbRecord; { un-extended ItlbRecord }
+ itlbLocalSize: SInt32; { size of script's local record }
+ itlbMonoFond: SInt16; { default monospace FOND ID }
+ itlbMonoSize: SInt16; { default monospace font size }
+ itlbPrefFond: SInt16; { preferred FOND ID }
+ itlbPrefSize: SInt16; { preferred font size }
+ itlbSmallFond: SInt16; { default small FOND ID }
+ itlbSmallSize: SInt16; { default small font size }
+ itlbSysFond: SInt16; { default system FOND ID }
+ itlbSysSize: SInt16; { default system font size }
+ itlbAppFond: SInt16; { default application FOND ID }
+ itlbAppSize: SInt16; { default application font size }
+ itlbHelpFond: SInt16; { default Help Mgr FOND ID }
+ itlbHelpSize: SInt16; { default Help Mgr font size }
+ itlbValidStyles: Style; { set of valid styles for script }
+ itlbAliasStyle: Style; { style (set) to mark aliases }
+ end;
+
+
+{$ALIGN MAC68K}
+
+
+{unit Keyboards}
+{
+ File: HIToolbox/Keyboards.h
+
+ Contains: Keyboard API.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1997-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ OBSOLETE }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ These are obsolete. Carbon does not support these. }
+{ Keyboard API Trap Number. Should be moved to Traps.i }
+const
+ _KeyboardDispatch = $AA7A;
+
+{ Gestalt selector and values for the Keyboard API }
+const
+ gestaltKeyboardsAttr = $6B626473 (* 'kbds' *);
+ gestaltKBPS2Keyboards = 1;
+ gestaltKBPS2SetIDToAny = 2;
+ gestaltKBPS2SetTranslationTable = 4;
+
+{ Keyboard API Error Codes }
+{
+ I stole the range blow from the empty space in the Allocation project but should
+ be updated to the officially registered range.
+}
+const
+ errKBPS2KeyboardNotAvailable = -30850;
+ errKBIlligalParameters = -30851;
+ errKBFailSettingID = -30852;
+ errKBFailSettingTranslationTable = -30853;
+ errKBFailWritePreference = -30854;
+
+{
+ * KBInitialize()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in KeyboardsLib 1.0 and later
+ }
+
+
+{
+ * KBSetupPS2Keyboard()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in KeyboardsLib 1.0 and later
+ }
+
+
+{
+ * KBGetPS2KeyboardID()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in KeyboardsLib 1.0 and later
+ }
+
+
+{
+ * KBIsPS2KeyboardConnected()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in KeyboardsLib 1.0 and later
+ }
+
+
+{
+ * KBIsPS2KeyboardEnabled()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in KeyboardsLib 1.0 and later
+ }
+
+
+{
+ * KBGetPS2KeyboardAttributes()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in KeyboardsLib 1.0 and later
+ }
+
+
+{
+ * KBSetKCAPForPS2Keyboard()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in KeyboardsLib 1.0 and later
+ }
+
+
+{
+ * KBSetupPS2KeyboardFromLayoutType()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in KeyboardsLib 1.0 and later
+ }
+
+
+{
+ * KBGetPS2KeyboardLayoutType()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in KeyboardsLib 1.0 and later
+ }
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Keyboard API constants }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * PhysicalKeyboardLayoutType
+ *
+ * Summary:
+ * Physical keyboard layout types indicate the physical keyboard
+ * layout. They are returned by the KBGetLayoutType API.
+ }
+type
+ PhysicalKeyboardLayoutType = UInt32;
+const
+{
+ * A JIS keyboard layout type.
+ }
+ kKeyboardJIS = $4A495320 (* 'JIS ' *);
+
+ {
+ * An ANSI keyboard layout type.
+ }
+ kKeyboardANSI = $414E5349 (* 'ANSI' *);
+
+ {
+ * An ISO keyboard layout type.
+ }
+ kKeyboardISO = $49534F20 (* 'ISO ' *);
+
+ {
+ * An unknown physical keyboard layout type.
+ }
+ kKeyboardUnknown = kUnknownType; { '????'}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Keyboard API types }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * KeyboardLayoutRef
+ *
+ * Summary:
+ * The opaque keyboard layout contains information about a keyboard
+ * layout. It is used with the keyboard layout APIs.
+ *
+ * Discussion:
+ * KeyboardLayoutRef APIs follow CoreFoundation function naming
+ * convention. You mustn't release any references you get from APIs
+ * named "Get."
+ }
+type
+ KeyboardLayoutRef = ^SInt32; { an opaque 32-bit type }
+
+{
+ * KeyboardLayoutPropertyTag
+ *
+ * Summary:
+ * Keyboard layout property tags specify the value you want to
+ * retrieve. They are used with the KLGetKeyboardLayoutProperty API.
+ }
+type
+ KeyboardLayoutPropertyTag = UInt32;
+const
+{
+ * The keyboard layout data (const void *). It is used with the
+ * KeyTranslate API.
+ }
+ kKLKCHRData = 0;
+
+ {
+ * The keyboard layout data (const void *). It is used with the
+ * UCKeyTranslate API.
+ }
+ kKLuchrData = 1;
+
+ {
+ * The keyboard layout identifier (KeyboardLayoutIdentifier).
+ }
+ kKLIdentifier = 2;
+
+ {
+ * The keyboard layout icon (IconRef).
+ }
+ kKLIcon = 3;
+
+ {
+ * The localized keyboard layout name (CFStringRef).
+ }
+ kKLLocalizedName = 4;
+
+ {
+ * The keyboard layout name (CFStringRef).
+ }
+ kKLName = 5;
+
+ {
+ * The keyboard layout group identifier (SInt32).
+ }
+ kKLGroupIdentifier = 6;
+
+ {
+ * The keyboard layout kind (KeyboardLayoutKind).
+ }
+ kKLKind = 7;
+
+ {
+ * The language/locale string associated with the keyboard, if any
+ * (CFStringRef). This string uses ISO 639 and ISO 3166 codes
+ * (examples: "fr", "en_US". Note: The CFStringRef may be NULL for
+ * some keyboards.
+ }
+ kKLLanguageCode = 9;
+
+
+{
+ * KeyboardLayoutKind
+ *
+ * Summary:
+ * Keyboard layout kinds indicate available keyboard layout formats.
+ }
+type
+ KeyboardLayoutKind = SInt32;
+const
+{
+ * Both KCHR and uchr formats are available.
+ }
+ kKLKCHRuchrKind = 0;
+
+ {
+ * Only KCHR format is avaiable.
+ }
+ kKLKCHRKind = 1;
+
+ {
+ * Only uchr format is available.
+ }
+ kKLuchrKind = 2;
+
+
+{
+ * KeyboardLayoutIdentifier
+ *
+ * Summary:
+ * Keyboard layout identifiers specify particular keyboard layouts.
+ }
+type
+ KeyboardLayoutIdentifier = SInt32;
+const
+ kKLUSKeyboard = 0;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Keyboard API routines }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * KBGetLayoutType()
+ *
+ * Summary:
+ * Returns the physical keyboard layout type.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iKeyboardType:
+ * The keyboard type ID. LMGetKbdType().
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: in KeyboardsLib 1.0 and later
+ }
+function KBGetLayoutType( iKeyboardType: SInt16 ): PhysicalKeyboardLayoutType; external name '_KBGetLayoutType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ iterate keyboard layouts}
+
+{
+ * KLGetKeyboardLayoutCount()
+ *
+ * Summary:
+ * Returns the number of keyboard layouts.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * oCount:
+ * On exit, the number of keyboard layouts
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function KLGetKeyboardLayoutCount( var oCount: CFIndex ): OSStatus; external name '_KLGetKeyboardLayoutCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * KLGetKeyboardLayoutAtIndex()
+ *
+ * Summary:
+ * Retrieves the keyboard layout at the given index.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iIndex:
+ * The index of the keyboard layout to retrieve. If the index is
+ * outside the index space of the keyboard layouts (0 to N-1
+ * inclusive, where N is the count of the keyboard layouts), the
+ * behavior is undefined.
+ *
+ * oKeyboardLayout:
+ * On exit, the keyboard layout with the given index.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function KLGetKeyboardLayoutAtIndex( iIndex: CFIndex; var oKeyboardLayout: KeyboardLayoutRef ): OSStatus; external name '_KLGetKeyboardLayoutAtIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ *** deprecated. ***
+ NOTE: "Indexed" is a wrong name, please use "AtIndex"...
+ OSStatus KLGetIndexedKeyboardLayout(
+ CFIndex iIndex,
+ KeyboardLayoutRef *oKeyboardLayout );
+}
+
+{ get keyboard layout info}
+
+{
+ * KLGetKeyboardLayoutProperty()
+ *
+ * Summary:
+ * Retrives property value for the given keyboard layout and tag.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iKeyboardLayout:
+ * The keyboard layout to be queried. If this parameter is not a
+ * valid KeyboardLayoutRef, the behavior is undefined.
+ *
+ * iPropertyTag:
+ * The property tag.
+ *
+ * oValue:
+ * On exit, the property value for the given keyboard layout and
+ * tag.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function KLGetKeyboardLayoutProperty( iKeyboardLayout: KeyboardLayoutRef; iPropertyTag: KeyboardLayoutPropertyTag; var oValue: UnivPtr ): OSStatus; external name '_KLGetKeyboardLayoutProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{ get keyboard layout with identifier or name}
+
+{
+ * KLGetKeyboardLayoutWithIdentifier()
+ *
+ * Summary:
+ * Retrieves the keyboard layout with the given identifier.
+ *
+ * Discussion:
+ * For now, the identifier is in the range of SInt16 which is
+ * compatible with the Resource Manager resource ID. However, it
+ * will become an arbitrary SInt32 value at some point, so do not
+ * assume it is in SInt16 range or falls into the "script range" of
+ * the resource IDs.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iIdentifier:
+ * The keyboard layout identifier.
+ *
+ * oKeyboardLayout:
+ * On exit, the keyboard layout with the given identifier.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function KLGetKeyboardLayoutWithIdentifier( iIdentifier: KeyboardLayoutIdentifier; var oKeyboardLayout: KeyboardLayoutRef ): OSStatus; external name '_KLGetKeyboardLayoutWithIdentifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * KLGetKeyboardLayoutWithName()
+ *
+ * Summary:
+ * Retrieves the keyboard layout with the given name.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iName:
+ * The keyboard layout name.
+ *
+ * oKeyboardLayout:
+ * On exit, the keyboard layout with the given name.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function KLGetKeyboardLayoutWithName( iName: CFStringRef; var oKeyboardLayout: KeyboardLayoutRef ): OSStatus; external name '_KLGetKeyboardLayoutWithName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{ get/set current keyboard layout of the current group identifier}
+
+{
+ * KLGetCurrentKeyboardLayout()
+ *
+ * Summary:
+ * Retrieves the current keyboard layout.
+ *
+ * Discussion:
+ * Retrieves the current keyboard layout for the current keyboard
+ * script. To retrive the current keyboard script for Roman
+ * keyboard script, you need to call KeyScript( smRoman |
+ * smKeyForceKeyScriptMask ) then call KLGetCurrentKeyboardLayout().
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * oKeyboardLayout:
+ * On exit, the current keyboard layout.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function KLGetCurrentKeyboardLayout( var oKeyboardLayout: KeyboardLayoutRef ): OSStatus; external name '_KLGetCurrentKeyboardLayout';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * KLSetCurrentKeyboardLayout()
+ *
+ * Summary:
+ * Sets the current keyboard layout.
+ *
+ * Discussion:
+ * Sets the current keyboard layout for the current keyboard script.
+ * Returns "paramErr" when the current keyboard layout is not
+ * Unicode and the specified keyboard layout belongs to Unicode
+ * group. To set Roman keyboard script's current keyboard layout to
+ * "U.S." for example, you need to call KeyScript( smRoman |
+ * smKeyForceKeyScriptMask ) then call KLSetCurrentKeyboardLayout(
+ * theUSKeyboardLayoutRef ).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iKeyboardLayout:
+ * The keyboard layout.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function KLSetCurrentKeyboardLayout( iKeyboardLayout: KeyboardLayoutRef ): OSStatus; external name '_KLSetCurrentKeyboardLayout';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{unit MacErrors}
+{
+ File: MacErrors.p
+
+ Contains: OSErr codes.
+
+ Version: Technology: Mac OS 9
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ paramErr = -50; { error in user parameter list }
+ noHardwareErr = -200; { Sound Manager Error Returns }
+ notEnoughHardwareErr = -201; { Sound Manager Error Returns }
+ userCanceledErr = -128;
+ qErr = -1; { queue element not found during deletion }
+ vTypErr = -2; { invalid queue element }
+ corErr = -3; { core routine number out of range }
+ unimpErr = -4; { unimplemented core routine }
+ SlpTypeErr = -5; { invalid queue element }
+ seNoDB = -8; { no debugger installed to handle debugger command }
+ controlErr = -17; { I/O System Errors }
+ statusErr = -18; { I/O System Errors }
+ readErr = -19; { I/O System Errors }
+ writErr = -20; { I/O System Errors }
+ badUnitErr = -21; { I/O System Errors }
+ unitEmptyErr = -22; { I/O System Errors }
+ openErr = -23; { I/O System Errors }
+ closErr = -24; { I/O System Errors }
+ dRemovErr = -25; { tried to remove an open driver }
+ dInstErr = -26; { DrvrInstall couldn't find driver in resources }
+
+ abortErr = -27; { IO call aborted by KillIO }
+ iIOAbortErr = -27; { IO abort error (Printing Manager) }
+ notOpenErr = -28; { Couldn't rd/wr/ctl/sts cause driver not opened }
+ unitTblFullErr = -29; { unit table has no more entries }
+ dceExtErr = -30; { dce extension error }
+ slotNumErr = -360; { invalid slot # error }
+ gcrOnMFMErr = -400; { gcr format on high density media error }
+ dirFulErr = -33; { Directory full }
+ dskFulErr = -34; { disk full }
+ nsvErr = -35; { no such volume }
+ ioErr = -36; { I/O error (bummers) }
+ bdNamErr = -37; { there may be no bad names in the final system! }
+ fnOpnErr = -38; { File not open }
+ eofErr = -39; { End of file }
+ posErr = -40; { tried to position to before start of file (r/w) }
+ mFulErr = -41; { memory full (open) or file won't fit (load) }
+ tmfoErr = -42; { too many files open }
+ fnfErr = -43; { File not found }
+ wPrErr = -44; { diskette is write protected. }
+ fLckdErr = -45; { file is locked }
+
+ vLckdErr = -46; { volume is locked }
+ fBsyErr = -47; { File is busy (delete) }
+ dupFNErr = -48; { duplicate filename (rename) }
+ opWrErr = -49; { file already open with with write permission }
+ rfNumErr = -51; { refnum error }
+ gfpErr = -52; { get file position error }
+ volOffLinErr = -53; { volume not on line error (was Ejected) }
+ permErr = -54; { permissions error (on file open) }
+ volOnLinErr = -55; { drive volume already on-line at MountVol }
+ nsDrvErr = -56; { no such drive (tried to mount a bad drive num) }
+ noMacDskErr = -57; { not a mac diskette (sig bytes are wrong) }
+ extFSErr = -58; { volume in question belongs to an external fs }
+ fsRnErr = -59; { file system internal error:during rename the old entry was deleted but could not be restored. }
+ badMDBErr = -60; { bad master directory block }
+ wrPermErr = -61; { write permissions error }
+ dirNFErr = -120; { Directory not found }
+ tmwdoErr = -121; { No free WDCB available }
+ badMovErr = -122; { Move into offspring error }
+ wrgVolTypErr = -123; { Wrong volume type error [operation not supported for MFS] }
+ volGoneErr = -124; { Server volume has been disconnected. }
+
+ fidNotFound = -1300; { no file thread exists. }
+ fidExists = -1301; { file id already exists }
+ notAFileErr = -1302; { directory specified }
+ diffVolErr = -1303; { files on different volumes }
+ catChangedErr = -1304; { the catalog has been modified }
+ desktopDamagedErr = -1305; { desktop database files are corrupted }
+ sameFileErr = -1306; { can't exchange a file with itself }
+ badFidErr = -1307; { file id is dangling or doesn't match with the file number }
+ notARemountErr = -1308; { when _Mount allows only remounts and doesn't get one }
+ fileBoundsErr = -1309; { file's EOF, offset, mark or size is too big }
+ fsDataTooBigErr = -1310; { file or volume is too big for system }
+ volVMBusyErr = -1311; { can't eject because volume is in use by VM }
+ badFCBErr = -1327; { FCBRecPtr is not valid }
+ errFSUnknownCall = -1400; { selector is not recognized by this filesystem }
+ errFSBadFSRef = -1401; { FSRef parameter is bad }
+ errFSBadForkName = -1402; { Fork name parameter is bad }
+ errFSBadBuffer = -1403; { A buffer parameter was bad }
+ errFSBadForkRef = -1404; { A ForkRefNum parameter was bad }
+ errFSBadInfoBitmap = -1405; { A CatalogInfoBitmap or VolumeInfoBitmap has reserved or invalid bits set }
+ errFSMissingCatInfo = -1406; { A CatalogInfo parameter was NULL }
+ errFSNotAFolder = -1407; { Expected a folder, got a file }
+ errFSForkNotFound = -1409; { Named fork does not exist }
+ errFSNameTooLong = -1410; { File/fork name is too long to create/rename }
+ errFSMissingName = -1411; { A Unicode name parameter was NULL or nameLength parameter was zero }
+ errFSBadPosMode = -1412; { Newline bits set in positionMode }
+ errFSBadAllocFlags = -1413; { Invalid bits set in allocationFlags }
+ errFSNoMoreItems = -1417; { Iteration ran out of items to return }
+ errFSBadItemCount = -1418; { maximumItems was zero }
+ errFSBadSearchParams = -1419; { Something wrong with CatalogSearch searchParams }
+ errFSRefsDifferent = -1420; { FSCompareFSRefs; refs are for different objects }
+ errFSForkExists = -1421; { Named fork already exists. }
+ errFSBadIteratorFlags = -1422; { Flags passed to FSOpenIterator are bad }
+ errFSIteratorNotFound = -1423; { Passed FSIterator is not an open iterator }
+ errFSIteratorNotSupported = -1424; { The iterator's flags or container are not supported by this call }
+ envNotPresent = -5500; { returned by glue. }
+ envBadVers = -5501; { Version non-positive }
+ envVersTooBig = -5502; { Version bigger than call can handle }
+ fontDecError = -64; { error during font declaration }
+ fontNotDeclared = -65; { font not declared }
+ fontSubErr = -66; { font substitution occurred }
+ fontNotOutlineErr = -32615; { bitmap font passed to routine that does outlines only }
+ firstDskErr = -84; { I/O System Errors }
+ lastDskErr = -64; { I/O System Errors }
+ noDriveErr = -64; { drive not installed }
+ offLinErr = -65; { r/w requested for an off-line drive }
+ noNybErr = -66; { couldn't find 5 nybbles in 200 tries }
+
+ noAdrMkErr = -67; { couldn't find valid addr mark }
+ dataVerErr = -68; { read verify compare failed }
+ badCksmErr = -69; { addr mark checksum didn't check }
+ badBtSlpErr = -70; { bad addr mark bit slip nibbles }
+ noDtaMkErr = -71; { couldn't find a data mark header }
+ badDCksum = -72; { bad data mark checksum }
+ badDBtSlp = -73; { bad data mark bit slip nibbles }
+ wrUnderrun = -74; { write underrun occurred }
+ cantStepErr = -75; { step handshake failed }
+ tk0BadErr = -76; { track 0 detect doesn't change }
+ initIWMErr = -77; { unable to initialize IWM }
+ twoSideErr = -78; { tried to read 2nd side on a 1-sided drive }
+ spdAdjErr = -79; { unable to correctly adjust disk speed }
+ seekErr = -80; { track number wrong on address mark }
+ sectNFErr = -81; { sector number never found on a track }
+ fmt1Err = -82; { can't find sector 0 after track format }
+ fmt2Err = -83; { can't get enough sync }
+ verErr = -84; { track failed to verify }
+ clkRdErr = -85; { unable to read same clock value twice }
+ clkWrErr = -86; { time written did not verify }
+ prWrErr = -87; { parameter ram written didn't read-verify }
+ prInitErr = -88; { InitUtil found the parameter ram uninitialized }
+ rcvrErr = -89; { SCC receiver error (framing; parity; OR) }
+ breakRecd = -90; { Break received (SCC) }
+
+ { Scrap Manager errors }
+ noScrapErr = -100; { No scrap exists error }
+ noTypeErr = -102; { No object of that type in scrap }
+
+ { ENET error codes }
+ eLenErr = -92; { Length error ddpLenErr }
+ eMultiErr = -91; { Multicast address error ddpSktErr }
+
+ ddpSktErr = -91; { error in soket number }
+ ddpLenErr = -92; { data length too big }
+ noBridgeErr = -93; { no network bridge for non-local send }
+ lapProtErr = -94; { error in attaching/detaching protocol }
+ excessCollsns = -95; { excessive collisions on write }
+ portNotPwr = -96; { serial port not currently powered }
+ portInUse = -97; { driver Open error code (port is in use) }
+ portNotCf = -98; { driver Open error code (parameter RAM not configured for this connection) }
+
+ { Memory Manager errors }
+ memROZWarn = -99; { soft error in ROZ }
+ memROZError = -99; { hard error in ROZ }
+ memROZErr = -99; { hard error in ROZ }
+ memFullErr = -108; { Not enough room in heap zone }
+ nilHandleErr = -109; { Master Pointer was NIL in HandleZone or other }
+ memWZErr = -111; { WhichZone failed (applied to free block) }
+ memPurErr = -112; { trying to purge a locked or non-purgeable block }
+ memAdrErr = -110; { address was odd; or out of range }
+ memAZErr = -113; { Address in zone check failed }
+ memPCErr = -114; { Pointer Check failed }
+ memBCErr = -115; { Block Check failed }
+ memSCErr = -116; { Size Check failed }
+ memLockedErr = -117; { trying to move a locked block (MoveHHi) }
+
+ { Printing Errors }
+ iMemFullErr = -108;
+ iIOAbort = -27;
+
+
+ resourceInMemory = -188; { Resource already in memory }
+ writingPastEnd = -189; { Writing past end of file }
+ inputOutOfBounds = -190; { Offset of Count out of bounds }
+ resNotFound = -192; { Resource not found }
+ resFNotFound = -193; { Resource file not found }
+ addResFailed = -194; { AddResource failed }
+ addRefFailed = -195; { AddReference failed }
+ rmvResFailed = -196; { RmveResource failed }
+ rmvRefFailed = -197; { RmveReference failed }
+ resAttrErr = -198; { attribute inconsistent with operation }
+ mapReadErr = -199; { map inconsistent with operation }
+ CantDecompress = -186; { resource bent ("the bends") - can't decompress a compressed resource }
+ badExtResource = -185; { extended resource has a bad format. }
+ noMemForPictPlaybackErr = -145;
+ rgnOverflowErr = -147;
+ rgnTooBigError = -147;
+ pixMapTooDeepErr = -148;
+ insufficientStackErr = -149;
+ nsStackErr = -149;
+
+ evtNotEnb = 1; { event not enabled at PostEvent }
+
+ { OffScreen QuickDraw Errors }
+ cMatchErr = -150; { Color2Index failed to find an index }
+ cTempMemErr = -151; { failed to allocate memory for temporary structures }
+ cNoMemErr = -152; { failed to allocate memory for structure }
+ cRangeErr = -153; { range error on colorTable request }
+ cProtectErr = -154; { colorTable entry protection violation }
+ cDevErr = -155; { invalid type of graphics device }
+ cResErr = -156; { invalid resolution for MakeITable }
+ cDepthErr = -157; { invalid pixel depth }
+ rgnTooBigErr = -500;
+ updPixMemErr = -125; { insufficient memory to update a pixmap }
+ pictInfoVersionErr = -11000; { wrong version of the PictInfo structure }
+ pictInfoIDErr = -11001; { the internal consistancy check for the PictInfoID is wrong }
+ pictInfoVerbErr = -11002; { the passed verb was invalid }
+ cantLoadPickMethodErr = -11003; { unable to load the custom pick proc }
+ colorsRequestedErr = -11004; { the number of colors requested was illegal }
+ pictureDataErr = -11005; { the picture data was invalid }
+
+ { ColorSync Result codes }
+ { General Errors }
+ cmProfileError = -170;
+ cmMethodError = -171;
+ cmMethodNotFound = -175; { CMM not present }
+ cmProfileNotFound = -176; { Responder error }
+ cmProfilesIdentical = -177; { Profiles the same }
+ cmCantConcatenateError = -178; { Profile can't be concatenated }
+ cmCantXYZ = -179; { CMM cant handle XYZ space }
+ cmCantDeleteProfile = -180; { Responder error }
+ cmUnsupportedDataType = -181; { Responder error }
+ cmNoCurrentProfile = -182; { Responder error }
+
+
+ { Sound Manager errors }
+ noHardware = -200; { obsolete spelling }
+ notEnoughHardware = -201; { obsolete spelling }
+ queueFull = -203; { Sound Manager Error Returns }
+ resProblem = -204; { Sound Manager Error Returns }
+ badChannel = -205; { Sound Manager Error Returns }
+ badFormat = -206; { Sound Manager Error Returns }
+ notEnoughBufferSpace = -207; { could not allocate enough memory }
+ badFileFormat = -208; { was not type AIFF or was of bad format,corrupt }
+ channelBusy = -209; { the Channel is being used for a PFD already }
+ buffersTooSmall = -210; { can not operate in the memory allowed }
+ channelNotBusy = -211;
+ noMoreRealTime = -212; { not enough CPU cycles left to add another task }
+ siVBRCompressionNotSupported = -213; { vbr audio compression not supported for this operation }
+ siNoSoundInHardware = -220; { no Sound Input hardware }
+ siBadSoundInDevice = -221; { invalid index passed to SoundInGetIndexedDevice }
+ siNoBufferSpecified = -222; { returned by synchronous SPBRecord if nil buffer passed }
+ siInvalidCompression = -223; { invalid compression type }
+ siHardDriveTooSlow = -224; { hard drive too slow to record to disk }
+ siInvalidSampleRate = -225; { invalid sample rate }
+ siInvalidSampleSize = -226; { invalid sample size }
+ siDeviceBusyErr = -227; { input device already in use }
+ siBadDeviceName = -228; { input device could not be opened }
+ siBadRefNum = -229; { invalid input device reference number }
+ siInputDeviceErr = -230; { input device hardware failure }
+ siUnknownInfoType = -231; { invalid info type selector (returned by driver) }
+ siUnknownQuality = -232; { invalid quality selector (returned by driver) }
+
+ { Speech Manager errors }
+ noSynthFound = -240;
+ synthOpenFailed = -241;
+ synthNotReady = -242;
+ bufTooSmall = -243;
+ voiceNotFound = -244;
+ incompatibleVoice = -245;
+ badDictFormat = -246;
+ badInputText = -247;
+
+ { Midi Manager Errors: }
+ midiNoClientErr = -250; { no client with that ID found }
+ midiNoPortErr = -251; { no port with that ID found }
+ midiTooManyPortsErr = -252; { too many ports already installed in the system }
+ midiTooManyConsErr = -253; { too many connections made }
+ midiVConnectErr = -254; { pending virtual connection created }
+ midiVConnectMade = -255; { pending virtual connection resolved }
+ midiVConnectRmvd = -256; { pending virtual connection removed }
+ midiNoConErr = -257; { no connection exists between specified ports }
+ midiWriteErr = -258; { MIDIWritePacket couldn't write to all connected ports }
+ midiNameLenErr = -259; { name supplied is longer than 31 characters }
+ midiDupIDErr = -260; { duplicate client ID }
+ midiInvalidCmdErr = -261; { command not supported for port type }
+
+
+ nmTypErr = -299; { Notification Manager:wrong queue type }
+
+
+ siInitSDTblErr = 1; { slot int dispatch table could not be initialized. }
+ siInitVBLQsErr = 2; { VBLqueues for all slots could not be initialized. }
+ siInitSPTblErr = 3; { slot priority table could not be initialized. }
+ sdmJTInitErr = 10; { SDM Jump Table could not be initialized. }
+ sdmInitErr = 11; { SDM could not be initialized. }
+ sdmSRTInitErr = 12; { Slot Resource Table could not be initialized. }
+ sdmPRAMInitErr = 13; { Slot PRAM could not be initialized. }
+ sdmPriInitErr = 14; { Cards could not be initialized. }
+
+ smSDMInitErr = -290; { Error; SDM could not be initialized. }
+ smSRTInitErr = -291; { Error; Slot Resource Table could not be initialized. }
+ smPRAMInitErr = -292; { Error; Slot Resource Table could not be initialized. }
+ smPriInitErr = -293; { Error; Cards could not be initialized. }
+ smEmptySlot = -300; { No card in slot }
+ smCRCFail = -301; { CRC check failed for declaration data }
+ smFormatErr = -302; { FHeader Format is not Apple's }
+ smRevisionErr = -303; { Wrong revison level }
+ smNoDir = -304; { Directory offset is Nil }
+ smDisabledSlot = -305; { This slot is disabled (-305 use to be smLWTstBad) }
+ smNosInfoArray = -306; { No sInfoArray. Memory Mgr error. }
+
+
+ smResrvErr = -307; { Fatal reserved error. Resreved field <> 0. }
+ smUnExBusErr = -308; { Unexpected BusError }
+ smBLFieldBad = -309; { ByteLanes field was bad. }
+ smFHBlockRdErr = -310; { Error occurred during _sGetFHeader. }
+ smFHBlkDispErr = -311; { Error occurred during _sDisposePtr (Dispose of FHeader block). }
+ smDisposePErr = -312; { _DisposePointer error }
+ smNoBoardSRsrc = -313; { No Board sResource. }
+ smGetPRErr = -314; { Error occurred during _sGetPRAMRec (See SIMStatus). }
+ smNoBoardId = -315; { No Board Id. }
+ smInitStatVErr = -316; { The InitStatusV field was negative after primary or secondary init. }
+ smInitTblVErr = -317; { An error occurred while trying to initialize the Slot Resource Table. }
+ smNoJmpTbl = -318; { SDM jump table could not be created. }
+ smReservedSlot = -318; { slot is reserved, VM should not use this address space. }
+ smBadBoardId = -319; { BoardId was wrong; re-init the PRAM record. }
+ smBusErrTO = -320; { BusError time out. }
+ { These errors are logged in the vendor status field of the sInfo record. }
+ svTempDisable = -32768; { Temporarily disable card but run primary init. }
+ svDisabled = -32640; { Reserve range -32640 to -32768 for Apple temp disables. }
+ smBadRefId = -330; { Reference Id not found in List }
+ smBadsList = -331; { Bad sList: Id1 < Id2 < Id3 ...format is not followed. }
+ smReservedErr = -332; { Reserved field not zero }
+ smCodeRevErr = -333; { Code revision is wrong }
+
+ smCPUErr = -334; { Code revision is wrong }
+ smsPointerNil = -335; { LPointer is nil From sOffsetData. If this error occurs; check sInfo rec for more information. }
+ smNilsBlockErr = -336; { Nil sBlock error (Dont allocate and try to use a nil sBlock) }
+ smSlotOOBErr = -337; { Slot out of bounds error }
+ smSelOOBErr = -338; { Selector out of bounds error }
+ smNewPErr = -339; { _NewPtr error }
+ smBlkMoveErr = -340; { _BlockMove error }
+ smCkStatusErr = -341; { Status of slot = fail. }
+ smGetDrvrNamErr = -342; { Error occurred during _sGetDrvrName. }
+ smDisDrvrNamErr = -343; { Error occurred during _sDisDrvrName. }
+ smNoMoresRsrcs = -344; { No more sResources }
+ smsGetDrvrErr = -345; { Error occurred during _sGetDriver. }
+ smBadsPtrErr = -346; { Bad pointer was passed to sCalcsPointer }
+ smByteLanesErr = -347; { NumByteLanes was determined to be zero. }
+ smOffsetErr = -348; { Offset was too big (temporary error }
+ smNoGoodOpens = -349; { No opens were successfull in the loop. }
+ smSRTOvrFlErr = -350; { SRT over flow. }
+ smRecNotFnd = -351; { Record not found in the SRT. }
+
+
+ { Dictionary Manager errors }
+ notBTree = -410; { The file is not a dictionary. }
+ btNoSpace = -413; { Can't allocate disk space. }
+ btDupRecErr = -414; { Record already exists. }
+ btRecNotFnd = -415; { Record cannot be found. }
+ btKeyLenErr = -416; { Maximum key length is too long or equal to zero. }
+ btKeyAttrErr = -417; { There is no such a key attribute. }
+ unknownInsertModeErr = -20000; { There is no such an insert mode. }
+ recordDataTooBigErr = -20001; { The record data is bigger than buffer size (1024 bytes). }
+ invalidIndexErr = -20002; { The recordIndex parameter is not valid. }
+
+
+ {
+ * Error codes from FSM functions
+ }
+ fsmFFSNotFoundErr = -431; { Foreign File system does not exist - new Pack2 could return this error too }
+ fsmBusyFFSErr = -432; { File system is busy, cannot be removed }
+ fsmBadFFSNameErr = -433; { Name length not 1 <= length <= 31 }
+ fsmBadFSDLenErr = -434; { FSD size incompatible with current FSM vers }
+ fsmDuplicateFSIDErr = -435; { FSID already exists on InstallFS }
+ fsmBadFSDVersionErr = -436; { FSM version incompatible with FSD }
+ fsmNoAlternateStackErr = -437; { no alternate stack for HFS CI }
+ fsmUnknownFSMMessageErr = -438; { unknown message passed to FSM }
+
+
+ { Edition Mgr errors }
+ editionMgrInitErr = -450; { edition manager not inited by this app }
+ badSectionErr = -451; { not a valid SectionRecord }
+ notRegisteredSectionErr = -452; { not a registered SectionRecord }
+ badEditionFileErr = -453; { edition file is corrupt }
+ badSubPartErr = -454; { can not use sub parts in this release }
+ multiplePublisherWrn = -460; { A Publisher is already registered for that container }
+ containerNotFoundWrn = -461; { could not find editionContainer at this time }
+ containerAlreadyOpenWrn = -462; { container already opened by this section }
+ notThePublisherWrn = -463; { not the first registered publisher for that container }
+
+ teScrapSizeErr = -501; { scrap item too big for text edit record }
+ hwParamErr = -502; { bad selector for _HWPriv }
+ driverHardwareGoneErr = -503; { disk driver's hardware was disconnected }
+
+ { Process Manager errors }
+ procNotFound = -600; { no eligible process with specified descriptor }
+ memFragErr = -601; { not enough room to launch app w/special requirements }
+ appModeErr = -602; { memory mode is 32-bit, but app not 32-bit clean }
+ protocolErr = -603; { app made module calls in improper order }
+ hardwareConfigErr = -604; { hardware configuration not correct for call }
+ appMemFullErr = -605; { application SIZE not big enough for launch }
+ appIsDaemon = -606; { app is BG-only, and launch flags disallow this }
+ bufferIsSmall = -607; { error returns from Post and Accept }
+ noOutstandingHLE = -608;
+ connectionInvalid = -609;
+ noUserInteractionAllowed = -610; { no user interaction allowed }
+
+ { More Process Manager errors }
+ wrongApplicationPlatform = -875; { The application could not launch because the required platform is not available }
+ appVersionTooOld = -876; { The application's creator and version are incompatible with the current version of Mac OS. }
+ notAppropriateForClassic = -877; { This application won't or shouldn't run on Classic (Problem 2481058). }
+
+ { Thread Manager Error Codes }
+ threadTooManyReqsErr = -617;
+ threadNotFoundErr = -618;
+ threadProtocolErr = -619;
+
+ { MemoryDispatch errors }
+ notEnoughMemoryErr = -620; { insufficient physical memory }
+ notHeldErr = -621; { specified range of memory is not held }
+ cannotMakeContiguousErr = -622; { cannot make specified range contiguous }
+ notLockedErr = -623; { specified range of memory is not locked }
+ interruptsMaskedErr = -624; { donÕt call with interrupts masked }
+ cannotDeferErr = -625; { unable to defer additional functions }
+ noMMUErr = -626; { no MMU present }
+
+ { FileMapping errors }
+ vmInvalidBackingFileIDErr = -640; { invalid BackingFileID }
+ vmMappingPrivilegesErr = -641; { requested MappingPrivileges cannot be obtained }
+ vmBusyBackingFileErr = -642; { open views found on BackingFile }
+ vmNoMoreBackingFilesErr = -643; { no more BackingFiles were found }
+ vmInvalidFileViewIDErr = -644; { invalid FileViewID }
+ vmFileViewAccessErr = -645; { requested FileViewAccess cannot be obtained }
+ vmNoMoreFileViewsErr = -646; { no more FileViews were found }
+ vmAddressNotInFileViewErr = -647; { address is not in a FileView }
+ vmInvalidOwningProcessErr = -648; { current process does not own the BackingFileID or FileViewID }
+
+ { Database access error codes }
+ rcDBNull = -800;
+ rcDBValue = -801;
+ rcDBError = -802;
+ rcDBBadType = -803;
+ rcDBBreak = -804;
+ rcDBExec = -805;
+ rcDBBadSessID = -806;
+ rcDBBadSessNum = -807; { bad session number for DBGetConnInfo }
+ rcDBBadDDEV = -808; { bad ddev specified on DBInit }
+ rcDBAsyncNotSupp = -809; { ddev does not support async calls }
+ rcDBBadAsyncPB = -810; { tried to kill a bad pb }
+ rcDBNoHandler = -811; { no app handler for specified data type }
+ rcDBWrongVersion = -812; { incompatible versions }
+ rcDBPackNotInited = -813; { attempt to call other routine before InitDBPack }
+
+
+ { Help Mgr error range: -850 to -874 }
+ hmHelpDisabled = -850; { Show Balloons mode was off, call to routine ignored }
+ hmBalloonAborted = -853; { Returned if mouse was moving or mouse wasn't in window port rect }
+ hmSameAsLastBalloon = -854; { Returned from HMShowMenuBalloon if menu & item is same as last time }
+ hmHelpManagerNotInited = -855; { Returned from HMGetHelpMenuHandle if help menu not setup }
+ hmSkippedBalloon = -857; { Returned from calls if helpmsg specified a skip balloon }
+ hmWrongVersion = -858; { Returned if help mgr resource was the wrong version }
+ hmUnknownHelpType = -859; { Returned if help msg record contained a bad type }
+ hmOperationUnsupported = -861; { Returned from HMShowBalloon call if bad method passed to routine }
+ hmNoBalloonUp = -862; { Returned from HMRemoveBalloon if no balloon was visible when call was made }
+ hmCloseViewActive = -863; { Returned from HMRemoveBalloon if CloseView was active }
+
+
+ { PPC errors }
+ notInitErr = -900; { PPCToolBox not initialized }
+ nameTypeErr = -902; { Invalid or inappropriate locationKindSelector in locationName }
+ noPortErr = -903; { Unable to open port or bad portRefNum. If you're calling }
+ { AESend, this is because your application does not have }
+ { the isHighLevelEventAware bit set in your SIZE resource. }
+ noGlobalsErr = -904; { The system is hosed, better re-boot }
+ localOnlyErr = -905; { Network activity is currently disabled }
+ destPortErr = -906; { Port does not exist at destination }
+ sessTableErr = -907; { Out of session tables, try again later }
+ noSessionErr = -908; { Invalid session reference number }
+ badReqErr = -909; { bad parameter or invalid state for operation }
+ portNameExistsErr = -910; { port is already open (perhaps in another app) }
+ noUserNameErr = -911; { user name unknown on destination machine }
+ userRejectErr = -912; { Destination rejected the session request }
+ noMachineNameErr = -913; { user hasn't named his Macintosh in the Network Setup Control Panel }
+ noToolboxNameErr = -914; { A system resource is missing, not too likely }
+ noResponseErr = -915; { unable to contact destination }
+ portClosedErr = -916; { port was closed }
+ sessClosedErr = -917; { session was closed }
+ badPortNameErr = -919; { PPCPortRec malformed }
+ noDefaultUserErr = -922; { user hasn't typed in owners name in Network Setup Control Pannel }
+ notLoggedInErr = -923; { The default userRefNum does not yet exist }
+ noUserRefErr = -924; { unable to create a new userRefNum }
+ networkErr = -925; { An error has occurred in the network, not too likely }
+ noInformErr = -926; { PPCStart failed because destination did not have inform pending }
+ authFailErr = -927; { unable to authenticate user at destination }
+ noUserRecErr = -928; { Invalid user reference number }
+ badServiceMethodErr = -930; { illegal service type, or not supported }
+ badLocNameErr = -931; { location name malformed }
+ guestNotAllowedErr = -932; { destination port requires authentication }
+
+ { Font Mgr errors }
+ kFMIterationCompleted = -980;
+ kFMInvalidFontFamilyErr = -981;
+ kFMInvalidFontErr = -982;
+ kFMIterationScopeModifiedErr = -983;
+ kFMFontTableAccessErr = -984;
+ kFMFontContainerAccessErr = -985;
+
+ noMaskFoundErr = -1000; { Icon Utilties Error }
+
+ nbpBuffOvr = -1024; { Buffer overflow in LookupName }
+ nbpNoConfirm = -1025;
+ nbpConfDiff = -1026; { Name confirmed at different socket }
+ nbpDuplicate = -1027; { Duplicate name exists already }
+ nbpNotFound = -1028; { Name not found on remove }
+ nbpNISErr = -1029; { Error trying to open the NIS }
+
+ aspBadVersNum = -1066; { Server cannot support this ASP version }
+ aspBufTooSmall = -1067; { Buffer too small }
+ aspNoMoreSess = -1068; { No more sessions on server }
+ aspNoServers = -1069; { No servers at that address }
+ aspParamErr = -1070; { Parameter error }
+ aspServerBusy = -1071; { Server cannot open another session }
+ aspSessClosed = -1072; { Session closed }
+ aspSizeErr = -1073; { Command block too big }
+ aspTooMany = -1074; { Too many clients (server error) }
+ aspNoAck = -1075; { No ack on attention request (server err) }
+
+ reqFailed = -1096;
+ tooManyReqs = -1097;
+ tooManySkts = -1098;
+ badATPSkt = -1099;
+ badBuffNum = -1100;
+ noRelErr = -1101;
+ cbNotFound = -1102;
+ noSendResp = -1103;
+ noDataArea = -1104;
+ reqAborted = -1105;
+
+ { ADSP Error Codes }
+ { driver control ioResults }
+ errRefNum = -1280; { bad connection refNum }
+ errAborted = -1279; { control call was aborted }
+ errState = -1278; { bad connection state for this operation }
+ errOpening = -1277; { open connection request failed }
+ errAttention = -1276; { attention message too long }
+ errFwdReset = -1275; { read terminated by forward reset }
+ errDSPQueueSize = -1274; { DSP Read/Write Queue Too small }
+ errOpenDenied = -1273; { open connection request was denied }
+
+
+ { --------------------------------------------------------------
+ Apple event manager error messages
+ -------------------------------------------------------------- }
+
+ errAECoercionFail = -1700; { bad parameter data or unable to coerce the data supplied }
+ errAEDescNotFound = -1701;
+ errAECorruptData = -1702;
+ errAEWrongDataType = -1703;
+ errAENotAEDesc = -1704;
+ errAEBadListItem = -1705; { the specified list item does not exist }
+ errAENewerVersion = -1706; { need newer version of the AppleEvent manager }
+ errAENotAppleEvent = -1707; { the event is not in AppleEvent format }
+ errAEEventNotHandled = -1708; { the AppleEvent was not handled by any handler }
+ errAEReplyNotValid = -1709; { AEResetTimer was passed an invalid reply parameter }
+ errAEUnknownSendMode = -1710; { mode wasn't NoReply, WaitReply, or QueueReply or Interaction level is unknown }
+ errAEWaitCanceled = -1711; { in AESend, the user cancelled out of wait loop for reply or receipt }
+ errAETimeout = -1712; { the AppleEvent timed out }
+ errAENoUserInteraction = -1713; { no user interaction is allowed }
+ errAENotASpecialFunction = -1714; { there is no special function for/with this keyword }
+ errAEParamMissed = -1715; { a required parameter was not accessed }
+ errAEUnknownAddressType = -1716; { the target address type is not known }
+ errAEHandlerNotFound = -1717; { no handler in the dispatch tables fits the parameters to AEGetEventHandler or AEGetCoercionHandler }
+ errAEReplyNotArrived = -1718; { the contents of the reply you are accessing have not arrived yet }
+ errAEIllegalIndex = -1719; { index is out of range in a put operation }
+ errAEImpossibleRange = -1720; { A range like 3rd to 2nd, or 1st to all. }
+ errAEWrongNumberArgs = -1721; { Logical op kAENOT used with other than 1 term }
+ errAEAccessorNotFound = -1723; { Accessor proc matching wantClass and containerType or wildcards not found }
+ errAENoSuchLogical = -1725; { Something other than AND, OR, or NOT }
+ errAEBadTestKey = -1726; { Test is neither typeLogicalDescriptor nor typeCompDescriptor }
+ errAENotAnObjSpec = -1727; { Param to AEResolve not of type 'obj ' }
+ errAENoSuchObject = -1728; { e.g.,: specifier asked for the 3rd, but there are only 2. Basically, this indicates a run-time resolution error. }
+ errAENegativeCount = -1729; { CountProc returned negative value }
+ errAEEmptyListContainer = -1730; { Attempt to pass empty list as container to accessor }
+ errAEUnknownObjectType = -1731; { available only in version 1.0.1 or greater }
+ errAERecordingIsAlreadyOn = -1732; { available only in version 1.0.1 or greater }
+ errAEReceiveTerminate = -1733; { break out of all levels of AEReceive to the topmost (1.1 or greater) }
+ errAEReceiveEscapeCurrent = -1734; { break out of only lowest level of AEReceive (1.1 or greater) }
+ errAEEventFiltered = -1735; { event has been filtered, and should not be propogated (1.1 or greater) }
+ errAEDuplicateHandler = -1736; { attempt to install handler in table for identical class and id (1.1 or greater) }
+ errAEStreamBadNesting = -1737; { nesting violation while streaming }
+ errAEStreamAlreadyConverted = -1738; { attempt to convert a stream that has already been converted }
+ errAEDescIsNull = -1739; { attempting to perform an invalid operation on a null descriptor }
+ errAEBuildSyntaxError = -1740; { AEBuildDesc and friends detected a syntax error }
+ errAEBufferTooSmall = -1741; { buffer for AEFlattenDesc too small }
+
+ errOSASystemError = -1750;
+ errOSAInvalidID = -1751;
+ errOSABadStorageType = -1752;
+ errOSAScriptError = -1753;
+ errOSABadSelector = -1754;
+ errOSASourceNotAvailable = -1756;
+ errOSANoSuchDialect = -1757;
+ errOSADataFormatObsolete = -1758;
+ errOSADataFormatTooNew = -1759;
+ errOSACorruptData = -1702;
+ errOSARecordingIsAlreadyOn = -1732;
+ errOSAComponentMismatch = -1761; { Parameters are from 2 different components }
+ errOSACantOpenComponent = -1762; { Can't connect to scripting system with that ID }
+
+
+ { AppleEvent error definitions }
+ errOffsetInvalid = -1800;
+ errOffsetIsOutsideOfView = -1801;
+ errTopOfDocument = -1810;
+ errTopOfBody = -1811;
+ errEndOfDocument = -1812;
+ errEndOfBody = -1813;
+
+
+ { Drag Manager error codes }
+ badDragRefErr = -1850; { unknown drag reference }
+ badDragItemErr = -1851; { unknown drag item reference }
+ badDragFlavorErr = -1852; { unknown flavor type }
+ duplicateFlavorErr = -1853; { flavor type already exists }
+ cantGetFlavorErr = -1854; { error while trying to get flavor data }
+ duplicateHandlerErr = -1855; { handler already exists }
+ handlerNotFoundErr = -1856; { handler not found }
+ dragNotAcceptedErr = -1857; { drag was not accepted by receiver }
+ unsupportedForPlatformErr = -1858; { call is for PowerPC only }
+ noSuitableDisplaysErr = -1859; { no displays support translucency }
+ badImageRgnErr = -1860; { bad translucent image region }
+ badImageErr = -1861; { bad translucent image PixMap }
+ nonDragOriginatorErr = -1862; { illegal attempt at originator only data }
+
+
+ { QuickTime errors }
+ couldNotResolveDataRef = -2000;
+ badImageDescription = -2001;
+ badPublicMovieAtom = -2002;
+ cantFindHandler = -2003;
+ cantOpenHandler = -2004;
+ badComponentType = -2005;
+ noMediaHandler = -2006;
+ noDataHandler = -2007;
+ invalidMedia = -2008;
+ invalidTrack = -2009;
+ invalidMovie = -2010;
+ invalidSampleTable = -2011;
+ invalidDataRef = -2012;
+ invalidHandler = -2013;
+ invalidDuration = -2014;
+ invalidTime = -2015;
+ cantPutPublicMovieAtom = -2016;
+ badEditList = -2017;
+ mediaTypesDontMatch = -2018;
+ progressProcAborted = -2019;
+ movieToolboxUninitialized = -2020;
+ noRecordOfApp = -2020; { replica }
+ wfFileNotFound = -2021;
+ cantCreateSingleForkFile = -2022; { happens when file already exists }
+ invalidEditState = -2023;
+ nonMatchingEditState = -2024;
+ staleEditState = -2025;
+ userDataItemNotFound = -2026;
+ maxSizeToGrowTooSmall = -2027;
+ badTrackIndex = -2028;
+ trackIDNotFound = -2029;
+ trackNotInMovie = -2030;
+ timeNotInTrack = -2031;
+ timeNotInMedia = -2032;
+ badEditIndex = -2033;
+ internalQuickTimeError = -2034;
+ cantEnableTrack = -2035;
+ invalidRect = -2036;
+ invalidSampleNum = -2037;
+ invalidChunkNum = -2038;
+ invalidSampleDescIndex = -2039;
+ invalidChunkCache = -2040;
+ invalidSampleDescription = -2041;
+ dataNotOpenForRead = -2042;
+ dataNotOpenForWrite = -2043;
+ dataAlreadyOpenForWrite = -2044;
+ dataAlreadyClosed = -2045;
+ endOfDataReached = -2046;
+ dataNoDataRef = -2047;
+ noMovieFound = -2048;
+ invalidDataRefContainer = -2049;
+ badDataRefIndex = -2050;
+ noDefaultDataRef = -2051;
+ couldNotUseAnExistingSample = -2052;
+ featureUnsupported = -2053;
+ noVideoTrackInMovieErr = -2054; { QT for Windows error }
+ noSoundTrackInMovieErr = -2055; { QT for Windows error }
+ soundSupportNotAvailableErr = -2056; { QT for Windows error }
+ unsupportedAuxiliaryImportData = -2057;
+ auxiliaryExportDataUnavailable = -2058;
+ samplesAlreadyInMediaErr = -2059;
+ noSourceTreeFoundErr = -2060;
+ sourceNotFoundErr = -2061;
+ movieTextNotFoundErr = -2062;
+ missingRequiredParameterErr = -2063;
+ invalidSpriteWorldPropertyErr = -2064;
+ invalidSpritePropertyErr = -2065;
+ gWorldsNotSameDepthAndSizeErr = -2066;
+ invalidSpriteIndexErr = -2067;
+ invalidImageIndexErr = -2068;
+ invalidSpriteIDErr = -2069;
+
+ internalComponentErr = -2070;
+ notImplementedMusicOSErr = -2071;
+ cantSendToSynthesizerOSErr = -2072;
+ cantReceiveFromSynthesizerOSErr = -2073;
+ illegalVoiceAllocationOSErr = -2074;
+ illegalPartOSErr = -2075;
+ illegalChannelOSErr = -2076;
+ illegalKnobOSErr = -2077;
+ illegalKnobValueOSErr = -2078;
+ illegalInstrumentOSErr = -2079;
+ illegalControllerOSErr = -2080;
+ midiManagerAbsentOSErr = -2081;
+ synthesizerNotRespondingOSErr = -2082;
+ synthesizerOSErr = -2083;
+ illegalNoteChannelOSErr = -2084;
+ noteChannelNotAllocatedOSErr = -2085;
+ tunePlayerFullOSErr = -2086;
+ tuneParseOSErr = -2087;
+ noExportProcAvailableErr = -2089;
+ videoOutputInUseErr = -2090;
+
+ componentDllLoadErr = -2091; { Windows specific errors (when component is loading) }
+ componentDllEntryNotFoundErr = -2092; { Windows specific errors (when component is loading) }
+ qtmlDllLoadErr = -2093; { Windows specific errors (when qtml is loading) }
+ qtmlDllEntryNotFoundErr = -2094; { Windows specific errors (when qtml is loading) }
+ qtmlUninitialized = -2095;
+ unsupportedOSErr = -2096;
+ unsupportedProcessorErr = -2097;
+
+ cannotFindAtomErr = -2101;
+ notLeafAtomErr = -2102;
+ atomsNotOfSameTypeErr = -2103;
+ atomIndexInvalidErr = -2104;
+ duplicateAtomTypeAndIDErr = -2105;
+ invalidAtomErr = -2106;
+ invalidAtomContainerErr = -2107;
+ invalidAtomTypeErr = -2108;
+ cannotBeLeafAtomErr = -2109;
+ pathTooLongErr = -2110;
+ emptyPathErr = -2111;
+ noPathMappingErr = -2112;
+ pathNotVerifiedErr = -2113;
+ unknownFormatErr = -2114;
+ wackBadFileErr = -2115;
+ wackForkNotFoundErr = -2116;
+ wackBadMetaDataErr = -2117;
+ qfcbNotFoundErr = -2118;
+ qfcbNotCreatedErr = -2119;
+ AAPNotCreatedErr = -2120;
+ AAPNotFoundErr = -2121;
+ ASDBadHeaderErr = -2122;
+ ASDBadForkErr = -2123;
+ ASDEntryNotFoundErr = -2124;
+ fileOffsetTooBigErr = -2125;
+ notAllowedToSaveMovieErr = -2126;
+ qtNetworkAlreadyAllocatedErr = -2127;
+ urlDataHHTTPProtocolErr = -2129;
+ urlDataHHTTPNoNetDriverErr = -2130;
+ urlDataHHTTPURLErr = -2131;
+ urlDataHHTTPRedirectErr = -2132;
+ urlDataHFTPProtocolErr = -2133;
+ urlDataHFTPShutdownErr = -2134;
+ urlDataHFTPBadUserErr = -2135;
+ urlDataHFTPBadPasswordErr = -2136;
+ urlDataHFTPServerErr = -2137;
+ urlDataHFTPDataConnectionErr = -2138;
+ urlDataHFTPNoDirectoryErr = -2139;
+ urlDataHFTPQuotaErr = -2140;
+ urlDataHFTPPermissionsErr = -2141;
+ urlDataHFTPFilenameErr = -2142;
+ urlDataHFTPNoNetDriverErr = -2143;
+ urlDataHFTPBadNameListErr = -2144;
+ urlDataHFTPNeedPasswordErr = -2145;
+ urlDataHFTPNoPasswordErr = -2146;
+ urlDataHFTPServerDisconnectedErr = -2147;
+ urlDataHFTPURLErr = -2148;
+ notEnoughDataErr = -2149;
+ qtActionNotHandledErr = -2157;
+ qtXMLParseErr = -2158;
+ qtXMLApplicationErr = -2159;
+
+
+ digiUnimpErr = -2201; { feature unimplemented }
+ qtParamErr = -2202; { bad input parameter (out of range, etc) }
+ matrixErr = -2203; { bad matrix, digitizer did nothing }
+ notExactMatrixErr = -2204; { warning of bad matrix, digitizer did its best }
+ noMoreKeyColorsErr = -2205; { all key indexes in use }
+ notExactSizeErr = -2206; { CanÕt do exact size requested }
+ badDepthErr = -2207; { CanÕt digitize into this depth }
+ noDMAErr = -2208; { CanÕt do DMA digitizing (i.e. can't go to requested dest }
+ badCallOrderErr = -2209; { Usually due to a status call being called prior to being setup first }
+
+
+ { Kernel Error Codes }
+ kernelIncompleteErr = -2401;
+ kernelCanceledErr = -2402;
+ kernelOptionsErr = -2403;
+ kernelPrivilegeErr = -2404;
+ kernelUnsupportedErr = -2405;
+ kernelObjectExistsErr = -2406;
+ kernelWritePermissionErr = -2407;
+ kernelReadPermissionErr = -2408;
+ kernelExecutePermissionErr = -2409;
+ kernelDeletePermissionErr = -2410;
+ kernelExecutionLevelErr = -2411;
+ kernelAttributeErr = -2412;
+ kernelAsyncSendLimitErr = -2413;
+ kernelAsyncReceiveLimitErr = -2414;
+ kernelTimeoutErr = -2415;
+ kernelInUseErr = -2416;
+ kernelTerminatedErr = -2417;
+ kernelExceptionErr = -2418;
+ kernelIDErr = -2419;
+ kernelAlreadyFreeErr = -2421;
+ kernelReturnValueErr = -2422;
+ kernelUnrecoverableErr = -2499;
+
+
+ { Text Services Mgr error codes }
+ tsmComponentNoErr = 0; { component result = no error }
+ tsmUnsupScriptLanguageErr = -2500;
+ tsmInputMethodNotFoundErr = -2501;
+ tsmNotAnAppErr = -2502; { not an application error }
+ tsmAlreadyRegisteredErr = -2503; { want to register again error }
+ tsmNeverRegisteredErr = -2504; { app never registered error (not TSM aware) }
+ tsmInvalidDocIDErr = -2505; { invalid TSM documentation id }
+ tsmTSMDocBusyErr = -2506; { document is still active }
+ tsmDocNotActiveErr = -2507; { document is NOT active }
+ tsmNoOpenTSErr = -2508; { no open text service }
+ tsmCantOpenComponentErr = -2509; { canÕt open the component }
+ tsmTextServiceNotFoundErr = -2510; { no text service found }
+ tsmDocumentOpenErr = -2511; { there are open documents }
+ tsmUseInputWindowErr = -2512; { not TSM aware because we are using input window }
+ tsmTSHasNoMenuErr = -2513; { the text service has no menu }
+ tsmTSNotOpenErr = -2514; { text service is not open }
+ tsmComponentAlreadyOpenErr = -2515; { text service already opened for the document }
+ tsmInputMethodIsOldErr = -2516; { returned by GetDefaultInputMethod }
+ tsmScriptHasNoIMErr = -2517; { script has no imput method or is using old IM }
+ tsmUnsupportedTypeErr = -2518; { unSupported interface type error }
+ tsmUnknownErr = -2519; { any other errors }
+ tsmInvalidContext = -2520; { Invalid TSMContext specified in call }
+ tsmNoHandler = -2521; { No Callback Handler exists for callback }
+ tsmNoMoreTokens = -2522; { No more tokens are available for the source text }
+ tsmNoStem = -2523; { No stem exists for the token }
+ tsmDefaultIsNotInputMethodErr = -2524; { Current Input source is KCHR or uchr, not Input Method (GetDefaultInputMethod) }
+
+
+ { Mixed Mode error codes }
+ mmInternalError = -2526;
+
+ { NameRegistry error codes }
+ nrLockedErr = -2536;
+ nrNotEnoughMemoryErr = -2537;
+ nrInvalidNodeErr = -2538;
+ nrNotFoundErr = -2539;
+ nrNotCreatedErr = -2540;
+ nrNameErr = -2541;
+ nrNotSlotDeviceErr = -2542;
+ nrDataTruncatedErr = -2543;
+ nrPowerErr = -2544;
+ nrPowerSwitchAbortErr = -2545;
+ nrTypeMismatchErr = -2546;
+ nrNotModifiedErr = -2547;
+ nrOverrunErr = -2548;
+ nrResultCodeBase = -2549;
+ nrPathNotFound = -2550; { a path component lookup failed }
+ nrPathBufferTooSmall = -2551; { buffer for path is too small }
+ nrInvalidEntryIterationOp = -2552; { invalid entry iteration operation }
+ nrPropertyAlreadyExists = -2553; { property already exists }
+ nrIterationDone = -2554; { iteration operation is done }
+ nrExitedIteratorScope = -2555; { outer scope of iterator was exited }
+ nrTransactionAborted = -2556; { transaction was aborted }
+ nrCallNotSupported = -2557; { This call is not available or supported on this machine }
+
+ { Icon Services error codes }
+ invalidIconRefErr = -2580; { The icon ref is not valid }
+ noSuchIconErr = -2581; { The requested icon could not be found }
+ noIconDataAvailableErr = -2582; { The necessary icon data is not available }
+
+
+ {
+ Dynamic AppleScript errors:
+
+ These errors result from data-dependent conditions and are typically
+ signaled at runtime.
+ }
+ errOSACantCoerce = -1700; { Signaled when a value can't be coerced to the desired type. }
+ errOSACantAccess = -1728; { Signaled when an object is not found in a container }
+ errOSACantAssign = -10006; { Signaled when an object cannot be set in a container. }
+ errOSAGeneralError = -2700; { Signaled by user scripts or applications when no actual error code is to be returned. }
+ errOSADivideByZero = -2701; { Signaled when there is an attempt to divide by zero }
+ errOSANumericOverflow = -2702; { Signaled when SInt16 or real value is too large to be represented }
+ errOSACantLaunch = -2703; { Signaled when application can't be launched or when it is remote and program linking is not enabled }
+ errOSAAppNotHighLevelEventAware = -2704; { Signaled when an application can't respond to AppleEvents }
+ errOSACorruptTerminology = -2705; { Signaled when an application's terminology resource is not readable }
+ errOSAStackOverflow = -2706; { Signaled when the runtime stack overflows }
+ errOSAInternalTableOverflow = -2707; { Signaled when a runtime internal data structure overflows }
+ errOSADataBlockTooLarge = -2708; { Signaled when an intrinsic limitation is exceeded for the size of a value or data structure. }
+ errOSACantGetTerminology = -2709;
+ errOSACantCreate = -2710;
+
+ {
+ Component-specific dynamic script errors:
+
+ The range -2720 thru -2739 is reserved for component-specific runtime errors.
+ (Note that error codes from different scripting components in this range will
+ overlap.)
+ }
+ {
+ Static AppleScript errors:
+
+ These errors comprise what are commonly thought of as parse and compile-
+ time errors. However, in a dynamic system (e.g. AppleScript) any or all
+ of these may also occur at runtime.
+ }
+ errOSATypeError = -1703;
+ OSAMessageNotUnderstood = -1708; { Signaled when a message was sent to an object that didn't handle it }
+ OSAUndefinedHandler = -1717; { Signaled when a function to be returned doesn't exist. }
+ OSAIllegalAccess = -1723; { Signaled when a container can never have the requested object }
+ OSAIllegalIndex = -1719; { Signaled when index was out of range. Specialization of errOSACantAccess }
+ OSAIllegalRange = -1720; { Signaled when a range is screwy. Specialization of errOSACantAccess }
+ OSAIllegalAssign = -10003; { Signaled when an object can never be set in a container }
+ OSASyntaxError = -2740; { Signaled when a syntax error occurs. (e.g. "Syntax error" or "<this> can't go after <that>") }
+ OSASyntaxTypeError = -2741; { Signaled when another form of syntax was expected. (e.g. "expected a <type> but found <this>") }
+ OSATokenTooLong = -2742; { Signaled when a name or number is too long to be parsed }
+ OSAMissingParameter = -1701; { Signaled when a parameter is missing for a function invocation }
+ OSAParameterMismatch = -1721; { Signaled when function is called with the wrong number of parameters, or a parameter pattern cannot be matched }
+ OSADuplicateParameter = -2750; { Signaled when a formal parameter, local variable, or instance variable is specified more than once }
+ OSADuplicateProperty = -2751; { Signaled when a formal parameter, local variable, or instance variable is specified more than once. }
+ OSADuplicateHandler = -2752; { Signaled when more than one handler is defined with the same name in a scope where the language doesn't allow it }
+ OSAUndefinedVariable = -2753; { Signaled when a variable is accessed that has no value }
+ OSAInconsistentDeclarations = -2754; { Signaled when a variable is declared inconsistently in the same scope, such as both local and global }
+ OSAControlFlowError = -2755; { Signaled when illegal control flow occurs in an application (no catcher for throw, non-lexical loop exit, etc.) }
+
+ {
+ Component-specific AppleScript static errors:
+
+ The range -2760 thru -2779 is reserved for component-specific parsing and
+ compile-time errors. (Note that error codes from different scripting
+ components in this range will overlap.)
+ }
+ {
+ Dialect-specific AppleScript errors:
+
+ The range -2780 thru -2799 is reserved for dialect specific error codes for
+ scripting components that support dialects. (Note that error codes from
+ different scripting components in this range will overlap, as well as error
+ codes from different dialects in the same scripting component.)
+ }
+
+ { *************************************************************************
+ Apple Script Error Codes
+ ************************************************************************* }
+ { Runtime errors: }
+ errASCantConsiderAndIgnore = -2720;
+ errASCantCompareMoreThan32k = -2721; { Parser/Compiler errors: }
+ errASTerminologyNestingTooDeep = -2760;
+ errASIllegalFormalParameter = -2761;
+ errASParameterNotForEvent = -2762;
+ errASNoResultReturned = -2763; { The range -2780 thru -2799 is reserved for dialect specific error codes. (Error codes from different dialects may overlap.) }
+ errASInconsistentNames = -2780; { English errors: }
+
+
+ { The preferred spelling for Code Fragment Manager errors: }
+ cfragFirstErrCode = -2800; { The first value in the range of CFM errors. }
+ cfragContextIDErr = -2800; { The context ID was not valid. }
+ cfragConnectionIDErr = -2801; { The connection ID was not valid. }
+ cfragNoSymbolErr = -2802; { The specified symbol was not found. }
+ cfragNoSectionErr = -2803; { The specified section was not found. }
+ cfragNoLibraryErr = -2804; { The named library was not found. }
+ cfragDupRegistrationErr = -2805; { The registration name was already in use. }
+ cfragFragmentFormatErr = -2806; { A fragment's container format is unknown. }
+ cfragUnresolvedErr = -2807; { A fragment had "hard" unresolved imports. }
+ cfragNoPositionErr = -2808; { The registration insertion point was not found. }
+ cfragNoPrivateMemErr = -2809; { Out of memory for internal bookkeeping. }
+ cfragNoClientMemErr = -2810; { Out of memory for fragment mapping or section instances. }
+ cfragNoIDsErr = -2811; { No more CFM IDs for contexts, connections, etc. }
+ cfragInitOrderErr = -2812; { }
+ cfragImportTooOldErr = -2813; { An import library was too old for a client. }
+ cfragImportTooNewErr = -2814; { An import library was too new for a client. }
+ cfragInitLoopErr = -2815; { Circularity in required initialization order. }
+ cfragInitAtBootErr = -2816; { A boot library has an initialization function. (System 7 only) }
+ cfragLibConnErr = -2817; { }
+ cfragCFMStartupErr = -2818; { Internal error during CFM initialization. }
+ cfragCFMInternalErr = -2819; { An internal inconstistancy has been detected. }
+ cfragFragmentCorruptErr = -2820; { A fragment's container was corrupt (known format). }
+ cfragInitFunctionErr = -2821; { A fragment's initialization routine returned an error. }
+ cfragNoApplicationErr = -2822; { No application member found in the cfrg resource. }
+ cfragArchitectureErr = -2823; { A fragment has an unacceptable architecture. }
+ cfragFragmentUsageErr = -2824; { A semantic error in usage of the fragment. }
+ cfragFileSizeErr = -2825; { A file was too large to be mapped. }
+ cfragNotClosureErr = -2826; { The closure ID was actually a connection ID. }
+ cfragNoRegistrationErr = -2827; { The registration name was not found. }
+ cfragContainerIDErr = -2828; { The fragment container ID was not valid. }
+ cfragClosureIDErr = -2829; { The closure ID was not valid. }
+ cfragAbortClosureErr = -2830; { Used by notification handlers to abort a closure. }
+ cfragOutputLengthErr = -2831; { An output parameter is too small to hold the value. }
+ cfragLastErrCode = -2899; { The last value in the range of CFM errors. }
+
+{$ifc OLDROUTINENAMES}
+ { The old spelling for Code Fragment Manager errors, kept for compatibility: }
+ fragContextNotFound = -2800;
+ fragConnectionIDNotFound = -2801;
+ fragSymbolNotFound = -2802;
+ fragSectionNotFound = -2803;
+ fragLibNotFound = -2804;
+ fragDupRegLibName = -2805;
+ fragFormatUnknown = -2806;
+ fragHadUnresolveds = -2807;
+ fragNoMem = -2809;
+ fragNoAddrSpace = -2810;
+ fragNoContextIDs = -2811;
+ fragObjectInitSeqErr = -2812;
+ fragImportTooOld = -2813;
+ fragImportTooNew = -2814;
+ fragInitLoop = -2815;
+ fragInitRtnUsageErr = -2816;
+ fragLibConnErr = -2817;
+ fragMgrInitErr = -2818;
+ fragConstErr = -2819;
+ fragCorruptErr = -2820;
+ fragUserInitProcErr = -2821;
+ fragAppNotFound = -2822;
+ fragArchError = -2823;
+ fragInvalidFragmentUsage = -2824;
+ fragLastErrCode = -2899;
+
+{$endc} {OLDROUTINENAMES}
+
+ { Component Manager & component errors }
+ invalidComponentID = -3000;
+ validInstancesExist = -3001;
+ componentNotCaptured = -3002;
+ componentDontRegister = -3003;
+ unresolvedComponentDLLErr = -3004;
+ retryComponentRegistrationErr = -3005;
+
+ { Translation manager & Translation components }
+ invalidTranslationPathErr = -3025; { Source type to destination type not a valid path }
+ couldNotParseSourceFileErr = -3026; { Source document does not contain source type }
+ noTranslationPathErr = -3030;
+ badTranslationSpecErr = -3031;
+ noPrefAppErr = -3032;
+
+ buf2SmallErr = -3101;
+ noMPPErr = -3102;
+ ckSumErr = -3103;
+ extractErr = -3104;
+ readQErr = -3105;
+ atpLenErr = -3106;
+ atpBadRsp = -3107;
+ recNotFnd = -3108;
+ sktClosedErr = -3109;
+
+
+ { OpenTransport errors }
+ kOTNoError = 0; { No Error occurred }
+ kOTOutOfMemoryErr = -3211; { OT ran out of memory, may be a temporary }
+ kOTNotFoundErr = -3201; { OT generic not found error }
+ kOTDuplicateFoundErr = -3216; { OT generic duplicate found error }
+ kOTBadAddressErr = -3150; { XTI2OSStatus(TBADADDR) A Bad address was specified }
+ kOTBadOptionErr = -3151; { XTI2OSStatus(TBADOPT) A Bad option was specified }
+ kOTAccessErr = -3152; { XTI2OSStatus(TACCES) Missing access permission }
+ kOTBadReferenceErr = -3153; { XTI2OSStatus(TBADF) Bad provider reference }
+ kOTNoAddressErr = -3154; { XTI2OSStatus(TNOADDR) No address was specified }
+ kOTOutStateErr = -3155; { XTI2OSStatus(TOUTSTATE) Call issued in wrong state }
+ kOTBadSequenceErr = -3156; { XTI2OSStatus(TBADSEQ) Sequence specified does not exist }
+ kOTSysErrorErr = -3157; { XTI2OSStatus(TSYSERR) A system error occurred }
+ kOTLookErr = -3158; { XTI2OSStatus(TLOOK) An event occurred - call Look() }
+ kOTBadDataErr = -3159; { XTI2OSStatus(TBADDATA) An illegal amount of data was specified }
+ kOTBufferOverflowErr = -3160; { XTI2OSStatus(TBUFOVFLW) Passed buffer not big enough }
+ kOTFlowErr = -3161; { XTI2OSStatus(TFLOW) Provider is flow-controlled }
+ kOTNoDataErr = -3162; { XTI2OSStatus(TNODATA) No data available for reading }
+ kOTNoDisconnectErr = -3163; { XTI2OSStatus(TNODIS) No disconnect indication available }
+ kOTNoUDErrErr = -3164; { XTI2OSStatus(TNOUDERR) No Unit Data Error indication available }
+ kOTBadFlagErr = -3165; { XTI2OSStatus(TBADFLAG) A Bad flag value was supplied }
+ kOTNoReleaseErr = -3166; { XTI2OSStatus(TNOREL) No orderly release indication available }
+ kOTNotSupportedErr = -3167; { XTI2OSStatus(TNOTSUPPORT) Command is not supported }
+ kOTStateChangeErr = -3168; { XTI2OSStatus(TSTATECHNG) State is changing - try again later }
+ kOTNoStructureTypeErr = -3169; { XTI2OSStatus(TNOSTRUCTYPE) Bad structure type requested for OTAlloc }
+ kOTBadNameErr = -3170; { XTI2OSStatus(TBADNAME) A bad endpoint name was supplied }
+ kOTBadQLenErr = -3171; { XTI2OSStatus(TBADQLEN) A Bind to an in-use addr with qlen > 0 }
+ kOTAddressBusyErr = -3172; { XTI2OSStatus(TADDRBUSY) Address requested is already in use }
+ kOTIndOutErr = -3173; { XTI2OSStatus(TINDOUT) Accept failed because of pending listen }
+ kOTProviderMismatchErr = -3174; { XTI2OSStatus(TPROVMISMATCH) Tried to accept on incompatible endpoint }
+ kOTResQLenErr = -3175; { XTI2OSStatus(TRESQLEN) }
+ kOTResAddressErr = -3176; { XTI2OSStatus(TRESADDR) }
+ kOTQFullErr = -3177; { XTI2OSStatus(TQFULL) }
+ kOTProtocolErr = -3178; { XTI2OSStatus(TPROTO) An unspecified provider error occurred }
+ kOTBadSyncErr = -3179; { XTI2OSStatus(TBADSYNC) A synchronous call at interrupt time }
+ kOTCanceledErr = -3180; { XTI2OSStatus(TCANCELED) The command was cancelled }
+ kEPERMErr = -3200; { Permission denied }
+ kENOENTErr = -3201; { No such file or directory }
+ kENORSRCErr = -3202; { No such resource }
+ kEINTRErr = -3203; { Interrupted system service }
+ kEIOErr = -3204; { I/O error }
+ kENXIOErr = -3205; { No such device or address }
+ kEBADFErr = -3208; { Bad file number }
+ kEAGAINErr = -3210; { Try operation again later }
+ kENOMEMErr = -3211; { Not enough space }
+ kEACCESErr = -3212; { Permission denied }
+ kEFAULTErr = -3213; { Bad address }
+ kEBUSYErr = -3215; { Device or resource busy }
+ kEEXISTErr = -3216; { File exists }
+ kENODEVErr = -3218; { No such device }
+ kEINVALErr = -3221; { Invalid argument }
+ kENOTTYErr = -3224; { Not a character device }
+ kEPIPEErr = -3231; { Broken pipe }
+ kERANGEErr = -3233; { Message size too large for STREAM }
+ kEWOULDBLOCKErr = -3234; { Call would block, so was aborted }
+ kEDEADLKErr = -3234; { or a deadlock would occur }
+ kEALREADYErr = -3236; { }
+ kENOTSOCKErr = -3237; { Socket operation on non-socket }
+ kEDESTADDRREQErr = -3238; { Destination address required }
+ kEMSGSIZEErr = -3239; { Message too long }
+ kEPROTOTYPEErr = -3240; { Protocol wrong type for socket }
+ kENOPROTOOPTErr = -3241; { Protocol not available }
+ kEPROTONOSUPPORTErr = -3242; { Protocol not supported }
+ kESOCKTNOSUPPORTErr = -3243; { Socket type not supported }
+ kEOPNOTSUPPErr = -3244; { Operation not supported on socket }
+ kEADDRINUSEErr = -3247; { Address already in use }
+ kEADDRNOTAVAILErr = -3248; { Can't assign requested address }
+ kENETDOWNErr = -3249; { Network is down }
+ kENETUNREACHErr = -3250; { Network is unreachable }
+ kENETRESETErr = -3251; { Network dropped connection on reset }
+ kECONNABORTEDErr = -3252; { Software caused connection abort }
+ kECONNRESETErr = -3253; { Connection reset by peer }
+ kENOBUFSErr = -3254; { No buffer space available }
+ kEISCONNErr = -3255; { Socket is already connected }
+ kENOTCONNErr = -3256; { Socket is not connected }
+ kESHUTDOWNErr = -3257; { Can't send after socket shutdown }
+ kETOOMANYREFSErr = -3258; { Too many references: can't splice }
+ kETIMEDOUTErr = -3259; { Connection timed out }
+ kECONNREFUSEDErr = -3260; { Connection refused }
+ kEHOSTDOWNErr = -3263; { Host is down }
+ kEHOSTUNREACHErr = -3264; { No route to host }
+ kEPROTOErr = -3269; { ¥¥¥ fill out missing codes ¥¥¥ }
+ kETIMEErr = -3270; { }
+ kENOSRErr = -3271; { }
+ kEBADMSGErr = -3272; { }
+ kECANCELErr = -3273; { }
+ kENOSTRErr = -3274; { }
+ kENODATAErr = -3275; { }
+ kEINPROGRESSErr = -3276; { }
+ kESRCHErr = -3277; { }
+ kENOMSGErr = -3278; { }
+ kOTClientNotInittedErr = -3279; { }
+ kOTPortHasDiedErr = -3280; { }
+ kOTPortWasEjectedErr = -3281; { }
+ kOTBadConfigurationErr = -3282; { }
+ kOTConfigurationChangedErr = -3283; { }
+ kOTUserRequestedErr = -3284; { }
+ kOTPortLostConnection = -3285; { }
+
+
+ { Color Picker errors }
+ firstPickerError = -4000;
+ invalidPickerType = -4000;
+ requiredFlagsDontMatch = -4001;
+ pickerResourceError = -4002;
+ cantLoadPicker = -4003;
+ cantCreatePickerWindow = -4004;
+ cantLoadPackage = -4005;
+ pickerCantLive = -4006;
+ colorSyncNotInstalled = -4007;
+ badProfileError = -4008;
+ noHelpForItem = -4009;
+
+
+ { NSL error codes }
+ kNSL68kContextNotSupported = -4170; { no 68k allowed }
+ kNSLSchedulerError = -4171; { A custom thread routine encountered an error }
+ kNSLBadURLSyntax = -4172; { URL contains illegal characters }
+ kNSLNoCarbonLib = -4173;
+ kNSLUILibraryNotAvailable = -4174; { The NSL UI Library needs to be in the Extensions Folder }
+ kNSLNotImplementedYet = -4175;
+ kNSLErrNullPtrError = -4176;
+ kNSLSomePluginsFailedToLoad = -4177; { (one or more plugins failed to load, but at least one did load; this error isn't fatal) }
+ kNSLNullNeighborhoodPtr = -4178; { (client passed a null neighborhood ptr) }
+ kNSLNoPluginsForSearch = -4179; { (no plugins will respond to search request; bad protocol(s)?) }
+ kNSLSearchAlreadyInProgress = -4180; { (you can only have one ongoing search per clientRef) }
+ kNSLNoPluginsFound = -4181; { (manager didn't find any valid plugins to load) }
+ kNSLPluginLoadFailed = -4182; { (manager unable to load one of the plugins) }
+ kNSLBadProtocolTypeErr = -4183; { (client is trying to add a null protocol type) }
+ kNSLNullListPtr = -4184; { (client is trying to add items to a nil list) }
+ kNSLBadClientInfoPtr = -4185; { (nil ClientAsyncInfoPtr; no reference available) }
+ kNSLCannotContinueLookup = -4186; { (Can't continue lookup; error or bad state) }
+ kNSLBufferTooSmallForData = -4187; { (Client buffer too small for data from plugin) }
+ kNSLNoContextAvailable = -4188; { (ContinueLookup function ptr invalid) }
+ kNSLRequestBufferAlreadyInList = -4189;
+ kNSLInvalidPluginSpec = -4190;
+ kNSLNoSupportForService = -4191;
+ kNSLBadNetConnection = -4192;
+ kNSLBadDataTypeErr = -4193;
+ kNSLBadServiceTypeErr = -4194;
+ kNSLBadReferenceErr = -4195;
+ kNSLNoElementsInList = -4196;
+ kNSLInsufficientOTVer = -4197;
+ kNSLInsufficientSysVer = -4198;
+ kNSLNotInitialized = -4199;
+ kNSLInitializationFailed = -4200; { UNABLE TO INITIALIZE THE MANAGER!!!!! DO NOT CONTINUE!!!! }
+
+
+ { desktop printing error codes }
+ kDTPHoldJobErr = -4200;
+ kDTPStopQueueErr = -4201;
+ kDTPTryAgainErr = -4202;
+ kDTPAbortJobErr = 128;
+
+
+ { ColorSync Result codes }
+ { Profile Access Errors }
+ cmElementTagNotFound = -4200;
+ cmIndexRangeErr = -4201; { Tag index out of range }
+ cmCantDeleteElement = -4202;
+ cmFatalProfileErr = -4203;
+ cmInvalidProfile = -4204; { A Profile must contain a 'cs1 ' tag to be valid }
+ cmInvalidProfileLocation = -4205; { Operation not supported for this profile location }
+ cmCantCopyModifiedV1Profile = -4215; { Illegal to copy version 1 profiles that have been modified }
+ { Profile Search Errors }
+ cmInvalidSearch = -4206; { Bad Search Handle }
+ cmSearchError = -4207;
+ cmErrIncompatibleProfile = -4208; { Other ColorSync Errors }
+ cmInvalidColorSpace = -4209; { Profile colorspace does not match bitmap type }
+ cmInvalidSrcMap = -4210; { Source pix/bit map was invalid }
+ cmInvalidDstMap = -4211; { Destination pix/bit map was invalid }
+ cmNoGDevicesError = -4212; { Begin/End Matching -- no gdevices available }
+ cmInvalidProfileComment = -4213; { Bad Profile comment during drawpicture }
+ cmRangeOverFlow = -4214; { Color conversion warning that some output color values over/underflowed and were clipped }
+ cmNamedColorNotFound = -4216; { NamedColor not found }
+ cmCantGamutCheckError = -4217; { Gammut checking not supported by this ColorWorld }
+
+ { new Folder Manager error codes }
+ badFolderDescErr = -4270;
+ duplicateFolderDescErr = -4271;
+ noMoreFolderDescErr = -4272;
+ invalidFolderTypeErr = -4273;
+ duplicateRoutingErr = -4274;
+ routingNotFoundErr = -4275;
+ badRoutingSizeErr = -4276;
+
+
+ { Core Foundation errors }
+ coreFoundationUnknownErr = -4960;
+
+ { ScrapMgr error codes (CarbonLib 1.0 and later) }
+ internalScrapErr = -4988;
+ duplicateScrapFlavorErr = -4989;
+ badScrapRefErr = -4990;
+ processStateIncorrectErr = -4991;
+ scrapPromiseNotKeptErr = -4992;
+ noScrapPromiseKeeperErr = -4993;
+ nilScrapFlavorDataErr = -4994;
+ scrapFlavorFlagsMismatchErr = -4995;
+ scrapFlavorSizeMismatchErr = -4996;
+ illegalScrapFlavorFlagsErr = -4997;
+ illegalScrapFlavorTypeErr = -4998;
+ illegalScrapFlavorSizeErr = -4999;
+ scrapFlavorNotFoundErr = -102; { == noTypeErr }
+ needClearScrapErr = -100; { == noScrapErr }
+
+
+ { AFP Protocol Errors }
+ afpAccessDenied = -5000; { Insufficient access privileges for operation }
+ afpAuthContinue = -5001; { Further information required to complete AFPLogin call }
+ afpBadUAM = -5002; { Unknown user authentication method specified }
+ afpBadVersNum = -5003; { Unknown AFP protocol version number specified }
+ afpBitmapErr = -5004; { Bitmap contained bits undefined for call }
+ afpCantMove = -5005; { Move destination is offspring of source, or root was specified }
+ afpDenyConflict = -5006; { Specified open/deny modes conflict with current open modes }
+ afpDirNotEmpty = -5007; { Cannot delete non-empty directory }
+ afpDiskFull = -5008; { Insufficient free space on volume for operation }
+ afpEofError = -5009; { Read beyond logical end-of-file }
+ afpFileBusy = -5010; { Cannot delete an open file }
+ afpFlatVol = -5011; { Cannot create directory on specified volume }
+ afpItemNotFound = -5012; { Unknown UserName/UserID or missing comment/APPL entry }
+ afpLockErr = -5013; { Some or all of requested range is locked by another user }
+ afpMiscErr = -5014; { Unexpected error encountered during execution }
+ afpNoMoreLocks = -5015; { Maximum lock limit reached }
+ afpNoServer = -5016; { Server not responding }
+ afpObjectExists = -5017; { Specified destination file or directory already exists }
+ afpObjectNotFound = -5018; { Specified file or directory does not exist }
+ afpParmErr = -5019; { A specified parameter was out of allowable range }
+ afpRangeNotLocked = -5020; { Tried to unlock range that was not locked by user }
+ afpRangeOverlap = -5021; { Some or all of range already locked by same user }
+ afpSessClosed = -5022; { Session closed }
+ afpUserNotAuth = -5023; { No AFPLogin call has successfully been made for this session }
+ afpCallNotSupported = -5024; { Unsupported AFP call was made }
+ afpObjectTypeErr = -5025; { File/Directory specified where Directory/File expected }
+ afpTooManyFilesOpen = -5026; { Maximum open file count reached }
+ afpServerGoingDown = -5027; { Server is shutting down }
+ afpCantRename = -5028; { AFPRename cannot rename volume }
+ afpDirNotFound = -5029; { Unknown directory specified }
+ afpIconTypeError = -5030; { Icon size specified different from existing icon size }
+ afpVolLocked = -5031; { Volume is Read-Only }
+ afpObjectLocked = -5032; { Object is M/R/D/W inhibited }
+ afpContainsSharedErr = -5033; { the folder being shared contains a shared folder }
+ afpIDNotFound = -5034;
+ afpIDExists = -5035;
+ afpDiffVolErr = -5036;
+ afpCatalogChanged = -5037;
+ afpSameObjectErr = -5038;
+ afpBadIDErr = -5039;
+ afpPwdSameErr = -5040; { Someone tried to change their password to the same password on a mantadory password change }
+ afpPwdTooShortErr = -5041; { The password being set is too short: there is a minimum length that must be met or exceeded }
+ afpPwdExpiredErr = -5042; { The password being used is too old: this requires the user to change the password before log-in can continue }
+ afpInsideSharedErr = -5043; { The folder being shared is inside a shared folder OR the folder contains a shared folder and is being moved into a shared folder }
+ { OR the folder contains a shared folder and is being moved into the descendent of a shared folder. }
+ afpInsideTrashErr = -5044; { The folder being shared is inside the trash folder OR the shared folder is being moved into the trash folder }
+ { OR the folder is being moved to the trash and it contains a shared folder }
+ afpPwdNeedsChangeErr = -5045; { The password needs to be changed }
+ afpPwdPolicyErr = -5046; { Password does not conform to servers password policy }
+ afpAlreadyLoggedInErr = -5047; { User has been authenticated but is already logged in from another machine (and that's not allowed on this server) }
+ afpCallNotAllowed = -5048; { The server knows what you wanted to do, but won't let you do it just now }
+
+ { AppleShare Client Errors }
+ afpBadDirIDType = -5060;
+ afpCantMountMoreSrvre = -5061; { The Maximum number of server connections has been reached }
+ afpAlreadyMounted = -5062; { The volume is already mounted }
+ afpSameNodeErr = -5063; { An Attempt was made to connect to a file server running on the same machine }
+
+
+ { Text Engines, TSystemTextEngines, HIEditText error coded }
+
+ errUnknownAttributeTag = -5240;
+ errMarginWilllNotFit = -5241;
+ errNotInImagingMode = -5242;
+ errAlreadyInImagingMode = -5243;
+ errEngineNotFound = -5244;
+ errIteratorReachedEnd = -5245;
+ errInvalidRange = -5246;
+ errOffsetNotOnElementBounday = -5247;
+ errNoHiliteText = -5248;
+ errEmptyScrap = -5249;
+ errReadOnlyText = -5250;
+ errUnknownElement = -5251;
+ errNonContiuousAttribute = -5252;
+ errCannotUndo = -5253;
+
+
+ { HTMLRendering OSStaus codes }
+ hrHTMLRenderingLibNotInstalledErr = -5360;
+ hrMiscellaneousExceptionErr = -5361;
+ hrUnableToResizeHandleErr = -5362;
+ hrURLNotHandledErr = -5363;
+
+
+ { IAExtractor result codes }
+ errIANoErr = 0;
+ errIAUnknownErr = -5380;
+ errIAAllocationErr = -5381;
+ errIAParamErr = -5382;
+ errIANoMoreItems = -5383;
+ errIABufferTooSmall = -5384;
+ errIACanceled = -5385;
+ errIAInvalidDocument = -5386;
+ errIATextExtractionErr = -5387;
+ errIAEndOfTextRun = -5388;
+
+
+ { QuickTime Streaming Errors }
+ qtsBadSelectorErr = -5400;
+ qtsBadStateErr = -5401;
+ qtsBadDataErr = -5402; { something is wrong with the data }
+ qtsUnsupportedDataTypeErr = -5403;
+ qtsUnsupportedRateErr = -5404;
+ qtsUnsupportedFeatureErr = -5405;
+ qtsTooMuchDataErr = -5406;
+ qtsUnknownValueErr = -5407;
+ qtsTimeoutErr = -5408;
+ qtsConnectionFailedErr = -5420;
+ qtsAddressBusyErr = -5421;
+
+
+ { Gestalt error codes }
+ gestaltUnknownErr = -5550; { value returned if Gestalt doesn't know the answer }
+ gestaltUndefSelectorErr = -5551; { undefined selector was passed to Gestalt }
+ gestaltDupSelectorErr = -5552; { tried to add an entry that already existed }
+ gestaltLocationErr = -5553; { gestalt function ptr wasn't in sysheap }
+
+
+ { Menu Manager error codes }
+ menuPropertyInvalidErr = -5603; { invalid property creator }
+ menuPropertyInvalid = -5603; { "menuPropertyInvalid" is deprecated }
+ menuPropertyNotFoundErr = -5604; { specified property wasn't found }
+ menuNotFoundErr = -5620; { specified menu or menu ID wasn't found }
+ menuUsesSystemDefErr = -5621; { GetMenuDefinition failed because the menu uses the system MDEF }
+ menuItemNotFoundErr = -5622; { specified menu item wasn't found }
+ menuInvalidErr = -5623; { menu is invalid }
+
+
+ { Window Manager error codes }
+ errInvalidWindowPtr = -5600; { tried to pass a bad WindowRef argument }
+ errInvalidWindowRef = -5600; { tried to pass a bad WindowRef argument }
+ errUnsupportedWindowAttributesForClass = -5601; { tried to create a window with WindowAttributes not supported by the WindowClass }
+ errWindowDoesNotHaveProxy = -5602; { tried to do something requiring a proxy to a window which doesnÕt have a proxy }
+ errInvalidWindowProperty = -5603; { tried to access a property tag with private creator }
+ errWindowPropertyNotFound = -5604; { tried to get a nonexistent property }
+ errUnrecognizedWindowClass = -5605; { tried to create a window with a bad WindowClass }
+ errCorruptWindowDescription = -5606; { tried to load a corrupt window description (size or version fields incorrect) }
+ errUserWantsToDragWindow = -5607; { if returned from TrackWindowProxyDrag, you should call DragWindow on the window }
+ errWindowsAlreadyInitialized = -5608; { tried to call InitFloatingWindows twice, or called InitWindows and then floating windows }
+ errFloatingWindowsNotInitialized = -5609; { called HideFloatingWindows or ShowFloatingWindows without calling InitFloatingWindows }
+ errWindowNotFound = -5610; { returned from FindWindowOfClass }
+ errWindowDoesNotFitOnscreen = -5611; { ConstrainWindowToScreen could not make the window fit onscreen }
+ windowAttributeImmutableErr = -5612; { tried to change attributes which can't be changed }
+ windowAttributesConflictErr = -5613; { passed some attributes that are mutually exclusive }
+ windowManagerInternalErr = -5614; { something really weird happened inside the window manager }
+ windowWrongStateErr = -5615; { window is not in a state that is valid for the current action }
+ windowGroupInvalidErr = -5616; { WindowGroup is invalid }
+ windowAppModalStateAlreadyExistsErr = -5617; { we're already running this window modally }
+ windowNoAppModalStateErr = -5618; { there's no app modal state for the window }
+ errWindowDoesntSupportFocus = -30583;
+ errWindowRegionCodeInvalid = -30593;
+
+
+ { Dialog Mgr error codes }
+ dialogNoTimeoutErr = -5640;
+
+
+ { NavigationLib error codes }
+ kNavWrongDialogStateErr = -5694;
+ kNavWrongDialogClassErr = -5695;
+ kNavInvalidSystemConfigErr = -5696;
+ kNavCustomControlMessageFailedErr = -5697;
+ kNavInvalidCustomControlMessageErr = -5698;
+ kNavMissingKindStringErr = -5699;
+
+
+ { Collection Manager errors }
+ collectionItemLockedErr = -5750;
+ collectionItemNotFoundErr = -5751;
+ collectionIndexRangeErr = -5752;
+ collectionVersionErr = -5753;
+
+
+ { QuickTime Streaming Server Errors }
+ kQTSSUnknownErr = -6150;
+
+
+ { Display Manager error codes (-6220...-6269) }
+ kDMGenErr = -6220; { Unexpected Error }
+ { Mirroring-Specific Errors }
+ kDMMirroringOnAlready = -6221; { Returned by all calls that need mirroring to be off to do their thing. }
+ kDMWrongNumberOfDisplays = -6222; { Can only handle 2 displays for now. }
+ kDMMirroringBlocked = -6223; { DMBlockMirroring() has been called. }
+ kDMCantBlock = -6224; { Mirroring is already on, canÕt Block now (call DMUnMirror() first). }
+ kDMMirroringNotOn = -6225; { Returned by all calls that need mirroring to be on to do their thing. }
+ { Other Display Manager Errors }
+ kSysSWTooOld = -6226; { Missing critical pieces of System Software. }
+ kDMSWNotInitializedErr = -6227; { Required software not initialized (eg windowmanager or display mgr). }
+ kDMDriverNotDisplayMgrAwareErr = -6228; { Video Driver does not support display manager. }
+ kDMDisplayNotFoundErr = -6229; { Could not find item (will someday remove). }
+ kDMNotFoundErr = -6229; { Could not find item. }
+ kDMDisplayAlreadyInstalledErr = -6230; { Attempt to add an already installed display. }
+ kDMMainDisplayCannotMoveErr = -6231; { Trying to move main display (or a display mirrored to it) }
+ kDMNoDeviceTableclothErr = -6231; { obsolete }
+ kDMFoundErr = -6232; { Did not proceed because we found an item }
+
+
+ {
+ Language Analysis error codes
+ }
+ laTooSmallBufferErr = -6984; { output buffer is too small to store any result }
+ laEnvironmentBusyErr = -6985; { specified environment is used }
+ laEnvironmentNotFoundErr = -6986; { can't fint the specified environment }
+ laEnvironmentExistErr = -6987; { same name environment is already exists }
+ laInvalidPathErr = -6988; { path is not correct }
+ laNoMoreMorphemeErr = -6989; { nothing to read }
+ laFailAnalysisErr = -6990; { analysis failed }
+ laTextOverFlowErr = -6991; { text is too long }
+ laDictionaryNotOpenedErr = -6992; { the dictionary is not opened }
+ laDictionaryUnknownErr = -6993; { can't use this dictionary with this environment }
+ laDictionaryTooManyErr = -6994; { too many dictionaries }
+ laPropertyValueErr = -6995; { Invalid property value }
+ laPropertyUnknownErr = -6996; { the property is unknown to this environment }
+ laPropertyIsReadOnlyErr = -6997; { the property is read only }
+ laPropertyNotFoundErr = -6998; { can't find the property }
+ laPropertyErr = -6999; { Error in properties }
+ laEngineNotFoundErr = -7000; { can't find the engine }
+
+
+ kUSBNoErr = 0;
+ kUSBNoTran = 0;
+ kUSBNoDelay = 0;
+ kUSBPending = 1;
+
+ {
+
+ USB Hardware Errors
+ Note pipe stalls are communication
+ errors. The affected pipe can not
+ be used until USBClearPipeStallByReference
+ is used.
+ kUSBEndpointStallErr is returned in
+ response to a stall handshake
+ from a device. The device has to be
+ cleared before a USBClearPipeStallByReference
+ can be used.
+ }
+ kUSBNotSent2Err = -6901; { Transaction not sent }
+ kUSBNotSent1Err = -6902; { Transaction not sent }
+ kUSBBufUnderRunErr = -6903; { Host hardware failure on data out, PCI busy? }
+ kUSBBufOvrRunErr = -6904; { Host hardware failure on data in, PCI busy? }
+ kUSBRes2Err = -6905;
+ kUSBRes1Err = -6906;
+ kUSBUnderRunErr = -6907; { Less data than buffer }
+ kUSBOverRunErr = -6908; { Packet too large or more data than buffer }
+ kUSBWrongPIDErr = -6909; { Pipe stall, Bad or wrong PID }
+ kUSBPIDCheckErr = -6910; { Pipe stall, PID CRC error }
+ kUSBNotRespondingErr = -6911; { Pipe stall, No device, device hung }
+ kUSBEndpointStallErr = -6912; { Device didn't understand }
+ kUSBDataToggleErr = -6913; { Pipe stall, Bad data toggle }
+ kUSBBitstufErr = -6914; { Pipe stall, bitstuffing }
+ kUSBCRCErr = -6915; { Pipe stall, bad CRC }
+ kUSBLinkErr = -6916;
+
+
+ {
+
+ USB Manager Errors
+ }
+ kUSBQueueFull = -6948; { Internal queue maxxed }
+ kUSBNotHandled = -6987; { Notification was not handled (same as NotFound) }
+ kUSBUnknownNotification = -6949; { Notification type not defined }
+ kUSBBadDispatchTable = -6950; { Improper driver dispatch table }
+
+
+ { USB Services Errors }
+ kUSBPortDisabled = -6969; { The port you are attached to is disabled, use USBDeviceReset. }
+ kUSBQueueAborted = -6970; { Pipe zero stall cleared. }
+ kUSBTimedOut = -6971; { Transaction timed out. }
+ kUSBDeviceDisconnected = -6972; { Disconnected during suspend or reset }
+ kUSBDeviceNotSuspended = -6973; { device is not suspended for resume }
+ kUSBDeviceSuspended = -6974; { Device is suspended }
+ kUSBInvalidBuffer = -6975; { bad buffer, usually nil }
+ kUSBDevicePowerProblem = -6976; { Device has a power problem }
+ kUSBDeviceBusy = -6977; { Device is already being configured }
+ kUSBUnknownInterfaceErr = -6978; { Interface ref not recognised }
+ kUSBPipeStalledError = -6979; { Pipe has stalled, error needs to be cleared }
+ kUSBPipeIdleError = -6980; { Pipe is Idle, it will not accept transactions }
+ kUSBNoBandwidthError = -6981; { Not enough bandwidth available }
+ kUSBAbortedError = -6982; { Pipe aborted }
+ kUSBFlagsError = -6983; { Unused flags not zeroed }
+ kUSBCompletionError = -6984; { no completion routine specified }
+ kUSBPBLengthError = -6985; { pbLength too small }
+ kUSBPBVersionError = -6986; { Wrong pbVersion }
+ kUSBNotFound = -6987; { Not found }
+ kUSBOutOfMemoryErr = -6988; { Out of memory }
+ kUSBDeviceErr = -6989; { Device error }
+ kUSBNoDeviceErr = -6990; { No device }
+ kUSBAlreadyOpenErr = -6991; { Already open }
+ kUSBTooManyTransactionsErr = -6992; { Too many transactions }
+ kUSBUnknownRequestErr = -6993; { Unknown request }
+ kUSBRqErr = -6994; { Request error }
+ kUSBIncorrectTypeErr = -6995; { Incorrect type }
+ kUSBTooManyPipesErr = -6996; { Too many pipes }
+ kUSBUnknownPipeErr = -6997; { Pipe ref not recognised }
+ kUSBUnknownDeviceErr = -6998; { device ref not recognised }
+ kUSBInternalErr = -6999; { Internal error }
+
+
+ {
+ DictionaryMgr error codes
+ }
+ dcmParamErr = -7100; { bad parameter }
+ dcmNotDictionaryErr = -7101; { not dictionary }
+ dcmBadDictionaryErr = -7102; { invalid dictionary }
+ dcmPermissionErr = -7103; { invalid permission }
+ dcmDictionaryNotOpenErr = -7104; { dictionary not opened }
+ dcmDictionaryBusyErr = -7105; { dictionary is busy }
+ dcmBlockFullErr = -7107; { dictionary block full }
+ dcmNoRecordErr = -7108; { no such record }
+ dcmDupRecordErr = -7109; { same record already exist }
+ dcmNecessaryFieldErr = -7110; { lack required/identify field }
+ dcmBadFieldInfoErr = -7111; { incomplete information }
+ dcmBadFieldTypeErr = -7112; { no such field type supported }
+ dcmNoFieldErr = -7113; { no such field exist }
+ dcmBadKeyErr = -7115; { bad key information }
+ dcmTooManyKeyErr = -7116; { too many key field }
+ dcmBadDataSizeErr = -7117; { too big data size }
+ dcmBadFindMethodErr = -7118; { no such find method supported }
+ dcmBadPropertyErr = -7119; { no such property exist }
+ dcmProtectedErr = -7121; { need keyword to use dictionary }
+ dcmNoAccessMethodErr = -7122; { no such AccessMethod }
+ dcmBadFeatureErr = -7124; { invalid AccessMethod feature }
+ dcmIterationCompleteErr = -7126; { no more item in iterator }
+ dcmBufferOverflowErr = -7127; { data is larger than buffer size }
+
+
+ { Apple Remote Access error codes }
+ kRAInvalidParameter = -7100;
+ kRAInvalidPort = -7101;
+ kRAStartupFailed = -7102;
+ kRAPortSetupFailed = -7103;
+ kRAOutOfMemory = -7104;
+ kRANotSupported = -7105;
+ kRAMissingResources = -7106;
+ kRAIncompatiblePrefs = -7107;
+ kRANotConnected = -7108;
+ kRAConnectionCanceled = -7109;
+ kRAUnknownUser = -7110;
+ kRAInvalidPassword = -7111;
+ kRAInternalError = -7112;
+ kRAInstallationDamaged = -7113;
+ kRAPortBusy = -7114;
+ kRAUnknownPortState = -7115;
+ kRAInvalidPortState = -7116;
+ kRAInvalidSerialProtocol = -7117;
+ kRAUserLoginDisabled = -7118;
+ kRAUserPwdChangeRequired = -7119;
+ kRAUserPwdEntryRequired = -7120;
+ kRAUserInteractionRequired = -7121;
+ kRAInitOpenTransportFailed = -7122;
+ kRARemoteAccessNotReady = -7123;
+ kRATCPIPInactive = -7124; { TCP/IP inactive, cannot be loaded }
+ kRATCPIPNotConfigured = -7125; { TCP/IP not configured, could be loaded }
+ kRANotPrimaryInterface = -7126; { when IPCP is not primary TCP/IP intf. }
+ kRAConfigurationDBInitErr = -7127;
+ kRAPPPProtocolRejected = -7128;
+ kRAPPPAuthenticationFailed = -7129;
+ kRAPPPNegotiationFailed = -7130;
+ kRAPPPUserDisconnected = -7131;
+ kRAPPPPeerDisconnected = -7132;
+ kRAPeerNotResponding = -7133;
+ kRAATalkInactive = -7134;
+ kRAExtAuthenticationFailed = -7135;
+ kRANCPRejectedbyPeer = -7136;
+ kRADuplicateIPAddr = -7137;
+ kRACallBackFailed = -7138;
+ kRANotEnabled = -7139;
+
+
+ { ATSUnicode error codes }
+ kATSUInvalidTextLayoutErr = -8790; { An attempt was made to use a ATSUTextLayout }
+ { which hadn't been initialized or is otherwise }
+ { in an invalid state. }
+ kATSUInvalidStyleErr = -8791; { An attempt was made to use a ATSUStyle which }
+ { hadn't been properly allocated or is otherwise }
+ { in an invalid state. }
+ kATSUInvalidTextRangeErr = -8792; { An attempt was made to extract information }
+ { from or perform an operation on a ATSUTextLayout }
+ { for a range of text not covered by the ATSUTextLayout. }
+ kATSUFontsMatched = -8793; { This is not an error code but is returned by }
+ { ATSUMatchFontsToText() when changes need to }
+ { be made to the fonts associated with the text. }
+ kATSUFontsNotMatched = -8794; { This value is returned by ATSUMatchFontsToText() }
+ { when the text contains Unicode characters which }
+ { cannot be represented by any installed font. }
+ kATSUNoCorrespondingFontErr = -8795; { This value is retrned by font ID conversion }
+ { routines ATSUFONDtoFontID() and ATSUFontIDtoFOND() }
+ { to indicate that the input font ID is valid but }
+ { there is no conversion possible. For example, }
+ { data-fork fonts can only be used with ATSUI not }
+ { the FontManager, and so converting an ATSUIFontID }
+ { for such a font will fail. }
+ kATSUInvalidFontErr = -8796; { Used when an attempt was made to use an invalid font ID. }
+ kATSUInvalidAttributeValueErr = -8797; { Used when an attempt was made to use an attribute with }
+ { a bad or undefined value. }
+ kATSUInvalidAttributeSizeErr = -8798; { Used when an attempt was made to use an attribute with a }
+ { bad size. }
+ kATSUInvalidAttributeTagErr = -8799; { Used when an attempt was made to use a tag value that }
+ { was not appropriate for the function call it was used. }
+ kATSUInvalidCacheErr = -8800; { Used when an attempt was made to read in style data }
+ { from an invalid cache. Either the format of the }
+ { cached data doesn't match that used by Apple Type }
+ { Services for Unicodeª Imaging, or the cached data }
+ { is corrupt. }
+ kATSUNotSetErr = -8801; { Used when the client attempts to retrieve an attribute, }
+ { font feature, or font variation from a style when it }
+ { hadn't been set. In such a case, the default value will }
+ { be returned for the attribute's value. }
+ kATSUNoStyleRunsAssignedErr = -8802; { Used when an attempt was made to measure, highlight or draw }
+ { a ATSUTextLayout object that has no styleRuns associated with it. }
+ kATSUQuickDrawTextErr = -8803; { Used when QuickDraw Text encounters an error rendering or measuring }
+ { a line of ATSUI text. }
+ kATSULowLevelErr = -8804; { Used when an error was encountered within the low level ATS }
+ { mechanism performing an operation requested by ATSUI. }
+ kATSUNoFontCmapAvailableErr = -8805; { Used when no CMAP table can be accessed or synthesized for the }
+ { font passed into a SetAttributes Font call. }
+ kATSUNoFontScalerAvailableErr = -8806; { Used when no font scaler is available for the font passed }
+ { into a SetAttributes Font call. }
+ kATSUCoordinateOverflowErr = -8807; { Used to indicate the coordinates provided to an ATSUI routine caused }
+ { a coordinate overflow (i.e. > 32K). }
+ kATSULineBreakInWord = -8808; { This is not an error code but is returned by ATSUBreakLine to }
+ { indicate that the returned offset is within a word since there was }
+ { only less than one word that could fit the requested width. }
+ kATSUBusyObjectErr = -8809; { An ATSUI object is being used by another thread }
+ kATSUInvalidFontFallbacksErr = -8810; { An attempt was made to use a ATSUFontFallbacks }
+ { which hadn't been initialized or is otherwise }
+ { in an invalid state. }
+ kATSULastErr = -8811; { The last ATSUI error code. }
+
+
+ { Error & status codes for general text and text encoding conversion }
+
+ { general text errors }
+ kTextUnsupportedEncodingErr = -8738; { specified encoding not supported for this operation }
+ kTextMalformedInputErr = -8739; { in DBCS, for example, high byte followed by invalid low byte }
+ kTextUndefinedElementErr = -8740; { text conversion errors }
+ kTECMissingTableErr = -8745;
+ kTECTableChecksumErr = -8746;
+ kTECTableFormatErr = -8747;
+ kTECCorruptConverterErr = -8748; { invalid converter object reference }
+ kTECNoConversionPathErr = -8749;
+ kTECBufferBelowMinimumSizeErr = -8750; { output buffer too small to allow processing of first input text element }
+ kTECArrayFullErr = -8751; { supplied name buffer or TextRun, TextEncoding, or UnicodeMapping array is too small }
+ kTECBadTextRunErr = -8752;
+ kTECPartialCharErr = -8753; { input buffer ends in the middle of a multibyte character, conversion stopped }
+ kTECUnmappableElementErr = -8754;
+ kTECIncompleteElementErr = -8755; { text element may be incomplete or is too long for internal buffers }
+ kTECDirectionErr = -8756; { direction stack overflow, etc. }
+ kTECGlobalsUnavailableErr = -8770; { globals have already been deallocated (premature TERM) }
+ kTECItemUnavailableErr = -8771; { item (e.g. name) not available for specified region (& encoding if relevant) }
+ { text conversion status codes }
+ kTECUsedFallbacksStatus = -8783;
+ kTECNeedFlushStatus = -8784;
+ kTECOutputBufferFullStatus = -8785; { output buffer has no room for conversion of next input text element (partial conversion) }
+ { deprecated error & status codes for low-level converter }
+ unicodeChecksumErr = -8769;
+ unicodeNoTableErr = -8768;
+ unicodeVariantErr = -8767;
+ unicodeFallbacksErr = -8766;
+ unicodePartConvertErr = -8765;
+ unicodeBufErr = -8764;
+ unicodeCharErr = -8763;
+ unicodeElementErr = -8762;
+ unicodeNotFoundErr = -8761;
+ unicodeTableFormatErr = -8760;
+ unicodeDirectionErr = -8759;
+ unicodeContextualErr = -8758;
+ unicodeTextEncodingDataErr = -8757;
+
+
+ { UTCUtils Status Codes }
+ kUTCUnderflowErr = -8850;
+ kUTCOverflowErr = -8851;
+ kIllegalClockValueErr = -8852;
+
+
+ codecErr = -8960;
+ noCodecErr = -8961;
+ codecUnimpErr = -8962;
+ codecSizeErr = -8963;
+ codecScreenBufErr = -8964;
+ codecImageBufErr = -8965;
+ codecSpoolErr = -8966;
+ codecAbortErr = -8967;
+ codecWouldOffscreenErr = -8968;
+ codecBadDataErr = -8969;
+ codecDataVersErr = -8970;
+ codecExtensionNotFoundErr = -8971;
+ scTypeNotFoundErr = -8971;
+ codecConditionErr = -8972;
+ codecOpenErr = -8973;
+ codecCantWhenErr = -8974;
+ codecCantQueueErr = -8975;
+ codecNothingToBlitErr = -8976;
+ codecNoMemoryPleaseWaitErr = -8977;
+ codecDisabledErr = -8978; { codec disabled itself -- pass codecFlagReenable to reset }
+ codecNeedToFlushChainErr = -8979;
+ lockPortBitsBadSurfaceErr = -8980;
+ lockPortBitsWindowMovedErr = -8981;
+ lockPortBitsWindowResizedErr = -8982;
+ lockPortBitsWindowClippedErr = -8983;
+ lockPortBitsBadPortErr = -8984;
+ lockPortBitsSurfaceLostErr = -8985;
+ codecParameterDialogConfirm = -8986;
+ codecNeedAccessKeyErr = -8987; { codec needs password in order to decompress }
+ codecOffscreenFailedErr = -8988;
+ codecDroppedFrameErr = -8989; { returned from ImageCodecDrawBand }
+ directXObjectAlreadyExists = -8990;
+ lockPortBitsWrongGDeviceErr = -8991;
+ codecOffscreenFailedPleaseRetryErr = -8992;
+
+
+ { PCCard error codes }
+ kBadAdapterErr = -9050; { invalid adapter number }
+ kBadAttributeErr = -9051; { specified attributes field value is invalid }
+ kBadBaseErr = -9052; { specified base system memory address is invalid }
+ kBadEDCErr = -9053; { specified EDC generator specified is invalid }
+ kBadIRQErr = -9054; { specified IRQ level is invalid }
+ kBadOffsetErr = -9055; { specified PC card memory array offset is invalid }
+ kBadPageErr = -9056; { specified page is invalid }
+ kBadSizeErr = -9057; { specified size is invalid }
+ kBadSocketErr = -9058; { specified logical or physical socket number is invalid }
+ kBadTypeErr = -9059; { specified window or interface type is invalid }
+ kBadVccErr = -9060; { specified Vcc power level index is invalid }
+ kBadVppErr = -9061; { specified Vpp1 or Vpp2 power level index is invalid }
+ kBadWindowErr = -9062; { specified window is invalid }
+ kBadArgLengthErr = -9063; { ArgLength argument is invalid }
+ kBadArgsErr = -9064; { values in argument packet are invalid }
+ kBadHandleErr = -9065; { clientHandle is invalid }
+ kBadCISErr = -9066; { CIS on card is invalid }
+ kBadSpeedErr = -9067; { specified speed is unavailable }
+ kReadFailureErr = -9068; { unable to complete read request }
+ kWriteFailureErr = -9069; { unable to complete write request }
+ kGeneralFailureErr = -9070; { an undefined error has occurred }
+ kNoCardErr = -9071; { no PC card in the socket }
+ kUnsupportedFunctionErr = -9072; { function is not supported by this implementation }
+ kUnsupportedModeErr = -9073; { mode is not supported }
+ kBusyErr = -9074; { unable to process request at this time - try later }
+ kWriteProtectedErr = -9075; { media is write-protected }
+ kConfigurationLockedErr = -9076; { a configuration has already been locked }
+ kInUseErr = -9077; { requested resource is being used by a client }
+ kNoMoreItemsErr = -9078; { there are no more of the requested item }
+ kOutOfResourceErr = -9079; { Card Services has exhausted the resource }
+ kNoCardSevicesSocketsErr = -9080;
+ kInvalidRegEntryErr = -9081;
+ kBadLinkErr = -9082;
+ kBadDeviceErr = -9083;
+ k16BitCardErr = -9084;
+ kCardBusCardErr = -9085;
+ kPassCallToChainErr = -9086;
+ kCantConfigureCardErr = -9087;
+ kPostCardEventErr = -9088; { _PCCSLPostCardEvent failed and dropped an event }
+ kInvalidDeviceNumber = -9089;
+ kUnsupportedVsErr = -9090; { Unsupported Voltage Sense }
+ kInvalidCSClientErr = -9091; { Card Services ClientID is not registered }
+ kBadTupleDataErr = -9092; { Data in tuple is invalid }
+ kBadCustomIFIDErr = -9093; { Custom interface ID is invalid }
+ kNoIOWindowRequestedErr = -9094; { Request I/O window before calling configuration }
+ kNoMoreTimerClientsErr = -9095; { All timer callbacks are in use }
+ kNoMoreInterruptSlotsErr = -9096; { All internal Interrupt slots are in use }
+ kNoClientTableErr = -9097; { The client table has not be initialized yet }
+ kUnsupportedCardErr = -9098; { Card not supported by generic enabler }
+ kNoCardEnablersFoundErr = -9099; { No Enablers were found }
+ kNoEnablerForCardErr = -9100; { No Enablers were found that can support the card }
+ kNoCompatibleNameErr = -9101; { There is no compatible driver name for this device }
+ kClientRequestDenied = -9102; { CS Clients should return this code inorder to }
+ { deny a request-type CS Event }
+ kNotReadyErr = -9103; { PC Card failed to go ready }
+ kTooManyIOWindowsErr = -9104; { device requested more than one I/O window }
+ kAlreadySavedStateErr = -9105; { The state has been saved on previous call }
+ kAttemptDupCardEntryErr = -9106; { The Enabler was asked to create a duplicate card entry }
+ kCardPowerOffErr = -9107; { Power to the card has been turned off }
+ kNotZVCapableErr = -9108; { This socket does not support Zoomed Video }
+ kNoCardBusCISErr = -9109; { No valid CIS exists for this CardBus card }
+
+
+ noDeviceForChannel = -9400;
+ grabTimeComplete = -9401;
+ cantDoThatInCurrentMode = -9402;
+ notEnoughMemoryToGrab = -9403;
+ notEnoughDiskSpaceToGrab = -9404;
+ couldntGetRequiredComponent = -9405;
+ badSGChannel = -9406;
+ seqGrabInfoNotAvailable = -9407;
+ deviceCantMeetRequest = -9408;
+ badControllerHeight = -9994;
+ editingNotAllowed = -9995;
+ controllerBoundsNotExact = -9996;
+ cannotSetWidthOfAttachedController = -9997;
+ controllerHasFixedHeight = -9998;
+ cannotMoveAttachedController = -9999;
+
+ { AERegistry Errors }
+ errAEBadKeyForm = -10002;
+ errAECantHandleClass = -10010;
+ errAECantSupplyType = -10009;
+ errAECantUndo = -10015;
+ errAEEventFailed = -10000;
+ errAEIndexTooLarge = -10007;
+ errAEInTransaction = -10011;
+ errAELocalOnly = -10016;
+ errAENoSuchTransaction = -10012;
+ errAENotAnElement = -10008;
+ errAENotASingleObject = -10014;
+ errAENotModifiable = -10003;
+ errAENoUserSelection = -10013;
+ errAEPrivilegeError = -10004;
+ errAEReadDenied = -10005;
+ errAETypeError = -10001;
+ errAEWriteDenied = -10006;
+ errAENotAnEnumMember = -10023; { enumerated value in SetData is not allowed for this property }
+ errAECantPutThatThere = -10024; { in make new, duplicate, etc. class can't be an element of container }
+ errAEPropertiesClash = -10025; { illegal combination of properties settings for Set Data, make new, or duplicate }
+
+ { TELErr }
+ telGenericError = -1;
+ telNoErr = 0;
+ telNoTools = 8; { no telephone tools found in extension folder }
+ telBadTermErr = -10001; { invalid TELHandle or handle not found }
+ telBadDNErr = -10002; { TELDNHandle not found or invalid }
+ telBadCAErr = -10003; { TELCAHandle not found or invalid }
+ telBadHandErr = -10004; { bad handle specified }
+ telBadProcErr = -10005; { bad msgProc specified }
+ telCAUnavail = -10006; { a CA is not available }
+ telNoMemErr = -10007; { no memory to allocate handle }
+ telNoOpenErr = -10008; { unable to open terminal }
+ telBadHTypeErr = -10010; { bad hook type specified }
+ telHTypeNotSupp = -10011; { hook type not supported by this tool }
+ telBadLevelErr = -10012; { bad volume level setting }
+ telBadVTypeErr = -10013; { bad volume type error }
+ telVTypeNotSupp = -10014; { volume type not supported by this tool }
+ telBadAPattErr = -10015; { bad alerting pattern specified }
+ telAPattNotSupp = -10016; { alerting pattern not supported by tool }
+ telBadIndex = -10017; { bad index specified }
+ telIndexNotSupp = -10018; { index not supported by this tool }
+ telBadStateErr = -10019; { bad device state specified }
+ telStateNotSupp = -10020; { device state not supported by tool }
+ telBadIntExt = -10021; { bad internal external error }
+ telIntExtNotSupp = -10022; { internal external type not supported by this tool }
+ telBadDNDType = -10023; { bad DND type specified }
+ telDNDTypeNotSupp = -10024; { DND type is not supported by this tool }
+ telFeatNotSub = -10030; { feature not subscribed }
+ telFeatNotAvail = -10031; { feature subscribed but not available }
+ telFeatActive = -10032; { feature already active }
+ telFeatNotSupp = -10033; { feature program call not supported by this tool }
+ telConfLimitErr = -10040; { limit specified is too high for this configuration }
+ telConfNoLimit = -10041; { no limit was specified but required }
+ telConfErr = -10042; { conference was not prepared }
+ telConfRej = -10043; { conference request was rejected }
+ telTransferErr = -10044; { transfer not prepared }
+ telTransferRej = -10045; { transfer request rejected }
+ telCBErr = -10046; { call back feature not set previously }
+ telConfLimitExceeded = -10047; { attempt to exceed switch conference limits }
+ telBadDNType = -10050; { DN type invalid }
+ telBadPageID = -10051; { bad page ID specified }
+ telBadIntercomID = -10052; { bad intercom ID specified }
+ telBadFeatureID = -10053; { bad feature ID specified }
+ telBadFwdType = -10054; { bad fwdType specified }
+ telBadPickupGroupID = -10055; { bad pickup group ID specified }
+ telBadParkID = -10056; { bad park id specified }
+ telBadSelect = -10057; { unable to select or deselect DN }
+ telBadBearerType = -10058; { bad bearerType specified }
+ telBadRate = -10059; { bad rate specified }
+ telDNTypeNotSupp = -10060; { DN type not supported by tool }
+ telFwdTypeNotSupp = -10061; { forward type not supported by tool }
+ telBadDisplayMode = -10062; { bad display mode specified }
+ telDisplayModeNotSupp = -10063; { display mode not supported by tool }
+ telNoCallbackRef = -10064; { no call back reference was specified, but is required }
+ telAlreadyOpen = -10070; { terminal already open }
+ telStillNeeded = -10071; { terminal driver still needed by someone else }
+ telTermNotOpen = -10072; { terminal not opened via TELOpenTerm }
+ telCANotAcceptable = -10080; { CA not "acceptable" }
+ telCANotRejectable = -10081; { CA not "rejectable" }
+ telCANotDeflectable = -10082; { CA not "deflectable" }
+ telPBErr = -10090; { parameter block error, bad format }
+ telBadFunction = -10091; { bad msgCode specified }
+ { telNoTools = -10101, unable to find any telephone tools }
+ telNoSuchTool = -10102; { unable to find tool with name specified }
+ telUnknownErr = -10103; { unable to set config }
+ telNoCommFolder = -10106; { Communications/Extensions Ä not found }
+ telInitFailed = -10107; { initialization failed }
+ telBadCodeResource = -10108; { code resource not found }
+ telDeviceNotFound = -10109; { device not found }
+ telBadProcID = -10110; { invalid procID }
+ telValidateFailed = -10111; { telValidate failed }
+ telAutoAnsNotOn = -10112; { autoAnswer in not turned on }
+ telDetAlreadyOn = -10113; { detection is already turned on }
+ telBadSWErr = -10114; { Software not installed properly }
+ telBadSampleRate = -10115; { incompatible sample rate }
+ telNotEnoughdspBW = -10116; { not enough real-time for allocation }
+
+ errTaskNotFound = -10780; { no task with that task id exists }
+
+
+ { Video driver Errorrs -10930 to -10959 }
+ { Defined in video.h. }
+
+ { Power Manager Errors }
+ pmBusyErr = -13000; { Power Mgr never ready to start handshake }
+ pmReplyTOErr = -13001; { Timed out waiting for reply }
+ pmSendStartErr = -13002; { during send, pmgr did not start hs }
+ pmSendEndErr = -13003; { during send, pmgr did not finish hs }
+ pmRecvStartErr = -13004; { during receive, pmgr did not start hs }
+ pmRecvEndErr = -13005; { during receive, pmgr did not finish hs configured for this connection }
+
+ { Power Manager 2.0 Errors }
+ kPowerHandlerExistsForDeviceErr = -13006;
+ kPowerHandlerNotFoundForDeviceErr = -13007;
+ kPowerHandlerNotFoundForProcErr = -13008;
+ kPowerMgtMessageNotHandled = -13009;
+ kPowerMgtRequestDenied = -13010;
+ kCantReportProcessorTemperatureErr = -13013;
+ kProcessorTempRoutineRequiresMPLib2 = -13014;
+ kNoSuchPowerSource = -13020;
+ kBridgeSoftwareRunningCantSleep = -13038;
+
+
+ { Debugging library errors }
+ debuggingExecutionContextErr = -13880; { routine cannot be called at this time }
+ debuggingDuplicateSignatureErr = -13881; { componentSignature already registered }
+ debuggingDuplicateOptionErr = -13882; { optionSelectorNum already registered }
+ debuggingInvalidSignatureErr = -13883; { componentSignature not registered }
+ debuggingInvalidOptionErr = -13884; { optionSelectorNum is not registered }
+ debuggingInvalidNameErr = -13885; { componentName or optionName is invalid (NULL) }
+ debuggingNoCallbackErr = -13886; { debugging component has no callback }
+ debuggingNoMatchErr = -13887; { debugging component or option not found at this index }
+
+
+ { HID device driver error codes }
+ kHIDVersionIncompatibleErr = -13909;
+ kHIDDeviceNotReady = -13910; { The device is still initializing, try again later }
+
+
+ { HID error codes }
+ kHIDSuccess = 0;
+ kHIDInvalidRangePageErr = -13923;
+ kHIDReportIDZeroErr = -13924;
+ kHIDReportCountZeroErr = -13925;
+ kHIDReportSizeZeroErr = -13926;
+ kHIDUnmatchedDesignatorRangeErr = -13927;
+ kHIDUnmatchedStringRangeErr = -13928;
+ kHIDInvertedUsageRangeErr = -13929;
+ kHIDUnmatchedUsageRangeErr = -13930;
+ kHIDInvertedPhysicalRangeErr = -13931;
+ kHIDInvertedLogicalRangeErr = -13932;
+ kHIDBadLogicalMaximumErr = -13933;
+ kHIDBadLogicalMinimumErr = -13934;
+ kHIDUsagePageZeroErr = -13935;
+ kHIDEndOfDescriptorErr = -13936;
+ kHIDNotEnoughMemoryErr = -13937;
+ kHIDBadParameterErr = -13938;
+ kHIDNullPointerErr = -13939;
+ kHIDInvalidReportLengthErr = -13940;
+ kHIDInvalidReportTypeErr = -13941;
+ kHIDBadLogPhysValuesErr = -13942;
+ kHIDIncompatibleReportErr = -13943;
+ kHIDInvalidPreparsedDataErr = -13944;
+ kHIDNotValueArrayErr = -13945;
+ kHIDUsageNotFoundErr = -13946;
+ kHIDValueOutOfRangeErr = -13947;
+ kHIDBufferTooSmallErr = -13948;
+ kHIDNullStateErr = -13949;
+ kHIDBaseError = -13950;
+
+
+ { the OT modem module may return the following error codes: }
+ kModemOutOfMemory = -14000;
+ kModemPreferencesMissing = -14001;
+ kModemScriptMissing = -14002;
+
+
+ { MacTextEditor error codes }
+ kTXNEndIterationErr = -22000;
+ kTXNCannotAddFrameErr = -22001;
+ kTXNInvalidFrameIDErr = -22002;
+ kTXNIllegalToCrossDataBoundariesErr = -22003;
+ kTXNUserCanceledOperationErr = -22004;
+ kTXNBadDefaultFileTypeWarning = -22005;
+ kTXNCannotSetAutoIndentErr = -22006;
+ kTXNRunIndexOutofBoundsErr = -22007;
+ kTXNNoMatchErr = -22008;
+ kTXNAttributeTagInvalidForRunErr = -22009; { dataValue is set to this per invalid tag }
+ kTXNSomeOrAllTagsInvalidForRunErr = -22010;
+ kTXNInvalidRunIndex = -22011;
+ kTXNAlreadyInitializedErr = -22012;
+ kTXNCannotTurnTSMOffWhenUsingUnicodeErr = -22013;
+ kTXNCopyNotAllowedInEchoModeErr = -22014;
+ kTXNDataTypeNotAllowedErr = -22015;
+ kTXNATSUIIsNotInstalledErr = -22016;
+ kTXNOutsideOfLineErr = -22017;
+ kTXNOutsideOfFrameErr = -22018;
+
+
+ { Possible errors from the PrinterStatus bottleneck }
+ printerStatusOpCodeNotSupportedErr = -25280;
+
+
+ { Keychain Manager error codes }
+ errKCNotAvailable = -25291;
+ errKCReadOnly = -25292;
+ errKCAuthFailed = -25293;
+ errKCNoSuchKeychain = -25294;
+ errKCInvalidKeychain = -25295;
+ errKCDuplicateKeychain = -25296;
+ errKCDuplicateCallback = -25297;
+ errKCInvalidCallback = -25298;
+ errKCDuplicateItem = -25299;
+ errKCItemNotFound = -25300;
+ errKCBufferTooSmall = -25301;
+ errKCDataTooLarge = -25302;
+ errKCNoSuchAttr = -25303;
+ errKCInvalidItemRef = -25304;
+ errKCInvalidSearchRef = -25305;
+ errKCNoSuchClass = -25306;
+ errKCNoDefaultKeychain = -25307;
+ errKCInteractionNotAllowed = -25308;
+ errKCReadOnlyAttr = -25309;
+ errKCWrongKCVersion = -25310;
+ errKCKeySizeNotAllowed = -25311;
+ errKCNoStorageModule = -25312;
+ errKCNoCertificateModule = -25313;
+ errKCNoPolicyModule = -25314;
+ errKCInteractionRequired = -25315;
+ errKCDataNotAvailable = -25316;
+ errKCDataNotModifiable = -25317;
+ errKCCreateChainFailed = -25318;
+
+
+ { UnicodeUtilities error & status codes }
+ kUCOutputBufferTooSmall = -25340; { Output buffer too small for Unicode string result }
+ kUCTextBreakLocatorMissingType = -25341; { Unicode text break error }
+
+ { Multiprocessing API error codes }
+ kMPIterationEndErr = -29275;
+ kMPPrivilegedErr = -29276;
+ kMPProcessCreatedErr = -29288;
+ kMPProcessTerminatedErr = -29289;
+ kMPTaskCreatedErr = -29290;
+ kMPTaskBlockedErr = -29291;
+ kMPTaskStoppedErr = -29292; { A convention used with MPThrowException. }
+ kMPBlueBlockingErr = -29293;
+ kMPDeletedErr = -29295;
+ kMPTimeoutErr = -29296;
+ kMPTaskAbortedErr = -29297;
+ kMPInsufficientResourcesErr = -29298;
+ kMPInvalidIDErr = -29299;
+
+ { StringCompare error codes (in TextUtils range) }
+ kCollateAttributesNotFoundErr = -29500;
+ kCollateInvalidOptions = -29501;
+ kCollateMissingUnicodeTableErr = -29502;
+ kCollateUnicodeConvertFailedErr = -29503;
+ kCollatePatternNotFoundErr = -29504;
+ kCollateInvalidChar = -29505;
+ kCollateBufferTooSmall = -29506;
+ kCollateInvalidCollationRef = -29507;
+
+
+ { FontSync OSStatus Codes }
+ kFNSInvalidReferenceErr = -29580; { ref. was NULL or otherwise bad }
+ kFNSBadReferenceVersionErr = -29581; { ref. version is out of known range }
+ kFNSInvalidProfileErr = -29582; { profile is NULL or otherwise bad }
+ kFNSBadProfileVersionErr = -29583; { profile version is out of known range }
+ kFNSDuplicateReferenceErr = -29584; { the ref. being added is already in the profile }
+ kFNSMismatchErr = -29585; { reference didn't match or wasn't found in profile }
+ kFNSInsufficientDataErr = -29586; { insufficient data for the operation }
+ kFNSBadFlattenedSizeErr = -29587; { flattened size didn't match input or was too small }
+ kFNSNameNotFoundErr = -29589; { The name with the requested paramters was not found }
+
+
+ { MacLocales error codes }
+ kLocalesBufferTooSmallErr = -30001;
+ kLocalesTableFormatErr = -30002;
+ kLocalesDefaultDisplayStatus = -30029; { Requested display locale unavailable, used default }
+
+
+ { Settings Manager (formerly known as Location Manager) Errors }
+ kALMInternalErr = -30049;
+ kALMGroupNotFoundErr = -30048;
+ kALMNoSuchModuleErr = -30047;
+ kALMModuleCommunicationErr = -30046;
+ kALMDuplicateModuleErr = -30045;
+ kALMInstallationErr = -30044;
+ kALMDeferSwitchErr = -30043;
+ kALMRebootFlagsLevelErr = -30042;
+
+ kALMLocationNotFoundErr = -30048; { Old name }
+
+
+ { SoundSprocket Error Codes }
+ kSSpInternalErr = -30340;
+ kSSpVersionErr = -30341;
+ kSSpCantInstallErr = -30342;
+ kSSpParallelUpVectorErr = -30343;
+ kSSpScaleToZeroErr = -30344;
+
+
+ { NetSprocket Error Codes }
+ kNSpInitializationFailedErr = -30360;
+ kNSpAlreadyInitializedErr = -30361;
+ kNSpTopologyNotSupportedErr = -30362;
+ kNSpPipeFullErr = -30364;
+ kNSpHostFailedErr = -30365;
+ kNSpProtocolNotAvailableErr = -30366;
+ kNSpInvalidGameRefErr = -30367;
+ kNSpInvalidParameterErr = -30369;
+ kNSpOTNotPresentErr = -30370;
+ kNSpOTVersionTooOldErr = -30371;
+ kNSpMemAllocationErr = -30373;
+ kNSpAlreadyAdvertisingErr = -30374;
+ kNSpNotAdvertisingErr = -30376;
+ kNSpInvalidAddressErr = -30377;
+ kNSpFreeQExhaustedErr = -30378;
+ kNSpRemovePlayerFailedErr = -30379;
+ kNSpAddressInUseErr = -30380;
+ kNSpFeatureNotImplementedErr = -30381;
+ kNSpNameRequiredErr = -30382;
+ kNSpInvalidPlayerIDErr = -30383;
+ kNSpInvalidGroupIDErr = -30384;
+ kNSpNoPlayersErr = -30385;
+ kNSpNoGroupsErr = -30386;
+ kNSpNoHostVolunteersErr = -30387;
+ kNSpCreateGroupFailedErr = -30388;
+ kNSpAddPlayerFailedErr = -30389;
+ kNSpInvalidDefinitionErr = -30390;
+ kNSpInvalidProtocolRefErr = -30391;
+ kNSpInvalidProtocolListErr = -30392;
+ kNSpTimeoutErr = -30393;
+ kNSpGameTerminatedErr = -30394;
+ kNSpConnectFailedErr = -30395;
+ kNSpSendFailedErr = -30396;
+ kNSpMessageTooBigErr = -30397;
+ kNSpCantBlockErr = -30398;
+ kNSpJoinFailedErr = -30399;
+
+
+ { InputSprockets error codes }
+ kISpInternalErr = -30420;
+ kISpSystemListErr = -30421;
+ kISpBufferToSmallErr = -30422;
+ kISpElementInListErr = -30423;
+ kISpElementNotInListErr = -30424;
+ kISpSystemInactiveErr = -30425;
+ kISpDeviceInactiveErr = -30426;
+ kISpSystemActiveErr = -30427;
+ kISpDeviceActiveErr = -30428;
+ kISpListBusyErr = -30429;
+
+ { DrawSprockets error/warning codes }
+ kDSpNotInitializedErr = -30440;
+ kDSpSystemSWTooOldErr = -30441;
+ kDSpInvalidContextErr = -30442;
+ kDSpInvalidAttributesErr = -30443;
+ kDSpContextAlreadyReservedErr = -30444;
+ kDSpContextNotReservedErr = -30445;
+ kDSpContextNotFoundErr = -30446;
+ kDSpFrameRateNotReadyErr = -30447;
+ kDSpConfirmSwitchWarning = -30448;
+ kDSpInternalErr = -30449;
+ kDSpStereoContextErr = -30450;
+
+
+ {
+ ***************************************************************************
+ Find By Content errors are assigned in the range -30500 to -30539, inclusive.
+ ***************************************************************************
+ }
+ kFBCvTwinExceptionErr = -30500; { no telling what it was }
+ kFBCnoIndexesFound = -30501;
+ kFBCallocFailed = -30502; { probably low memory }
+ kFBCbadParam = -30503;
+ kFBCfileNotIndexed = -30504;
+ kFBCbadIndexFile = -30505; { bad FSSpec, or bad data in file }
+ kFBCcompactionFailed = -30506; { V-Twin exception caught }
+ kFBCvalidationFailed = -30507; { V-Twin exception caught }
+ kFBCindexingFailed = -30508; { V-Twin exception caught }
+ kFBCcommitFailed = -30509; { V-Twin exception caught }
+ kFBCdeletionFailed = -30510; { V-Twin exception caught }
+ kFBCmoveFailed = -30511; { V-Twin exception caught }
+ kFBCtokenizationFailed = -30512; { couldn't read from document or query }
+ kFBCmergingFailed = -30513; { couldn't merge index files }
+ kFBCindexCreationFailed = -30514; { couldn't create index }
+ kFBCaccessorStoreFailed = -30515;
+ kFBCaddDocFailed = -30516;
+ kFBCflushFailed = -30517;
+ kFBCindexNotFound = -30518;
+ kFBCnoSearchSession = -30519;
+ kFBCindexingCanceled = -30520;
+ kFBCaccessCanceled = -30521;
+ kFBCindexFileDestroyed = -30522;
+ kFBCindexNotAvailable = -30523;
+ kFBCsearchFailed = -30524;
+ kFBCsomeFilesNotIndexed = -30525;
+ kFBCillegalSessionChange = -30526; { tried to add/remove vols to a session }
+ { that has hits }
+ kFBCanalysisNotAvailable = -30527;
+ kFBCbadIndexFileVersion = -30528;
+ kFBCsummarizationCanceled = -30529;
+ kFBCindexDiskIOFailed = -30530;
+ kFBCbadSearchSession = -30531;
+ kFBCnoSuchHit = -30532;
+
+
+ { QuickTime VR Errors }
+ notAQTVRMovieErr = -30540;
+ constraintReachedErr = -30541;
+ callNotSupportedByNodeErr = -30542;
+ selectorNotSupportedByNodeErr = -30543;
+ invalidNodeIDErr = -30544;
+ invalidViewStateErr = -30545;
+ timeNotInViewErr = -30546;
+ propertyNotSupportedByNodeErr = -30547;
+ settingNotSupportedByNodeErr = -30548;
+ limitReachedErr = -30549;
+ invalidNodeFormatErr = -30550;
+ invalidHotSpotIDErr = -30551;
+ noMemoryNodeFailedInitialize = -30552;
+ streamingNodeNotReadyErr = -30553;
+ qtvrLibraryLoadErr = -30554;
+ qtvrUninitialized = -30555;
+
+
+ { Appearance Manager Error Codes }
+ themeInvalidBrushErr = -30560; { pattern index invalid }
+ themeProcessRegisteredErr = -30561;
+ themeProcessNotRegisteredErr = -30562;
+ themeBadTextColorErr = -30563;
+ themeHasNoAccentsErr = -30564;
+ themeBadCursorIndexErr = -30565;
+ themeScriptFontNotFoundErr = -30566; { theme font requested for uninstalled script system }
+ themeMonitorDepthNotSupportedErr = -30567; { theme not supported at monitor depth }
+
+
+ { Control Manager Error Codes }
+ errMessageNotSupported = -30580;
+ errDataNotSupported = -30581;
+ errControlDoesntSupportFocus = -30582;
+ errUnknownControl = -30584;
+ errCouldntSetFocus = -30585;
+ errNoRootControl = -30586;
+ errRootAlreadyExists = -30587;
+ errInvalidPartCode = -30588;
+ errControlsAlreadyExist = -30589;
+ errControlIsNotEmbedder = -30590;
+ errDataSizeMismatch = -30591;
+ errControlHiddenOrDisabled = -30592;
+ errCantEmbedIntoSelf = -30594;
+ errCantEmbedRoot = -30595;
+ errItemNotControl = -30596;
+ controlInvalidDataVersionErr = -30597;
+ controlPropertyInvalid = -5603;
+ controlPropertyNotFoundErr = -5604;
+ controlHandleInvalidErr = -30599;
+
+
+ { URLAccess Error Codes }
+ kURLInvalidURLReferenceError = -30770;
+ kURLProgressAlreadyDisplayedError = -30771;
+ kURLDestinationExistsError = -30772;
+ kURLInvalidURLError = -30773;
+ kURLUnsupportedSchemeError = -30774;
+ kURLServerBusyError = -30775;
+ kURLAuthenticationError = -30776;
+ kURLPropertyNotYetKnownError = -30777;
+ kURLUnknownPropertyError = -30778;
+ kURLPropertyBufferTooSmallError = -30779;
+ kURLUnsettablePropertyError = -30780;
+ kURLInvalidCallError = -30781;
+ kURLFileEmptyError = -30783;
+ kURLExtensionFailureError = -30785;
+ kURLInvalidConfigurationError = -30786;
+ kURLAccessNotAvailableError = -30787;
+ kURL68kNotSupportedError = -30788;
+
+
+ { ComponentError codes }
+ badComponentInstance = -$7FFF7FFE; { when cast to an OSErr this is -32767 }
+ badComponentSelector = -$7FFF7FFD; { when cast to an OSErr this is -32766 }
+
+
+ dsBusError = 1; { bus error }
+ dsAddressErr = 2; { address error }
+ dsIllInstErr = 3; { illegal instruction error }
+ dsZeroDivErr = 4; { zero divide error }
+ dsChkErr = 5; { check trap error }
+ dsOvflowErr = 6; { overflow trap error }
+ dsPrivErr = 7; { privilege violation error }
+ dsTraceErr = 8; { trace mode error }
+ dsLineAErr = 9; { line 1010 trap error }
+ dsLineFErr = 10; { line 1111 trap error }
+ dsMiscErr = 11; { miscellaneous hardware exception error }
+ dsCoreErr = 12; { unimplemented core routine error }
+ dsIrqErr = 13; { uninstalled interrupt error }
+ dsIOCoreErr = 14; { IO Core Error }
+ dsLoadErr = 15; { Segment Loader Error }
+ dsFPErr = 16; { Floating point error }
+ dsNoPackErr = 17; { package 0 not present }
+ dsNoPk1 = 18; { package 1 not present }
+ dsNoPk2 = 19; { package 2 not present }
+
+ dsNoPk3 = 20; { package 3 not present }
+ dsNoPk4 = 21; { package 4 not present }
+ dsNoPk5 = 22; { package 5 not present }
+ dsNoPk6 = 23; { package 6 not present }
+ dsNoPk7 = 24; { package 7 not present }
+ dsMemFullErr = 25; { out of memory! }
+ dsBadLaunch = 26; { can't launch file }
+ dsFSErr = 27; { file system map has been trashed }
+ dsStknHeap = 28; { stack has moved into application heap }
+ negZcbFreeErr = 33; { ZcbFree has gone negative }
+ dsFinderErr = 41; { can't load the Finder error }
+ dsBadSlotInt = 51; { unserviceable slot interrupt }
+ dsBadSANEOpcode = 81; { bad opcode given to SANE Pack4 }
+ dsBadPatchHeader = 83; { SetTrapAddress saw the Òcome-fromÓ header }
+ menuPrgErr = 84; { happens when a menu is purged }
+ dsMBarNFnd = 85; { Menu Manager Errors }
+ dsHMenuFindErr = 86; { Menu Manager Errors }
+ dsWDEFNotFound = 87; { could not load WDEF }
+ dsCDEFNotFound = 88; { could not load CDEF }
+ dsMDEFNotFound = 89; { could not load MDEF }
+
+ dsNoFPU = 90; { an FPU instruction was executed and the machine doesnÕt have one }
+ dsNoPatch = 98; { Can't patch for particular Model Mac }
+ dsBadPatch = 99; { Can't load patch resource }
+ dsParityErr = 101; { memory parity error }
+ dsOldSystem = 102; { System is too old for this ROM }
+ ds32BitMode = 103; { booting in 32-bit on a 24-bit sys }
+ dsNeedToWriteBootBlocks = 104; { need to write new boot blocks }
+ dsNotEnoughRAMToBoot = 105; { must have at least 1.5MB of RAM to boot 7.0 }
+ dsBufPtrTooLow = 106; { bufPtr moved too far during boot }
+ dsVMDeferredFuncTableFull = 112; { VM's DeferUserFn table is full }
+ dsVMBadBackingStore = 113; { Error occurred while reading or writing the VM backing-store file }
+ dsCantHoldSystemHeap = 114; { Unable to hold the system heap during boot }
+ dsSystemRequiresPowerPC = 116; { Startup disk requires PowerPC }
+ dsGibblyMovedToDisabledFolder = 117; { For debug builds only, signals that active gibbly was disabled during boot. }
+ dsUnBootableSystem = 118; { Active system file will not boot on this system because it was designed only to boot from a CD. }
+ dsMustUseFCBAccessors = 119; { FCBSPtr and FSFCBLen are invalid - must use FSM FCB accessor functions }
+ dsMacOSROMVersionTooOld = 120; { The version of the "Mac OS ROM" file is too old to be used with the installed version of system software }
+ dsLostConnectionToNetworkDisk = 121; { Lost communication with Netboot server }
+ dsRAMDiskTooBig = 122; { The RAM disk is too big to boot safely; will be turned off }
+ dsWriteToSupervisorStackGuardPage = 128; { the supervisor stack overflowed into its guard page }
+ dsReinsert = 30; { request user to reinsert off-line volume }
+ shutDownAlert = 42; { handled like a shutdown error }
+ dsShutDownOrRestart = 20000; { user choice between ShutDown and Restart }
+ dsSwitchOffOrRestart = 20001; { user choice between switching off and Restart }
+ dsForcedQuit = 20002; { allow the user to ExitToShell, return if Cancel }
+ dsRemoveDisk = 20003; { request user to remove disk from manual eject drive }
+ dsDirtyDisk = 20004; { request user to return a manually-ejected dirty disk }
+ dsShutDownOrResume = 20109; { allow user to return to Finder or ShutDown }
+ dsSCSIWarn = 20010; { Portable SCSI adapter warning. }
+ dsMBSysError = 29200; { Media Bay replace warning. }
+ dsMBFlpySysError = 29201; { Media Bay, floppy replace warning. }
+ dsMBATASysError = 29202; { Media Bay, ATA replace warning. }
+ dsMBATAPISysError = 29203; { Media Bay, ATAPI replace warning... }
+ dsMBExternFlpySysError = 29204; { Media Bay, external floppy drive reconnect warning }
+ dsPCCardATASysError = 29205; { PCCard has been ejected while still in use. }
+
+ {
+ System Errors that are used after MacsBug is loaded to put up dialogs since these should not
+ cause MacsBug to stop, they must be in the range (30, 42, 16384-32767) negative numbers add
+ to an existing dialog without putting up a whole new dialog
+ }
+ dsNoExtsMacsBug = -1; { not a SysErr, just a placeholder }
+ dsNoExtsDisassembler = -2; { not a SysErr, just a placeholder }
+ dsMacsBugInstalled = -10; { say ÒMacsBug InstalledÓ }
+ dsDisassemblerInstalled = -11; { say ÒDisassembler InstalledÓ }
+ dsExtensionsDisabled = -13; { say ÒExtensions DisabledÓ }
+ dsGreeting = 40; { welcome to Macintosh greeting }
+ dsSysErr = 32767; { general system error }
+ { old names here for compatibilityÕs sake }
+ WDEFNFnd = 87;
+
+ CDEFNFnd = 88;
+ dsNotThe1 = 31; { not the disk I wanted }
+ dsBadStartupDisk = 42; { unable to mount boot volume (sad Mac only) }
+ dsSystemFileErr = 43; { canÕt find System file to open (sad Mac only) }
+ dsHD20Installed = -12; { say ÒHD20 StartupÓ }
+ mBarNFnd = -126; { system error code for MBDF not found }
+ fsDSIntErr = -127; { non-hardware Internal file system error }
+ hMenuFindErr = -127; { could not find HMenu's parent in MenuKey (wrong error code - obsolete) }
+ userBreak = -490; { user debugger break }
+ strUserBreak = -491; { user debugger break; display string on stack }
+ exUserBreak = -492; { user debugger break; execute debugger commands on stack }
+
+
+ { DS Errors which are specific to the new runtime model introduced with PowerPC }
+ dsBadLibrary = 1010; { Bad shared library }
+ dsMixedModeFailure = 1011; { Internal Mixed Mode Failure }
+
+
+ {
+ * SysError()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SysError(errorCode: SInt16); external name '_SysError';
+{$ALIGN MAC68K}
+
+
+{unit MacLocales}
+{
+ File: MacLocales.p
+
+ Contains: Types & prototypes for locale functions
+
+ Version: Technology: Mac OS 9.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1998-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+{
+ -------------------------------------------------------------------------------------------------
+ TYPES & CONSTANTS
+ -------------------------------------------------------------------------------------------------
+}
+
+
+type
+ LocaleRef = ^SInt32; { an opaque 32-bit type }
+ LocaleRefPtr = ^LocaleRef; { when a var xx:LocaleRef parameter can be nil, it is changed to xx: LocaleRefPtr }
+ LocalePartMask = UInt32;
+
+const
+ { bit set requests the following: }
+ kLocaleLanguageMask = $00000001; { ISO 639-1 or -2 language code (2 or 3 letters) }
+ kLocaleLanguageVariantMask = $00000002; { custom string for language variant }
+ kLocaleScriptMask = $00000004; { ISO 15924 script code (2 letters) }
+ kLocaleScriptVariantMask = $00000008; { custom string for script variant }
+ kLocaleRegionMask = $00000010; { ISO 3166 country/region code (2 letters) }
+ kLocaleRegionVariantMask = $00000020; { custom string for region variant }
+ kLocaleAllPartsMask = $0000003F; { all of the above }
+
+
+type
+ LocaleOperationClass = FourCharCode;
+ { constants for LocaleOperationClass are in UnicodeUtilities interfaces }
+ LocaleOperationVariant = FourCharCode;
+ LocaleAndVariantPtr = ^LocaleAndVariant;
+ LocaleAndVariant = record
+ locale: LocaleRef;
+ opVariant: LocaleOperationVariant;
+ end;
+
+ LocaleNameMask = UInt32;
+
+const
+ { bit set requests the following: }
+ kLocaleNameMask = $00000001; { name of locale }
+ kLocaleOperationVariantNameMask = $00000002; { name of LocaleOperationVariant }
+ kLocaleAndVariantNameMask = $00000003; { all of the above }
+
+ {
+ -------------------------------------------------------------------------------------------------
+ function PROTOTYPES
+ -------------------------------------------------------------------------------------------------
+ }
+
+ { Convert to or from LocaleRefs (and related utilities) }
+
+ {
+ * LocaleRefFromLangOrRegionCode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LocalesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LocaleRefFromLangOrRegionCode(lang: LangCode; region: RegionCode; var locale: LocaleRef): OSStatus; external name '_LocaleRefFromLangOrRegionCode';
+
+{
+ * LocaleRefFromLocaleString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LocalesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LocaleRefFromLocaleString(localeString: ConstCStringPtr; var locale: LocaleRef): OSStatus; external name '_LocaleRefFromLocaleString';
+
+{
+ * LocaleRefGetPartString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LocalesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LocaleRefGetPartString(locale: LocaleRef; partMask: LocalePartMask; maxStringLen: ByteCount; var partString: char): OSStatus; external name '_LocaleRefGetPartString';
+
+{
+ * LocaleStringToLangAndRegionCodes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LocalesLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LocaleStringToLangAndRegionCodes(localeString: ConstCStringPtr; var lang: LangCode; var region: RegionCode): OSStatus; external name '_LocaleStringToLangAndRegionCodes';
+
+{ Enumerate locales for a LocaleOperationClass }
+{
+ * LocaleOperationCountLocales()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LocalesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LocaleOperationCountLocales(opClass: LocaleOperationClass; var localeCount: ItemCount): OSStatus; external name '_LocaleOperationCountLocales';
+
+{
+ * LocaleOperationGetLocales()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LocalesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LocaleOperationGetLocales(opClass: LocaleOperationClass; maxLocaleCount: ItemCount; var actualLocaleCount: ItemCount; var localeVariantList: LocaleAndVariant): OSStatus; external name '_LocaleOperationGetLocales';
+
+{ Get names for a locale (or a region's language) }
+
+{
+ * LocaleGetName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LocalesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LocaleGetName(locale: LocaleRef; opVariant: LocaleOperationVariant; nameMask: LocaleNameMask; displayLocale: LocaleRef; maxNameLen: UniCharCount; var actualNameLen: UniCharCount; displayName: UniCharPtr): OSStatus; external name '_LocaleGetName';
+
+{
+ * LocaleCountNames()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LocalesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LocaleCountNames(locale: LocaleRef; opVariant: LocaleOperationVariant; nameMask: LocaleNameMask; var nameCount: ItemCount): OSStatus; external name '_LocaleCountNames';
+
+{
+ * LocaleGetIndName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LocalesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LocaleGetIndName(locale: LocaleRef; opVariant: LocaleOperationVariant; nameMask: LocaleNameMask; nameIndex: ItemCount; maxNameLen: UniCharCount; var actualNameLen: UniCharCount; displayName: UniCharPtr; var displayLocale: LocaleRef): OSStatus; external name '_LocaleGetIndName';
+
+{
+ * LocaleGetRegionLanguageName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LocalesLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LocaleGetRegionLanguageName(region: RegionCode; var languageName: Str255): OSStatus; external name '_LocaleGetRegionLanguageName';
+
+{ Get names for a LocaleOperationClass }
+{
+ * LocaleOperationGetName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LocalesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LocaleOperationGetName(opClass: LocaleOperationClass; displayLocale: LocaleRef; maxNameLen: UniCharCount; var actualNameLen: UniCharCount; displayName: UniCharPtr): OSStatus; external name '_LocaleOperationGetName';
+
+{
+ * LocaleOperationCountNames()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LocalesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LocaleOperationCountNames(opClass: LocaleOperationClass; var nameCount: ItemCount): OSStatus; external name '_LocaleOperationCountNames';
+
+{
+ * LocaleOperationGetIndName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LocalesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LocaleOperationGetIndName(opClass: LocaleOperationClass; nameIndex: ItemCount; maxNameLen: UniCharCount; var actualNameLen: UniCharCount; displayName: UniCharPtr; var displayLocale: LocaleRef): OSStatus; external name '_LocaleOperationGetIndName';
+
+{$ALIGN MAC68K}
+
+
+{unit MacMemory}
+{
+ File: MacMemory.p
+
+ Contains: Memory Manager Interfaces.
+
+ Version: Technology: Mac OS 9
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ maxSize = $7FFFFFF0; { the largest block possible }
+
+ defaultPhysicalEntryCount = 8;
+
+ { values returned from the GetPageState function }
+ kPageInMemory = 0;
+ kPageOnDisk = 1;
+ kNotPaged = 2;
+
+ { masks for Zone->heapType field }
+ k32BitHeap = 1; { valid in all Memory Managers }
+ kNewStyleHeap = 2; { true if new Heap Manager is present }
+ kNewDebugHeap = 4; { true if new Heap Manager is running in debug mode on this heap }
+
+
+ { bits for use with HGetState/HSetState }
+ kHandleIsResourceBit = 5;
+ kHandlePurgeableBit = 6;
+ kHandleLockedBit = 7;
+
+ { masks for use with HGetState/HSetState }
+ kHandleIsResourceMask = $20;
+ kHandlePurgeableMask = $40;
+ kHandleLockedMask = $80;
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ GrowZoneProcPtr = function(cbNeeded: Size): SInt32;
+{$elsec}
+ GrowZoneProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ PurgeProcPtr = procedure(blockToPurge: Handle);
+{$elsec}
+ PurgeProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ UserFnProcPtr = procedure(parameter: UnivPtr);
+{$elsec}
+ UserFnProcPtr = Register68kProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ GrowZoneUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ GrowZoneUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ PurgeUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ PurgeUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ UserFnUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ UserFnUPP = UniversalProcPtr;
+{$endc}
+ ZonePtr = ^Zone;
+ Zone = record
+ bkLim: Ptr;
+ purgePtr: Ptr;
+ hFstFree: Ptr;
+ zcbFree: SInt32;
+ gzProc: GrowZoneUPP;
+ moreMast: SInt16;
+ flags: SInt16;
+ cntRel: SInt16;
+ maxRel: SInt16;
+ cntNRel: SInt16;
+ heapType: SInt8; { previously "maxNRel", now holds flags (e.g. k32BitHeap) }
+ unused: SInt8;
+ cntEmpty: SInt16;
+ cntHandles: SInt16;
+ minCBFree: SInt32;
+ purgeProc: PurgeUPP;
+ sparePtr: Ptr;
+ allocPtr: Ptr;
+ heapData: SInt16;
+ end;
+
+ THz = ^Zone;
+ THzPtr = ^THz;
+ MemoryBlockPtr = ^MemoryBlock;
+ MemoryBlock = record
+ address: Ptr;
+ count: UInt32;
+ end;
+
+ LogicalToPhysicalTablePtr = ^LogicalToPhysicalTable;
+ LogicalToPhysicalTable = record
+ logical: MemoryBlock;
+ physical: array [0..7] of MemoryBlock;
+ end;
+
+ PageState = SInt16;
+ StatusRegisterContents = SInt16;
+
+const
+ kVolumeVirtualMemoryInfoVersion1 = 1; { first version of VolumeVirtualMemoryInfo }
+
+
+type
+ VolumeVirtualMemoryInfoPtr = ^VolumeVirtualMemoryInfo;
+ VolumeVirtualMemoryInfo = record
+ version: PBVersion; { Input: Version of the VolumeVirtualMemoryInfo structure }
+ volumeRefNum: SInt16; { Input: volume reference number }
+ inUse: boolean; { output: true if volume is currently used for file mapping }
+ _fill: SInt8;
+ vmOptions: UInt32; { output: tells what volume can support (same as DriverGestaltVMOptionsResponse vmOptions bits in DriverGestalt) }
+ { end of kVolumeVirtualMemoryInfoVersion1 structure }
+ end;
+
+
+const
+ uppGrowZoneProcInfo = $000000F0;
+ uppPurgeProcInfo = $000000C0;
+ uppUserFnProcInfo = $00009802;
+ {
+ * NewGrowZoneUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewGrowZoneUPP(userRoutine: GrowZoneProcPtr): GrowZoneUPP; external name '_NewGrowZoneUPP'; { old name was NewGrowZoneProc }
+{
+ * NewPurgeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewPurgeUPP(userRoutine: PurgeProcPtr): PurgeUPP; external name '_NewPurgeUPP'; { old name was NewPurgeProc }
+{
+ * NewUserFnUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewUserFnUPP(userRoutine: UserFnProcPtr): UserFnUPP; external name '_NewUserFnUPP'; { old name was NewUserFnProc }
+{
+ * DisposeGrowZoneUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeGrowZoneUPP(userUPP: GrowZoneUPP); external name '_DisposeGrowZoneUPP';
+{
+ * DisposePurgeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposePurgeUPP(userUPP: PurgeUPP); external name '_DisposePurgeUPP';
+{
+ * DisposeUserFnUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeUserFnUPP(userUPP: UserFnUPP); external name '_DisposeUserFnUPP';
+{
+ * InvokeGrowZoneUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeGrowZoneUPP(cbNeeded: Size; userRoutine: GrowZoneUPP): SInt32; external name '_InvokeGrowZoneUPP'; { old name was CallGrowZoneProc }
+{
+ * InvokePurgeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokePurgeUPP(blockToPurge: Handle; userRoutine: PurgeUPP); external name '_InvokePurgeUPP'; { old name was CallPurgeProc }
+{
+ * InvokeUserFnUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeUserFnUPP(parameter: UnivPtr; userRoutine: UserFnUPP); external name '_InvokeUserFnUPP'; { old name was CallUserFnProc }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * GetApplLimit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetApplLimit: Ptr; external name '_GetApplLimit';
+{
+ * SystemZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SystemZone: THz; external name '_SystemZone';
+{
+ * ApplicationZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ApplicationZone: THz; external name '_ApplicationZone';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * GZSaveHnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GZSaveHnd: Handle; external name '_GZSaveHnd';
+{
+ * TopMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TopMem: Ptr; external name '_TopMem';
+{
+ * MemError()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MemError: OSErr; external name '_MemError';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * GetZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetZone: THz; external name '_GetZone';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * NewHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewHandle(byteCount: Size): Handle; external name '_NewHandle';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * NewHandleSys()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewHandleSys(byteCount: Size): Handle; external name '_NewHandleSys';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * NewHandleClear()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewHandleClear(byteCount: Size): Handle; external name '_NewHandleClear';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * NewHandleSysClear()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewHandleSysClear(byteCount: Size): Handle; external name '_NewHandleSysClear';
+{
+ * HandleZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function HandleZone(h: Handle): THz; external name '_HandleZone';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * RecoverHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RecoverHandle(p: Ptr): Handle; external name '_RecoverHandle';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * RecoverHandleSys()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RecoverHandleSys(p: Ptr): Handle; external name '_RecoverHandleSys';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * NewPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewPtr(byteCount: Size): Ptr; external name '_NewPtr';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * NewPtrSys()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewPtrSys(byteCount: Size): Ptr; external name '_NewPtrSys';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * NewPtrClear()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewPtrClear(byteCount: Size): Ptr; external name '_NewPtrClear';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * NewPtrSysClear()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewPtrSysClear(byteCount: Size): Ptr; external name '_NewPtrSysClear';
+{
+ * PtrZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PtrZone(p: Ptr): THz; external name '_PtrZone';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * MaxBlock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MaxBlock: SInt32; external name '_MaxBlock';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * MaxBlockSys()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function MaxBlockSys: SInt32; external name '_MaxBlockSys';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * StackSpace()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function StackSpace: SInt32; external name '_StackSpace';
+{
+ * NewEmptyHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewEmptyHandle: Handle; external name '_NewEmptyHandle';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * NewEmptyHandleSys()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewEmptyHandleSys: Handle; external name '_NewEmptyHandleSys';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * HLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HLock(h: Handle); external name '_HLock';
+{
+ * HUnlock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HUnlock(h: Handle); external name '_HUnlock';
+{
+ * HPurge()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HPurge(h: Handle); external name '_HPurge';
+{
+ * HNoPurge()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HNoPurge(h: Handle); external name '_HNoPurge';
+{
+ * HLockHi()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HLockHi(h: Handle); external name '_HLockHi';
+{
+ * TempNewHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TempNewHandle(logicalSize: Size; var resultCode: OSErr): Handle; external name '_TempNewHandle';
+{
+ * TempMaxMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TempMaxMem(var grow: Size): Size; external name '_TempMaxMem';
+{
+ * TempFreeMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TempFreeMem: SInt32; external name '_TempFreeMem';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * InitZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure InitZone(pgrowZone: GrowZoneUPP; cmoreMasters: SInt16; limitPtr: UnivPtr; startPtr: UnivPtr); external name '_InitZone';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * SetZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure SetZone(hz: THz); external name '_SetZone';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * CompactMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CompactMem(cbNeeded: Size): Size; external name '_CompactMem';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * CompactMemSys()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CompactMemSys(cbNeeded: Size): Size; external name '_CompactMemSys';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * PurgeMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PurgeMem(cbNeeded: Size); external name '_PurgeMem';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PurgeMemSys()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PurgeMemSys(cbNeeded: Size); external name '_PurgeMemSys';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * FreeMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+
+ * Note:
+ FreeMem has been renamed MacFreeMem, to resolve a naming conflict with
+ FreeMem in the Turbo Pascal/Delphi/FreePascal runtime library
+ }
+function MacFreeMem: SInt32; external name '_FreeMem';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * FreeMemSys()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function FreeMemSys: SInt32; external name '_FreeMemSys';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * ReserveMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure ReserveMem(cbNeeded: Size); external name '_ReserveMem';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * ReserveMemSys()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure ReserveMemSys(cbNeeded: Size); external name '_ReserveMemSys';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * MaxMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MaxMem(var grow: Size): Size; external name '_MaxMem';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * MaxMemSys()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function MaxMemSys(var grow: Size): Size; external name '_MaxMemSys';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * SetGrowZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetGrowZone(growZone: GrowZoneUPP); external name '_SetGrowZone';
+{
+ * GetGrowZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetGrowZone: GrowZoneUPP; external name '_GetGrowZone';
+
+{
+ * MoveHHi()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure MoveHHi(h: Handle); external name '_MoveHHi';
+{
+ * DisposePtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposePtr(p: Ptr); external name '_DisposePtr';
+{
+ * GetPtrSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetPtrSize(p: Ptr): Size; external name '_GetPtrSize';
+
+{
+ * SetPtrSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetPtrSize(p: Ptr; newSize: Size); external name '_SetPtrSize';
+{
+ * DisposeHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeHandle(h: Handle); external name '_DisposeHandle';
+{
+ * SetHandleSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetHandleSize(h: Handle; newSize: Size); external name '_SetHandleSize';
+{
+ NOTE
+
+ GetHandleSize and GetPtrSize are documented in Inside Mac as returning 0
+ in case of an error, but the traps actually return an error code in D0.
+ The glue sets D0 to 0 if an error occurred.
+}
+{
+ * GetHandleSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetHandleSize(h: Handle): Size; external name '_GetHandleSize';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * InlineGetHandleSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InlineGetHandleSize(h: Handle): Size; external name '_InlineGetHandleSize';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * ReallocateHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure ReallocateHandle(h: Handle; byteCount: Size); external name '_ReallocateHandle';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * ReallocateHandleSys()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure ReallocateHandleSys(h: Handle; byteCount: Size); external name '_ReallocateHandleSys';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * EmptyHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure EmptyHandle(h: Handle); external name '_EmptyHandle';
+{
+ * HSetRBit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HSetRBit(h: Handle); external name '_HSetRBit';
+{
+ * HClrRBit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HClrRBit(h: Handle); external name '_HClrRBit';
+{
+ * HGetState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HGetState(h: Handle): SInt8; external name '_HGetState';
+{
+ * HSetState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HSetState(h: Handle; flags: SInt8); external name '_HSetState';
+{
+ * PurgeSpace()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PurgeSpace(var total: SInt32; var contig: SInt32); external name '_PurgeSpace';
+
+{
+ PurgeSpaceTotal and PurgeSpaceContiguous are currently only implement
+ on classic 68K. The are the same as PurgeSpace() but return just
+ one value (either total space purgable or contiguous space purgable).
+ Begining in Mac OS 8.5 they are available in InterfaceLib.
+}
+{
+ * PurgeSpaceTotal()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PurgeSpaceTotal: SInt32; external name '_PurgeSpaceTotal';
+{
+ * PurgeSpaceContiguous()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PurgeSpaceContiguous: SInt32; external name '_PurgeSpaceContiguous';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PurgeSpaceSysTotal()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PurgeSpaceSysTotal: SInt32; external name '_PurgeSpaceSysTotal';
+{
+ * PurgeSpaceSysContiguous()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PurgeSpaceSysContiguous: SInt32; external name '_PurgeSpaceSysContiguous';
+{****************************************************************************
+
+ The routines:
+
+ BlockMoveUncached, BlockMoveDataUncached
+ BlockZero, BlockZeroUncached
+
+ were first created for developers writing drivers. Originally they only
+ existed in DriverServicesLib. Later they were added to InterfaceLib
+ in PCI based PowerMacs. MacOS 8.5 provides these routines in InterfaceLib
+ on all supported machines.
+
+****************************************************************************}
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * BlockMove()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverServicesLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure BlockMove(srcPtr: UnivPtr; destPtr: UnivPtr; byteCount: Size); external name '_BlockMove';
+{
+ * BlockMoveData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverServicesLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure BlockMoveData(srcPtr: UnivPtr; destPtr: UnivPtr; byteCount: Size); external name '_BlockMoveData';
+{
+ * BlockMoveUncached()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure BlockMoveUncached(srcPtr: UnivPtr; destPtr: UnivPtr; byteCount: Size); external name '_BlockMoveUncached';
+
+{
+ * BlockMoveDataUncached()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure BlockMoveDataUncached(srcPtr: UnivPtr; destPtr: UnivPtr; byteCount: Size); external name '_BlockMoveDataUncached';
+
+{
+ * BlockZero()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure BlockZero(destPtr: UnivPtr; byteCount: Size); external name '_BlockZero';
+
+{
+ * BlockZeroUncached()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure BlockZeroUncached(destPtr: UnivPtr; byteCount: Size); external name '_BlockZeroUncached';
+
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * MaxApplZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure MaxApplZone; external name '_MaxApplZone';
+{
+ * SetApplBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure SetApplBase(startPtr: UnivPtr); external name '_SetApplBase';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * MoreMasters()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure MoreMasters; external name '_MoreMasters';
+{
+ * MoreMasterPointers()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure MoreMasterPointers(inCount: UInt32); external name '_MoreMasterPointers';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * SetApplLimit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure SetApplLimit(zoneLimit: UnivPtr); external name '_SetApplLimit';
+{
+ * InitApplZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure InitApplZone; external name '_InitApplZone';
+{ Temporary Memory routines renamed, but obsolete, in System 7.0 and later. }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * TempHLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure TempHLock(h: Handle; var resultCode: OSErr); external name '_TempHLock';
+{
+ * TempHUnlock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure TempHUnlock(h: Handle; var resultCode: OSErr); external name '_TempHUnlock';
+{
+ * TempDisposeHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure TempDisposeHandle(h: Handle; var resultCode: OSErr); external name '_TempDisposeHandle';
+{
+ * TempTopMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TempTopMem: Ptr; external name '_TempTopMem';
+{
+ * HoldMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HoldMemory(address: UnivPtr; count: UInt32): OSErr; external name '_HoldMemory';
+{
+ * UnholdMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UnholdMemory(address: UnivPtr; count: UInt32): OSErr; external name '_UnholdMemory';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LockMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LockMemory(address: UnivPtr; count: UInt32): OSErr; external name '_LockMemory';
+{
+ * LockMemoryForOutput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LockMemoryForOutput(address: UnivPtr; count: UInt32): OSErr; external name '_LockMemoryForOutput';
+{
+ * LockMemoryContiguous()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LockMemoryContiguous(address: UnivPtr; count: UInt32): OSErr; external name '_LockMemoryContiguous';
+{
+ * UnlockMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function UnlockMemory(address: UnivPtr; count: UInt32): OSErr; external name '_UnlockMemory';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * MakeMemoryResident()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MakeMemoryResident(address: UnivPtr; count: UInt32): OSErr; external name '_MakeMemoryResident';
+{
+ * ReleaseMemoryData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ReleaseMemoryData(address: UnivPtr; count: UInt32): OSErr; external name '_ReleaseMemoryData';
+{
+ * MakeMemoryNonResident()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MakeMemoryNonResident(address: UnivPtr; count: UInt32): OSErr; external name '_MakeMemoryNonResident';
+{
+ * FlushMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FlushMemory(address: UnivPtr; count: UInt32): OSErr; external name '_FlushMemory';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * GetPhysical()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetPhysical(var addresses: LogicalToPhysicalTable; var physicalEntryCount: UInt32): OSErr; external name '_GetPhysical';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * GetVolumeVirtualMemoryInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetVolumeVirtualMemoryInfo(volVMInfo: VolumeVirtualMemoryInfoPtr): OSErr; external name '_GetVolumeVirtualMemoryInfo';
+{
+ * DeferUserFn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DeferUserFn(userFunction: UserFnUPP; argument: UnivPtr): OSErr; external name '_DeferUserFn';
+{
+ * DebuggerGetMax()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DebuggerGetMax: SInt32; external name '_DebuggerGetMax';
+{
+ * DebuggerEnter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DebuggerEnter; external name '_DebuggerEnter';
+{
+ * DebuggerExit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DebuggerExit; external name '_DebuggerExit';
+{
+ * DebuggerPoll()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DebuggerPoll; external name '_DebuggerPoll';
+{
+ * GetPageState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetPageState(address: UnivPtr): PageState; external name '_GetPageState';
+{
+ * PageFaultFatal()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PageFaultFatal: boolean; external name '_PageFaultFatal';
+{
+ * DebuggerLockMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DebuggerLockMemory(address: UnivPtr; count: UInt32): OSErr; external name '_DebuggerLockMemory';
+{
+ * DebuggerUnlockMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DebuggerUnlockMemory(address: UnivPtr; count: UInt32): OSErr; external name '_DebuggerUnlockMemory';
+{
+ * EnterSupervisorMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function EnterSupervisorMode: StatusRegisterContents; external name '_EnterSupervisorMode';
+{
+ * StripAddress()
+ *
+ * Summary:
+ * A trap on classic 68K, and the identity function for pre-carbon
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function StripAddress(theAddress: UnivPtr): Ptr; external name '_StripAddress';
+{
+ * Translate24To32()
+ *
+ * Summary:
+ * A trap on classic 68K, and the identity function for pre-carbon
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Translate24To32(addr24: UnivPtr): Ptr; external name '_Translate24To32';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * HandToHand()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HandToHand(var theHndl: Handle): OSErr; external name '_HandToHand';
+
+{
+ * PtrToXHand()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PtrToXHand(srcPtr: UnivPtr; dstHndl: Handle; size: SInt32): OSErr; external name '_PtrToXHand';
+{
+ * PtrToHand()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PtrToHand(srcPtr: UnivPtr; var dstHndl: Handle; size: SInt32): OSErr; external name '_PtrToHand';
+
+{
+ * HandAndHand()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HandAndHand(hand1: Handle; hand2: Handle): OSErr; external name '_HandAndHand';
+{
+ * PtrAndHand()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PtrAndHand(ptr1: UnivPtr; hand2: Handle; size: SInt32): OSErr; external name '_PtrAndHand';
+{ Carbon routines to aid in debugging. }
+{ Checks all applicable heaps for validity }
+{
+ * CheckAllHeaps()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CheckAllHeaps: boolean; external name '_CheckAllHeaps';
+
+{ Checks the application heap for validity }
+{
+ * IsHeapValid()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IsHeapValid: boolean; external name '_IsHeapValid';
+
+{ It is invalid to pass a NULL or an empty Handle to IsHandleValid }
+{
+ * IsHandleValid()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IsHandleValid(h: Handle): boolean; external name '_IsHandleValid';
+
+{ It is invalid to pass a NULL Pointer to IsPointerValid }
+{
+ * IsPointerValid()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IsPointerValid(p: Ptr): boolean; external name '_IsPointerValid';
+
+
+{$ifc OLDROUTINENAMES}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * ApplicZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ApplicZone: THz; external name '_ApplicZone';
+{
+ * MFTempNewHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function MFTempNewHandle(logicalSize: Size; var resultCode: OSErr): Handle; external name '_MFTempNewHandle';
+{
+ * MFMaxMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function MFMaxMem(var grow: Size): Size; external name '_MFMaxMem';
+{
+ * MFFreeMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function MFFreeMem: SInt32; external name '_MFFreeMem';
+{
+ * MFTempHLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure MFTempHLock(h: Handle; var resultCode: OSErr); external name '_MFTempHLock';
+{
+ * MFTempHUnlock()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure MFTempHUnlock(h: Handle; var resultCode: OSErr); external name '_MFTempHUnlock';
+{
+ * MFTempDisposHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure MFTempDisposHandle(h: Handle; var resultCode: OSErr); external name '_MFTempDisposHandle';
+{
+ * MFTopMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function MFTopMem: Ptr; external name '_MFTopMem';
+{
+ * ResrvMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure ResrvMem(cbNeeded: Size); external name '_ResrvMem';
+{
+ * DisposPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposPtr(p: Ptr); external name '_DisposPtr';
+{
+ * DisposHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposHandle(h: Handle); external name '_DisposHandle';
+{
+ * ReallocHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure ReallocHandle(h: Handle; byteCount: Size); external name '_ReallocHandle';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {OLDROUTINENAMES}
+
+{$ALIGN MAC68K}
+
+
+{unit MacOSXPosix}
+{
+ Copyright (c) 2000-2003, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+type
+ { sys/types }
+ u_quad_t = UInt64; { quads }
+ quad_t = SInt64;
+ qaddr_t = ^quad_t;
+
+ caddr_t = Ptr; { core address }
+ daddr_t = SInt32; { disk address }
+ dev_t = SInt32; { device number }
+ fixpt_t = UInt32; { fixed point number }
+ gid_t = UInt32; { group id }
+ gid_t_ptr = ^gid_t;
+ in_addr_t = UInt32; { base type for internet address }
+ in_port_t = UInt16;
+ ino_t = UInt32; { inode number }
+ key_t = SInt32; { IPC key (for Sys V IPC) }
+ mode_t = UInt16; { permissions }
+ nlink_t = UInt16; { link count }
+ off_t = quad_t; { file offset }
+ pid_t = SInt32; { process id }
+ rlim_t = quad_t; { resource limit }
+ segsz_t = SInt32; { segment size }
+ swblk_t = SInt32; { swap offset }
+ uid_t = UInt32; { user id }
+ uid_t_ptr = ^uid_t;
+ useconds_t = UInt32; { microseconds (unsigned) }
+ mach_port_name_t = UInt32; { represents a name of a port right }
+ mach_port_t = UInt32; { reference added or deleted to a port right }
+
+ type
+ sockaddr = packed record
+ sin_len: UInt8;
+ sin_family: UInt8;
+ sa_data: packed array[0..13] of UInt8;
+ end;
+ sockaddr_ptr = ^sockaddr;
+ sockaddr_in = packed record
+ sin_len: UInt8;
+ sin_family: UInt8;
+ sin_port: UInt16;
+ sin_addr: UInt32;
+ sin_zero: packed array[0..7] of UInt8;
+ end;
+ sockaddr_in_ptr = ^sockaddr_in;
+
+{unit MachineExceptions}
+{
+ File: CarbonCore/MachineExceptions.h
+
+ Contains: Processor Exception Handling Interfaces.
+
+ Version: CarbonCore-654.0.85~1
+
+ Copyright: © 1993-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN POWER}
+
+{ Some basic declarations used throughout the kernel }
+type
+ AreaID = ^SInt32; { an opaque 32-bit type }
+ AreaIDPtr = ^AreaID;
+{ Machine Dependent types for PowerPC: }
+
+{ Because a number of sources do a #define CR 13 and this file contains a struct member named CR,
+ * an obscure compilation error gets spit out. Rename the field to CRRegister. }
+
+type
+ MachineInformationPowerPCPtr = ^MachineInformationPowerPC;
+ MachineInformationPowerPC = record
+ CTR: UnsignedWide;
+ LR: UnsignedWide;
+ PC: UnsignedWide;
+ CRRegister: UInt32; { changed from CR since some folks had a #define CR 13 in their source code}
+ XER: UInt32;
+ MSR: UInt32;
+ MQ: UInt32;
+ ExceptKind: UInt32;
+ DSISR: UInt32;
+ DAR: UnsignedWide;
+ Reserved: UnsignedWide;
+ end;
+type
+ RegisterInformationPowerPCPtr = ^RegisterInformationPowerPC;
+ RegisterInformationPowerPC = record
+ R0: UnsignedWide;
+ R1: UnsignedWide;
+ R2: UnsignedWide;
+ R3: UnsignedWide;
+ R4: UnsignedWide;
+ R5: UnsignedWide;
+ R6: UnsignedWide;
+ R7: UnsignedWide;
+ R8: UnsignedWide;
+ R9: UnsignedWide;
+ R10: UnsignedWide;
+ R11: UnsignedWide;
+ R12: UnsignedWide;
+ R13: UnsignedWide;
+ R14: UnsignedWide;
+ R15: UnsignedWide;
+ R16: UnsignedWide;
+ R17: UnsignedWide;
+ R18: UnsignedWide;
+ R19: UnsignedWide;
+ R20: UnsignedWide;
+ R21: UnsignedWide;
+ R22: UnsignedWide;
+ R23: UnsignedWide;
+ R24: UnsignedWide;
+ R25: UnsignedWide;
+ R26: UnsignedWide;
+ R27: UnsignedWide;
+ R28: UnsignedWide;
+ R29: UnsignedWide;
+ R30: UnsignedWide;
+ R31: UnsignedWide;
+ end;
+type
+ FPUInformationPowerPCPtr = ^FPUInformationPowerPC;
+ FPUInformationPowerPC = record
+ Registers: array [0..31] of UnsignedWide;
+ FPSCR: UInt32;
+ Reserved: UInt32;
+ end;
+type
+ Vector128Ptr = ^Vector128;
+ Vector128 = record
+ case SInt16 of
+ 0: (
+ l: array [0..3] of UInt32;
+ );
+ 1: (
+ s: array [0..7] of UInt16;
+ );
+ 2: (
+ c: packed array [0..15] of UInt8;
+ );
+ end;
+type
+ VectorInformationPowerPCPtr = ^VectorInformationPowerPC;
+ VectorInformationPowerPC = record
+ Registers: array [0..31] of Vector128;
+ VSCR: Vector128;
+ VRsave: UInt32;
+ end;
+{ Exception related declarations }
+const
+ kWriteReference = 0;
+ kReadReference = 1;
+ kFetchReference = 2;
+ writeReference = kWriteReference; { Obsolete name}
+ readReference = kReadReference; { Obsolete name}
+ fetchReference = kFetchReference; { Obsolete name}
+
+
+type
+ MemoryReferenceKind = UInt32;
+ MemoryExceptionInformationPtr = ^MemoryExceptionInformation;
+ MemoryExceptionInformation = record
+ theArea: AreaID; { The area related to the execption, same as MPAreaID.}
+ theAddress: LogicalAddress; { The 32-bit address of the exception.}
+ theError: OSStatus; { See enum below.}
+ theReference: MemoryReferenceKind; { read, write, instruction fetch.}
+ end;
+const
+ kUnknownException = 0;
+ kIllegalInstructionException = 1;
+ kTrapException = 2;
+ kAccessException = 3;
+ kUnmappedMemoryException = 4;
+ kExcludedMemoryException = 5;
+ kReadOnlyMemoryException = 6;
+ kUnresolvablePageFaultException = 7;
+ kPrivilegeViolationException = 8;
+ kTraceException = 9;
+ kInstructionBreakpointException = 10; { Optional}
+ kDataBreakpointException = 11; { Optional}
+ kIntegerException = 12;
+ kFloatingPointException = 13;
+ kStackOverflowException = 14; { Optional, may be implemented as kAccessException on some systems.}
+ kTaskTerminationException = 15; { Obsolete}
+ kTaskCreationException = 16; { Obsolete}
+ kDataAlignmentException = 17; { May occur when a task is in little endian mode or created with kMPTaskTakesAllExceptions.}
+
+{$ifc OLDROUTINENAMES}
+const
+ unknownException = kUnknownException; { Obsolete name}
+ illegalInstructionException = kIllegalInstructionException; { Obsolete name}
+ trapException = kTrapException; { Obsolete name}
+ accessException = kAccessException; { Obsolete name}
+ unmappedMemoryException = kUnmappedMemoryException; { Obsolete name}
+ excludedMemoryException = kExcludedMemoryException; { Obsolete name}
+ readOnlyMemoryException = kReadOnlyMemoryException; { Obsolete name}
+ unresolvablePageFaultException = kUnresolvablePageFaultException; { Obsolete name}
+ privilegeViolationException = kPrivilegeViolationException; { Obsolete name}
+ traceException = kTraceException; { Obsolete name}
+ instructionBreakpointException = kInstructionBreakpointException; { Obsolete name}
+ dataBreakpointException = kDataBreakpointException; { Obsolete name}
+ integerException = kIntegerException; { Obsolete name}
+ floatingPointException = kFloatingPointException; { Obsolete name}
+ stackOverflowException = kStackOverflowException; { Obsolete name}
+ terminationException = kTaskTerminationException; { Obsolete name}
+ kTerminationException = kTaskTerminationException; { Obsolete name}
+
+{$endc} {OLDROUTINENAMES}
+
+
+type
+ ExceptionKind = UInt32;
+ ExceptionInfoPtr = ^ExceptionInfo;
+ ExceptionInfo = record
+ case SInt16 of
+ 0: (
+ memoryInfo: MemoryExceptionInformationPtr;
+ );
+ end;
+type
+ ExceptionInformationPowerPCPtr = ^ExceptionInformationPowerPC;
+ ExceptionInformationPowerPC = record
+ theKind: ExceptionKind;
+ machineState: MachineInformationPowerPCPtr;
+ registerImage: RegisterInformationPowerPCPtr;
+ FPUImage: FPUInformationPowerPCPtr;
+ info: ExceptionInfo;
+ vectorImage: VectorInformationPowerPCPtr;
+ end;
+{$ifc TARGET_CPU_PPC OR TARGET_CPU_68K}
+type
+ ExceptionInformation = ExceptionInformationPowerPC;
+ MachineInformation = MachineInformationPowerPC;
+ RegisterInformation = RegisterInformationPowerPC;
+ FPUInformation = FPUInformationPowerPC;
+ VectorInformation = VectorInformationPowerPC;
+ ExceptionInformationPtr = ^ExceptionInformation;
+ MachineInformationPtr = ^MachineInformation;
+ RegisterInformationPtr = ^RegisterInformation;
+ FPUInformationPtr = ^FPUInformation;
+ VectorInformationPtr = ^VectorInformation;
+{$endc}
+
+{$ifc TARGET_CPU_X86}
+type
+ MachineInformationIntelPtr = ^MachineInformationIntel;
+ MachineInformationIntel = record
+ CS: UInt16;
+ DS: UInt16;
+ SS: UInt16;
+ ES: UInt16;
+ FS: UInt16;
+ GS: UInt16;
+ EFLAGS: UInt32;
+ EIP: UInt32;
+ end;
+type
+ RegisterInformationIntelPtr = ^RegisterInformationIntel;
+ RegisterInformationIntel = record
+ EAX: UInt32;
+ EBX: UInt32;
+ ECX: UInt32;
+ EDX: UInt32;
+ ESI: UInt32;
+ EDI: UInt32;
+ EBP: UInt32;
+ ESP: UInt32;
+ end;
+
+type
+ FPRegIntel = packed array[0..9] of UInt8;
+type
+ FPUInformationIntel = record
+ Registers: array[0..7] of FPRegIntel;
+ Control: UInt16;
+ Status: UInt16;
+ Tag: UInt16;
+ Opcode: UInt16;
+ EIP: UInt32;
+ DP: UInt32;
+ DS: UInt32;
+ end;
+type
+ VectorInformationIntel = record
+ Registers: array[0..7] of UnsignedWide;
+ end;
+
+type
+ ExceptionInformationPtr = ^ExceptionInformation;
+ MachineInformationPtr = ^MachineInformation;
+ RegisterInformationPtr = ^RegisterInformation;
+ FPUInformationPtr = ^FPUInformation;
+ VectorInformationPtr = ^VectorInformation;
+ MachineInformation = MachineInformationIntel;
+ RegisterInformation = RegisterInformationIntel;
+ FPUInformation = FPUInformationIntel;
+ VectorInformation = VectorInformationIntel;
+ ExceptionInformation = record
+ theKind: ExceptionKind;
+ machineState: MachineInformationPtr;
+ registerImage: RegisterInformationPtr;
+ FPUImage: FPUInformationPtr;
+ info: ExceptionInfo;
+ vectorImage: VectorInformationPtr;
+ end;
+{$endc}
+
+{
+ Note: An ExceptionHandler is NOT a UniversalProcPtr, except in Carbon.
+ It must be a PowerPC function pointer with NO routine descriptor,
+ except on Carbon, where it must be a UniversalProcPtr (TPP actually)
+ to allow the interface to work from both CFM and Mach-O.
+}
+type
+ ExceptionHandlerProcPtr = function( var theException: ExceptionInformation ): OSStatus;
+ ExceptionHandlerUPP = ExceptionHandlerProcPtr;
+
+{
+ * NewExceptionHandlerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewExceptionHandlerUPP( userRoutine: ExceptionHandlerProcPtr ): ExceptionHandlerUPP; external name '_NewExceptionHandlerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeExceptionHandlerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeExceptionHandlerUPP( userUPP: ExceptionHandlerUPP ); external name '_DisposeExceptionHandlerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeExceptionHandlerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeExceptionHandlerUPP( var theException: ExceptionInformation; userRoutine: ExceptionHandlerUPP ): OSStatus; external name '_InvokeExceptionHandlerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ ExceptionHandler function pointers (TPP):
+ on classic PowerPC, use raw function pointers
+ on classic PowerPC with OPAQUE_UPP_TYPES=1, use UPP's
+ on Carbon, use UPP's
+}
+{ use UPP's}
+
+type
+ ExceptionHandlerTPP = ExceptionHandlerUPP;
+ ExceptionHandler = ExceptionHandlerTPP;
+{ Routine for installing per-process exception handlers }
+{
+ * InstallExceptionHandler()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function InstallExceptionHandler( theHandler: ExceptionHandlerTPP ): ExceptionHandlerTPP; external name '_InstallExceptionHandler';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+
+
+{unit NumberFormatting}
+{
+ File: NumberFormatting.p
+
+ Contains: Utilites for formatting numbers
+
+ Version: Universal Interfaces 3.4.2
+
+ Copyright: © 1996-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+
+ Here are the current System 7 routine names and the translations to the older forms.
+ Please use the newer forms in all new code and migrate the older names out of existing
+ code as maintainance permits.
+
+ New Name Old Name(s)
+
+ ExtendedToString FormatX2Str
+ FormatRecToString Format2Str
+ NumToString
+ StringToExtended FormatStr2X
+ StringToFormatRec Str2Format
+ StringToNum
+
+}
+
+type
+ NumFormatStringPtr = ^NumFormatString;
+ NumFormatString = packed record
+ fLength: UInt8;
+ fVersion: UInt8;
+ data: packed array [0..253] of char; { private data }
+ end;
+
+ NumFormatStringRec = NumFormatString;
+ NumFormatStringRecPtr = ^NumFormatStringRec;
+ FormatStatus = SInt16;
+
+const
+ fVNumber = 0; { first version of NumFormatString }
+
+
+type
+ FormatClass = SInt8;
+
+const
+ fPositive = 0;
+ fNegative = 1;
+ fZero = 2;
+
+
+type
+ FormatResultType = SInt8;
+
+const
+ fFormatOK = 0;
+ fBestGuess = 1;
+ fOutOfSynch = 2;
+ fSpuriousChars = 3;
+ fMissingDelimiter = 4;
+ fExtraDecimal = 5;
+ fMissingLiteral = 6;
+ fExtraExp = 7;
+ fFormatOverflow = 8;
+ fFormStrIsNAN = 9;
+ fBadPartsTable = 10;
+ fExtraPercent = 11;
+ fExtraSeparator = 12;
+ fEmptyFormatString = 13;
+
+
+type
+ FVectorPtr = ^FVector;
+ FVector = record
+ start: SInt16;
+ length: SInt16;
+ end;
+
+ { index by [fPositive..fZero] }
+ TripleInt = array [0..2] of FVector;
+ {
+ * StringToNum()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure StringToNum(const (*var*) theString: Str255; var theNum: SInt32); external name '_StringToNum';
+
+{
+ * NumToString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure NumToString(theNum: SInt32; var theString: Str255); external name '_NumToString';
+
+{
+ * ExtendedToString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ExtendedToString(const (*var*) x: extended80; const (*var*) myCanonical: NumFormatString; const (*var*) partsTable: NumberParts; var outString: Str255): FormatStatus; external name '_ExtendedToString';
+{
+ * StringToExtended()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function StringToExtended(const (*var*) source: Str255; const (*var*) myCanonical: NumFormatString; const (*var*) partsTable: NumberParts; var x: extended80): FormatStatus; external name '_StringToExtended';
+{
+ * StringToFormatRec()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function StringToFormatRec(const (*var*) inString: Str255; const (*var*) partsTable: NumberParts; var outString: NumFormatString): FormatStatus; external name '_StringToFormatRec';
+{
+ * FormatRecToString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FormatRecToString(const (*var*) myCanonical: NumFormatString; const (*var*) partsTable: NumberParts; var outString: Str255; var positions: TripleInt): FormatStatus; external name '_FormatRecToString';
+{$ifc OLDROUTINENAMES}
+{$endc} {OLDROUTINENAMES}
+
+{$ALIGN MAC68K}
+
+
+{unit OSAComp}
+{
+ File: OSAComp.p
+
+ Contains: AppleScript Component Implementor's Interfaces.
+
+ Version: Technology: AppleScript 1.1
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1992-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{*************************************************************************
+ Types and Constants
+*************************************************************************}
+{*************************************************************************
+ Routines for Associating a Storage Type with a Script Data Handle
+*************************************************************************}
+{
+ * OSAGetStorageType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetStorageType(scriptData: AEDataStorage; var dscType: DescType): OSErr; external name '_OSAGetStorageType';
+
+{
+ * OSAAddStorageType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAAddStorageType(scriptData: AEDataStorage; dscType: DescType): OSErr; external name '_OSAAddStorageType';
+
+{
+ * OSARemoveStorageType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSARemoveStorageType(scriptData: AEDataStorage): OSErr; external name '_OSARemoveStorageType';
+
+{$ALIGN MAC68K}
+
+
+{unit OpenTransport}
+{
+ File: OT/OpenTransport.h
+
+ Contains: Open Transport client interface file.
+
+ Version: OpenTransport-97~544
+
+ Copyright: © 1985-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{
+ All OpenTransport Manager APIs are deprecated in MacOSX 10.4, instead of using OpenTransport,
+ consider using CFNetwork or socket library.
+}
+{
+ The following table shows how to map from the old (pre-Universal
+ Interfaces) header file name to the equivalent Universal Interfaces
+ header file name.
+ Old Header New Header
+ ---------- ----------
+ cred.h OpenTransportProtocol.h
+ dlpi.h OpenTransportProtocol.h
+ miioccom.h OpenTransportProtocol.h
+ mistream.h OpenTransportProtocol.h/OpenTransportKernel.h
+ modnames.h OpenTransportProtocol.h
+ OpenTptAppleTalk.h OpenTransportProviders.h
+ OpenTptClient.h OpenTransportProtocol.h
+ OpenTptCommon.h OpenTransportProtocol.h
+ OpenTptConfig.h OpenTransportProtocol.h
+ OpenTptDevLinks.h OpenTransportProviders.h
+ OpenTptInternet.h OpenTransportProviders.h
+ OpenTptISDN.h OpenTransportProviders.h
+ OpenTptLinks.h OpenTransportProviders.h
+ OpenTptModule.h OpenTransportKernel.h
+ OpenTptPCISupport.h OpenTransportKernel.h
+ OpenTptSerial.h OpenTransportProviders.h
+ OpenTptXTI.h OpenTransportUNIX.r
+ OpenTransport.h OpenTransport.h
+ OpenTransport.r OpenTransport.r
+ OTConfig.r OpenTransportProtocol.r
+ OTDebug.h OpenTransport.h
+ OTSharedLibs.h OpenTransportProviders.h
+ strlog.h OpenTransportProtocol.h/OpenTransportKernel.h
+ stropts.h OpenTransportProtocol.h/OpenTransportUNIX.h
+ strstat.h OpenTransportProtocol.h
+ tihdr.h OpenTransportProtocol.h
+}
+
+
+{$ALIGN MAC68K}
+
+{ ***** Setup Default Compiler Variables *****}
+
+{
+ OTKERNEL is used to indicate whether the code is being built
+ for the kernel environment. It defaults to 0. If you include
+ "OpenTransportKernel.h" before including this file,
+ it will be 1 and you will only be able to see stuff available
+ to kernel code.
+}
+
+{$ifc undefined OTKERNEL}
+{$setc OTKERNEL := 0}
+{$endc}
+
+{
+ OTUNIXERRORS determines whether this file defines a bunch of
+ common UNIX error codes, like EPERM. Typically, client code does
+ not want to do this because of the possibility of a clash with
+ other code modules, like the standard C libraries, that also
+ defines these routines. However, client code can turn it on to
+ get these definitions. This might be done by protocol stack
+ infrastructure, or some other low-level code.
+ "OpenTransportKernel.i" sets this flag before include
+ "OpenTransport.h" because kernel modules typically need these
+ error codes. Note that kernel modules shouldn't be including
+ standard C libraries, so this is rarely a problem.
+ In general, the clash between OT and standard C definitions
+ of these error codes is rarely a problem becasue both OT
+ and the C libraries define them to have the same value. But
+ I'm sure this check is useful to some people.
+}
+{$ifc undefined OTUNIXERRORS}
+{$setc OTUNIXERRORS := 0}
+{$endc}
+
+{
+ OTDEBUG is used to control the behaviour of the OT debugging
+ macros. If you set it to non-zero, the macros will generate code
+ that drops you into the debugger. If you set it to 0, or leave it
+ undefined, the macros are compiled out.
+ Setting up this compiler variable is a little tricky because previous
+ versions of the OT interfaces used a different variable, qDebug.
+ We replaced qDebug with OTDEBUG because qDebug does not fit into
+ the OT namespace. But I didn't want to break a lot of currently
+ building code. The following tricky compiler variable footwork
+ avoids this.
+ There are four outcomes when this code is compiled, depending on
+ whether qDebug and OTDEBUG are defined beforehand. The following
+ table shows the outcome in each case.
+ qDebug OTDEBUG Outcome Explanation
+ ------ ------- ------- -----------
+ defined defined OTDEBUG wins Mixed legacy and new code, we believe the new code.
+ defined undefined qDebug wins Legacy code.
+ undefined defined OTDEBUG wins New code.
+ undefined undefined no debugging No debugging.
+}
+{$ifc not undefined qDebug}
+{$ifc undefined OTDEBUG}
+{$setc OTDebug := qDebug}
+{$endc}
+{$endc}
+
+{$ifc undefined OTDEBUG}
+{$setc OTDEBUG := 0}
+{$endc}
+
+{ Carbon Applications have some restrictions on using OT }
+{$ifc undefined OTCARBONAPPLICATION}
+{$setc OTCARBONAPPLICATION := 0}
+{$endc}
+
+{
+ ***** Normalise 68K Calling C Conventions *****
+ Define special types that handle the difference in parameter passing
+ between different Mac OS C compilers when generating 68K code. OT
+ exports C calling conventions routines, and various C compilers use
+ various different conventions. Differences in the placement of the result
+ are covered above, where we output pragma pointers_in_D0. The other big
+ difference is how the compilers pass integer parameters less than 32 bits.
+ The MPW compiler always extends these to 32 bits; other compilers simply
+ push a value of the appropriate size. We overcome this difference by
+ defining special OTFooParam types, which are only used when passing
+ sub 32 bit values to routines. They are always defined to a 32 bit
+ size, which makes all the compilers do the same thing.
+ One weird consequence of this is that in more strict type checking
+ languages (eg Pascal) OTBooleanParam is not compatible with Boolean.
+ Sorry.
+}
+
+
+{
+ Large tracts of OT source still uses boolean_p etc.
+ So we continue to define the old types for Apple
+ clients. The long term fix is to remove all the
+ uses of these type from the OT source, but that's
+ beyond the scope of my work right now.
+}
+type
+ OTUInt8Param = UInt8;
+ OTUInt16Param = UInt16;
+ OTSInt16Param = SInt16;
+ OTSInt8Param = SInt8;
+ OTBooleanParam = Boolean;
+
+type
+ OTByteCount = ByteCount;
+ OTItemCount = ItemCount;
+ OTInt32 = SInt32;
+ OTUInt32 = UInt32;
+
+{ ***** C++ Support *****}
+
+{
+ Setup _MDECL to be _cdecl when compiling C++ code with
+ compilers that support it, or nothing otherwise.
+}
+
+
+{ ***** Shared Library Prefixes *****}
+
+
+const
+ kOTLibraryVersion = '1.1';
+
+const
+ kOTLibraryPrefix = 'OTLib$';
+const
+ kOTModulePrefix = 'OTModl$';
+const
+ kOTClientPrefix = 'OTClnt$';
+const
+ kOTKernelPrefix = 'OTKrnl$';
+
+const
+ kOTCFMClass = $6F74616E (* 'otan' *);
+
+{ ***** Miscellaneous Type Definitions *****}
+
+{ A millisecond timeout value}
+type
+ OTTimeout = UInt32;
+{ An ID number in connections/transactions }
+type
+ OTSequence = SInt32;
+{ An ID number for registered names }
+type
+ OTNameID = SInt32;
+{
+ A protocol-specific reason code for failure.
+ Usually a Unix-style positive error code.
+}
+type
+ OTReason = SInt32;
+{ Number of outstanding connection requests at a time.}
+type
+ OTQLen = UInt32;
+{ Will become internationalizeable shortly (yeah, right).}
+type
+ OTClientName = UInt8Ptr;
+{ The command code in STREAMS messages.}
+type
+ OTCommand = SInt32;
+{ value describing a client}
+type
+ OTClient = ^SInt32; { an opaque 32-bit type }
+ OTClientPtr = ^OTClient;
+
+{
+ OT now defines its own version of the standard C "offsetof"
+ macro so as to avoid including <stddef.h>.
+}
+// #define OTOffsetOf(structure,field) ((ByteCount)&((structure *) 0)->field)
+
+{ ***** Debugging Macros *****}
+
+
+const
+ kOTFatalErr = 'FB ';
+const
+ kOTNonfatalErr = 'NB ';
+const
+ kOTExtFatalErr = 'FX ';
+const
+ kOTExtNonfatalErr = 'NX ';
+const
+ kOTUserFatalErr = 'UF ';
+const
+ kOTUserErr = 'UE ';
+const
+ kOTUserNonfatalErr = 'UE ';
+const
+ kOTInfoErr = 'IE ';
+const
+ kOTInfoBreak = 'IN ';
+
+
+{
+ ***** Flags Used When Opening Providers *****
+ Important
+ OT does not currently support any of these flags. You should
+ always pass 0 to a parameter of type OTOpenFlags. If you need
+ to modify the mode of operation of a provider, use OTSetBlocking,
+ OTSetSynchronous, etc.
+}
+type
+ OTOpenFlags = UInt32;
+const
+ kO_ASYNC = $01;
+ kO_NDELAY = $04;
+ kO_NONBLOCK = $04;
+
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ BSD defines O_ASYNC, O_NDELAY and O_NONBLOCK in fcntl.h
+ Use kO_ASYNC, kO_NDELAY and kO_NONBLOCK in the unlikely event you need the OT value in Carbon
+}
+const
+ O_ASYNC = $01;
+ O_NDELAY = $04;
+ O_NONBLOCK = $04;
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{ ***** UNIX-Style Error Codes *****}
+
+type
+ OTUnixErr = UInt16;
+{
+ These definitions are only compiled if you're building kernel code
+ or you explicit request them by setting OTUNIXERRORS. See the
+ description of these compiler variables, given above.
+}
+{$ifc OTKERNEL OR OTUNIXERRORS}
+{
+ There may be some error code confusions with other compiler vendor header
+ files - However, these match both MPW and AIX definitions.
+}
+{
+ First we undefine the #defined ones we know about so that we can put them
+ in an enum. Of course, this is only going to work in C, but hopefully
+ other languages won't have these symbols overloaded.
+}
+
+
+const
+ EPERM = 1; { Permission denied }
+ ENOENT = 2; { No such file or directory }
+ ENORSRC = 3; { No such resource }
+ EINTR = 4; { Interrupted system service }
+ EIO = 5; { I/O error }
+ ENXIO = 6; { No such device or address }
+ EBADF = 9; { Bad file number }
+ EAGAIN = 11; { Try operation again later }
+ ENOMEM = 12; { Not enough space }
+ EACCES = 13; { Permission denied }
+ EFAULT = 14; { Bad address }
+ EBUSY = 16; { Device or resource busy }
+ EEXIST = 17; { File exists }
+ ENODEV = 19; { No such device }
+ EINVAL = 22; { Invalid argument }
+ ENOTTY = 25; { Not a character device }
+ EPIPE = 32; { Broken pipe }
+ ERANGE = 34; { Math result not representable }
+ EDEADLK = 35; { Call would block so was aborted }
+ EWOULDBLOCK = 35; { Or a deadlock would occur }
+ EALREADY = 37;
+ ENOTSOCK = 38; { Socket operation on non-socket }
+ EDESTADDRREQ = 39; { Destination address required }
+ EMSGSIZE = 40; { Message too long }
+ EPROTOTYPE = 41; { Protocol wrong type for socket }
+ ENOPROTOOPT = 42; { Protocol not available }
+ EPROTONOSUPPORT = 43; { Protocol not supported }
+ ESOCKTNOSUPPORT = 44; { Socket type not supported }
+ EOPNOTSUPP = 45; { Operation not supported on socket }
+ EADDRINUSE = 48; { Address already in use }
+ EADDRNOTAVAIL = 49; { Can't assign requested address }
+ ENETDOWN = 50; { Network is down }
+ ENETUNREACH = 51; { Network is unreachable }
+ ENETRESET = 52; { Network dropped connection on reset }
+ ECONNABORTED = 53; { Software caused connection abort }
+ ECONNRESET = 54; { Connection reset by peer }
+ ENOBUFS = 55; { No buffer space available }
+ EISCONN = 56; { Socket is already connected }
+ ENOTCONN = 57; { Socket is not connected }
+ ESHUTDOWN = 58; { Can't send after socket shutdown }
+ ETOOMANYREFS = 59; { Too many references: can't splice }
+ ETIMEDOUT = 60; { Connection timed out }
+ ECONNREFUSED = 61; { Connection refused }
+ EHOSTDOWN = 64; { Host is down }
+ EHOSTUNREACH = 65; { No route to host }
+ EPROTO = 70; { STREAMS protocol error }
+ ETIME = 71;
+ ENOSR = 72;
+ EBADMSG = 73;
+ ECANCEL = 74;
+ ENOSTR = 75;
+ ENODATA = 76;
+ EINPROGRESS = 77;
+ ESRCH = 78;
+ ENOMSG = 79;
+ ELASTERRNO = 79;
+
+{$endc}
+
+{ ***** Open Transport/XTI Error codes *****}
+type
+ OTXTIErr = UInt16;
+const
+ TSUCCESS = 0; { No Error occurred }
+ TBADADDR = 1; { A Bad address was specified }
+ TBADOPT = 2; { A Bad option was specified }
+ TACCES = 3; { Missing access permission }
+ TBADF = 4; { Bad provider reference }
+ TNOADDR = 5; { No address was specified }
+ TOUTSTATE = 6; { Call issued in wrong state }
+ TBADSEQ = 7; { Sequence specified does not exist }
+ TSYSERR = 8; { A system error occurred }
+ TLOOK = 9; { An event occurred - call Look() }
+ TBADDATA = 10; { An illegal amount of data was specified }
+ TBUFOVFLW = 11; { Passed buffer not big enough }
+ TFLOW = 12; { Provider is flow-controlled }
+ TNODATA = 13; { No data available for reading }
+ TNODIS = 14; { No disconnect indication available }
+ TNOUDERR = 15; { No Unit Data Error indication available }
+ TBADFLAG = 16; { A Bad flag value was supplied }
+ TNOREL = 17; { No orderly release indication available }
+ TNOTSUPPORT = 18; { Command is not supported }
+ TSTATECHNG = 19; { State is changing - try again later }
+ TNOSTRUCTYPE = 20; { Bad structure type requested for OTAlloc }
+ TBADNAME = 21; { A bad endpoint name was supplied }
+ TBADQLEN = 22; { A Bind to an in-use address with qlen > 0}
+ TADDRBUSY = 23; { Address requested is already in use }
+ TINDOUT = 24; { Accept failed because of pending listen }
+ TPROVMISMATCH = 25; { Tried to accept on incompatible endpoint }
+ TRESQLEN = 26;
+ TRESADDR = 27;
+ TQFULL = 28;
+ TPROTO = 29; { An unspecified provider error occurred }
+ TBADSYNC = 30; { A synchronous call at interrupt time }
+ TCANCELED = 31; { The command was cancelled }
+ TLASTXTIERROR = 31;
+
+{
+ ***** Mac OS Error Codes *****
+ Most OT client routines return an OSStatus error code, a 32 bit type
+ defined in "MacTypes.h". The OT-unique error code values are
+ defined below. Many of these are generated by remapping XTI error
+ codes (Txxxx) and UNIX error codes (Exxxx) to a reserved range
+ in the OSStatus space.
+ Some routines return an OTResult type, indicating
+ that the routine might fail with a negative error, succeed with noErr,
+ or possible return a positive value indicating some status.
+}
+
+type
+ OTResult = SInt32;
+
+{
+ * These map the Open Transport/XTI errors (the Txxxx error codes), and the
+ * StdCLib Exxxx error codes into unique spaces in the Mac OS OSStatus space.
+ }
+// #define XTI2OSStatus(x) (-3149 - (x))
+// #define E2OSStatus(x) (-3199 - (x))
+
+// #define OSStatus2XTI(x) ((OTXTIErr)(-3149 - (x)))
+// #define OSStatus2E(x) ((OTUnixErr)(-3199 - (x)))
+
+// #define IsXTIError(x) ((x) < -3149 && (x) >= (-3149 - TLASTXTIERROR))
+// #define IsEError(x) ((x) < -3199 && (x) >= (-3199 - ELASTERRNO))
+
+{ ***** OTAddress *****}
+
+{
+ OTAddress type defines the standard header for all OT address formats.
+ It consists of one 16 bit integer, which defines the address format
+ used, followed by an arbitrary number of bytes which are protocol-specific.
+ Conceptually, all OT address formats are subtypes of this type,
+ extended with fields that are specific to the protocol. For example,
+ OTInetAddress starts with the OTAddressType field and then continues
+ to include a host IP address and a port number.
+}
+
+const
+ kOTGenericName = 0; { Protocol specific data is just a string, interpreted in a protocol-specific fashion.}
+
+type
+ OTAddressType = UInt16;
+ OTAddressPtr = ^OTAddress;
+ OTAddress = record
+ fAddressType: OTAddressType; { The address format of this address...}
+ fAddress: packed array[0..0] of UInt8; { ... followed by protocol specific address information.}
+ end;
+{
+ ***** OTAlloc Constants *****
+ Note:
+ In general, Apple recommends that you avoid the OTAlloc call because
+ using it extensively causes your program to allocate and deallocate
+ many memory blocks, with each extra memory allocation costing time.
+}
+{
+ OTStructType defines the structure type to be allocated using the OTAlloc
+ call.
+}
+const
+ T_BIND = 1;
+ T_OPTMGMT = 2;
+ T_CALL = 3;
+ T_DIS = 4;
+ T_UNITDATA = 5;
+ T_UDERROR = 6;
+ T_INFO = 7;
+ T_REPLYDATA = 8;
+ T_REQUESTDATA = 9;
+ T_UNITREQUEST = 10;
+ T_UNITREPLY = 11;
+
+
+type
+ OTStructType = UInt32;
+{
+ These values are used in the "fields" parameter of the OTAlloc call
+ to define which fields of the structure should be allocated.
+}
+const
+ T_ADDR = $01;
+ T_OPT = $02;
+ T_UDATA = $04;
+ T_ALL = $FFFF;
+
+type
+ OTFieldsType = UInt32;
+{ ***** OTFlags *****}
+{
+ This type is used to describe bitwise flags in OT data structures
+ and parameters. Think of it as the OT analogue to the OptionBits
+ type in "MacTypes.h".
+}
+
+type
+ OTFlags = UInt32;
+{
+ These flags are used when sending and receiving data. The
+ constants defined are masks.
+}
+const
+ T_MORE = $0001; { More data to come in message }
+ T_EXPEDITED = $0002; { Data is expedited, if possible }
+ T_ACKNOWLEDGED = $0004; { Acknowledge transaction }
+ T_PARTIALDATA = $0008; { Partial data - more coming }
+ T_NORECEIPT = $0010; { No event on transaction done }
+ T_TIMEDOUT = $0020; { Reply timed out }
+
+{ These flags are used in the TOptMgmt structure to request services.}
+
+const
+ T_NEGOTIATE = $0004;
+ T_CHECK = $0008;
+ T_DEFAULT = $0010;
+ T_CURRENT = $0080;
+
+{
+ These flags are used in the TOptMgmt and TOption structures to
+ return results.
+}
+
+const
+ T_SUCCESS = $0020;
+ T_FAILURE = $0040;
+ T_PARTSUCCESS = $0100;
+ T_READONLY = $0200;
+ T_NOTSUPPORT = $0400;
+
+{
+ ***** OTBand *****
+ A band is a STREAMS concepts which defines the priority of data
+ on a stream. Although this type is defined as a 32 bit number
+ for efficiency's sake, bands actually only range from 0 to 255.
+ Typically band 0 is used for normal data and band 1 for expedited data.
+}
+type
+ OTBand = UInt32;
+{ ***** Object References *****}
+{
+ This deserves some explanation. If you're compiling for
+ C++, the C++ definitions of TEndpoint and TMapper at the
+ end of this file are invoked, which lets the compiler
+ know that they are both subclasses of TProvider. This
+ way the compiler will do the right subclass type checking,
+ ie you will be able to pass an EndpointRef to a parameter
+ of type ProviderRef, but not vice versa.
+ On the other hand, if your compiling for straighth C,
+ everything is defined as void. This is somewhat dangerous,
+ but it prevents you have to cast an EndpointRef to a
+ ProviderRef every time you call a function that works
+ on all forms of providers.
+}
+type
+ ProviderRef = ^SInt32; { an opaque 32-bit type }
+ ProviderRefPtr = ^ProviderRef;
+ EndpointRef = ProviderRef; { an opaque 32-bit type }
+ EndpointRefPtr = ^EndpointRef;
+ MapperRef = ProviderRef; { an opaque 32-bit type }
+ MapperRefPtr = ^MapperRef;
+
+const
+ kOTInvalidRef = nil;
+ kOTInvalidProviderRef = nil;
+ kOTInvalidEndpointRef = nil;
+ kOTInvalidMapperRef = nil;
+{ ***** Event Codes *****}
+{
+ OT event codes values for Open Transport. These are the event codes that
+ are sent to notification routine (notifiers).
+}
+
+type
+ OTEventCode = UInt32;
+{
+ Events are divided into numerous categories:
+
+ 1. (0x0000xxxx) The core XTI events have identifiers of the form
+ T_XXXX. These signal that an XTI event has occured on a stream.
+ 2. (0x1000xxxx) Private events are reserved for protocol specific
+ events. Each protocol stack defines them as appropriate for
+ its own usage.
+ 3. (0x2000xxxxx) Completion events have identifiers of the form
+ T_XXXXCOMPLETE. These signal the completion of some asynchronous
+ API routine, and are only delivered if the endpoint is in asynchronous
+ mode.
+ 4. (0x2100xxxx) Stream events are generally encountered when programming
+ the raw streams API and indicate some event on a raw stream, or
+ some other event of interest in the STREAMS kernel.
+ 5. (0x2200xxxx) Signal events indicate that a signal has arrived on
+ a raw stream. See "Signal Values" for details.
+ 6. (0x2300xxxx) General provider events that might be generated by any
+ provider.
+ 7. (0x2400xxxx) System events sent to all providers.
+ 8. (0x2500xxxx) System events sent to registered clients.
+ 9. (0x2600xxxx) System events used by configurators.
+ 10. (0x2700xxxx) Events sent to registered OT clients.
+}
+{
+ All event codes not described here are reserved by Apple. If you receive
+ an event code you do not understand, ignore it!
+}
+
+const
+ T_LISTEN = $0001; { An connection request is available }
+ T_CONNECT = $0002; { Confirmation of a connect request }
+ T_DATA = $0004; { Standard data is available }
+ T_EXDATA = $0008; { Expedited data is available }
+ T_DISCONNECT = $0010; { A disconnect is available }
+ T_ERROR = $0020; { obsolete/unused in library }
+ T_UDERR = $0040; { A Unit Data Error has occurred }
+ T_ORDREL = $0080; { An orderly release is available }
+ T_GODATA = $0100; { Flow control lifted on standard data }
+ T_GOEXDATA = $0200; { Flow control lifted on expedited data}
+ T_REQUEST = $0400; { An Incoming request is available }
+ T_REPLY = $0800; { An Incoming reply is available }
+ T_PASSCON = $1000; { State is now T_DATAXFER }
+ T_RESET = $2000; { Protocol has been reset }
+ kPRIVATEEVENT = $10000000; { Base of the private event range.}
+ kCOMPLETEEVENT = $20000000; { Base of the completion event range.}
+ T_BINDCOMPLETE = $20000001; { Bind call is complete }
+ T_UNBINDCOMPLETE = $20000002; { Unbind call is complete }
+ T_ACCEPTCOMPLETE = $20000003; { Accept call is complete }
+ T_REPLYCOMPLETE = $20000004; { SendReply call is complete }
+ T_DISCONNECTCOMPLETE = $20000005; { Disconnect call is complete }
+ T_OPTMGMTCOMPLETE = $20000006; { OptMgmt call is complete }
+ T_OPENCOMPLETE = $20000007; { An Open call is complete }
+ T_GETPROTADDRCOMPLETE = $20000008; { GetProtAddress call is complete }
+ T_RESOLVEADDRCOMPLETE = $20000009; { A ResolveAddress call is complet }
+ T_GETINFOCOMPLETE = $2000000A; { A GetInfo call is complete }
+ T_SYNCCOMPLETE = $2000000B; { A Sync call is complete }
+ T_MEMORYRELEASED = $2000000C; { No-copy memory was released }
+ T_REGNAMECOMPLETE = $2000000D; { A RegisterName call is complete }
+ T_DELNAMECOMPLETE = $2000000E; { A DeleteName call is complete }
+ T_LKUPNAMECOMPLETE = $2000000F; { A LookupName call is complete }
+ T_LKUPNAMERESULT = $20000010; { A LookupName is returning a name }
+ kOTSyncIdleEvent = $20000011; { Synchronous call Idle event }
+ kSTREAMEVENT = $21000000; { Base of the raw stream event range.}
+ kOTReservedEvent1 = $21000001; { reserved for internal use by OT }
+ kGetmsgEvent = $21000002; { A GetMessage call is complete }
+ kStreamReadEvent = $21000003; { A Read call is complete }
+ kStreamWriteEvent = $21000004; { A Write call is complete }
+ kStreamIoctlEvent = $21000005; { An Ioctl call is complete }
+ kOTReservedEvent2 = $21000006; { reserved for internal use by OT }
+ kStreamOpenEvent = $21000007; { An OpenStream call is complete }
+ kPollEvent = $21000008; { A Poll call is complete }
+ kOTReservedEvent3 = $21000009; { reserved for internal use by OT }
+ kOTReservedEvent4 = $2100000A; { reserved for internal use by OT }
+ kOTReservedEvent5 = $2100000B; { reserved for internal use by OT }
+ kOTReservedEvent6 = $2100000C; { reserved for internal use by OT }
+ kOTReservedEvent7 = $2100000D; { reserved for internal use by OT }
+ kOTReservedEvent8 = $2100000E; { reserved for internal use by OT }
+ kSIGNALEVENT = $22000000; { A signal has arrived on a raw stream, see "Signal Values" below.}
+ kPROTOCOLEVENT = $23000000; { Some event from the protocols }
+ kOTProviderIsDisconnected = $23000001; { Provider is temporarily off-line }
+ kOTProviderIsReconnected = $23000002; { Provider is now back on-line }
+ kOTProviderWillClose = $24000001; { Provider will close immediately }
+ kOTProviderIsClosed = $24000002; { Provider was closed }
+ kOTPortDisabled = $25000001; { Port is now disabled, result is 0, cookie is port ref }
+ kOTPortEnabled = $25000002; { Port is now enabled, result is 0, cookie is port ref }
+ kOTPortOffline = $25000003; { Port is now offline, result is 0, cookie is port ref }
+ kOTPortOnline = $25000004; { Port is now online, result is 0, cookie is port ref }
+ kOTClosePortRequest = $25000005; { Request to close/yield, result is reason, cookie is OTPortCloseStruct* }
+ kOTYieldPortRequest = $25000005; { Request to close/yield, result is reason, cookie is OTPortCloseStruct* }
+ kOTNewPortRegistered = $25000006; { New port has been registered, cookie is port ref }
+ kOTPortNetworkChange = $25000007; { Port may have moved to a new network, result is 0, cookie is port ref }
+ kOTConfigurationChanged = $26000001; { Protocol configuration changed }
+ kOTSystemSleep = $26000002;
+ kOTSystemShutdown = $26000003;
+ kOTSystemAwaken = $26000004;
+ kOTSystemIdle = $26000005;
+ kOTSystemSleepPrep = $26000006;
+ kOTSystemShutdownPrep = $26000007;
+ kOTSystemAwakenPrep = $26000008;
+ kOTStackIsLoading = $27000001; { Sent before Open Transport attempts to load the TCP/IP protocol stack.}
+ kOTStackWasLoaded = $27000002; { Sent after the TCP/IP stack has been successfully loaded.}
+ kOTStackIsUnloading = $27000003; { Sent before Open Transport unloads the TCP/IP stack.}
+
+
+{
+ The following event codes are used internally by Open Transport
+ but not documented to developers. I had to remove them from the
+ above list because Interfacer won't let me put a hard conditional
+ inside an enum declaration.
+}
+const
+ kOTDisablePortEvent = $21000001;
+ kStreamCloseEvent = $21000006;
+ kBackgroundStreamEvent = $21000009;
+ kIoctlRecvFdEvent = $2100000A;
+ kOTTryShutdownEvent = $2100000B; { probably not used by current OT (2.5)}
+ kOTScheduleTerminationEvent = $2100000C;
+ kOTEnablePortEvent = $2100000D;
+ kOTNewPortRegisteredEvent = $2100000E;
+ kOTPortOfflineEvent = $2100000F;
+ kOTPortOnlineEvent = $21000010;
+ kOTPortNetworkChangeEvent = $21000011;
+
+
+{ ***** Event Classification Macros ***** }
+
+// #define IsOTPrivateEvent(x) (((x) & 0x70000000L) == kPRIVATEEVENT)
+// #define IsOTCompleteEvent(x) (((x) & 0x7f000000L) == kCOMPLETEEVENT)
+// #define IsOTProtocolEvent(x) (((x) & 0x7f000000L) == kPROTOCOLEVENT)
+// #define IsOTStreamEvent(x) (((x) & 0x7f000000L) == kSTREAMEVENT)
+// #define IsOTSignalEvent(x) (((x) & 0x7f000000L) == kSIGNALEVENT)
+// #define GetOTEventCode(x) (x)
+
+{
+ ***** Signal Values *****
+ Signals that are generated by a raw stream. When writing a notifier
+ for a raw stream, add these values to kSIGNALEVENT to determine what
+ event you are receiving.
+}
+
+const
+ kSIGHUP = 1;
+ kSIGURG = 16;
+ kSIGPOLL = 30;
+
+const
+ SIGHUP = 1;
+const
+ SIGURG = 16;
+
+{
+ ***** Notifier Type Definition *****
+ Open Transport notifiers must conform to the OTNotifyProcPtr prototype.
+ Even though a OTNotifyUPP is a OTNotifyProcPtr on pre-Carbon system,
+ use NewOTNotifyUPP() and friends to make your source code portable to OS X and Carbon.
+}
+
+type
+ OTNotifyProcPtr = procedure( contextPtr: UnivPtr; code: OTEventCode; result: OTResult; cookie: UnivPtr );
+ OTNotifyUPP = OTNotifyProcPtr;
+{
+ * NewOTNotifyUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewOTNotifyUPP( userRoutine: OTNotifyProcPtr ): OTNotifyUPP; external name '_NewOTNotifyUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeOTNotifyUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeOTNotifyUPP( userUPP: OTNotifyUPP ); external name '_DisposeOTNotifyUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeOTNotifyUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeOTNotifyUPP( contextPtr: UnivPtr; code: OTEventCode; result: OTResult; cookie: UnivPtr; userUPP: OTNotifyUPP ); external name '_InvokeOTNotifyUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{ ***** Option Management Definitions *****}
+{ The XTI Level number of a protocol.}
+const
+ XTI_GENERIC = $FFFF; { level for XTI options }
+
+type
+ OTXTILevel = UInt32;
+{ The XTI name of a protocol option.}
+type
+ OTXTIName = UInt32;
+{ XTI names for options used with XTI_GENERIC above}
+const
+ XTI_DEBUG = $0001;
+ XTI_LINGER = $0080;
+ XTI_RCVBUF = $1002;
+ XTI_RCVLOWAT = $1004;
+ XTI_SNDBUF = $1001;
+ XTI_SNDLOWAT = $1003;
+ XTI_PROTOTYPE = $1005;
+ OPT_CHECKSUM = $0600; { Set checksumming = UInt32 - 0 or 1)}
+ OPT_RETRYCNT = $0601; { Set a retry counter = UInt32 (0 = infinite)}
+ OPT_INTERVAL = $0602; { Set a retry interval = UInt32 milliseconds}
+ OPT_ENABLEEOM = $0603; { Enable the EOM indication = UInt8 (0 or 1)}
+ OPT_SELFSEND = $0604; { Enable Self-sending on broadcasts = UInt32 (0 or 1)}
+ OPT_SERVERSTATUS = $0605; { Set Server Status (format is proto dependent)}
+ OPT_ALERTENABLE = $0606; { Enable/Disable protocol alerts}
+ OPT_KEEPALIVE = $0008; { See t_keepalive structure}
+
+{ ***** Ioctl Definitions *****}
+
+{
+ All OT ioctl numbers are formed using the MIOC_CMD macro,
+ which divides the ioctl space by protocol space (the
+ first parameter) and ioctl number within that protocol
+ space (the second parameter). This macro is only available
+ to C users but it's relatively easy to synthesise its
+ results in other languages.
+}
+// #define MIOC_CMD(t,v) ((((t)&0xFF) << 8) | ((v)&0xFF))
+
+{ The following is a registry of the ioctls protocol spaces.}
+
+const
+ MIOC_STREAMIO = 65; { Basic Stream ioctl() cmds - I_PUSH, I_LOOK, etc. }
+ MIOC_TMOD = 97; { ioctl's for tmod test module }
+ MIOC_STRLOG = 98; { ioctl's for Mentat's log device }
+ MIOC_ND = 99; { ioctl's for Mentat's nd device }
+ MIOC_ECHO = 100; { ioctl's for Mentat's echo device }
+ MIOC_TLI = 101; { ioctl's for Mentat's timod module }
+ MIOC_RESERVEDf = 102; { reserved, used by SVR4 FIOxxx }
+ MIOC_SAD = 103; { ioctl's for Mentat's sad module }
+ MIOC_ARP = 104; { ioctl's for Mentat's arp module }
+ MIOC_HAVOC = 72; { Havoc module ioctls. }
+ MIOC_RESERVEDi = 105; { reserved, used by SVR4 SIOCxxx }
+ MIOC_SIOC = 106; { sockio.h socket ioctl's }
+ MIOC_TCP = 107; { tcp.h ioctl's }
+ MIOC_DLPI = 108; { dlpi.h additions }
+ MIOC_SOCKETS = 109; { Mentat sockmod ioctl's }
+ MIOC_IPX = 111; { ioctls for IPX }
+ MIOC_OT = 79; { ioctls for Open Transport }
+ MIOC_ATALK = 84; { ioctl's for AppleTalk }
+ MIOC_SRL = 85; { ioctl's for Serial }
+ MIOC_RESERVEDp = 112; { reserved, used by SVR4 }
+ MIOC_RESERVEDr = 114; { reserved, used by SVR4 }
+ MIOC_RESERVEDs = 115; { reserved, used by SVR4 }
+ MIOC_CFIG = 122; { ioctl's for private configuration }
+
+{ OT specific ioctls.}
+
+const
+ I_OTGetMiscellaneousEvents = $4F01; { sign up for Misc Events }
+ I_OTSetFramingType = $4F02; { Set framing option for link }
+ kOTGetFramingValue = $FFFFFFFF; { Use this value to read framing }
+ I_OTSetRawMode = $4F03; { Set raw mode for link }
+ kOTSetRecvMode = $01;
+ kOTSendErrorPacket = $02;
+ I_OTConnect = $4F04; { Generic connect request for links }
+ I_OTDisconnect = $4F05; { Generic disconnect request for links }
+ I_OTScript = $4F06; { Send a script to a module }
+
+{ Structure for the I_OTScript Ioctl.}
+
+type
+ OTScriptInfoPtr = ^OTScriptInfo;
+ OTScriptInfo = record
+ fScriptType: UInt32;
+ fTheScript: UnivPtr;
+ fScriptLength: UInt32;
+ end;
+{
+ ***** XTI States *****
+ These are the potential values returned by OTGetEndpointState and OTSync
+ which represent the XTI state of an endpoint.
+}
+type
+ OTXTIStates = UInt32;
+const
+ T_UNINIT = 0; { addition to standard xti.h }
+ T_UNBND = 1; { unbound }
+ T_IDLE = 2; { idle }
+ T_OUTCON = 3; { outgoing connection pending }
+ T_INCON = 4; { incoming connection pending }
+ T_DATAXFER = 5; { data transfer }
+ T_OUTREL = 6; { outgoing orderly release }
+ T_INREL = 7; { incoming orderly release }
+
+{
+ ***** General XTI Definitions *****
+ These definitions are typically used during option management.
+}
+
+const
+ T_YES = 1;
+ T_NO = 0;
+ T_UNUSED = -1;
+ kT_NULL = 0;
+ T_ABSREQ = $8000;
+
+const
+ kT_UNSPEC = $FFFFFFFD;
+ T_ALLOPT = 0;
+
+{
+ T_NULL and T_UNSPEC have different values in BSD headers. If you want the
+ OT values, use kT_NULL or kT_UNSPEC.
+}
+{
+ ***** OTConfiguration *****
+ This is a "black box" structure used to define the configuration of a
+ provider or endpoint. This file defines a very limited set of operations
+ on a configuration. "OpenTransportClient.h" extends this with extra
+ operations used by protocol stacks but not typically needed by clients.
+}
+
+
+type
+ OTConfigurationRef = ^SInt32; { an opaque 32-bit type }
+ OTConfigurationRefPtr = ^OTConfigurationRef;
+
+const
+ kOTNoMemoryConfigurationPtr = OTConfigurationRef(0);
+ kOTInvalidConfigurationPtr = OTConfigurationRef(-1);
+{ ***** Option Management Structures *****}
+
+{ This structure describes the contents of a single option in a buffer.}
+
+type
+ TOptionHeaderPtr = ^TOptionHeader;
+ TOptionHeader = record
+ len: ByteCount; { total length of option }
+ { = sizeof(TOptionHeader) + length }
+ { of option value in bytes }
+ level: OTXTILevel; { protocol affected }
+ name: OTXTIName; { option name }
+ status: UInt32; { status value }
+ end;
+{
+ This structure describes the contents of a single option in a buffer.
+ It differs from TOptionHeader in that it includes the value field,
+ which acts as an unbounded array representing the value of the option.
+}
+type
+ TOptionPtr = ^TOption;
+ TOption = record
+ len: ByteCount; { total length of option }
+ { = sizeof(TOption) + length }
+ { of option value in bytes }
+ level: OTXTILevel; { protocol affected }
+ name: OTXTIName; { option name }
+ status: UInt32; { status value }
+ value: array [0..0] of UInt32; { data goes here }
+ end;
+{ Some useful constants when manipulating option buffers.}
+const
+ kOTOptionHeaderSize = SizeOf(TOptionHeader);
+ kOTBooleanOptionDataSize = SizeOf(UInt32);
+ kOTBooleanOptionSize = kOTOptionHeaderSize + kOTBooleanOptionDataSize;
+ kOTOneByteOptionSize = kOTOptionHeaderSize + 1;
+ kOTTwoByteOptionSize = kOTOptionHeaderSize + 2;
+ kOTFourByteOptionSize = kOTOptionHeaderSize + SizeOf(UInt32);
+
+
+{
+ This macro will align return the value of "len", rounded up to the next
+ 4-byte boundary.
+}
+
+// #define T_ALIGN(len) (((UInt32)(len)+(sizeof(SInt32)-1)) & ~(sizeof(SInt32)-1))
+
+{
+ This macro will return the next option in the buffer, given the previous option
+ in the buffer, returning NULL if there are no more.
+ You start off by setting prevOption = (TOption*)theBuffer
+ (Use OTNextOption for a more thorough check - it ensures the end
+ of the option is in the buffer as well.)
+}
+
+// #define OPT_NEXTHDR(theBuffer, theBufLen, prevOption) \
+// (((char*)(prevOption) + T_ALIGN((prevOption)->len) < (char*)(theBuffer) + (theBufLen)) ? \
+// (TOption*)((char*)(prevOption)+T_ALIGN((prevOption)->len)) \
+// : (TOption*)NULL)
+
+
+{ t_kpalive is used with OPT_KEEPALIVE option.}
+
+type
+ t_kpalivePtr = ^t_kpalive;
+ t_kpalive = record
+ kp_onoff: SInt32; { option on/off }
+ kp_timeout: SInt32; { timeout in minutes }
+ end;
+{ t_linger is used with XTI_LINGER option.}
+type
+ t_lingerPtr = ^t_linger;
+ t_linger = record
+ l_onoff: SInt32; { option on/off }
+ l_linger: SInt32; { linger time }
+ end;
+{
+ ***** TEndpointInfo *****
+ This structure is returned from the GetEndpointInfo call and contains
+ information about an endpoint. But first, some special flags and types.
+}
+{ Values returned in servtype field of TEndpointInfo.}
+
+type
+ OTServiceType = UInt32;
+const
+ T_COTS = 1; { Connection-mode service }
+ T_COTS_ORD = 2; { Connection service with orderly release }
+ T_CLTS = 3; { Connectionless-mode service }
+ T_TRANS = 5; { Connection-mode transaction service }
+ T_TRANS_ORD = 6; { Connection transaction service with orderly release }
+ T_TRANS_CLTS = 7; { Connectionless transaction service }
+
+{ Masks for the flags field of TEndpointInfo.}
+
+const
+ T_SENDZERO = $0001; { supports 0-length TSDU's }
+ T_XPG4_1 = $0002; { supports the GetProtAddress call }
+ T_CAN_SUPPORT_MDATA = $10000000; { support M_DATAs on packet protocols }
+ T_CAN_RESOLVE_ADDR = $40000000; { Supports ResolveAddress call }
+ T_CAN_SUPPLY_MIB = $20000000; { Supports SNMP MIB data }
+
+{
+ Special-case values for in the tsdu, etsdu, connect, and discon
+ fields of TEndpointInfo.
+}
+
+const
+ T_INFINITE = -1; { supports infinit amounts of data }
+ T_INVALID = -2; { Does not support data transmission }
+
+
+type
+ OTDataSize = SInt32;
+{ Now the TEndpointInfo structure proper.}
+type
+ TEndpointInfoPtr = ^TEndpointInfo;
+ TEndpointInfo = record
+ addr: OTDataSize; { Maximum size of an address }
+ options: OTDataSize; { Maximum size of options }
+ tsdu: OTDataSize; { Standard data transmit unit size }
+ etsdu: OTDataSize; { Expedited data transmit unit size }
+ connect: OTDataSize; { Maximum data size on connect }
+ discon: OTDataSize; { Maximum data size on disconnect }
+ servtype: OTServiceType; { service type }
+ flags: UInt32; { Flags (see above for values) }
+ end;
+{
+ "OpenTransport.h" no longer defines "struct t_info". We recommend
+ that you use TEndpointInfo instead. If this is impossible, use
+ the definition of "struct t_info" in "OpenTransportXTI.h".
+}
+{ ***** OTPortRecord *****}
+
+{ Unique identifier for a port.}
+
+
+type
+ OTPortRef = UInt32;
+ OTPortRefPtr = ^OTPortRef;
+const
+ kOTInvalidPortRef = 0;
+
+{ Valid values for the bus type element of an OTPortRef.}
+
+type
+ OTBusType = UInt8;
+const
+ kOTUnknownBusPort = 0;
+ kOTMotherboardBus = 1;
+ kOTNuBus = 2;
+ kOTPCIBus = 3;
+ kOTGeoPort = 4;
+ kOTPCCardBus = 5;
+ kOTFireWireBus = 6;
+ kOTLastBusIndex = 15;
+
+{
+ A couple of special values for the device type element of an
+ OTPortRef. See "OpenTransportDevices.h" for the standard values.
+}
+
+type
+ OTDeviceType = UInt16;
+const
+ kOTNoDeviceType = 0;
+ kOTADEVDevice = 1; { An Atalk ADEV }
+ kOTMDEVDevice = 2; { A TCP/IP MDEV }
+ kOTLocalTalkDevice = 3; { LocalTalk }
+ kOTIRTalkDevice = 4; { IRTalk }
+ kOTTokenRingDevice = 5; { Token Ring }
+ kOTISDNDevice = 6; { ISDN }
+ kOTATMDevice = 7; { ATM }
+ kOTSMDSDevice = 8; { SMDS }
+ kOTSerialDevice = 9; { Serial }
+ kOTEthernetDevice = 10; { Ethernet }
+ kOTSLIPDevice = 11; { SLIP Pseudo-device }
+ kOTPPPDevice = 12; { PPP Pseudo-device }
+ kOTModemDevice = 13; { Modem Pseudo-Device }
+ kOTFastEthernetDevice = 14; { 100 MB Ethernet }
+ kOTFDDIDevice = 15; { FDDI }
+ kOTIrDADevice = 16; { IrDA Infrared }
+ kOTATMSNAPDevice = 17; { ATM SNAP emulation }
+ kOTFibreChannelDevice = 18; { Fibre Channel }
+ kOTFireWireDevice = 19; { FireWire link Device }
+ kOTPseudoDevice = 1023; { used where no other defined device type will work}
+ kOTLastDeviceIndex = 1022;
+
+{ Special case values for the slot number element of an OTPortRef.}
+
+const
+ kOTLastSlotNumber = 255;
+ kOTLastOtherNumber = 255;
+
+type
+ OTSlotNumber = UInt16;
+{ Accessor functions for the various elements of the OTPortRef.}
+{
+ * OTCreatePortRef() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTCreatePortRef( busType: OTBusType; devType: OTDeviceType; slot: OTSlotNumber; other: UInt16 ): OTPortRef; external name '_OTCreatePortRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTGetDeviceTypeFromPortRef() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTGetDeviceTypeFromPortRef( ref: OTPortRef ): OTDeviceType; external name '_OTGetDeviceTypeFromPortRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTGetBusTypeFromPortRef() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTGetBusTypeFromPortRef( ref: OTPortRef ): UInt16; external name '_OTGetBusTypeFromPortRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTGetSlotFromPortRef() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTGetSlotFromPortRef( ref: OTPortRef; var other: UInt16 ): OTSlotNumber; external name '_OTGetSlotFromPortRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTSetDeviceTypeInPortRef() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTSetDeviceTypeInPortRef( ref: OTPortRef; devType: OTDeviceType ): OTPortRef; external name '_OTSetDeviceTypeInPortRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTSetBusTypeInPortRef() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTSetBusTypeInPortRef( ref: OTPortRef; busType: OTBusType ): OTPortRef; external name '_OTSetBusTypeInPortRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ Convenience macros for generating specific types of OTPortRefs.
+}
+
+// #define OTCreateNuBusPortRef(devType, slot, other) \
+// OTCreatePortRef(kOTNuBus, devType, slot, other)
+
+// #define OTCreatePCIPortRef(devType, slot, other) \
+// OTCreatePortRef(kOTPCIBus, devType, slot, other)
+
+// #define OTCreatePCCardPortRef(devType, slot, other) \
+// OTCreatePortRef(kOTPCCardBus, devType, slot, other)
+
+{ Name length definitions for various fields in OTPortRecord.}
+
+const
+ kMaxModuleNameLength = 31; { max length of a STREAMS module name}
+ kMaxModuleNameSize = kMaxModuleNameLength + 1;
+ kMaxProviderNameLength = kMaxModuleNameLength + 4; { providers allow 4 characters for minor number}
+ kMaxProviderNameSize = kMaxProviderNameLength + 1;
+ kMaxSlotIDLength = 7; { PCI slot names tend to be short}
+ kMaxSlotIDSize = kMaxSlotIDLength + 1;
+ kMaxResourceInfoLength = 31; { max length of a configuration helper name}
+ kMaxResourceInfoSize = 32;
+ kMaxPortNameLength = kMaxModuleNameLength + 4; { max size allowed to define a port}
+ kMaxPortNameSize = kMaxPortNameLength + 1;
+
+{
+ Masks for the fPortFlags field of OTPortRecord
+ If no bits are set, the port is currently inactive.
+}
+
+const
+ kOTPortIsActive = $00000001;
+ kOTPortIsDisabled = $00000002;
+ kOTPortIsUnavailable = $00000004;
+ kOTPortIsOffline = $00000008;
+
+{ Masks for the fInfoFlags field of the OTPortRecord.}
+
+const
+ kOTPortIsDLPI = $00000001;
+ kOTPortIsTPI = $00000002;
+ kOTPortCanYield = $00000004; { will not be set until the port is used for the first time}
+ kOTPortCanArbitrate = $00000008; { will not be set until the port is used for the first time}
+ kOTPortIsTransitory = $00000010;
+ kOTPortAutoConnects = $00000020;
+ kOTPortIsSystemRegistered = $00004000;
+ kOTPortIsPrivate = $00008000;
+ kOTPortIsAlias = $80000000;
+
+{
+ One OTPortRecord is created for each instance of a port.
+ For Instance 'enet' identifies an ethernet port.
+ A OTPortRecord for each ethernet card it finds, with an
+ OTPortRef that will uniquely allow the driver to determine which
+ port it is supposed to open on.
+}
+
+type
+ OTPortRecordPtr = ^OTPortRecord;
+ OTPortRecord = record
+ fRef: OTPortRef;
+ fPortFlags: UInt32;
+ fInfoFlags: UInt32;
+ fCapabilities: UInt32;
+ fNumChildPorts: ItemCount;
+ fChildPorts: OTPortRefPtr;
+ fPortName: packed array [0..35] of char;
+ fModuleName: packed array [0..31] of char;
+ fSlotID: packed array [0..7] of char;
+ fResourceInfo: packed array [0..31] of char;
+ fReserved: packed array [0..163] of char;
+ end;
+{
+ Routines for finding, registering and unregistering ports.
+ IMPORTANT:
+ These routines have two versions, one for the client and one
+ for the kernel. Make sure you use and link with the right ones.
+}
+{$ifc NOT OTKERNEL}
+{
+ * OTGetIndexedPort() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientUtilLib 1.0 and later
+ }
+function OTGetIndexedPort( var portRecord: OTPortRecord; index: OTItemCount ): Boolean; external name '_OTGetIndexedPort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Index through the ports in the system}
+{
+ * OTFindPort() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientUtilLib 1.0 and later
+ }
+function OTFindPort( var portRecord: OTPortRecord; portName: ConstCStringPtr ): Boolean; external name '_OTFindPort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Find an OTPortRecord for a port using it's name}
+{
+ * OTFindPortByRef() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientUtilLib 1.0 and later
+ }
+function OTFindPortByRef( var portRecord: OTPortRecord; ref: OTPortRef ): Boolean; external name '_OTFindPortByRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Find an OTPortRecord for a port using it's OTPortRef}
+{
+ * OTRegisterPort()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientUtilLib 1.0 and later
+ }
+
+
+{
+ Register a port. The name the port was registered under is returned in
+ the fPortName field.
+}
+{
+ * OTUnregisterPort()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientUtilLib 1.0 and later
+ }
+
+
+{
+ Unregister the port with the given name (If you re-register the
+ port, it may get a different name - use OTChangePortState if
+ that is not desireable). Since a single OTPortRef can be registered
+ with several names, the API needs to use the portName rather than
+ the OTPortRef to disambiguate.
+}
+{
+ * OTChangePortState()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientUtilLib 1.0 and later
+ }
+
+
+{ Change the state of the port.}
+{$endc} { !OTKERNEL }
+
+{ ***** Data Buffers *****}
+{
+ TNetbuf is the basic structure used to pass data back and forth
+ between the Open Transport protocols and their clients
+}
+
+type
+ TNetbufPtr = ^TNetbuf;
+ TNetbuf = record
+ maxlen: ByteCount;
+ len: ByteCount;
+ buf: UInt8Ptr;
+ end;
+{
+ Some rarely used low-level routines in this file take a strbuf
+ as a parameter. This is the raw streams equivalent of a TNetbuf.
+ The key difference is that the maxlen and len fields are signed,
+ which allows you to specify extra operations by providing a
+ negative value.
+}
+
+
+type
+ strbufPtr = ^strbuf;
+ strbuf = record
+ maxlen: SInt32; { max buffer length }
+ len: SInt32; { length of data }
+ buf: UnivPtr; { pointer to buffer }
+ end;
+{
+ OTData is used in a TNetbuf or netbuf to send
+ non-contiguous data. Set the 'len' field of the netbuf to the
+ constant kNetbufDataIsOTData to signal that the 'buf' field of the
+ netbuf actually points to one of these structures instead of a
+ memory buffer.
+}
+type
+ OTDataPtr = ^OTData;
+ OTData = record
+ fNext: UnivPtr;
+ fData: UnivPtr;
+ fLen: ByteCount;
+ end;
+const
+ kNetbufDataIsOTData = $FFFFFFFE;
+
+
+{
+ OTBuffer is used for no-copy receives. When receiving, you can
+ set the receive length to kOTNetbufDataIsOTBufferStar and then
+ pass the address of an OTBuffer* as the receive buffer. OT will
+ fill it out to point to a chain of OTBuffers.
+ When you are done with it, you must call the OTReleaseBuffer function.
+ For best performance, you need to call OTReleaseBuffer quickly.
+ Only data netbufs may use this - no netbufs for addresses or options, or the like.
+ Any OTBuffer returned to you by OT is read only!
+ The astute will notice that this has a high correlation with the
+ STREAMS msgb data type. The fields are commented with their
+ corresponding msgb field name.
+}
+
+type
+ OTBufferPtr = ^OTBuffer;
+ OTBuffer = record
+ fLink: UnivPtr; { b_next}
+ fLink2: UnivPtr; { b_prev}
+ fNext: OTBufferPtr; { b_cont}
+ fData: UInt8Ptr; { b_rptr}
+ fLen: ByteCount; { b_wptr}
+ fSave: UnivPtr; { b_datap}
+ fBand: SInt8; { b_band}
+ fType: SInt8; { b_pad1}
+ fPad1: SInt8;
+ fFlags: SInt8; { b_flag}
+ end;
+const
+ kOTNetbufDataIsOTBufferStar = $FFFFFFFD;
+
+{
+ OTBufferInfo is used with OTReadBuffer to keep track of where you
+ are in the buffer, since the OTBuffer is "read-only".
+}
+{ Use the OTInitBuffer macro to initialise this structure from an OTBuffer chain.}
+type
+ OTBufferInfoPtr = ^OTBufferInfo;
+ OTBufferInfo = record
+ fBuffer: OTBufferPtr;
+ fOffset: ByteCount;
+ fPad: UInt8;
+ end;
+
+// #define OTInitBufferInfo(infoPtr, theBuffer) \
+// (infoPtr)->fBuffer = theBuffer; \
+// (infoPtr)->fPad = (theBuffer)->fPad1; \
+// (infoPtr)->fOffset = 0
+
+{
+ If the endpoint supports "raw mode" (the T_CAN_SUPPORT_MDATA bit will
+ be set in the TEndpointInfo::flags field), then you specify the
+ raw mode packet by putting the kOTNetbufIsRawMode value in
+ the udata.addr.len field when calling OTSndUData and also set the
+ udata.opt.len, udata.opt.buf, and udata.addr.buf fields to 0.
+}
+
+const
+ kOTNetbufIsRawMode = $FFFFFFFF;
+
+{
+ ***** Standard XTI Parameter Types *****
+ These structures are all used as parameters to the standard
+ XTI routines.
+}
+
+{
+ TBind holds binding information for calls to
+ OTGetProtAddress, OTResolveAddress and OTBind.
+}
+
+type
+ TBindPtr = ^TBind;
+ TBind = record
+ addr: TNetbuf;
+ qlen: OTQLen;
+ end;
+{
+ TDiscon is passed to RcvDisconnect to find out additional information
+ about the disconnect.
+}
+type
+ TDisconPtr = ^TDiscon;
+ TDiscon = record
+ udata: TNetbuf;
+ reason: OTReason;
+ sequence: OTSequence;
+ end;
+{
+ TCall holds information about a connection and is a parameter to
+ OTConnect, OTRcvConnect, OTListen, OTAccept, and OTSndDisconnect.
+}
+type
+ TCallPtr = ^TCall;
+ TCall = record
+ addr: TNetbuf;
+ opt: TNetbuf;
+ udata: TNetbuf;
+ sequence: OTSequence;
+ end;
+{ TUnitData describes a datagram in calls to OTSndUData and OTRcvUData.}
+type
+ TUnitDataPtr = ^TUnitData;
+ TUnitData = record
+ addr: TNetbuf;
+ opt: TNetbuf;
+ udata: TNetbuf;
+ end;
+{
+ TUDErr is used to get information about a datagram error using
+ OTRcvUDErr.
+}
+type
+ TUDErrPtr = ^TUDErr;
+ TUDErr = record
+ addr: TNetbuf;
+ opt: TNetbuf;
+ error: SInt32;
+ end;
+{ TOptMgmt is passed to the OTOptionManagement call to read or set protocol}
+type
+ TOptMgmtPtr = ^TOptMgmt;
+ TOptMgmt = record
+ opt: TNetbuf;
+ flags: OTFlags;
+ end;
+{
+ ***** Transactional XTI Parameter Types *****
+ These structures are all used as parameters to the OT's
+ XTI-like routines for transaction protocols.
+}
+{
+ TRequest is passed to OTSndRequest and OTRcvRequest that contains the information
+ about the request.
+}
+
+type
+ TRequestPtr = ^TRequest;
+ TRequest = record
+ data: TNetbuf;
+ opt: TNetbuf;
+ sequence: OTSequence;
+ end;
+{ TReply is passed to OTSndReply to send a reply to an incoming request.}
+type
+ TReplyPtr = ^TReply;
+ TReply = record
+ data: TNetbuf;
+ opt: TNetbuf;
+ sequence: OTSequence;
+ end;
+{
+ TUnitRequest is passed to OTSndURequest and OTRcvURequest that contains
+ the information about the request.
+}
+type
+ TUnitRequestPtr = ^TUnitRequest;
+ TUnitRequest = record
+ addr: TNetbuf;
+ opt: TNetbuf;
+ udata: TNetbuf;
+ sequence: OTSequence;
+ end;
+{ TUnitReply is passed to OTSndUReply to send a reply to an incoming request.}
+type
+ TUnitReplyPtr = ^TUnitReply;
+ TUnitReply = record
+ opt: TNetbuf;
+ udata: TNetbuf;
+ sequence: OTSequence;
+ end;
+{
+ ***** Mapper Parameter Types *****
+ These structures are all used as parameters to the OT's
+ mapper routines.
+}
+{ TRegisterRequest holds the name to register in a call to OTRegisterName.}
+
+type
+ TRegisterRequestPtr = ^TRegisterRequest;
+ TRegisterRequest = record
+ name: TNetbuf;
+ addr: TNetbuf;
+ flags: OTFlags;
+ end;
+{
+ TRegisterReply returns information about the registered name in a call
+ to OTRegisterName.
+}
+type
+ TRegisterReplyPtr = ^TRegisterReply;
+ TRegisterReply = record
+ addr: TNetbuf;
+ nameid: OTNameID;
+ end;
+{ TLookupRequest holds the name to look up in a call to OTLookupName.}
+type
+ TLookupRequestPtr = ^TLookupRequest;
+ TLookupRequest = record
+ name: TNetbuf;
+ addr: TNetbuf;
+ maxcnt: UInt32;
+ timeout: OTTimeout;
+ flags: OTFlags;
+ end;
+{
+ TLookupReply returns information about the found names after a call
+ to OTLookupName.
+}
+type
+ TLookupReplyPtr = ^TLookupReply;
+ TLookupReply = record
+ names: TNetbuf;
+ rspcount: UInt32;
+ end;
+{
+ TLookupBuffer describes the contents of the names buffer pointed
+ to by the TLookupReply.
+}
+type
+ TLookupBufferPtr = ^TLookupBuffer;
+ TLookupBuffer = record
+ fAddressLength: UInt16;
+ fNameLength: UInt16;
+ fAddressBuffer: packed array[0..0] of SInt8;
+ end;
+
+{
+ OTNextLookupBuffer allows you to step through a packed array
+ of TLookupBuffers.
+}
+
+// #define OTNextLookupBuffer(buf) \
+// ((TLookupBuffer*) \
+// ((char*)buf + ((OTOffsetOf(TLookupBuffer, fAddressBuffer) + buf->fAddressLength + buf->fNameLength + 3) & ~3)))
+
+{ ***** Initializing and Shutting Down Open Transport *****}
+
+{$ifc NOT OTKERNEL}
+type
+ OTClientContextPtr = ^SInt32; { an opaque 32-bit type }
+ OTClientContextPtrPtr = ^OTClientContextPtr;
+{
+ For Carbon the InitOpenTransport interface has changed so it takes a flags parameter
+ and returns a client context pointer.
+ The flag passed to indicates whether OT should be initialized for application use or for some other target
+ (for example, plugins that run in an application context but not the application itself.)
+ Applications that are not interested in the value of the client context pointer may pass NULL
+ as outClientContext -- they will pass NULL to other routines that take a OTClientContextPtr.
+}
+type
+ OTInitializationFlags = UInt32;
+const
+ kInitOTForApplicationMask = 1;
+ kInitOTForExtensionMask = 2;
+
+{
+ * InitOpenTransportInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function InitOpenTransportInContext( flags: OTInitializationFlags; outClientContext: OTClientContextPtrPtr { can be NULL } ): OSStatus; external name '_InitOpenTransportInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ Under Carbon, CloseOpenTransport takes a client context pointer. Applications may pass NULL
+ after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a
+ valid client context.
+}
+{
+ * CloseOpenTransportInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure CloseOpenTransportInContext( clientContext: OTClientContextPtr ); external name '_CloseOpenTransportInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * InitOpenTransport()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * InitOpenTransportUtilities()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * CloseOpenTransport()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTRegisterAsClient()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ This registers yourself as a client for any miscellaneous Open Transport
+ notifications that come along. CloseOpenTransport will automatically do
+ an OTUnregisterAsClient, if you have not already done so.
+}
+{
+ * OTUnregisterAsClient()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTRegisterAsClientInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function OTRegisterAsClientInContext( name: OTClientName; proc: OTNotifyUPP; clientContext: OTClientContextPtr { can be NULL } ): OSStatus; external name '_OTRegisterAsClientInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTUnregisterAsClientInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function OTUnregisterAsClientInContext( clientContext: OTClientContextPtr ): OSStatus; external name '_OTUnregisterAsClientInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{$endc} { !OTKERNEL }
+
+{ ***** Tasking Model *****}
+{
+ OTEnterInterrupt/OTLeaveInterrupt are normally used within the kernel to
+ tell Open Transport we're at hardware interrupt time. Clients can also
+ them to do the same.
+}
+
+{
+ * OTEnterInterrupt()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ * OTLeaveInterrupt()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ * OTIsAtInterruptLevel()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ * OTCanLoadLibraries()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ All OT task callbacks use the same prototype, shown below.
+ This is only a UPP for CFM-68K clients.
+}
+
+type
+ OTProcessProcPtr = procedure( arg: UnivPtr );
+ OTProcessUPP = OTProcessProcPtr;
+{
+ * NewOTProcessUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewOTProcessUPP( userRoutine: OTProcessProcPtr ): OTProcessUPP; external name '_NewOTProcessUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeOTProcessUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeOTProcessUPP( userUPP: OTProcessUPP ); external name '_DisposeOTProcessUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeOTProcessUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeOTProcessUPP( arg: UnivPtr; userUPP: OTProcessUPP ); external name '_InvokeOTProcessUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{$ifc NOT OTKERNEL}
+{
+ Under Carbon, OTCreateDeferredTask takes a client context pointer. Applications may pass NULL
+ after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a
+ valid client context.
+}
+{
+ * OTCreateDeferredTaskInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTCreateDeferredTaskInContext( upp: OTProcessUPP; arg: UnivPtr; clientContext: OTClientContextPtr { can be NULL } ): SInt32; external name '_OTCreateDeferredTaskInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{$endc} { !OTKERNEL }
+
+{
+ OT deferred tasks are often more convenience that standard Mac OS
+ although they have no significant advantages beyond convenience.
+}
+
+
+type
+ OTDeferredTaskRef = SInt32;
+{
+ * OTCreateDeferredTask()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTScheduleDeferredTask() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTScheduleDeferredTask( dtCookie: OTDeferredTaskRef ): Boolean; external name '_OTScheduleDeferredTask';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTScheduleInterruptTask()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ * OTDestroyDeferredTask() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTDestroyDeferredTask( dtCookie: OTDeferredTaskRef ): OSStatus; external name '_OTDestroyDeferredTask';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{$ifc NOT OTKERNEL}
+{
+ OT system tasks allow you to schedule a procedure to be called
+ at system task time. Potentially useful, but it relies on someone
+ calling SystemTask (or WaitNextEvent, which calls SystemTask).
+ Not available to kernel code because relying on system task time
+ to make progress is likely to result in deadlocks.
+}
+type
+ OTSystemTaskRef = SInt32;
+{
+ * OTCreateSystemTask()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTDestroySystemTask()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ * OTScheduleSystemTask()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ * OTCancelSystemTask()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ * OTCanMakeSyncCall() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTCanMakeSyncCall: Boolean; external name '_OTCanMakeSyncCall';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{$endc} { !OTKERNEL }
+
+{ ***** Interface to Providers *****}
+{$ifc NOT OTKERNEL}
+{
+ * OTAsyncOpenProvider()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTOpenProvider()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCloseProvider() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTCloseProvider( ref: ProviderRef ): OSStatus; external name '_OTCloseProvider';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTTransferProviderOwnership()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTWhoAmI()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTGetProviderPortRef()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTIoctl() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTIoctl( ref: ProviderRef; cmd: UInt32; data: UnivPtr ): SInt32; external name '_OTIoctl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTGetMessage()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTGetPriorityMessage()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTPutMessage()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTPutPriorityMessage()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTSetAsynchronous() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTSetAsynchronous( ref: ProviderRef ): OSStatus; external name '_OTSetAsynchronous';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTSetSynchronous() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTSetSynchronous( ref: ProviderRef ): OSStatus; external name '_OTSetSynchronous';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTIsSynchronous() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTIsSynchronous( ref: ProviderRef ): Boolean; external name '_OTIsSynchronous';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTSetBlocking() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTSetBlocking( ref: ProviderRef ): OSStatus; external name '_OTSetBlocking';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTSetNonBlocking() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTSetNonBlocking( ref: ProviderRef ): OSStatus; external name '_OTSetNonBlocking';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTIsBlocking() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTIsBlocking( ref: ProviderRef ): Boolean; external name '_OTIsBlocking';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTInstallNotifier() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTInstallNotifier( ref: ProviderRef; proc: OTNotifyUPP; contextPtr: UnivPtr ): OSStatus; external name '_OTInstallNotifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTUseSyncIdleEvents() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTUseSyncIdleEvents( ref: ProviderRef; useEvents: Boolean ): OSStatus; external name '_OTUseSyncIdleEvents';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTRemoveNotifier() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+procedure OTRemoveNotifier( ref: ProviderRef ); external name '_OTRemoveNotifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTLeaveNotifier() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+procedure OTLeaveNotifier( ref: ProviderRef ); external name '_OTLeaveNotifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTEnterNotifier() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTEnterNotifier( ref: ProviderRef ): Boolean; external name '_OTEnterNotifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTAckSends() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTAckSends( ref: ProviderRef ): OSStatus; external name '_OTAckSends';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTDontAckSends() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTDontAckSends( ref: ProviderRef ): OSStatus; external name '_OTDontAckSends';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTIsAckingSends() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTIsAckingSends( ref: ProviderRef ): Boolean; external name '_OTIsAckingSends';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTCancelSynchronousCalls() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTCancelSynchronousCalls( ref: ProviderRef; err: OSStatus ): OSStatus; external name '_OTCancelSynchronousCalls';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+// #define OTIsNonBlocking(ref) (!OTIsBlocking(ref))
+// #define OTIsAsynchronous(ref) (!OTIsSynchronous(ref))
+
+{$endc}
+
+{ ***** Interface to Endpoints *****}
+{$ifc NOT OTKERNEL}
+{ Open/Close}
+{
+ Under Carbon, the OpenEndpoint routines take a client context pointer. Applications may pass NULL after
+ calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a
+ valid client context.
+}
+{
+ * OTOpenEndpointInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTOpenEndpointInContext( config: OTConfigurationRef; oflag: OTOpenFlags; info: TEndpointInfoPtr { can be NULL }; var err: OSStatus; clientContext: OTClientContextPtr { can be NULL } ): EndpointRef; external name '_OTOpenEndpointInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTAsyncOpenEndpointInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTAsyncOpenEndpointInContext( config: OTConfigurationRef; oflag: OTOpenFlags; info: TEndpointInfoPtr { can be NULL }; upp: OTNotifyUPP; contextPtr: UnivPtr; clientContext: OTClientContextPtr { can be NULL } ): OSStatus; external name '_OTAsyncOpenEndpointInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTOpenEndpoint()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTAsyncOpenEndpoint()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ The following macros may be used by applications only.}
+// #define OTOpenEndpoint(config, oflag, info, err) OTOpenEndpointInContext(config, oflag, info, err, NULL)
+// #define OTAsyncOpenEndpoint(config, oflag, info, proc, contextPtr) OTAsyncOpenEndpointInContext(config, oflag, info, proc, contextPtr, NULL)
+
+{ Misc Information}
+
+{
+ * OTGetEndpointInfo() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTGetEndpointInfo( ref: EndpointRef; var info: TEndpointInfo ): OSStatus; external name '_OTGetEndpointInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTGetEndpointState() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTGetEndpointState( ref: EndpointRef ): OTResult; external name '_OTGetEndpointState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTLook() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTLook( ref: EndpointRef ): OTResult; external name '_OTLook';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTSync()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTCountDataBytes() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTCountDataBytes( ref: EndpointRef; var countPtr: OTByteCount ): OTResult; external name '_OTCountDataBytes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTGetProtAddress() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTGetProtAddress( ref: EndpointRef; boundAddr: TBindPtr { can be NULL }; peerAddr: TBindPtr { can be NULL } ): OSStatus; external name '_OTGetProtAddress';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTResolveAddress() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTResolveAddress( ref: EndpointRef; var reqAddr: TBind; var retAddr: TBind; timeOut: OTTimeout ): OSStatus; external name '_OTResolveAddress';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Allocating structures}
+
+{
+ Note:
+ In general, Apple recommends that you avoid the OTAlloc call because
+ using it extensively causes your program to allocate and deallocate
+ many memory blocks, with each extra memory allocation costing time.
+}
+
+{
+ Under Carbon, OTAlloc takes a client context pointer. Applications may pass NULL after
+ calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a
+ valid client context.
+}
+{
+ * OTAllocInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTAllocInContext( ref: EndpointRef; structType: OTStructType; fields: UInt32; var err: OSStatus; clientContext: OTClientContextPtr { can be NULL } ): UnivPtr; external name '_OTAllocInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTAlloc()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ The following macro may be used by applications only.}
+// #define OTAlloc(ref, structType, fields, err) OTAllocInContext(ref, structType, fields, err, NULL)
+
+{
+ * OTFree() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTFree( ptr: UnivPtr; structType: OTStructType ): OTResult; external name '_OTFree';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Option management}
+
+{ It looks simple enough...}
+
+{
+ * OTOptionManagement() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTOptionManagement( ref: EndpointRef; var req: TOptMgmt; var ret: TOptMgmt ): OSStatus; external name '_OTOptionManagement';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ ... but then the hidden complexity emerges.}
+
+{
+ * OTCreateOptions()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientUtilLib 1.0 and later
+ }
+
+
+{
+ * OTCreateOptionString()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientUtilLib 1.0 and later
+ }
+
+
+{
+ * OTNextOption() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTNextOption( buffer: UInt8Ptr; buflen: UInt32; var prevOptPtr: TOptionPtr ): OSStatus; external name '_OTNextOption';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTFindOption() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTFindOption( buffer: UInt8Ptr; buflen: UInt32; level: OTXTILevel; name: OTXTIName ): TOptionPtr; external name '_OTFindOption';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Bind/Unbind}
+
+{
+ * OTBind() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTBind( ref: EndpointRef; reqAddr: TBindPtr { can be NULL }; retAddr: TBindPtr { can be NULL } ): OSStatus; external name '_OTBind';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTUnbind() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTUnbind( ref: EndpointRef ): OSStatus; external name '_OTUnbind';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Connection creation/tear-down}
+
+{
+ * OTConnect() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTConnect( ref: EndpointRef; var sndCall: TCall; rcvCall: TCallPtr { can be NULL } ): OSStatus; external name '_OTConnect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTRcvConnect() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTRcvConnect( ref: EndpointRef; call: TCallPtr { can be NULL } ): OSStatus; external name '_OTRcvConnect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTListen() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTListen( ref: EndpointRef; var call: TCall ): OSStatus; external name '_OTListen';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTAccept() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTAccept( listener: EndpointRef; worker: EndpointRef; var call: TCall ): OSStatus; external name '_OTAccept';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTSndDisconnect() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTSndDisconnect( ref: EndpointRef; call: TCallPtr { can be NULL } ): OSStatus; external name '_OTSndDisconnect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTSndOrderlyDisconnect() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTSndOrderlyDisconnect( ref: EndpointRef ): OSStatus; external name '_OTSndOrderlyDisconnect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTRcvDisconnect() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTRcvDisconnect( ref: EndpointRef; discon: TDisconPtr { can be NULL } ): OSStatus; external name '_OTRcvDisconnect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTRcvOrderlyDisconnect() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTRcvOrderlyDisconnect( ref: EndpointRef ): OSStatus; external name '_OTRcvOrderlyDisconnect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Connection-oriented send/receive}
+
+{
+ * OTRcv() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTRcv( ref: EndpointRef; buf: UnivPtr; nbytes: OTByteCount; var flags: OTFlags ): OTResult; external name '_OTRcv';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTSnd() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTSnd( ref: EndpointRef; buf: UnivPtr; nbytes: OTByteCount; flags: OTFlags ): OTResult; external name '_OTSnd';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Connectionless send/receive}
+
+{
+ * OTSndUData() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTSndUData( ref: EndpointRef; var udata: TUnitData ): OSStatus; external name '_OTSndUData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTRcvUData() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTRcvUData( ref: EndpointRef; var udata: TUnitData; var flags: OTFlags ): OSStatus; external name '_OTRcvUData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTRcvUDErr() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTRcvUDErr( ref: EndpointRef; uderr: TUDErrPtr { can be NULL } ): OSStatus; external name '_OTRcvUDErr';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Connection-oriented transactions}
+
+{
+ * OTSndRequest()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTRcvReply()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTSndReply()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTRcvRequest()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTCancelRequest()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTCancelReply()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{ Connectionless transactions}
+
+{
+ * OTSndURequest()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTRcvUReply()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTSndUReply()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTRcvURequest()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTCancelURequest()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{
+ * OTCancelUReply()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+
+
+{ Interface to Mappers}
+
+
+{
+ Under Carbon, the OpenMapper routines take a client context pointer. Applications may pass NULL after
+ calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a
+ valid client context.
+}
+
+{
+ * OTAsyncOpenMapperInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTAsyncOpenMapperInContext( config: OTConfigurationRef; oflag: OTOpenFlags; upp: OTNotifyUPP; contextPtr: UnivPtr; clientContext: OTClientContextPtr { can be NULL } ): OSStatus; external name '_OTAsyncOpenMapperInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTOpenMapperInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTOpenMapperInContext( config: OTConfigurationRef; oflag: OTOpenFlags; var err: OSStatus; clientContext: OTClientContextPtr { can be NULL } ): MapperRef; external name '_OTOpenMapperInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTAsyncOpenMapper()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTOpenMapper()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ The following macros may be used by applications only.}
+// #define OTAsyncOpenMapper(config, oflag, proc, contextPtr) OTAsyncOpenMapperInContext(config, oflag, proc, contextPtr, NULL)
+// #define OTOpenMapper(config, oflag, err) OTOpenMapperInContext(config, oflag, err, NULL)
+
+{
+ * OTRegisterName() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTRegisterName( ref: MapperRef; var req: TRegisterRequest; var reply: TRegisterReply ): OSStatus; external name '_OTRegisterName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTDeleteName() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTDeleteName( ref: MapperRef; var name: TNetbuf ): OSStatus; external name '_OTDeleteName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTDeleteNameByID() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTDeleteNameByID( ref: MapperRef; nameID: OTNameID ): OSStatus; external name '_OTDeleteNameByID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTLookupName() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+function OTLookupName( ref: MapperRef; var req: TLookupRequest; var reply: TLookupReply ): OSStatus; external name '_OTLookupName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Basic configuration manipulation}
+
+{
+ * OTCreateConfiguration() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientUtilLib 1.0 and later
+ }
+function OTCreateConfiguration( path: ConstCStringPtr ): OTConfigurationRef; external name '_OTCreateConfiguration';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTCloneConfiguration() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientUtilLib 1.0 and later
+ }
+function OTCloneConfiguration( cfig: OTConfigurationRef ): OTConfigurationRef; external name '_OTCloneConfiguration';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTDestroyConfiguration() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientUtilLib 1.0 and later
+ }
+procedure OTDestroyConfiguration( cfig: OTConfigurationRef ); external name '_OTDestroyConfiguration';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ This file defines a very limited set of operations
+ on a configuration. "OpenTransportClient.h" extends this with extra
+ operations used by protocol stacks but not typically needed by clients.
+}
+
+{ Interrupt-safe memory allocators}
+
+{
+ Under Carbon, OTAllocMem takes a client context pointer. Applications may pass NULL after
+ calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a
+ valid client context.
+}
+
+{
+ * OTAllocMemInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTAllocMemInContext( size: OTByteCount; clientContext: OTClientContextPtr { can be NULL } ): UnivPtr; external name '_OTAllocMemInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTAllocMem()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTFreeMem() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientUtilLib 1.0 and later
+ }
+procedure OTFreeMem( mem: UnivPtr ); external name '_OTFreeMem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ The following macros may be used by applications only.}
+// #define OTAllocMem(s) OTAllocMemInContext(s, NULL)
+
+{ Miscellaneous and Generic Routines}
+
+{
+ Neither of these routines should be necessary to the correct
+ operation of an OT program. If you're calling them, think again.
+}
+
+{
+ * OTDelay() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+procedure OTDelay( seconds: UInt32 ); external name '_OTDelay';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTIdle() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTClientLib 1.0 and later
+ }
+procedure OTIdle; external name '_OTIdle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{$endc} { !OTKERNEL }
+
+{
+ ***** Open Transport Utility Routines *****
+ All of these routines are available to both client and kernel.
+}
+{ Memory and String Routines}
+
+{
+ These are preferable, especially in the kernel case, to the standard
+ C equivalents because they don't require you to link with StdCLib.
+}
+
+{
+ * OTMemcpy() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+procedure OTMemcpy( dest: UnivPtr; src: {const} UnivPtr; nBytes: OTByteCount ); external name '_OTMemcpy';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTMemcmp() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTMemcmp( mem1: {const} UnivPtr; mem2: {const} UnivPtr; nBytes: OTByteCount ): Boolean; external name '_OTMemcmp';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTMemmove() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+procedure OTMemmove( dest: UnivPtr; src: {const} UnivPtr; nBytes: OTByteCount ); external name '_OTMemmove';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTMemzero() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+procedure OTMemzero( dest: UnivPtr; nBytes: OTByteCount ); external name '_OTMemzero';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTMemset() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+procedure OTMemset( dest: UnivPtr; toSet: OTUInt8Param; nBytes: OTByteCount ); external name '_OTMemset';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTStrLength() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTStrLength( str: ConstCStringPtr ): OTByteCount; external name '_OTStrLength';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTStrCopy() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+procedure OTStrCopy( var dest: char; src: ConstCStringPtr ); external name '_OTStrCopy';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTStrCat() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+procedure OTStrCat( var dest: char; src: ConstCStringPtr ); external name '_OTStrCat';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTStrEqual() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTStrEqual( src1: ConstCStringPtr; src2: ConstCStringPtr ): Boolean; external name '_OTStrEqual';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Timer Utilities}
+
+{
+ OTGetTimeStamp returns time in "tick" numbers, stored in 64 bits.
+ This timestamp can be used as a base number for calculating elapsed
+ time.
+ OTSubtractTimeStamps returns a pointer to the "result" parameter.
+
+ OTGetClockTimeInSecs returns time since Open Transport was initialized
+ in seconds.
+}
+
+type
+ OTTimeStamp = UnsignedWide;
+ OTTimeStampPtr = ^OTTimeStamp;
+{
+ * OTGetTimeStamp() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+procedure OTGetTimeStamp( var currentTime: OTTimeStamp ); external name '_OTGetTimeStamp';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTSubtractTimeStamps() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTSubtractTimeStamps( var result: OTTimeStamp; var startTime: OTTimeStamp; var endEnd: OTTimeStamp ): OTTimeStampPtr; external name '_OTSubtractTimeStamps';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTTimeStampInMilliseconds() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTTimeStampInMilliseconds( var delta: OTTimeStamp ): UInt32; external name '_OTTimeStampInMilliseconds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTTimeStampInMicroseconds() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTTimeStampInMicroseconds( var delta: OTTimeStamp ): UInt32; external name '_OTTimeStampInMicroseconds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTElapsedMilliseconds() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTElapsedMilliseconds( var startTime: OTTimeStamp ): UInt32; external name '_OTElapsedMilliseconds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTElapsedMicroseconds() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTElapsedMicroseconds( var startTime: OTTimeStamp ): UInt32; external name '_OTElapsedMicroseconds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTGetClockTimeInSecs() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTGetClockTimeInSecs: UInt32; external name '_OTGetClockTimeInSecs';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ ***** OT Link Element *****}
+
+{
+ When using OT linked lists, all pointers to other elements are
+ represented by the OTLink structure. When operating on link
+ lists, you always pass in the address of the OTLink on which
+ list elements are chained.
+}
+
+type
+ OTLinkPtr = ^OTLink;
+ OTLink = record
+ fNext: OTLinkPtr;
+ end;
+
+{
+ You can use this macro to map from an OTLink field to the
+ structure in which it's embedded.
+}
+// #define OTGetLinkObject(link, struc, field) \
+// ((struc*)((char*)(link) - OTOffsetOf(struc, field)))
+
+{ OTLIFO}
+
+{
+ These are functions to implement a LIFO list that is interrupt-safe.
+ The only function which is not is OTReverseList. Normally, you create
+ a LIFO list, populate it at interrupt time, and then use OTLIFOStealList
+ to atomically remove the list, and OTReverseList to flip the list so that
+ it is a FIFO list, which tends to be more useful.
+}
+
+type
+ OTLIFOPtr = ^OTLIFO;
+ OTLIFO = record
+ fHead: OTLinkPtr;
+ end;
+{
+ This function atomically enqueues the link onto the
+ front of the list.
+}
+{
+ * OTLIFOEnqueue() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+procedure OTLIFOEnqueue( var list: OTLIFO; var link: OTLink ); external name '_OTLIFOEnqueue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ This function atomically dequeues the first element
+ on the list.
+}
+{
+ * OTLIFODequeue() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTLIFODequeue( var list: OTLIFO ): OTLinkPtr; external name '_OTLIFODequeue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ This function atomically empties the list and returns a
+ pointer to the first element on the list.
+}
+{
+ * OTLIFOStealList() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTLIFOStealList( var list: OTLIFO ): OTLinkPtr; external name '_OTLIFOStealList';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ This function reverses a list that was stolen by
+ OTLIFOStealList. It is NOT atomic. It returns the
+ new starting list.
+}
+{
+ * OTReverseList() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTReverseList( var list: OTLink ): OTLinkPtr; external name '_OTReverseList';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ OTList}
+
+{
+ An OTList is a non-interrupt-safe list, but has more features than the
+ OTLIFO list. It is a standard singly-linked list.
+}
+
+{
+ The following is the prototype for a list element comparison function,
+ which returns true if the element described by linkToCheck matches
+ the client criteria (typically held in ref).
+ This is only a UPP for CFM-68K clients.
+}
+
+type
+ OTListSearchProcPtr = function( ref: {const} UnivPtr; var linkToCheck: OTLink ): Boolean;
+ OTListSearchUPP = OTListSearchProcPtr;
+{
+ * NewOTListSearchUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewOTListSearchUPP( userRoutine: OTListSearchProcPtr ): OTListSearchUPP; external name '_NewOTListSearchUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeOTListSearchUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeOTListSearchUPP( userUPP: OTListSearchUPP ); external name '_DisposeOTListSearchUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeOTListSearchUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeOTListSearchUPP( ref: {const} UnivPtr; var linkToCheck: OTLink; userUPP: OTListSearchUPP ): Boolean; external name '_InvokeOTListSearchUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+type
+ OTListPtr = ^OTList;
+ OTList = record
+ fHead: OTLinkPtr;
+ end;
+{ Add the link to the list at the front}
+{
+ * OTAddFirst() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+procedure OTAddFirst( var list: OTList; var link: OTLink ); external name '_OTAddFirst';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Add the link to the list at the end}
+{
+ * OTAddLast() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+procedure OTAddLast( var list: OTList; var link: OTLink ); external name '_OTAddLast';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Remove the first link from the list}
+{
+ * OTRemoveFirst() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTRemoveFirst( var list: OTList ): OTLinkPtr; external name '_OTRemoveFirst';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Remove the last link from the list}
+{
+ * OTRemoveLast() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTRemoveLast( var list: OTList ): OTLinkPtr; external name '_OTRemoveLast';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Return the first link from the list}
+{
+ * OTGetFirst() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTGetFirst( var list: OTList ): OTLinkPtr; external name '_OTGetFirst';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Return the last link from the list}
+{
+ * OTGetLast() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTGetLast( var list: OTList ): OTLinkPtr; external name '_OTGetLast';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Return true if the link is present in the list}
+{
+ * OTIsInList() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTIsInList( var list: OTList; var link: OTLink ): Boolean; external name '_OTIsInList';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ Find a link in the list which matches the search criteria
+ established by the search proc and the refPtr. This is done
+ by calling the search proc, passing it the refPtr and each
+ link in the list, until the search proc returns true.
+ NULL is returned if the search proc never returned true.
+}
+{
+ * OTFindLink() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTFindLink( var list: OTList; proc: OTListSearchUPP; ref: {const} UnivPtr ): OTLinkPtr; external name '_OTFindLink';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Remove the specified link from the list, returning true if it was found}
+{
+ * OTRemoveLink() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTRemoveLink( var list: OTList; var link: OTLink ): Boolean; external name '_OTRemoveLink';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Similar to OTFindLink, but it also removes it from the list.}
+{
+ * OTFindAndRemoveLink() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTFindAndRemoveLink( var list: OTList; proc: OTListSearchUPP; ref: {const} UnivPtr ): OTLinkPtr; external name '_OTFindAndRemoveLink';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Return the "index"th link in the list}
+{
+ * OTGetIndexedLink() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTGetIndexedLink( var list: OTList; index: OTItemCount ): OTLinkPtr; external name '_OTGetIndexedLink';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ OTEnqueue/OTDequeue}
+
+{
+ These routines are atomic, mighty weird, and generally not
+ worth the complexity. If you need atomic list operations,
+ use OTLIFO instead.
+}
+
+{
+ This function puts "object" on the listHead, and places the
+ previous value at listHead into the pointer at "object" plus
+ linkOffset.
+}
+{
+ * OTEnqueue() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+procedure OTEnqueue( var listHead: UnivPtr; objct: UnivPtr; linkOffset: OTByteCount ); external name '_OTEnqueue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ This function returns the head object of the list, and places
+ the pointer at "object" + linkOffset into the listHead
+}
+{
+ * OTDequeue() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTDequeue( var listHead: UnivPtr; linkOffset: OTByteCount ): UnivPtr; external name '_OTDequeue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Atomic Operations}
+
+{
+ Note:
+ The Bit operations return the previous value of the bit (0 or non-zero).
+ The memory pointed to must be a single byte and only bits 0 through 7 are
+ valid. Bit 0 corresponds to a mask of 0x01, and Bit 7 to a mask of 0x80.
+}
+
+{
+ WARNING!
+ void* and UInt32 locations MUST be on 4-byte boundaries.
+ UInt16 locations must not cross a 4-byte boundary.
+}
+
+{
+ * OTAtomicSetBit() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTAtomicSetBit( bytePtr: UInt8Ptr; bitNumber: OTByteCount ): Boolean; external name '_OTAtomicSetBit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ bset.b d0,(a0)
+ sne d0
+ moveq #1,d1
+ and.l d1,d0
+}
+{
+ * OTAtomicClearBit() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTAtomicClearBit( bytePtr: UInt8Ptr; bitNumber: OTByteCount ): Boolean; external name '_OTAtomicClearBit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ bclr.b d0,(a0)
+ sne d0
+ moveq #1,d1
+ and.l d1,d0
+}
+{
+ * OTAtomicTestBit() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTAtomicTestBit( bytePtr: UInt8Ptr; bitNumber: OTByteCount ): Boolean; external name '_OTAtomicTestBit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ btst.b d0,(a0)
+ sne d0 *|
+ moveq #1,d1
+ and.l d1,d0 *|
+}
+{
+ * OTCompareAndSwapPtr() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTCompareAndSwapPtr( oldValue: UnivPtr; newValue: UnivPtr; var dest: UnivPtr ): Boolean; external name '_OTCompareAndSwapPtr';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ cas.l d0,d1,(a0) *|
+ seq d0 *|
+ moveq #1,d1; and.l d1,d0 *|
+}
+{
+ * OTCompareAndSwap32() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTCompareAndSwap32( oldValue: UInt32; newValue: UInt32; var dest: UInt32 ): Boolean; external name '_OTCompareAndSwap32';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ cas.l d0,d1,(a0) *|
+ seq d0 *|
+ moveq #1,d1; and.l d1,d0 *|
+}
+{
+ * OTCompareAndSwap16() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTCompareAndSwap16( oldValue: UInt32; newValue: UInt32; var dest: UInt16 ): Boolean; external name '_OTCompareAndSwap16';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ cas.w d0,d1,(a0) *|
+ seq d0 *|
+ moveq #1,d1; and.l d1,d0 *|
+}
+{
+ * OTCompareAndSwap8() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTCompareAndSwap8( oldValue: UInt32; newValue: UInt32; var dest: UInt8 ): Boolean; external name '_OTCompareAndSwap8';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ cas.b d0,d1,(a0) *|
+ seq d0 *|
+ moveq #1,d1; and.l d1,d0 *|
+}
+{
+ * OTAtomicAdd32() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTAtomicAdd32( toAdd: SInt32; var dest: SInt32 ): SInt32; external name '_OTAtomicAdd32';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ move.l d0,a1 *|
+ move.l (a0),d1 *|
+ move.l d1,d0 *|
+ add.l a1,d0 *|
+ cas.l d1,d0,(a0) *|
+ bne.s @1 *|
+}
+{
+ * OTAtomicAdd16() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTAtomicAdd16( toAdd: SInt32; var dest: SInt16 ): SInt16; external name '_OTAtomicAdd16';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Not used frequently enough to justify inlining.}
+{
+ * OTAtomicAdd8() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTAtomicAdd8( toAdd: SInt32; var dest: SInt8 ): SInt8; external name '_OTAtomicAdd8';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Not used frequently enough to justify inlining.}
+{ OTLock is just a convenience type with some convenient macros.}
+
+
+type
+ OTLock = UInt8;
+
+// #define OTClearLock(lockPtr) *(lockPtr) = 0
+// #define OTAcquireLock(lockPtr) (OTAtomicSetBit(lockPtr, 0) == 0)
+
+{******************************************************************************
+**
+** FROM HERE ON DOWN ARE THE C++ Interfaces to Open Transport
+**
+*******************************************************************************}
+
+
+
+
+{unit OpenTransportProviders}
+{
+ File: OT/OpenTransportProviders.h
+
+ Contains: This file contains provider-specific definitions for various built-in providers.
+
+ Version: OpenTransport-97~544
+
+ Copyright: © 1993-2005 by Apple Computer, Inc. and Mentat Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+ All OpenTransport Manager APIs are deprecated in MacOSX 10.4, instead of using OpenTransport,
+ consider using CFNetwork or socket library.
+}
+{ ***** TCP/IP *****}
+
+{ Basic types}
+
+type
+ InetPort = UInt16;
+ InetHost = UInt32;
+{ Enums used as address type designations.}
+const
+ AF_INET = 2;
+const
+ AF_DNS = 42;
+
+
+{
+ Enum which can be used to bind to all IP interfaces
+ rather than a specific one.
+}
+
+const
+ kOTAnyInetAddress = 0; { Wildcard }
+
+{
+ Define the InetSvcRef type. This type needs special
+ processing because in C++ it's a subclass of TProvider.
+ See the definition of TEndpointRef in "OpenTransport.h"
+ for the logic behind this definition.
+}
+
+type
+ InetSvcRef = ProviderRef; { an opaque 32-bit type }
+ InetSvcRefPtr = ^InetSvcRef;
+
+const
+ kDefaultInternetServicesPath = -3;
+{ Shared library prefixes}
+
+
+const
+ kInetVersion = '3.1.1';
+const
+ kInetPrefix = 'ot:inet$';
+
+{ Module Names}
+
+
+const
+ kDNRName = 'dnr';
+const
+ kTCPName = 'tcp';
+const
+ kUDPName = 'udp';
+const
+ kRawIPName = 'rawip';
+
+{ XTI Options}
+
+{ Protocol levels}
+
+const
+ INET_IP = $00;
+ INET_TCP = $06;
+ INET_UDP = $11;
+
+{ TCP Level Options}
+
+const
+ TCP_NODELAY = $01;
+ TCP_MAXSEG = $02;
+ TCP_NOTIFY_THRESHOLD = $10; {* not a real XTI option }
+ TCP_ABORT_THRESHOLD = $11; {* not a real XTI option }
+ TCP_CONN_NOTIFY_THRESHOLD = $12; {* not a real XTI option }
+ TCP_CONN_ABORT_THRESHOLD = $13; {* not a real XTI option }
+ TCP_OOBINLINE = $14; {* not a real XTI option }
+ TCP_URGENT_PTR_TYPE = $15; {* not a real XTI option }
+ TCP_KEEPALIVE = $0008; { keepalive defined in OpenTransport.h }
+
+const
+ T_GARBAGE = 2;
+
+{ UDP Level Options}
+
+const
+ UDP_CHECKSUM = $0600;
+ UDP_RX_ICMP = $02;
+
+{ IP Level Options}
+const
+ kIP_OPTIONS = $01;
+ kIP_TOS = $02;
+ kIP_TTL = $03;
+ kIP_REUSEADDR = $04;
+ kIP_DONTROUTE = $10;
+ kIP_BROADCAST = $20;
+ kIP_REUSEPORT = $0200;
+ kIP_HDRINCL = $1002;
+ kIP_RCVOPTS = $1005;
+ kIP_RCVDSTADDR = $1007;
+ kIP_MULTICAST_IF = $1010; { set/get IP multicast interface }
+ kIP_MULTICAST_TTL = $1011; { set/get IP multicast timetolive }
+ kIP_MULTICAST_LOOP = $1012; { set/get IP multicast loopback }
+ kIP_ADD_MEMBERSHIP = $1013; { add an IP group membership }
+ kIP_DROP_MEMBERSHIP = $1014; { drop an IP group membership }
+ kIP_BROADCAST_IFNAME = $1015; { Set interface for broadcasts }
+ kIP_RCVIFADDR = $1016; { Set interface for broadcasts }
+
+const
+ IP_OPTIONS = 1;
+{
+ BSD's netinet/in.h uses different values for the same IP_ logical constants.
+ If you are using OT and want those values, prefix your use with k
+ e.g. change IP_TTL to kIP_TTL in your source code
+}
+const
+ DVMRP_INIT = 100; { DVMRP-specific setsockopt commands, from ip_mroute.h}
+ DVMRP_DONE = 101;
+ DVMRP_ADD_VIF = 102;
+ DVMRP_DEL_VIF = 103;
+ DVMRP_ADD_LGRP = 104;
+ DVMRP_DEL_LGRP = 105;
+ DVMRP_ADD_MRT = 106;
+ DVMRP_DEL_MRT = 107;
+
+
+{ IP_TOS precdence levels}
+
+const
+ T_ROUTINE = 0;
+ T_PRIORITY = 1;
+ T_IMMEDIATE = 2;
+ T_FLASH = 3;
+ T_OVERRIDEFLASH = 4;
+ T_CRITIC_ECP = 5;
+ T_INETCONTROL = 6;
+ T_NETCONTROL = 7;
+
+{ IP_TOS type of service}
+
+const
+ T_NOTOS = $00;
+ T_LDELAY = 1 shl 4;
+ T_HITHRPT = 1 shl 3;
+ T_HIREL = 1 shl 2;
+
+// #define SET_TOS(prec,tos) (((0x7 & (prec)) << 5) | (0x1c & (tos)))
+{ IP Multicast option structures}
+
+type
+ TIPAddMulticastPtr = ^TIPAddMulticast;
+ TIPAddMulticast = record
+ multicastGroupAddress: InetHost;
+ interfaceAddress: InetHost;
+ end;
+{ Protocol-specific events}
+const
+ T_DNRSTRINGTOADDRCOMPLETE = kPRIVATEEVENT + 1;
+ T_DNRADDRTONAMECOMPLETE = kPRIVATEEVENT + 2;
+ T_DNRSYSINFOCOMPLETE = kPRIVATEEVENT + 3;
+ T_DNRMAILEXCHANGECOMPLETE = kPRIVATEEVENT + 4;
+ T_DNRQUERYCOMPLETE = kPRIVATEEVENT + 5;
+
+{ InetAddress}
+
+type
+ InetAddressPtr = ^InetAddress;
+ InetAddress = record
+ fAddressType: OTAddressType; { always AF_INET}
+ fPort: InetPort; { Port number }
+ fHost: InetHost; { Host address in net byte order}
+ fUnused: packed array [0..7] of UInt8; { Traditional unused bytes }
+ end;
+{ Domain Name Resolver (DNR) }
+const
+ kMaxHostAddrs = 10;
+ kMaxSysStringLen = 32;
+ kMaxHostNameLen = 255;
+
+
+type
+ InetDomainName = packed array [0..255] of char;
+ InetHostInfoPtr = ^InetHostInfo;
+ InetHostInfo = record
+ name: InetDomainName;
+ addrs: array [0..9] of InetHost;
+ end;
+type
+ InetSysInfoPtr = ^InetSysInfo;
+ InetSysInfo = record
+ cpuType: packed array [0..31] of char;
+ osType: packed array [0..31] of char;
+ end;
+type
+ InetMailExchangePtr = ^InetMailExchange;
+ InetMailExchange = record
+ preference: UInt16;
+ exchange: InetDomainName;
+ end;
+type
+ DNSQueryInfoPtr = ^DNSQueryInfo;
+ DNSQueryInfo = record
+ qType: UInt16;
+ qClass: UInt16;
+ ttl: UInt32;
+ name: InetDomainName;
+ responseType: UInt16; { answer, authority, or additional}
+ resourceLen: UInt16; { actual length of array which follows}
+ resourceData: packed array [0..3] of char; { size varies }
+ end;
+{ DNSAddress}
+{
+ The DNSAddress format is optional and may be used in connects,
+ datagram sends, and resolve address calls. The name takes the
+ format "somewhere.com" or "somewhere.com:portnumber" where
+ the ":portnumber" is optional. The length of this structure
+ is arbitrarily limited to the overall max length of a domain
+ name (255 chars), although a longer one can be use successfully
+ if you use this as a template for doing so. However, the domain name
+ is still limited to 255 characters.
+}
+
+type
+ DNSAddressPtr = ^DNSAddress;
+ DNSAddress = record
+ fAddressType: OTAddressType; { always AF_DNS}
+ fName: InetDomainName;
+ end;
+{ InetInterfaceInfo}
+const
+ kDefaultInetInterface = -1;
+
+const
+ kInetInterfaceInfoVersion = 3;
+
+type
+ InetInterfaceInfoPtr = ^InetInterfaceInfo;
+ InetInterfaceInfo = record
+ fAddress: InetHost;
+ fNetmask: InetHost;
+ fBroadcastAddr: InetHost;
+ fDefaultGatewayAddr: InetHost;
+ fDNSAddr: InetHost;
+ fVersion: UInt16;
+ fHWAddrLen: UInt16;
+ fHWAddr: UInt8Ptr;
+ fIfMTU: UInt32;
+ fReservedPtrs: array [0..1] of Ptr;
+ fDomainName: InetDomainName;
+ fIPSecondaryCount: UInt32;
+ fReserved: packed array [0..251] of UInt8;
+ end;
+{ InetDHCPOption}
+const
+ kAllDHCPOptions = -1;
+ kDHCPLongOption = 126;
+ kDHCPLongOptionReq = 127;
+
+type
+ InetDHCPOptionPtr = ^InetDHCPOption;
+ InetDHCPOption = record
+ fOptionTag: SInt8;
+ fOptionLen: SInt8;
+ fOptionValue: SInt8;
+ pad: SInt8
+ end;
+{ TCP/IP Utility Routines}
+
+{
+ * OTInitInetAddress() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure OTInitInetAddress( var addr: InetAddress; port: InetPort; host: InetHost ); external name '_OTInitInetAddress';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTInitDNSAddress() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTInitDNSAddress( var addr: DNSAddress; str: CStringPtr ): OTByteCount; external name '_OTInitDNSAddress';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTInetStringToHost() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTInetStringToHost( str: ConstCStringPtr; var host: InetHost ): OSStatus; external name '_OTInetStringToHost';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTInetHostToString() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure OTInetHostToString( host: InetHost; str: CStringPtr ); external name '_OTInetHostToString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTInetGetInterfaceInfo() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTInetGetInterfaceInfo( var info: InetInterfaceInfo; val: SInt32 ): OSStatus; external name '_OTInetGetInterfaceInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTInetGetSecondaryAddresses() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTInetGetSecondaryAddresses( var addr: InetHost; var count: UInt32; val: SInt32 ): OSStatus; external name '_OTInetGetSecondaryAddresses';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTInetGetDHCPConfigInfo()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ InetServices & DNR Calls}
+
+{$ifc NOT OTKERNEL}
+{
+ Under Carbon, OTOpenInternetServices routines take a client context pointer. Applications may pass NULL
+ after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a
+ valid client context.
+}
+{
+ * OTOpenInternetServicesInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTOpenInternetServicesInContext( cfig: OTConfigurationRef; oflag: OTOpenFlags; var err: OSStatus; clientContext: OTClientContextPtr ): InetSvcRef; external name '_OTOpenInternetServicesInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTAsyncOpenInternetServicesInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTAsyncOpenInternetServicesInContext( cfig: OTConfigurationRef; oflag: OTOpenFlags; upp: OTNotifyUPP; contextPtr: UnivPtr; clientContext: OTClientContextPtr ): OSStatus; external name '_OTAsyncOpenInternetServicesInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTOpenInternetServices()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTAsyncOpenInternetServices()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ The following macro may be used by applications only.}
+// #define OTOpenInternetServices(cfig, oflags, err) OTOpenInternetServicesInContext(cfig, oflags, err, NULL)
+// #define OTAsyncOpenInternetServices(cfig, oflags, proc, contextPtr) OTAsyncOpenInternetServicesInContext(cfig, oflags, proc, contextPtr, NULL)
+
+{
+ * OTInetStringToAddress() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTInetStringToAddress( ref: InetSvcRef; name: CStringPtr; var hinfo: InetHostInfo ): OSStatus; external name '_OTInetStringToAddress';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTInetAddressToName() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTInetAddressToName( ref: InetSvcRef; addr: InetHost; var name: InetDomainName ): OSStatus; external name '_OTInetAddressToName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTInetSysInfo() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTInetSysInfo( ref: InetSvcRef; name: CStringPtr; var sysinfo: InetSysInfo ): OSStatus; external name '_OTInetSysInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTInetMailExchange() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTInetMailExchange( ref: InetSvcRef; name: CStringPtr; var num: UInt16; mx: InetMailExchangePtr ): OSStatus; external name '_OTInetMailExchange';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTInetQuery() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTInetQuery( ref: InetSvcRef; name: CStringPtr; qClass: UInt16; qType: UInt16; buf: CStringPtr; buflen: OTByteCount; var argv: UnivPtr; argvlen: OTByteCount; flags: OTFlags ): OSStatus; external name '_OTInetQuery';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{$endc} { !OTKERNEL }
+
+{ ***** AppleTalk *****}
+{ Shared library prefixes}
+
+
+const
+ kATalkVersion = '1.1';
+const
+ kATalkPrefix = 'ot:atlk$';
+const
+ kATBinderID = 'ot:atbd$';
+
+{******************************************************************************
+** Module definitions
+*******************************************************************************}
+{ XTI Levels}
+
+const
+ ATK_DDP = $44445020 (* 'DDP ' *);
+ ATK_AARP = $41415250 (* 'AARP' *);
+ ATK_ATP = $41545020 (* 'ATP ' *);
+ ATK_ADSP = $41445350 (* 'ADSP' *);
+ ATK_ASP = $41535020 (* 'ASP ' *);
+ ATK_PAP = $50415020 (* 'PAP ' *);
+ ATK_NBP = $4E425020 (* 'NBP ' *);
+ ATK_ZIP = $5A495020 (* 'ZIP ' *);
+
+{ Module Names}
+
+
+const
+ kDDPName = 'ddp';
+const
+ kATPName = 'atp';
+const
+ kADSPName = 'adsp';
+const
+ kASPName = 'asp';
+const
+ kPAPName = 'pap';
+const
+ kNBPName = 'nbp';
+const
+ kZIPName = 'zip';
+const
+ kLTalkName = 'ltlk';
+const
+ kLTalkAName = 'ltlkA';
+const
+ kLTalkBName = 'ltlkB';
+
+{
+ Protocol-specific Options
+ NOTE:
+ All Protocols support OPT_CHECKSUM (Value is (unsigned long)T_YES/T_NO)
+ ATP supports OPT_RETRYCNT (# Retries, 0 = try once) and
+ OPT_INTERVAL (# Milliseconds to wait)
+}
+
+const
+ DDP_OPT_HOPCOUNT = $2100; { DDP UnitDataReq Only - set hop count, Value is (unsigned long) hop count }
+
+const
+ DDP_OPT_CHECKSUM = $0600;
+ DDP_OPT_SRCADDR = $2101; { DDP UnitDataReq Only - set src address, Value is DDPAddress }
+ ATP_OPT_REPLYCNT = $2110; { AppleTalk - ATP Resp Pkt Ct Type, Value is (unsigned long) pkt count }
+ ATP_OPT_DATALEN = $2111; { AppleTalk - ATP Pkt Data Len Type, Value is (unsigned long) length }
+ ATP_OPT_RELTIMER = $2112; { AppleTalk - ATP Release Timer Type, Value is (unsigned long) timer, (See Inside AppleTalk, second edition }
+ ATP_OPT_TRANID = $2113; { Value is (unsigned long) Boolean, Used to request Transaction ID, Returned with Transaction ID on requests }
+ PAP_OPT_OPENRETRY = $2120; { AppleTalk - PAP OpenConn Retry count, Value is (unsigned long) T_YES/T_NO }
+
+{ Protocol-Specific Events}
+
+{
+ If you send the IOCTL: OTIoctl(I_OTGetMiscellaneousEvents, 1),
+ you will receive the T_ATALKxxx events on your endpoint.
+ NOTE: The endpoint does not need to be bound.
+}
+
+const
+ kAppleTalkEvent = kPROTOCOLEVENT or $00010000;
+ T_GETMYZONECOMPLETE = kAppleTalkEvent + 1;
+ T_GETLOCALZONESCOMPLETE = kAppleTalkEvent + 2;
+ T_GETZONELISTCOMPLETE = kAppleTalkEvent + 3;
+ T_GETATALKINFOCOMPLETE = kAppleTalkEvent + 4;
+ T_ATALKROUTERDOWNEVENT = kAppleTalkEvent + 51; { No routers have been seen for a while. If the cookie is NULL, all routers are gone. Otherwise, there is still an ARA router hanging around being used, and only the local cable has been timed out.}
+ T_ATALKROUTERUPEVENT = kAppleTalkEvent + 52; { We didn't have a router, but now one has come up. Cookie is NULL for a normal router coming up, non-NULL for an ARA router coming on-line}
+ T_ATALKZONENAMECHANGEDEVENT = kAppleTalkEvent + 53; { A Zone name change was issued from the router, so our AppleTalk Zone has changed.}
+ T_ATALKCONNECTIVITYCHANGEDEVENT = kAppleTalkEvent + 54; { An ARA connection was established (cookie != NULL), or was disconnected (cookie == NULL)}
+ T_ATALKINTERNETAVAILABLEEVENT = kAppleTalkEvent + 55; { A router has appeared, and our address is in the startup range. Cookie is hi/lo of new cable range.}
+ T_ATALKCABLERANGECHANGEDEVENT = kAppleTalkEvent + 56; { A router has appeared, and it's incompatible with our current address. Cookie is hi/lo of new cable range.}
+
+const
+ T_ATALKBADROUTEREVENT = kAppleTalkEvent + 70; { A bad router has appeared/disappeared on our network.}
+ T_ALLNODESTAKENEVENT = kAppleTalkEvent + 71;
+ T_FIXEDNODETAKENEVENT = kAppleTalkEvent + 72;
+ T_MPPCOMPATCFIGEVENT = kAppleTalkEvent + 73;
+ T_FIXEDNODEBADEVENT = kAppleTalkEvent + 74;
+
+const
+ kAllATalkRoutersDown = 0; { This indicates that all routers are offline}
+ kLocalATalkRoutersDown = -1; { This indicates that all local routers went offline, but an ARA router is still active}
+ kARARouterDisconnected = -2; { This indicates that ARA was disconnected, do it's router went offline, and we have no local routers to fall back onto.}
+
+const
+ kARARouterOnline = -1; { We had no local routers, but an ARA router is now online.}
+ kATalkRouterOnline = 0; { We had no routers, but a local router is now online}
+ kLocalATalkRouterOnline = -2; { We have an ARA router, but now we've seen a local router as well}
+
+// #define IsAppleTalkEvent(x) ((x) & 0xffff0000) == kAppleTalkEvent)
+{ Protocol-specific IOCTLs}
+
+const
+ ATALK_IOC_FULLSELFSEND = $542F; { Turn on/off full self-send (it's automatic for non-backward-compatible links) }
+ ADSP_IOC_FORWARDRESET = $543C; { ADSP Forward Reset }
+
+{ Protocol-specific constants}
+
+{ ECHO}
+
+const
+ kECHO_TSDU = 585; { Max. # of data bytes.}
+
+{ NBP}
+
+const
+ kNBPMaxNameLength = 32;
+ kNBPMaxTypeLength = 32;
+ kNBPMaxZoneLength = 32;
+ kNBPSlushLength = 9; { Extra space for @, : and a few escape chars}
+ kNBPMaxEntityLength = kNBPMaxNameLength + kNBPMaxTypeLength + kNBPMaxZoneLength + 3;
+ kNBPEntityBufferSize = kNBPMaxNameLength + kNBPMaxTypeLength + kNBPMaxZoneLength + kNBPSlushLength;
+ kNBPWildCard = $3D; { NBP name and type match anything '='}
+ kNBPImbeddedWildCard = $C5; { NBP name and type match some 'Å'}
+ kNBPDefaultZone = $2A; { NBP default zone '*'}
+
+{ ZIP}
+
+const
+ kZIPMaxZoneLength = kNBPMaxZoneLength;
+
+const
+ kDDPAddressLength = 8; { value to use in netbuf.len field, Maximum length of AppleTalk address}
+ kNBPAddressLength = kNBPEntityBufferSize;
+ kAppleTalkAddressLength = kDDPAddressLength + kNBPEntityBufferSize;
+
+
+// #define OTCopyDDPAddress(addr, dest) \
+// { \
+// ((UInt32*)(dest))[0] = ((UInt32*)(addr))[0]; \
+// ((UInt32*)(dest))[1] = ((UInt32*)(addr))[1]; \
+// }
+
+{******************************************************************************
+** CLASS TAppleTalkServices
+*******************************************************************************}
+{$ifc NOT OTKERNEL}
+{
+ Define the ATSvcRef type. This type needs special
+ processing because in C++ it's a subclass of TProvider.
+ See the definition of TEndpointRef in "OpenTransport.h"
+ for the logic behind this definition.
+}
+type
+ ATSvcRef = ^SInt32; { an opaque 32-bit type }
+ ATSvcRefPtr = ^ATSvcRef;
+
+const
+ kDefaultAppleTalkServicesPath = -3;
+{
+ Under Carbon, OpenAppleTalkServices routines take a client context pointer. Applications may pass NULL
+ after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a
+ valid client context.
+}
+{
+ * OTAsyncOpenAppleTalkServicesInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTAsyncOpenAppleTalkServicesInContext( cfig: OTConfigurationRef; flags: OTOpenFlags; proc: OTNotifyUPP; contextPtr: UnivPtr; clientContext: OTClientContextPtr ): OSStatus; external name '_OTAsyncOpenAppleTalkServicesInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTOpenAppleTalkServicesInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTOpenAppleTalkServicesInContext( cfig: OTConfigurationRef; flags: OTOpenFlags; var err: OSStatus; clientContext: OTClientContextPtr ): ATSvcRef; external name '_OTOpenAppleTalkServicesInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTAsyncOpenAppleTalkServices()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTOpenAppleTalkServices()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ The following macro may be used by applications only.}
+// #define OTOpenAppleTalkServices(cfig, oflags, err) OTOpenAppleTalkServicesInContext(cfig, oflags, err, NULL)
+// #define OTAsyncOpenAppleTalkServices(cfig, oflags, proc, contextPtr) OTAsyncOpenAppleTalkServicesInContext(cfig, oflags, proc, contextPtr, NULL)
+
+{ Get the zone associated with the ATSvcRef}
+{
+ * OTATalkGetMyZone() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: not available
+ }
+function OTATalkGetMyZone( ref: ATSvcRef; var zone: TNetbuf ): OSStatus; external name '_OTATalkGetMyZone';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ Get the list of available zones associated with the local cable
+ of the ATSvcRef
+}
+{
+ * OTATalkGetLocalZones() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: not available
+ }
+function OTATalkGetLocalZones( ref: ATSvcRef; var zones: TNetbuf ): OSStatus; external name '_OTATalkGetLocalZones';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Get the list of all zones on the internet specified by the ATSvcRef}
+{
+ * OTATalkGetZoneList() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: not available
+ }
+function OTATalkGetZoneList( ref: ATSvcRef; var zones: TNetbuf ): OSStatus; external name '_OTATalkGetZoneList';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Stores an AppleTalkInfo structure into the TNetbuf (see later in this file)}
+{
+ * OTATalkGetInfo() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: not available
+ }
+function OTATalkGetInfo( ref: ATSvcRef; var info: TNetbuf ): OSStatus; external name '_OTATalkGetInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{$endc} { !OTKERNEL }
+
+{ AppleTalk Addressing}
+{
+ The NBPEntity structure is used to manipulate NBP names without regard
+ to issues of what kind of "special" characters are in the name.
+
+ When stored as an address in an NBPAddress or DDPNBPAddress, they are
+ stored as a character string, which is currently just ASCII, but in the
+ future may be UniChar, or some other internationalizable scripting set.
+ The string following an NBPAddress or DDPNBPAddress is intended to be
+ suitable for showing to users, whereas NBPEntity is not.
+ WARNING: NBPAddress and DDPNBPAddress structures do not "know" the length
+ of the address. That must have been obtained as part of a Lookup or
+ ResolveAddress call.
+}
+
+const
+ AF_ATALK_FAMILY = $0100;
+ AF_ATALK_DDP = $0100;
+ AF_ATALK_DDPNBP = AF_ATALK_FAMILY + 1;
+ AF_ATALK_NBP = AF_ATALK_FAMILY + 2;
+ AF_ATALK_MNODE = AF_ATALK_FAMILY + 3;
+
+type
+ NBPEntityPtr = ^NBPEntity;
+ NBPEntity = record
+ fEntity: packed array [0..99] of UInt8; {one extra pad byte}
+ end;
+type
+ DDPAddressPtr = ^DDPAddress;
+ DDPAddress = record
+ fAddressType: OTAddressType; { One of the enums above}
+ fNetwork: UInt16;
+ fNodeID: SInt8;
+ fSocket: SInt8;
+ fDDPType: SInt8;
+ fPad: SInt8;
+ end;
+type
+ NBPAddressPtr = ^NBPAddress;
+ NBPAddress = record
+ fAddressType: OTAddressType; { One of the enums above}
+ fNBPNameBuffer: packed array [0..104] of UInt8;
+ end;
+type
+ DDPNBPAddressPtr = ^DDPNBPAddress;
+ DDPNBPAddress = record
+ fAddressType: OTAddressType; { One of the enums above}
+ fNetwork: UInt16;
+ fNodeID: SInt8;
+ fSocket: SInt8;
+ fDDPType: SInt8;
+ fPad: SInt8;
+ fNBPNameBuffer: packed array [0..104] of UInt8;
+ end;
+{ These are some utility routines for dealing with NBP and DDP addresses. }
+
+{ Functions to initialize the various AppleTalk Address types}
+{
+ * OTInitDDPAddress() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure OTInitDDPAddress( var addr: DDPAddress; net: UInt16; node: ByteParameter; socket: ByteParameter; ddpType: ByteParameter ); external name '_OTInitDDPAddress';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTInitNBPAddress() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTInitNBPAddress( var addr: NBPAddress; name: ConstCStringPtr ): OTByteCount; external name '_OTInitNBPAddress';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTInitDDPNBPAddress() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTInitDDPNBPAddress( var addr: DDPNBPAddress; name: ConstCStringPtr; net: UInt16; node: ByteParameter; socket: ByteParameter; ddpType: ByteParameter ): OTByteCount; external name '_OTInitDDPNBPAddress';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Compare 2 DDP addresses for equality}
+{
+ * OTCompareDDPAddresses() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTCompareDDPAddresses( const (*var*) addr1: DDPAddress; const (*var*) addr2: DDPAddress ): Boolean; external name '_OTCompareDDPAddresses';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Init an NBPEntity to a NULL name}
+{
+ * OTInitNBPEntity() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure OTInitNBPEntity( var entity: NBPEntity ); external name '_OTInitNBPEntity';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Get the length an NBPEntity would have when stored as an address}
+{
+ * OTGetNBPEntityLengthAsAddress() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTGetNBPEntityLengthAsAddress( const (*var*) entity: NBPEntity ): OTByteCount; external name '_OTGetNBPEntityLengthAsAddress';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Store an NBPEntity into an address buffer}
+{
+ * OTSetAddressFromNBPEntity() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTSetAddressFromNBPEntity( nameBuf: UInt8Ptr; const (*var*) entity: NBPEntity ): OTByteCount; external name '_OTSetAddressFromNBPEntity';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Create an address buffer from a string (use -1 for len to use strlen)}
+{
+ * OTSetAddressFromNBPString() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTSetAddressFromNBPString( addrBuf: UInt8Ptr; name: ConstCStringPtr; len: SInt32 ): OTByteCount; external name '_OTSetAddressFromNBPString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ Create an NBPEntity from an address buffer. False is returned if
+ the address was truncated.
+}
+{
+ * OTSetNBPEntityFromAddress() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTSetNBPEntityFromAddress( var entity: NBPEntity; addrBuf: UInt8Ptr; len: OTByteCount ): Boolean; external name '_OTSetNBPEntityFromAddress';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Routines to set a piece of an NBP entity from a character string}
+{
+ * OTSetNBPName() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTSetNBPName( var entity: NBPEntity; name: ConstCStringPtr ): Boolean; external name '_OTSetNBPName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTSetNBPType() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTSetNBPType( var entity: NBPEntity; typeVal: ConstCStringPtr ): Boolean; external name '_OTSetNBPType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTSetNBPZone() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTSetNBPZone( var entity: NBPEntity; zone: ConstCStringPtr ): Boolean; external name '_OTSetNBPZone';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Routines to extract pieces of an NBP entity}
+{
+ * OTExtractNBPName() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure OTExtractNBPName( const (*var*) entity: NBPEntity; name: CStringPtr ); external name '_OTExtractNBPName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTExtractNBPType() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure OTExtractNBPType( const (*var*) entity: NBPEntity; typeVal: CStringPtr ); external name '_OTExtractNBPType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTExtractNBPZone() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure OTExtractNBPZone( const (*var*) entity: NBPEntity; zone: CStringPtr ); external name '_OTExtractNBPZone';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ AppleTalkInfo as used by the OTGetATalkInfo function}
+
+type
+ AppleTalkInfoPtr = ^AppleTalkInfo;
+ AppleTalkInfo = record
+ fOurAddress: DDPAddress; { Our DDP address (network # & node)}
+ fRouterAddress: DDPAddress; { The address of a router on our cable}
+ fCableRange: array [0..1] of UInt16; { The current cable range }
+ fFlags: UInt16; { See below}
+ end;
+{ For the fFlags field in AppleTalkInfo}
+const
+ kATalkInfoIsExtended = $0001; { This is an extended (phase 2) network}
+ kATalkInfoHasRouter = $0002; { This cable has a router}
+ kATalkInfoOneZone = $0004; { This cable has only one zone}
+
+{ ***** Ethernet *****}
+
+{ Interface option flags}
+
+{ Ethernet framing options}
+
+const
+ kOTFramingEthernet = $01;
+ kOTFramingEthernetIPX = $02;
+ kOTFraming8023 = $04;
+ kOTFraming8022 = $08;
+
+{
+ These are obsolete and will be going away in OT 1.5.
+ Hmmm, OT 1.5 got cancelled. The status of these options
+ is uncertain.
+}
+
+{ RawMode options}
+
+const
+ kOTRawRcvOn = 0;
+ kOTRawRcvOff = 1;
+ kOTRawRcvOnWithTimeStamp = 2;
+
+const
+ DL_PROMISC_OFF = 0; { OPT_SETPROMISCUOUS value}
+
+{ Module definitions}
+
+{ Module IDs}
+
+const
+ kT8022ModuleID = 7100;
+ kEnetModuleID = 7101;
+ kTokenRingModuleID = 7102;
+ kFDDIModuleID = 7103;
+
+{ Module Names}
+
+
+const
+ kEnet8022Name = 'enet8022x';
+const
+ kEnetName = 'enet';
+const
+ kFastEnetName = 'fenet';
+const
+ kTokenRingName = 'tokn';
+const
+ kFDDIName = 'fddi';
+const
+ kIRTalkName = 'irtlk';
+const
+ kSMDSName = 'smds';
+const
+ kATMName = 'atm';
+const
+ kT8022Name = 'tpi8022x';
+const
+ kATMSNAPName = 'atmsnap';
+const
+ kFireWireName = 'firewire';
+const
+ kFibreChannelName = 'fibre';
+
+{ Address Family}
+
+const
+ AF_8022 = 8200; { Our 802.2 generic address family}
+
+{ XTI Levels}
+
+const
+ LNK_ENET = $454E4554 (* 'ENET' *);
+ LNK_TOKN = $544F4B4E (* 'TOKN' *);
+ LNK_FDDI = $46444449 (* 'FDDI' *);
+ LNK_TPI = $4C545049 (* 'LTPI' *);
+
+{ Options}
+
+const
+ OPT_ADDMCAST = $1000;
+ OPT_DELMCAST = $1001;
+ OPT_RCVPACKETTYPE = $1002;
+ OPT_RCVDESTADDR = $1003;
+ OPT_SETRAWMODE = $1004;
+ OPT_SETPROMISCUOUS = $1005;
+
+type
+ OTPacketType = UInt32;
+const
+ kETypeStandard = 0;
+ kETypeMulticast = 1;
+ kETypeBroadcast = 2;
+ kETRawPacketBit = $80000000;
+ kETTimeStampBit = $40000000;
+
+{ Link related constants}
+
+const
+ kMulticastLength = 6; { length of an ENET hardware addressaddress}
+ k48BitAddrLength = 6;
+ k8022DLSAPLength = 2; { The protocol type is our DLSAP}
+ k8022SNAPLength = 5;
+ kEnetAddressLength = k48BitAddrLength + k8022DLSAPLength; { length of an address field used by the ENET enpoint}
+ { = k48BitAddrLength + sizeof(protocol type)}
+ kSNAPSAP = $00AA; { Special DLSAPS for ENET}
+ kIPXSAP = $00FF;
+ kMax8022SAP = $00FE;
+ k8022GlobalSAP = $00FF;
+ kMinDIXSAP = 1501;
+ kMaxDIXSAP = $FFFF;
+
+{ Generic Address Structure}
+
+type
+ T8022AddressPtr = ^T8022Address;
+ T8022Address = record
+ fAddrFamily: OTAddressType;
+ fHWAddr: packed array [0..5] of UInt8;
+ fSAP: UInt16;
+ fSNAP: packed array [0..4] of UInt8;
+ end;
+const
+ k8022BasicAddressLength = SizeOf(OTAddressType) + k48BitAddrLength + sizeof(UInt16);
+ k8022SNAPAddressLength = SizeOf(OTAddressType) + k48BitAddrLength + sizeof(UInt16) + k8022SNAPLength;
+
+{ Some helpful stuff for dealing with 48 bit addresses}
+
+
+// #define OTCompare48BitAddresses(p1, p2) \
+// (*(const UInt32*)((const UInt8*)(p1)) == *(const UInt32*)((const UInt8*)(p2)) && \
+// *(const UInt16*)(((const UInt8*)(p1))+4) == *(const UInt16*)(((const UInt8*)(p2))+4) )
+//
+// #define OTCopy48BitAddress(p1, p2) \
+// (*(UInt32*)((UInt8*)(p2)) = *(const UInt32*)((const UInt8*)(p1)), \
+// *(UInt16*)(((UInt8*)(p2))+4) = *(const UInt16*)(((const UInt8*)(p1))+4) )
+//
+// #define OTClear48BitAddress(p1) \
+// (*(UInt32*)((UInt8*)(p1)) = 0, \
+// *(UInt16*)(((UInt8*)(p1))+4) = 0 )
+//
+// #define OTCompare8022SNAP(p1, p2) \
+// (*(const UInt32*)((const UInt8*)(p1)) == *(const UInt32*)((const UInt8*)(p2)) && \
+// *(((const UInt8*)(p1))+4) == *(((const UInt8*)(p2))+4) )
+//
+// #define OTCopy8022SNAP(p1, p2) \
+// (*(UInt32*)((UInt8*)(p2)) = *(const UInt32*)((const UInt8*)(p1)), \
+// *(((UInt8*)(p2))+4) = *(((const UInt8*)(p1))+4) )
+//
+// #define OTIs48BitBroadcastAddress(p1) \
+// (*(UInt32*)((UInt8*)(p1)) == 0xffffffff && \
+// *(UInt16*)(((UInt8*)(p1))+4) == 0xffff )
+//
+// #define OTSet48BitBroadcastAddress(p1) \
+// (*(UInt32*)((UInt8*)(p1)) = 0xffffffff, \
+// *(UInt16*)(((UInt8*)(p1))+4) = 0xffff )
+//
+// #define OTIs48BitZeroAddress(p1) \
+// (*(UInt32*)((UInt8*)(p1)) == 0 && \
+// *(UInt16*)(((UInt8*)(p1))+4) == 0 )
+
+{ Link related constants}
+
+const
+ kEnetPacketHeaderLength = (2 * k48BitAddrLength) + k8022DLSAPLength;
+ kEnetTSDU = 1514; { The TSDU for ethernet.}
+ kTokenRingTSDU = 4458; { The TSDU for TokenRing.}
+ kFDDITSDU = 4458; { The TSDU for FDDI. }
+ k8022SAPLength = 1;
+ k8022BasicHeaderLength = 3; { define the length of the header portion of an 802.2 packet.}
+ { = SSAP+DSAP+ControlByte}
+ k8022SNAPHeaderLength = k8022SNAPLength + k8022BasicHeaderLength;
+
+{******************************************************************************
+** Address Types recognized by the Enet DLPI
+*******************************************************************************}
+type
+ EAddrType = UInt32;
+const
+ keaStandardAddress = 0;
+ keaMulticast = 1;
+ keaBroadcast = 2;
+ keaBadAddress = 3;
+ keaRawPacketBit = $80000000;
+ keaTimeStampBit = $40000000;
+
+{ Packet Header Structures}
+
+type
+ EnetPacketHeaderPtr = ^EnetPacketHeader;
+ EnetPacketHeader = packed record
+ fDestAddr: packed array [0..5] of UInt8;
+ fSourceAddr: packed array [0..5] of UInt8;
+ fProto: UInt16;
+ end;
+type
+ T8022HeaderPtr = ^T8022Header;
+ T8022Header = record
+ fDSAP: SInt8;
+ fSSAP: SInt8;
+ fCtrl: SInt8;
+ pad: SInt8
+ end;
+type
+ T8022SNAPHeaderPtr = ^T8022SNAPHeader;
+ T8022SNAPHeader = record
+ fDSAP: SInt8;
+ fSSAP: SInt8;
+ fCtrl: SInt8;
+ fSNAP0: SInt8;
+ fSNAP1: SInt8;
+ fSNAP2: SInt8;
+ fSNAP3: SInt8;
+ fSNAP4: SInt8;
+ end;
+type
+ T8022FullPacketHeaderPtr = ^T8022FullPacketHeader;
+ T8022FullPacketHeader = record
+ fEnetPart: EnetPacketHeader;
+ f8022Part: T8022SNAPHeader;
+ end;
+{ Define the lengths of the structures above}
+const
+ kT8022HeaderLength = 3;
+ kT8022SNAPHeaderLength = 3 + k8022SNAPLength;
+ kT8022FullPacketHeaderLength = kEnetPacketHeaderLength + kT8022SNAPHeaderLength;
+
+{ ***** Serial *****}
+
+{ Module Definitions}
+
+{ XTI Level}
+
+const
+ COM_SERIAL = $5345524C (* 'SERL' *);
+
+{ Version Number}
+
+
+const
+ kSerialABVersion = '1.1.1';
+
+{ Module Names}
+
+
+const
+ kSerialABName = 'serialAB';
+const
+ kSerialName = 'serial';
+const
+ kSerialPortAName = 'serialA';
+const
+ kSerialPortBName = 'serialB';
+
+const
+ kSerialABModuleID = 7200;
+
+const
+ kOTSerialFramingAsync = $01; { Support Async serial mode }
+ kOTSerialFramingHDLC = $02; { Support HDLC synchronous serial mode }
+ kOTSerialFramingSDLC = $04; { Support SDLC synchronous serial mode }
+ kOTSerialFramingAsyncPackets = $08; { Support Async "packet" serial mode }
+ kOTSerialFramingPPP = $10; { Port does its own PPP framing - wants unframed packets from PPP }
+
+{ IOCTL Calls for Serial Drivers}
+
+const
+ I_SetSerialDTR = $5500; { Set DTR (0 = off, 1 = on) }
+ kOTSerialSetDTROff = 0;
+ kOTSerialSetDTROn = 1;
+ I_SetSerialBreak = $5501; { Send a break on the line - kOTSerialSetBreakOff = off, kOTSerialSetBreakOn = on,}
+ { Any other number is the number of milliseconds to leave break on, then}
+ { auto shutoff}
+ kOTSerialSetBreakOn = $FFFFFFFF;
+ kOTSerialSetBreakOff = 0;
+ I_SetSerialXOffState = $5502; { Force XOFF state - 0 = Unconditionally clear XOFF state, 1 = unconditionally set it}
+ kOTSerialForceXOffTrue = 1;
+ kOTSerialForceXOffFalse = 0;
+ I_SetSerialXOn = $5503; { Send an XON character, 0 = send only if in XOFF state, 1 = send always}
+ kOTSerialSendXOnAlways = 1;
+ kOTSerialSendXOnIfXOffTrue = 0;
+ I_SetSerialXOff = $5504; { Send an XOFF character, 0 = send only if in XON state, 1 = send always}
+ kOTSerialSendXOffAlways = 1;
+ kOTSerialSendXOffIfXOnTrue = 0;
+
+{ Option Management for Serial Drivers}
+
+{
+ These options are all 4-byte values.
+ BaudRate is the baud rate.
+ DataBits is the number of data bits.
+ StopBits is the number of stop bits times 10.
+ Parity is an enum
+}
+
+const
+ SERIAL_OPT_BAUDRATE = $0100; { UInt32 }
+ SERIAL_OPT_DATABITS = $0101; { UInt32 }
+ SERIAL_OPT_STOPBITS = $0102; { UInt32 10, 15 or 20 for 1, 1.5 or 2 }
+ SERIAL_OPT_PARITY = $0103; { UInt32 }
+ SERIAL_OPT_STATUS = $0104; { UInt32 }
+ { The "Status" option is a 4-byte value option that is ReadOnly}
+ { It returns a bitmap of the current serial status}
+ SERIAL_OPT_HANDSHAKE = $0105; { UInt32 }
+ { The "Handshake" option defines what kind of handshaking the serial port}
+ { will do for line flow control. The value is a 32-bit value defined by}
+ { the function or macro SerialHandshakeData below.}
+ { For no handshake, or CTS handshake, the onChar and offChar parameters}
+ { are ignored.}
+ SERIAL_OPT_RCVTIMEOUT = $0106; { The "RcvTimeout" option defines how long the receiver should wait before delivering}
+ { less than the RcvLoWat number of characters. If RcvLoWat is 0, then the RcvTimeout}
+ { is how long a gap to wait for before delivering characters. This parameter is advisory,}
+ { and serial drivers are free to deliver data whenever they deem it convenient. For instance,}
+ { many serial drivers will deliver data whenever 64 bytes have been received, since 64 bytes}
+ { is the smallest STREAMS buffer size. Keep in mind that timeouts are quantized, so be sure to}
+ { look at the return value of the option to determine what it was negotiated to.}
+ SERIAL_OPT_ERRORCHARACTER = $0107; { This option defines how characters with parity errors are handled.}
+ { A 0 value will disable all replacement. A single character value in the low}
+ { byte designates the replacement character. When characters are received with a }
+ { parity error, they are replaced by this specified character. If a valid incoming}
+ { character matches the replacement character, then the received character's msb is}
+ { cleared. For this situation, the alternate character is used, if specified in bits}
+ { 8 through 15 of the option long, with 0xff being place in bits 16 through 23.}
+ { Whenever a valid character is received that matches the first replacement character,}
+ { it is replaced with this alternate character.}
+ SERIAL_OPT_EXTCLOCK = $0108; { The "ExtClock" requests an external clock. A 0-value turns off external clocking.}
+ { Any other value is a requested divisor for the external clock. Be aware that}
+ { not all serial implementations support an external clock, and that not all}
+ { requested divisors will be supported if it does support an external clock.}
+ SERIAL_OPT_BURSTMODE = $0109; { The "BurstMode" option informs the serial driver that it should continue looping,}
+ { reading incoming characters, rather than waiting for an interrupt for each character.}
+ { This option may not be supported by all Serial driver}
+ SERIAL_OPT_DUMMY = $010A; { placeholder}
+
+type
+ ParityOptionValues = UInt32;
+const
+ kOTSerialNoParity = 0;
+ kOTSerialOddParity = 1;
+ kOTSerialEvenParity = 2;
+
+const
+ kOTSerialSwOverRunErr = $01;
+ kOTSerialBreakOn = $08;
+ kOTSerialParityErr = $10;
+ kOTSerialOverrunErr = $20;
+ kOTSerialFramingErr = $40;
+ kOTSerialXOffSent = $00010000;
+ kOTSerialDTRNegated = $00020000;
+ kOTSerialCTLHold = $00040000;
+ kOTSerialXOffHold = $00080000;
+ kOTSerialOutputBreakOn = $01000000;
+
+const
+ kOTSerialXOnOffInputHandshake = 1; { Want XOn/XOff handshake for incoming characters }
+ kOTSerialXOnOffOutputHandshake = 2; { Want XOn/XOff handshake for outgoing characters }
+ kOTSerialCTSInputHandshake = 4; { Want CTS handshake for incoming characters }
+ kOTSerialDTROutputHandshake = 8; { Want DTR handshake for outoing characters }
+
+
+// #define OTSerialHandshakeData(type, onChar, offChar) \
+// ((((UInt32)type) << 16) | (((UInt32)onChar) << 8) | offChar)
+//
+// #define OTSerialSetErrorCharacter(rep) \
+// ((rep) & 0xff)
+//
+// #define OTSerialSetErrorCharacterWithAlternate(rep, alternate) \
+// ((((rep) & 0xff) | (((alternate) & 0xff) << 8)) | 0x80000000L)
+
+
+{ Default attributes for the serial ports}
+
+const
+ kOTSerialDefaultBaudRate = 19200;
+ kOTSerialDefaultDataBits = 8;
+ kOTSerialDefaultStopBits = 10;
+ kOTSerialDefaultParity = kOTSerialNoParity;
+ kOTSerialDefaultHandshake = 0;
+ kOTSerialDefaultOnChar = 17;
+ kOTSerialDefaultOffChar = 19;
+ kOTSerialDefaultSndBufSize = 1024;
+ kOTSerialDefaultRcvBufSize = 1024;
+ kOTSerialDefaultSndLoWat = 96;
+ kOTSerialDefaultRcvLoWat = 1;
+ kOTSerialDefaultRcvTimeout = 10;
+
+{ ***** ISDN *****}
+
+{ Module Definitions}
+
+{ XTI Level}
+
+const
+ COM_ISDN = $4953444E (* 'ISDN' *);
+
+{ Module Names}
+
+const
+ kISDNName = 'isdn';
+const
+ kISDNModuleID = 7300;
+
+
+{ ISDN framing methods, set using the I_OTSetFramingType IOCTL}
+
+const
+ kOTISDNFramingTransparentSupported = $0010; { Support Transparent mode }
+ kOTISDNFramingHDLCSupported = $0020; { Support HDLC Synchronous mode }
+ kOTISDNFramingV110Supported = $0040; { Support V.110 Asynchronous mode }
+ kOTISDNFramingV14ESupported = $0080; { Support V.14 Asynchronous mode }
+
+{ Miscellaneous equates}
+
+{ Disconnect reason codes (from Q.931)}
+
+const
+ kOTISDNUnallocatedNumber = 1;
+ kOTISDNNoRouteToSpecifiedTransitNetwork = 2;
+ kOTISDNNoRouteToDestination = 3;
+ kOTISDNChannelUnacceptable = 6;
+ kOTISDNNormal = 16;
+ kOTISDNUserBusy = 17;
+ kOTISDNNoUserResponding = 18;
+ kOTISDNNoAnswerFromUser = 19;
+ kOTISDNCallRejected = 21;
+ kOTISDNNumberChanged = 22;
+ kOTISDNNonSelectedUserClearing = 26;
+ kOTISDNDestinationOutOfOrder = 27;
+ kOTISDNInvalidNumberFormat = 28;
+ kOTISDNFacilityRejected = 29;
+ kOTISDNNormalUnspecified = 31;
+ kOTISDNNoCircuitChannelAvailable = 34;
+ kOTISDNNetworkOutOfOrder = 41;
+ kOTISDNSwitchingEquipmentCongestion = 42;
+ kOTISDNAccessInformationDiscarded = 43;
+ kOTISDNRequestedCircuitChannelNotAvailable = 44;
+ kOTISDNResourceUnavailableUnspecified = 45;
+ kOTISDNQualityOfServiceUnvailable = 49;
+ kOTISDNRequestedFacilityNotSubscribed = 50;
+ kOTISDNBearerCapabilityNotAuthorized = 57;
+ kOTISDNBearerCapabilityNotPresentlyAvailable = 58;
+ kOTISDNCallRestricted = 59;
+ kOTISDNServiceOrOptionNotAvilableUnspecified = 63;
+ kOTISDNBearerCapabilityNotImplemented = 65;
+ kOTISDNRequestedFacilityNotImplemented = 69;
+ kOTISDNOnlyRestrictedDigitalBearer = 70;
+ kOTISDNServiceOrOptionNotImplementedUnspecified = 79;
+ kOTISDNCallIdentityNotUsed = 83;
+ kOTISDNCallIdentityInUse = 84;
+ kOTISDNNoCallSuspended = 85;
+ kOTISDNCallIdentityCleared = 86;
+ kOTISDNIncompatibleDestination = 88;
+ kOTISDNInvalidTransitNetworkSelection = 91;
+ kOTISDNInvalidMessageUnspecified = 95;
+ kOTISDNMandatoryInformationElementIsMissing = 96;
+ kOTISDNMessageTypeNonExistentOrNotImplemented = 97;
+ kOTISDNInterworkingUnspecified = 127;
+
+{ OTISDNAddress}
+
+{
+ The OTISDNAddress has the following format:
+ "xxxxxx*yy"
+ where 'x' is the phone number and 'y' is the sub address (if available
+ in the network. The characters are coded in ASCII (IA5), and valid
+ characters are: '0'-'9','#','*'.
+ The max length of the each phone number is 21 characters (?) and the max
+ subaddress length is network dependent.
+ When using bonded channels the phone numbers are separated by '&'.
+ The X.25 user data is preceded by '@'.
+}
+
+const
+ kAF_ISDN = $2000;
+
+{ BSD value for AF_ISDN conflicts, so OT Carbon clients must use kAF_ISDN}
+const
+ kOTISDNMaxPhoneSize = 32;
+ kOTISDNMaxSubSize = 4;
+
+type
+ OTISDNAddressPtr = ^OTISDNAddress;
+ OTISDNAddress = record
+ fAddressType: OTAddressType;
+ fPhoneLength: UInt16;
+ fPhoneNumber: packed array [0..36] of char;
+ end;
+{ IOCTL Calls for ISDN}
+{ ISDN shares the same ioctl space as serial.}
+
+const
+ MIOC_ISDN = 85; { ISDN ioctl() cmds }
+
+ I_OTISDNAlerting = $5564; { Send or receive an ALERTING message }
+ I_OTISDNSuspend = $5565; { Send a SUSPEND message }
+ { The parameter is the Call Identity (Maximum 8 octets) }
+ I_OTISDNSuspendAcknowledge = $5566; { Receive a SUSPEND ACKNOWLEDGE message }
+ I_OTISDNSuspendReject = $5567; { Receive a SUSPEND REJECT message }
+ I_OTISDNResume = $5568; { Send a RESUME message }
+ { The parameter is the Call Identity (Maximum 8 octets) }
+ I_OTISDNResumeAcknowledge = $5569; { Receive a RESUME ACKNOWLEDGE message }
+ I_OTISDNResumeReject = $556A; { Receive a RESUME REJECT message }
+ I_OTISDNFaciltity = $556B; { Send or receive a FACILITY message }
+
+ { Connect user data size }
+
+ kOTISDNMaxUserDataSize = 32;
+
+{ Option management calls for ISDN}
+
+const
+ ISDN_OPT_COMMTYPE = $0200;
+ ISDN_OPT_FRAMINGTYPE = $0201;
+ ISDN_OPT_56KADAPTATION = $0202;
+
+{ For ISDN_OPT_COMMTYPE...}
+
+const
+ kOTISDNTelephoneALaw = 1; { G.711 A-law }
+ kOTISDNTelephoneMuLaw = 26; { G.711 µ-law }
+ kOTISDNDigital64k = 13; { unrestricted digital (default) }
+ kOTISDNDigital56k = 37; { user rate 56Kb/s }
+ kOTISDNVideo64k = 41; { video terminal at 64Kb/s }
+ kOTISDNVideo56k = 42; { video terminal at 56Kb/s }
+
+{ For ISDN_OPT_FRAMINGTYPE...}
+
+const
+ kOTISDNFramingTransparent = $0010; { Transparent mode }
+ kOTISDNFramingHDLC = $0020; { HDLC synchronous mode (default) }
+ kOTISDNFramingV110 = $0040; { V.110 asynchronous mode }
+ kOTISDNFramingV14E = $0080; { V.14E asynchronous mode }
+
+{ For ISDN_OPT_56KADAPTATION...}
+
+const
+ kOTISDNNot56KAdaptation = false; { not 56K Adaptation (default) }
+ kOTISDN56KAdaptation = true; { 56K Adaptation }
+
+{ Default options, you do not need to set these}
+
+const
+ kOTISDNDefaultCommType = kOTISDNDigital64k;
+ kOTISDNDefaultFramingType = kOTISDNFramingHDLC;
+ kOTISDNDefault56KAdaptation = kOTISDNNot56KAdaptation;
+
+
+{******************************************************************************
+* Constants for Open Transport-based Remote Access/PPP API
+*******************************************************************************}
+
+{ OTCreateConfiguration name for PPP control endpoint}
+
+const
+ kPPPControlName = 'ppp';
+
+{ XTI Level}
+
+const
+ COM_PPP = $50505043 (* 'PPPC' *);
+
+{ Options limits}
+
+const
+ kPPPMaxIDLength = 255;
+ kPPPMaxPasswordLength = 255;
+ kPPPMaxDTEAddressLength = 127;
+ kPPPMaxCallInfoLength = 255;
+
+
+{ Various XTI option value constants}
+
+const
+ kPPPStateInitial = 1;
+ kPPPStateClosed = 2;
+ kPPPStateClosing = 3;
+ kPPPStateOpening = 4;
+ kPPPStateOpened = 5;
+
+const
+ kPPPConnectionStatusIdle = 1;
+ kPPPConnectionStatusConnecting = 2;
+ kPPPConnectionStatusConnected = 3;
+ kPPPConnectionStatusDisconnecting = 4;
+
+const
+ kPPPMinMRU = 0;
+ kPPPMaxMRU = 4500;
+
+const
+ kIPCPTCPHdrCompressionDisabled = 0;
+ kIPCPTCPHdrCompressionEnabled = 1;
+
+const
+ kPPPCompressionDisabled = $00000000;
+ kPPPProtoCompression = $00000001;
+ kPPPAddrCompression = $00000002;
+
+const
+ kPPPNoOutAuthentication = 0;
+ kPPPCHAPOrPAPOutAuthentication = 1;
+
+const
+ kCCReminderTimerDisabled = 0;
+ kCCIPIdleTimerDisabled = 0;
+
+const
+ kPPPScriptTypeModem = 1;
+ kPPPScriptTypeConnect = 2;
+ kPPPMaxScriptSize = 32000;
+
+const
+ kE164Address = 1;
+ kPhoneAddress = 1;
+ kCompoundPhoneAddress = 2;
+ kX121Address = 3;
+
+const
+ kPPPConnectionStatusDialogsFlag = $00000001;
+ kPPPConnectionRemindersFlag = $00000002;
+ kPPPConnectionFlashingIconFlag = $00000004;
+ kPPPOutPasswordDialogsFlag = $00000008;
+ kPPPAllAlertsDisabledFlag = $00000000;
+ kPPPAllAlertsEnabledFlag = $0000000F;
+
+const
+ kPPPAsyncMapCharsNone = $00000000;
+ kPPPAsyncMapCharsXOnXOff = $000A0000;
+ kPPPAsyncMapCharsAll = $FFFFFFFF;
+
+
+{ Option names}
+
+const
+ IPCP_OPT_GETREMOTEPROTOADDR = $00007000;
+ IPCP_OPT_GETLOCALPROTOADDR = $00007001;
+ IPCP_OPT_TCPHDRCOMPRESSION = $00007002;
+ LCP_OPT_PPPCOMPRESSION = $00007003;
+ LCP_OPT_MRU = $00007004;
+ LCP_OPT_RCACCMAP = $00007005;
+ LCP_OPT_TXACCMAP = $00007006;
+ SEC_OPT_OUTAUTHENTICATION = $00007007;
+ SEC_OPT_ID = $00007008;
+ SEC_OPT_PASSWORD = $00007009;
+ CC_OPT_REMINDERTIMER = $00007010;
+ CC_OPT_IPIDLETIMER = $00007011;
+ CC_OPT_DTEADDRESSTYPE = $00007012;
+ CC_OPT_DTEADDRESS = $00007013;
+ CC_OPT_CALLINFO = $00007014;
+ CC_OPT_GETMISCINFO = $00007015;
+ PPP_OPT_GETCURRENTSTATE = $00007016;
+ LCP_OPT_ECHO = $00007017; { Available on Mac OS X only }
+ CC_OPT_SERIALPORTNAME = $00007200;
+
+{ Endpoint events}
+
+const
+ kPPPEvent = kPROTOCOLEVENT or $000F0000;
+ kPPPConnectCompleteEvent = kPPPEvent + 1;
+ kPPPSetScriptCompleteEvent = kPPPEvent + 2;
+ kPPPDisconnectCompleteEvent = kPPPEvent + 3;
+ kPPPDisconnectEvent = kPPPEvent + 4;
+ kPPPIPCPUpEvent = kPPPEvent + 5;
+ kPPPIPCPDownEvent = kPPPEvent + 6;
+ kPPPLCPUpEvent = kPPPEvent + 7;
+ kPPPLCPDownEvent = kPPPEvent + 8;
+ kPPPLowerLayerUpEvent = kPPPEvent + 9;
+ kPPPLowerLayerDownEvent = kPPPEvent + 10;
+ kPPPAuthenticationStartedEvent = kPPPEvent + 11;
+ kPPPAuthenticationFinishedEvent = kPPPEvent + 12;
+ kPPPDCEInitStartedEvent = kPPPEvent + 13;
+ kPPPDCEInitFinishedEvent = kPPPEvent + 14;
+ kPPPDCECallStartedEvent = kPPPEvent + 15;
+ kPPPDCECallFinishedEvent = kPPPEvent + 16;
+
+
+{******************************************************************************
+* IOCTL constants for I_OTConnect, I_OTDisconnect and I_OTScript
+* are defined in OpenTransport.h
+*******************************************************************************}
+
+{******************************************************************************
+* PPPMRULimits
+*******************************************************************************}
+type
+ PPPMRULimitsPtr = ^PPPMRULimits;
+ PPPMRULimits = record
+ mruSize: UInt32; { proposed or actual}
+ upperMRULimit: UInt32;
+ lowerMRULimit: UInt32;
+ end;
+
+{******************************************************************************
+* CCMiscInfo
+*******************************************************************************}
+type
+ CCMiscInfoPtr = ^CCMiscInfo;
+ CCMiscInfo = record
+ connectionStatus: UInt32;
+ connectionTimeElapsed: UInt32;
+ connectionTimeRemaining: UInt32;
+ bytesTransmitted: UInt32;
+ bytesReceived: UInt32;
+ reserved: UInt32;
+ end;
+
+{******************************************************************************
+* LCPEcho
+*******************************************************************************}
+{ Set both fields to zero to disable sending of LCP echo requests}
+
+type
+ LCPEchoPtr = ^LCPEcho;
+ LCPEcho = record
+ retryCount: UInt32;
+ retryPeriod: UInt32; { in milliseconds}
+ end;
+
+{******************************************************************************
+* Bits used to tell kind of product
+*******************************************************************************}
+const
+ kRAProductClientOnly = 2;
+ kRAProductOnePortServer = 3;
+ kRAProductManyPortServer = 4;
+
+
+
+
+{unit Power}
+{
+ File: Power.p
+
+ Contains: Power Manager Interfaces.
+
+ Version: Technology: Mac OS 9
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1990-2002 by Apple Computer, Inc. All rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ { Bit positions for ModemByte }
+ modemOnBit = 0;
+ ringWakeUpBit = 2;
+ modemInstalledBit = 3;
+ ringDetectBit = 4;
+ modemOnHookBit = 5;
+
+ { masks for ModemByte }
+ modemOnMask = $01;
+ ringWakeUpMask = $04;
+ modemInstalledMask = $08;
+ ringDetectMask = $10;
+ modemOnHookMask = $20;
+
+ { bit positions for BatteryByte }
+ chargerConnBit = 0;
+ hiChargeBit = 1;
+ chargeOverFlowBit = 2;
+ batteryDeadBit = 3;
+ batteryLowBit = 4;
+ connChangedBit = 5;
+
+ { masks for BatteryByte }
+ chargerConnMask = $01;
+ hiChargeMask = $02;
+ chargeOverFlowMask = $04;
+ batteryDeadMask = $08;
+ batteryLowMask = $10;
+ connChangedMask = $20;
+
+ { bit positions for SoundMixerByte }
+ MediaBaySndEnBit = 0;
+ PCISndEnBit = 1;
+ ZVSndEnBit = 2;
+ PCCardSndEnBit = 3;
+
+ { masks for SoundMixerByte }
+ MediaBaySndEnMask = $01;
+ PCISndEnMask = $02;
+ ZVSndEnMask = $04;
+ PCCardSndEnMask = $08;
+
+ { commands to SleepQRec sleepQProc }
+ kSleepRequest = 1;
+ kSleepDemand = 2;
+ kSleepWakeUp = 3;
+ kSleepRevoke = 4;
+ kSleepUnlock = 4;
+ kSleepDeny = 5; { A non-zero value clients can use to deny requests }
+ kSleepNow = 6;
+ kDozeDemand = 7;
+ kDozeWakeUp = 8;
+ kDozeRequest = 9; { additional messages for Power Mgr 2.0 }
+ kEnterStandby = 10; { Idle Queue Only }
+ kEnterRun = 11; { Idle Queue Only }
+ kSuspendRequest = 12;
+ kSuspendDemand = 13;
+ kSuspendRevoke = 14;
+ kSuspendWakeUp = 15;
+ kGetPowerLevel = 16;
+ kSetPowerLevel = 17;
+ kDeviceInitiatedWake = 18;
+ kWakeToDoze = 19;
+ kDozeToFullWakeUp = 20;
+ kGetPowerInfo = 21;
+ kGetWakeOnNetInfo = 22;
+ kSuspendWakeToDoze = 23;
+ kEnterIdle = 24; { Idle Queue Only }
+ kStillIdle = 25; { Idle Queue Only }
+ kExitIdle = 26; { Idle Queue Only }
+
+ { depreciated commands to SleepQRec sleepQProc }
+ sleepRequest = 1;
+ sleepDemand = 2;
+ sleepWakeUp = 3;
+ sleepRevoke = 4;
+ sleepUnlock = 4;
+ sleepDeny = 5;
+ sleepNow = 6;
+ dozeDemand = 7;
+ dozeWakeUp = 8;
+ dozeRequest = 9;
+ enterStandby = 10;
+ enterRun = 11;
+ suspendRequestMsg = 12;
+ suspendDemandMsg = 13;
+ suspendRevokeMsg = 14;
+ suspendWakeUpMsg = 15;
+ getPowerLevel = 16;
+ setPowerLevel = 17;
+
+ { Power Handler func messages }
+
+type
+ PowerLevel = UInt32;
+ { Power levels corresponding to PCI Bus Power Management Interface Spec (PMIS) }
+
+const
+ kPMDevicePowerLevel_On = 0; { fully-powered 'On' state (D0 state) }
+ kPMDevicePowerLevel_D1 = 1; { not used by Apple system SW }
+ kPMDevicePowerLevel_D2 = 2; { not used by Apple system SW }
+ kPMDevicePowerLevel_Off = 3; { main PCI bus power 'Off', but PCI standby power available (D3cold state) }
+
+ { PowerHandlerProc definition }
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ PowerHandlerProcPtr = function(message: UInt32; param: UnivPtr; refCon: UInt32; var regEntryID_: RegEntryID): OSStatus;
+{$elsec}
+ PowerHandlerProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ PowerHandlerUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ PowerHandlerUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppPowerHandlerProcInfo = $00003FF0;
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * NewPowerHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewPowerHandlerUPP(userRoutine: PowerHandlerProcPtr): PowerHandlerUPP; external name '_NewPowerHandlerUPP'; { old name was NewPowerHandlerProc }
+{
+ * DisposePowerHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposePowerHandlerUPP(userUPP: PowerHandlerUPP); external name '_DisposePowerHandlerUPP';
+{
+ * InvokePowerHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InvokePowerHandlerUPP(message: UInt32; param: UnivPtr; refCon: UInt32; var regEntryID_: RegEntryID; userRoutine: PowerHandlerUPP): OSStatus; external name '_InvokePowerHandlerUPP'; { old name was CallPowerHandlerProc }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ Use kIdleQueueDeviceType as the deviceType argument to AddDevicePowerHandler() to get the
+ handler into the idle queue instead of the device sleep queue.
+}
+{ PCI power management support }
+
+
+const
+ kUseDefaultMinimumWakeTime = 0; { Defaults to 5 minutes }
+ kPowerSummaryVersion = 1; { Version of PowerSummary structure. }
+ kDevicePowerInfoVersion = 1; { Version of DevicePowerInfo structure. }
+
+ { PowerSummary flags }
+ kPCIPowerOffAllowed = $00000001; { PCI power off is allowed. }
+
+ { DevicePowerInfo flags }
+ kDevicePCIPowerOffAllowed = $00000001; { PCI power off is allowed for device. }
+ kDeviceSupportsPMIS = $00000002; { Device supports Power Mgt Interface Spec. }
+ kDeviceCanAssertPMEDuringSleep = $00000004; { Device can assert PME# during sleep. }
+ kDeviceUsesCommonLogicPower = $00000008; { Device uses common-logic power }
+ kDeviceDriverPresent = $00000010; { Driver present for device. }
+ kDeviceDriverSupportsPowerMgt = $00000020; { Driver installed a power handler. }
+
+
+type
+ DevicePowerInfoPtr = ^DevicePowerInfo;
+ DevicePowerInfo = record
+ version: UInt32; { Version of this structure. }
+ regID: RegEntryID; { RegEntryID for device. }
+ flags: OptionBits; { Flags }
+ minimumWakeTime: UInt32; { Minimum seconds before sleeping again. }
+ sleepPowerNeeded: UInt32; { Milliwatts needed in the sleep state. }
+ end;
+
+ PowerSummaryPtr = ^PowerSummary;
+ PowerSummary = record
+ version: UInt32; { Version of this structure. }
+ flags: OptionBits; { Flags }
+ sleepPowerAvailable: UInt32; { Milliwatts available during sleep. }
+ sleepPowerNeeded: UInt32; { Milliwatts needed during sleep. }
+ minimumWakeTime: UInt32; { Minimum seconds before sleeping again. }
+ deviceCount: ItemCount; { Number of device power info records. }
+ devices: array [0..0] of DevicePowerInfo; { Array of device power info records. }
+ end;
+
+
+const
+ { SleepQRec.sleepQFlags }
+ noCalls = 1;
+ noRequest = 2;
+ slpQType = 16;
+ sleepQType = 16;
+
+ { Power Mgt Apple Event types and errors }
+ { power mgt class }
+ kAEMacPowerMgtEvt = $706D6774 (* 'pmgt' *); { event ids }
+ kAEMacToWake = $77616B65 (* 'wake' *);
+ kAEMacLowPowerSaveData = $706D7364 (* 'pmsd' *);
+ kAEMacEmergencySleep = $656D736C (* 'emsl' *);
+ kAEMacEmergencyShutdown = $656D7364 (* 'emsd' *);
+
+
+ {
+ These are result values returned by a Power Handler when queries
+ by the Power Mgr if the device which that Power Handler represents
+ woke the machine.
+ }
+ kDeviceDidNotWakeMachine = 0; { device did NOT wake machine }
+ kDeviceRequestsFullWake = 1; { device did wake machine and requests full wakeup }
+ kDeviceRequestsWakeToDoze = 2; { device did wake machine and requests partial wakeup }
+
+ { bits in bitfield returned by PMFeatures }
+ hasWakeupTimer = 0; { 1=wakeup timer is supported }
+ hasSharedModemPort = 1; { 1=modem port shared by SCC and internal modem }
+ hasProcessorCycling = 2; { 1=processor cycling is supported }
+ mustProcessorCycle = 3; { 1=processor cycling should not be turned off }
+ hasReducedSpeed = 4; { 1=processor can be started up at reduced speed }
+ dynamicSpeedChange = 5; { 1=processor speed can be switched dynamically }
+ hasSCSIDiskMode = 6; { 1=SCSI Disk Mode is supported }
+ canGetBatteryTime = 7; { 1=battery time can be calculated }
+ canWakeupOnRing = 8; { 1=can wakeup when the modem detects a ring }
+ hasDimmingSupport = 9; { 1=has dimming support built in (DPMS standby by default) }
+ hasStartupTimer = 10; { 1=startup timer is supported }
+ hasChargeNotification = 11; { 1=client can determine of charge connect status change notifications available }
+ hasDimSuspendSupport = 12; { 1=supports dimming LCD and CRT to DPMS suspend state }
+ hasWakeOnNetActivity = 13; { 1=hardware supports wake on network activity }
+ hasWakeOnLid = 14; { 1=hardware can wake when opened }
+ canPowerOffPCIBus = 15; { 1=hardware can power off PCI bus during sleep if cards allow }
+ hasDeepSleep = 16; { 1=hardware supports deep sleep (hibernation) mode }
+ hasSleep = 17; { 1=hardware supports normal (PowerBook-like) sleep }
+ supportsServerModeAPIs = 18; { 1=hardware supports server mode API routines }
+ supportsUPSIntegration = 19; { 1=hardware support UPS integration and reporting }
+ hasAggressiveIdling = 20; { 1=Power Manager only resets OverallAct on UsrActvity }
+ supportsIdleQueue = 21; { 1=Power Manager supports the idle queue }
+
+ { bits in bitfield returned by GetIntModemInfo and set by SetIntModemState }
+ hasInternalModem = 0; { 1=internal modem installed }
+ intModemRingDetect = 1; { 1=internal modem has detected a ring }
+ intModemOffHook = 2; { 1=internal modem is off hook }
+ intModemRingWakeEnb = 3; { 1=wakeup on ring is enabled }
+ extModemSelected = 4; { 1=external modem selected }
+ modemSetBit = 15; { 1=set bit, 0=clear bit (SetIntModemState) }
+
+ { bits in BatteryInfo.flags }
+ { ("chargerConnected" doesn't mean the charger is plugged in) }
+ batteryInstalled = 7; { 1=battery is currently connected }
+ batteryCharging = 6; { 1=battery is being charged }
+ chargerConnected = 5; { 1=charger is connected to the PowerBook }
+ upsConnected = 4; { 1=there is a UPS connected }
+ upsIsPowerSource = 3; { 1=UPS is source of power }
+
+ HDPwrQType = $4844; { 'HD' hard disk spindown queue element type }
+ PMgrStateQType = $504D; { 'PM' Power Manager state queue element type }
+
+ { client notification bits in PMgrQueueElement.pmNotifyBits }
+ pmSleepTimeoutChanged = 0;
+ pmSleepEnableChanged = 1;
+ pmHardDiskTimeoutChanged = 2;
+ pmHardDiskSpindownChanged = 3;
+ pmDimmingTimeoutChanged = 4;
+ pmDimmingEnableChanged = 5;
+ pmDiskModeAddressChanged = 6;
+ pmProcessorCyclingChanged = 7;
+ pmProcessorSpeedChanged = 8;
+ pmWakeupTimerChanged = 9;
+ pmStartupTimerChanged = 10;
+ pmHardDiskPowerRemovedbyUser = 11;
+ pmChargeStatusChanged = 12;
+ pmPowerLevelChanged = 13;
+ pmWakeOnNetActivityChanged = 14;
+
+ pmSleepTimeoutChangedMask = $01;
+ pmSleepEnableChangedMask = $02;
+ pmHardDiskTimeoutChangedMask = $04;
+ pmHardDiskSpindownChangedMask = $08;
+ pmDimmingTimeoutChangedMask = $10;
+ pmDimmingEnableChangedMask = $20;
+ pmDiskModeAddressChangedMask = $40;
+ pmProcessorCyclingChangedMask = $80;
+ pmProcessorSpeedChangedMask = $0100;
+ pmWakeupTimerChangedMask = $0200;
+ pmStartupTimerChangedMask = $0400;
+ pmHardDiskPowerRemovedbyUserMask = $0800;
+ pmChargeStatusChangedMask = $1000;
+ pmPowerLevelChangedMask = $2000;
+ pmWakeOnNetActivityChangedMask = $4000;
+
+ { System Activity Selectors }
+ { Notes: The IdleActivity selector is not available unless the hasAggressiveIdling PMFeatures bit is set. }
+ { Use IdleActivity where you used to use OverallAct if necessary. OverallAct will only }
+ { delay power cycling if it's enabled, and will delay sleep by a small amount when }
+ { hasAggressiveIdling is set. Don't use IdleActivity unless hasAggressiveIdling is set; when }
+ { hasAggressiveIdling is not set, the use of IdleActivity is undefined, and well do different }
+ { things depending on which Power Manager is currently running. }
+ OverallAct = 0; { Delays idle sleep by small amount }
+ UsrActivity = 1; { Delays idle sleep and dimming by timeout time }
+ NetActivity = 2; { Delays idle sleep and power cycling by small amount }
+ HDActivity = 3; { Delays hard drive spindown and idle sleep by small amount }
+ IdleActivity = 4; { Delays idle sleep by timeout time }
+
+ { Storage Media sleep mode defines }
+ kMediaModeOn = 0; { Media active (Drive spinning and at full power) }
+ kMediaModeStandBy = 1; { Media standby (not implemented) }
+ kMediaModeSuspend = 2; { Media Idle (not implemented) }
+ kMediaModeOff = 3; { Media Sleep (Drive not spinning and at min power, max recovery time) }
+
+ kMediaPowerCSCode = 70;
+
+
+ { definitions for HDQueueElement.hdFlags }
+ kHDQueuePostBit = 0; { 1 = call this routine on the second pass }
+ kHDQueuePostMask = $01;
+
+
+type
+ ActivityInfoPtr = ^ActivityInfo;
+ ActivityInfo = record
+ ActivityType: SInt16; { Type of activity to be fetched. Same as UpdateSystemActivity Selectors }
+ ActivityTime: UInt32; { Time of last activity (in ticks) of specified type. }
+ end;
+
+ { information returned by GetScaledBatteryInfo }
+ BatteryInfoPtr = ^BatteryInfo;
+ BatteryInfo = packed record
+ flags: UInt8; { misc flags (see below) }
+ warningLevel: UInt8; { scaled warning level (0-255) }
+ reserved: UInt8; { reserved for internal use }
+ batteryLevel: UInt8; { scaled battery level (0-255) }
+ end;
+
+ ModemByte = SInt8;
+ BatteryByte = SInt8;
+ SoundMixerByte = SInt8;
+ PMResultCode = SInt32;
+ SleepQRecPtr = ^SleepQRec;
+ HDQueueElementPtr = ^HDQueueElement;
+ PMgrQueueElementPtr = ^PMgrQueueElement;
+{$ifc TYPED_FUNCTION_POINTERS}
+ SleepQProcPtr = function(message: SInt32; qRecPtr: SleepQRecPtr): SInt32;
+{$elsec}
+ SleepQProcPtr = Register68kProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ HDSpindownProcPtr = procedure(theElement: HDQueueElementPtr);
+{$elsec}
+ HDSpindownProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ PMgrStateChangeProcPtr = procedure(theElement: PMgrQueueElementPtr; stateBits: SInt32);
+{$elsec}
+ PMgrStateChangeProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ SleepQUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SleepQUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ HDSpindownUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ HDSpindownUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ PMgrStateChangeUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ PMgrStateChangeUPP = UniversalProcPtr;
+{$endc}
+ SleepQRec = record
+ sleepQLink: SleepQRecPtr; { pointer to next queue element }
+ sleepQType: SInt16; { queue element type (must be SleepQType) }
+ sleepQProc: SleepQUPP; { pointer to sleep universal proc ptr }
+ sleepQFlags: SInt16; { flags }
+ end;
+
+ HDQueueElement = record
+ hdQLink: HDQueueElementPtr; { pointer to next queue element }
+ hdQType: SInt16; { queue element type (must be HDPwrQType) }
+ hdFlags: SInt16; { miscellaneous flags }
+ hdProc: HDSpindownUPP; { pointer to routine to call }
+ hdUser: SInt32; { user-defined (variable storage, etc.) }
+ end;
+
+ PMgrQueueElement = record
+ pmQLink: PMgrQueueElementPtr; { pointer to next queue element }
+ pmQType: SInt16; { queue element type (must be PMgrStateQType) }
+ pmFlags: SInt16; { miscellaneous flags }
+ pmNotifyBits: SInt32; { bitmap of which changes to be notified for }
+ pmProc: PMgrStateChangeUPP; { pointer to routine to call }
+ pmUser: SInt32; { user-defined (variable storage, etc.) }
+ end;
+
+
+ BatteryTimeRecPtr = ^BatteryTimeRec;
+ BatteryTimeRec = record
+ expectedBatteryTime: UInt32; { estimated battery time remaining (seconds) }
+ minimumBatteryTime: UInt32; { minimum battery time remaining (seconds) }
+ maximumBatteryTime: UInt32; { maximum battery time remaining (seconds) }
+ timeUntilCharged: UInt32; { time until battery is fully charged (seconds) }
+ end;
+
+
+ WakeupTimePtr = ^WakeupTime;
+ WakeupTime = record
+ wakeTime: UInt32; { wakeup time (same format as current time) }
+ wakeEnabled: boolean; { 1=enable wakeup timer, 0=disable wakeup timer }
+ filler: SInt8;
+ end;
+
+
+ StartupTimePtr = ^StartupTime;
+ StartupTime = record
+ startTime: UInt32; { startup time (same format as current time) }
+ startEnabled: boolean; { 1=enable startup timer, 0=disable startup timer }
+ filler: SInt8;
+ end;
+
+ { PowerSource version }
+
+const
+ kVersionOnePowerSource = 1;
+ kVersionTwoPowerSource = 2;
+ kCurrentPowerSourceVersion = 2;
+
+ { PowerSourceAttrs bits }
+
+ bSourceIsBattery = 0; { power source is battery }
+ bSourceIsAC = 1; { power source is AC }
+ bSourceCanBeCharged = 2; { power source can be charged }
+ bSourceIsUPS = 3; { power source is UPS. NOTE: software should set bSourceIsBattery and bSourceIsAC also, as appropriate }
+ bSourceProvidesWarnLevels = 4; { power source provides low power and dead battery warning levels }
+ kSourceIsBatteryMask = $01;
+ kSourceIsACMask = $02;
+ kSourceCanBeChargedMask = $04;
+ kSourceIsUPSMask = $08;
+ kSourceProvidesWarnLevelsMask = $10;
+
+ { PowerSourceFlags bits }
+
+ bSourceIsAvailable = 0; { power source is installed }
+ bSourceIsCharging = 1; { power source being charged }
+ bChargerIsAttached = 2; { a charger is connected }
+ kSourceIsAvailableMask = $01;
+ kSourceIsChargingMask = $02;
+ kChargerIsAttachedMask = $04;
+
+ { Power Capacity Types }
+
+ kCapacityIsActual = 0; { current capacity is expessed as actual capacity in same units as max }
+ kCapacityIsPercentOfMax = 1; { current capacity is expressed as a percentage of maximumCapacity }
+
+ { Net Activity Wake Options }
+ kConfigSupportsWakeOnNetBit = 0;
+ kWakeOnNetAdminAccessesBit = 1;
+ kWakeOnAllNetAccessesBit = 2;
+ kUnmountServersBeforeSleepingBit = 3;
+ kConfigSupportsWakeOnNetMask = $01;
+ kWakeOnNetAdminAccessesMask = $02;
+ kWakeOnAllNetAccessesMask = $04;
+ kUnmountServersBeforeSleepingMask = $08;
+
+ { Power Source capacity usage types }
+ kCurrentCapacityIsActualValue = 0; { currentCapacity is a real value in same units as maxCapacity }
+ kCurrentCapacityIsPercentOfMax = 1; { currentCapacity is expressed as a percentage of maxCapacity. }
+
+
+type
+ PowerSourceID = SInt16;
+ PowerSourceParamBlockPtr = ^PowerSourceParamBlock;
+ PowerSourceParamBlock = record
+ sourceID: PowerSourceID; { unique id assigned by Power Mgr }
+ sourceCapacityUsage: UInt16; { how currentCapacity is used }
+ sourceVersion: UInt32; { version of this record }
+ sourceAttr: OptionBits; { attribute flags (see below) }
+ sourceState: OptionBits; { state flags (see below) }
+ currentCapacity: UInt32; { current capacity, in }
+ { milliwatts or % }
+ maxCapacity: UInt32; { full capacity, in milliwatts }
+ timeRemaining: UInt32; { time left to deplete, }
+ { in milliwatt-hours }
+ timeToFullCharge: UInt32; { time to charge, }
+ { in milliwatt-hours }
+ voltage: UInt32; { voltage in millivolts }
+ current: SInt32; { current in milliamperes }
+ { (negative if consuming, }
+ { positive if charging) }
+ lowWarnLevel: UInt32; { low warning level in milliwatts (or % if sourceCapacityUsage is %) }
+ deadWarnLevel: UInt32; { dead warning level in milliwatts (or % if sourceCapacityUsage is %) }
+ reserved: array [0..15] of UInt32; { for future expansion }
+ end;
+
+ {
+ * DisableWUTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DisableWUTime: OSErr; external name '_DisableWUTime';
+
+{
+ * SetWUTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetWUTime(wuTime: SInt32): OSErr; external name '_SetWUTime';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * GetWUTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetWUTime(var wuTime: SInt32; var wuFlag: SignedByte): OSErr; external name '_GetWUTime';
+
+{
+ * BatteryStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function BatteryStatus(var status: SignedByte; var power: SignedByte): OSErr; external name '_BatteryStatus';
+
+{
+ * ModemStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ModemStatus(var status: SignedByte): OSErr; external name '_ModemStatus';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * IdleUpdate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IdleUpdate: SInt32; external name '_IdleUpdate';
+{
+ * GetCPUSpeed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetCPUSpeed: SInt32; external name '_GetCPUSpeed';
+{
+ * EnableIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure EnableIdle; external name '_EnableIdle';
+{
+ * DisableIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisableIdle; external name '_DisableIdle';
+{
+ * SleepQInstall()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SleepQInstall(qRecPtr: SleepQRecPtr); external name '_SleepQInstall';
+{
+ * SleepQRemove()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SleepQRemove(qRecPtr: SleepQRecPtr); external name '_SleepQRemove';
+{
+ * AOn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure AOn; external name '_AOn';
+{
+ * AOnIgnoreModem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure AOnIgnoreModem; external name '_AOnIgnoreModem';
+{
+ * BOn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure BOn; external name '_BOn';
+{
+ * AOff()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure AOff; external name '_AOff';
+{
+ * BOff()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure BOff; external name '_BOff';
+{ Public Power Management API }
+{
+ * PMSelectorCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSelectorCount: SInt16; external name '_PMSelectorCount';
+{
+ * PMFeatures()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMFeatures: UInt32; external name '_PMFeatures';
+{
+ * GetSleepTimeout()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetSleepTimeout: ByteParameter; external name '_GetSleepTimeout';
+{
+ * SetSleepTimeout()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetSleepTimeout(timeout: ByteParameter); external name '_SetSleepTimeout';
+{
+ * GetHardDiskTimeout()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetHardDiskTimeout: ByteParameter; external name '_GetHardDiskTimeout';
+{
+ * SetHardDiskTimeout()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetHardDiskTimeout(timeout: ByteParameter); external name '_SetHardDiskTimeout';
+{
+ * HardDiskPowered()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HardDiskPowered: boolean; external name '_HardDiskPowered';
+{
+ * SpinDownHardDisk()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SpinDownHardDisk; external name '_SpinDownHardDisk';
+{
+ * IsSpindownDisabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IsSpindownDisabled: boolean; external name '_IsSpindownDisabled';
+{
+ * SetSpindownDisable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetSpindownDisable(setDisable: boolean); external name '_SetSpindownDisable';
+{
+ * HardDiskQInstall()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HardDiskQInstall(var theElement: HDQueueElement): OSErr; external name '_HardDiskQInstall';
+{
+ * HardDiskQRemove()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HardDiskQRemove(var theElement: HDQueueElement): OSErr; external name '_HardDiskQRemove';
+{
+ * GetScaledBatteryInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetScaledBatteryInfo(whichBattery: SInt16; var theInfo: BatteryInfo); external name '_GetScaledBatteryInfo';
+{
+ * AutoSleepControl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure AutoSleepControl(enableSleep: boolean); external name '_AutoSleepControl';
+{
+ * GetIntModemInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIntModemInfo: UInt32; external name '_GetIntModemInfo';
+{
+ * SetIntModemState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetIntModemState(theState: SInt16); external name '_SetIntModemState';
+{
+ * MaximumProcessorSpeed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MaximumProcessorSpeed: SInt16; external name '_MaximumProcessorSpeed';
+{
+ * MinimumProcessorSpeed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MinimumProcessorSpeed: SInt16; external name '_MinimumProcessorSpeed';
+{
+ * CurrentProcessorSpeed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CurrentProcessorSpeed: SInt16; external name '_CurrentProcessorSpeed';
+{
+ * FullProcessorSpeed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FullProcessorSpeed: boolean; external name '_FullProcessorSpeed';
+{
+ * SetProcessorSpeed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetProcessorSpeed(fullSpeed: boolean): boolean; external name '_SetProcessorSpeed';
+{
+ * GetSCSIDiskModeAddress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetSCSIDiskModeAddress: SInt16; external name '_GetSCSIDiskModeAddress';
+{
+ * SetSCSIDiskModeAddress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetSCSIDiskModeAddress(scsiAddress: SInt16); external name '_SetSCSIDiskModeAddress';
+{
+ * GetWakeupTimer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetWakeupTimer(var theTime: WakeupTime); external name '_GetWakeupTimer';
+{
+ * SetWakeupTimer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetWakeupTimer(var theTime: WakeupTime); external name '_SetWakeupTimer';
+{
+ * IsProcessorCyclingEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IsProcessorCyclingEnabled: boolean; external name '_IsProcessorCyclingEnabled';
+{
+ * EnableProcessorCycling()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure EnableProcessorCycling(enable: boolean); external name '_EnableProcessorCycling';
+{
+ * BatteryCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BatteryCount: SInt16; external name '_BatteryCount';
+{
+ * GetBatteryVoltage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetBatteryVoltage(whichBattery: SInt16): Fixed; external name '_GetBatteryVoltage';
+{
+ * GetBatteryTimes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetBatteryTimes(whichBattery: SInt16; var theTimes: BatteryTimeRec); external name '_GetBatteryTimes';
+{
+ * GetDimmingTimeout()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetDimmingTimeout: ByteParameter; external name '_GetDimmingTimeout';
+{
+ * SetDimmingTimeout()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetDimmingTimeout(timeout: ByteParameter); external name '_SetDimmingTimeout';
+{
+ * DimmingControl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DimmingControl(enableSleep: boolean); external name '_DimmingControl';
+{
+ * IsDimmingControlDisabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IsDimmingControlDisabled: boolean; external name '_IsDimmingControlDisabled';
+{
+ * IsAutoSlpControlDisabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IsAutoSlpControlDisabled: boolean; external name '_IsAutoSlpControlDisabled';
+{
+ * PMgrStateQInstall()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMgrStateQInstall(var theElement: PMgrQueueElement): OSErr; external name '_PMgrStateQInstall';
+{
+ * PMgrStateQRemove()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMgrStateQRemove(var theElement: PMgrQueueElement): OSErr; external name '_PMgrStateQRemove';
+{
+ * UpdateSystemActivity()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UpdateSystemActivity(activity: ByteParameter): OSErr; external name '_UpdateSystemActivity';
+{
+ * DelaySystemIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DelaySystemIdle: OSErr; external name '_DelaySystemIdle';
+{
+ * GetStartupTimer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetStartupTimer(var theTime: StartupTime): OSErr; external name '_GetStartupTimer';
+{
+ * SetStartupTimer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetStartupTimer(var theTime: StartupTime): OSErr; external name '_SetStartupTimer';
+{
+ * GetLastActivity()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetLastActivity(var theActivity: ActivityInfo): OSErr; external name '_GetLastActivity';
+{
+ * GetSoundMixerState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetSoundMixerState(var theSoundMixerByte: SoundMixerByte): OSErr; external name '_GetSoundMixerState';
+{
+ * SetSoundMixerState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetSoundMixerState(var theSoundMixerByte: SoundMixerByte): OSErr; external name '_SetSoundMixerState';
+{
+ * GetDimSuspendState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetDimSuspendState: boolean; external name '_GetDimSuspendState';
+{
+ * SetDimSuspendState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetDimSuspendState(dimSuspendState: boolean); external name '_SetDimSuspendState';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * GetCoreProcessorTemperature()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetCoreProcessorTemperature(inCpuID: MPCpuID): SInt32; external name '_GetCoreProcessorTemperature';
+{
+ * GetWakeOnNetworkOptions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetWakeOnNetworkOptions: OptionBits; external name '_GetWakeOnNetworkOptions';
+{
+ * SetWakeOnNetworkOptions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure SetWakeOnNetworkOptions(inOptions: OptionBits); external name '_SetWakeOnNetworkOptions';
+{
+ * AddPowerSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AddPowerSource(var ioPowerSource: PowerSourceParamBlock): OSStatus; external name '_AddPowerSource';
+{
+ * RemovePowerSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RemovePowerSource(inSourceID: PowerSourceID): OSStatus; external name '_RemovePowerSource';
+{
+ * UpdatePowerSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function UpdatePowerSource(var ioSource: PowerSourceParamBlock): OSStatus; external name '_UpdatePowerSource';
+{
+ * IsServerModeEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IsServerModeEnabled: boolean; external name '_IsServerModeEnabled';
+{
+ * EnableServerMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure EnableServerMode(inEnable: boolean); external name '_EnableServerMode';
+{
+ NumBatteriesInstalled is different from BatteryCount in that it
+ indicates how many batteries are actually available at the time
+ it is called (including UPS batteries). BatteryCount shows a
+ static number of batteries a machine is capable of holding which does NOT
+ include UPS batteries. So, while a desktop might show a BatteryCount
+ of zero, its NumBatteriesInstalled value might be 1 or more if a UPS
+ is attached.
+}
+{
+ * NumBatteriesInstalled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in PowerMgrLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NumBatteriesInstalled: UInt32; external name '_NumBatteriesInstalled';
+{ Power Handler Management }
+{
+ * IsPCIPowerOffDisabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverServicesLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IsPCIPowerOffDisabled: boolean; external name '_IsPCIPowerOffDisabled';
+
+{
+ * EnablePCIPowerOff()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverServicesLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure EnablePCIPowerOff(inEnable: boolean); external name '_EnablePCIPowerOff';
+
+{
+ * AddDevicePowerHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverServicesLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AddDevicePowerHandler(regEntryID: RegEntryIDPtr; handler: PowerHandlerProcPtr; refCon: UInt32; deviceType: CStringPtr): OSStatus; external name '_AddDevicePowerHandler';
+
+{
+ * RemoveDevicePowerHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverServicesLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RemoveDevicePowerHandler(regEntryID: RegEntryIDPtr): OSStatus; external name '_RemoveDevicePowerHandler';
+
+{
+ * RemoveDevicePowerHandlerForProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverServicesLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RemoveDevicePowerHandlerForProc(proc: PowerHandlerProcPtr): OSStatus; external name '_RemoveDevicePowerHandlerForProc';
+
+{
+ * GetDevicePowerLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverServicesLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetDevicePowerLevel(regEntryID: RegEntryIDPtr; var devicePowerLevel: PowerLevel): OSStatus; external name '_GetDevicePowerLevel';
+
+{
+ * SetDevicePowerLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverServicesLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SetDevicePowerLevel(regEntryID: RegEntryIDPtr; devicePowerLevel: PowerLevel): OSStatus; external name '_SetDevicePowerLevel';
+
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+const
+ uppSleepQProcInfo = $00131832;
+ uppHDSpindownProcInfo = $000000C0;
+ uppPMgrStateChangeProcInfo = $000003C0;
+ {
+ * NewSleepQUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSleepQUPP(userRoutine: SleepQProcPtr): SleepQUPP; external name '_NewSleepQUPP'; { old name was NewSleepQProc }
+{
+ * NewHDSpindownUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewHDSpindownUPP(userRoutine: HDSpindownProcPtr): HDSpindownUPP; external name '_NewHDSpindownUPP'; { old name was NewHDSpindownProc }
+{
+ * NewPMgrStateChangeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewPMgrStateChangeUPP(userRoutine: PMgrStateChangeProcPtr): PMgrStateChangeUPP; external name '_NewPMgrStateChangeUPP'; { old name was NewPMgrStateChangeProc }
+{
+ * DisposeSleepQUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSleepQUPP(userUPP: SleepQUPP); external name '_DisposeSleepQUPP';
+{
+ * DisposeHDSpindownUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeHDSpindownUPP(userUPP: HDSpindownUPP); external name '_DisposeHDSpindownUPP';
+{
+ * DisposePMgrStateChangeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposePMgrStateChangeUPP(userUPP: PMgrStateChangeUPP); external name '_DisposePMgrStateChangeUPP';
+{
+ * InvokeSleepQUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSleepQUPP(message: SInt32; qRecPtr: SleepQRecPtr; userRoutine: SleepQUPP): SInt32; external name '_InvokeSleepQUPP'; { old name was CallSleepQProc }
+{
+ * InvokeHDSpindownUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeHDSpindownUPP(theElement: HDQueueElementPtr; userRoutine: HDSpindownUPP); external name '_InvokeHDSpindownUPP'; { old name was CallHDSpindownProc }
+{
+ * InvokePMgrStateChangeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokePMgrStateChangeUPP(theElement: PMgrQueueElementPtr; stateBits: SInt32; userRoutine: PMgrStateChangeUPP); external name '_InvokePMgrStateChangeUPP'; { old name was CallPMgrStateChangeProc }
+{$ALIGN MAC68K}
+
+
+{unit QuickdrawText}
+{
+ File: QuickdrawText.p
+
+ Contains: Quickdraw Text Interfaces.
+
+ Version: Technology: Mac OS 8.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1983-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ new CGrafPort bottleneck ("newProc2") function, used in Unicode Text drawing }
+{
+ * StandardGlyphs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickDrawText 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function StandardGlyphs(dataStream: UnivPtr; size: ByteCount): OSStatus; external name '_StandardGlyphs';
+
+
+const
+ { CharToPixel directions }
+ leftCaret = 0; { Place caret for left block }
+ rightCaret = -1; { Place caret for right block }
+ kHilite = 1; { Direction is SysDirection }
+
+ smLeftCaret = 0; { Place caret for left block - obsolete }
+ smRightCaret = -1; { Place caret for right block - obsolete }
+ smHilite = 1; { Direction is TESysJust - obsolete }
+
+ { Constants for styleRunPosition argument in PortionLine, DrawJustified, MeasureJustified, CharToPixel, and PixelToChar. }
+ onlyStyleRun = 0; { This is the only style run on the line }
+ leftStyleRun = 1; { This is leftmost of multiple style runs on the line }
+ rightStyleRun = 2; { This is rightmost of multiple style runs on the line }
+ middleStyleRun = 3; { There are multiple style runs on the line and this is neither the leftmost nor the rightmost. }
+ smOnlyStyleRun = 0; { obsolete }
+ smLeftStyleRun = 1; { obsolete }
+ smRightStyleRun = 2; { obsolete }
+ smMiddleStyleRun = 3; { obsolete }
+
+ { type for styleRunPosition parameter in PixelToChar etc. }
+
+type
+ JustStyleCode = SInt16;
+ { Type for truncWhere parameter in TruncString, TruncText }
+ TruncCode = SInt16;
+
+const
+ { Constants for truncWhere argument in TruncString and TruncText }
+ truncEnd = 0; { Truncate at end }
+ truncMiddle = $4000; { Truncate in middle }
+ smTruncEnd = 0; { Truncate at end - obsolete }
+ smTruncMiddle = $4000; { Truncate in middle - obsolete }
+
+ { Constants for TruncString and TruncText results }
+ notTruncated = 0; { No truncation was necessary }
+ truncated = 1; { Truncation performed }
+ truncErr = -1; { General error }
+ smNotTruncated = 0; { No truncation was necessary - obsolete }
+ smTruncated = 1; { Truncation performed - obsolete }
+ smTruncErr = -1; { General error - obsolete }
+
+
+type
+ StyledLineBreakCode = SInt8;
+
+const
+ smBreakWord = 0;
+ smBreakChar = 1;
+ smBreakOverflow = 2;
+
+ { QuickTime3.0 }
+ { Constants for txFlags (which used to be the pad field after txFace) }
+ tfAntiAlias = $01;
+ tfUnicode = $02;
+
+
+type
+ FontInfoPtr = ^FontInfo;
+ FontInfo = record
+ ascent: SInt16;
+ descent: SInt16;
+ widMax: SInt16;
+ leading: SInt16;
+ end;
+
+ FormatOrder = array [0..0] of SInt16;
+ FormatOrderPtr = ^FormatOrder;
+ { FormatStatus was moved to TextUtils.i }
+ { OffsetTable moved to IntlResources.i }
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ StyleRunDirectionProcPtr = function(styleRunIndex: SInt16; dirParam: UnivPtr): boolean;
+{$elsec}
+ StyleRunDirectionProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ StyleRunDirectionUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ StyleRunDirectionUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppStyleRunDirectionProcInfo = $00000390;
+ {
+ * NewStyleRunDirectionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewStyleRunDirectionUPP(userRoutine: StyleRunDirectionProcPtr): StyleRunDirectionUPP; external name '_NewStyleRunDirectionUPP'; { old name was NewStyleRunDirectionProc }
+{
+ * DisposeStyleRunDirectionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeStyleRunDirectionUPP(userUPP: StyleRunDirectionUPP); external name '_DisposeStyleRunDirectionUPP';
+{
+ * InvokeStyleRunDirectionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeStyleRunDirectionUPP(styleRunIndex: SInt16; dirParam: UnivPtr; userRoutine: StyleRunDirectionUPP): boolean; external name '_InvokeStyleRunDirectionUPP'; { old name was CallStyleRunDirectionProc }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * Pixel2Char()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Pixel2Char(textBuf: Ptr; textLen: SInt16; slop: SInt16; pixelWidth: SInt16; var leadingEdge: boolean): SInt16; external name '_Pixel2Char';
+{
+ * Char2Pixel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Char2Pixel(textBuf: Ptr; textLen: SInt16; slop: SInt16; offset: SInt16; direction: SInt16): SInt16; external name '_Char2Pixel';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * PixelToChar()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PixelToChar(textBuf: Ptr; textLength: SInt32; slop: Fixed; pixelWidth: Fixed; var leadingEdge: boolean; var widthRemaining: Fixed; styleRunPosition: JustStyleCode; numer: Point; denom: Point): SInt16; external name '_PixelToChar';
+{
+ * CharToPixel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CharToPixel(textBuf: Ptr; textLength: SInt32; slop: Fixed; offset: SInt32; direction: SInt16; styleRunPosition: JustStyleCode; numer: Point; denom: Point): SInt16; external name '_CharToPixel';
+{
+ * DrawJustified()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DrawJustified(textPtr: Ptr; textLength: SInt32; slop: Fixed; styleRunPosition: JustStyleCode; numer: Point; denom: Point); external name '_DrawJustified';
+{
+ * MeasureJustified()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure MeasureJustified(textPtr: Ptr; textLength: SInt32; slop: Fixed; charLocs: Ptr; styleRunPosition: JustStyleCode; numer: Point; denom: Point); external name '_MeasureJustified';
+{
+ * PortionLine()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PortionLine(textPtr: Ptr; textLen: SInt32; styleRunPosition: JustStyleCode; numer: Point; denom: Point): Fixed; external name '_PortionLine';
+{
+ * HiliteText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HiliteText(textPtr: Ptr; textLength: SInt16; firstOffset: SInt16; secondOffset: SInt16; var offsets: OffsetTable); external name '_HiliteText';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * DrawJust()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DrawJust(textPtr: Ptr; textLength: SInt16; slop: SInt16); external name '_DrawJust';
+{
+ * MeasureJust()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure MeasureJust(textPtr: Ptr; textLength: SInt16; slop: SInt16; charLocs: Ptr); external name '_MeasureJust';
+{
+ * PortionText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PortionText(textPtr: Ptr; textLength: SInt32): Fixed; external name '_PortionText';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * VisibleLength()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function VisibleLength(textPtr: Ptr; textLength: SInt32): SInt32; external name '_VisibleLength';
+{
+ * GetFormatOrder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetFormatOrder(ordering: FormatOrderPtr; firstFormat: SInt16; lastFormat: SInt16; lineRight: boolean; rlDirProc: StyleRunDirectionUPP; dirParam: Ptr); external name '_GetFormatOrder';
+{
+ * TextFont()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure TextFont(font: SInt16); external name '_TextFont';
+{
+ * TextFace()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure TextFace(face: StyleParameter); external name '_TextFace';
+{
+ * TextMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure TextMode(mode: SInt16); external name '_TextMode';
+{
+ * TextSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure TextSize(size: SInt16); external name '_TextSize';
+{
+ * SpaceExtra()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SpaceExtra(extra: Fixed); external name '_SpaceExtra';
+{
+ * DrawChar()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DrawChar(ch: CharParameter); external name '_DrawChar';
+{
+ * DrawString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DrawString(const (*var*) s: Str255); external name '_DrawString';
+{
+ * [Mac]DrawText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DrawText(textBuf: UnivPtr; firstByte: SInt16; byteCount: SInt16); external name '_DrawText';
+{
+ * CharWidth()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CharWidth(ch: CharParameter): SInt16; external name '_CharWidth';
+{
+ * StringWidth()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function StringWidth(const (*var*) s: Str255): SInt16; external name '_StringWidth';
+{
+ * TextWidth()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TextWidth(textBuf: UnivPtr; firstByte: SInt16; byteCount: SInt16): SInt16; external name '_TextWidth';
+{
+ * MeasureText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure MeasureText(count: SInt16; textAddr: UnivPtr; charLocs: UnivPtr); external name '_MeasureText';
+{
+ * GetFontInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetFontInfo(var info: FontInfo); external name '_GetFontInfo';
+{
+ * CharExtra()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure CharExtra(extra: Fixed); external name '_CharExtra';
+{
+ * StdText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure StdText(count: SInt16; textAddr: UnivPtr; numer: Point; denom: Point); external name '_StdText';
+{
+ * StdTxMeas()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function StdTxMeas(byteCount: SInt16; textAddr: UnivPtr; var numer: Point; var denom: Point; var info: FontInfo): SInt16; external name '_StdTxMeas';
+{
+ * StyledLineBreak()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function StyledLineBreak(textPtr: Ptr; textLen: SInt32; textStart: SInt32; textEnd: SInt32; flags: SInt32; var textWidth: Fixed; var textOffset: SInt32): StyledLineBreakCode; external name '_StyledLineBreak';
+{
+ * TruncString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TruncString(width: SInt16; var theString: Str255; truncWhere: TruncCode): SInt16; external name '_TruncString';
+{
+ * TruncText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TruncText(width: SInt16; textPtr: Ptr; var length: SInt16; truncWhere: TruncCode): SInt16; external name '_TruncText';
+{$ifc OLDROUTINENAMES}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * NPixel2Char()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NPixel2Char(textBuf: Ptr; textLength: SInt32; slop: Fixed; pixelWidth: Fixed; var leadingEdge: boolean; var widthRemaining: Fixed; styleRunPosition: JustStyleCode; numer: Point; denom: Point): SInt16; external name '_NPixel2Char';
+{
+ * NChar2Pixel()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NChar2Pixel(textBuf: Ptr; textLength: SInt32; slop: Fixed; offset: SInt32; direction: SInt16; styleRunPosition: JustStyleCode; numer: Point; denom: Point): SInt16; external name '_NChar2Pixel';
+{
+ * NDrawJust()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure NDrawJust(textPtr: Ptr; textLength: SInt32; slop: Fixed; styleRunPosition: JustStyleCode; numer: Point; denom: Point); external name '_NDrawJust';
+{
+ * NMeasureJust()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure NMeasureJust(textPtr: Ptr; textLength: SInt32; slop: Fixed; charLocs: Ptr; styleRunPosition: JustStyleCode; numer: Point; denom: Point); external name '_NMeasureJust';
+{
+ * NPortionText()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NPortionText(textPtr: Ptr; textLen: SInt32; styleRunPosition: JustStyleCode; numer: Point; denom: Point): Fixed; external name '_NPortionText';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {OLDROUTINENAMES}
+
+{$ALIGN MAC68K}
+
+
+{unit SCDynamicStoreKey}
+{
+ * Copyright (c) 2000-2002 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,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES of MERCHANTABILITY,
+ * 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, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{!
+ @header SCDynamicStoreKey
+ }
+
+{
+ * SCDynamicStoreKeyCreate*
+ * - convenience routines that create a CFString key for an item in the store
+ }
+
+{!
+ @function SCDynamicStoreKeyCreate
+ @discussion Creates a store key using the given format.
+ }
+// function SCDynamicStoreKeyCreate( allocator: CFAllocatorRef; fmt: CFStringRef; ... ): CFStringRef;
+
+{!
+ @function SCDynamicStoreKeyCreateNetworkGlobalEntity
+ }
+function SCDynamicStoreKeyCreateNetworkGlobalEntity( allocator: CFAllocatorRef; domain: CFStringRef; entity: CFStringRef ): CFStringRef; external name '_SCDynamicStoreKeyCreateNetworkGlobalEntity';
+
+{!
+ @function SCDynamicStoreKeyCreateNetworkInterface
+ }
+function SCDynamicStoreKeyCreateNetworkInterface( allocator: CFAllocatorRef; domain: CFStringRef ): CFStringRef; external name '_SCDynamicStoreKeyCreateNetworkInterface';
+
+{!
+ @function SCDynamicStoreKeyCreateNetworkInterfaceEntity
+ }
+function SCDynamicStoreKeyCreateNetworkInterfaceEntity( allocator: CFAllocatorRef; domain: CFStringRef; ifname: CFStringRef; entity: CFStringRef ): CFStringRef; external name '_SCDynamicStoreKeyCreateNetworkInterfaceEntity';
+
+{!
+ @function SCDynamicStoreKeyCreateNetworkServiceEntity
+ }
+function SCDynamicStoreKeyCreateNetworkServiceEntity( allocator: CFAllocatorRef; domain: CFStringRef; serviceID: CFStringRef; entity: CFStringRef ): CFStringRef; external name '_SCDynamicStoreKeyCreateNetworkServiceEntity';
+
+{!
+ @function SCDynamicStoreKeyCreateComputerName
+ @discussion Creates a key that can be used by the SCDynamicStoreSetNotificationKeys()
+ function to receive notifications when the current
+ computer/host name changes.
+ @result A notification string for the current computer/host name.
+}
+function SCDynamicStoreKeyCreateComputerName( allocator: CFAllocatorRef ): CFStringRef; external name '_SCDynamicStoreKeyCreateComputerName';
+
+{!
+ @function SCDynamicStoreKeyCreateConsoleUser
+ @discussion Creates a key that can be used by the SCDynamicStoreSetNotificationKeys()
+ function to receive notifications when the current "Console"
+ user changes.
+ @result A notification string for the current "Console" user.
+}
+function SCDynamicStoreKeyCreateConsoleUser( allocator: CFAllocatorRef ): CFStringRef; external name '_SCDynamicStoreKeyCreateConsoleUser';
+
+{!
+ @function SCDynamicStoreKeyCreateHostNames
+ @discussion Creates a key that can be used in conjunction with
+ SCDynamicStoreSetNotificationKeys() to receive
+ notifications when the HostNames entity changes. The
+ HostNames entity contains the LocalHostName.
+ @result A notification string for the HostNames entity.
+}
+function SCDynamicStoreKeyCreateHostNames( allocator: CFAllocatorRef ): CFStringRef; external name '_SCDynamicStoreKeyCreateHostNames';
+
+{!
+ @function SCDynamicStoreKeyCreateLocation
+ @discussion Creates a key that can be used in conjunction with
+ SCDynamicStoreSetNotificationKeys() to receive
+ notifications when the "location" identifier changes.
+ @result A notification string for the current "location" identifier.
+}
+function SCDynamicStoreKeyCreateLocation( allocator: CFAllocatorRef ): CFStringRef; external name '_SCDynamicStoreKeyCreateLocation';
+
+{!
+ @function SCDynamicStoreKeyCreateProxies
+ @discussion Creates a key that can be used by the SCDynamicStoreSetNotificationKeys()
+ function to receive notifications when the current network proxy
+ settings (HTTP, FTP, ...) are changed.
+ @result A notification string for the current proxy settings.
+}
+function SCDynamicStoreKeyCreateProxies( allocator: CFAllocatorRef ): CFStringRef; external name '_SCDynamicStoreKeyCreateProxies';
+
+{unit SCNetwork}
+{
+ * 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,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES of MERCHANTABILITY,
+ * 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, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{!
+ @header SCNetwork
+
+ SCNetworkCheckReachabilityXXX()
+
+ The SCNetworkCheckReachabilityXXX() APIs allow an application to
+ determine the status of the system's current network configuration
+ and the accessibility of a target host/address.
+
+ The term "reachable" reflects whether a data packet, sent by
+ an application into the network stack, can be sent to the
+ the target host/address. Please note that their is no
+ guarantee that the data packet will actually be received by
+ the host.
+
+
+ SCNetworkInterfaceRefreshConfiguration()
+
+ This API sends a notification to interested network configuration
+ agents to retry their configuraton immediately. For example, calling
+ this API will cause the DHCP client to contact the DHCP server
+ immediately rather than waiting until its timeout has expired.
+ The utility of this API is to allow the caller to give a hint to
+ the system that the network infrastructure/configuration has changed.
+ }
+
+{!
+ @enum SCNetworkConnectionFlags
+ @discussion Flags that indicate whether the specified network
+ nodename/address is reachable, requires a connection,
+ requires some user intervention in establishing the
+ connection, and whether the calling application must
+ initiate the connection using the (TBD???) API.
+
+ @constant kSCNetworkFlagsTransientConnection
+ This flag indicates that the specified nodename/address can
+ be reached via a transient (e.g. PPP) connection.
+
+ @constant kSCNetworkFlagsReachable
+ This flag indicates that the specified nodename/address can
+ be reached using the current network configuration.
+
+ @constant kSCNetworkFlagsConnectionRequired
+ This flag indicates that the specified nodename/address can
+ be reached using the current network configuration but a
+ connection must first be established.
+
+ As an example, this status would be returned for a dialup
+ connection that was not currently active but could handle
+ network traffic for the target system.
+
+ @constant kSCNetworkFlagsConnectionAutomatic
+ This flag indicates that the specified nodename/address can
+ be reached using the current network configuration but a
+ connection must first be established. Any traffic directed
+ to the specified name/address will initiate the connection.
+
+ @constant kSCNetworkFlagsInterventionRequired
+ This flag indicates that the specified nodename/address can
+ be reached using the current network configuration but a
+ connection must first be established. In addition, some
+ form of user intervention will be required to establish
+ this connection (e.g. providing a password, authentication
+ token, etc.).
+
+ @constant kSCNetworkFlagsIsLocalAddress
+ This flag indicates that the specified nodename/address
+ is one associated with a network interface on the current
+ system.
+
+ @constant kSCNetworkFlagsIsDirect
+ This flag indicates that network traffic to the specified
+ nodename/address will not go through a gateway but is routed
+ directly to one of the interfaces in the system.
+ }
+type
+ SCNetworkConnectionFlags = UInt32;
+const
+ kSCNetworkFlagsTransientConnection = 1 shl 0;
+ kSCNetworkFlagsReachable = 1 shl 1;
+ kSCNetworkFlagsConnectionRequired = 1 shl 2;
+ kSCNetworkFlagsConnectionAutomatic = 1 shl 3;
+ kSCNetworkFlagsInterventionRequired = 1 shl 4;
+ kSCNetworkFlagsIsLocalAddress = 1 shl 16;
+ kSCNetworkFlagsIsDirect = 1 shl 17;
+
+{!
+ @function SCNetworkCheckReachabilityByAddress
+ @discussion Determines if the given network address is
+ reachable using the current network configuration.
+ @param address The network address of the desired host.
+ @param addrlen The length, in bytes, of the address.
+ @param flags A pointer to memory that will be filled with a
+ set of SCNetworkConnectionFlags detailing the reachability
+ of the specified address.
+ @result TRUE if the network connection flags are valid; FALSE if the
+ status could not be determined.
+ }
+function SCNetworkCheckReachabilityByAddress( address: sockaddr_ptr; addrlen: SInt32; var flags: SCNetworkConnectionFlags ): Boolean; external name '_SCNetworkCheckReachabilityByAddress';
+
+{!
+ @function SCNetworkCheckReachabilityByName
+ @discussion Determines if the given network host/node name is
+ reachable using the current network configuration.
+ @param nodename The node name of the desired host. This name would
+ be the same as that passed to gethostbyname() or getaddrinfo().
+ @param flags A pointer to memory that will be filled with a
+ set of SCNetworkConnectionFlags detailing the reachability
+ of the specified node name.
+ @result TRUE if the network connection flags are valid; FALSE if the
+ status could not be determined.
+ }
+function SCNetworkCheckReachabilityByName( nodename: CStringPtr; var flags: SCNetworkConnectionFlags ): Boolean; external name '_SCNetworkCheckReachabilityByName';
+{!
+ @function SCNetworkInterfaceRefreshConfiguration
+ @discussion Sends a notification to interested configuration agents
+ to have them immediately retry their configuration over a
+ particular network interface.
+ Note: This API must be invoked by root (uid == 0).
+
+ @param ifName The BSD name of the network interface e.g. CFSTR("en0").
+ @result TRUE if the notification was sent; FALSE otherwise.
+ }
+function SCNetworkInterfaceRefreshConfiguration( ifName: CFStringRef ): Boolean; external name '_SCNetworkInterfaceRefreshConfiguration';
+
+{unit SCSI}
+{
+ File: SCSI.p
+
+ Contains: SCSI Family Interfaces.
+
+ Version: Technology: SCSI 4.3
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1986-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ SCSI Manager errors. These are generated by Inside Mac IV calls only. }
+
+const
+ scCommErr = 2; { communications error, operation timeout }
+ scArbNBErr = 3; { arbitration timeout waiting for not BSY }
+ scBadParmsErr = 4; { bad parameter or TIB opcode }
+ scPhaseErr = 5; { SCSI bus not in correct phase for attempted operation }
+ scCompareErr = 6; { data compare error }
+ scMgrBusyErr = 7; { SCSI Manager busy }
+ scSequenceErr = 8; { attempted operation is out of sequence }
+ scBusTOErr = 9; { CPU bus timeout }
+ scComplPhaseErr = 10; { SCSI bus wasn't in Status phase }
+
+ { TIB opcodes }
+ scInc = 1;
+ scNoInc = 2;
+ scAdd = 3;
+ scMove = 4;
+ scLoop = 5;
+ scNop = 6;
+ scStop = 7;
+ scComp = 8;
+
+ {
+ * All disk partition structures and definitions are now in the
+ * AppleDiskPartitions.h/p/a files.
+ }
+ { TIB instruction }
+
+type
+ SCSIInstrPtr = ^SCSIInstr;
+ SCSIInstr = record
+ scOpcode: UInt16;
+ scParam1: SInt32;
+ scParam2: SInt32;
+ end;
+
+ { SCSI Phases (used by SIMs to support the Original SCSI Manager }
+
+const
+ kDataOutPhase = 0; { Encoded MSG, C/D, I/O bits }
+ kDataInPhase = 1;
+ kCommandPhase = 2;
+ kStatusPhase = 3;
+ kPhaseIllegal0 = 4;
+ kPhaseIllegal1 = 5;
+ kMessageOutPhase = 6;
+ kMessageInPhase = 7;
+ kBusFreePhase = 8; { Additional Phases }
+ kArbitratePhase = 9;
+ kSelectPhase = 10;
+ kMessageInPhaseNACK = 11; { Message In Phase with ACK hanging on the bus }
+
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * SCSIReset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSIReset: OSErr; external name '_SCSIReset';
+{
+ * SCSIGet()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSIGet: OSErr; external name '_SCSIGet';
+{
+ * SCSISelect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSISelect(targetID: SInt16): OSErr; external name '_SCSISelect';
+{
+ * SCSICmd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSICmd(buffer: Ptr; count: SInt16): OSErr; external name '_SCSICmd';
+{
+ * SCSIRead()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSIRead(tibPtr: Ptr): OSErr; external name '_SCSIRead';
+{
+ * SCSIRBlind()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSIRBlind(tibPtr: Ptr): OSErr; external name '_SCSIRBlind';
+{
+ * SCSIWrite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSIWrite(tibPtr: Ptr): OSErr; external name '_SCSIWrite';
+{
+ * SCSIWBlind()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSIWBlind(tibPtr: Ptr): OSErr; external name '_SCSIWBlind';
+{
+ * SCSIComplete()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSIComplete(var stat: SInt16; var message: SInt16; wait: UInt32): OSErr; external name '_SCSIComplete';
+{
+ * SCSIStat()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSIStat: SInt16; external name '_SCSIStat';
+{
+ * SCSISelAtn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSISelAtn(targetID: SInt16): OSErr; external name '_SCSISelAtn';
+{
+ * SCSIMsgIn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSIMsgIn(var message: SInt16): OSErr; external name '_SCSIMsgIn';
+{
+ * SCSIMsgOut()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSIMsgOut(message: SInt16): OSErr; external name '_SCSIMsgOut';
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+const
+ scsiVERSION = 43;
+
+
+ {
+ * SCSI Callback Procedure Prototypes. Several of these are only callable
+ * from SCSI Manager 4.3 SIM and XPT contexts.
+ }
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ AENCallbackProcPtr = procedure;
+{$elsec}
+ AENCallbackProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SIMInitProcPtr = function(SIMinfoPtr: Ptr): OSErr;
+{$elsec}
+ SIMInitProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SIMActionProcPtr = procedure(scsiPB: UnivPtr; SIMGlobals: Ptr);
+{$elsec}
+ SIMActionProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SCSIProcPtr = procedure;
+{$elsec}
+ SCSIProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SCSIMakeCallbackProcPtr = procedure(scsiPB: UnivPtr);
+{$elsec}
+ SCSIMakeCallbackProcPtr = ProcPtr;
+{$endc}
+
+ { SCSIInterruptPollProcPtr is obsolete (use SCSIInterruptProcPtr) but still here for compatibility }
+{$ifc TYPED_FUNCTION_POINTERS}
+ SCSIInterruptPollProcPtr = function(SIMGlobals: Ptr): SInt32;
+{$elsec}
+ SCSIInterruptPollProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SCSIInterruptProcPtr = function(SIMGlobals: Ptr): SInt32;
+{$elsec}
+ SCSIInterruptProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ AENCallbackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ AENCallbackUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SIMInitUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SIMInitUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SIMActionUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SIMActionUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SCSIUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SCSIUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SCSIMakeCallbackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SCSIMakeCallbackUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SCSIInterruptPollUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SCSIInterruptPollUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SCSIInterruptUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SCSIInterruptUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppAENCallbackProcInfo = $00000001;
+ uppSIMInitProcInfo = $000000E1;
+ uppSIMActionProcInfo = $000003C1;
+ uppSCSIProcInfo = $00000001;
+ uppSCSIMakeCallbackProcInfo = $000000C1;
+ uppSCSIInterruptPollProcInfo = $000000F1;
+ uppSCSIInterruptProcInfo = $000000F1;
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * NewAENCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewAENCallbackUPP(userRoutine: AENCallbackProcPtr): AENCallbackUPP; external name '_NewAENCallbackUPP'; { old name was NewAENCallbackProc }
+{
+ * NewSIMInitUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewSIMInitUPP(userRoutine: SIMInitProcPtr): SIMInitUPP; external name '_NewSIMInitUPP'; { old name was NewSIMInitProc }
+{
+ * NewSIMActionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewSIMActionUPP(userRoutine: SIMActionProcPtr): SIMActionUPP; external name '_NewSIMActionUPP'; { old name was NewSIMActionProc }
+{
+ * NewSCSIUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewSCSIUPP(userRoutine: SCSIProcPtr): SCSIUPP; external name '_NewSCSIUPP'; { old name was NewSCSIProc }
+{
+ * NewSCSIMakeCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewSCSIMakeCallbackUPP(userRoutine: SCSIMakeCallbackProcPtr): SCSIMakeCallbackUPP; external name '_NewSCSIMakeCallbackUPP'; { old name was NewSCSIMakeCallbackProc }
+{
+ * NewSCSIInterruptPollUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewSCSIInterruptPollUPP(userRoutine: SCSIInterruptPollProcPtr): SCSIInterruptPollUPP; external name '_NewSCSIInterruptPollUPP'; { old name was NewSCSIInterruptPollProc }
+{
+ * NewSCSIInterruptUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewSCSIInterruptUPP(userRoutine: SCSIInterruptProcPtr): SCSIInterruptUPP; external name '_NewSCSIInterruptUPP'; { old name was NewSCSIInterruptProc }
+{
+ * DisposeAENCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposeAENCallbackUPP(userUPP: AENCallbackUPP); external name '_DisposeAENCallbackUPP';
+{
+ * DisposeSIMInitUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposeSIMInitUPP(userUPP: SIMInitUPP); external name '_DisposeSIMInitUPP';
+{
+ * DisposeSIMActionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposeSIMActionUPP(userUPP: SIMActionUPP); external name '_DisposeSIMActionUPP';
+{
+ * DisposeSCSIUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposeSCSIUPP(userUPP: SCSIUPP); external name '_DisposeSCSIUPP';
+{
+ * DisposeSCSIMakeCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposeSCSIMakeCallbackUPP(userUPP: SCSIMakeCallbackUPP); external name '_DisposeSCSIMakeCallbackUPP';
+{
+ * DisposeSCSIInterruptPollUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposeSCSIInterruptPollUPP(userUPP: SCSIInterruptPollUPP); external name '_DisposeSCSIInterruptPollUPP';
+{
+ * DisposeSCSIInterruptUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposeSCSIInterruptUPP(userUPP: SCSIInterruptUPP); external name '_DisposeSCSIInterruptUPP';
+{
+ * InvokeAENCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure InvokeAENCallbackUPP(userRoutine: AENCallbackUPP); external name '_InvokeAENCallbackUPP'; { old name was CallAENCallbackProc }
+{
+ * InvokeSIMInitUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InvokeSIMInitUPP(SIMinfoPtr: Ptr; userRoutine: SIMInitUPP): OSErr; external name '_InvokeSIMInitUPP'; { old name was CallSIMInitProc }
+{
+ * InvokeSIMActionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure InvokeSIMActionUPP(scsiPB: UnivPtr; SIMGlobals: Ptr; userRoutine: SIMActionUPP); external name '_InvokeSIMActionUPP'; { old name was CallSIMActionProc }
+{
+ * InvokeSCSIUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure InvokeSCSIUPP(userRoutine: SCSIUPP); external name '_InvokeSCSIUPP'; { old name was CallSCSIProc }
+{
+ * InvokeSCSIMakeCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure InvokeSCSIMakeCallbackUPP(scsiPB: UnivPtr; userRoutine: SCSIMakeCallbackUPP); external name '_InvokeSCSIMakeCallbackUPP'; { old name was CallSCSIMakeCallbackProc }
+{
+ * InvokeSCSIInterruptPollUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InvokeSCSIInterruptPollUPP(SIMGlobals: Ptr; userRoutine: SCSIInterruptPollUPP): SInt32; external name '_InvokeSCSIInterruptPollUPP'; { old name was CallSCSIInterruptPollProc }
+{
+ * InvokeSCSIInterruptUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InvokeSCSIInterruptUPP(SIMGlobals: Ptr; userRoutine: SCSIInterruptUPP): SInt32; external name '_InvokeSCSIInterruptUPP'; { old name was CallSCSIInterruptProc }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * SCSI Completion routine callback for SCSIAction.
+ }
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ SCSICallbackProcPtr = procedure(scsiPB: UnivPtr);
+{$elsec}
+ SCSICallbackProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ SCSICallbackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SCSICallbackUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppSCSICallbackProcInfo = $000000C0;
+ {
+ * NewSCSICallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSCSICallbackUPP(userRoutine: SCSICallbackProcPtr): SCSICallbackUPP; external name '_NewSCSICallbackUPP'; { old name was NewSCSICallbackProc }
+{
+ * DisposeSCSICallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSCSICallbackUPP(userUPP: SCSICallbackUPP); external name '_DisposeSCSICallbackUPP';
+{
+ * InvokeSCSICallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeSCSICallbackUPP(scsiPB: UnivPtr; userRoutine: SCSICallbackUPP); external name '_InvokeSCSICallbackUPP'; { old name was CallSCSICallbackProc }
+{
+ SCSI Manager 4.3 function codes
+ }
+
+const
+ SCSINop = $00; { Execute nothing }
+ SCSIExecIO = $01; { Execute the specified IO }
+ SCSIBusInquiry = $03; { Get parameters for entire path of HBAs }
+ SCSIReleaseQ = $04; { Release the frozen SIM queue for particular LUN }
+ SCSIAbortCommand = $10; { Abort the selected Control Block }
+ SCSIResetBus = $11; { Reset the SCSI bus }
+ SCSIResetDevice = $12; { Reset the SCSI device }
+ SCSITerminateIO = $13; { Terminate any pending IO }
+
+ { Not available in Carbon on X }
+ SCSIGetVirtualIDInfo = $80; { Find out which bus old ID is on }
+ SCSILoadDriver = $82; { Load a driver for a device ident }
+ SCSIOldCall = $84; { XPT->SIM private call for old-API }
+ SCSICreateRefNumXref = $85; { Register a DeviceIdent to drvr RefNum xref }
+ SCSILookupRefNumXref = $86; { Get DeviceIdent to drvr RefNum xref }
+ SCSIRemoveRefNumXref = $87; { Remove a DeviceIdent to drvr RefNum xref }
+ SCSIRegisterWithNewXPT = $88; { XPT has changed - SIM needs to re-register itself }
+
+ vendorUnique = $C0; { 0xC0 thru 0xFF }
+
+
+ { Allocation length defines for some of the fields }
+ handshakeDataLength = 8; { Handshake data length }
+ maxCDBLength = 16; { Space for the CDB bytes/pointer }
+ vendorIDLength = 16; { ASCII string len for Vendor ID }
+
+ { Define DeviceIdent structure }
+
+type
+ DeviceIdentPtr = ^DeviceIdent;
+ DeviceIdent = packed record
+ diReserved: UInt8; { reserved }
+ bus: UInt8; { SCSI - Bus Number }
+ targetID: UInt8; { SCSI - Target SCSI ID }
+ LUN: UInt8; { SCSI - LUN }
+ end;
+
+ { Constants for the diReserved field of DeviceIdent }
+ { used to distinguish whether the DeviceIdent holds }
+ { information about a SCSI device (kBusTypeSCSI) }
+ { or an ATA device (kBusTypeATA). The other }
+ { constants are pretty much deprecated. Let me }
+ { know if you see any. }
+
+const
+ kBusTypeSCSI = 0;
+ kBusTypeATA = 1;
+ kBusTypePCMCIA = 2;
+ kBusTypeMediaBay = 3;
+
+ { If diReserved indicates that a DeviceIdent is }
+ { really for ATA, you can cast it to DeviceIdentATA }
+ { to get at the important fields. }
+
+type
+ DeviceIdentATAPtr = ^DeviceIdentATA;
+ DeviceIdentATA = record
+ diReserved: SInt8;
+ busNum: SInt8;
+ devNum: SInt8;
+ diReserved2: SInt8;
+ end;
+
+ { for use with Apple Patch Driver used during booting }
+ PatchDescriptorPtr = ^PatchDescriptor;
+ PatchDescriptor = record
+ patchSig: OSType; { The patches signature }
+ majorVers: UInt16; { The major version number of the }
+ { patch }
+ minorVers: UInt16; { The minor version number of the }
+ { patch }
+ flags: UInt32; { Reqired/Optional, etc. }
+ patchOffset: UInt32; { Block offset to the beginning of }
+ { the patch }
+ patchSize: UInt32; { Actual size of the patch in bytes }
+ patchCRC: UInt32; { As calculated by the SCSI drivers }
+ { CRC code }
+ patchDescriptorLen: UInt32; { Total length of the descriptor }
+ { (must be >= 61 bytes) }
+ patchName: Str32; { Pascal string with a short }
+ { description of the patch }
+ patchVendor: SInt8; { The first byte of a pascal string }
+ { for the patch Vendor. Any amount }
+ { of data may follow the string. }
+ end;
+
+ { Constants for the flags field of PatchDescriptor. }
+
+const
+ kRequiredPatch = $00000001; { Patch must succeed to continue booting. }
+
+
+type
+ PatchListPtr = ^PatchList;
+ PatchList = record
+ numPatchBlocks: UInt16; { The number of disk blocks }
+ { to hold patch descriptions }
+ numPatches: UInt16; { The number of patches }
+ thePatch: array [0..0] of PatchDescriptor; { An array with one patch }
+ { per element }
+ end;
+
+ { signature of a Patch entry point }
+{$ifc TYPED_FUNCTION_POINTERS}
+ PatchEntryPoint = function(var myPatch: PatchDescriptor; myDevID: DeviceIdent): OSErr;
+{$elsec}
+ PatchEntryPoint = ProcPtr;
+{$endc}
+
+
+ { Command Descriptor Block structure }
+ CDBPtr = ^CDB;
+ CDB = record
+ case SInt16 of
+ 0: (
+ cdbPtr: BytePtr; { pointer to the CDB, or }
+ );
+ 1: (
+ cdbBytes: packed array [0..15] of UInt8; { the actual CDB to send }
+ );
+ end;
+
+ { Scatter/gather list element (Deprecated for MacOS8) }
+ SGRecordPtr = ^SGRecord;
+ SGRecord = record
+ SGAddr: Ptr;
+ SGCount: UInt32;
+ end;
+
+ SCSIHdrPtr = ^SCSIHdr;
+ SCSIHdr = record
+ qLink: SCSIHdrPtr; { (internal use, must be nil on entry) }
+ scsiReserved1: SInt16; { -> reserved for input }
+ scsiPBLength: UInt16; { -> Length of the entire PB }
+ scsiFunctionCode: SInt8; { -> function selector }
+ scsiReserved2: SInt8; { <- reserved for output }
+ scsiResult: OSErr; { <- Returned result }
+ scsiDevice: DeviceIdent; { -> Device Identifier (bus+target+lun) }
+ scsiCompletion: SCSICallbackUPP; { -> Callback on completion function }
+ scsiFlags: UInt32; { -> assorted flags }
+ scsiDriverStorage: BytePtr; { <> Ptr for driver private use }
+ scsiXPTprivate: Ptr; { private field for use in XPT }
+ scsiReserved3: SInt32; { reserved }
+ end;
+
+ SCSI_PBPtr = ^SCSI_PB;
+ SCSI_PB = record
+ qLink: SCSIHdrPtr; { (internal use, must be nil on entry) }
+ scsiReserved1: SInt16; { -> reserved for input }
+ scsiPBLength: UInt16; { -> Length of the entire PB }
+ scsiFunctionCode: SInt8; { -> function selector }
+ scsiReserved2: SInt8; { <- reserved for output }
+ scsiResult: OSErr; { <- Returned result }
+ scsiDevice: DeviceIdent; { -> Device Identifier (bus+target+lun) }
+ scsiCompletion: SCSICallbackUPP; { -> Callback on completion function }
+ scsiFlags: UInt32; { -> assorted flags }
+ scsiDriverStorage: BytePtr; { <> Ptr for driver private use }
+ scsiXPTprivate: Ptr; { private field for use in XPT }
+ scsiReserved3: SInt32; { reserved }
+ end;
+
+ SCSI_IOPtr = ^SCSI_IO;
+ SCSI_IO = record
+ qLink: SCSIHdrPtr; { (internal use, must be nil on entry) }
+ scsiReserved1: SInt16; { -> reserved for input }
+ scsiPBLength: UInt16; { -> Length of the entire PB }
+ scsiFunctionCode: SInt8; { -> function selector }
+ scsiReserved2: SInt8; { <- reserved for output }
+ scsiResult: OSErr; { <- Returned result }
+ scsiDevice: DeviceIdent; { -> Device Identifier (bus+target+lun) }
+ scsiCompletion: SCSICallbackUPP; { -> Callback on completion function }
+ scsiFlags: UInt32; { -> assorted flags }
+ scsiDriverStorage: BytePtr; { <> Ptr for driver private use }
+ scsiXPTprivate: Ptr; { private field for use in XPT }
+ scsiReserved3: SInt32; { reserved }
+ scsiResultFlags: UInt16; { <- Flags which modify the scsiResult field }
+ scsiReserved3pt5: UInt16; { -> Reserved }
+ scsiDataPtr: BytePtr; { -> Pointer to the data buffer or the S/G list }
+ scsiDataLength: UInt32; { -> Data transfer length }
+ scsiSensePtr: BytePtr; { -> Ptr to autosense data buffer }
+ scsiSenseLength: SInt8; { -> size of the autosense buffer }
+ scsiCDBLength: SInt8; { -> Number of bytes for the CDB }
+ scsiSGListCount: UInt16; { -> num of scatter gather list entries }
+ scsiReserved4: UInt32; { <- reserved for output }
+ scsiSCSIstatus: SInt8; { <- Returned scsi device status }
+ scsiSenseResidual: SInt8; { <- Autosense residual length }
+ scsiReserved5: UInt16; { <- reserved for output }
+ scsiDataResidual: SInt32; { <- Returned Transfer residual length }
+ scsiCDB: CDB; { -> Actual CDB or pointer to CDB }
+ scsiTimeout: SInt32; { -> Timeout value (Time Mgr format) (CAM timeout) }
+ scsiReserved5pt5: BytePtr; { -> Reserved }
+ scsiReserved5pt6: UInt16; { -> Reserved }
+ scsiIOFlags: UInt16; { -> additional I/O flags }
+ scsiTagAction: SInt8; { -> What to do for tag queuing }
+ scsiReserved6: SInt8; { -> reserved for input }
+ scsiReserved7: UInt16; { -> reserved for input }
+ scsiSelectTimeout: UInt16; { -> Select timeout value }
+ scsiDataType: SInt8; { -> Data description type (i.e. buffer, TIB, S/G) }
+ scsiTransferType: SInt8; { -> Transfer type (i.e. Blind vs Polled) }
+ scsiReserved8: UInt32; { -> reserved for input }
+ scsiReserved9: UInt32; { -> reserved for input }
+ scsiHandshake: array [0..7] of UInt16; { -> handshaking points (null term'd) }
+ scsiReserved10: UInt32; { -> reserved for input }
+ scsiReserved11: UInt32; { -> reserved for input }
+ scsiCommandLink: SCSI_IOPtr; { -> Ptr to the next PB in linked cmd chain }
+ scsiSIMpublics: packed array [0..7] of UInt8; { -> reserved for input to 3rd-party SIMs }
+ scsiAppleReserved6: packed array [0..7] of UInt8; { -> reserved for input }
+ { XPT layer privates (for old-API emulation) }
+ scsiCurrentPhase: UInt16; { <- phase upon completing old call }
+ scsiSelector: SInt16; { -> selector specified in old calls }
+ scsiOldCallResult: OSErr; { <- result of old call }
+ scsiSCSImessage: SInt8; { <- Returned scsi device message (for SCSIComplete) }
+ XPTprivateFlags: SInt8; { <> various flags }
+ XPTextras: packed array [0..11] of UInt8; { }
+ end;
+
+ SCSIExecIOPB = SCSI_IO;
+ SCSIExecIOPBPtr = ^SCSIExecIOPB;
+ { Bus inquiry PB }
+ SCSIBusInquiryPBPtr = ^SCSIBusInquiryPB;
+ SCSIBusInquiryPB = record
+ qLink: SCSIHdrPtr; { (internal use, must be nil on entry) }
+ scsiReserved1: SInt16; { -> reserved for input }
+ scsiPBLength: UInt16; { -> Length of the entire PB }
+ scsiFunctionCode: SInt8; { -> function selector }
+ scsiReserved2: SInt8; { <- reserved for output }
+ scsiResult: OSErr; { <- Returned result }
+ scsiDevice: DeviceIdent; { -> Device Identifier (bus+target+lun) }
+ scsiCompletion: SCSICallbackUPP; { -> Callback on completion function }
+ scsiFlags: UInt32; { -> assorted flags }
+ scsiDriverStorage: BytePtr; { <> Ptr for driver private use }
+ scsiXPTprivate: Ptr; { private field for use in XPT }
+ scsiReserved3: SInt32; { reserved }
+ scsiEngineCount: UInt16; { <- Number of engines on HBA }
+ scsiMaxTransferType: UInt16; { <- Number of transfer types for this HBA }
+ scsiDataTypes: UInt32; { <- which data types are supported by this SIM }
+ scsiIOpbSize: UInt16; { <- Size of SCSI_IO PB for this SIM/HBA }
+ scsiMaxIOpbSize: UInt16; { <- Size of max SCSI_IO PB for all SIM/HBAs }
+ scsiFeatureFlags: UInt32; { <- Supported features flags field }
+ scsiVersionNumber: SInt8; { <- Version number for the SIM/HBA }
+ scsiHBAInquiry: SInt8; { <- Mimic of INQ byte 7 for the HBA }
+ scsiTargetModeFlags: SInt8; { <- Flags for target mode support }
+ scsiScanFlags: SInt8; { <- Scan related feature flags }
+ scsiSIMPrivatesPtr: UInt32; { <- Ptr to SIM private data area }
+ scsiSIMPrivatesSize: UInt32; { <- Size of SIM private data area }
+ scsiAsyncFlags: UInt32; { <- Event cap. for Async Callback }
+ scsiHiBusID: SInt8; { <- Highest path ID in the subsystem }
+ scsiInitiatorID: SInt8; { <- ID of the HBA on the SCSI bus }
+ scsiBIReserved0: UInt16; { }
+ scsiBIReserved1: UInt32; { <- }
+ scsiFlagsSupported: UInt32; { <- which scsiFlags are supported }
+ scsiIOFlagsSupported: UInt16; { <- which scsiIOFlags are supported }
+ scsiWeirdStuff: UInt16; { <- }
+ scsiMaxTarget: UInt16; { <- maximum Target number supported }
+ scsiMaxLUN: UInt16; { <- maximum Logical Unit number supported }
+ scsiSIMVendor: packed array [0..15] of char; { <- Vendor ID of SIM (or XPT if bus<FF) }
+ scsiHBAVendor: packed array [0..15] of char; { <- Vendor ID of the HBA }
+ scsiControllerFamily: packed array [0..15] of char; { <- Family of SCSI Controller }
+ scsiControllerType: packed array [0..15] of char; { <- Specific Model of SCSI Controller used }
+ scsiXPTversion: packed array [0..3] of char; { <- version number of XPT }
+ scsiSIMversion: packed array [0..3] of char; { <- version number of SIM }
+ scsiHBAversion: packed array [0..3] of char; { <- version number of HBA }
+ scsiHBAslotType: SInt8; { <- type of "slot" that this HBA is in }
+ scsiHBAslotNumber: SInt8; { <- slot number of this HBA }
+ scsiSIMsRsrcID: UInt16; { <- resource ID of this SIM }
+ scsiBIReserved3: UInt16; { <- }
+ scsiAdditionalLength: UInt16; { <- additional BusInquiry PB len }
+ end;
+
+ { Abort SIM Request PB }
+ SCSIAbortCommandPBPtr = ^SCSIAbortCommandPB;
+ SCSIAbortCommandPB = record
+ qLink: SCSIHdrPtr; { (internal use, must be nil on entry) }
+ scsiReserved1: SInt16; { -> reserved for input }
+ scsiPBLength: UInt16; { -> Length of the entire PB }
+ scsiFunctionCode: SInt8; { -> function selector }
+ scsiReserved2: SInt8; { <- reserved for output }
+ scsiResult: OSErr; { <- Returned result }
+ scsiDevice: DeviceIdent; { -> Device Identifier (bus+target+lun) }
+ scsiCompletion: SCSICallbackUPP; { -> Callback on completion function }
+ scsiFlags: UInt32; { -> assorted flags }
+ scsiDriverStorage: BytePtr; { <> Ptr for driver private use }
+ scsiXPTprivate: Ptr; { private field for use in XPT }
+ scsiReserved3: SInt32; { reserved }
+ scsiIOptr: SCSI_IOPtr; { Pointer to the PB to abort }
+ end;
+
+ { Terminate I/O Process Request PB }
+ SCSITerminateIOPBPtr = ^SCSITerminateIOPB;
+ SCSITerminateIOPB = record
+ qLink: SCSIHdrPtr; { (internal use, must be nil on entry) }
+ scsiReserved1: SInt16; { -> reserved for input }
+ scsiPBLength: UInt16; { -> Length of the entire PB }
+ scsiFunctionCode: SInt8; { -> function selector }
+ scsiReserved2: SInt8; { <- reserved for output }
+ scsiResult: OSErr; { <- Returned result }
+ scsiDevice: DeviceIdent; { -> Device Identifier (bus+target+lun) }
+ scsiCompletion: SCSICallbackUPP; { -> Callback on completion function }
+ scsiFlags: UInt32; { -> assorted flags }
+ scsiDriverStorage: BytePtr; { <> Ptr for driver private use }
+ scsiXPTprivate: Ptr; { private field for use in XPT }
+ scsiReserved3: SInt32; { reserved }
+ scsiIOptr: SCSI_IOPtr; { Pointer to the PB to terminate }
+ end;
+
+ { Reset SCSI Bus PB }
+ SCSIResetBusPBPtr = ^SCSIResetBusPB;
+ SCSIResetBusPB = record
+ qLink: SCSIHdrPtr; { (internal use, must be nil on entry) }
+ scsiReserved1: SInt16; { -> reserved for input }
+ scsiPBLength: UInt16; { -> Length of the entire PB }
+ scsiFunctionCode: SInt8; { -> function selector }
+ scsiReserved2: SInt8; { <- reserved for output }
+ scsiResult: OSErr; { <- Returned result }
+ scsiDevice: DeviceIdent; { -> Device Identifier (bus+target+lun) }
+ scsiCompletion: SCSICallbackUPP; { -> Callback on completion function }
+ scsiFlags: UInt32; { -> assorted flags }
+ scsiDriverStorage: BytePtr; { <> Ptr for driver private use }
+ scsiXPTprivate: Ptr; { private field for use in XPT }
+ scsiReserved3: SInt32; { reserved }
+ end;
+
+ { Reset SCSI Device PB }
+ SCSIResetDevicePBPtr = ^SCSIResetDevicePB;
+ SCSIResetDevicePB = record
+ qLink: SCSIHdrPtr; { (internal use, must be nil on entry) }
+ scsiReserved1: SInt16; { -> reserved for input }
+ scsiPBLength: UInt16; { -> Length of the entire PB }
+ scsiFunctionCode: SInt8; { -> function selector }
+ scsiReserved2: SInt8; { <- reserved for output }
+ scsiResult: OSErr; { <- Returned result }
+ scsiDevice: DeviceIdent; { -> Device Identifier (bus+target+lun) }
+ scsiCompletion: SCSICallbackUPP; { -> Callback on completion function }
+ scsiFlags: UInt32; { -> assorted flags }
+ scsiDriverStorage: BytePtr; { <> Ptr for driver private use }
+ scsiXPTprivate: Ptr; { private field for use in XPT }
+ scsiReserved3: SInt32; { reserved }
+ end;
+
+ { Release SIM Queue PB }
+ SCSIReleaseQPBPtr = ^SCSIReleaseQPB;
+ SCSIReleaseQPB = record
+ qLink: SCSIHdrPtr; { (internal use, must be nil on entry) }
+ scsiReserved1: SInt16; { -> reserved for input }
+ scsiPBLength: UInt16; { -> Length of the entire PB }
+ scsiFunctionCode: SInt8; { -> function selector }
+ scsiReserved2: SInt8; { <- reserved for output }
+ scsiResult: OSErr; { <- Returned result }
+ scsiDevice: DeviceIdent; { -> Device Identifier (bus+target+lun) }
+ scsiCompletion: SCSICallbackUPP; { -> Callback on completion function }
+ scsiFlags: UInt32; { -> assorted flags }
+ scsiDriverStorage: BytePtr; { <> Ptr for driver private use }
+ scsiXPTprivate: Ptr; { private field for use in XPT }
+ scsiReserved3: SInt32; { reserved }
+ end;
+
+ { SCSI Get Virtual ID Info PB }
+ SCSIGetVirtualIDInfoPBPtr = ^SCSIGetVirtualIDInfoPB;
+ SCSIGetVirtualIDInfoPB = record
+ qLink: SCSIHdrPtr; { (internal use, must be nil on entry) }
+ scsiReserved1: SInt16; { -> reserved for input }
+ scsiPBLength: UInt16; { -> Length of the entire PB }
+ scsiFunctionCode: SInt8; { -> function selector }
+ scsiReserved2: SInt8; { <- reserved for output }
+ scsiResult: OSErr; { <- Returned result }
+ scsiDevice: DeviceIdent; { -> Device Identifier (bus+target+lun) }
+ scsiCompletion: SCSICallbackUPP; { -> Callback on completion function }
+ scsiFlags: UInt32; { -> assorted flags }
+ scsiDriverStorage: Ptr; { <> Ptr for driver private use }
+ scsiXPTprivate: Ptr; { private field for use in XPT }
+ scsiReserved3: SInt32; { reserved }
+ scsiOldCallID: UInt16; { -> SCSI ID of device in question }
+ scsiExists: boolean; { <- true if device exists }
+ filler: SInt8;
+ end;
+
+ { Create/Lookup/Remove RefNum for Device PB }
+ SCSIDriverPBPtr = ^SCSIDriverPB;
+ SCSIDriverPB = record
+ qLink: SCSIHdrPtr; { (internal use, must be nil on entry) }
+ scsiReserved1: SInt16; { -> reserved for input }
+ scsiPBLength: UInt16; { -> Length of the entire PB }
+ scsiFunctionCode: SInt8; { -> function selector }
+ scsiReserved2: SInt8; { <- reserved for output }
+ scsiResult: OSErr; { <- Returned result }
+ scsiDevice: DeviceIdent; { -> Device Identifier (bus+target+lun) }
+ scsiCompletion: SCSICallbackUPP; { -> Callback on completion function }
+ scsiFlags: UInt32; { -> assorted flags }
+ scsiDriverStorage: Ptr; { <> Ptr for driver private use }
+ scsiXPTprivate: Ptr; { private field for use in XPT }
+ scsiReserved3: SInt32; { reserved }
+ scsiDriver: SInt16; { -> DriverRefNum, For SetDriver, <- For GetNextDriver }
+ scsiDriverFlags: UInt16; { <> Details of driver/device }
+ scsiNextDevice: DeviceIdent; { <- DeviceIdent of the NEXT Item in the list }
+ end;
+
+ { Load Driver PB }
+ SCSILoadDriverPBPtr = ^SCSILoadDriverPB;
+ SCSILoadDriverPB = record
+ qLink: SCSIHdrPtr; { (internal use, must be nil on entry) }
+ scsiReserved1: SInt16; { -> reserved for input }
+ scsiPBLength: UInt16; { -> Length of the entire PB }
+ scsiFunctionCode: SInt8; { -> function selector }
+ scsiReserved2: SInt8; { <- reserved for output }
+ scsiResult: OSErr; { <- Returned result }
+ scsiDevice: DeviceIdent; { -> Device Identifier (bus+target+lun) }
+ scsiCompletion: SCSICallbackUPP; { -> Callback on completion function }
+ scsiFlags: UInt32; { -> assorted flags }
+ scsiDriverStorage: Ptr; { <> Ptr for driver private use }
+ scsiXPTprivate: Ptr; { private field for use in XPT }
+ scsiReserved3: SInt32; { reserved }
+ scsiLoadedRefNum: SInt16; { <- SIM returns refnum of driver }
+ scsiDiskLoadFailed: boolean; { -> if true, indicates call after failure to load }
+ filler: SInt8;
+ end;
+
+
+ { Defines for the scsiTransferType field }
+
+const
+ scsiTransferBlind = 0;
+ scsiTransferPolled = 1;
+
+ scsiErrorBase = -7936;
+
+ scsiRequestInProgress = 1; { 1 = PB request is in progress }
+ { Execution failed 00-2F }
+ scsiRequestAborted = -7934; { -7934 = PB request aborted by the host }
+ scsiUnableToAbort = -7933; { -7933 = Unable to Abort PB request }
+ scsiNonZeroStatus = -7932; { -7932 = PB request completed with an err }
+ scsiUnused05 = -7931; { -7931 = }
+ scsiUnused06 = -7930; { -7930 = }
+ scsiUnused07 = -7929; { -7929 = }
+ scsiUnused08 = -7928; { -7928 = }
+ scsiUnableToTerminate = -7927; { -7927 = Unable to Terminate I/O PB req }
+ scsiSelectTimeout = -7926; { -7926 = Target selection timeout }
+ scsiCommandTimeout = -7925; { -7925 = Command timeout }
+ scsiIdentifyMessageRejected = -7924; { -7924 = }
+ scsiMessageRejectReceived = -7923; { -7923 = Message reject received }
+ scsiSCSIBusReset = -7922; { -7922 = SCSI bus reset sent/received }
+ scsiParityError = -7921; { -7921 = Uncorrectable parity error occured }
+ scsiAutosenseFailed = -7920; { -7920 = Autosense: Request sense cmd fail }
+ scsiUnused11 = -7919; { -7919 = }
+ scsiDataRunError = -7918; { -7918 = Data overrun/underrun error }
+ scsiUnexpectedBusFree = -7917; { -7917 = Unexpected BUS free }
+ scsiSequenceFailed = -7916; { -7916 = Target bus phase sequence failure }
+ scsiWrongDirection = -7915; { -7915 = Data phase was in wrong direction }
+ scsiUnused16 = -7914; { -7914 = }
+ scsiBDRsent = -7913; { -7913 = A SCSI BDR msg was sent to target }
+ scsiTerminated = -7912; { -7912 = PB request terminated by the host }
+ scsiNoNexus = -7911; { -7911 = Nexus is not established }
+ scsiCDBReceived = -7910; { -7910 = The SCSI CDB has been received }
+ { Couldn't begin execution 30-3F }
+ scsiTooManyBuses = -7888; { -7888 = Register failed because we're full }
+ scsiBusy = -7887; { -7887 = SCSI subsystem is busy }
+ scsiProvideFail = -7886; { -7886 = Unable to provide requ. capability }
+ scsiDeviceNotThere = -7885; { -7885 = SCSI device not installed/there }
+ scsiNoHBA = -7884; { -7884 = No HBA detected Error }
+ scsiDeviceConflict = -7883; { -7883 = sorry, max 1 refNum per DeviceIdent }
+ scsiNoSuchXref = -7882; { -7882 = no such RefNum xref }
+ scsiQLinkInvalid = -7881; { -7881 = pre-linked PBs not supported }
+ { (The QLink field was nonzero) }
+ { Parameter errors 40-7F }
+ scsiPBLengthError = -7872; { -7872 = (scsiPBLength is insuf'ct/invalid }
+ scsiFunctionNotAvailable = -7871; { -7871 = The requ. func is not available }
+ scsiRequestInvalid = -7870; { -7870 = PB request is invalid }
+ scsiBusInvalid = -7869; { -7869 = Bus ID supplied is invalid }
+ scsiTIDInvalid = -7868; { -7868 = Target ID supplied is invalid }
+ scsiLUNInvalid = -7867; { -7867 = LUN supplied is invalid }
+ scsiIDInvalid = -7866; { -7866 = The initiator ID is invalid }
+ scsiDataTypeInvalid = -7865; { -7865 = scsiDataType requested not supported }
+ scsiTransferTypeInvalid = -7864; { -7864 = scsiTransferType field is too high }
+ scsiCDBLengthInvalid = -7863; { -7863 = scsiCDBLength field is too big }
+
+ { New errors for SCSI Family }
+ scsiUnused74 = -7862; { -7862 = }
+ scsiUnused75 = -7861; { -7861 = }
+ scsiBadDataLength = -7860; { -7860 = a zero data length in PB }
+ scsiPartialPrepared = -7859; { -7859 = could not do full prepare mem for I/O }
+ scsiInvalidMsgType = -7858; { -7858 = Invalid message type (internal) }
+ scsiUnused79 = -7857; { -7857 = }
+ scsiBadConnID = -7856; { -7856 = Bad Connection ID }
+ scsiUnused81 = -7855; { -7855 = }
+ scsiIOInProgress = -7854; { -7854 = Can't close conn, IO in prog }
+ scsiTargetReserved = -7853; { -7853 = Target already reserved }
+ scsiUnused84 = -7852; { -7852 = }
+ scsiUnused85 = -7851; { -7851 = }
+ scsiBadConnType = -7850; { -7850 = Bad connection type }
+ scsiCannotLoadPlugin = -7849; { -7849 = No matching service category }
+
+ { +++ }
+ {
+ * scsiFamilyInternalError and scsiPluginInternalError are intended to handle consistency check failures.
+ * For example, if the family stores a record on a lookaside queue, but does not find that record
+ * it can use this error to report this failure. SCSI Manager 4.3 uses dsIOCoreErr in a few places,
+ * but this is probably not the best error. In general, internal errors should be reported as bugs.
+ *
+ * The following range of errors is provided for third-party (non-Apple) SCSI SIM and device driver vendors.
+ * In general, they would be used for error conditions that are not covered by the standardized errors.
+ * They should not normally be conveyed to normal applications, but might be used for communication between
+ * a plug-in and a vendor-provided device driver (for example, to manage RAID hot-swapping).
+ *
+ * Note: I don't know how many SCSI errors are reserved in the error code architecture. Don't assume that
+ * we'll actually get sixteen, but we should reserve at least one.
+ }
+ scsiFamilyInternalError = -7849; { -7849 = Internal consistency check failed }
+ scsiPluginInternalError = -7848; { -7848 = Internal consistency check failed }
+ scsiVendorSpecificErrorBase = -7808; { ?? = Start of third-party error range }
+ scsiVendorSpecificErrorCount = 16; { Number of third-party errors }
+
+ { --- }
+ scsiExecutionErrors = -7936;
+ scsiNotExecutedErrors = -7888;
+ scsiParameterErrors = -7872;
+
+ { Defines for the scsiResultFlags field }
+ scsiSIMQFrozen = $0001; { The SIM queue is frozen w/this err }
+ scsiAutosenseValid = $0002; { Autosense data valid for target }
+ scsiBusNotFree = $0004; { At time of callback, SCSI bus is not free }
+
+ { Defines for the bit numbers of the scsiFlags field in the PB header for the SCSIExecIO function }
+ kbSCSIDisableAutosense = 29; { Disable auto sense feature }
+ kbSCSIFlagReservedA = 28; { }
+ kbSCSIFlagReserved0 = 27; { }
+ kbSCSICDBLinked = 26; { The PB contains a linked CDB }
+ kbSCSIQEnable = 25; { Target queue actions are enabled }
+ kbSCSICDBIsPointer = 24; { The CDB field contains a pointer }
+ kbSCSIFlagReserved1 = 23; { }
+ kbSCSIInitiateSyncData = 22; { Attempt Sync data xfer and SDTR }
+ kbSCSIDisableSyncData = 21; { Disable sync, go to async }
+ kbSCSISIMQHead = 20; { Place PB at the head of SIM Q }
+ kbSCSISIMQFreeze = 19; { Return the SIM Q to frozen state }
+ kbSCSISIMQNoFreeze = 18; { Disallow SIM Q freezing }
+ kbSCSIDoDisconnect = 17; { Definitely do disconnect }
+ kbSCSIDontDisconnect = 16; { Definitely don't disconnect }
+ kbSCSIDataReadyForDMA = 15; { Data buffer(s) are ready for DMA }
+ kbSCSIFlagReserved3 = 14; { }
+ kbSCSIDataPhysical = 13; { SG/Buffer data ptrs are physical }
+ kbSCSISensePhysical = 12; { Autosense buffer ptr is physical }
+ kbSCSIFlagReserved5 = 11; { }
+ kbSCSIFlagReserved6 = 10; { }
+ kbSCSIFlagReserved7 = 9; { }
+ kbSCSIFlagReserved8 = 8; { }
+ kbSCSIDataBufferValid = 7; { Data buffer valid }
+ kbSCSIStatusBufferValid = 6; { Status buffer valid }
+ kbSCSIMessageBufferValid = 5; { Message buffer valid }
+ kbSCSIFlagReserved9 = 4; { }
+
+ { Defines for the bit masks of the scsiFlags field }
+ scsiDirectionMask = $C0000000; { Data direction mask }
+ scsiDirectionNone = $C0000000; { Data direction (11: no data) }
+ scsiDirectionReserved = $00000000; { Data direction (00: reserved) }
+ scsiDirectionOut = $80000000; { Data direction (10: DATA OUT) }
+ scsiDirectionIn = $40000000; { Data direction (01: DATA IN) }
+ scsiDisableAutosense = $20000000; { Disable auto sense feature }
+ scsiFlagReservedA = $10000000; { }
+ scsiFlagReserved0 = $08000000; { }
+ scsiCDBLinked = $04000000; { The PB contains a linked CDB }
+ scsiQEnable = $02000000; { Target queue actions are enabled }
+ scsiCDBIsPointer = $01000000; { The CDB field contains a pointer }
+ scsiFlagReserved1 = $00800000; { }
+ scsiInitiateSyncData = $00400000; { Attempt Sync data xfer and SDTR }
+ scsiDisableSyncData = $00200000; { Disable sync, go to async }
+ scsiSIMQHead = $00100000; { Place PB at the head of SIM Q }
+ scsiSIMQFreeze = $00080000; { Return the SIM Q to frozen state }
+ scsiSIMQNoFreeze = $00040000; { Disallow SIM Q freezing }
+ scsiDoDisconnect = $00020000; { Definitely do disconnect }
+ scsiDontDisconnect = $00010000; { Definitely don't disconnect }
+ scsiDataReadyForDMA = $00008000; { Data buffer(s) are ready for DMA }
+ scsiFlagReserved3 = $00004000; { }
+ scsiDataPhysical = $00002000; { SG/Buffer data ptrs are physical }
+ scsiSensePhysical = $00001000; { Autosense buffer ptr is physical }
+ scsiFlagReserved5 = $00000800; { }
+ scsiFlagReserved6 = $00000400; { }
+ scsiFlagReserved7 = $00000200; { }
+ scsiFlagReserved8 = $00000100; { }
+
+ { bit masks for the scsiIOFlags field in SCSIExecIOPB }
+ scsiNoParityCheck = $0002; { disable parity checking }
+ scsiDisableSelectWAtn = $0004; { disable select w/Atn }
+ scsiSavePtrOnDisconnect = $0008; { do SaveDataPointer upon Disconnect msg }
+ scsiNoBucketIn = $0010; { donÕt bit bucket in during this I/O }
+ scsiNoBucketOut = $0020; { donÕt bit bucket out during this I/O }
+ scsiDisableWide = $0040; { disable wide transfer negotiation }
+ scsiInitiateWide = $0080; { initiate wide transfer negotiation }
+ scsiRenegotiateSense = $0100; { renegotiate sync/wide before issuing autosense }
+ scsiDisableDiscipline = $0200; { disable parameter checking on SCSIExecIO calls }
+ scsiIOFlagReserved0080 = $0080; { }
+ scsiIOFlagReserved8000 = $8000; { }
+
+ { Defines for the Bus Inquiry PB fields. }
+ { scsiHBAInquiry field bits }
+ scsiBusMDP = $80; { Supports Modify Data Pointer message }
+ scsiBusWide32 = $40; { Supports 32 bit wide SCSI }
+ scsiBusWide16 = $20; { Supports 16 bit wide SCSI }
+ scsiBusSDTR = $10; { Supports Sync Data Transfer Req message }
+ scsiBusLinkedCDB = $08; { Supports linked CDBs }
+ scsiBusTagQ = $02; { Supports tag queue message }
+ scsiBusSoftReset = $01; { Supports soft reset }
+
+ { Defines for the scsiDataType field }
+ scsiDataBuffer = 0; { single contiguous buffer supplied }
+ scsiDataTIB = 1; { TIB supplied (ptr in scsiDataPtr) }
+ scsiDataSG = 2; { scatter/gather list supplied }
+ scsiDataIOTable = 3; { #(7/11/95) Prepared by Block Storage }
+
+ { scsiDataTypes field bits }
+ { bits 0->15 Apple-defined, 16->30 3rd-party unique, 31 = reserved }
+ scsiBusDataTIB = $02; { TIB supplied (ptr in scsiDataPtr) }
+ scsiBusDataBuffer = $01; { single contiguous buffer supplied }
+ scsiBusDataSG = $04; { scatter/gather list supplied }
+ scsiBusDataIOTable = $08; { (2/6/95) Prepare Memory for IO }
+ scsiBusDataReserved = $80000000; { }
+
+ { scsiScanFlags field bits }
+ scsiBusScansDevices = $80; { Bus scans for and maintains device list }
+ scsiBusScansOnInit = $40; { Bus scans performed at power-up/reboot }
+ scsiBusLoadsROMDrivers = $20; { may load ROM drivers to support targets }
+
+ { scsiFeatureFlags field bits }
+ scsiBusUltra4SCSI = $00000800; { HBA supports Ultra4(Ultra320) SCSI }
+ scsiBusLVD = $00000400; { HBA is Low Voltage Differential Bus }
+ scsiBusUltra3SCSI = $00000200; { HBA supports Ultra3 SCSI }
+ scsiBusUltra2SCSI = $00000100; { HBA supports Ultra2 SCSI }
+ scsiBusInternalExternalMask = $000000C0; { bus internal/external mask }
+ scsiBusInternalExternalUnknown = $00000000; { not known whether bus is inside or outside }
+ scsiBusInternalExternal = $000000C0; { bus goes inside and outside the box }
+ scsiBusInternal = $00000080; { bus goes inside the box }
+ scsiBusExternal = $00000040; { bus goes outside the box }
+ scsiBusCacheCoherentDMA = $00000020; { DMA is cache coherent }
+ scsiBusOldCallCapable = $00000010; { SIM is old call capable }
+ scsiBusUltraSCSI = $00000008; { HBA supports Ultra SCSI }
+ scsiBusDifferential = $00000004; { Single Ended (0) or Differential (1) }
+ scsiBusFastSCSI = $00000002; { HBA supports fast SCSI }
+ scsiBusDMAavailable = $00000001; { DMA is available }
+
+ { scsiWeirdStuff field bits }
+ scsiOddDisconnectUnsafeRead1 = $0001; { Disconnects on odd byte boundries are unsafe with DMA and/or blind reads }
+ scsiOddDisconnectUnsafeWrite1 = $0002; { Disconnects on odd byte boundries are unsafe with DMA and/or blind writes }
+ scsiBusErrorsUnsafe = $0004; { Non-handshaked delays or disconnects during blind transfers may cause a crash }
+ scsiRequiresHandshake = $0008; { Non-handshaked delays or disconnects during blind transfers may cause data corruption }
+ scsiTargetDrivenSDTRSafe = $0010; { Targets which initiate synchronous negotiations are supported }
+ scsiOddCountForPhysicalUnsafe = $0020; { If using physical addrs all counts must be even, and disconnects must be on even boundries }
+ scsiAbortCmdFixed = $0040; { Set if abort command is fixed to properly make callbacks }
+ scsiMeshACKTimingFixed = $0080; { Set if bug allowing Mesh to release ACK prematurely is fixed }
+
+ { scsiHBAslotType values }
+ scsiMotherboardBus = $00; { A built in Apple supplied bus }
+ scsiNuBus = $01; { A SIM on a NuBus card }
+ scsiPDSBus = $03; { " on a PDS card }
+ scsiPCIBus = $04; { " on a PCI bus card }
+ scsiPCMCIABus = $05; { " on a PCMCIA card }
+ scsiFireWireBridgeBus = $06; { " connected through a FireWire bridge }
+ scsiUSBBus = $07; { " connected on a USB bus }
+
+ { Defines for the scsiDriverFlags field (in SCSIDriverPB) }
+ scsiDeviceSensitive = $0001; { Only driver should access this device }
+ scsiDeviceNoOldCallAccess = $0002; { no old call access to this device }
+
+ { SIMInitInfo PB }
+ { directions are for SCSIRegisterBus call ( -> parm, <- result) }
+
+type
+ SIMInitInfoPtr = ^SIMInitInfo;
+ SIMInitInfo = record
+ SIMstaticPtr: Ptr; { <- alloc. ptr to the SIM's static vars }
+ staticSize: SInt32; { -> num bytes SIM needs for static vars }
+ SIMInit: SIMInitUPP; { -> pointer to the SIM init routine }
+ SIMAction: SIMActionUPP; { -> pointer to the SIM action routine }
+ SIM_ISR: SCSIInterruptUPP; { reserved }
+ SIMInterruptPoll: SCSIInterruptUPP; { -> pointer to the SIM interrupt poll routine }
+ NewOldCall: SIMActionUPP; { -> pointer to the SIM NewOldCall routine }
+ ioPBSize: UInt16; { -> size of SCSI_IO_PBs required for this SIM }
+ oldCallCapable: boolean; { -> true if this SIM can handle old-API calls }
+ simInfoUnused1: SInt8; { reserved }
+ simInternalUse: SInt32; { xx not affected or viewed by XPT }
+ XPT_ISR: SCSIUPP; { reserved }
+ EnteringSIM: SCSIUPP; { <- ptr to the EnteringSIM routine }
+ ExitingSIM: SCSIUPP; { <- ptr to the ExitingSIM routine }
+ MakeCallback: SCSIMakeCallbackUPP; { <- the XPT layerÕs SCSIMakeCallback routine }
+ busID: UInt16; { <- bus number for the registered bus }
+ simSlotNumber: SInt8; { <- Magic cookie to place in scsiHBASlotNumber (PCI) }
+ simSRsrcID: SInt8; { <- Magic cookie to place in scsiSIMsRsrcID (PCI) }
+ simRegEntry: Ptr; { -> The SIM's RegEntryIDPtr (PCI) }
+ end;
+
+ { Glue between SCSI calls and SCSITrap format }
+
+const
+ xptSCSIAction = $0001;
+ xptSCSIRegisterBus = $0002;
+ xptSCSIDeregisterBus = $0003;
+ xptSCSIReregisterBus = $0004;
+ xptSCSIKillXPT = $0005; { kills Mini-XPT after transition }
+ xptSCSIInitialize = $000A; { Initialize the SCSI manager }
+
+ {
+ * SCSI bus status. These values are returned by the SCSI target in the status phase.
+ * They are not related to Macintosh status values (except that values other than
+ * scsiStatusGood will result in scsiResult set to scsiNonZeroStatus).
+ }
+ scsiStatGood = $00; { Good Status }
+ scsiStatCheckCondition = $02; { Check Condition }
+ scsiStatConditionMet = $04; { Condition Met }
+ scsiStatBusy = $08; { Busy }
+ scsiStatIntermediate = $10; { Intermediate }
+ scsiStatIntermedMet = $14; { Intermediate - Condition Met }
+ scsiStatResvConflict = $18; { Reservation conflict }
+ scsiStatTerminated = $22; { Command terminated }
+ scsiStatQFull = $28; { Queue full }
+
+ { SCSI messages }
+ kCmdCompleteMsg = 0;
+ kExtendedMsg = 1; { 0x01 }
+ kSaveDataPointerMsg = 2; { 0x02 }
+ kRestorePointersMsg = 3; { 0x03 }
+ kDisconnectMsg = 4; { 0x04 }
+ kInitiatorDetectedErrorMsg = 5; { 0x05 }
+ kAbortMsg = 6; { 0x06 }
+ kMsgRejectMsg = 7; { 0x07 }
+ kNoOperationMsg = 8; { 0x08 }
+ kMsgParityErrorMsg = 9; { 0x09 }
+ kLinkedCmdCompleteMsg = 10; { 0x0a }
+ kLinkedCmdCompleteWithFlagMsg = 11; { 0x0b }
+ kBusDeviceResetMsg = 12; { 0x0c }
+ kAbortTagMsg = 13; { 0x0d }
+ kClearQueueMsg = 14; { 0x0e }
+ kInitiateRecoveryMsg = 15; { 0x0f }
+ kReleaseRecoveryMsg = 16; { 0x10 }
+ kTerminateIOProcessMsg = 17; { 0x11 }
+ kSimpleQueueTag = $20; { 0x20 }
+ kHeadOfQueueTagMsg = $21; { 0x21 }
+ kOrderedQueueTagMsg = $22; { 0x22 }
+ kIgnoreWideResidueMsg = $23; { 0x23 }
+
+
+ { moveq #kSCSIx, D0; _SCSIAtomic }
+ {
+ * SCSIAction()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SCSIAction(var parameterBlock: SCSI_PB): OSErr; external name '_SCSIAction';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * SCSIRegisterBus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSIRegisterBus(var parameterBlock: SIMInitInfo): OSErr; external name '_SCSIRegisterBus';
+{
+ * SCSIDeregisterBus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSIDeregisterBus(var parameterBlock: SCSI_PB): OSErr; external name '_SCSIDeregisterBus';
+{
+ * SCSIReregisterBus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSIReregisterBus(var parameterBlock: SIMInitInfo): OSErr; external name '_SCSIReregisterBus';
+{
+ * SCSIKillXPT()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SCSIKillXPT(var parameterBlock: SIMInitInfo): OSErr; external name '_SCSIKillXPT';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ALIGN MAC68K}
+
+
+{unit SCSchemaDefinitions}
+{
+ * 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,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES of MERCHANTABILITY,
+ * 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@
+ }
+
+{
+ * This file is automatically generated
+ * DO NOT EDIT!
+ }
+
+{
+ * Note: For Cocoa/Obj-C/Foundation programs accessing these preference
+ * keys you may want to consider the following:
+ *
+ * #define SC_SCHEMA_DECLARATION(x) extern NSString * x
+ * #import <SystemConfiguration/SystemConfiguration.h>
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{
+ * Reserved Keys
+ }
+var kSCResvLink: CFStringRef; external name '_kSCResvLink'; (* attribute const *) { CFString "__LINK__" }
+var kSCResvInactive: CFStringRef; external name '_kSCResvInactive'; (* attribute const *) { "__INACTIVE__" }
+
+{
+ * Generic Keys
+ }
+var kSCPropInterfaceName: CFStringRef; external name '_kSCPropInterfaceName'; (* attribute const *) { CFString "InterfaceName" }
+var kSCPropMACAddress: CFStringRef; external name '_kSCPropMACAddress'; (* attribute const *) { CFString "MACAddress" }
+var kSCPropUserDefinedName: CFStringRef; external name '_kSCPropUserDefinedName'; (* attribute const *) { CFString "UserDefinedName" }
+var kSCPropVersion: CFStringRef; external name '_kSCPropVersion'; (* attribute const *) { CFString "Version" }
+
+{
+ * Preference Keys
+ }
+var kSCPrefCurrentSet: CFStringRef; external name '_kSCPrefCurrentSet'; (* attribute const *) { CFString "CurrentSet" }
+var kSCPrefNetworkServices: CFStringRef; external name '_kSCPrefNetworkServices'; (* attribute const *) { CFDictionary "NetworkServices" }
+var kSCPrefSets: CFStringRef; external name '_kSCPrefSets'; (* attribute const *) { CFDictionary "Sets" }
+var kSCPrefSystem: CFStringRef; external name '_kSCPrefSystem'; (* attribute const *) { CFDictionary "System" }
+
+{
+ * Component Keys
+ }
+var kSCCompNetwork: CFStringRef; external name '_kSCCompNetwork'; (* attribute const *) { "Network" }
+var kSCCompService: CFStringRef; external name '_kSCCompService'; (* attribute const *) { "Service" }
+var kSCCompGlobal: CFStringRef; external name '_kSCCompGlobal'; (* attribute const *) { "Global" }
+var kSCCompHostNames: CFStringRef; external name '_kSCCompHostNames'; (* attribute const *) { "HostNames" }
+var kSCCompInterface: CFStringRef; external name '_kSCCompInterface'; (* attribute const *) { "Interface" }
+var kSCCompSystem: CFStringRef; external name '_kSCCompSystem'; (* attribute const *) { "System" }
+var kSCCompUsers: CFStringRef; external name '_kSCCompUsers'; (* attribute const *) { "Users" }
+
+{
+ * Regex key which matches any component
+ }
+var kSCCompAnyRegex: CFStringRef; external name '_kSCCompAnyRegex'; (* attribute const *) { "[^/]+" }
+
+{
+ * Network Entity Keys
+ }
+var kSCEntNetAirPort: CFStringRef; external name '_kSCEntNetAirPort'; (* attribute const *) { CFDictionary "AirPort" }
+var kSCEntNetAppleTalk: CFStringRef; external name '_kSCEntNetAppleTalk'; (* attribute const *) { CFDictionary "AppleTalk" }
+var kSCEntNetDHCP: CFStringRef; external name '_kSCEntNetDHCP'; (* attribute const *) { CFDictionary "DHCP" }
+var kSCEntNetDNS: CFStringRef; external name '_kSCEntNetDNS'; (* attribute const *) { CFDictionary "DNS" }
+var kSCEntNetEthernet: CFStringRef; external name '_kSCEntNetEthernet'; (* attribute const *) { CFDictionary "Ethernet" }
+var kSCEntNetFireWire: CFStringRef; external name '_kSCEntNetFireWire'; (* attribute const *) { CFDictionary "FireWire" }
+var kSCEntNetInterface: CFStringRef; external name '_kSCEntNetInterface'; (* attribute const *) { CFDictionary "Interface" }
+var kSCEntNetIPv4: CFStringRef; external name '_kSCEntNetIPv4'; (* attribute const *) { CFDictionary "IPv4" }
+var kSCEntNetIPv6: CFStringRef; external name '_kSCEntNetIPv6'; (* attribute const *) { CFDictionary "IPv6" }
+var kSCEntNetL2TP: CFStringRef; external name '_kSCEntNetL2TP'; (* attribute const *) { CFDictionary "L2TP" }
+var kSCEntNetLink: CFStringRef; external name '_kSCEntNetLink'; (* attribute const *) { CFDictionary "Link" }
+var kSCEntNetModem: CFStringRef; external name '_kSCEntNetModem'; (* attribute const *) { CFDictionary "Modem" }
+var kSCEntNetNetInfo: CFStringRef; external name '_kSCEntNetNetInfo'; (* attribute const *) { CFDictionary "NetInfo" }
+// extern const CFStringRef kSCEntNetNIS; { RESERVED FOR FUTURE USE }
+var kSCEntNetPPP: CFStringRef; external name '_kSCEntNetPPP'; (* attribute const *) { CFDictionary "PPP" }
+var kSCEntNetPPPoE: CFStringRef; external name '_kSCEntNetPPPoE'; (* attribute const *) { CFDictionary "PPPoE" }
+var kSCEntNetPPPSerial: CFStringRef; external name '_kSCEntNetPPPSerial'; (* attribute const *) { CFDictionary "PPPSerial" }
+var kSCEntNetPPTP: CFStringRef; external name '_kSCEntNetPPTP'; (* attribute const *) { CFDictionary "PPTP" }
+var kSCEntNetProxies: CFStringRef; external name '_kSCEntNetProxies'; (* attribute const *) { CFDictionary "Proxies" }
+var kSCEntNet6to4: CFStringRef; external name '_kSCEntNet6to4'; (* attribute const *) { CFDictionary "6to4" }
+
+{
+ * kSCCompNetwork Properties
+ }
+var kSCPropNetOverridePrimary: CFStringRef; external name '_kSCPropNetOverridePrimary'; (* attribute const *) { CFNumber (0 or 1) "OverridePrimary" }
+var kSCPropNetServiceOrder: CFStringRef; external name '_kSCPropNetServiceOrder'; (* attribute const *) { CFArray[CFString] "ServiceOrder" }
+var kSCPropNetPPPOverridePrimary: CFStringRef; external name '_kSCPropNetPPPOverridePrimary'; (* attribute const *) { CFNumber (0 or 1) "PPPOverridePrimary" }
+
+{
+ * kSCCompNetworkInterface Properties
+ }
+var kSCPropNetInterfaces: CFStringRef; external name '_kSCPropNetInterfaces'; (* attribute const *) { CFArray[CFString] "Interfaces" }
+
+{
+ * kSCCompNetworkHostNames Properties
+ }
+var kSCPropNetLocalHostName: CFStringRef; external name '_kSCPropNetLocalHostName'; (* attribute const *) { CFString "LocalHostName" }
+
+{
+ * kSCEntNetAirPort (Hardware) Entity Keys
+ }
+var kSCPropNetAirPortAllowNetCreation: CFStringRef; external name '_kSCPropNetAirPortAllowNetCreation'; (* attribute const *) { CFNumber (0 or 1) "AllowNetCreation" }
+var kSCPropNetAirPortAuthPassword: CFStringRef; external name '_kSCPropNetAirPortAuthPassword'; (* attribute const *) { CFData "AuthPassword" }
+var kSCPropNetAirPortAuthPasswordEncryption: CFStringRef; external name '_kSCPropNetAirPortAuthPasswordEncryption'; (* attribute const *) { CFString "AuthPasswordEncryption" }
+var kSCPropNetAirPortJoinMode: CFStringRef; external name '_kSCPropNetAirPortJoinMode'; (* attribute const *) { CFString "JoinMode" }
+var kSCPropNetAirPortPowerEnabled: CFStringRef; external name '_kSCPropNetAirPortPowerEnabled'; (* attribute const *) { CFNumber (0 or 1) "PowerEnabled" }
+var kSCPropNetAirPortPreferredNetwork: CFStringRef; external name '_kSCPropNetAirPortPreferredNetwork'; (* attribute const *) { CFString "PreferredNetwork" }
+var kSCPropNetAirPortSavePasswords: CFStringRef; external name '_kSCPropNetAirPortSavePasswords'; (* attribute const *) { CFNumber (0 or 1) "SavePasswords" }
+
+{ kSCPropNetAirPortJoinMode values }
+var kSCValNetAirPortJoinModeAutomatic: CFStringRef; external name '_kSCValNetAirPortJoinModeAutomatic'; (* attribute const *) { "Automatic" }
+var kSCValNetAirPortJoinModePreferred: CFStringRef; external name '_kSCValNetAirPortJoinModePreferred'; (* attribute const *) { "Preferred" }
+var kSCValNetAirPortJoinModeRecent: CFStringRef; external name '_kSCValNetAirPortJoinModeRecent'; (* attribute const *) { "Recent" }
+var kSCValNetAirPortJoinModeStrongest: CFStringRef; external name '_kSCValNetAirPortJoinModeStrongest'; (* attribute const *) { "Strongest" }
+
+{ kSCPropNetAirPortPasswordEncryption values }
+var kSCValNetAirPortAuthPasswordEncryptionKeychain: CFStringRef; external name '_kSCValNetAirPortAuthPasswordEncryptionKeychain'; (* attribute const *) { "Keychain" }
+
+{
+ * kSCEntNetAppleTalk Entity Keys
+ }
+var kSCPropNetAppleTalkComputerName: CFStringRef; external name '_kSCPropNetAppleTalkComputerName'; (* attribute const *) { CFString "ComputerName" }
+var kSCPropNetAppleTalkComputerNameEncoding: CFStringRef; external name '_kSCPropNetAppleTalkComputerNameEncoding'; (* attribute const *) { CFNumber "ComputerNameEncoding" }
+var kSCPropNetAppleTalkConfigMethod: CFStringRef; external name '_kSCPropNetAppleTalkConfigMethod'; (* attribute const *) { CFString "ConfigMethod" }
+var kSCPropNetAppleTalkDefaultZone: CFStringRef; external name '_kSCPropNetAppleTalkDefaultZone'; (* attribute const *) { CFString "DefaultZone" }
+var kSCPropNetAppleTalkNetworkID: CFStringRef; external name '_kSCPropNetAppleTalkNetworkID'; (* attribute const *) { CFNumber "NetworkID" }
+var kSCPropNetAppleTalkNetworkRange: CFStringRef; external name '_kSCPropNetAppleTalkNetworkRange'; (* attribute const *) { CFArray[CFNumber] "NetworkRange" }
+var kSCPropNetAppleTalkNodeID: CFStringRef; external name '_kSCPropNetAppleTalkNodeID'; (* attribute const *) { CFNumber "NodeID" }
+var kSCPropNetAppleTalkSeedNetworkRange: CFStringRef; external name '_kSCPropNetAppleTalkSeedNetworkRange'; (* attribute const *) { CFArray[CFNumber] "SeedNetworkRange" }
+var kSCPropNetAppleTalkSeedZones: CFStringRef; external name '_kSCPropNetAppleTalkSeedZones'; (* attribute const *) { CFArray[CFString] "SeedZones" }
+
+{ kSCPropNetAppleTalkConfigMethod values }
+var kSCValNetAppleTalkConfigMethodNode: CFStringRef; external name '_kSCValNetAppleTalkConfigMethodNode'; (* attribute const *) { "Node" }
+var kSCValNetAppleTalkConfigMethodRouter: CFStringRef; external name '_kSCValNetAppleTalkConfigMethodRouter'; (* attribute const *) { "Router" }
+var kSCValNetAppleTalkConfigMethodSeedRouter: CFStringRef; external name '_kSCValNetAppleTalkConfigMethodSeedRouter'; (* attribute const *) { "SeedRouter" }
+
+{
+ * kSCEntNetDNS Entity Keys
+ }
+var kSCPropNetDNSDomainName: CFStringRef; external name '_kSCPropNetDNSDomainName'; (* attribute const *) { CFString "DomainName" }
+var kSCPropNetDNSSearchDomains: CFStringRef; external name '_kSCPropNetDNSSearchDomains'; (* attribute const *) { CFArray[CFString] "SearchDomains" }
+var kSCPropNetDNSServerAddresses: CFStringRef; external name '_kSCPropNetDNSServerAddresses'; (* attribute const *) { CFArray[CFString] "ServerAddresses" }
+var kSCPropNetDNSSortList: CFStringRef; external name '_kSCPropNetDNSSortList'; (* attribute const *) { CFArray[CFString] "SortList" }
+
+{
+ * kSCEntNetEthernet (Hardware) Entity Keys
+ }
+var kSCPropNetEthernetMediaSubType: CFStringRef; external name '_kSCPropNetEthernetMediaSubType'; (* attribute const *) { CFString "MediaSubType" }
+var kSCPropNetEthernetMediaOptions: CFStringRef; external name '_kSCPropNetEthernetMediaOptions'; (* attribute const *) { CFArray[CFString] "MediaOptions" }
+var kSCPropNetEthernetMTU: CFStringRef; external name '_kSCPropNetEthernetMTU'; (* attribute const *) { CFNumber "MTU" }
+
+{
+ * kSCEntNetFireWire (Hardware) Entity Keys
+ }
+{ RESERVED FOR FUTURE USE }
+
+{
+ * kSCEntNetInterface Entity Keys
+ }
+var kSCPropNetInterfaceDeviceName: CFStringRef; external name '_kSCPropNetInterfaceDeviceName'; (* attribute const *) { CFString "DeviceName" }
+var kSCPropNetInterfaceHardware: CFStringRef; external name '_kSCPropNetInterfaceHardware'; (* attribute const *) { CFString "Hardware" }
+var kSCPropNetInterfaceType: CFStringRef; external name '_kSCPropNetInterfaceType'; (* attribute const *) { CFString "Type" }
+var kSCPropNetInterfaceSubType: CFStringRef; external name '_kSCPropNetInterfaceSubType'; (* attribute const *) { CFString "SubType" }
+var kSCPropNetInterfaceSupportsModemOnHold: CFStringRef; external name '_kSCPropNetInterfaceSupportsModemOnHold'; (* attribute const *) { CFNumber (0 or 1) "SupportsModemOnHold" }
+
+{ kSCPropNetInterfaceType values }
+var kSCValNetInterfaceTypeEthernet: CFStringRef; external name '_kSCValNetInterfaceTypeEthernet'; (* attribute const *) { "Ethernet" }
+var kSCValNetInterfaceTypeFireWire: CFStringRef; external name '_kSCValNetInterfaceTypeFireWire'; (* attribute const *) { "FireWire" }
+var kSCValNetInterfaceTypePPP: CFStringRef; external name '_kSCValNetInterfaceTypePPP'; (* attribute const *) { "PPP" }
+var kSCValNetInterfaceType6to4: CFStringRef; external name '_kSCValNetInterfaceType6to4'; (* attribute const *) { "6to4" }
+
+{ kSCPropNetServiceSubType values (for PPP) }
+var kSCValNetInterfaceSubTypePPPoE: CFStringRef; external name '_kSCValNetInterfaceSubTypePPPoE'; (* attribute const *) { "PPPoE" }
+var kSCValNetInterfaceSubTypePPPSerial: CFStringRef; external name '_kSCValNetInterfaceSubTypePPPSerial'; (* attribute const *) { "PPPSerial" }
+var kSCValNetInterfaceSubTypePPTP: CFStringRef; external name '_kSCValNetInterfaceSubTypePPTP'; (* attribute const *) { "PPTP" }
+var kSCValNetInterfaceSubTypeL2TP: CFStringRef; external name '_kSCValNetInterfaceSubTypeL2TP'; (* attribute const *) { "L2TP" }
+
+{
+ * kSCEntNetIPv4 Entity Keys
+ }
+var kSCPropNetIPv4Addresses: CFStringRef; external name '_kSCPropNetIPv4Addresses'; (* attribute const *) { CFArray[CFString] "Addresses" }
+var kSCPropNetIPv4ConfigMethod: CFStringRef; external name '_kSCPropNetIPv4ConfigMethod'; (* attribute const *) { CFString "ConfigMethod" }
+var kSCPropNetIPv4DHCPClientID: CFStringRef; external name '_kSCPropNetIPv4DHCPClientID'; (* attribute const *) { CFString "DHCPClientID" }
+var kSCPropNetIPv4Router: CFStringRef; external name '_kSCPropNetIPv4Router'; (* attribute const *) { CFString "Router" }
+var kSCPropNetIPv4SubnetMasks: CFStringRef; external name '_kSCPropNetIPv4SubnetMasks'; (* attribute const *) { CFArray[CFString] "SubnetMasks" }
+var kSCPropNetIPv4DestAddresses: CFStringRef; external name '_kSCPropNetIPv4DestAddresses'; (* attribute const *) { CFArray[CFString] "DestAddresses" }
+var kSCPropNetIPv4BroadcastAddresses: CFStringRef; external name '_kSCPropNetIPv4BroadcastAddresses'; (* attribute const *) { CFArray[CFString] "BroadcastAddresses" }
+
+{ kSCPropNetIPv4ConfigMethod values }
+var kSCValNetIPv4ConfigMethodBOOTP: CFStringRef; external name '_kSCValNetIPv4ConfigMethodBOOTP'; (* attribute const *) { "BOOTP" }
+var kSCValNetIPv4ConfigMethodDHCP: CFStringRef; external name '_kSCValNetIPv4ConfigMethodDHCP'; (* attribute const *) { "DHCP" }
+var kSCValNetIPv4ConfigMethodINFORM: CFStringRef; external name '_kSCValNetIPv4ConfigMethodINFORM'; (* attribute const *) { "INFORM" }
+var kSCValNetIPv4ConfigMethodLinkLocal: CFStringRef; external name '_kSCValNetIPv4ConfigMethodLinkLocal'; (* attribute const *) { "LinkLocal" }
+var kSCValNetIPv4ConfigMethodManual: CFStringRef; external name '_kSCValNetIPv4ConfigMethodManual'; (* attribute const *) { "Manual" }
+var kSCValNetIPv4ConfigMethodPPP: CFStringRef; external name '_kSCValNetIPv4ConfigMethodPPP'; (* attribute const *) { "PPP" }
+
+{
+ * kSCEntNetIPv6 Entity Keys
+ }
+var kSCPropNetIPv6Addresses: CFStringRef; external name '_kSCPropNetIPv6Addresses'; (* attribute const *) { CFArray[CFString] "Addresses" }
+var kSCPropNetIPv6ConfigMethod: CFStringRef; external name '_kSCPropNetIPv6ConfigMethod'; (* attribute const *) { CFString "ConfigMethod" }
+var kSCPropNetIPv6DestAddresses: CFStringRef; external name '_kSCPropNetIPv6DestAddresses'; (* attribute const *) { CFArray[CFString] "DestAddresses" }
+var kSCPropNetIPv6Flags: CFStringRef; external name '_kSCPropNetIPv6Flags'; (* attribute const *) { CFNumber "Flags" }
+var kSCPropNetIPv6PrefixLength: CFStringRef; external name '_kSCPropNetIPv6PrefixLength'; (* attribute const *) { CFArray[CFNumber] "PrefixLength" }
+var kSCPropNetIPv6Router: CFStringRef; external name '_kSCPropNetIPv6Router'; (* attribute const *) { CFString "Router" }
+
+{ kSCPropNetIPv6ConfigMethod values }
+var kSCValNetIPv6ConfigMethodAutomatic: CFStringRef; external name '_kSCValNetIPv6ConfigMethodAutomatic'; (* attribute const *) { "Automatic" }
+var kSCValNetIPv6ConfigMethodManual: CFStringRef; external name '_kSCValNetIPv6ConfigMethodManual'; (* attribute const *) { "Manual" }
+var kSCValNetIPv6ConfigMethodRouterAdvertisement: CFStringRef; external name '_kSCValNetIPv6ConfigMethodRouterAdvertisement'; (* attribute const *) { "RouterAdvertisement" }
+var kSCValNetIPv6ConfigMethod6to4: CFStringRef; external name '_kSCValNetIPv6ConfigMethod6to4'; (* attribute const *) { "6to4" }
+
+{
+ * kSCEntNet6to4 Entity Keys
+ }
+var kSCPropNet6to4Relay: CFStringRef; external name '_kSCPropNet6to4Relay'; (* attribute const *) { CFString "Relay" }
+
+{
+ * kSCEntNetLink Entity Keys
+ }
+var kSCPropNetLinkActive: CFStringRef; external name '_kSCPropNetLinkActive'; (* attribute const *) { CFBoolean "Active" }
+var kSCPropNetLinkDetaching: CFStringRef; external name '_kSCPropNetLinkDetaching'; (* attribute const *) { CFBoolean "Detaching" }
+
+{
+ * kSCEntNetModem (Hardware) Entity Keys
+ }
+var kSCPropNetModemConnectionScript: CFStringRef; external name '_kSCPropNetModemConnectionScript'; (* attribute const *) { CFString "ConnectionScript" }
+var kSCPropNetModemConnectSpeed: CFStringRef; external name '_kSCPropNetModemConnectSpeed'; (* attribute const *) { CFNumber "ConnectSpeed" }
+var kSCPropNetModemDataCompression: CFStringRef; external name '_kSCPropNetModemDataCompression'; (* attribute const *) { CFNumber (0 or 1) "DataCompression" }
+var kSCPropNetModemDialMode: CFStringRef; external name '_kSCPropNetModemDialMode'; (* attribute const *) { CFString "DialMode" }
+var kSCPropNetModemErrorCorrection: CFStringRef; external name '_kSCPropNetModemErrorCorrection'; (* attribute const *) { CFNumber (0 or 1) "ErrorCorrection" }
+var kSCPropNetModemHoldCallWaitingAudibleAlert: CFStringRef; external name '_kSCPropNetModemHoldCallWaitingAudibleAlert'; (* attribute const *) { CFNumber (0 or 1) "HoldCallWaitingAudibleAlert" }
+var kSCPropNetModemHoldDisconnectOnAnswer: CFStringRef; external name '_kSCPropNetModemHoldDisconnectOnAnswer'; (* attribute const *) { CFNumber (0 or 1) "HoldDisconnectOnAnswer" }
+var kSCPropNetModemHoldEnabled: CFStringRef; external name '_kSCPropNetModemHoldEnabled'; (* attribute const *) { CFNumber (0 or 1) "HoldEnabled" }
+var kSCPropNetModemHoldReminder: CFStringRef; external name '_kSCPropNetModemHoldReminder'; (* attribute const *) { CFNumber (0 or 1) "HoldReminder" }
+var kSCPropNetModemHoldReminderTime: CFStringRef; external name '_kSCPropNetModemHoldReminderTime'; (* attribute const *) { CFNumber "HoldReminderTime" }
+var kSCPropNetModemNote: CFStringRef; external name '_kSCPropNetModemNote'; (* attribute const *) { CFString "Note" }
+var kSCPropNetModemPulseDial: CFStringRef; external name '_kSCPropNetModemPulseDial'; (* attribute const *) { CFNumber (0 or 1) "PulseDial" }
+var kSCPropNetModemSpeaker: CFStringRef; external name '_kSCPropNetModemSpeaker'; (* attribute const *) { CFNumber (0 or 1) "Speaker" }
+var kSCPropNetModemSpeed: CFStringRef; external name '_kSCPropNetModemSpeed'; (* attribute const *) { CFNumber "Speed" }
+
+{ kSCPropNetModemDialMode values }
+var kSCValNetModemDialModeIgnoreDialTone: CFStringRef; external name '_kSCValNetModemDialModeIgnoreDialTone'; (* attribute const *) { "IgnoreDialTone" }
+var kSCValNetModemDialModeManual: CFStringRef; external name '_kSCValNetModemDialModeManual'; (* attribute const *) { "Manual" }
+var kSCValNetModemDialModeWaitForDialTone: CFStringRef; external name '_kSCValNetModemDialModeWaitForDialTone'; (* attribute const *) { "WaitForDialTone" }
+
+{
+ * kSCEntNetNetInfo Entity Keys
+ }
+var kSCPropNetNetInfoBindingMethods: CFStringRef; external name '_kSCPropNetNetInfoBindingMethods'; (* attribute const *) { CFString "BindingMethods" }
+var kSCPropNetNetInfoServerAddresses: CFStringRef; external name '_kSCPropNetNetInfoServerAddresses'; (* attribute const *) { CFArray[CFString] "ServerAddresses" }
+var kSCPropNetNetInfoServerTags: CFStringRef; external name '_kSCPropNetNetInfoServerTags'; (* attribute const *) { CFArray[CFString] "ServerTags" }
+var kSCPropNetNetInfoBroadcastServerTag: CFStringRef; external name '_kSCPropNetNetInfoBroadcastServerTag'; (* attribute const *) { CFString "BroadcastServerTag" }
+
+{ kSCPropNetNetInfoBindingMethods values }
+var kSCValNetNetInfoBindingMethodsBroadcast: CFStringRef; external name '_kSCValNetNetInfoBindingMethodsBroadcast'; (* attribute const *) { "Broadcast" }
+var kSCValNetNetInfoBindingMethodsDHCP: CFStringRef; external name '_kSCValNetNetInfoBindingMethodsDHCP'; (* attribute const *) { "DHCP" }
+var kSCValNetNetInfoBindingMethodsManual: CFStringRef; external name '_kSCValNetNetInfoBindingMethodsManual'; (* attribute const *) { "Manual" }
+
+{ kSCPropNetNetInfoBroadcastServerTag default value }
+var kSCValNetNetInfoDefaultServerTag: CFStringRef; external name '_kSCValNetNetInfoDefaultServerTag'; (* attribute const *) { "network" }
+
+{
+ * kSCEntNetNIS Entity Keys
+ }
+{ RESERVED FOR FUTURE USE }
+
+{
+ * kSCEntNetPPP Entity Keys
+ }
+var kSCPropNetPPPACSPEnabled: CFStringRef; external name '_kSCPropNetPPPACSPEnabled'; (* attribute const *) { CFNumber (0 or 1) "ACSPEnabled" }
+var kSCPropNetPPPConnectTime: CFStringRef; external name '_kSCPropNetPPPConnectTime'; (* attribute const *) { CFNumber "ConnectTime" }
+var kSCPropNetPPPDeviceLastCause: CFStringRef; external name '_kSCPropNetPPPDeviceLastCause'; (* attribute const *) { CFNumber "DeviceLastCause" }
+var kSCPropNetPPPDialOnDemand: CFStringRef; external name '_kSCPropNetPPPDialOnDemand'; (* attribute const *) { CFNumber (0 or 1) "DialOnDemand" }
+var kSCPropNetPPPDisconnectOnIdle: CFStringRef; external name '_kSCPropNetPPPDisconnectOnIdle'; (* attribute const *) { CFNumber (0 or 1) "DisconnectOnIdle" }
+var kSCPropNetPPPDisconnectOnIdleTimer: CFStringRef; external name '_kSCPropNetPPPDisconnectOnIdleTimer'; (* attribute const *) { CFNumber "DisconnectOnIdleTimer" }
+var kSCPropNetPPPDisconnectOnLogout: CFStringRef; external name '_kSCPropNetPPPDisconnectOnLogout'; (* attribute const *) { CFNumber (0 or 1) "DisconnectOnLogout" }
+var kSCPropNetPPPDisconnectOnSleep: CFStringRef; external name '_kSCPropNetPPPDisconnectOnSleep'; (* attribute const *) { CFNumber (0 or 1) "DisconnectOnSleep" }
+var kSCPropNetPPPDisconnectTime: CFStringRef; external name '_kSCPropNetPPPDisconnectTime'; (* attribute const *) { CFNumber "DisconnectTime" }
+var kSCPropNetPPPIdleReminderTimer: CFStringRef; external name '_kSCPropNetPPPIdleReminderTimer'; (* attribute const *) { CFNumber "IdleReminderTimer" }
+var kSCPropNetPPPIdleReminder: CFStringRef; external name '_kSCPropNetPPPIdleReminder'; (* attribute const *) { CFNumber (0 or 1) "IdleReminder" }
+var kSCPropNetPPPLastCause: CFStringRef; external name '_kSCPropNetPPPLastCause'; (* attribute const *) { CFNumber "LastCause" }
+var kSCPropNetPPPLogfile: CFStringRef; external name '_kSCPropNetPPPLogfile'; (* attribute const *) { CFString "Logfile" }
+var kSCPropNetPPPPlugins: CFStringRef; external name '_kSCPropNetPPPPlugins'; (* attribute const *) { CFArray[CFString] "Plugins" }
+var kSCPropNetPPPRetryConnectTime: CFStringRef; external name '_kSCPropNetPPPRetryConnectTime'; (* attribute const *) { CFNumber "RetryConnectTime" }
+var kSCPropNetPPPSessionTimer: CFStringRef; external name '_kSCPropNetPPPSessionTimer'; (* attribute const *) { CFNumber "SessionTimer" }
+var kSCPropNetPPPStatus: CFStringRef; external name '_kSCPropNetPPPStatus'; (* attribute const *) { CFNumber "Status" }
+var kSCPropNetPPPUseSessionTimer: CFStringRef; external name '_kSCPropNetPPPUseSessionTimer'; (* attribute const *) { CFNumber (0 or 1) "UseSessionTimer" }
+var kSCPropNetPPPVerboseLogging: CFStringRef; external name '_kSCPropNetPPPVerboseLogging'; (* attribute const *) { CFNumber (0 or 1) "VerboseLogging" }
+
+{ Auth: }
+var kSCPropNetPPPAuthEAPPlugins: CFStringRef; external name '_kSCPropNetPPPAuthEAPPlugins'; (* attribute const *) { CFArray[CFString] "AuthEAPPlugins" }
+var kSCPropNetPPPAuthName: CFStringRef; external name '_kSCPropNetPPPAuthName'; (* attribute const *) { CFString "AuthName" }
+var kSCPropNetPPPAuthPassword: CFStringRef; external name '_kSCPropNetPPPAuthPassword'; (* attribute const *) { CFString "AuthPassword" }
+var kSCPropNetPPPAuthPasswordEncryption: CFStringRef; external name '_kSCPropNetPPPAuthPasswordEncryption'; (* attribute const *) { CFString "AuthPasswordEncryption" }
+var kSCPropNetPPPAuthPrompt: CFStringRef; external name '_kSCPropNetPPPAuthPrompt'; (* attribute const *) { CFString "AuthPrompt" }
+var kSCPropNetPPPAuthProtocol: CFStringRef; external name '_kSCPropNetPPPAuthProtocol'; (* attribute const *) { CFArray[CFString] "AuthProtocol" }
+
+{ kSCPropNetPPPAuthPasswordEncryption values }
+var kSCValNetPPPAuthPasswordEncryptionKeychain: CFStringRef; external name '_kSCValNetPPPAuthPasswordEncryptionKeychain'; (* attribute const *) { "Keychain" }
+
+{ kSCPropNetPPPAuthPrompt values }
+var kSCValNetPPPAuthPromptBefore: CFStringRef; external name '_kSCValNetPPPAuthPromptBefore'; (* attribute const *) { CFString "Before" }
+var kSCValNetPPPAuthPromptAfter: CFStringRef; external name '_kSCValNetPPPAuthPromptAfter'; (* attribute const *) { CFString "After" }
+
+{ kSCPropNetPPPAuthProtocol values }
+var kSCValNetPPPAuthProtocolCHAP: CFStringRef; external name '_kSCValNetPPPAuthProtocolCHAP'; (* attribute const *) { CFString "CHAP" }
+var kSCValNetPPPAuthProtocolEAP: CFStringRef; external name '_kSCValNetPPPAuthProtocolEAP'; (* attribute const *) { CFString "EAP" }
+var kSCValNetPPPAuthProtocolMSCHAP1: CFStringRef; external name '_kSCValNetPPPAuthProtocolMSCHAP1'; (* attribute const *) { CFString "MSCHAP1" }
+var kSCValNetPPPAuthProtocolMSCHAP2: CFStringRef; external name '_kSCValNetPPPAuthProtocolMSCHAP2'; (* attribute const *) { CFString "MSCHAP2" }
+var kSCValNetPPPAuthProtocolPAP: CFStringRef; external name '_kSCValNetPPPAuthProtocolPAP'; (* attribute const *) { CFString "PAP" }
+
+{ Comm: }
+var kSCPropNetPPPCommAlternateRemoteAddress: CFStringRef; external name '_kSCPropNetPPPCommAlternateRemoteAddress'; (* attribute const *) { CFString "CommAlternateRemoteAddress" }
+var kSCPropNetPPPCommConnectDelay: CFStringRef; external name '_kSCPropNetPPPCommConnectDelay'; (* attribute const *) { CFNumber "CommConnectDelay" }
+var kSCPropNetPPPCommDisplayTerminalWindow: CFStringRef; external name '_kSCPropNetPPPCommDisplayTerminalWindow'; (* attribute const *) { CFNumber (0 or 1) "CommDisplayTerminalWindow" }
+var kSCPropNetPPPCommRedialCount: CFStringRef; external name '_kSCPropNetPPPCommRedialCount'; (* attribute const *) { CFNumber "CommRedialCount" }
+var kSCPropNetPPPCommRedialEnabled: CFStringRef; external name '_kSCPropNetPPPCommRedialEnabled'; (* attribute const *) { CFNumber (0 or 1) "CommRedialEnabled" }
+var kSCPropNetPPPCommRedialInterval: CFStringRef; external name '_kSCPropNetPPPCommRedialInterval'; (* attribute const *) { CFNumber "CommRedialInterval" }
+var kSCPropNetPPPCommRemoteAddress: CFStringRef; external name '_kSCPropNetPPPCommRemoteAddress'; (* attribute const *) { CFString "CommRemoteAddress" }
+var kSCPropNetPPPCommTerminalScript: CFStringRef; external name '_kSCPropNetPPPCommTerminalScript'; (* attribute const *) { CFString "CommTerminalScript" }
+var kSCPropNetPPPCommUseTerminalScript: CFStringRef; external name '_kSCPropNetPPPCommUseTerminalScript'; (* attribute const *) { CFNumber (0 or 1) "CommUseTerminalScript" }
+
+{ CCP: }
+var kSCPropNetPPPCCPEnabled: CFStringRef; external name '_kSCPropNetPPPCCPEnabled'; (* attribute const *) { CFNumber (0 or 1) "CCPEnabled" }
+
+{ IPCP: }
+var kSCPropNetPPPIPCPCompressionVJ: CFStringRef; external name '_kSCPropNetPPPIPCPCompressionVJ'; (* attribute const *) { CFNumber (0 or 1) "IPCPCompressionVJ" }
+
+{ LCP: }
+var kSCPropNetPPPLCPEchoEnabled: CFStringRef; external name '_kSCPropNetPPPLCPEchoEnabled'; (* attribute const *) { CFNumber (0 or 1) "LCPEchoEnabled" }
+var kSCPropNetPPPLCPEchoFailure: CFStringRef; external name '_kSCPropNetPPPLCPEchoFailure'; (* attribute const *) { CFNumber "LCPEchoFailure" }
+var kSCPropNetPPPLCPEchoInterval: CFStringRef; external name '_kSCPropNetPPPLCPEchoInterval'; (* attribute const *) { CFNumber "LCPEchoInterval" }
+var kSCPropNetPPPLCPCompressionACField: CFStringRef; external name '_kSCPropNetPPPLCPCompressionACField'; (* attribute const *) { CFNumber (0 or 1) "LCPCompressionACField" }
+var kSCPropNetPPPLCPCompressionPField: CFStringRef; external name '_kSCPropNetPPPLCPCompressionPField'; (* attribute const *) { CFNumber (0 or 1) "LCPCompressionPField" }
+var kSCPropNetPPPLCPMRU: CFStringRef; external name '_kSCPropNetPPPLCPMRU'; (* attribute const *) { CFNumber "LCPMRU" }
+var kSCPropNetPPPLCPMTU: CFStringRef; external name '_kSCPropNetPPPLCPMTU'; (* attribute const *) { CFNumber "LCPMTU" }
+var kSCPropNetPPPLCPReceiveACCM: CFStringRef; external name '_kSCPropNetPPPLCPReceiveACCM'; (* attribute const *) { CFNumber "LCPReceiveACCM" }
+var kSCPropNetPPPLCPTransmitACCM: CFStringRef; external name '_kSCPropNetPPPLCPTransmitACCM'; (* attribute const *) { CFNumber "LCPTransmitACCM" }
+
+{
+ * kSCEntNetPPPoE Entity Keys
+ }
+{ RESERVED FOR FUTURE USE }
+
+{
+ * kSCEntNetPPPSerial Entity Keys
+ }
+{ RESERVED FOR FUTURE USE }
+
+{
+ * kSCEntNetPPTP Entity Keys
+ }
+{ RESERVED FOR FUTURE USE }
+
+{
+ * kSCEntNetL2TP Entity Keys
+ }
+var kSCPropNetL2TPIPSecSharedSecret: CFStringRef; external name '_kSCPropNetL2TPIPSecSharedSecret'; (* attribute const *) { CFString "IPSecSharedSecret" }
+var kSCPropNetL2TPIPSecSharedSecretEncryption: CFStringRef; external name '_kSCPropNetL2TPIPSecSharedSecretEncryption'; (* attribute const *) { CFString "IPSecSharedSecretEncryption" }
+var kSCPropNetL2TPTransport: CFStringRef; external name '_kSCPropNetL2TPTransport'; (* attribute const *) { CFString "Transport" }
+
+{ kSCPropNetL2TPIPSecSharedSecretEncryption values }
+var kSCValNetL2TPIPSecSharedSecretEncryptionKeychain: CFStringRef; external name '_kSCValNetL2TPIPSecSharedSecretEncryptionKeychain'; (* attribute const *) { "Keychain" }
+
+{ kSCPropNetL2TPTransport values }
+var kSCValNetL2TPTransportIP: CFStringRef; external name '_kSCValNetL2TPTransportIP'; (* attribute const *) { "IP" }
+var kSCValNetL2TPTransportIPSec: CFStringRef; external name '_kSCValNetL2TPTransportIPSec'; (* attribute const *) { "IPSec" }
+
+{
+ * kSCEntNetProxies Entity Keys
+ }
+var kSCPropNetProxiesExceptionsList: CFStringRef; external name '_kSCPropNetProxiesExceptionsList'; (* attribute const *) { CFArray[CFString] "ExceptionsList" }
+var kSCPropNetProxiesFTPEnable: CFStringRef; external name '_kSCPropNetProxiesFTPEnable'; (* attribute const *) { CFNumber (0 or 1) "FTPEnable" }
+var kSCPropNetProxiesFTPPassive: CFStringRef; external name '_kSCPropNetProxiesFTPPassive'; (* attribute const *) { CFNumber (0 or 1) "FTPPassive" }
+var kSCPropNetProxiesFTPPort: CFStringRef; external name '_kSCPropNetProxiesFTPPort'; (* attribute const *) { CFNumber "FTPPort" }
+var kSCPropNetProxiesFTPProxy: CFStringRef; external name '_kSCPropNetProxiesFTPProxy'; (* attribute const *) { CFString "FTPProxy" }
+var kSCPropNetProxiesGopherEnable: CFStringRef; external name '_kSCPropNetProxiesGopherEnable'; (* attribute const *) { CFNumber (0 or 1) "GopherEnable" }
+var kSCPropNetProxiesGopherPort: CFStringRef; external name '_kSCPropNetProxiesGopherPort'; (* attribute const *) { CFNumber "GopherPort" }
+var kSCPropNetProxiesGopherProxy: CFStringRef; external name '_kSCPropNetProxiesGopherProxy'; (* attribute const *) { CFString "GopherProxy" }
+var kSCPropNetProxiesHTTPEnable: CFStringRef; external name '_kSCPropNetProxiesHTTPEnable'; (* attribute const *) { CFNumber (0 or 1) "HTTPEnable" }
+var kSCPropNetProxiesHTTPPort: CFStringRef; external name '_kSCPropNetProxiesHTTPPort'; (* attribute const *) { CFNumber "HTTPPort" }
+var kSCPropNetProxiesHTTPProxy: CFStringRef; external name '_kSCPropNetProxiesHTTPProxy'; (* attribute const *) { CFString "HTTPProxy" }
+var kSCPropNetProxiesHTTPSEnable: CFStringRef; external name '_kSCPropNetProxiesHTTPSEnable'; (* attribute const *) { CFNumber (0 or 1) "HTTPSEnable" }
+var kSCPropNetProxiesHTTPSPort: CFStringRef; external name '_kSCPropNetProxiesHTTPSPort'; (* attribute const *) { CFNumber "HTTPSPort" }
+var kSCPropNetProxiesHTTPSProxy: CFStringRef; external name '_kSCPropNetProxiesHTTPSProxy'; (* attribute const *) { CFString "HTTPSProxy" }
+var kSCPropNetProxiesRTSPEnable: CFStringRef; external name '_kSCPropNetProxiesRTSPEnable'; (* attribute const *) { CFNumber (0 or 1) "RTSPEnable" }
+var kSCPropNetProxiesRTSPPort: CFStringRef; external name '_kSCPropNetProxiesRTSPPort'; (* attribute const *) { CFNumber "RTSPPort" }
+var kSCPropNetProxiesRTSPProxy: CFStringRef; external name '_kSCPropNetProxiesRTSPProxy'; (* attribute const *) { CFString "RTSPProxy" }
+var kSCPropNetProxiesSOCKSEnable: CFStringRef; external name '_kSCPropNetProxiesSOCKSEnable'; (* attribute const *) { CFNumber (0 or 1) "SOCKSEnable" }
+var kSCPropNetProxiesSOCKSPort: CFStringRef; external name '_kSCPropNetProxiesSOCKSPort'; (* attribute const *) { CFNumber "SOCKSPort" }
+var kSCPropNetProxiesSOCKSProxy: CFStringRef; external name '_kSCPropNetProxiesSOCKSProxy'; (* attribute const *) { CFString "SOCKSProxy" }
+
+{
+ kSCCompUsers Entity Keys
+ }
+var kSCEntUsersConsoleUser: CFStringRef; external name '_kSCEntUsersConsoleUser'; (* attribute const *) { "ConsoleUser" }
+
+{
+ * kSCCompSystem Properties
+ }
+var kSCPropSystemComputerName: CFStringRef; external name '_kSCPropSystemComputerName'; (* attribute const *) { CFString "ComputerName" }
+var kSCPropSystemComputerNameEncoding: CFStringRef; external name '_kSCPropSystemComputerNameEncoding'; (* attribute const *) { CFNumber "ComputerNameEncoding" }
+
+{
+ * Configuration Store Definitions
+ }
+{ domain prefixes }
+var kSCDynamicStoreDomainFile: CFStringRef; external name '_kSCDynamicStoreDomainFile'; (* attribute const *) { "File:" }
+var kSCDynamicStoreDomainPlugin: CFStringRef; external name '_kSCDynamicStoreDomainPlugin'; (* attribute const *) { "Plugin:" }
+var kSCDynamicStoreDomainSetup: CFStringRef; external name '_kSCDynamicStoreDomainSetup'; (* attribute const *) { "Setup:" }
+var kSCDynamicStoreDomainState: CFStringRef; external name '_kSCDynamicStoreDomainState'; (* attribute const *) { "State:" }
+var kSCDynamicStoreDomainPrefs: CFStringRef; external name '_kSCDynamicStoreDomainPrefs'; (* attribute const *) { "Prefs:" }
+
+{ kSCDynamicStoreDomainSetup Properties }
+var kSCDynamicStorePropSetupCurrentSet: CFStringRef; external name '_kSCDynamicStorePropSetupCurrentSet'; (* attribute const *) { CFString "CurrentSet" }
+var kSCDynamicStorePropSetupLastUpdated: CFStringRef; external name '_kSCDynamicStorePropSetupLastUpdated'; (* attribute const *) { "LastUpdated" }
+
+{ Properties }
+var kSCDynamicStorePropNetInterfaces: CFStringRef; external name '_kSCDynamicStorePropNetInterfaces'; (* attribute const *) { CFArray[CFString] "Interfaces" }
+var kSCDynamicStorePropNetPrimaryInterface: CFStringRef; external name '_kSCDynamicStorePropNetPrimaryInterface'; (* attribute const *) { CFString "PrimaryInterface" }
+var kSCDynamicStorePropNetPrimaryService: CFStringRef; external name '_kSCDynamicStorePropNetPrimaryService'; (* attribute const *) { CFString "PrimaryService" }
+var kSCDynamicStorePropNetServiceIDs: CFStringRef; external name '_kSCDynamicStorePropNetServiceIDs'; (* attribute const *) { CFArray[CFString] "ServiceIDs" }
+
+{
+ * Obsolete schema definitions which will be removed "soon".
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kSCPropUsersConsoleUserName CFSTRP('Name')}
+{$endc} { CFString }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kSCPropUsersConsoleUserUID CFSTRP('UID')}
+{$endc} { CFNumber }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kSCPropUsersConsoleUserGID CFSTRP('GID')}
+{$endc} { CFNumber }
+
+{unit Script}
+{
+ File: Script.p
+
+ Contains: Script Manager interfaces
+
+ Version: Technology: Mac OS 9 / Carbon
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1986-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ Meta script codes: }
+
+const
+ smSystemScript = -1; { designates system script. }
+ smCurrentScript = -2; { designates current font script. }
+ smAllScripts = -3; { designates any script }
+
+ {
+ Script codes:
+ These specify a Mac OS encoding that is related to a FOND ID range.
+ Some of the encodings have several variants (e.g. for different localized systems)
+ which all share the same script code.
+ Not all of these script codes are currently supported by Apple software.
+ Notes:
+ - Script code 0 (smRoman) is also used (instead of smGreek) for the Greek encoding
+ in the Greek localized system.
+ - Script code 28 (smEthiopic) is also used for the Inuit encoding in the Inuktitut
+ system.
+ }
+ smRoman = 0;
+ smJapanese = 1;
+ smTradChinese = 2; { Traditional Chinese }
+ smKorean = 3;
+ smArabic = 4;
+ smHebrew = 5;
+ smGreek = 6;
+ smCyrillic = 7;
+ smRSymbol = 8; { Right-left symbol }
+ smDevanagari = 9;
+ smGurmukhi = 10;
+ smGujarati = 11;
+ smOriya = 12;
+ smBengali = 13;
+ smTamil = 14;
+ smTelugu = 15;
+ smKannada = 16; { Kannada/Kanarese }
+ smMalayalam = 17;
+ smSinhalese = 18;
+ smBurmese = 19;
+ smKhmer = 20; { Khmer/Cambodian }
+ smThai = 21;
+ smLao = 22;
+ smGeorgian = 23;
+ smArmenian = 24;
+ smSimpChinese = 25; { Simplified Chinese }
+ smTibetan = 26;
+ smMongolian = 27;
+ smEthiopic = 28;
+ smGeez = 28; { Synonym for smEthiopic }
+ smCentralEuroRoman = 29; { For Czech, Slovak, Polish, Hungarian, Baltic langs }
+ smVietnamese = 30;
+ smExtArabic = 31; { extended Arabic }
+ smUninterp = 32; { uninterpreted symbols, e.g. palette symbols }
+
+ { Extended script code for full Unicode input }
+ smUnicodeScript = $7E;
+
+ { Obsolete script code names (kept for backward compatibility): }
+ smChinese = 2; { (Use smTradChinese or smSimpChinese) }
+ smRussian = 7; { Use smCyrillic }
+ { smMaldivian = 25: deleted, no code for Maldivian }
+ smLaotian = 22; { Use smLao }
+ smAmharic = 28; { Use smEthiopic or smGeez }
+ smSlavic = 29; { Use smCentralEuroRoman }
+ smEastEurRoman = 29; { Use smCentralEuroRoman }
+ smSindhi = 31; { Use smExtArabic }
+ smKlingon = 32;
+
+ {
+ Language codes:
+ These specify a language implemented using a particular Mac OS encoding.
+ Not all of these language codes are currently supported by Apple software.
+ }
+ langEnglish = 0; { smRoman script }
+ langFrench = 1; { smRoman script }
+ langGerman = 2; { smRoman script }
+ langItalian = 3; { smRoman script }
+ langDutch = 4; { smRoman script }
+ langSwedish = 5; { smRoman script }
+ langSpanish = 6; { smRoman script }
+ langDanish = 7; { smRoman script }
+ langPortuguese = 8; { smRoman script }
+ langNorwegian = 9; { smRoman script }
+ langHebrew = 10; { smHebrew script }
+ langJapanese = 11; { smJapanese script }
+ langArabic = 12; { smArabic script }
+ langFinnish = 13; { smRoman script }
+ langGreek = 14; { Greek script using smRoman script code }
+ langIcelandic = 15; { modified smRoman/Icelandic script }
+ langMaltese = 16; { Roman script }
+ langTurkish = 17; { modified smRoman/Turkish script }
+ langCroatian = 18; { modified smRoman/Croatian script }
+ langTradChinese = 19; { Chinese (Mandarin) in traditional characters }
+ langUrdu = 20; { smArabic script }
+ langHindi = 21; { smDevanagari script }
+ langThai = 22; { smThai script }
+ langKorean = 23; { smKorean script }
+
+ langLithuanian = 24; { smCentralEuroRoman script }
+ langPolish = 25; { smCentralEuroRoman script }
+ langHungarian = 26; { smCentralEuroRoman script }
+ langEstonian = 27; { smCentralEuroRoman script }
+ langLatvian = 28; { smCentralEuroRoman script }
+ langSami = 29; { language of the Sami people of N. Scandinavia }
+ langFaroese = 30; { modified smRoman/Icelandic script }
+ langFarsi = 31; { modified smArabic/Farsi script }
+ langPersian = 31; { Synonym for langFarsi }
+ langRussian = 32; { smCyrillic script }
+ langSimpChinese = 33; { Chinese (Mandarin) in simplified characters }
+ langFlemish = 34; { smRoman script }
+ langIrishGaelic = 35; { smRoman or modified smRoman/Celtic script (without dot above) }
+ langAlbanian = 36; { smRoman script }
+ langRomanian = 37; { modified smRoman/Romanian script }
+ langCzech = 38; { smCentralEuroRoman script }
+ langSlovak = 39; { smCentralEuroRoman script }
+ langSlovenian = 40; { modified smRoman/Croatian script }
+ langYiddish = 41; { smHebrew script }
+ langSerbian = 42; { smCyrillic script }
+ langMacedonian = 43; { smCyrillic script }
+ langBulgarian = 44; { smCyrillic script }
+ langUkrainian = 45; { modified smCyrillic/Ukrainian script }
+ langByelorussian = 46; { smCyrillic script }
+ langBelorussian = 46; { Synonym for langByelorussian }
+
+ langUzbek = 47; { Cyrillic script }
+ langKazakh = 48; { Cyrillic script }
+ langAzerbaijani = 49; { Azerbaijani in Cyrillic script }
+ langAzerbaijanAr = 50; { Azerbaijani in Arabic script }
+ langArmenian = 51; { smArmenian script }
+ langGeorgian = 52; { smGeorgian script }
+ langMoldavian = 53; { smCyrillic script }
+ langKirghiz = 54; { Cyrillic script }
+ langTajiki = 55; { Cyrillic script }
+ langTurkmen = 56; { Cyrillic script }
+ langMongolian = 57; { Mongolian in smMongolian script }
+ langMongolianCyr = 58; { Mongolian in Cyrillic script }
+ langPashto = 59; { Arabic script }
+ langKurdish = 60; { smArabic script }
+ langKashmiri = 61; { Arabic script }
+ langSindhi = 62; { Arabic script }
+ langTibetan = 63; { smTibetan script }
+ langNepali = 64; { smDevanagari script }
+ langSanskrit = 65; { smDevanagari script }
+ langMarathi = 66; { smDevanagari script }
+ langBengali = 67; { smBengali script }
+ langAssamese = 68; { smBengali script }
+ langGujarati = 69; { smGujarati script }
+ langPunjabi = 70; { smGurmukhi script }
+
+ langOriya = 71; { smOriya script }
+ langMalayalam = 72; { smMalayalam script }
+ langKannada = 73; { smKannada script }
+ langTamil = 74; { smTamil script }
+ langTelugu = 75; { smTelugu script }
+ langSinhalese = 76; { smSinhalese script }
+ langBurmese = 77; { smBurmese script }
+ langKhmer = 78; { smKhmer script }
+ langLao = 79; { smLao script }
+ langVietnamese = 80; { smVietnamese script }
+ langIndonesian = 81; { smRoman script }
+ langTagalog = 82; { Roman script }
+ langMalayRoman = 83; { Malay in smRoman script }
+ langMalayArabic = 84; { Malay in Arabic script }
+ langAmharic = 85; { smEthiopic script }
+ langTigrinya = 86; { smEthiopic script }
+ langOromo = 87; { smEthiopic script }
+ langSomali = 88; { smRoman script }
+ langSwahili = 89; { smRoman script }
+ langKinyarwanda = 90; { smRoman script }
+ langRuanda = 90; { synonym for langKinyarwanda }
+ langRundi = 91; { smRoman script }
+ langNyanja = 92; { smRoman script }
+ langChewa = 92; { synonym for langNyanja }
+ langMalagasy = 93; { smRoman script }
+ langEsperanto = 94; { Roman script }
+
+ langWelsh = 128; { modified smRoman/Celtic script }
+ langBasque = 129; { smRoman script }
+ langCatalan = 130; { smRoman script }
+ langLatin = 131; { smRoman script }
+ langQuechua = 132; { smRoman script }
+ langGuarani = 133; { smRoman script }
+ langAymara = 134; { smRoman script }
+ langTatar = 135; { Cyrillic script }
+ langUighur = 136; { Arabic script }
+ langDzongkha = 137; { (lang of Bhutan) smTibetan script }
+ langJavaneseRom = 138; { Javanese in smRoman script }
+ langSundaneseRom = 139; { Sundanese in smRoman script }
+ langGalician = 140; { smRoman script }
+ langAfrikaans = 141; { smRoman script }
+
+ langBreton = 142; { smRoman or modified smRoman/Celtic script }
+ langInuktitut = 143; { Inuit script using smEthiopic script code }
+ langScottishGaelic = 144; { smRoman or modified smRoman/Celtic script }
+ langManxGaelic = 145; { smRoman or modified smRoman/Celtic script }
+ langIrishGaelicScript = 146; { modified smRoman/Gaelic script (using dot above) }
+ langTongan = 147; { smRoman script }
+ langGreekPoly = 148; { smGreek script }
+ langGreenlandic = 149; { smRoman script }
+ langAzerbaijanRoman = 150; { Azerbaijani in Roman script }
+
+ langUnspecified = 32767; { Special code for use in resources (such as 'itlm') }
+
+ {
+ Obsolete language code names (kept for backward compatibility):
+ Misspelled, ambiguous, misleading, considered pejorative, archaic, etc.
+ }
+ langPortugese = 8; { Use langPortuguese }
+ langMalta = 16; { Use langMaltese }
+ langYugoslavian = 18; { (use langCroatian, langSerbian, etc.) }
+ langChinese = 19; { (use langTradChinese or langSimpChinese) }
+ langLettish = 28; { Use langLatvian }
+ langLapponian = 29; { Use langSami }
+ langLappish = 29; { Use langSami }
+ langSaamisk = 29; { Use langSami }
+ langFaeroese = 30; { Use langFaroese }
+ langIrish = 35; { Use langIrishGaelic }
+ langGalla = 87; { Use langOromo }
+ langAfricaans = 141; { Use langAfrikaans }
+
+ {
+ Region codes:
+ These typically specify a combination of a language code and a particular region.
+ Some of these numeric values are reserved just for extra resource IDs associated
+ with certain regions; these are not actual region codes, and are noted in the comments.
+ Not all of the region codes are currently supported by Apple software.
+ When relevant, the following list also provides:
+ - The Apple part number (P/N) code for software localized for the specified region.
+ - The two-letter ISO language and country codes (from ISO 639 and ISO 3166). The
+ language code (lowercase) is first, then '_', then the country code (uppercase).
+ }
+
+ { P/N ISO codes comments }
+ verUS = 0; { en_US }
+ verFrance = 1; { F fr_FR }
+ verBritain = 2; { B en_GB }
+ verGermany = 3; { D de_DE }
+ verItaly = 4; { T it_IT }
+ verNetherlands = 5; { N nl_NL }
+ verFlemish = 6; { FN nl_BE Flemish (Dutch) for Belgium }
+ verSweden = 7; { S sv_SE }
+ verSpain = 8; { E es_ES Spanish for Spain }
+ verDenmark = 9; { DK da_DK }
+ verPortugal = 10; { PO pt_PT Portuguese for Portugal }
+ verFrCanada = 11; { C fr_CA French for Canada }
+ verNorway = 12; { H no_NO,nb_NO BokmŒl }
+ verIsrael = 13; { HB he_IL,iw_IL Hebrew }
+ verJapan = 14; { J ja_JP }
+ verAustralia = 15; { X en_AU English for Australia }
+ verArabic = 16; { AB ar Arabic for N Africa, Arabian peninsula, Levant }
+ verFinland = 17; { K fi_FI }
+ verFrSwiss = 18; { SF fr_CH French Swiss }
+ verGrSwiss = 19; { SD de_CH German Swiss }
+ verGreece = 20; { GR el_GR Monotonic Greek (modern) }
+ verIceland = 21; { IS is_IS }
+ verMalta = 22; { MA mt_MT }
+ verCyprus = 23; { CY _CY Greek or Turkish language? Checking... }
+ verTurkey = 24; { TU tr_TR }
+ verYugoCroatian = 25; { YU Croatian for Yugoslavia; now use verCroatia (68) }
+
+ verNetherlandsComma = 26; { ID for KCHR resource - Dutch }
+ verBelgiumLuxPoint = 27; { ID for KCHR resource - Belgium }
+ verCanadaComma = 28; { ID for KCHR resource - Canadian ISO }
+ verCanadaPoint = 29; { ID for KCHR resource - Canadian; now unused }
+ vervariantPortugal = 30; { ID for resource; now unused }
+ vervariantNorway = 31; { ID for resource; now unused }
+ vervariantDenmark = 32; { ID for KCHR resource - Danish Mac Plus }
+
+ verIndiaHindi = 33; { hi_IN Hindi for India }
+ verPakistanUrdu = 34; { UR ur_PK Urdu for Pakistan }
+ verTurkishModified = 35;
+ verItalianSwiss = 36; { ST it_CH Italian Swiss }
+ verInternational = 37; { Z en English for international use }
+ { 38 is unassigned }
+ verRomania = 39; { RO ro_RO }
+ verGreecePoly = 40; { grc Polytonic Greek (classical) }
+ verLithuania = 41; { LT lt_LT }
+ verPoland = 42; { PL pl_PL }
+ verHungary = 43; { MG hu_HU }
+ verEstonia = 44; { EE et_EE }
+ verLatvia = 45; { LV lv_LV }
+ verSami = 46; { se }
+ verFaroeIsl = 47; { FA fo_FO }
+ verIran = 48; { PS fa_IR Persian/Farsi }
+ verRussia = 49; { RS ru_RU Russian }
+ verIreland = 50; { GA ga_IE Irish Gaelic for Ireland (without dot above) }
+ verKorea = 51; { KH ko_KR }
+ verChina = 52; { CH zh_CN Simplified Chinese }
+ verTaiwan = 53; { TA zh_TW Traditional Chinese }
+ verThailand = 54; { TH th_TH }
+ verScriptGeneric = 55; { SS Generic script system (no language or script) }
+ verCzech = 56; { CZ cs_CZ }
+ verSlovak = 57; { SL sk_SK }
+ verFarEastGeneric = 58; { FE Generic Far East system (no language or script) }
+ verMagyar = 59; { Unused; see verHungary }
+ verBengali = 60; { bn Bangladesh or India }
+ verByeloRussian = 61; { BY be_BY }
+
+ verUkraine = 62; { UA uk_UA }
+ { 63 is unassigned }
+ verGreeceAlt = 64; { unused }
+ verSerbian = 65; { SR sr_YU,sh_YU }
+ verSlovenian = 66; { SV sl_SI }
+ verMacedonian = 67; { MD mk_MK }
+ verCroatia = 68; { CR hr_HR,sh_HR }
+ { 69 is unassigned }
+ verGermanReformed = 70; { de_DE Reformed orthography (used formerly unassigned 70) }
+ verBrazil = 71; { BR pt_BR Portuguese for Brazil }
+ verBulgaria = 72; { BG bg_BG }
+ verCatalonia = 73; { CA ca_ES Catalan for Spain }
+ verMultilingual = 74; { ZM mul (no language or script) }
+ verScottishGaelic = 75; { GD gd }
+ verManxGaelic = 76; { GV gv Isle of Man }
+ verBreton = 77; { BZ br }
+ verNunavut = 78; { IU iu_CA Inuktitut for Canada }
+ verWelsh = 79; { CU cy }
+ { 80 is ID for KCHR resource - Canadian CSA }
+ verIrishGaelicScript = 81; { GS ga_IE Irish Gaelic for Ireland (using dot above) }
+ verEngCanada = 82; { V en_CA English for Canada }
+ verBhutan = 83; { BH dz_BT Dzongkha for Bhutan }
+ verArmenian = 84; { HY hy_AM }
+ verGeorgian = 85; { KR ka_GE }
+ verSpLatinAmerica = 86; { LA es Spanish for Latin America }
+ { 87 is ID for KCHR resource - Spanish ISO }
+ verTonga = 88; { TS to_TO }
+ { 89 is ID for KCHR resource - Polish Modified }
+ { 90 is ID for KCHR resource - Catalan ISO }
+ verFrenchUniversal = 91; { fr French generic }
+ verAustria = 92; { AU de_AT German for Austria }
+ { Y 93 is unused alternate for verSpLatinAmerica }
+ verGujarati = 94; { gu_IN }
+ verPunjabi = 95; { pa Pakistan or India }
+ verIndiaUrdu = 96; { ur_IN Urdu for India }
+ verVietnam = 97; { vi_VN }
+
+ verFrBelgium = 98; { BF fr_BE French for Belgium }
+ verUzbek = 99; { BD uz_UZ }
+ verSingapore = 100; { SG }
+ verNynorsk = 101; { NY nn_NO Norwegian Nynorsk }
+ verAfrikaans = 102; { AK af_ZA }
+ verEsperanto = 103; { eo }
+ verMarathi = 104; { mr_IN }
+ verTibetan = 105; { bo }
+ verNepal = 106; { ne_NP }
+ verGreenland = 107; { kl }
+ verIrelandEnglish = 108; { en_IE English for Ireland, with Euro for currency }
+
+ {
+ Other extra resource IDs assigned in the same number space:
+ 179 is ID for KCHR & itl_ resources - Cornish
+ 581 is ID for KCHR resource - Irish Gaelic script alternate
+ 582 is ID for KCHR resource - Ogham
+ 779 is ID for KCHR resource - Welsh alternate
+ 1111 is ID for KCHR resource - French numeric
+ }
+
+ {
+ Obsolete region code names (kept for backward compatibility):
+ Misspelled or alternate form, ambiguous, misleading, considered pejorative, archaic, etc.
+ }
+ verFrBelgiumLux = 6; { Incorrect; 6 is Flemish, not French, for Belgium; use verFlemish }
+ verBelgiumLux = 6; { Use verFlemish }
+ verArabia = 16; { Use verArabic }
+ verYugoslavia = 25; { Use verYugoCroatian (same number, now unused), or newer verCroatia }
+ verIndia = 33; { Use verIndiaHindi }
+ verPakistan = 34; { Use verPakistanUrdu }
+ verRumania = 39; { Alternate for verRomania }
+ verGreekAncient = 40; { Use verGreecePoly }
+ verLapland = 46; { Use verSami }
+ verFaeroeIsl = 47; { Use verFaroeIsl }
+ verGenericFE = 58; { Use verFarEastGeneric }
+ verBelarus = 61; { Alternate for verByelorussian }
+ verUkrania = 62; { Use verUkraine }
+ verAlternateGr = 64; { Use verGreeceAlt }
+ verSerbia = 65; { Alternate for verSerbian }
+ verSlovenia = 66; { Alternate for verSlovenian }
+ verMacedonia = 67; { Alternate for verMacedonian }
+ verBrittany = 77; { Alternate for verBreton }
+ verWales = 79; { Alternate for verWelsh }
+ verArmenia = 84; { Alternate for verArmenian }
+ verGeorgia = 85; { Alternate for verGeorgian }
+ verAustriaGerman = 92; { Use verAustria }
+ verTibet = 105; { Use verTibetan }
+
+ minCountry = 0;
+ maxCountry = 107;
+
+ { Calendar Codes }
+ calGregorian = 0;
+ calArabicCivil = 1;
+ calArabicLunar = 2;
+ calJapanese = 3;
+ calJewish = 4;
+ calCoptic = 5;
+ calPersian = 6;
+
+ { SInt16 Format Codes }
+ intWestern = 0;
+ intArabic = 1;
+ intRoman = 2;
+ intJapanese = 3;
+ intEuropean = 4;
+ intOutputMask = $8000;
+
+ { CharByte byte types }
+ smSingleByte = 0;
+ smFirstByte = -1;
+ smLastByte = 1;
+ smMiddleByte = 2;
+
+ { CharType field masks }
+ smcTypeMask = $000F;
+ smcReserved = $00F0;
+ smcClassMask = $0F00;
+ smcOrientationMask = $1000; { two-byte script glyph orientation }
+ smcRightMask = $2000;
+ smcUpperMask = $4000;
+ smcDoubleMask = $8000;
+
+ { Basic CharType character types }
+ smCharPunct = $0000;
+ smCharAscii = $0001;
+ smCharEuro = $0007;
+ smCharExtAscii = $0007; { More correct synonym for smCharEuro }
+ { Additional CharType character types for script systems }
+ smCharKatakana = $0002; { Japanese Katakana }
+ smCharHiragana = $0003; { Japanese Hiragana }
+ smCharIdeographic = $0004; { Hanzi, Kanji, Hanja }
+ smCharTwoByteGreek = $0005; { 2-byte Greek in Far East systems }
+ smCharTwoByteRussian = $0006; { 2-byte Cyrillic in Far East systems }
+ smCharBidirect = $0008; { Arabic/Hebrew }
+ smCharContextualLR = $0009; { Contextual left-right: Thai, Indic scripts }
+ smCharNonContextualLR = $000A; { Non-contextual left-right: Cyrillic, Greek }
+ smCharHangul = $000C; { Korean Hangul }
+ smCharJamo = $000D; { Korean Jamo }
+ smCharBopomofo = $000E; { Chinese Bopomofo }
+ smCharGanaKana = $000F; { Shared for Japanese Hiragana & Katakana }
+ { old names for some of above, for backward compatibility }
+ smCharFISKana = $0002; { Katakana }
+ smCharFISGana = $0003; { Hiragana }
+ smCharFISIdeo = $0004; { Hanzi, Kanji, Hanja }
+
+ smCharFISGreek = $0005; { 2-byte Greek in Far East systems }
+ smCharFISRussian = $0006; { 2-byte Cyrillic in Far East systems }
+ { CharType classes for punctuation (smCharPunct) }
+ smPunctNormal = $0000;
+ smPunctNumber = $0100;
+ smPunctSymbol = $0200;
+ smPunctBlank = $0300; { Additional CharType classes for punctuation in two-byte systems }
+ smPunctRepeat = $0400; { repeat marker }
+ smPunctGraphic = $0500; { line graphics }
+ { CharType Katakana and Hiragana classes for two-byte systems }
+ smKanaSmall = $0100; { small kana character }
+ smKanaHardOK = $0200; { can have dakuten }
+ smKanaSoftOK = $0300; { can have dakuten or han-dakuten }
+ { CharType Ideographic classes for two-byte systems }
+ smIdeographicLevel1 = $0000; { level 1 char }
+ smIdeographicLevel2 = $0100; { level 2 char }
+ smIdeographicUser = $0200; { user char }
+ { old names for above, for backward compatibility }
+ smFISClassLvl1 = $0000; { level 1 char }
+ smFISClassLvl2 = $0100; { level 2 char }
+ smFISClassUser = $0200; { user char }
+ { CharType Jamo classes for Korean systems }
+ smJamoJaeum = $0000; { simple consonant char }
+ smJamoBogJaeum = $0100; { complex consonant char }
+ smJamoMoeum = $0200; { simple vowel char }
+ smJamoBogMoeum = $0300; { complex vowel char }
+
+ { CharType glyph orientation for two-byte systems }
+ smCharHorizontal = $0000; { horizontal character form, or for both }
+ smCharVertical = $1000; { vertical character form }
+ { CharType directions }
+ smCharLeft = $0000;
+ smCharRight = $2000; { CharType case modifers }
+ smCharLower = $0000;
+ smCharUpper = $4000; { CharType character size modifiers (1 or multiple bytes). }
+ smChar1byte = $0000;
+ smChar2byte = $8000;
+
+ { TransliterateText target types for Roman }
+ smTransAscii = 0; { convert to ASCII }
+ smTransNative = 1; { convert to font script }
+ smTransCase = $FE; { convert case for all text }
+ smTransSystem = $FF; { convert to system script }
+ { TransliterateText target types for two-byte scripts }
+ smTransAscii1 = 2; { 1-byte Roman }
+ smTransAscii2 = 3; { 2-byte Roman }
+ smTransKana1 = 4; { 1-byte Japanese Katakana }
+ smTransKana2 = 5; { 2-byte Japanese Katakana }
+
+ smTransGana2 = 7; { 2-byte Japanese Hiragana (no 1-byte Hiragana) }
+ smTransHangul2 = 8; { 2-byte Korean Hangul }
+ smTransJamo2 = 9; { 2-byte Korean Jamo }
+ smTransBopomofo2 = 10; { 2-byte Chinese Bopomofo }
+ { TransliterateText target modifiers }
+ smTransLower = $4000; { target becomes lowercase }
+ smTransUpper = $8000; { target becomes uppercase }
+ { TransliterateText resource format numbers }
+ smTransRuleBaseFormat = 1; { Rule based trsl resource format }
+ smTransHangulFormat = 2; { Table based Hangul trsl resource format }
+ { TransliterateText property flags }
+ smTransPreDoubleByting = 1; { Convert all text to double byte before transliteration }
+ smTransPreLowerCasing = 2; { Convert all text to lower case before transliteration }
+
+ { TransliterateText source mask - general }
+ smMaskAll = $FFFFFFFF; { Convert all text }
+ { TransliterateText source masks }
+ smMaskAscii = $00000001; { 2^smTransAscii }
+ smMaskNative = $00000002; { 2^smTransNative }
+ { TransliterateText source masks for two-byte scripts }
+ smMaskAscii1 = $00000004; { 2^smTransAscii1 }
+ smMaskAscii2 = $00000008; { 2^smTransAscii2 }
+ smMaskKana1 = $00000010; { 2^smTransKana1 }
+ smMaskKana2 = $00000020; { 2^smTransKana2 }
+ smMaskGana2 = $00000080; { 2^smTransGana2 }
+ smMaskHangul2 = $00000100; { 2^smTransHangul2 }
+ smMaskJamo2 = $00000200; { 2^smTransJamo2 }
+ smMaskBopomofo2 = $00000400; { 2^smTransBopomofo2 }
+
+ { Result values from GetScriptManagerVariable and SetScriptManagerVariable calls. }
+ smNotInstalled = 0; { routine not available in script }
+ smBadVerb = -1; { Bad verb passed to a routine }
+ smBadScript = -2; { Bad script code passed to a routine }
+
+ { Values for script redraw flag. }
+ smRedrawChar = 0; { Redraw character only }
+ smRedrawWord = 1; { Redraw entire word (2-byte systems) }
+ smRedrawLine = -1; { Redraw entire line (bidirectional systems) }
+
+ { GetScriptManagerVariable and SetScriptManagerVariable verbs }
+ smVersion = 0; { Script Manager version number }
+ smMunged = 2; { Globals change count }
+ smEnabled = 4; { Count of enabled scripts, incl Roman }
+ smBidirect = 6; { At least one bidirectional script }
+ smFontForce = 8; { Force font flag }
+ smIntlForce = 10; { Force intl flag }
+ smForced = 12; { Script was forced to system script }
+ smDefault = 14; { Script was defaulted to Roman script }
+ smPrint = 16; { Printer action routine }
+ smSysScript = 18; { System script }
+ smLastScript = 20; { Last keyboard script }
+ smKeyScript = 22; { Keyboard script }
+ smSysRef = 24; { System folder refNum }
+ smKeyCache = 26; { obsolete }
+ smKeySwap = 28; { Swapping table handle }
+ smGenFlags = 30; { General flags long }
+ smOverride = 32; { Script override flags }
+ smCharPortion = 34; { Ch vs SpExtra proportion }
+ { New for System 7.0: }
+ smDoubleByte = 36; { Flag for double-byte script installed }
+ smKCHRCache = 38; { Returns pointer to KCHR cache }
+ smRegionCode = 40; { Returns current region code (verXxx) }
+ smKeyDisableState = 42; { Returns current keyboard disable state }
+
+ { GetScriptVariable and SetScriptVariable verbs. }
+ { Note: Verbs private to script systems are negative, while }
+ { those general across script systems are non-negative. }
+ smScriptVersion = 0; { Script software version }
+ smScriptMunged = 2; { Script entry changed count }
+ smScriptEnabled = 4; { Script enabled flag }
+ smScriptRight = 6; { Right to left flag }
+ smScriptJust = 8; { Justification flag }
+ smScriptRedraw = 10; { Word redraw flag }
+ smScriptSysFond = 12; { Preferred system font }
+ smScriptAppFond = 14; { Preferred Application font }
+ smScriptBundle = 16; { Beginning of itlb verbs }
+ smScriptNumber = 16; { Script itl0 id }
+ smScriptDate = 18; { Script itl1 id }
+ smScriptSort = 20; { Script itl2 id }
+ smScriptFlags = 22; { flags word }
+ smScriptToken = 24; { Script itl4 id }
+ smScriptEncoding = 26; { id of optional itl5, if present }
+ smScriptLang = 28; { Current language for script }
+
+ smScriptNumDate = 30; { Script Number/Date formats. }
+ smScriptKeys = 32; { Script KCHR id }
+ smScriptIcon = 34; { ID # of SICN or kcs#/kcs4/kcs8 suite }
+ smScriptPrint = 36; { Script printer action routine }
+ smScriptTrap = 38; { Trap entry pointer }
+ smScriptCreator = 40; { Script file creator }
+ smScriptFile = 42; { Script file name }
+ smScriptName = 44; { Script name }
+ { There is a hole here for old Kanji private verbs 46-76 }
+ { New for System 7.0: }
+ smScriptMonoFondSize = 78; { default monospace FOND (hi) & size (lo) }
+ smScriptPrefFondSize = 80; { preferred FOND (hi) & size (lo) }
+ smScriptSmallFondSize = 82; { default small FOND (hi) & size (lo) }
+ smScriptSysFondSize = 84; { default system FOND (hi) & size (lo) }
+ smScriptAppFondSize = 86; { default app FOND (hi) & size (lo) }
+ smScriptHelpFondSize = 88; { default Help Mgr FOND (hi) & size (lo) }
+ smScriptValidStyles = 90; { mask of valid styles for script }
+ smScriptAliasStyle = 92; { style (set) to use for aliases }
+
+ { special negative verbs for Get/SetScriptVariable that were associated with WorldScriptI }
+ { move them here to be public }
+ { WorldScript private verbs }
+ smLayoutCache = -309; { HiWrd(param) is # entries, LoWrd is max input length }
+ smOldVerbSupport = -311; { param is added to old verbs to map to WSI verb }
+ smSetKashidas = -291; { param is ON or OFF, old verb = -36 }
+ smSetKashProp = -287; { param is kashida proportion, old verb = -32 }
+ smScriptSysBase = -281; { param is associated font to use w/ system font (old verb = -26) }
+ smScriptAppBase = -283; { param is associated font to use w/ app font (old verb = -28) }
+ smScriptFntBase = -285; { param is associated font to use w/ all other fonts (old verb = -30) }
+ smScriptLigatures = -263; { old verb = -8 }
+ smScriptNumbers = -267; { old verb = -12 }
+
+ { Special script code values for International Utilities }
+ iuSystemScript = -1; { <obsolete> system script }
+ iuCurrentScript = -2; { <obsolete> current script (for font of grafPort) }
+
+ { Negative verbs for KeyScript }
+ smKeyNextScript = -1; { Switch to next available script }
+ smKeySysScript = -2; { Switch to the system script }
+ smKeySwapScript = -3; { Switch to previously-used script }
+ { New for System 7.0: }
+ smKeyNextKybd = -4; { Switch to next keyboard in current keyscript }
+ smKeySwapKybd = -5; { Switch to previously-used keyboard in current keyscript }
+ smKeyDisableKybds = -6; { Disable keyboards not in system or Roman script }
+ smKeyEnableKybds = -7; { Re-enable keyboards for all enabled scripts }
+ smKeyToggleInline = -8; { Toggle inline input for current keyscript }
+ smKeyToggleDirection = -9; { Toggle default line direction (TESysJust) }
+ smKeyNextInputMethod = -10; { Switch to next input method in current keyscript }
+ smKeySwapInputMethod = -11; { Switch to last-used input method in current keyscript }
+ smKeyDisableKybdSwitch = -12; { Disable switching from the current keyboard }
+ smKeySetDirLeftRight = -15; { Set default line dir to left-right, align left }
+ smKeySetDirRightLeft = -16; { Set default line dir to right-left, align right }
+ smKeyRoman = -17; { Set keyscript to Roman. Does nothing if Roman-only system, unlike KeyScript(smRoman) which forces an update to current default Roman keyboard }
+
+ { Optional font and keyboard script synchronization }
+ { One more flag in the smGenFlags long. }
+ smfDisableKeyScriptSync = 27; { Disable font and keyboard script synchronization }
+
+ { We should define masks, too. }
+ smfDisableKeyScriptSyncMask = $08000000; { Disable font and keyboard script synchronization mask }
+
+ { Force keyboard script switching flag and mask for zero and positive KeyScript verbs }
+ smKeyForceKeyScriptBit = 7; { Force keyboard script switching flag }
+ smKeyForceKeyScriptMask = $80; { its mask }
+
+ { Bits in the smScriptFlags word }
+ { (bits above 8 are non-static) }
+ smsfIntellCP = 0; { Script has intelligent cut & paste }
+ smsfSingByte = 1; { Script has only single bytes }
+ smsfNatCase = 2; { Native chars have upper & lower case }
+ smsfContext = 3; { Script is contextual }
+ smsfNoForceFont = 4; { Script will not force characters }
+ smsfB0Digits = 5; { Script has alternate digits at B0-B9 }
+ smsfAutoInit = 6; { Auto initialize the script }
+ smsfUnivExt = 7; { Script is handled by universal extension }
+ smsfSynchUnstyledTE = 8; { Script synchronizes for unstyled TE }
+ smsfForms = 13; { Uses contextual forms for letters }
+ smsfLigatures = 14; { Uses contextual ligatures }
+ smsfReverse = 15; { Reverses native text, right-left }
+ { Bits in the smGenFlags long. }
+ { First (high-order) byte is set from itlc flags byte. }
+ smfShowIcon = 31; { Show icon even if only one script }
+ smfDualCaret = 30; { Use dual caret for mixed direction text }
+ smfNameTagEnab = 29; { Reserved for internal use }
+ smfUseAssocFontInfo = 28; { Use the associated font info for FontMetrics calls <48> }
+
+ { Roman script constants }
+ { The following are here for backward compatibility, but should not be used. }
+ { This information should be obtained using GetScript. }
+ romanSysFond = $3FFF; { system font id number }
+ romanAppFond = 3; { application font id number }
+ romanFlags = $0007; { roman settings }
+ { Script Manager font equates. }
+ smFondStart = $4000; { start from 16K }
+ smFondEnd = $C000; { past end of range at 48K }
+ { Miscellaneous font equates. }
+ smUprHalfCharSet = $80; { first char code in top half of std char set }
+
+ { Character Set Extensions }
+ diaeresisUprY = $D9;
+ fraction = $DA;
+ intlCurrency = $DB;
+ leftSingGuillemet = $DC;
+ rightSingGuillemet = $DD;
+ fiLigature = $DE;
+ flLigature = $DF;
+ dblDagger = $E0;
+ centeredDot = $E1;
+ baseSingQuote = $E2;
+ baseDblQuote = $E3;
+ perThousand = $E4;
+ circumflexUprA = $E5;
+ circumflexUprE = $E6;
+ acuteUprA = $E7;
+ diaeresisUprE = $E8;
+ graveUprE = $E9;
+ acuteUprI = $EA;
+ circumflexUprI = $EB;
+ diaeresisUprI = $EC;
+ graveUprI = $ED;
+ acuteUprO = $EE;
+ circumflexUprO = $EF;
+ appleLogo = $F0;
+ graveUprO = $F1;
+ acuteUprU = $F2;
+ circumflexUprU = $F3;
+ graveUprU = $F4;
+ dotlessLwrI = $F5;
+ circumflex = $F6;
+ tilde = $F7;
+ macron = $F8;
+ breveMark = $F9;
+ overDot = $FA;
+ ringMark = $FB;
+ cedilla = $FC;
+ doubleAcute = $FD;
+ ogonek = $FE;
+ hachek = $FF;
+
+ { ScriptTokenType values }
+ tokenIntl = 4; { the itl resource number of the tokenizer }
+ tokenEmpty = -1; { used internally as an empty flag }
+
+ tokenUnknown = 0; { chars that do not match a defined token type }
+ tokenWhite = 1; { white space }
+ tokenLeftLit = 2; { literal begin }
+ tokenRightLit = 3; { literal end }
+ tokenAlpha = 4; { alphabetic }
+ tokenNumeric = 5; { numeric }
+ tokenNewLine = 6; { new line }
+ tokenLeftComment = 7; { open comment }
+ tokenRightComment = 8; { close comment }
+ tokenLiteral = 9; { literal }
+ tokenEscape = 10; { character escape (e.g. '\' in "\n", "\t") }
+ tokenAltNum = 11; { alternate number (e.g. $B0-B9 in Arabic,Hebrew) }
+ tokenRealNum = 12; { real number }
+ tokenAltReal = 13; { alternate real number }
+ tokenReserve1 = 14; { reserved }
+ tokenReserve2 = 15; { reserved }
+ tokenLeftParen = 16; { open parenthesis }
+ tokenRightParen = 17; { close parenthesis }
+ tokenLeftBracket = 18; { open square bracket }
+ tokenRightBracket = 19; { close square bracket }
+
+ tokenLeftCurly = 20; { open curly bracket }
+ tokenRightCurly = 21; { close curly bracket }
+ tokenLeftEnclose = 22; { open guillemet }
+ tokenRightEnclose = 23; { close guillemet }
+ tokenPlus = 24;
+ tokenMinus = 25;
+ tokenAsterisk = 26; { times/multiply }
+ tokenDivide = 27;
+ tokenPlusMinus = 28; { plus or minus symbol }
+ tokenSlash = 29;
+ tokenBackSlash = 30;
+ tokenLess = 31; { less than symbol }
+ tokenGreat = 32; { greater than symbol }
+ tokenEqual = 33;
+ tokenLessEqual2 = 34; { less than or equal, 2 characters (e.g. <=) }
+ tokenLessEqual1 = 35; { less than or equal, 1 character }
+ tokenGreatEqual2 = 36; { greater than or equal, 2 characters (e.g. >=) }
+ tokenGreatEqual1 = 37; { greater than or equal, 1 character }
+ token2Equal = 38; { double equal (e.g. ==) }
+ tokenColonEqual = 39; { colon equal }
+
+ tokenNotEqual = 40; { not equal, 1 character }
+ tokenLessGreat = 41; { less/greater, Pascal not equal (e.g. <>) }
+ tokenExclamEqual = 42; { exclamation equal, C not equal (e.g. !=) }
+ tokenExclam = 43; { exclamation point }
+ tokenTilde = 44; { centered tilde }
+ tokenComma = 45;
+ tokenPeriod = 46;
+ tokenLeft2Quote = 47; { open double quote }
+ tokenRight2Quote = 48; { close double quote }
+ tokenLeft1Quote = 49; { open single quote }
+ tokenRight1Quote = 50; { close single quote }
+ token2Quote = 51; { double quote }
+ token1Quote = 52; { single quote }
+ tokenSemicolon = 53;
+ tokenPercent = 54;
+ tokenCaret = 55;
+ tokenUnderline = 56;
+ tokenAmpersand = 57;
+ tokenAtSign = 58;
+ tokenBar = 59; { vertical bar }
+
+ tokenQuestion = 60;
+ tokenPi = 61; { lower-case pi }
+ tokenRoot = 62; { square root symbol }
+ tokenSigma = 63; { capital sigma }
+ tokenIntegral = 64; { integral sign }
+ tokenMicro = 65;
+ tokenCapPi = 66; { capital pi }
+ tokenInfinity = 67;
+ tokenColon = 68;
+ tokenHash = 69; { e.g. # }
+ tokenDollar = 70;
+ tokenNoBreakSpace = 71; { non-breaking space }
+ tokenFraction = 72;
+ tokenIntlCurrency = 73;
+ tokenLeftSingGuillemet = 74;
+ tokenRightSingGuillemet = 75;
+ tokenPerThousand = 76;
+ tokenEllipsis = 77;
+ tokenCenterDot = 78;
+ tokenNil = 127;
+
+ delimPad = -2; { obsolete, misspelled token names kept for backward compatibility }
+ tokenTilda = 44;
+ tokenCarat = 55;
+
+ { Table selectors for GetItlTable }
+ smWordSelectTable = 0; { get word select break table from 'itl2' }
+ smWordWrapTable = 1; { get word wrap break table from 'itl2' }
+ smNumberPartsTable = 2; { get default number parts table from 'itl4' }
+ smUnTokenTable = 3; { get unToken table from 'itl4' }
+ smWhiteSpaceList = 4; { get white space list from 'itl4' }
+ iuWordSelectTable = 0; { <obsolete> get word select break table from 'itl2' }
+ iuWordWrapTable = 1; { <obsolete> get word wrap break table from 'itl2' }
+ iuNumberPartsTable = 2; { <obsolete> get default number parts table from 'itl4' }
+ iuUnTokenTable = 3; { <obsolete> get unToken table from 'itl4' }
+ iuWhiteSpaceList = 4; { <obsolete> get white space list from 'itl4' }
+
+ { end of stuff moved from Packages.h }
+ tokenOK = 0; { TokenResults }
+ tokenOverflow = 1; { TokenResults }
+ stringOverflow = 2; { TokenResults }
+ badDelim = 3; { TokenResults }
+ badEnding = 4; { TokenResults }
+ crash = 5; { TokenResults }
+
+
+type
+ TokenResults = SInt8;
+ CharByteTable = packed array [0..255] of char;
+ { "TokenType" was renamed to "ScriptTokenType" because of a name collisions }
+ ScriptTokenType = SInt16;
+{$ifc TARGET_OS_MAC}
+ TokenType = ScriptTokenType;
+{$endc} {TARGET_OS_MAC}
+
+ DelimType = array [0..1] of ScriptTokenType;
+ CommentType = array [0..3] of ScriptTokenType;
+ TokenRecPtr = ^TokenRec;
+ TokenRec = record
+ theToken: ScriptTokenType;
+ position: Ptr; { pointer into original source }
+ length: SInt32; { length of text in original source }
+ stringPosition: StringPtr; { Pascal/C string copy of identifier }
+ end;
+
+ TokenBlockPtr = ^TokenBlock;
+ TokenBlock = record
+ source: Ptr; { pointer to stream of characters }
+ sourceLength: SInt32; { length of source stream }
+ tokenList: Ptr; { pointer to array of tokens }
+ tokenLength: SInt32; { maximum length of TokenList }
+ tokenCount: SInt32; { number tokens generated by tokenizer }
+ stringList: Ptr; { pointer to stream of identifiers }
+ stringLength: SInt32; { length of string list }
+ stringCount: SInt32; { number of bytes currently used }
+ doString: boolean; { make strings & put into StringList }
+ doAppend: boolean; { append to TokenList rather than replace }
+ doAlphanumeric: boolean; { identifiers may include numeric }
+ doNest: boolean; { do comments nest? }
+ leftDelims: array [0..1] of ScriptTokenType;
+ rightDelims: array [0..1] of ScriptTokenType;
+ leftComment: array [0..3] of ScriptTokenType;
+ rightComment: array [0..3] of ScriptTokenType;
+ escapeCode: ScriptTokenType; { escape symbol code }
+ decimalCode: ScriptTokenType;
+ itlResource: Handle; { handle to itl4 resource of current script }
+ reserved: array [0..7] of SInt32; { must be zero! }
+ end;
+
+ {
+ * GetSysDirection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetSysDirection: SInt16; external name '_GetSysDirection';
+{
+ * SetSysDirection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetSysDirection(value: SInt16); external name '_SetSysDirection';
+{
+ * FontScript()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FontScript: SInt16; external name '_FontScript';
+{
+ * IntlScript()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IntlScript: SInt16; external name '_IntlScript';
+{
+ * FontToScript()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FontToScript(fontNumber: SInt16): SInt16; external name '_FontToScript';
+{
+ * GetScriptManagerVariable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetScriptManagerVariable(selector: SInt16): SInt32; external name '_GetScriptManagerVariable';
+{
+ * SetScriptManagerVariable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetScriptManagerVariable(selector: SInt16; param: SInt32): OSErr; external name '_SetScriptManagerVariable';
+{
+ * GetScriptVariable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetScriptVariable(script: SInt16; selector: SInt16): SInt32; external name '_GetScriptVariable';
+{
+ * SetScriptVariable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetScriptVariable(script: SInt16; selector: SInt16; param: SInt32): OSErr; external name '_SetScriptVariable';
+{
+ * CharacterByteType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CharacterByteType(textBuf: Ptr; textOffset: SInt16; script: ScriptCode): SInt16; external name '_CharacterByteType';
+{
+ * CharacterType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CharacterType(textBuf: Ptr; textOffset: SInt16; script: ScriptCode): SInt16; external name '_CharacterType';
+{
+ * TransliterateText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TransliterateText(srcHandle: Handle; dstHandle: Handle; target: SInt16; srcMask: SInt32; script: ScriptCode): OSErr; external name '_TransliterateText';
+{
+ * FillParseTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FillParseTable(var table: CharByteTable; script: ScriptCode): boolean; external name '_FillParseTable';
+{
+ * GetIntlResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIntlResource(theID: SInt16): Handle; external name '_GetIntlResource';
+{
+ * ClearIntlResourceCache()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure ClearIntlResourceCache; external name '_ClearIntlResourceCache';
+{
+ * GetIntlResourceTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetIntlResourceTable(script: ScriptCode; tableCode: SInt16; var itlHandle: Handle; var offset: SInt32; var length: SInt32); external name '_GetIntlResourceTable';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * GetScriptUtilityAddress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetScriptUtilityAddress(selector: SInt16; Before: boolean; script: ScriptCode): UniversalProcPtr; external name '_GetScriptUtilityAddress';
+{
+ * SetScriptUtilityAddress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure SetScriptUtilityAddress(selector: SInt16; Before: boolean; routineAddr: UniversalProcPtr; script: ScriptCode); external name '_SetScriptUtilityAddress';
+{
+ * GetScriptQDPatchAddress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetScriptQDPatchAddress(trapNum: SInt16; Before: boolean; forPrinting: boolean; script: ScriptCode): UniversalProcPtr; external name '_GetScriptQDPatchAddress';
+{
+ * SetScriptQDPatchAddress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure SetScriptQDPatchAddress(trapNum: SInt16; Before: boolean; forPrinting: boolean; routineAddr: UniversalProcPtr; script: ScriptCode); external name '_SetScriptQDPatchAddress';
+{
+ * SetIntlResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure SetIntlResource(refNum: SInt16; theID: SInt16; intlHandle: Handle); external name '_SetIntlResource';
+{
+ * CharByte()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CharByte(textBuf: Ptr; textOffset: SInt16): SInt16; external name '_CharByte';
+{
+ * CharType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CharType(textBuf: Ptr; textOffset: SInt16): SInt16; external name '_CharType';
+{
+ * Transliterate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Transliterate(srcHandle: Handle; dstHandle: Handle; target: SInt16; srcMask: SInt32): OSErr; external name '_Transliterate';
+{
+ * ParseTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ParseTable(var table: CharByteTable): boolean; external name '_ParseTable';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * IntlTokenize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IntlTokenize(tokenParam: TokenBlockPtr): TokenResults; external name '_IntlTokenize';
+{$ifc OLDROUTINENAMES}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * SetSysJust()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure SetSysJust(newDirection: SInt16); external name '_SetSysJust';
+{
+ * GetSysJust()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetSysJust: SInt16; external name '_GetSysJust';
+{
+ * Font2Script()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Font2Script(fontNumber: SInt16): SInt16; external name '_Font2Script';
+{
+ * GetEnvirons()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetEnvirons(selector: SInt16): SInt32; external name '_GetEnvirons';
+{
+ * SetEnvirons()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SetEnvirons(selector: SInt16; param: SInt32): OSErr; external name '_SetEnvirons';
+{
+ * GetScript()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetScript(script: SInt16; verb: SInt16): SInt32; external name '_GetScript';
+{
+ * SetScript()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SetScript(script: SInt16; verb: SInt16; param: SInt32): OSErr; external name '_SetScript';
+{
+ * IUGetIntl()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IUGetIntl(theID: SInt16): Handle; external name '_IUGetIntl';
+{
+ * IUSetIntl()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure IUSetIntl(refNum: SInt16; theID: SInt16; intlHandle: Handle); external name '_IUSetIntl';
+{
+ * IUClearCache()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure IUClearCache; external name '_IUClearCache';
+{
+ * IUGetItlTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure IUGetItlTable(script: ScriptCode; tableCode: SInt16; var itlHandle: Handle; var offset: SInt32; var length: SInt32); external name '_IUGetItlTable';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {OLDROUTINENAMES}
+
+
+{$ALIGN MAC68K}
+
+
+{unit SystemConfiguration}
+{
+ * 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,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES of MERCHANTABILITY,
+ * 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, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{!
+ @header SystemConfiguration.h
+ The SystemConfiguration framework provides access to the
+ data used to configure a running system. The APIs provided
+ by this framework communicate with the "configd" daemon.
+
+ The "configd" daemon manages a "dynamic store" reflecting the
+ desired configuration settings as well as the current state
+ of the system. The daemon provides a notification mechanism
+ for user-level processes which need to be aware of changes
+ made to the data. Lastly, the daemon loads a number of
+ bundles (or plug-ins) that monitor low-level kernel events
+ and, via a set of policy modules, keep the state data up
+ to date.
+ }
+
+{!
+ @enum
+ @discussion Returned status codes.
+
+ @constant kSCStatusOK Success
+ @constant kSCStatusFailed Non-specific Failure
+ @constant kSCStatusInvalidArgument Invalid argument
+ @constant kSCStatusAccessError Permission denied
+ @constant kSCStatusNoKey No such key
+ @constant kSCStatusKeyExists Data associated with key already defined
+ @constant kSCStatusLocked Lock already held
+ @constant kSCStatusNeedLock Lock required for this operation
+
+ @constant kSCStatusNoStoreSession Configuration daemon session not active
+ @constant kSCStatusNoStoreServer Configuration daemon not (no longer) available
+ @constant kSCStatusNotifierActive Notifier is currently active
+
+ @constant kSCStatusNoPrefsSession Preference session not active
+ @constant kSCStatusPrefsBusy Preferences update currently in progress
+ @constant kSCStatusNoConfigFile Configuration file not found
+ @constant kSCStatusNoLink No such link
+ @constant kSCStatusStale Write attempted on stale version of object
+ @constant kSCStatusMaxLink Maximum link count exceeded
+
+ @constant kSCStatusReachabilityUnknown
+ A determination could not be made regarding the reachability
+ of the specified nodename/address.
+}
+const
+ {
+ * Generic status codes
+ }
+ kSCStatusOK = 0; { Success }
+ kSCStatusFailed = 1001; { Non-specific failure }
+ kSCStatusInvalidArgument = 1002; { Invalid argument }
+ kSCStatusAccessError = 1003; { Permission denied
+ - must be root to obtain lock
+ - could not create access/create preferences
+ }
+ kSCStatusNoKey = 1004; { No such key }
+ kSCStatusKeyExists = 1005; { Key already defined }
+ kSCStatusLocked = 1006; { Lock already held }
+ kSCStatusNeedLock = 1007; { Lock required for this operation }
+ {
+ * SCDynamicStore status codes
+ }
+ kSCStatusNoStoreSession = 2001; { Configuration daemon session not active }
+ kSCStatusNoStoreServer = 2002; { Configuration daemon not (no longer) available }
+ kSCStatusNotifierActive = 2003; { Notifier is currently active }
+ {
+ * SCPreferences status codes
+ }
+ kSCStatusNoPrefsSession = 3001; { Preference session not active }
+ kSCStatusPrefsBusy = 3002; { Preferences update currently in progress }
+ kSCStatusNoConfigFile = 3003; { Configuration file not found }
+ kSCStatusNoLink = 3004; { No such link }
+ kSCStatusStale = 3005; { Write attempted on stale version of object }
+ kSCStatusMaxLink = 3006; { Maximum link count exceeded }
+ {
+ * SCNetwork status codes
+ }
+ kSCStatusReachabilityUnknown = 4001; { Network reachability cannot be determined }
+
+
+{!
+ @function SCError
+ @discussion Returns a last SystemConfiguration.framework API error code.
+ @result The last error encountered.
+ }
+function SCError: SInt32; external name '_SCError';
+
+{!
+ @function SCErrorString
+ @discussion Returns a pointer to the error message string associated
+ with the specified status.
+ @param status The SCDynamicStoreStatus to be returned.
+ @result The error message string.
+ }
+function SCErrorString( status: SInt32 ): ConstCStringPtr; external name '_SCErrorString';
+
+{unit TextCommon}
+{
+ File: TextCommon.p
+
+ Contains: TextEncoding-related types and constants, and prototypes for related functions
+
+ Version: Technology: Mac OS 9 / Carbon
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1995-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ TextEncodingBase type & values }
+{ (values 0-32 correspond to the Script Codes defined in Inside Macintosh: Text pages 6-52 and 6-53 }
+
+type
+ TextEncodingBase = UInt32;
+
+const
+ { Mac OS encodings }
+ kTextEncodingMacRoman = 0;
+ kTextEncodingMacJapanese = 1;
+ kTextEncodingMacChineseTrad = 2;
+ kTextEncodingMacKorean = 3;
+ kTextEncodingMacArabic = 4;
+ kTextEncodingMacHebrew = 5;
+ kTextEncodingMacGreek = 6;
+ kTextEncodingMacCyrillic = 7;
+ kTextEncodingMacDevanagari = 9;
+ kTextEncodingMacGurmukhi = 10;
+ kTextEncodingMacGujarati = 11;
+ kTextEncodingMacOriya = 12;
+ kTextEncodingMacBengali = 13;
+ kTextEncodingMacTamil = 14;
+ kTextEncodingMacTelugu = 15;
+ kTextEncodingMacKannada = 16;
+ kTextEncodingMacMalayalam = 17;
+ kTextEncodingMacSinhalese = 18;
+ kTextEncodingMacBurmese = 19;
+ kTextEncodingMacKhmer = 20;
+ kTextEncodingMacThai = 21;
+ kTextEncodingMacLaotian = 22;
+ kTextEncodingMacGeorgian = 23;
+ kTextEncodingMacArmenian = 24;
+ kTextEncodingMacChineseSimp = 25;
+ kTextEncodingMacTibetan = 26;
+ kTextEncodingMacMongolian = 27;
+ kTextEncodingMacEthiopic = 28;
+ kTextEncodingMacCentralEurRoman = 29;
+ kTextEncodingMacVietnamese = 30;
+ kTextEncodingMacExtArabic = 31; { The following use script code 0, smRoman }
+ kTextEncodingMacSymbol = 33;
+ kTextEncodingMacDingbats = 34;
+ kTextEncodingMacTurkish = 35;
+ kTextEncodingMacCroatian = 36;
+ kTextEncodingMacIcelandic = 37;
+ kTextEncodingMacRomanian = 38;
+ kTextEncodingMacCeltic = 39;
+ kTextEncodingMacGaelic = 40;
+ kTextEncodingMacKeyboardGlyphs = 41;
+
+ { The following are older names for backward compatibility }
+ kTextEncodingMacTradChinese = 2;
+ kTextEncodingMacRSymbol = 8;
+ kTextEncodingMacSimpChinese = 25;
+ kTextEncodingMacGeez = 28;
+ kTextEncodingMacEastEurRoman = 29;
+ kTextEncodingMacUninterp = 32;
+
+
+ {
+ Beginning in Mac OS 8.5, the following meta-value is used to indicate Unicode in some parts
+ of the Mac OS which previously only expected a Mac OS script code. In some of these places,
+ only 7 bits are available to indicate encoding (script code), so kTextEncodingUnicodeDefault
+ cannot be used. For example, kTextEncodingMacUnicode can be used to indicate Unicode in the
+ 7-bit script code field of a Unicode input method's ComponentDescription.componentFlags field;
+ it can also be used to indicate Unicode in the 16-bit script code field of an AppleEvent's
+ typeIntlWritingCode text tag.
+ }
+ kTextEncodingMacUnicode = $7E; { Meta-value, Unicode as a Mac encoding }
+
+ { Variant Mac OS encodings that use script codes other than 0 }
+ { The following use script code 4, smArabic }
+ kTextEncodingMacFarsi = $8C; { Like MacArabic but uses Farsi digits }
+ { The following use script code 7, smCyrillic }
+ kTextEncodingMacUkrainian = $98; { Meta-value in TEC 1.5 & later; maps to kTextEncodingMacCyrillic variant }
+ { The following use script code 28, smEthiopic }
+ kTextEncodingMacInuit = $EC; { The following use script code 32, smUnimplemented }
+ kTextEncodingMacVT100 = $FC; { VT100/102 font from Comm Toolbox: Latin-1 repertoire + box drawing etc }
+
+ { Special Mac OS encodings }
+ kTextEncodingMacHFS = $FF; { Meta-value, should never appear in a table. }
+
+ { Unicode & ISO UCS encodings begin at 0x100 }
+ kTextEncodingUnicodeDefault = $0100; { Meta-value, should never appear in a table. }
+ kTextEncodingUnicodeV1_1 = $0101;
+ kTextEncodingISO10646_1993 = $0101; { Code points identical to Unicode 1.1 }
+ kTextEncodingUnicodeV2_0 = $0103; { New location for Korean Hangul }
+ kTextEncodingUnicodeV2_1 = $0103; { We treat both Unicode 2.0 and Unicode 2.1 as 2.1 }
+ kTextEncodingUnicodeV3_0 = $0104;
+ kTextEncodingUnicodeV3_1 = $0105; { Adds characters requiring surrogate pairs in UTF-16 }
+ kTextEncodingUnicodeV3_2 = $0106;
+
+ { ISO 8-bit and 7-bit encodings begin at 0x200 }
+ kTextEncodingISOLatin1 = $0201; { ISO 8859-1 }
+ kTextEncodingISOLatin2 = $0202; { ISO 8859-2 }
+ kTextEncodingISOLatin3 = $0203; { ISO 8859-3 }
+ kTextEncodingISOLatin4 = $0204; { ISO 8859-4 }
+ kTextEncodingISOLatinCyrillic = $0205; { ISO 8859-5 }
+ kTextEncodingISOLatinArabic = $0206; { ISO 8859-6, = ASMO 708, =DOS CP 708 }
+ kTextEncodingISOLatinGreek = $0207; { ISO 8859-7 }
+ kTextEncodingISOLatinHebrew = $0208; { ISO 8859-8 }
+ kTextEncodingISOLatin5 = $0209; { ISO 8859-9 }
+ kTextEncodingISOLatin6 = $020A; { ISO 8859-10 }
+ kTextEncodingISOLatin7 = $020D; { ISO 8859-13, Baltic Rim }
+ kTextEncodingISOLatin8 = $020E; { ISO 8859-14, Celtic }
+ kTextEncodingISOLatin9 = $020F; { ISO 8859-15, 8859-1 changed for EURO & CP1252 letters }
+
+ { MS-DOS & Windows encodings begin at 0x400 }
+ kTextEncodingDOSLatinUS = $0400; { code page 437 }
+ kTextEncodingDOSGreek = $0405; { code page 737 (formerly code page 437G) }
+ kTextEncodingDOSBalticRim = $0406; { code page 775 }
+ kTextEncodingDOSLatin1 = $0410; { code page 850, "Multilingual" }
+ kTextEncodingDOSGreek1 = $0411; { code page 851 }
+ kTextEncodingDOSLatin2 = $0412; { code page 852, Slavic }
+ kTextEncodingDOSCyrillic = $0413; { code page 855, IBM Cyrillic }
+ kTextEncodingDOSTurkish = $0414; { code page 857, IBM Turkish }
+ kTextEncodingDOSPortuguese = $0415; { code page 860 }
+ kTextEncodingDOSIcelandic = $0416; { code page 861 }
+ kTextEncodingDOSHebrew = $0417; { code page 862 }
+ kTextEncodingDOSCanadianFrench = $0418; { code page 863 }
+ kTextEncodingDOSArabic = $0419; { code page 864 }
+ kTextEncodingDOSNordic = $041A; { code page 865 }
+ kTextEncodingDOSRussian = $041B; { code page 866 }
+ kTextEncodingDOSGreek2 = $041C; { code page 869, IBM Modern Greek }
+ kTextEncodingDOSThai = $041D; { code page 874, also for Windows }
+ kTextEncodingDOSJapanese = $0420; { code page 932, also for Windows; Shift-JIS with additions }
+ kTextEncodingDOSChineseSimplif = $0421; { code page 936, also for Windows; was EUC-CN, now GBK (EUC-CN extended) }
+ kTextEncodingDOSKorean = $0422; { code page 949, also for Windows; Unified Hangul Code (EUC-KR extended) }
+ kTextEncodingDOSChineseTrad = $0423; { code page 950, also for Windows; Big-5 }
+ kTextEncodingWindowsLatin1 = $0500; { code page 1252 }
+ kTextEncodingWindowsANSI = $0500; { code page 1252 (alternate name) }
+ kTextEncodingWindowsLatin2 = $0501; { code page 1250, Central Europe }
+ kTextEncodingWindowsCyrillic = $0502; { code page 1251, Slavic Cyrillic }
+ kTextEncodingWindowsGreek = $0503; { code page 1253 }
+ kTextEncodingWindowsLatin5 = $0504; { code page 1254, Turkish }
+ kTextEncodingWindowsHebrew = $0505; { code page 1255 }
+ kTextEncodingWindowsArabic = $0506; { code page 1256 }
+ kTextEncodingWindowsBalticRim = $0507; { code page 1257 }
+ kTextEncodingWindowsVietnamese = $0508; { code page 1258 }
+ kTextEncodingWindowsKoreanJohab = $0510; { code page 1361, for Windows NT }
+
+ { Various national standards begin at 0x600 }
+ kTextEncodingUS_ASCII = $0600;
+ kTextEncodingJIS_X0201_76 = $0620; { JIS Roman and 1-byte katakana (halfwidth) }
+ kTextEncodingJIS_X0208_83 = $0621;
+ kTextEncodingJIS_X0208_90 = $0622;
+ kTextEncodingJIS_X0212_90 = $0623;
+ kTextEncodingJIS_C6226_78 = $0624;
+ kTextEncodingShiftJIS_X0213_00 = $0628; { Shift-JIS format encoding of JIS X0213 planes 1 and 2 }
+ kTextEncodingGB_2312_80 = $0630;
+ kTextEncodingGBK_95 = $0631; { annex to GB 13000-93; for Windows 95; EUC-CN extended }
+ kTextEncodingGB_18030_2000 = $0632;
+ kTextEncodingKSC_5601_87 = $0640; { same as KSC 5601-92 without Johab annex }
+ kTextEncodingKSC_5601_92_Johab = $0641; { KSC 5601-92 Johab annex }
+ kTextEncodingCNS_11643_92_P1 = $0651; { CNS 11643-1992 plane 1 }
+ kTextEncodingCNS_11643_92_P2 = $0652; { CNS 11643-1992 plane 2 }
+ kTextEncodingCNS_11643_92_P3 = $0653; { CNS 11643-1992 plane 3 (was plane 14 in 1986 version) }
+
+ { ISO 2022 collections begin at 0x800 }
+ kTextEncodingISO_2022_JP = $0820; { RFC 1468 }
+ kTextEncodingISO_2022_JP_2 = $0821; { RFC 1554 }
+ kTextEncodingISO_2022_JP_1 = $0822; { RFC 2237 }
+ kTextEncodingISO_2022_JP_3 = $0823; { JIS X0213 }
+ kTextEncodingISO_2022_CN = $0830;
+ kTextEncodingISO_2022_CN_EXT = $0831;
+ kTextEncodingISO_2022_KR = $0840;
+
+ { EUC collections begin at 0x900 }
+ kTextEncodingEUC_JP = $0920; { ISO 646, 1-byte katakana, JIS 208, JIS 212 }
+ kTextEncodingEUC_CN = $0930; { ISO 646, GB 2312-80 }
+ kTextEncodingEUC_TW = $0931; { ISO 646, CNS 11643-1992 Planes 1-16 }
+ kTextEncodingEUC_KR = $0940; { ISO 646, KS C 5601-1987 }
+
+ { Misc standards begin at 0xA00 }
+ kTextEncodingShiftJIS = $0A01; { plain Shift-JIS }
+ kTextEncodingKOI8_R = $0A02; { Russian internet standard }
+ kTextEncodingBig5 = $0A03; { Big-5 (has variants) }
+ kTextEncodingMacRomanLatin1 = $0A04; { Mac OS Roman permuted to align with ISO Latin-1 }
+ kTextEncodingHZ_GB_2312 = $0A05; { HZ (RFC 1842, for Chinese mail & news) }
+ kTextEncodingBig5_HKSCS_1999 = $0A06; { Big-5 with Hong Kong special char set supplement }
+
+ { Other platform encodings }
+ kTextEncodingNextStepLatin = $0B01; { NextStep encoding }
+
+ { EBCDIC & IBM host encodings begin at 0xC00 }
+ kTextEncodingEBCDIC_US = $0C01; { basic EBCDIC-US }
+ kTextEncodingEBCDIC_CP037 = $0C02; { code page 037, extended EBCDIC (Latin-1 set) for US,Canada... }
+
+ { Special values }
+ kTextEncodingMultiRun = $0FFF; { Multi-encoding text with external run info }
+ kTextEncodingUnknown = $FFFF; { Unknown or unspecified }
+
+
+ { TextEncodingVariant type & values }
+
+type
+ TextEncodingVariant = UInt32;
+ { Default TextEncodingVariant, for any TextEncodingBase }
+
+const
+ kTextEncodingDefaultVariant = 0;
+
+ { Variants of kTextEncodingMacRoman }
+ kMacRomanDefaultVariant = 0; { meta value, maps to 1 or 2 depending on System }
+ kMacRomanCurrencySignVariant = 1; { Mac OS version < 8.5, 0xDB is CURRENCY SIGN }
+ kMacRomanEuroSignVariant = 2; { Mac OS version >= 8.5, 0xDB is EURO SIGN }
+
+ { Variants of kTextEncodingMacCyrillic (for TEC 1.5 and later) }
+ kMacCyrillicDefaultVariant = 0; { meta value, maps to 1, 2, or 3 depending on System }
+ kMacCyrillicCurrSignStdVariant = 1; { Mac OS < 9.0 (RU,BG), 0xFF = CURRENCY SIGN, 0xA2/0xB6 = CENT / PARTIAL DIFF. }
+ kMacCyrillicCurrSignUkrVariant = 2; { Mac OS < 9.0 (UA,LangKit), 0xFF = CURRENCY SIGN, 0xA2/0xB6 = GHE WITH UPTURN }
+ kMacCyrillicEuroSignVariant = 3; { Mac OS >= 9.0, 0xFF is EURO SIGN, 0xA2/0xB6 = GHE WITH UPTURN }
+
+ { Variants of kTextEncodingMacIcelandic }
+ kMacIcelandicStdDefaultVariant = 0; { meta value, maps to 2 or 4 depending on System }
+ kMacIcelandicTTDefaultVariant = 1; { meta value, maps to 3 or 5 depending on System }
+ { The following are for Mac OS version < 8.5, 0xDB is CURRENCY SIGN }
+ kMacIcelandicStdCurrSignVariant = 2; { 0xBB/0xBC are fem./masc. ordinal indicators }
+ kMacIcelandicTTCurrSignVariant = 3; { 0xBB/0xBC are fi/fl ligatures }
+ { The following are for Mac OS version >= 8.5, 0xDB is EURO SIGN }
+ kMacIcelandicStdEuroSignVariant = 4; { 0xBB/0xBC are fem./masc. ordinal indicators }
+ kMacIcelandicTTEuroSignVariant = 5; { 0xBB/0xBC are fi/fl ligatures }
+
+ { Variants of kTextEncodingMacCroatian }
+ kMacCroatianDefaultVariant = 0; { meta value, maps to 1 or 2 depending on System }
+ kMacCroatianCurrencySignVariant = 1; { Mac OS version < 8.5, 0xDB is CURRENCY SIGN }
+ kMacCroatianEuroSignVariant = 2; { Mac OS version >= 8.5, 0xDB is EURO SIGN }
+
+
+ { Variants of kTextEncodingMacRomanian }
+ kMacRomanianDefaultVariant = 0; { meta value, maps to 1 or 2 depending on System }
+ kMacRomanianCurrencySignVariant = 1; { Mac OS version < 8.5, 0xDB is CURRENCY SIGN }
+ kMacRomanianEuroSignVariant = 2; { Mac OS version >= 8.5, 0xDB is EURO SIGN }
+
+
+ { Variants of kTextEncodingMacJapanese }
+ kMacJapaneseStandardVariant = 0;
+ kMacJapaneseStdNoVerticalsVariant = 1;
+ kMacJapaneseBasicVariant = 2;
+ kMacJapanesePostScriptScrnVariant = 3;
+ kMacJapanesePostScriptPrintVariant = 4;
+ kMacJapaneseVertAtKuPlusTenVariant = 5;
+
+ { Variants of kTextEncodingMacArabic }
+ kMacArabicStandardVariant = 0; { 0xC0 is 8-spoke asterisk, 0x2A & 0xAA are asterisk (e.g. Cairo) }
+ kMacArabicTrueTypeVariant = 1; { 0xC0 is asterisk, 0x2A & 0xAA are multiply signs (e.g. Baghdad) }
+ kMacArabicThuluthVariant = 2; { 0xC0 is Arabic five-point star, 0x2A & 0xAA are multiply signs }
+ kMacArabicAlBayanVariant = 3; { 8-spoke asterisk, multiply sign, Koranic ligatures & parens }
+
+ { Variants of kTextEncodingMacFarsi }
+ kMacFarsiStandardVariant = 0; { 0xC0 is 8-spoke asterisk, 0x2A & 0xAA are asterisk (e.g. Tehran) }
+ kMacFarsiTrueTypeVariant = 1; { asterisk, multiply signs, Koranic ligatures, geometric shapes }
+
+ { Variants of kTextEncodingMacHebrew }
+ kMacHebrewStandardVariant = 0;
+ kMacHebrewFigureSpaceVariant = 1;
+
+ { Variants of kTextEncodingMacVT100 }
+ kMacVT100DefaultVariant = 0; { meta value, maps to 1 or 2 depending on System }
+ kMacVT100CurrencySignVariant = 1; { Mac OS version < 8.5, 0xDB is CURRENCY SIGN }
+ kMacVT100EuroSignVariant = 2; { Mac OS version >= 8.5, 0xDB is EURO SIGN }
+
+ { Variants of Unicode & ISO 10646 encodings }
+ kUnicodeNoSubset = 0;
+ kUnicodeCanonicalDecompVariant = 2; { canonical decomposition (NFD); excludes composed characters }
+ kUnicodeCanonicalCompVariant = 3; { canonical composition (NFC); uses the composed chars as of Unicode 3.1 }
+
+ { Variants of Big-5 encoding }
+ kBig5_BasicVariant = 0;
+ kBig5_StandardVariant = 1; { 0xC6A1-0xC7FC: kana, Cyrillic, enclosed numerics }
+ kBig5_ETenVariant = 2; { adds kana, Cyrillic, radicals, etc with hi bytes C6-C8,F9 }
+
+ { Variants of MacRomanLatin1 }
+ kMacRomanLatin1DefaultVariant = 0; { meta value, maps to others depending on System }
+ kMacRomanLatin1StandardVariant = 2; { permuted MacRoman, EuroSignVariant }
+ kMacRomanLatin1TurkishVariant = 6; { permuted MacTurkish }
+ kMacRomanLatin1CroatianVariant = 8; { permuted MacCroatian, EuroSignVariant }
+ kMacRomanLatin1IcelandicVariant = 11; { permuted MacIcelandic, StdEuroSignVariant }
+ kMacRomanLatin1RomanianVariant = 14; { permuted MacRomanian, EuroSignVariant }
+
+ { Unicode variants not yet supported (and not fully defined) }
+ kUnicodeNoCompatibilityVariant = 1;
+ kUnicodeNoCorporateVariant = 4;
+
+ { The following are older names for backward compatibility }
+ kMacRomanStandardVariant = 0;
+ kMacIcelandicStandardVariant = 0;
+ kMacIcelandicTrueTypeVariant = 1;
+ kJapaneseStandardVariant = 0;
+ kJapaneseStdNoVerticalsVariant = 1;
+ kJapaneseBasicVariant = 2;
+ kJapanesePostScriptScrnVariant = 3;
+ kJapanesePostScriptPrintVariant = 4;
+ kJapaneseVertAtKuPlusTenVariant = 5; { kJapaneseStdNoOneByteKanaVariant = 6, // replaced by kJapaneseNoOneByteKanaOption }
+ { kJapaneseBasicNoOneByteKanaVariant = 7, // replaced by kJapaneseNoOneByteKanaOption }
+ kHebrewStandardVariant = 0;
+ kHebrewFigureSpaceVariant = 1;
+ kUnicodeMaxDecomposedVariant = 2; { replaced by kUnicodeCanonicalDecompVariant }
+ kUnicodeNoComposedVariant = 3; { this really meant NoComposing; replaced by kUnicodeCanonicalCompVariant }
+ { The following Japanese variant options were never supported and are now deprecated. }
+ { In TEC 1.4 and later their functionality is replaced by the Unicode Converter options listed. }
+ kJapaneseNoOneByteKanaOption = $20; { replaced by UnicodeConverter option kUnicodeNoHalfwidthCharsBit }
+ kJapaneseUseAsciiBackslashOption = $40; { replaced by UnicodeConverter option kUnicodeForceASCIIRangeBit }
+
+ { TextEncodingFormat type & values }
+
+type
+ TextEncodingFormat = UInt32;
+
+const
+ { Default TextEncodingFormat for any TextEncodingBase }
+ kTextEncodingDefaultFormat = 0; { Formats for Unicode & ISO 10646 }
+ kUnicode16BitFormat = 0;
+ kUnicodeUTF7Format = 1;
+ kUnicodeUTF8Format = 2;
+ kUnicode32BitFormat = 3;
+
+ { TextEncoding type }
+
+type
+ TextEncoding = UInt32;
+ TextEncoding_fix = TextEncoding; { used as field type when a record declaration contains a TextEncoding field identifier }
+ TextEncodingPtr = ^TextEncoding; { when a VAR xx: TextEncoding parameter can be nil, it is changed to xx: TextEncodingPtr }
+ { name part selector for GetTextEncodingName }
+ TextEncodingNameSelector = UInt32;
+
+const
+ kTextEncodingFullName = 0;
+ kTextEncodingBaseName = 1;
+ kTextEncodingVariantName = 2;
+ kTextEncodingFormatName = 3;
+
+ { Types used in conversion }
+
+type
+ TextEncodingRunPtr = ^TextEncodingRun;
+ TextEncodingRun = record
+ offset: ByteOffset;
+ textEncoding: TextEncoding_fix;
+ end;
+
+ ConstTextEncodingRunPtr = ^TextEncodingRun;
+ ScriptCodeRunPtr = ^ScriptCodeRun;
+ ScriptCodeRun = record
+ offset: ByteOffset;
+ script: ScriptCode;
+ end;
+
+ ConstScriptCodeRunPtr = ^ScriptCodeRun;
+ TextPtr = ^UInt8;
+ ConstTextPtr = ^UInt8;
+ { Basic types for Unicode characters and strings: }
+ UniCharArrayPtr = ^UniChar;
+ ConstUniCharArrayPtr = ^UniChar;
+ {
+ UniCharArrayHandle is a handle type to correspond to UniCharArrayPtr,
+ i.e. a handle to an array of UniChars (UInt16s).
+ }
+ UniCharArrayHandle = ^UniCharArrayPtr;
+ {
+ UniCharArrayOffset is used to indicate an edge offset in an array
+ of UniChars (UInt16s).
+ }
+ UniCharArrayOffset = UInt32;
+ UniCharArrayOffsetPtr = ^UniCharArrayOffset;
+ { enums for TextEncoding Conversion routines }
+
+const
+ kTextScriptDontCare = -128;
+ kTextLanguageDontCare = -128;
+ kTextRegionDontCare = -128;
+
+ { struct for TECGetInfo }
+
+
+type
+ TECInfoPtr = ^TECInfo;
+ TECInfo = record
+ format: UInt16; { format code for this struct }
+ tecVersion: UInt16; { TEC version in BCD, e.g. 0x0121 for 1.2.1 }
+ tecTextConverterFeatures: UInt32; { bitmask indicating TEC features/fixes }
+ tecUnicodeConverterFeatures: UInt32; { bitmask indicating UnicodeConverter features/fixes }
+ tecTextCommonFeatures: UInt32; { bitmask indicating TextCommon features/fixes }
+ tecTextEncodingsFolderName: Str31; { localized name of Text Encodings folder (pascal string) }
+ tecExtensionFileName: Str31; { localized name of TEC extension (pascal string) }
+ tecLowestTEFileVersion: UInt16; { Lowest version (BCD) of all files in Text Encodings folder }
+ tecHighestTEFileVersion: UInt16; { Highest version (BCD) of all files in Text Encodings folder }
+ end;
+
+ TECInfoHandle = ^TECInfoPtr;
+ { Value for TECInfo format code }
+
+const
+ kTECInfoCurrentFormat = 2; { any future formats will just add fields at the end }
+
+ {
+ Defined feature/fix bits for tecUnicodeConverterFeatures field
+ Bit: Meaning if set:
+ ---- ---------------
+ kTECKeepInfoFixBit Unicode Converter no longer ignores other control flags if
+ kUnicodeKeepInfoBit is set. Bug fix in TEC Manager 1.2.1.
+ kTECFallbackTextLengthFixBit Unicode Converter honors the *srcConvLen and *destConvLen
+ returned by caller-supplied fallback handler for any status it
+ returns except for kTECUnmappableElementErr (previously it only
+ honored these values if noErr was returned). Bug fix in TEC
+ Manager 1.2.1.
+ kTECTextRunBitClearFixBit ConvertFromUnicodeToTextRun & ConvertFromUnicodeToScriptCodeRun
+ function correctly if the kUnicodeTextRunBit is set (previously
+ their determination of best target encoding was incorrect). Bug
+ fix in TEC Manager 1.3.
+ kTECTextToUnicodeScanFixBit ConvertFromTextToUnicode uses an improved scanner and maintains
+ some resulting state information, which it uses for mapping.
+ This has several effects:
+ - Improved mapping of 0x30-0x39 digits in Mac OS Arabic, fewer
+ direction overrides when mapping Mac OS Arabic & Hebrew, and
+ improved mapping of certain characters in Indic encodings.
+ - Malformed input produces kTextMalformedInputErr.
+ - ConvertFromTextToUnicode accepts and uses the control flags
+ kUnicodeKeepInfoMask and kUnicodeStringUnterminatedMask.
+ Bug fix and enhancement in TEC Manager 1.3.
+ kTECAddForceASCIIChangesBit Define new control flag bits kUnicodeForceASCIIRangeBit and
+ kUnicodeNoHalfwidthCharsBit for use with
+ ConvertFromTextToUnicode, ConvertFromUnicodeToText, etc.
+ Enhancement in TEC Manager 1.4.
+ kTECPreferredEncodingFixBit CreateUnicodeToTextRunInfo and related functions fix a problem
+ that occurred when a preferred encoding was specified that did
+ not match the System script; the preferred script was not
+ actually placed first in the ordered list of encodings to use.
+ Bug fix in TEC Manager 1.4.
+ kTECAddTextRunHeuristicsBit Define new control flag bit kUnicodeTextRunHeuristicsBit for
+ use with ConvertFromUnicodeToTextRun.
+ kTECAddFallbackInterruptBit Define new option kUnicodeFallbackInterruptSafeMask for use
+ with SetFallbackUnicodeToText. If a client fallback handler is
+ installed without specifying this bit, ConvertFromUnicodeToText
+ will HLock the tables it uses (in case the fallback handler
+ moves memory); otherwise, it won't.
+ }
+
+ kTECKeepInfoFixBit = 0;
+ kTECFallbackTextLengthFixBit = 1;
+ kTECTextRunBitClearFixBit = 2;
+ kTECTextToUnicodeScanFixBit = 3;
+ kTECAddForceASCIIChangesBit = 4;
+ kTECPreferredEncodingFixBit = 5;
+ kTECAddTextRunHeuristicsBit = 6;
+ kTECAddFallbackInterruptBit = 7;
+
+ kTECKeepInfoFixMask = $00000001;
+ kTECFallbackTextLengthFixMask = $00000002;
+ kTECTextRunBitClearFixMask = $00000004;
+ kTECTextToUnicodeScanFixMask = $00000008;
+ kTECAddForceASCIIChangesMask = $00000010;
+ kTECPreferredEncodingFixMask = $00000020;
+ kTECAddTextRunHeuristicsMask = $00000040;
+ kTECAddFallbackInterruptMask = $00000080;
+
+ {
+ -------------------------------------------------------------------------------------------------
+ CONSTANTS for common and special Unicode code values
+ -------------------------------------------------------------------------------------------------
+ }
+
+ kUnicodeByteOrderMark = $FEFF;
+ kUnicodeObjectReplacement = $FFFC; { placeholder for non-text object }
+ kUnicodeReplacementChar = $FFFD; { Unicode replacement for unconvertable input char }
+ kUnicodeSwappedByteOrderMark = $FFFE; { not a Unicode char; byte-swapped version of FEFF }
+ kUnicodeNotAChar = $FFFF; { not a Unicode char; may be used as a terminator }
+
+ {
+ -------------------------------------------------------------------------------------------------
+ CONSTANTS & DATA STRUCTURES for Unicode Properties
+ -------------------------------------------------------------------------------------------------
+ }
+
+type
+ UCCharPropertyType = SInt32;
+
+const
+ kUCCharPropTypeGenlCategory = 1; { requests enumeration value }
+ kUCCharPropTypeCombiningClass = 2; { requests numeric value 0..255 }
+ kUCCharPropTypeBidiCategory = 3; { requests enumeration value }
+
+
+type
+ UCCharPropertyValue = UInt32;
+ { General Category enumeration values (requested by kUCCharPropTypeGenlCategory) }
+
+const
+ { Normative categories: }
+ kUCGenlCatOtherNotAssigned = 0; { Cn Other, Not Assigned }
+ kUCGenlCatOtherControl = 1; { Cc Other, Control }
+ kUCGenlCatOtherFormat = 2; { Cf Other, Format }
+ kUCGenlCatOtherSurrogate = 3; { Cs Other, Surrogate }
+ kUCGenlCatOtherPrivateUse = 4; { Co Other, Private Use }
+ kUCGenlCatMarkNonSpacing = 5; { Mn Mark, Non-Spacing }
+ kUCGenlCatMarkSpacingCombining = 6; { Mc Mark, Spacing Combining }
+ kUCGenlCatMarkEnclosing = 7; { Me Mark, Enclosing }
+ kUCGenlCatNumberDecimalDigit = 8; { Nd Number, Decimal Digit }
+ kUCGenlCatNumberLetter = 9; { Nl Number, Letter }
+ kUCGenlCatNumberOther = 10; { No Number, Other }
+ kUCGenlCatSeparatorSpace = 11; { Zs Separator, Space }
+ kUCGenlCatSeparatorLine = 12; { Zl Separator, Line }
+ kUCGenlCatSeparatorParagraph = 13; { Zp Separator, Paragraph }
+ kUCGenlCatLetterUppercase = 14; { Lu Letter, Uppercase }
+ kUCGenlCatLetterLowercase = 15; { Ll Letter, Lowercase }
+ kUCGenlCatLetterTitlecase = 16; { Lt Letter, Titlecase }
+ { Informative categories: }
+ kUCGenlCatLetterModifier = 17; { Lm Letter, Modifier }
+ kUCGenlCatLetterOther = 18; { Lo Letter, Other }
+ kUCGenlCatPunctConnector = 20; { Pc Punctuation, Connector }
+ kUCGenlCatPunctDash = 21; { Pd Punctuation, Dash }
+ kUCGenlCatPunctOpen = 22; { Ps Punctuation, Open }
+ kUCGenlCatPunctClose = 23; { Pe Punctuation, Close }
+ kUCGenlCatPunctInitialQuote = 24; { Pi Punctuation, Initial quote }
+ kUCGenlCatPunctFinalQuote = 25; { Pf Punctuation, Final quote }
+ kUCGenlCatPunctOther = 26; { Po Punctuation, Other }
+ kUCGenlCatSymbolMath = 28; { Sm Symbol, Math }
+ kUCGenlCatSymbolCurrency = 29; { Sc Symbol, Currency }
+ kUCGenlCatSymbolModifier = 30; { Sk Symbol, Modifier }
+ kUCGenlCatSymbolOther = 31; { So Symbol, Other }
+
+ { Bidirectional Category enumeration values (requested by kUCCharPropTypeBidiCategory) }
+ kUCBidiCatNotApplicable = 0; { for now use this for unassigned }
+ { Strong types: }
+ kUCBidiCatLeftRight = 1; { L Left-to-Right }
+ kUCBidiCatRightLeft = 2; { R Right-to-Left }
+ { Weak types: }
+ kUCBidiCatEuroNumber = 3; { EN European Number }
+ kUCBidiCatEuroNumberSeparator = 4; { ES European Number Separator }
+ kUCBidiCatEuroNumberTerminator = 5; { ET European Number Terminator }
+ kUCBidiCatArabicNumber = 6; { AN Arabic Number }
+ kUCBidiCatCommonNumberSeparator = 7; { CS Common Number Separator }
+ { Separators: }
+ kUCBidiCatBlockSeparator = 8; { B Paragraph Separator (was Block Separator) }
+ kUCBidiCatSegmentSeparator = 9; { S Segment Separator }
+ { Neutrals: }
+ kUCBidiCatWhitespace = 10; { WS Whitespace }
+ kUCBidiCatOtherNeutral = 11; { ON Other Neutrals (unassigned codes could use this) }
+ { New categories for Unicode 3.0 }
+ kUCBidiCatRightLeftArabic = 12; { AL Right-to-Left Arabic (was Arabic Letter) }
+ kUCBidiCatLeftRightEmbedding = 13; { LRE Left-to-Right Embedding }
+ kUCBidiCatRightLeftEmbedding = 14; { RLE Right-to-Left Embedding }
+ kUCBidiCatLeftRightOverride = 15; { LRO Left-to-Right Override }
+ kUCBidiCatRightLeftOverride = 16; { RLO Right-to-Left Override }
+ kUCBidiCatPopDirectionalFormat = 17; { PDF Pop Directional Format }
+ kUCBidiCatNonSpacingMark = 18; { NSM Non-Spacing Mark }
+ kUCBidiCatBoundaryNeutral = 19; { BN Boundary Neutral }
+
+ {
+ -------------------------------------------------------------------------------------------------
+ Prototypes for TextEncoding functions
+ -------------------------------------------------------------------------------------------------
+ }
+
+
+ {
+ * CreateTextEncoding()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextCommon 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CreateTextEncoding(encodingBase: TextEncodingBase; encodingVariant: TextEncodingVariant; encodingFormat: TextEncodingFormat): TextEncoding; external name '_CreateTextEncoding';
+
+{
+ * GetTextEncodingBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextCommon 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetTextEncodingBase(encoding: TextEncoding): TextEncodingBase; external name '_GetTextEncodingBase';
+
+{
+ * GetTextEncodingVariant()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextCommon 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetTextEncodingVariant(encoding: TextEncoding): TextEncodingVariant; external name '_GetTextEncodingVariant';
+
+{
+ * GetTextEncodingFormat()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextCommon 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetTextEncodingFormat(encoding: TextEncoding): TextEncodingFormat; external name '_GetTextEncodingFormat';
+
+{
+ * ResolveDefaultTextEncoding()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextCommon 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ResolveDefaultTextEncoding(encoding: TextEncoding): TextEncoding; external name '_ResolveDefaultTextEncoding';
+
+{
+ * GetTextEncodingName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextCommon 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetTextEncodingName(iEncoding: TextEncoding; iNamePartSelector: TextEncodingNameSelector; iPreferredRegion: RegionCode; iPreferredEncoding: TextEncoding; iOutputBufLen: ByteCount; var oNameLength: ByteCount; oActualRegion: RegionCodePtr; oActualEncoding: TextEncodingPtr; oEncodingName: TextPtr): OSStatus; external name '_GetTextEncodingName';
+
+{
+ * TECGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextCommon 1.2.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECGetInfo(var tecInfo: TECInfoHandle): OSStatus; external name '_TECGetInfo';
+
+
+{
+ * UpgradeScriptInfoToTextEncoding()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextCommon 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UpgradeScriptInfoToTextEncoding(iTextScriptID: ScriptCode; iTextLanguageID: LangCode; iRegionID: RegionCode; iTextFontname: StringPtr; var oEncoding: TextEncoding): OSStatus; external name '_UpgradeScriptInfoToTextEncoding';
+
+{
+ * RevertTextEncodingToScriptInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextCommon 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RevertTextEncodingToScriptInfo(iEncoding: TextEncoding; var oTextScriptID: ScriptCode; oTextLanguageID: LangCodePtr; oTextFontname: StringPtr): OSStatus; external name '_RevertTextEncodingToScriptInfo';
+
+{
+ * NearestMacTextEncodings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextCommon 1.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NearestMacTextEncodings(generalEncoding: TextEncoding; var bestMacEncoding: TextEncoding; var alternateMacEncoding: TextEncoding): OSStatus; external name '_NearestMacTextEncodings';
+
+{
+ * UCGetCharProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextCommon 1.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UCGetCharProperty(charPtr: ConstUniCharPtr; textLength: UniCharCount; propType: UCCharPropertyType; var propValue: UCCharPropertyValue): OSStatus; external name '_UCGetCharProperty';
+
+{$ALIGN MAC68K}
+
+
+{unit TextEncodingConverter}
+{
+ File: TextEncodingConverter.p
+
+ Contains: Text Encoding Conversion Interfaces.
+
+ Version: Technology: Mac OS 9.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1994-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+ TECPluginSignature = OSType;
+ TECPluginVersion = UInt32;
+ { plugin signatures }
+
+const
+ kTECSignature = $656E6376 (* 'encv' *);
+ kTECUnicodePluginSignature = $70756E69 (* 'puni' *);
+ kTECJapanesePluginSignature = $706A706E (* 'pjpn' *);
+ kTECChinesePluginSignature = $707A686F (* 'pzho' *);
+ kTECKoreanPluginSignature = $706B6F72 (* 'pkor' *);
+
+
+ { converter object reference }
+
+type
+ TECObjectRef = ^SInt32; { an opaque 32-bit type }
+ TECObjectRefPtr = ^TECObjectRef; { when a var xx:TECObjectRef parameter can be nil, it is changed to xx: TECObjectRefPtr }
+ TECSnifferObjectRef = ^SInt32; { an opaque 32-bit type }
+ TECSnifferObjectRefPtr = ^TECSnifferObjectRef; { when a var xx:TECSnifferObjectRef parameter can be nil, it is changed to xx: TECSnifferObjectRefPtr }
+ TECPluginSig = OSType;
+ TECConversionInfoPtr = ^TECConversionInfo;
+ TECConversionInfo = record
+ sourceEncoding: TextEncoding;
+ destinationEncoding: TextEncoding;
+ reserved1: UInt16;
+ reserved2: UInt16;
+ end;
+
+ { return number of encodings types supported by user's configuraton of the encoding converter }
+ {
+ * TECCountAvailableTextEncodings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECCountAvailableTextEncodings(var numberEncodings: ItemCount): OSStatus; external name '_TECCountAvailableTextEncodings';
+
+{ fill in an array of type TextEncoding passed in by the user with types of encodings the current configuration of the encoder can handle. }
+{
+ * TECGetAvailableTextEncodings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECGetAvailableTextEncodings(availableEncodings: TextEncodingPtr; maxAvailableEncodings: ItemCount; var actualAvailableEncodings: ItemCount): OSStatus; external name '_TECGetAvailableTextEncodings';
+
+{ return number of from-to encoding conversion pairs supported }
+{
+ * TECCountDirectTextEncodingConversions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECCountDirectTextEncodingConversions(var numberOfEncodings: ItemCount): OSStatus; external name '_TECCountDirectTextEncodingConversions';
+
+{ fill in an array of type TextEncodingPair passed in by the user with types of encoding pairs the current configuration of the encoder can handle. }
+{
+ * TECGetDirectTextEncodingConversions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECGetDirectTextEncodingConversions(availableConversions: TECConversionInfoPtr; maxAvailableConversions: ItemCount; var actualAvailableConversions: ItemCount): OSStatus; external name '_TECGetDirectTextEncodingConversions';
+
+{ return number of encodings a given encoding can be converter into }
+{
+ * TECCountDestinationTextEncodings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECCountDestinationTextEncodings(inputEncoding: TextEncoding; var numberOfEncodings: ItemCount): OSStatus; external name '_TECCountDestinationTextEncodings';
+
+{ fill in an array of type TextEncodingPair passed in by the user with types of encodings pairs the current configuration of the encoder can handle. }
+{
+ * TECGetDestinationTextEncodings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECGetDestinationTextEncodings(inputEncoding: TextEncoding; destinationEncodings: TextEncodingPtr; maxDestinationEncodings: ItemCount; var actualDestinationEncodings: ItemCount): OSStatus; external name '_TECGetDestinationTextEncodings';
+
+{ get info about a text encoding }
+{
+ * TECGetTextEncodingInternetName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECGetTextEncodingInternetName(textEncoding_: TextEncoding; var encodingName: Str255): OSStatus; external name '_TECGetTextEncodingInternetName';
+
+{
+ * TECGetTextEncodingFromInternetName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECGetTextEncodingFromInternetName(var textEncoding_: TextEncoding; const (*var*) encodingName: Str255): OSStatus; external name '_TECGetTextEncodingFromInternetName';
+
+{ create/dispose converters }
+{
+ * TECCreateConverter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECCreateConverter(var newEncodingConverter: TECObjectRef; inputEncoding: TextEncoding; outputEncoding: TextEncoding): OSStatus; external name '_TECCreateConverter';
+
+{
+ * TECCreateConverterFromPath()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECCreateConverterFromPath(var newEncodingConverter: TECObjectRef; inPath: TextEncodingPtr; inEncodings: ItemCount): OSStatus; external name '_TECCreateConverterFromPath';
+
+{
+ * TECDisposeConverter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECDisposeConverter(newEncodingConverter: TECObjectRef): OSStatus; external name '_TECDisposeConverter';
+
+{ convert text encodings }
+{
+ * TECClearConverterContextInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECClearConverterContextInfo(encodingConverter: TECObjectRef): OSStatus; external name '_TECClearConverterContextInfo';
+
+{
+ * TECConvertText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECConvertText(encodingConverter: TECObjectRef; inputBuffer: ConstTextPtr; inputBufferLength: ByteCount; var actualInputLength: ByteCount; outputBuffer: TextPtr; outputBufferLength: ByteCount; var actualOutputLength: ByteCount): OSStatus; external name '_TECConvertText';
+
+{
+ * TECFlushText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECFlushText(encodingConverter: TECObjectRef; outputBuffer: TextPtr; outputBufferLength: ByteCount; var actualOutputLength: ByteCount): OSStatus; external name '_TECFlushText';
+
+{ one-to-many routines }
+{
+ * TECCountSubTextEncodings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECCountSubTextEncodings(inputEncoding: TextEncoding; var numberOfEncodings: ItemCount): OSStatus; external name '_TECCountSubTextEncodings';
+
+{
+ * TECGetSubTextEncodings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECGetSubTextEncodings(inputEncoding: TextEncoding; subEncodings: TextEncodingPtr; maxSubEncodings: ItemCount; var actualSubEncodings: ItemCount): OSStatus; external name '_TECGetSubTextEncodings';
+
+{
+ * TECGetEncodingList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECGetEncodingList(encodingConverter: TECObjectRef; var numEncodings: ItemCount; var encodingList: Handle): OSStatus; external name '_TECGetEncodingList';
+
+{
+ * TECCreateOneToManyConverter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECCreateOneToManyConverter(var newEncodingConverter: TECObjectRef; inputEncoding: TextEncoding; numOutputEncodings: ItemCount; outputEncodings: TextEncodingPtr): OSStatus; external name '_TECCreateOneToManyConverter';
+
+{
+ * TECConvertTextToMultipleEncodings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECConvertTextToMultipleEncodings(encodingConverter: TECObjectRef; inputBuffer: ConstTextPtr; inputBufferLength: ByteCount; var actualInputLength: ByteCount; outputBuffer: TextPtr; outputBufferLength: ByteCount; var actualOutputLength: ByteCount; var outEncodingsBuffer: TextEncodingRun; maxOutEncodingRuns: ItemCount; var actualOutEncodingRuns: ItemCount): OSStatus; external name '_TECConvertTextToMultipleEncodings';
+
+{
+ * TECFlushMultipleEncodings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECFlushMultipleEncodings(encodingConverter: TECObjectRef; outputBuffer: TextPtr; outputBufferLength: ByteCount; var actualOutputLength: ByteCount; var outEncodingsBuffer: TextEncodingRun; maxOutEncodingRuns: ItemCount; var actualOutEncodingRuns: ItemCount): OSStatus; external name '_TECFlushMultipleEncodings';
+
+{ international internet info }
+{
+ * TECCountWebTextEncodings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECCountWebTextEncodings(locale: RegionCode; var numberEncodings: ItemCount): OSStatus; external name '_TECCountWebTextEncodings';
+
+{
+ * TECGetWebTextEncodings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECGetWebTextEncodings(locale: RegionCode; availableEncodings: TextEncodingPtr; maxAvailableEncodings: ItemCount; var actualAvailableEncodings: ItemCount): OSStatus; external name '_TECGetWebTextEncodings';
+
+{
+ * TECCountMailTextEncodings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECCountMailTextEncodings(locale: RegionCode; var numberEncodings: ItemCount): OSStatus; external name '_TECCountMailTextEncodings';
+
+{
+ * TECGetMailTextEncodings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECGetMailTextEncodings(locale: RegionCode; availableEncodings: TextEncodingPtr; maxAvailableEncodings: ItemCount; var actualAvailableEncodings: ItemCount): OSStatus; external name '_TECGetMailTextEncodings';
+
+{ examine text encodings }
+{
+ * TECCountAvailableSniffers()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECCountAvailableSniffers(var numberOfEncodings: ItemCount): OSStatus; external name '_TECCountAvailableSniffers';
+
+{
+ * TECGetAvailableSniffers()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECGetAvailableSniffers(availableSniffers: TextEncodingPtr; maxAvailableSniffers: ItemCount; var actualAvailableSniffers: ItemCount): OSStatus; external name '_TECGetAvailableSniffers';
+
+{
+ * TECCreateSniffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECCreateSniffer(var encodingSniffer: TECSnifferObjectRef; testEncodings: TextEncodingPtr; numTextEncodings: ItemCount): OSStatus; external name '_TECCreateSniffer';
+
+{
+ * TECSniffTextEncoding()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECSniffTextEncoding(encodingSniffer: TECSnifferObjectRef; inputBuffer: TextPtr; inputBufferLength: ByteCount; testEncodings: TextEncodingPtr; numTextEncodings: ItemCount; var numErrsArray: ItemCount; maxErrs: ItemCount; var numFeaturesArray: ItemCount; maxFeatures: ItemCount): OSStatus; external name '_TECSniffTextEncoding';
+
+{
+ * TECDisposeSniffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECDisposeSniffer(encodingSniffer: TECSnifferObjectRef): OSStatus; external name '_TECDisposeSniffer';
+
+{
+ * TECClearSnifferContextInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TECClearSnifferContextInfo(encodingSniffer: TECSnifferObjectRef): OSStatus; external name '_TECClearSnifferContextInfo';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * TECSetBasicOptions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in TextEncodingConverter 1.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function TECSetBasicOptions(encodingConverter: TECObjectRef; controlFlags: OptionBits): OSStatus; external name '_TECSetBasicOptions';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+{$ALIGN MAC68K}
+
+
+{unit TextEncodingPlugin}
+{
+ File: TextEncodingPlugin.p
+
+ Contains: Required interface for Text Encoding Converter-Plugins
+
+ Version: Technology: Mac OS 8
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1996-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+ ####################################################################################
+ Constants
+ ####################################################################################
+}
+{
+ ####################################################################################
+ Structs
+ ####################################################################################
+}
+
+type
+ TECBufferContextRecPtr = ^TECBufferContextRec;
+ TECBufferContextRec = record
+ textInputBuffer: TextPtr;
+ textInputBufferEnd: TextPtr;
+ textOutputBuffer: TextPtr;
+ textOutputBufferEnd: TextPtr;
+ encodingInputBuffer: TextEncodingRunPtr;
+ encodingInputBufferEnd: TextEncodingRunPtr;
+ encodingOutputBuffer: TextEncodingRunPtr;
+ encodingOutputBufferEnd: TextEncodingRunPtr;
+ end;
+
+ TECPluginStateRecPtr = ^TECPluginStateRec;
+ TECPluginStateRec = record
+ state1: SInt8;
+ state2: SInt8;
+ state3: SInt8;
+ state4: SInt8;
+ longState1: UInt32;
+ longState2: UInt32;
+ longState3: UInt32;
+ longState4: UInt32;
+ end;
+
+ TECConverterContextRecPtr = ^TECConverterContextRec;
+ TECConverterContextRec = record
+ { public - manipulated externally and by plugin }
+ pluginRec: Ptr;
+ sourceEncoding: TextEncoding;
+ destEncoding: TextEncoding;
+ reserved1: UInt32;
+ reserved2: UInt32;
+ bufferContext: TECBufferContextRec;
+ { private - manipulated only within Plugin }
+ contextRefCon: UInt32;
+ conversionProc: ProcPtr;
+ flushProc: ProcPtr;
+ clearContextInfoProc: ProcPtr;
+ options1: UInt32;
+ options2: UInt32;
+ pluginState: TECPluginStateRec;
+ end;
+
+ TECSnifferContextRecPtr = ^TECSnifferContextRec;
+ TECSnifferContextRec = record
+ { public - manipulated externally }
+ pluginRec: Ptr;
+ encoding: TextEncoding;
+ maxErrors: ItemCount;
+ maxFeatures: ItemCount;
+ textInputBuffer: TextPtr;
+ textInputBufferEnd: TextPtr;
+ numFeatures: ItemCount;
+ numErrors: ItemCount;
+ { private - manipulated only within Plugin }
+ contextRefCon: UInt32;
+ sniffProc: ProcPtr;
+ clearContextInfoProc: ProcPtr;
+ pluginState: TECPluginStateRec;
+ end;
+
+ {
+ ####################################################################################
+ Functional Messages
+ ####################################################################################
+ }
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginNewEncodingConverterPtr = function(var newEncodingConverter: TECObjectRef; var plugContext: TECConverterContextRec; inputEncoding: TextEncoding; outputEncoding: TextEncoding): OSStatus;
+{$elsec}
+ TECPluginNewEncodingConverterPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginClearContextInfoPtr = function(encodingConverter: TECObjectRef; var plugContext: TECConverterContextRec): OSStatus;
+{$elsec}
+ TECPluginClearContextInfoPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginConvertTextEncodingPtr = function(encodingConverter: TECObjectRef; var plugContext: TECConverterContextRec): OSStatus;
+{$elsec}
+ TECPluginConvertTextEncodingPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginFlushConversionPtr = function(encodingConverter: TECObjectRef; var plugContext: TECConverterContextRec): OSStatus;
+{$elsec}
+ TECPluginFlushConversionPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginDisposeEncodingConverterPtr = function(newEncodingConverter: TECObjectRef; var plugContext: TECConverterContextRec): OSStatus;
+{$elsec}
+ TECPluginDisposeEncodingConverterPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginNewEncodingSnifferPtr = function(var encodingSniffer: TECSnifferObjectRef; var snifContext: TECSnifferContextRec; inputEncoding: TextEncoding): OSStatus;
+{$elsec}
+ TECPluginNewEncodingSnifferPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginClearSnifferContextInfoPtr = function(encodingSniffer: TECSnifferObjectRef; var snifContext: TECSnifferContextRec): OSStatus;
+{$elsec}
+ TECPluginClearSnifferContextInfoPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginSniffTextEncodingPtr = function(encodingSniffer: TECSnifferObjectRef; var snifContext: TECSnifferContextRec): OSStatus;
+{$elsec}
+ TECPluginSniffTextEncodingPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginDisposeEncodingSnifferPtr = function(encodingSniffer: TECSnifferObjectRef; var snifContext: TECSnifferContextRec): OSStatus;
+{$elsec}
+ TECPluginDisposeEncodingSnifferPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginGetCountAvailableTextEncodingsPtr = function(availableEncodings: TextEncodingPtr; maxAvailableEncodings: ItemCount; var actualAvailableEncodings: ItemCount): OSStatus;
+{$elsec}
+ TECPluginGetCountAvailableTextEncodingsPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginGetCountAvailableTextEncodingPairsPtr = function(availableEncodings: TECConversionInfoPtr; maxAvailableEncodings: ItemCount; var actualAvailableEncodings: ItemCount): OSStatus;
+{$elsec}
+ TECPluginGetCountAvailableTextEncodingPairsPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginGetCountDestinationTextEncodingsPtr = function(inputEncoding: TextEncoding; destinationEncodings: TextEncodingPtr; maxDestinationEncodings: ItemCount; var actualDestinationEncodings: ItemCount): OSStatus;
+{$elsec}
+ TECPluginGetCountDestinationTextEncodingsPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginGetCountSubTextEncodingsPtr = function(inputEncoding: TextEncoding; subEncodings: TextEncodingPtr; maxSubEncodings: ItemCount; var actualSubEncodings: ItemCount): OSStatus;
+{$elsec}
+ TECPluginGetCountSubTextEncodingsPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginGetCountAvailableSniffersPtr = function(availableEncodings: TextEncodingPtr; maxAvailableEncodings: ItemCount; var actualAvailableEncodings: ItemCount): OSStatus;
+{$elsec}
+ TECPluginGetCountAvailableSniffersPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginGetTextEncodingInternetNamePtr = function(textEncoding_: TextEncoding; var encodingName: Str255): OSStatus;
+{$elsec}
+ TECPluginGetTextEncodingInternetNamePtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginGetTextEncodingFromInternetNamePtr = function(var textEncoding_: TextEncoding; encodingName: Str255): OSStatus;
+{$elsec}
+ TECPluginGetTextEncodingFromInternetNamePtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginGetCountWebEncodingsPtr = function(availableEncodings: TextEncodingPtr; maxAvailableEncodings: ItemCount; var actualAvailableEncodings: ItemCount): OSStatus;
+{$elsec}
+ TECPluginGetCountWebEncodingsPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TECPluginGetCountMailEncodingsPtr = function(availableEncodings: TextEncodingPtr; maxAvailableEncodings: ItemCount; var actualAvailableEncodings: ItemCount): OSStatus;
+{$elsec}
+ TECPluginGetCountMailEncodingsPtr = ProcPtr;
+{$endc}
+
+ {
+ ####################################################################################
+ Dispatch Table Definition
+ ####################################################################################
+ }
+
+
+const
+ kTECPluginDispatchTableVersion1 = $00010000; { 1.0 through 1.0.3 releases }
+ kTECPluginDispatchTableVersion1_1 = $00010001; { 1.1 releases }
+ kTECPluginDispatchTableVersion1_2 = $00010002; { 1.2 releases }
+ kTECPluginDispatchTableCurrentVersion = $00010002;
+
+
+type
+ TECPluginDispatchTablePtr = ^TECPluginDispatchTable;
+ TECPluginDispatchTable = record
+ version: TECPluginVersion;
+ compatibleVersion: TECPluginVersion;
+ PluginID: TECPluginSignature;
+ PluginNewEncodingConverter: TECPluginNewEncodingConverterPtr;
+ PluginClearContextInfo: TECPluginClearContextInfoPtr;
+ PluginConvertTextEncoding: TECPluginConvertTextEncodingPtr;
+ PluginFlushConversion: TECPluginFlushConversionPtr;
+ PluginDisposeEncodingConverter: TECPluginDisposeEncodingConverterPtr;
+ PluginNewEncodingSniffer: TECPluginNewEncodingSnifferPtr;
+ PluginClearSnifferContextInfo: TECPluginClearSnifferContextInfoPtr;
+ PluginSniffTextEncoding: TECPluginSniffTextEncodingPtr;
+ PluginDisposeEncodingSniffer: TECPluginDisposeEncodingSnifferPtr;
+ PluginGetCountAvailableTextEncodings: TECPluginGetCountAvailableTextEncodingsPtr;
+ PluginGetCountAvailableTextEncodingPairs: TECPluginGetCountAvailableTextEncodingPairsPtr;
+ PluginGetCountDestinationTextEncodings: TECPluginGetCountDestinationTextEncodingsPtr;
+ PluginGetCountSubTextEncodings: TECPluginGetCountSubTextEncodingsPtr;
+ PluginGetCountAvailableSniffers: TECPluginGetCountAvailableSniffersPtr;
+ PluginGetCountWebTextEncodings: TECPluginGetCountWebEncodingsPtr;
+ PluginGetCountMailTextEncodings: TECPluginGetCountMailEncodingsPtr;
+ PluginGetTextEncodingInternetName: TECPluginGetTextEncodingInternetNamePtr;
+ PluginGetTextEncodingFromInternetName: TECPluginGetTextEncodingFromInternetNamePtr;
+ end;
+
+
+{$ALIGN MAC68K}
+
+
+{unit Threads}
+{
+ File: CarbonCore/Threads.h
+
+ Contains: Thread Manager Interfaces.
+
+ Version: CarbonCore-654.0.85~1
+
+ Copyright: © 1991-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ Thread states}
+type
+ ThreadState = UInt16;
+const
+ kReadyThreadState = 0;
+ kStoppedThreadState = 1;
+ kRunningThreadState = 2;
+
+{ Error codes have been moved to Errors.(pah)}
+
+{ Thread environment characteristics}
+type
+ ThreadTaskRef = UnivPtr;
+{ Thread characteristics}
+type
+ ThreadStyle = UInt32;
+const
+ kCooperativeThread = 1 shl 0;
+ kPreemptiveThread = 1 shl 1;
+
+{ Thread identifiers}
+type
+ ThreadID = UInt32;
+const
+ kNoThreadID = 0;
+ kCurrentThreadID = 1;
+ kApplicationThreadID = 2;
+
+{ Options when creating a thread}
+type
+ ThreadOptions = UInt32;
+const
+ kNewSuspend = 1 shl 0;
+ kUsePremadeThread = 1 shl 1;
+ kCreateIfNeeded = 1 shl 2;
+ kFPUNotNeeded = 1 shl 3;
+ kExactMatchThread = 1 shl 4;
+
+{ Information supplied to the custom scheduler}
+type
+ SchedulerInfoRec = record
+ InfoRecSize: UInt32;
+ CurrentThreadID: ThreadID;
+ SuggestedThreadID: ThreadID;
+ InterruptedCoopThreadID: ThreadID;
+ end;
+ SchedulerInfoRecPtr = ^SchedulerInfoRec;
+
+{
+ The following ProcPtrs cannot be interchanged with UniversalProcPtrs because
+ of differences between 680x0 and PowerPC runtime architectures with regard to
+ the implementation of the Thread Manager.
+ }
+type
+ voidPtr = Ptr;
+{ Prototype for thread's entry (main) routine}
+type
+ ThreadEntryProcPtr = function( threadParam: UnivPtr ): voidPtr;
+{ Prototype for custom thread scheduler routine}
+type
+ ThreadSchedulerProcPtr = function( schedulerInfo: SchedulerInfoRecPtr ): ThreadID;
+{ Prototype for custom thread switcher routine}
+type
+ ThreadSwitchProcPtr = procedure( threadBeingSwitched: ThreadID; switchProcParam: UnivPtr );
+{ Prototype for thread termination notification routine}
+type
+ ThreadTerminationProcPtr = procedure( threadTerminated: ThreadID; terminationProcParam: UnivPtr );
+{ Prototype for debugger NewThread notification}
+type
+ DebuggerNewThreadProcPtr = procedure( threadCreated: ThreadID );
+{ Prototype for debugger DisposeThread notification}
+type
+ DebuggerDisposeThreadProcPtr = procedure( threadDeleted: ThreadID );
+{ Prototype for debugger schedule notification}
+type
+ DebuggerThreadSchedulerProcPtr = function( schedulerInfo: SchedulerInfoRecPtr ): ThreadID;
+type
+ ThreadEntryUPP = ThreadEntryProcPtr;
+ ThreadSchedulerUPP = ThreadSchedulerProcPtr;
+ ThreadSwitchUPP = ThreadSwitchProcPtr;
+ ThreadTerminationUPP = ThreadTerminationProcPtr;
+ DebuggerNewThreadUPP = DebuggerNewThreadProcPtr;
+ DebuggerDisposeThreadUPP = DebuggerDisposeThreadProcPtr;
+ DebuggerThreadSchedulerUPP = DebuggerThreadSchedulerProcPtr;
+{
+ * NewThreadEntryUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewThreadEntryUPP( userRoutine: ThreadEntryProcPtr ): ThreadEntryUPP; external name '_NewThreadEntryUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewThreadSchedulerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewThreadSchedulerUPP( userRoutine: ThreadSchedulerProcPtr ): ThreadSchedulerUPP; external name '_NewThreadSchedulerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewThreadSwitchUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewThreadSwitchUPP( userRoutine: ThreadSwitchProcPtr ): ThreadSwitchUPP; external name '_NewThreadSwitchUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewThreadTerminationUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewThreadTerminationUPP( userRoutine: ThreadTerminationProcPtr ): ThreadTerminationUPP; external name '_NewThreadTerminationUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDebuggerNewThreadUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewDebuggerNewThreadUPP( userRoutine: DebuggerNewThreadProcPtr ): DebuggerNewThreadUPP; external name '_NewDebuggerNewThreadUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDebuggerDisposeThreadUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewDebuggerDisposeThreadUPP( userRoutine: DebuggerDisposeThreadProcPtr ): DebuggerDisposeThreadUPP; external name '_NewDebuggerDisposeThreadUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDebuggerThreadSchedulerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewDebuggerThreadSchedulerUPP( userRoutine: DebuggerThreadSchedulerProcPtr ): DebuggerThreadSchedulerUPP; external name '_NewDebuggerThreadSchedulerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeThreadEntryUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeThreadEntryUPP( userUPP: ThreadEntryUPP ); external name '_DisposeThreadEntryUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeThreadSchedulerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeThreadSchedulerUPP( userUPP: ThreadSchedulerUPP ); external name '_DisposeThreadSchedulerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeThreadSwitchUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeThreadSwitchUPP( userUPP: ThreadSwitchUPP ); external name '_DisposeThreadSwitchUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeThreadTerminationUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeThreadTerminationUPP( userUPP: ThreadTerminationUPP ); external name '_DisposeThreadTerminationUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDebuggerNewThreadUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeDebuggerNewThreadUPP( userUPP: DebuggerNewThreadUPP ); external name '_DisposeDebuggerNewThreadUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDebuggerDisposeThreadUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeDebuggerDisposeThreadUPP( userUPP: DebuggerDisposeThreadUPP ); external name '_DisposeDebuggerDisposeThreadUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDebuggerThreadSchedulerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeDebuggerThreadSchedulerUPP( userUPP: DebuggerThreadSchedulerUPP ); external name '_DisposeDebuggerThreadSchedulerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeThreadEntryUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeThreadEntryUPP( threadParam: UnivPtr; userUPP: ThreadEntryUPP ): voidPtr; external name '_InvokeThreadEntryUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeThreadSchedulerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeThreadSchedulerUPP( schedulerInfo: SchedulerInfoRecPtr; userUPP: ThreadSchedulerUPP ): ThreadID; external name '_InvokeThreadSchedulerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeThreadSwitchUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeThreadSwitchUPP( threadBeingSwitched: ThreadID; switchProcParam: UnivPtr; userUPP: ThreadSwitchUPP ); external name '_InvokeThreadSwitchUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeThreadTerminationUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeThreadTerminationUPP( threadTerminated: ThreadID; terminationProcParam: UnivPtr; userUPP: ThreadTerminationUPP ); external name '_InvokeThreadTerminationUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDebuggerNewThreadUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeDebuggerNewThreadUPP( threadCreated: ThreadID; userUPP: DebuggerNewThreadUPP ); external name '_InvokeDebuggerNewThreadUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDebuggerDisposeThreadUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeDebuggerDisposeThreadUPP( threadDeleted: ThreadID; userUPP: DebuggerDisposeThreadUPP ); external name '_InvokeDebuggerDisposeThreadUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDebuggerThreadSchedulerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeDebuggerThreadSchedulerUPP( schedulerInfo: SchedulerInfoRecPtr; userUPP: DebuggerThreadSchedulerUPP ): ThreadID; external name '_InvokeDebuggerThreadSchedulerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ Thread Manager function pointers (TPP):
+ on classic 68k use raw function pointers (same as UPP's)
+ on classic PowerPC, use raw function pointers
+ on classic PowerPC with OPAQUE_UPP_TYPES=1, use UPP's
+ on CFM-68K, use UPP's
+ on Carbon, use UPP's
+}
+
+{ use UPP's}
+type
+ ThreadEntryTPP = ThreadEntryUPP;
+ ThreadSchedulerTPP = ThreadSchedulerUPP;
+ ThreadSwitchTPP = ThreadSwitchUPP;
+ ThreadTerminationTPP = ThreadTerminationUPP;
+ DebuggerNewThreadTPP = DebuggerNewThreadUPP;
+ DebuggerDisposeThreadTPP = DebuggerDisposeThreadUPP;
+ DebuggerThreadSchedulerTPP = DebuggerThreadSchedulerUPP;
+{
+ * NewThread()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function NewThread( threadStyle_: ThreadStyle; threadEntry: ThreadEntryTPP; threadParam: UnivPtr; stackSize: Size; options: ThreadOptions; threadResult: UnivPtrPtr { can be NULL }; var threadMade: ThreadID ): OSErr; external name '_NewThread';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetThreadScheduler()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function SetThreadScheduler( threadScheduler: ThreadSchedulerTPP ): OSErr; external name '_SetThreadScheduler';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetThreadSwitcher()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function SetThreadSwitcher( thread: ThreadID; threadSwitcher: ThreadSwitchTPP; switchProcParam: UnivPtr; inOrOut: Boolean ): OSErr; external name '_SetThreadSwitcher';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetThreadTerminator()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function SetThreadTerminator( thread: ThreadID; threadTerminator: ThreadTerminationTPP; terminationProcParam: UnivPtr ): OSErr; external name '_SetThreadTerminator';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDebuggerNotificationProcs()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function SetDebuggerNotificationProcs( notifyNewThread: DebuggerNewThreadTPP; notifyDisposeThread: DebuggerDisposeThreadTPP; notifyThreadScheduler: DebuggerThreadSchedulerTPP ): OSErr; external name '_SetDebuggerNotificationProcs';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CreateThreadPool()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function CreateThreadPool( threadStyle_: ThreadStyle; numToCreate: SInt16; stackSize: Size ): OSErr; external name '_CreateThreadPool';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetFreeThreadCount() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function GetFreeThreadCount( threadStyle_: ThreadStyle; var freeCount: SInt16 ): OSErr; external name '_GetFreeThreadCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * GetSpecificFreeThreadCount() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function GetSpecificFreeThreadCount( threadStyle_: ThreadStyle; stackSize: Size; var freeCount: SInt16 ): OSErr; external name '_GetSpecificFreeThreadCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * GetDefaultThreadStackSize()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function GetDefaultThreadStackSize( threadStyle_: ThreadStyle; var stackSize: Size ): OSErr; external name '_GetDefaultThreadStackSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ThreadCurrentStackSpace()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function ThreadCurrentStackSpace( thread: ThreadID; var freeStack: UInt32 ): OSErr; external name '_ThreadCurrentStackSpace';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DisposeThread()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function DisposeThread( threadToDump: ThreadID; threadResult: UnivPtr; recycleThread: Boolean ): OSErr; external name '_DisposeThread';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * YieldToThread()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function YieldToThread( suggestedThread: ThreadID ): OSErr; external name '_YieldToThread';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * YieldToAnyThread()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function YieldToAnyThread: OSErr; external name '_YieldToAnyThread';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * [Mac]GetCurrentThread()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function GetCurrentThread( var currentThreadID: ThreadID ): OSErr; external name '_GetCurrentThread';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+function MacGetCurrentThread( var currentThreadID: ThreadID ): OSErr; external name '_GetCurrentThread';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThreadState()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function GetThreadState( threadToGet: ThreadID; var threadState_: ThreadState ): OSErr; external name '_GetThreadState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetThreadState()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function SetThreadState( threadToSet: ThreadID; newState: ThreadState; suggestedThread: ThreadID ): OSErr; external name '_SetThreadState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetThreadStateEndCritical()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function SetThreadStateEndCritical( threadToSet: ThreadID; newState: ThreadState; suggestedThread: ThreadID ): OSErr; external name '_SetThreadStateEndCritical';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ThreadBeginCritical()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function ThreadBeginCritical: OSErr; external name '_ThreadBeginCritical';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ThreadEndCritical()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function ThreadEndCritical: OSErr; external name '_ThreadEndCritical';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThreadCurrentTaskRef()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function GetThreadCurrentTaskRef( var threadTRef: ThreadTaskRef ): OSErr; external name '_GetThreadCurrentTaskRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThreadStateGivenTaskRef()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function GetThreadStateGivenTaskRef( threadTRef: ThreadTaskRef; threadToGet: ThreadID; var threadState_: ThreadState ): OSErr; external name '_GetThreadStateGivenTaskRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetThreadReadyGivenTaskRef()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ThreadsLib 1.0 and later
+ }
+function SetThreadReadyGivenTaskRef( threadTRef: ThreadTaskRef; threadToSet: ThreadID ): OSErr; external name '_SetThreadReadyGivenTaskRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+
+
+{unit UTCUtils}
+{
+ File: UTCUtils.p
+
+ Contains: Interface for UTC to Local Time conversion and 64 Bit Clock routines
+
+ Version: Technology: Mac OS 9
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1999-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ Options for Set & Get DateTime Routines }
+
+const
+ kUTCDefaultOptions = 0;
+
+ { 64 Bit Clock Typedefs }
+
+type
+ UTCDateTimePtr = ^UTCDateTime;
+ UTCDateTime = record
+ highSeconds: UInt16;
+ lowSeconds: UInt32;
+ fraction: UInt16;
+ end;
+
+ UTCDateTimeHandle = ^UTCDateTimePtr;
+ LocalDateTimePtr = ^LocalDateTime;
+ LocalDateTime = record
+ highSeconds: UInt16;
+ lowSeconds: UInt32;
+ fraction: UInt16;
+ end;
+
+ LocalDateTimeHandle = ^LocalDateTimePtr;
+ { Classic 32 bit clock conversion routines }
+ {
+ * ConvertLocalTimeToUTC()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ConvertLocalTimeToUTC(localSeconds: UInt32; var utcSeconds: UInt32): OSStatus; external name '_ConvertLocalTimeToUTC';
+
+{
+ * ConvertUTCToLocalTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ConvertUTCToLocalTime(utcSeconds: UInt32; var localSeconds: UInt32): OSStatus; external name '_ConvertUTCToLocalTime';
+
+{ 64 bit clock conversion routines }
+{
+ * ConvertUTCToLocalDateTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ConvertUTCToLocalDateTime(const (*var*) utcDateTime_: UTCDateTime; var localDateTime_: LocalDateTime): OSStatus; external name '_ConvertUTCToLocalDateTime';
+
+{
+ * ConvertLocalToUTCDateTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ConvertLocalToUTCDateTime(const (*var*) localDateTime_: LocalDateTime; var utcDateTime_: UTCDateTime): OSStatus; external name '_ConvertLocalToUTCDateTime';
+
+{ Getter and Setter Clock routines using 64 Bit values }
+{
+ * GetUTCDateTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetUTCDateTime(var utcDateTime_: UTCDateTime; options: OptionBits): OSStatus; external name '_GetUTCDateTime';
+
+{
+ * SetUTCDateTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetUTCDateTime(const (*var*) utcDateTime_: UTCDateTime; options: OptionBits): OSStatus; external name '_SetUTCDateTime';
+
+{
+ * GetLocalDateTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetLocalDateTime(var localDateTime_: LocalDateTime; options: OptionBits): OSStatus; external name '_GetLocalDateTime';
+
+{
+ * SetLocalDateTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UTCUtils 1.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetLocalDateTime(const (*var*) localDateTime_: LocalDateTime; options: OptionBits): OSStatus; external name '_SetLocalDateTime';
+
+{$ALIGN MAC68K}
+
+
+{unit UTCoreTypes}
+{
+ File: LaunchServices/UTCoreTypes.h
+
+ Contains: String constants for core uniform type identifiers
+
+ Version: LaunchServices-155.0.81~2
+
+ Copyright: © 2004-2005 by Apple Computer, Inc., all rights reserved.
+
+}
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ ================================================================================ *
+ * Abstract base types *
+ * ================================================================================ }
+{
+ * kUTTypeItem
+ *
+ * generic base type for most things
+ * (files, directories)
+ *
+ * UTI: public.item
+ *
+ *
+ * kUTTypeContent
+ *
+ * base type for anything containing user-viewable document content
+ * (documents, pasteboard data, and document packages)
+ *
+ * UTI: public.content
+ *
+ *
+ * kUTTypeCompositeContent
+ *
+ * base type for content formats supporting mixed embedded content
+ * (i.e., compound documents)
+ *
+ * UTI: public.composite-content
+ * conforms to: public.content
+ *
+ *
+ * kUTTypeApplication
+ *
+ * base type for Mac OS X applications, launchable items
+ *
+ * UTI: com.apple.application
+ *
+ *
+ * kUTTypeMessage
+ *
+ * base type for messages (email, IM, etc.)
+ *
+ * UTI: public.message
+ *
+ *
+ * kUTTypeContact
+ *
+ * contact information, e.g. for a person, group, organization
+ *
+ * UTI: public.contact
+ *
+ *
+ * kUTTypeArchive
+ *
+ * an archive of files and directories
+ *
+ * UTI: public.archive
+ *
+ *
+ * kUTTypeDiskImage
+ *
+ * a data item mountable as a volume
+ *
+ * UTI: public.disk-image
+ }
+{
+ * kUTTypeItem
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeItem: CFStringRef; external name '_kUTTypeItem'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeContent
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeContent: CFStringRef; external name '_kUTTypeContent'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeCompositeContent
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeCompositeContent: CFStringRef; external name '_kUTTypeCompositeContent'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeApplication
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeApplication: CFStringRef; external name '_kUTTypeApplication'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeMessage
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeMessage: CFStringRef; external name '_kUTTypeMessage'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeContact
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeContact: CFStringRef; external name '_kUTTypeContact'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeArchive
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeArchive: CFStringRef; external name '_kUTTypeArchive'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeDiskImage
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeDiskImage: CFStringRef; external name '_kUTTypeDiskImage'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{ ================================================================================ *
+ * Concrete base types *
+ * ================================================================================ }
+{
+ * kUTTypeData
+ *
+ * base type for any sort of simple byte stream,
+ * including files and in-memory data
+ *
+ * UTI: public.data
+ * conforms to: public.item
+ *
+ *
+ * kUTTypeDirectory
+ *
+ * file system directory
+ * (includes packages AND folders)
+ *
+ * UTI: public.directory
+ * conforms to: public.item
+ *
+ *
+ * kUTTypeResolvable
+ *
+ * anything the Alias Manager can resolve
+ *
+ * UTI: com.apple.resolvable
+ *
+ *
+ * kUTTypeSymLink
+ *
+ * a symbolic link
+ *
+ * UTI: public.symlink
+ * conforms to: public.item, com.apple.resolvable
+ *
+ *
+ * kUTTypeMountPoint
+ *
+ * a volume mount point (resolvable, resolves to the root dir of a volume)
+ *
+ * UTI: com.apple.mount-point
+ * conforms to: public.item, com.apple.resolvable
+ *
+ *
+ * kUTTypeAliasFile
+ *
+ * a fully-formed alias file
+ *
+ * UTI: com.apple.alias-file
+ * conforms to: public.data, com.apple.resolvable
+ *
+ *
+ * kUTTypeAliasRecord
+ *
+ * raw alias data
+ *
+ * UTI: com.apple.alias-record
+ * conforms to: public.data, com.apple.resolvable
+ *
+ *
+ * kUTTypeURL
+ *
+ * The bytes of a URL
+ * (OSType 'url ')
+ *
+ * UTI: public.url
+ * conforms to: public.data
+ *
+ *
+ * kUTTypeFileURL
+ *
+ * The text of a "file:" URL
+ * (OSType 'furl')
+ *
+ * UTI: public.file-url
+ * conforms to: public.url
+ }
+{
+ * kUTTypeData
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeData: CFStringRef; external name '_kUTTypeData'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeDirectory
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeDirectory: CFStringRef; external name '_kUTTypeDirectory'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeResolvable
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeResolvable: CFStringRef; external name '_kUTTypeResolvable'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeSymLink
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeSymLink: CFStringRef; external name '_kUTTypeSymLink'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeMountPoint
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeMountPoint: CFStringRef; external name '_kUTTypeMountPoint'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeAliasFile
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeAliasFile: CFStringRef; external name '_kUTTypeAliasFile'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeAliasRecord
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeAliasRecord: CFStringRef; external name '_kUTTypeAliasRecord'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeURL
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeURL: CFStringRef; external name '_kUTTypeURL'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeFileURL
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeFileURL: CFStringRef; external name '_kUTTypeFileURL'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{ ================================================================================ *
+ * Text types *
+ * ================================================================================ }
+{
+ * kUTTypeText
+ *
+ * base type for all text-encoded data,
+ * including text with markup (HTML, RTF, etc.)
+ *
+ * UTI: public.text
+ * conforms to: public.data, public.content
+ *
+ *
+ * kUTTypePlainText
+ *
+ * text with no markup, unspecified encoding
+ *
+ * UTI: public.plain-text
+ * conforms to: public.text
+ *
+ *
+ * kUTTypeUTF8PlainText
+ *
+ * plain text, UTF-8 encoding
+ * (OSType 'utf8', NSPasteboardType "NSStringPBoardType")
+ *
+ * UTI: public.utf8-plain-text
+ * conforms to: public.plain-text
+ *
+ *
+ * kUTTypeUTF16ExternalPlainText
+ *
+ * plain text, UTF-16 encoding, with BOM, or if BOM
+ * is not present, has "external representation"
+ * byte order (big-endian).
+ * (OSType 'ut16')
+ *
+ * UTI: public.utf16-external-plain-text
+ * conforms to: public.plain-text
+ *
+ *
+ * kUTTypeUTF16PlainText
+ *
+ * plain text, UTF-16 encoding, native byte order, no BOM
+ * (OSType 'utxt')
+ *
+ * UTI: public.utf16-plain-text
+ * conforms to: public.plain-text
+ *
+ *
+ * kUTTypeRTF
+ *
+ * Rich Text Format
+ *
+ * UTI: public.rtf
+ * conforms to: public.text
+ *
+ *
+ * kUTTypeHTML
+ *
+ * HTML, any version
+ *
+ * UTI: public.html
+ * conforms to: public.text
+ *
+ *
+ * kUTTypeXML
+ *
+ * generic XML
+ *
+ * UTI: public.xml
+ * conforms to: public.text
+ *
+ *
+ * kUTTypeSourceCode
+ *
+ * abstract type for source code (any language)
+ *
+ * UTI: public.source-code
+ * conforms to: public.plain-text
+ *
+ *
+ * kUTTypeCSource
+ *
+ * C source code (.c)
+ *
+ * UTI: public.c-source
+ * conforms to: public.plain-text
+ *
+ *
+ * kUTTypeObjectiveCSource
+ *
+ * Objective-C source code (.m)
+ *
+ * UTI: public.objective-c-source
+ * conforms to: public.plain-text
+ *
+ *
+ * kUTTypeCPlusPlusSource
+ *
+ * C++ source code (.cp, etc.)
+ *
+ * UTI: public.c-plus-plus-source
+ * conforms to: public.plain-text
+ *
+ *
+ * kUTTypeObjectiveCPlusPlusSource
+ *
+ * Objective-C++ source code
+ *
+ * UTI: public.objective-c-plus-plus-source
+ * conforms to: public.plain-text
+ *
+ *
+ * kUTTypeCHeader
+ *
+ * C header
+ *
+ * UTI: public.c-header
+ * conforms to: public.plain-text
+ *
+ *
+ * kUTTypeCPlusPlusHeader
+ *
+ * C++ header
+ *
+ * UTI: public.c-plus-plus-header
+ * conforms to: public.plain-text
+ *
+ *
+ * kUTTypeJavaSource
+ *
+ * Java source code
+ *
+ * UTI: com.sun.java-source
+ * conforms to: public.plain-text
+ }
+{
+ * kUTTypeText
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeText: CFStringRef; external name '_kUTTypeText'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypePlainText
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypePlainText: CFStringRef; external name '_kUTTypePlainText'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeUTF8PlainText
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeUTF8PlainText: CFStringRef; external name '_kUTTypeUTF8PlainText'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeUTF16ExternalPlainText
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeUTF16ExternalPlainText: CFStringRef; external name '_kUTTypeUTF16ExternalPlainText'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeUTF16PlainText
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeUTF16PlainText: CFStringRef; external name '_kUTTypeUTF16PlainText'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeRTF
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeRTF: CFStringRef; external name '_kUTTypeRTF'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeHTML
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeHTML: CFStringRef; external name '_kUTTypeHTML'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeXML
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeXML: CFStringRef; external name '_kUTTypeXML'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeSourceCode
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeSourceCode: CFStringRef; external name '_kUTTypeSourceCode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeCSource
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeCSource: CFStringRef; external name '_kUTTypeCSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeObjectiveCSource
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeObjectiveCSource: CFStringRef; external name '_kUTTypeObjectiveCSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeCPlusPlusSource
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeCPlusPlusSource: CFStringRef; external name '_kUTTypeCPlusPlusSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeObjectiveCPlusPlusSource
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeObjectiveCPlusPlusSource: CFStringRef; external name '_kUTTypeObjectiveCPlusPlusSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeCHeader
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeCHeader: CFStringRef; external name '_kUTTypeCHeader'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeCPlusPlusHeader
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeCPlusPlusHeader: CFStringRef; external name '_kUTTypeCPlusPlusHeader'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeJavaSource
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeJavaSource: CFStringRef; external name '_kUTTypeJavaSource'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ ================================================================================ *
+ * Composite content types *
+ * ================================================================================ }
+{
+ * kUTTypePDF
+ *
+ * Adobe PDF
+ *
+ * UTI: com.adobe.pdf
+ * conforms to: public.data, public.composite-content
+ *
+ *
+ * kUTTypeRTFD
+ *
+ * Rich Text Format Directory
+ * (RTF with content embedding, on-disk format)
+ *
+ * UTI: com.apple.rtfd
+ * conforms to: com.apple.package, public.composite-content
+ *
+ *
+ * kUTTypeFlatRTFD
+ *
+ * Flattened RTFD (pasteboard format)
+ *
+ * UTI: com.apple.flat-rtfd
+ * conforms to: public.data, public.composite-content
+ *
+ *
+ * kUTTypeTXNTextAndMultimediaData
+ *
+ * MLTE (Textension) format for mixed text & multimedia data
+ * (OSType 'txtn')
+ *
+ * UTI: com.apple.txn.text-multimedia-data
+ * conforms to: public.data, public.composite-content
+ *
+ *
+ * kUTTypeWebArchive
+ *
+ * The WebKit webarchive format
+ *
+ * UTI: com.apple.webarchive
+ * conforms to: public.data, public.composite-content
+ }
+{
+ * kUTTypePDF
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypePDF: CFStringRef; external name '_kUTTypePDF'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeRTFD
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeRTFD: CFStringRef; external name '_kUTTypeRTFD'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeFlatRTFD
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeFlatRTFD: CFStringRef; external name '_kUTTypeFlatRTFD'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeTXNTextAndMultimediaData
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeTXNTextAndMultimediaData: CFStringRef; external name '_kUTTypeTXNTextAndMultimediaData'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeWebArchive
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeWebArchive: CFStringRef; external name '_kUTTypeWebArchive'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ ================================================================================ *
+ * Image content types *
+ * ================================================================================ }
+{
+ * kUTTypeImage
+ *
+ * abstract image data
+ *
+ * UTI: public.image
+ * conforms to: public.data, public.content
+ *
+ *
+ * kUTTypeJPEG
+ *
+ * JPEG image
+ *
+ * UTI: public.jpeg
+ * conforms to: public.image
+ *
+ *
+ * kUTTypeJPEG2000
+ *
+ * JPEG-2000 image
+ *
+ * UTI: public.jpeg-2000
+ * conforms to: public.image
+ *
+ *
+ * kUTTypeTIFF
+ *
+ * TIFF image
+ *
+ * UTI: public.tiff
+ * conforms to: public.image
+ *
+ *
+ * kUTTypePICT
+ *
+ * Quickdraw PICT format
+ *
+ * UTI: com.apple.pict
+ * conforms to: public.image
+ *
+ *
+ * kUTTypeGIF
+ *
+ * GIF image
+ *
+ * UTI: com.compuserve.gif
+ * conforms to: public.image
+ *
+ *
+ * kUTTypePNG
+ *
+ * PNG image
+ *
+ * UTI: public.png
+ * conforms to: public.image
+ *
+ *
+ * kUTTypeQuickTimeImage
+ *
+ * QuickTime image format (OSType 'qtif')
+ *
+ * UTI: com.apple.quicktime-image
+ * conforms to: public.image
+ *
+ *
+ * kUTTypeAppleICNS
+ *
+ * Apple icon data
+ *
+ * UTI: com.apple.icns
+ * conforms to: public.image
+ *
+ *
+ * kUTTypeBMP
+ *
+ * Windows bitmap
+ *
+ * UTI: com.microsoft.bmp
+ * conforms to: public.image
+ *
+ *
+ * kUTTypeICO
+ *
+ * Windows icon data
+ *
+ * UTI: com.microsoft.ico
+ * conforms to: public.image
+ }
+{
+ * kUTTypeImage
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeImage: CFStringRef; external name '_kUTTypeImage'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeJPEG
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeJPEG: CFStringRef; external name '_kUTTypeJPEG'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeJPEG2000
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeJPEG2000: CFStringRef; external name '_kUTTypeJPEG2000'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeTIFF
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeTIFF: CFStringRef; external name '_kUTTypeTIFF'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypePICT
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypePICT: CFStringRef; external name '_kUTTypePICT'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeGIF
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeGIF: CFStringRef; external name '_kUTTypeGIF'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypePNG
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypePNG: CFStringRef; external name '_kUTTypePNG'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeQuickTimeImage
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeQuickTimeImage: CFStringRef; external name '_kUTTypeQuickTimeImage'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeAppleICNS
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeAppleICNS: CFStringRef; external name '_kUTTypeAppleICNS'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeBMP
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeBMP: CFStringRef; external name '_kUTTypeBMP'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeICO
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeICO: CFStringRef; external name '_kUTTypeICO'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ ================================================================================ *
+ * Audiovisual content types *
+ * ================================================================================ }
+{
+ * kUTTypeAudiovisualContent
+ *
+ * audio and/or video content
+ *
+ * UTI: public.audiovisual-content
+ * conforms to: public.data, public.content
+ *
+ *
+ * kUTTypeMovie
+ *
+ * A media format which may contain both video and audio
+ * Corresponds to what users would label a "movie"
+ *
+ * UTI: public.movie
+ * conforms to: public.audiovisual-content
+ *
+ *
+ * kUTTypeVideo
+ *
+ * pure video (no audio)
+ *
+ * UTI: public.video
+ * conforms to: public.movie
+ *
+ *
+ * kUTTypeAudio
+ *
+ * pure audio (no video)
+ *
+ * UTI: public.audio
+ * conforms to: public.audiovisual-content
+ *
+ *
+ * kUTTypeQuickTimeMovie
+ *
+ * QuickTime movie
+ *
+ * UTI: com.apple.quicktime-movie
+ * conforms to: public.movie
+ *
+ *
+ * kUTTypeMPEG
+ *
+ * MPEG-1 or MPEG-2 movie
+ *
+ * UTI: public.mpeg
+ * conforms to: public.movie
+ *
+ *
+ * kUTTypeMPEG4
+ *
+ * MPEG-4 movie
+ *
+ * UTI: public.mpeg-4
+ * conforms to: public.movie
+ *
+ *
+ * kUTTypeMP3
+ *
+ * MP3 audio
+ *
+ * UTI: public.mp3
+ * conforms to: public.audio
+ *
+ *
+ * kUTTypeMPEG4Audio
+ *
+ * MPEG-4 audio layer
+ * (.m4a)
+ *
+ * UTI: public.mpeg-4-audio
+ * conforms to: public.mpeg-4, public.audio
+ *
+ *
+ * kUTTypeAppleProtectedMPEG4Audio
+ *
+ * Apple protected MPEG4 format
+ * (.m4p, iTunes music store format)
+ *
+ * UTI: com.apple.protected-mpeg-4-audio
+ * conforms to: public.audio
+ }
+{
+ * kUTTypeAudiovisualContent
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeAudiovisualContent: CFStringRef; external name '_kUTTypeAudiovisualContent'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeMovie
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeMovie: CFStringRef; external name '_kUTTypeMovie'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeVideo
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeVideo: CFStringRef; external name '_kUTTypeVideo'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeAudio
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeAudio: CFStringRef; external name '_kUTTypeAudio'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeQuickTimeMovie
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeQuickTimeMovie: CFStringRef; external name '_kUTTypeQuickTimeMovie'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeMPEG
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeMPEG: CFStringRef; external name '_kUTTypeMPEG'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeMPEG4
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeMPEG4: CFStringRef; external name '_kUTTypeMPEG4'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeMP3
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeMP3: CFStringRef; external name '_kUTTypeMP3'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeMPEG4Audio
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeMPEG4Audio: CFStringRef; external name '_kUTTypeMPEG4Audio'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeAppleProtectedMPEG4Audio
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeAppleProtectedMPEG4Audio: CFStringRef; external name '_kUTTypeAppleProtectedMPEG4Audio'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{ ================================================================================ *
+ * Directory types *
+ * ================================================================================ }
+{
+ * kUTTypeFolder
+ *
+ * a user-browsable directory (i.e., not a package)
+ *
+ * UTI: public.folder
+ * conforms to: public.directory
+ *
+ *
+ * kUTTypeVolume
+ *
+ * the root folder of a volume/mount point
+ *
+ * UTI: public.volume
+ * conforms to: public.folder
+ *
+ *
+ * kUTTypePackage
+ *
+ * a packaged directory
+ *
+ * UTI: com.apple.package
+ * conforms to: public.directory
+ *
+ *
+ * kUTTypeBundle
+ *
+ * a directory conforming to one of the CFBundle layouts
+ *
+ * UTI: com.apple.bundle
+ * conforms to: public.directory
+ *
+ *
+ * kUTTypeFramework
+ *
+ * a Mac OS X framework
+ *
+ * UTI: com.apple.framework
+ * conforms to: com.apple.bundle
+ }
+{
+ * kUTTypeFolder
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeFolder: CFStringRef; external name '_kUTTypeFolder'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeVolume
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeVolume: CFStringRef; external name '_kUTTypeVolume'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypePackage
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypePackage: CFStringRef; external name '_kUTTypePackage'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeBundle
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeBundle: CFStringRef; external name '_kUTTypeBundle'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeFramework
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeFramework: CFStringRef; external name '_kUTTypeFramework'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{ ================================================================================ *
+ * Application types *
+ * ================================================================================ }
+{
+ * kUTTypeApplicationBundle
+ *
+ * a bundled application
+ *
+ * UTI: com.apple.application-bundle
+ * conforms to: com.apple.application, com.apple.bundle, com.apple.package
+ *
+ *
+ * kUTTypeApplicationFile
+ *
+ * a single-file Carbon/Classic application
+ *
+ * UTI: com.apple.application-file
+ * conforms to: com.apple.application, public.data
+ }
+{
+ * kUTTypeApplicationBundle
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeApplicationBundle: CFStringRef; external name '_kUTTypeApplicationBundle'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kUTTypeApplicationFile
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeApplicationFile: CFStringRef; external name '_kUTTypeApplicationFile'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{ ================================================================================ *
+ * Contact types *
+ * ================================================================================ }
+{
+ * kUTTypeVCard
+ *
+ * VCard format
+ *
+ * UTI: public.vcard
+ * conforms to: public.data, public.contact
+ }
+{
+ * kUTTypeVCard
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeVCard: CFStringRef; external name '_kUTTypeVCard'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{ ================================================================================ *
+ * Misc. types *
+ * ================================================================================ }
+{
+ * kUTTypeInkText
+ *
+ * Opaque InkText data
+ *
+ * UTI: com.apple.ink.inktext
+ * conforms to: public.data
+ }
+{
+ * kUTTypeInkText
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kUTTypeInkText: CFStringRef; external name '_kUTTypeInkText'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit UnicodeConverter}
+{
+ File: UnicodeConverter.p
+
+ Contains: Types, constants, and prototypes for Unicode Converter
+
+ Version: Technology: Mac OS 9.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1994-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ Unicode conversion contexts: }
+
+type
+ TextToUnicodeInfo = ^SInt32; { an opaque 32-bit type }
+ TextToUnicodeInfoPtr = ^TextToUnicodeInfo; { when a var xx:TextToUnicodeInfo parameter can be nil, it is changed to xx: TextToUnicodeInfoPtr }
+ UnicodeToTextInfo = ^SInt32; { an opaque 32-bit type }
+ UnicodeToTextInfoPtr = ^UnicodeToTextInfo; { when a var xx:UnicodeToTextInfo parameter can be nil, it is changed to xx: UnicodeToTextInfoPtr }
+ UnicodeToTextRunInfo = ^SInt32; { an opaque 32-bit type }
+ UnicodeToTextRunInfoPtr = ^UnicodeToTextRunInfo; { when a var xx:UnicodeToTextRunInfo parameter can be nil, it is changed to xx: UnicodeToTextRunInfoPtr }
+ ConstTextToUnicodeInfo = TextToUnicodeInfo;
+ ConstUnicodeToTextInfo = UnicodeToTextInfo;
+ { UnicodeMapVersion type & values }
+ UnicodeMapVersion = SInt32;
+
+const
+ kUnicodeUseLatestMapping = -1;
+ kUnicodeUseHFSPlusMapping = 4;
+
+ { Types used in conversion }
+
+type
+ UnicodeMappingPtr = ^UnicodeMapping;
+ UnicodeMapping = record
+ unicodeEncoding: TextEncoding;
+ otherEncoding: TextEncoding;
+ mappingVersion: UnicodeMapVersion;
+ end;
+
+ ConstUnicodeMappingPtr = ^UnicodeMapping;
+ { Control flags for ConvertFromUnicodeToText and ConvertFromTextToUnicode }
+
+const
+ kUnicodeUseFallbacksBit = 0;
+ kUnicodeKeepInfoBit = 1;
+ kUnicodeDirectionalityBits = 2;
+ kUnicodeVerticalFormBit = 4;
+ kUnicodeLooseMappingsBit = 5;
+ kUnicodeStringUnterminatedBit = 6;
+ kUnicodeTextRunBit = 7;
+ kUnicodeKeepSameEncodingBit = 8;
+ kUnicodeForceASCIIRangeBit = 9;
+ kUnicodeNoHalfwidthCharsBit = 10;
+ kUnicodeTextRunHeuristicsBit = 11;
+
+ kUnicodeUseFallbacksMask = $00000001;
+ kUnicodeKeepInfoMask = $00000002;
+ kUnicodeDirectionalityMask = $0000000C;
+ kUnicodeVerticalFormMask = $00000010;
+ kUnicodeLooseMappingsMask = $00000020;
+ kUnicodeStringUnterminatedMask = $00000040;
+ kUnicodeTextRunMask = $00000080;
+ kUnicodeKeepSameEncodingMask = $00000100;
+ kUnicodeForceASCIIRangeMask = $00000200;
+ kUnicodeNoHalfwidthCharsMask = $00000400;
+ kUnicodeTextRunHeuristicsMask = $00000800;
+
+ { Values for kUnicodeDirectionality field }
+ kUnicodeDefaultDirection = 0;
+ kUnicodeLeftToRight = 1;
+ kUnicodeRightToLeft = 2;
+
+ { Directionality masks for control flags }
+ kUnicodeDefaultDirectionMask = $00;
+ kUnicodeLeftToRightMask = $04;
+ kUnicodeRightToLeftMask = $08;
+
+
+ { Control flags for TruncateForUnicodeToText: }
+ {
+ Now TruncateForUnicodeToText uses control flags from the same set as used by
+ ConvertFromTextToUnicode, ConvertFromUnicodeToText, etc., but only
+ kUnicodeStringUnterminatedMask is meaningful for TruncateForUnicodeToText.
+
+ Previously two special control flags were defined for TruncateForUnicodeToText:
+ kUnicodeTextElementSafeBit = 0
+ kUnicodeRestartSafeBit = 1
+ However, neither of these was implemented.
+ Instead of implementing kUnicodeTextElementSafeBit, we now use
+ kUnicodeStringUnterminatedMask since it accomplishes the same thing and avoids
+ having special flags just for TruncateForUnicodeToText
+ Also, kUnicodeRestartSafeBit is unnecessary, since restart-safeness is handled by
+ setting kUnicodeKeepInfoBit with ConvertFromUnicodeToText.
+ If TruncateForUnicodeToText is called with one or both of the old special control
+ flags set (bits 0 or 1), it will not generate a paramErr, but the old bits have no
+ effect on its operation.
+ }
+
+ { Filter bits for filter field in QueryUnicodeMappings and CountUnicodeMappings: }
+ kUnicodeMatchUnicodeBaseBit = 0;
+ kUnicodeMatchUnicodeVariantBit = 1;
+ kUnicodeMatchUnicodeFormatBit = 2;
+ kUnicodeMatchOtherBaseBit = 3;
+ kUnicodeMatchOtherVariantBit = 4;
+ kUnicodeMatchOtherFormatBit = 5;
+
+ kUnicodeMatchUnicodeBaseMask = $00000001;
+ kUnicodeMatchUnicodeVariantMask = $00000002;
+ kUnicodeMatchUnicodeFormatMask = $00000004;
+ kUnicodeMatchOtherBaseMask = $00000008;
+ kUnicodeMatchOtherVariantMask = $00000010;
+ kUnicodeMatchOtherFormatMask = $00000020;
+
+ { Control flags for SetFallbackUnicodeToText }
+ kUnicodeFallbackSequencingBits = 0;
+
+ kUnicodeFallbackSequencingMask = $00000003;
+ kUnicodeFallbackInterruptSafeMask = $00000004; { To indicate that caller fallback routine doesnÕt move memory }
+
+ { values for kUnicodeFallbackSequencing field }
+ kUnicodeFallbackDefaultOnly = 0;
+ kUnicodeFallbackCustomOnly = 1;
+ kUnicodeFallbackDefaultFirst = 2;
+ kUnicodeFallbackCustomFirst = 3;
+
+
+ { Caller-supplied entry point to a fallback handler }
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ UnicodeToTextFallbackProcPtr = function(iSrcUniStr: UniCharPtr; iSrcUniStrLen: ByteCount; var oSrcConvLen: ByteCount; oDestStr: TextPtr; iDestStrLen: ByteCount; var oDestConvLen: ByteCount; iInfoPtr: LogicalAddress; iUnicodeMappingPtr: ConstUnicodeMappingPtr): OSStatus;
+{$elsec}
+ UnicodeToTextFallbackProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ UnicodeToTextFallbackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ UnicodeToTextFallbackUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppUnicodeToTextFallbackProcInfo = $003FFFF0;
+ {
+ * NewUnicodeToTextFallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewUnicodeToTextFallbackUPP(userRoutine: UnicodeToTextFallbackProcPtr): UnicodeToTextFallbackUPP; external name '_NewUnicodeToTextFallbackUPP'; { old name was NewUnicodeToTextFallbackProc }
+{
+ * DisposeUnicodeToTextFallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeUnicodeToTextFallbackUPP(userUPP: UnicodeToTextFallbackUPP); external name '_DisposeUnicodeToTextFallbackUPP';
+{
+ * InvokeUnicodeToTextFallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeUnicodeToTextFallbackUPP(iSrcUniStr: UniCharPtr; iSrcUniStrLen: ByteCount; var oSrcConvLen: ByteCount; oDestStr: TextPtr; iDestStrLen: ByteCount; var oDestConvLen: ByteCount; iInfoPtr: LogicalAddress; iUnicodeMappingPtr: ConstUnicodeMappingPtr; userRoutine: UnicodeToTextFallbackUPP): OSStatus; external name '_InvokeUnicodeToTextFallbackUPP'; { old name was CallUnicodeToTextFallbackProc }
+{ Function prototypes }
+{$ifc TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
+{
+ Routine to Initialize the Unicode Converter and cleanup once done with it.
+ These routines must be called from Static Library clients.
+}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * InitializeUnicodeConverter()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InitializeUnicodeConverter(TECFileName: StringPtr): OSStatus; external name '_InitializeUnicodeConverter';
+
+{
+ * TerminateUnicodeConverter()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure TerminateUnicodeConverter; external name '_TerminateUnicodeConverter';
+
+{ Note: the old names (InitializeUnicode, TerminateUnicode) for the above are still exported. }
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc}
+
+{
+ * CreateTextToUnicodeInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CreateTextToUnicodeInfo(iUnicodeMapping: ConstUnicodeMappingPtr; var oTextToUnicodeInfo: TextToUnicodeInfo): OSStatus; external name '_CreateTextToUnicodeInfo';
+
+{
+ * CreateTextToUnicodeInfoByEncoding()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CreateTextToUnicodeInfoByEncoding(iEncoding: TextEncoding; var oTextToUnicodeInfo: TextToUnicodeInfo): OSStatus; external name '_CreateTextToUnicodeInfoByEncoding';
+
+{
+ * CreateUnicodeToTextInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CreateUnicodeToTextInfo(iUnicodeMapping: ConstUnicodeMappingPtr; var oUnicodeToTextInfo: UnicodeToTextInfo): OSStatus; external name '_CreateUnicodeToTextInfo';
+
+{
+ * CreateUnicodeToTextInfoByEncoding()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CreateUnicodeToTextInfoByEncoding(iEncoding: TextEncoding; var oUnicodeToTextInfo: UnicodeToTextInfo): OSStatus; external name '_CreateUnicodeToTextInfoByEncoding';
+
+{
+ * CreateUnicodeToTextRunInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CreateUnicodeToTextRunInfo(iNumberOfMappings: ItemCount; const (*var*) iUnicodeMappings: UnicodeMapping; var oUnicodeToTextInfo: UnicodeToTextRunInfo): OSStatus; external name '_CreateUnicodeToTextRunInfo';
+
+{
+ * CreateUnicodeToTextRunInfoByEncoding()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CreateUnicodeToTextRunInfoByEncoding(iNumberOfEncodings: ItemCount; iEncodings: TextEncodingPtr; var oUnicodeToTextInfo: UnicodeToTextRunInfo): OSStatus; external name '_CreateUnicodeToTextRunInfoByEncoding';
+
+{
+ * CreateUnicodeToTextRunInfoByScriptCode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CreateUnicodeToTextRunInfoByScriptCode(iNumberOfScriptCodes: ItemCount; iScripts: ScriptCodePtr; var oUnicodeToTextInfo: UnicodeToTextRunInfo): OSStatus; external name '_CreateUnicodeToTextRunInfoByScriptCode';
+
+{ Change the TextToUnicodeInfo to another mapping. }
+{
+ * ChangeTextToUnicodeInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ChangeTextToUnicodeInfo(ioTextToUnicodeInfo: TextToUnicodeInfo; iUnicodeMapping: ConstUnicodeMappingPtr): OSStatus; external name '_ChangeTextToUnicodeInfo';
+
+{ Change the UnicodeToTextInfo to another mapping. }
+{
+ * ChangeUnicodeToTextInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ChangeUnicodeToTextInfo(ioUnicodeToTextInfo: UnicodeToTextInfo; iUnicodeMapping: ConstUnicodeMappingPtr): OSStatus; external name '_ChangeUnicodeToTextInfo';
+
+
+{
+ * DisposeTextToUnicodeInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DisposeTextToUnicodeInfo(var ioTextToUnicodeInfo: TextToUnicodeInfo): OSStatus; external name '_DisposeTextToUnicodeInfo';
+
+{
+ * DisposeUnicodeToTextInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DisposeUnicodeToTextInfo(var ioUnicodeToTextInfo: UnicodeToTextInfo): OSStatus; external name '_DisposeUnicodeToTextInfo';
+
+{
+ * DisposeUnicodeToTextRunInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DisposeUnicodeToTextRunInfo(var ioUnicodeToTextRunInfo: UnicodeToTextRunInfo): OSStatus; external name '_DisposeUnicodeToTextRunInfo';
+
+{
+ * ConvertFromTextToUnicode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ConvertFromTextToUnicode(iTextToUnicodeInfo: TextToUnicodeInfo; iSourceLen: ByteCount; iSourceStr: ConstLogicalAddress; iControlFlags: OptionBits; iOffsetCount: ItemCount; iOffsetArray: ByteOffsetPtr; oOffsetCount: ItemCountPtr; oOffsetArray: ByteOffsetPtr; iOutputBufLen: ByteCount; var oSourceRead: ByteCount; var oUnicodeLen: ByteCount; oUnicodeStr: UniCharPtr): OSStatus; external name '_ConvertFromTextToUnicode';
+
+{
+ * ConvertFromUnicodeToText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ConvertFromUnicodeToText(iUnicodeToTextInfo: UnicodeToTextInfo; iUnicodeLen: ByteCount; iUnicodeStr: UniCharPtr; iControlFlags: OptionBits; iOffsetCount: ItemCount; iOffsetArray: ByteOffsetPtr; oOffsetCount: ItemCountPtr; oOffsetArray: ByteOffsetPtr; iOutputBufLen: ByteCount; var oInputRead: ByteCount; var oOutputLen: ByteCount; oOutputStr: LogicalAddress): OSStatus; external name '_ConvertFromUnicodeToText';
+
+{
+ * ConvertFromUnicodeToTextRun()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ConvertFromUnicodeToTextRun(iUnicodeToTextInfo: UnicodeToTextRunInfo; iUnicodeLen: ByteCount; iUnicodeStr: UniCharPtr; iControlFlags: OptionBits; iOffsetCount: ItemCount; iOffsetArray: ByteOffsetPtr; oOffsetCount: ItemCountPtr; oOffsetArray: ByteOffsetPtr; iOutputBufLen: ByteCount; var oInputRead: ByteCount; var oOutputLen: ByteCount; oOutputStr: LogicalAddress; iEncodingRunBufLen: ItemCount; var oEncodingRunOutLen: ItemCount; var oEncodingRuns: TextEncodingRun): OSStatus; external name '_ConvertFromUnicodeToTextRun';
+
+{
+ * ConvertFromUnicodeToScriptCodeRun()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ConvertFromUnicodeToScriptCodeRun(iUnicodeToTextInfo: UnicodeToTextRunInfo; iUnicodeLen: ByteCount; iUnicodeStr: UniCharPtr; iControlFlags: OptionBits; iOffsetCount: ItemCount; iOffsetArray: ByteOffsetPtr; oOffsetCount: ItemCountPtr; oOffsetArray: ByteOffsetPtr; iOutputBufLen: ByteCount; var oInputRead: ByteCount; var oOutputLen: ByteCount; oOutputStr: LogicalAddress; iScriptRunBufLen: ItemCount; var oScriptRunOutLen: ItemCount; var oScriptCodeRuns: ScriptCodeRun): OSStatus; external name '_ConvertFromUnicodeToScriptCodeRun';
+
+{ Truncate a multibyte string at a safe place. }
+{
+ * TruncateForTextToUnicode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TruncateForTextToUnicode(iTextToUnicodeInfo: ConstTextToUnicodeInfo; iSourceLen: ByteCount; iSourceStr: ConstLogicalAddress; iMaxLen: ByteCount; var oTruncatedLen: ByteCount): OSStatus; external name '_TruncateForTextToUnicode';
+
+{ Truncate a Unicode string at a safe place. }
+{
+ * TruncateForUnicodeToText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TruncateForUnicodeToText(iUnicodeToTextInfo: ConstUnicodeToTextInfo; iSourceLen: ByteCount; iSourceStr: ConstUniCharPtr; iControlFlags: OptionBits; iMaxLen: ByteCount; var oTruncatedLen: ByteCount): OSStatus; external name '_TruncateForUnicodeToText';
+
+{ Convert a Pascal string to Unicode string. }
+{
+ * ConvertFromPStringToUnicode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ConvertFromPStringToUnicode(iTextToUnicodeInfo: TextToUnicodeInfo; const (*var*) iPascalStr: Str255; iOutputBufLen: ByteCount; var oUnicodeLen: ByteCount; oUnicodeStr: UniCharPtr): OSStatus; external name '_ConvertFromPStringToUnicode';
+
+{ Convert a Unicode string to Pascal string. }
+{
+ * ConvertFromUnicodeToPString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ConvertFromUnicodeToPString(iUnicodeToTextInfo: UnicodeToTextInfo; iUnicodeLen: ByteCount; iUnicodeStr: UniCharPtr; var oPascalStr: Str255): OSStatus; external name '_ConvertFromUnicodeToPString';
+
+{ Count the available conversion mappings. }
+{
+ * CountUnicodeMappings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CountUnicodeMappings(iFilter: OptionBits; iFindMapping: ConstUnicodeMappingPtr; var oActualCount: ItemCount): OSStatus; external name '_CountUnicodeMappings';
+
+{ Get a list of the available conversion mappings. }
+{
+ * QueryUnicodeMappings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QueryUnicodeMappings(iFilter: OptionBits; iFindMapping: ConstUnicodeMappingPtr; iMaxCount: ItemCount; var oActualCount: ItemCount; var oReturnedMappings: UnicodeMapping): OSStatus; external name '_QueryUnicodeMappings';
+
+{ Setup the fallback handler for converting Unicode To Text. }
+{
+ * SetFallbackUnicodeToText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetFallbackUnicodeToText(iUnicodeToTextInfo: UnicodeToTextInfo; iFallback: UnicodeToTextFallbackUPP; iControlFlags: OptionBits; iInfoPtr: LogicalAddress): OSStatus; external name '_SetFallbackUnicodeToText';
+
+{ Setup the fallback handler for converting Unicode To TextRuns. }
+{
+ * SetFallbackUnicodeToTextRun()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetFallbackUnicodeToTextRun(iUnicodeToTextRunInfo: UnicodeToTextRunInfo; iFallback: UnicodeToTextFallbackUPP; iControlFlags: OptionBits; iInfoPtr: LogicalAddress): OSStatus; external name '_SetFallbackUnicodeToTextRun';
+
+{ Re-initialize all state information kept by the context objects. }
+{
+ * ResetTextToUnicodeInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.3 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ResetTextToUnicodeInfo(ioTextToUnicodeInfo: TextToUnicodeInfo): OSStatus; external name '_ResetTextToUnicodeInfo';
+
+{ Re-initialize all state information kept by the context objects. }
+{
+ * ResetUnicodeToTextInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ResetUnicodeToTextInfo(ioUnicodeToTextInfo: UnicodeToTextInfo): OSStatus; external name '_ResetUnicodeToTextInfo';
+
+{ Re-initialize all state information kept by the context objects in TextRun conversions. }
+{
+ * ResetUnicodeToTextRunInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeConverter 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ResetUnicodeToTextRunInfo(ioUnicodeToTextRunInfo: UnicodeToTextRunInfo): OSStatus; external name '_ResetUnicodeToTextRunInfo';
+
+
+{$ALIGN MAC68K}
+
+
+{unit UnicodeUtilities}
+{
+ File: UnicodeUtilities.p
+
+ Contains: Types, constants, prototypes for Unicode Utilities (Unicode input and text utils)
+
+ Version: Technology: Mac OS 9.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1997-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+ -------------------------------------------------------------------------------------------------
+ CONSTANTS & DATA STRUCTURES for UCKeyTranslate & UCKeyboardLayout ('uchr' resource)
+ -------------------------------------------------------------------------------------------------
+}
+
+{
+ -------------------------------------------------------------------------------------------------
+ UCKeyOutput & related stuff
+ The interpretation of UCKeyOutput depends on bits 15-14.
+ If they are 01, then bits 0-13 are an index in UCKeyStateRecordsIndex (resource-wide list).
+ If they are 10, then bits 0-13 are an index in UCKeySequenceDataIndex (resource-wide list),
+ or if UCKeySequenceDataIndex is not present or the index is beyond the end of the list,
+ then bits 0-15 are a single Unicode character.
+ Otherwise, bits 0-15 are a single Unicode character; a value of 0xFFFE-0xFFFF means no character
+ output.
+ UCKeyCharSeq is similar, but does not support indices in UCKeyStateRecordsIndex. For bits 15-14:
+ If they are 10, then bits 0-13 are an index in UCKeySequenceDataIndex (resource-wide list),
+ or if UCKeySequenceDataIndex is not present or the index is beyond the end of the list,
+ then bits 0-15 are a single Unicode character.
+ Otherwise, bits 0-15 are a single Unicode character; a value of 0xFFFE-0xFFFF means no character
+ output.
+ -------------------------------------------------------------------------------------------------
+}
+
+
+type
+ UCKeyOutput = UInt16;
+ UCKeyCharSeq = UInt16;
+
+const
+ kUCKeyOutputStateIndexMask = $4000;
+ kUCKeyOutputSequenceIndexMask = $8000;
+ kUCKeyOutputTestForIndexMask = $C000; { test bits 14-15 }
+ kUCKeyOutputGetIndexMask = $3FFF; { get bits 0-13 }
+
+ {
+ -------------------------------------------------------------------------------------------------
+ UCKeyStateRecord & related stuff
+ The UCKeyStateRecord information is used as follows. If the current state is zero,
+ output stateZeroCharData and set the state to stateZeroNextState. If the current state
+ is non-zero and there is an entry for it in stateEntryData, then output the corresponding
+ charData and set the state to nextState. Otherwise, output the state terminator from
+ UCKeyStateTerminators for the current state (or nothing if there is no UCKeyStateTerminators
+ table or it has no entry for the current state), then output stateZeroCharData and set the
+ state to stateZeroNextState.
+ -------------------------------------------------------------------------------------------------
+ }
+
+
+type
+ UCKeyStateRecordPtr = ^UCKeyStateRecord;
+ UCKeyStateRecord = record
+ stateZeroCharData: UCKeyCharSeq;
+ stateZeroNextState: UInt16;
+ stateEntryCount: UInt16;
+ stateEntryFormat: UInt16;
+ { This is followed by an array of stateEntryCount elements }
+ { in the specified format. Here we just show a dummy array. }
+ stateEntryData: array [0..0] of UInt32;
+ end;
+
+ {
+ Here are the codes for entry formats currently defined.
+ Each entry maps from curState to charData and nextState.
+ }
+
+const
+ kUCKeyStateEntryTerminalFormat = $0001;
+ kUCKeyStateEntryRangeFormat = $0002;
+
+ {
+ For UCKeyStateEntryTerminal -
+ nextState is always 0, so we don't have a field for it
+ }
+
+
+type
+ UCKeyStateEntryTerminalPtr = ^UCKeyStateEntryTerminal;
+ UCKeyStateEntryTerminal = record
+ curState: UInt16;
+ charData: UCKeyCharSeq;
+ end;
+
+ {
+ For UCKeyStateEntryRange -
+ If curState >= curStateStart and curState <= curStateStart+curStateRange,
+ then it matches the entry, and we transform charData and nextState as follows:
+ If charData < 0xFFFE, then charData += (curState-curStateStart)*deltaMultiplier
+ If nextState != 0, then nextState += (curState-curStateStart)*deltaMultiplier
+ }
+ UCKeyStateEntryRangePtr = ^UCKeyStateEntryRange;
+ UCKeyStateEntryRange = record
+ curStateStart: UInt16;
+ curStateRange: SInt8;
+ deltaMultiplier: SInt8;
+ charData: UCKeyCharSeq;
+ nextState: UInt16;
+ end;
+
+ {
+ -------------------------------------------------------------------------------------------------
+ UCKeyboardLayout & related stuff
+ The UCKeyboardLayout struct given here is only for the resource header. It specifies
+ offsets to the various subtables which each have their own structs, given below.
+ The keyboardTypeHeadList array selects table offsets that depend on keyboardType. The
+ first entry in keyboardTypeHeadList is the default entry, which will be used if the
+ keyboardType passed to UCKeyTranslate does not match any other entry - i.e. does not fall
+ within the range keyboardTypeFirst..keyboardTypeLast for some entry. The first entry
+ should have keyboardTypeFirst = keyboardTypeLast = 0.
+ -------------------------------------------------------------------------------------------------
+ }
+ UCKeyboardTypeHeaderPtr = ^UCKeyboardTypeHeader;
+ UCKeyboardTypeHeader = record
+ keyboardTypeFirst: UInt32; { first keyboardType in this entry }
+ keyboardTypeLast: UInt32; { last keyboardType in this entry }
+ keyModifiersToTableNumOffset: ByteOffset; { required }
+ keyToCharTableIndexOffset: ByteOffset; { required }
+ keyStateRecordsIndexOffset: ByteOffset; { 0 => no table }
+ keyStateTerminatorsOffset: ByteOffset; { 0 => no table }
+ keySequenceDataIndexOffset: ByteOffset; { 0 => no table }
+ end;
+
+ UCKeyboardLayoutPtr = ^UCKeyboardLayout;
+ UCKeyboardLayout = record
+ { header only; other tables accessed via offsets }
+ keyLayoutHeaderFormat: UInt16; { =kUCKeyLayoutHeaderFormat }
+ keyLayoutDataVersion: UInt16; { 0x0100 = 1.0, 0x0110 = 1.1, etc. }
+ keyLayoutFeatureInfoOffset: ByteOffset; { may be 0 }
+ keyboardTypeCount: ItemCount; { Dimension for keyboardTypeHeadList[] }
+ keyboardTypeList: array [0..0] of UCKeyboardTypeHeader;
+ end;
+
+ { ------------------------------------------------------------------------------------------------- }
+ UCKeyLayoutFeatureInfoPtr = ^UCKeyLayoutFeatureInfo;
+ UCKeyLayoutFeatureInfo = record
+ keyLayoutFeatureInfoFormat: UInt16; { =kUCKeyLayoutFeatureInfoFormat }
+ reserved: UInt16;
+ maxOutputStringLength: UniCharCount; { longest possible output string }
+ end;
+
+ { ------------------------------------------------------------------------------------------------- }
+ UCKeyModifiersToTableNumPtr = ^UCKeyModifiersToTableNum;
+ UCKeyModifiersToTableNum = record
+ keyModifiersToTableNumFormat: UInt16; { =kUCKeyModifiersToTableNumFormat }
+ defaultTableNum: UInt16; { For modifier combos not in tableNum[] }
+ modifiersCount: ItemCount; { Dimension for tableNum[] }
+ tableNum: SInt8;
+ { Then there is padding to a 4-byte boundary with bytes containing 0, if necessary. }
+ end;
+
+ { ------------------------------------------------------------------------------------------------- }
+ UCKeyToCharTableIndexPtr = ^UCKeyToCharTableIndex;
+ UCKeyToCharTableIndex = record
+ keyToCharTableIndexFormat: UInt16; { =kUCKeyToCharTableIndexFormat }
+ keyToCharTableSize: UInt16; { Max keyCode (128 for ADB keyboards) }
+ keyToCharTableCount: ItemCount; { Dimension for keyToCharTableOffsets[] (usually 6 to 12 tables) }
+ keyToCharTableOffsets: array [0..0] of ByteOffset;
+ { Each offset in keyToCharTableOffsets is from the beginning of the resource to a }
+ { table as follows: }
+ { UCKeyOutput keyToCharData[keyToCharTableSize]; }
+ { These tables follow the UCKeyToCharTableIndex. }
+ { Then there is padding to a 4-byte boundary with bytes containing 0, if necessary. }
+ end;
+
+ { ------------------------------------------------------------------------------------------------- }
+ UCKeyStateRecordsIndexPtr = ^UCKeyStateRecordsIndex;
+ UCKeyStateRecordsIndex = record
+ keyStateRecordsIndexFormat: UInt16; { =kUCKeyStateRecordsIndexFormat }
+ keyStateRecordCount: UInt16; { Dimension for keyStateRecordOffsets[] }
+ keyStateRecordOffsets: array [0..0] of ByteOffset;
+ { Each offset in keyStateRecordOffsets is from the beginning of the resource to a }
+ { UCKeyStateRecord. These UCKeyStateRecords follow the keyStateRecordOffsets[] array. }
+ { Then there is padding to a 4-byte boundary with bytes containing 0, if necessary. }
+ end;
+
+ { ------------------------------------------------------------------------------------------------- }
+ UCKeyStateTerminatorsPtr = ^UCKeyStateTerminators;
+ UCKeyStateTerminators = record
+ keyStateTerminatorsFormat: UInt16; { =kUCKeyStateTerminatorsFormat }
+ keyStateTerminatorCount: UInt16; { Dimension for keyStateTerminators[] (# of nonzero states) }
+ keyStateTerminators: array [0..0] of UCKeyCharSeq;
+ { Note: keyStateTerminators[0] is terminator for state 1, etc. }
+ { Then there is padding to a 4-byte boundary with bytes containing 0, if necessary. }
+ end;
+
+ { ------------------------------------------------------------------------------------------------- }
+ UCKeySequenceDataIndexPtr = ^UCKeySequenceDataIndex;
+ UCKeySequenceDataIndex = record
+ keySequenceDataIndexFormat: UInt16; { =kUCKeySequenceDataIndexFormat }
+ charSequenceCount: UInt16; { Dimension of charSequenceOffsets[] is charSequenceCount+1 }
+ charSequenceOffsets: array [0..0] of UInt16;
+ { Each offset in charSequenceOffsets is in bytes, from the beginning of }
+ { UCKeySequenceDataIndex to a sequence of UniChars; the next offset indicates the }
+ { end of the sequence. The UniChar sequences follow the UCKeySequenceDataIndex. }
+ { Then there is padding to a 4-byte boundary with bytes containing 0, if necessary. }
+ end;
+
+ { ------------------------------------------------------------------------------------------------- }
+ { Current format codes for the various tables (bits 12-15 indicate which table) }
+
+
+const
+ kUCKeyLayoutHeaderFormat = $1002;
+ kUCKeyLayoutFeatureInfoFormat = $2001;
+ kUCKeyModifiersToTableNumFormat = $3001;
+ kUCKeyToCharTableIndexFormat = $4001;
+ kUCKeyStateRecordsIndexFormat = $5001;
+ kUCKeyStateTerminatorsFormat = $6001;
+ kUCKeySequenceDataIndexFormat = $7001;
+
+
+ {
+ -------------------------------------------------------------------------------------------------
+ Constants for keyAction parameter in UCKeyTranslate()
+ -------------------------------------------------------------------------------------------------
+ }
+
+ kUCKeyActionDown = 0; { key is going down }
+ kUCKeyActionUp = 1; { key is going up }
+ kUCKeyActionAutoKey = 2; { auto-key down }
+ kUCKeyActionDisplay = 3; { get information for key display (as in Key Caps) }
+
+ {
+ -------------------------------------------------------------------------------------------------
+ Bit assignments & masks for keyTranslateOptions parameter in UCKeyTranslate()
+ -------------------------------------------------------------------------------------------------
+ }
+
+ kUCKeyTranslateNoDeadKeysBit = 0; { Prevents setting any new dead-key states }
+
+ kUCKeyTranslateNoDeadKeysMask = $00000001;
+
+ {
+ -------------------------------------------------------------------------------------------------
+ CONSTANTS & DATA STRUCTURES for Unicode Collation
+ -------------------------------------------------------------------------------------------------
+ }
+ { constant for LocaleOperationClass }
+ kUnicodeCollationClass = $75636F6C (* 'ucol' *);
+
+
+type
+ CollatorRef = ^SInt32; { an opaque 32-bit type }
+ CollatorRefPtr = ^CollatorRef; { when a var xx:CollatorRef parameter can be nil, it is changed to xx: CollatorRefPtr }
+ UCCollateOptions = UInt32;
+const
+ { Sensitivity options }
+ kUCCollateComposeInsensitiveMask = $00000002;
+ kUCCollateWidthInsensitiveMask = $00000004;
+ kUCCollateCaseInsensitiveMask = $00000008;
+ kUCCollateDiacritInsensitiveMask = $00000010; { Other general options }
+ kUCCollatePunctuationSignificantMask = $00008000; { Number-handling options }
+ kUCCollateDigitsOverrideMask = $00010000;
+ kUCCollateDigitsAsNumberMask = $00020000;
+
+ kUCCollateStandardOptions = $00000006;
+
+ {
+ Special values to specify various invariant orders for UCCompareTextNoLocale.
+ These values use the high 8 bits of UCCollateOptions.
+ }
+ kUCCollateTypeHFSExtended = 1;
+
+ { These constants are used for masking and shifting the invariant order type. }
+ kUCCollateTypeSourceMask = $000000FF;
+ kUCCollateTypeShiftBits = 24;
+
+ kUCCollateTypeMask = $FF000000;
+
+
+type
+ UCCollationValue = UInt32;
+ UCCollationValuePtr = ^UCCollationValue;
+ {
+ -------------------------------------------------------------------------------------------------
+ CONSTANTS & DATA STRUCTURES for Unicode TextBreak
+ -------------------------------------------------------------------------------------------------
+ }
+ { constant for LocaleOperationClass }
+
+const
+ kUnicodeTextBreakClass = $7562726B (* 'ubrk' *);
+
+
+type
+ TextBreakLocatorRef = ^SInt32; { an opaque 32-bit type }
+ TextBreakLocatorRefPtr = ^TextBreakLocatorRef; { when a var xx:TextBreakLocatorRef parameter can be nil, it is changed to xx: TextBreakLocatorRefPtr }
+ UCTextBreakType = UInt32;
+const
+ kUCTextBreakCharMask = $00000001;
+ kUCTextBreakClusterMask = $00000004;
+ kUCTextBreakWordMask = $00000010;
+ kUCTextBreakLineMask = $00000040;
+
+
+type
+ UCTextBreakOptions = UInt32;
+const
+ kUCTextBreakLeadingEdgeMask = $00000001;
+ kUCTextBreakGoBackwardsMask = $00000002;
+ kUCTextBreakIterateMask = $00000004;
+
+ {
+ -------------------------------------------------------------------------------------------------
+ function PROTOTYPES
+ -------------------------------------------------------------------------------------------------
+ }
+
+ {
+ * UCKeyTranslate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeUtilitiesCoreLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UCKeyTranslate(const (*var*) keyLayoutPtr: UCKeyboardLayout; virtualKeyCode: UInt16; keyAction: UInt16; modifierKeyState: UInt32; keyboardType: UInt32; keyTranslateOptions: OptionBits; var deadKeyState: UInt32; maxStringLength: UniCharCount; var actualStringLength: UniCharCount; unicodeString: UniCharPtr): OSStatus; external name '_UCKeyTranslate';
+
+{ Standard collation functions }
+{
+ * UCCreateCollator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeUtilitiesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UCCreateCollator(locale: LocaleRef; opVariant: LocaleOperationVariant; options: UCCollateOptions; var collatorRef_: CollatorRef): OSStatus; external name '_UCCreateCollator';
+
+{
+ * UCGetCollationKey()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeUtilitiesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UCGetCollationKey(collatorRef_: CollatorRef; textPtr: ConstUniCharPtr; textLength: UniCharCount; maxKeySize: ItemCount; var actualKeySize: ItemCount; collationKey: UCCollationValuePtr): OSStatus; external name '_UCGetCollationKey';
+
+{
+ * UCCompareCollationKeys()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeUtilitiesCoreLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UCCompareCollationKeys(key1Ptr: UCCollationValuePtr; key1Length: ItemCount; key2Ptr: UCCollationValuePtr; key2Length: ItemCount; var equivalent: boolean; var order: SInt32): OSStatus; external name '_UCCompareCollationKeys';
+
+{
+ * UCCompareText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeUtilitiesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UCCompareText(collatorRef_: CollatorRef; text1Ptr: ConstUniCharPtr; text1Length: UniCharCount; text2Ptr: ConstUniCharPtr; text2Length: UniCharCount; var equivalent: boolean; var order: SInt32): OSStatus; external name '_UCCompareText';
+
+{
+ * UCDisposeCollator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeUtilitiesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UCDisposeCollator(var collatorRef_: CollatorRef): OSStatus; external name '_UCDisposeCollator';
+
+{ Simple collation using default locale }
+
+{
+ * UCCompareTextDefault()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeUtilitiesLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UCCompareTextDefault(options: UCCollateOptions; text1Ptr: ConstUniCharPtr; text1Length: UniCharCount; text2Ptr: ConstUniCharPtr; text2Length: UniCharCount; var equivalent: boolean; var order: SInt32): OSStatus; external name '_UCCompareTextDefault';
+
+
+{ Simple locale-independent collation }
+
+{
+ * UCCompareTextNoLocale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeUtilitiesCoreLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UCCompareTextNoLocale(options: UCCollateOptions; text1Ptr: ConstUniCharPtr; text1Length: UniCharCount; text2Ptr: ConstUniCharPtr; text2Length: UniCharCount; var equivalent: boolean; var order: SInt32): OSStatus; external name '_UCCompareTextNoLocale';
+
+{ Standard text break (text boundary) functions }
+{
+ * UCCreateTextBreakLocator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeUtilitiesLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UCCreateTextBreakLocator(locale: LocaleRef; opVariant: LocaleOperationVariant; breakTypes: UCTextBreakType; var breakRef: TextBreakLocatorRef): OSStatus; external name '_UCCreateTextBreakLocator';
+
+{
+ * UCFindTextBreak()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeUtilitiesLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UCFindTextBreak(breakRef: TextBreakLocatorRef; breakType: UCTextBreakType; options: UCTextBreakOptions; textPtr: ConstUniCharPtr; textLength: UniCharCount; startOffset: UniCharArrayOffset; var breakOffset: UniCharArrayOffset): OSStatus; external name '_UCFindTextBreak';
+
+{
+ * UCDisposeTextBreakLocator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in UnicodeUtilitiesLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UCDisposeTextBreakLocator(var breakRef: TextBreakLocatorRef): OSStatus; external name '_UCDisposeTextBreakLocator';
+
+{$ALIGN MAC68K}
+
+
+{unit UniversalAccess}
+{
+ File: HIServices/UniversalAccess.h
+
+ Contains: Universal Access Interfaces.
+
+ Version: HIServices-169~377
+
+ Copyright: © 2005-2006 by Apple Computer, Inc., all rights reserved.
+
+}
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{
+ * Universal Access
+ *
+ * Discussion:
+ * Universal Access provides apps the ability to control the zoom
+ * focus. The following functions are provided so that applications
+ * can tell Universal Access what part of the UI needs focus.
+ }
+
+{
+ * UAZoomChangeFocusType
+ *
+ * Summary:
+ * Universal Access Zoom Change Focus Types
+ *
+ * Discussion:
+ * The following constants are used to tell Universal Access Zoom
+ * the type of event that is driving the change in the zoom focus.
+ }
+type
+ UAZoomChangeFocusType = UInt32;
+const
+{
+ * Some event would like focus.
+ }
+ kUAZoomFocusTypeOther = 0;
+
+ {
+ * The text insertion point has moved.
+ }
+ kUAZoomFocusTypeInsertionPoint = 1;
+
+
+{
+ * UAZoomEnabled()
+ *
+ * Summary:
+ * Determine if Universal Access Zoom is enabled.
+ *
+ * Discussion:
+ * This queries the state of Universal Access Zoom
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Result:
+ * TRUE if Universal Access Zoom is on, FALSE if Zoom is off or the
+ * user has zoomed all the way out.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function UAZoomEnabled: Boolean; external name '_UAZoomEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * UAZoomChangeFocus()
+ *
+ * Summary:
+ * Tell Universal Access where Zoom should focus.
+ *
+ * Discussion:
+ * Tells Universal Access the frame of the element in focus and the
+ * part of the element that should be in focus.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * - The frame of the element in focus in global 72dpi coordinates.
+ *
+ * inHighlightRect:
+ * - The frame of highlighted part of the element in focus in
+ * global 72dpi coordinates. If the whole element is in focus,
+ * and not just a smaller part of it, pass the inRect parameter
+ * and pass NULL for inHighlightRect.
+ *
+ * inType:
+ * - Universal Access Zoom change focus type.
+ *
+ * Result:
+ * OSStatus - noErr if there were no problems or Universal Access
+ * Zoom is off or zoomed all the way out. paramErr if inRect is
+ * NULL or inType is out of range.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function UAZoomChangeFocus( const (*var*) inRect: CGRect; inHighlightRect: CGRectPtr; inType: UAZoomChangeFocusType ): OSStatus; external name '_UAZoomChangeFocus';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit WorldScript}
+{
+ File: WorldScript.p
+
+ Contains: WorldScript I Interfaces.
+
+ Version: Technology: System 7.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1994-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+ WSIOffset = UInt16;
+ WSIByteCount = UInt8;
+ WSIByteIndex = UInt8;
+ { offset from start of sub-table to row in state table }
+ WSIStateOffset = UInt16;
+ WSITableOffset = UInt32;
+ WSISubtableOffset = UInt16;
+ WSIGlyphcode = UInt16;
+ WSITableIdentifiers = UInt32;
+
+const
+ kScriptSettingsTag = $696E666F (* 'info' *);
+ kMetamorphosisTag = $6D6F7274 (* 'mort' *);
+ kGlyphExpansionTag = $67326723 (* 'g2g#' *);
+ kPropertiesTag = $70726F70 (* 'prop' *);
+ kJustificationTag = $6B617368 (* 'kash' *);
+ kCharToGlyphTag = $636D6170 (* 'cmap' *);
+ kGlyphToCharTag = $70616D63 (* 'pamc' *);
+ kFindScriptRunTag = $66737462 (* 'fstb' *);
+
+
+ { *** L O O K U P T A B L E T Y P E S *** }
+ WSILookupSimpleArray = 0; { a simple array indexed by glyph code }
+ WSILookupSegmentSingle = 2; { segment mapping to single value }
+ WSILookupSegmentArray = 4; { segment mapping to lookup array }
+ WSILookupSingleTable = 6; { sorted list of glyph, value pairs }
+ WSILookupTrimmedArray = 8; { a simple trimmed array indexed by glyph code }
+
+
+type
+ WSILookupTableFormat = UInt16;
+ WSILookupValue = UInt16;
+ { An offset from the beginning of the lookup table }
+ WSILookupOffset = UInt16;
+ { FORMAT SPECIFIC DEFINITIONS }
+ {
+ lookupSimpleArray:
+
+ This is a simple array which maps all glyphs in the font
+ to lookup values.
+ }
+ WSILookupArrayHeaderPtr = ^WSILookupArrayHeader;
+ WSILookupArrayHeader = record
+ lookupValues: array [0..0] of WSILookupValue; { The array of values indexed by glyph code }
+ end;
+
+ {
+ lookupTrimmedArray:
+
+ This is a single trimmed array which maps a single range
+ of glyhs in the font to lookup values.
+ }
+ WSILookupTrimmedArrayHeaderPtr = ^WSILookupTrimmedArrayHeader;
+ WSILookupTrimmedArrayHeader = record
+ firstGlyph: WSIGlyphcode;
+ limitGlyph: WSIGlyphcode;
+ valueArray: array [0..0] of WSILookupValue;
+ end;
+
+ { The format specific part of the subtable header }
+ WSILookupFormatSpecificHeaderPtr = ^WSILookupFormatSpecificHeader;
+ WSILookupFormatSpecificHeader = record
+ case SInt16 of
+ 0: (
+ simpleArray: WSILookupArrayHeader; { rename lookupArray as simpleArray <9> }
+ );
+ 1: (
+ trimmedArray: WSILookupTrimmedArrayHeader;
+ );
+ end;
+
+ { The overall subtable header }
+ WSILookupTableHeaderPtr = ^WSILookupTableHeader;
+ WSILookupTableHeader = record
+ format: WSILookupTableFormat; { table format }
+ fsHeader: WSILookupFormatSpecificHeader; { format specific header }
+ end;
+
+
+ { *** G L Y P H E X P A N S I O N *** }
+
+const
+ { fixed 1.0 }
+ kCurrentGlyphExpansionVersion = $00010000;
+
+
+type
+ GlyphExpansionFormats = UInt16;
+
+const
+ GlyphExpansionLookupFormat = 1;
+ GlyphExpansionContextualFormat = 2;
+
+
+type
+ ExpandedGlyphClusterPtr = ^ExpandedGlyphCluster;
+ ExpandedGlyphCluster = packed record
+ numGlyphs: WSIByteCount;
+ bestGlyph: WSIByteIndex;
+ glyphs: array [0..0] of WSIGlyphcode;
+ end;
+
+ ExpandedGlyphOffsetPtr = ^ExpandedGlyphOffset;
+ ExpandedGlyphOffset = record
+ glyph: WSIGlyphcode;
+ offset: WSIOffset; { offset to ExpandedGlyphCluster }
+ end;
+
+ GlyphExpansionStateTablePtr = ^GlyphExpansionStateTable;
+ GlyphExpansionStateTable = record
+ stateTableOffset: WSISubtableOffset;
+ classTableOffset: WSISubtableOffset;
+ actionTableOffset: WSISubtableOffset; { state, class and actions tables follow here... }
+ end;
+
+ GlyphExpansionTablePtr = ^GlyphExpansionTable;
+ GlyphExpansionTable = record
+ version: Fixed;
+ format: SInt16;
+ expansionNumer: SInt16;
+ expansionDenom: SInt16; { num/denom ratio for expansion <2> }
+ case SInt16 of
+ 0: (
+ stateTable: GlyphExpansionStateTable;
+ );
+ 1: (
+ lookup: WSILookupTableHeader; { expanded glyph clusters follow here... }
+ );
+ end;
+
+
+ { Glyph-to-Character constants and types }
+
+const
+ kCurrentGlyphToCharVersion = $00010100;
+
+
+type
+ GlyphToCharLookupFormats = UInt16;
+
+const
+ kGlyphToCharLookup8Format = 1;
+ kGlyphToCharLookup16Format = 2;
+ kGlyphToCharLookup32Format = 3;
+
+
+type
+ GlyphToCharFontIndex = UInt8;
+ QDGlyphcode = UInt8;
+ GlyphToCharActionTablePtr = ^GlyphToCharActionTable;
+ GlyphToCharActionTable = record
+ fontNameOffset: WSISubtableOffset; { offset relative to this table }
+ actions: WSILookupTableHeader; { only support lookupSimpleArray format for now }
+ end;
+
+ GlyphToCharActionHeaderPtr = ^GlyphToCharActionHeader;
+ GlyphToCharActionHeader = record
+ numTables: SInt16; { 0..n }
+ offsets: array [0..0] of WSISubtableOffset; { offsets from start of action table header }
+ end;
+
+ GlyphToCharHeaderPtr = ^GlyphToCharHeader;
+ GlyphToCharHeader = record
+ version: Fixed;
+ actionOffset: WSISubtableOffset; { offset to GlyphToCharActionHeader }
+ format: SInt16; { size of font mask }
+ mappingTable: WSILookupTableHeader;
+ end;
+
+
+ { JUSTIFICATION TYPES
+ WorldScript supports justification of text using insertion. The justification
+ table specifies a insertion string to insert between 2 specified glyphs.
+ Each combination of inter-glyph boundary can be assigned a justification priority,
+ the higher the priority the more justification strings inserted at that position.
+
+ The priorities for each inter-glyph boundary are specified by the justification table's
+ state table.
+
+ Special handling is done for scripts which use spaces to justify, because the width of
+ a space varies depending on the setting of SpaceExtra. This is why the number of spaces
+ per inserting string is specified in the justification table.
+
+ }
+
+const
+ { 1.0 not supported }
+ kCurrentJustificationVersion = $0200;
+
+ kJustificationStateTableFormat = 1;
+
+ { WSI's internal limitation <12> }
+ kMaxJustificationStringLength = 13;
+
+
+type
+ WSIJustificationPriority = UInt8;
+
+const
+ WSIJustificationSetMarkMask = $80;
+
+
+type
+ WSIJustificationStateEntryPtr = ^WSIJustificationStateEntry;
+ WSIJustificationStateEntry = packed record
+ markPriority: WSIJustificationPriority; { non-zero priorities means insertion }
+ priority: WSIJustificationPriority;
+ newState: WSIStateOffset;
+ end;
+
+ WSIJustificationClasses = UInt16;
+
+const
+ wsiJustEndOfLineClass = 0;
+ wsiJustEndOfRunClass = 1;
+ wsiJustDeletedGlyphClass = 2;
+ wsiJustUserDefinedClass = 3;
+
+
+type
+ WSIJustificationStates = UInt16;
+
+const
+ wsiStartOfLineState = 0; { pre-defined states }
+ wsiStartOfRunState = 1;
+ wsiUserDefinedState = 2;
+
+ { pre-multiplied: class# * sizeof(WSIJustificationStateEntry) }
+
+type
+ WSIJustificationClassOffset = UInt8;
+ WSIJustificationStateTablePtr = ^WSIJustificationStateTable;
+ WSIJustificationStateTable = record
+ maxPriorities: SInt16;
+ rowWidth: UInt16; { width of a state table row in bytes }
+ classTableOffset: SInt16;
+ stateTableOffset: SInt16;
+ end;
+
+ {
+ Last two fields of above structure - someday?
+ WSIJustificationClassOffset classes[up to 64 classes supported];
+ WSIJustificationStateEntry states[up to your heart's desire];
+ }
+ WSIJustificationHeaderPtr = ^WSIJustificationHeader;
+ WSIJustificationHeader = record
+ version: SInt16;
+ format: SInt16;
+ scaling: Point; { numer/denom scaling of priority weights <7> }
+ spacesPerInsertion: UInt16; { # of $20 chars in justification insertion string <12> }
+ justStringOffset: UInt16; { offset to justification string }
+ stateTable: WSIJustificationStateTable; { long-aligned boundary aligned w/ spacesPerInsertion field - justification string follows }
+ end;
+
+
+ { Line Layout's Property table version <11> }
+
+const
+ { v1.0 }
+ currentPropsTableVersion = $00010000;
+
+ { version is octal 0100 or hex 0x40 (#64) }
+ kCharToGlyphCurrentVersion = $40;
+
+ { pass as priorityWeight to JustifyWSILayout to use script's current just setting }
+ kScriptsDefaultJustWeight = -1;
+
+
+ { feature selectors used in FindScriptRun and itl5 configuration tables <9> }
+
+type
+ WSIFeatureType = UInt16;
+ WSIFeatureSelector = UInt16;
+ WSIFeaturePtr = ^WSIFeature;
+ WSIFeature = record
+ featureType: WSIFeatureType;
+ featureSelector: WSIFeatureSelector;
+ end;
+
+{$ALIGN MAC68K}
+
+
+{unit ABGlobals}
+{
+ * ABGlobals.h
+ * AddressBook Framework
+ *
+ * Copyright (c) 2002-2003 Apple Computer. All rights reserved.
+ *
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, Feburary 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+// NOTE: This header is for C programmers. For Objective-C use ABGlobals.h
+
+// ================================================================
+// Global Table properties
+// ================================================================
+
+// ----- Properties common to all Records
+
+var kABUIDProperty: CFStringRef; external name '_kABUIDProperty'; (* attribute const *) // The UID property - kABStringProperty
+var kABCreationDateProperty: CFStringRef; external name '_kABCreationDateProperty'; (* attribute const *) // Creation Date (when first saved) - kABDateProperty
+var kABModificationDateProperty: CFStringRef; external name '_kABModificationDateProperty'; (* attribute const *) // Last saved date - kABDateProperty
+
+// ----- Person specific properties
+
+var kABFirstNameProperty: CFStringRef; external name '_kABFirstNameProperty'; (* attribute const *) // First name - kABStringProperty
+var kABLastNameProperty: CFStringRef; external name '_kABLastNameProperty'; (* attribute const *) // Last name - kABStringProperty
+
+var kABFirstNamePhoneticProperty: CFStringRef; external name '_kABFirstNamePhoneticProperty'; (* attribute const *) // First name Phonetic - kABStringProperty
+var kABLastNamePhoneticProperty: CFStringRef; external name '_kABLastNamePhoneticProperty'; (* attribute const *) // Last name Phonetic - kABStringProperty
+
+var kABNicknameProperty: CFStringRef; external name '_kABNicknameProperty'; (* attribute const *) // kABStringProperty
+var kABMaidenNameProperty: CFStringRef; external name '_kABMaidenNameProperty'; (* attribute const *) // kABStringProperty
+
+var kABBirthdayProperty: CFStringRef; external name '_kABBirthdayProperty'; (* attribute const *) // Birth date - kABDateProperty
+
+var kABOrganizationProperty: CFStringRef; external name '_kABOrganizationProperty'; (* attribute const *) // Company name - kABStringProperty
+
+var kABJobTitleProperty: CFStringRef; external name '_kABJobTitleProperty'; (* attribute const *) // Job Title - kABStringProperty
+
+// Deprecated in Mac OS 10.4. You should use kABURLsProperty.
+var kABHomePageProperty: CFStringRef; external name '_kABHomePageProperty'; (* attribute const *) // Home Web page - kABStringProperty
+
+var kABURLsProperty: CFStringRef; external name '_kABURLsProperty'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // URLs - kABMultiStringProperty
+var kABHomePageLabel: CFStringRef; external name '_kABHomePageLabel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // Homepage URL
+
+var kABEmailProperty: CFStringRef; external name '_kABEmailProperty'; (* attribute const *) // Email(s) - kABMultiStringProperty
+var kABEmailWorkLabel: CFStringRef; external name '_kABEmailWorkLabel'; (* attribute const *) // Home email
+var kABEmailHomeLabel: CFStringRef; external name '_kABEmailHomeLabel'; (* attribute const *) // Work email
+
+var kABAddressProperty: CFStringRef; external name '_kABAddressProperty'; (* attribute const *) // Street Addresses - kABMultiDictionaryProperty
+var kABAddressStreetKey: CFStringRef; external name '_kABAddressStreetKey'; (* attribute const *) // Street
+var kABAddressCityKey: CFStringRef; external name '_kABAddressCityKey'; (* attribute const *) // City
+var kABAddressStateKey: CFStringRef; external name '_kABAddressStateKey'; (* attribute const *) // State
+var kABAddressZIPKey: CFStringRef; external name '_kABAddressZIPKey'; (* attribute const *) // Zip
+var kABAddressCountryKey: CFStringRef; external name '_kABAddressCountryKey'; (* attribute const *) // Country
+var kABAddressCountryCodeKey: CFStringRef; external name '_kABAddressCountryCodeKey'; (* attribute const *) // Country Code
+var kABAddressHomeLabel: CFStringRef; external name '_kABAddressHomeLabel'; (* attribute const *) // Home Address
+var kABAddressWorkLabel: CFStringRef; external name '_kABAddressWorkLabel'; (* attribute const *) // Work Address
+
+{
+ * kABAddressCountryCodeKey code must be one of the following:
+ * iso country codes
+ *
+ * ae = United Arab Emirates
+ * ar = Argentina
+ * at = Austria
+ * au = Australia
+ * ba = Bosnia and Herzegovina
+ * be = Belgium
+ * bg = Bulgaria
+ * bh = Bahrain
+ * br = Brazil
+ * ca = Canada
+ * ch = Switzerland
+ * cn = China
+ * cs = Czech
+ * de = Germany
+ * dk = Denmark
+ * eg = Egypt
+ * es = Spain
+ * fi = Finland
+ * fr = France
+ * gr = Greece
+ * gl = Greenland
+ * hk = Hong Kong
+ * hr = Croatia
+ * hu = Hungary
+ * ie = Ireland
+ * il = Israel
+ * id = Indonesia
+ * in = India
+ * is = Iceland
+ * it = Italy
+ * ja = Japan
+ * jo = Jordan
+ * kr = South Korea
+ * kw = Kuwait
+ * lb = Lebanon
+ * lu = Luxembourg
+ * mk = Macedonia
+ * mx = Mexico
+ * nl = Netherlands
+ * no = Norway
+ * nz = New Zealand
+ * om = Oman
+ * pl = Poland
+ * pt = Portugal
+ * qa = Qatar
+ * ro = Romania
+ * ru = Russian Federation
+ * sa = Saudi Arabia
+ * se = Sweden
+ * sg = Singapore
+ * si = Slovenia
+ * sk = Slovakia
+ * sy = Syrian Arab Republic
+ * tw = Taiwan
+ * tr = Turkey
+ * ua = Ukraine
+ * uk = United Kingdom
+ * us = United States
+ * ye = Yemen
+ * yu = Serbia and Montenegro
+ * za = South Africa
+ *
+ }
+
+var kABOtherDatesProperty: CFStringRef; external name '_kABOtherDatesProperty'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // Dates associated with this person - kABMultiDateProperty - (Person)
+var kABAnniversaryLabel: CFStringRef; external name '_kABAnniversaryLabel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+var kABRelatedNamesProperty: CFStringRef; external name '_kABRelatedNamesProperty'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // names - kABMultiStringProperty
+var kABFatherLabel: CFStringRef; external name '_kABFatherLabel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kABMotherLabel: CFStringRef; external name '_kABMotherLabel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kABParentLabel: CFStringRef; external name '_kABParentLabel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kABBrotherLabel: CFStringRef; external name '_kABBrotherLabel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kABSisterLabel: CFStringRef; external name '_kABSisterLabel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kABChildLabel: CFStringRef; external name '_kABChildLabel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kABFriendLabel: CFStringRef; external name '_kABFriendLabel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kABSpouseLabel: CFStringRef; external name '_kABSpouseLabel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kABPartnerLabel: CFStringRef; external name '_kABPartnerLabel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kABAssistantLabel: CFStringRef; external name '_kABAssistantLabel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kABManagerLabel: CFStringRef; external name '_kABManagerLabel'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+var kABDepartmentProperty: CFStringRef; external name '_kABDepartmentProperty'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // Department name - (Person)
+
+var kABPersonFlags: CFStringRef; external name '_kABPersonFlags'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // Various flags - kABIntegerProperty
+
+const
+ kABShowAsMask = 7;
+ kABShowAsPerson = 0;
+ kABShowAsCompany = 1;
+
+ kABNameOrderingMask = 7 shl 3;
+ kABDefaultNameOrdering = 0 shl 3;
+ kABFirstNameFirst = 4 shl 3;
+ kABLastNameFirst = 2 shl 3;
+
+var kABPhoneProperty: CFStringRef; external name '_kABPhoneProperty'; (* attribute const *) // Generic phone number - kABMultiStringProperty
+var kABPhoneWorkLabel: CFStringRef; external name '_kABPhoneWorkLabel'; (* attribute const *) // Work phone
+var kABPhoneHomeLabel: CFStringRef; external name '_kABPhoneHomeLabel'; (* attribute const *) // Home phone
+var kABPhoneMobileLabel: CFStringRef; external name '_kABPhoneMobileLabel'; (* attribute const *) // Cell phone
+var kABPhoneMainLabel: CFStringRef; external name '_kABPhoneMainLabel'; (* attribute const *) // Main phone
+var kABPhoneHomeFAXLabel: CFStringRef; external name '_kABPhoneHomeFAXLabel'; (* attribute const *) // FAX number
+var kABPhoneWorkFAXLabel: CFStringRef; external name '_kABPhoneWorkFAXLabel'; (* attribute const *) // FAX number
+var kABPhonePagerLabel: CFStringRef; external name '_kABPhonePagerLabel'; (* attribute const *) // Pager number
+
+var kABAIMInstantProperty: CFStringRef; external name '_kABAIMInstantProperty'; (* attribute const *) // AIM Instant Messaging - kABMultiStringProperty
+var kABAIMWorkLabel: CFStringRef; external name '_kABAIMWorkLabel'; (* attribute const *)
+var kABAIMHomeLabel: CFStringRef; external name '_kABAIMHomeLabel'; (* attribute const *)
+
+var kABJabberInstantProperty: CFStringRef; external name '_kABJabberInstantProperty'; (* attribute const *) // Jabber Instant Messaging - kABMultiStringProperty
+var kABJabberWorkLabel: CFStringRef; external name '_kABJabberWorkLabel'; (* attribute const *)
+var kABJabberHomeLabel: CFStringRef; external name '_kABJabberHomeLabel'; (* attribute const *)
+
+var kABMSNInstantProperty: CFStringRef; external name '_kABMSNInstantProperty'; (* attribute const *) // MSN Instant Messaging - kABMultiStringProperty
+var kABMSNWorkLabel: CFStringRef; external name '_kABMSNWorkLabel'; (* attribute const *)
+var kABMSNHomeLabel: CFStringRef; external name '_kABMSNHomeLabel'; (* attribute const *)
+
+var kABYahooInstantProperty: CFStringRef; external name '_kABYahooInstantProperty'; (* attribute const *) // Yahoo Instant Messaging - kABMultiStringProperty
+var kABYahooWorkLabel: CFStringRef; external name '_kABYahooWorkLabel'; (* attribute const *)
+var kABYahooHomeLabel: CFStringRef; external name '_kABYahooHomeLabel'; (* attribute const *)
+
+var kABICQInstantProperty: CFStringRef; external name '_kABICQInstantProperty'; (* attribute const *) // ICQ Instant Messaging - kABMultiStringProperty
+var kABICQWorkLabel: CFStringRef; external name '_kABICQWorkLabel'; (* attribute const *)
+var kABICQHomeLabel: CFStringRef; external name '_kABICQHomeLabel'; (* attribute const *)
+
+var kABNoteProperty: CFStringRef; external name '_kABNoteProperty'; (* attribute const *) // Note - kABStringProperty
+
+var kABMiddleNameProperty: CFStringRef; external name '_kABMiddleNameProperty'; (* attribute const *) // kABStringProperty
+var kABMiddleNamePhoneticProperty: CFStringRef; external name '_kABMiddleNamePhoneticProperty'; (* attribute const *) // kABStringProperty
+var kABTitleProperty: CFStringRef; external name '_kABTitleProperty'; (* attribute const *) // kABStringProperty "Sir" "Duke" "General" "Lord"
+var kABSuffixProperty: CFStringRef; external name '_kABSuffixProperty'; (* attribute const *) // kABStringProperty "Sr." "Jr." "III"
+
+// ----- Group Specific Properties
+
+var kABGroupNameProperty: CFStringRef; external name '_kABGroupNameProperty'; (* attribute const *) // Name of the group - kABStringProperty
+
+// ================================================================
+// Generic Labels
+// ================================================================
+
+ // All kABXXXXWorkLabel are equivalent to this label
+var kABWorkLabel: CFStringRef; external name '_kABWorkLabel'; (* attribute const *)
+
+ // All kABXXXXHomeLabel are equivalent to this label
+var kABHomeLabel: CFStringRef; external name '_kABHomeLabel'; (* attribute const *)
+
+ // Can be used with any multi-value property
+var kABOtherLabel: CFStringRef; external name '_kABOtherLabel'; (* attribute const *)
+
+// ================================================================
+// Notifications published when something changes
+// ================================================================
+// These notifications are not sent until ABGetSharedAddressBook()
+// has been called somewhere
+
+ // This process has changed the DB
+var kABDatabaseChangedNotification: CFStringRef; external name '_kABDatabaseChangedNotification'; (* attribute const *)
+
+ // Another process has changed the DB
+var kABDatabaseChangedExternallyNotification: CFStringRef; external name '_kABDatabaseChangedExternallyNotification'; (* attribute const *)
+
+ // The user info (dictionary) in the above notification will contain
+ // the following 3 keys. Value for each keys is an array of
+ // uniqueId of the Inserted/Updated/Deleted Records.
+ // If all three values are nil assume that everything has changed (could be the case
+ // when restoring from backup)
+var kABInsertedRecords: CFStringRef; external name '_kABInsertedRecords'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kABUpdatedRecords: CFStringRef; external name '_kABUpdatedRecords'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kABDeletedRecords: CFStringRef; external name '_kABDeletedRecords'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+// ================================================================
+// Localization of property or label
+// ================================================================
+
+ // Returns the localized version of built in properties, labels or keys
+ // Returns propertyOrLabel if not found (e.g. if not built in)
+function ABLocalizedPropertyOrLabel( propertyOrLabel: CFStringRef ): CFStringRef; external name '_ABLocalizedPropertyOrLabel';
+
+{unit AXTextAttributedString}
+{
+ * AXTextAttributedString.h
+ *
+ * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+var kAXFontTextAttribute: CFStringRef; external name '_kAXFontTextAttribute'; (* attribute const *) // CFDictionaryRef - see kAXFontTextAttribute keys below
+var kAXForegroundColorTextAttribute: CFStringRef; external name '_kAXForegroundColorTextAttribute'; (* attribute const *) // CGColorRef
+var kAXBackgroundColorTextAttribute: CFStringRef; external name '_kAXBackgroundColorTextAttribute'; (* attribute const *) // CGColorRef
+var kAXUnderlineColorTextAttribute: CFStringRef; external name '_kAXUnderlineColorTextAttribute'; (* attribute const *) // CGColorRef
+var kAXStrikethroughColorTextAttribute: CFStringRef; external name '_kAXStrikethroughColorTextAttribute'; (* attribute const *) // CGColorRef
+var kAXUnderlineTextAttribute: CFStringRef; external name '_kAXUnderlineTextAttribute'; (* attribute const *) // CFNumberRef - AXUnderlineStyle
+var kAXSuperscriptTextAttribute: CFStringRef; external name '_kAXSuperscriptTextAttribute'; (* attribute const *) // CFNumberRef = + number for superscript - for subscript
+var kAXStrikethroughTextAttribute: CFStringRef; external name '_kAXStrikethroughTextAttribute'; (* attribute const *) // CFBooleanRef
+var kAXShadowTextAttribute: CFStringRef; external name '_kAXShadowTextAttribute'; (* attribute const *) // CFBooleanRef
+
+var kAXAttachmentTextAttribute: CFStringRef; external name '_kAXAttachmentTextAttribute'; (* attribute const *) // AXUIElementRef
+var kAXLinkTextAttribute: CFStringRef; external name '_kAXLinkTextAttribute'; (* attribute const *) // AXUIElementRef
+
+var kAXNaturalLanguageTextAttribute: CFStringRef; external name '_kAXNaturalLanguageTextAttribute'; (* attribute const *) // CFStringRef - the spoken language of the text
+var kAXReplacementStringTextAttribute: CFStringRef; external name '_kAXReplacementStringTextAttribute'; (* attribute const *) // CFStringRef
+
+var kAXMisspelledTextAttribute: CFStringRef; external name '_kAXMisspelledTextAttribute'; (* attribute const *) // AXUIElementRef
+
+// kAXFontTextAttribute keys
+var kAXFontNameKey: CFStringRef; external name '_kAXFontNameKey'; (* attribute const *) // CFStringRef - required
+var kAXFontFamilyKey: CFStringRef; external name '_kAXFontFamilyKey'; (* attribute const *) // CFStringRef - not required
+var kAXVisibleNameKey: CFStringRef; external name '_kAXVisibleNameKey'; (* attribute const *) // CFStringRef - not required
+var kAXFontSizeKey: CFStringRef; external name '_kAXFontSizeKey'; (* attribute const *) // CFNumberRef - required
+
+const
+ kAXUnderlineStyleNone = $0;
+ kAXUnderlineStyleSingle = $1;
+ kAXUnderlineStyleThick = $2;
+ kAXUnderlineStyleDouble = $9;
+type
+ AXUnderlineStyle = UInt32;
+
+
+// DO NOT USE. This is an old, misspelled version of one of the above constants.
+var kAXForegoundColorTextAttribute: CFStringRef; external name '_kAXForegoundColorTextAttribute'; (* attribute const *) // CGColorRef
+
+{unit AXValue}
+{
+ * AXValue.h
+ * Accessibility
+ *
+ * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ *
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+{ Pascal Translation Updated: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+type AXValueType = UInt32;
+const
+ { Types from CoreGraphics.h }
+ kAXValueCGPointType = 1;
+ kAXValueCGSizeType = 2;
+ kAXValueCGRectType = 3;
+
+ { Types from CFBase.h }
+ kAXValueCFRangeType = 4;
+
+ { Types from AXError.h }
+ kAXValueAXErrorType = 5;
+
+ { Other }
+ kAXValueIllegalType = 0;
+
+type AXValueRef = ^UInt32;
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function AXValueGetTypeID: CFTypeID; external name '_AXValueGetTypeID';
+
+
+function AXValueCreate( theType: AXValueType; valuePtr: UnivPtr ): AXValueRef; external name '_AXValueCreate';
+function AXValueGetType( value: AXValueRef ): AXValueType; external name '_AXValueGetType';
+
+function AXValueGetValue( value: AXValueRef; theType: AXValueType; valuePtr: UnivPtr ): Boolean; external name '_AXValueGetValue';
+
+{unit AuthSession}
+{
+ * Copyright (c) 2000-2003 Apple Computer, Inc. All Rights Reserved.
+ *
+ * The contents of this file constitute Original Code as defined in and are
+ * subject to the Apple Public Source License Version 1.2 (the 'License').
+ * You may not use this file except in compliance with the License. Please obtain
+ * a copy of the License at http://www.apple.com/publicsource and read it before
+ * using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY of ANY KIND, EITHER EXPRESS
+ * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
+ * LIMITATION, ANY WARRANTIES of MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
+ * specific language governing rights and limitations under the License.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ * AuthSession.h
+ * AuthSession - APIs for managing login, authorization, and security Sessions.
+ }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+{!
+ @header AuthSession
+
+ 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).
+}
+
+
+{!
+ @typedef SecuritySessionId
+ These are externally visible identifiers for authorization sessions.
+ Different sessions have different identifiers; beyond that, you can't
+ tell anything from these values.
+ SessionIds can be compared for equality as you'd expect, but you should be careful
+ to use attribute bits wherever appropriate.
+}
+type
+ SecuritySessionId = UInt32;
+ SecuritySessionIdPtr = ^SecuritySessionId;
+
+
+{!
+ @enum SecuritySessionId
+ Here are some special values for SecuritySessionId. You may specify those
+ on input to SessionAPI functions. They will never be returned from such
+ functions.
+}
+const
+ noSecuritySession = 0; { definitely not a valid SecuritySessionId }
+ callerSecuritySession = -1; { the Session I (the caller) am in }
+
+
+{!
+ @enum SessionAttributeBits
+ Each Session has a set of attribute bits. You can get those from the
+ SessionGetInfo API function.
+ }
+type
+ SessionAttributeBits = UInt32;
+ SessionAttributeBitsPtr = ^SessionAttributeBits;
+
+const
+ sessionIsRoot = $0001; { is the root session (startup/system programs) }
+ sessionHasGraphicAccess = $0010; { graphic subsystem (CoreGraphics et al) available }
+ sessionHasTTY = $0020; { /dev/tty is available }
+ sessionIsRemote = $1000; { session was established over the network }
+
+ // the following bits are used internally; do not try to set them
+ sessionWasInitialized = $8000; { session has been set up by its leader }
+
+
+{!
+ @enum SessionCreationFlags
+ These flags control how a new session is created by SessionCreate.
+ They have no permanent meaning beyond that.
+ }
+type
+ SessionCreationFlags = UInt32;
+ SessionCreationFlagsPtr = ^SessionCreationFlags;
+
+const
+ sessionKeepCurrentBootstrap = $8000; { caller has allocated sub-bootstrap (expert use only) }
+
+
+{!
+ @enum SessionStatus
+ Error codes returned by AuthSession API.
+ Note that the AuthSession APIs can also return Authorization API error codes.
+}
+const
+ errSessionSuccess = 0; { all is well }
+ errSessionInvalidId = -60500; { invalid session id specified }
+ errSessionInvalidAttributes = -60501; { invalid set of requested attribute bits }
+ errSessionAuthorizationDenied = -60502; { you are not allowed to do this }
+
+ errSessionInternal = errAuthorizationInternal; { internal error }
+ errSessionInvalidFlags = errAuthorizationInvalidFlags; { invalid flags/options }
+
+
+{!
+ @function SessionGetInfo
+ Obtain information about a session. You can ask about any session whose
+ identifier you know. Use the callerSecuritySession constant to ask about
+ your own session (the one your process is in).
+
+ @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 (noErr) or an error cause.
+
+ errSessionInvalidId -60500 Invalid session id specified
+
+}
+function SessionGetInfo( session: SecuritySessionId; sessionId: SecuritySessionIdPtr; attributes: SessionAttributeBitsPtr ): OSStatus; external name '_SessionGetInfo';
+
+
+{!
+ @function SessionCreate
+ This (very specialized) function creates a security session.
+ Upon completion, the new session contains the calling process (and none other).
+ You cannot create a session for someone else, and cannot avoid being placed
+ into the new session. This is (currently) the only call that changes a process's
+ session membership.
+ By default, a new bootstrap subset port is created for the calling process. The process
+ acquires this new port as its bootstrap port, which all its children will inherit.
+ If you happen to have created the subset port on your own, you can pass the
+ sessionKeepCurrentBootstrap flag, and SessionCreate will use it. Note however that
+ you cannot supersede a prior SessionCreate call that way; only a single SessionCreate
+ call is allowed for each Session (however made).
+ This call will discard any security information established for the calling process.
+ In particular, any authorization handles acquired will become invalid, and so will any
+ keychain related information. We recommend that you call SessionCreate before
+ 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 (noErr) or an error cause.
+
+ 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';
+
+{unit CFArray}
+{ CFArray.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{!
+ @header CFArray
+ CFArray implements an ordered, compact container of pointer-sized
+ values. Values are accessed via integer keys (indices), from the
+ range 0 to N-1, where N is the number of values in the array when
+ an operation is performed. The array is said to be "compact" because
+ deleted or inserted values do not leave a gap in the key space --
+ the values with higher-numbered indices have their indices
+ renumbered lower (or higher, in the case of insertion) so that the
+ set of valid indices is always in the integer range [0, N-1]. Thus,
+ the index to access a particular value in the array may change over
+ time as other values are inserted into or deleted from the array.
+
+ Arrays come in two flavors, immutable, which cannot have values
+ added to them or removed from them after the array is created, and
+ mutable, to which you can add values or from which remove values.
+ Mutable arrays have two subflavors, fixed-capacity, for which there
+ is a maximum number set at creation time of values which can be put
+ into the array, and variable capacity, which can have an unlimited
+ number of values (or rather, limited only by constraints external
+ to CFArray, like the amount of available memory). Fixed-capacity
+ arrays can be somewhat higher performing, if you can put a definite
+ upper limit on the number of values that might be put into the
+ array.
+
+ As with all CoreFoundation collection types, arrays maintain hard
+ references on the values you put in them, but the retaining and
+ releasing functions are user-defined callbacks that can actually do
+ whatever the user wants (for example, nothing).
+
+ Computational Complexity
+ The access time for a value in the array is guaranteed to be at
+ worst O(lg N) for any implementation, current and future, but will
+ often be O(1) (constant time). Linear search operations similarly
+ have a worst case complexity of O(N*lg N), though typically the
+ bounds will be tighter, and so on. Insertion or deletion operations
+ will typically be linear in the number of values in the array, but
+ may be O(N*lg N) clearly in the worst case in some implementations.
+ There are no favored positions within the array for performance;
+ that is, it is not necessarily faster to access values with low
+ indices, or to insert or delete values with high indices, or
+ whatever.
+}
+
+
+{!
+ @typedef CFArrayCallBacks
+ Structure containing the callbacks of a CFArray.
+ @field version The version number of the structure type being passed
+ in as a parameter to the CFArray creation functions. This
+ structure is version 0.
+ @field retain The callback used to add a retain for the array on
+ values as they are put into the array. This callback returns
+ the value to store in the array, which is usually the value
+ parameter passed to this callback, but may be a different
+ value if a different value should be stored in the array.
+ The array's allocator is passed as the first argument.
+ @field release The callback used to remove a retain previously added
+ for the array from values as they are removed from the
+ array. The array's allocator is passed as the first
+ argument.
+ @field copyDescription The callback used to create a descriptive
+ string representation of each value in the array. This is
+ used by the CFCopyDescription() function.
+ @field equal The callback used to compare values in the array for
+ equality for some operations.
+}
+type
+ CFArrayRetainCallBack = function( allocator: CFAllocatorRef; value: {const} UnivPtr ): UnivPtr;
+ CFArrayReleaseCallBack = procedure( allocator: CFAllocatorRef; value: {const} UnivPtr );
+ CFArrayCopyDescriptionCallBack = function( value: {const} UnivPtr ): CFStringRef;
+ CFArrayEqualCallBack = function( value1: {const} UnivPtr; value2: {const} UnivPtr ): Boolean;
+ CFArrayCallBacks = record
+ version: CFIndex;
+ retain: CFArrayRetainCallBack;
+ release: CFArrayReleaseCallBack;
+ copyDescription: CFArrayCopyDescriptionCallBack;
+ equal: CFArrayEqualCallBack;
+ end;
+ CFArrayCallBacksPtr = ^CFArrayCallBacks;
+
+{!
+ @constant kCFTypeArrayCallBacks
+ Predefined CFArrayCallBacks structure containing a set of callbacks
+ appropriate for use when the values in a CFArray are all CFTypes.
+}
+var kCFTypeArrayCallBacks: CFArrayCallBacks; external name '_kCFTypeArrayCallBacks'; (* attribute const *)
+
+{!
+ @typedef CFArrayApplierFunction
+ Type of the callback function used by the apply functions of
+ CFArrays.
+ @param value The current value from the array.
+ @param context The user-defined context parameter given to the apply
+ function.
+}
+type
+ CFArrayApplierFunction = procedure( value: {const} UnivPtr; context: UnivPtr );
+
+{!
+ @typedef CFArrayRef
+ This is the type of a reference to immutable CFArrays.
+}
+type
+ CFArrayRef = ^SInt32; { an opaque 32-bit type }
+ CFArrayRefPtr = ^CFArrayRef;
+
+{!
+ @typedef CFMutableArrayRef
+ This is the type of a reference to mutable CFArrays.
+}
+type
+ CFMutableArrayRef = CFArrayRef;
+ CFMutableArrayRefPtr = ^CFMutableArrayRef;
+
+{!
+ @function CFArrayGetTypeID
+ Returns the type identifier of all CFArray instances.
+}
+function CFArrayGetTypeID: CFTypeID; external name '_CFArrayGetTypeID';
+
+{!
+ @function CFArrayCreate
+ Creates a new immutable array with the given values.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the array and its storage for values. 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 values A C array of the pointer-sized values to be in the
+ array. The values in the array are ordered in the same order
+ in which they appear in this C array. This parameter may be
+ NULL if the numValues parameter is 0. 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 CFArray. This number will be the count of the
+ array.
+ If this parameter is negative, or greater than the number of
+ values actually in the value's C array, the behavior is
+ undefined.
+ @param callBacks A pointer to a CFArrayCallBacks structure
+ initialized with the callbacks for the array to use on each
+ value in the array. The retain callback will be used within
+ this function, for example, to retain all of the new values
+ from the values C array. A copy of the contents of the
+ callbacks structure is made, so that a pointer to a
+ structure on the stack can be passed in, or can be reused
+ for multiple array creations. If the version field of this
+ callbacks structure is not one of the defined ones for
+ CFArray, the behavior is undefined. The retain field may be
+ NULL, in which case the CFArray will do nothing to add a
+ retain to the contained values for the array. The release
+ field may be NULL, in which case the CFArray will do nothing
+ to remove the array's retain (if any) on the values when the
+ array is destroyed. If the copyDescription field is NULL,
+ the array will create a simple description for the value. If
+ the equal field is NULL, the array will use pointer equality
+ to test for equality of values. This callbacks parameter
+ itself may be NULL, which is treated as if a valid structure
+ of version 0 with all fields NULL had been passed in.
+ Otherwise, if any of the fields are not valid pointers to
+ functions of the correct type, or this parameter is not a
+ valid pointer to a CFArrayCallBacks callbacks structure,
+ the behavior is undefined. If any of the values put into the
+ array is not one understood by one of the callback functions
+ the behavior when that callback function is used is
+ undefined.
+ @result A reference to the new immutable CFArray.
+}
+function CFArrayCreate( allocator: CFAllocatorRef; {const} values: {variable-size-array} UnivPtrPtr; numValues: CFIndex; {const} callBacks: CFArrayCallBacksPtr { can be NULL } ): CFArrayRef; external name '_CFArrayCreate';
+
+{!
+ @function CFArrayCreateCopy
+ Creates a new immutable array with the values from the given array.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the array and its storage for values. 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 theArray The array which is to be copied. The values from the
+ array are copied as pointers into the new array (that is,
+ the values themselves are copied, not that which the values
+ point to, if anything). However, the values are also
+ retained by the new array. The count of the new array will
+ be the same as the given array. The new array uses the same
+ callbacks as the array to be copied. If this parameter is
+ not a valid CFArray, the behavior is undefined.
+ @result A reference to the new immutable CFArray.
+}
+function CFArrayCreateCopy( allocator: CFAllocatorRef; theArray: CFArrayRef ): CFArrayRef; external name '_CFArrayCreateCopy';
+
+{!
+ @function CFArrayCreateMutable
+ Creates a new empty mutable array.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the array and its storage for values. 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 capacity The maximum number of values that can be contained
+ by the CFArray. The array starts empty, and can grow to this
+ number of values (and it can have less). If this parameter
+ is 0, the array's maximum capacity is unlimited (or rather,
+ only limited by address space and available memory
+ constraints). If this parameter is negative, the behavior is
+ undefined.
+ @param callBacks A pointer to a CFArrayCallBacks structure
+ initialized with the callbacks for the array to use on each
+ value in the array. A copy of the contents of the
+ callbacks structure is made, so that a pointer to a
+ structure on the stack can be passed in, or can be reused
+ for multiple array creations. If the version field of this
+ callbacks structure is not one of the defined ones for
+ CFArray, the behavior is undefined. The retain field may be
+ NULL, in which case the CFArray will do nothing to add a
+ retain to the contained values for the array. The release
+ field may be NULL, in which case the CFArray will do nothing
+ to remove the arrays retain (if any) on the values when the
+ array is destroyed. If the copyDescription field is NULL,
+ the array will create a simple description for the value. If
+ the equal field is NULL, the array will use pointer equality
+ to test for equality of values. This callbacks parameter
+ itself may be NULL, which is treated as if a valid structure
+ of version 0 with all fields NULL had been passed in.
+ Otherwise, if any of the fields are not valid pointers to
+ functions of the correct type, or this parameter is not a
+ valid pointer to a CFArrayCallBacks callbacks structure,
+ the behavior is undefined. If any of the values put into the
+ array is not one understood by one of the callback functions
+ the behavior when that callback function is used is
+ undefined.
+ @result A reference to the new mutable CFArray.
+}
+function CFArrayCreateMutable( allocator: CFAllocatorRef; capacity: CFIndex; {const} callBacks: CFArrayCallBacksPtr { can be NULL } ): CFMutableArrayRef; external name '_CFArrayCreateMutable';
+
+{!
+ @function CFArrayCreateMutableCopy
+ Creates a new mutable array with the values from the given array.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the array and its storage for values. 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 capacity The maximum number of values that can be contained
+ by the CFArray. The array starts empty, and can grow to this
+ number of values (and it can have less). If this parameter
+ is 0, the array'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 array which is to be copied, or the
+ behavior is undefined. If this parameter is negative, the
+ behavior is undefined.
+ @param theArray The array which is to be copied. The values from the
+ array are copied as pointers into the new array (that is,
+ the values themselves are copied, not that which the values
+ point to, if anything). However, the values are also
+ retained by the new array. The count of the new array will
+ be the same as the given array. The new array uses the same
+ callbacks as the array to be copied. If this parameter is
+ not a valid CFArray, the behavior is undefined.
+ @result A reference to the new mutable CFArray.
+}
+function CFArrayCreateMutableCopy( allocator: CFAllocatorRef; capacity: CFIndex; theArray: CFArrayRef ): CFMutableArrayRef; external name '_CFArrayCreateMutableCopy';
+
+{!
+ @function CFArrayGetCount
+ Returns the number of values currently in the array.
+ @param theArray The array to be queried. If this parameter is not a valid
+ CFArray, the behavior is undefined.
+ @result The number of values in the array.
+}
+function CFArrayGetCount( theArray: CFArrayRef ): CFIndex; external name '_CFArrayGetCount';
+
+{!
+ @function CFArrayGetCountOfValue
+ Counts the number of times the given value occurs in the array.
+ @param theArray The array to be searched. If this parameter is not a
+ valid CFArray, the behavior is undefined.
+ @param range The range within the array to search. If the range
+ location or end point (defined by the location plus length
+ minus 1) is outside the index space of the array (0 to
+ N-1 inclusive, where N is the count of the array), the
+ behavior is undefined. If the range length is negative, the
+ behavior is undefined. The range may be empty (length 0).
+ @param value The value for which to find matches in the array. The
+ equal() callback provided when the array was created is
+ used to compare. If the equal() callback was NULL, pointer
+ equality (in C, ==) is used. If value, or any of the values
+ in the array, are not understood by the equal() callback,
+ the behavior is undefined.
+ @result The number of times the given value occurs in the array,
+ within the specified range.
+}
+function CFArrayGetCountOfValue( theArray: CFArrayRef; range: CFRange; value: {const} UnivPtr ): CFIndex; external name '_CFArrayGetCountOfValue';
+
+{!
+ @function CFArrayContainsValue
+ Reports whether or not the value is in the array.
+ @param theArray The array to be searched. If this parameter is not a
+ valid CFArray, the behavior is undefined.
+ @param range The range within the array to search. If the range
+ location or end point (defined by the location plus length
+ minus 1) is outside the index space of the array (0 to
+ N-1 inclusive, where N is the count of the array), the
+ behavior is undefined. If the range length is negative, the
+ behavior is undefined. The range may be empty (length 0).
+ @param value The value for which to find matches in the array. The
+ equal() callback provided when the array was created is
+ used to compare. If the equal() callback was NULL, pointer
+ equality (in C, ==) is used. If value, or any of the values
+ in the array, are not understood by the equal() callback,
+ the behavior is undefined.
+ @result true, if the value is in the specified range of the array,
+ otherwise false.
+}
+function CFArrayContainsValue( theArray: CFArrayRef; range: CFRange; value: {const} UnivPtr ): Boolean; external name '_CFArrayContainsValue';
+
+{!
+ @function CFArrayGetValueAtIndex
+ Retrieves the value at the given index.
+ @param theArray The array to be queried. If this parameter is not a
+ valid CFArray, the behavior is undefined.
+ @param idx The index of the value to retrieve. If the index is
+ outside the index space of the array (0 to N-1 inclusive,
+ where N is the count of the array), the behavior is
+ undefined.
+ @result The value with the given index in the array.
+}
+function CFArrayGetValueAtIndex( theArray: CFArrayRef; idx: CFIndex ): UnivPtr; external name '_CFArrayGetValueAtIndex';
+
+{!
+ @function CFArrayGetValues
+ Fills the buffer with values from the array.
+ @param theArray The array to be queried. If this parameter is not a
+ valid CFArray, the behavior is undefined.
+ @param range The range of values within the array to retrieve. If
+ the range location or end point (defined by the location
+ plus length minus 1) is outside the index space of the
+ array (0 to N-1 inclusive, where N is the count of the
+ array), the behavior is undefined. If the range length is
+ negative, the behavior is undefined. The range may be empty
+ (length 0), in which case no values are put into the buffer.
+ @param values A C array of pointer-sized values to be filled with
+ values from the array. The values in the C array are ordered
+ in the same order in which they appear in the array. If this
+ parameter is not a valid pointer to a C array of at least
+ range.length pointers, the behavior is undefined.
+}
+procedure CFArrayGetValues( theArray: CFArrayRef; range: CFRange; {const} values: {variable-size-array} UnivPtrPtr ); external name '_CFArrayGetValues';
+
+{!
+ @function CFArrayApplyFunction
+ Calls a function once for each value in the array.
+ @param theArray The array to be operated upon. If this parameter is not
+ a valid CFArray, the behavior is undefined.
+ @param range The range of values within the array to which to apply
+ the function. If the range location or end point (defined by
+ the location plus length minus 1) is outside the index
+ space of the array (0 to N-1 inclusive, where N is the count
+ of the array), the behavior is undefined. If the range
+ length is negative, the behavior is undefined. The range may
+ be empty (length 0).
+ @param applier The callback function to call once for each value in
+ the given range in the array. If this parameter is not a
+ 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.
+ @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
+ what is expected by the applier function, the behavior is
+ undefined.
+}
+procedure CFArrayApplyFunction( theArray: CFArrayRef; range: CFRange; applier: CFArrayApplierFunction; context: UnivPtr ); external name '_CFArrayApplyFunction';
+
+{!
+ @function CFArrayGetFirstIndexOfValue
+ Searches the array for the value.
+ @param theArray The array to be searched. If this parameter is not a
+ valid CFArray, the behavior is undefined.
+ @param range The range within the array to search. If the range
+ location or end point (defined by the location plus length
+ minus 1) is outside the index space of the array (0 to
+ N-1 inclusive, where N is the count of the array), the
+ behavior is undefined. If the range length is negative, the
+ behavior is undefined. The range may be empty (length 0).
+ The search progresses from the smallest index defined by
+ the range to the largest.
+ @param value The value for which to find a match in the array. The
+ equal() callback provided when the array was created is
+ used to compare. If the equal() callback was NULL, pointer
+ equality (in C, ==) is used. If value, or any of the values
+ in the array, are not understood by the equal() callback,
+ the behavior is undefined.
+ @result The lowest index of the matching values in the range, or
+ kCFNotFound if no value in the range matched.
+}
+function CFArrayGetFirstIndexOfValue( theArray: CFArrayRef; range: CFRange; value: {const} UnivPtr ): CFIndex; external name '_CFArrayGetFirstIndexOfValue';
+
+{!
+ @function CFArrayGetLastIndexOfValue
+ Searches the array for the value.
+ @param theArray The array to be searched. If this parameter is not a
+ valid CFArray, the behavior is undefined.
+ @param range The range within the array to search. If the range
+ location or end point (defined by the location plus length
+ minus 1) is outside the index space of the array (0 to
+ N-1 inclusive, where N is the count of the array), the
+ behavior is undefined. If the range length is negative, the
+ behavior is undefined. The range may be empty (length 0).
+ The search progresses from the largest index defined by the
+ range to the smallest.
+ @param value The value for which to find a match in the array. The
+ equal() callback provided when the array was created is
+ used to compare. If the equal() callback was NULL, pointer
+ equality (in C, ==) is used. If value, or any of the values
+ in the array, are not understood by the equal() callback,
+ the behavior is undefined.
+ @result The highest index of the matching values in the range, or
+ kCFNotFound if no value in the range matched.
+}
+function CFArrayGetLastIndexOfValue( theArray: CFArrayRef; range: CFRange; value: {const} UnivPtr ): CFIndex; external name '_CFArrayGetLastIndexOfValue';
+
+{!
+ @function CFArrayBSearchValues
+ Searches the array for the value using a binary search algorithm.
+ @param theArray The array to be searched. If this parameter is not a
+ valid CFArray, the behavior is undefined. If the array is
+ not sorted from least to greatest according to the
+ comparator function, the behavior is undefined.
+ @param range The range within the array to search. If the range
+ location or end point (defined by the location plus length
+ minus 1) is outside the index space of the array (0 to
+ N-1 inclusive, where N is the count of the array), the
+ behavior is undefined. If the range length is negative, the
+ behavior is undefined. The range may be empty (length 0).
+ @param value The value for which to find a match in the array. If
+ value, or any of the values in the array, are not understood
+ by the comparator callback, the behavior is undefined.
+ @param comparator The function with the comparator function type
+ signature which is used in the binary search operation to
+ compare values in the array with the given value. If this
+ parameter is not a pointer to a function of the correct
+ prototype, the behavior is undefined. If there are values
+ in the range which the comparator function does not expect
+ or cannot properly compare, the behavior is undefined.
+ @param context A pointer-sized user-defined value, which is passed
+ as the third parameter to the comparator function, but is
+ otherwise unused by this function. If the context is not
+ what is expected by the comparator function, the behavior is
+ undefined.
+ @result The return value is either 1) the index of a value that
+ matched, if the target value matches one or more in the
+ range, 2) greater than or equal to the end point of the
+ range, if the value is greater than all the values in the
+ range, or 3) the index of the value greater than the target
+ value, if the value lies between two of (or less than all
+ of) the values in the range.
+}
+function CFArrayBSearchValues( theArray: CFArrayRef; range: CFRange; value: {const} UnivPtr; comparator: CFComparatorFunction; context: UnivPtr ): CFIndex; external name '_CFArrayBSearchValues';
+
+{!
+ @function CFArrayAppendValue
+ Adds the value to the array giving it a new largest index.
+ @param theArray The array to which the value is to be added. If this
+ parameter is not a valid mutable CFArray, the behavior is
+ undefined. If the array is a fixed-capacity array and it
+ is full before this operation, the behavior is undefined.
+ @param value The value to add to the array. The value is retained by
+ the array using the retain callback provided when the array
+ was created. If the value is not of the sort expected by the
+ retain callback, the behavior is undefined. The value is
+ assigned to the index one larger than the previous largest
+ index, and the count of the array is increased by one.
+}
+procedure CFArrayAppendValue( theArray: CFMutableArrayRef; value: {const} UnivPtr ); external name '_CFArrayAppendValue';
+
+{!
+ @function CFArrayInsertValueAtIndex
+ Adds the value to the array, giving it the given index.
+ @param theArray The array to which the value is to be added. If this
+ parameter is not a valid mutable CFArray, the behavior is
+ undefined. If the array is a fixed-capacity array and it
+ is full before this operation, the behavior is undefined.
+ @param idx The index to which to add the new value. If the index is
+ outside the index space of the array (0 to N inclusive,
+ where N is the count of the array before the operation), the
+ behavior is undefined. If the index is the same as N, this
+ function has the same effect as CFArrayAppendValue().
+ @param value The value to add to the array. The value is retained by
+ the array using the retain callback provided when the array
+ was created. If the value is not of the sort expected by the
+ retain callback, the behavior is undefined. The value is
+ assigned to the given index, and all values with equal and
+ larger indices have their indexes increased by one.
+}
+procedure CFArrayInsertValueAtIndex( theArray: CFMutableArrayRef; idx: CFIndex; value: {const} UnivPtr ); external name '_CFArrayInsertValueAtIndex';
+
+{!
+ @function CFArraySetValueAtIndex
+ Changes the value with the given index in the array.
+ @param theArray The array in which the value is to be changed. If this
+ parameter is not a valid mutable CFArray, the behavior is
+ undefined. If the array is a fixed-capacity array and it
+ is full before this operation and the index is the same as
+ N, the behavior is undefined.
+ @param idx The index to which to set the new value. If the index is
+ outside the index space of the array (0 to N inclusive,
+ where N is the count of the array before the operation), the
+ behavior is undefined. If the index is the same as N, this
+ function has the same effect as CFArrayAppendValue().
+ @param value The value to set in the array. The value is retained by
+ the array using the retain callback provided when the array
+ was created, and the previous value with that index is
+ released. If the value is not of the sort expected by the
+ retain callback, the behavior is undefined. The indices of
+ other values is not affected.
+}
+procedure CFArraySetValueAtIndex( theArray: CFMutableArrayRef; idx: CFIndex; value: {const} UnivPtr ); external name '_CFArraySetValueAtIndex';
+
+{!
+ @function CFArrayRemoveValueAtIndex
+ Removes the value with the given index from the array.
+ @param theArray The array from which the value is to be removed. If
+ this parameter is not a valid mutable CFArray, the behavior
+ is undefined.
+ @param idx The index from which to remove the value. If the index is
+ outside the index space of the array (0 to N-1 inclusive,
+ where N is the count of the array before the operation), the
+ behavior is undefined.
+}
+procedure CFArrayRemoveValueAtIndex( theArray: CFMutableArrayRef; idx: CFIndex ); external name '_CFArrayRemoveValueAtIndex';
+
+{!
+ @function CFArrayRemoveAllValues
+ Removes all the values from the array, making it empty.
+ @param theArray The array from which all of the values are to be
+ removed. If this parameter is not a valid mutable CFArray,
+ the behavior is undefined.
+}
+procedure CFArrayRemoveAllValues( theArray: CFMutableArrayRef ); external name '_CFArrayRemoveAllValues';
+
+{!
+ @function CFArrayReplaceValues
+ Replaces a range of values in the array.
+ @param theArray The array from which all of the values are to be
+ removed. If this parameter is not a valid mutable CFArray,
+ the behavior is undefined.
+ @param range The range of values within the array to replace. If the
+ range location or end point (defined by the location plus
+ length minus 1) is outside the index space of the array (0
+ to N inclusive, where N is the count of the array), the
+ behavior is undefined. If the range length is negative, the
+ behavior is undefined. The range may be empty (length 0),
+ in which case the new values are merely inserted at the
+ range location.
+ @param newValues A C array of the pointer-sized values to be placed
+ into the array. The new values in the array are ordered in
+ the same order in which they appear in this C array. This
+ parameter may be NULL if the newCount parameter is 0. 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
+ newCount pointers, the behavior is undefined.
+ @param newCount The number of values to copy from the values C
+ array into the CFArray. If this parameter is different than
+ the range length, the excess newCount values will be
+ inserted after the range, or the excess range values will be
+ deleted. This parameter may be 0, in which case no new
+ values are replaced into the array and the values in the
+ range are simply removed. If this parameter is negative, or
+ greater than the number of values actually in the newValues
+ C array, the behavior is undefined.
+}
+procedure CFArrayReplaceValues( theArray: CFMutableArrayRef; range: CFRange; {const} newValues: {variable-size-array} UnivPtrPtr; newCount: CFIndex ); external name '_CFArrayReplaceValues';
+
+{!
+ @function CFArrayExchangeValuesAtIndices
+ Exchanges the values at two indices of the array.
+ @param theArray The array of which the values are to be swapped. If
+ this parameter is not a valid mutable CFArray, the behavior
+ is undefined.
+ @param idx1 The first index whose values should be swapped. If the
+ index is outside the index space of the array (0 to N-1
+ inclusive, where N is the count of the array before the
+ operation), the behavior is undefined.
+ @param idx2 The second index whose values should be swapped. If the
+ index is outside the index space of the array (0 to N-1
+ inclusive, where N is the count of the array before the
+ operation), the behavior is undefined.
+}
+procedure CFArrayExchangeValuesAtIndices( theArray: CFMutableArrayRef; idx1: CFIndex; idx2: CFIndex ); external name '_CFArrayExchangeValuesAtIndices';
+
+{!
+ @function CFArraySortValues
+ Sorts the values in the array using the given comparison function.
+ @param theArray The array whose values are to be sorted. If this
+ parameter is not a valid mutable CFArray, the behavior is
+ undefined.
+ @param range The range of values within the array to sort. If the
+ range location or end point (defined by the location plus
+ length minus 1) is outside the index space of the array (0
+ to N-1 inclusive, where N is the count of the array), the
+ behavior is undefined. If the range length is negative, the
+ behavior is undefined. The range may be empty (length 0).
+ @param comparator The function with the comparator function type
+ signature which is used in the sort operation to compare
+ values in the array with the given value. If this parameter
+ is not a pointer to a function of the correct prototype, the
+ the behavior is undefined. If there are values in the array
+ which the comparator function does not expect or cannot
+ properly compare, the behavior is undefined. The values in
+ the range 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
+ otherwise unused by this function. If the context is not
+ what is expected by the comparator function, the behavior is
+ undefined.
+}
+procedure CFArraySortValues( theArray: CFMutableArrayRef; range: CFRange; comparator: CFComparatorFunction; context: UnivPtr ); external name '_CFArraySortValues';
+
+{!
+ @function CFArrayAppendArray
+ Adds the values from an array to another array.
+ @param theArray The array to which values from the otherArray are to
+ be added. If this parameter is not a valid mutable CFArray,
+ the behavior is undefined. If the array is a fixed-capacity
+ array and adding range.length values from the otherArray
+ exceeds the capacity of the array, the behavior is
+ undefined.
+ @param otherArray The array providing the values to be added to the
+ array. If this parameter is not a valid CFArray, the
+ behavior is undefined.
+ @param otherRange The range within the otherArray from which to add
+ the values to the array. If the range location or end point
+ (defined by the location plus length minus 1) is outside
+ the index space of the otherArray (0 to N-1 inclusive, where
+ N is the count of the otherArray), the behavior is
+ undefined. The new values are retained by the array using
+ the retain callback provided when the array was created. If
+ the values are not of the sort expected by the retain
+ callback, the behavior is undefined. The values are assigned
+ to the indices one larger than the previous largest index
+ in the array, and beyond, and the count of the array is
+ increased by range.length. The values are assigned new
+ indices in the array from smallest to largest index in the
+ order in which they appear in the otherArray.
+}
+procedure CFArrayAppendArray( theArray: CFMutableArrayRef; otherArray: CFArrayRef; otherRange: CFRange ); external name '_CFArrayAppendArray';
+
+
+{unit CFBag}
+{ CFBag.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFBagRetainCallBack = function( allocator: CFAllocatorRef; value: {const} UnivPtr ): UnivPtr;
+ CFBagReleaseCallBack = procedure( allocator: CFAllocatorRef; value: {const} UnivPtr );
+ CFBagCopyDescriptionCallBack = function( value: {const} UnivPtr ): CFStringRef;
+ CFBagEqualCallBack = function( value1: {const} UnivPtr; value2: {const} UnivPtr ): Boolean;
+ CFBagHashCallBack = function( value: {const} UnivPtr ): CFHashCode;
+ CFBagCallBacksPtr = ^CFBagCallBacks;
+ CFBagCallBacks = record
+ version: CFIndex;
+ retain: CFBagRetainCallBack;
+ release: CFBagReleaseCallBack;
+ copyDescription: CFBagCopyDescriptionCallBack;
+ equal: CFBagEqualCallBack;
+ hash: CFBagHashCallBack;
+ end;
+
+var kCFTypeBagCallBacks: CFBagCallBacks; external name '_kCFTypeBagCallBacks'; (* attribute const *)
+var kCFCopyStringBagCallBacks: CFBagCallBacks; external name '_kCFCopyStringBagCallBacks'; (* attribute const *)
+
+type
+ CFBagApplierFunction = procedure( value: {const} UnivPtr; context: UnivPtr );
+
+type
+ CFBagRef = ^SInt32; { an opaque 32-bit type }
+ CFBagRefPtr = ^CFBagRef;
+ CFMutableBagRef = CFBagRef;
+ CFMutableBagRefPtr = ^CFMutableBagRef;
+
+function CFBagGetTypeID: CFTypeID; external name '_CFBagGetTypeID';
+
+function CFBagCreate( allocator: CFAllocatorRef; {const} values: {variable-size-array} UnivPtrPtr; numValues: CFIndex; {const} callBacks: CFBagCallBacksPtr { can be NULL } ): CFBagRef; external name '_CFBagCreate';
+
+function CFBagCreateCopy( allocator: CFAllocatorRef; theBag: CFBagRef ): CFBagRef; external name '_CFBagCreateCopy';
+
+function CFBagCreateMutable( allocator: CFAllocatorRef; capacity: CFIndex; callBacks: CFBagCallBacksPtr ): CFMutableBagRef; external name '_CFBagCreateMutable';
+
+function CFBagCreateMutableCopy( allocator: CFAllocatorRef; capacity: CFIndex; theBag: CFBagRef ): CFMutableBagRef; external name '_CFBagCreateMutableCopy';
+
+function CFBagGetCount( theBag: CFBagRef ): CFIndex; external name '_CFBagGetCount';
+
+function CFBagGetCountOfValue( theBag: CFBagRef; value: {const} UnivPtr ): CFIndex; external name '_CFBagGetCountOfValue';
+
+function CFBagContainsValue( theBag: CFBagRef; value: {const} UnivPtr ): Boolean; external name '_CFBagContainsValue';
+
+function CFBagGetValue( theBag: CFBagRef; value: {const} UnivPtr ): UnivPtr; external name '_CFBagGetValue';
+
+function CFBagGetValueIfPresent( theBag: CFBagRef; candidate: {const} UnivPtr; var value: UnivPtr ): Boolean; external name '_CFBagGetValueIfPresent';
+
+procedure CFBagGetValues( theBag: CFBagRef; {const} values: {variable-size-array} UnivPtrPtr ); external name '_CFBagGetValues';
+
+procedure CFBagApplyFunction( theBag: CFBagRef; applier: CFBagApplierFunction; context: UnivPtr ); external name '_CFBagApplyFunction';
+
+procedure CFBagAddValue( theBag: CFMutableBagRef; value: {const} UnivPtr ); external name '_CFBagAddValue';
+
+procedure CFBagReplaceValue( theBag: CFMutableBagRef; value: {const} UnivPtr ); external name '_CFBagReplaceValue';
+
+procedure CFBagSetValue( theBag: CFMutableBagRef; value: {const} UnivPtr ); external name '_CFBagSetValue';
+
+procedure CFBagRemoveValue( theBag: CFMutableBagRef; value: {const} UnivPtr ); external name '_CFBagRemoveValue';
+
+procedure CFBagRemoveAllValues( theBag: CFMutableBagRef ); external name '_CFBagRemoveAllValues';
+
+
+{unit CFCharacterSet}
+{ CFCharacterSet.h
+ Copyright (c) 1999-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{!
+ @header CFCharacterSet
+ CFCharacterSet represents a set, or a bag, of Unicode characters.
+ The API consists of 3 groups:
+ 1) creation/manipulation of CFCharacterSet instances,
+ 2) query of a single Unicode character membership,
+ and 3) bitmap representation related (reading/writing).
+ Conceptually, CFCharacterSet is a 136K byte bitmap array of
+ which each bit represents a Unicode code point. It could
+ contain the Unicode characters in ISO 10646 Basic Multilingual
+ Plane (BMP) and characters in Plane 1 through Plane 16
+ accessible via surrogate paris in the Unicode Transformation
+ Format, 16-bit encoding form (UTF-16). In other words, it can
+ store values from 0x00000 to 0x10FFFF in the Unicode
+ Transformation Format, 32-bit encoding form (UTF-32). However,
+ in general, how CFCharacterSet stores the information is an
+ implementation detail. Note even CFData used for the external
+ bitmap representation rarely has 136K byte. For detailed
+ discussion of the external bitmap representation, refer to the
+ comments for CFCharacterSetCreateWithBitmapRepresentation below.
+ Note that the existance of non-BMP characters in a character set
+ does not imply the membership of the corresponding surrogate
+ characters. For example, a character set with U+10000 does not
+ match with U+D800.
+}
+
+
+{!
+ @typedef CFCharacterSetRef
+ This is the type of a reference to immutable CFCharacterSets.
+}
+type
+ CFCharacterSetRef = ^SInt32; { an opaque 32-bit type }
+ CFCharacterSetRefPtr = ^CFCharacterSetRef;
+
+{!
+ @typedef CFMutableCharacterSetRef
+ This is the type of a reference to mutable CFMutableCharacterSets.
+}
+type
+ CFMutableCharacterSetRef = CFCharacterSetRef;
+ CFMutableCharacterSetRefPtr = ^CFMutableCharacterSetRef;
+
+{!
+ @typedef CFCharacterSetPredefinedSet
+ Type of the predefined CFCharacterSet selector values.
+}
+type
+ CFCharacterSetPredefinedSet = SInt32;
+const
+ kCFCharacterSetControl = 1; { Control character set (Unicode General Category Cc and Cf) }
+ kCFCharacterSetWhitespace = 2; { Whitespace character set (Unicode General Category Zs and U0009 CHARACTER TABULATION) }
+ kCFCharacterSetWhitespaceAndNewline = 3; { Whitespace and Newline character set (Unicode General Category Z*, U000A ~ U000D, and U0085) }
+ kCFCharacterSetDecimalDigit = 4; { Decimal digit character set }
+ kCFCharacterSetLetter = 5; { Letter character set (Unicode General Category L* & M*) }
+ kCFCharacterSetLowercaseLetter = 6; { Lowercase character set (Unicode General Category Ll) }
+ kCFCharacterSetUppercaseLetter = 7; { Uppercase character set (Unicode General Category Lu and Lt) }
+ kCFCharacterSetNonBase = 8; { Non-base character set (Unicode General Category M*) }
+ kCFCharacterSetDecomposable = 9; { Canonically decomposable character set }
+ kCFCharacterSetAlphaNumeric = 10; { Alpha Numeric character set (Unicode General Category L*, M*, & N*) }
+ kCFCharacterSetPunctuation = 11; { Punctuation character set (Unicode General Category P*) }
+ kCFCharacterSetIllegal = 12; { Illegal character set }
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+ kCFCharacterSetCapitalizedLetter = 13; { Titlecase character set (Unicode General Category Lt) }
+{#endif}
+{#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+ kCFCharacterSetSymbol = 14; { Symbol character set (Unicode General Category S*) }
+{#endif}
+
+{!
+ @function CFCharacterSetGetTypeID
+ Returns the type identifier of all CFCharacterSet instances.
+}
+function CFCharacterSetGetTypeID: CFTypeID; external name '_CFCharacterSetGetTypeID';
+
+{!
+ @function CFCharacterSetGetPredefined
+ Returns a predefined CFCharacterSet instance.
+ @param theSetIdentifier The CFCharacterSetPredefinedSet selector
+ which specifies the predefined character set. If the
+ value is not in CFCharacterSetPredefinedSet, the behavior
+ is undefined.
+ @result A reference to the predefined immutable CFCharacterSet.
+ This instance is owned by CF.
+}
+function CFCharacterSetGetPredefined( theSetIdentifier: CFCharacterSetPredefinedSet ): CFCharacterSetRef; external name '_CFCharacterSetGetPredefined';
+
+{!
+ @function CFCharacterSetCreateWithCharactersInRange
+ Creates a new immutable character set with the values from the given range.
+ @param alloc The CFAllocator which should be used to allocate
+ memory for the array and its storage for values. 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 theRange The CFRange which should be used to specify the
+ Unicode range the character set is filled with. It
+ accepts the range in 32-bit in the UTF-32 format. The
+ valid character point range is from 0x00000 to 0x10FFFF.
+ If the range is outside of the valid Unicode character
+ point, the behavior is undefined.
+ @result A reference to the new immutable CFCharacterSet.
+}
+function CFCharacterSetCreateWithCharactersInRange( alloc: CFAllocatorRef; theRange: CFRange ): CFCharacterSetRef; external name '_CFCharacterSetCreateWithCharactersInRange';
+
+{!
+ @function CFCharacterSetCreateWithCharactersInString
+ Creates a new immutable character set with the values in the given string.
+ @param alloc The CFAllocator which should be used to allocate
+ memory for the array and its storage for values. 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 theString The CFString which should be used to specify
+ the Unicode characters the character set is filled with.
+ If this parameter is not a valid CFString, the behavior
+ is undefined.
+ @result A reference to the new immutable CFCharacterSet.
+}
+function CFCharacterSetCreateWithCharactersInString( alloc: CFAllocatorRef; theString: CFStringRef ): CFCharacterSetRef; external name '_CFCharacterSetCreateWithCharactersInString';
+
+{!
+ @function CFCharacterSetCreateWithBitmapRepresentation
+ Creates a new immutable character set with the bitmap representtion in the given data.
+ @param alloc The CFAllocator which should be used to allocate
+ memory for the array and its storage for values. 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 theData The CFData which should be used to specify the
+ bitmap representation of the Unicode character points
+ the character set is filled with. The bitmap
+ representation could contain all the Unicode character
+ range starting from BMP to Plane 16. The first 8K bytes
+ of the data represents the BMP range. The BMP range 8K
+ bytes can be followed by zero to sixteen 8K byte
+ bitmaps, each one with the plane index byte prepended.
+ For example, the bitmap representing the BMP and Plane 2
+ has the size of 16385 bytes (8K bytes for BMP, 1 byte
+ index + 8K bytes bitmap for Plane 2). The plane index
+ byte, in this case, contains the integer value two. If
+ this parameter is not a valid CFData or it contains a
+ Plane index byte outside of the valid Plane range
+ (1 to 16), the behavior is undefined.
+ @result A reference to the new immutable CFCharacterSet.
+}
+function CFCharacterSetCreateWithBitmapRepresentation( alloc: CFAllocatorRef; theData: CFDataRef ): CFCharacterSetRef; external name '_CFCharacterSetCreateWithBitmapRepresentation';
+
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+{!
+ @function CFCharacterSetCreateInvertedSet
+ Creates a new immutable character set that is the invert of the specified character set.
+ @param alloc The CFAllocator which should be used to allocate
+ memory for the array and its storage for values. 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 theSet The CFCharacterSet which is to be inverted. If this
+ parameter is not a valid CFCharacterSet, the behavior is
+ undefined.
+ @result A reference to the new immutable CFCharacterSet.
+}
+function CFCharacterSetCreateInvertedSet( alloc: CFAllocatorRef; theSet: CFCharacterSetRef ): CFCharacterSetRef; external name '_CFCharacterSetCreateInvertedSet';
+
+{!
+ @function CFCharacterSetIsSupersetOfSet
+ Reports whether or not the character set is a superset of the character set specified as the second parameter.
+ @param theSet The character set to be checked for the membership of theOtherSet.
+ If this parameter is not a valid CFCharacterSet, the behavior is undefined.
+ @param theOtherset The character set to be checked whether or not it is a subset of theSet.
+ If this parameter is not a valid CFCharacterSet, the behavior is undefined.
+}
+function CFCharacterSetIsSupersetOfSet( theSet: CFCharacterSetRef; theOtherset: CFCharacterSetRef ): Boolean; external name '_CFCharacterSetIsSupersetOfSet';
+
+{!
+ @function CFCharacterSetHasMemberInPlane
+ Reports whether or not the character set contains at least one member character in the specified plane.
+ @param theSet The character set to be checked for the membership. If this
+ parameter is not a valid CFCharacterSet, the behavior is undefined.
+ @param thePlane The plane number to be checked for the membership.
+ The valid value range is from 0 to 16. If the value is outside of the valid
+ plane number range, the behavior is undefined.
+}
+function CFCharacterSetHasMemberInPlane( theSet: CFCharacterSetRef; thePlane: CFIndex ): Boolean; external name '_CFCharacterSetHasMemberInPlane';
+{#endif}
+
+{!
+ @function CFCharacterSetCreateMutable
+ Creates a new empty mutable character set.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the array and its storage for values. 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.
+ @result A reference to the new mutable CFCharacterSet.
+}
+function CFCharacterSetCreateMutable( alloc: CFAllocatorRef ): CFMutableCharacterSetRef; external name '_CFCharacterSetCreateMutable';
+
+{#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+{!
+ @function CFCharacterSetCreateCopy
+ Creates a new character set with the values from the given character set. This function tries to compact the backing store where applicable.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the array and its storage for values. 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 theSet The CFCharacterSet which is to be copied. If this
+ parameter is not a valid CFCharacterSet, the behavior is
+ undefined.
+ @result A reference to the new CFCharacterSet.
+}
+function CFCharacterSetCreateCopy( alloc: CFAllocatorRef; theSet: CFCharacterSetRef ): CFCharacterSetRef; external name '_CFCharacterSetCreateCopy';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{#endif} { MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED }
+
+{!
+ @function CFCharacterSetCreateMutableCopy
+ Creates a new mutable character set with the values from the given character set.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the array and its storage for values. 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 theSet The CFCharacterSet which is to be copied. If this
+ parameter is not a valid CFCharacterSet, the behavior is
+ undefined.
+ @result A reference to the new mutable CFCharacterSet.
+}
+function CFCharacterSetCreateMutableCopy( alloc: CFAllocatorRef; theSet: CFCharacterSetRef ): CFMutableCharacterSetRef; external name '_CFCharacterSetCreateMutableCopy';
+
+{!
+ @function CFCharacterSetIsCharacterMember
+ Reports whether or not the Unicode character is in the character set.
+ @param theSet The character set to be searched. If this parameter
+ is not a valid CFCharacterSet, the behavior is undefined.
+ @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.
+ @result true, if the value is in the character set, otherwise false.
+}
+function CFCharacterSetIsCharacterMember( theSet: CFCharacterSetRef; theChar: UniChar ): Boolean; external name '_CFCharacterSetIsCharacterMember';
+
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+{!
+ @function CFCharacterSetIsLongCharacterMember
+ Reports whether or not the UTF-32 character is in the character set.
+ @param theSet The character set to be searched. If this parameter
+ is not a valid CFCharacterSet, the behavior is undefined.
+ @param theChar The UTF-32 character for which to test against the
+ character set.
+ @result true, if the value is in the character set, otherwise false.
+}
+function CFCharacterSetIsLongCharacterMember( theSet: CFCharacterSetRef; theChar: UTF32Char ): Boolean; external name '_CFCharacterSetIsLongCharacterMember';
+{#endif}
+
+{!
+ @function CFCharacterSetCreateBitmapRepresentation
+ Creates a new immutable data with the bitmap representation from the given character set.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the array and its storage for values. 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 theSet The CFCharacterSet which is to be used create the
+ bitmap representation from. Refer to the comments for
+ CFCharacterSetCreateWithBitmapRepresentation for the
+ detailed discussion of the bitmap representation format.
+ If this parameter is not a valid CFCharacterSet, the
+ behavior is undefined.
+ @result A reference to the new immutable CFData.
+}
+function CFCharacterSetCreateBitmapRepresentation( alloc: CFAllocatorRef; theSet: CFCharacterSetRef ): CFDataRef; external name '_CFCharacterSetCreateBitmapRepresentation';
+
+{!
+ @function CFCharacterSetAddCharactersInRange
+ Adds the given range to the charaacter set.
+ @param theSet The character set to which the range is to be added.
+ If this parameter is not a valid mutable CFCharacterSet,
+ the behavior is undefined.
+ @param theRange The range to add to the character set. It accepts
+ the range in 32-bit in the UTF-32 format. The valid
+ character point range is from 0x00000 to 0x10FFFF. If the
+ range is outside of the valid Unicode character point,
+ the behavior is undefined.
+}
+procedure CFCharacterSetAddCharactersInRange( theSet: CFMutableCharacterSetRef; theRange: CFRange ); external name '_CFCharacterSetAddCharactersInRange';
+
+{!
+ @function CFCharacterSetRemoveCharactersInRange
+ Removes the given range from the charaacter set.
+ @param theSet The character set from which the range is to be
+ removed. If this parameter is not a valid mutable
+ CFCharacterSet, the behavior is undefined.
+ @param theRange The range to remove from the character set.
+ It accepts the range in 32-bit in the UTF-32 format.
+ The valid character point range is from 0x00000 to 0x10FFFF.
+ If the range is outside of the valid Unicode character point,
+ the behavior is undefined.
+}
+procedure CFCharacterSetRemoveCharactersInRange( theSet: CFMutableCharacterSetRef; theRange: CFRange ); external name '_CFCharacterSetRemoveCharactersInRange';
+
+{!
+ @function CFCharacterSetAddCharactersInString
+ Adds the characters in the given string to the charaacter set.
+ @param theSet The character set to which the characters in the
+ string are to be added. If this parameter is not a
+ valid mutable CFCharacterSet, the behavior is undefined.
+ @param theString The string to add to the character set.
+ If this parameter is not a valid CFString, the behavior
+ is undefined.
+}
+procedure CFCharacterSetAddCharactersInString( theSet: CFMutableCharacterSetRef; theString: CFStringRef ); external name '_CFCharacterSetAddCharactersInString';
+
+{!
+ @function CFCharacterSetRemoveCharactersInString
+ Removes the characters in the given string from the charaacter set.
+ @param theSet The character set from which the characters in the
+ string are to be remove. If this parameter is not a
+ valid mutable CFCharacterSet, the behavior is undefined.
+ @param theString The string to remove from the character set.
+ If this parameter is not a valid CFString, the behavior
+ is undefined.
+}
+procedure CFCharacterSetRemoveCharactersInString( theSet: CFMutableCharacterSetRef; theString: CFStringRef ); external name '_CFCharacterSetRemoveCharactersInString';
+
+{!
+ @function CFCharacterSetUnion
+ Forms the union with the given character set.
+ @param theSet The destination character set into which the
+ union of the two character sets is stored. If this
+ parameter is not a valid mutable CFCharacterSet, the
+ behavior is undefined.
+ @param theOtherSet The character set with which the union is
+ formed. If this parameter is not a valid CFCharacterSet,
+ the behavior is undefined.
+}
+procedure CFCharacterSetUnion( theSet: CFMutableCharacterSetRef; theOtherSet: CFCharacterSetRef ); external name '_CFCharacterSetUnion';
+
+{!
+ @function CFCharacterSetIntersect
+ Forms the intersection with the given character set.
+ @param theSet The destination character set into which the
+ intersection of the two character sets is stored.
+ If this parameter is not a valid mutable CFCharacterSet,
+ the behavior is undefined.
+ @param theOtherSet The character set with which the intersection
+ is formed. If this parameter is not a valid CFCharacterSet,
+ the behavior is undefined.
+}
+procedure CFCharacterSetIntersect( theSet: CFMutableCharacterSetRef; theOtherSet: CFCharacterSetRef ); external name '_CFCharacterSetIntersect';
+
+{!
+ @function CFCharacterSetInvert
+ Inverts the content of the given character set.
+ @param theSet The character set to be inverted.
+ If this parameter is not a valid mutable CFCharacterSet,
+ the behavior is undefined.
+}
+procedure CFCharacterSetInvert( theSet: CFMutableCharacterSetRef ); external name '_CFCharacterSetInvert';
+
+
+{unit CFLocale}
+{ CFLocale.h
+ Copyright (c) 2002-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3}
+
+
+type
+ CFLocaleRef = ^SInt32; { an opaque 32-bit type }
+
+function CFLocaleGetTypeID: CFTypeID; external name '_CFLocaleGetTypeID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+function CFLocaleGetSystem: CFLocaleRef; external name '_CFLocaleGetSystem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Returns the "root", canonical locale. Contains fixed "backstop" settings.
+
+function CFLocaleCopyCurrent: CFLocaleRef; external name '_CFLocaleCopyCurrent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Returns the logical "user" locale for the current user.
+ // [This is Copy in the sense that you get a retain you have to release,
+ // but we may return the same cached object over and over.] Settings
+ // you get from this locale do not change under you as CFPreferences
+ // are changed (for safety and correctness). Generally you would not
+ // grab this and hold onto it forever, but use it to do the operations
+ // you need to do at the moment, then throw it away. (The non-changing
+ // ensures that all the results of your operations are consistent.)
+
+function CFLocaleCopyAvailableLocaleIdentifiers: CFArrayRef; external name '_CFLocaleCopyAvailableLocaleIdentifiers';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+ // Returns an array of CFStrings that represents all locales for
+ // which locale data is available.
+
+function CFLocaleCopyISOLanguageCodes: CFArrayRef; external name '_CFLocaleCopyISOLanguageCodes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+ // Returns an array of CFStrings that represents all known legal ISO
+ // language codes. Note: many of these will not have any supporting
+ // locale data in Mac OS X.
+
+function CFLocaleCopyISOCountryCodes: CFArrayRef; external name '_CFLocaleCopyISOCountryCodes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+ // Returns an array of CFStrings that represents all known legal ISO
+ // country codes. Note: many of these will not have any supporting
+ // locale data in Mac OS X.
+
+function CFLocaleCopyISOCurrencyCodes: CFArrayRef; external name '_CFLocaleCopyISOCurrencyCodes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+ // Returns an array of CFStrings that represents all known legal ISO
+ // currency codes. Note: some of these may not have any supporting
+ // locale data in Mac OS X.
+
+function CFLocaleCreateCanonicalLanguageIdentifierFromString( allocator: CFAllocatorRef; localeIdentifier: CFStringRef ): CFStringRef; external name '_CFLocaleCreateCanonicalLanguageIdentifierFromString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+ // Map an arbitrary locale identification string (something close at
+ // least) to a canonical language-only identifier.
+
+function CFLocaleCreateCanonicalLocaleIdentifierFromString( allocator: CFAllocatorRef; localeIdentifier: CFStringRef ): CFStringRef; external name '_CFLocaleCreateCanonicalLocaleIdentifierFromString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Map an arbitrary locale identification string (something close at
+ // least) to the canonical identifier.
+
+function CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( allocator: CFAllocatorRef; lcode: LangCode; rcode: RegionCode ): CFStringRef; external name '_CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Map a Mac OS LangCode and RegionCode to the canonical locale identifier.
+
+function CFLocaleCreateComponentsFromLocaleIdentifier( allocator: CFAllocatorRef; localeID: CFStringRef ): CFDictionaryRef; external name '_CFLocaleCreateComponentsFromLocaleIdentifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+ // Parses a locale ID consisting of language, script, country, variant,
+ // and keyword/value pairs into a dictionary. The keys are the constant
+ // CFStrings corresponding to the locale ID components, and the values
+ // will correspond to constants where available.
+ // Example: "en_US@calendar=japanese" yields a dictionary with three
+ // entries: kCFLocaleLanguageCode=en, kCFLocaleCountryCode=US, and
+ // kCFLocaleCalendarIdentifier=kCFJapaneseCalendar.
+
+function CFLocaleCreateLocaleIdentifierFromComponents( allocator: CFAllocatorRef; dictionary: CFDictionaryRef ): CFStringRef; external name '_CFLocaleCreateLocaleIdentifierFromComponents';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+ // Reverses the actions of CFLocaleCreateDictionaryFromLocaleIdentifier,
+ // creating a single string from the data in the dictionary. The
+ // dictionary {kCFLocaleLanguageCode=en, kCFLocaleCountryCode=US,
+ // kCFLocaleCalendarIdentifier=kCFJapaneseCalendar} becomes
+ // "en_US@calendar=japanese".
+
+function CFLocaleCreate( allocator: CFAllocatorRef; localeIdentifier: CFStringRef ): CFLocaleRef; external name '_CFLocaleCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Returns a CFLocaleRef for the locale named by the "arbitrary" locale identifier.
+
+function CFLocaleCreateCopy( allocator: CFAllocatorRef; locale: CFLocaleRef ): CFLocaleRef; external name '_CFLocaleCreateCopy';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Having gotten a CFLocale from somebody, code should make a copy
+ // if it is going to use it for several operations
+ // or hold onto it. In the future, there may be mutable locales.
+
+function CFLocaleGetIdentifier( locale: CFLocaleRef ): CFStringRef; external name '_CFLocaleGetIdentifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Returns the locale's identifier. This may not be the same string
+ // that the locale was created with (CFLocale may canonicalize it).
+
+function CFLocaleGetValue( locale: CFLocaleRef; key: CFStringRef ): CFTypeRef; external name '_CFLocaleGetValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Returns the value for the given key. This is how settings and state
+ // are accessed via a CFLocale. Values might be of any CF type.
+
+function CFLocaleCopyDisplayNameForPropertyValue( displayLocale: CFLocaleRef; key: CFStringRef; value: CFStringRef ): CFStringRef; external name '_CFLocaleCopyDisplayNameForPropertyValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+ // Returns the display name for the given value. The key tells what
+ // the value is, and is one of the usual locale property keys, though
+ // not all locale property keys have values with display name values.
+
+
+// Locale Keys
+var kCFLocaleIdentifier: CFStringRef; external name '_kCFLocaleIdentifier'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFLocaleLanguageCode: CFStringRef; external name '_kCFLocaleLanguageCode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFLocaleCountryCode: CFStringRef; external name '_kCFLocaleCountryCode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFLocaleScriptCode: CFStringRef; external name '_kCFLocaleScriptCode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFLocaleVariantCode: CFStringRef; external name '_kCFLocaleVariantCode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+var kCFLocaleExemplarCharacterSet: CFStringRef; external name '_kCFLocaleExemplarCharacterSet'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFLocaleCalendarIdentifier: CFStringRef; external name '_kCFLocaleCalendarIdentifier'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFLocaleCalendar: CFStringRef; external name '_kCFLocaleCalendar'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFLocaleCollationIdentifier: CFStringRef; external name '_kCFLocaleCollationIdentifier'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFLocaleUsesMetricSystem: CFStringRef; external name '_kCFLocaleUsesMetricSystem'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFLocaleMeasurementSystem: CFStringRef; external name '_kCFLocaleMeasurementSystem'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // "Metric" or "U.S."
+var kCFLocaleDecimalSeparator: CFStringRef; external name '_kCFLocaleDecimalSeparator'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kCFLocaleGroupingSeparator: CFStringRef; external name '_kCFLocaleGroupingSeparator'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kCFLocaleCurrencySymbol: CFStringRef; external name '_kCFLocaleCurrencySymbol'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kCFLocaleCurrencyCode: CFStringRef; external name '_kCFLocaleCurrencyCode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // ISO 3-letter currency code
+
+// Values for kCFLocaleCalendarIdentifier
+var kCFGregorianCalendar: CFStringRef; external name '_kCFGregorianCalendar'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+var kCFBuddhistCalendar: CFStringRef; external name '_kCFBuddhistCalendar'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFChineseCalendar: CFStringRef; external name '_kCFChineseCalendar'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFHebrewCalendar: CFStringRef; external name '_kCFHebrewCalendar'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFIslamicCalendar: CFStringRef; external name '_kCFIslamicCalendar'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFIslamicCivilCalendar: CFStringRef; external name '_kCFIslamicCivilCalendar'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFJapaneseCalendar: CFStringRef; external name '_kCFJapaneseCalendar'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+
+
+{#endif}
+
+
+{unit CFNumberFormatter}
+{ CFNumberFormatter.h
+ Copyright (c) 2003-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3}
+
+
+type
+ CFNumberFormatterRef = ^SInt32; { an opaque 32-bit type }
+
+// CFNumberFormatters are not thread-safe. Do not use one from multiple threads!
+
+function CFNumberFormatterGetTypeID: CFTypeID; external name '_CFNumberFormatterGetTypeID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+// number format styles
+type
+ CFNumberFormatterStyle = SInt32;
+const
+ kCFNumberFormatterNoStyle = 0;
+ kCFNumberFormatterDecimalStyle = 1;
+ kCFNumberFormatterCurrencyStyle = 2;
+ kCFNumberFormatterPercentStyle = 3;
+ kCFNumberFormatterScientificStyle = 4;
+ kCFNumberFormatterSpellOutStyle = 5;
+
+
+function CFNumberFormatterCreate( allocator: CFAllocatorRef; locale: CFLocaleRef; style: CFNumberFormatterStyle ): CFNumberFormatterRef; external name '_CFNumberFormatterCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Returns a CFNumberFormatter, localized to the given locale, which
+ // will format numbers to the given style.
+
+function CFNumberFormatterGetLocale( formatter: CFNumberFormatterRef ): CFLocaleRef; external name '_CFNumberFormatterGetLocale';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+function CFNumberFormatterGetStyle( formatter: CFNumberFormatterRef ): CFNumberFormatterStyle; external name '_CFNumberFormatterGetStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Get the properties with which the number formatter was created.
+
+function CFNumberFormatterGetFormat( formatter: CFNumberFormatterRef ): CFStringRef; external name '_CFNumberFormatterGetFormat';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+procedure CFNumberFormatterSetFormat( formatter: CFNumberFormatterRef; formatString: CFStringRef ); external name '_CFNumberFormatterSetFormat';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Set the format description string of the number formatter. This
+ // overrides the style settings. The format of the format string
+ // is as defined by the ICU library, and is similar to that found
+ // in Microsoft Excel and NSNumberFormatter (and Java I believe).
+ // The number formatter starts with a default format string defined
+ // by the style argument with which it was created.
+
+
+function CFNumberFormatterCreateStringWithNumber( allocator: CFAllocatorRef; formatter: CFNumberFormatterRef; number: CFNumberRef ): CFStringRef; external name '_CFNumberFormatterCreateStringWithNumber';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+function CFNumberFormatterCreateStringWithValue( allocator: CFAllocatorRef; formatter: CFNumberFormatterRef; numberType: CFNumberType; valuePtr: {const} UnivPtr ): CFStringRef; external name '_CFNumberFormatterCreateStringWithValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Create a string representation of the given number or value
+ // using the current state of the number formatter.
+
+
+type
+ CFNumberFormatterOptionFlags = SInt32;
+const
+ kCFNumberFormatterParseIntegersOnly = 1; { only parse integers }
+
+function CFNumberFormatterCreateNumberFromString( allocator: CFAllocatorRef; formatter: CFNumberFormatterRef; strng: CFStringRef; rangep: CFRangePtr; options: CFOptionFlags ): CFNumberRef; external name '_CFNumberFormatterCreateNumberFromString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+function CFNumberFormatterGetValueFromString( formatter: CFNumberFormatterRef; strng: CFStringRef; rangep: CFRangePtr; numberType: CFNumberType; valuePtr: UnivPtr ): Boolean; external name '_CFNumberFormatterGetValueFromString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Parse a string representation of a number using the current state
+ // of the number formatter. The range parameter specifies the range
+ // of the string in which the parsing should occur in input, and on
+ // output indicates the extent that was used; this parameter can
+ // be NULL, in which case the whole string may be used. The
+ // return value indicates whether some number was computed and
+ // (if valuePtr is not NULL) stored at the location specified by
+ // valuePtr. The numberType indicates the type of value pointed
+ // to by valuePtr.
+
+
+procedure CFNumberFormatterSetProperty( formatter: CFNumberFormatterRef; key: CFStringRef; value: CFTypeRef ); external name '_CFNumberFormatterSetProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+function CFNumberFormatterCopyProperty( formatter: CFNumberFormatterRef; key: CFStringRef ): CFTypeRef; external name '_CFNumberFormatterCopyProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Set and get various properties of the number formatter, the set of
+ // which may be expanded in the future.
+
+var kCFNumberFormatterCurrencyCode: CFStringRef; external name '_kCFNumberFormatterCurrencyCode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFNumberFormatterDecimalSeparator: CFStringRef; external name '_kCFNumberFormatterDecimalSeparator'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFNumberFormatterCurrencyDecimalSeparator: CFStringRef; external name '_kCFNumberFormatterCurrencyDecimalSeparator'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFNumberFormatterAlwaysShowDecimalSeparator: CFStringRef; external name '_kCFNumberFormatterAlwaysShowDecimalSeparator'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFBoolean
+var kCFNumberFormatterGroupingSeparator: CFStringRef; external name '_kCFNumberFormatterGroupingSeparator'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFNumberFormatterUseGroupingSeparator: CFStringRef; external name '_kCFNumberFormatterUseGroupingSeparator'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFBoolean
+var kCFNumberFormatterPercentSymbol: CFStringRef; external name '_kCFNumberFormatterPercentSymbol'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFNumberFormatterZeroSymbol: CFStringRef; external name '_kCFNumberFormatterZeroSymbol'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFNumberFormatterNaNSymbol: CFStringRef; external name '_kCFNumberFormatterNaNSymbol'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFNumberFormatterInfinitySymbol: CFStringRef; external name '_kCFNumberFormatterInfinitySymbol'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFNumberFormatterMinusSign: CFStringRef; external name '_kCFNumberFormatterMinusSign'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFNumberFormatterPlusSign: CFStringRef; external name '_kCFNumberFormatterPlusSign'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFNumberFormatterCurrencySymbol: CFStringRef; external name '_kCFNumberFormatterCurrencySymbol'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFNumberFormatterExponentSymbol: CFStringRef; external name '_kCFNumberFormatterExponentSymbol'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFNumberFormatterMinIntegerDigits: CFStringRef; external name '_kCFNumberFormatterMinIntegerDigits'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFNumber
+var kCFNumberFormatterMaxIntegerDigits: CFStringRef; external name '_kCFNumberFormatterMaxIntegerDigits'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFNumber
+var kCFNumberFormatterMinFractionDigits: CFStringRef; external name '_kCFNumberFormatterMinFractionDigits'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFNumber
+var kCFNumberFormatterMaxFractionDigits: CFStringRef; external name '_kCFNumberFormatterMaxFractionDigits'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFNumber
+var kCFNumberFormatterGroupingSize: CFStringRef; external name '_kCFNumberFormatterGroupingSize'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFNumber
+var kCFNumberFormatterSecondaryGroupingSize: CFStringRef; external name '_kCFNumberFormatterSecondaryGroupingSize'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFNumber
+var kCFNumberFormatterRoundingMode: CFStringRef; external name '_kCFNumberFormatterRoundingMode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFNumber
+var kCFNumberFormatterRoundingIncrement: CFStringRef; external name '_kCFNumberFormatterRoundingIncrement'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFNumber
+var kCFNumberFormatterFormatWidth: CFStringRef; external name '_kCFNumberFormatterFormatWidth'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFNumber
+var kCFNumberFormatterPaddingPosition: CFStringRef; external name '_kCFNumberFormatterPaddingPosition'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFNumber
+var kCFNumberFormatterPaddingCharacter: CFStringRef; external name '_kCFNumberFormatterPaddingCharacter'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFNumberFormatterDefaultFormat: CFStringRef; external name '_kCFNumberFormatterDefaultFormat'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFNumberFormatterMultiplier: CFStringRef; external name '_kCFNumberFormatterMultiplier'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFNumber
+var kCFNumberFormatterPositivePrefix: CFStringRef; external name '_kCFNumberFormatterPositivePrefix'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFString
+var kCFNumberFormatterPositiveSuffix: CFStringRef; external name '_kCFNumberFormatterPositiveSuffix'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFString
+var kCFNumberFormatterNegativePrefix: CFStringRef; external name '_kCFNumberFormatterNegativePrefix'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFString
+var kCFNumberFormatterNegativeSuffix: CFStringRef; external name '_kCFNumberFormatterNegativeSuffix'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFString
+var kCFNumberFormatterPerMillSymbol: CFStringRef; external name '_kCFNumberFormatterPerMillSymbol'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFString
+var kCFNumberFormatterInternationalCurrencySymbol: CFStringRef; external name '_kCFNumberFormatterInternationalCurrencySymbol'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFString
+
+type
+ CFNumberFormatterRoundingMode = SInt32;
+const
+ kCFNumberFormatterRoundCeiling = 0;
+ kCFNumberFormatterRoundFloor = 1;
+ kCFNumberFormatterRoundDown = 2;
+ kCFNumberFormatterRoundUp = 3;
+ kCFNumberFormatterRoundHalfEven = 4;
+ kCFNumberFormatterRoundHalfDown = 5;
+ kCFNumberFormatterRoundHalfUp = 6;
+
+type
+ CFNumberFormatterPadPosition = SInt32;
+const
+ kCFNumberFormatterPadBeforePrefix = 0;
+ kCFNumberFormatterPadAfterPrefix = 1;
+ kCFNumberFormatterPadBeforeSuffix = 2;
+ kCFNumberFormatterPadAfterSuffix = 3;
+
+
+function CFNumberFormatterGetDecimalInfoForCurrencyCode( currencyCode: CFStringRef; defaultFractionDigits: SInt32Ptr; roundingIncrement: Float64Ptr ): Boolean; external name '_CFNumberFormatterGetDecimalInfoForCurrencyCode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Returns the number of fraction digits that should be displayed, and
+ // the rounding increment (or 0.0 if no rounding is done by the currency)
+ // for the given currency. Returns false if the currency code is unknown
+ // or the information is not available.
+ // Not localized because these are properties of the currency.
+
+
+{#endif}
+
+
+{unit CFString}
+{ CFString.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{
+Please note: CFStrings are conceptually an array of Unicode characters.
+However, in general, how a CFString stores this array is an implementation
+detail. For instance, CFString might choose to use an array of 8-bit characters;
+to store its contents; or it might use multiple blocks of memory; or whatever.
+Furthermore, the implementation might change depending on the default
+system encoding, the user's language, the OS, or even a given release.
+
+What this means is that you should use the following advanced functions with care:
+
+ CFStringGetPascalStringPtr()
+ CFStringGetCStringPtr()
+ CFStringGetCharactersPtr()
+
+These functions are provided for optimization only. They will either return the desired
+pointer quickly, in constant time, or they return NULL. They might choose to return NULL
+for many reasons; for instance it's possible that for users running in different
+languages these sometimes return NULL; or in a future OS release the first two might
+switch to always returning NULL. Never observing NULL returns in your usages of these
+functions does not mean they won't ever return NULL. (But note the CFStringGetCharactersPtr()
+exception mentioned further below.)
+
+In your usages of these functions, if you get a NULL return, use the non-Ptr version
+of the functions as shown in this example:
+
+ Str255 buffer;
+ StringPtr ptr = CFStringGetPascalStringPtr(str, encoding);
+ if (ptr == NULL) (
+ if (CFStringGetPascalString(str, buffer, 256, encoding)) ptr = buffer;
+ )
+
+Note that CFStringGetPascalString() or CFStringGetCString() calls might still fail --- but
+that will happen in two circumstances only: The conversion from the UniChar contents of CFString
+to the specified encoding fails, or the buffer is too small. If they fail, that means
+the conversion was not possible.
+
+If you need a copy of the buffer in the above example, you might consider simply
+calling CFStringGetPascalString() in all cases --- CFStringGetPascalStringPtr()
+is simply an optimization.
+
+In addition, the following functions, which create immutable CFStrings from developer
+supplied buffers without copying the buffers, might have to actually copy
+under certain circumstances (If they do copy, the buffer will be dealt with by the
+"contentsDeallocator" argument.):
+
+ CFStringCreateWithPascalStringNoCopy()
+ CFStringCreateWithCStringNoCopy()
+ CFStringCreateWithCharactersNoCopy()
+
+You should of course never depend on the backing store of these CFStrings being
+what you provided, and in other no circumstance should you change the contents
+of that buffer (given that would break the invariant about the CFString being immutable).
+
+Having said all this, there are actually ways to create a CFString where the backing store
+is external, and can be manipulated by the developer or CFString itself:
+
+ CFStringCreateMutableWithExternalCharactersNoCopy()
+ CFStringSetExternalCharactersNoCopy()
+
+A "contentsAllocator" is used to realloc or free the backing store by CFString.
+kCFAllocatorNull can be provided to assure CFString will never realloc or free the buffer.
+Developer can call CFStringSetExternalCharactersNoCopy() to update
+CFString's idea of what's going on, if the buffer is changed externally. In these
+strings, CFStringGetCharactersPtr() is guaranteed to return the external buffer.
+
+These functions are here to allow wrapping a buffer of UniChar characters in a CFString,
+allowing the buffer to passed into CFString functions and also manipulated via CFString
+mutation functions. In general, developers should not use this technique for all strings,
+as it prevents CFString from using certain optimizations.
+}
+
+{ Identifier for character encoding; the values are the same as Text Encoding Converter TextEncoding.
+}
+type
+ CFStringEncoding = UInt32;
+ CFStringEncodingPtr = ^CFStringEncoding;
+
+{ Platform-independent built-in encodings; always available on all platforms.
+ Call CFStringGetSystemEncoding() to get the default system encoding.
+}
+type
+ CFStringBuiltInEncodings = SInt32;
+const
+ kCFStringEncodingInvalidId = $FFFFFFFF;
+ kCFStringEncodingMacRoman = 0;
+ kCFStringEncodingWindowsLatin1 = $0500; { ANSI codepage 1252 }
+ kCFStringEncodingISOLatin1 = $0201; { ISO 8859-1 }
+ kCFStringEncodingNextStepLatin = $0B01; { NextStep encoding }
+ kCFStringEncodingASCII = $0600; { 0..127 (in creating CFString, values greater than 0x7F are treated as corresponding Unicode value) }
+ kCFStringEncodingUnicode = $0100; { kTextEncodingUnicodeDefault + kTextEncodingDefaultFormat (aka kUnicode16BitFormat) }
+ kCFStringEncodingUTF8 = $08000100; { kTextEncodingUnicodeDefault + kUnicodeUTF8Format }
+ kCFStringEncodingNonLossyASCII = $0BFF; { 7bit Unicode variants used by YellowBox & Java }
+{#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
+ kCFStringEncodingUTF16 = $0100; { kTextEncodingUnicodeDefault + kUnicodeUTF16Format (alias of kCFStringEncodingUnicode) }
+ kCFStringEncodingUTF16BE = $10000100; { kTextEncodingUnicodeDefault + kUnicodeUTF16BEFormat }
+ kCFStringEncodingUTF16LE = $14000100; { kTextEncodingUnicodeDefault + kUnicodeUTF16LEFormat }
+
+ kCFStringEncodingUTF32 = $0C000100; { kTextEncodingUnicodeDefault + kUnicodeUTF32Format }
+ kCFStringEncodingUTF32BE = $18000100; { kTextEncodingUnicodeDefault + kUnicodeUTF32BEFormat }
+ kCFStringEncodingUTF32LE = $1C000100; { kTextEncodingUnicodeDefault + kUnicodeUTF32LEFormat }
+{#endif} { MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 }
+
+{ CFString type ID }
+function CFStringGetTypeID: CFTypeID; external name '_CFStringGetTypeID';
+
+{ Macro to allow creation of compile-time constant strings; the argument should be a constant string.
+
+CFSTR(), not being a "Copy" or "Create" function, does not return a new
+reference for you. So, you should not release the return value. This is
+much like constant C or Pascal strings --- when you use "hello world"
+in a program, you do not free it.
+
+However, strings returned from CFSTR() can be retained and released in a
+properly nested fashion, just like any other CF type. That is, if you pass
+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.
+
+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,
+it might not work for a user with a different language preference.
+}
+{
+ *** 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
+ 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
+ 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
+ PInterface files defining any constant CFStrings you need.
+}
+
+{
+ CFSTR Must only be called with a constant CString
+}
+function CFSTR( c: PChar ): CFStringRef; external name '___CFStringMakeConstantString';
+{
+ CFSTRP Must only be called with a constant Pascal String
+}
+function CFSTRP( c: PChar ): CFStringRef; external name '___CFStringMakeConstantString';
+
+{
+ CFSTRP0 Must only be called with a constant Pascal String terminated with a chr(0)
+}
+function CFSTRP0( c: PChar ): CFStringRef; external name '___CFStringMakeConstantString';
+
+{** Immutable string creation functions **}
+
+{ Functions to create basic immutable strings. The provided allocator is used for all memory activity in these functions.
+}
+
+{ These functions copy the provided buffer into CFString's internal storage. }
+function CFStringCreateWithPascalString( alloc: CFAllocatorRef; const (*var*) pStr: Str255; encoding: CFStringEncoding ): CFStringRef; external name '_CFStringCreateWithPascalString';
+
+function CFStringCreateWithCString( alloc: CFAllocatorRef; cStr: ConstCStringPtr; encoding: CFStringEncoding ): CFStringRef; external name '_CFStringCreateWithCString';
+
+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
+with the provided contentsDeallocator when it's no longer needed; to not free
+the buffer, specify kCFAllocatorNull here. As usual, NULL means default allocator.
+
+NOTE: Do not count on these buffers as being used by the string;
+in some cases the CFString might free the buffer and use something else
+(for instance if it decides to always use Unicode encoding internally).
+
+NOTE: If you are not transferring ownership of the buffer to the CFString
+(for instance, you supplied contentsDeallocator = kCFAllocatorNull), it is your
+responsibility to assure the buffer does not go away during the lifetime of the string.
+If the string is retained or copied, its lifetime might extend in ways you cannot
+predict. So, for strings created with buffers whose lifetimes you cannot
+guarantee, you need to be extremely careful --- do not hand it out to any
+APIs which might retain or copy the strings.
+}
+function CFStringCreateWithPascalStringNoCopy( alloc: CFAllocatorRef; const (*var*) pStr: Str255; encoding: CFStringEncoding; contentsDeallocator: CFAllocatorRef ): CFStringRef; external name '_CFStringCreateWithPascalStringNoCopy';
+
+function CFStringCreateWithCStringNoCopy( alloc: CFAllocatorRef; cStr: ConstCStringPtr; encoding: CFStringEncoding; contentsDeallocator: CFAllocatorRef ): CFStringRef; external name '_CFStringCreateWithCStringNoCopy';
+
+function CFStringCreateWithCharactersNoCopy( alloc: CFAllocatorRef; chars: UniCharPtr; numChars: CFIndex; contentsDeallocator: CFAllocatorRef ): CFStringRef; external name '_CFStringCreateWithCharactersNoCopy';
+
+{ Create copies of part or all of the string.
+}
+function CFStringCreateWithSubstring( alloc: CFAllocatorRef; str: CFStringRef; range: CFRange ): CFStringRef; external name '_CFStringCreateWithSubstring';
+
+function CFStringCreateCopy( alloc: CFAllocatorRef; theString: CFStringRef ): CFStringRef; external name '_CFStringCreateCopy';
+
+{ These functions create a CFString from the provided printf-like format string and arguments.
+}
+function CFStringCreateWithFormat( alloc: CFAllocatorRef; formatOptions: CFDictionaryRef; format: CFStringRef; ... ): CFStringRef; external name '_CFStringCreateWithFormat';
+
+function CFStringCreateWithFormatAndArguments( alloc: CFAllocatorRef; formatOptions: CFDictionaryRef; format: CFStringRef; arguments: UnivPtr ): CFStringRef; external name '_CFStringCreateWithFormatAndArguments';
+
+{ Functions to create mutable strings. "maxLength", if not 0, is a hard bound on the length of the string. If 0, there is no limit on the length.
+}
+function CFStringCreateMutable( alloc: CFAllocatorRef; maxLength: CFIndex ): CFMutableStringRef; external name '_CFStringCreateMutable';
+
+function CFStringCreateMutableCopy( alloc: CFAllocatorRef; maxLength: CFIndex; theString: CFStringRef ): CFMutableStringRef; external name '_CFStringCreateMutableCopy';
+
+{ This function creates a mutable string that has a developer supplied and directly editable backing store.
+The string will be manipulated within the provided buffer (if any) until it outgrows capacity; then the
+externalCharactersAllocator will be consulted for more memory. When the CFString is deallocated, the
+buffer will be freed with the externalCharactersAllocator. Provide kCFAllocatorNull here to prevent the buffer
+from ever being reallocated or deallocated by CFString. See comments at top of this file for more info.
+}
+function CFStringCreateMutableWithExternalCharactersNoCopy( alloc: CFAllocatorRef; chars: UniCharPtr; numChars: CFIndex; capacity: CFIndex; externalCharactersAllocator: CFAllocatorRef ): CFMutableStringRef; external name '_CFStringCreateMutableWithExternalCharactersNoCopy';
+
+{** Basic accessors for the contents **}
+
+{ Number of 16-bit Unicode characters in the string.
+}
+function CFStringGetLength( theString: CFStringRef ): CFIndex; external name '_CFStringGetLength';
+
+{ Extracting the contents of the string. For obtaining multiple characters, calling
+CFStringGetCharacters() is more efficient than multiple calls to CFStringGetCharacterAtIndex().
+If the length of the string is not known (so you can't use a fixed size buffer for CFStringGetCharacters()),
+another method is to use is CFStringGetCharacterFromInlineBuffer() (see further below).
+}
+function CFStringGetCharacterAtIndex( theString: CFStringRef; idx: CFIndex ): UniChar; external name '_CFStringGetCharacterAtIndex';
+
+procedure CFStringGetCharacters( theString: CFStringRef; range: CFRange; buffer: UniCharPtr ); external name '_CFStringGetCharacters';
+
+
+{** Conversion to other encodings **}
+
+{ These two convert into the provided buffer; they return false if conversion isn't possible
+(due to conversion error, or not enough space in the provided buffer).
+These functions do zero-terminate or put the length byte; the provided bufferSize should include
+space for this (so pass 256 for Str255). More sophisticated usages can go through CFStringGetBytes().
+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 of terminating zero, as desired.
+}
+function CFStringGetPascalString( theString: CFStringRef; buffer: StringPtr; bufferSize: CFIndex; encoding: CFStringEncoding ): Boolean; external name '_CFStringGetPascalString';
+
+function CFStringGetCString( theString: CFStringRef; buffer: CStringPtr; bufferSize: CFIndex; encoding: CFStringEncoding ): Boolean; external name '_CFStringGetCString';
+
+{ These functions attempt to return in O(1) time the desired format for the string.
+Note that although this means a pointer to the internal structure is being returned,
+this can't always be counted on. Please see note at the top of the file for more
+details.
+}
+function CFStringGetPascalStringPtr( theString: CFStringRef; encoding: CFStringEncoding ): ConstStringPtr; external name '_CFStringGetPascalStringPtr'; { May return NULL at any time; be prepared for NULL }
+
+function CFStringGetCStringPtr( theString: CFStringRef; encoding: CFStringEncoding ): ConstCStringPtr; external name '_CFStringGetCStringPtr'; { May return NULL at any time; be prepared for NULL }
+
+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.
+ 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).
+ 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
+ the data to be made persistent to be included; for instance, the Unicode BOM.
+}
+function CFStringGetBytes( theString: CFStringRef; range: CFRange; encoding: CFStringEncoding; lossByte: ByteParameter; isExternalRepresentation: Boolean; buffer: UInt8Ptr; maxBufLen: CFIndex; var usedBufLen: CFIndex ): CFIndex; external name '_CFStringGetBytes';
+
+{ This one goes the other way by creating a CFString from a bag of bytes.
+This is much like CFStringCreateWithPascalString or CFStringCreateWithCString,
+except the length is supplied explicitly. In addition, you can specify whether
+the data is an external format --- that is, whether to pay attention to the
+BOM character (if any) and do byte swapping if necessary
+}
+function CFStringCreateWithBytes( alloc: CFAllocatorRef; bytes: UnivPtr; numBytes: CFIndex; encoding: CFStringEncoding; isExternalRepresentation: Boolean ): CFStringRef; external name '_CFStringCreateWithBytes';
+
+{ Convenience functions String <-> Data. These generate "external" formats, that is, formats that
+ can be written out to disk. For instance, if the encoding is Unicode, CFStringCreateFromExternalRepresentation()
+ pays attention to the BOM character (if any) and does byte swapping if necessary.
+ Similarly CFStringCreateExternalRepresentation() will always include a BOM character if the encoding is
+ Unicode. See above for description of lossByte.
+}
+function CFStringCreateFromExternalRepresentation( alloc: CFAllocatorRef; data: CFDataRef; encoding: CFStringEncoding ): CFStringRef; external name '_CFStringCreateFromExternalRepresentation'; { May return NULL on conversion error }
+
+function CFStringCreateExternalRepresentation( alloc: CFAllocatorRef; theString: CFStringRef; encoding: CFStringEncoding; lossByte: ByteParameter ): CFDataRef; external name '_CFStringCreateExternalRepresentation'; { May return NULL on conversion error }
+
+{ Hints about the contents of a string
+}
+function CFStringGetSmallestEncoding( theString: CFStringRef ): CFStringEncoding; external name '_CFStringGetSmallestEncoding'; { Result in O(n) time max }
+
+function CFStringGetFastestEncoding( theString: CFStringRef ): CFStringEncoding; external name '_CFStringGetFastestEncoding'; { Result in O(1) time max }
+
+{ General encoding info
+}
+function CFStringGetSystemEncoding: CFStringEncoding; external name '_CFStringGetSystemEncoding'; { The default encoding for the system; untagged 8-bit characters are usually in this encoding }
+
+function CFStringGetMaximumSizeForEncoding( length: CFIndex; encoding: CFStringEncoding ): CFIndex; external name '_CFStringGetMaximumSizeForEncoding'; { Max bytes a string of specified length (in UniChars) will take up if encoded }
+
+
+{** FileSystem path conversion functions **}
+
+{ Extract the contents of the string as a NULL-terminated 8-bit string appropriate for passing to POSIX APIs. The string is zero-terminated. false will be returned if the conversion results don't fit into the buffer. Use CFStringGetMaximumSizeOfFileSystemRepresentation() if you want to make sure the buffer is of sufficient length.
+}
+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().
+}
+function CFStringGetMaximumSizeOfFileSystemRepresentation( strng: CFStringRef ): CFIndex; external name '_CFStringGetMaximumSizeOfFileSystemRepresentation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create a CFString from the specified zero-terminated POSIX file system representation. If the conversion fails (possible due to bytes in the buffer not being a valid sequence of bytes for the appropriate character encoding), NULL is returned.
+}
+function CFStringCreateWithFileSystemRepresentation( alloc: CFAllocatorRef; buffer: ConstCStringPtr ): CFStringRef; external name '_CFStringCreateWithFileSystemRepresentation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{** Comparison functions. **}
+
+{ Find and compare flags; these are OR'ed together as compareOptions or searchOptions in the various functions.
+ This typedef doesn't appear in the functions; instead the argument is CFOptionFlags.
+}
+type
+ CFStringCompareFlags = SInt32;
+const
+ { Flags used in all find and compare operations }
+ kCFCompareCaseInsensitive = 1;
+ kCFCompareBackwards = 4; { Starting from the end of the string }
+ kCFCompareAnchored = 8; { Only at the specified starting point }
+ kCFCompareNonliteral = 16; { If specified, loose equivalence is performed (o-umlaut == o, umlaut) }
+ kCFCompareLocalized = 32; { User's default locale is used for the comparisons }
+ kCFCompareNumerically = 64; { Numeric comparison is used; that is, Foo2.txt < Foo7.txt < Foo25.txt }
+
+{ The main comparison routine; compares specified range of the first string to (the full range of) the second string.
+ locale == NULL indicates canonical locale.
+ kCFCompareNumerically, added in 10.2, does not work if kCFCompareLocalized is specified on systems before 10.3
+ kCFCompareBackwards and kCFCompareAnchored are not applicable.
+}
+function CFStringCompareWithOptions( theString1: CFStringRef; theString2: CFStringRef; rangeToCompare: CFRange; compareOptions: CFOptionFlags ): CFComparisonResult; external name '_CFStringCompareWithOptions';
+
+{ Comparison convenience suitable for passing as sorting functions.
+ kCFCompareNumerically, added in 10.2, does not work if kCFCompareLocalized is specified on systems before 10.3
+ kCFCompareBackwards and kCFCompareAnchored are not applicable.
+}
+function CFStringCompare( theString1: CFStringRef; theString2: CFStringRef; compareOptions: CFOptionFlags ): CFComparisonResult; external name '_CFStringCompare';
+
+{ CFStringFindWithOptions() returns the found range in the CFRange * argument; you can pass NULL for simple discovery check.
+ If stringToFind is the empty string (zero length), nothing is found.
+ Ignores the kCFCompareNumerically option.
+}
+function CFStringFindWithOptions( theString: CFStringRef; stringToFind: CFStringRef; rangeToSearch: CFRange; searchOptions: CFOptionFlags; var result: CFRange ): Boolean; external name '_CFStringFindWithOptions';
+
+{ CFStringCreateArrayWithFindResults() returns an array of CFRange pointers, or NULL if there are no matches.
+ Overlapping instances are not found; so looking for "AA" in "AAA" finds just one range.
+ Post 10.1: If kCFCompareBackwards is provided, the scan is done from the end (which can give a different result), and
+ the results are stored in the array backwards (last found range in slot 0).
+ If stringToFind is the empty string (zero length), nothing is found.
+ kCFCompareAnchored causes just the consecutive instances at start (or end, if kCFCompareBackwards) to be reported. So, searching for "AB" in "ABABXAB..." you just get the first two occurrences.
+ Ignores the kCFCompareNumerically option.
+}
+function CFStringCreateArrayWithFindResults( alloc: CFAllocatorRef; theString: CFStringRef; stringToFind: CFStringRef; rangeToSearch: CFRange; compareOptions: CFOptionFlags ): CFArrayRef; external name '_CFStringCreateArrayWithFindResults';
+
+{ Find conveniences; see comments above concerning empty string and options.
+}
+function CFStringFind( theString: CFStringRef; stringToFind: CFStringRef; compareOptions: CFOptionFlags ): CFRange; external name '_CFStringFind';
+
+function CFStringHasPrefix( theString: CFStringRef; prefix: CFStringRef ): Boolean; external name '_CFStringHasPrefix';
+
+function CFStringHasSuffix( theString: CFStringRef; suffix: CFStringRef ): Boolean; external name '_CFStringHasSuffix';
+
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+{!
+ @function CFStringGetRangeOfComposedCharactersAtIndex
+ Returns the range of the composed character sequence at the specified index.
+ @param theString The CFString which is to be searched. If this
+ parameter is not a valid CFString, the behavior is
+ undefined.
+ @param theIndex The index of the character contained in the
+ composed character sequence. If the index is
+ outside the index space of the string (0 to N-1 inclusive,
+ where N is the length of the string), the behavior is
+ undefined.
+ @result The range of the composed character sequence.
+}
+function CFStringGetRangeOfComposedCharactersAtIndex( theString: CFStringRef; theIndex: CFIndex ): CFRange; external name '_CFStringGetRangeOfComposedCharactersAtIndex';
+
+{!
+ @function CFStringFindCharacterFromSet
+ Query the range of the first character contained in the specified character set.
+ @param theString The CFString which is to be searched. If this
+ parameter is not a valid CFString, the behavior is
+ undefined.
+ @param theSet The CFCharacterSet against which the membership
+ of characters is checked. If this parameter is not a valid
+ CFCharacterSet, the behavior is undefined.
+ @param range The range of characters within the string to search. If
+ the range location or end point (defined by the location
+ plus length minus 1) are outside the index space of the
+ string (0 to N-1 inclusive, where N is the length of the
+ string), the behavior is undefined. If the range length is
+ negative, the behavior is undefined. The range may be empty
+ (length 0), in which case no search is performed.
+ @param searchOptions The bitwise-or'ed option flags to control
+ the search behavior. The supported options are
+ kCFCompareBackwards andkCFCompareAnchored.
+ If other option flags are specified, the behavior
+ 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 could be more than 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
+ set is found and result is filled, otherwise, false.
+}
+function CFStringFindCharacterFromSet( theString: CFStringRef; theSet: CFCharacterSetRef; rangeToSearch: CFRange; searchOptions: CFOptionFlags; var result: CFRange ): Boolean; external name '_CFStringFindCharacterFromSet';
+{#endif}
+
+{ Find range of bounds of the line(s) that span the indicated range (startIndex, numChars),
+ taking into account various possible line separator sequences (CR, CRLF, LF, and Unicode LS, PS).
+ All return values are "optional" (provide NULL if you don't want them)
+ lineStartIndex: index of first character in line
+ lineEndIndex: index of first character of the next line (including terminating line separator characters)
+ contentsEndIndex: index of the first line separator character
+ Thus, lineEndIndex - lineStartIndex is the number of chars in the line, including the line separators
+ contentsEndIndex - lineStartIndex is the number of chars in the line w/out the line separators
+}
+procedure CFStringGetLineBounds( theString: CFStringRef; range: CFRange; var lineBeginIndex: CFIndex; var lineEndIndex: CFIndex; var contentsEndIndex: CFIndex ); external name '_CFStringGetLineBounds';
+
+
+{** Exploding and joining strings with a separator string **}
+
+function CFStringCreateByCombiningStrings( alloc: CFAllocatorRef; theArray: CFArrayRef; separatorString: CFStringRef ): CFStringRef; external name '_CFStringCreateByCombiningStrings'; { Empty array returns empty string; one element array returns the element }
+
+function CFStringCreateArrayBySeparatingStrings( alloc: CFAllocatorRef; theString: CFStringRef; separatorString: CFStringRef ): CFArrayRef; external name '_CFStringCreateArrayBySeparatingStrings'; { No separators in the string returns array with that string; string == sep returns two empty strings }
+
+
+{** Parsing non-localized numbers from strings **}
+
+function CFStringGetIntValue( str: CFStringRef ): SInt32; external name '_CFStringGetIntValue'; { Skips whitespace; returns 0 on error, MAX or -MAX on overflow }
+
+function CFStringGetDoubleValue( str: CFStringRef ): Float64; external name '_CFStringGetDoubleValue'; { Skips whitespace; returns 0.0 on error }
+
+
+{** MutableString functions **}
+
+{ CFStringAppend("abcdef", "xxxxx") -> "abcdefxxxxx"
+ CFStringDelete("abcdef", CFRangeMake(2, 3)) -> "abf"
+ CFStringReplace("abcdef", CFRangeMake(2, 3), "xxxxx") -> "abxxxxxf"
+ CFStringReplaceAll("abcdef", "xxxxx") -> "xxxxx"
+}
+procedure CFStringAppend( theString: CFMutableStringRef; appendedString: CFStringRef ); external name '_CFStringAppend';
+
+procedure CFStringAppendCharacters( theString: CFMutableStringRef; chars: UniCharPtr; numChars: CFIndex ); external name '_CFStringAppendCharacters';
+
+procedure CFStringAppendPascalString( theString: CFMutableStringRef; const (*var*) pStr: Str255; encoding: CFStringEncoding ); external name '_CFStringAppendPascalString';
+
+procedure CFStringAppendCString( theString: CFMutableStringRef; cStr: ConstCStringPtr; encoding: CFStringEncoding ); external name '_CFStringAppendCString';
+
+procedure CFStringAppendFormat( theString: CFMutableStringRef; formatOptions: CFDictionaryRef; format: CFStringRef; ... ); external name '_CFStringAppendFormat';
+
+procedure CFStringAppendFormatAndArguments( theString: CFMutableStringRef; formatOptions: CFDictionaryRef; format: CFStringRef; arguments: UnivPtr ); external name '_CFStringAppendFormatAndArguments';
+
+procedure CFStringInsert( str: CFMutableStringRef; idx: CFIndex; insertedStr: CFStringRef ); external name '_CFStringInsert';
+
+procedure CFStringDelete( theString: CFMutableStringRef; range: CFRange ); external name '_CFStringDelete';
+
+procedure CFStringReplace( theString: CFMutableStringRef; range: CFRange; replacement: CFStringRef ); external name '_CFStringReplace';
+
+procedure CFStringReplaceAll( theString: CFMutableStringRef; replacement: CFStringRef ); external name '_CFStringReplaceAll'; { Replaces whole string }
+
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+{ Replace all occurrences of target in rangeToSearch of theString with replacement.
+ Pays attention to kCFCompareCaseInsensitive, kCFCompareBackwards, kCFCompareNonliteral, and kCFCompareAnchored.
+ kCFCompareBackwards can be used to do the replacement starting from the end, which could give a different result.
+ ex. AAAAA, replace AA with B -> BBA or ABB; latter if kCFCompareBackwards
+ kCFCompareAnchored assures only anchored but multiple instances are found (the instances must be consecutive at start or end)
+ ex. AAXAA, replace A with B -> BBXBB or BBXAA; latter if kCFCompareAnchored
+ Returns number of replacements performed.
+}
+function CFStringFindAndReplace( theString: CFMutableStringRef; stringToFind: CFStringRef; replacementString: CFStringRef; rangeToSearch: CFRange; compareOptions: CFOptionFlags ): CFIndex; external name '_CFStringFindAndReplace';
+
+{#endif}
+
+{ This function will make the contents of a mutable CFString point directly at the specified UniChar array.
+ It works only with CFStrings created with CFStringCreateMutableWithExternalCharactersNoCopy().
+ This function does not free the previous buffer.
+ The string will be manipulated within the provided buffer (if any) until it outgrows capacity; then the
+ externalCharactersAllocator will be consulted for more memory.
+ See comments at the top of this file for more info.
+}
+procedure CFStringSetExternalCharactersNoCopy( theString: CFMutableStringRef; chars: UniCharPtr; length: CFIndex; capacity: CFIndex ); external name '_CFStringSetExternalCharactersNoCopy'; { Works only on specially created mutable strings! }
+
+{ CFStringPad() will pad or cut down a string to the specified size.
+ The pad string is used as the fill string; indexIntoPad specifies which character to start with.
+ CFStringPad("abc", " ", 9, 0) -> "abc "
+ CFStringPad("abc", ". ", 9, 1) -> "abc . . ."
+ CFStringPad("abcdef", ?, 3, ?) -> "abc"
+
+ CFStringTrim() will trim the specified string from both ends of the string.
+ CFStringTrimWhitespace() will do the same with white space characters (tab, newline, etc)
+ CFStringTrim(" abc ", " ") -> "abc"
+ CFStringTrim("* * * *abc * ", "* ") -> "*abc "
+}
+procedure CFStringPad( theString: CFMutableStringRef; padString: CFStringRef; length: CFIndex; indexIntoPad: CFIndex ); external name '_CFStringPad';
+
+procedure CFStringTrim( theString: CFMutableStringRef; trimString: CFStringRef ); external name '_CFStringTrim';
+
+procedure CFStringTrimWhitespace( theString: CFMutableStringRef ); external name '_CFStringTrimWhitespace';
+
+{#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+procedure CFStringLowercase( theString: CFMutableStringRef; locale: CFLocaleRef ); external name '_CFStringLowercase';
+
+procedure CFStringUppercase( theString: CFMutableStringRef; locale: CFLocaleRef ); external name '_CFStringUppercase';
+
+procedure CFStringCapitalize( theString: CFMutableStringRef; locale: CFLocaleRef ); external name '_CFStringCapitalize';
+{#else}
+//procedure CFStringLowercase( theString: CFMutableStringRef; localeTBD: {const} UnivPtr ); // localeTBD must be NULL on pre-10.3
+
+//procedure CFStringUppercase( theString: CFMutableStringRef; localeTBD: {const} UnivPtr ); // localeTBD must be NULL on pre-10.3
+
+//procedure CFStringCapitalize( theString: CFMutableStringRef; localeTBD: {const} UnivPtr ); // localeTBD must be NULL on pre-10.3
+{#endif}
+
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+{!
+ @typedef CFStringNormalizationForm
+ This is the type of Unicode normalization forms as described in
+ Unicode Technical Report #15.
+}
+type
+ CFStringNormalizationForm = SInt32;
+const
+ kCFStringNormalizationFormD = 0; // Canonical Decomposition
+ kCFStringNormalizationFormKD = 1; // Compatibility Decomposition
+ kCFStringNormalizationFormC = 2; // Canonical Decomposition followed by Canonical Composition
+ kCFStringNormalizationFormKC = 3; // Compatibility Decomposition followed by Canonical Composition
+
+{!
+ @function CFStringNormalize
+ Normalizes the string into the specified form as described in
+ Unicode Technical Report #15.
+ @param theString The string which is to be normalized. If this
+ parameter is not a valid mutable CFString, the behavior is
+ undefined.
+ @param theForm The form into which the string is to be normalized.
+ If this parameter is not a valid CFStringNormalizationForm value,
+ the behavior is undefined.
+}
+procedure CFStringNormalize( theString: CFMutableStringRef; theForm: CFStringNormalizationForm ); external name '_CFStringNormalize';
+{#endif}
+
+{ Perform string transliteration. The transformation represented by transform (see below for the full list of transforms supported) is applied to the given range of string, modifying it in place. Only the specified range will be modified, but the transform may look at portions of the string outside that range for context. NULL range pointer causes the whole string to be transformed. On return, range is modified to reflect the new range corresponding to the original range. reverse indicates that the inverse transform should be used instead, if it exists. If the transform is successful, true is returned; if unsuccessful, false. Reasons for the transform being unsuccessful include an invalid transform identifier, or attempting to reverse an irreversible transform.
+}
+function CFStringTransform( strng: CFMutableStringRef; var range: CFRange; transform: CFStringRef; reverse: Boolean ): Boolean; external name '_CFStringTransform';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Transform identifiers for CFStringTransform()
+}
+var kCFStringTransformStripCombiningMarks: CFStringRef; external name '_kCFStringTransformStripCombiningMarks'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFStringTransformToLatin: CFStringRef; external name '_kCFStringTransformToLatin'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFStringTransformFullwidthHalfwidth: CFStringRef; external name '_kCFStringTransformFullwidthHalfwidth'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFStringTransformLatinKatakana: CFStringRef; external name '_kCFStringTransformLatinKatakana'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFStringTransformLatinHiragana: CFStringRef; external name '_kCFStringTransformLatinHiragana'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFStringTransformHiraganaKatakana: CFStringRef; external name '_kCFStringTransformHiraganaKatakana'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFStringTransformMandarinLatin: CFStringRef; external name '_kCFStringTransformMandarinLatin'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFStringTransformLatinHangul: CFStringRef; external name '_kCFStringTransformLatinHangul'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFStringTransformLatinArabic: CFStringRef; external name '_kCFStringTransformLatinArabic'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFStringTransformLatinHebrew: CFStringRef; external name '_kCFStringTransformLatinHebrew'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFStringTransformLatinThai: CFStringRef; external name '_kCFStringTransformLatinThai'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFStringTransformLatinCyrillic: CFStringRef; external name '_kCFStringTransformLatinCyrillic'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFStringTransformLatinGreek: CFStringRef; external name '_kCFStringTransformLatinGreek'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFStringTransformToXMLHex: CFStringRef; external name '_kCFStringTransformToXMLHex'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+var kCFStringTransformToUnicodeName: CFStringRef; external name '_kCFStringTransformToUnicodeName'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{** General encoding related functionality **}
+
+{ This returns availability of the encoding on the system
+}
+function CFStringIsEncodingAvailable( encoding: CFStringEncoding ): Boolean; external name '_CFStringIsEncodingAvailable';
+
+{ This function returns list of available encodings. The returned list is terminated with kCFStringEncodingInvalidId and owned by the system.
+}
+function CFStringGetListOfAvailableEncodings: CFStringEncodingPtr; external name '_CFStringGetListOfAvailableEncodings';
+
+{ Returns name of the encoding; non-localized.
+}
+function CFStringGetNameOfEncoding( encoding: CFStringEncoding ): CFStringRef; external name '_CFStringGetNameOfEncoding';
+
+{ ID mapping functions from/to Cocoa NSStringEncoding. Returns kCFStringEncodingInvalidId if no mapping exists.
+}
+function CFStringConvertEncodingToNSStringEncoding( encoding: CFStringEncoding ): UInt32; external name '_CFStringConvertEncodingToNSStringEncoding';
+
+function CFStringConvertNSStringEncodingToEncoding( encoding: UInt32 ): CFStringEncoding; external name '_CFStringConvertNSStringEncodingToEncoding';
+
+{ ID mapping functions from/to Microsoft Windows codepage (covers both OEM & ANSI). Returns kCFStringEncodingInvalidId if no mapping exists.
+}
+function CFStringConvertEncodingToWindowsCodepage( encoding: CFStringEncoding ): UInt32; external name '_CFStringConvertEncodingToWindowsCodepage';
+
+function CFStringConvertWindowsCodepageToEncoding( codepage: UInt32 ): CFStringEncoding; external name '_CFStringConvertWindowsCodepageToEncoding';
+
+{ ID mapping functions from/to IANA registery charset names. Returns kCFStringEncodingInvalidId if no mapping exists.
+}
+function CFStringConvertIANACharSetNameToEncoding( theString: CFStringRef ): CFStringEncoding; external name '_CFStringConvertIANACharSetNameToEncoding';
+
+function CFStringConvertEncodingToIANACharSetName( encoding: CFStringEncoding ): CFStringRef; external name '_CFStringConvertEncodingToIANACharSetName';
+
+{ Returns the most compatible MacOS script value for the input encoding }
+{ i.e. kCFStringEncodingMacRoman -> kCFStringEncodingMacRoman }
+{ kCFStringEncodingWindowsLatin1 -> kCFStringEncodingMacRoman }
+{ kCFStringEncodingISO_2022_JP -> kCFStringEncodingMacJapanese }
+function CFStringGetMostCompatibleMacStringEncoding( encoding: CFStringEncoding ): CFStringEncoding; external name '_CFStringGetMostCompatibleMacStringEncoding';
+
+
+{ The next two functions allow fast access to the contents of a string,
+ assuming you are doing sequential or localized accesses. To use, call
+ CFStringInitInlineBuffer() with a CFStringInlineBuffer (on the stack, say),
+ and a range in the string to look at. Then call CFStringGetCharacterFromInlineBuffer()
+ as many times as you want, with a index into that range (relative to the start
+ of that range). These are INLINE functions and will end up calling CFString only
+ once in a while, to fill a buffer. CFStringGetCharacterFromInlineBuffer() returns 0 if
+ a location outside the original range is specified.
+}
+const
+ __kCFStringInlineBufferLength = 64;
+type
+ CFStringInlineBuffer = record
+ buffer: array[0..__kCFStringInlineBufferLength-1] of UniChar;
+ theString: CFStringRef;
+ directBuffer: UniCharPtr;
+ rangeToBuffer: CFRange; { Range in string to buffer }
+ bufferedRangeStart: CFIndex; { Start of range currently buffered (relative to rangeToBuffer.location) }
+ bufferedRangeEnd: CFIndex; { bufferedRangeStart + number of chars actually buffered }
+ end;
+
+// Not currently converted to Pascal
+// #if defined(CF_INLINE)
+// CF_INLINE void CFStringInitInlineBuffer(CFStringRef str, CFStringInlineBuffer *buf, CFRange range) {
+// buf->theString = str;
+// buf->rangeToBuffer = range;
+// buf->directBuffer = CFStringGetCharactersPtr(str);
+// buf->bufferedRangeStart = buf->bufferedRangeEnd = 0;
+// }
+//
+// CF_INLINE UniChar CFStringGetCharacterFromInlineBuffer(CFStringInlineBuffer *buf, CFIndex idx) {
+// if (buf->directBuffer) {
+// if (idx < 0 || idx >= buf->rangeToBuffer.length) return 0;
+// return buf->directBuffer[idx + buf->rangeToBuffer.location];
+// }
+// if (idx >= buf->bufferedRangeEnd || idx < buf->bufferedRangeStart) {
+// if (idx < 0 || idx >= buf->rangeToBuffer.length) return 0;
+// if ((buf->bufferedRangeStart = idx - 4) < 0) buf->bufferedRangeStart = 0;
+// buf->bufferedRangeEnd = buf->bufferedRangeStart + __kCFStringInlineBufferLength;
+// if (buf->bufferedRangeEnd > buf->rangeToBuffer.length) buf->bufferedRangeEnd = buf->rangeToBuffer.length;
+// CFStringGetCharacters(buf->theString, CFRangeMake(buf->rangeToBuffer.location + buf->bufferedRangeStart, buf->bufferedRangeEnd - buf->bufferedRangeStart), buf->buffer);
+// }
+// return buf->buffer[idx - buf->bufferedRangeStart];
+// }
+//
+// #else
+// { If INLINE functions are not available, we do somewhat less powerful macros that work similarly (except be aware that the buf argument 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 }
+
+{ Rest of the stuff in this file is private and should not be used directly
+}
+{ For debugging only
+ Use CFShow() to printf the description of any CFType;
+ Use CFShowStr() to printf detailed info about a CFString
+}
+procedure CFShow( obj: CFTypeRef ); external name '_CFShow';
+
+procedure CFShowStr( str: CFStringRef ); external name '_CFShowStr';
+
+{ This function is private and should not be used directly }
+function __CFStringMakeConstantString( cStr: ConstCStringPtr ): CFStringRef; external name '___CFStringMakeConstantString'; { Private; do not use }
+
+
+
+{unit CFTimeZone}
+{ CFTimeZone.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+function CFTimeZoneGetTypeID: CFTypeID; external name '_CFTimeZoneGetTypeID';
+
+function CFTimeZoneCopySystem: CFTimeZoneRef; external name '_CFTimeZoneCopySystem';
+
+procedure CFTimeZoneResetSystem; external name '_CFTimeZoneResetSystem';
+
+function CFTimeZoneCopyDefault: CFTimeZoneRef; external name '_CFTimeZoneCopyDefault';
+
+procedure CFTimeZoneSetDefault( tz: CFTimeZoneRef ); external name '_CFTimeZoneSetDefault';
+
+function CFTimeZoneCopyKnownNames: CFArrayRef; external name '_CFTimeZoneCopyKnownNames';
+
+function CFTimeZoneCopyAbbreviationDictionary: CFDictionaryRef; external name '_CFTimeZoneCopyAbbreviationDictionary';
+
+procedure CFTimeZoneSetAbbreviationDictionary( dict: CFDictionaryRef ); external name '_CFTimeZoneSetAbbreviationDictionary';
+
+function CFTimeZoneCreate( allocator: CFAllocatorRef; name: CFStringRef; data: CFDataRef ): CFTimeZoneRef; external name '_CFTimeZoneCreate';
+
+function CFTimeZoneCreateWithTimeIntervalFromGMT( allocator: CFAllocatorRef; ti: CFTimeInterval ): CFTimeZoneRef; external name '_CFTimeZoneCreateWithTimeIntervalFromGMT';
+
+function CFTimeZoneCreateWithName( allocator: CFAllocatorRef; name: CFStringRef; tryAbbrev: Boolean ): CFTimeZoneRef; external name '_CFTimeZoneCreateWithName';
+
+function CFTimeZoneGetName( tz: CFTimeZoneRef ): CFStringRef; external name '_CFTimeZoneGetName';
+
+function CFTimeZoneGetData( tz: CFTimeZoneRef ): CFDataRef; external name '_CFTimeZoneGetData';
+
+function CFTimeZoneGetSecondsFromGMT( tz: CFTimeZoneRef; at: CFAbsoluteTime ): CFTimeInterval; external name '_CFTimeZoneGetSecondsFromGMT';
+
+function CFTimeZoneCopyAbbreviation( tz: CFTimeZoneRef; at: CFAbsoluteTime ): CFStringRef; external name '_CFTimeZoneCopyAbbreviation';
+
+function CFTimeZoneIsDaylightSavingTime( tz: CFTimeZoneRef; at: CFAbsoluteTime ): Boolean; external name '_CFTimeZoneIsDaylightSavingTime';
+
+
+{unit CFUUID}
+{ CFUUID.h
+ Copyright (c) 1999-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFUUIDRef = ^SInt32; { an opaque 32-bit type }
+ CFUUIDRefPtr = ^CFUUIDRef;
+
+type
+ CFUUIDBytes = record
+ byte0: SInt8;
+ byte1: SInt8;
+ byte2: SInt8;
+ byte3: SInt8;
+ byte4: SInt8;
+ byte5: SInt8;
+ byte6: SInt8;
+ byte7: SInt8;
+ byte8: SInt8;
+ byte9: SInt8;
+ byte10: SInt8;
+ byte11: SInt8;
+ byte12: SInt8;
+ byte13: SInt8;
+ byte14: SInt8;
+ byte15: SInt8;
+ end;
+ CFUUIDBytesPtr = ^CFUUIDBytes;
+{ The CFUUIDBytes struct is a 128-bit struct that contains the
+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';
+ { Create and return a brand new unique identifier }
+
+function CFUUIDCreateWithBytes( alloc: CFAllocatorRef; byte0: ByteParameter; byte1: ByteParameter; byte2: ByteParameter; byte3: ByteParameter; byte4: ByteParameter; byte5: ByteParameter; byte6: ByteParameter; byte7: ByteParameter; byte8: ByteParameter; byte9: ByteParameter; byte10: ByteParameter; byte11: ByteParameter; byte12: ByteParameter; byte13: ByteParameter; byte14: ByteParameter; byte15: ByteParameter ): CFUUIDRef; external name '_CFUUIDCreateWithBytes';
+ { Create and return an identifier with the given contents. This may return an existing instance with its ref count bumped because of uniquing. }
+
+function CFUUIDCreateFromString( alloc: CFAllocatorRef; uuidStr: CFStringRef ): CFUUIDRef; external name '_CFUUIDCreateFromString';
+ { Converts from a string representation to the UUID. This may return an existing instance with its ref count bumped because of uniquing. }
+
+function CFUUIDCreateString( alloc: CFAllocatorRef; uuid: CFUUIDRef ): CFStringRef; external name '_CFUUIDCreateString';
+ { Converts from a UUID to its string representation. }
+
+function CFUUIDGetConstantUUIDWithBytes( alloc: CFAllocatorRef; byte0: ByteParameter; byte1: ByteParameter; byte2: ByteParameter; byte3: ByteParameter; byte4: ByteParameter; byte5: ByteParameter; byte6: ByteParameter; byte7: ByteParameter; byte8: ByteParameter; byte9: ByteParameter; byte10: ByteParameter; byte11: ByteParameter; byte12: ByteParameter; byte13: ByteParameter; byte14: ByteParameter; byte15: ByteParameter ): CFUUIDRef; external name '_CFUUIDGetConstantUUIDWithBytes';
+ { This returns an immortal CFUUIDRef that should not be released. It can be used in headers to declare UUID constants with #define. }
+
+function CFUUIDGetUUIDBytes( uuid: CFUUIDRef ): CFUUIDBytes; external name '_CFUUIDGetUUIDBytes';
+
+function CFUUIDCreateFromUUIDBytes( alloc: CFAllocatorRef; bytes: CFUUIDBytes ): CFUUIDRef; external name '_CFUUIDCreateFromUUIDBytes';
+
+
+{unit CGAffineTransforms}
+{ CoreGraphics - CGAffineTransform.h
+ * Copyright (c) 1998-2000 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CGAffineTransformPtr = ^CGAffineTransform;
+ CGAffineTransform = record
+ a, b, c, d: Float32;
+ tx, ty: Float32;
+ end;
+
+{ The identity transform: [ 1 0 0 1 0 0 ]. }
+
+var CGAffineTransformIdentity: CGAffineTransform; external name '_CGAffineTransformIdentity'; (* attribute const *)
+
+{ Return the transform [ a b c d tx ty ]. }
+
+function CGAffineTransformMake( a: Float32; b: Float32; c: Float32; d: Float32; tx: Float32; ty: Float32 ): CGAffineTransform; external name '_CGAffineTransformMake';
+
+{ Return a transform which translates by `(tx, ty)':
+ * t' = [ 1 0 0 1 tx ty ] }
+
+function CGAffineTransformMakeTranslation( tx: Float32; ty: Float32 ): CGAffineTransform; external name '_CGAffineTransformMakeTranslation';
+
+{ Return a transform which scales by `(sx, sy)':
+ * t' = [ sx 0 0 sy 0 0 ] }
+
+function CGAffineTransformMakeScale( sx: Float32; sy: Float32 ): CGAffineTransform; external name '_CGAffineTransformMakeScale';
+
+{ Return a transform which rotates by `angle' radians:
+ * t' = [ cos(angle) sin(angle) -sin(angle) cos(angle) 0 0 ] }
+
+function CGAffineTransformMakeRotation( angle: Float32 ): CGAffineTransform; external name '_CGAffineTransformMakeRotation';
+
+{ Return true if `t' is the identity transform, false otherwise. }
+
+function CGAffineTransformIsIdentity( t: CGAffineTransform ): CBool; external name '_CGAffineTransformIsIdentity'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Translate `t' by `(tx, ty)' and return the result:
+ * t' = [ 1 0 0 1 tx ty ] * t }
+
+function CGAffineTransformTranslate( t: CGAffineTransform; tx: Float32; ty: Float32 ): CGAffineTransform; external name '_CGAffineTransformTranslate';
+
+{ Scale `t' by `(sx, sy)' and return the result:
+ * t' = [ sx 0 0 sy 0 0 ] * t }
+
+function CGAffineTransformScale( t: CGAffineTransform; sx: Float32; sy: Float32 ): CGAffineTransform; external name '_CGAffineTransformScale';
+
+{ Rotate `t' by `angle' radians and return the result:
+ * t' = [ cos(angle) sin(angle) -sin(angle) cos(angle) 0 0 ] * t }
+
+function CGAffineTransformRotate( t: CGAffineTransform; angle: Float32 ): CGAffineTransform; external name '_CGAffineTransformRotate';
+
+{ Invert `t' and return the result. If `t' has zero determinant, then `t'
+ * is returned unchanged. }
+
+function CGAffineTransformInvert( t: CGAffineTransform ): CGAffineTransform; external name '_CGAffineTransformInvert';
+
+{ Concatenate `t2' to `t1' and return the result:
+ * t' = t1 * t2 }
+
+function CGAffineTransformConcat( t1: CGAffineTransform; t2: CGAffineTransform ): CGAffineTransform; external name '_CGAffineTransformConcat';
+
+{ Return true if `t1' and `t2' are equal, false otherwise. }
+
+function CGAffineTransformEqualToTransform( t1: CGAffineTransform; t2: CGAffineTransform ): CBool; external name '_CGAffineTransformEqualToTransform'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Transform `point' by `t' and return the result:
+ * p' = p * t
+ * where p = [ x y 1 ]. }
+
+function CGPointApplyAffineTransform( point: CGPoint; t: CGAffineTransform ): CGPoint; external name '_CGPointApplyAffineTransform';
+
+{ Transform `size' by `t' and return the result:
+ * s' = s * t
+ * where s = [ width height 0 ]. }
+
+function CGSizeApplyAffineTransform( size: CGSize; t: CGAffineTransform ): CGSize; external name '_CGSizeApplyAffineTransform';
+
+{ Transform `rect' by `t' and return the result. Since affine transforms
+ * do not preserve rectangles in general, this function returns the
+ * smallest rectangle which contains the transformed corner points of
+ * `rect'. If `t' consists solely of scales, flips and translations, then
+ * the returned rectangle coincides with the rectangle constructed from the
+ * four transformed corners. }
+
+function CGRectApplyAffineTransform( rect: CGRect; t: CGAffineTransform ): CGRect; external name '_CGRectApplyAffineTransform'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+(*
+{** Definitions of inline functions. **}
+
+CG_INLINE CGAffineTransform
+__CGAffineTransformMake(float a, float b, float c, float d, float tx, float ty)
+{
+ CGAffineTransform t;
+
+ t.a = a; t.b = b; t.c = c; t.d = d; t.tx = tx; t.ty = ty;
+ return t;
+}
+
+#define CGAffineTransformMake __CGAffineTransformMake
+
+CG_INLINE CGPoint
+__CGPointApplyAffineTransform(CGPoint point, CGAffineTransform t)
+{
+ CGPoint p;
+
+ p.x = t.a * point.x + t.c * point.y + t.tx;
+ p.y = t.b * point.x + t.d * point.y + t.ty;
+ return p;
+}
+
+#define CGPointApplyAffineTransform __CGPointApplyAffineTransform
+
+CG_INLINE CGSize
+__CGSizeApplyAffineTransform(CGSize size, CGAffineTransform t)
+{
+ CGSize s;
+
+ s.width = t.a * size.width + t.c * size.height;
+ s.height = t.b * size.width + t.d * size.height;
+ return s;
+}
+
+#define CGSizeApplyAffineTransform __CGSizeApplyAffineTransform
+*)
+
+{unit CGFont}
+{ CoreGraphics - CGFont.h
+ * Copyright (c) 1999-2003 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ The type used to represent a CoreGraphics font. }
+
+type
+ CGFontRef = ^SInt32; { an opaque 32-bit type }
+
+{ A type to represent indexes in a CGFontRef. }
+
+type
+ CGFontIndex = UInt16;
+
+{ A type to represent glyph identifiers in a CGFontRef. }
+
+type
+ CGGlyph = CGFontIndex;
+ CGGlyphPtr = ^CGGlyph;
+
+{ The format of a PostScript font subset. Type1 is documented in the
+ * "Adobe Type 1 Font Format"; Type3 in the "PostScript Language Reference,
+ * 3rd ed." and Type42 in "Adobe Technical Note 5012, The Type 42 Font
+ * Format Specification". }
+
+type
+ CGFontPostScriptFormat = SInt32;
+const
+ kCGFontPostScriptFormatType1 = 1;
+ kCGFontPostScriptFormatType3 = 3;
+ kCGFontPostScriptFormatType42 = 42;
+
+
+const
+{ The maximum allowed value of a CGFontIndex. Always <= USHRT_MAX - 1. }
+ kCGFontIndexMax = (1 shl 16) - 2;
+
+ { A value representing an invalid CGFontIndex. Always <= USHRT_MAX. }
+ kCGFontIndexInvalid = (1 shl 16) - 1;
+
+ { The maximum allowed value of a CGGlyph. }
+ kCGGlyphMax = kCGFontIndexMax;
+
+
+{ Return the CFTypeID for CGFontRefs. }
+
+function CGFontGetTypeID: CFTypeID; external name '_CGFontGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Create a CGFontRef using `platformFontReference', a pointer to a
+ * platform-specific font reference. For MacOS X, `platformFontReference'
+ * should be a pointer to an ATSFontRef. }
+
+function CGFontCreateWithPlatformFont( platformFontReference: UnivPtr ): CGFontRef; external name '_CGFontCreateWithPlatformFont';
+
+{ Return a font based on `font' with the variation specification
+ * dictionary `variations' applied to `font'. A variation specification
+ * dictionary contains keys corresponding the variation axis names of the
+ * font. Each key is a variation axis name; the value for each key is the
+ * value specified for that particular variation axis represented as a
+ * CFNumberRef. If a variation axis name is not specified in `variations',
+ * then the current value from `font' is used. }
+
+function CGFontCreateCopyWithVariations( font: CGFontRef; variations: CFDictionaryRef ): CGFontRef; external name '_CGFontCreateCopyWithVariations'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Equivalent to `CFRetain(font)', except it doesn't crash (as CFRetain
+ * does) if `font' is NULL. }
+
+function CGFontRetain( font: CGFontRef ): CGFontRef; external name '_CGFontRetain';
+
+{ Equivalent to `CFRelease(font)', except it doesn't crash (as CFRelease
+ * does) if `font' is NULL. }
+
+procedure CGFontRelease( font: CGFontRef ); external name '_CGFontRelease';
+
+{ Return the PostScript name of `font'. }
+
+function CGFontCopyPostScriptName( font: CGFontRef ): CFStringRef; external name '_CGFontCopyPostScriptName'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return an array of the variation axis dictionaries for `font'. Each
+ * variation axis dictionary contains values for the variation axis keys
+ * listed below. This function returns NULL if `font' doesn't support
+ * variations. }
+
+function CGFontCopyVariationAxes( font: CGFontRef ): CFArrayRef; external name '_CGFontCopyVariationAxes'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the variation specification dictionary from `font'. This
+ * dictionary contains keys corresponding the variation axis names of the
+ * font. Each key is a variation axis name; the value for each key is the
+ * value specified for that particular variation axis represented as a
+ * CFNumberRef. This function returns NULL if `font' doesn't support
+ * variations. }
+
+function CGFontCopyVariations( font: CGFontRef ): CFDictionaryRef; external name '_CGFontCopyVariations'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return true if a subset in the PostScript format `format' can be created
+ * for `font'; false otherwise. }
+
+function CGFontCanCreatePostScriptSubset( font: CGFontRef; format: CGFontPostScriptFormat ): CBool; external name '_CGFontCanCreatePostScriptSubset'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create a subset of `font' named `subsetName' in the PostScript format
+ * `format'. The subset will contain the glyphs specified by `glyphs', an
+ * array of `count' CGGlyphs. If non-NULL, `encoding' specifies the
+ * default encoding for the subset. }
+
+type
+ CGGlyph256Array = array[0..255] of CGGlyph;
+function CGFontCreatePostScriptSubset( font: CGFontRef; subsetName: CFStringRef; format: CGFontPostScriptFormat; {const} glyphs: {variable-size-array} CGGlyphPtr; count: size_t; const (*var*) encoding: CGGlyph256Array ): CFDataRef; external name '_CGFontCreatePostScriptSubset'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return a PostScript encoding of `font' containing glyphs in `encoding'. }
+
+function CGFontCreatePostScriptEncoding( font: CGFontRef; const (*var*) encoding: CGGlyph256Array ): CFDataRef; external name '_CGFontCreatePostScriptEncoding'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{** Keys for the font variation axis dictionary. **}
+
+{ The key used to obtain the variation axis name from a variation axis
+ * dictionary. The value obtained with this key is a CFStringRef specifying
+ * the name of the variation axis. }
+
+var kCGFontVariationAxisName: CFStringRef; external name '_kCGFontVariationAxisName'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The key used to obtain the minimum variation axis value from a variation
+ * axis dictionary. The value obtained with this key is a CFNumberRef
+ * specifying the minimum value of the variation axis. }
+
+var kCGFontVariationAxisMinValue: CFStringRef; external name '_kCGFontVariationAxisMinValue'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The key used to obtain the maximum variation axis value from a variation
+ * axis dictionary. The value obtained with this key is a CFNumberRef
+ * specifying the maximum value of the variation axis. }
+
+var kCGFontVariationAxisMaxValue: CFStringRef; external name '_kCGFontVariationAxisMaxValue'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The key used to obtain the default variation axis value from a variation
+ * axis dictionary. The value obtained with this key is a CFNumberRef
+ * specifying the default value of the variation axis. }
+
+var kCGFontVariationAxisDefaultValue: CFStringRef; external name '_kCGFontVariationAxisDefaultValue'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ Obsolete; don't use these. }
+
+const
+ CGGlyphMin = 0;
+ CGGlyphMax = kCGGlyphMax;
+
+
+{unit CGPDFArray}
+{ CoreGraphics - CGPDFArray.h
+ * Copyright (c) 2002-2004 Apple Computer, Inc. (unpublished)
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+// CGPDFArrayRef defined in CGBase
+
+
+{ Return the number of items in `array'. }
+
+function CGPDFArrayGetCount( arry: CGPDFArrayRef ): size_t; external name '_CGPDFArrayGetCount'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object at `index' in `array' and return the result in
+ * `value'. Return true on success; false otherwise. }
+
+function CGPDFArrayGetObject( arry: CGPDFArrayRef; index: size_t; var value: CGPDFObjectRef ): CBool; external name '_CGPDFArrayGetObject'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object at `index' in `array' and, if it's a null, return
+ * true; otherwise, return false. }
+
+function CGPDFArrayGetNull( arry: CGPDFArrayRef; index: size_t ): CBool; external name '_CGPDFArrayGetNull'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object at `index' in `array' and, if it's a boolean, return
+ * the result in `value'. Return true on success; false otherwise. }
+
+function CGPDFArrayGetBoolean( arry: CGPDFArrayRef; index: size_t; var value: CGPDFBoolean ): CBool; external name '_CGPDFArrayGetBoolean'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object at `index' in `array' and, if it's an integer, return
+ * the result in `value'. Return true on success; false otherwise. }
+
+function CGPDFArrayGetInteger( arry: CGPDFArrayRef; index: size_t; var value: CGPDFInteger ): CBool; external name '_CGPDFArrayGetInteger'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object at `index' in `array' and, if it's a number (real or
+ * integer), return the result in `value'. Return true on success; false
+ * otherwise. }
+
+function CGPDFArrayGetNumber( arry: CGPDFArrayRef; index: size_t; var value: CGPDFReal ): CBool; external name '_CGPDFArrayGetNumber'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object at `index' in `array' and, if it's a name, return the
+ * result in `value'. Return true on success; false otherwise. }
+
+function CGPDFArrayGetName( arry: CGPDFArrayRef; index: size_t; var value: ConstCStringPtr ): CBool; external name '_CGPDFArrayGetName'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object at `index' in `array' and, if it's a string, return
+ * the result in `value'. Return true on success; false otherwise. }
+
+function CGPDFArrayGetString( arry: CGPDFArrayRef; index: size_t; var value: CGPDFStringRef ): CBool; external name '_CGPDFArrayGetString'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object at `index' in `array' and, if it's an array, return
+ * it in `value'. Return true on success; false otherwise. }
+
+function CGPDFArrayGetArray( arry: CGPDFArrayRef; index: size_t; var value: CGPDFArrayRef ): CBool; external name '_CGPDFArrayGetArray'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object at `index' in `array' and, if it's a dictionary,
+ * return it in `value'. Return true on success; false otherwise. }
+
+function CGPDFArrayGetDictionary( arry: CGPDFArrayRef; index: size_t; var value: CGPDFDictionaryRef ): CBool; external name '_CGPDFArrayGetDictionary'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object at `index' in `array' and, if it's a stream, return
+ * it in `value'. Return true on success; false otherwise. }
+
+function CGPDFArrayGetStream( arry: CGPDFArrayRef; index: size_t; var value: CGPDFStreamRef ): CBool; external name '_CGPDFArrayGetStream'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{unit CGPDFContentStream}
+{ CoreGraphics - CGPDFContentStream.h
+ * Copyright (c) 2004 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+// CGPDFContentStreamRef defined in CGBase
+
+
+{ Create a content stream from `page'. }
+
+function CGPDFContentStreamCreateWithPage( page: CGPDFPageRef ): CGPDFContentStreamRef; external name '_CGPDFContentStreamCreateWithPage'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create a content stream from `stream'. }
+
+function CGPDFContentStreamCreateWithStream( stream: CGPDFStreamRef; streamResources: CGPDFDictionaryRef; parent: CGPDFContentStreamRef ): CGPDFContentStreamRef; external name '_CGPDFContentStreamCreateWithStream'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Increment the retain count of `cs'. }
+
+function CGPDFContentStreamRetain( cs: CGPDFContentStreamRef ): CGPDFContentStreamRef; external name '_CGPDFContentStreamRetain'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Decrement the retain count of `cs'. }
+
+procedure CGPDFContentStreamRelease( cs: CGPDFContentStreamRef ); external name '_CGPDFContentStreamRelease'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the array of CGPDFStreamRefs comprising the entire content stream
+ * of `cs'. }
+
+function CGPDFContentStreamGetStreams( cs: CGPDFContentStreamRef ): CFArrayRef; external name '_CGPDFContentStreamGetStreams'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the resource named `name' in category `category' of the resource
+ * dictionaries of `cs'. }
+
+function CGPDFContentStreamGetResource( cs: CGPDFContentStreamRef; category: ConstCStringPtr; name: ConstCStringPtr ): CGPDFObjectRef; external name '_CGPDFContentStreamGetResource'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit CGPDFDictionary}
+{ CoreGraphics - CGPDFDictionary.h
+ * Copyright (c) 2002-2004 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+// CGPDFDictionaryRef defined in CGBase
+
+
+{ Return the number of entries in `dictionary'. }
+
+function CGPDFDictionaryGetCount( dict: CGPDFDictionaryRef ): size_t; external name '_CGPDFDictionaryGetCount'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object associated with `key' in `dict' and return the result
+ * in `value'. Return true on success; false otherwise. }
+
+function CGPDFDictionaryGetObject( dict: CGPDFDictionaryRef; key: ConstCStringPtr; var value: CGPDFObjectRef ): CBool; external name '_CGPDFDictionaryGetObject'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object associated with `key' in `dict' and, if it's a
+ * boolean, return the result in `value'. Return true on success; false
+ * otherwise. }
+
+function CGPDFDictionaryGetBoolean( dict: CGPDFDictionaryRef; key: ConstCStringPtr; var value: CGPDFBoolean ): CBool; external name '_CGPDFDictionaryGetBoolean'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object associated with `key' in `dict' and, if it's an
+ * integer, return the result in `value'. Return true on success; false
+ * otherwise. }
+
+function CGPDFDictionaryGetInteger( dict: CGPDFDictionaryRef; key: ConstCStringPtr; var value: CGPDFInteger ): CBool; external name '_CGPDFDictionaryGetInteger'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object associated with `key' in `dict' and, if it's a number
+ * (real or integer), return the result in `value'. Return true on
+ * success; false otherwise. }
+
+function CGPDFDictionaryGetNumber( dict: CGPDFDictionaryRef; key: ConstCStringPtr; var value: CGPDFReal ): CBool; external name '_CGPDFDictionaryGetNumber'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object associated with `key' in `dict' and, if it's a name,
+ * return the result in `value'. Return true on success; false
+ * otherwise. }
+
+function CGPDFDictionaryGetName( dict: CGPDFDictionaryRef; key: ConstCStringPtr; var value: ConstCStringPtr ): CBool; external name '_CGPDFDictionaryGetName'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object associated with `key' in `dict' and, if it's a
+ * string, return the result in `value'. Return true on success; false
+ * otherwise. }
+
+function CGPDFDictionaryGetString( dict: CGPDFDictionaryRef; key: ConstCStringPtr; var value: CGPDFStringRef ): CBool; external name '_CGPDFDictionaryGetString'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object associated with `key' in `dict' and, if it's an
+ * array, return the result in `value'. Return true on success; false
+ * otherwise. }
+
+function CGPDFDictionaryGetArray( dict: CGPDFDictionaryRef; key: ConstCStringPtr; var value: CGPDFArrayRef ): CBool; external name '_CGPDFDictionaryGetArray'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object associated with `key' in `dict' and, if it's a
+ * dictionary, return the result in `value'. Return true on success; false
+ * otherwise. }
+
+function CGPDFDictionaryGetDictionary( dict: CGPDFDictionaryRef; key: ConstCStringPtr; var value: CGPDFDictionaryRef ): CBool; external name '_CGPDFDictionaryGetDictionary'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Look up the object associated with `key' in `dict' and, if it's a
+ * stream, return the result in `value'. Return true on success; false
+ * otherwise. }
+
+function CGPDFDictionaryGetStream( dict: CGPDFDictionaryRef; key: ConstCStringPtr; var value: CGPDFStreamRef ): CBool; external name '_CGPDFDictionaryGetStream'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ The callback for `CGPDFDictionaryApplyFunction'. `key' is the current
+ * key, `value' is the value for `key', and `info' is the parameter passed
+ * to `CGPDFDictionaryApplyFunction'. }
+
+type
+ CGPDFDictionaryApplierFunction = procedure( key: ConstCStringPtr; value: CGPDFObjectRef; info: UnivPtr );
+
+{ Enumerate all of the keys in `dict', calling `function' once for each
+ * key/value pair. Passes the current key, the associated value, and
+ * `info' to `function'. }
+
+procedure CGPDFDictionaryApplyFunction( dict: CGPDFDictionaryRef; func: CGPDFDictionaryApplierFunction; info: UnivPtr ); external name '_CGPDFDictionaryApplyFunction'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{unit CGPath}
+{ CoreGraphics - CGPath.h
+ * Copyright (c) 2001-2002 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CGMutablePathRef = ^SInt32; { an opaque 32-bit type }
+type
+ CGPathRef = ^SInt32; { an opaque 32-bit type }
+
+
+{ Return the CFTypeID for CGPathRefs. }
+
+function CGPathGetTypeID: CFTypeID; external name '_CGPathGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Create a mutable path. }
+
+function CGPathCreateMutable: CGMutablePathRef; external name '_CGPathCreateMutable'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Create a copy of `path'. }
+
+function CGPathCreateCopy( path: CGPathRef ): CGPathRef; external name '_CGPathCreateCopy'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Create a mutable copy of `path'. }
+
+function CGPathCreateMutableCopy( path: CGPathRef ): CGMutablePathRef; external name '_CGPathCreateMutableCopy'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Equivalent to `CFRetain(path)', except it doesn't crash (as CFRetain
+ * does) if `path' is NULL. }
+
+function CGPathRetain( path: CGPathRef ): CGPathRef; external name '_CGPathRetain'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Equivalent to `CFRelease(path)', except it doesn't crash (as CFRelease
+ * does) if `path' is NULL. }
+
+procedure CGPathRelease( path: CGPathRef ); external name '_CGPathRelease'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return true if `path1' is equal to `path2'; false otherwise. }
+
+function CGPathEqualToPath( path1: CGPathRef; path2: CGPathRef ): CBool; external name '_CGPathEqualToPath'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{** Path construction functions. **}
+
+{ Move the current point to `(x, y)' in `path' and begin a new subpath.
+ * If `m' is non-NULL, then transform `(x, y)' by `m' first. }
+
+procedure CGPathMoveToPoint( path: CGMutablePathRef; const (*var*) m: CGAffineTransform; x: Float32; y: Float32 ); external name '_CGPathMoveToPoint'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Append a straight line segment from the current point to `(x, y)' in
+ * `path' and move the current point to `(x, y)'. If `m' is non-NULL, then
+ * transform `(x, y)' by `m' first. }
+
+procedure CGPathAddLineToPoint( path: CGMutablePathRef; const (*var*) m: CGAffineTransform; x: Float32; y: Float32 ); external name '_CGPathAddLineToPoint'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Append a quadratic curve from the current point to `(x, y)' with control
+ * point `(cpx, cpy)' in `path' and move the current point to `(x, y)'. If
+ * `m' is non-NULL, then transform all points by `m' first. }
+
+procedure CGPathAddQuadCurveToPoint( path: CGMutablePathRef; const (*var*) m: CGAffineTransform; cpx: Float32; cpy: Float32; x: Float32; y: Float32 ); external name '_CGPathAddQuadCurveToPoint'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Append a cubic Bezier curve from the current point to `(x,y)' with
+ * control points `(cp1x, cp1y)' and `(cp2x, cp2y)' in `path' and move the
+ * current point to `(x, y)'. If `m' is non-NULL, then transform all points
+ * by `m' first. }
+
+procedure CGPathAddCurveToPoint( path: CGMutablePathRef; const (*var*) m: CGAffineTransform; cp1x: Float32; cp1y: Float32; cp2x: Float32; cp2y: Float32; x: Float32; y: Float32 ); external name '_CGPathAddCurveToPoint'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Append a line from the current point to the starting point of the
+ * current subpath of `path' and end the subpath. }
+
+procedure CGPathCloseSubpath( path: CGMutablePathRef ); external name '_CGPathCloseSubpath'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{** Path construction convenience functions. **}
+
+{ Add `rect' to `path'. If `m' is non-NULL, then first transform `rect' by
+ * `m' before adding it to `path'. }
+
+procedure CGPathAddRect( path: CGMutablePathRef; const (*var*) m: CGAffineTransform; rect: CGRect ); external name '_CGPathAddRect'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Add each rectangle specified by `rects', an array of `count' CGRects, to
+ * `path'. If `m' is non-NULL, then first transform each rectangle by `m'
+ * before adding it to `path'. }
+
+procedure CGPathAddRects( path: CGMutablePathRef; const (*var*) m: CGAffineTransform; {const} rects: {variable-size-array} CGRectPtr; count: size_t ); external name '_CGPathAddRects'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Move to the first element of `points', an array of `count' CGPoints, and
+ * append a line from each point to the next point in `points'. If `m' is
+ * non-NULL, then first transform each point by `m'. }
+
+procedure CGPathAddLines( path: CGMutablePathRef; const (*var*) m: CGAffineTransform; {const} points: {variable-size-array} CGPointPtr; count: size_t ); external name '_CGPathAddLines'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Add an ellipse (an oval) inside `rect' to `path'. The ellipse is
+ * approximated by a sequence of Bezier curves. The center of the ellipse
+ * is the midpoint of `rect'. If `rect' is square, then the ellipse will
+ * be circular with radius equal to one-half the width (equivalently,
+ * one-half the height) of `rect'. If `rect' is rectangular, then the
+ * major- and minor-axes will be the `width' and `height' of rect. The
+ * ellipse forms a complete subpath of `path' --- that is, it begins with a
+ * "move to" and ends with a "close subpath" --- oriented in the clockwise
+ * direction. If `m' is non-NULL, then the constructed Bezier curves
+ * representing the ellipse will be transformed by `m' before they are
+ * added to `path'. }
+
+procedure CGPathAddEllipseInRect( path: CGMutablePathRef; const (*var*) m: CGAffineTransform; rect: CGRect ); external name '_CGPathAddEllipseInRect'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Add an arc of a circle to `path', possibly preceded by a straight line
+ * segment. The arc is approximated by a sequence of cubic Bezier
+ * curves. `(x, y)' is the center of the arc; `radius' is its radius;
+ * `startAngle' is the angle to the first endpoint of the arc; `endAngle'
+ * is the angle to the second endpoint of the arc; and `clockwise' is true
+ * if the arc is to be drawn clockwise, false otherwise. `startAngle' and
+ * `endAngle' are measured in radians. If `m' is non-NULL, then the
+ * constructed Bezier curves representing the arc will be transformed by
+ * `m' before they are added to `path'. }
+
+procedure CGPathAddArc( path: CGMutablePathRef; const (*var*) m: CGAffineTransform; x: Float32; y: Float32; radius: Float32; startAngle: Float32; endAngle: Float32; clockwise: CBool ); external name '_CGPathAddArc'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Add an arc of a circle to `path', possibly preceded by a straight line
+ * segment. The arc is approximated by a sequence of cubic Bezier curves.
+ * `radius' is the radius of the arc. The resulting arc is tangent to the
+ * line from the current point of `path' to `(x1, y1)', and the line from
+ * `(x1, y1)' to `(x2, y2)'. If `m' is non-NULL, then the constructed
+ * Bezier curves representing the arc will be transformed by `m' before
+ * they are added to `path'. }
+
+procedure CGPathAddArcToPoint( path: CGMutablePathRef; const (*var*) m: CGAffineTransform; x1: Float32; y1: Float32; x2: Float32; y2: Float32; radius: Float32 ); external name '_CGPathAddArcToPoint'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Add `path2' to `path1'. If `m' is non-NULL, then the points in `path2'
+* will be transformed by `m' before they are added to `path1'.}
+
+procedure CGPathAddPath( path1: CGMutablePathRef; const (*var*) m: CGAffineTransform; path2: CGPathRef ); external name '_CGPathAddPath'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{** Path information functions. **}
+
+{ Return true if `path' contains no elements, false otherwise. }
+
+function CGPathIsEmpty( path: CGPathRef ): CBool; external name '_CGPathIsEmpty'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return true if `path' represents a rectangle, false otherwise. }
+
+function CGPathIsRect( path: CGPathRef; var rect: CGRect ): CBool; external name '_CGPathIsRect'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return the current point of the current subpath of `path'. If there is
+ * no current point, then return CGPointZero. }
+
+function CGPathGetCurrentPoint( path: CGPathRef ): CGPoint; external name '_CGPathGetCurrentPoint'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return the bounding box of `path'. The bounding box is the smallest
+ * rectangle completely enclosing all points in the path, including control
+ * points for Bezier and quadratic curves. If the path is empty, then
+ * return CGRectNull. }
+
+function CGPathGetBoundingBox( path: CGPathRef ): CGRect; external name '_CGPathGetBoundingBox'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return true if `point' is contained in `path'; false otherwise. A point
+ * is contained in a path if it is inside the painted region when the path
+ * is filled; if `eoFill' is true, then the even-odd fill rule is used to
+ * evaluate the painted region of the path, otherwise, the winding-number
+ * fill rule is used. If `m' is non-NULL, then the point is transformed by
+ * `m' before determining whether the path contains it. }
+
+function CGPathContainsPoint( path: CGPathRef; const (*var*) m: CGAffineTransform; point: CGPoint; eoFill: CBool ): CBool; external name '_CGPathContainsPoint'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+type
+ CGPathElementType = SInt32;
+const
+ kCGPathElementMoveToPoint = 0;
+ kCGPathElementAddLineToPoint = 1;
+ kCGPathElementAddQuadCurveToPoint = 2;
+ kCGPathElementAddCurveToPoint = 3;
+ kCGPathElementCloseSubpath = 4;
+
+type
+ CGPathElement = record
+ typ: CGPathElementType;
+ points: CGPointPtr;
+ end;
+
+type
+ CGPathApplierFunction = procedure( info: UnivPtr; const (*var*) element: CGPathElement );
+
+procedure CGPathApply( path: CGPathRef; info: UnivPtr; func: CGPathApplierFunction ); external name '_CGPathApply'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{unit HITextUtils}
+{
+ File: HIToolbox/HITextUtils.h
+
+ Contains: Text utilities provided by HIToolbox.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 2002-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{
+ * GetTextAndEncodingFromCFString()
+ *
+ * Summary:
+ * Converts the contents of a CFString to the one- or two-byte
+ * encoding that most accurately represents the original Unicode
+ * characters in the string.
+ *
+ * Discussion:
+ * Because the Macintosh toolbox has had, until Carbon, little
+ * support for Unicode, you may often find that your applications
+ * need to translate a CFString (containing Unicode characters) back
+ * to a one- or two-byte encoding of the string in order to draw,
+ * measure, or otherwise use the text in the string.
+ * GetTextAndEncodingFromCFString is a utility that may be helpful
+ * to do this, in some circumstances. The Carbon toolbox uses this
+ * API itself when translating CFStrings to Pascal strings.
+ * GetTextAndEncodingFromCFString attempts to convert the Unicode
+ * characters in the string to the closest non-Unicode
+ * representation of the string. For example, a string containing
+ * only Unicode characters that are present in the MacRoman one-byte
+ * encoding will be translated to MacRoman, and
+ * kTextEncodingMacRoman will be returned as the encoding of the
+ * text. A string containing Unicode characters that are present in
+ * the MacJapanese two-byte encoding will be translated to
+ * MacJapanese (Shift-JIS), and kTextEncodingMacJapanese will be
+ * returned as the encoding of the text.
+ * GetTextAndEncodingFromCFString is designed to be used for simple
+ * strings which contain only text from a single language. It is not
+ * designed to translate strings with multiple runs of text from
+ * different languages, and will only return the first run of such a
+ * string; for example, if you pass it a string containing a run of
+ * Roman characters followed by a run of Japanese characters, it
+ * will only return the Roman characters in the output buffer. For
+ * more complex text translation, you should call the Unicode
+ * converter directly (see ConvertFromUnicodeToTextRun, which
+ * GetTextAndEncodingFromCFString uses internally).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inString:
+ * The string to convert.
+ *
+ * outText:
+ * The output buffer in which to place the converted text.
+ *
+ * inTextMaxLength:
+ * The length in bytes of the input buffer.
+ *
+ * outTextLength:
+ * On exit, contains the length in bytes of the text that was
+ * placed into the output buffer.
+ *
+ * outEncoding:
+ * On exit, contains the encoding of the text that was placed into
+ * the output buffer.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.2.5 and later
+ * Non-Carbon CFM: not available
+ }
+function GetTextAndEncodingFromCFString( inString: CFStringRef; outText: BytePtr; inTextMaxLength: ByteCount; var outTextLength: ByteCount; outEncoding: TextEncodingPtr { can be NULL } ): OSStatus; external name '_GetTextAndEncodingFromCFString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{unit OSUtils}
+{
+ File: CarbonCore/OSUtils.h
+
+ Contains: OS Utilities Interfaces.
+
+ Version: CarbonCore-654.0.85~1
+
+ Copyright: © 1985-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ HandToHand and other memory utilties were moved to MacMemory.h }
+
+{ Date and Time utilties were moved to DateTimeUtils.h }
+
+
+{$ALIGN MAC68K}
+
+const
+ useFree = 0;
+ useATalk = 1;
+ useAsync = 2;
+ useExtClk = 3; {Externally clocked}
+ useMIDI = 4;
+
+const
+ false32b = 0; {24 bit addressing error}
+ true32b = 1; {32 bit addressing error}
+
+const
+{ result types for RelString Call }
+ sortsBefore = -1; {first string < second string}
+ sortsEqual = 0; {first string = second string}
+ sortsAfter = 1; {first string > second string}
+
+const
+ dummyType = 0;
+ vType = 1;
+ ioQType = 2;
+ drvQType = 3;
+ evType = 4;
+ fsQType = 5;
+ sIQType = 6;
+ dtQType = 7;
+ nmType = 8;
+
+type
+ QTypes = SignedByte;
+type
+ SysParmTypePtr = ^SysParmType;
+ SysParmType = packed record
+ valid: UInt8;
+ aTalkA: UInt8;
+ aTalkB: UInt8;
+ config: UInt8;
+ portA: SInt16;
+ portB: SInt16;
+ alarm: SInt32;
+ font: SInt16;
+ kbdPrint: SInt16;
+ volClik: SInt16;
+ misc: SInt16;
+ end;
+type
+ SysPPtr = SysParmTypePtr;
+
+type
+ QElemPtr = ^QElem;
+ QElem = record
+ qLink: QElemPtr;
+ qType: SInt16;
+ qData: array [0..0] of SInt16;
+ end;
+type
+ QHdrPtr = ^QHdr;
+ QHdr = record
+ qFlags: SInt16;
+ qHead: QElemPtr;
+ qTail: QElemPtr;
+ end;
+type
+ DeferredTaskProcPtr = procedure( dtParam: SInt32 );
+ DeferredTaskUPP = DeferredTaskProcPtr;
+{
+ * NewDeferredTaskUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewDeferredTaskUPP( userRoutine: DeferredTaskProcPtr ): DeferredTaskUPP; external name '_NewDeferredTaskUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDeferredTaskUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeDeferredTaskUPP( userUPP: DeferredTaskUPP ); external name '_DisposeDeferredTaskUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDeferredTaskUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeDeferredTaskUPP( dtParam: SInt32; userUPP: DeferredTaskUPP ); external name '_InvokeDeferredTaskUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+type
+ DeferredTask = record
+ qLink: QElemPtr;
+ qType: SInt16;
+ dtFlags: SInt16;
+ dtAddr: DeferredTaskUPP;
+ dtParam: SInt32;
+ dtReserved: SInt32;
+ end;
+ DeferredTaskPtr = ^DeferredTask;
+{
+ In order for MachineLocation to be endian-safe, a new member
+ has been added to the 'u' union in the structure. You are
+ encouraged to use the new member instead of the old one.
+
+ If your code looked like this:
+
+ MachineLocation.u.dlsDelta = isDLS? 0x80: 0x00;
+
+ you should change it to this:
+
+ MachineLocation.u.dls.Delta = isDLS? 0x80: 0x00;
+
+ to be endian safe. The gmtDelta remains the same; the low 24-bits
+ are used. Remember that order of assignment DOES matter:
+
+ This will overwrite results:
+
+ MachineLocation.u.dls.Delta = 0xAA; // u = 0xAAGGGGGG; G=Garbage
+ MachineLocation.u.gmtDelta = 0xBBBBBB; // u = 0x00BBBBBB;
+
+ when in fact reversing the assignment would have preserved the values:
+
+ MachineLocation.u.gmtDelta = 0xBBBBBB; // u = 0x00BBBBBB;
+ MachineLocation.u.dls.Delta = 0xAA; // u = 0xAABBBBBB;
+
+ NOTE: The information regarding dlsDelta in Inside Mac is INCORRECT.
+ It's always 0x80 for daylight-saving time or 0x00 for standard time.
+}
+type
+ MachineLocationPtr = ^MachineLocation;
+ MachineLocation = packed record
+ latitude: Fract;
+ longitude: Fract;
+ case SInt16 of
+{$ifc TARGET_RT_BIG_ENDIAN}
+ 0: (
+ dlsDelta: SInt8; { signed byte; daylight savings delta }
+ );
+{$endc}
+ 1: (
+ gmtDelta: SInt32; { use low 24-bits only }
+ );
+ 2: (
+{$ifc TARGET_RT_LITTLE_ENDIAN}
+ pad0,pad1,pad2: SInt8;
+{$endc}
+ Delta: SInt8;
+ );
+ end;
+{
+ * IsMetric()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function IsMetric: Boolean; external name '_IsMetric';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetSysPPtr() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Don't use this function; it always returns NULL on Mac OS X.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetSysPPtr: SysPPtr; external name '_GetSysPPtr';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ NOTE: SysBeep() has been moved to Sound.h.
+ We could not automatically #include Sound.h in this file
+ because Sound.h indirectly #include's OSUtils.h which
+ would make a circular include.
+}
+{
+ * DTInstall() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * The Deferred Task Manager is deprecated. Look into restructuring
+ * your code to use threads, or MPTasks, or some other threading
+ * solution.
+ *
+ * Summary:
+ * Adds the specified task record to the deferred-task queue.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function DTInstall( dtTaskPtr: DeferredTaskPtr ): OSErr; external name '_DTInstall';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * DTUninstall() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * The Deferred Task Manager is deprecated. Look into restructuring
+ * your code to use threads, or MPTasks, or some other threading
+ * solution.
+ *
+ * Summary:
+ * Adds the specified task record to the deferred-task queue.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function DTUninstall( dtTaskPtr: DeferredTaskPtr ): OSErr; external name '_DTUninstall';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+function GetMMUMode: SInt8; inline;
+procedure SwapMMUMode( var mode: SInt8 ); inline;
+{
+ * Delay()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure Delay( numTicks: UInt32; var finalTicks: UInt32 ); external name '_Delay';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * WriteParam() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * This function no longer does anything on Mac OS X; you should
+ * remove all calls to it from your code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function WriteParam: OSErr; external name '_WriteParam';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * Enqueue()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure Enqueue( qElement: QElemPtr; qHeader: QHdrPtr ); external name '_Enqueue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * Dequeue()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function Dequeue( qElement: QElemPtr; qHeader: QHdrPtr ): OSErr; external name '_Dequeue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetCurrentA5() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * You no longer need to use SetCurrentA5() on Mac OS X.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function SetCurrentA5: SInt32; external name '_SetCurrentA5';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * SetA5() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * You no longer need to use SetA5() on Mac OS X.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function SetA5( newA5: SInt32 ): SInt32; external name '_SetA5';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * InitUtil() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function InitUtil: OSErr; external name '_InitUtil';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * MakeDataExecutable()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ }
+procedure MakeDataExecutable( baseAddress: UnivPtr; length: UInt32 ); external name '_MakeDataExecutable';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ReadLocation()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure ReadLocation( var loc: MachineLocation ); external name '_ReadLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * WriteLocation() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.0
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure WriteLocation( const (*var*) loc: MachineLocation ); external name '_WriteLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
+
+
+{
+ * TickCount()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TickCount: UInt32; external name '_TickCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CSCopyUserName()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function CSCopyUserName( useShortName: Boolean ): CFStringRef; external name '_CSCopyUserName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CSCopyMachineName()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function CSCopyMachineName: CFStringRef; external name '_CSCopyMachineName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ NOTE: SysEnvirons is obsolete. You should be using Gestalt.
+}
+{ Environs Equates }
+const
+ curSysEnvVers = 2; {Updated to equal latest SysEnvirons version}
+
+type
+ SysEnvRecPtr = ^SysEnvRec;
+ SysEnvRec = record
+ environsVersion: SInt16;
+ machineType: SInt16;
+ systemVersion: SInt16;
+ processor: SInt16;
+ hasFPU: Boolean;
+ hasColorQD: Boolean;
+ keyBoardType: SInt16;
+ atDrvrVersNum: SInt16;
+ sysVRefNum: SInt16;
+ end;
+const
+{ Machine Types }
+ envMac = -1;
+ envXL = -2;
+ envMachUnknown = 0;
+ env512KE = 1;
+ envMacPlus = 2;
+ envSE = 3;
+ envMacII = 4;
+ envMacIIx = 5;
+ envMacIIcx = 6;
+ envSE30 = 7;
+ envPortable = 8;
+ envMacIIci = 9;
+ envMacIIfx = 11;
+
+const
+{ CPU types }
+ envCPUUnknown = 0;
+ env68000 = 1;
+ env68010 = 2;
+ env68020 = 3;
+ env68030 = 4;
+ env68040 = 5;
+
+const
+{ Keyboard types }
+ envUnknownKbd = 0;
+ envMacKbd = 1;
+ envMacAndPad = 2;
+ envMacPlusKbd = 3;
+ envAExtendKbd = 4;
+ envStandADBKbd = 5;
+ envPrtblADBKbd = 6;
+ envPrtblISOKbd = 7;
+ envStdISOADBKbd = 8;
+ envExtISOADBKbd = 9;
+
+
+{unit PMDefinitions}
+{
+ File: PMDefinitions.p
+
+ Contains: Carbon Printing Manager Interfaces.
+
+ Version: Technology: Mac OS X
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1998-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ Printing objects }
+
+type
+ PMObject = Ptr;
+ PMDialog = ^SInt32; { an opaque 32-bit type }
+ PMDialogPtr = ^PMDialog; { when a var xx:PMDialog parameter can be nil, it is changed to xx: PMDialogPtr }
+ PMPrintSettings = ^SInt32; { an opaque 32-bit type }
+ PMPrintSettingsPtr = ^PMPrintSettings; { when a var xx:PMPrintSettings parameter can be nil, it is changed to xx: PMPrintSettingsPtr }
+ PMPageFormat = ^SInt32; { an opaque 32-bit type }
+ PMPageFormatPtr = ^PMPageFormat; { when a var xx:PMPageFormat parameter can be nil, it is changed to xx: PMPageFormatPtr }
+ PMPrintContext = ^SInt32; { an opaque 32-bit type }
+ PMPrintContextPtr = ^PMPrintContext; { when a var xx:PMPrintContext parameter can be nil, it is changed to xx: PMPrintContextPtr }
+ PMPrintSession = ^SInt32; { an opaque 32-bit type }
+ PMPrintSessionPtr = ^PMPrintSession; { when a var xx:PMPrintSession parameter can be nil, it is changed to xx: PMPrintSessionPtr }
+ PMPrinter = ^SInt32; { an opaque 32-bit type }
+ PMPrinterPtr = ^PMPrinter; { when a var xx:PMPrinter parameter can be nil, it is changed to xx: PMPrinterPtr }
+
+const
+ kPMCancel = $0080; { user hit cancel button in dialog }
+
+ kPMNoData = nil; { for general use }
+ kPMDontWantSize = nil; { for parameters which return size information }
+ kPMDontWantData = nil; { for parameters which return data }
+ kPMDontWantBoolean = nil; { for parameters which take a boolean reference }
+ kPMNoReference = nil; { for parameters which take an address pointer }
+
+ { for parameters which take a PrintSettings reference }
+ kPMNoPrintSettings = nil;
+
+ { for parameters which take a PageFormat reference }
+ kPMNoPageFormat = nil;
+
+ { for parameters which take a Server reference }
+ kPMServerLocal = nil;
+
+type
+ PMDestinationType = UInt16;
+const
+ kPMDestinationInvalid = 0;
+ kPMDestinationPrinter = 1;
+ kPMDestinationFile = 2;
+ kPMDestinationFax = 3;
+ kPMDestinationPreview = 4;
+
+ kPMDestinationTypeDefault = kPMDestinationPrinter;
+
+type
+ PMTag = UInt32;
+const
+ { common tags }
+ kPMCurrentValue = $63757272 (* 'curr' *); { current setting or value }
+ kPMDefaultValue = $64666C74 (* 'dflt' *); { default setting or value }
+ kPMMinimumValue = $6D696E76 (* 'minv' *); { the minimum setting or value }
+ kPMMaximumValue = $6D617876 (* 'maxv' *); { the maximum setting or value }
+ { profile tags }
+ kPMSourceProfile = $73726370 (* 'srcp' *); { source profile }
+ { resolution tags }
+ kPMMinRange = $6D6E7267 (* 'mnrg' *); { Min range supported by a printer }
+ kPMMaxRange = $6D787267 (* 'mxrg' *); { Max range supported by a printer }
+ kPMMinSquareResolution = $6D696E73 (* 'mins' *); { Min with X and Y resolution equal }
+ kPMMaxSquareResolution = $6D617873 (* 'maxs' *); { Max with X and Y resolution equal }
+ kPMDefaultResolution = $64667472 (* 'dftr' *); { printer default resolution }
+
+
+type
+ PMOrientation = UInt16;
+const
+ kPMPortrait = 1;
+ kPMLandscape = 2;
+ kPMReversePortrait = 3; { will revert to kPortrait for current drivers }
+ kPMReverseLandscape = 4; { will revert to kLandscape for current drivers }
+
+{ Printer states }
+type
+ PMPrinterState = UInt16;
+const
+ kPMPrinterIdle = 3;
+ kPMPrinterProcessing = 4;
+ kPMPrinterStopped = 5;
+
+ kSizeOfTPrint = 120; { size of old TPrint record }
+
+
+type
+ PMColorMode = UInt16;
+const
+ kPMBlackAndWhite = 1;
+ kPMGray = 2;
+ kPMColor = 3;
+ kPMColorModeDuotone = 4; { 2 channels }
+ kPMColorModeSpecialColor = 5; { to allow for special colors such as metalic, light cyan, etc. }
+
+
+type
+ PMColorSpaceModel = UInt32;
+const
+ kPMUnknownColorSpaceModel = 0;
+ kPMGrayColorSpaceModel = 1;
+ kPMRGBColorSpaceModel = 2;
+ kPMCMYKColorSpaceModel = 3;
+ kPMDevNColorSpaceModel = 4;
+
+ kPMColorSpaceModelCount = 4; { total number of color space models supported }
+
+ { Constants to define the ColorSync Intents. These intents may be used }
+ { to set an intent part way through a page or for an entire document. }
+
+type
+ PMColorSyncIntent = UInt32;
+const
+ kPMColorIntentUndefined = $0000; { User or application have not declared an intent, use the printer's default. }
+ kPMColorIntentAutomatic = $0001; { Automatically match for photos and graphics anywhere on the page. }
+ kPMColorIntentPhoto = $0002; { Use Photographic (cmPerceptual) intent for all contents. }
+ kPMColorIntentBusiness = $0004; { Use Business Graphics (cmSaturation) intent for all contents. }
+ kPMColorIntentRelColor = $0008; { Use Relative Colormetrics (Logo Colors) for the page. }
+ kPMColorIntentAbsColor = $0010; { Use absolute colormetric for the page. }
+ kPMColorIntentUnused = $FFE0; { Remaining bits unused at this time. }
+
+ { Print quality modes "standard options" }
+
+type
+ PMQualityMode = UInt32;
+const
+ kPMQualityLowest = $0000; { Absolute lowest print quality }
+ kPMQualityInkSaver = $0001; { Saves ink but may be slower }
+ kPMQualityDraft = $0004; { Print at highest speed, ink used is secondary consideration }
+ kPMQualityNormal = $0008; { Print in printers "general usage" mode for good balance between quality and speed }
+ kPMQualityPhoto = $000B; { Optimize quality of photos on the page. Speed is not a concern }
+ kPMQualityBest = $000D; { Get best quality output for all objects and photos. }
+ kPMQualityHighest = $000F; { Absolute highest quality attained from a printers }
+
+
+ { Constants for our "standard" paper types }
+
+type
+ PMPaperType = UInt32;
+const
+ kPMPaperTypeUnknown = $0000; { Not sure yet what paper type we have. }
+ kPMPaperTypePlain = $0001; { Plain paper }
+ kPMPaperTypeCoated = $0002; { Has a special coating for sharper images and text }
+ kPMPaperTypePremium = $0003; { Special premium coated paper }
+ kPMPaperTypeGlossy = $0004; { High gloss special coating }
+ kPMPaperTypeTransparency = $0005; { Used for overheads }
+ kPMPaperTypeTShirt = $0006; { Used to iron on t-shirts }
+
+ { Scaling alignment: }
+
+type
+ PMScalingAlignment = UInt16;
+const
+ kPMScalingPinTopLeft = 1;
+ kPMScalingPinTopRight = 2;
+ kPMScalingPinBottomLeft = 3;
+ kPMScalingPinBottomRight = 4;
+ kPMScalingCenterOnPaper = 5;
+ kPMScalingCenterOnImgArea = 6;
+
+ { Duplex binding directions: }
+
+type
+ PMDuplexBinding = UInt16;
+const
+ kPMDuplexBindingLeftRight = 1;
+ kPMDuplexBindingTopDown = 2;
+
+ { Layout directions: }
+
+type
+ PMLayoutDirection = UInt16;
+const
+ { Horizontal-major directions: }
+ kPMLayoutLeftRightTopBottom = 1; { English reading direction. }
+ kPMLayoutLeftRightBottomTop = 2;
+ kPMLayoutRightLeftTopBottom = 3;
+ kPMLayoutRightLeftBottomTop = 4; { Vertical-major directions: }
+ kPMLayoutTopBottomLeftRight = 5;
+ kPMLayoutTopBottomRightLeft = 6;
+ kPMLayoutBottomTopLeftRight = 7;
+ kPMLayoutBottomTopRightLeft = 8;
+
+ { Page borders: }
+
+type
+ PMBorderType = UInt16;
+const
+ kPMBorderSingleHairline = 1;
+ kPMBorderDoubleHairline = 2;
+ kPMBorderSingleThickline = 3;
+ kPMBorderDoubleThickline = 4;
+
+ { Useful Constants for PostScript Injection }
+ kPSPageInjectAllPages = -1; { specifies to inject on all pages }
+ kPSInjectionMaxDictSize = 5; { maximum size of a dictionary used for PSInjection }
+
+ { PostScript Injection values for kPSInjectionPlacementKey }
+
+type
+ PSInjectionPlacement = UInt16;
+const
+ kPSInjectionBeforeSubsection = 1;
+ kPSInjectionAfterSubsection = 2;
+ kPSInjectionReplaceSubsection = 3;
+
+ { PostScript Injection values for kPSInjectionSectionKey }
+
+type
+ PSInjectionSection = SInt32;
+const
+ { Job }
+ kInjectionSectJob = 1; { CoverPage }
+ kInjectionSectCoverPage = 2;
+
+ { PostScript Injection values for kPSInjectionSubSectionKey }
+
+type
+ PSInjectionSubsection = SInt32;
+const
+ kInjectionSubPSAdobe = 1; { %!PS-Adobe }
+ kInjectionSubPSAdobeEPS = 2; { %!PS-Adobe-3.0 EPSF-3.0 }
+ kInjectionSubBoundingBox = 3; { BoundingBox }
+ kInjectionSubEndComments = 4; { EndComments }
+ kInjectionSubOrientation = 5; { Orientation }
+ kInjectionSubPages = 6; { Pages }
+ kInjectionSubPageOrder = 7; { PageOrder }
+ kInjectionSubBeginProlog = 8; { BeginProlog }
+ kInjectionSubEndProlog = 9; { EndProlog }
+ kInjectionSubBeginSetup = 10; { BeginSetup }
+ kInjectionSubEndSetup = 11; { EndSetup }
+ kInjectionSubBeginDefaults = 12; { BeginDefaults }
+ kInjectionSubEndDefaults = 13; { EndDefaults }
+ kInjectionSubDocFonts = 14; { DocumentFonts }
+ kInjectionSubDocNeededFonts = 15; { DocumentNeededFonts }
+ kInjectionSubDocSuppliedFonts = 16; { DocumentSuppliedFonts }
+ kInjectionSubDocNeededRes = 17; { DocumentNeededResources }
+ kInjectionSubDocSuppliedRes = 18; { DocumentSuppliedResources }
+ kInjectionSubDocCustomColors = 19; { DocumentCustomColors }
+ kInjectionSubDocProcessColors = 20; { DocumentProcessColors }
+ kInjectionSubPlateColor = 21; { PlateColor }
+ kInjectionSubPageTrailer = 22; { PageTrailer }
+ kInjectionSubTrailer = 23; { Trailer }
+ kInjectionSubEOF = 24; { EOF }
+ kInjectionSubBeginFont = 25; { BeginFont }
+ kInjectionSubEndFont = 26; { EndFont }
+ kInjectionSubBeginResource = 27; { BeginResource }
+ kInjectionSubEndResource = 28; { EndResource }
+ kInjectionSubPage = 29; { Page }
+ kInjectionSubBeginPageSetup = 30; { BeginPageSetup }
+ kInjectionSubEndPageSetup = 31; { EndPageSetup }
+
+type
+ PMPPDDomain = UInt16;
+const
+ kAllPPDDomains = 1;
+ kSystemPPDDomain = 2;
+ kLocalPPDDomain = 3;
+ kNetworkPPDDomain = 4;
+ kUserPPDDomain = 5;
+ kCUPSPPDDomain = 6;
+
+ { Description types }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPMPPDDescriptionType CFSTRP('PMPPDDescriptionType')}
+{$endc}
+ { Document format strings }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPMDocumentFormatDefault CFSTRP('com.apple.documentformat.default')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPMDocumentFormatPDF CFSTRP('application/pdf')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPMDocumentFormatPICT CFSTRP('application/vnd.apple.printing-pict')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPMDocumentFormatPICTPS CFSTRP('application/vnd.apple.printing-pict-ps')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPMDocumentFormatPICTPSwPSNormalizer CFSTRP('application/vnd.apple.printing-pict-ps-viapsnormalizer')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPMDocumentFormatPostScript CFSTRP('application/postscript')}
+{$endc}
+ { Graphic context strings }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPMGraphicsContextDefault CFSTRP('com.apple.graphicscontext.default')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPMGraphicsContextQuickdraw CFSTRP('com.apple.graphicscontext.quickdraw')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPMGraphicsContextCoreGraphics CFSTRP('com.apple.graphicscontext.coregraphics')}
+{$endc}
+ { Data format strings }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPMDataFormatPS CFSTRP('application/postscript')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPMDataFormatPDF CFSTRP('application/pdf')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPMDataFormatPICT CFSTRP('application/vnd.apple.printing-pict-ps')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPMDataFormatPICTwPS CFSTRP('application/vnd.apple.printing-pict-ps')}
+{$endc}
+ { PostScript Injection Dictionary Keys }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPSInjectionSectionKey CFSTRP('section')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPSInjectionSubSectionKey CFSTRP('subsection')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPSInjectionPageKey CFSTRP('page')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPSInjectionPlacementKey CFSTRP('place')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPSInjectionPostScriptKey CFSTRP('psdata')}
+{$endc}
+ { PDF Workflow Keys }
+{ kPDFWorkFlowItemURLKey CFSTR("itemURL"); defined in GPCMacros.inc }
+{ kPDFWorkflowForlderURLKey CFSTR("folderURL"); defined in GPCMacros.inc }
+{ kPDFWorkflowDisplayNameKey CFSTR("displayName"); defined in GPCMacros.inc }
+{ kPDFWorkflowItemsKey CFSTR("items"); defined in GPCMacros.inc }
+ { OSStatus return codes }
+ kPMNoError = 0;
+ kPMGeneralError = -30870;
+ kPMOutOfScope = -30871; { an API call is out of scope }
+ kPMInvalidParameter = -50; { a required parameter is missing or invalid }
+ kPMNoDefaultPrinter = -30872; { no default printer selected }
+ kPMNotImplemented = -30873; { this API call is not supported }
+ kPMNoSuchEntry = -30874; { no such entry }
+ kPMInvalidPrintSettings = -30875; { the printsettings reference is invalid }
+ kPMInvalidPageFormat = -30876; { the pageformat reference is invalid }
+ kPMValueOutOfRange = -30877; { a value passed in is out of range }
+ kPMLockIgnored = -30878; { the lock value was ignored }
+
+ kPMInvalidPrintSession = -30879; { the print session is invalid }
+ kPMInvalidPrinter = -30880; { the printer reference is invalid }
+ kPMObjectInUse = -30881; { the object is in use }
+ kPMInvalidPreset = -30882; { the preset is invalid }
+
+
+ kPMPrintAllPages = $FFFFFFFF;
+
+ kPMUnlocked = false;
+ kPMLocked = true;
+
+
+type
+ PMRectPtr = ^PMRect;
+ PMRect = record
+ top: Double;
+ left: Double;
+ bottom: Double;
+ right: Double;
+ end;
+
+ PMResolutionPtr = ^PMResolution;
+ PMResolution = record
+ hRes: Double;
+ vRes: Double;
+ end;
+
+ PMLanguageInfoPtr = ^PMLanguageInfo;
+ PMLanguageInfo = record
+ level: Str32;
+ version: Str32;
+ release: Str32;
+ pad: SInt8
+ end;
+
+ PMPaperMargins = PMRect;
+
+{$ALIGN MAC68K}
+
+
+{unit Scrap}
+{
+ File: HIToolbox/Scrap.h
+
+ Contains: Scrap Manager Interfaces.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1985-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+ ________________________________________________________________
+ UNIVERSAL SCRAP MANAGER INTERFACES
+ ________________________________________________________________
+ The following interfaces are available when compiling for BOTH
+ Carbon AND Mac OS 8.
+ ________________________________________________________________
+}
+{
+ While we're in here mucking about, we defined a new type to
+ to put some confusion to rest. The old calls, as well as the
+ new calls, use the new type. Existing clients should be
+ blissfully ignorant.
+}
+
+type
+ ScrapFlavorType = FourCharCode;
+{
+ Newsflash! After 15 years of arduous toil, it's finally possible
+ for specially trained typists wielding advanced text editing
+ technology to define symbolic names for commonly used scrap
+ flavor type constants! Apple triumphs again!
+}
+const
+ kScrapFlavorTypePicture = $50494354 (* 'PICT' *); { contents of a PicHandle}
+ kScrapFlavorTypeText = $54455854 (* 'TEXT' *); { stream of characters}
+ kScrapFlavorTypeTextStyle = $7374796C (* 'styl' *); { see TEGetStyleScrapHandle}
+ kScrapFlavorTypeMovie = $6D6F6F76 (* 'moov' *); { reference to a movie}
+ kScrapFlavorTypeSound = $736E6420 (* 'snd ' *); { see SndRecord and SndPlay}
+ kScrapFlavorTypeUnicode = $75747874 (* 'utxt' *); { stream of UTF16 characters (internal representation)}
+ kScrapFlavorTypeUTF16External = $75743136 (* 'ut16' *); { stream of UTF16 characters (external representation)}
+ kScrapFlavorTypeUnicodeStyle = $7573746C (* 'ustl' *); { ATSUI defines; Textension uses}
+
+{
+ If you are a Carbon client and you need to run on Mac OS 8,
+ you may still need to load and unload the scrap. Under Mac OS
+ X, the scrap is held by the pasteboard server instead of in a
+ handle in your app's heap, so LoadScrap and UnloadScrap do
+ nothing when called under Mac OS X.
+}
+
+{
+ * LoadScrap()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LoadScrap: OSStatus; external name '_LoadScrap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * UnloadScrap()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function UnloadScrap: OSStatus; external name '_UnloadScrap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+
+{
+ * InfoScrap()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * GetScrap()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * ZeroScrap()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * PutScrap()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ ________________________________________________________________
+ CARBON SCRAP MANAGER INTERFACES
+ ________________________________________________________________
+ The following interfaces are available only when compiling for
+ Carbon.
+ ________________________________________________________________
+}
+
+{
+ When promising a scrap flavor, it's OK if you
+ don't yet know how big the flavor data will be.
+ In this case, just pass kScrapFlavorSizeUnknown
+ for the flavor data size.
+}
+
+const
+ kScrapFlavorSizeUnknown = -1;
+
+{
+ kScrapReservedFlavorType is a flavor type which is reserved
+ for use by Scrap Manager. If you pass it to Scrap Manager,
+ it will be rejected.
+}
+
+const
+ kScrapReservedFlavorType = $73726674 (* 'srft' *);
+
+{
+ We've added scrap flavor flags ala Drag Manager.
+
+ kScrapFlavorMaskNone means you want none of the flags.
+
+ kScrapFlavorSenderOnlyMask means only the process which
+ put the flavor on the scrap can see it. If some other
+ process put a flavor with this flag on the scrap,
+ your process will never see the flavor, so there's
+ no point in testing for this flag.
+
+ kScrapFlavorTranslated means the flavor was translated
+ from some other flavor in the scrap by Translation Manager.
+ Most callers should not care about this bit.
+}
+const
+ kScrapFlavorMaskNone = $00000000;
+ kScrapFlavorMaskSenderOnly = $00000001;
+ kScrapFlavorMaskTranslated = $00000002;
+
+type
+ ScrapFlavorFlags = UInt32;
+{
+ ScrapFlavorInfo describes a single flavor within
+ a scrap.
+}
+type
+ ScrapFlavorInfoPtr = ^ScrapFlavorInfo;
+ ScrapFlavorInfo = record
+ flavorType: ScrapFlavorType;
+ flavorFlags: ScrapFlavorFlags;
+ end;
+type
+ ScrapRef = ^SInt32; { an opaque 32-bit type }
+{
+ kScrapRefNone is guaranteed to be an invalid ScrapRef. This
+ is convenient when initializing application variables.
+}
+const
+ kScrapRefNone = nil;
+{
+ Defined Apple scrap names for GetScrapByName
+ kScrapClipboardScrap traditional clipboard scrap
+ kScrapFindScrap compatible with Cocoa's global find scrap
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kScrapClipboardScrap CFSTRP('com.apple.scrap.clipboard')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kScrapFindScrap CFSTRP('com.apple.scrap.find')}
+{$endc}
+
+{ Enumerated options to be passed to GetScrapByName}
+
+const
+ kScrapGetNamedScrap = 0; { get current named scrap without bumping}
+ kScrapClearNamedScrap = 1 shl 0; { acquire the named scrap, bumping and clearing}
+
+{
+ GetScrapByName allows access to an indefinite number of public or private
+ scraps. The constant kScrapClipboardScrap refers to the "current" scrap
+ we've all come to know and love. kScrapFindScrap allows Carbon apps to
+ interact seamlessly with Cocoa's global find scrap. Note that calling:
+
+ GetScrapByName( kScrapClipboardScrap, kScrapGetNamedScrap, &scrap );
+
+ is an exact match to the call:
+
+ GetCurrentScrap( &scrap );
+
+ Additionally, a call to:
+
+ GetScrapByName( kScrapClipboardScrap, kScrapClearNamedScrap, &scrap );
+
+ is a replacement for the sequence:
+
+ ClearCurrentScrap();
+ GetCurrentScrap( &scrap );
+
+ You can use this API to generate your own private scraps to use as a high
+ level interprocess communication between your main and helper apps. The Java
+ naming convention is suggested for your scraps ( ie. com.joeco.scrap.secret ).
+
+ CarbonLib does not support arbitrary named scraps; when calling this API on
+ CarbonLib, kScrapClipboardScrap is the only supported value for the name parameter.
+}
+{
+ * GetScrapByName()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function GetScrapByName( name: CFStringRef; options: OptionBits; var scrap: ScrapRef ): OSStatus; external name '_GetScrapByName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ GetCurrentScrap obtains a reference to the current scrap.
+ The ScrapRef obtained via GetCurrentScrap will become
+ invalid and unusable after the scrap is cleared.
+}
+
+{
+ * GetCurrentScrap()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetCurrentScrap( var scrap: ScrapRef ): OSStatus; external name '_GetCurrentScrap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ GetScrapFlavorFlags tells you [a] whether the scrap contains
+ data for a particular flavor and [b] some things about that
+ flavor if it exists. This call never blocks, and is useful
+ for deciding whether to enable the Paste item in your Edit
+ menu, among other things.
+}
+
+{
+ * GetScrapFlavorFlags()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetScrapFlavorFlags( scrap: ScrapRef; flavorType: ScrapFlavorType; var flavorFlags: ScrapFlavorFlags ): OSStatus; external name '_GetScrapFlavorFlags';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ GetScrapFlavorSize gets the size of the data of the specified
+ flavor. This function blocks until the specified flavor
+ data is available. GetScrapFlavorSize is intended as a prelude
+ to allocating memory and calling GetScrapFlavorData.
+}
+
+{
+ * GetScrapFlavorSize()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetScrapFlavorSize( scrap: ScrapRef; flavorType: ScrapFlavorType; var byteCount: Size ): OSStatus; external name '_GetScrapFlavorSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ GetScrapFlavorData gets the data from the specified flavor in the
+ specified scrap. This function blocks until the specified flavor
+ data is available. Specify the maximum size your buffer can contain;
+ on output, this function produces the number of bytes that were
+ available (even if this is more than you requested).
+}
+
+{
+ * GetScrapFlavorData()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetScrapFlavorData( scrap: ScrapRef; flavorType: ScrapFlavorType; var byteCount: Size; destination: UnivPtr ): OSStatus; external name '_GetScrapFlavorData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ ClearCurrentScrap clears the current scrap. Call this
+ first when the user requests a Copy or Cut operation --
+ even if you maintain a private scrap! You should not wait
+ until receiving a suspend event to call ClearCurrentScrap. Call
+ it immediately after the user requests a Copy or Cut operation.
+ You don't need to put any data on the scrap immediately (although
+ it's perfectly fine to do so). You DO need to call GetCurrentScrap
+ after ClearCurrentScrap so you'll have a valid ScrapRef to pass
+ to other functions.
+}
+
+{
+ * ClearCurrentScrap()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function ClearCurrentScrap: OSStatus; external name '_ClearCurrentScrap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ ClearScrap will clear the scrap passed in and return the bumped
+ ScrapRef value. ClearScrap behaves similarly to GetScrapByName
+ when called with the kScrapClearNamedScrap option with the
+ benefit of not requiring a name in the event one is not available.
+
+ CarbonLib does not support arbitrary named scraps; when calling this
+ API on CarbonLib, only clearing the current scrap is supported.
+}
+{
+ * ClearScrap()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function ClearScrap( var inOutScrap: ScrapRef ): OSStatus; external name '_ClearScrap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ PutScrapFlavor is a lot like PutScrap, with two differences:
+ we added a ScrapRef parameter at the beginning and you can
+ "promise" various aspects of a flavor. If you pass a NIL
+ data pointer, this is a promise that in the future you
+ will provide data for this flavor. Provide the data
+ through a subsequent call to PutScrapFlavor, either later
+ in the same code flow or during a scrap promise keeper proc.
+ If you know how big the data is, you can pass the size as
+ well, and this may allow subsequent callers of GetScrapFlavorInfo
+ to avoid blocking. If you don't know the size, pass -1.
+ If you pass a 0 size, you are telling Scrap Manager not to
+ expect any data for this flavor. In this case, the flavor
+ data pointer is ignored. NOTE: the last time you can provide
+ scrap flavor data is when your scrap promise keeper gets
+ called. It is NOT possible to call PutScrapFlavor while
+ handling a suspend event; suspend events under Carbon
+ simply don't work the way they do under Mac OS 8.
+
+ The method for setting Scrap Manager promises differs from that for Drag Manger promises.
+ This chart describes the method for setting scrap promises via PutScrapFlavor().
+
+ dataPtr dataSize result
+ pointer value actual data size The data of size dataSize pointed to by dataPtr is added to the scrap.
+ 0 actual data size A promise for data of size dataSize is placed on the scrap.
+ 0 -1 A promise for data of an undetermined size is placed on the scrap.
+ ignored 0 A flavor with no data expected is placed on the scrap. This is not a promise.
+}
+{
+ * PutScrapFlavor()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function PutScrapFlavor( scrap: ScrapRef; flavorType: ScrapFlavorType; flavorFlags: ScrapFlavorFlags; flavorSize: Size; flavorData: {const} UnivPtr { can be NULL } ): OSStatus; external name '_PutScrapFlavor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ ScrapPromiseKeeper is a function you write which is called by
+ Scrap Manager as needed to keep your earlier promise of a
+ particular scrap flavor. When your function is called, deliver
+ the requested data by calling PutScrapFlavor.
+}
+
+type
+ ScrapPromiseKeeperProcPtr = function( scrap: ScrapRef; flavorType: ScrapFlavorType; userData: UnivPtr ): OSStatus;
+type
+ ScrapPromiseKeeperUPP = ScrapPromiseKeeperProcPtr;
+{
+ * NewScrapPromiseKeeperUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewScrapPromiseKeeperUPP( userRoutine: ScrapPromiseKeeperProcPtr ): ScrapPromiseKeeperUPP; external name '_NewScrapPromiseKeeperUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeScrapPromiseKeeperUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeScrapPromiseKeeperUPP( userUPP: ScrapPromiseKeeperUPP ); external name '_DisposeScrapPromiseKeeperUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeScrapPromiseKeeperUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeScrapPromiseKeeperUPP( scrap: ScrapRef; flavorType: ScrapFlavorType; userData: UnivPtr; userUPP: ScrapPromiseKeeperUPP ): OSStatus; external name '_InvokeScrapPromiseKeeperUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ SetScrapPromiseKeeper associates a ScrapPromiseKeeper with a
+ scrap. You can remove a ScrapPromiseKeeper from a scrap by
+ passing a NIL ScrapPromiseKeeper to SetScrapPromiseKeeper.
+ Pass whatever you like in the last parameter; its value will
+ be passed to your ScrapPromiseKeeper, which can do whatever
+ it likes with the value. You might choose to pass a pointer
+ or handle to some private scrap data which the
+ ScrapPromiseKeeper could use in fabricating one or more
+ promised flavors.
+}
+{
+ * SetScrapPromiseKeeper()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function SetScrapPromiseKeeper( scrap: ScrapRef; upp: ScrapPromiseKeeperUPP; userData: {const} UnivPtr ): OSStatus; external name '_SetScrapPromiseKeeper';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ GetScrapFlavorCount produces the number of
+ items which can be obtained by GetScrapFlavorInfoList.
+}
+
+{
+ * GetScrapFlavorCount()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetScrapFlavorCount( scrap: ScrapRef; var infoCount: UInt32 ): OSStatus; external name '_GetScrapFlavorCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ GetScrapFlavorInfoList fills a list (array)
+ of items which each describe the corresponding
+ flavor in the scrap. It fills no more array
+ elements as are specified. On exit, it produces
+ the count of elements it filled (which may be
+ smaller than the count requested). Yes, YOU
+ must provide the memory for the array.
+}
+
+{
+ * GetScrapFlavorInfoList()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetScrapFlavorInfoList( scrap: ScrapRef; var infoCount: UInt32; info: {variable-size-array} ScrapFlavorInfoPtr ): OSStatus; external name '_GetScrapFlavorInfoList';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ CallInScrapPromises forces all promises to be kept.
+ If your application promises at least one flavor
+ AND it does NOT adopt the new event model, you
+ should call this function when your application
+ is about to quit. If your app promises no flavors,
+ there is no need to call this function, and if
+ your app adopts the new event model, this function
+ will be called automagically for you. It doesn't
+ hurt to call this function more than once, though
+ promise keepers may be asked to keep promises
+ they already tried and failed.
+}
+
+{
+ * CallInScrapPromises()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function CallInScrapPromises: OSStatus; external name '_CallInScrapPromises';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+
+
+{unit Timer}
+{
+ File: Timer.p
+
+ Contains: Time Manager interfaces.
+
+ Version: Technology: Mac OS 8.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ { high bit of qType is set if task is active }
+ kTMTaskActive = $00008000;
+
+
+type
+ TMTaskPtr = ^TMTask;
+{$ifc TYPED_FUNCTION_POINTERS}
+ TimerProcPtr = procedure(tmTaskPtr_: TMTaskPtr);
+{$elsec}
+ TimerProcPtr = Register68kProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ TimerUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ TimerUPP = UniversalProcPtr;
+{$endc}
+ TMTask = record
+ qLink: QElemPtr;
+ qType: SInt16;
+ tmAddr: TimerUPP;
+ tmCount: SInt32;
+ tmWakeUp: SInt32;
+ tmReserved: SInt32;
+ end;
+
+ {
+ * InsTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InsTime(tmTaskPtr: QElemPtr); external name '_InsTime';
+{
+ * InsXTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InsXTime(tmTaskPtr: QElemPtr); external name '_InsXTime';
+{
+ * PrimeTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PrimeTime(tmTaskPtr: QElemPtr; count: SInt32); external name '_PrimeTime';
+{
+ * RmvTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure RmvTime(tmTaskPtr: QElemPtr); external name '_RmvTime';
+{ InstallTimeTask, InstallXTimeTask, PrimeTimeTask and RemoveTimeTask work }
+{ just like InsTime, InsXTime, PrimeTime, and RmvTime except that they }
+{ return an OSErr result. }
+{
+ * InstallTimeTask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InstallTimeTask(tmTaskPtr: QElemPtr): OSErr; external name '_InstallTimeTask';
+{
+ * InstallXTimeTask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InstallXTimeTask(tmTaskPtr: QElemPtr): OSErr; external name '_InstallXTimeTask';
+{
+ * PrimeTimeTask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PrimeTimeTask(tmTaskPtr: QElemPtr; count: SInt32): OSErr; external name '_PrimeTimeTask';
+{
+ * RemoveTimeTask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RemoveTimeTask(tmTaskPtr: QElemPtr): OSErr; external name '_RemoveTimeTask';
+{
+ * Microseconds()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure Microseconds(var microTickCount: UnsignedWide); external name '_Microseconds';
+const
+ uppTimerProcInfo = $0000B802;
+ {
+ * NewTimerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewTimerUPP(userRoutine: TimerProcPtr): TimerUPP; external name '_NewTimerUPP'; { old name was NewTimerProc }
+{
+ * DisposeTimerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeTimerUPP(userUPP: TimerUPP); external name '_DisposeTimerUPP';
+{
+ * InvokeTimerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeTimerUPP(tmTaskPtr_: TMTaskPtr; userRoutine: TimerUPP); external name '_InvokeTimerUPP'; { old name was CallTimerProc }
+
+
+{$ALIGN MAC68K}
+
+
+{unit ABAddressBook}
+//
+// ABAddressBookC.h
+// AddressBook Framework
+//
+// Copyright (c) 2002-2003 Apple Computer. All rights reserved.
+//
+
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+type
+ ABRecordRef = ^SInt32; { an opaque 32-bit type }
+ ABPersonRef = ^SInt32; { an opaque 32-bit type }
+ ABGroupRef = ^SInt32; { an opaque 32-bit type }
+ ABSearchElementRef = ^SInt32; { an opaque 32-bit type }
+ ABAddressBookRef = ^SInt32; { an opaque 32-bit type }
+ ABMultiValueRef = ^SInt32; { an opaque 32-bit type }
+ ABMutableMultiValueRef = ^SInt32; { an opaque 32-bit type }
+
+// --------------------------------------------------------------------------------
+// LSOpenCFURLRef support
+// --------------------------------------------------------------------------------
+// An application can open the AddressBook app and select (and edit) a specific
+// person by using the LSOpenCFURLRef API.
+//
+// To launch (or bring to front) the Address Book app and select a given person
+//
+// CFStringRef uniqueId = ABRecordCopyUniqueId(aPerson);
+// CFStringRef urlString = CFStringCreateWithFormat(NULL, CFSTR(addressbook://%@), uniqueId);
+// CFURLRef urlRef = CFURLCreateWithString(NULL, urlString, NULL);
+// LSOpenCFURLRef(urlRef, NULL);
+// CFRelease(uniqueId);
+// CFRelease(urlRef);
+// CFRelease(urlString);
+//
+// To launch (or bring to front) the Address Book app and edit a given person
+//
+// CFStringRef uniqueId = ABRecordCopyUniqueId(aPerson);
+// CFStringRef urlString = CFStringCreateWithFormat(NULL, CFSTR(addressbook://%@?edit), uniqueId);
+// CFURLRef urlRef = CFURLCreateWithString(NULL, urlString, NULL);
+// LSOpenCFURLRef(urlRef, NULL);
+// CFRelease(uniqueId);
+// CFRelease(urlRef);
+// CFRelease(urlString);
+
+// --------------------------------------------------------------------------------
+// AddressBook
+// --------------------------------------------------------------------------------
+
+ // --- There is only one Address Book
+function ABGetSharedAddressBook: ABAddressBookRef; external name '_ABGetSharedAddressBook';
+
+ // --- Searching
+function ABCopyArrayOfMatchingRecords( addressBook: ABAddressBookRef; search: ABSearchElementRef ): CFArrayRef; external name '_ABCopyArrayOfMatchingRecords';
+
+ // --- Saving
+function ABSave( addressBook: ABAddressBookRef ): Boolean; external name '_ABSave';
+function ABHasUnsavedChanges( addressBook: ABAddressBookRef ): Boolean; external name '_ABHasUnsavedChanges';
+
+ // --- Me
+function ABGetMe( addressBook: ABAddressBookRef ): ABPersonRef; external name '_ABGetMe'; // Not retain???
+procedure ABSetMe( addressBook: ABAddressBookRef; moi: ABPersonRef ); external name '_ABSetMe';
+
+ // Returns the record class Name for a particular uniqueId
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function ABCopyRecordTypeFromUniqueId( addressBook: ABAddressBookRef; uniqueId: CFStringRef ): CFStringRef; external name '_ABCopyRecordTypeFromUniqueId';
+
+ // --- Properties
+ // Property names must be unique for a record type
+function ABAddPropertiesAndTypes( addressBook: ABAddressBookRef; recordType: CFStringRef; propertiesAnTypes: CFDictionaryRef ): SInt32; external name '_ABAddPropertiesAndTypes';
+function ABRemoveProperties( addressBook: ABAddressBookRef; recordType: CFStringRef; properties: CFArrayRef ): SInt32; external name '_ABRemoveProperties';
+function ABCopyArrayOfPropertiesForRecordType( addressBook: ABAddressBookRef; recordType: CFStringRef ): CFArrayRef; external name '_ABCopyArrayOfPropertiesForRecordType';
+function ABTypeOfProperty( addressBook: ABAddressBookRef; recordType: CFStringRef; proprty: CFStringRef ): ABPropertyType; external name '_ABTypeOfProperty';
+
+ // --- Records (Person, Group)
+function ABCopyRecordForUniqueId( addressBook: ABAddressBookRef; uniqueId: CFStringRef ): ABRecordRef; external name '_ABCopyRecordForUniqueId';
+function ABAddRecord( addressBook: ABAddressBookRef; recrd: ABRecordRef ): Boolean; external name '_ABAddRecord';
+function ABRemoveRecord( addressBook: ABAddressBookRef; recrd: ABRecordRef ): Boolean; external name '_ABRemoveRecord';
+
+ // --- People
+function ABCopyArrayOfAllPeople( addressBook: ABAddressBookRef ): CFArrayRef; external name '_ABCopyArrayOfAllPeople'; // Array of ABPerson
+
+ // --- Groups
+function ABCopyArrayOfAllGroups( addressBook: ABAddressBookRef ): CFArrayRef; external name '_ABCopyArrayOfAllGroups'; // Array of ABGroup
+
+// --------------------------------------------------------------------------------
+// ABRecord
+// --------------------------------------------------------------------------------
+
+function ABRecordCopyRecordType( recrd: ABRecordRef ): CFStringRef; external name '_ABRecordCopyRecordType';
+
+ // --- Property value
+function ABRecordCopyValue( recrd: ABRecordRef; proprty: CFStringRef ): CFTypeRef; external name '_ABRecordCopyValue';
+ // returns a CFDictionary for multi-value properties
+function ABRecordSetValue( recrd: ABRecordRef; proprty: CFStringRef; value: CFTypeRef ): Boolean; external name '_ABRecordSetValue';
+ // takes a CFDictionary for multi-value properties
+function ABRecordRemoveValue( recrd: ABRecordRef; proprty: CFStringRef ): Boolean; external name '_ABRecordRemoveValue';
+
+ // ---- Unique ID access convenience
+function ABRecordCopyUniqueId( recrd: ABRecordRef ): CFStringRef; external name '_ABRecordCopyUniqueId';
+
+// --------------------------------------------------------------------------------
+// ABPerson
+// --------------------------------------------------------------------------------
+
+function ABPersonCreate: ABPersonRef; external name '_ABPersonCreate';
+
+function ABPersonCreateWithVCardRepresentation( vCard: CFDataRef ): ABPersonRef; external name '_ABPersonCreateWithVCardRepresentation';
+function ABPersonCopyVCardRepresentation( person: ABPersonRef ): CFDataRef; external name '_ABPersonCopyVCardRepresentation';
+
+function ABPersonCopyParentGroups( person: ABPersonRef ): CFArrayRef; external name '_ABPersonCopyParentGroups'; // Groups this person belongs to
+
+ // --- Search elements
+function ABPersonCreateSearchElement( proprty: CFStringRef; labl: CFStringRef; key: CFStringRef; value: CFTypeRef; comparison: ABSearchComparison ): ABSearchElementRef; external name '_ABPersonCreateSearchElement';
+
+// --------------------------------------------------------------------------------
+// ABGroups
+// --------------------------------------------------------------------------------
+
+function ABGroupCreate: ABGroupRef; external name '_ABGroupCreate';
+
+ // --- Dealing with Persons
+function ABGroupCopyArrayOfAllMembers( group: ABGroupRef ): CFArrayRef; external name '_ABGroupCopyArrayOfAllMembers';
+function ABGroupAddMember( group: ABGroupRef; personToAdd: ABPersonRef ): Boolean; external name '_ABGroupAddMember';
+function ABGroupRemoveMember( group: ABGroupRef; personToRemove: ABPersonRef ): Boolean; external name '_ABGroupRemoveMember';
+
+ // --- Dealing with Groups
+function ABGroupCopyArrayOfAllSubgroups( group: ABGroupRef ): CFArrayRef; external name '_ABGroupCopyArrayOfAllSubgroups';
+function ABGroupAddGroup( group: ABGroupRef; groupToAdd: ABGroupRef ): Boolean; external name '_ABGroupAddGroup';
+function ABGroupRemoveGroup( group: ABGroupRef; groupToRemove: ABGroupRef ): Boolean; external name '_ABGroupRemoveGroup';
+
+ // --- Dealong with Parents
+function ABGroupCopyParentGroups( group: ABGroupRef ): CFArrayRef; external name '_ABGroupCopyParentGroups';
+
+ // --- Distribution list
+function ABGroupSetDistributionIdentifier( group: ABGroupRef; person: ABPersonRef; proprty: CFStringRef; identifier: CFStringRef ): Boolean; external name '_ABGroupSetDistributionIdentifier';
+function ABGroupCopyDistributionIdentifier( group: ABGroupRef; person: ABPersonRef; proprty: CFStringRef ): CFStringRef; external name '_ABGroupCopyDistributionIdentifier';
+
+ // --- Search elements
+function ABGroupCreateSearchElement( proprty: CFStringRef; labl: CFStringRef; key: CFStringRef; value: CFTypeRef; comparison: ABSearchComparison ): ABSearchElementRef; external name '_ABGroupCreateSearchElement';
+
+// --------------------------------------------------------------------------------
+// ABSearchElement
+// --------------------------------------------------------------------------------
+
+function ABSearchElementCreateWithConjunction( conjunction: ABSearchConjunction; childrenSearchElement: CFArrayRef ): ABSearchElementRef; external name '_ABSearchElementCreateWithConjunction';
+
+function ABSearchElementMatchesRecord( searchElement: ABSearchElementRef; recrd: ABRecordRef ): Boolean; external name '_ABSearchElementMatchesRecord';
+
+// --------------------------------------------------------------------------------
+// ABMultiValue
+// --------------------------------------------------------------------------------
+
+function ABMultiValueCreate: ABMultiValueRef; external name '_ABMultiValueCreate';
+function ABMultiValueCount( multiValue: ABMultiValueRef ): UInt32; external name '_ABMultiValueCount';
+function ABMultiValueCopyValueAtIndex( multiValue: ABMultiValueRef; index: SInt32 ): CFTypeRef; external name '_ABMultiValueCopyValueAtIndex';
+function ABMultiValueCopyLabelAtIndex( multiValue: ABMultiValueRef; index: SInt32 ): CFStringRef; external name '_ABMultiValueCopyLabelAtIndex';
+function ABMultiValueCopyPrimaryIdentifier( multiValue: ABMultiValueRef ): CFStringRef; external name '_ABMultiValueCopyPrimaryIdentifier';
+function ABMultiValueIndexForIdentifier( multiValue: ABMultiValueRef; identifier: CFStringRef ): SInt32; external name '_ABMultiValueIndexForIdentifier';
+function ABMultiValueCopyIdentifierAtIndex( multiValue: ABMultiValueRef; index: SInt32 ): CFStringRef; external name '_ABMultiValueCopyIdentifierAtIndex';
+function ABMultiValuePropertyType( multiValue: ABMultiValueRef ): ABPropertyType; external name '_ABMultiValuePropertyType';
+function ABMultiValueCreateCopy( multiValue: ABMultiValueRef ): ABMultiValueRef; external name '_ABMultiValueCreateCopy';
+
+// --------------------------------------------------------------------------------
+// ABMutableMultiValue
+// --------------------------------------------------------------------------------
+
+function ABMultiValueCreateMutable: ABMutableMultiValueRef; external name '_ABMultiValueCreateMutable';
+function ABMultiValueAdd( multiValue: ABMutableMultiValueRef; value: CFTypeRef; labl: CFStringRef; var outIdentifier: CFStringRef ): Boolean; external name '_ABMultiValueAdd';
+function ABMultiValueInsert( multiValue: ABMutableMultiValueRef; value: CFTypeRef; labl: CFStringRef; index: SInt32; var outIdentifier: CFStringRef ): Boolean; external name '_ABMultiValueInsert';
+function ABMultiValueRemove( multiValue: ABMutableMultiValueRef; index: SInt32 ): Boolean; external name '_ABMultiValueRemove';
+function ABMultiValueReplaceValue( multiValue: ABMutableMultiValueRef; value: CFTypeRef; index: SInt32 ): Boolean; external name '_ABMultiValueReplaceValue';
+function ABMultiValueReplaceLabel( multiValue: ABMutableMultiValueRef; labl: CFStringRef; index: SInt32 ): Boolean; external name '_ABMultiValueReplaceLabel';
+function ABMultiValueSetPrimaryIdentifier( multiValue: ABMutableMultiValueRef; identifier: CFStringRef ): Boolean; external name '_ABMultiValueSetPrimaryIdentifier';
+function ABMultiValueCreateMutableCopy( multiValue: ABMultiValueRef ): ABMutableMultiValueRef; external name '_ABMultiValueCreateMutableCopy';
+
+// --------------------------------------------------------------------------------
+// Localization of properties or labels
+// --------------------------------------------------------------------------------
+
+function ABCopyLocalizedPropertyOrLabel( labelOrProperty: CFStringRef ): CFStringRef; external name '_ABCopyLocalizedPropertyOrLabel';
+
+// --- Address formatting
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function ABCreateFormattedAddressFromDictionary( addressBook: ABAddressBookRef; address: CFDictionaryRef ): CFStringRef; external name '_ABCreateFormattedAddressFromDictionary';
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function ABCopyDefaultCountryCode( addressBook: ABAddressBookRef ): CFStringRef; external name '_ABCopyDefaultCountryCode';
+
+// --------------------------------------------------------------------------------
+// Person Image Loading
+// --------------------------------------------------------------------------------
+
+function ABPersonSetImageData( person: ABPersonRef; imageData: CFDataRef ): Boolean; external name '_ABPersonSetImageData';
+function ABPersonCopyImageData( person: ABPersonRef ): CFDataRef; external name '_ABPersonCopyImageData';
+
+type ABImageClientCallback = procedure ( imageData: CFDataRef; tag: SInt32; refcon: UnivPtr );
+
+function ABBeginLoadingImageDataForClient( person: ABPersonRef; callback: ABImageClientCallback; refcon: UnivPtr ): SInt32; external name '_ABBeginLoadingImageDataForClient';
+procedure ABCancelLoadingImageDataForTag( tag: SInt32 ); external name '_ABCancelLoadingImageDataForTag';
+
+{unit CFAttributedString}
+{ CFAttributedString.h
+ Copyright (c) 2004-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{! @header CFAttributedString
+Instance 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 string.
+
+Attributes are identified by key/value pairs stored in CFDictionaryRefs. Keys must be CFStrings, while the values are arbitrary CFTypeRefs.
+}
+
+
+{ CFAttributedString comes in immutable and mutable flavors.
+}
+type
+ CFAttributedStringRef = ^SInt32; { an opaque 32-bit type }
+ CFMutableAttributedStringRef = ^SInt32; { an opaque 32-bit type }
+
+{! @function CFAttributedStringGetTypeID
+Returns the type identifier of all CFAttributedString instances.
+}
+function CFAttributedStringGetTypeID: CFTypeID; external name '_CFAttributedStringGetTypeID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{** CFAttributedString **}
+
+{! @function CFAttributedStringCreate
+Creates an attributed string with the specified string and attributes (both copied).
+}
+function CFAttributedStringCreate( alloc: CFAllocatorRef; str: CFStringRef; attributes: CFDictionaryRef ): CFAttributedStringRef; external name '_CFAttributedStringCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{! @function CFAttributedStringCreateWithSubstring
+Creates a sub-attributed string from the specified range. It's a programming error for range to specify characters outside the bounds of aStr.
+}
+function CFAttributedStringCreateWithSubstring( alloc: CFAllocatorRef; aStr: CFAttributedStringRef; range: CFRange ): CFAttributedStringRef; external name '_CFAttributedStringCreateWithSubstring';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{! @function CFAttributedStringCreateCopy
+Creates an immutable attributed string copy.
+}
+function CFAttributedStringCreateCopy( alloc: CFAllocatorRef; aStr: CFAttributedStringRef ): CFAttributedStringRef; external name '_CFAttributedStringCreateCopy';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{! @function CFAttributedStringGetString
+Returns the string for the attributed string. For performance reasons, this will often point at the backing store of the attributed string, and it might change if the attributed string is edited. However, this is an implementation detail, and definitely not something that should be counted on.
+}
+function CFAttributedStringGetString( aStr: CFAttributedStringRef ): CFStringRef; external name '_CFAttributedStringGetString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{! @function CFAttributedStringGetLength
+Returns the length of the attributed string in characters; same as CFStringGetLength(CFAttributedStringGetString(aStr))
+}
+function CFAttributedStringGetLength( aStr: CFAttributedStringRef ): CFIndex; external name '_CFAttributedStringGetLength';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{! @function CFAttributedStringGetAttributes
+Returns the attributes at the specified location. If effectiveRange is not NULL, upon return *effectiveRange contains a range over which the exact same set of attributes apply. Note that for performance reasons, the returned effectiveRange is not necessarily the maximal range - for that, use CFAttributedStringGetAttributesAndLongestEffectiveRange(). It's a programming error for loc to specify a location outside the bounds of the attributed string.
+
+Note that the returned attribute dictionary might change in unpredicatable ways from under the caller if the attributed string is edited after this call. If you wish to hang on to the dictionary long-term, you should make an actual copy of it rather than just retaining it. Also, no assumptions should be made about the relationship of the actual CFDictionaryRef returned by this call and the dictionary originally used to set the attributes, other than the fact that the values stored in the dictionary will be identical (that is, ==) to those originally specified.
+}
+function CFAttributedStringGetAttributes( aStr: CFAttributedStringRef; loc: CFIndex; effectiveRange: CFRangePtr ): CFDictionaryRef; external name '_CFAttributedStringGetAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{! @function CFAttributedStringGetAttribute
+Returns the value of a single attribute at the specified location. If the specified attribute doesn't exist at the location, returns NULL. If effectiveRange is not NULL, upon return *effectiveRange contains a range over which the exact same attribute value applies. Note that for performance reasons, the returned effectiveRange is not necessarily the maximal range - for that, use CFAttributedStringGetAttributeAndLongestEffectiveRange(). It's a programming error for loc to specify a location outside the bounds of the attributed string.
+}
+function CFAttributedStringGetAttribute( aStr: CFAttributedStringRef; loc: CFIndex; attrName: CFStringRef; effectiveRange: CFRangePtr ): CFTypeRef; external name '_CFAttributedStringGetAttribute';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{! @function CFAttributedStringGetAttributesAndLongestEffectiveRange
+Returns the attributes at the specified location. If longestEffectiveRange is not NULL, upon return *longestEffectiveRange contains the maximal range within inRange over which the exact same set of attributes apply. The returned range is clipped to inRange. It's a programming error for loc or inRange to specify locations outside the bounds of the attributed string.
+}
+function CFAttributedStringGetAttributesAndLongestEffectiveRange( aStr: CFAttributedStringRef; loc: CFIndex; inRange: CFRange; longestEffectiveRange: CFRangePtr ): CFDictionaryRef; external name '_CFAttributedStringGetAttributesAndLongestEffectiveRange';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{! @function CFAttributedStringGetAttributeAndLongestEffectiveRange
+Returns the value of a single attribute at the specified location. If longestEffectiveRange is not NULL, upon return *longestEffectiveRange contains the maximal range within inRange over which the exact same attribute value applies. The returned range is clipped to inRange. It's a programming error for loc or inRange to specify locations outside the bounds of the attributed string.
+}
+function CFAttributedStringGetAttributeAndLongestEffectiveRange( aStr: CFAttributedStringRef; loc: CFIndex; attrName: CFStringRef; inRange: CFRange; longestEffectiveRange: CFRangePtr ): CFTypeRef; external name '_CFAttributedStringGetAttributeAndLongestEffectiveRange';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{** CFMutableAttributedString **}
+
+{! @function CFAttributedStringCreateMutableCopy
+Creates a mutable attributed string copy. maxLength, if not 0, is a hard bound on the length of the attributed string; exceeding this size limit during any editing operation is a programming error. If 0, there is no limit on the length.
+}
+function CFAttributedStringCreateMutableCopy( alloc: CFAllocatorRef; maxLength: CFIndex; aStr: CFAttributedStringRef ): CFMutableAttributedStringRef; external name '_CFAttributedStringCreateMutableCopy';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{! @function CFAttributedStringCreateMutable
+Creates a mutable empty attributed string. maxLength, if not 0, is a hard bound on the length of the attributed string; exceeding this size limit during any editing operation is a programming error. If 0, there is no limit on the length.
+}
+function CFAttributedStringCreateMutable( alloc: CFAllocatorRef; maxLength: CFIndex ): CFMutableAttributedStringRef; external name '_CFAttributedStringCreateMutable';
+(* 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.
+
+(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.)
+}
+procedure CFAttributedStringReplaceString( aStr: CFMutableAttributedStringRef; range: CFRange; replacement: CFStringRef ); external name '_CFAttributedStringReplaceString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{! @function CFAttributedStringGetMutableString
+Gets the string for the attributed string as a mutable string, allowing editing the character contents of the string as if it were an CFMutableString. Attributes corresponding to the edited range are appropriately modified. If, as a result of the edit, new characters are introduced into the string, they inherit the attributes of the first replaced character from range. If no existing characters are replaced by the edit, the new characters inherit the attributes of the character preceding range if it has any, otherwise of the character following range. If the initial string is empty, the attributes for the new characters are also empty.
+
+(Note: This function is not yet implemented and will return NULL except for toll-free bridged instances.)
+}
+function CFAttributedStringGetMutableString( aStr: CFMutableAttributedStringRef ): CFMutableStringRef; external name '_CFAttributedStringGetMutableString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{! @function CFAttributedStringSetAttributes
+Sets the value of multiple attributes over the specified range, which should be valid. If clearOtherAttributes is false, existing attributes (which aren't being replaced) are left alone; otherwise they are cleared. The dictionary should be setup for "usual" CF type usage --- CFString keys, and arbitrary CFType values. Note that after this call, further mutations to the replacement dictionary argument by the caller will not affect the contents of the attributed string.
+}
+procedure CFAttributedStringSetAttributes( aStr: CFMutableAttributedStringRef; range: CFRange; replacement: CFDictionaryRef; clearOtherAttributes: Boolean ); external name '_CFAttributedStringSetAttributes';
+(* 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.
+}
+procedure CFAttributedStringSetAttribute( aStr: CFMutableAttributedStringRef; range: CFRange; attrName: CFStringRef; value: CFTypeRef ); external name '_CFAttributedStringSetAttribute';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{! @function CFAttributedStringRemoveAttribute
+Removes the value of a single attribute over the specified range, which should be valid. It's OK for the attribute not the exist over the specified range.
+}
+procedure CFAttributedStringRemoveAttribute( aStr: CFMutableAttributedStringRef; range: CFRange; attrName: CFStringRef ); external name '_CFAttributedStringRemoveAttribute';
+(* 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.
+}
+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.
+}
+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.
+}
+procedure CFAttributedStringEndEditing( aStr: CFMutableAttributedStringRef ); external name '_CFAttributedStringEndEditing';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit CFCalendar}
+{ CFCalendar.h
+ Copyright (c) 2004-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4}
+
+
+type
+ CFCalendarRef = ^SInt32; { an opaque 32-bit type }
+
+function CFCalendarGetTypeID: CFTypeID; external name '_CFCalendarGetTypeID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CFCalendarCopyCurrent: CFCalendarRef; external name '_CFCalendarCopyCurrent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CFCalendarCreateWithIdentifier( allocator: CFAllocatorRef; identifier: CFStringRef ): CFCalendarRef; external name '_CFCalendarCreateWithIdentifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+ // Create a calendar. The identifiers are the kCF*Calendar
+ // constants in CFLocale.h.
+
+function CFCalendarGetIdentifier( calendar: CFCalendarRef ): CFStringRef; external name '_CFCalendarGetIdentifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+ // Returns the calendar's identifier.
+
+function CFCalendarCopyLocale( calendar: CFCalendarRef ): CFLocaleRef; external name '_CFCalendarCopyLocale';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+procedure CFCalendarSetLocale( calendar: CFCalendarRef; locale: CFLocaleRef ); external name '_CFCalendarSetLocale';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CFCalendarCopyTimeZone( calendar: CFCalendarRef ): CFTimeZoneRef; external name '_CFCalendarCopyTimeZone';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+procedure CFCalendarSetTimeZone( calendar: CFCalendarRef; tz: CFTimeZoneRef ); external name '_CFCalendarSetTimeZone';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CFCalendarGetFirstWeekday( calendar: CFCalendarRef ): CFIndex; external name '_CFCalendarGetFirstWeekday';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+procedure CFCalendarSetFirstWeekday( calendar: CFCalendarRef; wkdy: CFIndex ); external name '_CFCalendarSetFirstWeekday';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CFCalendarGetMinimumDaysInFirstWeek( calendar: CFCalendarRef ): CFIndex; external name '_CFCalendarGetMinimumDaysInFirstWeek';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+procedure CFCalendarSetMinimumDaysInFirstWeek( calendar: CFCalendarRef; mwd: CFIndex ); external name '_CFCalendarSetMinimumDaysInFirstWeek';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+type
+ CFCalendarUnit = SInt32;
+const
+ kCFCalendarUnitEra = 1 shl 1;
+ kCFCalendarUnitYear = 1 shl 2;
+ kCFCalendarUnitMonth = 1 shl 3;
+ kCFCalendarUnitDay = 1 shl 4;
+ kCFCalendarUnitHour = 1 shl 5;
+ kCFCalendarUnitMinute = 1 shl 6;
+ kCFCalendarUnitSecond = 1 shl 7;
+ kCFCalendarUnitWeek = 1 shl 8;
+ kCFCalendarUnitWeekday = 1 shl 9;
+ kCFCalendarUnitWeekdayOrdinal = 1 shl 10;
+
+function CFCalendarGetMinimumRangeOfUnit( calendar: CFCalendarRef; unt: CFCalendarUnit ): CFRange; external name '_CFCalendarGetMinimumRangeOfUnit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CFCalendarGetMaximumRangeOfUnit( calendar: CFCalendarRef; unt: CFCalendarUnit ): CFRange; external name '_CFCalendarGetMaximumRangeOfUnit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CFCalendarGetRangeOfUnit( calendar: CFCalendarRef; smallerUnit: CFCalendarUnit; biggerUnit: CFCalendarUnit; at: CFAbsoluteTime ): CFRange; external name '_CFCalendarGetRangeOfUnit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CFCalendarGetOrdinalityOfUnit( calendar: CFCalendarRef; smallerUnit: CFCalendarUnit; biggerUnit: CFCalendarUnit; at: CFAbsoluteTime ): CFIndex; external name '_CFCalendarGetOrdinalityOfUnit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+function CFCalendarComposeAbsoluteTime( calendar: CFCalendarRef; var at: { out } CFAbsoluteTime; componentDesc: ConstCStringPtr; ... ): Boolean; external name '_CFCalendarComposeAbsoluteTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CFCalendarDecomposeAbsoluteTime( calendar: CFCalendarRef; at: CFAbsoluteTime; componentDesc: ConstCStringPtr; ... ): Boolean; external name '_CFCalendarDecomposeAbsoluteTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+const
+ kCFCalendarComponentsWrap = 1 shl 0; // option for adding
+
+function CFCalendarAddComponents( calendar: CFCalendarRef; var at: { out } CFAbsoluteTime; options: CFOptionFlags; componentDesc: ConstCStringPtr; ... ): Boolean; external name '_CFCalendarAddComponents';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CFCalendarGetComponentDifference( calendar: CFCalendarRef; startingAT: CFAbsoluteTime; resultAT: CFAbsoluteTime; options: CFOptionFlags; componentDesc: ConstCStringPtr; ... ): Boolean; external name '_CFCalendarGetComponentDifference';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+
+{#endif}
+
+
+{unit CFDateFormatter}
+{ CFDateFormatter.h
+ Copyright (c) 2003-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3}
+
+type
+ CFDateFormatterRef = ^SInt32; { an opaque 32-bit type }
+
+// CFDateFormatters are not thread-safe. Do not use one from multiple threads!
+
+function CFDateFormatterGetTypeID: CFTypeID; external name '_CFDateFormatterGetTypeID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+// date and time format styles
+type
+ CFDateFormatterStyle = SInt32;
+const
+ kCFDateFormatterNoStyle = 0;
+ kCFDateFormatterShortStyle = 1;
+ kCFDateFormatterMediumStyle = 2;
+ kCFDateFormatterLongStyle = 3;
+ kCFDateFormatterFullStyle = 4;
+
+// The exact formatted result for these date and time styles depends on the
+// locale, but generally:
+// Short is completely numeric, such as "12/13/52" or "3:30pm"
+// Medium is longer, such as "Jan 12, 1952"
+// Long is longer, such as "January 12, 1952" or "3:30:32pm"
+// Full is pretty complete; e.g. "Tuesday, April 12, 1952 AD" or "3:30:42pm PST"
+// The specifications though are left fuzzy, in part simply because a user's
+// preference choices may affect the output, and also the results may change
+// from one OS release to another. To produce an exactly formatted date you
+// should not rely on styles and localization, but set the format string and
+// use nothing but numbers.
+
+function CFDateFormatterCreate( allocator: CFAllocatorRef; locale: CFLocaleRef; dateStyle: CFDateFormatterStyle; timeStyle: CFDateFormatterStyle ): CFDateFormatterRef; external name '_CFDateFormatterCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Returns a CFDateFormatter, localized to the given locale, which
+ // will format dates to the given date and time styles.
+
+function CFDateFormatterGetLocale( formatter: CFDateFormatterRef ): CFLocaleRef; external name '_CFDateFormatterGetLocale';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+function CFDateFormatterGetDateStyle( formatter: CFDateFormatterRef ): CFDateFormatterStyle; external name '_CFDateFormatterGetDateStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+function CFDateFormatterGetTimeStyle( formatter: CFDateFormatterRef ): CFDateFormatterStyle; external name '_CFDateFormatterGetTimeStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Get the properties with which the date formatter was created.
+
+function CFDateFormatterGetFormat( formatter: CFDateFormatterRef ): CFStringRef; external name '_CFDateFormatterGetFormat';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+procedure CFDateFormatterSetFormat( formatter: CFDateFormatterRef; formatString: CFStringRef ); external name '_CFDateFormatterSetFormat';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Set the format description string of the date formatter. This
+ // overrides the style settings. The format of the format string
+ // is as defined by the ICU library. The date formatter starts with a
+ // default format string defined by the style arguments with
+ // which it was created.
+
+
+function CFDateFormatterCreateStringWithDate( allocator: CFAllocatorRef; formatter: CFDateFormatterRef; date: CFDateRef ): CFStringRef; external name '_CFDateFormatterCreateStringWithDate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+function CFDateFormatterCreateStringWithAbsoluteTime( allocator: CFAllocatorRef; formatter: CFDateFormatterRef; at: CFAbsoluteTime ): CFStringRef; external name '_CFDateFormatterCreateStringWithAbsoluteTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Create a string representation of the given date or CFAbsoluteTime
+ // using the current state of the date formatter.
+
+
+function CFDateFormatterCreateDateFromString( allocator: CFAllocatorRef; formatter: CFDateFormatterRef; strng: CFStringRef; rangep: CFRangePtr ): CFDateRef; external name '_CFDateFormatterCreateDateFromString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+function CFDateFormatterGetAbsoluteTimeFromString( formatter: CFDateFormatterRef; strng: CFStringRef; rangep: CFRangePtr; atp: CFAbsoluteTimePtr ): Boolean; external name '_CFDateFormatterGetAbsoluteTimeFromString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Parse a string representation of a date using the current state
+ // of the date formatter. The range parameter specifies the range
+ // of the string in which the parsing should occur in input, and on
+ // output indicates the extent that was used; this parameter can
+ // be NULL, in which case the whole string may be used. The
+ // return value indicates whether some date was computed and
+ // (if atp is not NULL) stored at the location specified by atp.
+
+
+procedure CFDateFormatterSetProperty( formatter: CFDateFormatterRef; key: CFStringRef; value: CFTypeRef ); external name '_CFDateFormatterSetProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+function CFDateFormatterCopyProperty( formatter: CFDateFormatterRef; key: CFStringRef ): CFTypeRef; external name '_CFDateFormatterCopyProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ // Set and get various properties of the date formatter, the set of
+ // which may be expanded in the future.
+
+var kCFDateFormatterIsLenient: CFStringRef; external name '_kCFDateFormatterIsLenient'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFBoolean
+var kCFDateFormatterTimeZone: CFStringRef; external name '_kCFDateFormatterTimeZone'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFTimeZone
+var kCFDateFormatterCalendarName: CFStringRef; external name '_kCFDateFormatterCalendarName'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFDateFormatterDefaultFormat: CFStringRef; external name '_kCFDateFormatterDefaultFormat'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *) // CFString
+var kCFDateFormatterTwoDigitStartDate: CFStringRef; external name '_kCFDateFormatterTwoDigitStartDate'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFDate
+var kCFDateFormatterDefaultDate: CFStringRef; external name '_kCFDateFormatterDefaultDate'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFDate
+var kCFDateFormatterCalendar: CFStringRef; external name '_kCFDateFormatterCalendar'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFCalendar
+var kCFDateFormatterEraSymbols: CFStringRef; external name '_kCFDateFormatterEraSymbols'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFArray of CFString
+var kCFDateFormatterMonthSymbols: CFStringRef; external name '_kCFDateFormatterMonthSymbols'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFArray of CFString
+var kCFDateFormatterShortMonthSymbols: CFStringRef; external name '_kCFDateFormatterShortMonthSymbols'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFArray of CFString
+var kCFDateFormatterWeekdaySymbols: CFStringRef; external name '_kCFDateFormatterWeekdaySymbols'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFArray of CFString
+var kCFDateFormatterShortWeekdaySymbols: CFStringRef; external name '_kCFDateFormatterShortWeekdaySymbols'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFArray of CFString
+var kCFDateFormatterAMSymbol: CFStringRef; external name '_kCFDateFormatterAMSymbol'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFString
+var kCFDateFormatterPMSymbol: CFStringRef; external name '_kCFDateFormatterPMSymbol'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *) // CFString
+
+// See CFLocale.h for these calendar constants:
+// const CFStringRef kCFGregorianCalendar;
+// const CFStringRef kCFBuddhistCalendar;
+// const CFStringRef kCFJapaneseCalendar;
+// const CFStringRef kCFIslamicCalendar;
+// const CFStringRef kCFIslamicCivilCalendar;
+// const CFStringRef kCFHebrewCalendar;
+// const CFStringRef kCFChineseCalendar;
+
+
+{#endif}
+
+
+{unit CFRunLoop}
+{ CFRunLoop.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{!
+ @header CFRunLoop
+ CFRunLoops monitor sources of input to a task and dispatch control
+ when sources become ready for processing. Examples of input sources
+ might include user input devices, network connections, periodic
+ or time-delayed events, and asynchronous callbacks. Input sources
+ are registered with a run loop, and when a run loop is "run",
+ callback functions associated with each source are called when
+ the sources have some activity.
+
+ There is one run loop per thread. Each run loop has different
+ sets of input sources, called modes, which are named with strings.
+ A run loop is run -- in a named mode -- to have it monitor the
+ sources that have been registered in that mode, and the run loop
+ blocks there until something happens. Examples of modes include
+ the default mode, which a process would normally spend most of
+ its time in, and a modal panel mode, which might be run when
+ a modal panel is up, to restrict the set of input sources that
+ are allowed to "fire". This is not to the granularity of, for
+ example, what type of user input events are interesting, however.
+ That sort of finer-grained granularity is given by UI-level
+ frameworks with "get next event matching mask" or similar
+ functionality.
+
+ The CFRunLoopSource type is an abstraction of input sources that
+ can be put in a run loop. An input source type would normally
+ define an API for creating and operating on instances of the type,
+ as if it were a separate entity from the run loop, then provide a
+ function to create a CFRunLoopSource for an instance. The
+ CFRunLoopSource can then be registered with the run loop,
+ represents the input source to the run loop, and acts as
+ intermediary between the run loop and the actual input source
+ type instance. Examples include CFMachPort and CFSocket.
+
+ A CFRunLoopTimer is a specialization of run loop sources, a way
+ to generate either a one-shot delayed action, or a recurrent
+ action.
+
+ 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
+ (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
+ function for an input source), checks other sources, fires timers,
+ and goes back to sleep. And so on. CFRunLoopObservers can be
+ used to do processing at special points in this cycle.
+
+
+}
+
+
+{!
+ @typedef CFRunLoopRef
+ This is the type of a reference to a run loop.
+}
+type
+ CFRunLoopRef = ^SInt32; { an opaque 32-bit type }
+
+{!
+ @typedef CFRunLoopSourceRef
+ This is the type of a reference to general run loop input sources.
+}
+type
+ CFRunLoopSourceRef = ^SInt32; { an opaque 32-bit type }
+
+{!
+ @typedef CFRunLoopObserverRef
+ This is the type of a reference to a run loop observer.
+}
+type
+ CFRunLoopObserverRef = ^SInt32; { an opaque 32-bit type }
+
+{!
+ @typedef CFRunLoopTimerRef
+ This is the type of a reference to a run loop timer.
+}
+type
+ CFRunLoopTimerRef = ^SInt32; { an opaque 32-bit type }
+
+{ Reasons for CFRunLoopRunInMode() to Return }
+const
+ kCFRunLoopRunFinished = 1;
+ kCFRunLoopRunStopped = 2;
+ kCFRunLoopRunTimedOut = 3;
+ kCFRunLoopRunHandledSource = 4;
+
+{ Run Loop Observer Activities }
+type
+ CFRunLoopActivity = UInt32;
+const
+ kCFRunLoopEntry = 1 shl 0;
+ kCFRunLoopBeforeTimers = 1 shl 1;
+ kCFRunLoopBeforeSources = 1 shl 2;
+ kCFRunLoopBeforeWaiting = 1 shl 5;
+ kCFRunLoopAfterWaiting = 1 shl 6;
+ kCFRunLoopExit = 1 shl 7;
+ kCFRunLoopAllActivities = $0FFFFFFF;
+
+var kCFRunLoopDefaultMode: CFStringRef; external name '_kCFRunLoopDefaultMode'; (* attribute const *)
+var kCFRunLoopCommonModes: CFStringRef; external name '_kCFRunLoopCommonModes'; (* attribute const *)
+
+{!
+ @function CFRunLoopGetTypeID
+ Returns the type identifier of all CFRunLoop instances.
+}
+function CFRunLoopGetTypeID: CFTypeID; external name '_CFRunLoopGetTypeID';
+
+{!
+ @function CFRunLoopGetCurrent
+ Returns the run loop for the current thread. There is exactly
+ one run loop per thread.
+}
+function CFRunLoopGetCurrent: CFRunLoopRef; external name '_CFRunLoopGetCurrent';
+
+{!
+ @function CFRunLoopCopyCurrentMode
+ Returns the name of the mode in which the run loop is running.
+ NULL is returned if the run loop is not running.
+ @param rl The run loop for which the current mode should be
+ reported.
+}
+function CFRunLoopCopyCurrentMode( rl: CFRunLoopRef ): CFStringRef; external name '_CFRunLoopCopyCurrentMode';
+
+{!
+ @function CFRunLoopCopyAllModes
+ Returns an array of all the names of the modes known to the run
+ loop.
+ @param rl The run loop for which the mode list should be returned.
+}
+function CFRunLoopCopyAllModes( rl: CFRunLoopRef ): CFArrayRef; external name '_CFRunLoopCopyAllModes';
+
+{!
+ @function CFRunLoopAddCommonMode
+ Makes the named mode a "common mode" for the run loop. The set of
+ common modes are collectively accessed with the global constant
+ kCFRunLoopCommonModes. Input sources previously added to the
+ common modes are added to the new common mode.
+ @param rl The run loop for which the mode should be made common.
+ @param mode The name of the mode to mark as a common mode.
+}
+procedure CFRunLoopAddCommonMode( rl: CFRunLoopRef; mode: CFStringRef ); external name '_CFRunLoopAddCommonMode';
+
+{!
+ @function CFRunLoopGetNextTimerFireDate
+ Returns the time at which the next timer will fire.
+ @param rl The run loop for which the next timer fire date should
+ be reported.
+ @param mode The name of the mode to query.
+}
+function CFRunLoopGetNextTimerFireDate( rl: CFRunLoopRef; mode: CFStringRef ): CFAbsoluteTime; external name '_CFRunLoopGetNextTimerFireDate';
+
+
+procedure CFRunLoopRun; external name '_CFRunLoopRun';
+function CFRunLoopRunInMode( mode: CFStringRef; seconds: CFTimeInterval; returnAfterSourceHandled: Boolean ): SInt32; external name '_CFRunLoopRunInMode';
+function CFRunLoopIsWaiting( rl: CFRunLoopRef ): Boolean; external name '_CFRunLoopIsWaiting';
+procedure CFRunLoopWakeUp( rl: CFRunLoopRef ); external name '_CFRunLoopWakeUp';
+procedure CFRunLoopStop( rl: CFRunLoopRef ); external name '_CFRunLoopStop';
+
+function CFRunLoopContainsSource( rl: CFRunLoopRef; source: CFRunLoopSourceRef; mode: CFStringRef ): Boolean; external name '_CFRunLoopContainsSource';
+procedure CFRunLoopAddSource( rl: CFRunLoopRef; source: CFRunLoopSourceRef; mode: CFStringRef ); external name '_CFRunLoopAddSource';
+procedure CFRunLoopRemoveSource( rl: CFRunLoopRef; source: CFRunLoopSourceRef; mode: CFStringRef ); external name '_CFRunLoopRemoveSource';
+
+function CFRunLoopContainsObserver( rl: CFRunLoopRef; observer: CFRunLoopObserverRef; mode: CFStringRef ): Boolean; external name '_CFRunLoopContainsObserver';
+procedure CFRunLoopAddObserver( rl: CFRunLoopRef; observer: CFRunLoopObserverRef; mode: CFStringRef ); external name '_CFRunLoopAddObserver';
+procedure CFRunLoopRemoveObserver( rl: CFRunLoopRef; observer: CFRunLoopObserverRef; mode: CFStringRef ); external name '_CFRunLoopRemoveObserver';
+
+function CFRunLoopContainsTimer( rl: CFRunLoopRef; timer: CFRunLoopTimerRef; mode: CFStringRef ): Boolean; external name '_CFRunLoopContainsTimer';
+procedure CFRunLoopAddTimer( rl: CFRunLoopRef; timer: CFRunLoopTimerRef; mode: CFStringRef ); external name '_CFRunLoopAddTimer';
+procedure CFRunLoopRemoveTimer( rl: CFRunLoopRef; timer: CFRunLoopTimerRef; mode: CFStringRef ); external name '_CFRunLoopRemoveTimer';
+
+{!
+ @typedef CFRunLoopSourceContext
+ Structure containing the callbacks of a CFRunLoopSource.
+ @field version The version number of the structure type being
+ passed in as a parameter to the CFArray creation
+ functions. Valid version numbers are currently 0 and 1.
+ Version 0 sources are fairly generic, but may require a
+ bit more implementation, or may require a separate
+ thread as part of the implementation, for a complex
+ source. Version 1 sources are available on Mach and Windows,
+ and have performance advantages when the source type can
+ be described with this style.
+ @field info An arbitrary pointer to client-defined data, which
+ can be associated with the source at creation time, and
+ is passed to the callbacks.
+ @field retain The callback used to add a retain for the source on
+ the info pointer for the life of the source, and may be
+ used for temporary references the source needs to take.
+ This callback returns the actual info pointer to store in
+ 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.
+ @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.
+ This is used by the CFCopyDescription() function.
+ @field equal The callback used to compare the info pointers of
+ two sources, to determine equality of sources.
+ @field hash The callback used to compute a hash code for the info
+ pointer for the source. The source uses this hash code
+ information to produce its own hash code.
+ @field schedule For a version 0 source, this callback is called
+ whenever the source is added to a run loop mode. This
+ information is often needed to implement complex sources.
+ @field cancel For a version 0 source, this callback is called
+ whenever the source is removed from a run loop mode. This
+ information is often needed to implement complex sources.
+ @field getPort Defined in version 1 sources, this function returns
+ the Mach port or Windows HANDLE of a kernel object to
+ represent the source to the run loop. This function
+ must return the same result every time it is called, for the
+ lifetime of the source, and should be quick.
+ @field perform This callback is the workhorse of a run loop source.
+ It is called when the source needs to be "handled" or
+ processing is needed for input or conditions relating to
+ the source. For version 0 sources, this function is called
+ when the source has been marked "signaled" with the
+ CFRunLoopSourceSignal() function, and should do whatever
+ handling is required for the source. For a version 1 source
+ on Mach, this function is called when a Mach message arrives
+ on the source's Mach port, with the message, its
+ length, an allocator, and the source's info pointer. A
+ version 1 source performs whatever processing is required
+ on the Mach message, then can return a pointer to a Mach
+ message (or NULL if none) to be sent (usually this is a
+ "reply" message), which should be allocated with the
+ allocator (and will be deallocated by the run loop after
+ sending). For a version 1 source on Windows the function
+ is called when the kernel object is in the signaled state.
+}
+type
+ CFRunLoopSourceContext = record
+ version: CFIndex;
+ info: UnivPtr;
+ retain: function( info: {const} UnivPtr ): UnivPtr;
+ release: procedure( info: {const} UnivPtr );
+ copyDescription: function( info: {const} UnivPtr ): CFStringRef;
+ equal: function( info1: {const} UnivPtr; info2: {const} UnivPtr ): Boolean;
+ hash: function( info: {const} UnivPtr ): CFHashCode;
+ schedule: function( info: {const} UnivPtr; rl: CFRunLoopRef; mode: CFStringRef ): CFHashCode;
+ cancel: function( info: {const} UnivPtr; rl: CFRunLoopRef; mode: CFStringRef ): CFHashCode;
+ perform: procedure( info: {const} UnivPtr );
+ end;
+
+type
+ CFRunLoopSourceContext1 = record
+ version: CFIndex;
+ info: UnivPtr;
+ retain: function( info: {const} UnivPtr ): UnivPtr;
+ release: procedure( info: {const} UnivPtr );
+ copyDescription: function( info: {const} UnivPtr ): CFStringRef;
+ equal: function( info1: {const} UnivPtr; info2: {const} UnivPtr ): Boolean;
+ hash: function( info: {const} UnivPtr ): CFHashCode;
+ getPort: function( info: {const} UnivPtr ): mach_port_t;
+ perform: function( msg: UnivPtr; size: CFIndex; allocator: CFAllocatorRef; info: UnivPtr ): UnivPtr;
+ end;
+
+{!
+ @function CFRunLoopSourceGetTypeID
+ Returns the type identifier of all CFRunLoopSource instances.
+}
+function CFRunLoopSourceGetTypeID: CFTypeID; external name '_CFRunLoopSourceGetTypeID';
+
+{!
+ @function CFRunLoopSourceCreate
+ Creates a new run loop source with the given context.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the array and its storage for values. If this
+ reference is not a valid CFAllocator, the behavior is
+ undefined.
+ @param order On platforms which support it, for source versions
+ which support it, this parameter determines the order in
+ which the sources which are ready to be processed are
+ handled. A lower order number causes processing before
+ higher order number sources. It is inadvisable to depend
+ on the order number for any architectural or design aspect
+ of code. In the absence of any reason to do otherwise,
+ zero should be used.
+ @param context A pointer to the context structure for the source.
+}
+function CFRunLoopSourceCreate( allocator: CFAllocatorRef; order: CFIndex; var context: CFRunLoopSourceContext ): CFRunLoopSourceRef; external name '_CFRunLoopSourceCreate';
+
+{!
+ @function CFRunLoopSourceGetOrder
+ Returns the ordering parameter of the run loop source.
+ @param source The run loop source for which the order number
+ should be returned.
+}
+function CFRunLoopSourceGetOrder( source: CFRunLoopSourceRef ): CFIndex; external name '_CFRunLoopSourceGetOrder';
+
+{!
+ @function CFRunLoopSourceInvalidate
+ Invalidates the run loop source. The run loop source is never
+ performed again after it becomes invalid, and will automatically
+ be removed from any run loops and modes which contain it. The
+ source is not destroyed by this operation, however -- the memory
+ is still valid; only the release of all references on the source
+ through the reference counting system can do that. But note, that
+ if the only retains on the source were held by run loops, those
+ retains may all be released by the time this function returns,
+ and the source may actually be destroyed through that process.
+ @param source The run loop source which should be invalidated.
+}
+procedure CFRunLoopSourceInvalidate( source: CFRunLoopSourceRef ); external name '_CFRunLoopSourceInvalidate';
+
+{!
+ @function CFRunLoopSourceIsValid
+ Reports whether or not the source is valid.
+ @param source The run loop source for which the validity should
+ be returned.
+}
+function CFRunLoopSourceIsValid( source: CFRunLoopSourceRef ): Boolean; external name '_CFRunLoopSourceIsValid';
+
+{!
+ @function CFRunLoopSourceGetContext
+ Fills the memory pointed to by the context parameter with the
+ context structure of the source.
+ @param source The run loop source for which the context structure
+ should be returned.
+ @param context A pointer to a context structure to be filled.
+}
+procedure CFRunLoopSourceGetContext( source: CFRunLoopSourceRef; var context: CFRunLoopSourceContext ); external name '_CFRunLoopSourceGetContext';
+
+{!
+ @function CFRunLoopSourceSignal
+ Marks the source as signalled, ready for handling by the run loop.
+ Has no effect on version 1 sources, which are automatically
+ handled when Mach messages for them come in.
+ @param source The run loop source which should be signalled.
+}
+procedure CFRunLoopSourceSignal( source: CFRunLoopSourceRef ); external name '_CFRunLoopSourceSignal';
+
+type
+ CFRunLoopObserverContext = record
+ version: CFIndex;
+ info: UnivPtr;
+ retain: function( info: {const} UnivPtr ): UnivPtr;
+ release: procedure( info: {const} UnivPtr );
+ copyDescription: function( info: {const} UnivPtr ): CFStringRef;
+ end;
+
+type
+ CFRunLoopObserverCallBack = procedure( observer: CFRunLoopObserverRef; activity: CFRunLoopActivity; info: UnivPtr );
+
+{!
+ @function CFRunLoopObserverGetTypeID
+ Returns the type identifier of all CFRunLoopObserver instances.
+}
+function CFRunLoopObserverGetTypeID: CFTypeID; external name '_CFRunLoopObserverGetTypeID';
+
+function CFRunLoopObserverCreate( allocator: CFAllocatorRef; activities: CFOptionFlags; repeats: Boolean; order: CFIndex; callout: CFRunLoopObserverCallBack; var context: CFRunLoopObserverContext ): CFRunLoopObserverRef; external name '_CFRunLoopObserverCreate';
+
+function CFRunLoopObserverGetActivities( observer: CFRunLoopObserverRef ): CFOptionFlags; external name '_CFRunLoopObserverGetActivities';
+function CFRunLoopObserverDoesRepeat( observer: CFRunLoopObserverRef ): Boolean; external name '_CFRunLoopObserverDoesRepeat';
+function CFRunLoopObserverGetOrder( observer: CFRunLoopObserverRef ): CFIndex; external name '_CFRunLoopObserverGetOrder';
+procedure CFRunLoopObserverInvalidate( observer: CFRunLoopObserverRef ); external name '_CFRunLoopObserverInvalidate';
+function CFRunLoopObserverIsValid( observer: CFRunLoopObserverRef ): Boolean; external name '_CFRunLoopObserverIsValid';
+procedure CFRunLoopObserverGetContext( observer: CFRunLoopObserverRef; var context: CFRunLoopObserverContext ); external name '_CFRunLoopObserverGetContext';
+
+type
+ CFRunLoopTimerContext = record
+ version: CFIndex;
+ info: UnivPtr;
+ retain: function( info: {const} UnivPtr ): UnivPtr;
+ release: procedure( info: {const} UnivPtr );
+ copyDescription: function( info: {const} UnivPtr ): CFStringRef;
+ end;
+
+type
+ CFRunLoopTimerCallBack = procedure( timer: CFRunLoopTimerRef; info: UnivPtr );
+
+{!
+ @function CFRunLoopTimerGetTypeID
+ Returns the type identifier of all CFRunLoopTimer instances.
+}
+function CFRunLoopTimerGetTypeID: CFTypeID; external name '_CFRunLoopTimerGetTypeID';
+
+function CFRunLoopTimerCreate( allocator: CFAllocatorRef; fireDate: CFAbsoluteTime; interval: CFTimeInterval; flags: CFOptionFlags; order: CFIndex; callout: CFRunLoopTimerCallBack; var context: CFRunLoopTimerContext ): CFRunLoopTimerRef; external name '_CFRunLoopTimerCreate';
+function CFRunLoopTimerGetNextFireDate( timer: CFRunLoopTimerRef ): CFAbsoluteTime; external name '_CFRunLoopTimerGetNextFireDate';
+procedure CFRunLoopTimerSetNextFireDate( timer: CFRunLoopTimerRef; fireDate: CFAbsoluteTime ); external name '_CFRunLoopTimerSetNextFireDate';
+function CFRunLoopTimerGetInterval( timer: CFRunLoopTimerRef ): CFTimeInterval; external name '_CFRunLoopTimerGetInterval';
+function CFRunLoopTimerDoesRepeat( timer: CFRunLoopTimerRef ): Boolean; external name '_CFRunLoopTimerDoesRepeat';
+function CFRunLoopTimerGetOrder( timer: CFRunLoopTimerRef ): CFIndex; external name '_CFRunLoopTimerGetOrder';
+procedure CFRunLoopTimerInvalidate( timer: CFRunLoopTimerRef ); external name '_CFRunLoopTimerInvalidate';
+function CFRunLoopTimerIsValid( timer: CFRunLoopTimerRef ): Boolean; external name '_CFRunLoopTimerIsValid';
+procedure CFRunLoopTimerGetContext( timer: CFRunLoopTimerRef; var context: CFRunLoopTimerContext ); external name '_CFRunLoopTimerGetContext';
+
+
+{unit CFSocket}
+{ CFSocket.h
+ Copyright (c) 1999-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFSocketNativeHandle = SInt32;
+
+
+type
+ CFSocketRef = ^SInt32; { an opaque 32-bit type }
+
+{ 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
+argument when creating the CFSocket.
+
+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
+connection rendezvous sockets.
+
+If kCFSocketDataCallBack is used, then data will be read in chunks
+in the background and passed to the callback, with the data argument
+being a CFDataRef.
+
+These three types are mutually exclusive, but any one of them may
+have kCFSocketConnectCallBack added to it, if the socket will be
+used to connect in the background. Connect in the background occurs
+if CFSocketConnectToAddress is called with a negative timeout
+value, in which case the call returns immediately, and a
+kCFSocketConnectCallBack is generated when the connect finishes.
+In this case the data argument is either NULL, or a pointer to
+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
+socket and notification is desired when there is space in the
+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
+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
+whether the underlying native socket will be closed when the CFSocket
+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
+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
+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
+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.
+
+}
+
+type
+ CFSocketError = SInt32;
+const
+ kCFSocketSuccess = 0;
+ kCFSocketError = -1;
+ kCFSocketTimeout = -2;
+
+type
+ CFSocketSignature = record
+ protocolFamily: SInt32;
+ socketType: SInt32;
+ protocol: SInt32;
+ address: CFDataRef;
+ end;
+
+type
+ CFSocketCallBackType = SInt32;
+const
+ kCFSocketNoCallBack = 0;
+ kCFSocketReadCallBack = 1;
+ kCFSocketAcceptCallBack = 2;
+ kCFSocketDataCallBack = 3;
+ kCFSocketConnectCallBack = 4;
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+ kCFSocketWriteCallBack = 8;
+{#endif}
+
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+{ Socket flags }
+const
+ kCFSocketAutomaticallyReenableReadCallBack = 1;
+ kCFSocketAutomaticallyReenableAcceptCallBack = 2;
+ kCFSocketAutomaticallyReenableDataCallBack = 3;
+ kCFSocketAutomaticallyReenableWriteCallBack = 8;
+ kCFSocketCloseOnInvalidate = 128;
+{#endif}
+
+type
+ CFSocketCallBack = procedure( s: CFSocketRef; typ: CFSocketCallBackType; address: CFDataRef; data: {const} UnivPtr; info: UnivPtr );
+{ If the callback wishes to keep hold of address or data after the point that it returns, then it must copy them. }
+
+type
+ CFSocketContext = record
+ version: CFIndex;
+ info: UnivPtr;
+ retain: function( info: {const} UnivPtr ): UnivPtr;
+ release: procedure( info: {const} UnivPtr );
+ copyDescription: function( info: {const} UnivPtr ): CFStringRef;
+ end;
+
+function CFSocketGetTypeID: CFTypeID; external name '_CFSocketGetTypeID';
+
+function CFSocketCreate( allocator: CFAllocatorRef; protocolFamily: SInt32; socketType: SInt32; protocol: SInt32; callBackTypes: CFOptionFlags; callout: CFSocketCallBack; const (*var*) context: CFSocketContext ): CFSocketRef; external name '_CFSocketCreate';
+function CFSocketCreateWithNative( allocator: CFAllocatorRef; sock: CFSocketNativeHandle; callBackTypes: CFOptionFlags; callout: CFSocketCallBack; const (*var*) context: CFSocketContext ): CFSocketRef; external name '_CFSocketCreateWithNative';
+function CFSocketCreateWithSocketSignature( allocator: CFAllocatorRef; const (*var*) signature: CFSocketSignature; callBackTypes: CFOptionFlags; callout: CFSocketCallBack; const (*var*) context: CFSocketContext ): CFSocketRef; external name '_CFSocketCreateWithSocketSignature';
+function CFSocketCreateConnectedToSocketSignature( allocator: CFAllocatorRef; const (*var*) signature: CFSocketSignature; callBackTypes: CFOptionFlags; callout: CFSocketCallBack; const (*var*) context: CFSocketContext; timeout: CFTimeInterval ): CFSocketRef; external name '_CFSocketCreateConnectedToSocketSignature';
+{ CFSocketCreateWithSignature creates a socket of the requested type and binds its address (using CFSocketSetAddress) to the requested address. If this fails, it returns NULL. CFSocketCreateConnectedToSignature creates a socket suitable for connecting to the requested type and address, and connects it (using CFSocketConnectToAddress). If this fails, it returns NULL. }
+
+function CFSocketSetAddress( s: CFSocketRef; address: CFDataRef ): CFSocketError; external name '_CFSocketSetAddress';
+function CFSocketConnectToAddress( s: CFSocketRef; address: CFDataRef; timeout: CFTimeInterval ): CFSocketError; external name '_CFSocketConnectToAddress';
+procedure CFSocketInvalidate( s: CFSocketRef ); external name '_CFSocketInvalidate';
+
+function CFSocketIsValid( s: CFSocketRef ): Boolean; external name '_CFSocketIsValid';
+function CFSocketCopyAddress( s: CFSocketRef ): CFDataRef; external name '_CFSocketCopyAddress';
+function CFSocketCopyPeerAddress( s: CFSocketRef ): CFDataRef; external name '_CFSocketCopyPeerAddress';
+procedure CFSocketGetContext( s: CFSocketRef; var context: CFSocketContext ); external name '_CFSocketGetContext';
+function CFSocketGetNative( s: CFSocketRef ): CFSocketNativeHandle; external name '_CFSocketGetNative';
+
+function CFSocketCreateRunLoopSource( allocator: CFAllocatorRef; s: CFSocketRef; order: CFIndex ): CFRunLoopSourceRef; external name '_CFSocketCreateRunLoopSource';
+
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+function CFSocketGetSocketFlags( s: CFSocketRef ): CFOptionFlags; external name '_CFSocketGetSocketFlags';
+procedure CFSocketSetSocketFlags( s: CFSocketRef; flags: CFOptionFlags ); external name '_CFSocketSetSocketFlags';
+procedure CFSocketDisableCallBacks( s: CFSocketRef; callBackTypes: CFOptionFlags ); external name '_CFSocketDisableCallBacks';
+procedure CFSocketEnableCallBacks( s: CFSocketRef; callBackTypes: CFOptionFlags ); external name '_CFSocketEnableCallBacks';
+{#endif}
+
+{ 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,
+CFSocketCopyRegisteredValue) allows the registration of any property
+list type. Functions specific to CFSockets (CFSocketRegisterSocketData,
+CFSocketCopyRegisteredSocketData) register a CFData containing the
+components of a socket signature (protocol family, socket type,
+protocol, and address). In each function the nameServerSignature
+may be NULL, or any component of it may be 0, to use default values
+(TCP, INADDR_LOOPBACK, port as set). Name registration servers might
+not allow registration with other than TCP and INADDR_LOOPBACK.
+The actual address of the server responding to a query may be obtained
+by using the nameServerAddress argument. This address, the address
+returned by CFSocketCopyRegisteredSocketSignature, and the value
+returned by CFSocketCopyRegisteredValue must (if non-null) be released
+by the caller. CFSocketUnregister removes any registration associated
+with the specified name.
+}
+
+function CFSocketRegisterValue( const (*var*) nameServerSignature: CFSocketSignature; timeout: CFTimeInterval; name: CFStringRef; value: CFPropertyListRef ): CFSocketError; external name '_CFSocketRegisterValue';
+function CFSocketCopyRegisteredValue( const (*var*) nameServerSignature: CFSocketSignature; timeout: CFTimeInterval; name: CFStringRef; var value: CFPropertyListRef; var nameServerAddress: CFDataRef ): CFSocketError; external name '_CFSocketCopyRegisteredValue';
+
+function CFSocketRegisterSocketSignature( const (*var*) nameServerSignature: CFSocketSignature; timeout: CFTimeInterval; name: CFStringRef; const (*var*) signature: CFSocketSignature ): CFSocketError; external name '_CFSocketRegisterSocketSignature';
+function CFSocketCopyRegisteredSocketSignature( const (*var*) nameServerSignature: CFSocketSignature; timeout: CFTimeInterval; name: CFStringRef; var signature: CFSocketSignature; var nameServerAddress: CFDataRef ): CFSocketError; external name '_CFSocketCopyRegisteredSocketSignature';
+
+function CFSocketUnregister( const (*var*) nameServerSignature: CFSocketSignature; timeout: CFTimeInterval; name: CFStringRef ): CFSocketError; external name '_CFSocketUnregister';
+
+procedure CFSocketSetDefaultNameRegistryPortNumber( port: UInt16 ); external name '_CFSocketSetDefaultNameRegistryPortNumber';
+function CFSocketGetDefaultNameRegistryPortNumber: UInt16; external name '_CFSocketGetDefaultNameRegistryPortNumber';
+
+{ Constants used in name registry server communications }
+var kCFSocketCommandKey: CFStringRef; external name '_kCFSocketCommandKey'; (* attribute const *)
+var kCFSocketNameKey: CFStringRef; external name '_kCFSocketNameKey'; (* attribute const *)
+var kCFSocketValueKey: CFStringRef; external name '_kCFSocketValueKey'; (* attribute const *)
+var kCFSocketResultKey: CFStringRef; external name '_kCFSocketResultKey'; (* attribute const *)
+var kCFSocketErrorKey: CFStringRef; external name '_kCFSocketErrorKey'; (* attribute const *)
+var kCFSocketRegisterCommand: CFStringRef; external name '_kCFSocketRegisterCommand'; (* attribute const *)
+var kCFSocketRetrieveCommand: CFStringRef; external name '_kCFSocketRetrieveCommand'; (* attribute const *)
+
+
+{unit Files}
+{
+ File: Files.p
+
+ Contains: File Manager (MFS, HFS, and HFS+) Interfaces.
+
+ Version: Technology: Mac OS 9
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{ Finder constants were moved to Finder.Å }
+
+
+{$ALIGN MAC68K}
+
+{ HFSUniStr255 is the Unicode equivalent of Str255 }
+
+type
+ HFSUniStr255Ptr = ^HFSUniStr255;
+ HFSUniStr255 = record
+ length: UInt16; { number of unicode characters }
+ unicode: array [0..254] of UniChar; { unicode characters }
+ end;
+
+ ConstHFSUniStr255Param = ^HFSUniStr255;
+
+const
+ fsCurPerm = $00; { open access permissions in ioPermssn }
+ fsRdPerm = $01;
+ fsWrPerm = $02;
+ fsRdWrPerm = $03;
+ fsRdWrShPerm = $04;
+ fsRdDenyPerm = $10; { for use with OpenDeny and OpenRFDeny }
+ fsWrDenyPerm = $20; { for use with OpenDeny and OpenRFDeny }
+
+ fsRtParID = 1;
+ fsRtDirID = 2;
+
+ fsAtMark = 0; { positioning modes in ioPosMode }
+ fsFromStart = 1;
+ fsFromLEOF = 2;
+ fsFromMark = 3;
+
+ { ioPosMode flags }
+ pleaseCacheBit = 4; { please cache this request }
+ pleaseCacheMask = $0010;
+ noCacheBit = 5; { please don't cache this request }
+ noCacheMask = $0020;
+ rdVerifyBit = 6; { read verify mode }
+ rdVerifyMask = $0040;
+ rdVerify = 64; { old name of rdVerifyMask }
+ forceReadBit = 6;
+ forceReadMask = $0040;
+ newLineBit = 7; { newline mode }
+ newLineMask = $0080;
+ newLineCharMask = $FF00; { newline character }
+
+
+ { CatSearch Search bitmask Constants }
+ fsSBPartialName = 1;
+ fsSBFullName = 2;
+ fsSBFlAttrib = 4;
+ fsSBFlFndrInfo = 8;
+ fsSBFlLgLen = 32;
+ fsSBFlPyLen = 64;
+ fsSBFlRLgLen = 128;
+ fsSBFlRPyLen = 256;
+ fsSBFlCrDat = 512;
+ fsSBFlMdDat = 1024;
+ fsSBFlBkDat = 2048;
+ fsSBFlXFndrInfo = 4096;
+ fsSBFlParID = 8192;
+ fsSBNegate = 16384;
+ fsSBDrUsrWds = 8;
+ fsSBDrNmFls = 16;
+ fsSBDrCrDat = 512;
+ fsSBDrMdDat = 1024;
+ fsSBDrBkDat = 2048;
+ fsSBDrFndrInfo = 4096;
+ fsSBDrParID = 8192;
+
+ { CatSearch Search bit value Constants }
+ fsSBPartialNameBit = 0; { ioFileName points to a substring }
+ fsSBFullNameBit = 1; { ioFileName points to a match string }
+ fsSBFlAttribBit = 2; { search includes file attributes }
+ fsSBFlFndrInfoBit = 3; { search includes finder info }
+ fsSBFlLgLenBit = 5; { search includes data logical length }
+ fsSBFlPyLenBit = 6; { search includes data physical length }
+ fsSBFlRLgLenBit = 7; { search includes resource logical length }
+ fsSBFlRPyLenBit = 8; { search includes resource physical length }
+ fsSBFlCrDatBit = 9; { search includes create date }
+ fsSBFlMdDatBit = 10; { search includes modification date }
+ fsSBFlBkDatBit = 11; { search includes backup date }
+ fsSBFlXFndrInfoBit = 12; { search includes extended finder info }
+ fsSBFlParIDBit = 13; { search includes file's parent ID }
+ fsSBNegateBit = 14; { return all non-matches }
+ fsSBDrUsrWdsBit = 3; { search includes directory finder info }
+ fsSBDrNmFlsBit = 4; { search includes directory valence }
+ fsSBDrCrDatBit = 9; { directory-named version of fsSBFlCrDatBit }
+ fsSBDrMdDatBit = 10; { directory-named version of fsSBFlMdDatBit }
+ fsSBDrBkDatBit = 11; { directory-named version of fsSBFlBkDatBit }
+ fsSBDrFndrInfoBit = 12; { directory-named version of fsSBFlXFndrInfoBit }
+ fsSBDrParIDBit = 13; { directory-named version of fsSBFlParIDBit }
+
+ { vMAttrib (GetVolParms) bit position constants }
+ bLimitFCBs = 31;
+ bLocalWList = 30;
+ bNoMiniFndr = 29;
+ bNoVNEdit = 28;
+ bNoLclSync = 27;
+ bTrshOffLine = 26;
+ bNoSwitchTo = 25;
+ bDontShareIt = 21; { this volume should not be shared by Macintosh File Sharing (see Technical Note NW 29) }
+ bNoDeskItems = 20;
+ bNoBootBlks = 19;
+ bAccessCntl = 18;
+ bNoSysDir = 17;
+ bHasExtFSVol = 16;
+ bHasOpenDeny = 15;
+ bHasCopyFile = 14;
+ bHasMoveRename = 13;
+ bHasDesktopMgr = 12;
+ bHasShortName = 11;
+ bHasFolderLock = 10;
+ bHasPersonalAccessPrivileges = 9;
+ bHasUserGroupList = 8;
+ bHasCatSearch = 7;
+ bHasFileIDs = 6;
+ bHasBTreeMgr = 5;
+ bHasBlankAccessPrivileges = 4;
+ bSupportsAsyncRequests = 3; { asynchronous requests to this volume are handled correctly at any time }
+ bSupportsTrashVolumeCache = 2;
+
+ { vMExtendedAttributes (GetVolParms) bit position constants }
+ bIsEjectable = 0; { volume is in an ejectable disk drive }
+ bSupportsHFSPlusAPIs = 1; { volume supports HFS Plus APIs directly (not through compatibility layer) }
+ bSupportsFSCatalogSearch = 2; { volume supports FSCatalogSearch }
+ bSupportsFSExchangeObjects = 3; { volume supports FSExchangeObjects }
+ bSupports2TBFiles = 4; { volume supports supports 2 terabyte files }
+ bSupportsLongNames = 5; { volume supports file/directory/volume names longer than 31 characters }
+ bSupportsMultiScriptNames = 6; { volume supports file/directory/volume names with characters from multiple script systems }
+ bSupportsNamedForks = 7; { volume supports forks beyond the data and resource forks }
+ bSupportsSubtreeIterators = 8; { volume supports recursive iterators not at the volume root }
+ bL2PCanMapFileBlocks = 9; { volume supports Lg2Phys SPI correctly }
+
+ { vMExtendedAttributes (GetVolParms) bit position constants }
+ bParentModDateChanges = 10; { Changing a file or folder causes its parent's mod date to change }
+ bAncestorModDateChanges = 11; { Changing a file or folder causes all ancestor mod dates to change }
+
+ { vMExtendedAttributes (GetVolParms) bit position constants }
+ bSupportsSymbolicLinks = 13; { volume supports the creation and use of symbolic links (Mac OS X only) }
+ bIsAutoMounted = 14; { volume was mounted automatically (Mac OS X only) }
+ bAllowCDiDataHandler = 17; { allow QuickTime's CDi data handler to examine this volume }
+
+ { Desktop Database, ffsGetIconMessage and fsmGetFSIconMessage icon type and size Constants }
+ kLargeIcon = 1;
+ kLarge4BitIcon = 2;
+ kLarge8BitIcon = 3;
+ kSmallIcon = 4;
+ kSmall4BitIcon = 5;
+ kSmall8BitIcon = 6;
+ kicnsIconFamily = 239; { Note: The 'icns' icon family record is variable sized. }
+
+ kLargeIconSize = 256;
+ kLarge4BitIconSize = 512;
+ kLarge8BitIconSize = 1024;
+ kSmallIconSize = 64;
+ kSmall4BitIconSize = 128;
+ kSmall8BitIconSize = 256;
+
+ { Large Volume Constants }
+ kWidePosOffsetBit = 8;
+ kUseWidePositioning = $0100;
+ kMaximumBlocksIn4GB = $007FFFFF;
+
+ { Foreign Privilege Model Identifiers }
+ fsUnixPriv = 1;
+
+ { Authentication Constants }
+ kNoUserAuthentication = 1;
+ kPassword = 2;
+ kEncryptPassword = 3;
+ kTwoWayEncryptPassword = 6;
+
+
+ { mapping codes (ioObjType) for MapName & MapID }
+ kOwnerID2Name = 1;
+ kGroupID2Name = 2;
+ kOwnerName2ID = 3;
+ kGroupName2ID = 4; { types of oj object to be returned (ioObjType) for _GetUGEntry }
+ kReturnNextUser = 1;
+ kReturnNextGroup = 2;
+ kReturnNextUG = 3;
+
+ { vcbFlags bits }
+ kVCBFlagsIdleFlushBit = 3; { Set if volume should be flushed at idle time }
+ kVCBFlagsIdleFlushMask = $0008;
+ kVCBFlagsHFSPlusAPIsBit = 4; { Set if volume implements HFS Plus APIs itself (not via emulation) }
+ kVCBFlagsHFSPlusAPIsMask = $0010;
+ kVCBFlagsHardwareGoneBit = 5; { Set if disk driver returned a hardwareGoneErr to Read or Write }
+ kVCBFlagsHardwareGoneMask = $0020;
+ kVCBFlagsVolumeDirtyBit = 15; { Set if volume information has changed since the last FlushVol }
+ kVCBFlagsVolumeDirtyMask = $8000;
+
+ { ioVAtrb bits returned by PBHGetVInfo and PBXGetVolInfo }
+ kioVAtrbDefaultVolumeBit = 5; { Set if the volume is the default volume }
+ kioVAtrbDefaultVolumeMask = $0020;
+ kioVAtrbFilesOpenBit = 6; { Set if there are open files or iterators }
+ kioVAtrbFilesOpenMask = $0040;
+ kioVAtrbHardwareLockedBit = 7; { Set if volume is locked by a hardware setting }
+ kioVAtrbHardwareLockedMask = $0080;
+ kioVAtrbSoftwareLockedBit = 15; { Set if volume is locked by software }
+ kioVAtrbSoftwareLockedMask = $8000;
+
+ { ioFlAttrib bits returned by PBGetCatInfo }
+ { file and directory attributes in ioFlAttrib }
+ kioFlAttribLockedBit = 0; { Set if file or directory is locked }
+ kioFlAttribLockedMask = $01;
+ kioFlAttribResOpenBit = 2; { Set if resource fork is open }
+ kioFlAttribResOpenMask = $04;
+ kioFlAttribDataOpenBit = 3; { Set if data fork is open }
+ kioFlAttribDataOpenMask = $08;
+ kioFlAttribDirBit = 4; { Set if this is a directory }
+ kioFlAttribDirMask = $10;
+ ioDirFlg = 4; { Set if this is a directory (old name) }
+ ioDirMask = $10;
+ kioFlAttribCopyProtBit = 6; { Set if AppleShare server "copy-protects" the file }
+ kioFlAttribCopyProtMask = $40;
+ kioFlAttribFileOpenBit = 7; { Set if file (either fork) is open }
+ kioFlAttribFileOpenMask = $80; { ioFlAttrib for directories only }
+ kioFlAttribInSharedBit = 2; { Set if the directory is within a shared area of the directory hierarchy }
+ kioFlAttribInSharedMask = $04;
+ kioFlAttribMountedBit = 3; { Set if the directory is a share point that is mounted by some user }
+ kioFlAttribMountedMask = $08;
+ kioFlAttribSharePointBit = 5; { Set if the directory is a share point }
+ kioFlAttribSharePointMask = $20;
+
+ { ioFCBFlags bits returned by PBGetFCBInfo }
+ kioFCBWriteBit = 8; { Data can be written to this file }
+ kioFCBWriteMask = $0100;
+ kioFCBResourceBit = 9; { This file is a resource fork }
+ kioFCBResourceMask = $0200;
+ kioFCBWriteLockedBit = 10; { File has a locked byte range }
+ kioFCBWriteLockedMask = $0400;
+ kioFCBLargeFileBit = 11; { File may grow beyond 2GB; cache uses file blocks, not bytes }
+ kioFCBLargeFileMask = $0800;
+ kioFCBSharedWriteBit = 12; { File is open for shared write access }
+ kioFCBSharedWriteMask = $1000;
+ kioFCBFileLockedBit = 13; { File is locked (write-protected) }
+ kioFCBFileLockedMask = $2000;
+ kioFCBOwnClumpBit = 14; { File has clump size specified in FCB }
+ kioFCBOwnClumpMask = $4000;
+ kioFCBModifiedBit = 15; { File has changed since it was last flushed }
+ kioFCBModifiedMask = $8000;
+
+ { ioACUser bits returned by PBGetCatInfo }
+ { Note: you must clear ioACUser before calling PBGetCatInfo because some file systems do not use this field }
+ kioACUserNoSeeFolderBit = 0; { Set if user does not have See Folder privileges }
+ kioACUserNoSeeFolderMask = $01;
+ kioACUserNoSeeFilesBit = 1; { Set if user does not have See Files privileges }
+ kioACUserNoSeeFilesMask = $02;
+ kioACUserNoMakeChangesBit = 2; { Set if user does not have Make Changes privileges }
+ kioACUserNoMakeChangesMask = $04;
+ kioACUserNotOwnerBit = 7; { Set if user is not owner of the directory }
+ kioACUserNotOwnerMask = $80;
+
+ { Folder and File values of access privileges in ioACAccess }
+ kioACAccessOwnerBit = 31; { User is owner of directory }
+ kioACAccessOwnerMask = $80000000;
+ kioACAccessBlankAccessBit = 28; { Directory has blank access privileges }
+ kioACAccessBlankAccessMask = $10000000;
+ kioACAccessUserWriteBit = 26; { User has write privileges }
+ kioACAccessUserWriteMask = $04000000;
+ kioACAccessUserReadBit = 25; { User has read privileges }
+ kioACAccessUserReadMask = $02000000;
+ kioACAccessUserSearchBit = 24; { User has search privileges }
+ kioACAccessUserSearchMask = $01000000;
+ kioACAccessEveryoneWriteBit = 18; { Everyone has write privileges }
+ kioACAccessEveryoneWriteMask = $00040000;
+ kioACAccessEveryoneReadBit = 17; { Everyone has read privileges }
+ kioACAccessEveryoneReadMask = $00020000;
+ kioACAccessEveryoneSearchBit = 16; { Everyone has search privileges }
+ kioACAccessEveryoneSearchMask = $00010000;
+ kioACAccessGroupWriteBit = 10; { Group has write privileges }
+ kioACAccessGroupWriteMask = $00000400;
+ kioACAccessGroupReadBit = 9; { Group has read privileges }
+ kioACAccessGroupReadMask = $00000200;
+ kioACAccessGroupSearchBit = 8; { Group has search privileges }
+ kioACAccessGroupSearchMask = $00000100;
+ kioACAccessOwnerWriteBit = 2; { Owner has write privileges }
+ kioACAccessOwnerWriteMask = $00000004;
+ kioACAccessOwnerReadBit = 1; { Owner has read privileges }
+ kioACAccessOwnerReadMask = $00000002;
+ kioACAccessOwnerSearchBit = 0; { Owner has search privileges }
+ kioACAccessOwnerSearchMask = $00000001;
+ kfullPrivileges = $00070007; { all privileges for everybody and owner }
+ kownerPrivileges = $00000007; { all privileges for owner only }
+
+ { values of user IDs and group IDs }
+ knoUser = 0;
+ kadministratorUser = 1;
+
+ knoGroup = 0;
+
+
+type
+ GetVolParmsInfoBufferPtr = ^GetVolParmsInfoBuffer;
+ GetVolParmsInfoBuffer = record
+ vMVersion: SInt16; { version number }
+ vMAttrib: SInt32; { bit vector of attributes (see vMAttrib constants) }
+ vMLocalHand: Handle; { handle to private data }
+ vMServerAdr: SInt32; { AppleTalk server address or zero }
+ { vMVersion 1 GetVolParmsInfoBuffer ends here }
+ vMVolumeGrade: SInt32; { approx. speed rating or zero if unrated }
+ vMForeignPrivID: SInt16; { foreign privilege model supported or zero if none }
+ { vMVersion 2 GetVolParmsInfoBuffer ends here }
+ vMExtendedAttributes: SInt32; { extended attribute bits (see vMExtendedAttributes constants) }
+ { vMVersion 3 GetVolParmsInfoBuffer ends here }
+ vMDeviceID: Ptr; { device id name for interoperability with IOKit }
+ { vMVersion 4 GetVolParmsInfoBuffer ends here }
+ end;
+
+ ParmBlkPtr = ^ParamBlockRec;
+{$ifc TYPED_FUNCTION_POINTERS}
+ IOCompletionProcPtr = procedure(paramBlock: ParmBlkPtr);
+{$elsec}
+ IOCompletionProcPtr = Register68kProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ IOCompletionUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ IOCompletionUPP = UniversalProcPtr;
+{$endc}
+ IOParamPtr = ^IOParam;
+ IOParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ ioRefNum: SInt16; { refNum for I/O operation }
+ ioVersNum: SInt8; { version number }
+ ioPermssn: SInt8; { Open: permissions (byte) }
+ ioMisc: Ptr; { Rename: new name (GetEOF,SetEOF: logical end of file) (Open: optional ptr to buffer) (SetFileType: new type) }
+ ioBuffer: Ptr; { data buffer Ptr }
+ ioReqCount: SInt32; { requested byte count; also = ioNewDirID }
+ ioActCount: SInt32; { actual byte count completed }
+ ioPosMode: SInt16; { initial file positioning }
+ ioPosOffset: SInt32; { file position offset }
+ end;
+
+ FileParamPtr = ^FileParam;
+ FileParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ ioFRefNum: SInt16; { reference number }
+ ioFVersNum: SInt8; { version number }
+ filler1: SInt8;
+ ioFDirIndex: SInt16; { GetFInfo directory index }
+ ioFlAttrib: SInt8; { GetFInfo: in-use bit=7, lock bit=0 }
+ ioFlVersNum: SInt8; { file version number }
+ ioFlFndrInfo: FInfo; { user info }
+ ioFlNum: UInt32; { GetFInfo: file number; TF- ioDirID }
+ ioFlStBlk: UInt16; { start file block (0 if none) }
+ ioFlLgLen: SInt32; { logical length (EOF) }
+ ioFlPyLen: SInt32; { physical length }
+ ioFlRStBlk: UInt16; { start block rsrc fork }
+ ioFlRLgLen: SInt32; { file logical length rsrc fork }
+ ioFlRPyLen: SInt32; { file physical length rsrc fork }
+ ioFlCrDat: UInt32; { file creation date& time (32 bits in secs) }
+ ioFlMdDat: UInt32; { last modified date and time }
+ end;
+
+ VolumeParamPtr = ^VolumeParam;
+ VolumeParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ filler2: SInt32;
+ ioVolIndex: SInt16; { volume index number }
+ ioVCrDate: UInt32; { creation date and time }
+ ioVLsBkUp: UInt32; { last backup date and time }
+ ioVAtrb: UInt16; { volume attrib }
+ ioVNmFls: UInt16; { number of files in directory }
+ ioVDirSt: UInt16; { start block of file directory }
+ ioVBlLn: SInt16; { GetVolInfo: length of dir in blocks }
+ ioVNmAlBlks: UInt16; { for compatibilty ioVNmAlBlks * ioVAlBlkSiz <= 2 GB }
+ ioVAlBlkSiz: UInt32; { for compatibilty ioVAlBlkSiz is <= $0000FE00 (65,024) }
+ ioVClpSiz: UInt32; { GetVolInfo: bytes to allocate at a time }
+ ioAlBlSt: UInt16; { starting disk(512-byte) block in block map }
+ ioVNxtFNum: UInt32; { GetVolInfo: next free file number }
+ ioVFrBlk: UInt16; { GetVolInfo: # free alloc blks for this vol }
+ end;
+
+ CntrlParamPtr = ^CntrlParam;
+ CntrlParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ ioCRefNum: SInt16; { refNum for I/O operation }
+ csCode: SInt16; { word for control status code }
+ csParam: array [0..10] of SInt16; { operation-defined parameters }
+ end;
+
+ SlotDevParamPtr = ^SlotDevParam;
+ SlotDevParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ ioSRefNum: SInt16;
+ ioSVersNum: SInt8;
+ ioSPermssn: SInt8;
+ ioSMix: Ptr;
+ ioSFlags: SInt16;
+ ioSlot: SInt8;
+ ioID: SInt8;
+ end;
+
+ MultiDevParamPtr = ^MultiDevParam;
+ MultiDevParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ ioMRefNum: SInt16;
+ ioMVersNum: SInt8;
+ ioMPermssn: SInt8;
+ ioMMix: Ptr;
+ ioMFlags: SInt16;
+ ioSEBlkPtr: Ptr;
+ end;
+
+ ParamBlockRecPtr = ^ParamBlockRec;
+ ParamBlockRec = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ case SInt16 of
+ 0: (
+ ioRefNum: SInt16; { refNum for I/O operation }
+ ioVersNum: SInt8; { version number }
+ ioPermssn: SInt8; { Open: permissions (byte) }
+ ioMisc: Ptr; { Rename: new name (GetEOF,SetEOF: logical end of file) (Open: optional ptr to buffer) (SetFileType: new type) }
+ ioBuffer: Ptr; { data buffer Ptr }
+ ioReqCount: SInt32; { requested byte count; also = ioNewDirID }
+ ioActCount: SInt32; { actual byte count completed }
+ ioPosMode: SInt16; { initial file positioning }
+ ioPosOffset: SInt32; { file position offset }
+ );
+ 1: (
+ ioFRefNum: SInt16; { reference number }
+ ioFVersNum: SInt8; { version number }
+ filler1: SInt8;
+ ioFDirIndex: SInt16; { GetFInfo directory index }
+ ioFlAttrib: SInt8; { GetFInfo: in-use bit=7, lock bit=0 }
+ ioFlVersNum: SInt8; { file version number }
+ ioFlFndrInfo: FInfo; { user info }
+ ioFlNum: UInt32; { GetFInfo: file number; TF- ioDirID }
+ ioFlStBlk: UInt16; { start file block (0 if none) }
+ ioFlLgLen: SInt32; { logical length (EOF) }
+ ioFlPyLen: SInt32; { physical length }
+ ioFlRStBlk: UInt16; { start block rsrc fork }
+ ioFlRLgLen: SInt32; { file logical length rsrc fork }
+ ioFlRPyLen: SInt32; { file physical length rsrc fork }
+ ioFlCrDat: UInt32; { file creation date& time (32 bits in secs) }
+ ioFlMdDat: UInt32; { last modified date and time }
+ );
+ 2: (
+ filler2: SInt32;
+ ioVolIndex: SInt16; { volume index number }
+ ioVCrDate: UInt32; { creation date and time }
+ ioVLsBkUp: UInt32; { last backup date and time }
+ ioVAtrb: UInt16; { volume attrib }
+ ioVNmFls: UInt16; { number of files in directory }
+ ioVDirSt: UInt16; { start block of file directory }
+ ioVBlLn: SInt16; { GetVolInfo: length of dir in blocks }
+ ioVNmAlBlks: UInt16; { for compatibilty ioVNmAlBlks * ioVAlBlkSiz <= 2 GB }
+ ioVAlBlkSiz: UInt32; { for compatibilty ioVAlBlkSiz is <= $0000FE00 (65,024) }
+ ioVClpSiz: UInt32; { GetVolInfo: bytes to allocate at a time }
+ ioAlBlSt: UInt16; { starting disk(512-byte) block in block map }
+ ioVNxtFNum: UInt32; { GetVolInfo: next free file number }
+ ioVFrBlk: UInt16; { GetVolInfo: # free alloc blks for this vol }
+ );
+ 3: (
+ ioCRefNum: SInt16; { refNum for I/O operation }
+ csCode: SInt16; { word for control status code }
+ csParam: array [0..10] of SInt16; { operation-defined parameters }
+ );
+ 4: (
+ ioSRefNum: SInt16;
+ ioSVersNum: SInt8;
+ ioSPermssn: SInt8;
+ ioSMix: Ptr;
+ ioSFlags: SInt16;
+ ioSlot: SInt8;
+ ioID: SInt8;
+ );
+ 5: (
+ ioMRefNum: SInt16;
+ ioMVersNum: SInt8;
+ ioMPermssn: SInt8;
+ ioMMix: Ptr;
+ ioMFlags: SInt16;
+ ioSEBlkPtr: Ptr;
+ );
+ end;
+
+ CInfoPBRecPtr = ^CInfoPBRec;
+ CInfoPBRec = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ ioFRefNum: SInt16;
+ ioFVersNum: SInt8;
+ filler1: SInt8;
+ ioFDirIndex: SInt16;
+ ioFlAttrib: SInt8;
+ ioACUser: SInt8;
+ case SInt16 of
+ 0: (
+ ioFlFndrInfo: FInfo;
+ ioDirID: UInt32;
+ ioFlStBlk: UInt16;
+ ioFlLgLen: SInt32;
+ ioFlPyLen: SInt32;
+ ioFlRStBlk: UInt16;
+ ioFlRLgLen: SInt32;
+ ioFlRPyLen: SInt32;
+ ioFlCrDat: UInt32;
+ ioFlMdDat: UInt32;
+ ioFlBkDat: UInt32;
+ ioFlXFndrInfo: FXInfo;
+ ioFlParID: SInt32;
+ ioFlClpSiz: SInt32;
+ );
+ 1: (
+ ioDrUsrWds: DInfo;
+ ioDrDirID: UInt32;
+ ioDrNmFls: UInt16;
+ filler3: array [1..9] of SInt16;
+ ioDrCrDat: UInt32;
+ ioDrMdDat: UInt32;
+ ioDrBkDat: UInt32;
+ ioDrFndrInfo: DXInfo;
+ ioDrParID: SInt32;
+ );
+ end;
+
+ CInfoPBPtr = ^CInfoPBRec;
+ XCInfoPBRecPtr = ^XCInfoPBRec;
+ XCInfoPBRec = record
+ qLink: QElemPtr;
+ qType: SInt16;
+ ioTrap: SInt16;
+ ioCmdAddr: Ptr;
+ ioCompletion: ProcPtr; { --> A pointer to a completion routine }
+ ioResult: OSErr; { --> The result code of the function }
+ ioNamePtr: StringPtr; { --> Pointer to pathname to object }
+ ioVRefNum: SInt16; { --> A volume specification }
+ filler1: SInt32;
+ ioShortNamePtr: StringPtr; { <-> A pointer to the short name string buffer - required! }
+ filler2: SInt16;
+ ioPDType: SInt16; { <-- The ProDOS file type }
+ ioPDAuxType: SInt32; { <-- The ProDOS aux type }
+ filler3: array [0..1] of SInt32;
+ ioDirID: UInt32; { --> A directory ID }
+ end;
+
+ XCInfoPBPtr = ^XCInfoPBRec;
+ { Catalog position record }
+ CatPositionRecPtr = ^CatPositionRec;
+ CatPositionRec = record
+ initialize: SInt32;
+ priv: array [1..6] of SInt16;
+ end;
+
+ FSSpecPtr = ^FSSpec;
+ FSSpec = record
+ vRefNum: SInt16;
+ parID: UInt32;
+ name: StrFileName; { a Str63 on MacOS }
+ end;
+
+ FSSpecHandle = ^FSSpecPtr;
+ { pointer to array of FSSpecs }
+ FSSpecArray = array [0..0] of FSSpec;
+ FSSpecArrayPtr = ^FSSpecArray;
+ {
+ The only difference between "const FSSpec*" and "ConstFSSpecPtr" is
+ that as a parameter, ConstFSSpecPtr is allowed to be NULL
+ }
+ ConstFSSpecPtr = FSSpecPtr;
+ {
+ The following are structures to be filled out with the _PBGetVolMountInfo call
+ and passed back into the _PBVolumeMount call for external file system mounts.
+ }
+ { the "signature" of the file system }
+ VolumeType = OSType;
+
+const
+ { the signature for AppleShare }
+ AppleShareMediaType = $6166706D (* 'afpm' *);
+
+ {
+ VolMount stuff was once in FSM.Å
+ }
+
+type
+ VolMountInfoHeaderPtr = ^VolMountInfoHeader;
+ VolMountInfoHeader = record
+ length: SInt16; { length of location data (including self) }
+ media: VolumeType; { type of media. Variable length data follows }
+ end;
+
+ VolMountInfoPtr = ^VolMountInfoHeader;
+ { The new volume mount info record. The old one is included for compatibility.
+ the new record allows access by foriegn filesystems writers to the flags
+ portion of the record. This portion is now public.
+ }
+ VolumeMountInfoHeaderPtr = ^VolumeMountInfoHeader;
+ VolumeMountInfoHeader = record
+ length: SInt16; { length of location data (including self) }
+ media: VolumeType; { type of media (must be registered with Apple) }
+ flags: SInt16; { volume mount flags. Variable length data follows }
+ end;
+
+ { volume mount flags }
+
+const
+ volMountNoLoginMsgFlagBit = 0; { Input to VolumeMount: If set, the file system }
+ volMountNoLoginMsgFlagMask = $0001; { should suppresss any log-in message/greeting dialog }
+ volMountExtendedFlagsBit = 7; { Input to VolumeMount: If set, the mount info is a }
+ volMountExtendedFlagsMask = $0080; { AFPXVolMountInfo record for 3.7 AppleShare Client }
+ volMountInteractBit = 15; { Input to VolumeMount: If set, it's OK for the file system }
+ volMountInteractMask = $8000; { to perform user interaction to mount the volume }
+ volMountChangedBit = 14; { Output from VoumeMount: If set, the volume was mounted, but }
+ volMountChangedMask = $4000; { the volume mounting information record needs to be updated. }
+ volMountFSReservedMask = $00FF; { bits 0-7 are defined by each file system for its own use }
+ volMountSysReservedMask = $FF00; { bits 8-15 are reserved for Apple system use }
+
+
+type
+ AFPVolMountInfoPtr = ^AFPVolMountInfo;
+ AFPVolMountInfo = record
+ length: SInt16; { length of location data (including self) }
+ media: VolumeType; { type of media }
+ flags: SInt16; { bits for no messages, no reconnect }
+ nbpInterval: SInt8; { NBP Interval parameter (IM2, p.322) }
+ nbpCount: SInt8; { NBP Interval parameter (IM2, p.322) }
+ uamType: SInt16; { User Authentication Method }
+ zoneNameOffset: SInt16; { short positive offset from start of struct to Zone Name }
+ serverNameOffset: SInt16; { offset to pascal Server Name string }
+ volNameOffset: SInt16; { offset to pascal Volume Name string }
+ userNameOffset: SInt16; { offset to pascal User Name string }
+ userPasswordOffset: SInt16; { offset to pascal User Password string }
+ volPasswordOffset: SInt16; { offset to pascal Volume Password string }
+ AFPData: packed array [1..144] of char; { variable length data may follow }
+ end;
+
+
+ { AFPXVolMountInfo is the new AFP volume mount info record, requires the 3.7 AppleShare Client }
+ AFPXVolMountInfoPtr = ^AFPXVolMountInfo;
+ AFPXVolMountInfo = record
+ length: SInt16; { length of location data (including self) }
+ media: VolumeType; { type of media }
+ flags: SInt16; { bits for no messages, no reconnect }
+ nbpInterval: SInt8; { NBP Interval parameter (IM2, p.322) }
+ nbpCount: SInt8; { NBP Interval parameter (IM2, p.322) }
+ uamType: SInt16; { User Authentication Method type }
+ zoneNameOffset: SInt16; { short positive offset from start of struct to Zone Name }
+ serverNameOffset: SInt16; { offset to pascal Server Name string }
+ volNameOffset: SInt16; { offset to pascal Volume Name string }
+ userNameOffset: SInt16; { offset to pascal User Name string }
+ userPasswordOffset: SInt16; { offset to pascal User Password string }
+ volPasswordOffset: SInt16; { offset to pascal Volume Password string }
+ extendedFlags: SInt16; { extended flags word }
+ uamNameOffset: SInt16; { offset to a pascal UAM name string }
+ alternateAddressOffset: SInt16; { offset to Alternate Addresses in tagged format }
+ AFPData: packed array [1..176] of char; { variable length data may follow }
+ end;
+
+
+const
+ kAFPExtendedFlagsAlternateAddressMask = 1; { bit in AFPXVolMountInfo.extendedFlags that means alternateAddressOffset is used }
+
+
+ { constants for use in AFPTagData.fType field }
+ kAFPTagTypeIP = $01; { 4 byte IP address (MSB first) }
+ kAFPTagTypeIPPort = $02; { 4 byte IP address, 2 byte port (MSB first) }
+ kAFPTagTypeDDP = $03; { Net,Node,Socket Sent by the server, currently unused by the client }
+ kAFPTagTypeDNS = $04; { DNS name in address:port format (total length variable up to 254 chars of dns name) }
+
+
+ { constants for use in AFPTagData.fLength field }
+ kAFPTagLengthIP = $06;
+ kAFPTagLengthIPPort = $08;
+ kAFPTagLengthDDP = $06;
+
+
+type
+ AFPTagDataPtr = ^AFPTagData;
+ AFPTagData = packed record
+ fLength: UInt8; { length of this data tag including the fLength field }
+ fType: UInt8;
+ fData: packed array [0..0] of UInt8; { variable length data }
+ end;
+
+ AFPAlternateAddressPtr = ^AFPAlternateAddress;
+ AFPAlternateAddress = packed record
+ { ¥¥¥ÊNOTE: fVersion was missing in 3.2 Universal Interfaces }
+ fVersion: UInt8; { version of the structure (currently 0x00) }
+ fAddressCount: UInt8;
+ fAddressList: packed array [0..0] of UInt8; { actually variable length packed set of AFPTagData }
+ end;
+
+ DTPBRecPtr = ^DTPBRec;
+ DTPBRec = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ ioDTRefNum: SInt16; { desktop refnum }
+ ioIndex: SInt16;
+ ioTagInfo: SInt32;
+ ioDTBuffer: Ptr;
+ ioDTReqCount: SInt32;
+ ioDTActCount: SInt32;
+ ioFiller1: SInt8;
+ ioIconType: SInt8;
+ ioFiller2: SInt16;
+ ioDirID: UInt32;
+ ioFileCreator: OSType;
+ ioFileType: OSType;
+ ioFiller3: SInt32;
+ ioDTLgLen: SInt32;
+ ioDTPyLen: SInt32;
+ ioFiller4: array [1..14] of SInt16;
+ ioAPPLParID: SInt32;
+ end;
+
+ DTPBPtr = ^DTPBRec;
+
+ HIOParamPtr = ^HIOParam;
+ HIOParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ ioRefNum: SInt16;
+ ioVersNum: SInt8;
+ ioPermssn: SInt8;
+ ioMisc: Ptr;
+ ioBuffer: Ptr;
+ ioReqCount: SInt32;
+ ioActCount: SInt32;
+ ioPosMode: SInt16;
+ ioPosOffset: SInt32;
+ end;
+
+ HFileParamPtr = ^HFileParam;
+ HFileParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ ioFRefNum: SInt16;
+ ioFVersNum: SInt8;
+ filler1: SInt8;
+ ioFDirIndex: SInt16;
+ ioFlAttrib: SInt8;
+ ioFlVersNum: SInt8;
+ ioFlFndrInfo: FInfo;
+ ioDirID: UInt32;
+ ioFlStBlk: UInt16;
+ ioFlLgLen: SInt32;
+ ioFlPyLen: SInt32;
+ ioFlRStBlk: UInt16;
+ ioFlRLgLen: SInt32;
+ ioFlRPyLen: SInt32;
+ ioFlCrDat: UInt32;
+ ioFlMdDat: UInt32;
+ end;
+
+ HVolumeParamPtr = ^HVolumeParam;
+ HVolumeParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ filler2: SInt32;
+ ioVolIndex: SInt16;
+ ioVCrDate: UInt32;
+ ioVLsMod: UInt32;
+ ioVAtrb: SInt16;
+ ioVNmFls: UInt16;
+ ioVBitMap: UInt16;
+ ioAllocPtr: UInt16;
+ ioVNmAlBlks: UInt16;
+ ioVAlBlkSiz: UInt32;
+ ioVClpSiz: UInt32;
+ ioAlBlSt: UInt16;
+ ioVNxtCNID: UInt32;
+ ioVFrBlk: UInt16;
+ ioVSigWord: UInt16;
+ ioVDrvInfo: SInt16;
+ ioVDRefNum: SInt16;
+ ioVFSID: SInt16;
+ ioVBkUp: UInt32;
+ ioVSeqNum: SInt16;
+ ioVWrCnt: UInt32;
+ ioVFilCnt: UInt32;
+ ioVDirCnt: UInt32;
+ ioVFndrInfo: array [1..8] of SInt32;
+ end;
+
+ XIOParamPtr = ^XIOParam;
+ XIOParam = record
+ qLink: QElemPtr;
+ qType: SInt16;
+ ioTrap: SInt16;
+ ioCmdAddr: Ptr;
+ ioCompletion: IOCompletionUPP;
+ ioResult: OSErr;
+ ioNamePtr: StringPtr;
+ ioVRefNum: SInt16;
+ ioRefNum: SInt16;
+ ioVersNum: SInt8;
+ ioPermssn: SInt8;
+ ioMisc: Ptr;
+ ioBuffer: Ptr;
+ ioReqCount: SInt32;
+ ioActCount: SInt32;
+ ioPosMode: SInt16; { must have kUseWidePositioning bit set }
+ ioWPosOffset: wide; { wide positioning offset }
+ end;
+
+ XVolumeParamPtr = ^XVolumeParam;
+ XVolumeParam = record
+ qLink: QElemPtr;
+ qType: SInt16;
+ ioTrap: SInt16;
+ ioCmdAddr: Ptr;
+ ioCompletion: IOCompletionUPP;
+ ioResult: OSErr;
+ ioNamePtr: StringPtr;
+ ioVRefNum: SInt16;
+ ioXVersion: UInt32; { this XVolumeParam version (0) }
+ ioVolIndex: SInt16;
+ ioVCrDate: UInt32;
+ ioVLsMod: UInt32;
+ ioVAtrb: SInt16;
+ ioVNmFls: UInt16;
+ ioVBitMap: UInt16;
+ ioAllocPtr: UInt16;
+ ioVNmAlBlks: UInt16;
+ ioVAlBlkSiz: UInt32;
+ ioVClpSiz: UInt32;
+ ioAlBlSt: UInt16;
+ ioVNxtCNID: UInt32;
+ ioVFrBlk: UInt16;
+ ioVSigWord: UInt16;
+ ioVDrvInfo: SInt16;
+ ioVDRefNum: SInt16;
+ ioVFSID: SInt16;
+ ioVBkUp: UInt32;
+ ioVSeqNum: SInt16;
+ ioVWrCnt: UInt32;
+ ioVFilCnt: UInt32;
+ ioVDirCnt: UInt32;
+ ioVFndrInfo: array [1..8] of SInt32;
+ ioVTotalBytes: UInt64; { total number of bytes on volume }
+ ioVFreeBytes: UInt64; { number of free bytes on volume }
+ end;
+
+ AccessParamPtr = ^AccessParam;
+ AccessParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ filler3: SInt16;
+ ioDenyModes: SInt16; { access rights data }
+ filler4: SInt16;
+ filler5: SInt8;
+ ioACUser: SInt8; { access rights for directory only }
+ filler6: SInt32;
+ ioACOwnerID: SInt32; { owner ID }
+ ioACGroupID: SInt32; { group ID }
+ ioACAccess: SInt32; { access rights }
+ ioDirID: UInt32;
+ end;
+
+ ObjParamPtr = ^ObjParam;
+ ObjParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ filler7: SInt16;
+ ioObjType: SInt16; { function code }
+ ioObjNamePtr: StringPtr; { ptr to returned creator/group name }
+ ioObjID: SInt32; { creator/group ID }
+ end;
+
+ CopyParamPtr = ^CopyParam;
+ CopyParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ ioDstVRefNum: SInt16; { destination vol identifier }
+ filler8: SInt16;
+ ioNewName: StringPtr; { ptr to destination pathname }
+ ioCopyName: StringPtr; { ptr to optional name }
+ ioNewDirID: UInt32; { destination directory ID }
+ filler14: SInt32;
+ filler15: SInt32;
+ ioDirID: UInt32;
+ end;
+
+ WDParamPtr = ^WDParam;
+ WDParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ ioWDCreated: SInt16;
+ ioWDIndex: SInt16;
+ ioWDProcID: SInt32;
+ ioWDVRefNum: SInt16;
+ filler10: SInt16;
+ filler11: SInt32;
+ filler12: SInt32;
+ filler13: SInt32;
+ ioWDDirID: UInt32;
+ end;
+
+ FIDParamPtr = ^FIDParam;
+ FIDParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ filler14: SInt32;
+ ioDestNamePtr: StringPtr; { dest file name }
+ filler15: SInt32;
+ ioDestDirID: UInt32; { dest file's directory id }
+ filler16: SInt32;
+ filler17: SInt32;
+ ioSrcDirID: UInt32; { source file's directory id }
+ filler18: SInt16;
+ ioFileID: SInt32; { file ID }
+ end;
+
+ ForeignPrivParamPtr = ^ForeignPrivParam;
+ ForeignPrivParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ ioFiller21: SInt32;
+ ioFiller22: SInt32;
+ ioForeignPrivBuffer: Ptr;
+ ioForeignPrivActCount: SInt32;
+ ioForeignPrivReqCount: SInt32;
+ ioFiller23: SInt32;
+ ioForeignPrivDirID: UInt32;
+ ioForeignPrivInfo1: SInt32;
+ ioForeignPrivInfo2: SInt32;
+ ioForeignPrivInfo3: SInt32;
+ ioForeignPrivInfo4: SInt32;
+ end;
+
+ CSParamPtr = ^CSParam;
+ CSParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ ioMatchPtr: FSSpecPtr; { match array }
+ ioReqMatchCount: SInt32; { maximum allowable matches }
+ ioActMatchCount: SInt32; { actual match count }
+ ioSearchBits: SInt32; { search criteria selector }
+ ioSearchInfo1: CInfoPBPtr; { search values and range lower bounds }
+ ioSearchInfo2: CInfoPBPtr; { search values and range upper bounds }
+ ioSearchTime: SInt32; { length of time to run search }
+ ioCatPosition: CatPositionRec; { current position in the catalog }
+ ioOptBuffer: Ptr; { optional performance enhancement buffer }
+ ioOptBufSize: SInt32; { size of buffer pointed to by ioOptBuffer }
+ end;
+
+
+ HParamBlockRecPtr = ^HParamBlockRec;
+ HParamBlockRec = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ case SInt16 of
+ 0: (
+ ioRefNum: SInt16;
+ ioVersNum: SInt8;
+ ioPermssn: SInt8;
+ ioMisc: Ptr;
+ ioBuffer: Ptr;
+ ioReqCount: SInt32;
+ ioActCount: SInt32;
+ ioPosMode: SInt16;
+ ioPosOffset: SInt32;
+ );
+ 1: (
+ ioFRefNum: SInt16;
+ ioFVersNum: SInt8;
+ filler1: SInt8;
+ ioFDirIndex: SInt16;
+ ioFlAttrib: SInt8;
+ ioFlVersNum: SInt8;
+ ioFlFndrInfo: FInfo;
+ ioDirID: UInt32;
+ ioFlStBlk: UInt16;
+ ioFlLgLen: SInt32;
+ ioFlPyLen: SInt32;
+ ioFlRStBlk: UInt16;
+ ioFlRLgLen: SInt32;
+ ioFlRPyLen: SInt32;
+ ioFlCrDat: UInt32;
+ ioFlMdDat: UInt32;
+ );
+ 2: (
+ filler2: SInt32;
+ ioVolIndex: SInt16;
+ ioVCrDate: UInt32;
+ ioVLsMod: UInt32;
+ ioVAtrb: SInt16;
+ ioVNmFls: UInt16;
+ ioVBitMap: UInt16;
+ ioAllocPtr: UInt16;
+ ioVNmAlBlks: UInt16;
+ ioVAlBlkSiz: UInt32;
+ ioVClpSiz: UInt32;
+ ioAlBlSt: UInt16;
+ ioVNxtCNID: UInt32;
+ ioVFrBlk: UInt16;
+ ioVSigWord: UInt16;
+ ioVDrvInfo: SInt16;
+ ioVDRefNum: SInt16;
+ ioVFSID: SInt16;
+ ioVBkUp: UInt32;
+ ioVSeqNum: UInt16;
+ ioVWrCnt: UInt32;
+ ioVFilCnt: UInt32;
+ ioVDirCnt: UInt32;
+ ioVFndrInfo: array [1..8] of SInt32;
+ );
+ 3: (
+ filler3: SInt16;
+ ioDenyModes: SInt16; { access rights data }
+ filler4: SInt16;
+ filler5: SInt8;
+ ioACUser: SInt8; { access rights for directory only }
+ filler6: SInt32;
+ ioACOwnerID: SInt32; { owner ID }
+ ioACGroupID: SInt32; { group ID }
+ ioACAccess: SInt32; { access rights }
+ );
+ 4: (
+ filler7: SInt16;
+ ioObjType: SInt16; { function code }
+ ioObjNamePtr: StringPtr; { ptr to returned creator/group name }
+ ioObjID: SInt32; { creator/group ID }
+ );
+ 5: (
+ ioDstVRefNum: SInt16; { destination vol identifier }
+ filler8: SInt16;
+ ioNewName: StringPtr; { ptr to destination pathname }
+ ioCopyName: StringPtr; { ptr to optional name }
+ ioNewDirID: UInt32; { destination directory ID }
+ );
+ 6: (
+ ioWDCreated: SInt16;
+ ioWDIndex: SInt16;
+ ioWDProcID: SInt32;
+ ioWDVRefNum: SInt16;
+ filler10: SInt16;
+ filler11: SInt32;
+ filler12: SInt32;
+ filler13: SInt32;
+ ioWDDirID: UInt32;
+ );
+ 7: (
+ filler14: SInt32;
+ ioDestNamePtr: StringPtr; { dest file name }
+ filler15: SInt32;
+ ioDestDirID: UInt32; { dest file's directory id }
+ filler16: SInt32;
+ filler17: SInt32;
+ ioSrcDirID: UInt32; { source file's directory id }
+ filler18: SInt16;
+ ioFileID: SInt32; { file ID }
+ );
+ 8: (
+ ioMatchPtr: FSSpecPtr; { match array }
+ ioReqMatchCount: SInt32; { maximum allowable matches }
+ ioActMatchCount: SInt32; { actual match count }
+ ioSearchBits: SInt32; { search criteria selector }
+ ioSearchInfo1: CInfoPBPtr; { search values and range lower bounds }
+ ioSearchInfo2: CInfoPBPtr; { search values and range upper bounds }
+ ioSearchTime: SInt32; { length of time to run search }
+ ioCatPosition: CatPositionRec; { current position in the catalog }
+ ioOptBuffer: Ptr; { optional performance enhancement buffer }
+ ioOptBufSize: SInt32; { size of buffer pointed to by ioOptBuffer }
+ );
+ 9: (
+ ioFiller21: SInt32;
+ ioFiller22: SInt32;
+ ioForeignPrivBuffer: Ptr;
+ ioForeignPrivActCount: SInt32;
+ ioForeignPrivReqCount: SInt32;
+ ioFiller23: SInt32;
+ ioForeignPrivDirID: UInt32;
+ ioForeignPrivInfo1: SInt32;
+ ioForeignPrivInfo2: SInt32;
+ ioForeignPrivInfo3: SInt32;
+ ioForeignPrivInfo4: SInt32;
+ );
+ end;
+
+ HParmBlkPtr = ^HParamBlockRec;
+
+ CMovePBRecPtr = ^CMovePBRec;
+ CMovePBRec = record
+ qLink: QElemPtr;
+ qType: SInt16;
+ ioTrap: SInt16;
+ ioCmdAddr: Ptr;
+ ioCompletion: IOCompletionUPP;
+ ioResult: OSErr;
+ ioNamePtr: StringPtr;
+ ioVRefNum: SInt16;
+ filler1: SInt32;
+ ioNewName: StringPtr;
+ filler2: SInt32;
+ ioNewDirID: UInt32;
+ filler3: array [1..2] of SInt32;
+ ioDirID: UInt32;
+ end;
+
+ CMovePBPtr = ^CMovePBRec;
+ WDPBRecPtr = ^WDPBRec;
+ WDPBRec = record
+ qLink: QElemPtr;
+ qType: SInt16;
+ ioTrap: SInt16;
+ ioCmdAddr: Ptr;
+ ioCompletion: IOCompletionUPP;
+ ioResult: OSErr;
+ ioNamePtr: StringPtr;
+ ioVRefNum: SInt16;
+ filler1: SInt16;
+ ioWDIndex: SInt16;
+ ioWDProcID: SInt32;
+ ioWDVRefNum: SInt16;
+ filler2: array [1..7] of SInt16;
+ ioWDDirID: UInt32;
+ end;
+
+ WDPBPtr = ^WDPBRec;
+ FCBPBRecPtr = ^FCBPBRec;
+ FCBPBRec = record
+ qLink: QElemPtr;
+ qType: SInt16;
+ ioTrap: SInt16;
+ ioCmdAddr: Ptr;
+ ioCompletion: IOCompletionUPP;
+ ioResult: OSErr;
+ ioNamePtr: StringPtr;
+ ioVRefNum: SInt16;
+ ioRefNum: SInt16;
+ filler: SInt16;
+ ioFCBIndx: SInt16;
+ filler1: SInt16;
+ ioFCBFlNm: SInt32;
+ ioFCBFlags: SInt16;
+ ioFCBStBlk: UInt16;
+ ioFCBEOF: SInt32;
+ ioFCBPLen: SInt32;
+ ioFCBCrPs: SInt32;
+ ioFCBVRefNum: SInt16;
+ ioFCBClpSiz: SInt32;
+ ioFCBParID: SInt32;
+ end;
+
+ FCBPBPtr = ^FCBPBRec;
+ VCBPtr = ^VCB;
+ VCB = record
+ qLink: QElemPtr;
+ qType: SInt16;
+ vcbFlags: SInt16;
+ vcbSigWord: UInt16;
+ vcbCrDate: UInt32;
+ vcbLsMod: UInt32;
+ vcbAtrb: SInt16;
+ vcbNmFls: UInt16;
+ vcbVBMSt: SInt16;
+ vcbAllocPtr: SInt16;
+ vcbNmAlBlks: UInt16;
+ vcbAlBlkSiz: SInt32;
+ vcbClpSiz: SInt32;
+ vcbAlBlSt: SInt16;
+ vcbNxtCNID: SInt32;
+ vcbFreeBks: UInt16;
+ vcbVN: Str27;
+ vcbDrvNum: SInt16;
+ vcbDRefNum: SInt16;
+ vcbFSID: SInt16;
+ vcbVRefNum: SInt16;
+ vcbMAdr: Ptr;
+ vcbBufAdr: Ptr;
+ vcbMLen: SInt16;
+ vcbDirIndex: SInt16;
+ vcbDirBlk: SInt16;
+ vcbVolBkUp: UInt32;
+ vcbVSeqNum: UInt16;
+ vcbWrCnt: SInt32;
+ vcbXTClpSiz: SInt32;
+ vcbCTClpSiz: SInt32;
+ vcbNmRtDirs: UInt16;
+ vcbFilCnt: SInt32;
+ vcbDirCnt: SInt32;
+ vcbFndrInfo: array [1..8] of SInt32;
+ vcbVCSize: UInt16;
+ vcbVBMCSiz: UInt16;
+ vcbCtlCSiz: UInt16;
+ vcbXTAlBlks: UInt16;
+ vcbCTAlBlks: UInt16;
+ vcbXTRef: SInt16;
+ vcbCTRef: SInt16;
+ vcbCtlBuf: Ptr;
+ vcbDirIDM: SInt32;
+ vcbOffsM: SInt16;
+ end;
+
+ DrvQElPtr = ^DrvQEl;
+ DrvQEl = record
+ qLink: QElemPtr;
+ qType: SInt16;
+ dQDrive: SInt16;
+ dQRefNum: SInt16;
+ dQFSID: SInt16;
+ dQDrvSz: UInt16;
+ dQDrvSz2: UInt16;
+ end;
+
+
+const
+ uppIOCompletionProcInfo = $00009802;
+ {
+ * NewIOCompletionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewIOCompletionUPP(userRoutine: IOCompletionProcPtr): IOCompletionUPP; external name '_NewIOCompletionUPP'; { old name was NewIOCompletionProc }
+{
+ * DisposeIOCompletionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeIOCompletionUPP(userUPP: IOCompletionUPP); external name '_DisposeIOCompletionUPP';
+{
+ * InvokeIOCompletionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeIOCompletionUPP(paramBlock: ParmBlkPtr; userRoutine: IOCompletionUPP); external name '_InvokeIOCompletionUPP'; { old name was CallIOCompletionProc }
+
+{
+ PBOpenSync(), PBOpenAsync(), PBOpenImmed() were moved to Devices.h
+ PBCloseSync(), PBCloseAsync(), PBCloseImmed() were moved to Devices.h
+ PBReadSync(), PBReadAsync(), PBReadImmed() were moved to Devices.h
+ PBWriteSync(), PBWriteAsync(), PBWriteImmed() were moved to Devices.h
+}
+
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBGetVInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetVInfoSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBGetVInfoSync';
+{
+ * PBGetVInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetVInfoAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBGetVInfoAsync';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * PBXGetVolInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBXGetVolInfoSync(paramBlock: XVolumeParamPtr): OSErr; external name '_PBXGetVolInfoSync';
+{
+ * PBXGetVolInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBXGetVolInfoAsync(paramBlock: XVolumeParamPtr): OSErr; external name '_PBXGetVolInfoAsync';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBGetVolSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetVolSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBGetVolSync';
+{
+ * PBGetVolAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetVolAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBGetVolAsync';
+{
+ * PBSetVolSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetVolSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBSetVolSync';
+{
+ * PBSetVolAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetVolAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBSetVolAsync';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * PBFlushVolSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBFlushVolSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBFlushVolSync';
+{
+ * PBFlushVolAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBFlushVolAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBFlushVolAsync';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBHTrashVolumeCachesSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHTrashVolumeCachesSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBHTrashVolumeCachesSync';
+{
+ * PBCreateSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBCreateSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBCreateSync';
+{
+ * PBCreateAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBCreateAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBCreateAsync';
+{
+ * PBDeleteSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDeleteSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBDeleteSync';
+{
+ * PBDeleteAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDeleteAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBDeleteAsync';
+{
+ * PBOpenDFSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBOpenDFSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBOpenDFSync';
+{
+ * PBOpenDFAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBOpenDFAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBOpenDFAsync';
+{
+ * PBOpenRFSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBOpenRFSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBOpenRFSync';
+{
+ * PBOpenRFAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBOpenRFAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBOpenRFAsync';
+{
+ * PBRenameSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBRenameSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBRenameSync';
+{
+ * PBRenameAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBRenameAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBRenameAsync';
+{
+ * PBGetFInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetFInfoSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBGetFInfoSync';
+{
+ * PBGetFInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetFInfoAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBGetFInfoAsync';
+{
+ * PBSetFInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetFInfoSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBSetFInfoSync';
+{
+ * PBSetFInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetFInfoAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBSetFInfoAsync';
+{
+ * PBSetFLockSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetFLockSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBSetFLockSync';
+{
+ * PBSetFLockAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetFLockAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBSetFLockAsync';
+{
+ * PBRstFLockSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBRstFLockSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBRstFLockSync';
+{
+ * PBRstFLockAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBRstFLockAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBRstFLockAsync';
+{
+ * PBSetFVersSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetFVersSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBSetFVersSync';
+{
+ * PBSetFVersAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetFVersAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBSetFVersAsync';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * PBAllocateSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBAllocateSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBAllocateSync';
+{
+ * PBAllocateAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBAllocateAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBAllocateAsync';
+{
+ * PBGetEOFSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetEOFSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBGetEOFSync';
+{
+ * PBGetEOFAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetEOFAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBGetEOFAsync';
+{
+ * PBSetEOFSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBSetEOFSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBSetEOFSync';
+{
+ * PBSetEOFAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBSetEOFAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBSetEOFAsync';
+{
+ * PBGetFPosSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetFPosSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBGetFPosSync';
+{
+ * PBGetFPosAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetFPosAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBGetFPosAsync';
+{
+ * PBSetFPosSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBSetFPosSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBSetFPosSync';
+{
+ * PBSetFPosAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBSetFPosAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBSetFPosAsync';
+{
+ * PBFlushFileSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBFlushFileSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBFlushFileSync';
+{
+ * PBFlushFileAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBFlushFileAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBFlushFileAsync';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBMountVol()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBMountVol(paramBlock: ParmBlkPtr): OSErr; external name '_PBMountVol';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * PBUnmountVol()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBUnmountVol(paramBlock: ParmBlkPtr): OSErr; external name '_PBUnmountVol';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBUnmountVolImmed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBUnmountVolImmed(paramBlock: ParmBlkPtr): OSErr; external name '_PBUnmountVolImmed';
+{
+ * PBEject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBEject(paramBlock: ParmBlkPtr): OSErr; external name '_PBEject';
+{
+ * PBOffLine()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBOffLine(paramBlock: ParmBlkPtr): OSErr; external name '_PBOffLine';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * PBCatSearchSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBCatSearchSync(paramBlock: CSParamPtr): OSErr; external name '_PBCatSearchSync';
+{
+ * PBCatSearchAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBCatSearchAsync(paramBlock: CSParamPtr): OSErr; external name '_PBCatSearchAsync';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * SetVol()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SetVol(volName: ConstStringPtr; vRefNum: SInt16): OSErr; external name '_SetVol';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * UnmountVol()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UnmountVol(volName: ConstStringPtr; vRefNum: SInt16): OSErr; external name '_UnmountVol';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * Eject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Eject(volName: ConstStringPtr; vRefNum: SInt16): OSErr; external name '_Eject';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * FlushVol()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FlushVol(volName: ConstStringPtr; vRefNum: SInt16): OSErr; external name '_FlushVol';
+
+{
+ * HSetVol()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HSetVol(volName: ConstStringPtr; vRefNum: SInt16; dirID: UInt32): OSErr; external name '_HSetVol';
+
+{ AddDrive() was moved to Devices.h }
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * FSOpen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function FSOpen(const (*var*) fileName: Str255; vRefNum: SInt16; var refNum: SInt16): OSErr; external name '_FSOpen';
+
+{
+ * OpenDF()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function OpenDF(const (*var*) fileName: Str255; vRefNum: SInt16; var refNum: SInt16): OSErr; external name '_OpenDF';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * FSClose()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSClose(refNum: SInt16): OSErr; external name '_FSClose';
+
+{
+ * FSRead()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSRead(refNum: SInt16; var count: SInt32; buffPtr: UnivPtr): OSErr; external name '_FSRead';
+
+{
+ * FSWrite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSWrite(refNum: SInt16; var count: SInt32; buffPtr: UnivPtr): OSErr; external name '_FSWrite';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * GetVInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetVInfo(drvNum: SInt16; volName: StringPtr; var vRefNum: SInt16; var freeBytes: SInt32): OSErr; external name '_GetVInfo';
+
+{
+ * GetFInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetFInfo(const (*var*) fileName: Str255; vRefNum: SInt16; var fndrInfo: FInfo): OSErr; external name '_GetFInfo';
+
+{
+ * GetVol()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetVol(volName: StringPtr; var vRefNum: SInt16): OSErr; external name '_GetVol';
+
+{
+ * Create()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Create(const (*var*) fileName: Str255; vRefNum: SInt16; creator: OSType; fileType: OSType): OSErr; external name '_Create';
+
+{
+ * FSDelete()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function FSDelete(const (*var*) fileName: Str255; vRefNum: SInt16): OSErr; external name '_FSDelete';
+
+{
+ * OpenRF()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function OpenRF(const (*var*) fileName: Str255; vRefNum: SInt16; var refNum: SInt16): OSErr; external name '_OpenRF';
+
+{
+ * Rename()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Rename(const (*var*) oldName: Str255; vRefNum: SInt16; const (*var*) newName: Str255): OSErr; external name '_Rename';
+
+{
+ * SetFInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SetFInfo(const (*var*) fileName: Str255; vRefNum: SInt16; const (*var*) fndrInfo: FInfo): OSErr; external name '_SetFInfo';
+
+{
+ * SetFLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SetFLock(const (*var*) fileName: Str255; vRefNum: SInt16): OSErr; external name '_SetFLock';
+
+{
+ * RstFLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RstFLock(const (*var*) fileName: Str255; vRefNum: SInt16): OSErr; external name '_RstFLock';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * Allocate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function Allocate(refNum: SInt16; var count: SInt32): OSErr; external name '_Allocate';
+
+{
+ * GetEOF()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetEOF(refNum: SInt16; var logEOF: SInt32): OSErr; external name '_GetEOF';
+
+{
+ * SetEOF()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetEOF(refNum: SInt16; logEOF: SInt32): OSErr; external name '_SetEOF';
+
+{
+ * GetFPos()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetFPos(refNum: SInt16; var filePos: SInt32): OSErr; external name '_GetFPos';
+
+{
+ * SetFPos()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetFPos(refNum: SInt16; posMode: SInt16; posOff: SInt32): OSErr; external name '_SetFPos';
+
+{
+ * GetVRefNum()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetVRefNum(fileRefNum: SInt16; var vRefNum: SInt16): OSErr; external name '_GetVRefNum';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBOpenWDSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBOpenWDSync(paramBlock: WDPBPtr): OSErr; external name '_PBOpenWDSync';
+{
+ * PBOpenWDAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBOpenWDAsync(paramBlock: WDPBPtr): OSErr; external name '_PBOpenWDAsync';
+{
+ * PBCloseWDSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBCloseWDSync(paramBlock: WDPBPtr): OSErr; external name '_PBCloseWDSync';
+{
+ * PBCloseWDAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBCloseWDAsync(paramBlock: WDPBPtr): OSErr; external name '_PBCloseWDAsync';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * PBHSetVolSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHSetVolSync(paramBlock: WDPBPtr): OSErr; external name '_PBHSetVolSync';
+{
+ * PBHSetVolAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHSetVolAsync(paramBlock: WDPBPtr): OSErr; external name '_PBHSetVolAsync';
+{
+ * PBHGetVolSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHGetVolSync(paramBlock: WDPBPtr): OSErr; external name '_PBHGetVolSync';
+{
+ * PBHGetVolAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHGetVolAsync(paramBlock: WDPBPtr): OSErr; external name '_PBHGetVolAsync';
+{
+ * PBCatMoveSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBCatMoveSync(paramBlock: CMovePBPtr): OSErr; external name '_PBCatMoveSync';
+{
+ * PBCatMoveAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBCatMoveAsync(paramBlock: CMovePBPtr): OSErr; external name '_PBCatMoveAsync';
+{
+ * PBDirCreateSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDirCreateSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBDirCreateSync';
+{
+ * PBDirCreateAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDirCreateAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBDirCreateAsync';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBGetWDInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetWDInfoSync(paramBlock: WDPBPtr): OSErr; external name '_PBGetWDInfoSync';
+{
+ * PBGetWDInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetWDInfoAsync(paramBlock: WDPBPtr): OSErr; external name '_PBGetWDInfoAsync';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * PBGetFCBInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetFCBInfoSync(paramBlock: FCBPBPtr): OSErr; external name '_PBGetFCBInfoSync';
+{
+ * PBGetFCBInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetFCBInfoAsync(paramBlock: FCBPBPtr): OSErr; external name '_PBGetFCBInfoAsync';
+{
+ * PBGetCatInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetCatInfoSync(paramBlock: CInfoPBPtr): OSErr; external name '_PBGetCatInfoSync';
+{
+ * PBGetCatInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetCatInfoAsync(paramBlock: CInfoPBPtr): OSErr; external name '_PBGetCatInfoAsync';
+{
+ * PBSetCatInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBSetCatInfoSync(paramBlock: CInfoPBPtr): OSErr; external name '_PBSetCatInfoSync';
+{
+ * PBSetCatInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBSetCatInfoAsync(paramBlock: CInfoPBPtr): OSErr; external name '_PBSetCatInfoAsync';
+{
+ * PBAllocContigSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBAllocContigSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBAllocContigSync';
+{
+ * PBAllocContigAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBAllocContigAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBAllocContigAsync';
+{
+ * PBLockRangeSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBLockRangeSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBLockRangeSync';
+{
+ * PBLockRangeAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBLockRangeAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBLockRangeAsync';
+{
+ * PBUnlockRangeSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBUnlockRangeSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBUnlockRangeSync';
+{
+ * PBUnlockRangeAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBUnlockRangeAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBUnlockRangeAsync';
+{
+ * PBSetVInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBSetVInfoSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBSetVInfoSync';
+{
+ * PBSetVInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBSetVInfoAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBSetVInfoAsync';
+{
+ * PBHGetVInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHGetVInfoSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHGetVInfoSync';
+{
+ * PBHGetVInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHGetVInfoAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHGetVInfoAsync';
+{
+ * PBHOpenSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHOpenSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHOpenSync';
+{
+ * PBHOpenAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHOpenAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHOpenAsync';
+{
+ * PBHOpenRFSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHOpenRFSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHOpenRFSync';
+{
+ * PBHOpenRFAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHOpenRFAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHOpenRFAsync';
+{
+ * PBHOpenDFSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHOpenDFSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHOpenDFSync';
+{
+ * PBHOpenDFAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHOpenDFAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHOpenDFAsync';
+{
+ * PBHCreateSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHCreateSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHCreateSync';
+{
+ * PBHCreateAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHCreateAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHCreateAsync';
+{
+ * PBHDeleteSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHDeleteSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHDeleteSync';
+{
+ * PBHDeleteAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHDeleteAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHDeleteAsync';
+{
+ * PBHRenameSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHRenameSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHRenameSync';
+{
+ * PBHRenameAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHRenameAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHRenameAsync';
+{
+ * PBHRstFLockSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHRstFLockSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHRstFLockSync';
+{
+ * PBHRstFLockAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHRstFLockAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHRstFLockAsync';
+{
+ * PBHSetFLockSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHSetFLockSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHSetFLockSync';
+{
+ * PBHSetFLockAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHSetFLockAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHSetFLockAsync';
+{
+ * PBHGetFInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHGetFInfoSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHGetFInfoSync';
+{
+ * PBHGetFInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHGetFInfoAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHGetFInfoAsync';
+{
+ * PBHSetFInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHSetFInfoSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHSetFInfoSync';
+{
+ * PBHSetFInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHSetFInfoAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHSetFInfoAsync';
+{
+ * PBMakeFSSpecSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBMakeFSSpecSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBMakeFSSpecSync';
+{
+ * PBMakeFSSpecAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBMakeFSSpecAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBMakeFSSpecAsync';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * FInitQueue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure FInitQueue; external name '_FInitQueue';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * GetFSQHdr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetFSQHdr: QHdrPtr; external name '_GetFSQHdr';
+{
+ * GetVCBQHdr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetVCBQHdr: QHdrPtr; external name '_GetVCBQHdr';
+{ GetDrvQHdr was moved to Devices.h }
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * HGetVol()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HGetVol(volName: StringPtr; var vRefNum: SInt16; var dirID: UInt32): OSErr; external name '_HGetVol';
+
+{
+ * HOpen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HOpen(vRefNum: SInt16; dirID: UInt32; const (*var*) fileName: Str255; permission: SInt8; var refNum: SInt16): OSErr; external name '_HOpen';
+
+{
+ * HOpenDF()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HOpenDF(vRefNum: SInt16; dirID: UInt32; const (*var*) fileName: Str255; permission: SInt8; var refNum: SInt16): OSErr; external name '_HOpenDF';
+
+{
+ * HOpenRF()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HOpenRF(vRefNum: SInt16; dirID: UInt32; const (*var*) fileName: Str255; permission: SInt8; var refNum: SInt16): OSErr; external name '_HOpenRF';
+
+{
+ * AllocContig()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AllocContig(refNum: SInt16; var count: SInt32): OSErr; external name '_AllocContig';
+
+{
+ * HCreate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HCreate(vRefNum: SInt16; dirID: UInt32; const (*var*) fileName: Str255; creator: OSType; fileType: OSType): OSErr; external name '_HCreate';
+
+{
+ * DirCreate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DirCreate(vRefNum: SInt16; parentDirID: UInt32; const (*var*) directoryName: Str255; var createdDirID: UInt32): OSErr; external name '_DirCreate';
+
+{
+ * HDelete()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HDelete(vRefNum: SInt16; dirID: UInt32; const (*var*) fileName: Str255): OSErr; external name '_HDelete';
+
+{
+ * HGetFInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HGetFInfo(vRefNum: SInt16; dirID: UInt32; const (*var*) fileName: Str255; var fndrInfo: FInfo): OSErr; external name '_HGetFInfo';
+
+{
+ * HSetFInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HSetFInfo(vRefNum: SInt16; dirID: UInt32; const (*var*) fileName: Str255; const (*var*) fndrInfo: FInfo): OSErr; external name '_HSetFInfo';
+
+{
+ * HSetFLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HSetFLock(vRefNum: SInt16; dirID: UInt32; const (*var*) fileName: Str255): OSErr; external name '_HSetFLock';
+
+{
+ * HRstFLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRstFLock(vRefNum: SInt16; dirID: UInt32; const (*var*) fileName: Str255): OSErr; external name '_HRstFLock';
+
+{
+ * HRename()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRename(vRefNum: SInt16; dirID: UInt32; const (*var*) oldName: Str255; const (*var*) newName: Str255): OSErr; external name '_HRename';
+
+{
+ * CatMove()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CatMove(vRefNum: SInt16; dirID: UInt32; const (*var*) oldName: Str255; newDirID: UInt32; const (*var*) newName: Str255): OSErr; external name '_CatMove';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * OpenWD()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function OpenWD(vRefNum: SInt16; dirID: UInt32; procID: SInt32; var wdRefNum: SInt16): OSErr; external name '_OpenWD';
+
+{
+ * CloseWD()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CloseWD(wdRefNum: SInt16): OSErr; external name '_CloseWD';
+
+{
+ * GetWDInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetWDInfo(wdRefNum: SInt16; var vRefNum: SInt16; var dirID: UInt32; var procID: SInt32): OSErr; external name '_GetWDInfo';
+
+{ shared environment }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * PBHGetVolParmsSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHGetVolParmsSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHGetVolParmsSync';
+{
+ * PBHGetVolParmsAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHGetVolParmsAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHGetVolParmsAsync';
+{
+ * PBHGetLogInInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHGetLogInInfoSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHGetLogInInfoSync';
+{
+ * PBHGetLogInInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHGetLogInInfoAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHGetLogInInfoAsync';
+{
+ * PBHGetDirAccessSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHGetDirAccessSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHGetDirAccessSync';
+{
+ * PBHGetDirAccessAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHGetDirAccessAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHGetDirAccessAsync';
+{
+ * PBHSetDirAccessSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHSetDirAccessSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHSetDirAccessSync';
+{
+ * PBHSetDirAccessAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHSetDirAccessAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHSetDirAccessAsync';
+{
+ * PBHMapIDSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHMapIDSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHMapIDSync';
+{
+ * PBHMapIDAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHMapIDAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHMapIDAsync';
+{
+ * PBHMapNameSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHMapNameSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHMapNameSync';
+{
+ * PBHMapNameAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHMapNameAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHMapNameAsync';
+{
+ * PBHCopyFileSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHCopyFileSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHCopyFileSync';
+{
+ * PBHCopyFileAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHCopyFileAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHCopyFileAsync';
+{
+ * PBHMoveRenameSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHMoveRenameSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHMoveRenameSync';
+{
+ * PBHMoveRenameAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHMoveRenameAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHMoveRenameAsync';
+{
+ * PBHOpenDenySync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHOpenDenySync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHOpenDenySync';
+{
+ * PBHOpenDenyAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHOpenDenyAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHOpenDenyAsync';
+{
+ * PBHOpenRFDenySync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHOpenRFDenySync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHOpenRFDenySync';
+{
+ * PBHOpenRFDenyAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBHOpenRFDenyAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBHOpenRFDenyAsync';
+{
+ * PBGetXCatInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetXCatInfoSync(paramBlock: XCInfoPBPtr): OSErr; external name '_PBGetXCatInfoSync';
+{
+ * PBGetXCatInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetXCatInfoAsync(paramBlock: XCInfoPBPtr): OSErr; external name '_PBGetXCatInfoAsync';
+{
+ * PBExchangeFilesSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBExchangeFilesSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBExchangeFilesSync';
+{
+ * PBExchangeFilesAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBExchangeFilesAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBExchangeFilesAsync';
+{
+ * PBCreateFileIDRefSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBCreateFileIDRefSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBCreateFileIDRefSync';
+{
+ * PBCreateFileIDRefAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBCreateFileIDRefAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBCreateFileIDRefAsync';
+{
+ * PBResolveFileIDRefSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBResolveFileIDRefSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBResolveFileIDRefSync';
+{
+ * PBResolveFileIDRefAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBResolveFileIDRefAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBResolveFileIDRefAsync';
+{
+ * PBDeleteFileIDRefSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDeleteFileIDRefSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBDeleteFileIDRefSync';
+{
+ * PBDeleteFileIDRefAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDeleteFileIDRefAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBDeleteFileIDRefAsync';
+{
+ * PBGetForeignPrivsSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetForeignPrivsSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBGetForeignPrivsSync';
+{
+ * PBGetForeignPrivsAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetForeignPrivsAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBGetForeignPrivsAsync';
+{
+ * PBSetForeignPrivsSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBSetForeignPrivsSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBSetForeignPrivsSync';
+{
+ * PBSetForeignPrivsAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBSetForeignPrivsAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBSetForeignPrivsAsync';
+{ Desktop Manager }
+{
+ * PBDTGetPath()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTGetPath(paramBlock: DTPBPtr): OSErr; external name '_PBDTGetPath';
+{
+ * PBDTCloseDown()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTCloseDown(paramBlock: DTPBPtr): OSErr; external name '_PBDTCloseDown';
+{
+ * PBDTAddIconSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTAddIconSync(paramBlock: DTPBPtr): OSErr; external name '_PBDTAddIconSync';
+{
+ * PBDTAddIconAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTAddIconAsync(paramBlock: DTPBPtr): OSErr; external name '_PBDTAddIconAsync';
+{
+ * PBDTGetIconSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTGetIconSync(paramBlock: DTPBPtr): OSErr; external name '_PBDTGetIconSync';
+{
+ * PBDTGetIconAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTGetIconAsync(paramBlock: DTPBPtr): OSErr; external name '_PBDTGetIconAsync';
+{
+ * PBDTGetIconInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTGetIconInfoSync(paramBlock: DTPBPtr): OSErr; external name '_PBDTGetIconInfoSync';
+{
+ * PBDTGetIconInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTGetIconInfoAsync(paramBlock: DTPBPtr): OSErr; external name '_PBDTGetIconInfoAsync';
+{
+ * PBDTAddAPPLSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTAddAPPLSync(paramBlock: DTPBPtr): OSErr; external name '_PBDTAddAPPLSync';
+{
+ * PBDTAddAPPLAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTAddAPPLAsync(paramBlock: DTPBPtr): OSErr; external name '_PBDTAddAPPLAsync';
+{
+ * PBDTRemoveAPPLSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTRemoveAPPLSync(paramBlock: DTPBPtr): OSErr; external name '_PBDTRemoveAPPLSync';
+{
+ * PBDTRemoveAPPLAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTRemoveAPPLAsync(paramBlock: DTPBPtr): OSErr; external name '_PBDTRemoveAPPLAsync';
+{
+ * PBDTGetAPPLSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTGetAPPLSync(paramBlock: DTPBPtr): OSErr; external name '_PBDTGetAPPLSync';
+{
+ * PBDTGetAPPLAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTGetAPPLAsync(paramBlock: DTPBPtr): OSErr; external name '_PBDTGetAPPLAsync';
+{
+ * PBDTSetCommentSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTSetCommentSync(paramBlock: DTPBPtr): OSErr; external name '_PBDTSetCommentSync';
+{
+ * PBDTSetCommentAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTSetCommentAsync(paramBlock: DTPBPtr): OSErr; external name '_PBDTSetCommentAsync';
+{
+ * PBDTRemoveCommentSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTRemoveCommentSync(paramBlock: DTPBPtr): OSErr; external name '_PBDTRemoveCommentSync';
+{
+ * PBDTRemoveCommentAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTRemoveCommentAsync(paramBlock: DTPBPtr): OSErr; external name '_PBDTRemoveCommentAsync';
+{
+ * PBDTGetCommentSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTGetCommentSync(paramBlock: DTPBPtr): OSErr; external name '_PBDTGetCommentSync';
+{
+ * PBDTGetCommentAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTGetCommentAsync(paramBlock: DTPBPtr): OSErr; external name '_PBDTGetCommentAsync';
+{
+ * PBDTFlushSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTFlushSync(paramBlock: DTPBPtr): OSErr; external name '_PBDTFlushSync';
+{
+ * PBDTFlushAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTFlushAsync(paramBlock: DTPBPtr): OSErr; external name '_PBDTFlushAsync';
+{
+ * PBDTResetSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTResetSync(paramBlock: DTPBPtr): OSErr; external name '_PBDTResetSync';
+{
+ * PBDTResetAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTResetAsync(paramBlock: DTPBPtr): OSErr; external name '_PBDTResetAsync';
+{
+ * PBDTGetInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTGetInfoSync(paramBlock: DTPBPtr): OSErr; external name '_PBDTGetInfoSync';
+{
+ * PBDTGetInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTGetInfoAsync(paramBlock: DTPBPtr): OSErr; external name '_PBDTGetInfoAsync';
+{
+ * PBDTOpenInform()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTOpenInform(paramBlock: DTPBPtr): OSErr; external name '_PBDTOpenInform';
+{
+ * PBDTDeleteSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTDeleteSync(paramBlock: DTPBPtr): OSErr; external name '_PBDTDeleteSync';
+{
+ * PBDTDeleteAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDTDeleteAsync(paramBlock: DTPBPtr): OSErr; external name '_PBDTDeleteAsync';
+{ VolumeMount traps }
+{
+ * PBGetVolMountInfoSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetVolMountInfoSize(paramBlock: ParmBlkPtr): OSErr; external name '_PBGetVolMountInfoSize';
+{
+ * PBGetVolMountInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetVolMountInfo(paramBlock: ParmBlkPtr): OSErr; external name '_PBGetVolMountInfo';
+{
+ * PBVolumeMount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBVolumeMount(paramBlock: ParmBlkPtr): OSErr; external name '_PBVolumeMount';
+{ FSp traps }
+{
+ * FSMakeFSSpec()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSMakeFSSpec(vRefNum: SInt16; dirID: UInt32; const (*var*) fileName: Str255; var spec: FSSpec): OSErr; external name '_FSMakeFSSpec';
+{
+ * FSpOpenDF()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpOpenDF(const (*var*) spec: FSSpec; permission: SInt8; var refNum: SInt16): OSErr; external name '_FSpOpenDF';
+{
+ * FSpOpenRF()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpOpenRF(const (*var*) spec: FSSpec; permission: SInt8; var refNum: SInt16): OSErr; external name '_FSpOpenRF';
+{
+ * FSpCreate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpCreate(const (*var*) spec: FSSpec; creator: OSType; fileType: OSType; scriptTag: ScriptCode): OSErr; external name '_FSpCreate';
+{
+ * FSpDirCreate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpDirCreate(const (*var*) spec: FSSpec; scriptTag: ScriptCode; var createdDirID: UInt32): OSErr; external name '_FSpDirCreate';
+{
+ * FSpDelete()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpDelete(const (*var*) spec: FSSpec): OSErr; external name '_FSpDelete';
+{
+ * FSpGetFInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpGetFInfo(const (*var*) spec: FSSpec; var fndrInfo: FInfo): OSErr; external name '_FSpGetFInfo';
+{
+ * FSpSetFInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpSetFInfo(const (*var*) spec: FSSpec; const (*var*) fndrInfo: FInfo): OSErr; external name '_FSpSetFInfo';
+{
+ * FSpSetFLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpSetFLock(const (*var*) spec: FSSpec): OSErr; external name '_FSpSetFLock';
+{
+ * FSpRstFLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpRstFLock(const (*var*) spec: FSSpec): OSErr; external name '_FSpRstFLock';
+{
+ * FSpRename()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpRename(const (*var*) spec: FSSpec; const (*var*) newName: Str255): OSErr; external name '_FSpRename';
+{
+ * FSpCatMove()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpCatMove(const (*var*) source: FSSpec; const (*var*) dest: FSSpec): OSErr; external name '_FSpCatMove';
+{
+ * FSpExchangeFiles()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpExchangeFiles(const (*var*) source: FSSpec; const (*var*) dest: FSSpec): OSErr; external name '_FSpExchangeFiles';
+{
+ * PBShareSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBShareSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBShareSync';
+{
+ * PBShareAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBShareAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBShareAsync';
+{
+ * PBUnshareSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBUnshareSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBUnshareSync';
+{
+ * PBUnshareAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBUnshareAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBUnshareAsync';
+{
+ * PBGetUGEntrySync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetUGEntrySync(paramBlock: HParmBlkPtr): OSErr; external name '_PBGetUGEntrySync';
+{
+ * PBGetUGEntryAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetUGEntryAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBGetUGEntryAsync';
+{$ifc TARGET_CPU_68K}
+{
+ PBGetAltAccess and PBSetAltAccess are obsolete and will not be supported
+ on PowerPC. Equivalent functionality is provided by the routines
+ PBGetForeignPrivs and PBSetForeignPrivs.
+}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBGetAltAccessSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetAltAccessSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBGetAltAccessSync';
+{
+ * PBGetAltAccessAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetAltAccessAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBGetAltAccessAsync';
+{
+ * PBSetAltAccessSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetAltAccessSync(paramBlock: HParmBlkPtr): OSErr; external name '_PBSetAltAccessSync';
+{
+ * PBSetAltAccessAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetAltAccessAsync(paramBlock: HParmBlkPtr): OSErr; external name '_PBSetAltAccessAsync';
+{$endc} {CALL_NOT_IN_CARBON}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBGetAltAccess()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetAltAccess(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBGetAltAccess';
+
+{
+ * PBSetAltAccess()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetAltAccess(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBSetAltAccess';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {TARGET_CPU_68K}
+
+
+{
+ The PBxxx() routines are obsolete.
+
+ Use the PBxxxSync() or PBxxxAsync() version instead.
+}
+{$ifc OLDROUTINENAMES}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBGetVInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetVInfo(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBGetVInfo';
+
+{
+ * PBXGetVolInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBXGetVolInfo(paramBlock: XVolumeParamPtr; async: boolean): OSErr; external name '_PBXGetVolInfo';
+
+{
+ * PBGetVol()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetVol(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBGetVol';
+
+{
+ * PBSetVol()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetVol(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBSetVol';
+
+{
+ * PBFlushVol()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBFlushVol(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBFlushVol';
+
+{
+ * PBCreate()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBCreate(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBCreate';
+
+{
+ * PBDelete()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDelete(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBDelete';
+
+{
+ * PBOpenDF()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBOpenDF(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBOpenDF';
+
+{
+ * PBOpenRF()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBOpenRF(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBOpenRF';
+
+{
+ * PBRename()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBRename(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBRename';
+
+{
+ * PBGetFInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetFInfo(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBGetFInfo';
+
+{
+ * PBSetFInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetFInfo(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBSetFInfo';
+
+{
+ * PBSetFLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetFLock(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBSetFLock';
+
+{
+ * PBRstFLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBRstFLock(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBRstFLock';
+
+{
+ * PBSetFVers()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetFVers(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBSetFVers';
+
+{
+ * PBAllocate()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBAllocate(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBAllocate';
+
+{
+ * PBGetEOF()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetEOF(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBGetEOF';
+
+{
+ * PBSetEOF()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetEOF(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBSetEOF';
+
+{
+ * PBGetFPos()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetFPos(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBGetFPos';
+
+{
+ * PBSetFPos()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetFPos(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBSetFPos';
+
+{
+ * PBFlushFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBFlushFile(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBFlushFile';
+
+{
+ * PBCatSearch()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBCatSearch(paramBlock: CSParamPtr; async: boolean): OSErr; external name '_PBCatSearch';
+
+{
+ * PBOpenWD()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBOpenWD(paramBlock: WDPBPtr; async: boolean): OSErr; external name '_PBOpenWD';
+
+{
+ * PBCloseWD()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBCloseWD(paramBlock: WDPBPtr; async: boolean): OSErr; external name '_PBCloseWD';
+
+{
+ * PBHSetVol()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHSetVol(paramBlock: WDPBPtr; async: boolean): OSErr; external name '_PBHSetVol';
+
+{
+ * PBHGetVol()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHGetVol(paramBlock: WDPBPtr; async: boolean): OSErr; external name '_PBHGetVol';
+
+{
+ * PBCatMove()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBCatMove(paramBlock: CMovePBPtr; async: boolean): OSErr; external name '_PBCatMove';
+
+{
+ * PBDirCreate()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDirCreate(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBDirCreate';
+
+{
+ * PBGetWDInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetWDInfo(paramBlock: WDPBPtr; async: boolean): OSErr; external name '_PBGetWDInfo';
+
+{
+ * PBGetFCBInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetFCBInfo(paramBlock: FCBPBPtr; async: boolean): OSErr; external name '_PBGetFCBInfo';
+
+{
+ * PBGetCatInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetCatInfo(paramBlock: CInfoPBPtr; async: boolean): OSErr; external name '_PBGetCatInfo';
+
+{
+ * PBSetCatInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetCatInfo(paramBlock: CInfoPBPtr; async: boolean): OSErr; external name '_PBSetCatInfo';
+
+{
+ * PBAllocContig()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBAllocContig(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBAllocContig';
+
+{
+ * PBLockRange()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBLockRange(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBLockRange';
+
+{
+ * PBUnlockRange()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBUnlockRange(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBUnlockRange';
+
+{
+ * PBSetVInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetVInfo(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBSetVInfo';
+
+{
+ * PBHGetVInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHGetVInfo(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHGetVInfo';
+
+{
+ * PBHOpen()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHOpen(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHOpen';
+
+{
+ * PBHOpenRF()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHOpenRF(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHOpenRF';
+
+{
+ * PBHOpenDF()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHOpenDF(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHOpenDF';
+
+{
+ * PBHCreate()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHCreate(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHCreate';
+
+{
+ * PBHDelete()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHDelete(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHDelete';
+
+{
+ * PBHRename()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHRename(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHRename';
+
+{
+ * PBHRstFLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHRstFLock(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHRstFLock';
+
+{
+ * PBHSetFLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHSetFLock(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHSetFLock';
+
+{
+ * PBHGetFInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHGetFInfo(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHGetFInfo';
+
+{
+ * PBHSetFInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHSetFInfo(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHSetFInfo';
+
+{
+ * PBMakeFSSpec()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBMakeFSSpec(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBMakeFSSpec';
+
+{
+ * PBHGetVolParms()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHGetVolParms(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHGetVolParms';
+
+{
+ * PBHGetLogInInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHGetLogInInfo(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHGetLogInInfo';
+
+{
+ * PBHGetDirAccess()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHGetDirAccess(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHGetDirAccess';
+
+{
+ * PBHSetDirAccess()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHSetDirAccess(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHSetDirAccess';
+
+{
+ * PBHMapID()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHMapID(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHMapID';
+
+{
+ * PBHMapName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHMapName(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHMapName';
+
+{
+ * PBHCopyFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHCopyFile(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHCopyFile';
+
+{
+ * PBHMoveRename()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHMoveRename(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHMoveRename';
+
+{
+ * PBHOpenDeny()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHOpenDeny(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHOpenDeny';
+
+{
+ * PBHOpenRFDeny()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBHOpenRFDeny(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBHOpenRFDeny';
+
+{
+ * PBExchangeFiles()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBExchangeFiles(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBExchangeFiles';
+
+{
+ * PBCreateFileIDRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBCreateFileIDRef(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBCreateFileIDRef';
+
+{
+ * PBResolveFileIDRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBResolveFileIDRef(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBResolveFileIDRef';
+
+{
+ * PBDeleteFileIDRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDeleteFileIDRef(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBDeleteFileIDRef';
+
+{
+ * PBGetForeignPrivs()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBGetForeignPrivs(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBGetForeignPrivs';
+
+{
+ * PBSetForeignPrivs()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBSetForeignPrivs(paramBlock: HParmBlkPtr; async: boolean): OSErr; external name '_PBSetForeignPrivs';
+
+{
+ * PBDTAddIcon()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDTAddIcon(paramBlock: DTPBPtr; async: boolean): OSErr; external name '_PBDTAddIcon';
+
+{
+ * PBDTGetIcon()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDTGetIcon(paramBlock: DTPBPtr; async: boolean): OSErr; external name '_PBDTGetIcon';
+
+{
+ * PBDTGetIconInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDTGetIconInfo(paramBlock: DTPBPtr; async: boolean): OSErr; external name '_PBDTGetIconInfo';
+
+{
+ * PBDTAddAPPL()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDTAddAPPL(paramBlock: DTPBPtr; async: boolean): OSErr; external name '_PBDTAddAPPL';
+
+{
+ * PBDTRemoveAPPL()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDTRemoveAPPL(paramBlock: DTPBPtr; async: boolean): OSErr; external name '_PBDTRemoveAPPL';
+
+{
+ * PBDTGetAPPL()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDTGetAPPL(paramBlock: DTPBPtr; async: boolean): OSErr; external name '_PBDTGetAPPL';
+
+{
+ * PBDTSetComment()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDTSetComment(paramBlock: DTPBPtr; async: boolean): OSErr; external name '_PBDTSetComment';
+
+{
+ * PBDTRemoveComment()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDTRemoveComment(paramBlock: DTPBPtr; async: boolean): OSErr; external name '_PBDTRemoveComment';
+
+{
+ * PBDTGetComment()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDTGetComment(paramBlock: DTPBPtr; async: boolean): OSErr; external name '_PBDTGetComment';
+
+{
+ * PBDTFlush()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDTFlush(paramBlock: DTPBPtr; async: boolean): OSErr; external name '_PBDTFlush';
+
+{
+ * PBDTReset()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDTReset(paramBlock: DTPBPtr; async: boolean): OSErr; external name '_PBDTReset';
+
+{
+ * PBDTGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDTGetInfo(paramBlock: DTPBPtr; async: boolean): OSErr; external name '_PBDTGetInfo';
+
+{
+ * PBDTDelete()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBDTDelete(paramBlock: DTPBPtr; async: boolean): OSErr; external name '_PBDTDelete';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {OLDROUTINENAMES}
+
+
+type
+ FSVolumeRefNum = SInt16;
+ FSVolumeRefNumPtr = ^FSVolumeRefNum; { when a VAR xx: FSVolumeRefNum parameter can be nil, it is changed to xx: FSVolumeRefNumPtr }
+
+const
+ kFSInvalidVolumeRefNum = 0;
+
+
+type
+ FSRefPtr = ^FSRef;
+ FSRef = record
+ hidden: packed array [0..79] of UInt8; { private to File Manager; ¥¥ need symbolic constant }
+ end;
+
+
+ {
+ * FSPermissionInfo
+ *
+ * Discussion:
+ * This structure is used when kFSCatInfoPermissions is passed to
+ * the HFSPlus API. On return from GetCatalogInfo and
+ * GetCatalogInfoBulk, the userID, groupID, and mode fields are
+ * returned. When passed to SetCatalogInfo, only the mode field is
+ * set. See chmod(2) for details about the mode field. This is
+ * supported on Mac OS X only.
+ }
+ FSPermissionInfoPtr = ^FSPermissionInfo;
+ FSPermissionInfo = record
+ userID: UInt32;
+ groupID: UInt32;
+ reserved1: SInt8;
+ userAccess: SInt8;
+ mode: UInt16;
+ reserved2: UInt32;
+ end;
+
+ { CatalogInfoBitmap describes which fields of the CatalogInfo you wish to get or set. }
+ FSCatalogInfoBitmap = UInt32;
+
+const
+ kFSCatInfoNone = $00000000;
+ kFSCatInfoTextEncoding = $00000001;
+ kFSCatInfoNodeFlags = $00000002; { Locked (bit 0) and directory (bit 4) only }
+ kFSCatInfoVolume = $00000004;
+ kFSCatInfoParentDirID = $00000008;
+ kFSCatInfoNodeID = $00000010;
+ kFSCatInfoCreateDate = $00000020;
+ kFSCatInfoContentMod = $00000040;
+ kFSCatInfoAttrMod = $00000080;
+ kFSCatInfoAccessDate = $00000100;
+ kFSCatInfoBackupDate = $00000200;
+ kFSCatInfoPermissions = $00000400; { Should this be finer granularity? }
+ kFSCatInfoFinderInfo = $00000800;
+ kFSCatInfoFinderXInfo = $00001000;
+ kFSCatInfoValence = $00002000; { Folders only, zero for files }
+ kFSCatInfoDataSizes = $00004000; { Data fork logical and physical size }
+ kFSCatInfoRsrcSizes = $00008000; { Resource fork logical and physical size }
+ kFSCatInfoSharingFlags = $00010000; { sharingFlags: kioFlAttribMountedBit, kioFlAttribSharePointBit }
+ kFSCatInfoUserPrivs = $00020000; { userPrivileges }
+ kFSCatInfoUserAccess = $00080000; { (OS X only) }
+ kFSCatInfoAllDates = $000003E0;
+ kFSCatInfoGettableInfo = $0003FFFF;
+ kFSCatInfoSettableInfo = $00001FE3; { flags, dates, permissions, Finder info, text encoding }
+ kFSCatInfoReserved = $FFFC0000; { bits that are currently reserved }
+
+ { Constants for nodeFlags field of FSCatalogInfo }
+ kFSNodeLockedBit = 0; { Set if file or directory is locked }
+ kFSNodeLockedMask = $0001;
+ kFSNodeResOpenBit = 2; { Set if the resource fork is open }
+ kFSNodeResOpenMask = $0004;
+ kFSNodeDataOpenBit = 3; { Set if the data fork is open }
+ kFSNodeDataOpenMask = $0008;
+ kFSNodeIsDirectoryBit = 4; { Set if the object is a directory }
+ kFSNodeIsDirectoryMask = $0010;
+ kFSNodeCopyProtectBit = 6;
+ kFSNodeCopyProtectMask = $0040;
+ kFSNodeForkOpenBit = 7; { Set if the file or directory has any open fork }
+ kFSNodeForkOpenMask = $0080;
+
+ { Constants for sharingFlags field of FSCatalogInfo }
+ kFSNodeInSharedBit = 2; { Set if a directory is within a share point }
+ kFSNodeInSharedMask = $0004;
+ kFSNodeIsMountedBit = 3; { Set if a directory is a share point currently mounted by some user }
+ kFSNodeIsMountedMask = $0008;
+ kFSNodeIsSharePointBit = 5; { Set if a directory is a share point (exported volume) }
+ kFSNodeIsSharePointMask = $0020;
+
+
+type
+ FSCatalogInfoPtr = ^FSCatalogInfo;
+ FSCatalogInfo = record
+ nodeFlags: UInt16; { node flags }
+ volume: FSVolumeRefNum; { object's volume ref }
+ parentDirID: UInt32; { parent directory's ID }
+ nodeID: UInt32; { file/directory ID }
+ sharingFlags: SInt8; { kioFlAttribMountedBit and kioFlAttribSharePointBit }
+ userPrivileges: SInt8; { user's effective AFP privileges (same as ioACUser) }
+ reserved1: SInt8;
+ reserved2: SInt8;
+ createDate: UTCDateTime; { date and time of creation }
+ contentModDate: UTCDateTime; { date and time of last fork modification }
+ attributeModDate: UTCDateTime; { date and time of last attribute modification }
+ accessDate: UTCDateTime; { date and time of last access (for Mac OS X) }
+ backupDate: UTCDateTime; { date and time of last backup }
+ permissions: array [0..3] of UInt32; { permissions (for Mac OS X) }
+ finderInfo: packed array [0..15] of UInt8; { Finder information part 1 }
+ extFinderInfo: packed array [0..15] of UInt8; { Finder information part 2 }
+ dataLogicalSize: UInt64; { files only }
+ dataPhysicalSize: UInt64; { files only }
+ rsrcLogicalSize: UInt64; { files only }
+ rsrcPhysicalSize: UInt64; { files only }
+ valence: UInt32; { folders only }
+ textEncodingHint: TextEncoding;
+ end;
+
+ FSRefParamPtr = ^FSRefParam;
+ FSRefParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: ConstStringPtr; { ptr to Vol:FileName string }
+ ioVRefNum: SInt16; { volume refnum (DrvNum for Eject and MountVol) }
+ reserved1: SInt16; { was ioRefNum }
+ reserved2: SInt8; { was ioVersNum }
+ reserved3: SInt8; { was ioPermssn }
+ ref: FSRefPtr; { Input ref; the target of the call }
+ whichInfo: FSCatalogInfoBitmap;
+ catInfo: FSCatalogInfoPtr;
+ nameLength: UniCharCount; { input name length for create/rename }
+ name: UniCharPtr; { input name for create/rename }
+ ioDirID: UInt32;
+ spec: FSSpecPtr;
+ parentRef: FSRefPtr; { ref of directory to move another ref to }
+ newRef: FSRefPtr; { Output ref }
+ textEncodingHint: TextEncoding; { for Rename, MakeFSRefUnicode }
+ outName: HFSUniStr255Ptr; { Output name for GetCatalogInfo }
+ end;
+
+ FSIterator = ^SInt32; { an opaque 32-bit type }
+ FSIteratorPtr = ^FSIterator; { when a var xx:FSIterator parameter can be nil, it is changed to xx: FSIteratorPtr }
+
+const
+ kFSIterateFlat = 0; { Immediate children of container only }
+ kFSIterateSubtree = 1; { Entire subtree rooted at container }
+ kFSIterateDelete = 2;
+ kFSIterateReserved = $FFFFFFFC;
+
+
+type
+ FSIteratorFlags = OptionBits;
+
+const
+ { CatalogSearch constants }
+ fsSBNodeID = $00008000; { search by range of nodeID }
+ fsSBAttributeModDate = $00010000; { search by range of attributeModDate }
+ fsSBAccessDate = $00020000; { search by range of accessDate }
+ fsSBPermissions = $00040000; { search by value/mask of permissions }
+ fsSBNodeIDBit = 15;
+ fsSBAttributeModDateBit = 16;
+ fsSBAccessDateBit = 17;
+ fsSBPermissionsBit = 18;
+
+
+type
+ FSSearchParamsPtr = ^FSSearchParams;
+ FSSearchParams = record
+ searchTime: Duration; { a Time Manager duration }
+ searchBits: OptionBits; { which fields to search on }
+ searchNameLength: UniCharCount;
+ searchName: UniCharPtr;
+ searchInfo1: FSCatalogInfoPtr; { values and lower bounds }
+ searchInfo2: FSCatalogInfoPtr; { masks and upper bounds }
+ end;
+
+ FSCatalogBulkParamPtr = ^FSCatalogBulkParam;
+ FSCatalogBulkParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ containerChanged: boolean; { true if container changed since last iteration }
+ reserved: SInt8; { make following fields 4-byte aligned }
+ iteratorFlags: FSIteratorFlags;
+ iterator: FSIterator;
+ container: FSRefPtr; { directory/volume to iterate }
+ maximumItems: ItemCount;
+ actualItems: ItemCount;
+ whichInfo: FSCatalogInfoBitmap;
+ catalogInfo: FSCatalogInfoPtr; { returns an array }
+ refs: FSRefPtr; { returns an array }
+ specs: FSSpecPtr; { returns an array }
+ names: HFSUniStr255Ptr; { returns an array }
+ searchParams: FSSearchParamsPtr;
+ end;
+
+ FSAllocationFlags = UInt16;
+
+const
+ kFSAllocDefaultFlags = $0000; { as much as possible, not contiguous }
+ kFSAllocAllOrNothingMask = $0001; { allocate all of the space, or nothing }
+ kFSAllocContiguousMask = $0002; { new space must be one contiguous piece }
+ kFSAllocNoRoundUpMask = $0004; { don't round up allocation to clump size }
+ kFSAllocReservedMask = $FFF8; { these bits are reserved and must not be set }
+
+
+type
+ FSForkIOParamPtr = ^FSForkIOParam;
+ FSForkIOParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ reserved1: Ptr; { was ioNamePtr }
+ reserved2: SInt16; { was ioVRefNum }
+ forkRefNum: SInt16; { same as ioRefNum }
+ reserved3: SInt8; { was ioVersNum }
+ permissions: SInt8; { desired access to the fork }
+ ref: FSRefPtr; { which object to open }
+ buffer: Ptr; { data buffer Ptr }
+ requestCount: UInt32; { requested byte count }
+ actualCount: UInt32; { actual byte count completed }
+ positionMode: UInt16; { initial file positioning }
+ positionOffset: SInt64; { file position offset }
+ allocationFlags: FSAllocationFlags;
+ allocationAmount: UInt64;
+ forkNameLength: UniCharCount; { input; length of fork name }
+ forkName: UniCharPtr; { input; name of fork }
+ forkIterator: CatPositionRec;
+ outForkName: HFSUniStr255Ptr; { output; name of fork }
+ end;
+
+ FSForkInfoPtr = ^FSForkInfo;
+ FSForkInfo = record
+ flags: SInt8; { copy of FCB flags }
+ permissions: SInt8;
+ volume: FSVolumeRefNum;
+ reserved2: UInt32;
+ nodeID: UInt32; { file or directory ID }
+ forkID: UInt32; { fork ID }
+ currentPosition: UInt64;
+ logicalEOF: UInt64;
+ physicalEOF: UInt64;
+ process: UInt64; { should be ProcessSerialNumber }
+ end;
+
+ FSForkCBInfoParamPtr = ^FSForkCBInfoParam;
+ FSForkCBInfoParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ desiredRefNum: SInt16; { 0 to iterate, non-0 for specific refnum }
+ volumeRefNum: SInt16; { volume to match, or 0 for all volumes }
+ iterator: SInt16; { 0 to start iteration }
+ actualRefNum: SInt16; { actual refnum found }
+ ref: FSRefPtr;
+ forkInfo: FSForkInfoPtr;
+ forkName: HFSUniStr255Ptr;
+ end;
+
+ FSVolumeInfoBitmap = UInt32;
+
+const
+ kFSVolInfoNone = $0000;
+ kFSVolInfoCreateDate = $0001;
+ kFSVolInfoModDate = $0002;
+ kFSVolInfoBackupDate = $0004;
+ kFSVolInfoCheckedDate = $0008;
+ kFSVolInfoFileCount = $0010;
+ kFSVolInfoDirCount = $0020;
+ kFSVolInfoSizes = $0040; { totalBytes and freeBytes }
+ kFSVolInfoBlocks = $0080; { blockSize, totalBlocks, freeBlocks }
+ kFSVolInfoNextAlloc = $0100;
+ kFSVolInfoRsrcClump = $0200;
+ kFSVolInfoDataClump = $0400;
+ kFSVolInfoNextID = $0800;
+ kFSVolInfoFinderInfo = $1000;
+ kFSVolInfoFlags = $2000;
+ kFSVolInfoFSInfo = $4000; { filesystemID, signature }
+ kFSVolInfoDriveInfo = $8000; { driveNumber, driverRefNum }
+ kFSVolInfoGettableInfo = $FFFF; { This seems like it is here just for completeness }
+ kFSVolInfoSettableInfo = $3004; { backup date, Finder info, flags }
+
+ { FSVolumeInfo.flags bits. These are the same as for ioVAtrb, but with nicer names. }
+ kFSVolFlagDefaultVolumeBit = 5; { Set if the volume is the default volume }
+ kFSVolFlagDefaultVolumeMask = $0020;
+ kFSVolFlagFilesOpenBit = 6; { Set if there are open files or iterators }
+ kFSVolFlagFilesOpenMask = $0040;
+ kFSVolFlagHardwareLockedBit = 7; { Set if volume is locked by a hardware setting }
+ kFSVolFlagHardwareLockedMask = $0080;
+ kFSVolFlagSoftwareLockedBit = 15; { Set if volume is locked by software }
+ kFSVolFlagSoftwareLockedMask = $8000;
+
+
+type
+ FSVolumeInfoPtr = ^FSVolumeInfo;
+ FSVolumeInfo = record
+ { Dates -- zero means "never" or "unknown" }
+ createDate: UTCDateTime;
+ modifyDate: UTCDateTime;
+ backupDate: UTCDateTime;
+ checkedDate: UTCDateTime;
+ { File/Folder counts -- return zero if unknown }
+ fileCount: UInt32; { total files on volume }
+ folderCount: UInt32; { total folders on volume }
+ { Note: no root directory counts }
+ totalBytes: UInt64; { total number of bytes on volume }
+ freeBytes: UInt64; { number of free bytes on volume }
+ { HFS and HFS Plus specific. Set fields to zero if not appropriate }
+ blockSize: UInt32; { size (in bytes) of allocation blocks }
+ totalBlocks: UInt32; { number of allocation blocks in volume }
+ freeBlocks: UInt32; { number of unused allocation blocks }
+ nextAllocation: UInt32; { start of next allocation search }
+ rsrcClumpSize: UInt32; { default resource fork clump size }
+ dataClumpSize: UInt32; { default data fork clump size }
+ nextCatalogID: UInt32; { next unused catalog node ID ¥¥¥ OYG ¥¥¥ need to make HFSVolumes.h work Should be HFSCatalogNodeID }
+ finderInfo: packed array [0..31] of UInt8; { information used by Finder }
+ { Identifying information }
+ flags: UInt16; { ioVAtrb }
+ filesystemID: UInt16; { ioVFSID }
+ signature: UInt16; { ioVSigWord, unique within an FSID }
+ driveNumber: UInt16; { ioVDrvInfo }
+ driverRefNum: SInt16; { ioVDRefNum }
+ end;
+
+ FSVolumeInfoParamPtr = ^FSVolumeInfoParam;
+ FSVolumeInfoParam = record
+ qLink: QElemPtr; { queue link in header }
+ qType: SInt16; { type byte for safety check }
+ ioTrap: SInt16; { FS: the Trap }
+ ioCmdAddr: Ptr; { FS: address to dispatch to }
+ ioCompletion: IOCompletionUPP; { completion routine addr (0 for synch calls) }
+ ioResult: OSErr; { result code }
+ ioNamePtr: StringPtr; { unused }
+ ioVRefNum: FSVolumeRefNum; { volume refnum }
+ volumeIndex: UInt32; { index, or 0 to use ioVRefNum }
+ whichInfo: FSVolumeInfoBitmap; { which volumeInfo fields to get/set }
+ volumeInfo: FSVolumeInfoPtr; { information about the volume }
+ volumeName: HFSUniStr255Ptr; { output; pointer to volume name }
+ ref: FSRefPtr; { volume's FSRef }
+ end;
+
+ {
+ MakeFSRef
+ Create an FSRef for an existing object specified by a combination
+ of volume refnum, parent directory, and pathname.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ioNamePtr A pointer to a pathname
+ -> ioVRefNum A volume specification
+ -> ioDirID A directory ID
+ <- newRef A pointer to an FSRef
+ }
+ {
+ * FSpMakeFSRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpMakeFSRef(const (*var*) source: FSSpec; var newRef: FSRef): OSErr; external name '_FSpMakeFSRef';
+{
+ * PBMakeFSRefSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBMakeFSRefSync(var paramBlock: FSRefParam): OSErr; external name '_PBMakeFSRefSync';
+{
+ * PBMakeFSRefAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBMakeFSRefAsync(var paramBlock: FSRefParam); external name '_PBMakeFSRefAsync';
+{
+ MakeFSRefUnicode
+ Create an FSRef for an existing object specified by
+ Parent FSRef and Unicode name.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref A pointer to the parent directory FSRef
+ -> name A pointer to Unicde name
+ -> nameLength The length of the Unicode Name
+ -> textEncodingHint A suggested text encoding to use for the name
+ <- newRef A pointer to an FSRef
+}
+{
+ * FSMakeFSRefUnicode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSMakeFSRefUnicode(const (*var*) parentRef: FSRef; nameLength: UniCharCount; name: UniCharPtr; textEncodingHint: TextEncoding; var newRef: FSRef): OSErr; external name '_FSMakeFSRefUnicode';
+{
+ * PBMakeFSRefUnicodeSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBMakeFSRefUnicodeSync(var paramBlock: FSRefParam): OSErr; external name '_PBMakeFSRefUnicodeSync';
+{
+ * PBMakeFSRefUnicodeAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBMakeFSRefUnicodeAsync(var paramBlock: FSRefParam); external name '_PBMakeFSRefUnicodeAsync';
+{
+ CompareFSRefs
+ Test whether two FSRefs refer to the same file or directory.
+ If they do, noErr is returned. Otherwise, an appropriate error
+ (such as errFSRefsDifferent) is returned.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref A pointer to the first FSRef
+ -> parentRef A pointer to the second FSRef
+}
+{
+ * FSCompareFSRefs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSCompareFSRefs(const (*var*) ref1: FSRef; const (*var*) ref2: FSRef): OSErr; external name '_FSCompareFSRefs';
+{
+ * PBCompareFSRefsSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBCompareFSRefsSync(var paramBlock: FSRefParam): OSErr; external name '_PBCompareFSRefsSync';
+{
+ * PBCompareFSRefsAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBCompareFSRefsAsync(var paramBlock: FSRefParam); external name '_PBCompareFSRefsAsync';
+{
+ CreateFileUnicode
+ Creates a new file. The input filename is in Unicode.
+ You can optionally set catalog info for the file.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The directory where the file is to be created
+ -> whichInfo Which catalog info fields to set
+ -> catInfo The values for catalog info fields to set; may be NULL
+ -> nameLength Number of Unicode characters in the file's name
+ -> name A pointer to the Unicode name
+ <- spec A pointer to the FSSpec for the new directory; may be NULL
+ <- newRef A pointer to the FSRef for the new file; may be NULL
+}
+{
+ * FSCreateFileUnicode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSCreateFileUnicode(const (*var*) parentRef: FSRef; nameLength: UniCharCount; name: UniCharPtr; whichInfo: FSCatalogInfoBitmap; catalogInfo: {Const}FSCatalogInfoPtr; newRef: FSRefPtr; newSpec: FSSpecPtr): OSErr; external name '_FSCreateFileUnicode';
+{
+ * PBCreateFileUnicodeSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBCreateFileUnicodeSync(var paramBlock: FSRefParam): OSErr; external name '_PBCreateFileUnicodeSync';
+{
+ * PBCreateFileUnicodeAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBCreateFileUnicodeAsync(var paramBlock: FSRefParam); external name '_PBCreateFileUnicodeAsync';
+{
+ CreateDirectoryUnicode
+ Creates a new directory. The input directory name is in Unicode.
+ You can optionally set catalog info for the directory.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The parent directory where the directory is to be created
+ -> whichInfo Which catalog info fields to set
+ -> catInfo The values for catalog info fields to set; may be NULL
+ -> nameLength Number of Unicode characters in the directory's name
+ -> name A pointer to the Unicode name
+ <- ioDirID The DirID of the new directory
+ <- spec A pointer to the FSSpec for the new directory; may be NULL
+ <- newRef A pointer to the FSRef for the new directory; may be NULL
+}
+{
+ * FSCreateDirectoryUnicode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSCreateDirectoryUnicode(const (*var*) parentRef: FSRef; nameLength: UniCharCount; name: UniCharPtr; whichInfo: FSCatalogInfoBitmap; catalogInfo: {Const}FSCatalogInfoPtr; newRef: FSRefPtr; newSpec: FSSpecPtr; newDirID: UInt32Ptr): OSErr; external name '_FSCreateDirectoryUnicode';
+{
+ * PBCreateDirectoryUnicodeSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBCreateDirectoryUnicodeSync(var paramBlock: FSRefParam): OSErr; external name '_PBCreateDirectoryUnicodeSync';
+{
+ * PBCreateDirectoryUnicodeAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBCreateDirectoryUnicodeAsync(var paramBlock: FSRefParam); external name '_PBCreateDirectoryUnicodeAsync';
+{
+ DeleteObject
+ Deletes an existing file or directory.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory to be deleted
+}
+{
+ * FSDeleteObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSDeleteObject(const (*var*) ref: FSRef): OSErr; external name '_FSDeleteObject';
+{
+ * PBDeleteObjectSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDeleteObjectSync(var paramBlock: FSRefParam): OSErr; external name '_PBDeleteObjectSync';
+{
+ * PBDeleteObjectAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBDeleteObjectAsync(var paramBlock: FSRefParam); external name '_PBDeleteObjectAsync';
+{
+ MoveObject
+ Move an existing file or directory into a different directory.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory to be moved
+ -> parentRef The file or directory will be moved into this directory
+ <- newRef A new FSRef for the file or directory in its new location;
+ optional, may be NULL
+ NOTE: Moving an object may change its FSRef. If you want to continue to
+ refer to the object, you should pass a non-NULL pointer in newRef and use
+ that returned FSRef to access the object after the move. The FSRef passed
+ in "ref" may or may not be usable to access the object after it is moved.
+ "newRef" may point to the same storage as "parentRef" or "ref".
+}
+{
+ * FSMoveObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSMoveObject(const (*var*) ref: FSRef; const (*var*) destDirectory: FSRef; newRef: FSRefPtr): OSErr; external name '_FSMoveObject';
+{
+ * PBMoveObjectSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBMoveObjectSync(var paramBlock: FSRefParam): OSErr; external name '_PBMoveObjectSync';
+{
+ * PBMoveObjectAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBMoveObjectAsync(var paramBlock: FSRefParam); external name '_PBMoveObjectAsync';
+{
+ ExchangeObjects
+ swap the contents of two files.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The first file
+ -> parentRef The second file
+}
+{
+ * FSExchangeObjects()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSExchangeObjects(const (*var*) ref: FSRef; const (*var*) destRef: FSRef): OSErr; external name '_FSExchangeObjects';
+{
+ * PBExchangeObjectsSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBExchangeObjectsSync(var paramBlock: FSRefParam): OSErr; external name '_PBExchangeObjectsSync';
+{
+ * PBExchangeObjectsAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBExchangeObjectsAsync(var paramBlock: FSRefParam); external name '_PBExchangeObjectsAsync';
+{
+ RenameUnicode
+ Change the name of an existing file or directory. The new name is in
+ Unicode.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory to be moved
+ -> nameLength Number of Unicode characters in the new name
+ -> name A pointer to the new Unicode name
+ -> textEncodingHint A suggested text encoding to use for the name
+ <- newRef A new FSRef for the file or directory; may be NULL
+ NOTE: Renaming an object may change its FSRef. If you want to continue to
+ refer to the object, you should pass a non-NULL pointer in newRef and use
+ that returned FSRef to access the object after the rename. The FSRef passed
+ in "ref" may or may not be usable to access the object after it is renamed.
+ "newRef" may point to the same storage as "ref".
+}
+{
+ * FSRenameUnicode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSRenameUnicode(const (*var*) ref: FSRef; nameLength: UniCharCount; name: UniCharPtr; textEncodingHint: TextEncoding; newRef: FSRefPtr): OSErr; external name '_FSRenameUnicode';
+{
+ * PBRenameUnicodeSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBRenameUnicodeSync(var paramBlock: FSRefParam): OSErr; external name '_PBRenameUnicodeSync';
+{
+ * PBRenameUnicodeAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBRenameUnicodeAsync(var paramBlock: FSRefParam); external name '_PBRenameUnicodeAsync';
+{
+ GetCatalogInfo
+ Returns various information about a given file or directory.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory whose information is to be returned
+ -> whichInfo Which catalog info fields to get
+ <- catInfo The returned values of catalog info fields; may be NULL
+ <- spec A pointer to the FSSpec for the object; may be NULL
+ <- parentRef A pointer to the FSRef for the object's parent directory; may be NULL
+ <- outName The Unicode name is returned here. This pointer may be NULL.
+ Note: All of the outputs are optional; if you don't want that particular output, just
+ set its pointer to NULL. This is the call to use to map from an FSRef to an FSSpec.
+}
+{
+ * FSGetCatalogInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSGetCatalogInfo(const (*var*) ref: FSRef; whichInfo: FSCatalogInfoBitmap; catalogInfo: FSCatalogInfoPtr; outName: HFSUniStr255Ptr; fsSpec: FSSpecPtr; parentRef: FSRefPtr): OSErr; external name '_FSGetCatalogInfo';
+{
+ * PBGetCatalogInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetCatalogInfoSync(var paramBlock: FSRefParam): OSErr; external name '_PBGetCatalogInfoSync';
+{
+ * PBGetCatalogInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBGetCatalogInfoAsync(var paramBlock: FSRefParam); external name '_PBGetCatalogInfoAsync';
+{
+ SetCatalogInfo
+ Set catalog information about a given file or directory.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory whose information is to be changed
+ -> whichInfo Which catalog info fields to set
+ -> catInfo The new values of catalog info fields
+ Note: Only some of the catalog info fields may be set. The settable fields
+ are given by the constant kFSCatInfoSettableInfo; no other bits may be set in
+ whichInfo.
+}
+{
+ * FSSetCatalogInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSSetCatalogInfo(const (*var*) ref: FSRef; whichInfo: FSCatalogInfoBitmap; const (*var*) catalogInfo: FSCatalogInfo): OSErr; external name '_FSSetCatalogInfo';
+{
+ * PBSetCatalogInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBSetCatalogInfoSync(var paramBlock: FSRefParam): OSErr; external name '_PBSetCatalogInfoSync';
+{
+ * PBSetCatalogInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBSetCatalogInfoAsync(var paramBlock: FSRefParam); external name '_PBSetCatalogInfoAsync';
+{
+ OpenIterator
+ Creates an FSIterator to iterate over a directory or subtree. The
+ iterator can then be passed to GetCatalogInfoBulk or CatalogSearch.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ <- iterator The returned FSIterator
+ -> iteratorFlags Controls whether the iterator iterates over subtrees
+ or just the immediate children of the container.
+ -> container An FSRef for the directory to iterate (or root of
+ the subtree to iterate).
+}
+{
+ * FSOpenIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSOpenIterator(const (*var*) container: FSRef; iteratorFlags: FSIteratorFlags; var iterator: FSIterator): OSErr; external name '_FSOpenIterator';
+{
+ * PBOpenIteratorSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBOpenIteratorSync(var paramBlock: FSCatalogBulkParam): OSErr; external name '_PBOpenIteratorSync';
+{
+ * PBOpenIteratorAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBOpenIteratorAsync(var paramBlock: FSCatalogBulkParam); external name '_PBOpenIteratorAsync';
+{
+ CloseIterator
+ Invalidates and disposes an FSIterator.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> iterator The returned FSIterator
+}
+{
+ * FSCloseIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSCloseIterator(iterator: FSIterator): OSErr; external name '_FSCloseIterator';
+{
+ * PBCloseIteratorSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBCloseIteratorSync(var paramBlock: FSCatalogBulkParam): OSErr; external name '_PBCloseIteratorSync';
+{
+ * PBCloseIteratorAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBCloseIteratorAsync(var paramBlock: FSCatalogBulkParam); external name '_PBCloseIteratorAsync';
+{
+ GetCatalogInfoBulk
+ Iterates over catalog objects and returns information about them.
+ For now, iterator must have been created with kFSIterateFlat option.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> iterator The iterator
+ -> maximumItems The maximum number of items to return
+ <- actualItems The actual number of items returned
+ <- containerChanged Set to true if the container's contents changed
+ -> whichInfo The catalog information fields to return for each item
+ <- catalogInfo An array of catalog information; one for each returned item
+ <- refs An array of FSRefs; one for each returned item
+ <- specs An array of FSSpecs; one for each returned item
+ <- names An array of filenames; one for each returned item
+ Note: The catalogInfo, refs, specs, names, and containerChanged are all optional outputs;
+ if you don't want that particular output, set its pointer to NULL.
+}
+{
+ * FSGetCatalogInfoBulk()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSGetCatalogInfoBulk(iterator: FSIterator; maximumObjects: ItemCount; var actualObjects: ItemCount; containerChanged: BooleanPtr; whichInfo: FSCatalogInfoBitmap; catalogInfos: FSCatalogInfoPtr; refs: FSRefPtr; specs: FSSpecPtr; names: HFSUniStr255Ptr): OSErr; external name '_FSGetCatalogInfoBulk';
+{
+ * PBGetCatalogInfoBulkSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetCatalogInfoBulkSync(var paramBlock: FSCatalogBulkParam): OSErr; external name '_PBGetCatalogInfoBulkSync';
+{
+ * PBGetCatalogInfoBulkAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBGetCatalogInfoBulkAsync(var paramBlock: FSCatalogBulkParam); external name '_PBGetCatalogInfoBulkAsync';
+{
+ CatalogSearch
+ Iterates over catalog objects, searching for objects that match given
+ search criteria. Returns various information about matching objects.
+ For now, iterator must have been created with kFSIterateSubtree option
+ and the container must have been the root directory of a volume.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> iterator The iterator
+ -> maximumItems The maximum number of items to return
+ <- actualItems The actual number of items returned
+ <- containerChanged Set to true if the container's contents changed
+ -> whichInfo The catalog information fields to return for each item
+ <- catalogInfo An array of catalog information; one for each returned item
+ <- refs An array of FSRefs; one for each returned item
+ <- specs An array of FSSpecs; one for each returned item
+ <- names An array of filenames; one for each returned item
+ -> searchParams The criteria that controls the matching, including timeout, a bitmap
+ controlling the fields to compare, and the (Unicode) name to compare.
+ Note: The catalogInfo, refs, specs, and names are all optional outputs; if you don't want
+ that particular output, set its pointer to NULL.
+}
+{
+ * FSCatalogSearch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSCatalogSearch(iterator: FSIterator; const (*var*) searchCriteria: FSSearchParams; maximumObjects: ItemCount; var actualObjects: ItemCount; containerChanged: BooleanPtr; whichInfo: FSCatalogInfoBitmap; catalogInfos: FSCatalogInfoPtr; refs: FSRefPtr; specs: FSSpecPtr; names: HFSUniStr255Ptr): OSErr; external name '_FSCatalogSearch';
+{
+ * PBCatalogSearchSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBCatalogSearchSync(var paramBlock: FSCatalogBulkParam): OSErr; external name '_PBCatalogSearchSync';
+{
+ * PBCatalogSearchAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBCatalogSearchAsync(var paramBlock: FSCatalogBulkParam); external name '_PBCatalogSearchAsync';
+{
+ CreateFork
+ Create a named fork for a file or directory.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory
+ -> forkNameLength The length of the fork name (in Unicode characters)
+ -> forkName The name of the fork to open (in Unicode)
+}
+{
+ * FSCreateFork()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSCreateFork(const (*var*) ref: FSRef; forkNameLength: UniCharCount; forkName: UniCharPtr): OSErr; external name '_FSCreateFork';
+{
+ * PBCreateForkSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBCreateForkSync(var paramBlock: FSForkIOParam): OSErr; external name '_PBCreateForkSync';
+{
+ * PBCreateForkAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBCreateForkAsync(var paramBlock: FSForkIOParam); external name '_PBCreateForkAsync';
+{
+ DeleteFork
+ Delete a named fork of a file or directory.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory
+ -> forkNameLength The length of the fork name (in Unicode characters)
+ -> forkName The name of the fork to open (in Unicode)
+}
+{
+ * FSDeleteFork()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSDeleteFork(const (*var*) ref: FSRef; forkNameLength: UniCharCount; forkName: UniCharPtr): OSErr; external name '_FSDeleteFork';
+{
+ * PBDeleteForkSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBDeleteForkSync(var paramBlock: FSForkIOParam): OSErr; external name '_PBDeleteForkSync';
+{
+ * PBDeleteForkAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBDeleteForkAsync(var paramBlock: FSForkIOParam); external name '_PBDeleteForkAsync';
+{
+ IterateForks
+ Return the names and sizes of the forks of a file or directory.
+ One fork is returned per call.
+ -> ioCompletion A pointer to a completion routine.
+ <- ioResult The result code of the function.
+ -> ref The file or directory containing the forks.
+ <- positionOffset The length of the fork, in bytes.
+ <- allocationAmount The space allocated to the fork (physical length).
+ <- outForkName The name of the fork in Unicode.
+ <> forkIterator Maintains state between calls for a given FSRef.
+ Before the first call, set the initialize field to zero.
+}
+{
+ * FSIterateForks()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSIterateForks(const (*var*) ref: FSRef; var forkIterator: CatPositionRec; forkName: HFSUniStr255Ptr; forkSize: SInt64Ptr; forkPhysicalSize: UInt64Ptr): OSErr; external name '_FSIterateForks';
+{
+ * PBIterateForksSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBIterateForksSync(var paramBlock: FSForkIOParam): OSErr; external name '_PBIterateForksSync';
+{
+ * PBIterateForksAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBIterateForksAsync(var paramBlock: FSForkIOParam); external name '_PBIterateForksAsync';
+{
+ OpenFork
+ Open a fork for reading and/or writing. Allows the opened fork
+ to grow beyond 2GB in size. All volumes should support data and
+ resource forks. Other named forks may be supported by some
+ volumes.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ref The file or directory containing the fork to open
+ -> forkNameLength The length of the fork name (in Unicode characters)
+ -> forkName The name of the fork to open (in Unicode)
+ -> permissions The access (read and/or write) you want
+ <- forkRefNum The reference number for accessing the open fork
+}
+{
+ * FSOpenFork()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSOpenFork(const (*var*) ref: FSRef; forkNameLength: UniCharCount; forkName: UniCharPtr; permissions: SInt8; var forkRefNum: SInt16): OSErr; external name '_FSOpenFork';
+{
+ * PBOpenForkSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBOpenForkSync(var paramBlock: FSForkIOParam): OSErr; external name '_PBOpenForkSync';
+{
+ * PBOpenForkAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBOpenForkAsync(var paramBlock: FSForkIOParam); external name '_PBOpenForkAsync';
+{
+ ReadFork
+ Read data from a fork opened via OpenFork. The first byte to read is
+ indicated by a combination of positionMode and positionOffset.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork to read from
+ <- buffer Pointer to buffer where data will be returned
+ -> requestCount The number of bytes to read
+ <- actualCount The number of bytes actually read
+ -> positionMode The base location for start of read
+ -> positionOffset The offset from base location for start of read
+}
+{
+ * FSReadFork()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSReadFork(forkRefNum: SInt16; positionMode: UInt16; positionOffset: SInt64; requestCount: ByteCount; buffer: UnivPtr; actualCount: ByteCountPtr): OSErr; external name '_FSReadFork';
+{
+ * PBReadForkSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBReadForkSync(var paramBlock: FSForkIOParam): OSErr; external name '_PBReadForkSync';
+{
+ * PBReadForkAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBReadForkAsync(var paramBlock: FSForkIOParam); external name '_PBReadForkAsync';
+{
+ WriteFork
+ Write data to a fork opened via OpenFork. The first byte to write is
+ indicated by a combination of positionMode and positionOffset.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork to write to
+ -> buffer Pointer to data to write
+ -> requestCount The number of bytes to write
+ <- actualCount The number of bytes actually written
+ -> positionMode The base location for start of write
+ -> positionOffset The offset from base location for start of write
+}
+{
+ * FSWriteFork()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSWriteFork(forkRefNum: SInt16; positionMode: UInt16; positionOffset: SInt64; requestCount: ByteCount; buffer: UnivPtr; actualCount: ByteCountPtr): OSErr; external name '_FSWriteFork';
+{
+ * PBWriteForkSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBWriteForkSync(var paramBlock: FSForkIOParam): OSErr; external name '_PBWriteForkSync';
+{
+ * PBWriteForkAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBWriteForkAsync(var paramBlock: FSForkIOParam); external name '_PBWriteForkAsync';
+{
+ GetForkPosition
+ Get the current (default) position of a fork that was
+ opened via OpenFork.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork
+ <- positionOffset The current position of the fork
+}
+{
+ * FSGetForkPosition()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSGetForkPosition(forkRefNum: SInt16; var position: SInt64): OSErr; external name '_FSGetForkPosition';
+{
+ * PBGetForkPositionSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetForkPositionSync(var paramBlock: FSForkIOParam): OSErr; external name '_PBGetForkPositionSync';
+{
+ * PBGetForkPositionAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBGetForkPositionAsync(var paramBlock: FSForkIOParam); external name '_PBGetForkPositionAsync';
+{
+ SetForkPosition
+ Set the current (default) position of a fork that was
+ opened via OpenFork.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork
+ -> positionMode The base location for the new position
+ -> positionOffset The offset of the new position from the base
+}
+{
+ * FSSetForkPosition()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSSetForkPosition(forkRefNum: SInt16; positionMode: UInt16; positionOffset: SInt64): OSErr; external name '_FSSetForkPosition';
+{
+ * PBSetForkPositionSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBSetForkPositionSync(var paramBlock: FSForkIOParam): OSErr; external name '_PBSetForkPositionSync';
+{
+ * PBSetForkPositionAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBSetForkPositionAsync(var paramBlock: FSForkIOParam); external name '_PBSetForkPositionAsync';
+{
+ GetForkSize
+ Get the current logical size (end-of-file) of an open fork.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork
+ <- positionOffset The logical size of the fork, in bytes
+}
+{
+ * FSGetForkSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSGetForkSize(forkRefNum: SInt16; var forkSize: SInt64): OSErr; external name '_FSGetForkSize';
+{
+ * PBGetForkSizeSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetForkSizeSync(var paramBlock: FSForkIOParam): OSErr; external name '_PBGetForkSizeSync';
+{
+ * PBGetForkSizeAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBGetForkSizeAsync(var paramBlock: FSForkIOParam); external name '_PBGetForkSizeAsync';
+{
+ SetForkSize
+ Set the logical size (end-of-file) of an open fork. This
+ may cause space to be allocated or deallocated.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork
+ -> positionMode The base location for the new size
+ -> positionOffset The offset of the new size from the base
+}
+{
+ * FSSetForkSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSSetForkSize(forkRefNum: SInt16; positionMode: UInt16; positionOffset: SInt64): OSErr; external name '_FSSetForkSize';
+{
+ * PBSetForkSizeSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBSetForkSizeSync(var paramBlock: FSForkIOParam): OSErr; external name '_PBSetForkSizeSync';
+{
+ * PBSetForkSizeAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBSetForkSizeAsync(var paramBlock: FSForkIOParam); external name '_PBSetForkSizeAsync';
+{
+ AllocateFork
+ Allocate space to an open fork. Typically, the space to be
+ allocated is beyond the current size of the fork, to reserve
+ space so the file will be able to grow later. Some volume
+ formats are unable to allocate space beyond the logical size
+ of the fork.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork
+ -> positionMode The base location for start of allocation
+ -> positionOffset The offset of the start of allocation
+ -> allocationFlags Zero or more of the following flags:
+ kFSAllocContiguousMask
+ Any newly allocated space must be one contiguous piece.
+ kFSAllocAllOrNothingMask
+ All of the request space must be available, or the call
+ will fail. (If not set, the call may succeed even though
+ some of the requested space wasn't allocated.)
+ kFSAllocNoRoundUpMask
+ Do not allocate additional space. (If not set, a volume
+ may allocate additional space in order to reduce fragmentation.)
+ <> allocationAmount The number of bytes to allocate
+ On output, the number of bytes actually added
+}
+{
+ * FSAllocateFork()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSAllocateFork(forkRefNum: SInt16; flags: FSAllocationFlags; positionMode: UInt16; positionOffset: SInt64; requestCount: UInt64; actualCount: UInt64Ptr): OSErr; external name '_FSAllocateFork';
+{
+ * PBAllocateForkSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBAllocateForkSync(var paramBlock: FSForkIOParam): OSErr; external name '_PBAllocateForkSync';
+{
+ * PBAllocateForkAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBAllocateForkAsync(var paramBlock: FSForkIOParam); external name '_PBAllocateForkAsync';
+{
+ FlushFork
+ Flush a fork. Any data written to this fork refnum is flushed to the device.
+ The volume's control structures are also flushed to the device.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork to flush
+}
+{
+ * FSFlushFork()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSFlushFork(forkRefNum: SInt16): OSErr; external name '_FSFlushFork';
+{
+ * PBFlushForkSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBFlushForkSync(var paramBlock: FSForkIOParam): OSErr; external name '_PBFlushForkSync';
+{
+ * PBFlushForkAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBFlushForkAsync(var paramBlock: FSForkIOParam); external name '_PBFlushForkAsync';
+{
+ CloseFork
+ Flush and close a fork. Any data written to this fork refnum is flushed
+ to the device. The volume's control structures are also flushed to the device.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> forkRefNum The reference number of the fork to close
+}
+{
+ * FSCloseFork()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSCloseFork(forkRefNum: SInt16): OSErr; external name '_FSCloseFork';
+{
+ * PBCloseForkSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBCloseForkSync(var paramBlock: FSForkIOParam): OSErr; external name '_PBCloseForkSync';
+{
+ * PBCloseForkAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBCloseForkAsync(var paramBlock: FSForkIOParam); external name '_PBCloseForkAsync';
+{
+ GetForkCBInfo
+ Return information about an open fork.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ <> desiredRefNum If non-zero on input, then get information for this refnum;
+ unchanged on output. If zero on input, iterate over all open
+ forks (possibly limited to a single volume); on output, contains
+ the fork's refnum.
+ -> volumeRefNum Used when desiredRefNum is zero on input. Set to 0 to iterate over all
+ volumes, or set to a FSVolumeRefNum to limit iteration to that volume.
+ <> iterator Used when desiredRefNum is zero on input. Set to 0 before iterating.
+ Pass the iterator returned by the previous call to continue iterating.
+ <- actualRefNum The refnum of the open fork.
+ <- ref The FSRef for the file or directory that contains the fork.
+ <- forkInfo Various information about the open fork.
+ <- outForkName The name of the fork
+ Note: the foundRefNum, ref, forkInfo, and fork name outputs are all optional; if you don't want
+ a particular output, then set its pointer to NULL. If forkName is NULL, then forkNameLength
+ will be undefined.
+ Note: Returning the forkInfo generally does not require a disk access. Returning the
+ ref or forkName may cause disk access for some volume formats.
+}
+{
+ * FSGetForkCBInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSGetForkCBInfo(desiredRefNum: SInt16; volume: FSVolumeRefNum; iterator: SInt16Ptr; actualRefNum: SInt16Ptr; forkInfo: FSForkInfoPtr; ref: FSRefPtr; outForkName: HFSUniStr255Ptr): OSErr; external name '_FSGetForkCBInfo';
+{
+ * PBGetForkCBInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetForkCBInfoSync(var paramBlock: FSForkCBInfoParam): OSErr; external name '_PBGetForkCBInfoSync';
+{
+ * PBGetForkCBInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBGetForkCBInfoAsync(var paramBlock: FSForkCBInfoParam); external name '_PBGetForkCBInfoAsync';
+{
+ GetVolumeInfo
+ Returns various information about a given volume, or indexing over all volumes.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ <> ioVRefNum On input, the volume reference number or drive number whose
+ information is to be returned (if volumeIndex is 0); same
+ as "volume" input to FSGetVolumeInfo.
+ On output, the actual volume reference number; same as
+ "actualVolume" output of FSGetVolumeInfo.
+ -> volumeIndex The index of the desired volume, or 0 to use ioVRefNum
+ -> whichInfo Which volInfo info fields to get
+ <- volumeInfo The returned values of Volume info fields; may be NULL
+ <- name The Unicode name is returned here. This pointer may be NULL.
+ Note: All of the outputs are optional; if you don't want that particular output, just
+ set its pointer to NULL.
+}
+{
+ * FSGetVolumeInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSGetVolumeInfo(volume: FSVolumeRefNum; volumeIndex: ItemCount; actualVolume: FSVolumeRefNumPtr; whichInfo: FSVolumeInfoBitmap; info: FSVolumeInfoPtr; volumeName: HFSUniStr255Ptr; rootDirectory: FSRefPtr): OSErr; external name '_FSGetVolumeInfo';
+{
+ * PBGetVolumeInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBGetVolumeInfoSync(var paramBlock: FSVolumeInfoParam): OSErr; external name '_PBGetVolumeInfoSync';
+{
+ * PBGetVolumeInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBGetVolumeInfoAsync(var paramBlock: FSVolumeInfoParam); external name '_PBGetVolumeInfoAsync';
+{
+ SetVolumeInfo
+ Set information about a given volume.
+ -> ioCompletion A pointer to a completion routine
+ <- ioResult The result code of the function
+ -> ioVRefNum The volume whose information is to be changed
+ -> whichInfo Which catalog info fields to set
+ -> volumeInfo The new values of volume info fields
+ Note: Only some of the volume info fields may be set. The settable fields
+ are given by the constant kFSVolInfoSettableInfo; no other bits may be set in
+ whichInfo.
+}
+{
+ * FSSetVolumeInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSSetVolumeInfo(volume: FSVolumeRefNum; whichInfo: FSVolumeInfoBitmap; const (*var*) info: FSVolumeInfo): OSErr; external name '_FSSetVolumeInfo';
+{
+ * PBSetVolumeInfoSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBSetVolumeInfoSync(var paramBlock: FSVolumeInfoParam): OSErr; external name '_PBSetVolumeInfoSync';
+{
+ * PBSetVolumeInfoAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PBSetVolumeInfoAsync(var paramBlock: FSVolumeInfoParam); external name '_PBSetVolumeInfoAsync';
+{
+ FSGetDataForkName
+ Returns the constant for the name of the data fork (the empty string)
+}
+{
+ * FSGetDataForkName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSGetDataForkName(var dataForkName: HFSUniStr255): OSErr; external name '_FSGetDataForkName';
+{
+ FSGetResourceForkName
+ Returns the constant for the name of the resource fork
+ (currently "RESOURCE_FORK").
+}
+{
+ * FSGetResourceForkName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSGetResourceForkName(var resourceForkName: HFSUniStr255): OSErr; external name '_FSGetResourceForkName';
+{
+ * FSRefMakePath()
+ *
+ * Summary:
+ * Converts an FSRef to a pathname.
+ *
+ * Parameters:
+ *
+ * ref:
+ * An FSRef to the file or directory to get the pathname for.
+ *
+ * path:
+ * A pointer to a buffer which FSRefMakePath will fill with a C
+ * string representing the pathname to the file or directory
+ * specified by the ref parameter. The format of the pathname
+ * returned can be determined with the Gestalt selector
+ * gestaltFSAttr's gestaltFSUsesPOSIXPathsForConversion bit.
+ * If the gestaltFSUsesPOSIXPathsForConversion bit is clear, the
+ * pathname is a Mac OS File Manager full pathname in a C string,
+ * and file or directory names in the pathname may be mangled as
+ * returned by the File Manager.
+ * If the gestaltFSUsesPOSIXPathsForConversion bit is set, the
+ * pathname is a UTF8 encoded POSIX absolute pathname in a C
+ * string.
+ * In either case, the pathname returned can be passed back to
+ * FSRefMakePath to create an FSRef to the file or directory.
+ *
+ * maxPathSize:
+ * The size of the path buffer in bytes. If the path buffer is too
+ * small for the pathname string, FSRefMakePath returns
+ * pathTooLongErr or buffersTooSmall.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSRefMakePath(const (*var*) ref: FSRef; path: CStringPtr; maxPathSize: UInt32): OSStatus; external name '_FSRefMakePath';
+
+{
+ * FSPathMakeRef()
+ *
+ * Summary:
+ * Converts a pathname to an FSRef.
+ *
+ * Parameters:
+ *
+ * path:
+ * A pointer to a C String that is the pathname. The format of the
+ * pathname you must supply can be determined with the Gestalt
+ * selector gestaltFSAttr's gestaltFSUsesPOSIXPathsForConversion
+ * bit.
+ * If the gestaltFSUsesPOSIXPathsForConversion bit is clear, the
+ * pathname must be a Mac OS File Manager full pathname in a C
+ * string.
+ * If the gestaltFSUsesPOSIXPathsForConversion bit is set, the
+ * pathname must be a UTF8 encoded POSIX absolute pathname in a C
+ * string.
+ * In either case, the pathname returned by FSRefMakePath can be
+ * passed to FSPathMakeRef.
+ *
+ * ref:
+ * A pointer to an FSRef to fill in.
+ *
+ * isDirectory:
+ * An optional pointer to a Boolean that will be filled in to
+ * indicate if the specified path is a directory (vs. a file).
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSPathMakeRef(path: CStringPtr; var ref: FSRef; isDirectory: BooleanPtr): OSStatus; external name '_FSPathMakeRef';
+
+
+{
+ * FNMessage
+ *
+ * Discussion:
+ * Messages broadcast about a directory. If system clients (such as
+ * the Finder) are interested in changes to a directory, they will
+ * receive notifications when application code broadcasts change
+ * messages about that directory.
+ }
+
+type
+ FNMessage = UInt32;
+const
+ kFNDirectoryModifiedMessage = 1;
+
+ {
+ * FNNotify()
+ *
+ * Summary:
+ * Broadcasts notification of changes to the specified directory.
+ *
+ * Parameters:
+ *
+ * ref:
+ * The directory for which to broadcast the notification
+ *
+ * message:
+ * An indication of what happened to the target directory
+ *
+ * flags:
+ * Options about delivery of the notification (specify kNilOptions
+ * for default behaviour)
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNNotify(const (*var*) ref: FSRef; message: FNMessage; flags: OptionBits): OSStatus; external name '_FNNotify';
+
+{
+ * FNNotifyByPath()
+ *
+ * Summary:
+ * Broadcasts notification of changes to the specified directory.
+ *
+ * Parameters:
+ *
+ * path:
+ * Path to the directory for which to broadcast the notification
+ *
+ * message:
+ * An indication of what happened to the target directory
+ *
+ * flags:
+ * Options about delivery of the notification (specify kNilOptions
+ * for default behaviour)
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNNotifyByPath(path: CStringPtr; message: FNMessage; flags: OptionBits): OSStatus; external name '_FNNotifyByPath';
+
+{
+ * FNNotifyAll()
+ *
+ * Discussion:
+ * Broadcasts notification of changes to the filesystem (should only
+ * be used by installers or programs which make lots of changes and
+ * only send one broadcast).
+ *
+ * Parameters:
+ *
+ * message:
+ * An indication of what happened
+ *
+ * flags:
+ * Options about delivery of the notification (specify kNilOptions
+ * for default behaviour)
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNNotifyAll(message: FNMessage; flags: OptionBits): OSStatus; external name '_FNNotifyAll';
+
+
+{
+ * FNSubscriptionRef
+ *
+ * Discussion:
+ * A token associated with a notification subscription. The
+ * subscriber gets one back when they subscribe to notifications for
+ * a particular directory, and they supply it when the unsubscribe.
+ * It is also delivered along with the notifications for that
+ * subscription.
+ }
+
+type
+ FNSubscriptionRef = ^SInt32; { an opaque 32-bit type }
+ FNSubscriptionRefPtr = ^FNSubscriptionRef; { when a var xx:FNSubscriptionRef parameter can be nil, it is changed to xx: FNSubscriptionRefPtr }
+
+ {
+ * Discussion:
+ * Options that can be specified at subscription time.
+ }
+
+const
+ kFNNoImplicitAllSubscription = $01;
+
+
+ {
+ * FNSubscriptionProcPtr
+ *
+ * Discussion:
+ * Callback delivered for directory notifications.
+ *
+ * Parameters:
+ *
+ * message:
+ * An indication of what happened
+ *
+ * flags:
+ * Options about delivery of the notification (typically
+ * kNilOptions)
+ *
+ * refcon:
+ * User reference supplied with subscription
+ *
+ * subscription:
+ * Subscription corresponding to this notification
+ }
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ FNSubscriptionProcPtr = procedure(message: FNMessage; flags: OptionBits; refcon: UnivPtr; subscription: FNSubscriptionRef);
+{$elsec}
+ FNSubscriptionProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ FNSubscriptionUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ FNSubscriptionUPP = FNSubscriptionProcPtr;
+{$endc}
+
+const
+ uppFNSubscriptionProcInfo = $00003FC1;
+ {
+ * NewFNSubscriptionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib on Mac OS X
+ * Mac OS X: in version 10.0 and later
+ }
+function NewFNSubscriptionUPP(userRoutine: FNSubscriptionProcPtr): FNSubscriptionUPP; external name '_NewFNSubscriptionUPP';
+{
+ * DisposeFNSubscriptionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib on Mac OS X
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeFNSubscriptionUPP(userUPP: FNSubscriptionUPP); external name '_DisposeFNSubscriptionUPP';
+{
+ * InvokeFNSubscriptionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib on Mac OS X
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeFNSubscriptionUPP(message: FNMessage; flags: OptionBits; refcon: UnivPtr; subscription: FNSubscriptionRef; userRoutine: FNSubscriptionUPP); external name '_InvokeFNSubscriptionUPP';
+{
+ * FNSubscribe()
+ *
+ * Summary:
+ * Subscribe to change notifications for the specified directory.
+ *
+ * Parameters:
+ *
+ * directoryRef:
+ * Directory for which the caller wants notifications
+ *
+ * callback:
+ * Function to call back when a notification arrives
+ *
+ * refcon:
+ * User state carried with the subscription
+ *
+ * flags:
+ * Options for future use (specify kNilOptions, or one of the
+ * FNSubscriptionOptions)
+ *
+ * subscription:
+ * Subscription token for subsequent query or unsubscription
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function FNSubscribe(const (*var*) directoryRef: FSRef; callback: FNSubscriptionUPP; refcon: UnivPtr; flags: OptionBits; var subscription: FNSubscriptionRef): OSStatus; external name '_FNSubscribe';
+
+{
+ * FNSubscribeByPath()
+ *
+ * Summary:
+ * Subscribe to change notifications for the specified directory.
+ *
+ * Parameters:
+ *
+ * directoryPath:
+ * Directory for which the caller wants notifications
+ *
+ * callback:
+ * Function to call back when a notification arrives
+ *
+ * refcon:
+ * User state carried with the subscription
+ *
+ * flags:
+ * Options for future use (specify kNilOptions, or one of the
+ * FNSubscriptionOptions)
+ *
+ * subscription:
+ * Subscription token for subsequent query or unsubscription
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function FNSubscribeByPath(directoryPath: CStringPtr; callback: FNSubscriptionUPP; refcon: UnivPtr; flags: OptionBits; var subscription: FNSubscriptionRef): OSStatus; external name '_FNSubscribeByPath';
+
+{
+ * FNUnsubscribe()
+ *
+ * Summary:
+ * Release a subscription which is no longer needed.
+ *
+ * Parameters:
+ *
+ * subscription:
+ * Subscription previously returned from FNSubscribe or
+ * FNSubscribeForPath
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function FNUnsubscribe(subscription: FNSubscriptionRef): OSStatus; external name '_FNUnsubscribe';
+
+{
+ * FNGetDirectoryForSubscription()
+ *
+ * Summary:
+ * Fetch the directory for which this subscription was originally
+ * entered. There is no path variant because paths are fragile, and
+ * the path may have changed. If the caller does not care about
+ * this subtlety, she can call FSRefMakePath to get a path from the
+ * returned ref.
+ *
+ * Parameters:
+ *
+ * subscription:
+ * Subscription previously returned from FNSubscribe or
+ * FNSubscribeForPath
+ *
+ * ref:
+ * Directory for which this subscription was created
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function FNGetDirectoryForSubscription(subscription: FNSubscriptionRef; var ref: FSRef): OSStatus; external name '_FNGetDirectoryForSubscription';
+
+{$ALIGN MAC68K}
+
+
+{unit FindByContent}
+{
+ File: FindByContent.p
+
+ Contains: Public search interface for the Find by Content shared library
+
+ Version: Technology: 2.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1997-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+
+{
+ ***************************************************************************
+ Language constants used with FBCIndexItemsInLanguages: these numbers are bits
+ in a 64-bit array that consists of two UInt32 words. In the current implementation
+ the low word is always 0, so values for the high word are given. If both UInt32
+ words are 0, the default value of kDefaultLanguagesHighWord is used.
+ ***************************************************************************
+}
+
+const
+ { languages that use the Roman character mapping }
+ englishHighWord = $80000000;
+ dutchHighWord = $40000000; { also Afrikaans }
+ germanHighWord = $20000000;
+ swedishHighWord = $10000000; { also Norwegian }
+ danishHighWord = $08000000;
+ spanishHighWord = $04000000; { also Catalan }
+ portugueseHighWord = $02000000;
+ italianHighWord = $01000000;
+ frenchHighWord = $00800000;
+ romanHighWord = $00400000; { other languages using Roman alphabet }
+ { Languages that use other mappings }
+ icelandicHighWord = $00200000; { also Faroese }
+ hebrewHighWord = $00100000; { also Yiddish }
+ arabicHighWord = $00080000; { also Farsi, Urdu }
+ centeuroHighWord = $00040000; { Central European languages not using Cyrillic }
+ croatianHighWord = $00020000;
+ turkishHighWord = $00010000;
+ romanianHighWord = $00008000;
+ greekHighWord = $00004000;
+ cyrillicHighWord = $00002000; { all languages using Cyrillic }
+ devanagariHighWord = $00001000;
+ gujuratiHighWord = $00000800;
+ gurmukhiHighWord = $00000400;
+ japaneseHighWord = $00000200;
+ koreanHighWord = $00000100;
+ kDefaultLanguagesHighWord = $FF800000; { sum of first 9 }
+
+
+ {
+ ***************************************************************************
+ Phase values
+ These values are passed to the client's callback function to indicate what
+ the FBC code is doing.
+ ***************************************************************************
+ }
+ { indexing phases }
+ kFBCphIndexing = 0;
+ kFBCphFlushing = 1;
+ kFBCphMerging = 2;
+ kFBCphMakingIndexAccessor = 3;
+ kFBCphCompacting = 4;
+ kFBCphIndexWaiting = 5; { access phases }
+ kFBCphSearching = 6;
+ kFBCphMakingAccessAccessor = 7;
+ kFBCphAccessWaiting = 8; { summarization }
+ kFBCphSummarizing = 9; { indexing or access }
+ kFBCphIdle = 10;
+ kFBCphCanceling = 11;
+
+
+ {
+ ***************************************************************************
+ Pointer types
+ These point to memory allocated by the FBC shared library, and must be deallocated
+ by calls that are defined below.
+ ***************************************************************************
+ }
+
+ { A collection of state information for searching }
+
+type
+ FBCSearchSession = ^SInt32; { an opaque 32-bit type }
+ FBCSearchSessionPtr = ^FBCSearchSession; { when a var xx:FBCSearchSession parameter can be nil, it is changed to xx: FBCSearchSessionPtr }
+ { a FBCWordList is a pointer to an array of pointers to c-strings }
+ FBCWordListRecPtr = ^FBCWordListRec;
+ FBCWordListRec = record
+ words: array [0..0] of ConstCStringPtr; { array of pointers to c-strings }
+ end;
+
+ FBCWordList = ^FBCWordListRec;
+ {
+ ***************************************************************************
+ Callback function type for progress reporting and cancelation during
+ searching and indexing. The client's callback function should call
+ WaitNextEvent; a "sleep" value of 1 is suggested. If the callback function
+ wants to cancel the current operation (indexing, search, or doc-terms
+ retrieval) it should return true.
+ ***************************************************************************
+ }
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ FBCCallbackProcPtr = function(phase: UInt16; percentDone: Single; data: UnivPtr): boolean;
+{$elsec}
+ FBCCallbackProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ FBCCallbackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ FBCCallbackUPP = FBCCallbackProcPtr;
+{$endc}
+
+const
+ uppFBCCallbackProcInfo = $00000F91;
+ {
+ * NewFBCCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewFBCCallbackUPP(userRoutine: FBCCallbackProcPtr): FBCCallbackUPP; external name '_NewFBCCallbackUPP';
+{
+ * DisposeFBCCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeFBCCallbackUPP(userUPP: FBCCallbackUPP); external name '_DisposeFBCCallbackUPP';
+{
+ * InvokeFBCCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeFBCCallbackUPP(phase: UInt16; percentDone: Single; data: UnivPtr; userRoutine: FBCCallbackUPP): boolean; external name '_InvokeFBCCallbackUPP';
+{
+ ***************************************************************************
+ Set the callback function for progress reporting and cancelation during
+ searching and indexing, and set the amount of heap space to reserve for
+ the client's use when FBC allocates memory.
+ ***************************************************************************
+}
+{
+ * FBCSetCallback()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure FBCSetCallback(fn: FBCCallbackUPP; data: UnivPtr); external name '_FBCSetCallback';
+
+{
+ * FBCSetHeapReservation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure FBCSetHeapReservation(bytes: UInt32); external name '_FBCSetHeapReservation';
+
+{
+ ***************************************************************************
+ Find out whether a volume is indexed, the date & time of its last
+ completed update, and its physical size.
+ ***************************************************************************
+}
+
+{
+ * FBCVolumeIsIndexed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCVolumeIsIndexed(theVRefNum: SInt16): boolean; external name '_FBCVolumeIsIndexed';
+
+{
+ * FBCVolumeIsRemote()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCVolumeIsRemote(theVRefNum: SInt16): boolean; external name '_FBCVolumeIsRemote';
+
+{
+ * FBCVolumeIndexTimeStamp()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCVolumeIndexTimeStamp(theVRefNum: SInt16; var timeStamp: UInt32): OSErr; external name '_FBCVolumeIndexTimeStamp';
+
+{
+ * FBCVolumeIndexPhysicalSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCVolumeIndexPhysicalSize(theVRefNum: SInt16; var size: UInt32): OSErr; external name '_FBCVolumeIndexPhysicalSize';
+
+{
+ ***************************************************************************
+ Create & configure a search session
+ ***************************************************************************
+}
+
+{
+ * FBCCreateSearchSession()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCCreateSearchSession(var searchSession: FBCSearchSession): OSErr; external name '_FBCCreateSearchSession';
+
+{
+ * FBCAddAllVolumesToSession()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCAddAllVolumesToSession(theSession: FBCSearchSession; includeRemote: boolean): OSErr; external name '_FBCAddAllVolumesToSession';
+
+{
+ * FBCSetSessionVolumes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCSetSessionVolumes(theSession: FBCSearchSession; vRefNums: SInt16Ptr; numVolumes: UInt16): OSErr; external name '_FBCSetSessionVolumes';
+
+{
+ * FBCAddVolumeToSession()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCAddVolumeToSession(theSession: FBCSearchSession; vRefNum: SInt16): OSErr; external name '_FBCAddVolumeToSession';
+
+{
+ * FBCRemoveVolumeFromSession()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCRemoveVolumeFromSession(theSession: FBCSearchSession; vRefNum: SInt16): OSErr; external name '_FBCRemoveVolumeFromSession';
+
+{
+ * FBCGetSessionVolumeCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCGetSessionVolumeCount(theSession: FBCSearchSession; var count: UInt16): OSErr; external name '_FBCGetSessionVolumeCount';
+
+{
+ * FBCGetSessionVolumes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCGetSessionVolumes(theSession: FBCSearchSession; var vRefNums: SInt16; var numVolumes: UInt16): OSErr; external name '_FBCGetSessionVolumes';
+
+{
+ * FBCCloneSearchSession()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCCloneSearchSession(original: FBCSearchSession; var clone: FBCSearchSession): OSErr; external name '_FBCCloneSearchSession';
+
+{
+ ***************************************************************************
+ Execute a search
+ ***************************************************************************
+}
+
+{
+ * FBCDoQuerySearch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCDoQuerySearch(theSession: FBCSearchSession; queryText: CStringPtr; const (*var*) targetDirs: FSSpec; numTargets: UInt32; maxHits: UInt32; maxHitWords: UInt32): OSErr; external name '_FBCDoQuerySearch';
+
+{
+ * FBCDoCFStringSearch()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCDoCFStringSearch(theSession: FBCSearchSession; queryString: CFStringRef; const (*var*) targetDirs: FSSpec; numTargets: UInt32; maxHits: UInt32; maxHitWords: UInt32): OSErr; external name '_FBCDoCFStringSearch';
+
+{
+ * FBCDoExampleSearch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCDoExampleSearch(theSession: FBCSearchSession; exampleHitNums: UInt32Ptr; numExamples: UInt32; const (*var*) targetDirs: FSSpec; numTargets: UInt32; maxHits: UInt32; maxHitWords: UInt32): OSErr; external name '_FBCDoExampleSearch';
+
+{
+ * FBCBlindExampleSearch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCBlindExampleSearch(var examples: FSSpec; numExamples: UInt32; const (*var*) targetDirs: FSSpec; numTargets: UInt32; maxHits: UInt32; maxHitWords: UInt32; allIndexes: boolean; includeRemote: boolean; var theSession: FBCSearchSession): OSErr; external name '_FBCBlindExampleSearch';
+
+
+{
+ ***************************************************************************
+ Get information about hits [wrapper for THitItem C++ API]
+ ***************************************************************************
+}
+
+{
+ * FBCGetHitCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCGetHitCount(theSession: FBCSearchSession; var count: UInt32): OSErr; external name '_FBCGetHitCount';
+
+{
+ * FBCGetHitDocument()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCGetHitDocument(theSession: FBCSearchSession; hitNumber: UInt32; var theDocument: FSSpec): OSErr; external name '_FBCGetHitDocument';
+
+{
+ * FBCGetHitDocumentRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCGetHitDocumentRef(theSession: FBCSearchSession; hitNumber: UInt32; var theDocument: FSRef): OSErr; external name '_FBCGetHitDocumentRef';
+
+{
+ * FBCGetHitScore()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCGetHitScore(theSession: FBCSearchSession; hitNumber: UInt32; var score: Single): OSErr; external name '_FBCGetHitScore';
+
+{
+ * FBCGetMatchedWords()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCGetMatchedWords(theSession: FBCSearchSession; hitNumber: UInt32; var wordCount: UInt32; var list: FBCWordList): OSErr; external name '_FBCGetMatchedWords';
+
+{
+ * FBCGetTopicWords()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCGetTopicWords(theSession: FBCSearchSession; hitNumber: UInt32; var wordCount: UInt32; var list: FBCWordList): OSErr; external name '_FBCGetTopicWords';
+
+
+{
+ ***************************************************************************
+ Summarize a buffer of text
+ ***************************************************************************
+}
+
+{
+ * FBCSummarize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCSummarize(inBuf: UnivPtr; inLength: UInt32; outBuf: UnivPtr; var outLength: UInt32; var numSentences: UInt32): OSErr; external name '_FBCSummarize';
+
+{
+ ***************************************************************************
+ Deallocate hit lists, word arrays, and search sessions
+ ***************************************************************************
+}
+
+{
+ * FBCReleaseSessionHits()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCReleaseSessionHits(theSession: FBCSearchSession): OSErr; external name '_FBCReleaseSessionHits';
+
+{
+ * FBCDestroyWordList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCDestroyWordList(theList: FBCWordList; wordCount: UInt32): OSErr; external name '_FBCDestroyWordList';
+
+{
+ * FBCDestroySearchSession()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCDestroySearchSession(theSession: FBCSearchSession): OSErr; external name '_FBCDestroySearchSession';
+
+{
+ ***************************************************************************
+ Index one or more files and/or folders
+ ***************************************************************************
+}
+
+{
+ * FBCIndexItems()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FindByContent 9.0 and later
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCIndexItems(theItems: FSSpecArrayPtr; itemCount: UInt32): OSErr; external name '_FBCIndexItems';
+
+{
+ * FBCIndexItemsInLanguages()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCIndexItemsInLanguages(theItems: FSSpecArrayPtr; itemCount: UInt32; languageHighBits: UInt32; languageLowBits: UInt32): OSErr; external name '_FBCIndexItemsInLanguages';
+
+{
+ ***************************************************************************
+ (OS X only) Given a folder, find the folder that contains the index file
+ of the given index
+ ***************************************************************************
+}
+
+{
+ * FBCFindIndexFileFolderForFolder()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCFindIndexFileFolderForFolder(var inFolder: FSRef; var outFolder: FSRef): OSErr; external name '_FBCFindIndexFileFolderForFolder';
+
+{
+ ***************************************************************************
+ (OS X only) Given a folder, delete the index file that indexes it
+ ***************************************************************************
+}
+
+{
+ * FBCDeleteIndexFileForFolder()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later
+ }
+function FBCDeleteIndexFileForFolder(const (*var*) folder: FSRef): OSErr; external name '_FBCDeleteIndexFileForFolder';
+
+{$ALIGN MAC68K}
+
+
+{unit Folders}
+{
+ File: Folders.p
+
+ Contains: Folder Manager Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1995-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ kOnSystemDisk = -32768; { previously was 0x8000 but that is an unsigned value whereas vRefNum is signed }
+ kOnAppropriateDisk = -32767; { Generally, the same as kOnSystemDisk, but it's clearer that this isn't always the 'boot' disk. }
+ { Folder Domains - Carbon only. The constants above can continue to be used, but the folder/volume returned will }
+ { be from one of the domains below. }
+ kSystemDomain = -32766; { Read-only system hierarchy. }
+ kLocalDomain = -32765; { All users of a single machine have access to these resources. }
+ kNetworkDomain = -32764; { All users configured to use a common network server has access to these resources. }
+ kUserDomain = -32763; { Read/write. Resources that are private to the user. }
+ kClassicDomain = -32762; { Domain referring to the currently configured Classic System Folder }
+
+ kCreateFolder = true;
+ kDontCreateFolder = false;
+
+ kSystemFolderType = $6D616373 (* 'macs' *); { the system folder }
+ kDesktopFolderType = $6465736B (* 'desk' *); { the desktop folder; objects in this folder show on the desk top. }
+ kSystemDesktopFolderType = $7364736B (* 'sdsk' *); { the desktop folder at the root of the hard drive, never the redirected user desktop folder }
+ kTrashFolderType = $74727368 (* 'trsh' *); { the trash folder; objects in this folder show up in the trash }
+ kSystemTrashFolderType = $73747273 (* 'strs' *); { the trash folder at the root of the drive, never the redirected user trash folder }
+ kWhereToEmptyTrashFolderType = $656D7074 (* 'empt' *); { the "empty trash" folder; Finder starts empty from here down }
+ kPrintMonitorDocsFolderType = $70726E74 (* 'prnt' *); { Print Monitor documents }
+ kStartupFolderType = $73747274 (* 'strt' *); { Finder objects (applications, documents, DAs, aliases, to...) to open at startup go here }
+ kShutdownFolderType = $73686466 (* 'shdf' *); { Finder objects (applications, documents, DAs, aliases, to...) to open at shutdown go here }
+ kAppleMenuFolderType = $616D6E75 (* 'amnu' *); { Finder objects to put into the Apple menu go here }
+ kControlPanelFolderType = $6374726C (* 'ctrl' *); { Control Panels go here (may contain INITs) }
+ kSystemControlPanelFolderType = $7363746C (* 'sctl' *); { System control panels folder - never the redirected one, always "Control Panels" inside the System Folder }
+ kExtensionFolderType = $6578746E (* 'extn' *); { System extensions go here }
+ kFontsFolderType = $666F6E74 (* 'font' *); { Fonts go here }
+ kPreferencesFolderType = $70726566 (* 'pref' *); { preferences for applications go here }
+ kSystemPreferencesFolderType = $73707266 (* 'sprf' *); { System-type Preferences go here - this is always the system's preferences folder, never a logged in user's }
+ kTemporaryFolderType = $74656D70 (* 'temp' *); { temporary files go here (deleted periodically, but don't rely on it.) }
+
+ {
+ * FindFolder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FindFolder(vRefNum: SInt16; folderType: OSType; createFolder: boolean; var foundVRefNum: SInt16; var foundDirID: UInt32): OSErr; external name '_FindFolder';
+{
+ * FindFolderExtended()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FindFolderExtended(vol: SInt16; foldType: OSType; createFolder: boolean; flags: UInt32; data: UnivPtr; var vRefNum: SInt16; var dirID: UInt32): OSErr; external name '_FindFolderExtended';
+{
+ * ReleaseFolder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FoldersLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ReleaseFolder(vRefNum: SInt16; folderType: OSType): OSErr; external name '_ReleaseFolder';
+{$ifc NOT TARGET_OS_MAC}
+{ Since non-mac targets don't know about VRef's or DirID's, the Ex version returns
+ the found folder path.
+ }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * FindFolderEx()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function FindFolderEx(vRefNum: SInt16; folderType: OSType; createFolder: boolean; var foundVRefNum: SInt16; var foundDirID: UInt32; foundFolder: CStringPtr): OSErr; external name '_FindFolderEx';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc}
+
+{
+ * FSFindFolder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSFindFolder(vRefNum: SInt16; folderType: OSType; createFolder: boolean; var foundRef: FSRef): OSErr; external name '_FSFindFolder';
+{
+ * FSFindFolderExtended()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSFindFolderExtended(vol: SInt16; foldType: OSType; createFolder: boolean; flags: UInt32; data: UnivPtr; var foundRef: FSRef): OSErr; external name '_FSFindFolderExtended';
+{****************************************}
+{ Extensible Folder Manager declarations }
+{****************************************}
+
+{**************************}
+{ Folder Manager constants }
+{**************************}
+
+
+const
+ kExtensionDisabledFolderType = $65787444 (* 'extD' *);
+ kControlPanelDisabledFolderType = $63747244 (* 'ctrD' *);
+ kSystemExtensionDisabledFolderType = $6D616344 (* 'macD' *);
+ kStartupItemsDisabledFolderType = $73747244 (* 'strD' *);
+ kShutdownItemsDisabledFolderType = $73686444 (* 'shdD' *);
+ kApplicationsFolderType = $61707073 (* 'apps' *);
+ kDocumentsFolderType = $646F6373 (* 'docs' *);
+
+ { new constants }
+ kVolumeRootFolderType = $726F6F74 (* 'root' *); { root folder of a volume }
+ kChewableItemsFolderType = $666C6E74 (* 'flnt' *); { items deleted at boot }
+ kApplicationSupportFolderType = $61737570 (* 'asup' *); { third-party items and folders }
+ kTextEncodingsFolderType = $C6927465 (* 'Ätex' *); { encoding tables }
+ kStationeryFolderType = $6F647374 (* 'odst' *); { stationery }
+ kOpenDocFolderType = $6F646F64 (* 'odod' *); { OpenDoc root }
+ kOpenDocShellPlugInsFolderType = $6F647370 (* 'odsp' *); { OpenDoc Shell Plug-Ins in OpenDoc folder }
+ kEditorsFolderType = $6F646564 (* 'oded' *); { OpenDoc editors in MacOS Folder }
+ kOpenDocEditorsFolderType = $C6926F64 (* 'Äodf' *); { OpenDoc subfolder of Editors folder }
+ kOpenDocLibrariesFolderType = $6F646C62 (* 'odlb' *); { OpenDoc libraries folder }
+ kGenEditorsFolderType = $C6926564 (* 'Äedi' *); { CKH general editors folder at root level of Sys folder }
+ kHelpFolderType = $C692686C (* 'Ählp' *); { CKH help folder currently at root of system folder }
+ kInternetPlugInFolderType = $C6926E65 (* 'Änet' *); { CKH internet plug ins for browsers and stuff }
+ kModemScriptsFolderType = $C6926D6F (* 'Ämod' *); { CKH modem scripts, get 'em OUT of the Extensions folder }
+ kPrinterDescriptionFolderType = $70706466 (* 'ppdf' *); { CKH new folder at root of System folder for printer descs. }
+ kPrinterDriverFolderType = $C6927072 (* 'Äprd' *); { CKH new folder at root of System folder for printer drivers }
+ kScriptingAdditionsFolderType = $C6927363 (* 'Äscr' *); { CKH at root of system folder }
+ kSharedLibrariesFolderType = $C6926C69 (* 'Älib' *); { CKH for general shared libs. }
+ kVoicesFolderType = $66766F63 (* 'fvoc' *); { CKH macintalk can live here }
+ kControlStripModulesFolderType = $73646576 (* 'sdev' *); { CKH for control strip modules }
+ kAssistantsFolderType = $617374C6 (* 'astÄ' *); { SJF for Assistants (MacOS Setup Assistant, etc) }
+ kUtilitiesFolderType = $757469C6 (* 'utiÄ' *); { SJF for Utilities folder }
+ kAppleExtrasFolderType = $616578C6 (* 'aexÄ' *); { SJF for Apple Extras folder }
+ kContextualMenuItemsFolderType = $636D6E75 (* 'cmnu' *); { SJF for Contextual Menu items }
+ kMacOSReadMesFolderType = $6D6F72C6 (* 'morÄ' *); { SJF for MacOS ReadMes folder }
+ kALMModulesFolderType = $77616C6B (* 'walk' *); { EAS for Location Manager Module files except type 'thng' (within kExtensionFolderType) }
+ kALMPreferencesFolderType = $74726970 (* 'trip' *); { EAS for Location Manager Preferences (within kPreferencesFolderType; contains kALMLocationsFolderType) }
+ kALMLocationsFolderType = $66616C6C (* 'fall' *); { EAS for Location Manager Locations (within kALMPreferencesFolderType) }
+ kColorSyncProfilesFolderType = $70726F66 (* 'prof' *); { for ColorSyncª Profiles }
+ kThemesFolderType = $74686D65 (* 'thme' *); { for Theme data files }
+ kFavoritesFolderType = $66617673 (* 'favs' *); { Favorties folder for Navigation Services }
+ kInternetFolderType = $696E74C6 (* 'intÄ' *); { Internet folder (root level of startup volume) }
+ kAppearanceFolderType = $61707072 (* 'appr' *); { Appearance folder (root of system folder) }
+ kSoundSetsFolderType = $736E6473 (* 'snds' *); { Sound Sets folder (in Appearance folder) }
+ kDesktopPicturesFolderType = $647470C6 (* 'dtpÄ' *); { Desktop Pictures folder (in Appearance folder) }
+ kInternetSearchSitesFolderType = $69737366 (* 'issf' *); { Internet Search Sites folder }
+ kFindSupportFolderType = $666E6473 (* 'fnds' *); { Find support folder }
+ kFindByContentFolderType = $66626366 (* 'fbcf' *); { Find by content folder }
+ kInstallerLogsFolderType = $696C6766 (* 'ilgf' *); { Installer Logs folder }
+ kScriptsFolderType = $736372C6 (* 'scrÄ' *); { Scripts folder }
+ kFolderActionsFolderType = $66617366 (* 'fasf' *); { Folder Actions Scripts folder }
+ kLauncherItemsFolderType = $6C61756E (* 'laun' *); { Launcher Items folder }
+ kRecentApplicationsFolderType = $72617070 (* 'rapp' *); { Recent Applications folder }
+ kRecentDocumentsFolderType = $72646F63 (* 'rdoc' *); { Recent Documents folder }
+ kRecentServersFolderType = $72737672 (* 'rsvr' *); { Recent Servers folder }
+ kSpeakableItemsFolderType = $73706B69 (* 'spki' *); { Speakable Items folder }
+ kKeychainFolderType = $6B63686E (* 'kchn' *); { Keychain folder }
+ kQuickTimeExtensionsFolderType = $71746578 (* 'qtex' *); { QuickTime Extensions Folder (in Extensions folder) }
+ kDisplayExtensionsFolderType = $6473706C (* 'dspl' *); { Display Extensions Folder (in Extensions folder) }
+ kMultiprocessingFolderType = $6D707866 (* 'mpxf' *); { Multiprocessing Folder (in Extensions folder) }
+ kPrintingPlugInsFolderType = $70706C67 (* 'pplg' *); { Printing Plug-Ins Folder (in Extensions folder) }
+
+
+ { New Folder Types to accommodate the Mac OS X Folder Manager }
+ { These folder types are not applicable on Mac OS 9. }
+ kDomainTopLevelFolderType = $64746F70 (* 'dtop' *); { The top-level of a Folder domain, e.g. "/System" }
+ kDomainLibraryFolderType = $646C6962 (* 'dlib' *); { the Library subfolder of a particular domain }
+ kColorSyncFolderType = $73796E63 (* 'sync' *); { Contains ColorSync-related folders }
+ kColorSyncCMMFolderType = $63636D6D (* 'ccmm' *); { ColorSync CMMs }
+ kColorSyncScriptingFolderType = $63736372 (* 'cscr' *); { ColorSync Scripting support }
+ kPrintersFolderType = $696D7072 (* 'impr' *); { Contains Printing-related folders }
+ kSpeechFolderType = $73706368 (* 'spch' *); { Contains Speech-related folders }
+ kCarbonLibraryFolderType = $63617262 (* 'carb' *); { Contains Carbon-specific file }
+ kDocumentationFolderType = $696E666F (* 'info' *); { Contains Documentation files (not user documents) }
+ kDeveloperDocsFolderType = $64646F63 (* 'ddoc' *); { Contains Developer Documentation files and folders }
+ kDeveloperHelpFolderType = $64657668 (* 'devh' *); { Contains Developer Help related files }
+ kISSDownloadsFolderType = $69737364 (* 'issd' *); { Contains Internet Search Sites downloaded from the Internet }
+ kUserSpecificTmpFolderType = $75746D70 (* 'utmp' *); { Contains temporary items created on behalf of the current user }
+ kCachedDataFolderType = $63616368 (* 'cach' *); { Contains various cache files for different clients }
+ kFrameworksFolderType = $6672616D (* 'fram' *); { Contains MacOS X Framework folders }
+ kPrivateFrameworksFolderType = $7066726D (* 'pfrm' *); { Contains MacOS X Private Framework folders }
+ kClassicDesktopFolderType = $7364736B (* 'sdsk' *); { MacOS 9 compatible desktop folder - same as }
+ { kSystemDesktopFolderType but with a more appropriate }
+ { name for Mac OS X code. }
+ kDeveloperFolderType = $64657666 (* 'devf' *); { Contains MacOS X Developer Resources }
+ kSystemSoundsFolderType = $73736E64 (* 'ssnd' *); { Contains Mac OS X System Sound Files }
+ kComponentsFolderType = $636D7064 (* 'cmpd' *); { Contains Mac OS X components }
+ kQuickTimeComponentsFolderType = $77636D70 (* 'wcmp' *); { Contains QuickTime components for Mac OS X }
+ kCoreServicesFolderType = $63737276 (* 'csrv' *); { Refers to the "CoreServices" folder on Mac OS X }
+ kPictureDocumentsFolderType = $70646F63 (* 'pdoc' *); { Refers to the "Pictures" folder in a users home directory }
+ kMovieDocumentsFolderType = $6D646F63 (* 'mdoc' *); { Refers to the "Movies" folder in a users home directory }
+ kMusicDocumentsFolderType = $C2B5646F (* 'µdoc' *); { Refers to the "Music" folder in a users home directory }
+ kInternetSitesFolderType = $73697465 (* 'site' *); { Refers to the "Sites" folder in a users home directory }
+ kPublicFolderType = $70756262 (* 'pubb' *); { Refers to the "Public" folder in a users home directory }
+ kAudioSupportFolderType = $6164696F (* 'adio' *); { Refers to the Audio support folder for Mac OS X }
+ kAudioSoundsFolderType = $61736E64 (* 'asnd' *); { Refers to the Sounds subfolder of Audio Support }
+ kAudioSoundBanksFolderType = $62616E6B (* 'bank' *); { Refers to the Banks subfolder of the Sounds Folder }
+ kAudioAlertSoundsFolderType = $616C7274 (* 'alrt' *); { Refers to the Alert Sounds subfolder of the Sound Folder }
+ kAudioPlugInsFolderType = $61706C67 (* 'aplg' *); { Refers to the Plug-ins subfolder of the Audio Folder }
+ kAudioComponentsFolderType = $61636D70 (* 'acmp' *); { Refers to the Components subfolder of the Audio Plug-ins Folder }
+ kKernelExtensionsFolderType = $6B657874 (* 'kext' *); { Refers to the Kernel Extensions Folder on Mac OS X }
+ kDirectoryServicesFolderType = $64737276 (* 'dsrv' *); { Refers to the Directory Services folder on Mac OS X }
+ kDirectoryServicesPlugInsFolderType = $64706C67 (* 'dplg' *); { Refers to the Directory Services Plug-Ins folder on Mac OS X }
+ kInstallerReceiptsFolderType = $72637074 (* 'rcpt' *); { Refers to the "Receipts" folder in Mac OS X }
+ kFileSystemSupportFolderType = $66737973 (* 'fsys' *); { Refers to the [domain]/Library/Filesystems folder in Mac OS X }
+ kAppleShareSupportFolderType = $73686172 (* 'shar' *); { Refers to the [domain]/Library/Filesystems/AppleShare folder in Mac OS X }
+ kAppleShareAuthenticationFolderType = $61757468 (* 'auth' *); { Refers to the [domain]/Library/Filesystems/AppleShare/Authentication folder in Mac OS X }
+ kMIDIDriversFolderType = $6D696469 (* 'midi' *); { Refers to the MIDI Drivers folder on Mac OS X }
+
+ kLocalesFolderType = $C6926C6F (* 'Äloc' *); { PKE for Locales folder }
+ kFindByContentPluginsFolderType = $66626370 (* 'fbcp' *); { Find By Content Plug-ins }
+
+ kUsersFolderType = $75737273 (* 'usrs' *); { "Users" folder, contains one folder for each user. }
+ kCurrentUserFolderType = $63757372 (* 'cusr' *); { The folder for the currently logged on user. }
+ kCurrentUserRemoteFolderLocation = $72757366 (* 'rusf' *); { The remote folder for the currently logged on user }
+ kCurrentUserRemoteFolderType = $72757372 (* 'rusr' *); { The remote folder location for the currently logged on user }
+ kSharedUserDataFolderType = $73646174 (* 'sdat' *); { A Shared "Documents" folder, readable & writeable by all users }
+ kVolumeSettingsFolderType = $76736664 (* 'vsfd' *); { Volume specific user information goes here }
+
+ kAppleshareAutomountServerAliasesFolderType = $737276C6 (* 'srvÄ' *); { Appleshare puts volumes to automount inside this folder. }
+ kPreMacOS91ApplicationsFolderType = $C3A57070 (* 'Œpps' *); { The "Applications" folder, pre Mac OS 9.1 }
+ kPreMacOS91InstallerLogsFolderType = $C3AE6C67 (* '”lgf' *); { The "Installer Logs" folder, pre Mac OS 9.1 }
+ kPreMacOS91AssistantsFolderType = $C3A57374 (* 'ŒstÄ' *); { The "Assistants" folder, pre Mac OS 9.1 }
+ kPreMacOS91UtilitiesFolderType = $C3BC7469 (* 'ŸtiÄ' *); { The "Utilities" folder, pre Mac OS 9.1 }
+ kPreMacOS91AppleExtrasFolderType = $C3A56578 (* 'ŒexÄ' *); { The "Apple Extras" folder, pre Mac OS 9.1 }
+ kPreMacOS91MacOSReadMesFolderType = $C2B56F72 (* 'µorÄ' *); { The "Mac OS ReadMes" folder, pre Mac OS 9.1 }
+ kPreMacOS91InternetFolderType = $C3AE6E74 (* '”ntÄ' *); { The "Internet" folder, pre Mac OS 9.1 }
+ kPreMacOS91AutomountedServersFolderType = $C39F7276 (* '§rvÄ' *); { The "Servers" folder, pre Mac OS 9.1 }
+ kPreMacOS91StationeryFolderType = $C3B86473 (* '¿dst' *); { The "Stationery" folder, pre Mac OS 9.1 }
+
+ { FolderDescFlags values }
+ kCreateFolderAtBoot = $00000002;
+ kCreateFolderAtBootBit = 1;
+ kFolderCreatedInvisible = $00000004;
+ kFolderCreatedInvisibleBit = 2;
+ kFolderCreatedNameLocked = $00000008;
+ kFolderCreatedNameLockedBit = 3;
+ kFolderCreatedAdminPrivs = $00000010;
+ kFolderCreatedAdminPrivsBit = 4;
+
+ kFolderInUserFolder = $00000020;
+ kFolderInUserFolderBit = 5;
+ kFolderTrackedByAlias = $00000040;
+ kFolderTrackedByAliasBit = 6;
+ kFolderInRemoteUserFolderIfAvailable = $00000080;
+ kFolderInRemoteUserFolderIfAvailableBit = 7;
+ kFolderNeverMatchedInIdentifyFolder = $00000100;
+ kFolderNeverMatchedInIdentifyFolderBit = 8;
+ kFolderMustStayOnSameVolume = $00000200;
+ kFolderMustStayOnSameVolumeBit = 9;
+ kFolderManagerFolderInMacOS9FolderIfMacOSXIsInstalledMask = $00000400;
+ kFolderManagerFolderInMacOS9FolderIfMacOSXIsInstalledBit = 10;
+ kFolderInLocalOrRemoteUserFolder = $000000A0;
+
+
+type
+ FolderDescFlags = UInt32;
+ { FolderClass values }
+
+const
+ kRelativeFolder = $72656C66 (* 'relf' *);
+ kSpecialFolder = $73706366 (* 'spcf' *);
+
+
+type
+ FolderClass = OSType;
+ { special folder locations }
+
+const
+ kBlessedFolder = $626C7366 (* 'blsf' *);
+ kRootFolder = $726F7466 (* 'rotf' *);
+
+ kCurrentUserFolderLocation = $63757366 (* 'cusf' *); { the magic 'Current User' folder location }
+
+
+type
+ FolderType = OSType;
+ FolderLocation = OSType;
+
+ FolderDescPtr = ^FolderDesc;
+ FolderDesc = record
+ descSize: Size;
+ foldType: FolderType;
+ flags: FolderDescFlags;
+ foldClass: FolderClass;
+ foldLocation: FolderType;
+ badgeSignature: OSType;
+ badgeType: OSType;
+ reserved: UInt32;
+ name: StrFileName; { Str63 on MacOS }
+ end;
+
+
+ RoutingFlags = UInt32;
+ FolderRoutingPtr = ^FolderRouting;
+ FolderRouting = record
+ descSize: Size;
+ fileType: OSType;
+ routeFromFolder: FolderType;
+ routeToFolder: FolderType;
+ flags: RoutingFlags;
+ end;
+
+ { routing constants }
+ { These are bits in the .flags field of the FindFolderUserRedirectionGlobals struct }
+
+const
+ { Set this bit to 1 in the .flags field of a FindFolderUserRedirectionGlobals }
+ { structure if the userName in the struct should be used as the current }
+ { "User" name }
+ kFindFolderRedirectionFlagUseDistinctUserFoldersBit = 0; { Set this bit to 1 and the currentUserFolderVRefNum and currentUserFolderDirID }
+ { fields of the user record will get used instead of finding the user folder }
+ { with the userName field. }
+ kFindFolderRedirectionFlagUseGivenVRefAndDirIDAsUserFolderBit = 1; { Set this bit to 1 and the remoteUserFolderVRefNum and remoteUserFolderDirID }
+ { fields of the user record will get used instead of finding the user folder }
+ { with the userName field. }
+ kFindFolderRedirectionFlagsUseGivenVRefNumAndDirIDAsRemoteUserFolderBit = 2;
+
+
+type
+ FindFolderUserRedirectionGlobalsPtr = ^FindFolderUserRedirectionGlobals;
+ FindFolderUserRedirectionGlobals = record
+ version: UInt32;
+ flags: UInt32;
+ userName: Str31;
+ userNameScript: SInt16;
+ currentUserFolderVRefNum: SInt16;
+ currentUserFolderDirID: UInt32;
+ remoteUserFolderVRefNum: SInt16;
+ remoteUserFolderDirID: UInt32;
+ end;
+
+
+const
+ kFolderManagerUserRedirectionGlobalsCurrentVersion = 1;
+
+ {
+ These are passed into FindFolderExtended(), FindFolderInternalExtended(), and
+ FindFolderNewInstallerEntryExtended() in the flags field.
+ }
+ kFindFolderExtendedFlagsDoNotFollowAliasesBit = 0;
+ kFindFolderExtendedFlagsDoNotUseUserFolderBit = 1;
+ kFindFolderExtendedFlagsUseOtherUserRecord = $01000000;
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ FolderManagerNotificationProcPtr = function(message: OSType; arg: UnivPtr; userRefCon: UnivPtr): OSStatus;
+{$elsec}
+ FolderManagerNotificationProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ FolderManagerNotificationUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ FolderManagerNotificationUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppFolderManagerNotificationProcInfo = $00000FF0;
+ {
+ * NewFolderManagerNotificationUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewFolderManagerNotificationUPP(userRoutine: FolderManagerNotificationProcPtr): FolderManagerNotificationUPP; external name '_NewFolderManagerNotificationUPP'; { old name was NewFolderManagerNotificationProc }
+{
+ * DisposeFolderManagerNotificationUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeFolderManagerNotificationUPP(userUPP: FolderManagerNotificationUPP); external name '_DisposeFolderManagerNotificationUPP';
+{
+ * InvokeFolderManagerNotificationUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeFolderManagerNotificationUPP(message: OSType; arg: UnivPtr; userRefCon: UnivPtr; userRoutine: FolderManagerNotificationUPP): OSStatus; external name '_InvokeFolderManagerNotificationUPP'; { old name was CallFolderManagerNotificationProc }
+const
+ kFolderManagerNotificationMessageUserLogIn = $6C6F672B (* 'log+' *); { Sent by system & third party software after a user logs in. arg should point to a valid FindFolderUserRedirectionGlobals structure or nil for the owner }
+ kFolderManagerNotificationMessagePreUserLogIn = $6C6F676A (* 'logj' *); { Sent by system & third party software before a user logs in. arg should point to a valid FindFolderUserRedirectionGlobals structure or nil for the owner }
+ kFolderManagerNotificationMessageUserLogOut = $6C6F672D (* 'log-' *); { Sent by system & third party software before a user logs out. arg should point to a valid FindFolderUserRedirectionGlobals structure or nil for the owner }
+ kFolderManagerNotificationMessagePostUserLogOut = $6C6F6770 (* 'logp' *); { Sent by system & third party software after a user logs out. arg should point to a valid FindFolderUserRedirectionGlobals structure or nil for the owner }
+ kFolderManagerNotificationDiscardCachedData = $64636865 (* 'dche' *); { Sent by system & third party software when the entire Folder Manager cache should be flushed }
+ kFolderManagerNotificationMessageLoginStartup = $73747570 (* 'stup' *); { Sent by 'Login' application the first time it starts up after each boot }
+
+
+ { These get used in the options parameter of FolderManagerRegisterNotificationProc() }
+ kDoNotRemoveWhenCurrentApplicationQuitsBit = 0;
+ kDoNotRemoveWheCurrentApplicationQuitsBit = 0; { Going away soon, use kDoNotRemoveWheCurrentApplicationQuitsBit }
+
+ { These get used in the options parameter of FolderManagerCallNotificationProcs() }
+ kStopIfAnyNotificationProcReturnsErrorBit = 31;
+
+ { ************************* }
+ { Folder Manager routines }
+ { ************************* }
+ { Folder Manager administration routines }
+ {
+ * AddFolderDescriptor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FoldersLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AddFolderDescriptor(foldType: FolderType; flags: FolderDescFlags; foldClass: FolderClass; foldLocation: FolderLocation; badgeSignature: OSType; badgeType: OSType; const (*var*) name: StrFileName; replaceFlag: boolean): OSErr; external name '_AddFolderDescriptor';
+{
+ * GetFolderDescriptor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FoldersLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetFolderDescriptor(foldType: FolderType; descSize: Size; var foldDesc: FolderDesc): OSErr; external name '_GetFolderDescriptor';
+{
+ * GetFolderTypes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FoldersLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetFolderTypes(requestedTypeCount: UInt32; var totalTypeCount: UInt32; var theTypes: FolderType): OSErr; external name '_GetFolderTypes';
+{
+ * RemoveFolderDescriptor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FoldersLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RemoveFolderDescriptor(foldType: FolderType): OSErr; external name '_RemoveFolderDescriptor';
+{ legacy routines }
+{
+ * GetFolderName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FoldersLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetFolderName(vRefNum: SInt16; foldType: OSType; var foundVRefNum: SInt16; var name: StrFileName): OSErr; external name '_GetFolderName';
+{ routing routines }
+{
+ * AddFolderRouting()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FoldersLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AddFolderRouting(fileType: OSType; routeFromFolder: FolderType; routeToFolder: FolderType; flags: RoutingFlags; replaceFlag: boolean): OSErr; external name '_AddFolderRouting';
+{
+ * RemoveFolderRouting()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FoldersLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RemoveFolderRouting(fileType: OSType; routeFromFolder: FolderType): OSErr; external name '_RemoveFolderRouting';
+{
+ * FindFolderRouting()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FoldersLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FindFolderRouting(fileType: OSType; routeFromFolder: FolderType; var routeToFolder: FolderType; var flags: RoutingFlags): OSErr; external name '_FindFolderRouting';
+{
+ * GetFolderRoutings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FoldersLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetFolderRoutings(requestedRoutingCount: UInt32; var totalRoutingCount: UInt32; routingSize: Size; var theRoutings: FolderRouting): OSErr; external name '_GetFolderRoutings';
+{
+ * InvalidateFolderDescriptorCache()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FoldersLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvalidateFolderDescriptorCache(vRefNum: SInt16; dirID: UInt32): OSErr; external name '_InvalidateFolderDescriptorCache';
+{
+ * IdentifyFolder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FoldersLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IdentifyFolder(vRefNum: SInt16; dirID: UInt32; var foldType: FolderType): OSErr; external name '_IdentifyFolder';
+{
+ * FolderManagerRegisterNotificationProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FolderManagerRegisterNotificationProc(notificationProc: FolderManagerNotificationUPP; refCon: UnivPtr; options: UInt32): OSErr; external name '_FolderManagerRegisterNotificationProc';
+{
+ * FolderManagerUnregisterNotificationProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FolderManagerUnregisterNotificationProc(notificationProc: FolderManagerNotificationUPP; refCon: UnivPtr): OSErr; external name '_FolderManagerUnregisterNotificationProc';
+{
+ * FolderManagerRegisterCallNotificationProcs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FolderManagerRegisterCallNotificationProcs(message: OSType; arg: UnivPtr; options: UInt32): OSStatus; external name '_FolderManagerRegisterCallNotificationProcs';
+{*****************************}
+{ MultiUser (At Ease) globals }
+{*****************************}
+{
+ This structure has been through some evolution since the early days of At Ease 1.0. The structure
+ has been expanded (and developers should assume that it will continue this way into the future). Older
+ fields have been obsoleted as the features have changed in newer versions of the code.
+}
+
+{ Some fields in here are really only valid for the network version of Macintosh Manager }
+
+
+type
+ MultiUserGestaltPtr = ^MultiUserGestalt;
+ MultiUserGestalt = record
+ { Version 1 fields. }
+ giVersion: SInt16; { structure version: 0 = invalid, 6 = OS 9 }
+ giReserved0: SInt16; { [OBSOLETE with v3] giIsActive: if true then At Ease is currently running }
+ giReserved1: SInt16; { [OBSOLETE] if true then auto create alias }
+ giReserved2: SInt16; { [OBSOLETE with v6] if true then request floppy on new saves }
+ giReserved3: SInt16; { [OBSOLETE] if true then hypercard stacks are shown on Applications panel }
+ giReserved4: FSSpec; { [OBSOLETE with v6] location of At Ease Items folder }
+ { Version 2 fields. }
+ giDocsVRefNum: SInt16; { vrefnum of user's documents location (only valid if not on floppy) }
+ giDocsDirID: UInt32; { directory id of user's documents folder (only valid if not on floppy) }
+ giForceSaves: SInt16; { true if user is forced to save to their documents folder }
+ giForceOpens: SInt16; { true if user is forced to open from their documents folder }
+ giSetupName: Str31; { name of current setup }
+ giUserName: Str31; { name of current user }
+ giFrontAppName: Str31; { name of the frontmost application }
+ giReserved5: SInt16; { [OBSOLETE with v6] true if user has Go To Finder menu item }
+ giIsOn: SInt16; { true if Multiple Users/Macintosh Manager is on right now }
+ { Version 3 fields. }
+ { There were no additional fields for version 3.x }
+ { Version 4 fields. }
+ giUserLoggedInType: SInt16; { 0 = normal user, 1 = workgroup admin, 2 = global admin }
+ giUserEncryptPwd: packed array [0..15] of char; { encrypted user password (our digest form) }
+ giUserEnvironment: SInt16; { 0 = panels, 1 = normal Finder, 2 = limited/restricted Finder }
+ giReserved6: SInt32; { [OBSOLETE] }
+ giReserved7: SInt32; { [OBSOLETE] }
+ giDisableScrnShots: boolean; { true if screen shots are not allowed }
+ { Version 5 fields. }
+ giSupportsAsyncFSCalls: boolean; { Finder uses this to tell if our patches support async trap patches }
+ giPrefsVRefNum: SInt16; { vrefnum of preferences }
+ giPrefsDirID: UInt32; { dirID of the At Ease Items folder on preferences volume }
+ giUserLogInTime: UInt32; { time in seconds we've been logged in (0 or 1 mean not logged in) }
+ giUsingPrintQuotas: boolean; { true if logged in user is using printer quotas }
+ giUsingDiskQuotas: boolean; { true if logged in user has disk quotas active }
+ { Version 6 fields - As of Mac OS 9's "Multiple Users 1.0" }
+ giInSystemAccess: boolean; { true if system is in System Access (i.e., owner logged in) }
+ giUserFolderEnabled: boolean; { true if FindFolder is redirecting folders (uses giUserName for user) }
+ giReserved8: SInt16;
+ giReserved9: SInt32;
+ giInLoginScreen: boolean; { true if no user has logged in (including owner) }
+ { May have more fields added in future, so never check for sizeof(GestaltRec) }
+ end;
+
+ MultiUserGestaltHandle = ^MultiUserGestaltPtr;
+
+
+{$ALIGN MAC68K}
+
+
+{unit HFSVolumes}
+{
+ File: HFSVolumes.p
+
+ Contains: On-disk data structures for HFS and HFS Plus volumes.
+
+ Version: Technology: Mac OS 8.1
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1984-2002 by Apple Computer, Inc. All rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ Signatures used to differentiate between HFS and HFS Plus volumes }
+
+const
+ kHFSSigWord = $4244; { 'BD' in ASCII }
+ kHFSPlusSigWord = $482B; { 'H+' in ASCII }
+ kHFSPlusVersion = $0004; { will change as format changes (version 4 shipped with Mac OS 8.1) }
+ kHFSPlusMountVersion = $382E3130 (* '8.10' *); { will change as implementations change ('8.10' in Mac OS 8.1) }
+
+
+ { CatalogNodeID is used to track catalog objects }
+
+type
+ HFSCatalogNodeID = UInt32;
+
+const
+ kHFSMaxVolumeNameChars = 27;
+ kHFSMaxFileNameChars = 31;
+ kHFSPlusMaxFileNameChars = 255;
+
+
+ { Extent overflow file data structures }
+ { HFS Extent key }
+
+type
+ HFSExtentKeyPtr = ^HFSExtentKey;
+ HFSExtentKey = record
+ keyLength: SInt8; { length of key, excluding this field }
+ forkType: SInt8; { 0 = data fork, FF = resource fork }
+ fileID: HFSCatalogNodeID; { file ID }
+ startBlock: UInt16; { first file allocation block number in this extent }
+ end;
+
+ { HFS Plus Extent key }
+ HFSPlusExtentKeyPtr = ^HFSPlusExtentKey;
+ HFSPlusExtentKey = record
+ keyLength: UInt16; { length of key, excluding this field }
+ forkType: SInt8; { 0 = data fork, FF = resource fork }
+ pad: SInt8; { make the other fields align on 32-bit boundary }
+ fileID: HFSCatalogNodeID; { file ID }
+ startBlock: UInt32; { first file allocation block number in this extent }
+ end;
+
+ { Number of extent descriptors per extent record }
+
+const
+ kHFSExtentDensity = 3;
+ kHFSPlusExtentDensity = 8;
+
+ { HFS extent descriptor }
+
+type
+ HFSExtentDescriptorPtr = ^HFSExtentDescriptor;
+ HFSExtentDescriptor = record
+ startBlock: UInt16; { first allocation block }
+ blockCount: UInt16; { number of allocation blocks }
+ end;
+
+ { HFS Plus extent descriptor }
+ HFSPlusExtentDescriptorPtr = ^HFSPlusExtentDescriptor;
+ HFSPlusExtentDescriptor = record
+ startBlock: UInt32; { first allocation block }
+ blockCount: UInt32; { number of allocation blocks }
+ end;
+
+ { HFS extent record }
+ HFSExtentRecord = array [0..2] of HFSExtentDescriptor;
+ { HFS Plus extent record }
+ HFSPlusExtentRecord = array [0..7] of HFSPlusExtentDescriptor;
+
+ { Fork data info (HFS Plus only) - 80 bytes }
+ HFSPlusForkDataPtr = ^HFSPlusForkData;
+ HFSPlusForkData = record
+ logicalSize: UInt64; { fork's logical size in bytes }
+ clumpSize: UInt32; { fork's clump size in bytes }
+ totalBlocks: UInt32; { total blocks used by this fork }
+ extents: HFSPlusExtentRecord; { initial set of extents }
+ end;
+
+ { Permissions info (HFS Plus only) - 16 bytes }
+ HFSPlusPermissionsPtr = ^HFSPlusPermissions;
+ HFSPlusPermissions = record
+ ownerID: UInt32; { user or group ID of file/folder owner }
+ groupID: UInt32; { additional user of group ID }
+ permissions: UInt32; { permissions (bytes: unused, owner, group, everyone) }
+ specialDevice: UInt32; { UNIX: device for character or block special file }
+ end;
+
+ { Catalog file data structures }
+
+const
+ kHFSRootParentID = 1; { Parent ID of the root folder }
+ kHFSRootFolderID = 2; { Folder ID of the root folder }
+ kHFSExtentsFileID = 3; { File ID of the extents file }
+ kHFSCatalogFileID = 4; { File ID of the catalog file }
+ kHFSBadBlockFileID = 5; { File ID of the bad allocation block file }
+ kHFSAllocationFileID = 6; { File ID of the allocation file (HFS Plus only) }
+ kHFSStartupFileID = 7; { File ID of the startup file (HFS Plus only) }
+ kHFSAttributesFileID = 8; { File ID of the attribute file (HFS Plus only) }
+ kHFSBogusExtentFileID = 15; { Used for exchanging extents in extents file }
+ kHFSFirstUserCatalogNodeID = 16;
+
+
+ { HFS catalog key }
+
+type
+ HFSCatalogKeyPtr = ^HFSCatalogKey;
+ HFSCatalogKey = record
+ keyLength: SInt8; { key length (in bytes) }
+ reserved: SInt8; { reserved (set to zero) }
+ parentID: HFSCatalogNodeID; { parent folder ID }
+ nodeName: Str31; { catalog node name }
+ end;
+
+ { HFS Plus catalog key }
+ HFSPlusCatalogKeyPtr = ^HFSPlusCatalogKey;
+ HFSPlusCatalogKey = record
+ keyLength: UInt16; { key length (in bytes) }
+ parentID: HFSCatalogNodeID; { parent folder ID }
+ nodeName: HFSUniStr255; { catalog node name }
+ end;
+
+
+ { Catalog record types }
+
+const
+ { HFS Catalog Records }
+ kHFSFolderRecord = $0100; { Folder record }
+ kHFSFileRecord = $0200; { File record }
+ kHFSFolderThreadRecord = $0300; { Folder thread record }
+ kHFSFileThreadRecord = $0400; { File thread record }
+ { HFS Plus Catalog Records }
+ kHFSPlusFolderRecord = 1; { Folder record }
+ kHFSPlusFileRecord = 2; { File record }
+ kHFSPlusFolderThreadRecord = 3; { Folder thread record }
+ kHFSPlusFileThreadRecord = 4; { File thread record }
+
+
+ { Catalog file record flags }
+ kHFSFileLockedBit = $0000; { file is locked and cannot be written to }
+ kHFSFileLockedMask = $0001;
+ kHFSThreadExistsBit = $0001; { a file thread record exists for this file }
+ kHFSThreadExistsMask = $0002;
+
+
+ { HFS catalog folder record - 70 bytes }
+
+type
+ HFSCatalogFolderPtr = ^HFSCatalogFolder;
+ HFSCatalogFolder = record
+ recordType: SInt16; { record type }
+ flags: UInt16; { folder flags }
+ valence: UInt16; { folder valence }
+ folderID: HFSCatalogNodeID; { folder ID }
+ createDate: UInt32; { date and time of creation }
+ modifyDate: UInt32; { date and time of last modification }
+ backupDate: UInt32; { date and time of last backup }
+ userInfo: DInfo; { Finder information }
+ finderInfo: DXInfo; { additional Finder information }
+ reserved: array [0..3] of UInt32; { reserved - set to zero }
+ end;
+
+ { HFS Plus catalog folder record - 88 bytes }
+ HFSPlusCatalogFolderPtr = ^HFSPlusCatalogFolder;
+ HFSPlusCatalogFolder = record
+ recordType: SInt16; { record type = HFS Plus folder record }
+ flags: UInt16; { file flags }
+ valence: UInt32; { folder's valence (limited to 2^16 in Mac OS) }
+ folderID: HFSCatalogNodeID; { folder ID }
+ createDate: UInt32; { date and time of creation }
+ contentModDate: UInt32; { date and time of last content modification }
+ attributeModDate: UInt32; { date and time of last attribute modification }
+ accessDate: UInt32; { date and time of last access (Rhapsody only) }
+ backupDate: UInt32; { date and time of last backup }
+ permissions: HFSPlusPermissions; { permissions (for Rhapsody) }
+ userInfo: DInfo; { Finder information }
+ finderInfo: DXInfo; { additional Finder information }
+ textEncoding: UInt32; { hint for name conversions }
+ reserved: UInt32; { reserved - set to zero }
+ end;
+
+ { HFS catalog file record - 102 bytes }
+ HFSCatalogFilePtr = ^HFSCatalogFile;
+ HFSCatalogFile = record
+ recordType: SInt16; { record type }
+ flags: SInt8; { file flags }
+ fileType: SInt8; { file type (unused ?) }
+ userInfo: FInfo; { Finder information }
+ fileID: HFSCatalogNodeID; { file ID }
+ dataStartBlock: UInt16; { not used - set to zero }
+ dataLogicalSize: SInt32; { logical EOF of data fork }
+ dataPhysicalSize: SInt32; { physical EOF of data fork }
+ rsrcStartBlock: UInt16; { not used - set to zero }
+ rsrcLogicalSize: SInt32; { logical EOF of resource fork }
+ rsrcPhysicalSize: SInt32; { physical EOF of resource fork }
+ createDate: UInt32; { date and time of creation }
+ modifyDate: UInt32; { date and time of last modification }
+ backupDate: UInt32; { date and time of last backup }
+ finderInfo: FXInfo; { additional Finder information }
+ clumpSize: UInt16; { file clump size (not used) }
+ dataExtents: HFSExtentRecord; { first data fork extent record }
+ rsrcExtents: HFSExtentRecord; { first resource fork extent record }
+ reserved: UInt32; { reserved - set to zero }
+ end;
+
+ { HFS Plus catalog file record - 248 bytes }
+ HFSPlusCatalogFilePtr = ^HFSPlusCatalogFile;
+ HFSPlusCatalogFile = record
+ recordType: SInt16; { record type = HFS Plus file record }
+ flags: UInt16; { file flags }
+ reserved1: UInt32; { reserved - set to zero }
+ fileID: HFSCatalogNodeID; { file ID }
+ createDate: UInt32; { date and time of creation }
+ contentModDate: UInt32; { date and time of last content modification }
+ attributeModDate: UInt32; { date and time of last attribute modification }
+ accessDate: UInt32; { date and time of last access (Rhapsody only) }
+ backupDate: UInt32; { date and time of last backup }
+ permissions: HFSPlusPermissions; { permissions (for Rhapsody) }
+ userInfo: FInfo; { Finder information }
+ finderInfo: FXInfo; { additional Finder information }
+ textEncoding: UInt32; { hint for name conversions }
+ reserved2: UInt32; { reserved - set to zero }
+ { start on double long (64 bit) boundry }
+ dataFork: HFSPlusForkData; { size and block data for data fork }
+ resourceFork: HFSPlusForkData; { size and block data for resource fork }
+ end;
+
+ { HFS catalog thread record - 46 bytes }
+ HFSCatalogThreadPtr = ^HFSCatalogThread;
+ HFSCatalogThread = record
+ recordType: SInt16; { record type }
+ reserved: array [0..1] of SInt32; { reserved - set to zero }
+ parentID: HFSCatalogNodeID; { parent ID for this catalog node }
+ nodeName: Str31; { name of this catalog node }
+ end;
+
+ { HFS Plus catalog thread record -- maximum 520 bytes }
+ HFSPlusCatalogThreadPtr = ^HFSPlusCatalogThread;
+ HFSPlusCatalogThread = record
+ recordType: SInt16; { record type }
+ reserved: SInt16; { reserved - set to zero }
+ parentID: HFSCatalogNodeID; { parent ID for this catalog node }
+ nodeName: HFSUniStr255; { name of this catalog node (variable length) }
+ end;
+
+
+ {
+ These are the types of records in the attribute B-tree. The values were chosen
+ so that they wouldn't conflict with the catalog record types.
+ }
+
+const
+ kHFSPlusAttrInlineData = $10; { if size < kAttrOverflowSize }
+ kHFSPlusAttrForkData = $20; { if size >= kAttrOverflowSize }
+ kHFSPlusAttrExtents = $30; { overflow extents for large attributes }
+
+
+ {
+ HFSPlusAttrInlineData
+ For small attributes, whose entire value is stored within this one
+ B-tree record.
+ There would not be any other records for this attribute.
+ }
+
+type
+ HFSPlusAttrInlineDataPtr = ^HFSPlusAttrInlineData;
+ HFSPlusAttrInlineData = record
+ recordType: UInt32; { = kHFSPlusAttrInlineData }
+ reserved: UInt32;
+ logicalSize: UInt32; { size in bytes of userData }
+ userData: packed array [0..1] of UInt8; { variable length; space allocated is a multiple of 2 bytes }
+ end;
+
+ {
+ HFSPlusAttrForkData
+ For larger attributes, whose value is stored in allocation blocks.
+ If the attribute has more than 8 extents, there will be additonal
+ records (of type HFSPlusAttrExtents) for this attribute.
+ }
+ HFSPlusAttrForkDataPtr = ^HFSPlusAttrForkData;
+ HFSPlusAttrForkData = record
+ recordType: UInt32; { = kHFSPlusAttrForkData }
+ reserved: UInt32;
+ theFork: HFSPlusForkData; { size and first extents of value }
+ end;
+
+ {
+ HFSPlusAttrExtents
+ This record contains information about overflow extents for large,
+ fragmented attributes.
+ }
+ HFSPlusAttrExtentsPtr = ^HFSPlusAttrExtents;
+ HFSPlusAttrExtents = record
+ recordType: UInt32; { = kHFSPlusAttrExtents }
+ reserved: UInt32;
+ extents: HFSPlusExtentRecord; { additional extents }
+ end;
+
+ { A generic Attribute Record }
+ HFSPlusAttrRecordPtr = ^HFSPlusAttrRecord;
+ HFSPlusAttrRecord = record
+ case SInt16 of
+ 0: (
+ recordType: UInt32;
+ );
+ 1: (
+ inlineData: HFSPlusAttrInlineData;
+ );
+ 2: (
+ forkData: HFSPlusAttrForkData;
+ );
+ 3: (
+ overflowExtents: HFSPlusAttrExtents;
+ );
+ end;
+
+ { Key and node lengths }
+
+const
+ kHFSPlusExtentKeyMaximumLength = 10;
+ kHFSExtentKeyMaximumLength = 7;
+ kHFSPlusCatalogKeyMaximumLength = 516;
+ kHFSPlusCatalogKeyMinimumLength = 6;
+ kHFSCatalogKeyMaximumLength = 37;
+ kHFSCatalogKeyMinimumLength = 6;
+ kHFSPlusCatalogMinNodeSize = 4096;
+ kHFSPlusExtentMinNodeSize = 512;
+ kHFSPlusAttrMinNodeSize = 4096;
+
+
+ { HFS and HFS Plus volume attribute bits }
+ { Bits 0-6 are reserved (always cleared by MountVol call) }
+ kHFSVolumeHardwareLockBit = 7; { volume is locked by hardware }
+ kHFSVolumeUnmountedBit = 8; { volume was successfully unmounted }
+ kHFSVolumeSparedBlocksBit = 9; { volume has bad blocks spared }
+ kHFSVolumeNoCacheRequiredBit = 10; { don't cache volume blocks (i.e. RAM or ROM disk) }
+ kHFSBootVolumeInconsistentBit = 11; { boot volume is inconsistent (System 7.6 and later) }
+ { Bits 12-14 are reserved for future use }
+ kHFSVolumeSoftwareLockBit = 15; { volume is locked by software }
+ kHFSVolumeHardwareLockMask = $80;
+ kHFSVolumeUnmountedMask = $0100;
+ kHFSVolumeSparedBlocksMask = $0200;
+ kHFSVolumeNoCacheRequiredMask = $0400;
+ kHFSBootVolumeInconsistentMask = $0800;
+ kHFSVolumeSoftwareLockMask = $8000;
+ kHFSMDBAttributesMask = $8380;
+
+ kHFSCatalogNodeIDsReusedBit = 12; { nextCatalogID wrapped around }
+ kHFSCatalogNodeIDsReusedMask = $1000;
+
+ { Master Directory Block (HFS only) - 162 bytes }
+ { Stored at sector #2 (3rd sector) }
+
+type
+ HFSMasterDirectoryBlockPtr = ^HFSMasterDirectoryBlock;
+ HFSMasterDirectoryBlock = record
+ { These first fields are also used by MFS }
+ drSigWord: UInt16; { volume signature }
+ drCrDate: UInt32; { date and time of volume creation }
+ drLsMod: UInt32; { date and time of last modification }
+ drAtrb: UInt16; { volume attributes }
+ drNmFls: UInt16; { number of files in root folder }
+ drVBMSt: UInt16; { first block of volume bitmap }
+ drAllocPtr: UInt16; { start of next allocation search }
+ drNmAlBlks: UInt16; { number of allocation blocks in volume }
+ drAlBlkSiz: UInt32; { size (in bytes) of allocation blocks }
+ drClpSiz: UInt32; { default clump size }
+ drAlBlSt: UInt16; { first allocation block in volume }
+ drNxtCNID: UInt32; { next unused catalog node ID }
+ drFreeBks: UInt16; { number of unused allocation blocks }
+ drVN: Str27; { volume name }
+ { Master Directory Block extensions for HFS }
+ drVolBkUp: UInt32; { date and time of last backup }
+ drVSeqNum: UInt16; { volume backup sequence number }
+ drWrCnt: UInt32; { volume write count }
+ drXTClpSiz: UInt32; { clump size for extents overflow file }
+ drCTClpSiz: UInt32; { clump size for catalog file }
+ drNmRtDirs: UInt16; { number of directories in root folder }
+ drFilCnt: UInt32; { number of files in volume }
+ drDirCnt: UInt32; { number of directories in volume }
+ drFndrInfo: array [0..7] of SInt32; { information used by the Finder }
+ drEmbedSigWord: UInt16; { embedded volume signature (formerly drVCSize) }
+ drEmbedExtent: HFSExtentDescriptor; { embedded volume location and size (formerly drVBMCSize and drCtlCSize) }
+ drXTFlSize: UInt32; { size of extents overflow file }
+ drXTExtRec: HFSExtentRecord; { extent record for extents overflow file }
+ drCTFlSize: UInt32; { size of catalog file }
+ drCTExtRec: HFSExtentRecord; { extent record for catalog file }
+ end;
+
+ { HFSPlusVolumeHeader (HFS Plus only) - 512 bytes }
+ { Stored at sector #2 (3rd sector) and second-to-last sector. }
+ HFSPlusVolumeHeaderPtr = ^HFSPlusVolumeHeader;
+ HFSPlusVolumeHeader = record
+ signature: UInt16; { volume signature == 'H+' }
+ version: UInt16; { current version is kHFSPlusVersion }
+ attributes: UInt32; { volume attributes }
+ lastMountedVersion: UInt32; { implementation version which last mounted volume }
+ reserved: UInt32; { reserved - set to zero }
+ createDate: UInt32; { date and time of volume creation }
+ modifyDate: UInt32; { date and time of last modification }
+ backupDate: UInt32; { date and time of last backup }
+ checkedDate: UInt32; { date and time of last disk check }
+ fileCount: UInt32; { number of files in volume }
+ folderCount: UInt32; { number of directories in volume }
+ blockSize: UInt32; { size (in bytes) of allocation blocks }
+ totalBlocks: UInt32; { number of allocation blocks in volume (includes this header and VBM }
+ freeBlocks: UInt32; { number of unused allocation blocks }
+ nextAllocation: UInt32; { start of next allocation search }
+ rsrcClumpSize: UInt32; { default resource fork clump size }
+ dataClumpSize: UInt32; { default data fork clump size }
+ nextCatalogID: HFSCatalogNodeID; { next unused catalog node ID }
+ writeCount: UInt32; { volume write count }
+ encodingsBitmap: UInt64; { which encodings have been use on this volume }
+ finderInfo: packed array [0..31] of UInt8; { information used by the Finder }
+ allocationFile: HFSPlusForkData; { allocation bitmap file }
+ extentsFile: HFSPlusForkData; { extents B-tree file }
+ catalogFile: HFSPlusForkData; { catalog B-tree file }
+ attributesFile: HFSPlusForkData; { extended attributes B-tree file }
+ startupFile: HFSPlusForkData; { boot file }
+ end;
+
+ { ---------- HFS and HFS Plus B-tree structures ---------- }
+ { BTNodeDescriptor -- Every B-tree node starts with these fields. }
+ BTNodeDescriptorPtr = ^BTNodeDescriptor;
+ BTNodeDescriptor = record
+ fLink: UInt32; { next node at this level }
+ bLink: UInt32; { previous node at this level }
+ kind: SInt8; { kind of node (leaf, index, header, map) }
+ height: SInt8; { zero for header, map; child is one more than parent }
+ numRecords: UInt16; { number of records in this node }
+ reserved: UInt16; { reserved; set to zero }
+ end;
+
+ { Constants for BTNodeDescriptor kind }
+
+const
+ kBTLeafNode = -1;
+ kBTIndexNode = 0;
+ kBTHeaderNode = 1;
+ kBTMapNode = 2;
+
+ { BTHeaderRec -- The first record of a B-tree header node }
+
+type
+ BTHeaderRecPtr = ^BTHeaderRec;
+ BTHeaderRec = record
+ treeDepth: UInt16; { maximum height (usually leaf nodes) }
+ rootNode: UInt32; { node number of root node }
+ leafRecords: UInt32; { number of leaf records in all leaf nodes }
+ firstLeafNode: UInt32; { node number of first leaf node }
+ lastLeafNode: UInt32; { node number of last leaf node }
+ nodeSize: UInt16; { size of a node, in bytes }
+ maxKeyLength: UInt16; { reserved }
+ totalNodes: UInt32; { total number of nodes in tree }
+ freeNodes: UInt32; { number of unused (free) nodes in tree }
+ reserved1: UInt16; { unused }
+ clumpSize: UInt32; { reserved }
+ btreeType: SInt8; { reserved }
+ reserved2: SInt8; { reserved }
+ attributes: UInt32; { persistent attributes about the tree }
+ reserved3: array [0..15] of UInt32; { reserved }
+ end;
+
+ { Constants for BTHeaderRec attributes }
+
+const
+ kBTBadCloseMask = $00000001; { reserved }
+ kBTBigKeysMask = $00000002; { key length field is 16 bits }
+ kBTVariableIndexKeysMask = $00000004; { keys in index nodes are variable length }
+
+{$ALIGN MAC68K}
+
+
+{unit ICAApplication}
+{
+ File: ICAApplication.p
+
+ Contains: General purpose Image Capture definitions
+
+ Version: Technology: 1.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 2000-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+ ICAObject = ^SInt32; { an opaque 32-bit type }
+ ICAObjectPtr = ^ICAObject; { when a var xx:ICAObject parameter can be nil, it is changed to xx: ICAObjectPtr }
+ ICAProperty = ^SInt32; { an opaque 32-bit type }
+ ICAPropertyPtr = ^ICAProperty; { when a var xx:ICAProperty parameter can be nil, it is changed to xx: ICAPropertyPtr }
+ ICAConnectionID = ^SInt32; { an opaque 32-bit type }
+ ICAConnectionIDPtr = ^ICAConnectionID; { when a var xx:ICAConnectionID parameter can be nil, it is changed to xx: ICAConnectionIDPtr }
+ {
+ --------------- Defines ---------------
+ }
+ { Error codes (Image Capture range = -9900...-9949) }
+
+const
+ kICACommunicationErr = -9900;
+ kICADeviceNotFoundErr = -9901;
+ kICADeviceNotOpenErr = -9902;
+ kICAFileCorruptedErr = -9903;
+ kICAIOPendingErr = -9904;
+ kICAInvalidObjectErr = -9905;
+ kICAInvalidPropertyErr = -9906;
+ kICAIndexOutOfRangeErr = -9907;
+ kICAPropertyTypeNotFoundErr = -9908;
+
+ {
+ NOTE: vendor specific constants are UPPERCASE (exception: 'TEXT')
+ }
+ { ICAObject types and subtypes }
+ kICADevice = $69636476 (* 'icdv' *); { Also creator of device library files }
+ kICADeviceCamera = $636D7261 (* 'cmra' *); { Also file type of device library files }
+ kICADeviceScanner = $7363616E (* 'scan' *); { Also file type of device library files }
+ kICADeviceMFP = $6D667020 (* 'mfp ' *); { Also file type of device library files }
+ kICAList = $6F626A6C (* 'objl' *);
+ kICADirectory = $64697265 (* 'dire' *);
+ kICAFile = $66696C65 (* 'file' *);
+ kICAFileImage = $696D6167 (* 'imag' *);
+ kICAFileMovie = $6D6F6F76 (* 'moov' *);
+ kICAFileAudio = $6175646F (* 'audo' *);
+ kICAFileFirmware = $6669726D (* 'firm' *);
+ kICAFileOther = $6F746865 (* 'othe' *);
+
+ { ICAProperties }
+ kICAProperty = $70726F70 (* 'prop' *); { }
+ { file properties }
+ { }
+ { for images, refer to 'Digital Still Camera Image File Format Standard' Exif Version 2.1 section 2.6.4. and 2.6.5. }
+ kICAPropertyImageWidth = $30313030 (* '0100' *); { UInt32 }
+ kICAPropertyImageHeight = $30313031 (* '0101' *); { UInt32 }
+ kICAPropertyImageBitDepth = $30313032 (* '0102' *); { UInt32 }
+ kICAPropertyImageDPI = $30313141 (* '011A' *); { UInt32 }
+ kICAPropertyImageExposureTime = $38323941 (* '829A' *);
+ kICAPropertyImageFNumber = $38323944 (* '829D' *);
+ kICAPropertyImageDateOriginal = $39303033 (* '9003' *); { null terminated string (YYYYMMDDThhmmss.s) }
+ kICAPropertyImageDateDigitized = $39303034 (* '9004' *); { null terminated string (YYYYMMDDThhmmss.s) }
+ kICAPropertyImageShutterSpeed = $39323031 (* '9201' *); { }
+ kICAPropertyImageAperture = $39323032 (* '9202' *); { }
+ kICAPropertyImageFlash = $39323039 (* '9209' *); { UInt16 }
+ kICAPropertyColorSpace = $41303031 (* 'A001' *); { UInt16 }
+ kICAPropertyImageFilename = $6966696C (* 'ifil' *); { null terminated string }
+ kICAPropertyImageSize = $6973697A (* 'isiz' *); { UInt32 }
+ kICAPropertyImageData = $69646174 (* 'idat' *); { void * }
+ kICAPropertyImageThumbnail = $7468756D (* 'thum' *); { void * }
+ kICAPropertyColorSyncProfile = $70726F66 (* 'prof' *);
+
+ { Messages }
+ kICAMessageConnect = $6F70656E (* 'open' *);
+ kICAMessageDisconnect = $636C6F73 (* 'clos' *);
+ kICAMessageReset = $72657365 (* 'rese' *);
+ kICAMessageCheckDevice = $63686B64 (* 'chkd' *);
+
+
+ { Data type definitions, mapped to AppleEvent types }
+ kICATypeUInt16 = $75693136 (* 'ui16' *); { UInt16 }
+ kICATypeUInt32 = $75693332 (* 'ui32' *); { UInt32 }
+ kICATypeUInt64 = $75693634 (* 'ui64' *); { UInt64 }
+ kICATypeSInt16 = $73693136 (* 'si16' *); { SInt16 }
+ kICATypeSInt32 = $73693332 (* 'si32' *); { SInt32 }
+ kICATypeSInt64 = $73693634 (* 'si64' *); { SInt64 }
+ kICATypeFixed = $73696E67 (* 'sing' *); { typeIEEE32BitFloatingPoint }
+ kICATypeBoolean = $626F6F6C (* 'bool' *); { typeBoolean }
+ kICATypeString = $54455854 (* 'TEXT' *); { typeChar }
+ kICATypeData = $64617461 (* 'data' *); { void * }
+ kICATypeThumbnail = $7468756D (* 'thum' *); { ICAThumbnail }
+
+
+ { Flags for PropertyInfo flag element }
+ kICAFlagReadWriteAccess = $00000001;
+ kICAFlagReadAccess = $00000002;
+
+
+ { Notification types (Refer to section 12.4 of PTP spec) }
+ kICAEventCancelTransaction = $65636E74 (* 'ecnt' *);
+ kICAEventObjectAdded = $656F6261 (* 'eoba' *);
+ kICAEventObjectRemoved = $656F6272 (* 'eobr' *);
+ kICAEventStoreAdded = $65737461 (* 'esta' *);
+ kICAEventStoreRemoved = $65737472 (* 'estr' *);
+ kICAEventDeviceAdded = $65646561 (* 'edea' *);
+ kICAEventDeviceRemoved = $65646572 (* 'eder' *);
+ kICAEventDevicePropChanged = $65647063 (* 'edpc' *);
+ kICAEventObjectInfoChanged = $656F6963 (* 'eoic' *);
+ kICAEventDeviceInfoChanged = $65646963 (* 'edic' *);
+ kICAEventRequestObjectTransfer = $65726F74 (* 'erot' *);
+ kICAEventStoreFull = $65737466 (* 'estf' *);
+ kICAEventDeviceReset = $65647672 (* 'edvr' *);
+ kICAEventStorageInfoChanged = $65736963 (* 'esic' *);
+ kICAEventCaptureComplete = $65637063 (* 'ecpc' *);
+ kICAEventUnreportedStatus = $65757273 (* 'eurs' *);
+
+
+ { Used for partial reads via ICAGetPropertyData }
+ kICAStartAtBeginning = 0;
+ kICAEntireLength = -1;
+
+ { ICADownloadFile flags }
+ kDeleteAfterDownload = $00000001;
+ kCreateCustomIcon = $00000002;
+ kAddMetaDataToFinderComment = $00000004;
+ kAdjustCreationDate = $00000008;
+ kSetFileTypeAndCreator = $00000010;
+ kEmbedColorSyncProfile = $00000020;
+ kRotateImage = $00000040;
+
+
+ {
+ --------------- Structures ---------------
+ }
+
+type
+ ICAObjectInfoPtr = ^ICAObjectInfo;
+ ICAObjectInfo = record
+ objectType: OSType; { i.e. kICAFile }
+ objectSubtype: OSType; { i.e. kICAFileImage }
+ end;
+
+ ICAPropertyInfoPtr = ^ICAPropertyInfo;
+ ICAPropertyInfo = record
+ propertyType: OSType;
+ dataType: OSType;
+ dataSize: UInt32;
+ dataFlags: UInt32;
+ end;
+
+ ICAMessagePtr = ^ICAMessage;
+ ICAMessage = record
+ messageType: OSType; { <-- i.e. kICAMessageCameraCaptureNewImage }
+ startByte: UInt32; { <-- }
+ dataPtr: Ptr; { <-- }
+ dataSize: UInt32; { <-- }
+ dataType: OSType; { <-- }
+ end;
+
+ ICAThumbnailPtr = ^ICAThumbnail;
+ ICAThumbnail = record
+ width: UInt32;
+ height: UInt32;
+ dataSize: UInt32;
+ data: SInt8; { 8-bit RGB data (RGBRGBRGB...) }
+ end;
+
+
+const
+ kICAPBVersion = $00010000;
+
+ {
+ --------------- Completion Procs ---------------
+ }
+ {
+
+ NOTE: the parameter for the completion proc (ICAHeader*) has to be casted to the appropriate type
+ e.g. (ICAGetChildCountPB*), ...
+
+ }
+
+
+type
+ ICAHeaderPtr = ^ICAHeader;
+{$ifc TYPED_FUNCTION_POINTERS}
+ ICACompletion = procedure(pb: ICAHeaderPtr);
+{$elsec}
+ ICACompletion = ProcPtr;
+{$endc}
+
+ {
+ --------------- ICAHeader ---------------
+ }
+ ICAHeader = record
+ err: OSErr; { --> }
+ refcon: UInt32; { <-- }
+ end;
+
+ {
+ --------------- Object parameter blocks ---------------
+ }
+ ICAGetChildCountPBPtr = ^ICAGetChildCountPB;
+ ICAGetChildCountPB = record
+ header: ICAHeader;
+ objct: ICAObject; { <-- }
+ count: UInt32; { --> }
+ end;
+
+ ICAGetNthChildPBPtr = ^ICAGetNthChildPB;
+ ICAGetNthChildPB = record
+ header: ICAHeader;
+ parentObject: ICAObject; { <-- }
+ index: UInt32; { <-- zero based }
+ childObject: ICAObject; { --> }
+ childInfo: ICAObjectInfo; { --> }
+ end;
+
+ ICAGetObjectInfoPBPtr = ^ICAGetObjectInfoPB;
+ ICAGetObjectInfoPB = record
+ header: ICAHeader;
+ objct: ICAObject; { <-- }
+ objectInfo: ICAObjectInfo; { --> }
+ end;
+
+ ICAGetParentOfObjectPBPtr = ^ICAGetParentOfObjectPB;
+ ICAGetParentOfObjectPB = record
+ header: ICAHeader;
+ objct: ICAObject; { <-- }
+ parentObject: ICAObject; { --> }
+ parentInfo: ICAObjectInfo; { --> }
+ end;
+
+ ICAGetRootOfObjectPBPtr = ^ICAGetRootOfObjectPB;
+ ICAGetRootOfObjectPB = record
+ header: ICAHeader;
+ objct: ICAObject; { <-- }
+ rootObject: ICAObject; { --> }
+ rootInfo: ICAObjectInfo; { --> }
+ end;
+
+ ICAGetObjectRefConPBPtr = ^ICAGetObjectRefConPB;
+ ICAGetObjectRefConPB = record
+ header: ICAHeader;
+ objct: ICAObject; { <-- }
+ objectRefCon: UInt32; { --> }
+ end;
+
+ ICASetObjectRefConPBPtr = ^ICASetObjectRefConPB;
+ ICASetObjectRefConPB = record
+ header: ICAHeader;
+ objct: ICAObject; { <-- }
+ objectRefCon: UInt32; { <-- }
+ end;
+
+ {
+ --------------- Property parameter blocks ---------------
+ }
+ ICAGetPropertyCountPBPtr = ^ICAGetPropertyCountPB;
+ ICAGetPropertyCountPB = record
+ header: ICAHeader;
+ objct: ICAObject; { <-- }
+ count: UInt32; { --> }
+ end;
+
+ ICAGetNthPropertyPBPtr = ^ICAGetNthPropertyPB;
+ ICAGetNthPropertyPB = record
+ header: ICAHeader;
+ objct: ICAObject; { <-- }
+ index: UInt32; { <-- zero based }
+ proprty: ICAProperty; { --> }
+ propertyInfo: ICAPropertyInfo; { --> }
+ end;
+
+ ICAGetPropertyByTypePBPtr = ^ICAGetPropertyByTypePB;
+ ICAGetPropertyByTypePB = record
+ header: ICAHeader;
+ objct: ICAObject; { <-- }
+ propertyType: OSType; { <-- }
+ proprty: ICAProperty; { --> }
+ propertyInfo: ICAPropertyInfo; { --> }
+ end;
+
+ ICAGetPropertyInfoPBPtr = ^ICAGetPropertyInfoPB;
+ ICAGetPropertyInfoPB = record
+ header: ICAHeader;
+ proprty: ICAProperty; { <-- }
+ propertyInfo: ICAPropertyInfo; { --> }
+ end;
+
+ ICAGetPropertyDataPBPtr = ^ICAGetPropertyDataPB;
+ ICAGetPropertyDataPB = record
+ header: ICAHeader;
+ proprty: ICAProperty; { <-- }
+ startByte: UInt32; { <-- }
+ requestedSize: UInt32; { <-- }
+ dataPtr: Ptr; { <-> }
+ actualSize: UInt32; { --> }
+ dataType: OSType; { --> }
+ end;
+
+ ICASetPropertyDataPBPtr = ^ICASetPropertyDataPB;
+ ICASetPropertyDataPB = record
+ header: ICAHeader;
+ proprty: ICAProperty; { <-- }
+ startByte: UInt32; { <-- }
+ dataPtr: Ptr; { <-- }
+ dataSize: UInt32; { <-- }
+ dataType: OSType; { <-- }
+ end;
+
+ ICAGetParentOfPropertyPBPtr = ^ICAGetParentOfPropertyPB;
+ ICAGetParentOfPropertyPB = record
+ header: ICAHeader;
+ proprty: ICAProperty; { <-- }
+ parentObject: ICAObject; { --> }
+ parentInfo: ICAObjectInfo; { --> }
+ end;
+
+ ICAGetRootOfPropertyPBPtr = ^ICAGetRootOfPropertyPB;
+ ICAGetRootOfPropertyPB = record
+ header: ICAHeader;
+ proprty: ICAProperty; { <-- }
+ rootObject: ICAObject; { --> }
+ rootInfo: ICAObjectInfo; { --> }
+ end;
+
+ ICAGetPropertyRefConPBPtr = ^ICAGetPropertyRefConPB;
+ ICAGetPropertyRefConPB = record
+ header: ICAHeader;
+ proprty: ICAProperty; { <-- }
+ propertyRefCon: UInt32; { --> }
+ end;
+
+ ICASetPropertyRefConPBPtr = ^ICASetPropertyRefConPB;
+ ICASetPropertyRefConPB = record
+ header: ICAHeader;
+ proprty: ICAProperty; { <-- }
+ propertyRefCon: UInt32; { <-- }
+ end;
+
+ {
+ --------------- Device parameter blocks ---------------
+ }
+ ICAGetDeviceListPBPtr = ^ICAGetDeviceListPB;
+ ICAGetDeviceListPB = record
+ header: ICAHeader;
+ objct: ICAObject; { --> }
+ end;
+
+ ICAObjectSendMessagePBPtr = ^ICAObjectSendMessagePB;
+ ICAObjectSendMessagePB = record
+ header: ICAHeader;
+ objct: ICAObject; { <-- }
+ message: ICAMessage; { <-- }
+ result: UInt32; { --> message specific result }
+ end;
+
+ ICARegisterEventNotificationPBPtr = ^ICARegisterEventNotificationPB;
+ ICARegisterEventNotificationPB = record
+ header: ICAHeader;
+ objct: ICAObject; { <-- }
+ notifyType: OSType; { <-- }
+ notifyProc: ICACompletion; { <-- }
+ end;
+
+ ICADownloadFilePBPtr = ^ICADownloadFilePB;
+ ICADownloadFilePB = record
+ header: ICAHeader;
+ objct: ICAObject; { <-- }
+ dirFSRef: FSRefPtr; { <-- }
+ flags: UInt32; { <-- }
+ fileType: OSType; { <-- }
+ fileCreator: OSType; { <-- }
+ rotationAngle: Fixed; { <-- }
+ fileFSRef: FSRefPtr; { --> can be NULL }
+ end;
+
+ ICACopyObjectPropertyDictionaryPBPtr = ^ICACopyObjectPropertyDictionaryPB;
+ ICACopyObjectPropertyDictionaryPB = record
+ header: ICAHeader;
+ objct: ICAObject; { <-- }
+ theDict: ^CFDictionaryRef; { --> }
+ end;
+
+ {
+
+ NOTE: for all APIs - pass NULL as completion parameter to make a synchronous call
+
+ }
+ {
+ --------------- Object functions ---------------
+ }
+
+ {
+ * ICAGetChildCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAGetChildCount(var pb: ICAGetChildCountPB; completion: ICACompletion): OSErr; external name '_ICAGetChildCount';
+
+{
+ * ICAGetNthChild()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAGetNthChild(var pb: ICAGetNthChildPB; completion: ICACompletion): OSErr; external name '_ICAGetNthChild';
+
+{
+ * ICAGetObjectInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAGetObjectInfo(var pb: ICAGetObjectInfoPB; completion: ICACompletion): OSErr; external name '_ICAGetObjectInfo';
+
+{
+ * ICAGetParentOfObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAGetParentOfObject(var pb: ICAGetParentOfObjectPB; completion: ICACompletion): OSErr; external name '_ICAGetParentOfObject';
+
+{
+ * ICAGetRootOfObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAGetRootOfObject(var pb: ICAGetRootOfObjectPB; completion: ICACompletion): OSErr; external name '_ICAGetRootOfObject';
+
+{
+ * ICAGetObjectRefCon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAGetObjectRefCon(var pb: ICAGetObjectRefConPB; completion: ICACompletion): OSErr; external name '_ICAGetObjectRefCon';
+
+{
+ * ICASetObjectRefCon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICASetObjectRefCon(var pb: ICASetObjectRefConPB; completion: ICACompletion): OSErr; external name '_ICASetObjectRefCon';
+
+
+{
+--------------- Property functions ---------------
+}
+{
+ * ICAGetPropertyCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAGetPropertyCount(var pb: ICAGetPropertyCountPB; completion: ICACompletion): OSErr; external name '_ICAGetPropertyCount';
+
+{
+ * ICAGetNthProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAGetNthProperty(var pb: ICAGetNthPropertyPB; completion: ICACompletion): OSErr; external name '_ICAGetNthProperty';
+
+{
+ * ICAGetPropertyByType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAGetPropertyByType(var pb: ICAGetPropertyByTypePB; completion: ICACompletion): OSErr; external name '_ICAGetPropertyByType';
+
+{
+ * ICAGetPropertyInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAGetPropertyInfo(var pb: ICAGetPropertyInfoPB; completion: ICACompletion): OSErr; external name '_ICAGetPropertyInfo';
+
+{
+ * ICAGetPropertyData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAGetPropertyData(var pb: ICAGetPropertyDataPB; completion: ICACompletion): OSErr; external name '_ICAGetPropertyData';
+
+{
+ * ICASetPropertyData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICASetPropertyData(var pb: ICASetPropertyDataPB; completion: ICACompletion): OSErr; external name '_ICASetPropertyData';
+
+{
+ * ICAGetParentOfProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAGetParentOfProperty(var pb: ICAGetParentOfPropertyPB; completion: ICACompletion): OSErr; external name '_ICAGetParentOfProperty';
+
+{
+ * ICAGetRootOfProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAGetRootOfProperty(var pb: ICAGetRootOfPropertyPB; completion: ICACompletion): OSErr; external name '_ICAGetRootOfProperty';
+
+{
+ * ICAGetPropertyRefCon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAGetPropertyRefCon(var pb: ICAGetPropertyRefConPB; completion: ICACompletion): OSErr; external name '_ICAGetPropertyRefCon';
+
+{
+ * ICASetPropertyRefCon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICASetPropertyRefCon(var pb: ICASetPropertyRefConPB; completion: ICACompletion): OSErr; external name '_ICASetPropertyRefCon';
+
+
+{
+--------------- Device functions ---------------
+}
+{
+ * ICAGetDeviceList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAGetDeviceList(var pb: ICAGetDeviceListPB; completion: ICACompletion): OSErr; external name '_ICAGetDeviceList';
+
+{
+ * ICAObjectSendMessage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAObjectSendMessage(var pb: ICAObjectSendMessagePB; completion: ICACompletion): OSErr; external name '_ICAObjectSendMessage';
+
+{
+ * ICARegisterEventNotification()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICARegisterEventNotification(var pb: ICARegisterEventNotificationPB; completion: ICACompletion): OSErr; external name '_ICARegisterEventNotification';
+
+
+{
+------------------------------------------------
+}
+{
+ * ICADownloadFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function ICADownloadFile(var pb: ICADownloadFilePB; completion: ICACompletion): OSErr; external name '_ICADownloadFile';
+
+
+{
+ * ICACopyObjectPropertyDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function ICACopyObjectPropertyDictionary(var pb: ICACopyObjectPropertyDictionaryPB; completion: ICACompletion): OSErr; external name '_ICACopyObjectPropertyDictionary';
+
+{$ALIGN MAC68K}
+
+
+{unit ICADevice}
+{
+ File: ICADevice.p
+
+ Contains: Image Capture device definitions. This file is included
+
+ Version: Technology: 1.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 2000-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+--------------- Completion Procs ---------------
+}
+{
+
+ NOTE: the parameter for the completion proc (ICDHeader*) has to be casted to the appropriate type
+ e.g. (ICD_BuildObjectChildrenPB*), ...
+
+}
+
+type
+ ICDHeaderPtr = ^ICDHeader;
+{$ifc TYPED_FUNCTION_POINTERS}
+ ICDCompletion = procedure(pb: ICDHeaderPtr);
+{$elsec}
+ ICDCompletion = ProcPtr;
+{$endc}
+
+ {
+ --------------- ICDHeader ---------------
+ }
+ ICDHeader = record
+ err: OSErr; { --> }
+ refcon: UInt32; { <-- }
+ end;
+
+ {
+ --------------- Object parameter blocks ---------------
+ }
+ ICD_NewObjectPBPtr = ^ICD_NewObjectPB;
+ ICD_NewObjectPB = record
+ header: ICDHeader;
+ parentObject: ICAObject; { <-- }
+ objectInfo: ICAObjectInfo; { <-- }
+ objct: ICAObject; { --> }
+ end;
+
+ ICD_DisposeObjectPBPtr = ^ICD_DisposeObjectPB;
+ ICD_DisposeObjectPB = record
+ header: ICDHeader;
+ objct: ICAObject; { <-- }
+ end;
+
+ {
+ --------------- Property parameter blocks ---------------
+ }
+ ICD_NewPropertyPBPtr = ^ICD_NewPropertyPB;
+ ICD_NewPropertyPB = record
+ header: ICDHeader;
+ objct: ICAObject; { <-- }
+ propertyInfo: ICAPropertyInfo; { <-- }
+ proprty: ICAProperty; { --> }
+ end;
+
+ ICD_DisposePropertyPBPtr = ^ICD_DisposePropertyPB;
+ ICD_DisposePropertyPB = record
+ header: ICDHeader;
+ proprty: ICAProperty; { <-- }
+ end;
+
+ {
+
+ NOTE: for all APIs - pass NULL as completion parameter to make a synchronous call
+
+ }
+
+ {
+ --------------- Object utilities for device libraries ---------------
+ }
+ {
+ * ICDNewObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICDNewObject(var pb: ICD_NewObjectPB; completion: ICDCompletion): OSErr; external name '_ICDNewObject';
+
+{
+ * ICDDisposeObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICDDisposeObject(var pb: ICD_DisposeObjectPB; completion: ICDCompletion): OSErr; external name '_ICDDisposeObject';
+
+{
+ * ICDNewProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICDNewProperty(var pb: ICD_NewPropertyPB; completion: ICDCompletion): OSErr; external name '_ICDNewProperty';
+
+{
+ * ICDDisposeProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ImageCaptureLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICDDisposeProperty(var pb: ICD_DisposePropertyPB; completion: ICDCompletion): OSErr; external name '_ICDDisposeProperty';
+
+
+{$ALIGN MAC68K}
+
+
+{unit Notification}
+{
+ File: HIToolbox/Notification.h
+
+ Contains: Notification Manager interfaces
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1989-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+type
+ NMRecPtr = ^NMRec;
+ NMProcPtr = procedure( nmReqPtr: NMRecPtr );
+ NMUPP = NMProcPtr;
+ NMRec = record
+ qLink: QElemPtr; { next queue entry}
+ qType: SInt16; { queue type -- ORD(nmType) = 8}
+ nmFlags: SInt16; { reserved}
+ nmPrivate: SInt32; { reserved}
+ nmReserved: SInt16; { reserved}
+ nmMark: SInt16; { item to mark in Apple menu}
+ nmIcon: Handle; { handle to small icon}
+ nmSound: Handle; { handle to sound record}
+ nmStr: StringPtr; { string to appear in alert}
+ nmResp: NMUPP; { pointer to response routine}
+ nmRefCon: SInt32; { for application use}
+ end;
+
+{
+ * NewNMUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewNMUPP( userRoutine: NMProcPtr ): NMUPP; external name '_NewNMUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeNMUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeNMUPP( userUPP: NMUPP ); external name '_DisposeNMUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeNMUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeNMUPP( nmReqPtr: NMRecPtr; userUPP: NMUPP ); external name '_InvokeNMUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NMInstall()
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function NMInstall( nmReqPtr: NMRecPtr ): OSErr; external name '_NMInstall';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * NMRemove()
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function NMRemove( nmReqPtr: NMRecPtr ): OSErr; external name '_NMRemove';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+
+
+{unit Resources}
+{
+ File: Resources.p
+
+ Contains: Resource Manager Interfaces.
+
+ Version: Technology: Mac OS 8.1
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ resSysHeap = 64; { System or application heap? }
+ resPurgeable = 32; { Purgeable resource? }
+ resLocked = 16; { Load it in locked? }
+ resProtected = 8; { Protected? }
+ resPreload = 4; { Load in on OpenResFile? }
+ resChanged = 2; { Resource changed? }
+ mapReadOnly = 128; { Resource file read-only }
+ mapCompact = 64; { Compact resource file }
+ mapChanged = 32; { Write map out at update }
+
+ resSysRefBit = 7; { reference to system/local reference }
+ resSysHeapBit = 6; { In system/in application heap }
+ resPurgeableBit = 5; { Purgeable/not purgeable }
+ resLockedBit = 4; { Locked/not locked }
+ resProtectedBit = 3; { Protected/not protected }
+ resPreloadBit = 2; { Read in at OpenResource? }
+ resChangedBit = 1; { Existing resource changed since last update }
+ mapReadOnlyBit = 7; { is this file read-only? }
+ mapCompactBit = 6; { Is a compact necessary? }
+ mapChangedBit = 5; { Is it necessary to write map? }
+
+ kResFileNotOpened = -1; { ref num return as error when opening a resource file }
+ kSystemResFile = 0; { this is the default ref num to the system file }
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ ResErrProcPtr = procedure(thErr: OSErr);
+{$elsec}
+ ResErrProcPtr = Register68kProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ ResErrUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ResErrUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppResErrProcInfo = $00001002;
+ {
+ * NewResErrUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewResErrUPP(userRoutine: ResErrProcPtr): ResErrUPP; external name '_NewResErrUPP'; { old name was NewResErrProc }
+{
+ * DisposeResErrUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeResErrUPP(userUPP: ResErrUPP); external name '_DisposeResErrUPP';
+{
+ * InvokeResErrUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeResErrUPP(thErr: OSErr; userRoutine: ResErrUPP); external name '_InvokeResErrUPP'; { old name was CallResErrProc }
+{ QuickTime 3.0 }
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ ResourceEndianFilterPtr = function(theResource: Handle; currentlyNativeEndian: boolean): OSErr;
+{$elsec}
+ ResourceEndianFilterPtr = ProcPtr;
+{$endc}
+
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * InitResources()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InitResources: SInt16; external name '_InitResources';
+{
+ * RsrcZoneInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure RsrcZoneInit; external name '_RsrcZoneInit';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * CloseResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure CloseResFile(refNum: SInt16); external name '_CloseResFile';
+{
+ * ResError()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ResError: OSErr; external name '_ResError';
+{
+ * CurResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CurResFile: SInt16; external name '_CurResFile';
+{
+ * HomeResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HomeResFile(theResource: Handle): SInt16; external name '_HomeResFile';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * CreateResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure CreateResFile(const (*var*) fileName: Str255); external name '_CreateResFile';
+{
+ * OpenResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function OpenResFile(const (*var*) fileName: Str255): SInt16; external name '_OpenResFile';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * UseResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure UseResFile(refNum: SInt16); external name '_UseResFile';
+{
+ * CountTypes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CountTypes: SInt16; external name '_CountTypes';
+{
+ * Count1Types()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function Count1Types: SInt16; external name '_Count1Types';
+{
+ * GetIndType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetIndType(var theType: ResType; index: SInt16); external name '_GetIndType';
+{
+ * Get1IndType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure Get1IndType(var theType: ResType; index: SInt16); external name '_Get1IndType';
+{
+ * SetResLoad()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetResLoad(load: boolean); external name '_SetResLoad';
+{
+ * CountResources()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CountResources(theType: ResType): SInt16; external name '_CountResources';
+{
+ * Count1Resources()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function Count1Resources(theType: ResType): SInt16; external name '_Count1Resources';
+{
+ * GetIndResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIndResource(theType: ResType; index: SInt16): Handle; external name '_GetIndResource';
+{
+ * Get1IndResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function Get1IndResource(theType: ResType; index: SInt16): Handle; external name '_Get1IndResource';
+{
+ * GetResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetResource(theType: ResType; theID: SInt16): Handle; external name '_GetResource';
+{
+ * Get1Resource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function Get1Resource(theType: ResType; theID: SInt16): Handle; external name '_Get1Resource';
+{
+ * GetNamedResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetNamedResource(theType: ResType; const (*var*) name: Str255): Handle; external name '_GetNamedResource';
+{
+ * Get1NamedResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function Get1NamedResource(theType: ResType; const (*var*) name: Str255): Handle; external name '_Get1NamedResource';
+{
+ * [Mac]LoadResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LoadResource(theResource: Handle); external name '_LoadResource';
+{
+ * ReleaseResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure ReleaseResource(theResource: Handle); external name '_ReleaseResource';
+{
+ * DetachResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DetachResource(theResource: Handle); external name '_DetachResource';
+{
+ * UniqueID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UniqueID(theType: ResType): SInt16; external name '_UniqueID';
+{
+ * Unique1ID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function Unique1ID(theType: ResType): SInt16; external name '_Unique1ID';
+{
+ * GetResAttrs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetResAttrs(theResource: Handle): SInt16; external name '_GetResAttrs';
+{
+ * GetResInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetResInfo(theResource: Handle; var theID: SInt16; var theType: ResType; var name: Str255); external name '_GetResInfo';
+{
+ * SetResInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetResInfo(theResource: Handle; theID: SInt16; const (*var*) name: Str255); external name '_SetResInfo';
+{
+ * AddResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure AddResource(theData: Handle; theType: ResType; theID: SInt16; const (*var*) name: Str255); external name '_AddResource';
+{
+ * GetResourceSizeOnDisk()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetResourceSizeOnDisk(theResource: Handle): SInt32; external name '_GetResourceSizeOnDisk';
+{
+ * GetMaxResourceSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetMaxResourceSize(theResource: Handle): SInt32; external name '_GetMaxResourceSize';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * RsrcMapEntry()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RsrcMapEntry(theResource: Handle): SInt32; external name '_RsrcMapEntry';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * SetResAttrs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetResAttrs(theResource: Handle; attrs: SInt16); external name '_SetResAttrs';
+{
+ * ChangedResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure ChangedResource(theResource: Handle); external name '_ChangedResource';
+{
+ * RemoveResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure RemoveResource(theResource: Handle); external name '_RemoveResource';
+{
+ * UpdateResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure UpdateResFile(refNum: SInt16); external name '_UpdateResFile';
+{
+ * WriteResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure WriteResource(theResource: Handle); external name '_WriteResource';
+{
+ * SetResPurge()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetResPurge(install: boolean); external name '_SetResPurge';
+{
+ * GetResFileAttrs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetResFileAttrs(refNum: SInt16): SInt16; external name '_GetResFileAttrs';
+{
+ * SetResFileAttrs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetResFileAttrs(refNum: SInt16; attrs: SInt16); external name '_SetResFileAttrs';
+{
+ * OpenRFPerm()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OpenRFPerm(const (*var*) fileName: Str255; vRefNum: SInt16; permission: SInt8): SInt16; external name '_OpenRFPerm';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * RGetResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RGetResource(theType: ResType; theID: SInt16): Handle; external name '_RGetResource';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * HOpenResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HOpenResFile(vRefNum: SInt16; dirID: SInt32; const (*var*) fileName: Str255; permission: SInt8): SInt16; external name '_HOpenResFile';
+{
+ * HCreateResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HCreateResFile(vRefNum: SInt16; dirID: SInt32; const (*var*) fileName: Str255); external name '_HCreateResFile';
+{
+ * FSpOpenResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpOpenResFile(const (*var*) spec: FSSpec; permission: SignedByte): SInt16; external name '_FSpOpenResFile';
+{
+ * FSpCreateResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure FSpCreateResFile(const (*var*) spec: FSSpec; creator: OSType; fileType: OSType; scriptTag: ScriptCode); external name '_FSpCreateResFile';
+{
+ * ReadPartialResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure ReadPartialResource(theResource: Handle; offset: SInt32; buffer: UnivPtr; count: SInt32); external name '_ReadPartialResource';
+{
+ * WritePartialResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure WritePartialResource(theResource: Handle; offset: SInt32; buffer: UnivPtr; count: SInt32); external name '_WritePartialResource';
+{
+ * SetResourceSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetResourceSize(theResource: Handle; newSize: SInt32); external name '_SetResourceSize';
+{
+ * GetNextFOND()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetNextFOND(fondHandle: Handle): Handle; external name '_GetNextFOND';
+{ QuickTime 3.0 }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * RegisterResourceEndianFilter()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RegisterResourceEndianFilter(theType: ResType; theFilterProc: ResourceEndianFilterPtr): OSErr; external name '_RegisterResourceEndianFilter';
+
+{ Use TempInsertROMMap to force the ROM resource map to be
+ inserted into the chain in front of the system. Note that
+ this call is only temporary - the modified resource chain
+ is only used for the next call to the resource manager.
+ See IM IV 19 for more information.
+}
+{
+ * TempInsertROMMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure TempInsertROMMap(tempResLoad: boolean); external name '_TempInsertROMMap';
+{
+ _________________________________________________________________________________________________________
+
+ ¥ RESOURCE CHAIN LOCATION - for use with the Resource Manager chain manipulation routines under Carbon.
+ _________________________________________________________________________________________________________
+}
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+type
+ RsrcChainLocation = SInt16;
+
+const
+ kRsrcChainBelowSystemMap = 0; { Below the system's resource map }
+ kRsrcChainBelowApplicationMap = 1; { Below the application's resource map }
+ kRsrcChainAboveApplicationMap = 2; { Above the application's resource map }
+ kRsrcChainAboveAllMaps = 4; { Above all resource maps }
+
+ {
+ If the file is already in the resource chain, it is removed and re-inserted at the specified location
+ If the file has been detached, it is added to the resource chain at the specified location
+ Returns resFNotFound if it's not currently open.
+ }
+ {
+ * InsertResourceFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InsertResourceFile(refNum: SInt16; where: RsrcChainLocation): OSErr; external name '_InsertResourceFile';
+
+{
+ If the file is not currently in the resource chain, this returns resNotFound
+ Otherwise, the resource file is removed from the resource chain.
+}
+{
+ * DetachResourceFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DetachResourceFile(refNum: SInt16): OSErr; external name '_DetachResourceFile';
+
+{
+ Returns true if the resource file is already open and known by the Resource Manager (i.e., it is
+ either in the current resource chain or it's a detached resource file.) If it's in the resource
+ chain, the inChain Boolean is set to true on exit and true is returned. If it's an open file, but
+ the file is currently detached, inChain is set to false and true is returned. If the file is open,
+ the refNum to the file is returned.
+}
+{
+ * FSpResourceFileAlreadyOpen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpResourceFileAlreadyOpen(const (*var*) resourceFile: FSSpec; var inChain: boolean; var refNum: SInt16): boolean; external name '_FSpResourceFileAlreadyOpen';
+{
+ FSpOpenOrphanResFile should be used to open a resource file that is persistent across all contexts,
+ because using OpenResFile normally loads a map and all preloaded resources into the application
+ context. FSpOpenOrphanResFile loads everything into the system context and detaches the file
+ from the context in which it was opened. If the file is already in the resource chain and a new
+ instance is not opened, FSpOpenOrphanResFile will return a paramErr.
+ Use with care, as can and will fail if the map is very large or a lot of preload
+ resources exist.
+}
+{
+ * FSpOpenOrphanResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSpOpenOrphanResFile(const (*var*) spec: FSSpec; permission: SignedByte; var refNum: SInt16): OSErr; external name '_FSpOpenOrphanResFile';
+
+{
+ GetTopResourceFile returns the refNum of the top most resource map in the current resource chain. If
+ the resource chain is empty it returns resFNotFound.
+}
+{
+ * GetTopResourceFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetTopResourceFile(var refNum: SInt16): OSErr; external name '_GetTopResourceFile';
+
+{
+ GetNextResourceFile can be used to iterate over resource files in the resource chain. By passing a
+ valid refNum in curRefNum it will return in nextRefNum the refNum of the next file in
+ the chain. If curRefNum is not found in the resource chain, GetNextResourceFile returns resFNotFound.
+ When the end of the chain is reached GetNextResourceFile will return noErr and nextRefNum will be NIL.
+}
+{
+ * GetNextResourceFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetNextResourceFile(curRefNum: SInt16; var nextRefNum: SInt16): OSErr; external name '_GetNextResourceFile';
+
+
+{$ifc OLDROUTINENAMES}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * SizeResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SizeResource(theResource: Handle): SInt32; external name '_SizeResource';
+{
+ * MaxSizeRsrc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function MaxSizeRsrc(theResource: Handle): SInt32; external name '_MaxSizeRsrc';
+{
+ * RmveResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure RmveResource(theResource: Handle); external name '_RmveResource';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {OLDROUTINENAMES}
+
+{
+ * FSOpenResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSOpenResFile(const (*var*) ref: FSRef; permission: SInt8): SInt16; external name '_FSOpenResFile';
+{
+ * FSCreateResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure FSCreateResFile(const (*var*) parentRef: FSRef; nameLength: UniCharCount; name: UniCharPtr; whichInfo: FSCatalogInfoBitmap; const (*var*) catalogInfo: FSCatalogInfo; newRef: FSRefPtr; newSpec: FSSpecPtr); external name '_FSCreateResFile';
+{
+ * FSResourceFileAlreadyOpen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSResourceFileAlreadyOpen(const (*var*) resourceFileRef: FSRef; var inChain: boolean; var refNum: SInt16): boolean; external name '_FSResourceFileAlreadyOpen';
+{
+ * FSCreateResourceFile()
+ *
+ * Summary:
+ * Creates a new resource file.
+ *
+ * Discussion:
+ * This function creates a new file and initializes the specified
+ * named fork as an empty resource fork. This function allows for
+ * the creation of data fork only files which can be used for
+ * storing resources. Passing in a null name defaults to using the
+ * data fork.
+ *
+ * Parameters:
+ *
+ * parentRef:
+ * The directory where the file is to be created
+ *
+ * nameLength:
+ * Number of Unicode characters in the file's name
+ *
+ * name:
+ * A pointer to the Unicode name
+ *
+ * whichInfo:
+ * Which catalog info fields to set
+ *
+ * catalogInfo:
+ * The values for catalog info fields to set; may be NULL
+ *
+ * forkNameLength:
+ * The length of the fork name (in Unicode characters)
+ *
+ * forkName:
+ * The name of the fork to initialize (in Unicode); may be NULL
+ *
+ * newRef:
+ * A pointer to the FSRef for the new file; may be NULL
+ *
+ * newSpec:
+ * A pointer to the FSSpec for the new directory; may be NULL
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSCreateResourceFile(const (*var*) parentRef: FSRef; nameLength: UniCharCount; name: UniCharPtr; whichInfo: FSCatalogInfoBitmap; catalogInfo: {Const}FSCatalogInfoPtr; forkNameLength: UniCharCount; forkName: UniCharPtr; newRef: FSRefPtr; newSpec: FSSpecPtr): OSErr; external name '_FSCreateResourceFile';
+
+{
+ * FSOpenResourceFile()
+ *
+ * Summary:
+ * Opens the specified named fork as a resource fork.
+ *
+ * Discussion:
+ * This function allows any named fork of a file to be used for
+ * storing resources. Passing in a null forkname will result in the
+ * data fork being used.
+ *
+ * Parameters:
+ *
+ * ref:
+ * The file containing the fork to open
+ *
+ * forkNameLength:
+ * The length of the fork name (in Unicode characters)
+ *
+ * forkName:
+ * The name of the fork to open (in Unicode); may be NULL
+ *
+ * permissions:
+ * The access (read and/or write) you want
+ *
+ * refNum:
+ * On exit the reference number for accessing the open fork
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSOpenResourceFile(const (*var*) ref: FSRef; forkNameLength: UniCharCount; forkName: UniCharPtr; permissions: SInt8; var refNum: SInt16): OSErr; external name '_FSOpenResourceFile';
+
+{
+ These typedefs were originally created for the Copland Resource Mangager
+}
+
+type
+ ResFileRefNum = SInt16;
+ ResID = SInt16;
+ ResAttributes = SInt16;
+ ResFileAttributes = SInt16;
+
+
+{$ALIGN MAC68K}
+
+
+{unit SCNetworkConnection}
+{
+ * Copyright (c) 2002-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,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES of MERCHANTABILITY,
+ * 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, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{!
+ @header SCNetworkConnection
+ The SCNetworkConnectionXXX() APIs allow an application to
+ control connection oriented services defined in the system.
+
+ This is a set of control APIs only. Using these APIs, an
+ application will be able to control existing services.
+ To create, change, or remove services, SCPreferences APIs
+ must be used.
+
+ Note: Currently only PPP services can be controlled.
+ }
+
+
+{!
+ @typedef SCNetworkConnectionRef
+ @discussion This is the handle to manage a connection oriented service.
+ }
+type
+ SCNetworkConnectionRef = ^SInt32;
+
+
+{!
+ @typedef SCNetworkConnectionContext
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+type SCNetworkConnectionContext = record
+ version: CFIndex;
+ info: Ptr;
+ retain: function( info: Ptr ): Ptr;
+ release: procedure( info: Ptr );
+ copyDescription: function( info: Ptr ): CFStringRef;
+ end;
+ SCNetworkConnectionContextPtr = ^SCNetworkConnectionContext;
+
+
+{!
+ @enum SCNetworkConnectionStatus
+ @discussion Status of the network connection.
+ This status is intended to be generic and high level.
+ An extended status, specific to the type of network
+ connection is also available for applications that
+ need additonal information.
+
+ @constant kSCNetworkConnectionInvalid
+ The network connection refers to an invalid service.
+
+ @constant kSCNetworkConnectionDisconnected
+ The network connection is disconnected.
+
+ @constant kSCNetworkConnectionConnecting
+ The network connection is connecting.
+
+ @constant kSCNetworkConnectionConnected
+ The network connection is connected.
+
+ @constant kSCNetworkConnectionDisconnecting
+ The network connection is disconnecting.
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+type
+ SCNetworkConnectionStatus = SInt32;
+const
+ kSCNetworkConnectionInvalid = -1;
+ kSCNetworkConnectionDisconnected = 0;
+ kSCNetworkConnectionConnecting = 1;
+ kSCNetworkConnectionConnected = 2;
+ kSCNetworkConnectionDisconnecting = 3;
+
+
+{!
+ @enum SCNetworkConnectionPPPStatus
+ @discussion PPP specific status of the network connection.
+ This status is PPP specific and returned as part of the extended information
+ for a PPP service.
+ Note: additional status might be returned in the future, and the application should
+ be prepared to receive an unknown value.
+
+ @constant kSCNetworkConnectionPPPDisconnected
+ PPP is disconnected.
+
+ @constant kSCNetworkConnectionPPPInitializing
+ PPP is initializing.
+
+ @constant kSCNetworkConnectionPPPConnectingLink
+ PPP is connecting the lower connection layer (for example, the modem is dialing out).
+
+ @constant kSCNetworkConnectionPPPDialOnTraffic
+ PPP is waiting for networking traffic to automatically establish the connection.
+
+ @constant kSCNetworkConnectionPPPNegotiatingLink
+ PPP lower layer is connected and PPP is negotiating the link layer (LCP protocol).
+
+ @constant kSCNetworkConnectionPPPAuthenticating
+ PPP is authenticating to the server (PAP, CHAP, MS-CHAP or EAP protocols).
+
+ @constant kSCNetworkConnectionPPPWaitingForCallBack
+ PPP is waiting for server to call back.
+
+ @constant kSCNetworkConnectionPPPNegotiatingNetwork
+ PPP is now authenticated and negotiating the networking layer (IPCP or IPv6CP protocols)
+
+ @constant kSCNetworkConnectionPPPConnected
+ PPP is now fully connected for at least one of the networking layer.
+ Additional networking protocol might still be negotiating.
+
+ @constant kSCNetworkConnectionPPPTerminating
+ PPP networking and link protocols are terminating.
+
+ @constant kSCNetworkConnectionPPPDisconnectingLink
+ PPP is disconnecting the lower level (for example, the modem is hanging up).
+
+ @constant kSCNetworkConnectionPPPHoldingLinkOff
+ PPP is disconnected and maintaining the link temporarily off.
+
+ @constant kSCNetworkConnectionPPPSuspended
+ PPP is suspended as a result of the suspend command (for example, when a V92 Modem is On Hold).
+
+ @constant kSCNetworkConnectionPPPWaitingForRedial
+ PPP has found a busy server and is waiting for redial.
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+type
+ SCNetworkConnectionPPPStatus = SInt32;
+const
+ kSCNetworkConnectionPPPDisconnected = 0;
+ kSCNetworkConnectionPPPInitializing = 1;
+ kSCNetworkConnectionPPPConnectingLink = 2;
+ kSCNetworkConnectionPPPDialOnTraffic = 3;
+ kSCNetworkConnectionPPPNegotiatingLink = 4;
+ kSCNetworkConnectionPPPAuthenticating = 5;
+ kSCNetworkConnectionPPPWaitingForCallBack = 6;
+ kSCNetworkConnectionPPPNegotiatingNetwork = 7;
+ kSCNetworkConnectionPPPConnected = 8;
+ kSCNetworkConnectionPPPTerminating = 9;
+ kSCNetworkConnectionPPPDisconnectingLink = 10;
+ kSCNetworkConnectionPPPHoldingLinkOff = 11;
+ kSCNetworkConnectionPPPSuspended = 12;
+ kSCNetworkConnectionPPPWaitingForRedial = 13;
+
+
+{!
+ @typedef SCNetworkConnectionCallBack
+ @discussion Type of the callback function used when a
+ status event is delivered.
+ @param status The connection status.
+ @param connection The connection reference.
+ @param info ....
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+type SCNetworkConnectionCallBack = procedure( connection: SCNetworkConnectionRef; status: SCNetworkConnectionStatus; info: Ptr );
+
+
+{
+ Keys for the statistics dictionary
+}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kSCNetworkConnectionBytesIn CFSTRP('BytesIn')}
+{$endc} { CFNumber }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kSCNetworkConnectionBytesOut CFSTRP('BytesOut')}
+{$endc} { CFNumber }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kSCNetworkConnectionPacketsIn CFSTRP('PacketsIn')}
+{$endc} { CFNumber }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kSCNetworkConnectionPacketsOut CFSTRP('PacketsOut')}
+{$endc} { CFNumber }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kSCNetworkConnectionErrorsIn CFSTRP('ErrorsIn')}
+{$endc} { CFNumber }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kSCNetworkConnectionErrorsOut CFSTRP('ErrorsOut')}
+{$endc} { CFNumber }
+
+
+{!
+ @function SCDynamicStoreGetTypeID
+ Returns the type identifier of all SCNetworkConnection instances.
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkConnectionGetTypeID: CFTypeID; external name '_SCNetworkConnectionGetTypeID';
+
+
+{!
+ @function SCNetworkConnectionCopyUserPreferences
+ @discussion Provides the default serviceID and a userOptions dictionary for the connection.
+ Applications can use the serviceID and userOptions returned to open a connection on the fly.
+ @param selectionOptions Currently unimplemented. Pass NULL for this version.
+ @param serviceID Reference to the default serviceID for starting connections,
+ this value will be returned by the function.
+ @param userOptions Reference to default userOptions for starting connections,
+ this will be returned by the function.
+ @result TRUE if there is a valid service to dial.
+ FALSE if function was unable to retrieve a service to dial.
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkConnectionCopyUserPreferences( selectionOptions: CFDictionaryRef; var serviceID: CFStringRef; var userOptions: CFDictionaryRef ): Boolean; external name '_SCNetworkConnectionCopyUserPreferences';
+
+
+{!
+ @function SCNetworkConnectionCreateWithServiceID
+ @discussion Creates a new connection reference to use for getting the status,
+ for connecting or for disconnecting the associated service.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the connection structure.
+ 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 serviceID A string that defines the service identifier
+ of the connection. Service identifiers uniquely identify
+ services in the system configuration database.
+ @param callout The function to be called when the status
+ of the connection changes.
+ If this parameter is NULL, the application will not receive
+ change of status notifications and will need to poll for updates.
+ @param context The SCNetworkConnectionContext associated with the callout.
+ @result A reference to the new SCNetworkConnection.
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkConnectionCreateWithServiceID( allocator: CFAllocatorRef; serviceID: CFStringRef; callout: SCNetworkConnectionCallBack; var context: SCNetworkConnectionContext ): SCNetworkConnectionRef; external name '_SCNetworkConnectionCreateWithServiceID';
+
+
+{!
+ @function SCNetworkConnectionCopyService
+ @discussion Returns the service ID associated with the SCNetworkConnection.
+ @param connection The SCNetworkConnection to obtained status from.
+ Returns the service ID associated with the SCNetworkConnection.
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkConnectionCopyServiceID( connection: SCNetworkConnectionRef ): CFStringRef; external name '_SCNetworkConnectionCopyServiceID';
+
+
+{!
+ @function SCNetworkConnectionGetStatus
+ @discussion Returns the status of the SCNetworkConnection.
+ A status is one of the following values :
+ kSCNetworkConnectionInvalid
+ kSCNetworkConnectionDisconnected
+ kSCNetworkConnectionConnecting
+ kSCNetworkConnectionDisconnecting
+ kSCNetworkConnectionConnected
+
+ @param connection The SCNetworkConnection to obtain status from.
+ @result The status value.
+}
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkConnectionGetStatus( connection: SCNetworkConnectionRef ): SCNetworkConnectionStatus; external name '_SCNetworkConnectionGetStatus';
+
+
+{!
+ @function SCNetworkConnectionCopyExtendedStatus
+ @discussion Returns the extended status of the connection.
+ An extended status dictionary contains specific dictionaries
+ describing the status for each subcomponent of the service.
+
+ For example, a status dictionary will contain the following dictionaries:
+
+ IPv4:
+ IPaddress: IP address used.
+
+ PPP:
+ Status: PPP specific status of type SCNetworkConnectionPPPStatus.
+ LastCause: Available when status is Disconnected.
+ Contains the last error of disconnection.
+ ConnectTime: time when the connection happened
+ MaxTime: maximum time for this connection
+
+ Modem:
+ ConnectionSpeed: Speed of the modem connection in bits/s
+
+ Other dictionaries could be present for PPPoE, PPTP and L2TP.
+
+ The status dictionary can be extended as needed in the future
+ to contain additional information.
+
+ @param connection The SCNetworkConnection to obtain status from.
+ @result The status dictionary.
+ If NULL is returned, the error can be retrieved with SCError().
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkConnectionCopyExtendedStatus( connection: SCNetworkConnectionRef ): CFDictionaryRef; external name '_SCNetworkConnectionCopyExtendedStatus';
+
+
+{!
+ @function SCNetworkConnectionCopyStatistics
+ @discussion Returns the statistics of the SCNetworkConnection.
+ A statistic dictionary contains specific dictionaries
+ with statistics for each subcomponents of the service.
+
+ For example, a statistic dictionary will contain the following dictionaries:
+
+ PPP: (Bytes,Packets,Errors()In,Out):
+ Statistics at the Network level.
+ Contains the number of bytes, packets, and errors on the PPP interface.
+ For example, BytesIn contains the number of bytes going up
+ into the network stack, for any networking protocol,
+ without the PPP headers and trailers.
+
+ The statistic dictionary can be extended as needed in the future
+ to contain additional information.
+
+ @param connection The SCNetworkConnection to obtained statistics from.
+ @result The statistics dictionary.
+ If NULL is returned, the error can be retrieved with SCError().
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkConnectionCopyStatistics( connection: SCNetworkConnectionRef ): CFDictionaryRef; external name '_SCNetworkConnectionCopyStatistics';
+
+
+{!
+ @function SCNetworkConnectionStart
+ @discussion Start the connection for the SCNetworkConnection.
+ The connection process is asynchronous and the function will
+ return immediately. The connection status can be obtain by polling or
+ by callback.
+ The connection is done with the default settings from the administrator.
+ Some of the settings can be overridden for the duration of
+ the connection. They are given in an option dictionary.
+ The options dictionary is in the format of a Network Service
+ as described in SystemConfiguration.
+
+ Note: Starting and stopping of connections is implicitely arbitrated.
+ Calling Start on a connection already started will indicate
+ that the application has interest in the connection and it shouldn't
+ be stopped by anyone else.
+
+ @param connection The SCNetworkConnection to start.
+ @param userOptions The options dictionary to start the connection with.
+ If userOptions is NULL, the default settings will be used.
+ If userOptions are specified, they must be in the SystemConfiguration format.
+ The options will override the default settings defined for the service.
+
+ For security reasons, not all the options can be overridden, the appropriate merging
+ of all the settings will be done before the connection is established,
+ and inappropriate options will be ignored.
+
+ @param linger This parameter indicates whether or not the connection can stay around
+ when the application no longer has interest in it.
+ Typical application should pass FALSE, and the Stop function will
+ automatically be called when the reference is released or if the application quits.
+ If the application passes TRUE, the application can release the reference
+ or exit and the Stop function will not be called.
+
+ @result TRUE if the connection was correctly started. The actual connection is not established yet,
+ and the connection status needs to be periodically checked.
+ FALSE if the connection request didn't start. Error must be taken
+ from SCError().
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkConnectionStart( connection: SCNetworkConnectionRef; userOptions: CFDictionaryRef; linger: Boolean ): Boolean; external name '_SCNetworkConnectionStart';
+
+
+{!
+ @function SCNetworkConnectionStop
+ @discussion Stop the connection for the SCNetworkConnection.
+ The disconnection process is asynchronous and the function will
+ return immediately. The connection status can be obtain by polling or
+ by callback.
+ This function performs an arbitrated stop of the connection.
+ If several applications have marked their interest in the connection,
+ by calling SCNetworkConnectionStart, the call will succeed but the the actual
+ connection will be maintained until the last interested application calls stop.
+
+ In certain cases, you might want to stop the connection anyway, and
+ SCNetworkConnectionStop with forceDisconnect argument can be used.
+
+ @param connection The SCNetworkConnection to stop.
+ @result TRUE if the disconnection request succeeded.
+ FALSE if the disconnection request failed. Error must be taken from SCError().
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkConnectionStop( connection: SCNetworkConnectionRef; forceDisconnect: Boolean ): Boolean; external name '_SCNetworkConnectionStop';
+
+
+{!
+ @function SCNetworkConnectionCopyCurrentOptions
+ @discussion Copy the user options used to start the connection.
+ This is a mechanism for a client to retrieve the user options
+ previously passed to the SCNetworkConnectionStart function.
+ @param connection The SCNetworkConnection to obtain options from.
+ @result The service dictionary containing the connection options.
+ The dictionary can be empty if no user options were used.
+ If NULL is returned, the error can be retrieved with SCError().
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkConnectionCopyUserOptions( connection: SCNetworkConnectionRef ): CFDictionaryRef; external name '_SCNetworkConnectionCopyUserOptions';
+
+
+{!
+ @function SCNetworkConnectionScheduleWithRunLoop
+ @discussion Schedule a connection with the Run Loop.
+ @param connection The SCNetworkConnection to schedule.
+ @param runLoop The runloop to schedule with.
+ @param runLoopMode The runloop mode.
+ @result TRUE if success.
+ FALSE if failed. The error can be retrieved with SCError().
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkConnectionScheduleWithRunLoop( connection: SCNetworkConnectionRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef ): Boolean; external name '_SCNetworkConnectionScheduleWithRunLoop';
+
+
+{!
+ @function SCNetworkConnectionUnscheduleFromRunLoop
+ @discussion Unschedule a connection from the Run Loop.
+ @param connection The SCNetworkConnection to unschedule.
+ @param runLoop The runloop to unschedule from.
+ @param runLoopMode The runloop mode.
+ @result TRUE if success.
+ FALSE if failed. The error can be retrieved with SCError().
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkConnectionUnscheduleFromRunLoop( connection: SCNetworkConnectionRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef ): Boolean; external name '_SCNetworkConnectionUnscheduleFromRunLoop';
+
+{unit SCNetworkReachability}
+{
+ * 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,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES of MERCHANTABILITY,
+ * 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, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{!
+ @header SCNetworkReachability
+ The SCNetworkReachabilityXXX() APIs allow an application to determine the status
+ of a system's current network configuration and the reachability
+ of a target host. In addition, the reachability can be monitored
+ with a notification being provided when/if the status has changed.
+
+ The term "reachable" reflects whether a data packet, sent by
+ an application into the network stack, can be sent to the
+ the target host/address. Please note that there is no
+ guarantee that the data packet will actually be received by
+ the host.
+ }
+
+{!
+ @typedef SCNetworkReachabilityRef
+ @discussion This is the handle to a network address/name.
+ }
+type
+ SCNetworkReachabilityRef = ^SInt32; { an opaque 32-bit type }
+
+
+{!
+ @typedef SCNetworkReachabilityContext
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+type
+ SCNetworkReachabilityContext = record
+ version: CFIndex;
+ info: Ptr;
+ retain: function( info: Ptr ): Ptr;
+ release: procedure( info: Ptr );
+ copyDescription: function( info: Ptr ): CFStringRef;
+ end;
+ SCNetworkReachabilityContextPtr = ^SCNetworkReachabilityContext;
+
+{!
+ @typedef SCNetworkReachabilityCallBack
+ @discussion Type of the callback function used when the
+ reachability of a network address/name changes.
+ @param target The SCNetworkReachability reference being monitored for changes.
+ @param flags The new SCNetworkConnectionFlags representing the
+ reachability status of the network address/name.
+ @param info ....
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+type SCNetworkReachabilityCallBack = procedure( target: SCNetworkReachabilityRef; flags: SCNetworkConnectionFlags; info: UnivPtr );
+
+{!
+ @function SCNetworkReachabilityCreateWithAddress
+ @discussion Creates a reference to the specified network
+ address. This reference can later be used to monitor
+ the reachability of the target host.
+ @param address The address of the desired host.
+ @result A reference to the new immutable SCNetworkReachabilityRef.
+
+ You must release the returned value.
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkReachabilityCreateWithAddress( allocator: CFAllocatorRef; address: sockaddr_ptr ): SCNetworkReachabilityRef; external name '_SCNetworkReachabilityCreateWithAddress';
+
+{!
+ @function SCNetworkReachabilityCreateWithAddressPair
+ @discussion Creates a reference to the specified network
+ address. This reference can later be used to monitor
+ the reachability of the target host.
+ @param localAddress The local address associated with a network
+ connection. If NULL, only the remote address is of interest.
+ @param remoteAddress The remote address associated with a network
+ connection. If NULL, only the local address is of interest.
+ @result A reference to the new immutable SCNetworkReachabilityRef.
+
+ You must release the returned value.
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkReachabilityCreateWithAddressPair( allocator: CFAllocatorRef; localAddress: sockaddr_ptr; remoteAddress: sockaddr_ptr ): SCNetworkReachabilityRef; external name '_SCNetworkReachabilityCreateWithAddressPair';
+
+{!
+ @function SCNetworkReachabilityCreateWithName
+ @discussion Creates a reference to the specified network host/node
+ name. This reference can later be used to monitor the
+ reachability of the target host.
+ @param nodename The node name of the desired host. This name would
+ be the same as that passed to gethostbyname() or getaddrinfo().
+ @result A reference to the new immutable SCNetworkReachabilityRef.
+
+ You must release the returned value.
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkReachabilityCreateWithName( allocator: CFAllocatorRef; nodename: CStringPtr ): SCNetworkReachabilityRef; external name '_SCNetworkReachabilityCreateWithName';
+
+{!
+ @function SCNetworkReachabilityGetTypeID
+ Returns the type identifier of all SCNetworkReachability instances.
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkReachabilityGetTypeID: CFTypeID; external name '_SCNetworkReachabilityGetTypeID';
+
+
+{!
+ @function SCNetworkReachabilityGetFlags
+ @discussion Determines if the given target is reachable using the
+ current network configuration.
+ @param target The network reference associated with the address/name
+ to be checked for reachability.
+ @param flags A pointer to memory that will be filled with the
+ SCNetworkConnectionFlags detailing the reachability
+ of the specified target.
+ @result TRUE if the network connection flags are valid; FALSE if the
+ status could not be determined.
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkReachabilityGetFlags( target: SCNetworkReachabilityRef; var flags: SCNetworkConnectionFlags ): Boolean; external name '_SCNetworkReachabilityGetFlags';
+
+{!
+ @function SCNetworkReachabilitySetCallback
+ @discussion Assigns a client to a target, which receives callbacks
+ when the reachability of the target changes.
+ @param target The network reference associated with the address/name
+ to be checked for reachability.
+ @param callout The function to be called when the reachability of
+ target changes. If NULL, the current client for the target
+ is removed.
+ @param context The SCNetworkReachabilityContext associated with
+ the callout.
+ @result TRUE if the notification client was successfully set.
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkReachabilitySetCallback( target: SCNetworkReachabilityRef; callout: SCNetworkReachabilityCallBack; var context: SCNetworkReachabilityContext ): Boolean; external name '_SCNetworkReachabilitySetCallback';
+
+{!
+ @function SCNetworkReachabilityScheduleWithRunLoop
+ @discussion Schedule the given target from the given run loop and mode.
+ @param target The address/name which is set up for asynchronous mode. Must be non-NULL.
+ @param runLoop A reference to a runloop on which the target should be scheduled. Must be non-NULL.
+ @param runLoopMode The mode on which to schedule the target. Must be non-NULL.
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkReachabilityScheduleWithRunLoop( target: SCNetworkReachabilityRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef ): Boolean; external name '_SCNetworkReachabilityScheduleWithRunLoop';
+
+{!
+ @function SCNetworkReachabilityUnscheduleFromRunLoop
+ @discussion Unschedule the given target from the given run loop and mode.
+ @param target The address/name which is set up for asynchronous mode. Must be non-NULL.
+ @param runLoop A reference to a runloop on which the target should be scheduled. Must be non-NULL.
+ @param runLoopMode The mode on which to schedule the target. Must be non-NULL.
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function SCNetworkReachabilityUnscheduleFromRunLoop( target: SCNetworkReachabilityRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef ): Boolean; external name '_SCNetworkReachabilityUnscheduleFromRunLoop';
+
+{unit SpeechRecognition}
+{
+ File: SpeechRecognition.p
+
+ Contains: Apple Speech Recognition Toolbox Interfaces.
+
+ Version: Technology: PlainTalk 1.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1992-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+{ Error Codes [Speech recognition gets -5100 through -5199] }
+
+const
+ kSRNotAvailable = -5100; { the service requested is not avail or applicable }
+ kSRInternalError = -5101; { a system internal or hardware error condition }
+ kSRComponentNotFound = -5102; { a needed system resource was not located }
+ kSROutOfMemory = -5103; { an out of memory error occurred in the toolbox memory space }
+ kSRNotASpeechObject = -5104; { the object specified is no longer or never was valid }
+ kSRBadParameter = -5105; { an invalid parameter was specified }
+ kSRParamOutOfRange = -5106; { when we say 0-100, don't pass in 101. }
+ kSRBadSelector = -5107; { an unrecognized selector was specified }
+ kSRBufferTooSmall = -5108; { returned from attribute access functions }
+ kSRNotARecSystem = -5109; { the object used was not a SRRecognitionSystem }
+ kSRFeedbackNotAvail = -5110; { there is no feedback window associated with SRRecognizer }
+ kSRCantSetProperty = -5111; { a non-settable property was specified }
+ kSRCantGetProperty = -5112; { a non-gettable property was specified }
+ kSRCantSetDuringRecognition = -5113; { the property can't be set while recognition is in progress -- do before or between utterances. }
+ kSRAlreadyListening = -5114; { in response to SRStartListening }
+ kSRNotListeningState = -5115; { in response to SRStopListening }
+ kSRModelMismatch = -5116; { no acoustical models are avail to match request }
+ kSRNoClientLanguageModel = -5117; { trying to access a non-specified SRLanguageModel }
+ kSRNoPendingUtterances = -5118; { nothing to continue search on }
+ kSRRecognitionCanceled = -5119; { an abort error occurred during search }
+ kSRRecognitionDone = -5120; { search has finished, but nothing was recognized }
+ kSROtherRecAlreadyModal = -5121; { another recognizer is modal at the moment, so can't set this recognizer's kSRBlockModally property right now }
+ kSRHasNoSubItems = -5122; { SRCountItems or related routine was called on an object without subelements -- e.g. a word -- rather than phrase, path, or LM. }
+ kSRSubItemNotFound = -5123; { returned when accessing a non-existent sub item of a container }
+ kSRLanguageModelTooBig = -5124; { Cant build language models so big }
+ kSRAlreadyReleased = -5125; { this object has already been released before }
+ kSRAlreadyFinished = -5126; { the language model can't be finished twice }
+ kSRWordNotFound = -5127; { the spelling couldn't be found in lookup(s) }
+ kSRNotFinishedWithRejection = -5128; { property not found because the LMObj is not finished with rejection }
+ kSRExpansionTooDeep = -5129; { Language model is left recursive or is embedded too many levels }
+ kSRTooManyElements = -5130; { Too many elements added to phrase or path or other langauge model object }
+ kSRCantAdd = -5131; { Can't add given type of object to the base SRLanguageObject (e.g.in SRAddLanguageObject) }
+ kSRSndInSourceDisconnected = -5132; { Sound input source is disconnected }
+ kSRCantReadLanguageObject = -5133; { An error while trying to create new Language object from file or pointer -- possibly bad format }
+ { non-release debugging error codes are included here }
+ kSRNotImplementedYet = -5199; { you'd better wait for this feature in a future release }
+
+
+ { Type Definitions }
+
+type
+ SRSpeechObject = ^SInt32; { an opaque 32-bit type }
+ SRSpeechObjectPtr = ^SRSpeechObject; { when a var xx:SRSpeechObject parameter can be nil, it is changed to xx: SRSpeechObjectPtr }
+ SRRecognitionSystem = SRSpeechObject;
+ SRRecognizer = SRSpeechObject;
+ SRSpeechSource = SRSpeechObject;
+ SRRecognitionResult = SRSpeechSource;
+ SRLanguageObject = SRSpeechObject;
+ SRLanguageModel = SRLanguageObject;
+ SRPath = SRLanguageObject;
+ SRPhrase = SRLanguageObject;
+ SRWord = SRLanguageObject;
+ { between 0 and 100 }
+ SRSpeedSetting = UInt16;
+ { between 0 and 100 }
+ SRRejectionLevel = UInt16;
+ { When an event occurs, the user supplied proc will be called with a pointer }
+ { to the param passed in and a flag to indicate conditions such }
+ { as interrupt time or system background time. }
+ SRCallBackStructPtr = ^SRCallBackStruct;
+ SRCallBackStruct = record
+ what: SInt32; { one of notification flags }
+ message: SInt32; { contains SRRecognitionResult id }
+ instance: SRRecognizer; { ID of recognizer being notified }
+ status: OSErr; { result status of last search }
+ flags: SInt16; { non-zero if occurs during interrupt }
+ refCon: SInt32; { user defined - set from SRCallBackParam }
+ end;
+
+ { Call back procedure definition }
+{$ifc TYPED_FUNCTION_POINTERS}
+ SRCallBackProcPtr = procedure(var param: SRCallBackStruct);
+{$elsec}
+ SRCallBackProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ SRCallBackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SRCallBackUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppSRCallBackProcInfo = $000000C0;
+ {
+ * NewSRCallBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSRCallBackUPP(userRoutine: SRCallBackProcPtr): SRCallBackUPP; external name '_NewSRCallBackUPP'; { old name was NewSRCallBackProc }
+{
+ * DisposeSRCallBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSRCallBackUPP(userUPP: SRCallBackUPP); external name '_DisposeSRCallBackUPP';
+{
+ * InvokeSRCallBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeSRCallBackUPP(var param: SRCallBackStruct; userRoutine: SRCallBackUPP); external name '_InvokeSRCallBackUPP'; { old name was CallSRCallBackProc }
+type
+ SRCallBackParamPtr = ^SRCallBackParam;
+ SRCallBackParam = record
+ callBack: SRCallBackUPP;
+ refCon: SInt32;
+ end;
+
+ { Recognition System Types }
+
+const
+ kSRDefaultRecognitionSystemID = 0;
+
+ { Recognition System Properties }
+ kSRFeedbackAndListeningModes = $6662776E (* 'fbwn' *); { short: one of kSRNoFeedbackHasListenModes, kSRHasFeedbackHasListenModes, kSRNoFeedbackNoListenModes }
+ kSRRejectedWord = $72656A71 (* 'rejq' *); { the SRWord used to represent a rejection }
+ kSRCleanupOnClientExit = $636C7570 (* 'clup' *); { Boolean: Default is true. The rec system and everything it owns is disposed when the client application quits }
+
+ kSRNoFeedbackNoListenModes = 0; { next allocated recognizer has no feedback window and doesn't use listening modes }
+ kSRHasFeedbackHasListenModes = 1; { next allocated recognizer has feedback window and uses listening modes }
+ kSRNoFeedbackHasListenModes = 2; { next allocated recognizer has no feedback window but does use listening modes }
+
+ { Speech Source Types }
+ kSRDefaultSpeechSource = 0;
+ kSRLiveDesktopSpeechSource = $646B6C76 (* 'dklv' *); { live desktop sound input }
+ kSRCanned22kHzSpeechSource = $63613232 (* 'ca22' *); { AIFF file based 16 bit, 22.050 KHz sound input }
+
+ { Notification via Apple Event or Callback }
+ { Notification Flags }
+ kSRNotifyRecognitionBeginning = $00000001; { recognition can begin. client must now call SRContinueRecognition or SRCancelRecognition }
+ kSRNotifyRecognitionDone = $00000002; { recognition has terminated. result (if any) is available. }
+
+ { Apple Event selectors }
+ { AppleEvent message class }
+ kAESpeechSuite = $73707263 (* 'sprc' *);
+
+ { AppleEvent message event ids }
+ kAESpeechDone = $73727364 (* 'srsd' *);
+ kAESpeechDetected = $73726264 (* 'srbd' *);
+
+ { AppleEvent Parameter ids }
+ keySRRecognizer = $6B726563 (* 'krec' *);
+ keySRSpeechResult = $6B737072 (* 'kspr' *);
+ keySRSpeechStatus = $6B737374 (* 'ksst' *);
+
+ { AppleEvent Parameter types }
+ typeSRRecognizer = $74726563 (* 'trec' *);
+ typeSRSpeechResult = $74737072 (* 'tspr' *);
+
+
+ { SRRecognizer Properties }
+ kSRNotificationParam = $6E6F7469 (* 'noti' *); { see notification flags below }
+ kSRCallBackParam = $63616C6C (* 'call' *); { type SRCallBackParam }
+ kSRSearchStatusParam = $73746174 (* 'stat' *); { see status flags below }
+ kSRAutoFinishingParam = $6166696E (* 'afin' *); { automatic finishing applied on LM for search }
+ kSRForegroundOnly = $66676F6E (* 'fgon' *); { Boolean. Default is true. If true, client recognizer only active when in foreground. }
+ kSRBlockBackground = $626C6267 (* 'blbg' *); { Boolean. Default is false. If true, when client recognizer in foreground, rest of LMs are inactive. }
+ kSRBlockModally = $626C6D64 (* 'blmd' *); { Boolean. Default is false. When true, this client's LM is only active LM; all other LMs are inactive. Be nice, don't be modal for long periods! }
+ kSRWantsResultTextDrawn = $74786662 (* 'txfb' *); { Boolean. Default is true. If true, search results are posted to Feedback window }
+ kSRWantsAutoFBGestures = $64666272 (* 'dfbr' *); { Boolean. Default is true. If true, client needn't call SRProcessBegin/End to get default feedback behavior }
+ kSRSoundInVolume = $766F6C75 (* 'volu' *); { short in [0..100] log scaled sound input power. Can't set this property }
+ kSRReadAudioFSSpec = $61757264 (* 'aurd' *); { *FSSpec. Specify FSSpec where raw audio is to be read (AIFF format) using kSRCanned22kHzSpeechSource. Reads until EOF }
+ kSRCancelOnSoundOut = $6361736F (* 'caso' *); { Boolean: Default is true. If any sound is played out during utterance, recognition is aborted. }
+ kSRSpeedVsAccuracyParam = $73706564 (* 'sped' *); { SRSpeedSetting between 0 and 100 }
+
+ { 0 means more accurate but slower. }
+ { 100 means (much) less accurate but faster. }
+ kSRUseToggleListen = 0; { listen key modes }
+ kSRUsePushToTalk = 1;
+
+ kSRListenKeyMode = $6C6B6D64 (* 'lkmd' *); { short: either kSRUseToggleListen or kSRUsePushToTalk }
+ kSRListenKeyCombo = $6C6B6579 (* 'lkey' *); { short: Push-To-Talk key combination; high byte is high byte of event->modifiers, the low byte is the keycode from event->message }
+ kSRListenKeyName = $6C6E616D (* 'lnam' *); { Str63: string representing ListenKeyCombo }
+ kSRKeyWord = $6B777264 (* 'kwrd' *); { Str255: keyword preceding spoken commands in kSRUseToggleListen mode }
+ kSRKeyExpected = $6B657870 (* 'kexp' *); { Boolean: Must the PTT key be depressed or the key word spoken before recognition can occur? }
+
+ { Operational Status Flags }
+ kSRIdleRecognizer = $00000001; { engine is not active }
+ kSRSearchInProgress = $00000002; { search is in progress }
+ kSRSearchWaitForAllClients = $00000004; { search is suspended waiting on all clients' input }
+ kSRMustCancelSearch = $00000008; { something has occurred (sound played, non-speech detected) requiring the search to abort }
+ kSRPendingSearch = $00000010; { we're about to start searching }
+
+ { Recognition Result Properties }
+ kSRTEXTFormat = $54455854 (* 'TEXT' *); { raw text in user supplied memory }
+ kSRPhraseFormat = $6C6D7068 (* 'lmph' *); { SRPhrase containing result words }
+ kSRPathFormat = $6C6D7074 (* 'lmpt' *); { SRPath containing result phrases or words }
+ kSRLanguageModelFormat = $6C6D666D (* 'lmfm' *); { top level SRLanguageModel for post parse }
+
+ { SRLanguageObject Family Properties }
+ kSRSpelling = $7370656C (* 'spel' *); { spelling of a SRWord or SRPhrase or SRPath, or name of a SRLanguageModel }
+ kSRLMObjType = $6C6D7470 (* 'lmtp' *); { Returns one of SRLanguageObject Types listed below }
+ kSRRefCon = $72656663 (* 'refc' *); { 4 bytes of user storage }
+ kSROptional = $6F70746C (* 'optl' *); { Boolean -- true if SRLanguageObject is optional }
+ kSREnabled = $656E626C (* 'enbl' *); { Boolean -- true if SRLanguageObject enabled }
+ kSRRepeatable = $72707462 (* 'rptb' *); { Boolean -- true if SRLanguageObject is repeatable }
+ kSRRejectable = $726A626C (* 'rjbl' *); { Boolean -- true if SRLanguageObject is rejectable (Recognition System's kSRRejectedWord }
+ { object can be returned in place of SRLanguageObject with this property) }
+ kSRRejectionLevel = $726A6374 (* 'rjct' *); { SRRejectionLevel between 0 and 100 }
+
+ { LM Object Types -- returned as kSRLMObjType property of language model objects }
+ kSRLanguageModelType = $6C6D6F62 (* 'lmob' *); { SRLanguageModel }
+ kSRPathType = $70617468 (* 'path' *); { SRPath }
+ kSRPhraseType = $70687261 (* 'phra' *); { SRPhrase }
+ kSRWordType = $776F7264 (* 'word' *); { SRWord }
+
+ { a normal and reasonable rejection level }
+ kSRDefaultRejectionLevel = 50;
+
+ { ****************************************************************************** }
+ { NOTES ON USING THE API }
+ { }
+ { All operations (with the exception of SRGetRecognitionSystem) are }
+ { directed toward an object allocated or begot from New, Get and Read }
+ { type calls. }
+ { }
+ { There is a simple rule in dealing with allocation and disposal: }
+ { }
+ { * all toolbox allocations are obtained from a SRRecognitionSystem }
+ { }
+ { * if you obtain an object via New or Get, then you own a reference }
+ { to that object and it must be released via SRReleaseObject when }
+ { you no longer need it }
+ { }
+ { * when you receive a SRRecognitionResult object via AppleEvent or }
+ { callback, it has essentially been created on your behalf and so }
+ { you are responsible for releasing it as above }
+ { }
+ { * when you close a SRRecognitionSystem, all remaining objects which }
+ { were allocated with it will be forcefully released and any }
+ { remaining references to those objects will be invalid. }
+ { }
+ { This translates into a very simple guideline: }
+ { If you allocate it or have it allocated for you, you must release }
+ { it. If you are only peeking at it, then don't release it. }
+ { }
+ { ****************************************************************************** }
+ { Opening and Closing of the SRRecognitionSystem }
+ {
+ * SROpenRecognitionSystem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SROpenRecognitionSystem(var system: SRRecognitionSystem; systemID: OSType): OSErr; external name '_SROpenRecognitionSystem';
+{
+ * SRCloseRecognitionSystem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRCloseRecognitionSystem(system: SRRecognitionSystem): OSErr; external name '_SRCloseRecognitionSystem';
+{ Accessing Properties of any Speech Object }
+{
+ * SRSetProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRSetProperty(srObject: SRSpeechObject; selector: OSType; proprty: UnivPtr; propertyLen: Size): OSErr; external name '_SRSetProperty';
+{
+ * SRGetProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRGetProperty(srObject: SRSpeechObject; selector: OSType; proprty: UnivPtr; var propertyLen: Size): OSErr; external name '_SRGetProperty';
+{ Any object obtained via New or Get type calls must be released }
+{
+ * SRReleaseObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRReleaseObject(srObject: SRSpeechObject): OSErr; external name '_SRReleaseObject';
+{
+ * SRGetReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRGetReference(srObject: SRSpeechObject; var newObjectRef: SRSpeechObject): OSErr; external name '_SRGetReference';
+{ SRRecognizer Instance Functions }
+{
+ * SRNewRecognizer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRNewRecognizer(system: SRRecognitionSystem; var recognizer: SRRecognizer; sourceID: OSType): OSErr; external name '_SRNewRecognizer';
+{
+ * SRStartListening()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRStartListening(recognizer: SRRecognizer): OSErr; external name '_SRStartListening';
+{
+ * SRStopListening()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRStopListening(recognizer: SRRecognizer): OSErr; external name '_SRStopListening';
+{
+ * SRSetLanguageModel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRSetLanguageModel(recognizer: SRRecognizer; languageModel: SRLanguageModel): OSErr; external name '_SRSetLanguageModel';
+{
+ * SRGetLanguageModel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRGetLanguageModel(recognizer: SRRecognizer; var languageModel: SRLanguageModel): OSErr; external name '_SRGetLanguageModel';
+{
+ * SRContinueRecognition()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRContinueRecognition(recognizer: SRRecognizer): OSErr; external name '_SRContinueRecognition';
+{
+ * SRCancelRecognition()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRCancelRecognition(recognizer: SRRecognizer): OSErr; external name '_SRCancelRecognition';
+{
+ * SRIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRIdle: OSErr; external name '_SRIdle';
+{ Language Model Building and Manipulation Functions }
+{
+ * SRNewLanguageModel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRNewLanguageModel(system: SRRecognitionSystem; var model: SRLanguageModel; name: UnivPtr; nameLength: Size): OSErr; external name '_SRNewLanguageModel';
+{
+ * SRNewPath()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRNewPath(system: SRRecognitionSystem; var path: SRPath): OSErr; external name '_SRNewPath';
+{
+ * SRNewPhrase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRNewPhrase(system: SRRecognitionSystem; var phrase: SRPhrase; text: UnivPtr; textLength: Size): OSErr; external name '_SRNewPhrase';
+{
+ * SRNewWord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRNewWord(system: SRRecognitionSystem; var word: SRWord; text: UnivPtr; textLength: Size): OSErr; external name '_SRNewWord';
+{ Operations on any object of the SRLanguageObject family }
+{
+ * SRPutLanguageObjectIntoHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRPutLanguageObjectIntoHandle(languageObject: SRLanguageObject; lobjHandle: Handle): OSErr; external name '_SRPutLanguageObjectIntoHandle';
+{
+ * SRPutLanguageObjectIntoDataFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRPutLanguageObjectIntoDataFile(languageObject: SRLanguageObject; fRefNum: SInt16): OSErr; external name '_SRPutLanguageObjectIntoDataFile';
+{
+ * SRNewLanguageObjectFromHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRNewLanguageObjectFromHandle(system: SRRecognitionSystem; var languageObject: SRLanguageObject; lObjHandle: Handle): OSErr; external name '_SRNewLanguageObjectFromHandle';
+{
+ * SRNewLanguageObjectFromDataFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRNewLanguageObjectFromDataFile(system: SRRecognitionSystem; var languageObject: SRLanguageObject; fRefNum: SInt16): OSErr; external name '_SRNewLanguageObjectFromDataFile';
+{
+ * SREmptyLanguageObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SREmptyLanguageObject(languageObject: SRLanguageObject): OSErr; external name '_SREmptyLanguageObject';
+{
+ * SRChangeLanguageObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRChangeLanguageObject(languageObject: SRLanguageObject; text: UnivPtr; textLength: Size): OSErr; external name '_SRChangeLanguageObject';
+{
+ * SRAddLanguageObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRAddLanguageObject(base: SRLanguageObject; addon: SRLanguageObject): OSErr; external name '_SRAddLanguageObject';
+{
+ * SRAddText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRAddText(base: SRLanguageObject; text: UnivPtr; textLength: Size; refCon: SInt32): OSErr; external name '_SRAddText';
+{
+ * SRRemoveLanguageObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRRemoveLanguageObject(base: SRLanguageObject; toRemove: SRLanguageObject): OSErr; external name '_SRRemoveLanguageObject';
+{ Traversing SRRecognitionResults or SRLanguageObjects }
+{
+ * SRCountItems()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRCountItems(container: SRSpeechObject; var count: SInt32): OSErr; external name '_SRCountItems';
+{
+ * SRGetIndexedItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRGetIndexedItem(container: SRSpeechObject; var item: SRSpeechObject; index: SInt32): OSErr; external name '_SRGetIndexedItem';
+{
+ * SRSetIndexedItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRSetIndexedItem(container: SRSpeechObject; item: SRSpeechObject; index: SInt32): OSErr; external name '_SRSetIndexedItem';
+{
+ * SRRemoveIndexedItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRRemoveIndexedItem(container: SRSpeechObject; index: SInt32): OSErr; external name '_SRRemoveIndexedItem';
+{ Utilizing the System Feedback Window }
+{
+ * SRDrawText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRDrawText(recognizer: SRRecognizer; dispText: UnivPtr; dispLength: Size): OSErr; external name '_SRDrawText';
+{
+ * SRDrawRecognizedText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRDrawRecognizedText(recognizer: SRRecognizer; dispText: UnivPtr; dispLength: Size): OSErr; external name '_SRDrawRecognizedText';
+{
+ * SRSpeakText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRSpeakText(recognizer: SRRecognizer; speakText: UnivPtr; speakLength: Size): OSErr; external name '_SRSpeakText';
+{
+ * SRSpeakAndDrawText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRSpeakAndDrawText(recognizer: SRRecognizer; text: UnivPtr; textLength: Size): OSErr; external name '_SRSpeakAndDrawText';
+{
+ * SRStopSpeech()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRStopSpeech(recognizer: SRRecognizer): OSErr; external name '_SRStopSpeech';
+{
+ * SRSpeechBusy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRSpeechBusy(recognizer: SRRecognizer): boolean; external name '_SRSpeechBusy';
+{
+ * SRProcessBegin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRProcessBegin(recognizer: SRRecognizer; failed: boolean): OSErr; external name '_SRProcessBegin';
+{
+ * SRProcessEnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechRecognitionLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SRProcessEnd(recognizer: SRRecognizer; failed: boolean): OSErr; external name '_SRProcessEnd';
+{$ALIGN MAC68K}
+
+
+{unit SpeechSynthesis}
+{
+ File: SpeechSynthesis.p
+
+ Contains: Speech Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1989-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ kTextToSpeechSynthType = $74747363 (* 'ttsc' *);
+ kTextToSpeechVoiceType = $74747664 (* 'ttvd' *);
+ kTextToSpeechVoiceFileType = $74747666 (* 'ttvf' *);
+ kTextToSpeechVoiceBundleType = $74747662 (* 'ttvb' *);
+
+ kNoEndingProsody = 1;
+ kNoSpeechInterrupt = 2;
+ kPreflightThenPause = 4;
+
+ kImmediate = 0;
+ kEndOfWord = 1;
+ kEndOfSentence = 2;
+
+
+ { ------------------------------------------ }
+ { GetSpeechInfo & SetSpeechInfo selectors }
+ { ------------------------------------------ }
+ soStatus = $73746174 (* 'stat' *);
+ soErrors = $6572726F (* 'erro' *);
+ soInputMode = $696E7074 (* 'inpt' *);
+ soCharacterMode = $63686172 (* 'char' *);
+ soNumberMode = $6E6D6272 (* 'nmbr' *);
+ soRate = $72617465 (* 'rate' *);
+ soPitchBase = $70626173 (* 'pbas' *);
+ soPitchMod = $706D6F64 (* 'pmod' *);
+ soVolume = $766F6C6D (* 'volm' *);
+ soSynthType = $76657273 (* 'vers' *);
+ soRecentSync = $73796E63 (* 'sync' *);
+ soPhonemeSymbols = $70687379 (* 'phsy' *);
+ soCurrentVoice = $63766F78 (* 'cvox' *);
+ soCommandDelimiter = $646C696D (* 'dlim' *);
+ soReset = $72736574 (* 'rset' *);
+ soCurrentA5 = $6D794135 (* 'myA5' *);
+ soRefCon = $72656663 (* 'refc' *);
+ soTextDoneCallBack = $74646362 (* 'tdcb' *); { use with SpeechTextDoneProcPtr }
+ soSpeechDoneCallBack = $73646362 (* 'sdcb' *); { use with SpeechDoneProcPtr }
+ soSyncCallBack = $73796362 (* 'sycb' *); { use with SpeechSyncProcPtr }
+ soErrorCallBack = $65726362 (* 'ercb' *); { use with SpeechErrorProcPtr }
+ soPhonemeCallBack = $70686362 (* 'phcb' *); { use with SpeechPhonemeProcPtr }
+ soWordCallBack = $77646362 (* 'wdcb' *);
+ soSynthExtension = $78746E64 (* 'xtnd' *);
+ soSoundOutput = $736E646F (* 'sndo' *);
+
+
+ { ------------------------------------------ }
+ { Speaking Mode Constants }
+ { ------------------------------------------ }
+ modeText = $54455854 (* 'TEXT' *); { input mode constants }
+ modePhonemes = $50484F4E (* 'PHON' *);
+ modeNormal = $4E4F524D (* 'NORM' *); { character mode and number mode constants }
+ modeLiteral = $4C54524C (* 'LTRL' *);
+
+
+ soVoiceDescription = $696E666F (* 'info' *);
+ soVoiceFile = $66726566 (* 'fref' *);
+
+
+type
+ SpeechChannel = ^SInt32; { an opaque 32-bit type }
+ SpeechChannelPtr = ^SpeechChannel; { when a var xx:SpeechChannel parameter can be nil, it is changed to xx: SpeechChannelPtr }
+
+ VoiceSpecPtr = ^VoiceSpec;
+ VoiceSpec = record
+ creator: OSType;
+ id: OSType;
+ end;
+
+
+const
+ kNeuter = 0;
+ kMale = 1;
+ kFemale = 2;
+
+
+type
+ VoiceDescriptionPtr = ^VoiceDescription;
+ VoiceDescription = record
+ length: SInt32;
+ voice: VoiceSpec;
+ version: SInt32;
+ name: Str63;
+ comment: Str255;
+ gender: SInt16;
+ age: SInt16;
+ script: SInt16;
+ language: SInt16;
+ region: SInt16;
+ reserved: array [0..3] of SInt32;
+ end;
+
+
+ VoiceFileInfoPtr = ^VoiceFileInfo;
+ VoiceFileInfo = record
+ fileSpec: FSSpec;
+ resID: SInt16;
+ end;
+
+ SpeechStatusInfoPtr = ^SpeechStatusInfo;
+ SpeechStatusInfo = record
+ outputBusy: boolean;
+ outputPaused: boolean;
+ inputBytesLeft: SInt32;
+ phonemeCode: SInt16;
+ end;
+
+
+ SpeechErrorInfoPtr = ^SpeechErrorInfo;
+ SpeechErrorInfo = record
+ count: SInt16;
+ oldest: OSErr;
+ oldPos: SInt32;
+ newest: OSErr;
+ newPos: SInt32;
+ end;
+
+
+ SpeechVersionInfoPtr = ^SpeechVersionInfo;
+ SpeechVersionInfo = record
+ synthType: OSType;
+ synthSubType: OSType;
+ synthManufacturer: OSType;
+ synthFlags: SInt32;
+ synthVersion: NumVersion;
+ end;
+
+
+ PhonemeInfoPtr = ^PhonemeInfo;
+ PhonemeInfo = record
+ opcode: SInt16;
+ phStr: Str15;
+ exampleStr: Str31;
+ hiliteStart: SInt16;
+ hiliteEnd: SInt16;
+ end;
+
+
+ PhonemeDescriptorPtr = ^PhonemeDescriptor;
+ PhonemeDescriptor = record
+ phonemeCount: SInt16;
+ thePhonemes: array [0..0] of PhonemeInfo;
+ end;
+
+ SpeechXtndDataPtr = ^SpeechXtndData;
+ SpeechXtndData = packed record
+ synthCreator: OSType;
+ synthData: packed array [0..1] of Byte;
+ end;
+
+
+ DelimiterInfoPtr = ^DelimiterInfo;
+ DelimiterInfo = packed record
+ startDelimiter: packed array [0..1] of Byte;
+ endDelimiter: packed array [0..1] of Byte;
+ end;
+
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SpeechTextDoneProcPtr = procedure(chan: SpeechChannel; refCon: SInt32; var nextBuf: UnivPtr; var byteLen: UInt32; var controlFlags: SInt32);
+{$elsec}
+ SpeechTextDoneProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SpeechDoneProcPtr = procedure(chan: SpeechChannel; refCon: SInt32);
+{$elsec}
+ SpeechDoneProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SpeechSyncProcPtr = procedure(chan: SpeechChannel; refCon: SInt32; syncMessage: OSType);
+{$elsec}
+ SpeechSyncProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SpeechErrorProcPtr = procedure(chan: SpeechChannel; refCon: SInt32; theError: OSErr; bytePos: SInt32);
+{$elsec}
+ SpeechErrorProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SpeechPhonemeProcPtr = procedure(chan: SpeechChannel; refCon: SInt32; phonemeOpcode: SInt16);
+{$elsec}
+ SpeechPhonemeProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SpeechWordProcPtr = procedure(chan: SpeechChannel; refCon: SInt32; wordPos: UInt32; wordLen: UInt16);
+{$elsec}
+ SpeechWordProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ SpeechTextDoneUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SpeechTextDoneUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SpeechDoneUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SpeechDoneUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SpeechSyncUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SpeechSyncUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SpeechErrorUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SpeechErrorUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SpeechPhonemeUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SpeechPhonemeUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SpeechWordUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SpeechWordUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppSpeechTextDoneProcInfo = $0000FFC0;
+ uppSpeechDoneProcInfo = $000003C0;
+ uppSpeechSyncProcInfo = $00000FC0;
+ uppSpeechErrorProcInfo = $00003BC0;
+ uppSpeechPhonemeProcInfo = $00000BC0;
+ uppSpeechWordProcInfo = $00002FC0;
+ {
+ * NewSpeechTextDoneUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSpeechTextDoneUPP(userRoutine: SpeechTextDoneProcPtr): SpeechTextDoneUPP; external name '_NewSpeechTextDoneUPP'; { old name was NewSpeechTextDoneProc }
+{
+ * NewSpeechDoneUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSpeechDoneUPP(userRoutine: SpeechDoneProcPtr): SpeechDoneUPP; external name '_NewSpeechDoneUPP'; { old name was NewSpeechDoneProc }
+{
+ * NewSpeechSyncUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSpeechSyncUPP(userRoutine: SpeechSyncProcPtr): SpeechSyncUPP; external name '_NewSpeechSyncUPP'; { old name was NewSpeechSyncProc }
+{
+ * NewSpeechErrorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSpeechErrorUPP(userRoutine: SpeechErrorProcPtr): SpeechErrorUPP; external name '_NewSpeechErrorUPP'; { old name was NewSpeechErrorProc }
+{
+ * NewSpeechPhonemeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSpeechPhonemeUPP(userRoutine: SpeechPhonemeProcPtr): SpeechPhonemeUPP; external name '_NewSpeechPhonemeUPP'; { old name was NewSpeechPhonemeProc }
+{
+ * NewSpeechWordUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSpeechWordUPP(userRoutine: SpeechWordProcPtr): SpeechWordUPP; external name '_NewSpeechWordUPP'; { old name was NewSpeechWordProc }
+{
+ * DisposeSpeechTextDoneUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSpeechTextDoneUPP(userUPP: SpeechTextDoneUPP); external name '_DisposeSpeechTextDoneUPP';
+{
+ * DisposeSpeechDoneUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSpeechDoneUPP(userUPP: SpeechDoneUPP); external name '_DisposeSpeechDoneUPP';
+{
+ * DisposeSpeechSyncUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSpeechSyncUPP(userUPP: SpeechSyncUPP); external name '_DisposeSpeechSyncUPP';
+{
+ * DisposeSpeechErrorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSpeechErrorUPP(userUPP: SpeechErrorUPP); external name '_DisposeSpeechErrorUPP';
+{
+ * DisposeSpeechPhonemeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSpeechPhonemeUPP(userUPP: SpeechPhonemeUPP); external name '_DisposeSpeechPhonemeUPP';
+{
+ * DisposeSpeechWordUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSpeechWordUPP(userUPP: SpeechWordUPP); external name '_DisposeSpeechWordUPP';
+{
+ * InvokeSpeechTextDoneUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeSpeechTextDoneUPP(chan: SpeechChannel; refCon: SInt32; var nextBuf: UnivPtr; var byteLen: UInt32; var controlFlags: SInt32; userRoutine: SpeechTextDoneUPP); external name '_InvokeSpeechTextDoneUPP'; { old name was CallSpeechTextDoneProc }
+{
+ * InvokeSpeechDoneUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeSpeechDoneUPP(chan: SpeechChannel; refCon: SInt32; userRoutine: SpeechDoneUPP); external name '_InvokeSpeechDoneUPP'; { old name was CallSpeechDoneProc }
+{
+ * InvokeSpeechSyncUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeSpeechSyncUPP(chan: SpeechChannel; refCon: SInt32; syncMessage: OSType; userRoutine: SpeechSyncUPP); external name '_InvokeSpeechSyncUPP'; { old name was CallSpeechSyncProc }
+{
+ * InvokeSpeechErrorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeSpeechErrorUPP(chan: SpeechChannel; refCon: SInt32; theError: OSErr; bytePos: SInt32; userRoutine: SpeechErrorUPP); external name '_InvokeSpeechErrorUPP'; { old name was CallSpeechErrorProc }
+{
+ * InvokeSpeechPhonemeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeSpeechPhonemeUPP(chan: SpeechChannel; refCon: SInt32; phonemeOpcode: SInt16; userRoutine: SpeechPhonemeUPP); external name '_InvokeSpeechPhonemeUPP'; { old name was CallSpeechPhonemeProc }
+{
+ * InvokeSpeechWordUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeSpeechWordUPP(chan: SpeechChannel; refCon: SInt32; wordPos: UInt32; wordLen: UInt16; userRoutine: SpeechWordUPP); external name '_InvokeSpeechWordUPP'; { old name was CallSpeechWordProc }
+{
+ * SpeechManagerVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SpeechManagerVersion: NumVersion; external name '_SpeechManagerVersion';
+{
+ * MakeVoiceSpec()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MakeVoiceSpec(creator: OSType; id: OSType; var voice: VoiceSpec): OSErr; external name '_MakeVoiceSpec';
+{
+ * CountVoices()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CountVoices(var numVoices: SInt16): OSErr; external name '_CountVoices';
+{
+ * GetIndVoice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIndVoice(index: SInt16; var voice: VoiceSpec): OSErr; external name '_GetIndVoice';
+{
+ * GetVoiceDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetVoiceDescription(const (*var*) voice: VoiceSpec; var info: VoiceDescription; infoLength: SInt32): OSErr; external name '_GetVoiceDescription';
+{
+ * GetVoiceInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetVoiceInfo(const (*var*) voice: VoiceSpec; selector: OSType; voiceInfo: UnivPtr): OSErr; external name '_GetVoiceInfo';
+{
+ * NewSpeechChannel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSpeechChannel(voice: VoiceSpecPtr; var chan: SpeechChannel): OSErr; external name '_NewSpeechChannel';
+{
+ * DisposeSpeechChannel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DisposeSpeechChannel(chan: SpeechChannel): OSErr; external name '_DisposeSpeechChannel';
+{
+ * SpeakString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SpeakString(const (*var*) textToBeSpoken: Str255): OSErr; external name '_SpeakString';
+{
+ * SpeakText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SpeakText(chan: SpeechChannel; textBuf: UnivPtr; textBytes: UInt32): OSErr; external name '_SpeakText';
+{
+ * SpeakBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SpeakBuffer(chan: SpeechChannel; textBuf: UnivPtr; textBytes: UInt32; controlFlags: SInt32): OSErr; external name '_SpeakBuffer';
+{
+ * StopSpeech()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function StopSpeech(chan: SpeechChannel): OSErr; external name '_StopSpeech';
+{
+ * StopSpeechAt()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function StopSpeechAt(chan: SpeechChannel; whereToStop: SInt32): OSErr; external name '_StopSpeechAt';
+{
+ * PauseSpeechAt()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PauseSpeechAt(chan: SpeechChannel; whereToPause: SInt32): OSErr; external name '_PauseSpeechAt';
+{
+ * ContinueSpeech()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ContinueSpeech(chan: SpeechChannel): OSErr; external name '_ContinueSpeech';
+{
+ * SpeechBusy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SpeechBusy: SInt16; external name '_SpeechBusy';
+{
+ * SpeechBusySystemWide()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SpeechBusySystemWide: SInt16; external name '_SpeechBusySystemWide';
+{
+ * SetSpeechRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetSpeechRate(chan: SpeechChannel; rate: Fixed): OSErr; external name '_SetSpeechRate';
+{
+ * GetSpeechRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetSpeechRate(chan: SpeechChannel; var rate: Fixed): OSErr; external name '_GetSpeechRate';
+{
+ * SetSpeechPitch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetSpeechPitch(chan: SpeechChannel; pitch: Fixed): OSErr; external name '_SetSpeechPitch';
+{
+ * GetSpeechPitch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetSpeechPitch(chan: SpeechChannel; var pitch: Fixed): OSErr; external name '_GetSpeechPitch';
+{
+ * SetSpeechInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetSpeechInfo(chan: SpeechChannel; selector: OSType; speechInfo: UnivPtr): OSErr; external name '_SetSpeechInfo';
+{
+ * GetSpeechInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetSpeechInfo(chan: SpeechChannel; selector: OSType; speechInfo: UnivPtr): OSErr; external name '_GetSpeechInfo';
+{
+ * TextToPhonemes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TextToPhonemes(chan: SpeechChannel; textBuf: UnivPtr; textBytes: UInt32; phonemeBuf: Handle; var phonemeBytes: SInt32): OSErr; external name '_TextToPhonemes';
+{
+ * UseDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SpeechLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UseDictionary(chan: SpeechChannel; dictionary: Handle): OSErr; external name '_UseDictionary';
+{$ALIGN MAC68K}
+
+
+{unit SystemSound}
+(*
+ File: OSServices/SystemSound.h
+
+ Contains: SystemSound include file
+
+ Version: OSServices-97~320
+
+ Copyright: © 2000-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+*)
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+(* ================================================================================ *)
+(* Errors *)
+(* ================================================================================ *)
+const
+ kSystemSoundNoError = 0;
+ kSystemSoundUnspecifiedError = -1500;
+ kSystemSoundClientTimedOutError = -1501;
+
+(* ================================================================================ *)
+(* Types *)
+(* ================================================================================ *)
+type
+ SystemSoundActionID = UInt32;
+type
+ SystemSoundCompletionProcPtr = function( actionID: SystemSoundActionID; userData: UnivPtr ): OSStatus;
+type
+ SystemSoundCompletionUPP = SystemSoundCompletionProcPtr;
+(*
+ * NewSystemSoundCompletionUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: available as macro/inline
+ *)
+function NewSystemSoundCompletionUPP( userRoutine: SystemSoundCompletionProcPtr ): SystemSoundCompletionUPP; external name '_NewSystemSoundCompletionUPP'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+(*
+ * DisposeSystemSoundCompletionUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: available as macro/inline
+ *)
+procedure DisposeSystemSoundCompletionUPP( userUPP: SystemSoundCompletionUPP ); external name '_DisposeSystemSoundCompletionUPP'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+(*
+ * InvokeSystemSoundCompletionUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: available as macro/inline
+ *)
+function InvokeSystemSoundCompletionUPP( actionID: SystemSoundActionID; userData: UnivPtr; userUPP: SystemSoundCompletionUPP ): OSStatus; external name '_InvokeSystemSoundCompletionUPP'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+(* ================================================================================ *)
+(* Public APIs *)
+(* ================================================================================ *)
+(*
+ * AlertSoundPlay()
+ *
+ * Summary:
+ * Play an Alert Sound
+ *
+ * Discussion:
+ * Play the user's current alert sound, interrupting any previously
+ * playing alert sound.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ *)
+procedure AlertSoundPlay; external name '_AlertSoundPlay'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+(*
+ * AlertSoundPlayCustomSound()
+ *
+ * Summary:
+ * Play a User designated Alert Sound
+ *
+ * Discussion:
+ * Play a sound, designated by a SystemSoundActionID, with the
+ * behavior of AlertSoundPlay().
+ *
+ * Parameters:
+ *
+ * inAction:
+ * A SystemSoundActionID indicating the desired Sound to be played
+ * with AlertSound behavior.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ *)
+procedure AlertSoundPlayCustomSound( inAction: SystemSoundActionID ); external name '_AlertSoundPlayCustomSound'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+(*
+ * SystemSoundPlay()
+ *
+ * Summary:
+ * Play a System Sound
+ *
+ * Discussion:
+ * Immediately play the sound designated by actionID. Use for one
+ * time actions that do not require a duration or modification
+ * during playback. Sustain loops in the sound will be ignored.
+ *
+ * Parameters:
+ *
+ * inAction:
+ * A SystemSoundActionID indicating the desired System Sound to be
+ * played.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ *)
+procedure SystemSoundPlay( inAction: SystemSoundActionID ); external name '_SystemSoundPlay'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+(*
+ * SystemSoundGetActionID()
+ *
+ * Summary:
+ * Create a 'custom' System Sound by providing an audio file.
+ *
+ * Discussion:
+ * If the user wants to add a sound that can be played via
+ * SystemSoundPlay(), an FSRef for an audio file can be passed and a
+ * SystemSoundActionID, which can be passed to SystemSoundPlay() or
+ * AlertSoundPlayCustomSound(), will be returned. It is important
+ * that SystemSoundRemoveActionID() be called when the action is no
+ * longer needed by the client application so the System Sound
+ * Server can release any resources dedicated to the returned action
+ * id.
+ *
+ * Parameters:
+ *
+ * userFile:
+ * An const FSRef * for the audio file to be used as a System
+ * Sound. Any audio file supported by the AudioFile APIs in the
+ * AudioToolbox framework may be used.
+ *
+ * outAction:
+ * If successful, a SystemSoundActionID will be returned, which in
+ * turn can be passed to SystemSoundPlay().
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ *)
+function SystemSoundGetActionID( const (*var*) userFile: FSRef; var outAction: SystemSoundActionID ): OSStatus; external name '_SystemSoundGetActionID'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+(*
+ * SystemSoundRemoveActionID()
+ *
+ * Summary:
+ * Remove a 'custom' System Sound.
+ *
+ * Discussion:
+ * If the user no longer needs to use the custom system sound that
+ * was created via SystemSoundGetActionID, this function should be
+ * called so the SystemSoundServer can release resources that are no
+ * longer needed.
+ *
+ * Parameters:
+ *
+ * inAction:
+ * A SystemSoundActionID indicating the desired System Sound to be
+ * removed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ *)
+function SystemSoundRemoveActionID( inAction: SystemSoundActionID ): OSStatus; external name '_SystemSoundRemoveActionID'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+(*
+ * SystemSoundSetCompletionRoutine()
+ *
+ * Summary:
+ * Call the provided Completion Routine when the provided
+ * SystemSoundActionID finishes playing in the server.
+ *
+ * Discussion:
+ * Once set, the System Sound Server will send a message to the
+ * System Sound Client indicating which SystemSoundActionID has
+ * finished playing.
+ *
+ * Parameters:
+ *
+ * inAction:
+ * The SystemSoundActionID that the completion routine will be
+ * associated with.
+ *
+ * inRunLoop:
+ * A CFRunLoopRef indicating the desired run loop the completion
+ * routine should be run on. Pass NULL for the main run loop.
+ *
+ * inRunLoopMode:
+ * A CFStringRef indicating the run loop mode for the runloop mode
+ * for the runloop where the completion routine will be executed.
+ * Pass NULL to use kCFRunLoopDefaultMode.
+ *
+ * inCompletionRoutine:
+ * A SystemSoundCompletionProc for the completion routine proc to
+ * be called when the provided SystemSoundActionID has completed
+ * playing in the server.
+ *
+ * inUserData:
+ * A void * to pass user data to the completion routine.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ *)
+function SystemSoundSetCompletionRoutine( inAction: SystemSoundActionID; inRunLoop: CFRunLoopRef; inRunLoopMode: CFStringRef; inCompletionRoutine: SystemSoundCompletionUPP; inUserData: UnivPtr ): OSStatus; external name '_SystemSoundSetCompletionRoutine'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+(*
+ * SystemSoundRemoveCompletionRoutine()
+ *
+ * Summary:
+ * Remove the Completion Routine being used for the provided
+ * SystemSoundActionID.
+ *
+ * Discussion:
+ * To be called when it is no longer desired for the Completion
+ * Routine to be called when a System Sound action has finished
+ * playing.
+ *
+ * Parameters:
+ *
+ * inAction:
+ * A SystemSoundActionID that currently has an associated
+ * completion routine.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ *)
+procedure SystemSoundRemoveCompletionRoutine( inAction: SystemSoundActionID ); external name '_SystemSoundRemoveCompletionRoutine'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{unit ABActions}
+//
+// ABActionsC.h
+// AddressBook Framework
+//
+// Copyright (c) 2003 Apple Computer. All rights reserved.
+//
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+// --------------------------------------------------------------------------------
+// Action Support
+// --------------------------------------------------------------------------------
+// This API allows developers to populate AddressBook.app's roll-over menus with custom
+// entries. Your CFBundle must implement a function named ABActionRegisterCallbacks which
+// will return a pointer to an ABActionCallbacks struct. This struct should be filled out
+// as follows:
+//
+// version: The version of this structure is 0.
+//
+// proprty: A pointer to a function that returns the AddressBook property this action applies
+// to. Only items with labels may have actions at this time. (emails, phones, birthdays, etc)
+//
+// title: A pointer to a function which returns a copy of the title to be displayed. This function
+// takes two parameters, the selected person and item identifier. The item identifier will be NULL
+// for single value properties. AddressBook will release this string when it's done with it.
+//
+// enabled: A pointer to a function which returns YES if the action should be enabled for the
+// passed ABPersonRef and item identifier. The item identifier will be NULL for single value
+// properties. This field may be NULL. Actions with NULL enabled callbacks will always be enabled.
+//
+// selected. A pointer to a function which will be called when the user selects this action.
+// It's passed an ABPersonRef and item identifier. The item identifier will be NULL for single
+// value properties.
+//
+// Action plugins are stored in ~/Library/Address Book Plug-Ins or /Library/Address Book Plug-Ins
+//
+// There can be only 1 Action plug in per bundle.
+
+type ABActionGetPropertyCallback = function: CFStringRef;
+type ABActionCopyTitleCallback = function( person: ABPersonRef; identifier: CFStringRef ): CFStringRef;
+type ABActionEnabledCallback = function( person: ABPersonRef; identifier: CFStringRef ): Boolean;
+type ABActionSelectedCallback = procedure( person: ABPersonRef; identifier: CFStringRef );
+
+type ABActionCallbacks = record
+ version: CFIndex;
+ proprty: ABActionGetPropertyCallback;
+ title: ABActionCopyTitleCallback;
+ enabled: ABActionEnabledCallback;
+ selected: ABActionSelectedCallback;
+end;
+
+// Your CFBundle MUST include a function named ABActionRegisterCallbacks which returns a pointer
+// to a filled out ABActionCallbacks struct:
+//
+// ABActionCallbacks* ABActionRegisterCallbacks(void);
+
+{unit ATSTypes}
+{
+ File: ATSTypes.p
+
+ Contains: Public interfaces for Apple Type Services components.
+
+ Version: Technology: Mac OS 9 / Carbon
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1997-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+ FMGeneration = UInt32;
+ { The FMFontFamily reference represents a collection of fonts with the same design
+ characteristics. It replaces the standard QuickDraw font identifer and may be used
+ with all QuickDraw functions including GetFontName and TextFont. It cannot be used
+ with the Resource Manager to access information from a FOND resource handle. A font
+ reference does not imply a particular script system, nor is the character encoding
+ of a font family determined by an arithmetic mapping of its value.
+ }
+ FMFontFamily = SInt16;
+ FMFontStyle = SInt16;
+ FMFontStylePtr = ^FMFontStyle; { when a VAR xx: FMFontStyle parameter can be nil, it is changed to xx: FMFontStylePtr }
+ FMFontSize = SInt16;
+ FMFontSizePtr = ^FMFontSize; { when a VAR xx: FMFontSize parameter can be nil, it is changed to xx: FMFontSizePtr }
+ {
+ The font family is a collection of fonts, each of which is identified
+ by an FMFont reference that maps to a single object registered with
+ the font database. The font references associated with the font
+ family consist of individual outline and bitmapped fonts that may be
+ used with the font access routines of the Font Manager and ATS.
+ }
+ FMFont = UInt32;
+ FMFontPtr = ^FMFont; { when a VAR xx: FMFont parameter can be nil, it is changed to xx: FMFontPtr }
+ FMFontFamilyInstancePtr = ^FMFontFamilyInstance;
+ FMFontFamilyInstance = record
+ fontFamily: FMFontFamily;
+ fontStyle: FMFontStyle;
+ end;
+
+ FMFontFamilyIteratorPtr = ^FMFontFamilyIterator;
+ FMFontFamilyIterator = record
+ reserved: array [0..15] of UInt32;
+ end;
+
+ FMFontIteratorPtr = ^FMFontIterator;
+ FMFontIterator = record
+ reserved: array [0..15] of UInt32;
+ end;
+
+ FMFontFamilyInstanceIteratorPtr = ^FMFontFamilyInstanceIterator;
+ FMFontFamilyInstanceIterator = record
+ reserved: array [0..15] of UInt32;
+ end;
+
+
+const
+ kInvalidGeneration = 0;
+ kInvalidFontFamily = -1;
+ kInvalidFont = 0;
+
+ kFMCurrentFilterFormat = 0;
+
+ { kFMDefaultOptions & kFMUseGlobalScopeOption moved to Fonts.h }
+
+type
+ FMFilterSelector = UInt32;
+const
+ kFMFontTechnologyFilterSelector = 1;
+ kFMFontContainerFilterSelector = 2;
+ kFMGenerationFilterSelector = 3;
+ kFMFontFamilyCallbackFilterSelector = 4;
+ kFMFontCallbackFilterSelector = 5;
+ kFMFontDirectoryFilterSelector = 6;
+
+ kFMTrueTypeFontTechnology = $74727565 (* 'true' *);
+ kFMPostScriptFontTechnology = $74797031 (* 'typ1' *);
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ FMFontFamilyCallbackFilterProcPtr = function(iFontFamily: FMFontFamily; iRefCon: UnivPtr): OSStatus;
+{$elsec}
+ FMFontFamilyCallbackFilterProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ FMFontCallbackFilterProcPtr = function(iFont: FMFont; iRefCon: UnivPtr): OSStatus;
+{$elsec}
+ FMFontCallbackFilterProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ FMFontFamilyCallbackFilterUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ FMFontFamilyCallbackFilterUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ FMFontCallbackFilterUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ FMFontCallbackFilterUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppFMFontFamilyCallbackFilterProcInfo = $000003B0;
+ uppFMFontCallbackFilterProcInfo = $000003F0;
+ {
+ * NewFMFontFamilyCallbackFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewFMFontFamilyCallbackFilterUPP(userRoutine: FMFontFamilyCallbackFilterProcPtr): FMFontFamilyCallbackFilterUPP; external name '_NewFMFontFamilyCallbackFilterUPP'; { old name was NewFMFontFamilyCallbackFilterProc }
+{
+ * NewFMFontCallbackFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewFMFontCallbackFilterUPP(userRoutine: FMFontCallbackFilterProcPtr): FMFontCallbackFilterUPP; external name '_NewFMFontCallbackFilterUPP'; { old name was NewFMFontCallbackFilterProc }
+{
+ * DisposeFMFontFamilyCallbackFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeFMFontFamilyCallbackFilterUPP(userUPP: FMFontFamilyCallbackFilterUPP); external name '_DisposeFMFontFamilyCallbackFilterUPP';
+{
+ * DisposeFMFontCallbackFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeFMFontCallbackFilterUPP(userUPP: FMFontCallbackFilterUPP); external name '_DisposeFMFontCallbackFilterUPP';
+{
+ * InvokeFMFontFamilyCallbackFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeFMFontFamilyCallbackFilterUPP(iFontFamily: FMFontFamily; iRefCon: UnivPtr; userRoutine: FMFontFamilyCallbackFilterUPP): OSStatus; external name '_InvokeFMFontFamilyCallbackFilterUPP'; { old name was CallFMFontFamilyCallbackFilterProc }
+{
+ * InvokeFMFontCallbackFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeFMFontCallbackFilterUPP(iFont: FMFont; iRefCon: UnivPtr; userRoutine: FMFontCallbackFilterUPP): OSStatus; external name '_InvokeFMFontCallbackFilterUPP'; { old name was CallFMFontCallbackFilterProc }
+type
+ FMFontDirectoryFilterPtr = ^FMFontDirectoryFilter;
+ FMFontDirectoryFilter = record
+ fontFolderDomain: SInt16;
+ reserved: array [0..1] of UInt32;
+ end;
+
+ FMFilterPtr = ^FMFilter;
+ FMFilter = record
+ format: UInt32;
+ selector: FMFilterSelector;
+ case SInt16 of
+ 0: (
+ fontTechnologyFilter: FourCharCode;
+ );
+ 1: (
+ fontContainerFilter: FSSpec;
+ );
+ 2: (
+ generationFilter: FMGeneration;
+ );
+ 3: (
+ fontFamilyCallbackFilter: FMFontFamilyCallbackFilterUPP;
+ );
+ 4: (
+ fontCallbackFilter: FMFontCallbackFilterUPP;
+ );
+ 5: (
+ fontDirectoryFilter: FMFontDirectoryFilter;
+ );
+ end;
+
+ ATSOptionFlags = OptionBits;
+ ATSGeneration = UInt32;
+ ATSFontContainerRef = UInt32;
+ ATSFontFamilyRef = UInt32;
+ ATSFontRef = UInt32;
+ ATSGlyphRef = UInt16;
+ ATSFontSize = Float32;
+
+const
+ kATSGenerationUnspecified = 0;
+ kATSFontContainerRefUnspecified = 0;
+ kATSFontFamilyRefUnspecified = 0;
+ kATSFontRefUnspecified = 0;
+
+
+type
+ ATSFontMetricsPtr = ^ATSFontMetrics;
+ ATSFontMetrics = record
+ version: UInt32;
+ ascent: Float32; { Maximum height above baseline reached by the glyphs in the font }
+ { or maximum distance to the right of the centerline reached by the glyphs in the font }
+ descent: Float32; { Maximum depth below baseline reached by the glyphs in the font }
+ { or maximum distance to the left of the centerline reached by the glyphs in the font }
+ leading: Float32; { Desired spacing between lines of text }
+ avgAdvanceWidth: Float32;
+ maxAdvanceWidth: Float32; { Maximum advance width or height of the glyphs in the font }
+ minLeftSideBearing: Float32; { Minimum left or top side bearing }
+ minRightSideBearing: Float32; { Minimum right or bottom side bearing }
+ stemWidth: Float32; { Width of the dominant vertical stems of the glyphs in the font }
+ stemHeight: Float32; { Vertical width of the dominant horizontal stems of glyphs in the font }
+ capHeight: Float32; { Height of a capital letter from the baseline to the top of the letter }
+ xHeight: Float32; { Height of lowercase characters in a font, specifically the letter x, excluding ascenders and descenders }
+ italicAngle: Float32; { Angle in degrees counterclockwise from the vertical of the dominant vertical strokes of the glyphs in the font }
+ underlinePosition: Float32; { Distance from the baseline for positioning underlining strokes }
+ underlineThickness: Float32; { Stroke width for underlining }
+ end;
+
+
+const
+ kATSItalicQDSkew = $00004000; { fixed value of 0.25 }
+ kATSBoldQDStretch = $00018000; { fixed value of 1.50 }
+ kATSRadiansFactor = 1144; { fixed value of approx. pi/180 (0.0174560546875) }
+
+ { Glyph outline path constants used in ATSFontGetNativeCurveType. }
+
+type
+ ATSCurveType = UInt16;
+const
+ kATSCubicCurveType = $0001;
+ 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
+}
+const
+ kATSDeletedGlyphcode = $FFFF;
+
+
+type
+ ATSUCurvePathPtr = ^ATSUCurvePath;
+ ATSUCurvePath = record
+ vectors: UInt32;
+ controlBits: array [0..0] of UInt32;
+ vector: array [0..0] of Float32Point;
+ end;
+
+ ATSUCurvePathsPtr = ^ATSUCurvePaths;
+ ATSUCurvePaths = record
+ contours: UInt32;
+ contour: array [0..0] of ATSUCurvePath;
+ end;
+
+ { Glyph ideal metrics }
+ ATSGlyphIdealMetricsPtr = ^ATSGlyphIdealMetrics;
+ ATSGlyphIdealMetrics = record
+ advance: Float32Point;
+ sideBearing: Float32Point;
+ otherSideBearing: Float32Point;
+ end;
+
+ { Glyph screen metrics }
+ ATSGlyphScreenMetricsPtr = ^ATSGlyphScreenMetrics;
+ ATSGlyphScreenMetrics = record
+ deviceAdvance: Float32Point;
+ topLeft: Float32Point;
+ height: UInt32;
+ width: UInt32;
+ sideBearing: Float32Point;
+ otherSideBearing: Float32Point;
+ end;
+
+ GlyphID = ATSGlyphRef;
+ GlyphID_fix = GlyphID; { used as field type when a record declaration contains a GlyphID field identifier }
+ GlyphIDPtr = ^GlyphID;
+{$ALIGN MAC68K}
+
+
+{unit Aliases}
+{
+ File: Aliases.p
+
+ Contains: Alias Manager Interfaces.
+
+ Version: Technology: Mac OS 8.1
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1989-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ rAliasType = $616C6973 (* 'alis' *); { Aliases are stored as resources of this type }
+
+ { define alias resolution action rules mask }
+ kARMMountVol = $00000001; { mount the volume automatically }
+ kARMNoUI = $00000002; { no user interface allowed during resolution }
+ kARMMultVols = $00000008; { search on multiple volumes }
+ kARMSearch = $00000100; { search quickly }
+ kARMSearchMore = $00000200; { search further }
+ kARMSearchRelFirst = $00000400; { search target on a relative path first }
+
+ { define alias record information types }
+ asiZoneName = -3; { get zone name }
+ asiServerName = -2; { get server name }
+ asiVolumeName = -1; { get volume name }
+ asiAliasName = 0; { get aliased file/folder/volume name }
+ asiParentName = 1; { get parent folder name }
+
+ { ResolveAliasFileWithMountFlags options }
+ kResolveAliasFileNoUI = $00000001; { no user interaction during resolution }
+
+ { define the alias record that will be the blackbox for the caller }
+
+type
+ AliasRecordPtr = ^AliasRecord;
+ AliasRecord = record
+ userType: OSType; { appl stored type like creator type }
+ aliasSize: UInt16; { alias record size in bytes, for appl usage }
+ end;
+
+ AliasPtr = ^AliasRecord;
+ AliasHandle = ^AliasPtr;
+ { alias record information type }
+ AliasInfoType = SInt16;
+ {
+ * NewAlias()
+ *
+ * Summary:
+ * create a new alias between fromFile and target, returns alias
+ * record handle
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewAlias(fromFile: {Const}FSSpecPtr; const (*var*) target: FSSpec; var alias: AliasHandle): OSErr; external name '_NewAlias';
+{
+ * NewAliasMinimal()
+ *
+ * Summary:
+ * create a minimal new alias for a target and return alias record
+ * handle
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewAliasMinimal(const (*var*) target: FSSpec; var alias: AliasHandle): OSErr; external name '_NewAliasMinimal';
+{
+ * NewAliasMinimalFromFullPath()
+ *
+ * Summary:
+ * create a minimal new alias from a target fullpath (optional zone
+ * and server name) and return alias record handle
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewAliasMinimalFromFullPath(fullPathLength: SInt16; fullPath: UnivPtr; const (*var*) zoneName: Str32; const (*var*) serverName: Str31; var alias: AliasHandle): OSErr; external name '_NewAliasMinimalFromFullPath';
+{
+ * ResolveAlias()
+ *
+ * Summary:
+ * given an alias handle and fromFile, resolve the alias, update the
+ * alias record and return aliased filename and wasChanged flag.
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ResolveAlias(fromFile: {Const}FSSpecPtr; alias: AliasHandle; var target: FSSpec; var wasChanged: boolean): OSErr; external name '_ResolveAlias';
+{
+ * GetAliasInfo()
+ *
+ * Summary:
+ * given an alias handle and an index specifying requested alias
+ * information type, return the information from alias record as a
+ * string.
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetAliasInfo(alias: AliasHandle; index: AliasInfoType; var theString: Str63): OSErr; external name '_GetAliasInfo';
+{
+ * IsAliasFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IsAliasFile(const (*var*) fileFSSpec: FSSpec; var aliasFileFlag: boolean; var folderFlag: boolean): OSErr; external name '_IsAliasFile';
+{
+ * ResolveAliasWithMountFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ResolveAliasWithMountFlags(fromFile: {Const}FSSpecPtr; alias: AliasHandle; var target: FSSpec; var wasChanged: boolean; mountFlags: UInt32): OSErr; external name '_ResolveAliasWithMountFlags';
+{
+ * ResolveAliasFile()
+ *
+ * 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.
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ResolveAliasFile(var theSpec: FSSpec; resolveAliasChains: boolean; var targetIsFolder: boolean; var wasAliased: boolean): OSErr; external name '_ResolveAliasFile';
+{
+ * ResolveAliasFileWithMountFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ResolveAliasFileWithMountFlags(var theSpec: FSSpec; resolveAliasChains: boolean; var targetIsFolder: boolean; var wasAliased: boolean; mountFlags: UInt32): OSErr; external name '_ResolveAliasFileWithMountFlags';
+{
+ * FollowFinderAlias()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FollowFinderAlias(fromFile: {Const}FSSpecPtr; alias: AliasHandle; logon: boolean; var target: FSSpec; var wasChanged: boolean): OSErr; external name '_FollowFinderAlias';
+{
+ Low Level Routines
+}
+{
+ * UpdateAlias()
+ *
+ * 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.
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UpdateAlias(fromFile: {Const}FSSpecPtr; const (*var*) target: FSSpec; alias: AliasHandle; var wasChanged: boolean): OSErr; external name '_UpdateAlias';
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ AliasFilterProcPtr = function(cpbPtr: CInfoPBPtr; var quitFlag: boolean; myDataPtr: Ptr): boolean;
+{$elsec}
+ AliasFilterProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ AliasFilterUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ AliasFilterUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppAliasFilterProcInfo = $00000FD0;
+ {
+ * NewAliasFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewAliasFilterUPP(userRoutine: AliasFilterProcPtr): AliasFilterUPP; external name '_NewAliasFilterUPP'; { old name was NewAliasFilterProc }
+{
+ * DisposeAliasFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeAliasFilterUPP(userUPP: AliasFilterUPP); external name '_DisposeAliasFilterUPP';
+{
+ * InvokeAliasFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeAliasFilterUPP(cpbPtr: CInfoPBPtr; var quitFlag: boolean; myDataPtr: Ptr; userRoutine: AliasFilterUPP): boolean; external name '_InvokeAliasFilterUPP'; { old name was CallAliasFilterProc }
+{
+ * MatchAlias()
+ *
+ * Summary:
+ * Given an alias handle and fromFile, match the alias and return
+ * aliased filename(s) and needsUpdate flag
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MatchAlias(fromFile: {Const}FSSpecPtr; rulesMask: UInt32; alias: AliasHandle; var aliasCount: SInt16; aliasList: FSSpecArrayPtr; var needsUpdate: boolean; aliasFilter: AliasFilterUPP; yourDataPtr: UnivPtr): OSErr; external name '_MatchAlias';
+{
+ * ResolveAliasFileWithMountFlagsNoUI()
+ *
+ * Summary:
+ * variation on ResolveAliasFile that does not prompt user with a
+ * dialog
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ResolveAliasFileWithMountFlagsNoUI(var theSpec: FSSpec; resolveAliasChains: boolean; var targetIsFolder: boolean; var wasAliased: boolean; mountFlags: UInt32): OSErr; external name '_ResolveAliasFileWithMountFlagsNoUI';
+
+{
+ * MatchAliasNoUI()
+ *
+ * Summary:
+ * variation on MatchAlias that does not prompt user with a dialog
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MatchAliasNoUI(fromFile: {Const}FSSpecPtr; rulesMask: UInt32; alias: AliasHandle; var aliasCount: SInt16; aliasList: FSSpecArrayPtr; var needsUpdate: boolean; aliasFilter: AliasFilterUPP; yourDataPtr: UnivPtr): OSErr; external name '_MatchAliasNoUI';
+
+{
+ * FSNewAlias()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSNewAlias(fromFile: {Const}FSRefPtr; const (*var*) target: FSRef; var inAlias: AliasHandle): OSErr; external name '_FSNewAlias';
+{
+ * FSNewAliasMinimal()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSNewAliasMinimal(const (*var*) target: FSRef; var inAlias: AliasHandle): OSErr; external name '_FSNewAliasMinimal';
+{
+ * FSIsAliasFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSIsAliasFile(const (*var*) fileRef: FSRef; var aliasFileFlag: boolean; var folderFlag: boolean): OSErr; external name '_FSIsAliasFile';
+{
+ * FSResolveAliasWithMountFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSResolveAliasWithMountFlags(fromFile: {Const}FSRefPtr; inAlias: AliasHandle; var target: FSRef; var wasChanged: boolean; mountFlags: UInt32): OSErr; external name '_FSResolveAliasWithMountFlags';
+{
+ * FSResolveAlias()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSResolveAlias(fromFile: {Const}FSRefPtr; alias: AliasHandle; var target: FSRef; var wasChanged: boolean): OSErr; external name '_FSResolveAlias';
+{
+ * FSResolveAliasFileWithMountFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSResolveAliasFileWithMountFlags(var theRef: FSRef; resolveAliasChains: boolean; var targetIsFolder: boolean; var wasAliased: boolean; mountFlags: UInt32): OSErr; external name '_FSResolveAliasFileWithMountFlags';
+{
+ * FSResolveAliasFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSResolveAliasFile(var theRef: FSRef; resolveAliasChains: boolean; var targetIsFolder: boolean; var wasAliased: boolean): OSErr; external name '_FSResolveAliasFile';
+{
+ * FSFollowFinderAlias()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSFollowFinderAlias(fromFile: FSRefPtr; alias: AliasHandle; logon: boolean; var target: FSRef; var wasChanged: boolean): OSErr; external name '_FSFollowFinderAlias';
+{
+ * FSUpdateAlias()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FSUpdateAlias(fromFile: {Const}FSRefPtr; const (*var*) target: FSRef; alias: AliasHandle; var wasChanged: boolean): OSErr; external name '_FSUpdateAlias';
+{$ALIGN MAC68K}
+
+
+{unit AppleHelp}
+{
+ File: AppleHelp.p
+
+ Contains: Apple Help
+
+ Version: Technology: Mac OS X/CarbonLib 1.1
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 2000-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ AppleHelp Error Codes }
+
+const
+ kAHInternalErr = -10790;
+ kAHInternetConfigPrefErr = -10791;
+
+
+type
+ AHTOCType = SInt16;
+const
+ kAHTOCTypeUser = 0;
+ kAHTOCTypeDeveloper = 1;
+
+ {
+ * 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,
+ * kAHInternetConfigPrefErr.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AHSearch(bookname: CFStringRef; query: CFStringRef): OSStatus; external name '_AHSearch';
+
+{
+ * AHGotoMainTOC()
+ *
+ * Discussion:
+ * Delivers a request to load the main table of contents of
+ * installed help books to the Help Viewer application.
+ *
+ * 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,
+ * kAHInternetConfigPrefErr.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AHGotoMainTOC(toctype: AHTOCType): OSStatus; external name '_AHGotoMainTOC';
+
+{
+ * 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
+ * in the bookname parameter, or 2) if bookname is NULL, a full
+ * 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,
+ * kAHInternetConfigPrefErr.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AHGotoPage(bookname: CFStringRef; path: CFStringRef; anchor: CFStringRef): OSStatus; external name '_AHGotoPage';
+
+{
+ * 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,
+ * kAHInternetConfigPrefErr.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AHLookupAnchor(bookname: CFStringRef; anchor: CFStringRef): OSStatus; external name '_AHLookupAnchor';
+
+
+{
+ * 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:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AHRegisterHelpBook(const (*var*) appBundleRef: FSRef): OSStatus; external name '_AHRegisterHelpBook';
+
+{$ALIGN MAC68K}
+
+
+{unit AudioHardware}
+{==================================================================================================
+ File: CoreAudio/AudioHardware.h
+
+ Contains: API for communicating with audio hardware.
+
+ Version: Technology: Mac OS X
+ Release: Mac OS X
+
+ Copyright: (c) 1985-2005 by Apple Computer, Inc., all rights reserved.
+
+==================================================================================================}
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+//==================================================================================================
+//#pragma mark Overview
+{!
+ @header AudioHardware
+ The audio HAL provides an abstraction through which applications can access audio hardware. To
+ do this, the HAL provides a small set of AudioObjects that provide access to the various pieces
+ of the system.
+
+ AudioObjects all have a set of properties that describe and manipulate their state. A property
+ is accessed via an ordered triple. The first ordinate is the selector which describes the
+ property. The other two ordinates are the scope and element that identify the particular part of
+ the object in which to look for the selector. The AudioObjectPropertyAddress structure
+ encapsulates the property address. The value of a property is an untyped block of data whose
+ content depends on the specifics of the selector. Some selectors also require the use of a
+ qualifier when querying. The qualifier allows for additional information to be provided to be
+ used in the manipulation of the property. Changing the value of a property is always considered
+ asynchronous.
+
+ Applications use the routines AudioObjectHasProperty(), AudioObjectIsPropertySettable() and
+ AudioObjectGetPropertyDataSize() to find useful meta-information about the property. Apps use
+ AudioObjectGetPropertyData() and AudioObjectSetPropertyData() to manipulate the value of the
+ property. Apps use AudioObjectAddPropertyListener() and AudioObjectRemovePropertyListener() to
+ register/unregister a function that is to be called when a given property's value changes.
+
+ The class of an AudioObject determines the basic functionality of the object in terms of what
+ functions will operate on it as well as the set of properties that can be expected to be
+ implemented by the object. The set of available classes for objects is limited to those defined
+ here. There are no other classes. The set of classes is arranged in a hierarchy such that one
+ class inherits the properties/routines of it's super class.
+
+ The base class for all AudioObjects is the class AudioObject. As such, each AudioObject will
+ provide basic properties such as it's class, it's human readable name, and the other
+ AudioObjects it contains. Other important classes include AudioSystemObject, AudioDevice, and
+ AudioStream.
+
+ The AudioObjects in the HAL are arranged in a containment hierarchy. The root of the hierarchy
+ is the one and only instance of the AudioSystemObject class. The properties of the
+ AudioSystemObject describe the process global settings such as the various default devices and
+ the notification run loop. The AudioSystemObject also contains all the AudioDevices that are
+ available.
+
+ Instances of the AudioDevice class encapsulate individual audio devices. An AudioDevice serves
+ as the basic unit of IO. It provides a single IO cycle, a timing source based on it, and all the
+ buffers synchronized to it. The IO cycle presents all the synchronized buffers to the client in
+ the same call out along with time stamps that specify the current time, when the input data was
+ acquired and when the output data will be presented.
+
+ AudioDevices contain instances of the AudioStream class. An AudioStream represents a single
+ buffer of data for transferring across the user/kernel boundary. As such, AudioStreams are the
+ gatekeepers of format information. Each has it's own format and list of available formats.
+ AudioStreams can provide data in any format, including encoded formats and non-audio formats. If
+ the format is a linear PCM format, the data will always be presented as 32 bit, native endian
+ floating point. All conversions to and from the true physical format of the hardware is handled
+ by the device's driver.
+
+ Both AudioDevices and AudioStreams can contain instances of the AudioControl class or it's many
+ subclasses. An AudioControl provides properties that describe/manipulate a particular aspect of
+ the object such as gain, mute, data source selection, etc. Many common controls are also
+ also available as properties on the AudioDevice or AudioStream.
+}
+
+
+
+//==================================================================================================
+//#pragma mark Error Constants
+
+{!
+ @enum Error Constants
+ @abstract The error constants unique to the HAL.
+ @discussion These are the error constants that are unique to the HAL. Note that the HAL's
+ functions can and will return other codes that are not listed here. While these
+ constants give a general idea of what might have gone wrong during the execution
+ of an API call, if an API call returns anything other than kAudioHardwareNoError
+ it is to be viewed as the same failure regardless of what constant is actually
+ returned.
+ @constant kAudioHardwareNoError
+ The function call completed successfully.
+ @constant kAudioHardwareNotRunningError
+ The function call requires that the hardware be running but it isn't.
+ @constant kAudioHardwareUnspecifiedError
+ The function call failed while doing something that doesn't provide any
+ error messages.
+ @constant kAudioHardwareUnknownPropertyError
+ The AudioObject doesn't know about the property at the given address.
+ @constant kAudioHardwareBadPropertySizeError
+ An improperly sized buffer was provided when accessing the data of a
+ property.
+ @constant kAudioHardwareIllegalOperationError
+ The requested operation couldn't be completed.
+ @constant kAudioHardwareBadObjectError
+ The AudioObjectID passed to the function doesn't map to a valid AudioObject.
+ @constant kAudioHardwareBadDeviceError
+ The AudioDeviceID passed to the function doesn't map to a valid AudioDevice.
+ @constant kAudioHardwareBadStreamError
+ The AudioStreamID passed to the function doesn't map to a valid AudioStream.
+ @constant kAudioHardwareUnsupportedOperationError
+ The AudioObject doesn't support the requested operation.
+ @constant kAudioDeviceUnsupportedFormatError
+ The AudioStream doesn't support the requested format.
+ @constant kAudioDevicePermissionsError
+ The requested operation can't be completed because the process doesn't have
+ permission.
+}
+const
+ kAudioHardwareNoError = 0;
+ kAudioHardwareNotRunningError = $73746F70 (* 'stop' *);
+ kAudioHardwareUnspecifiedError = $77686174 (* 'what' *);
+ kAudioHardwareUnknownPropertyError = $77686F3F (* 'who?' *);
+ kAudioHardwareBadPropertySizeError = $2173697A (* '!siz' *);
+ kAudioHardwareIllegalOperationError = $6E6F7065 (* 'nope' *);
+ kAudioHardwareBadObjectError = $216F626A (* '!obj' *);
+ kAudioHardwareBadDeviceError = $21646576 (* '!dev' *);
+ kAudioHardwareBadStreamError = $21737472 (* '!str' *);
+ kAudioHardwareUnsupportedOperationError = $756E6F70 (* 'unop' *);
+ kAudioDeviceUnsupportedFormatError = $21646174 (* '!dat' *);
+ kAudioDevicePermissionsError = $21686F67 (* '!hog' *);
+
+//==================================================================================================
+//#pragma mark Property Support Types
+
+{!
+ @typedef AudioObjectPropertySelector
+ @abstract An AudioObjectPropertySelector is a four char code that identifies, along with
+ the AudioObjectPropertyScope and AudioObjectPropertyElement, a specific piece of
+ information about an AudioObject.
+ @discussion The property selector specifies the general classification of the property such
+ as volume, stream format, latency, etc. Note that each class has a different set
+ of selectors. A subclass inherits it's super class's set of selectors, although
+ it may not implement them all.
+}
+type
+ AudioObjectPropertySelector = UInt32;
+
+{!
+ @typedef AudioObjectPropertyScope
+ @abstract An AudioObjectPropertyScope is a four char code that identifies, along with the
+ AudioObjectPropertySelector and AudioObjectPropertyElement, a specific piece of
+ information about an AudioObject.
+ @discussion The scope specifies the section of the object in which to look for the property,
+ such as input, output, global, etc. Note that each class has a different set of
+ scopes. A subclass inherits it's superclass's set of scopes.
+}
+type
+ AudioObjectPropertyScope = UInt32;
+
+{!
+ @typedef AudioObjectPropertyElement
+ @abstract An AudioObjectPropertyElement is an integer that identifies, along with the
+ AudioObjectPropertySelector and AudioObjectPropertyScope, a specific piece of
+ information about an AudioObject.
+ @discussion The element selects one of possibly many items in the section of the object in
+ which to look for the property. Elements are number sequentially where 0
+ represents the master element. Elements are particular to an instance of a
+ class, meaning that two instances can have different numbers of elements in the
+ same scope. There is no inheritance of elements.
+}
+type
+ AudioObjectPropertyElement = UInt32;
+
+{!
+ @struct AudioObjectPropertyAddress
+ @abstract An AudioObjectPropertyAddress collects the three parts that identify a specific
+ property together in a struct for easy transmission.
+ @field mSelector
+ The AudioObjectPropertySelector for the property.
+ @field mScope
+ The AudioObjectPropertyScope for the property.
+ @field mElement
+ The AudioObjectPropertyElement for the property.
+}
+type
+ AudioObjectPropertyAddress = record
+ mSelector: AudioObjectPropertySelector;
+ mScope: AudioObjectPropertyScope;
+ mElement: AudioObjectPropertyElement;
+ end;
+ AudioObjectPropertyAddressPtr = ^AudioObjectPropertyAddress;
+
+//==================================================================================================
+//#pragma mark Property Support Constants
+
+{!
+ @enum Property Wildcard Constants
+ @abstract Constants that are used as wildcards in an AudioObjectPropertyAddress.
+ @discussion Wildcards match any and all values for there associated type. They are
+ especially useful for registering listener procs to receive notifications and
+ for querying an AudioObject's list of AudioControls.
+ @constant kAudioObjectPropertySelectorWildcard
+ The wildcard value for AudioObjectPropertySelectors.
+ @constant kAudioObjectPropertyScopeWildcard
+ The wildcard value for AudioObjectPropertyScopes.
+ @constant kAudioObjectPropertyElementWildcard
+ The wildcard value for AudioObjectPropertyElements.
+ @constant kAudioPropertyWildcardPropertyID
+ A synonym for kAudioObjectPropertySelectorWildcard.
+ @constant kAudioPropertyWildcardSection
+ The wildcard value for the isInput argument of AudioDeviceGetPropertyInfo(),
+ AudioDeviceGetProperty(), and AudioDeviceSetProperty().
+ @constant kAudioPropertyWildcardChannel
+ A synonym for kAudioObjectPropertyElementWildcard.
+}
+const
+ kAudioObjectPropertySelectorWildcard = $2A2A2A2A (* '****' *);
+ kAudioObjectPropertyScopeWildcard = $2A2A2A2A (* '****' *);
+ kAudioObjectPropertyElementWildcard = $FFFFFFFF;
+ kAudioPropertyWildcardPropertyID = kAudioObjectPropertySelectorWildcard;
+ kAudioPropertyWildcardSection = $FF;
+ kAudioPropertyWildcardChannel = kAudioObjectPropertyElementWildcard;
+
+//==================================================================================================
+//#pragma mark AudioObject Types
+
+{!
+ @typedef AudioClassID
+ @abstract AudioClassIDs are used to identify the class of an AudioObject.
+}
+type
+ AudioClassID = UInt32;
+
+{!
+ @typedef AudioObjectID
+ @abstract AudioObject is the base class for all the objects in the HAL.
+ @discussion AudioObjects have properties and can contain other AudioObjects.
+}
+type
+ AudioObjectID = UInt32;
+
+{!
+ @typedef AudioObjectPropertyListenerProc
+ @abstract Clients register an AudioObjectPropertyListenerProc with an AudioObject in order
+ to receive notifications when the properties of the object change.
+ @discussion Listeners will be called when possibly many properties have changed.
+ Consequently, the implementation of a listener must go through the array of
+ addresses to see what exactly has changed. Note that the array of addresses will
+ always have at least one address in it for which the listener is signed up to
+ receive notifications about but may contain addresses for properties for which
+ the listener is not signed up to receive notifications.
+ @param inObjectID
+ The AudioObject whose properties have changed.
+ @param inNumberAddresses
+ The number of elements in the inAddresses array.
+ @param inAddresses
+ An array of AudioObjectPropertyAddresses indicating which properties
+ changed.
+ @param inClientData
+ A pointer to client data established when the listener proc was registered
+ with the AudioObject.
+ @result The return value is currently unused and should always be 0.
+}
+type
+ AudioObjectPropertyListenerProc = function( inObjectID: AudioObjectID; inNumberAddresses: UInt32; {const} inAddresses: {variable-size-array} AudioObjectPropertyAddressPtr; inClientData: UnivPtr ): OSStatus;
+
+//==================================================================================================
+//#pragma mark AudioObject Constants
+
+{!
+ @enum AudioObject Class Constants
+ @abstract Various constants related to AudioObjects.
+ @constant kAudioObjectPropertyScopeGlobal
+ The AudioObjectPropertyScope for properties that apply to the object as a
+ whole. All AudioObjects have a global scope and for some it is their only
+ scope.
+ @constant kAudioObjectPropertyElementMaster
+ The AudioObjectPropertyElement value for properties that apply to the master
+ element or to the entire scope.
+ @constant kAudioObjectClassID
+ The AudioClassID that identifies the AudioObject class.
+ @constant kAudioObjectClassIDWildcard
+ The wildcard value for AudioClassIDs.
+ @constant kAudioObjectUnknown
+ The AudioObjectID for a non-existant AudioObject.
+}
+const
+ kAudioObjectPropertyScopeGlobal = $676C6F62 (* 'glob' *);
+ kAudioObjectPropertyElementMaster = 0;
+ kAudioObjectClassID = $616F626A (* 'aobj' *);
+ kAudioObjectClassIDWildcard = $2A2A2A2A (* '****' *);
+ kAudioObjectUnknown = 0;
+
+//==================================================================================================
+//#pragma mark AudioObject Properties
+
+{!
+ @enum AudioObject Property Selectors
+ @abstract AudioObjectPropertySelector values that apply to all AudioObjects.
+ @constant kAudioObjectPropertyClass
+ An AudioClassID that identifies the class of the AudioObject.
+ @constant kAudioObjectPropertyOwner
+ An AudioObjectID that identifies the the AudioObject that owns the given
+ AudioObject. Note that all AudioObjects are owned by some other AudioObject.
+ The only exception is the AudioSystemObject, for which the value of this
+ property is kAudioObjectUnknown.
+ @constant kAudioObjectPropertyCreator
+ A CFString that contains the bundle ID of the plug-in that instantiated the
+ object.
+ @constant kAudioObjectPropertyObjectName
+ A CFString that contains the human readable name of the object. The caller
+ is responsible for releasing the returned CFObject.
+ @constant kAudioObjectPropertyManufacturer
+ A CFString that contains the human readable name of the manufacturer of the
+ hardware the AudioObject is a part of. The caller is responsible for
+ releasing the returned CFObject.
+ @constant kAudioObjectPropertyElementName
+ A CFString that contains a human readable name for the given element in the
+ given scope. The caller is responsible for releasing the returned CFObject.
+ @constant kAudioObjectPropertyElementCategoryName
+ A CFString that contains a human readable name for the category of the given
+ element in the given scope. The caller is responsible for releasing the
+ returned CFObject.
+ @constant kAudioObjectPropertyElementNumberName
+ A CFString that contains a human readable name for the number of the given
+ element in the given scope. The caller is responsible for releasing the
+ returned CFObject.
+ @constant kAudioObjectPropertyOwnedObjects
+ An array of AudioObjectIDs that represent all the AudioObjects owned by the
+ given object. The qualifier is an array of AudioClassIDs. If it is
+ non-empty, the returned array of AudioObjectIDs will only refer to objects
+ whose class is in the qualifier array or whose is a subclass of one in the
+ qualifier array.
+ @constant kAudioObjectPropertyListenerAdded
+ An AudioObjectPropertyAddress indicating the address to which a new listener
+ was added. Note that this property is not for applications to use. Rather,
+ this property is for the HAL shell to notify AudioObjects implemented by an
+ AudioPlugIn when a listener is added.
+ @constant kAudioObjectPropertyListenerRemoved
+ An AudioObjectPropertyAddress indicating the address to which a listener was
+ removed. Note that this property is not for applications to use. Rather,
+ this property is for the HAL shell to notify AudioObjects implemented by an
+ AudioPlugIn when a listener is removed.
+}
+const
+ kAudioObjectPropertyClass = $636C6173 (* 'clas' *);
+ kAudioObjectPropertyOwner = $73746476 (* 'stdv' *);
+ kAudioObjectPropertyCreator = $6F706C67 (* 'oplg' *);
+ kAudioObjectPropertyName = $6C6E616D (* 'lnam' *);
+ kAudioObjectPropertyManufacturer = $6C6D616B (* 'lmak' *);
+ kAudioObjectPropertyElementName = $6C63686E (* 'lchn' *);
+ kAudioObjectPropertyElementCategoryName = $6C63636E (* 'lccn' *);
+ kAudioObjectPropertyElementNumberName = $6C636E6E (* 'lcnn' *);
+ kAudioObjectPropertyOwnedObjects = $6F776E64 (* 'ownd' *);
+ kAudioObjectPropertyListenerAdded = $6C697361 (* 'lisa' *);
+ kAudioObjectPropertyListenerRemoved = $6C697372 (* 'lisr' *);
+
+//==================================================================================================
+//#pragma mark AudioObject Functions
+
+{!
+ @functiongroup AudioObject
+}
+
+{!
+ @function AudioObjectShow
+ @abstract Prints to standard out a textural description of the AudioObject.
+ @param inObjectID
+ The AudioObject to show.
+}
+procedure AudioObjectShow( inObjectID: AudioObjectID ); external name '_AudioObjectShow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{!
+ @function AudioObjectHasProperty
+ @abstract Queries an AudioObject about whether or not it has the given property.
+ @param inObjectID
+ The AudioObject to query.
+ @param inAddress
+ An AudioObjectPropertyAddress indicating which property is being queried.
+ @result A Boolean indicating whether or not the AudioObject has the given property.
+}
+function AudioObjectHasProperty( inObjectID: AudioObjectID; const (*var*) inAddress: AudioObjectPropertyAddress ): Boolean; external name '_AudioObjectHasProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{!
+ @function AudioObjectIsPropertySettable
+ @abstract Queries an AudioObject about whether or not the given property can be set using
+ AudioObjectSetPropertyData.
+ @param inObjectID
+ The AudioObject to query.
+ @param inAddress
+ An AudioObjectPropertyAddress indicating which property is being queried.
+ @param outIsSettable
+ A Boolean indicating whether or not the property can be set.
+ @result An OSStatus indicating success or failure.
+}
+function AudioObjectIsPropertySettable( inObjectID: AudioObjectID; const (*var*) inAddress: AudioObjectPropertyAddress; var outIsSettable: Boolean ): OSStatus; external name '_AudioObjectIsPropertySettable';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{!
+ @function AudioObjectGetPropertyDataSize
+ @abstract Queries an AudioObject to find the size of the data for the given property.
+ @param inObjectID
+ The AudioObject to query.
+ @param inAddress
+ An AudioObjectPropertyAddress indicating which property is being queried.
+ @param inQualifierDataSize
+ A UInt32 indicating the size of the buffer pointed to by inQualifierData.
+ Note that not all properties require qualification, in which case this
+ value will be 0.
+ @param inQualifierData,
+ A buffer of data to be used in determining the data of the property being
+ queried. Note that not all properties require qualification, in which case
+ this value will be NULL.
+ @param outDataSize
+ A UInt32 indicating how many bytes the data for the given property occupies.
+ @result An OSStatus indicating success or failure.
+}
+function AudioObjectGetPropertyDataSize( inObjectID: AudioObjectID; const (*var*) inAddress: AudioObjectPropertyAddress; inQualifierDataSize: UInt32; inQualifierData: {const} UnivPtr; var outDataSize: UInt32 ): OSStatus; external name '_AudioObjectGetPropertyDataSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{!
+ @function AudioObjectGetPropertyData
+ @abstract Queries an AudioObject to get the data of the given property and places it in
+ the provided buffer.
+ @param inObjectID
+ The AudioObject to query.
+ @param inAddress
+ An AudioObjectPropertyAddress indicating which property is being queried.
+ @param inQualifierDataSize
+ A UInt32 indicating the size of the buffer pointed to by inQualifierData.
+ Note that not all properties require qualification, in which case this
+ value will be 0.
+ @param inQualifierData,
+ A buffer of data to be used in determining the data of the property being
+ queried. Note that not all properties require qualification, in which case
+ this value will be NULL.
+ @param ioDataSize
+ A UInt32 which on entry indicates the size of the buffer pointed to by
+ outData and on exit indicates how much of the buffer was used.
+ @param outData
+ The buffer into which the AudioObject will put the data for the given
+ property.
+ @result An OSStatus indicating success or failure.
+}
+function AudioObjectGetPropertyData( inObjectID: AudioObjectID; const (*var*) inAddress: AudioObjectPropertyAddress; inQualifierDataSize: UInt32; inQualifierData: {const} UnivPtr; var ioDataSize: UInt32; outData: UnivPtr ): OSStatus; external name '_AudioObjectGetPropertyData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{!
+ @function AudioObjectSetPropertyData
+ @abstract Tells an AudioObject to change the value of the given property using the
+ provided data.
+ @discussion Note that the value of the property should not be considered changed until the
+ HAL has called the listeners as many properties values are changed
+ asynchronously.
+ @param inObjectID
+ The AudioObject to change.
+ @param inAddress
+ An AudioObjectPropertyAddress indicating which property is being changed.
+ @param inQualifierDataSize
+ A UInt32 indicating the size of the buffer pointed to by inQualifierData.
+ Note that not all properties require qualification, in which case this
+ value will be 0.
+ @param inQualifierData,
+ A buffer of data to be used in determining the data of the property being
+ queried. Note that not all properties require qualification, in which case
+ this value will be NULL.
+ @param inDataSize
+ A UInt32 indicating the size of the buffer pointed to by inData.
+ @param inData
+ The buffer containing the data to be used to change the property's value.
+ @result An OSStatus indicating success or failure.
+}
+function AudioObjectSetPropertyData( inObjectID: AudioObjectID; const (*var*) inAddress: AudioObjectPropertyAddress; inQualifierDataSize: UInt32; inQualifierData: {const} UnivPtr; inDataSize: UInt32; inData: {const} UnivPtr ): OSStatus; external name '_AudioObjectSetPropertyData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{!
+ @function AudioObjectAddPropertyListener
+ @abstract Registers the given AudioObjectPropertyListenerProc to receive notifications
+ when the given properties change.
+ @param inObjectID
+ The AudioObject to register the listener with.
+ @param inAddress
+ The AudioObjectPropertyAddresses indicating which property the listener
+ should be notified about.
+ @param inListener
+ The AudioObjectPropertyListenerProc to call.
+ @param inClientData
+ A pointer to client data that is passed to the listener when it is called.
+ @result An OSStatus indicating success or failure.
+}
+function AudioObjectAddPropertyListener( inObjectID: AudioObjectID; const (*var*) inAddress: AudioObjectPropertyAddress; inListener: AudioObjectPropertyListenerProc; inClientData: UnivPtr ): OSStatus; external name '_AudioObjectAddPropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{!
+ @function AudioObjectRemovePropertyListener
+ @abstract Unregisters the given AudioObjectPropertyListenerProc from receiving
+ notifications when the given properties change.
+ @param inObjectID
+ The AudioObject to unregister the listener from.
+ @param inNumberAddresses
+ The number of elements in the inAddresses array.
+ @param inAddresses
+ The AudioObjectPropertyAddress indicating which property the listener should
+ be removed from.
+ @param inListener
+ The AudioObjectPropertyListenerProc being removed.
+ @param inClientData
+ A pointer to client data that is passed to the listener when it is called.
+ @result An OSStatus indicating success or failure.
+}
+function AudioObjectRemovePropertyListener( inObjectID: AudioObjectID; const (*var*) inAddress: AudioObjectPropertyAddress; inListener: AudioObjectPropertyListenerProc; inClientData: UnivPtr ): OSStatus; external name '_AudioObjectRemovePropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+//==================================================================================================
+//#pragma mark AudioControl Constants
+
+{!
+ @enum AudioControl Base Class IDs
+ @abstract The AudioClassIDs that identify the various AudioControl base classes.
+ @constant kAudioControlClassID
+ The AudioClassID that identifies the AudioControl class.
+ @constant kAudioLevelControlClassID
+ The AudioClassID that identifies the AudioLevelControl class which is a
+ subclass of AudioControl. AudioLevelControls manipulate gain/attenuation
+ stages in the hardware.
+ @constant kAudioBooleanControlClassID
+ The AudioClassID that identifies the AudioBooleanControl class which is a
+ subclass of AudioControl. AudioBooleanControls manipulate on/off switches
+ in the hardware.
+ @constant kAudioSelectorControlClassID
+ The AudioClassID that identifies the AudioSelectorControl class which is a
+ subclass of AudioControl. AudioSelectorControls manipulate controls that
+ have multiple, but discreet values.
+ @constant kAudioStereoPanControlClassID
+ The AudioClassID that identifies the AudioStereoPanControl class which is
+ a subclass of AudioControl. AudioStereoPanControls manipulate the pot for
+ panning a mono signal between a left/right pair of outputs.
+}
+const
+ kAudioControlClassID = $6163746C (* 'actl' *);
+ kAudioLevelControlClassID = $6C65766C (* 'levl' *);
+ kAudioBooleanControlClassID = $746F676C (* 'togl' *);
+ kAudioSelectorControlClassID = $736C6374 (* 'slct' *);
+ kAudioStereoPanControlClassID = $7370616E (* 'span' *);
+
+{!
+ @enum AudioLevelControl Subclass IDs
+ @abstract The four char codes that identify the various standard subclasses of
+ AudioLevelControl.
+ @constant kAudioVolumeControlClassID
+ An AudioLevelControl for a general gain/attenuation stage.
+ @constant kAudioLFEVolumeControlClassID
+ An AudioLevelControl for an LFE channel that results from bass management
+ such as the iSub. Note that LFE channels that are represented as normal
+ audio channels (in other words, real data is being fed them in an IOProc)
+ will use kAudioVolumeControlClassID to manipulate the level.
+ @constant kAudioBootChimeVolumeControlClassID
+ An AudioLevelControl for the boot chime of the CPU.
+}
+const
+ kAudioVolumeControlClassID = $766C6D65 (* 'vlme' *);
+ kAudioLFEVolumeControlClassID = $73756276 (* 'subv' *);
+ kAudioBootChimeVolumeControlClassID = $7072616D (* 'pram' *);
+
+{!
+ @enum AudioBooleanControl Subclass IDs
+ @abstract The four char codes that identify the various standard subclasses of
+ AudioBooleanControl.
+ @constant kAudioMuteControlClassID
+ An AudioBooleanControl where a true value means that mute is enabled making
+ that element inaudible.
+ @constant kAudioSoloControlClassID
+ An AudioBooleanControl where a true value means that solo is enabled making
+ just that element audible and the other elements inaudible.
+ @constant kAudioJackControlClassID
+ An AudioBooleanControl where a true value means something is plugged into
+ that element.
+ @constant kAudioLFEMuteControlClassID
+ An AudioBooleanControl where true means that mute is enabled make that LFE
+ element inaudible. This control is for LFE channels that result from bass
+ management such as the iSub. Note that LFE channels that are represented as
+ normal audio channels (in other words, real data is being fed them in an
+ IOProc) will use kAudioVolumeControlClassID to manipulate mute.
+ @constant kAudioISubOwnerClassID
+ An AudioBooleanControl where true means that the AudioDevice that
+ ultimately owns the control also owns any iSub attached to the CPU.
+}
+const
+ kAudioMuteControlClassID = $6D757465 (* 'mute' *);
+ kAudioSoloControlClassID = $736F6C6F (* 'solo' *);
+ kAudioJackControlClassID = $6A61636B (* 'jack' *);
+ kAudioLFEMuteControlClassID = $7375626D (* 'subm' *);
+ kAudioISubOwnerControlClassID = $61746368 (* 'atch' *);
+
+{!
+ @enum AudioSelectorControl Subclass IDs
+ @abstract The four char codes that identify the various standard subclasses of
+ AudioSelectorControl.
+ @constant kAudioDataSourceControlClassID
+ An AudioSelectorControl that identifies where the data for the element is
+ coming from.
+ @constant kAudioDataDestinationControlClassID
+ An AudioSelectorControl that identifies where the data for the element is
+ going.
+ @constant kAudioClockSourceControlClassID
+ An AudioSelectorControl that identifies where the timing info for the object
+ is coming from.
+ @constant kAudioLineLevelControlClassID
+ An AudioSelectorControl that identifies the nominal line level for the
+ element. Note that this is not a gain stage but rather indicating the
+ voltage standard (if any) used for the element, such as +4dBu, -10dBV,
+ instrument, etc.
+}
+const
+ kAudioDataSourceControlClassID = $64737263 (* 'dsrc' *);
+ kAudioDataDestinationControlClassID = $64657374 (* 'dest' *);
+ kAudioClockSourceControlClassID = $636C636B (* 'clck' *);
+ kAudioLineLevelControlClassID = $6E6C766C (* 'nlvl' *);
+
+//==================================================================================================
+//#pragma mark AudioControl Properties
+
+{!
+ @enum AudioControl Properties
+ @abstract AudioObjectPropertySelector values that apply to all AudioControls.
+ @discussion AudioControl is a subclass of AudioObject and has only the single scope,
+ kAudioObjectPropertyScopeGlobal, and only a master element.
+ @constant kAudioControlPropertyScope
+ The AudioObjectPropertyScope in the owning AudioObject that contains the
+ AudioControl.
+ @constant kAudioControlPropertyElement
+ The AudioObjectPropertyElement in the owning AudioObject that contains the
+ AudioControl.
+ @constant kAudioControlPropertyVariant
+ A UInt32 that identifies the specific variant of an AudioControl. This
+ allows the owning AudioObject to support controls that are of the same basic
+ class (that is, the values of kAudioObjectPropertyClass are the same) but
+ may control a part of the object for which the standard controls do not
+ control.
+}
+const
+ kAudioControlPropertyScope = $63736370 (* 'cscp' *);
+ kAudioControlPropertyElement = $63656C6D (* 'celm' *);
+ kAudioControlPropertyVariant = $63766172 (* 'cvar' *);
+
+{!
+ @enum AudioLevelControl Properties
+ @abstract AudioObjectPropertySelector values that apply to all AudioLevelControls.
+ @discussion AudioLevelControl is a subclass of AudioControl and has only the single scope,
+ kAudioObjectPropertyScopeGlobal, and only a master element.
+ @constant kAudioLevelControlPropertyScalarValue
+ A Float32 that represents the value of the boot chime volume control. The
+ range is between 0.0 and 1.0 (inclusive).
+ @constant kAudioLevelControlPropertyDecibelValue
+ A Float32 that represents the value of the boot chime volume control in dB.
+ @constant kAudioLevelControlPropertyDecibelRange
+ An AudioValueRange that contains the minimum and maximum dB values the
+ boot chime control can have.
+ @constant kAudioLevelControlPropertyConvertScalarToDecibels
+ A Float32 that on input contains a scalar volume value for the boot chime
+ and on exit contains the equivalent dB value.
+ @constant kAudioLevelControlPropertyConvertDecibelsToScalar
+ A Float32 that on input contains a dB volume value for the boot chime and on
+ exit contains the equivalent scalar value.
+}
+const
+ kAudioLevelControlPropertyScalarValue = $6C637376 (* 'lcsv' *);
+ kAudioLevelControlPropertyDecibelValue = $6C636476 (* 'lcdv' *);
+ kAudioLevelControlPropertyDecibelRange = $6C636472 (* 'lcdr' *);
+ kAudioLevelControlPropertyConvertScalarToDecibels = $6C637364 (* 'lcsd' *);
+ kAudioLevelControlPropertyConvertDecibelsToScalar = $6C636473 (* 'lcds' *);
+
+{!
+ @enum AudioBooleanControl Properties
+ @abstract AudioObjectPropertySelector values that apply to all AudioBooleanControls.
+ @discussion AudioBooleanControl is a subclass of AudioControl and has only the single scope,
+ kAudioObjectPropertyScopeGlobal, and only a master element.
+ @constant kAudioBooleanControlPropertyValue
+ A UInt32 where 0 means false and 1 means true.
+}
+const
+ kAudioBooleanControlPropertyValue = $6263766C (* 'bcvl' *);
+
+{!
+ @enum AudioSelectorControl Properties
+ @abstract AudioObjectPropertySelector values that apply to all AudioSelectorControls.
+ @discussion AudioSelectorControl is a subclass of AudioControl and has only the single
+ scope, kAudioObjectPropertyScopeGlobal, and only a master element.
+ @constant kAudioSelectorControlPropertyCurrentItem
+ A UInt32 that is the ID of the item currently selected.
+ @constant kAudioSelectorControlPropertyAvailableItems
+ An array of UInt32s that represent the IDs of all the items available.
+ @constant kAudioSelectorControlPropertyItemName
+ This property translates the given item ID into a human readable name. The
+ qualifier contains the ID of the item to be translated and name is returned
+ as a CFString as the property data. The caller is responsible for releasing
+ the returned CFObject.
+}
+const
+ kAudioSelectorControlPropertyCurrentItem = $73636369 (* 'scci' *);
+ kAudioSelectorControlPropertyAvailableItems = $73636169 (* 'scai' *);
+ kAudioSelectorControlPropertyItemName = $7363696E (* 'scin' *);
+
+{!
+ @enum AudioClockSourceControl Properties
+ @abstract AudioObjectPropertySelector values that apply only to AudioClockSourceControls.
+ @discussion These properties supplement the regular AudioSelectorControl Properties.
+ @constant kAudioClockSourceControlPropertyItemKind
+ This property returns a UInt32 that identifies the kind of clock source
+ the item ID refers to. The qualifier contains the ID of the item. Values for
+ this property are defined in <IOAudio/audio/IOAudioTypes.h>.
+}
+const
+ kAudioClockSourceControlPropertyItemKind = $636C6B6B (* 'clkk' *);
+
+{!
+ @enum AudioStereoPanControl Properties
+ @abstract AudioObjectPropertySelector values that apply to all AudioStereoPanControls.
+ @discussion AudioStereoPanControl is a subclass of AudioControl and has only the single
+ scope, kAudioObjectPropertyScopeGlobal, and only a master element.
+ @constant kAudioStereoPanControlPropertyValue
+ A Float32 where 0.0 is full left, 1.0 is full right, and 0.5 is center.
+ @constant kAudioStereoPanControlPropertyPanningChannels
+ An array of two UInt32s that indicate which elements of the owning object
+ the signal is being panned between.
+}
+const
+ kAudioStereoPanControlPropertyValue = $73706376 (* 'spcv' *);
+ kAudioStereoPanControlPropertyPanningChannels = $73706363 (* 'spcc' *);
+
+//==================================================================================================
+//#pragma mark AudioSystemObject Types
+
+{!
+ @typedef AudioHardwarePropertyID
+ @abstract An AudioHardwarePropertyID is a integer that identifies a specific piece of
+ information about the AudioSystemObject.
+}
+type
+ AudioHardwarePropertyID = AudioObjectPropertySelector;
+
+{!
+ @typedef AudioHardwarePropertyListenerProc
+ @abstract Clients register an AudioHardwarePropertyListenerProc with the AudioSystemObject
+ in order to receive notifications when the properties of the object change.
+ @discussion Note that the same functionality is provided by AudioObjectPropertyListenerProc.
+ @param inPropertyID
+ The AudioHardwarePropertyID of the property that changed.
+ @param inClientData
+ A pointer to client data established when the listener proc was registered
+ with the AudioSystemObject.
+ @result The return value is currently unused and should always be 0.
+}
+type
+ AudioHardwarePropertyListenerProc = function( inPropertyID: AudioHardwarePropertyID; inClientData: UnivPtr ): OSStatus;
+
+//==================================================================================================
+//#pragma mark AudioSystemObject Constants
+
+{!
+ @enum AudioSystemObject Class Constants
+ @abstract Various constants related to the AudioSystemObject.
+ @constant kAudioSystemObjectClassID
+ The AudioClassID that identifies the AudioSystemObject class.
+ @constant kAudioObjectSystemObject
+ The AudioObjectID that always refers to the one and only instance of the
+ AudioSystemObject.
+}
+const
+ kAudioSystemObjectClassID = $61737973 (* 'asys' *);
+ kAudioObjectSystemObject = 1;
+
+//==================================================================================================
+//#pragma mark AudioSystemObject Properties
+
+{!
+ @enum AudioSystemObject Properties
+ @abstract AudioObjectPropertySelector values that apply to the AudioSystemObject.
+ @discussion The AudioSystemObject has one scope, kAudioObjectPropertyScopeGlobal, and only a
+ master element.
+ @constant kAudioHardwarePropertyProcessIsMaster
+ A UInt32 where 1 means that the current process contains the master instance
+ of the HAL. The master instance of the HAL is the only instance in which
+ plug-ins should save/restore their devices' settings.
+ @constant kAudioHardwarePropertyIsInitingOrExiting
+ A UInt32 whose value will be non-zero if the HAL is either in the midst of
+ initializing or in the midst of exiting the process.
+ @constant kAudioHardwarePropertyDevices
+ An array of the AudioDeviceIDs that represent all the devices currently
+ available to the system.
+ @constant kAudioHardwarePropertyDefaultInputDevice
+ The AudioDeviceID of the default input AudioDevice.
+ @constant kAudioHardwarePropertyDefaultOutputDevice
+ The AudioDeviceID of the default output AudioDevice.
+ @constant kAudioHardwarePropertyDefaultOutputDevice
+ The AudioDeviceID of the output AudioDevice to use for system related sound
+ from the alert sound to digital call progress.
+ @constant kAudioHardwarePropertyDeviceForUID
+ Using an AudioValueTranslation structure, this property translates the input
+ CFStringRef containing a UID into the AudioDeviceID that refers to the
+ AudioDevice with that UID. This property will return kAudioDeviceUnknown if
+ the given UID does not match any currently available AudioDevice.
+ @constant kAudioHardwarePropertySleepingIsAllowed
+ A UInt32 where 1 means that the process will allow the CPU to idle sleep
+ even if there is audio IO in progress. A 0 means that the CPU will not be
+ allowed to idle sleep. Note that this property won't affect when the CPU is
+ forced to sleep.
+ @constant kAudioHardwarePropertyUnloadingIsAllowed
+ A UInt32 where 1 means that this process wants the HAL to unload itself
+ after a period of inactivity where there are no IOProcs and no listeners
+ registered with any AudioObject.
+ @constant kAudioHardwarePropertyHogModeIsAllowed
+ A UInt32 where 1 means that this process wants the HAL to automatically take
+ hog mode and 0 means that the HAL should not automatically take hog mode on
+ behalf of the process. Processes that only ever use the default device are
+ the sort of that should set this property's value to 0.
+ @constant kAudioHardwarePropertyRunLoop
+ The CFRunLoopRef the HAL is currently attaching all of it's system
+ notification handlers to. By default, the HAL will create and manage it's
+ own thread for this job. Clients can set this property to tell the HAL to
+ use a thread of the client's choosing. The caller is responsible for
+ releasing the returned CFObject.
+ @constant kAudioHardwarePropertyPlugInForBundleID
+ Using an AudioValueTranslation structure, this property translates the input
+ CFString containing a bundle ID into the AudioObjectID of the AudioPlugIn
+ that corresponds to it. This property will return kAudioObjectUnkown if the
+ given bundle ID doesn't match any AudioPlugIns.
+}
+const
+ kAudioHardwarePropertyProcessIsMaster = $6D617374 (* 'mast' *);
+ kAudioHardwarePropertyIsInitingOrExiting = $696E6F74 (* 'inot' *);
+ kAudioHardwarePropertyDevices = $64657623 (* 'dev#' *);
+ kAudioHardwarePropertyDefaultInputDevice = $64496E20 (* 'dIn ' *);
+ kAudioHardwarePropertyDefaultOutputDevice = $644F7574 (* 'dOut' *);
+ kAudioHardwarePropertyDefaultSystemOutputDevice = $734F7574 (* 'sOut' *);
+ kAudioHardwarePropertyDeviceForUID = $64756964 (* 'duid' *);
+ kAudioHardwarePropertySleepingIsAllowed = $736C6570 (* 'slep' *);
+ kAudioHardwarePropertyUnloadingIsAllowed = $756E6C64 (* 'unld' *);
+ kAudioHardwarePropertyHogModeIsAllowed = $686F6772 (* 'hogr' *);
+ kAudioHardwarePropertyRunLoop = $726E6C70 (* 'rnlp' *);
+ kAudioHardwarePropertyPlugInForBundleID = $70696269 (* 'pibi' *);
+
+{!
+ @enum AudioSystemObject Properties Implemented via AudioControl objects
+ @abstract AudioObjectPropertySelector values for AudioSystemObject properties that are
+ implemented by AudioControl objects.
+ @discussion These properties are also accessible by locating the AudioControl object
+ attached to the AudioSystemObject and using that object to access the properties
+ of the control.
+ @constant kAudioHardwarePropertyBootChimeVolumeScalar
+ A Float32 that represents the value of the boot chime volume control. The
+ range is between 0.0 and 1.0 (inclusive). This property is implemented by an
+ AudioControl object that is a subclass of AudioBootChimeVolumeControl.
+ @constant kAudioHardwarePropertyBootChimeVolumeDecibels
+ A Float32 that represents the value of the boot chime volume control in dB.
+ This property is implemented by an AudioControl object that is a subclass
+ of AudioBootChimeVolumeControl.
+ @constant kAudioHardwarePropertyBootChimeVolumeRangeDecibels
+ An AudioValueRange that contains the minimum and maximum dB values the
+ boot chime control can have. This property is implemented by an AudioControl
+ object that is a subclass of AudioBootChimeVolumeControl.
+ @constant kAudioHardwarePropertyBootChimeVolumeScalarToDecibels
+ A Float32 that on input contains a scalar volume value for the boot chime
+ and on exit contains the equivalent dB value. This property is implemented
+ by an AudioControl object that is a subclass of AudioBootChimeVolumeControl.
+ @constant kAudioHardwarePropertyBootChimeVolumeDecibelsToScalar
+ A Float32 that on input contains a dB volume value for the boot chime and on
+ exit contains the equivalent scalar value. This property is implemented by
+ an AudioControl object that is a subclass of AudioBootChimeVolumeControl.
+}
+const
+ kAudioHardwarePropertyBootChimeVolumeScalar = $62627673 (* 'bbvs' *);
+ kAudioHardwarePropertyBootChimeVolumeDecibels = $62627664 (* 'bbvd' *);
+ kAudioHardwarePropertyBootChimeVolumeRangeDecibels = $62626423 (* 'bbd#' *);
+ kAudioHardwarePropertyBootChimeVolumeScalarToDecibels = $62763264 (* 'bv2d' *);
+ kAudioHardwarePropertyBootChimeVolumeDecibelsToScalar = $62643276 (* 'bd2v' *);
+
+//==================================================================================================
+//#pragma mark AudioSystemObject Functions
+
+{!
+ @functiongroup AudioSystemObject
+}
+
+{!
+ @function AudioHardwareAddRunLoopSource
+ @abstract Add the given CFRunLoopSource to the the HAL's notification CFRunLoop.
+ @discussion The CFRunLoop the HAL uses for notifications is specified by
+ kAudioHardwarePropertyRunLoop. If kAudioHardwarePropertyRunLoop changes,
+ CFRunLoopSources added with this function will automatically be transferred to
+ the new CFRunLoop.
+ @param inRunLoopSource
+ The CFRunLoopSource to add.
+ @result An OSStatus indicating success or failure.
+}
+function AudioHardwareAddRunLoopSource( inRunLoopSource: CFRunLoopSourceRef ): OSStatus; external name '_AudioHardwareAddRunLoopSource';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{!
+ @function AudioHardwareRemoveRunLoopSource
+ @abstract Remove the given CFRunLoopSource from the the HAL's notification CFRunLoop.
+ @discussion The CFRunLoop the HAL uses for notifications is specified by
+ kAudioHardwarePropertyRunLoop.
+ @param inRunLoopSource
+ The CFRunLoopSource to remove.
+ @result An OSStatus indicating success or failure.
+}
+function AudioHardwareRemoveRunLoopSource( inRunLoopSource: CFRunLoopSourceRef ): OSStatus; external name '_AudioHardwareRemoveRunLoopSource';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{!
+ @function AudioHardwareUnload
+ @abstract When this routine is called, all IO on all devices within a process will be
+ terminated and all resources capable of being released will be released. This
+ routine essentially returns the HAL to it's uninitialized state.
+ @result An OSStatus indicating success or failure.
+}
+function AudioHardwareUnload: OSStatus; external name '_AudioHardwareUnload';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{!
+ @function AudioHardwareGetPropertyInfo
+ @abstract Retrieve information about the given property.
+ @discussion Note that the same functionality is provided by the functions
+ AudioObjectHasProperty(), AudioObjectIsPropertySettable(), and
+ AudioObjectGetPropertyDataSize().
+ @param inPropertyID
+ The AudioHardwarePropertyID of the property to query.
+ @param outSize
+ A pointer to a UInt32 that receives the size of the property data in bytes
+ on exit. This can be NULL if the size information is not being requested.
+ @param outWritable
+ A pointer to a Boolean that receives indication of whether or not the given
+ property can be set. This can be NULL if the writability is not being
+ requested.
+ @result An OSStatus indicating success or failure.
+}
+function AudioHardwareGetPropertyInfo( inPropertyID: AudioHardwarePropertyID; outSize: UInt32Ptr; outWritable: BooleanPtr ): OSStatus; external name '_AudioHardwareGetPropertyInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioHardwareGetProperty
+ @abstract Queries an the AudioSystemObject to get the data of the given property and
+ places it in the provided buffer.
+ @discussion Note that the same functionality is provided by the function
+ AudioObjectGetPropertyData().
+ @param inPropertyID
+ The AudioHardwarePropertyID of the property to query.
+ @param ioDataSize
+ A UInt32 which on entry indicates the size of the buffer pointed to by
+ outData and on exit indicates how much of the buffer was used.
+ @param outData
+ The buffer into which the AudioSystemObject will put the data for the given
+ property.
+ @result An OSStatus indicating success or failure.
+}
+function AudioHardwareGetProperty( inPropertyID: AudioHardwarePropertyID; var ioPropertyDataSize: UInt32; outPropertyData: UnivPtr ): OSStatus; external name '_AudioHardwareGetProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioHardwareSetProperty
+ @abstract Tells the AudioSystemObject to change the value of the given property using the
+ provided data.
+ @discussion Note that the value of the property should not be considered changed until the
+ HAL has called the listeners as many properties values are changed
+ asynchronously. Also note that the same functionality is provided by the
+ function AudioObjectGetPropertyData().
+ @param inPropertyID
+ The AudioHardwarePropertyID of the property to change.
+ @param inDataSize
+ A UInt32 indicating the size of the buffer pointed to by inData.
+ @param inData
+ The buffer containing the data to be used to change the property's value.
+ @result An OSStatus indicating success or failure.
+}
+function AudioHardwareSetProperty( inPropertyID: AudioHardwarePropertyID; inPropertyDataSize: UInt32; inPropertyData: {const} UnivPtr ): OSStatus; external name '_AudioHardwareSetProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioHardwareAddPropertyListener
+ @abstract Registers the given AudioHardwarePropertyListenerProc to receive notifications
+ when the given property changes.
+ @discussion Note that the same functionality is provided by AudioObjectAddPropertyListener
+ in conjunction with AudioObjectPropertyListenerProc.
+ @param inPropertyID
+ The AudioHardwarePropertyID of the property to listen to.
+ @param inProc
+ AudioHardwarePropertyListenerProc to call.
+ @param inClientData
+ A pointer to client data that is passed to the listener when it is called.
+ @result An OSStatus indicating success or failure.
+}
+function AudioHardwareAddPropertyListener( inPropertyID: AudioHardwarePropertyID; inProc: AudioHardwarePropertyListenerProc; inClientData: UnivPtr ): OSStatus; external name '_AudioHardwareAddPropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioHardwareRemovePropertyListener
+ @abstract Unregisters the given AudioHardwarePropertyListenerProc from receive
+ notifications when the given property changes.
+ @discussion Note that the same functionality is provided by
+ AudioObjectRemovePropertyListener in conjunction with
+ AudioObjectPropertyListenerProc.
+ @param inPropertyID
+ The AudioHardwarePropertyID of the property to stop listening to.
+ @param inProc
+ AudioHardwarePropertyListenerProc to unregister.
+ @result An OSStatus indicating success or failure.
+}
+function AudioHardwareRemovePropertyListener( inPropertyID: AudioHardwarePropertyID; inProc: AudioHardwarePropertyListenerProc ): OSStatus; external name '_AudioHardwareRemovePropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+//==================================================================================================
+//#pragma mark AudioPlugIn Constants
+
+{!
+ @enum AudioPlugIn Class Constants
+ @abstract Various constants related to AudioPlugIns.
+ @constant kAudioPlugInClassID
+ The AudioClassID that identifies the AudioPlugIn class.
+}
+const
+ kAudioPlugInClassID = $61706C67 (* 'aplg' *);
+
+//==================================================================================================
+//#pragma mark AudioPlugIn Properties
+
+{!
+ @enum AudioPlugIn Properties
+ @abstract AudioObjectPropertySelector values that apply to AudioPlugIns.
+ @discussion AudioPlugIn is a subclass of AudioObject that represents a plug-in loaded by the
+ HAL that conforms to the API in <CoreAudio/AudioHardwarePlugIn.h>. AudioPlugIns
+ have one scope, kAudioObjectPropertyScopeGlobal, and only a master element.
+ @constant kAudioPlugInPropertyBundleID
+ A CFString that contains the bundle identifier for the AudioPlugIn. The
+ caller is responsible for releasing the returned CFObject.
+ @constant kAudioPlugInCreateAggregateDevice
+ This property is used to tell a plug-in to create a new
+ AudioAggregateDevice. It's value is only read. The qualifier data for this
+ property is a CFDictionary containing a description of the
+ AudioAggregateDevice to create. The keys for the CFDictionary are defined in
+ the AudioAggregateDevice Constants section. The value of the property that
+ gets returned is the AudioObjectID of the newly created device.
+ @constant kAudioPlugInDestroyAggregateDevice
+ This property is used to tell a plug-in to destroy an AudioAggregateDevice.
+ Like kAudioPlugInCreateAggregateDevice, this property is read only. The
+ value of the property is the AudioObjectID of the AudioAggregateDevice to
+ destroy.
+}
+const
+ kAudioPlugInPropertyBundleID = $70696964 (* 'piid' *);
+ kAudioPlugInCreateAggregateDevice = $63616767 (* 'cagg' *);
+ kAudioPlugInDestroyAggregateDevice = $64616767 (* 'dagg' *);
+
+//==================================================================================================
+//#pragma mark AudioDevice Types
+
+{!
+ @typedef AudioDeviceID
+ @abstract AudioDevice is the base class for all objects that represent an audio device.
+ @discussion AudioDevice is a subclass of AudioObject. AudioDevices normally contain
+ AudioStreams and AudioControls, but may contain other things depending on the
+ kind of AudioDevice (e.g. aggregate devices contain other AudioDevices).
+}
+type
+ AudioDeviceID = AudioObjectID;
+
+{!
+ @typedef AudioDevicePropertyID
+ @abstract An AudioDevicePropertyID is an integer that identifies a specific piece of
+ information about the object.
+}
+type
+ AudioDevicePropertyID = AudioObjectPropertySelector;
+
+{!
+ @struct AudioHardwareIOProcStreamUsage
+ @abstract This structure describes which streams a given AudioDeviceIOProc will use. It is
+ used in conjunction with kAudioDevicePropertyIOProcStreamUsage.
+ @field mIOProc
+ The IOProc whose stream usage is being specified.
+ @field mNumberStreams
+ The number of streams being specified.
+ @field mStreamIsOn
+ An array of UInt32's whose length is specified by mNumberStreams. Each
+ element of the array corresponds to a stream. A value of 0 means the stream
+ is not to be enabled. Any other value means the stream is to be used.
+}
+type
+ AudioHardwareIOProcStreamUsage = record
+ mIOProc: UnivPtr;
+ mNumberStreams: UInt32;
+ mStreamIsOn: array[0..0] of UInt32;
+ end;
+
+{!
+ @typedef AudioDeviceIOProc
+ @abstract An AudioDeviceIOProc is called by an AudioDevice to provide input data read from
+ the device and collect output data to be written to the device for the current
+ IO cycle.
+ @param inDevice
+ The AudioDevice doing the IO.
+ @param inNow
+ An AudioTimeStamp that indicates the IO cycle started. Note that this time
+ includes any scheduling latency that may have been incurred waking the
+ thread on which IO is being done.
+ @param inInputData
+ An AudioBufferList containing the input data for the current IO cycle. For
+ streams that are disabled, the AudioBuffer's mData field will be NULL but
+ the mDataByteSize field will still say how much data would have been there
+ if it was enabled. Note that the contents of this structure should never be
+ modified.
+ @param inInputTime
+ An AudioTimeStamp that indicates the time at which the first frame in the
+ data was acquired from the hardware. If the device has no input streams, the
+ time stamp will be zeroed out.
+ @param outOutputData
+ An AudioBufferList in which the output data for the current IO cycle is to
+ be placed. On entry, each AudioBuffer's mDataByteSize field indicates the
+ maximum amount of data that can be placed in the buffer and the buffer's
+ memory has been zeroed out. For formats where the number of bytes per packet
+ can vary (as with AC-3, for example), the client has to fill out on exit
+ each mDataByteSize field in each AudioBuffer with the amount of data that
+ was put in the buffer. Otherwise, the mDataByteSize field should not be
+ changed. For streams that are disabled, the AudioBuffer's mData field will
+ be NULL but the mDataByteSize field will still say how much data would have
+ been there if it was enabled. Except as noted above, the contents of this
+ structure should not other wise be modified.
+ @param inOutputTime
+ An AudioTimeStamp that indicates the time at which the first frame in the
+ data will be passed to the hardware. If the device has no output streams,
+ the time stamp will be zeroed out.
+ @param inClientData
+ A pointer to client data established when the AudioDeviceIOProc was
+ registered with the AudioDevice.
+ @result The return value is currently unused and should always be 0.
+}
+type
+ AudioDeviceIOProc = function( inDevice: AudioDeviceID; const (*var*) inNow: AudioTimeStamp; const (*var*) inInputData: AudioBufferList; const (*var*) inInputTime: AudioTimeStamp; var outOutputData: AudioBufferList; const (*var*) inOutputTime: AudioTimeStamp; inClientData: UnivPtr ): OSStatus;
+
+{!
+ @typedef AudioDevicePropertyListenerProc
+ @abstract Clients register an AudioDevicePropertyListenerProc with the AudioDevice object
+ in order to receive notifications when the properties of the object change.
+ @discussion Note that the same functionality is provided by AudioObjectPropertyListenerProc.
+ @param inDevice
+ The AudioDevice whose property has changed.
+ @param inChannel
+ The channel of the property that changed where 0 is the master channel.
+ @param isInput
+ Which section of the AudioDevice changed.
+ @param inPropertyID
+ The AudioDevicePropertyID of the property that changed.
+ @param inClientData
+ A pointer to client data established when the listener proc was registered
+ with the object.
+ @result The return value is currently unused and should always be 0.
+}
+type
+ AudioDevicePropertyListenerProc = function( inDevice: AudioDeviceID; inChannel: UInt32; isInput: Boolean; inPropertyID: AudioDevicePropertyID; inClientData: UnivPtr ): OSStatus;
+
+//==================================================================================================
+//#pragma mark AudioDevice Constants
+
+{!
+ @enum AudioDevice Class Constants
+ @abstract Various constants related to AudioDevices.
+ @constant kAudioDevicePropertyScopeInput
+ The AudioObjectPropertyScope for properties that apply to the input signal
+ paths of the AudioDevice.
+ @constant kAudioDevicePropertyScopeOutput
+ The AudioObjectPropertyScope for properties that apply to the output signal
+ paths of the AudioDevice.
+ @constant kAudioDevicePropertyScopePlayThrough
+ The AudioObjectPropertyScope for properties that apply to the play through
+ signal paths of the AudioDevice.
+ @constant kAudioDeviceClassID
+ The AudioClassID that identifies the AudioDevice class.
+ @constant kAudioDeviceUnknown
+ The AudioObjectID for a nonexistent AudioObject.
+}
+const
+ kAudioDevicePropertyScopeInput = $696E7074 (* 'inpt' *);
+ kAudioDevicePropertyScopeOutput = $6F757470 (* 'outp' *);
+ kAudioDevicePropertyScopePlayThrough = $70747275 (* 'ptru' *);
+ kAudioDeviceClassID = $61646576 (* 'adev' *);
+ kAudioDeviceUnknown = kAudioObjectUnknown;
+
+{!
+ @enum StartAtTime/GetNearestStartTime Flags
+ @abstract The flags that can be passed to control the behavior of AudioDeviceStartAtTime()
+ andAudioDeviceGetNearestStartTime().
+ @constant kAudioDeviceStartTimeIsInputFlag
+ Set to indicate that the requested time refers to an input time. Clear to
+ indicate that it is an output time.
+ @constant kAudioDeviceStartTimeDontConsultDeviceFlag
+ Set to indicate that the device should not be consulted when determining the
+ start time. Clear to indicate that the device should be consulted. This flag
+ cannot be set if kAudioDeviceStartTimeDontConsultHALFlag is set.
+ @constant kAudioDeviceStartTimeDontConsultHALFlag
+ Set to indicate that the HAL should not be consulted when determining the
+ start time. Clear to indicate that the HAL should be consulted. This flag
+ cannot be set if kAudioDeviceStartTimeDontConsultDeviceFlag is set.
+}
+const
+ kAudioDeviceStartTimeIsInputFlag = 1 shl 0;
+ kAudioDeviceStartTimeDontConsultDeviceFlag = 1 shl 1;
+ kAudioDeviceStartTimeDontConsultHALFlag = 1 shl 2;
+
+//==================================================================================================
+//#pragma mark AudioDevice Properties
+
+{!
+ @enum AudioDevice Properties
+ @abstract AudioObjectPropertySelector values that apply to AudioDevice objects.
+ @discussion AudioDevices have four scopes: kAudioDevicePropertyScopeGlobal,
+ kAudioDevicePropertyScopeInput, kAudioDevicePropertyScopeOutput, and
+ kAudioDevicePropertyScopePlayThrough. They have a master element and an element
+ for each channel in each stream numbered according to the starting channel
+ number of each stream.
+ @constant kAudioDevicePropertyPlugIn
+ An OSStatus that contains any error codes generated by loading the IOAudio
+ driver plug-in for the AudioDevice or kAudioHardwareNoError if the plug-in
+ loaded successfully. This property only exists for IOAudio-based
+ AudioDevices whose driver has specified a plug-in to load.
+ @constant kAudioDevicePropertyConfigurationApplication
+ A CFString that contains the bundle ID for an application that provides a
+ GUI for configuring the AudioDevice. By default, the value of this property
+ is the bundle ID for Audio MIDI Setup. The caller is responsible for
+ releasing the returned CFObject.
+ @constant kAudioDevicePropertyDeviceUID
+ A CFString that contains a persistent identifier for the AudioDevice. An
+ AudioDevice's UID is persistent across boots. The content of the UID string
+ is a black box and may contain information that is unique to a particular
+ instance of an AudioDevice's hardware or unique to the CPU. Therefore they
+ are not suitable for passing between CPUs or for identifying similar models
+ of hardware.
+ @constant kAudioDevicePropertyModelUID
+ A CFString that contains a persistent identifier for the model of an
+ AudioDevice. The identifier is unique such that the identifier from two
+ AudioDevices are equal if and only if the two AudioDevices are the exact
+ same model from the same manufacturer. Further, the identifier has to be the
+ same no matter on what machine the AudioDevice appears.
+ @constant kAudioDevicePropertyTransportType
+ A UInt32 whose value indicates how the AudioDevice is connected to the CPU.
+ Constants for some of the values for this property can be found in
+ <IOKit/audio/IOAudioTypes.h>.
+ @constant kAudioDevicePropertyRelatedDevices
+ An array of AudioDeviceIDs for devices related to the AudioDevice. For
+ IOAudio-based devices, a AudioDevices are related if they share the same
+ IOAudioDevice object.
+ @constant kAudioDevicePropertyClockDomain
+ A UInt32 whose value indicates the clock domain to which this AudioDevice
+ belongs. AudioDevices that have the same value for this property are able to
+ be synchronized in hardware. However, a value of 0 indicates that the clock
+ domain for the device is unspecified and should be assumed to be separate
+ from every other device's clock domain, even if they have the value of 0 as
+ their clock domain as well.
+ @constant kAudioDevicePropertyDeviceIsAlive
+ A UInt32 where a value of 1 means the device is ready and available and 0
+ means the device is usable and will most likely go away shortly.
+ @constant kAudioDevicePropertyDeviceHasChanged
+ The type of this property is a UInt32, but it's value has no meaning. This
+ property exists so that clients can listen to it and be told when the
+ configuration of the AudioDevice has changed in ways that cannot otherwise
+ be conveyed through other notifications. In response to this notification,
+ clients should re-evaluate everything they need to know about the device,
+ particularly the layout and values of the controls.
+ @constant kAudioDevicePropertyDeviceIsRunning
+ A UInt32 where a value of 0 means the AudioDevice is not performing IO and
+ a value of 1 means that it is. Note that the device can be running even if
+ there are no active IOProcs such as by calling AudioDeviceStart() and
+ passing a NULL IOProc. Note that the notification for this property is
+ usually sent from the AudioDevice's IO thread.
+ @constant kAudioDevicePropertyDeviceIsRunningSomewhere
+ A UInt32 where 1 means that the AudioDevice is running in at least one
+ process on the system and 0 means that it isn't running at all.
+ @constant kAudioDevicePropertyDeviceCanBeDefaultDevice
+ A UInt32 where 1 means that the AudioDevice is a possible selection for
+ kAudioHardwarePropertyDefaultInputDevice or
+ kAudioHardwarePropertyDefaultOutputDevice depending on the scope.
+ @constant kAudioDevicePropertyDeviceCanBeDefaultSystemDevice
+ A UInt32 where 1 means that the AudioDevice is a possible selection for
+ kAudioHardwarePropertyDefaultSystemOutputDevice.
+ @constant kAudioDeviceProcessorOverload
+ A UInt32 where the value has no meaning. This property exists so that
+ clients can be notified when the AudioDevice detects that an IO cycle has
+ run past it's deadline. Note that the notification for this property is
+ usually sent from the AudioDevice's IO thread.
+ @constant kAudioDevicePropertyHogMode
+ A pid_t indicating the process that currently owns exclusive access to the
+ AudioDevice or a value of -1 indicating that the device is currently
+ available to all processes. If the AudioDevice is in a non-mixable mode,
+ the HAL will automatically take hog mode on behalf of the first process to
+ start an IOProc.
+ @constant kAudioDevicePropertyLatency
+ A UInt32 containing the number of frames of latency in the AudioDevice. Note
+ that input and output latency may differ. Further, the AudioDevice's
+ AudioStreams may have additional latency so they should be queried as well.
+ If both the device and the stream say they have latency, then the total
+ latency for the stream is the device latency summed with the stream latency.
+ @constant kAudioDevicePropertyBufferFrameSize
+ A UInt32 whose value indicates the number of frames in the IO buffers.
+ @constant kAudioDevicePropertyBufferFrameSizeRange
+ An AudioValueRange indicating the minimum and maximum values, inclusive, for
+ kAudioDevicePropertyBufferFrameSize.
+ @constant kAudioDevicePropertyUsesVariableBufferFrameSizes
+ A UInt32 that, if implemented by a device, indicates that the sizes of the
+ buffers passed to an IOProc will vary by a small amount. The value of this
+ property will indicate the largest buffer that will be passed and
+ kAudioDevicePropertyBufferFrameSize will indicate the smallest buffer that
+ will get passed to the IOProc. The usage of this property is narrowed to
+ only allow for devices whose buffer sizes vary by small amounts greater than
+ kAudioDevicePropertyBufferFrameSize. It is not intended to be a license for
+ devices to be able to send buffers however they please. Rather, it is
+ intended to allow for hardware whose natural rhythms lead to this necessity.
+ @constant kAudioDevicePropertyStreams
+ An array of AudioStreamIDs that represent the AudioStreams of the
+ AudioDevice. Note that if a notification is received for this property, any
+ cached AudioStreamIDs for the device become invalid and need to be
+ re-fetched.
+ @constant kAudioDevicePropertySafetyOffset
+ A UInt32 whose value indicates the number for frames in ahead (for output)
+ or behind (for input the current hardware position that is safe to do IO.
+ @constant kAudioDevicePropertyIOCycleUsage
+ A Float32 whose range is from 0 to 1. This value indicates how much of the
+ client portion of the IO cycle the process will use. The client portion of
+ the IO cycle is the portion of the cycle in which the device calls the
+ IOProcs so this property does not the apply to the duration of the entire
+ cycle.
+ @constant kAudioDevicePropertyStreamConfiguration
+ This property returns the stream configuration of the device in an
+ AudioBufferList (with the buffer pointers set to NULL) which describes the
+ list of streams and the number of channels in each stream. This corresponds
+ to what will be passed into the IOProc.
+ @constant kAudioDevicePropertyIOProcStreamUsage
+ An AudioHardwareIOProcStreamUsage structure which details the stream usage
+ of a given IO proc. If a stream is marked as not being used, the given
+ IOProc will see a corresponding NULL buffer pointer in the AudioBufferList
+ passed to it's IO proc. Note that the number of streams detailed in the
+ AudioHardwareIOProcStreamUsage must include all the streams of that
+ direction on the device. Also, when getting the value of the property, one
+ must fill out the mIOProc field of the AudioHardwareIOProcStreamUsage with
+ the address of the of the IOProc whose stream usage is to be retrieved.
+ @constant kAudioDevicePropertyPreferredChannelsForStereo
+ An array of two UInt32s, the first for the left channel, the second for the
+ right channel, that indicate the channel numbers to use for stereo IO on the
+ device. The value of this property can be different for input and output and
+ there are no restrictions on the channel numbers that can be used.
+ @constant kAudioDevicePropertyPreferredChannelLayout
+ An AudioChannelLayout that indicates how each channel of the AudioDevice
+ should be used.
+ @constant kAudioDevicePropertyNominalSampleRate
+ A Float64 that indicates the current nominal sample rate of the AudioDevice.
+ @constant kAudioDevicePropertyAvailableNominalSampleRates
+ An array of AudioValueRange structs that indicates the valid ranges for the
+ nominal sample rate of the AudioDevice.
+ @constant kAudioDevicePropertyActualSampleRate
+ A Float64 that indicates the current actual sample rate of the AudioDevice
+ as measured by it's time stamps.
+}
+const
+ kAudioDevicePropertyPlugIn = $706C7567 (* 'plug' *);
+ kAudioDevicePropertyConfigurationApplication = $63617070 (* 'capp' *);
+ kAudioDevicePropertyDeviceUID = $75696420 (* 'uid ' *);
+ kAudioDevicePropertyModelUID = $6D756964 (* 'muid' *);
+ kAudioDevicePropertyTransportType = $7472616E (* 'tran' *);
+ kAudioDevicePropertyRelatedDevices = $616B696E (* 'akin' *);
+ kAudioDevicePropertyClockDomain = $636C6B64 (* 'clkd' *);
+ kAudioDevicePropertyDeviceIsAlive = $6C69766E (* 'livn' *);
+ kAudioDevicePropertyDeviceHasChanged = $64696666 (* 'diff' *);
+ kAudioDevicePropertyDeviceIsRunning = $676F696E (* 'goin' *);
+ kAudioDevicePropertyDeviceIsRunningSomewhere = $676F6E65 (* 'gone' *);
+ kAudioDevicePropertyDeviceCanBeDefaultDevice = $64666C74 (* 'dflt' *);
+ kAudioDevicePropertyDeviceCanBeDefaultSystemDevice = $73666C74 (* 'sflt' *);
+ kAudioDeviceProcessorOverload = $6F766572 (* 'over' *);
+ kAudioDevicePropertyHogMode = $6F696E6B (* 'oink' *);
+ kAudioDevicePropertyLatency = $6C746E63 (* 'ltnc' *);
+ kAudioDevicePropertyBufferFrameSize = $6673697A (* 'fsiz' *);
+ kAudioDevicePropertyBufferFrameSizeRange = $66737A23 (* 'fsz#' *);
+ kAudioDevicePropertyUsesVariableBufferFrameSizes = $7666737A (* 'vfsz' *);
+ kAudioDevicePropertyStreams = $73746D23 (* 'stm#' *);
+ kAudioDevicePropertySafetyOffset = $73616674 (* 'saft' *);
+ kAudioDevicePropertyIOCycleUsage = $6E637963 (* 'ncyc' *);
+ kAudioDevicePropertyStreamConfiguration = $736C6179 (* 'slay' *);
+ kAudioDevicePropertyIOProcStreamUsage = $73757365 (* 'suse' *);
+ kAudioDevicePropertyPreferredChannelsForStereo = $64636832 (* 'dch2' *);
+ kAudioDevicePropertyPreferredChannelLayout = $73726E64 (* 'srnd' *);
+ kAudioDevicePropertyNominalSampleRate = $6E737274 (* 'nsrt' *);
+ kAudioDevicePropertyAvailableNominalSampleRates = $6E737223 (* 'nsr#' *);
+ kAudioDevicePropertyActualSampleRate = $61737274 (* 'asrt' *);
+
+{!
+ @enum AudioDevice Properties Implemented via AudioControl objects
+ @abstract AudioObjectPropertySelector values for AudioDevice properties that are
+ implemented by AudioControl objects.
+ @discussion These properties are also accessible by locating the AudioControl object
+ attached to the AudioDevice and using that object to access the properties of
+ the control.
+ @constant kAudioDevicePropertyJackIsConnected
+ A UInt32 where a value of 0 means that there isn't anything plugged into the
+ jack associated withe given element and scope. This property is implemented
+ by an AudioJackControl, a subclass of AudioBooleanControl.
+ @constant kAudioDevicePropertyVolumeScalar
+ A Float32 that represents the value of the volume control. The range is
+ between 0.0 and 1.0 (inclusive). This property is implemented by an
+ AudioControl object that is a subclass of AudioVolumeControl.
+ @constant kAudioDevicePropertyVolumeDecibels
+ A Float32 that represents the value of the volume control in dB. This
+ property is implemented by an AudioControl object that is a subclass of
+ AudioVolumeControl.
+ @constant kAudioDevicePropertyVolumeRangeDecibels
+ An AudioValueRange that contains the minimum and maximum dB values the
+ control can have. This property is implemented by an AudioControl object
+ that is a subclass of AudioVolumeControl.
+ @constant kAudioDevicePropertyVolumeScalarToDecibels
+ A Float32 that on input contains a scalar volume value for the and on exit
+ contains the equivalent dB value. This property is implemented by an
+ AudioControl object that is a subclass of AudioVolumeControl.
+ @constant kAudioDevicePropertyVolumeDecibelsToScalar
+ A Float32 that on input contains a dB volume value for the and on exit
+ contains the equivalent scalar value. This property is implemented by an
+ AudioControl object that is a subclass of AudioVolumeControl.
+ @constant kAudioDevicePropertyStereoPan
+ A Float32 where 0.0 is full left, 1.0 is full right, and 0.5 is center. This
+ property is implemented by an AudioControl object that is a subclass of
+ AudioStereoPanControl.
+ @constant kAudioDevicePropertyStereoPanChannels
+ An array of two UInt32s that indicate which elements of the owning object
+ the signal is being panned between. This property is implemented by an
+ AudioControl object that is a subclass of AudioStereoPanControl.
+ @constant kAudioDevicePropertyMute
+ A UInt32 where a value of 1 means that mute is enabled making that element
+ inaudible. The property is implemented by an AudioControl object that is a
+ subclass of AudioMuteControl.
+ @constant kAudioDevicePropertySolo
+ A UInt32 where a value of 1 means that just that element is audible and the
+ other elements are inaudible. The property is implemented by an AudioControl
+ object that is a subclass of AudioSoloControl.
+ @constant kAudioDevicePropertyDataSource
+ A UInt32 whose value is the item ID for the currently selected data source.
+ This property is implemented by an AudioControl object that is a subclass of
+ AudioDataSourceControl.
+ @constant kAudioDevicePropertyDataSources
+ An array of UInt32s that are represent all the IDs of all the data sources
+ currently available. This property is implemented by an AudioControl object
+ that is a subclass of AudioDataSourceControl.
+ @constant kAudioDevicePropertyDataSourceNameForIDCFString
+ This property translates the given data source item ID into a human readable
+ name using an AudioValueTranslation structure. The input data is the UInt32
+ containing the item ID to translated and the output data is a CFString. The
+ caller is responsible for releasing the returned CFObject. This property is
+ implemented by an AudioControl object that is a subclass of
+ AudioDataSourceControl.
+ @constant kAudioDevicePropertyClockSource
+ A UInt32 whose value is the item ID for the currently selected clock source.
+ This property is implemented by an AudioControl object that is a subclass of
+ AudioClockControl.
+ @constant kAudioDevicePropertyClockSources
+ An array of UInt32s that are represent all the IDs of all the clock sources
+ currently available. This property is implemented by an AudioControl object
+ that is a subclass of AudioClockControl.
+ @constant kAudioDevicePropertyClockSourceNameForIDCFString
+ This property translates the given clock source item ID into a human
+ readable name using an AudioValueTranslation structure. The input data is
+ the UInt32 containing the item ID to translated and the output data is a
+ CFString. The caller is responsible for releasing the returned CFObject.
+ This property is implemented by an AudioControl object that is a subclass of
+ AudioClockControl.
+ @constant kAudioDevicePropertyClockSourceKindForID
+ This property returns a UInt32 that identifies the kind of clock source
+ the item ID refers to using an AudioValueTranslation structure. The input
+ data is the UInt32 containing the item ID and the output data is the UInt32.
+ Values for this property are defined in <IOAudio/audio/IOAudioTypes.h>.
+ @constant kAudioDevicePropertyPlayThru
+ A UInt32 where a value of 0 means that play through is off and a value of 1
+ means that it is on. This property is implemented by an AudioControl object
+ that is a subclass of AudioMuteControl. Further, the control that implements
+ this property is only available through
+ kAudioDevicePropertyScopePlayThrough.
+ @constant kAudioDevicePropertyPlayThruSolo
+ A UInt32 where a value of 1 means that just that play through element is
+ audible and the other elements are inaudible. The property is implemented by
+ an AudioControl object that is a subclass of AudioSoloControl. Further, the
+ control that implements this property is only available through
+ kAudioDevicePropertyScopePlayThrough.
+ @constant kAudioDevicePropertyPlayThruVolumeScalar
+ A Float32 that represents the value of the volume control. The range is
+ between 0.0 and 1.0 (inclusive). This property is implemented by an
+ AudioControl object that is a subclass of AudioVolumeControl.Further, the
+ control that implements this property is only available through
+ kAudioDevicePropertyScopePlayThrough.
+ @constant kAudioDevicePropertyPlayThruVolumeDecibels
+ A Float32 that represents the value of the volume control in dB. This
+ property is implemented by an AudioControl object that is a subclass of
+ AudioVolumeControl. Further, the control that implements this property is
+ only available through kAudioDevicePropertyScopePlayThrough.
+ @constant kAudioDevicePropertyPlayThruVolumeRangeDecibels
+ An AudioValueRange that contains the minimum and maximum dB values the
+ control can have. This property is implemented by an AudioControl object
+ that is a subclass of AudioVolumeControl. Further, the control that
+ implements this property is only available through
+ kAudioDevicePropertyScopePlayThrough.
+ @constant kAudioDevicePropertyPlayThruVolumeScalarToDecibels
+ A Float32 that on input contains a scalar volume value for the and on exit
+ contains the equivalent dB value. This property is implemented by an
+ AudioControl object that is a subclass of AudioVolumeControl. Further, the
+ control that implements this property is only available through
+ kAudioDevicePropertyScopePlayThrough.
+ @constant kAudioDevicePropertyPlayThruVolumeDecibelsToScalar
+ A Float32 that on input contains a dB volume value for the and on exit
+ contains the equivalent scalar value. This property is implemented by an
+ AudioControl object that is a subclass of AudioVolumeControl. Further, the
+ control that implements this property is only available through
+ kAudioDevicePropertyScopePlayThrough.
+ @constant kAudioDevicePropertyPlayThruStereoPan
+ A Float32 where 0.0 is full left, 1.0 is full right, and 0.5 is center. This
+ property is implemented by an AudioControl object that is a subclass of
+ AudioStereoPanControl. Further, the control that implements this property is
+ only available through kAudioDevicePropertyScopePlayThrough.
+ @constant kAudioDevicePropertyPlayThruStereoPanChannels
+ An array of two UInt32s that indicate which elements of the owning object
+ the signal is being panned between. This property is implemented by an
+ AudioControl object that is a subclass of AudioStereoPanControl. Further,
+ the control that implements this property is only available through
+ kAudioDevicePropertyScopePlayThrough.
+ @constant kAudioDevicePropertyPlayThruDestination
+ A UInt32 whose value is the item ID for the currently selected play through
+ data destination. This property is implemented by an AudioControl object
+ that is a subclass of AudioDataDestinationControl. Further, the control that
+ implements this property is only available through
+ kAudioDevicePropertyScopePlayThrough.
+ @constant kAudioDevicePropertyPlayThruDestinations
+ An array of UInt32s that are represent all the IDs of all the play through
+ data destinations currently available. This property is implemented by an
+ AudioControl object that is a subclass of AudioDataDestinationControl.
+ Further, the control that implements this property is only available through
+ kAudioDevicePropertyScopePlayThrough.
+ @constant kAudioDevicePropertyPlayThruDestinationNameForIDCFString
+ This property translates the given play through data destination item ID
+ into a human readable name using an AudioValueTranslation structure. The
+ input data is the UInt32 containing the item ID to translated and the output
+ data is a CFString. The caller is responsible for releasing the returned
+ CFObject. This property is implemented by an AudioControl object that is a
+ subclass of AudioDataDestinationControl. Further, the control that
+ implements this property is only available through
+ kAudioDevicePropertyScopePlayThrough.
+ @constant kAudioDevicePropertyChannelNominalLineLevel
+ A UInt32 whose value is the item ID for the currently selected nominal line
+ level. This property is implemented by an AudioControl object that is a
+ subclass of AudioLineLevelControl.
+ @constant kAudioDevicePropertyChannelNominalLineLevels
+ An array of UInt32s that represent all the IDs of all the nominal line
+ levels currently available. This property is implemented by an AudioControl
+ object that is a subclass of AudioLineLevelControl.
+ @constant kAudioDevicePropertyChannelNominalLineLevelNameForIDCFString
+ This property translates the given nominal line level item ID into a human
+ readable name using an AudioValueTranslation structure. The input data is
+ the UInt32 containing the item ID to be translated and the output data is a
+ CFString. The caller is responsible for releasing the returned CFObject.
+ This property is implemented by an AudioCOntrol object that is a subclass of
+ AudioLineLevelControl.
+ @constant kAudioDevicePropertyDriverShouldOwniSub
+ A UInt32 where a value of 0 means that the AudioDevice should not claim
+ ownership of any attached iSub and a value of 1 means that it should. Note
+ that this property is only available for built-in devices and for USB Audio
+ devices that use the standard class compliant driver. This property is
+ implemented by an AudioControl object that is a subclass of
+ AudioISubOwnerControl.
+ @constant kAudioDevicePropertySubVolumeScalar
+ A Float32 that represents the value of the LFE volume control. The range is
+ between 0.0 and 1.0 (inclusive). This property is implemented by an
+ AudioControl object that is a subclass of AudioLFEVolumeControl.
+ @constant kAudioDevicePropertySubVolumeDecibels
+ A Float32 that represents the value of the LFE volume control in dB. This
+ property is implemented by an AudioControl object that is a subclass of
+ AudioLFE VolumeControl.
+ @constant kAudioDevicePropertySubVolumeRangeDecibels
+ An AudioValueRange that contains the minimum and maximum dB values the
+ control can have. This property is implemented by an AudioControl object
+ that is a subclass of AudioLFEVolumeControl.
+ @constant kAudioDevicePropertySubVolumeScalarToDecibels
+ A Float32 that on input contains a scalar volume value for the and on exit
+ contains the equivalent dB value. This property is implemented by an
+ AudioControl object that is a subclass of AudioLFEVolumeControl.
+ @constant kAudioDevicePropertySubVolumeDecibelsToScalar
+ A Float32 that on input contains a dB volume value for the and on exit
+ contains the equivalent scalar value. This property is implemented by an
+ AudioControl object that is a subclass of AudioLFEVolumeControl.
+ @constant kAudioDevicePropertySubMute
+ A UInt32 where a value of 1 means that mute is enabled making the LFE on
+ that element inaudible. The property is implemented by an AudioControl
+ object that is a subclass of AudioLFEMuteControl.
+}
+const
+ kAudioDevicePropertyJackIsConnected = $6A61636B (* 'jack' *);
+ kAudioDevicePropertyVolumeScalar = $766F6C6D (* 'volm' *);
+ kAudioDevicePropertyVolumeDecibels = $766F6C64 (* 'vold' *);
+ kAudioDevicePropertyVolumeRangeDecibels = $76646223 (* 'vdb#' *);
+ kAudioDevicePropertyVolumeScalarToDecibels = $76326462 (* 'v2db' *);
+ kAudioDevicePropertyVolumeDecibelsToScalar = $64623276 (* 'db2v' *);
+ kAudioDevicePropertyStereoPan = $7370616E (* 'span' *);
+ kAudioDevicePropertyStereoPanChannels = $73706E23 (* 'spn#' *);
+ kAudioDevicePropertyMute = $6D757465 (* 'mute' *);
+ kAudioDevicePropertySolo = $736F6C6F (* 'solo' *);
+ kAudioDevicePropertyDataSource = $73737263 (* 'ssrc' *);
+ kAudioDevicePropertyDataSources = $73736323 (* 'ssc#' *);
+ kAudioDevicePropertyDataSourceNameForIDCFString = $6C73636E (* 'lscn' *);
+ kAudioDevicePropertyClockSource = $63737263 (* 'csrc' *);
+ kAudioDevicePropertyClockSources = $63736323 (* 'csc#' *);
+ kAudioDevicePropertyClockSourceNameForIDCFString = $6C63736E (* 'lcsn' *);
+ kAudioDevicePropertyClockSourceKindForID = $6373636B (* 'csck' *);
+ kAudioDevicePropertyPlayThru = $74687275 (* 'thru' *);
+ kAudioDevicePropertyPlayThruSolo = $74687273 (* 'thrs' *);
+ kAudioDevicePropertyPlayThruVolumeScalar = $6D767363 (* 'mvsc' *);
+ kAudioDevicePropertyPlayThruVolumeDecibels = $6D766462 (* 'mvdb' *);
+ kAudioDevicePropertyPlayThruVolumeRangeDecibels = $6D766423 (* 'mvd#' *);
+ kAudioDevicePropertyPlayThruVolumeScalarToDecibels = $6D763264 (* 'mv2d' *);
+ kAudioDevicePropertyPlayThruVolumeDecibelsToScalar = $6D763273 (* 'mv2s' *);
+ kAudioDevicePropertyPlayThruStereoPan = $6D73706E (* 'mspn' *);
+ kAudioDevicePropertyPlayThruStereoPanChannels = $6D737023 (* 'msp#' *);
+ kAudioDevicePropertyPlayThruDestination = $6D646473 (* 'mdds' *);
+ kAudioDevicePropertyPlayThruDestinations = $6D646423 (* 'mdd#' *);
+ kAudioDevicePropertyPlayThruDestinationNameForIDCFString = $6D646463 (* 'mddc' *);
+ kAudioDevicePropertyChannelNominalLineLevel = $6E6C766C (* 'nlvl' *);
+ kAudioDevicePropertyChannelNominalLineLevels = $6E6C7623 (* 'nlv#' *);
+ kAudioDevicePropertyChannelNominalLineLevelNameForIDCFString = $6C636E6C (* 'lcnl' *);
+ kAudioDevicePropertyDriverShouldOwniSub = $69737562 (* 'isub' *);
+ kAudioDevicePropertySubVolumeScalar = $73766C6D (* 'svlm' *);
+ kAudioDevicePropertySubVolumeDecibels = $73766C64 (* 'svld' *);
+ kAudioDevicePropertySubVolumeRangeDecibels = $73766423 (* 'svd#' *);
+ kAudioDevicePropertySubVolumeScalarToDecibels = $73763264 (* 'sv2d' *);
+ kAudioDevicePropertySubVolumeDecibelsToScalar = $73643276 (* 'sd2v' *);
+ kAudioDevicePropertySubMute = $736D7574 (* 'smut' *);
+
+{!
+ @enum AudioDevice Properties That Ought To Some Day Be Deprecated
+ @abstract AudioObjectPropertySelector values whose functionality is better provided by
+ other selectors.
+ @discussion These selectors are still provided for backward compatibility. The description
+ of the property will indicate in parentheses the better selectors to use and
+ why.
+ @constant kAudioDevicePropertyDeviceName
+ A C-string that contains the human readable name of the AudioDevice.
+ (kAudioObjectPropertyName: CFStrings are better for localization.)
+ @constant kAudioDevicePropertyDeviceNameCFString
+ A CFStringRef that contains the human readable name of the AudioDevice. The
+ caller is responsible for releasing the returned CFObject.
+ (kAudioObjectPropertyName: This is just another name for the inherited
+ selector.)
+ @constant kAudioDevicePropertyDeviceManufacturer
+ A C-string that contains the human readable name of the manufacturer of the
+ AudioDevice.
+ (kAudioObjectPropertyManufacturer: CFStrings are better for localization.)
+ @constant kAudioDevicePropertyDeviceManufacturerCFString
+ A CFString that contains the human readable name of the manufacturer of the
+ AudioDevice. The caller is responsible for releasing the returned CFObject.
+ (kAudioObjectPropertyManufacturer: This is just another name for the
+ inherited selector.)
+ @constant kAudioDevicePropertyRegisterBufferList
+ This property allows clients to register a fully populated AudioBufferList
+ that matches the topology described by
+ kAudioDevicePropertyStreamConfiguration for doing input using
+ AudioDeviceRead(). The AudioBufferList will be registered with the call the
+ AudioDeviceSetProperty() and will be unregistered with the call to
+ AudioDeviceGetProperty(). If this property isn't implemented by the
+ AudioDevice, it implies that the AudioDevice also doesn't support
+ AudioDeviceRead().
+ (Aggregate devices make AudioDeviceRead() obsolete for the most part.)
+ @constant kAudioDevicePropertyBufferSize
+ A UInt32 containing the size in bytes of the IO buffer for the AudioStream
+ containing the element.
+ (kAudioDevicePropertyBufferFrameSize: with multiple AudioStreams and the
+ requirement that all streams' buffers represent the same amount of time, it
+ doesn't make sense to set the buffer size in bytes since it will be
+ different for each stream.)
+ @constant kAudioDevicePropertyBufferSizeRange
+ An AudioValueRange specifying the minimum and maximum bytes size for the
+ IO buffer for the AudioStream containing the given element.
+ (kAudioDevicePropertyBufferFrameSizeRange: see
+ kAudioDevicePropertyBufferSize.)
+ @constant kAudioDevicePropertyChannelName
+ A CFString that contains a human readable name for the given element in the
+ given scope. The caller is responsible for releasing the returned CFObject.
+ (kAudioObjectPropertyElementName: CFStrings are better for
+ localization.)
+ @constant kAudioDevicePropertyChannelNameCFString
+ A CFString that contains a human readable name for the given element in the
+ given scope. The caller is responsible for releasing the returned CFObject.
+ (kAudioObjectPropertyElementName: This is just another name for the
+ inherited selector.)
+ @constant kAudioDevicePropertyChannelCategoryName
+ A CFString that contains a human readable name for the category of the given
+ element in the given scope. The caller is responsible for releasing the
+ returned CFObject.
+ (kAudioObjectPropertyElementCategoryName: CFStrings are better for
+ localization.)
+ @constant kAudioDevicePropertyChannelCategoryNameCFString
+ A CFString that contains a human readable name for the category of the given
+ element in the given scope. The caller is responsible for releasing the
+ returned CFObject.
+ (kAudioObjectPropertyElementCategoryName: This is just another name for the
+ inherited selector.)
+ @constant kAudioDevicePropertyChannelNumberName
+ A CFString that contains a human readable name for the number of the given
+ element in the given scope. The caller is responsible for releasing the
+ returned CFObject.
+ (kAudioObjectPropertyElementNumberName: CFStrings are better for
+ localization.)
+ @constant kAudioDevicePropertyChannelNumberNameCFString
+ A CFString that contains a human readable name for the number of the given
+ element in the given scope. The caller is responsible for releasing the
+ returned CFObject.
+ (kAudioObjectPropertyElementNumberName: This is just another name for the
+ inherited selector.)
+ @constant kAudioDevicePropertySupportsMixing
+ A UInt32 where a value of 1 means the AudioDevice supports mixing and a
+ value of 0 means that it doesn't and that all IO is performed in each
+ AudioStream's current physical format. This property is changed indirectly
+ by changing to a format that doesn't support mixing, such as AC-3. (The HAL
+ now vends it's format information with a flag indicating the mixability in
+ order to better support devices with streams that are both mixable and non-
+ mixable.)
+ @constant kAudioDevicePropertyStreamFormat
+ An AudioStreamBasicDescription that describes the current data format for
+ the AudioStream that contains the channel referred to by the element number.
+ (kAudioStreamPropertyVirtualFormat: Managing format information is
+ inherently an operation on AudioStreams, rather than AudioDevices. It is
+ confusing for the client to work with formats at the AudioDevice level and
+ has been shown to lead to programming mistakes by clients when working with
+ devices that have multiple streams.)
+ @constant kAudioDevicePropertyStreamFormats
+ An array of AudioStreamBasicDescriptions that describe the available data
+ formats for the AudioStream that contains the channel referred to by the
+ element number.
+ (kAudioStreamPropertyAvailableVirtualFormats: Managing format information is
+ inherently an operation on AudioStreams, rather than AudioDevices. It is
+ confusing for the client to work with formats at the AudioDevice level and
+ has been shown to lead to programming mistakes by clients when working with
+ devices that have multiple streams.)
+ @constant kAudioDevicePropertyStreamFormatSupported
+ An AudioStreamBasicDescription is passed in to query whether or not the
+ format is supported. A kAudioDeviceUnsupportedFormatError will be returned
+ if the format is not supported and kAudioHardwareNoError will be returned if
+ it is supported. AudioStreamBasicDescription fields set to 0 will be ignored
+ in the query, but otherwise values must match exactly.
+ (kAudioStreamPropertyAvailableVirtualFormats: The proper and most robust way
+ to find a format that the AudioStream can support is to get the list of
+ available formats and look through that rather than using this property.)
+ @constant kAudioDevicePropertyStreamFormatMatch
+ An AudioStreamBasicDescription is passed in and the AudioStream will modify
+ it to describe the best match, in the AudioDevice's opinion, for the given
+ format.
+ (kAudioStreamPropertyAvailableVirtualFormats: The proper and most robust way
+ to find a format that the AudioStream can support is to get the list of
+ available formats and look through that rather than using this property.)
+ @constant kAudioDevicePropertyDataSourceNameForID
+ This property translates the given data source item ID into a human readable
+ name using an AudioValueTranslation structure. The input data is the UInt32
+ holding the item ID to be translated and the output data is a buffer to hold
+ the name as a null terminated c-string.
+ (kAudioDevicePropertyDataSourceNameForIDCFString: CFStrings are better for
+ localization.)
+ @constant kAudioDevicePropertyClockSourceNameForID
+ This property translates the given clock source item ID into a human
+ readable name using an AudioValueTranslation structure. The input data is
+ the UInt32 holding the item ID to be translated and the output data is a
+ buffer to hold the name as a null terminated c-string.
+ (kAudioDevicePropertyClockSourceNameForIDCFString: CFStrings are better for
+ localization.)
+ @constant kAudioDevicePropertyPlayThruDestinationNameForID
+ This property translates the given play through destination item ID into a
+ human readable name using an AudioValueTranslation structure. The input data
+ is the UInt32 holding the item ID to be translated and the output data is a
+ buffer to hold the name as a null terminated c-string.
+ (kAudioDevicePropertyPlayThruDestinationNameForIDCFString: CFStrings are
+ better for localization.)
+ @constant kAudioDevicePropertyChannelNominalLineLevelNameForID
+ This property translates the given nominal line level item ID into a human
+ readable name using an AudioValueTranslation structure. The input data is
+ the UInt32 holding the item ID to be translated and the output data is a
+ buffer to hold the name as a null terminated c-string.
+ (kAudioDevicePropertyChannelNominalLineLevelNameForIDCFString: CFStrings are
+ better for localization.)
+}
+const
+ kAudioDevicePropertyDeviceName = $6E616D65 (* 'name' *);
+ kAudioDevicePropertyDeviceNameCFString = kAudioObjectPropertyName;
+ kAudioDevicePropertyDeviceManufacturer = $6D616B72 (* 'makr' *);
+ kAudioDevicePropertyDeviceManufacturerCFString = kAudioObjectPropertyManufacturer;
+ kAudioDevicePropertyRegisterBufferList = $72627566 (* 'rbuf' *);
+ kAudioDevicePropertyBufferSize = $6273697A (* 'bsiz' *);
+ kAudioDevicePropertyBufferSizeRange = $62737A23 (* 'bsz#' *);
+ kAudioDevicePropertyChannelName = $63686E6D (* 'chnm' *);
+ kAudioDevicePropertyChannelNameCFString = kAudioObjectPropertyElementName;
+ kAudioDevicePropertyChannelCategoryName = $63636E6D (* 'ccnm' *);
+ kAudioDevicePropertyChannelCategoryNameCFString = kAudioObjectPropertyElementCategoryName;
+ kAudioDevicePropertyChannelNumberName = $636E6E6D (* 'cnnm' *);
+ kAudioDevicePropertyChannelNumberNameCFString = kAudioObjectPropertyElementNumberName;
+ kAudioDevicePropertySupportsMixing = $6D69783F (* 'mix?' *);
+ kAudioDevicePropertyStreamFormat = $73666D74 (* 'sfmt' *);
+ kAudioDevicePropertyStreamFormats = $73666D23 (* 'sfm#' *);
+ kAudioDevicePropertyStreamFormatSupported = $73666D3F (* 'sfm?' *);
+ kAudioDevicePropertyStreamFormatMatch = $73666D6D (* 'sfmm' *);
+ kAudioDevicePropertyDataSourceNameForID = $7373636E (* 'sscn' *);
+ kAudioDevicePropertyClockSourceNameForID = $6373636E (* 'cscn' *);
+ kAudioDevicePropertyPlayThruDestinationNameForID = $6D64646E (* 'mddn' *);
+ kAudioDevicePropertyChannelNominalLineLevelNameForID = $636E6C76 (* 'cnlv' *);
+
+//==================================================================================================
+//#pragma mark AudioDevice Functions
+
+{!
+ @functiongroup AudioDevice
+}
+
+{!
+ @function AudioDeviceAddIOProc
+ @abstract Registers the given AudioDeviceIOProc with the AudioDevice.
+ @discussion A client may have multiple IOProcs for a given device, but the device is free to
+ only accept as many as it can handle. Note that it is not recommended for
+ clients to have more than a single IOProc registered at a time as this can be
+ wasteful of system resources. Rather, it is recommended that the client do any
+ necessary mixing itself so that only one IOProc is necessary.
+ @param inDevice
+ The AudioDevice to register the IOProc with.
+ @param inProc
+ The AudioDeviceIOProc to register.
+ @param inClientData
+ A pointer to client data that is passed back to the IOProc when it is
+ called.
+ @result An OSStatus indicating success or failure.
+}
+function AudioDeviceAddIOProc( inDevice: AudioDeviceID; inProc: AudioDeviceIOProc; inClientData: UnivPtr ): OSStatus; external name '_AudioDeviceAddIOProc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioDeviceRemoveIOProc
+ @abstract Unregisters the given AudioDeviceIOProc from the AudioDevice.
+ @param inDevice
+ The AudioDevice to unregister the IOProc from.
+ @param inProc
+ The AudioDeviceIOProc to unregister.
+ @result An OSStatus indicating success or failure.
+}
+function AudioDeviceRemoveIOProc( inDevice: AudioDeviceID; inProc: AudioDeviceIOProc ): OSStatus; external name '_AudioDeviceRemoveIOProc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioDeviceStart
+ @abstract Starts IO for the given AudioDeviceIOProc.
+ @param inDevice
+ The AudioDevice to start the IOProc on.
+ @param inProc
+ The AudioDeviceIOProc to start. Note that this can be NULL, which starts the
+ hardware regardless of whether or not there are any IOProcs registered. This
+ is necessary if any of the AudioDevice's timing services are to be used. A
+ balancing call to AudioDeviceStop with a NULL IOProc is required to stop the
+ hardware.
+ @result An OSStatus indicating success or failure.
+}
+function AudioDeviceStart( inDevice: AudioDeviceID; inProc: AudioDeviceIOProc ): OSStatus; external name '_AudioDeviceStart';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioDeviceStartAtTime
+ @abstract Starts IO for the given AudioDeviceIOProc and aligns the IO cycle of the
+ AudioDevice with the given time.
+ @param inDevice
+ The AudioDevice to start the IOProc on.
+ @param inProc
+ The AudioDeviceIOProc to start. Note that this can be NULL, which starts the
+ hardware regardless of whether or not there are any IOProcs registered.
+ @param ioRequestedStartTime
+ A pointer to an AudioTimeStamp that, on entry, is the requested time to
+ start the IOProc. On exit, it will be the actual time the IOProc will start.
+ @param inFlags
+ A UInt32 containing flags that modify how this function behaves.
+ @result An OSStatus indicating success or failure.
+ kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does
+ not support starting at a specific time and inProc and ioRequestedStartTime are
+ not NULL.
+}
+function AudioDeviceStartAtTime( inDevice: AudioDeviceID; inProc: AudioDeviceIOProc; ioRequestedStartTime: AudioTimeStampPtr; inFlags: UInt32 ): OSStatus; external name '_AudioDeviceStartAtTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{!
+ @function AudioDeviceStop
+ @abstract Stops IO for the given AudioDeviceIOProc.
+ @param inDevice
+ The AudioDevice to stop the IOProc on.
+ @param inProc
+ The AudioDeviceIOProc to stop.
+ @result An OSStatus indicating success or failure.
+}
+function AudioDeviceStop( inDevice: AudioDeviceID; inProc: AudioDeviceIOProc ): OSStatus; external name '_AudioDeviceStop';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioDeviceRead
+ @abstract Read some data from an AudioDevice starting at the given time.
+ @discussion With the advent of aggregate devices, the need for AudioDeviceRead has gone
+ away. Consequently, this function is a good candidate for deprecation some day.
+ @param inDevice
+ The AudioDevice to read from.
+ @param inStartTime
+ An AudioTimeStamp indicating the time from which to read the data. In
+ general, the valid range of time (in frames) is from the current time minus
+ the maximum IO buffer size to the current time minus the safety offset.
+ @param outData
+ An AudioBufferList that must be the same size and shape as that returned by
+ kAudioDevicePropertyStreamConfiguration. Further, the AudioBufferList must
+ have been previously registered with the device via
+ kAudioDevicePropertyRegisterBufferList. On exit, the mDataSize fields will
+ be updated with the amount of data read.
+ @result An OSStatus indicating success or failure.
+ kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does
+ not support direct reading.
+}
+function AudioDeviceRead( inDevice: AudioDeviceID; const (*var*) inStartTime: AudioTimeStamp; var outData: AudioBufferList ): OSStatus; external name '_AudioDeviceRead';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{!
+ @function AudioDeviceGetCurrentTime
+ @abstract Retrieves the current time from an AudioDevice. Note that the device has to be
+ running.
+ @param inDevice
+ The AudioDevice to from which to get the time.
+ @param outTime
+ An AudioTimeStamp into which the current time is put.
+ @result An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be
+ returned if the AudioDevice isn't running.
+}
+function AudioDeviceGetCurrentTime( inDevice: AudioDeviceID; var outTime: AudioTimeStamp ): OSStatus; external name '_AudioDeviceGetCurrentTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioDeviceTranslateTime
+ @abstract Translates the time in the AudioDevice's time base from one representation to
+ another. Note that the device has to be running
+ @param inDevice
+ The AudioDevice whose time base governs the translation.
+ @param inTime
+ An AudioTimeStamp containing the time to be translated.
+ @param outTime
+ An AudioTimeStamp into which the translated time is put. On entry, the
+ mFlags field specifies which representations to translate the input time
+ into. Because not every device supports all time representations, on exit,
+ the mFlags field will indicate which translations were actually done.
+ @result An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be
+ returned if the AudioDevice isn't running.
+}
+function AudioDeviceTranslateTime( inDevice: AudioDeviceID; const (*var*) inTime: AudioTimeStamp; var outTime: AudioTimeStamp ): OSStatus; external name '_AudioDeviceTranslateTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioDeviceGetNearestStartTime
+ @abstract Query an AudioDevice to get a time equal to or later than the given time that is
+ the best time to start IO.
+ @discussion The time that is returned is dictated by the constraints of the device and the
+ system. For instance, the driver of a device that provides both audio and video
+ data may only allow start times that coincide with the edge of a video frame.
+ Also, if the device already has one or more active IOProcs, the start time will
+ be shifted to the beginning of the next IO cycle so as not to cause
+ discontinuities in the existing IOProcs. Another reason the start time may shift
+ is to allow for aligning the buffer accesses in an optimal fashion. Note that
+ the device must be running to use this function.
+ @param inDevice
+ The AudioDevice to query.
+ @param ioRequestedStartTime
+ A pointer to an AudioTimeStamp that, on entry, is the requested start time.
+ On exit, it will have the a time equal to or later than the requested time,
+ as dictated by the device's constraints.
+ @param inFlags
+ A UInt32 containing flags that modify how this function behaves.
+ @result An OSStatus indicating success or failure. kAudioHardwareNotRunningError will be
+ returned if the AudioDevice isn't running.
+ kAudioHardwareUnsupportedOperationError will be returned if the AudioDevice does
+ not support starting at a specific time.
+}
+function AudioDeviceGetNearestStartTime( inDevice: AudioDeviceID; var ioRequestedStartTime: AudioTimeStamp; inFlags: UInt32 ): OSStatus; external name '_AudioDeviceGetNearestStartTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{!
+ @function AudioDeviceGetPropertyInfo
+ @abstract Retrieve information about the given property of an AudioDevice.
+ @discussion Note that the same functionality is provided by the functions
+ AudioObjectHasProperty(), AudioObjectIsPropertySettable(), and
+ AudioObjectGetPropertyDataSize().
+ @param inDevice
+ The AudioDevice to query.
+ @param inChannel
+ The channel of the property to query where 0 is the master channel.
+ @param isInput
+ Which section of the AudioDevice to query.
+ @param inPropertyID
+ The AudioDevicePropertyID of the property to query.
+ @param outSize
+ A pointer to a UInt32 that receives the size of the property data in bytes
+ on exit. This can be NULL if the size information is not being requested.
+ @param outWritable
+ A pointer to a Boolean that receives indication of whether or not the given
+ property can be set. This can be NULL if the writability is not being
+ requested.
+ @result An OSStatus indicating success or failure.
+}
+function AudioDeviceGetPropertyInfo( inDevice: AudioDeviceID; inChannel: UInt32; isInput: Boolean; inPropertyID: AudioDevicePropertyID; outSize: UInt32Ptr; outWritable: BooleanPtr ): OSStatus; external name '_AudioDeviceGetPropertyInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioDeviceGetProperty
+ @abstract Queries an the AudioDevice object to get the data of the given property and
+ places it in the provided buffer.
+ @discussion Note that the same functionality is provided by the function
+ AudioObjectGetPropertyData().
+ @param inDevice
+ The AudioDevice to query.
+ @param inChannel
+ The channel of the property to query where 0 is the master channel.
+ @param isInput
+ Which section of the AudioDevice to query.
+ @param inPropertyID
+ The AudioDevicePropertyID of the property to query.
+ @param ioPropertyDataSize
+ A UInt32 which on entry indicates the size of the buffer pointed to by
+ outData and on exit indicates how much of the buffer was used.
+ @param outPropertyData
+ The buffer into which the object will put the data for the given property.
+ @result An OSStatus indicating success or failure.
+}
+function AudioDeviceGetProperty( inDevice: AudioDeviceID; inChannel: UInt32; isInput: Boolean; inPropertyID: AudioDevicePropertyID; var ioPropertyDataSize: UInt32; outPropertyData: UnivPtr ): OSStatus; external name '_AudioDeviceGetProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioDeviceSetProperty
+ @abstract Tells the AudioDevice object to change the value of the given property using the
+ provided data.
+ @discussion Note that the value of the property should not be considered changed until the
+ HAL has called the listeners as many properties values are changed
+ asynchronously. Also note that the same functionality is provided by the
+ function AudioObjectGetPropertyData().
+ @param inDevice
+ The AudioDevice to change.
+ @param inWhen
+ A pointer to an AudioTimeStamp that says when to change the property's value
+ relative to the device's time base. NULL means execute the change
+ immediately.
+ @param inChannel
+ The channel of the property to change where 0 is the master channel.
+ @param isInput
+ Which section of the AudioDevice to change.
+ @param inPropertyID
+ The AudioDevicePropertyID of the property to change.
+ @param inPropertyDataSize
+ A UInt32 indicating the size of the buffer pointed to by inData.
+ @param inPropertyData
+ The buffer containing the data to be used to change the property's value.
+ @result An OSStatus indicating success or failure.
+}
+function AudioDeviceSetProperty( inDevice: AudioDeviceID; inWhen: {const} AudioTimeStampPtr; inChannel: UInt32; isInput: Boolean; inPropertyID: AudioDevicePropertyID; inPropertyDataSize: UInt32; inPropertyData: {const} UnivPtr ): OSStatus; external name '_AudioDeviceSetProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioDeviceAddPropertyListener
+ @abstract Registers the given AudioDevicePropertyListenerProc to receive notifications
+ when the given property changes.
+ @discussion Note that the same functionality is provided by AudioObjectAddPropertyListener
+ in conjunction with AudioObjectPropertyListenerProc.
+ @param inDevice
+ The AudioDevice with whom to register the listener.
+ @param inChannel
+ The channel of the property to listen to.
+ @param isInput
+ Which section of the AudioDevice to listen to.
+ @param inPropertyID
+ The AudioDevicePropertyID of the property to listen to.
+ @param inProc
+ AudioDevicePropertyListenerProc to call.
+ @param inClientData
+ A pointer to client data that is passed to the listener when it is called.
+ @result An OSStatus indicating success or failure.
+}
+function AudioDeviceAddPropertyListener( inDevice: AudioDeviceID; inChannel: UInt32; isInput: Boolean; inPropertyID: AudioDevicePropertyID; inProc: AudioDevicePropertyListenerProc; inClientData: UnivPtr ): OSStatus; external name '_AudioDeviceAddPropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{!
+ @function AudioDeviceRemovePropertyListener
+ @abstract Unregisters the given AudioDevicePropertyListenerProc from receiving
+ notifications when the given property changes.
+ @discussion Note that the same functionality is provided by
+ AudioObjectRemovePropertyListener in conjunction with
+ AudioObjectPropertyListenerProc.
+ @param inDevice
+ The AudioDevice with whom to unregister the listener.
+ @param inChannel
+ The channel of the property to unregister from.
+ @param isInput
+ Which section of the AudioDevice to unregister from.
+ @param inPropertyID
+ The AudioDevicePropertyID of the property to stop listening to.
+ @param inProc
+ AudioDevicePropertyListenerProc to unregister.
+ @result An OSStatus indicating success or failure.
+}
+function AudioDeviceRemovePropertyListener( inDevice: AudioDeviceID; inChannel: UInt32; isInput: Boolean; inPropertyID: AudioDevicePropertyID; inProc: AudioDevicePropertyListenerProc ): OSStatus; external name '_AudioDeviceRemovePropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+//==================================================================================================
+//#pragma mark AudioStream Types
+
+{!
+ @typedef AudioStreamID
+ @abstract AudioStream is the base class for all objects that represent a stream of data on
+ an audio device.
+ @discussion AudioStream is a subclass of AudioObject and can contain AudioControls.
+}
+type
+ AudioStreamID = AudioObjectID;
+
+{!
+ @struct AudioStreamRangedDescription
+ @abstract This structure allows a specific sample rate range to be associated with an
+ AudioStreamBasicDescription that specifies it's sample rate as
+ kAudioStreamAnyRate.
+ @discussion Note that this structure is only used to desicribe the the available formats
+ for a stream. It is not used for the current format.
+ @field mFormat
+ The AudioStreamBasicDescription that describes the format of the stream.
+ Note that the mSampleRate field of the structure will be the same as the
+ the values in mSampleRateRange when only a single sample rate is supported.
+ It will be kAudioStreamAnyRate when there is a range with more elements.
+ @field mSampleRateRange
+ The AudioValueRange that describes the minimum and maximum sample rate for
+ the stream. If the mSampleRate field of mFormat is kAudioStreamAnyRate the
+ format supports the range of sample rates described by this structure.
+ Otherwise, the minimum will be the same as the maximum which will be the
+ same as the mSampleRate field of mFormat.
+}
+type
+ AudioStreamRangedDescription = record
+ mFormat: AudioStreamBasicDescription;
+ mSampleRateRange: AudioValueRange;
+ end;
+
+{!
+ @typedef AudioStreamPropertyListenerProc
+ @abstract Clients register an AudioStreamPropertyListenerProc with the AudioStream object
+ in order to receive notifications when the properties of the object change.
+ @discussion Note that the same functionality is provided by AudioObjectPropertyListenerProc.
+ @param inStream
+ The AudioStream whose property has changed.
+ @param inChannel
+ The channel of the property that changed where 0 is the master channel.
+ @param inPropertyID
+ The AudioDevicePropertyID of the property that changed.
+ @param inClientData
+ A pointer to client data established when the listener proc was registered
+ with the object.
+ @result The return value is currently unused and should always be 0.
+}
+type
+ AudioStreamPropertyListenerProc = function( inStream: AudioStreamID; inChannel: UInt32; inPropertyID: AudioDevicePropertyID; inClientData: UnivPtr ): OSStatus;
+
+//==================================================================================================
+//#pragma mark AudioStream Constants
+
+{!
+ @enum AudioStream Class Constants
+ @abstract Various constants related to AudioStreams.
+ @constant kAudioStreamClassID
+ The AudioClassID that identifies the AudioStream class.
+ @constant kAudioStreamUnknown
+ The AudioObjectID for a nonexistent AudioObject.
+}
+const
+ kAudioStreamClassID = $61737472 (* 'astr' *);
+ kAudioStreamUnknown = kAudioObjectUnknown;
+
+//==================================================================================================
+//#pragma mark AudioStream Properties
+
+{!
+ @enum AudioStream Properties
+ @abstract AudioObjectPropertySelector values that apply to all AudioStreams.
+ @discussion AudioStream is a subclass of AudioObject and has only the single scope,
+ kAudioObjectPropertyScopeGlobal. They have a master element and an element for
+ each channel in the stream numbered upward from 1. Note that AudioStream objects
+ share AudioControl objects with their owning AudioDevice. Consequently, all the
+ standard AudioControl related property selectors implemented by AudioDevices are
+ also implemented by AudioStreams. The same constants are to be used for such
+ properties.
+ @constant kAudioStreamPropertyDirection
+ A UInt32 where a value of 0 means that this AudioStream is an output stream
+ and a value of 1 means that it is an input stream.
+ @constant kAudioStreamPropertyTerminalType
+ A UInt32 whose value describes the general kind of functionality attached
+ to the AudioStream. Constants that describe some of the values of this
+ property are defined in <IOKit/audio/IOAudioTypes.h>
+ @constant kAudioStreamPropertyStartingChannel
+ A UInt32 that specifies the first element in the owning device that
+ corresponds to element one of this stream.
+ @constant kAudioStreamPropertyLatency
+ A UInt32 containing the number of frames of latency in the AudioStream. Note
+ that the owning AudioDevice may have additional latency so it should be
+ queried as well. If both the device and the stream say they have latency,
+ then the total latency for the stream is the device latency summed with the
+ stream latency.
+ @constant kAudioStreamPropertyVirtualFormat
+ An AudioStreamBasicDescription that describes the current data format for
+ the AudioStream. The virtual format refers to the data format in which all
+ IOProcs for the owning AudioDevice will perform IO transactions.
+ @constant kAudioStreamPropertyAvailableVirtualFormats
+ An array of AudioStreamRangedDescriptions that describe the available data
+ formats for the AudioStream. The virtual format refers to the data format in
+ which all IOProcs for the owning AudioDevice will perform IO transactions.
+ @constant kAudioStreamPropertyPhysicalFormat
+ An AudioStreamBasicDescription that describes the current data format for
+ the AudioStream. The physical format refers to the data format in which the
+ hardware for the owning AudioDevice performs it's IO transactions.
+ @constant kAudioStreamPropertyAvailablePhysicalFormats
+ An array of AudioStreamRangedDescriptions that describe the available data
+ formats for the AudioStream. The physical format refers to the data format
+ in which the hardware for the owning AudioDevice performs it's IO
+ transactions.
+}
+const
+ kAudioStreamPropertyDirection = $73646972 (* 'sdir' *);
+ kAudioStreamPropertyTerminalType = $7465726D (* 'term' *);
+ kAudioStreamPropertyStartingChannel = $7363686E (* 'schn' *);
+ kAudioStreamPropertyLatency = kAudioDevicePropertyLatency;
+ kAudioStreamPropertyVirtualFormat = $73666D74 (* 'sfmt' *);
+ kAudioStreamPropertyAvailableVirtualFormats = $73666D61 (* 'sfma' *);
+ kAudioStreamPropertyPhysicalFormat = $70667420 (* 'pft ' *);
+ kAudioStreamPropertyAvailablePhysicalFormats = $70667461 (* 'pfta' *);
+
+
+{!
+ @enum AudioStream Properties That Ought To Some Day Be Deprecated
+ @abstract AudioObjectPropertySelector values whose functionality is better provided by
+ other selectors.
+ @discussion These selectors are still provided for backward compatibility. The description
+ of the property will indicate in parentheses the better selectors to use and
+ why.
+ @constant kAudioStreamPropertyOwningDevice
+ The AudioObjectID of the AudioDevice of which this AudioStream is a part.
+ (kAudioObjectPropertyOwner: This is just another name for the inherited
+ selector.)
+ @constant kAudioStreamPropertyPhysicalFormats
+ An array of AudioStreamBasicDescriptions that describe the available data
+ formats for the AudioStream. The physical format refers to the data format
+ in which the hardware for the owning AudioDevice performs it's IO
+ transactions.
+ (kAudioStreamPropertyAvailablePhysicalFormats: The new name for this
+ property is much clearer for readers of the API to see what is meant and the
+ AudioStreamRangedDescription structure provides better information.)
+ @constant kAudioStreamPropertyPhysicalFormatSupported
+ An AudioStreamBasicDescription is passed in to query whether or not the
+ format is supported. A kAudioDeviceUnsupportedFormatError will be returned
+ if the format is not supported and kAudioHardwareNoError will be returned if
+ it is supported. AudioStreamBasicDescription fields set to 0 will be ignored
+ in the query, but otherwise values must match exactly. The physical format
+ refers to the data format in which the hardware for the owning AudioDevice
+ performs it's IO transactions.
+ (kAudioStreamPropertyAvailablePhysicalFormats: The proper and most robust
+ way to find a format that the AudioStream can support is to get the list of
+ available formats and look through that rather than using this property.)
+ @constant kAudioStreamPropertyPhysicalFormatMatch
+ An AudioStreamBasicDescription is passed in and the AudioStream will modify
+ it to describe the best match, in the AudioDevice's opinion, for the given
+ format. The physical format refers to the data format in which the hardware
+ for the owning AudioDevice performs it's IO transactions.
+ (kAudioStreamPropertyAvailablePhysicalFormats: The proper and most robust
+ way to find a format that the AudioStream can support is to get the list of
+ available formats and look through that rather than using this property.)
+}
+const
+ kAudioStreamPropertyOwningDevice = kAudioObjectPropertyOwner;
+ kAudioStreamPropertyPhysicalFormats = $70667423 (* 'pft#' *);
+ kAudioStreamPropertyPhysicalFormatSupported = $7066743F (* 'pft?' *);
+ kAudioStreamPropertyPhysicalFormatMatch = $7066746D (* 'pftm' *);
+
+//==================================================================================================
+//#pragma mark AudioStream Functions
+
+{!
+ @functiongroup AudioStream
+}
+
+{!
+ @function AudioStreamGetPropertyInfo
+ @abstract Retrieve information about the given property of an AudioStream.
+ @param inStream
+ The AudioStream to query.
+ @param inChannel
+ The channel of the property to query where 0 is the master channel.
+ @param inPropertyID
+ The AudioDevicePropertyID of the property to query.
+ @param outSize
+ A pointer to a UInt32 that receives the size of the property data in bytes
+ on exit. This can be NULL if the size information is not being requested.
+ @param outWritable
+ A pointer to a Boolean that receives indication of whether or not the given
+ property can be set. This can be NULL if the writability is not being
+ requested.
+ @result An OSStatus indicating success or failure.
+}
+function AudioStreamGetPropertyInfo( inStream: AudioStreamID; inChannel: UInt32; inPropertyID: AudioDevicePropertyID; var outSize: UInt32; var outWritable: Boolean ): OSStatus; external name '_AudioStreamGetPropertyInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{!
+ @function AudioStreamGetProperty
+ @abstract Queries an the AudioStream object to get the data of the given property and
+ places it in the provided buffer.
+ @discussion Note that the same functionality is provided by the function
+ AudioObjectGetPropertyData().
+ @param inStream
+ The AudioStream to query.
+ @param inChannel
+ The channel of the property to query where 0 is the master channel.
+ @param inPropertyID
+ The AudioDevicePropertyID of the property to query.
+ @param ioPropertyDataSize
+ A UInt32 which on entry indicates the size of the buffer pointed to by
+ outData and on exit indicates how much of the buffer was used.
+ @param outPropertyData
+ The buffer into which the object will put the data for the given property.
+ @result An OSStatus indicating success or failure.
+}
+function AudioStreamGetProperty( inStream: AudioStreamID; inChannel: UInt32; inPropertyID: AudioDevicePropertyID; var ioPropertyDataSize: UInt32; outPropertyData: UnivPtr ): OSStatus; external name '_AudioStreamGetProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{!
+ @function AudioStreamSetProperty
+ @abstract Tells the AudioStream object to change the value of the given property using the
+ provided data.
+ @discussion Note that the value of the property should not be considered changed until the
+ HAL has called the listeners as many properties values are changed
+ asynchronously. Also note that the same functionality is provided by the
+ function AudioObjectGetPropertyData().
+ @param inStream
+ The AudioStream to change.
+ @param inWhen
+ A pointer to an AudioTimeStamp that says when to change the property's value
+ relative to the device's time base. NULL means execute the change
+ immediately.
+ @param inChannel
+ The channel of the property to change where 0 is the master channel.
+ @param inPropertyID
+ The AudioDevicePropertyID of the property to change.
+ @param inPropertyDataSize
+ A UInt32 indicating the size of the buffer pointed to by inData.
+ @param inPropertyData
+ The buffer containing the data to be used to change the property's value.
+ @result An OSStatus indicating success or failure.
+}
+function AudioStreamSetProperty( inStream: AudioStreamID; inWhen: AudioTimeStampPtr; inChannel: UInt32; inPropertyID: AudioDevicePropertyID; inPropertyDataSize: UInt32; inPropertyData: {const} UnivPtr ): OSStatus; external name '_AudioStreamSetProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{!
+ @function AudioStreamAddPropertyListener
+ @abstract Registers the given AudioStreamPropertyListenerProc to receive notifications
+ when the given property changes.
+ @discussion Note that the same functionality is provided by AudioObjectAddPropertyListener
+ in conjunction with AudioObjectPropertyListenerProc.
+ @param inStream
+ The AudioStream with whom to register the listener.
+ @param inChannel
+ The channel of the property to listen to.
+ @param inPropertyID
+ The AudioDevicePropertyID of the property to listen to.
+ @param inProc
+ AudioStreamPropertyListenerProc to call.
+ @param inClientData
+ A pointer to client data that is passed to the listener when it is called.
+ @result An OSStatus indicating success or failure.
+}
+function AudioStreamAddPropertyListener( inStream: AudioStreamID; inChannel: UInt32; inPropertyID: AudioDevicePropertyID; inProc: AudioStreamPropertyListenerProc; inClientData: UnivPtr ): OSStatus; external name '_AudioStreamAddPropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{!
+ @function AudioStreamRemovePropertyListener
+ @abstract Unregisters the given AudioStreamPropertyListenerProc from receiving
+ notifications when the given property changes.
+ @discussion Note that the same functionality is provided by
+ AudioObjectRemovePropertyListener in conjunction with
+ AudioObjectPropertyListenerProc.
+ @param inStream
+ The AudioStream with whom to unregister the listener.
+ @param inChannel
+ The channel of the property to unregister from.
+ @param inPropertyID
+ The AudioDevicePropertyID of the property to stop listening to.
+ @param inProc
+ AudioStreamPropertyListenerProc to unregister.
+ @result An OSStatus indicating success or failure.
+}
+function AudioStreamRemovePropertyListener( inStream: AudioStreamID; inChannel: UInt32; inPropertyID: AudioDevicePropertyID; inProc: AudioStreamPropertyListenerProc ): OSStatus; external name '_AudioStreamRemovePropertyListener';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+//==================================================================================================
+//#pragma mark AudioAggregateDevice Constants
+
+{!
+ @enum AudioAggregateDevice Class Constants
+ @abstract Various constants related to AudioAggregateDevices.
+ @constant kAudioAggregateDeviceClassID
+ The AudioClassID that identifies the AudioAggregateDevice class.
+ @constant kAudioDeviceTransportTypeAggregate
+ The transport type ID (see kAudioDevicePropertyTransportType) for aggregate
+ devices.
+ @constant kAudioDeviceTransportTypeAutoAggregate
+ The transport type ID (see kAudioDevicePropertyTransportType) for
+ automatically generated aggregate devices.
+}
+const
+ kAudioAggregateDeviceClassID = $61616767 (* 'aagg' *);
+ kAudioDeviceTransportTypeAggregate = $67727570 (* 'grup' *);
+ kAudioDeviceTransportTypeAutoAggregate = $66677270 (* 'fgrp' *);
+
+{!
+ @defined kAudioAggregateDeviceUIDKey
+ @discussion The key used in a CFDictionary that describes the composition of an
+ AudioAggregateDevice. The value for this key is a CFString that contains the UID
+ of the AudioAggregateDevice.
+}
+const
+ kAudioAggregateDeviceUIDKey = 'uid';
+
+{!
+ @defined kAudioAggregateDeviceNameKey
+ @discussion The key used in a CFDictionary that describes the composition of an
+ AudioAggregateDevice. The value for this key is a CFString that contains the
+ human readable name of the AudioAggregateDevice.
+}
+const
+ kAudioAggregateDeviceNameKey = 'name';
+
+{!
+ @defined kAudioAggregateDeviceSubDeviceListKey
+ @discussion The key used in a CFDictionary that describes the composition of an
+ AudioAggregateDevice. The value for this key is a CFArray of CFDictionaries that
+ describe each sub-device in the AudioAggregateDevice. The keys for this
+ CFDictionary are defined in the AudioSubDevice section.
+}
+const
+ kAudioAggregateDeviceSubDeviceListKey = 'subdevices';
+
+{!
+ @defined kAudioAggregateDeviceMasterSubDeviceKey
+ @discussion The key used in a CFDictionary that describes the composition of an
+ AudioAggregateDevice. The value for this key is a CFString that contains the
+ UID for the sub-device that is the master time source for the
+ AudioAggregateDevice.
+}
+const
+ kAudioAggregateDeviceMasterSubDeviceKey = 'master';
+
+{!
+ @defined kAudioAggregateDeviceIsPrivateKey
+ @discussion The key used in a CFDictionary that describes the composition of an
+ AudioAggregateDevice. The value for this key is a CFNumber where a value of 0
+ means that the AudioAggregateDevice is to be published to the entire system and
+ a value of 1 means that the AudioAggregateDevice is private to the process that
+ created it. Note that a private AudioAggregateDevice is not persistent across
+ launches of the process that created it. Note that if this key is not present,
+ it implies that the AudioAggregateDevice is published to the entire system.
+}
+const
+ kAudioAggregateDeviceIsPrivateKey = 'private';
+
+//==================================================================================================
+//#pragma mark AudioAggregateDevice Properties
+
+{!
+ @enum AudioAggregateDevice Properties
+ @abstract AudioObjectPropertySelector values that apply to all AudioAggregateDevices.
+ @discussion AudioAggregateDevice is a subclass of AudioDevice.
+ @constant kAudioAggregateDevicePropertyFullSubDeviceList
+ A CFArray of CFStrings that contain the UIDs of all the devices, active or
+ inactive, contained in the AudioAggregateDevice. The order of the items in
+ the array is significant and is used to determine the order of the streams
+ of the AudioAggregateDevice. The caller is responsible for releasing the
+ returned CFObject.
+ @constant kAudioAggregateDevicePropertyActiveSubDeviceList
+ An array of AudioObjectIDs for all the active sub-devices in the aggregate
+ device.
+ @constant kAudioAggregateDevicePropertyComposition
+ A CFDictionary that describes the composition of the AudioAggregateDevice.
+ The keys for this CFDicitionary are defined in the AudioAggregateDevice
+ Constants section.
+}
+const
+ kAudioAggregateDevicePropertyFullSubDeviceList = $67727570 (* 'grup' *);
+ kAudioAggregateDevicePropertyActiveSubDeviceList = $61677270 (* 'agrp' *);
+ kAudioAggregateDevicePropertyComposition = $61636F6D (* 'acom' *);
+
+{!
+ @enum AudioAggregateDevice Properties Implemented via AudioControl objects
+ @abstract AudioObjectPropertySelector values for AudioAggregateDevice properties that are
+ implemented by AudioControl objects.
+ @discussion These properties are also accessible by locating the AudioControl object
+ attached to the AudioAggregateDevice and using that object to access the
+ properties of the control.
+ @constant kAudioAggregateDevicePropertyMasterSubDevice
+ A CFString that contains the UID for the AudioDevice that is currently
+ serving as the master time base of the aggregate device. This property is
+ also implemented by the AudioClockSourceControl on the master element of the
+ global scope of the AudioAggregateDevice.
+}
+const
+ kAudioAggregateDevicePropertyMasterSubDevice = $616D7374 (* 'amst' *);
+
+//==================================================================================================
+//#pragma mark AudioSubDevice Constants
+
+{!
+ @enum AudioSubDevice Class Constants
+ @abstract Various constants related to AudioSubDevices.
+ @constant kAudioSubDeviceClassID
+ The AudioClassID that identifies the AudioSubDevice class.
+}
+const
+ kAudioSubDeviceClassID = $61737562 (* 'asub' *);
+
+{!
+ @enum AudioSubDevice Clock Drift Compensation Methods
+ @abstract Constants that describe the range of values the property
+ kAudioSubDevicePropertyDriftCompensation. It is a continuous range from
+ kAudioSubDeviceDriftCompensationMinQuality to
+ kAudioSubDeviceDriftCompensationMaxQuality, with some commonly used settings
+ called out.
+}
+const
+ kAudioSubDeviceDriftCompensationMinQuality = 0;
+ kAudioSubDeviceDriftCompensationLowQuality = $20;
+ kAudioSubDeviceDriftCompensationMediumQuality = $40;
+ kAudioSubDeviceDriftCompensationHighQuality = $60;
+ kAudioSubDeviceDriftCompensationMaxQuality = $7F;
+
+{!
+ @defined kAudioSubDeviceUIDKey
+ @discussion The key used in a CFDictionary that describes the state of an AudioSubDevice.
+ The value for this key is a CFString that contains the UID for the
+ AudioSubDevice.
+}
+const
+ kAudioSubDeviceUIDKey = 'uid';
+
+//==================================================================================================
+//#pragma mark AudioSubDevice Properties
+
+{!
+ @enum AudioSubDevice Properties
+ @abstract AudioObjectPropertySelector values that apply to all AudioSubDevices.
+ @discussion AudioSubDevice is a subclass of AudioDevice that is collected together with
+ other sub-devices in an AudioAggregateDevice. AudioSubDevice objects do not
+ implement an IO path nor any AudioDevice properties associated with the IO path.
+ They also don't have any streams.
+ @constant kAudioSubDevicePropertyExtraLatency
+ A Float64 indicating the number of sample frames to add to or subtract from
+ the latency compensation used for this AudioSubDevice.
+ @constant kAudioSubDevicePropertyDriftCompensation
+ A UInt32 where a value of 0 indicates that no drift compensation should be
+ done for this AudioSubDevice and a value of 1 means that it should.
+ @constant kAudioSubDevicePropertyDriftCompensationQuality
+ A UInt32 that controls the trade-off between quality and CPU load in the
+ drift compensation. The range of values is from 0 to 128, where the lower
+ the number, the worse the quality but also the less CPU is used to do the
+ compensation.
+}
+const
+ kAudioSubDevicePropertyExtraLatency = $786C7463 (* 'xltc' *);
+ kAudioSubDevicePropertyDriftCompensation = $64726674 (* 'drft' *);
+ kAudioSubDevicePropertyDriftCompensationQuality = $64726671 (* 'drfq' *);
+
+//==================================================================================================
+
+
+{unit CFMachPort}
+{ CFMachPort.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFMachPortRef = ^SInt32; { an opaque 32-bit type }
+
+type
+ CFMachPortContext = record
+ version: CFIndex;
+ info: UnivPtr;
+ retain: function( info: {const} UnivPtr ): UnivPtr;
+ release: procedure( info: {const} UnivPtr );
+ copyDescription: function( info: {const} UnivPtr ): CFStringRef;
+ end;
+ CFMachPortContextPtr = ^CFMachPortContext;
+
+type
+ CFMachPortCallBack = procedure( port: CFMachPortRef; msg: UnivPtr; size: CFIndex; info: UnivPtr );
+ CFMachPortInvalidationCallBack = procedure( port: CFMachPortRef; info: UnivPtr );
+
+function CFMachPortGetTypeID: CFTypeID; external name '_CFMachPortGetTypeID';
+
+function CFMachPortCreate( allocator: CFAllocatorRef; callout: CFMachPortCallBack; var context: CFMachPortContext; var shouldFreeInfo: Boolean ): CFMachPortRef; external name '_CFMachPortCreate';
+function CFMachPortCreateWithPort( allocator: CFAllocatorRef; portNum: mach_port_t; callout: CFMachPortCallBack; var context: CFMachPortContext; var shouldFreeInfo: Boolean ): CFMachPortRef; external name '_CFMachPortCreateWithPort';
+
+function CFMachPortGetPort( port: CFMachPortRef ): mach_port_t; external name '_CFMachPortGetPort';
+procedure CFMachPortGetContext( port: CFMachPortRef; var context: CFMachPortContext ); external name '_CFMachPortGetContext';
+procedure CFMachPortInvalidate( port: CFMachPortRef ); external name '_CFMachPortInvalidate';
+function CFMachPortIsValid( port: CFMachPortRef ): Boolean; external name '_CFMachPortIsValid';
+function CFMachPortGetInvalidationCallBack( port: CFMachPortRef ): CFMachPortInvalidationCallBack; external name '_CFMachPortGetInvalidationCallBack';
+procedure CFMachPortSetInvalidationCallBack( port: CFMachPortRef; callout: CFMachPortInvalidationCallBack ); external name '_CFMachPortSetInvalidationCallBack';
+
+function CFMachPortCreateRunLoopSource( allocator: CFAllocatorRef; port: CFMachPortRef; order: CFIndex ): CFRunLoopSourceRef; external name '_CFMachPortCreateRunLoopSource';
+
+
+{unit CFMessagePort}
+{ CFMessagePort.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFMessagePortRef = ^SInt32; { an opaque 32-bit type }
+
+const
+ kCFMessagePortSuccess = 0;
+ kCFMessagePortSendTimeout = -1;
+ kCFMessagePortReceiveTimeout = -2;
+ kCFMessagePortIsInvalid = -3;
+ kCFMessagePortTransportError = -4;
+
+type
+ CFMessagePortContext = record
+ version: CFIndex;
+ info: UnivPtr;
+ retain: function( info: {const} UnivPtr ): UnivPtr;
+ release: procedure( info: {const} UnivPtr );
+ copyDescription: function( info: {const} UnivPtr ): CFStringRef;
+ end;
+ CFMessagePortContextPtr = ^CFMessagePortContext;
+
+type
+ CFMessagePortCallBack = function( local: CFMessagePortRef; msgid: SInt32; data: CFDataRef; info: UnivPtr ): CFDataRef;
+{ If callout wants to keep a hold of the data past the return of the callout, it must COPY the data. This includes the case where the data is given to some routine which _might_ keep a hold of it; System will release returned CFData. }
+type
+ CFMessagePortInvalidationCallBack = procedure( ms: CFMessagePortRef; info: UnivPtr );
+
+function CFMessagePortGetTypeID: CFTypeID; external name '_CFMessagePortGetTypeID';
+
+function CFMessagePortCreateLocal( allocator: CFAllocatorRef; name: CFStringRef; callout: CFMessagePortCallBack; var context: CFMessagePortContext; var shouldFreeInfo: Boolean ): CFMessagePortRef; external name '_CFMessagePortCreateLocal';
+function CFMessagePortCreateRemote( allocator: CFAllocatorRef; name: CFStringRef ): CFMessagePortRef; external name '_CFMessagePortCreateRemote';
+
+function CFMessagePortIsRemote( ms: CFMessagePortRef ): Boolean; external name '_CFMessagePortIsRemote';
+function CFMessagePortGetName( ms: CFMessagePortRef ): CFStringRef; external name '_CFMessagePortGetName';
+function CFMessagePortSetName( ms: CFMessagePortRef; newName: CFStringRef ): Boolean; external name '_CFMessagePortSetName';
+procedure CFMessagePortGetContext( ms: CFMessagePortRef; var context: CFMessagePortContext ); external name '_CFMessagePortGetContext';
+procedure CFMessagePortInvalidate( ms: CFMessagePortRef ); external name '_CFMessagePortInvalidate';
+function CFMessagePortIsValid( ms: CFMessagePortRef ): Boolean; external name '_CFMessagePortIsValid';
+function CFMessagePortGetInvalidationCallBack( ms: CFMessagePortRef ): CFMessagePortInvalidationCallBack; external name '_CFMessagePortGetInvalidationCallBack';
+procedure CFMessagePortSetInvalidationCallBack( ms: CFMessagePortRef; callout: CFMessagePortInvalidationCallBack ); external name '_CFMessagePortSetInvalidationCallBack';
+
+{ NULL replyMode argument means no return value expected, dont wait for it }
+function CFMessagePortSendRequest( remote: CFMessagePortRef; msgid: SInt32; data: CFDataRef; sendTimeout: CFTimeInterval; rcvTimeout: CFTimeInterval; replyMode: CFStringRef; returnData: CFDataRefPtr ): SInt32; external name '_CFMessagePortSendRequest';
+
+function CFMessagePortCreateRunLoopSource( allocator: CFAllocatorRef; local: CFMessagePortRef; order: CFIndex ): CFRunLoopSourceRef; external name '_CFMessagePortCreateRunLoopSource';
+
+
+{unit CFURL}
+{ CFURL.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFURLPathStyle = SInt32;
+const
+ kCFURLPOSIXPathStyle = 0;
+ kCFURLHFSPathStyle = 1;
+ kCFURLWindowsPathStyle = 2;
+
+type
+ CFURLRef = ^SInt32; { an opaque 32-bit type }
+ CFURLRefPtr = ^CFURLRef;
+
+{ CFURLs are composed of two fundamental pieces - their string, and a }
+{ (possibly NULL) base URL. A relative URL is one in which the string }
+{ by itself does not fully specify the URL (for instance "myDir/image.tiff"); }
+{ an absolute URL is one in which the string does fully specify the URL }
+{ ("file://localhost/myDir/image.tiff"). Absolute URLs always have NULL }
+{ base URLs; however, it is possible for a URL to have a NULL base, and still }
+{ not be absolute. Such a URL has only a relative string, and cannot be }
+{ resolved. Two CFURLs are considered equal if and only if their strings }
+{ are equal and their bases are equal. In other words, }
+{ "file://localhost/myDir/image.tiff" is NOT equal to the URL with relative }
+{ string "myDir/image.tiff" and base URL "file://localhost/". Clients that }
+{ need these less strict form of equality should convert all URLs to their }
+{ absolute form via CFURLCopyAbsoluteURL(), then compare the absolute forms. }
+
+function CFURLGetTypeID: CFTypeID; external name '_CFURLGetTypeID';
+
+{ encoding will be used both to interpret the bytes of URLBytes, and to }
+{ interpret any percent-escapes within the bytes. }
+function CFURLCreateWithBytes( allocator: CFAllocatorRef; URLBytes: UInt8Ptr; length: CFIndex; encoding: CFStringEncoding; baseURL: CFURLRef ): CFURLRef; external name '_CFURLCreateWithBytes';
+
+{ Escapes any character that is not 7-bit ASCII with the byte-code }
+{ for the given encoding. If escapeWhitespace is true, whitespace }
+{ characters (' ', '\t', '\r', '\n') will be escaped also (desirable }
+{ if embedding the URL into a larger text stream like HTML) }
+function CFURLCreateData( allocator: CFAllocatorRef; url: CFURLRef; encoding: CFStringEncoding; escapeWhitespace: Boolean ): CFDataRef; external name '_CFURLCreateData';
+
+{ Any escape sequences in URLString will be interpreted via UTF-8. }
+function CFURLCreateWithString( allocator: CFAllocatorRef; URLString: CFStringRef; baseURL: CFURLRef ): CFURLRef; external name '_CFURLCreateWithString';
+
+{#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+
+{ Create an absolute URL directly, without requiring the extra step }
+{ of calling CFURLCopyAbsoluteURL(). If useCompatibilityMode is }
+{ true, the rules historically used on the web are used to resolve }
+{ relativeString against baseURL - these rules are generally listed }
+{ in the RFC as optional or alternate interpretations. Otherwise, }
+{ the strict rules from the RFC are used. The major differences are }
+{ that in compatibility mode, we are lenient of the scheme appearing }
+{ in relative portion, leading "../" components are removed from the }
+{ final URL's path, and if the relative portion contains only }
+{ resource specifier pieces (query, parameters, and fragment), then }
+{ the last path component of the base URL will not be deleted }
+function CFURLCreateAbsoluteURLWithBytes( alloc: CFAllocatorRef; relativeURLBytes: UInt8Ptr; length: CFIndex; encoding: CFStringEncoding; baseURL: CFURLRef; useCompatibilityMode: Boolean ): CFURLRef; external name '_CFURLCreateAbsoluteURLWithBytes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{#endif}
+
+{ filePath should be the URL's path expressed as a path of the type }
+{ fsType. If filePath is not absolute, the resulting URL will be }
+{ considered relative to the current working directory (evaluated }
+{ at creation time). isDirectory determines whether filePath is }
+{ treated as a directory path when resolving against relative path }
+{ components }
+function CFURLCreateWithFileSystemPath( allocator: CFAllocatorRef; filePath: CFStringRef; pathStyle: CFURLPathStyle; isDirectory: Boolean ): CFURLRef; external name '_CFURLCreateWithFileSystemPath';
+
+function CFURLCreateFromFileSystemRepresentation( allocator: CFAllocatorRef; buffer: CStringPtr; bufLen: CFIndex; isDirectory: Boolean ): CFURLRef; external name '_CFURLCreateFromFileSystemRepresentation';
+
+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 }
+{ the file system in question to avoid failures for insufficiently }
+{ large buffers. If resolveAgainstBase is true, the url's relative }
+{ portion is resolved against its base before the path is computed. }
+{ Returns success or failure. }
+function CFURLGetFileSystemRepresentation( url: CFURLRef; resolveAgainstBase: Boolean; buffer: CStringPtr; maxBufLen: CFIndex ): Boolean; external name '_CFURLGetFileSystemRepresentation';
+
+{ Creates a new URL by resolving the relative portion of relativeURL against its base. }
+function CFURLCopyAbsoluteURL( relativeURL: CFURLRef ): CFURLRef; external name '_CFURLCopyAbsoluteURL';
+
+{ Returns the URL's string. }
+function CFURLGetString( anURL: CFURLRef ): CFStringRef; external name '_CFURLGetString';
+
+{ Returns the base URL if it exists }
+function CFURLGetBaseURL( anURL: CFURLRef ): CFURLRef; external name '_CFURLGetBaseURL';
+
+{
+All URLs can be broken into two pieces - the scheme (preceding the
+first colon) and the resource specifier (following the first colon).
+Most URLs are also "standard" URLs conforming to RFC 1808 (available
+from www.w3c.org). This category includes URLs of the file, http,
+https, and ftp schemes, to name a few. Standard URLs start the
+resource specifier with two slashes ("//"), and can be broken into
+four distinct pieces - the scheme, the net location, the path, and
+further resource specifiers (typically an optional parameter, query,
+and/or fragment). The net location appears immediately following
+the two slashes and goes up to the next slash; it's format is
+scheme-specific, but is usually composed of some or all of a username,
+password, host name, and port. The path is a series of path components
+separated by slashes; if the net location is present, the path always
+begins with a slash. Standard URLs can be relative to another URL,
+in which case at least the scheme and possibly other pieces as well
+come from the base URL (see RFC 1808 for precise details when resolving
+a relative URL against its base). The full URL is therefore
+
+<scheme> "://" <net location> <path, always starting with slash> <add'l resource specifiers>
+
+If a given CFURL can be decomposed (that is, conforms to RFC 1808), you
+can ask for each of the four basic pieces (scheme, net location, path,
+and resource specifer) separately, as well as for its base URL. The
+basic pieces are returned with any percent escape sequences still in
+place (although note that the scheme may not legally include any
+percent escapes); this is to allow the caller to distinguish between
+percent sequences that may have syntactic meaning if replaced by the
+character being escaped (for instance, a '/' in a path component).
+Since only the individual schemes know which characters are
+syntactically significant, CFURL cannot safely replace any percent
+escape sequences. However, you can use
+CFURLCreateStringByReplacingPercentEscapes() to create a new string with
+the percent escapes removed; see below.
+
+If a given CFURL can not be decomposed, you can ask for its scheme and its
+resource specifier; asking it for its net location or path will return NULL.
+
+To get more refined information about the components of a decomposable
+CFURL, you may ask for more specific pieces of the URL, expressed with
+the percent escapes removed. The available functions are CFURLCopyHostName(),
+CFURLGetPortNumber() (returns an Int32), CFURLCopyUserName(),
+CFURLCopyPassword(), CFURLCopyQuery(), CFURLCopyParameters(), and
+CFURLCopyFragment(). Because the parameters, query, and fragment of an
+URL may contain scheme-specific syntaxes, these methods take a second
+argument, giving a list of characters which should NOT be replaced if
+percent escaped. For instance, the ftp parameter syntax gives simple
+key-value pairs as "<key>=<value>;" Clearly if a key or value includes
+either '=' or ';', it must be escaped to avoid corrupting the meaning of
+the parameters, so the caller may request the parameter string as
+
+CFStringRef myParams = CFURLCopyParameters(ftpURL, CFSTR("=;%"));
+
+requesting that all percent escape sequences be replaced by the represented
+characters, except for escaped '=', '%' or ';' characters. Pass the empty
+string (CFSTR("")) to request that all percent escapes be replaced, or NULL
+to request that none be.
+}
+
+{ Returns true if anURL conforms to RFC 1808 }
+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';
+
+{ NULL if CFURLCanBeDecomposed(anURL) is false; also does not resolve the URL }
+{ against its base. See also CFURLCopyAbsoluteURL(). Note that, strictly }
+{ speaking, any leading '/' is not considered part of the URL's path, although }
+{ its presence or absence determines whether the path is absolute. }
+{ CFURLCopyPath()'s return value includes any leading slash (giving the path }
+{ the normal POSIX appearance); CFURLCopyStrictPath()'s return value omits any }
+{ leading slash, and uses isAbsolute to report whether the URL's path is absolute. }
+
+{ CFURLCopyFileSystemPath() returns the URL's path as a file system path for the }
+{ given path style. All percent escape sequences are replaced. The URL is not }
+{ resolved against its base before computing the path. }
+function CFURLCopyPath( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyPath';
+
+function CFURLCopyStrictPath( anURL: CFURLRef; var isAbsolute: Boolean ): CFStringRef; external name '_CFURLCopyStrictPath';
+
+function CFURLCopyFileSystemPath( anURL: CFURLRef; pathStyle: CFURLPathStyle ): CFStringRef; external name '_CFURLCopyFileSystemPath';
+
+{ Returns whether anURL's path represents a directory }
+{ (true returned) or a simple file (false returned) }
+function CFURLHasDirectoryPath( anURL: CFURLRef ): Boolean; external name '_CFURLHasDirectoryPath';
+
+{ 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 CFURLCopyHostName( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyHostName';
+
+function CFURLGetPortNumber( anURL: CFURLRef ): SInt32; external name '_CFURLGetPortNumber'; { Returns -1 if no port number is specified }
+
+function CFURLCopyUserName( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyUserName';
+
+function CFURLCopyPassword( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyPassword';
+
+{ These remove all percent escape sequences except those for }
+{ characters in charactersToLeaveEscaped. If charactersToLeaveEscaped }
+{ is empty (""), all percent escape sequences are replaced by their }
+{ corresponding characters. If charactersToLeaveEscaped is NULL, }
+{ then no escape sequences are removed at all }
+function CFURLCopyParameterString( anURL: CFURLRef; charactersToLeaveEscaped: CFStringRef ): CFStringRef; external name '_CFURLCopyParameterString';
+
+function CFURLCopyQueryString( anURL: CFURLRef; charactersToLeaveEscaped: CFStringRef ): CFStringRef; external name '_CFURLCopyQueryString';
+
+function CFURLCopyFragment( anURL: CFURLRef; charactersToLeaveEscaped: CFStringRef ): CFStringRef; external name '_CFURLCopyFragment';
+
+function CFURLCopyLastPathComponent( url: CFURLRef ): CFStringRef; external name '_CFURLCopyLastPathComponent';
+
+function CFURLCopyPathExtension( url: CFURLRef ): CFStringRef; external name '_CFURLCopyPathExtension';
+
+{ These functions all treat the base URL of the supplied url as }
+{ invariant. In other words, the URL returned will always have }
+{ the same base as the URL supplied as an argument. }
+
+function CFURLCreateCopyAppendingPathComponent( allocator: CFAllocatorRef; url: CFURLRef; pathComponent: CFStringRef; isDirectory: Boolean ): CFURLRef; external name '_CFURLCreateCopyAppendingPathComponent';
+
+function CFURLCreateCopyDeletingLastPathComponent( allocator: CFAllocatorRef; url: CFURLRef ): CFURLRef; external name '_CFURLCreateCopyDeletingLastPathComponent';
+
+function CFURLCreateCopyAppendingPathExtension( allocator: CFAllocatorRef; url: CFURLRef; extension: CFStringRef ): CFURLRef; external name '_CFURLCreateCopyAppendingPathExtension';
+
+function CFURLCreateCopyDeletingPathExtension( allocator: CFAllocatorRef; url: CFURLRef ): CFURLRef; external name '_CFURLCreateCopyDeletingPathExtension';
+
+{#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+{ 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 }
+{ 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';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+type
+ CFURLComponentType = SInt32;
+const
+ kCFURLComponentScheme = 1;
+ kCFURLComponentNetLocation = 2;
+ kCFURLComponentPath = 3;
+ kCFURLComponentResourceSpecifier = 4;
+
+ kCFURLComponentUser = 5;
+ kCFURLComponentPassword = 6;
+ kCFURLComponentUserInfo = 7;
+ kCFURLComponentHost = 8;
+ kCFURLComponentPort = 9;
+ 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!
+
+If non-NULL, rangeIncludingSeparators gives the range of component
+including the sequences that separate component from the previous and
+next components. If there is no previous or next component, that end of
+rangeIncludingSeparators will match the range of the component itself.
+If url does not contain the given component type, (kCFNotFound, 0) is
+returned, and rangeIncludingSeparators is set to the location where the
+component would be inserted. Some examples -
+
+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)
+resource specifier (kCFNotFound, 0) (29, 0)
+user (kCFNotFound, 0) (7, 0)
+password (kCFNotFound, 0) (7, 0)
+user info (kCFNotFound, 0) (7, 0)
+host (7, 13) (4, 16)
+port (kCFNotFound, 0) (20, 0)
+parameter (kCFNotFound, 0) (29, 0)
+query (kCFNotFound, 0) (29, 0)
+fragment (kCFNotFound, 0) (29, 0)
+
+
+For the URL ./relPath/file.html#fragment
+
+Component returned range rangeIncludingSeparators
+scheme (kCFNotFound, 0) (0, 0)
+net location (kCFNotFound, 0) (0, 0)
+path (0, 19) (0, 20)
+resource specifier (20, 8) (19, 9)
+user (kCFNotFound, 0) (0, 0)
+password (kCFNotFound, 0) (0, 0)
+user info (kCFNotFound, 0) (0, 0)
+host (kCFNotFound, 0) (0, 0)
+port (kCFNotFound, 0) (0, 0)
+parameter (kCFNotFound, 0) (19, 0)
+query (kCFNotFound, 0) (19, 0)
+fragment (20, 8) (19, 9)
+
+
+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)
+resource specifier (47, 21) (46, 22)
+user (9, 4) (6, 8)
+password (14, 4) (13, 6)
+user info (9, 9) (6, 13)
+host (19, 4) (18, 6)
+port (24, 1) (23, 2)
+parameter (47, 6) (46, 8)
+query (54, 5) (53, 7)
+fragment (60, 8) (59, 9)
+}
+function CFURLGetByteRangeForComponent( url: CFURLRef; component: CFURLComponentType; var rangeIncludingSeparators: CFRange ): CFRange; external name '_CFURLGetByteRangeForComponent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{#endif}
+
+{ Returns a string with any percent escape sequences that do NOT }
+{ correspond to characters in charactersToLeaveEscaped with their }
+{ equivalent. Returns NULL on failure (if an invalid percent sequence }
+{ is encountered), or the original string (retained) if no characters }
+{ need to be replaced. Pass NULL to request that no percent escapes be }
+{ replaced, or the empty string (CFSTR("")) to request that all percent }
+{ escapes be replaced. Uses UTF8 to interpret percent escapes. }
+function CFURLCreateStringByReplacingPercentEscapes( allocator: CFAllocatorRef; originalString: CFStringRef; charactersToLeaveEscaped: CFStringRef ): CFStringRef; external name '_CFURLCreateStringByReplacingPercentEscapes';
+
+{#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+{ As above, but allows you to specify the encoding to use when interpreting percent escapes }
+function CFURLCreateStringByReplacingPercentEscapesUsingEncoding( allocator: CFAllocatorRef; origString: CFStringRef; charsToLeaveEscaped: CFStringRef; encoding: CFStringEncoding ): CFStringRef; external name '_CFURLCreateStringByReplacingPercentEscapesUsingEncoding';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{#endif}
+
+{ Creates a copy or originalString, replacing certain characters with }
+{ the equivalent percent escape sequence based on the encoding specified. }
+{ If the originalString does not need to be modified (no percent escape }
+{ sequences are missing), may retain and return originalString. }
+{ If you are uncertain of the correct encoding, you should use UTF-8, }
+{ which is the encoding designated by RFC 2396 as the correct encoding }
+{ for use in URLs. The characters so escaped are all characters that }
+{ are not legal URL characters (based on RFC 2396), plus any characters }
+{ in legalURLCharactersToBeEscaped, less any characters in }
+{ charactersToLeaveUnescaped. To simply correct any non-URL characters }
+{ in an otherwise correct URL string, do: }
+
+{ newString = CFURLCreateStringByAddingPercentEscapes(NULL, origString, NULL, NULL, kCFStringEncodingUTF8); }
+function CFURLCreateStringByAddingPercentEscapes( allocator: CFAllocatorRef; originalString: CFStringRef; charactersToLeaveUnescaped: CFStringRef; legalURLCharactersToBeEscaped: CFStringRef; encoding: CFStringEncoding ): CFStringRef; external name '_CFURLCreateStringByAddingPercentEscapes';
+
+{#ifndef CF_OPEN_SOURCE}
+
+function CFURLCreateFromFSRef( allocator: CFAllocatorRef; const (*var*) fsRef_: FSRef ): CFURLRef; external name '_CFURLCreateFromFSRef';
+
+function CFURLGetFSRef( url: CFURLRef; var fsRef_: FSRef ): Boolean; external name '_CFURLGetFSRef';
+
+{#endif} // !CF_OPEN_SOURCE
+
+
+{unit CFURLAccess}
+{ CFURLAccess.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ Attempts to read the data and properties for the given URL. If
+only interested in one of the resourceData and properties, pass NULL
+for the other. If properties is non-NULL and desiredProperties is
+NULL, then all properties are fetched. Returns success or failure;
+note that as much work as possible is done even if false is returned.
+So for instance if one property is not available, the others are
+fetched anyway. errorCode is set to 0 on success, and some other
+value on failure. If non-NULL, it is the caller 's responsibility
+to release resourceData and properties.
+
+ Apple reserves for its use all negative error code values; these
+values represent errors common to any scheme. Scheme-specific error
+codes should be positive, non-zero, and should be used only if one of
+the predefined Apple error codes does not apply. Error codes should
+be publicized and documented with the scheme-specific properties.
+
+NOTE: When asking for the resource data, this call will allocate the entire
+resource in memory. This can be very expensive, depending on the size of the
+resource (file). Please use CFStream or other techniques if you are downloading
+large files.
+
+}
+function CFURLCreateDataAndPropertiesFromResource( alloc: CFAllocatorRef; url: CFURLRef; resourceData: CFDataRefPtr; properties: CFDictionaryRefPtr; desiredProperties: CFArrayRef; var errorCode: SInt32 ): Boolean; external name '_CFURLCreateDataAndPropertiesFromResource';
+
+{ Attempts to write the given data and properties to the given URL.
+If dataToWrite is NULL, only properties are written out (use
+CFURLDestroyResource() to delete a resource). Properties not present
+in propertiesToWrite are left unchanged, hence if propertiesToWrite
+is NULL or empty, the URL's properties are not changed at all.
+Returns success or failure; errorCode is set as for
+CFURLCreateDataAndPropertiesFromResource(), above.
+}
+function CFURLWriteDataAndPropertiesToResource( url: CFURLRef; dataToWrite: CFDataRef; propertiesToWrite: CFDictionaryRef; var errorCode: SInt32 ): Boolean; external name '_CFURLWriteDataAndPropertiesToResource';
+
+{ Destroys the resource indicated by url. }
+{ Returns success or failure; errorCode set as above. }
+function CFURLDestroyResource( url: CFURLRef; var errorCode: SInt32 ): Boolean; external name '_CFURLDestroyResource';
+
+{ Convenience method which calls through to CFURLCreateDataAndPropertiesFromResource(). }
+{ Returns NULL on error and sets errorCode accordingly. }
+function CFURLCreatePropertyFromResource( alloc: CFAllocatorRef; url: CFURLRef; proprty: CFStringRef; var errorCode: SInt32 ): CFTypeRef; external name '_CFURLCreatePropertyFromResource';
+
+{ Common error codes; this list is expected to grow }
+type
+ CFURLError = SInt32;
+const
+ kCFURLUnknownError = -10;
+ kCFURLUnknownSchemeError = -11;
+ kCFURLResourceNotFoundError = -12;
+ kCFURLResourceAccessViolationError = -13;
+ kCFURLRemoteHostUnavailableError = -14;
+ kCFURLImproperArgumentsError = -15;
+ kCFURLUnknownPropertyKeyError = -16;
+ kCFURLPropertyKeyUnavailableError = -17;
+ kCFURLTimeoutError = -18;
+
+{ Property keys }
+
+var kCFURLFileExists: CFStringRef; external name '_kCFURLFileExists'; (* attribute const *)
+var kCFURLFileDirectoryContents: CFStringRef; external name '_kCFURLFileDirectoryContents'; (* attribute const *)
+var kCFURLFileLength: CFStringRef; external name '_kCFURLFileLength'; (* attribute const *)
+var kCFURLFileLastModificationTime: CFStringRef; external name '_kCFURLFileLastModificationTime'; (* attribute const *)
+var kCFURLFilePOSIXMode: CFStringRef; external name '_kCFURLFilePOSIXMode'; (* attribute const *)
+var kCFURLFileOwnerID: CFStringRef; external name '_kCFURLFileOwnerID'; (* attribute const *)
+var kCFURLHTTPStatusCode: CFStringRef; external name '_kCFURLHTTPStatusCode'; (* attribute const *)
+var kCFURLHTTPStatusLine: CFStringRef; external name '_kCFURLHTTPStatusLine'; (* attribute const *)
+
+{ The value of kCFURLFileExists is a CFBoolean }
+{ The value of kCFURLFileDirectoryContents is a CFArray containing CFURLs. An empty array means the directory exists, but is empty }
+{ The value of kCFURLFileLength is a CFNumber giving the file's length in bytes }
+{ The value of kCFURLFileLastModificationTime is a CFDate }
+{ The value of kCFURLFilePOSIXMode is a CFNumber as given in stat.h }
+{ The value of kCFURLFileOwnerID is a CFNumber representing the owner's uid }
+
+{ Properties for the http: scheme. Except for the common error codes, above, errorCode will be set to the HTTP response status code upon failure. Any HTTP header name can also be used as a property }
+{ The value of kCFURLHTTPStatusCode is a CFNumber }
+{ The value of kCFURLHTTPStatusLine is a CFString }
+
+
+{unit CFUserNotification}
+{ CFUserNotification.h
+ Copyright (c) 2000-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFUserNotificationRef = ^SInt32; { an opaque 32-bit type }
+
+{ 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
+at the System framework level, described in UNCUserNotification.h.
+
+The contents of the notification can include a header, a message, textfields,
+a popup button, radio buttons or checkboxes, a progress indicator, and up to
+three ordinary buttons. All of these items are optional, but a default
+button will be supplied even if not specified unless the
+kCFUserNotificationNoDefaultButtonFlag is set.
+
+The contents of the notification are specified in the dictionary used to
+create the notification, whose keys should be taken from the list of constants
+below, and whose values should be either strings or arrays of strings
+(except for kCFUserNotificationProgressIndicatorValueKey, in which case the
+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
+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,
+using a run loop source. CFUserNotificationReceiveResponse has a timeout
+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 );
+
+function CFUserNotificationGetTypeID: CFTypeID; external name '_CFUserNotificationGetTypeID';
+
+function CFUserNotificationCreate( allocator: CFAllocatorRef; timeout: CFTimeInterval; flags: CFOptionFlags; var error: SInt32; dictionary: CFDictionaryRef ): CFUserNotificationRef; external name '_CFUserNotificationCreate';
+
+function CFUserNotificationReceiveResponse( userNotification: CFUserNotificationRef; timeout: CFTimeInterval; var responseFlags: CFOptionFlags ): SInt32; external name '_CFUserNotificationReceiveResponse';
+
+function CFUserNotificationGetResponseValue( userNotification: CFUserNotificationRef; key: CFStringRef; idx: CFIndex ): CFStringRef; external name '_CFUserNotificationGetResponseValue';
+
+function CFUserNotificationGetResponseDictionary( userNotification: CFUserNotificationRef ): CFDictionaryRef; external name '_CFUserNotificationGetResponseDictionary';
+
+function CFUserNotificationUpdate( userNotification: CFUserNotificationRef; timeout: CFTimeInterval; flags: CFOptionFlags; dictionary: CFDictionaryRef ): SInt32; external name '_CFUserNotificationUpdate';
+
+function CFUserNotificationCancel( userNotification: CFUserNotificationRef ): SInt32; external name '_CFUserNotificationCancel';
+
+function CFUserNotificationCreateRunLoopSource( allocator: CFAllocatorRef; userNotification: CFUserNotificationRef; callout: CFUserNotificationCallBack; order: CFIndex ): CFRunLoopSourceRef; external name '_CFUserNotificationCreateRunLoopSource';
+
+{ 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';
+
+
+{ Flags }
+
+const
+ kCFUserNotificationStopAlertLevel = 0;
+ kCFUserNotificationNoteAlertLevel = 1;
+ kCFUserNotificationCautionAlertLevel = 2;
+ kCFUserNotificationPlainAlertLevel = 3;
+
+const
+ kCFUserNotificationDefaultResponse = 0;
+ kCFUserNotificationAlternateResponse = 1;
+ kCFUserNotificationOtherResponse = 2;
+ kCFUserNotificationCancelResponse = 3;
+
+const
+ kCFUserNotificationNoDefaultButtonFlag = 1 shl 5;
+ kCFUserNotificationUseRadioButtonsFlag = 1 shl 6;
+
+function CFUserNotificationCheckBoxChecked( i: CFIndex ): CFOptionFlags; inline;
+function CFUserNotificationSecureTextField( i: CFIndex ): CFOptionFlags; inline;
+function CFUserNotificationPopUpSelection( n: CFIndex ): CFOptionFlags; inline;
+
+
+{ Keys }
+
+var kCFUserNotificationIconURLKey: CFStringRef; external name '_kCFUserNotificationIconURLKey'; (* attribute const *)
+
+var kCFUserNotificationSoundURLKey: CFStringRef; external name '_kCFUserNotificationSoundURLKey'; (* attribute const *)
+
+var kCFUserNotificationLocalizationURLKey: CFStringRef; external name '_kCFUserNotificationLocalizationURLKey'; (* attribute const *)
+
+var kCFUserNotificationAlertHeaderKey: CFStringRef; external name '_kCFUserNotificationAlertHeaderKey'; (* attribute const *)
+
+var kCFUserNotificationAlertMessageKey: CFStringRef; external name '_kCFUserNotificationAlertMessageKey'; (* attribute const *)
+
+var kCFUserNotificationDefaultButtonTitleKey: CFStringRef; external name '_kCFUserNotificationDefaultButtonTitleKey'; (* attribute const *)
+
+var kCFUserNotificationAlternateButtonTitleKey: CFStringRef; external name '_kCFUserNotificationAlternateButtonTitleKey'; (* attribute const *)
+
+var kCFUserNotificationOtherButtonTitleKey: CFStringRef; external name '_kCFUserNotificationOtherButtonTitleKey'; (* attribute const *)
+
+var kCFUserNotificationProgressIndicatorValueKey: CFStringRef; external name '_kCFUserNotificationProgressIndicatorValueKey'; (* attribute const *)
+
+var kCFUserNotificationPopUpTitlesKey: CFStringRef; external name '_kCFUserNotificationPopUpTitlesKey'; (* attribute const *)
+
+var kCFUserNotificationTextFieldTitlesKey: CFStringRef; external name '_kCFUserNotificationTextFieldTitlesKey'; (* attribute const *)
+
+var kCFUserNotificationCheckBoxTitlesKey: CFStringRef; external name '_kCFUserNotificationCheckBoxTitlesKey'; (* attribute const *)
+
+var kCFUserNotificationTextFieldValuesKey: CFStringRef; external name '_kCFUserNotificationTextFieldValuesKey'; (* attribute const *)
+
+{#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+var kCFUserNotificationPopUpSelectionKey: CFStringRef; external name '_kCFUserNotificationPopUpSelectionKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{#endif}
+
+
+{unit CFXMLNode}
+{ CFXMLNode.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+const
+ kCFXMLNodeCurrentVersion = 1;
+
+type
+ CFXMLNodeRef = ^SInt32; { an opaque 32-bit type }
+ CFXMLNodeRefPtr = ^CFXMLNodeRef;
+ CFXMLTreeRef = CFTreeRef;
+
+{ An CFXMLNode describes an individual XML construct - like a tag, or a comment, or a string
+ of character data. Each CFXMLNode contains 3 main pieces of information - the node's type,
+ the data string, and a pointer to an additional data structure. The node's type ID is an enum
+ value of type CFXMLNodeTypeID. The data string is always a CFStringRef; the meaning of the
+ string is dependent on the node's type ID. The format of the additional data is also dependent
+ on the node's type; in general, there is a custom structure for each type that requires
+ additional data. See below for the mapping from type ID to meaning of the data string and
+ structure of the additional data. Note that these structures are versioned, and may change
+ as the parser changes. The current version can always be identified by kCFXMLNodeCurrentVersion;
+ earlier versions can be identified and used by passing earlier values for the version number
+ (although the older structures would have been removed from the header).
+
+ An CFXMLTree is simply a CFTree whose context data is known to be an CFXMLNodeRef. As
+ such, an CFXMLTree can be used to represent an entire XML document; the CFTree
+ provides the tree structure of the document, while the CFXMLNodes identify and describe
+ the nodes of the tree. An XML document can be parsed to a CFXMLTree, and a CFXMLTree
+ can generate the data for the equivalent XML document - see CFXMLParser.h for more
+ information on parsing XML.
+ }
+
+{ Type codes for the different possible XML nodes; this list may grow.}
+type
+ CFXMLNodeTypeCode = SInt32;
+const
+ kCFXMLNodeTypeDocument = 1;
+ kCFXMLNodeTypeElement = 2;
+ kCFXMLNodeTypeAttribute = 3;
+ kCFXMLNodeTypeProcessingInstruction = 4;
+ kCFXMLNodeTypeComment = 5;
+ kCFXMLNodeTypeText = 6;
+ kCFXMLNodeTypeCDATASection = 7;
+ kCFXMLNodeTypeDocumentFragment = 8;
+ kCFXMLNodeTypeEntity = 9;
+ kCFXMLNodeTypeEntityReference = 10;
+ kCFXMLNodeTypeDocumentType = 11;
+ kCFXMLNodeTypeWhitespace = 12;
+ kCFXMLNodeTypeNotation = 13;
+ kCFXMLNodeTypeElementTypeDeclaration = 14;
+ kCFXMLNodeTypeAttributeListDeclaration = 15;
+
+type
+ CFXMLElementInfoPtr = ^CFXMLElementInfo;
+ CFXMLElementInfo = record
+ attributes: CFDictionaryRef;
+ attributeOrder: CFArrayRef;
+ isEmpty: Boolean;
+ _reserved1,_reserved2,_reserved3: SInt8;
+ end;
+
+type
+ CFXMLProcessingInstructionInfoPtr = ^CFXMLProcessingInstructionInfo;
+ CFXMLProcessingInstructionInfo = record
+ dataString: CFStringRef;
+ end;
+
+type
+ CFXMLDocumentInfoPtr = ^CFXMLDocumentInfo;
+ CFXMLDocumentInfo = record
+ sourceURL: CFURLRef;
+ encoding: CFStringEncoding;
+ end;
+
+type
+ CFXMLExternalIDPtr = ^CFXMLExternalID;
+ CFXMLExternalID = record
+ systemID: CFURLRef;
+ publicID: CFStringRef;
+ end;
+
+type
+ CFXMLDocumentTypeInfoPtr = ^CFXMLDocumentTypeInfo;
+ CFXMLDocumentTypeInfo = record
+ externalID: CFXMLExternalID;
+ end;
+
+type
+ CFXMLNotationInfoPtr = ^CFXMLNotationInfo;
+ CFXMLNotationInfo = record
+ externalID: CFXMLExternalID;
+ end;
+
+type
+ CFXMLElementTypeDeclarationInfoPtr = ^CFXMLElementTypeDeclarationInfo;
+ CFXMLElementTypeDeclarationInfo = record
+{ This is expected to change in future versions }
+ contentDescription: CFStringRef;
+ end;
+
+type
+ CFXMLAttributeDeclarationInfoPtr = ^CFXMLAttributeDeclarationInfo;
+ CFXMLAttributeDeclarationInfo = record
+{ This is expected to change in future versions }
+ attributeName: CFStringRef;
+ typeString: CFStringRef;
+ defaultString: CFStringRef;
+ end;
+
+type
+ CFXMLAttributeListDeclarationInfoPtr = ^CFXMLAttributeListDeclarationInfo;
+ CFXMLAttributeListDeclarationInfo = record
+ numberOfAttributes: CFIndex;
+ attributes: CFXMLAttributeDeclarationInfoPtr;
+ end;
+
+type
+ CFXMLEntityTypeCode = SInt32;
+const
+ kCFXMLEntityTypeParameter = 0; { Implies parsed, internal }
+ kCFXMLEntityTypeParsedInternal = 1;
+ kCFXMLEntityTypeParsedExternal = 2;
+ kCFXMLEntityTypeUnparsed = 3;
+ kCFXMLEntityTypeCharacter = 4;
+
+type
+ CFXMLEntityInfoPtr = ^CFXMLEntityInfo;
+ CFXMLEntityInfo = record
+ entityType: CFXMLEntityTypeCode;
+ replacementText: CFStringRef; { NULL if entityType is external or unparsed }
+ entityID: CFXMLExternalID; { entityID.systemID will be NULL if entityType is internal }
+ notationName: CFStringRef; { NULL if entityType is parsed }
+ end;
+
+type
+ CFXMLEntityReferenceInfoPtr = ^CFXMLEntityReferenceInfo;
+ CFXMLEntityReferenceInfo = record
+ entityType: CFXMLEntityTypeCode;
+ end;
+
+{
+ dataTypeCode meaning of dataString format of infoPtr
+ =========== ===================== =================
+ kCFXMLNodeTypeDocument <currently unused> CFXMLDocumentInfo *
+ kCFXMLNodeTypeElement tag name CFXMLElementInfo *
+ kCFXMLNodeTypeAttribute <currently unused> <currently unused>
+ kCFXMLNodeTypeProcessingInstruction name of the target CFXMLProcessingInstructionInfo *
+ kCFXMLNodeTypeComment text of the comment NULL
+ kCFXMLNodeTypeText the text's contents NULL
+ kCFXMLNodeTypeCDATASection text of the CDATA NULL
+ kCFXMLNodeTypeDocumentFragment <currently unused> <currently unused>
+ kCFXMLNodeTypeEntity name of the entity CFXMLEntityInfo *
+ kCFXMLNodeTypeEntityReference name of the referenced entity CFXMLEntityReferenceInfo *
+ kCFXMLNodeTypeDocumentType name given as top-level element CFXMLDocumentTypeInfo *
+ kCFXMLNodeTypeWhitespace text of the whitespace NULL
+ kCFXMLNodeTypeNotation notation name CFXMLNotationInfo *
+ kCFXMLNodeTypeElementTypeDeclaration tag name CFXMLElementTypeDeclarationInfo *
+ kCFXMLNodeTypeAttributeListDeclaration tag name CFXMLAttributeListDeclarationInfo *
+}
+
+function CFXMLNodeGetTypeID: CFTypeID; external name '_CFXMLNodeGetTypeID';
+
+{ Creates a new node based on xmlType, dataString, and additionalInfoPtr. version (together with xmlType) determines the expected structure of additionalInfoPtr }
+function CFXMLNodeCreate( alloc: CFAllocatorRef; xmlType: CFXMLNodeTypeCode; dataString: CFStringRef; additionalInfoPtr: {const} UnivPtr; version: CFIndex ): CFXMLNodeRef; external name '_CFXMLNodeCreate';
+
+{ Creates a copy of origNode (which may not be NULL). }
+function CFXMLNodeCreateCopy( alloc: CFAllocatorRef; origNode: CFXMLNodeRef ): CFXMLNodeRef; external name '_CFXMLNodeCreateCopy';
+
+function CFXMLNodeGetTypeCode( node: CFXMLNodeRef ): CFXMLNodeTypeCode; external name '_CFXMLNodeGetTypeCode';
+
+function CFXMLNodeGetString( node: CFXMLNodeRef ): CFStringRef; external name '_CFXMLNodeGetString';
+
+function CFXMLNodeGetInfoPtr( node: CFXMLNodeRef ): UnivPtr; external name '_CFXMLNodeGetInfoPtr';
+
+function CFXMLNodeGetVersion( node: CFXMLNodeRef ): CFIndex; external name '_CFXMLNodeGetVersion';
+
+{ CFXMLTreeRef }
+
+{ Creates a childless, parentless tree from node }
+function CFXMLTreeCreateWithNode( allocator: CFAllocatorRef; node: CFXMLNodeRef ): CFXMLTreeRef; external name '_CFXMLTreeCreateWithNode';
+
+{ Extracts and returns the node stored in xmlTree }
+function CFXMLTreeGetNode( xmlTree: CFXMLTreeRef ): CFXMLNodeRef; external name '_CFXMLTreeGetNode';
+
+
+{unit CFXMLParser}
+{ CFXMLParser.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFXMLParserRef = ^SInt32; { an opaque 32-bit type }
+ CFXMLParserRefPtr = ^CFXMLParserRef;
+{ These are the various options you can configure the parser with. These are
+ chosen such that an option flag of 0 (kCFXMLParserNoOptions) leaves the XML
+ as "intact" as possible (reports all structures; performs no replacements).
+ Hence, to make the parser do the most work, returning only the pure element
+ tree, set the option flag to kCFXMLParserAllOptions.
+
+kCFXMLParserValidateDocument -
+ validate the document against its grammar from the DTD, reporting any errors.
+ Currently not supported.
+
+kCFXMLParserSkipMetaData -
+ silently skip over metadata constructs (the DTD and comments)
+
+kCFXMLParserReplacePhysicalEntities -
+ replace declared entities like &lt;. Note that other than the 5 predefined
+ entities (lt, gt, quot, amp, apos), these must be defined in the DTD.
+ Currently not supported.
+
+kCFXMLParserSkipWhitespace -
+ skip over all whitespace that does not abut non-whitespace character data.
+ In other words, given <foo> <bar> blah </bar></foo>, the whitespace between
+ foo's open tag and bar's open tag would be suppressed, but the whitespace
+ around blah would be preserved.
+
+kCFXMLParserAddImpliedAttributes -
+ where the DTD specifies implied attribute-value pairs for a particular element,
+ add those pairs to any occurances of the element in the element tree.
+ Currently not supported.
+}
+
+type
+ CFXMLParserOptions = SInt32;
+const
+ kCFXMLParserValidateDocument = 1 shl 0;
+ kCFXMLParserSkipMetaData = 1 shl 1;
+ kCFXMLParserReplacePhysicalEntities = 1 shl 2;
+ kCFXMLParserSkipWhitespace = 1 shl 3;
+ kCFXMLParserResolveExternalEntities = 1 shl 4;
+ kCFXMLParserAddImpliedAttributes = 1 shl 5;
+ kCFXMLParserAllOptions = $00FFFFFF;
+ kCFXMLParserNoOptions = 0;
+
+{ This list is expected to grow }
+type
+ CFXMLParserStatusCode = SInt32;
+const
+ kCFXMLStatusParseNotBegun = -2;
+ kCFXMLStatusParseInProgress = -1;
+ kCFXMLStatusParseSuccessful = 0;
+ kCFXMLErrorUnexpectedEOF = 1;
+ kCFXMLErrorUnknownEncoding = 2;
+ kCFXMLErrorEncodingConversionFailure = 3;
+ kCFXMLErrorMalformedProcessingInstruction = 4;
+ kCFXMLErrorMalformedDTD = 5;
+ kCFXMLErrorMalformedName = 6;
+ kCFXMLErrorMalformedCDSect = 7;
+ kCFXMLErrorMalformedCloseTag = 8;
+ kCFXMLErrorMalformedStartTag = 9;
+ kCFXMLErrorMalformedDocument = 10;
+ kCFXMLErrorElementlessDocument = 11;
+ kCFXMLErrorMalformedComment = 12;
+ kCFXMLErrorMalformedCharacterReference = 13;
+ kCFXMLErrorMalformedParsedCharacterData = 14;
+ kCFXMLErrorNoData = 15;
+
+
+{ These functions are called as a parse progresses.
+
+createXMLStructure -
+ called as new XML structures are encountered by the parser. May return NULL to indicate
+ that the given structure should be skipped; if NULL is returned for a given structure,
+ only minimal parsing is done for that structure (enough to correctly determine its end,
+ and to extract any data necessary for the remainder of the parse, such as Entity definitions).
+ createXMLStructure (or indeed, any of the tree-creation callbacks) will not be called for any
+ children of the skipped structure. The only exception is that the top-most element will always
+ be reported even if NULL was returned for the document as a whole. NOTE: for performance reasons,
+ the node passed to createXMLStructure cannot be safely retained by the client; the node as
+ a whole must be copied (via CFXMLNodeCreateCopy), or its contents must be extracted and copied.
+
+addChild -
+ called as children are parsed and are ready to be added to the tree. If createXMLStructure
+ returns NULL for a given structure, that structure is omitted entirely, and addChild will
+ NOT be called for either a NULL child or parent.
+
+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
+ endXMLStructure to show that the structure has been fully parsed.
+
+createXMLStructure, addChild, and endXMLStructure are all REQUIRED TO BE NON-NULL.
+
+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
+ or file accesses.
+
+handleError - called as errors/warnings are encountered in the data stream. At some point, we will
+ have an enum of the expected errors, some of which will be fatal, others of which will not. If
+ the function pointer is NULL, the parser will silently attempt to recover. The
+ handleError function may always return false to force the parser to stop; if handleError returns
+ true, the parser will attempt to recover (fatal errors will still cause the parse to abort
+ immediately).
+}
+
+type
+ CFXMLParserCreateXMLStructureCallBack = function( parser: CFXMLParserRef; nodeDesc: CFXMLNodeRef; info: UnivPtr ): UnivPtr;
+ CFXMLParserAddChildCallBack = procedure( parser: CFXMLParserRef; parent: UnivPtr; child: UnivPtr; info: UnivPtr );
+ CFXMLParserEndXMLStructureCallBack = procedure( parser: CFXMLParserRef; xmlType: UnivPtr; info: UnivPtr );
+ CFXMLParserResolveExternalEntityCallBack = function( parser: CFXMLParserRef; var extID: CFXMLExternalID; info: UnivPtr ): CFDataRef;
+ CFXMLParserHandleErrorCallBack = function( parser: CFXMLParserRef; error: CFXMLParserStatusCode; info: UnivPtr ): Boolean;
+ CFXMLParserCallBacksPtr = ^CFXMLParserCallBacks;
+ CFXMLParserCallBacks = record
+ version: CFIndex;
+ createXMLStructure: CFXMLParserCreateXMLStructureCallBack;
+ addChild: CFXMLParserAddChildCallBack;
+ endXMLStructure: CFXMLParserEndXMLStructureCallBack;
+ resolveExternalEntity: CFXMLParserResolveExternalEntityCallBack;
+ handleError: CFXMLParserHandleErrorCallBack;
+ end;
+
+type
+ CFXMLParserRetainCallBack = function( info: {const} UnivPtr ): UnivPtr;
+ CFXMLParserReleaseCallBack = procedure( info: {const} UnivPtr );
+ CFXMLParserCopyDescriptionCallBack = function( info: {const} UnivPtr ): CFStringRef;
+ CFXMLParserContextPtr = ^CFXMLParserContext;
+ CFXMLParserContext = record
+ version: CFIndex;
+ info: UnivPtr;
+ retain: CFXMLParserRetainCallBack;
+ release: CFXMLParserReleaseCallBack;
+ copyDescription: CFXMLParserCopyDescriptionCallBack;
+ end;
+
+function CFXMLParserGetTypeID: CFTypeID; external name '_CFXMLParserGetTypeID';
+
+{ 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
+ the parse progresses; callBacks, callBacks->createXMLStructure, callBacks->addChild, and
+ callBacks->endXMLStructure must all be non-NULL. context determines what if any info pointer is
+ passed to the callbacks as the parse progresses; context may be NULL. }
+function CFXMLParserCreate( allocator: CFAllocatorRef; xmlData: CFDataRef; dataSource: CFURLRef; parseOptions: CFOptionFlags; versionOfNodes: CFIndex; var callBacks: CFXMLParserCallBacks; var context: CFXMLParserContext ): CFXMLParserRef; external name '_CFXMLParserCreate';
+
+{ 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';
+
+procedure CFXMLParserGetContext( parser: CFXMLParserRef; var context: CFXMLParserContext ); external name '_CFXMLParserGetContext';
+
+procedure CFXMLParserGetCallBacks( parser: CFXMLParserRef; var callBacks: CFXMLParserCallBacks ); external name '_CFXMLParserGetCallBacks';
+
+function CFXMLParserGetSourceURL( parser: CFXMLParserRef ): CFURLRef; external name '_CFXMLParserGetSourceURL';
+
+{ Returns the character index of the current parse location }
+function CFXMLParserGetLocation( parser: CFXMLParserRef ): CFIndex; external name '_CFXMLParserGetLocation';
+
+{ Returns the line number of the current parse location }
+function CFXMLParserGetLineNumber( parser: CFXMLParserRef ): CFIndex; external name '_CFXMLParserGetLineNumber';
+
+{ Returns the top-most object returned by the createXMLStructure callback }
+function CFXMLParserGetDocument( parser: CFXMLParserRef ): UnivPtr; external name '_CFXMLParserGetDocument';
+
+{ Get the status code or a user-readable description of the last error that occurred in a parse.
+ If no error has occurred, a null description string is returned. See the enum above for
+ possible status returns }
+function CFXMLParserGetStatusCode( parser: CFXMLParserRef ): CFXMLParserStatusCode; external name '_CFXMLParserGetStatusCode';
+
+function CFXMLParserCopyErrorDescription( parser: CFXMLParserRef ): CFStringRef; external name '_CFXMLParserCopyErrorDescription';
+
+{ Cause any in-progress parse to abort with the given error code and description. errorCode
+ must be positive, and errorDescription may not be NULL. Cannot be called asynchronously
+ (i.e. must be called from within a parser callback) }
+procedure CFXMLParserAbort( parser: CFXMLParserRef; errorCode: CFXMLParserStatusCode; errorDescription: CFStringRef ); external name '_CFXMLParserAbort';
+
+{ Starts a parse of the data the parser was created with; returns success or failure.
+ Upon success, use CFXMLParserGetDocument() to get the product of the parse. Upon
+ failure, use CFXMLParserGetErrorCode() or CFXMLParserCopyErrorDescription() to get
+ information about the error. It is an error to call CFXMLParserParse() while a
+ parse is already underway. }
+function CFXMLParserParse( parser: CFXMLParserRef ): Boolean; external name '_CFXMLParserParse';
+
+{ These functions provide a higher-level interface. The XML data is parsed to a
+ special CFTree (an CFXMLTree) with known contexts and callbacks. See CFXMLNode.h
+ for full details on using an CFXMLTree and the CFXMLNodes contained therein.
+}
+{ Parse to an CFXMLTreeRef. parseOptions are as above. versionOfNodes determines
+ what version CFXMLNodes are used to populate the tree. }
+function CFXMLTreeCreateFromData( allocator: CFAllocatorRef; xmlData: CFDataRef; dataSource: CFURLRef; parseOptions: CFOptionFlags; versionOfNodes: CFIndex ): CFXMLTreeRef; external name '_CFXMLTreeCreateFromData';
+
+{ As above, with the additional by-reference pass of a CFDictionaryRef containing
+ various error information (see below). The caller is responsible for releasing the
+ returned dictionary. If the error dictionary is not desired, pass NULL. }
+function CFXMLTreeCreateFromDataWithError( allocator: CFAllocatorRef; xmlData: CFDataRef; dataSource: CFURLRef; parseOptions: CFOptionFlags; versionOfNodes: CFIndex; var errorDict: CFDictionaryRef ): CFXMLTreeRef; external name '_CFXMLTreeCreateFromDataWithError';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Loads the data to be parsed directly from dataSource. Arguments as above. }
+function CFXMLTreeCreateWithDataFromURL( allocator: CFAllocatorRef; dataSource: CFURLRef; parseOptions: CFOptionFlags; versionOfNodes: CFIndex ): CFXMLTreeRef; external name '_CFXMLTreeCreateWithDataFromURL';
+
+{ Generate the XMLData (ready to be written to whatever permanent storage is to be
+ used) from an CFXMLTree. Will NOT regenerate entity references (except those
+ required for syntactic correctness) if they were replaced at the parse time;
+ clients that wish this should walk the tree and re-insert any entity references
+ that should appear in the final output file. }
+function CFXMLTreeCreateXMLData( allocator: CFAllocatorRef; xmlTree: CFXMLTreeRef ): CFDataRef; external name '_CFXMLTreeCreateXMLData';
+
+{ Escaping and unescaping XML entities in CFStrings. The standard XML entities
+ are always replaced. }
+{ Creates a CFString by replacing entities that appear in the entities dictionary.
+ Dictionary keys are the entities themselves, and the values should be CFStrings
+ containing the expansion. Pass NULL for entitiesDictionary to indicate no entities
+ other than the standard five. }
+function CFXMLCreateStringByEscapingEntities( allocator: CFAllocatorRef; strng: CFStringRef; entitiesDictionary: CFDictionaryRef ): CFStringRef; external name '_CFXMLCreateStringByEscapingEntities';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+function CFXMLCreateStringByUnescapingEntities( allocator: CFAllocatorRef; strng: CFStringRef; entitiesDictionary: CFDictionaryRef ): CFStringRef; external name '_CFXMLCreateStringByUnescapingEntities';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ CFXMLTreeCreateFromDataWithError error dictionary key constants. }
+var kCFXMLTreeErrorDescription: CFStringRef; external name '_kCFXMLTreeErrorDescription'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ { value is a CFString containing the readable error string. }
+
+var kCFXMLTreeErrorLineNumber: CFStringRef; external name '_kCFXMLTreeErrorLineNumber'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ { value is a CFNumber containing the line on which the error appears. }
+
+var kCFXMLTreeErrorLocation: CFStringRef; external name '_kCFXMLTreeErrorLocation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ { value is a CFNumber containing the byte location at which the error occurred. }
+
+var kCFXMLTreeErrorStatusCode: CFStringRef; external name '_kCFXMLTreeErrorStatusCode'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+ { value is a CFNumber containing the error status code. }
+
+
+{unit CGDataConsumer}
+{ CoreGraphics - CGDataConsumer.h
+ * Copyright (c) 1999-2004 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{ Pascal Translation Updated: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CGDataConsumerRef = ^SInt32; { an opaque 32-bit type }
+
+
+{ This callback is called to copy `count' bytes from `buffer' to the
+ * data consumer. }
+
+type
+ CGDataConsumerPutBytesCallback = function( info: UnivPtr; buffer: {const} UnivPtr; count: size_t ): size_t;
+
+{ This callback is called to release the `info' pointer when the data
+ * provider is freed. }
+
+type
+ CGDataConsumerReleaseInfoCallback = procedure( info: UnivPtr );
+
+{ Callbacks for accessing data.
+ * `putBytes' copies `count' bytes from `buffer' to the consumer, and
+ * returns the number of bytes copied. It should return 0 if no more data
+ * can be written to the consumer.
+ * `releaseConsumer', if non-NULL, is called when the consumer is freed. }
+
+type
+ CGDataConsumerCallbacks = record
+ putBytes: CGDataConsumerPutBytesCallback;
+ releaseConsumer: CGDataConsumerReleaseInfoCallback;
+ end;
+
+{ Return the CFTypeID for CGDataConsumerRefs. }
+
+function CGDataConsumerGetTypeID: CFTypeID; external name '_CGDataConsumerGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Create a data consumer using `callbacks' to handle the data. `info' is
+ * passed to each of the callback functions. }
+
+function CGDataConsumerCreate( info: UnivPtr; const (*var*) callbacks: CGDataConsumerCallbacks ): CGDataConsumerRef; external name '_CGDataConsumerCreate';
+
+{ Create a data consumer which writes data to `url'. }
+
+function CGDataConsumerCreateWithURL( url: CFURLRef ): CGDataConsumerRef; external name '_CGDataConsumerCreateWithURL';
+
+{ Create a data consumer which writes to `data'. }
+
+function CGDataConsumerCreateWithCFData( data: CFMutableDataRef ): CGDataConsumerRef; external name '_CGDataConsumerCreateWithCFData'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Equivalent to `CFRetain(consumer)'. }
+
+function CGDataConsumerRetain( consumer: CGDataConsumerRef ): CGDataConsumerRef; external name '_CGDataConsumerRetain';
+
+{ Equivalent to `CFRelease(consumer)'. }
+
+procedure CGDataConsumerRelease( consumer: CGDataConsumerRef ); external name '_CGDataConsumerRelease';
+
+
+{unit CGDataProvider}
+{ CoreGraphics - CGDataProvider.h
+ * Copyright (c) 1999-2004 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CGDataProviderRef = ^SInt32; { an opaque 32-bit type }
+
+
+{ This callback is called to copy `count' bytes from the sequential data
+ * stream to `buffer'. }
+
+type
+ CGDataProviderGetBytesCallback = function( info: UnivPtr; buffer: UnivPtr; count: size_t ): size_t;
+
+{ This callback is called to skip `count' bytes forward in the sequential
+ * data stream. }
+
+type
+ CGDataProviderSkipBytesCallback = procedure( info: UnivPtr; count: size_t );
+
+{ This callback is called to rewind to the beginning of sequential data
+ * stream. }
+
+type
+ CGDataProviderRewindCallback = procedure( info: UnivPtr );
+
+{ This callback is called to release the `info' pointer when the data
+ * provider is freed. }
+
+type
+ CGDataProviderReleaseInfoCallback = procedure( info: UnivPtr );
+
+{ Callbacks for sequentially accessing data.
+ * `getBytes' is called to copy `count' bytes from the sequential data
+ * stream to `buffer'. It should return the number of bytes copied, or 0
+ * if there's no more data.
+ * `skipBytes' is called to skip ahead in the sequential data stream by
+ * `count' bytes.
+ * `rewind' is called to rewind the sequential data stream to the beginning
+ * of the data.
+ * `releaseProvider', if non-NULL, is called to release the `info' pointer
+ * when the provider is freed. }
+
+type
+ CGDataProviderCallbacks = record
+ getBytes: CGDataProviderGetBytesCallback;
+ skipBytes: CGDataProviderSkipBytesCallback;
+ rewind: CGDataProviderRewindCallback;
+ releaseProvider: CGDataProviderReleaseInfoCallback;
+ end;
+
+{ This callback is called to get a pointer to the entire block of data. }
+
+type
+ CGDataProviderGetBytePointerCallback = function( info: UnivPtr ): UnivPtr;
+
+{ This callback is called to release the pointer to entire block of
+ * data. }
+
+type
+ CGDataProviderReleaseBytePointerCallback = procedure( info: UnivPtr; pointr: {const} UnivPtr );
+
+{ This callback is called to copy `count' bytes at byte offset `offset'
+ * into `buffer'. }
+
+type
+ CGDataProviderGetBytesAtOffsetCallback = function( info: UnivPtr; buffer: UnivPtr; offset: size_t; count: size_t ): size_t;
+
+{ Callbacks for directly accessing data.
+ * `getBytePointer', if non-NULL, is called to return a pointer to the
+ * provider's entire block of data.
+ * `releaseBytePointer', if non-NULL, is called to release a pointer to
+ * the provider's entire block of data.
+ * `getBytes', if non-NULL, is called to copy `count' bytes at offset
+ * `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
+ CGDataProviderDirectAccessCallbacks = record
+ getBytePointer: CGDataProviderGetBytePointerCallback;
+ releaseBytePointer: CGDataProviderReleaseBytePointerCallback;
+ getBytes: CGDataProviderGetBytesAtOffsetCallback;
+ releaseProvider: CGDataProviderReleaseInfoCallback;
+ end;
+
+{ Return the CFTypeID for CGDataProviderRefs. }
+
+function CGDataProviderGetTypeID: CFTypeID; external name '_CGDataProviderGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Create a sequential-access data provider using `callbacks' to provide
+ * the data. `info' is passed to each of the callback functions. }
+
+function CGDataProviderCreate( info: UnivPtr; const (*var*) callbacks: CGDataProviderCallbacks ): CGDataProviderRef; external name '_CGDataProviderCreate';
+
+{ Create a direct-access data provider using `callbacks' to supply `size'
+ * bytes of data. `info' is passed to each of the callback functions. }
+
+function CGDataProviderCreateDirectAccess( info: UnivPtr; size: size_t; const (*var*) callbacks: CGDataProviderDirectAccessCallbacks ): CGDataProviderRef; external name '_CGDataProviderCreateDirectAccess';
+
+{ The callback used by `CGDataProviderCreateWithData'. }
+
+type
+ CGDataProviderReleaseDataCallback = procedure( info: UnivPtr; data: {const} UnivPtr; size: size_t );
+
+{ Create a direct-access data provider using `data', an array of `size'
+ * bytes. `releaseData' is called when the data provider is freed, and is
+ * passed `info' as its first argument. }
+
+function CGDataProviderCreateWithData( info: UnivPtr; data: {const} UnivPtr; size: size_t; releaseData: CGDataProviderReleaseDataCallback ): CGDataProviderRef; external name '_CGDataProviderCreateWithData';
+
+{ Create a direct-access data provider which reads from `data'. }
+
+function CGDataProviderCreateWithCFData( data: CFDataRef ): CGDataProviderRef; external name '_CGDataProviderCreateWithCFData'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create a data provider using `url'. }
+
+function CGDataProviderCreateWithURL( url: CFURLRef ): CGDataProviderRef; external name '_CGDataProviderCreateWithURL';
+
+{ Equivalent to `CFRetain(provider)'. }
+
+function CGDataProviderRetain( provider: CGDataProviderRef ): CGDataProviderRef; external name '_CGDataProviderRetain';
+
+{ Equivalent to `CFRelease(provider)'. }
+
+procedure CGDataProviderRelease( provider: CGDataProviderRef ); external name '_CGDataProviderRelease';
+
+{* DEPRECATED FUNCTIONS *}
+
+{ Don't use this function; use CGDataProviderCreateWithURL instead. }
+
+function CGDataProviderCreateWithFilename( filename: ConstCStringPtr ): CGDataProviderRef; external name '_CGDataProviderCreateWithFilename';
+
+
+{unit CGPDFDocument}
+{ CoreGraphics - CGPDFDocument.h
+ * Copyright (c) 2000-2003 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CGPDFDocumentRef = ^SInt32; { an opaque 32-bit type }
+
+
+{ Create a PDF document, using `provider' to obtain the document's
+ * data. }
+
+function CGPDFDocumentCreateWithProvider( provider: CGDataProviderRef ): CGPDFDocumentRef; external name '_CGPDFDocumentCreateWithProvider';
+
+{ Create a PDF document from `url'. }
+
+function CGPDFDocumentCreateWithURL( url: CFURLRef ): CGPDFDocumentRef; external name '_CGPDFDocumentCreateWithURL';
+
+{ Equivalent to `CFRetain(document)', except it doesn't crash (as CFRetain
+ * does) if `document' is NULL. }
+
+function CGPDFDocumentRetain( document: CGPDFDocumentRef ): CGPDFDocumentRef; external name '_CGPDFDocumentRetain';
+
+{ Equivalent to `CFRelease(document)', except it doesn't crash (as
+ * CFRelease does) if `document' is NULL. }
+
+procedure CGPDFDocumentRelease( document: CGPDFDocumentRef ); external name '_CGPDFDocumentRelease';
+
+{ Return the major and minor version numbers of `document'. }
+
+procedure CGPDFDocumentGetVersion( document: CGPDFDocumentRef; var majorVersion: SInt32; var minorVersion: SInt32 ); external name '_CGPDFDocumentGetVersion'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return true if the PDF file associated with `document' is encrypted;
+ * false otherwise. If the PDF file is encrypted, then a password must be
+ * supplied before certain operations are enabled; different passwords may
+ * enable different operations. }
+
+function CGPDFDocumentIsEncrypted( document: CGPDFDocumentRef ): CBool; external name '_CGPDFDocumentIsEncrypted'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Use `password' to decrypt `document' and grant permission for certain
+ * operations. Returns true if `password' is a valid password; false
+ * otherwise. }
+
+function CGPDFDocumentUnlockWithPassword( document: CGPDFDocumentRef; password: ConstCStringPtr ): CBool; external name '_CGPDFDocumentUnlockWithPassword'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return true if `document' is unlocked; false otherwise. A document is
+ * unlocked if it isn't encrypted, or if it is encrypted and a valid password
+ * was previously specified with CGPDFDocumentUnlockWithPassword. }
+
+function CGPDFDocumentIsUnlocked( document: CGPDFDocumentRef ): CBool; external name '_CGPDFDocumentIsUnlocked'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return true if `document' allows printing; false otherwise. Typically,
+ * this function returns false only if the document is encrypted and the
+ * document's current password doesn't grant permission to perform
+ * printing. }
+
+function CGPDFDocumentAllowsPrinting( document: CGPDFDocumentRef ): CBool; external name '_CGPDFDocumentAllowsPrinting'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return true if `document' allows copying; false otherwise. Typically,
+ * this function returns false only if the document is encrypted and the
+ * document's current password doesn't grant permission to perform
+ * copying. }
+
+function CGPDFDocumentAllowsCopying( document: CGPDFDocumentRef ): CBool; external name '_CGPDFDocumentAllowsCopying'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return the number of pages in `document'. }
+
+function CGPDFDocumentGetNumberOfPages( document: CGPDFDocumentRef ): size_t; external name '_CGPDFDocumentGetNumberOfPages';
+
+{ Return the page corresponding to `pageNumber', or NULL if no such page
+ * exists in the document. Pages are numbered starting at 1. }
+
+function CGPDFDocumentGetPage( document: CGPDFDocumentRef; pageNumber: size_t ): CGPDFPageRef; external name '_CGPDFDocumentGetPage'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return the document catalog of `document'. }
+
+function CGPDFDocumentGetCatalog( document: CGPDFDocumentRef ): CGPDFDictionaryRef; external name '_CGPDFDocumentGetCatalog'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return the info dictionary of `document'. }
+
+function CGPDFDocumentGetInfo( document: CGPDFDocumentRef ): CGPDFDictionaryRef; external name '_CGPDFDocumentGetInfo'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the "file identifier" of `document'. }
+
+function CGPDFDocumentGetID( document: CGPDFDocumentRef ): CGPDFArrayRef; external name '_CGPDFDocumentGetID'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the CFTypeID for CGPDFDocumentRefs. }
+
+function CGPDFDocumentGetTypeID: CFTypeID; external name '_CGPDFDocumentGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ The following functions are deprecated in favor of the CGPDFPage API. }
+
+{ DEPRECATED; return the media box of page number `page' in `document'. }
+
+function CGPDFDocumentGetMediaBox( document: CGPDFDocumentRef; page: SInt32 ): CGRect; external name '_CGPDFDocumentGetMediaBox';
+
+{ DEPRECATED; return the crop box of page number `page' in `document'. }
+
+function CGPDFDocumentGetCropBox( document: CGPDFDocumentRef; page: SInt32 ): CGRect; external name '_CGPDFDocumentGetCropBox';
+
+{ DEPRECATED; return the bleed box of page number `page' in `document'. }
+
+function CGPDFDocumentGetBleedBox( document: CGPDFDocumentRef; page: SInt32 ): CGRect; external name '_CGPDFDocumentGetBleedBox';
+
+{ DEPRECATED; return the trim box of page number `page' in `document'. }
+
+function CGPDFDocumentGetTrimBox( document: CGPDFDocumentRef; page: SInt32 ): CGRect; external name '_CGPDFDocumentGetTrimBox';
+
+{ DEPRECATED; return the art box of page number `page' in `document'. }
+
+function CGPDFDocumentGetArtBox( document: CGPDFDocumentRef; page: SInt32 ): CGRect; external name '_CGPDFDocumentGetArtBox';
+
+{ DEPRECATED; return the rotation angle (in degrees) of page number `page'
+ * in `document'. }
+
+function CGPDFDocumentGetRotationAngle( document: CGPDFDocumentRef; page: SInt32 ): SInt32; external name '_CGPDFDocumentGetRotationAngle';
+
+
+{unit CGPDFPage}
+{ CoreGraphics - CGPDFPage.h
+ * Copyright (c) 2001-2004 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+// CGPDFPageRef defined in CGBase
+
+
+type
+ CGPDFBox = SInt32;
+const
+ kCGPDFMediaBox = 0;
+ kCGPDFCropBox = 1;
+ kCGPDFBleedBox = 2;
+ kCGPDFTrimBox = 3;
+ kCGPDFArtBox = 4;
+
+
+{ Equivalent to `CFRetain(page)', except it doesn't crash (as CFRetain
+ * does) if `page' is NULL. }
+
+function CGPDFPageRetain( page: CGPDFPageRef ): CGPDFPageRef; external name '_CGPDFPageRetain'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Equivalent to `CFRelease(page)', except it doesn't crash (as CFRelease
+ * does) if `page' is NULL. }
+
+procedure CGPDFPageRelease( page: CGPDFPageRef ); external name '_CGPDFPageRelease'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return the document of `page'. }
+
+function CGPDFPageGetDocument( page: CGPDFPageRef ): CGPDFDocumentRef; external name '_CGPDFPageGetDocument'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return the page number of `page'. }
+
+function CGPDFPageGetPageNumber( page: CGPDFPageRef ): size_t; external name '_CGPDFPageGetPageNumber'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return the rectangle associated with `box' in `page'. This is the value
+ * of the corresponding entry (such as /MediaBox, /ArtBox, and so on) in
+ * the page's dictionary. }
+
+function CGPDFPageGetBoxRect( page: CGPDFPageRef; box: CGPDFBox ): CGRect; external name '_CGPDFPageGetBoxRect'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return the rotation angle (in degrees) of `page'. This is the value of
+ * the /Rotate entry in the page's dictionary. }
+
+function CGPDFPageGetRotationAngle( page: CGPDFPageRef ): SInt32; external name '_CGPDFPageGetRotationAngle'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return a transform mapping the box specified by `box' to `rect' as
+ * follows:
+ * - Compute the effective rect by intersecting the rect associated with
+ * `box' and the /MediaBox entry of the page.
+ * - Rotate the effective rect according to the page's /Rotate entry.
+ * - Center the resulting rect on `rect'. If `rotation' is non-zero,
+ * then the rect will rotated clockwise by `rotation' degrees.
+ * `rotation' must be a multiple of 90.
+ * - Scale the rect down, if necessary, so that it coincides with the
+ * edges of `rect'. If `preserveAspectRatio' is true, then the final
+ * rect will coincide with the edges of `rect' only in the more
+ * restrictive dimension. }
+
+function CGPDFPageGetDrawingTransform( page: CGPDFPageRef; box: CGPDFBox; rect: CGRect; rotate: SInt32; preserveAspectRatio: CBool ): CGAffineTransform; external name '_CGPDFPageGetDrawingTransform'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return the dictionary of `page'. }
+
+function CGPDFPageGetDictionary( page: CGPDFPageRef ): CGPDFDictionaryRef; external name '_CGPDFPageGetDictionary'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return the CFTypeID for CGPDFPageRefs. }
+
+function CGPDFPageGetTypeID: CFTypeID; external name '_CGPDFPageGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{unit CGPSConverter}
+{ CoreGraphics - CGPSConverter.h
+ * Copyright (c) 2003 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+// CGPSConverterRef defined in CGBase
+
+
+{ CGPSConverter callbacks.
+ *
+ * `version' is the version number of the structure passed in as a
+ * parameter to the converter creation functions. The structure defined
+ * below is version 0.
+ *
+ * `beginDocument', if non-NULL, is called at the beginning of the
+ * conversion of the PostScript document.
+ *
+ * `endDocument', if non-NULL, is called at the end of conversion of the
+ * PostScript document.
+ *
+ * `beginPage', if non-NULL, is called at the start of the conversion of
+ * each page in the PostScript document.
+ *
+ * `endPage', if non-NULL, is called at the end of the conversion of each
+ * page in the PostScript document.
+ *
+ * `noteProgress', if non-NULL, is called periodically during the
+ * conversion to indicate that conversion is proceeding.
+ *
+ * `noteMessage', if non-NULL, is called to pass any messages that might
+ * result during the conversion.
+ *
+ * `releaseInfo', if non-NULL, is called when the converter is
+ * deallocated. }
+
+type
+ CGPSConverterBeginDocumentCallback = procedure( info: UnivPtr );
+
+type
+ CGPSConverterEndDocumentCallback = procedure( info: UnivPtr; success: CBool );
+
+type
+ CGPSConverterBeginPageCallback = procedure( info: UnivPtr; pageNumber: size_t; pageInfo: CFDictionaryRef );
+
+type
+ CGPSConverterEndPageCallback = procedure( info: UnivPtr; pageNumber: size_t; pageInfo: CFDictionaryRef );
+
+type
+ CGPSConverterProgressCallback = procedure( info: UnivPtr );
+
+type
+ CGPSConverterMessageCallback = procedure( info: UnivPtr; message: CFStringRef );
+
+type
+ CGPSConverterReleaseInfoCallback = procedure( info: UnivPtr );
+
+type
+ CGPSConverterCallbacks = record
+ version: UInt32;
+ beginDocument: CGPSConverterBeginDocumentCallback;
+ endDocument: CGPSConverterEndDocumentCallback;
+ beginPage: CGPSConverterBeginPageCallback;
+ endPage: CGPSConverterEndPageCallback;
+ noteProgress: CGPSConverterProgressCallback;
+ noteMessage: CGPSConverterMessageCallback;
+ releaseInfo: CGPSConverterReleaseInfoCallback;
+ end;
+
+{ Create a CGPSConverter, using `callbacks' to populate its callback
+ * table. Each callback will be supplied the `info' value when called. }
+
+function CGPSConverterCreate( info: UnivPtr; const (*var*) callbacks: CGPSConverterCallbacks; options: CFDictionaryRef ): CGPSConverterRef; external name '_CGPSConverterCreate'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Use `converter' to convert PostScript data to PDF data. The PostScript
+ * data is supplied by `provider'; the resulting PDF is written to
+ * `consumer'. Returns true if the conversion succeeded; false
+ * otherwise. }
+
+function CGPSConverterConvert( converter: CGPSConverterRef; provider: CGDataProviderRef; consumer: CGDataConsumerRef; options: CFDictionaryRef ): CBool; external name '_CGPSConverterConvert'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Tell the `converter' to abort conversion at the next possible
+ * opportunity. }
+
+function CGPSConverterAbort( converter: CGPSConverterRef ): CBool; external name '_CGPSConverterAbort'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return true if `converter' is currently converting data. }
+
+function CGPSConverterIsConverting( converter: CGPSConverterRef ): CBool; external name '_CGPSConverterIsConverting'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return the CFTypeID of the CGPSConverter class. }
+
+function CGPSConverterGetTypeID: CFTypeID; external name '_CGPSConverterGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{unit CGRemoteOperation}
+{
+ * CGRemoteOperation.h
+ * CoreGraphics
+ *
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CGEventErr = CGError;
+const
+ CGEventNoErr = 0;
+
+
+{ Screen refresh or drawing notification }
+{
+ * Callback function pointer;
+ * Declare your callback function in this form. When an area of the display is
+ * modified or refreshed, your callback function will be invoked with a count
+ * of the number of rectangles in the refreshed areas, and a list of the refreshed
+ * rectangles. The rectangles are in global coordinates.
+ *
+ * Your function should not modify, deallocate or free memory pointed to by rectArray.
+ *
+ * The system continues to accumulate refreshed areas constantly. Whenever new
+ * information is available, your callback function is invoked.The list of rects
+ * passed to the callback function are cleared from the accumulated refreshed area
+ * when the callback is made.
+ *
+ * This callback may be triggered by drawing operations, window movement, and
+ * display reconfiguration.
+ *
+ * Bear in mind that a single rectangle may occupy multiple displays,
+ * either by overlapping the displays, or by residing on coincident displays
+ * when mirroring is active. Use the CGGetDisplaysWithRect() to determine
+ * the displays a rectangle occupies.
+ }
+type
+ CGRectCount = UInt32;
+type
+ CGScreenRefreshCallback = procedure( count: CGRectCount; {const} rectArray: {variable-size-array} CGRectPtr; userParameter: UnivPtr);
+
+{ Begin Old API }
+{
+ * Register a callback function to be invoked when an area of the display
+ * is refreshed, or modified. The function is invoked on the same thread
+ * of execution that is processing events within your application.
+ * userParameter is passed back with each invocation of the callback function.
+ }
+function CGRegisterScreenRefreshCallback( func: CGScreenRefreshCallback; userParameter: UnivPtr ): CGError; external name '_CGRegisterScreenRefreshCallback';
+
+{
+ * Remove a previously registered calback function.
+ * Both the function and the userParameter must match the registered entry to be removed.
+ }
+procedure CGUnregisterScreenRefreshCallback( func: CGScreenRefreshCallback; userParameter: UnivPtr ); external name '_CGUnregisterScreenRefreshCallback';
+
+{
+ * In some applications it may be preferable to have a seperate thread wait for screen refresh data.
+ * This function should be called on a thread seperate from the event processing thread.
+ * If screen refresh callback functions are registered, this function should not be used.
+ * The mechanisms are mutually exclusive.
+ *
+ * Deallocate screen refresh rects using CGReleaseScreenRefreshRects().
+ *
+ * Returns an error code if parameters are invalid or an error occurs in retrieving
+ * dirty screen rects from the server.
+ }
+function CGWaitForScreenRefreshRects( var pRectArray: {variable-size-array} CGRectPtr; var pCount: CGRectCount ): CGEventErr; external name '_CGWaitForScreenRefreshRects';
+{ End Old API }
+
+{ Begin New API }
+{
+ * Screen refresh operation types.
+ * Operations are encoded as bits.
+ * All users of this API must support a simple refresh, kCGScreenUpdateOperationRefresh.
+ }
+type
+ CGScreenUpdateOperation = SInt32;
+const
+ kCGScreenUpdateOperationRefresh = 0;
+ kCGScreenUpdateOperationMove = 1 shl 0;
+ kCGScreenUpdateOperationReducedDirtyRectangleCount = 1 shl 31;
+
+{
+ * Move operation notifications are restricted to changes that move a region by
+ * an integer number of pixels.
+ *
+ * dX and dY describe the direction of movement.
+ * Positive values of dX indicate movement to the right.
+ * Negative values of dX indicate movement to the left.
+ * Positive values of dY indicate movement downward.
+ * Negative values of dY indicate movement upward.
+ }
+type
+ CGScreenUpdateMoveDelta = record
+ dX, dY: SInt32;
+ end;
+
+{
+ * Move operation callback function pointer;
+ * Declare your callback function in this form. When an area of the display is
+ * moved, your callback function will be invoked with a count
+ * of the number of rectangles in the moved area, and a list of the moved.
+ * The rectangles are in global coordinates, and describe the area prior to the move
+ * operation.
+ *
+ * dX and dY describe the direction of movement.
+ * Positive values of dX indicate movement to the right.
+ * Negative values of dX indicate movement to the left.
+ * Positive values of dY indicate movement downward.
+ * Negative values of dY indicate movement upward.
+ *
+ * Your function should not modify, deallocate or free memory pointed to by rectArray.
+ *
+ * This callback may be triggered by window movement or scrolling operations.
+ *
+ * Bear in mind that a single rectangle may occupy multiple displays,
+ * either by overlapping the displays, or by residing on coincident displays
+ * when mirroring is active. Use the CGGetDisplaysWithRect() function to determine
+ * the displays a rectangle occupies.
+ *
+ * If no move callback function pointer is registered, then move operations are remapped to
+ * refresh operations, and the CGScreenRefreshCallback function, if any, is called.
+ }
+type
+ CGScreenUpdateMoveCallback = procedure( delta: CGScreenUpdateMoveDelta; count: size_t; {const} rectArray: {variable-size-array} CGRectPtr; userParameter: UnivPtr );
+
+{
+ * Register a callback function to be invoked when an area of the display
+ * is moved. The function is invoked on the same thread
+ * of execution that is processing events within your application.
+ * userParameter is passed back with each invocation of the callback function.
+ }
+function CGScreenRegisterMoveCallback( func: CGScreenUpdateMoveCallback; userParameter: UnivPtr ): CGError; external name '_CGScreenRegisterMoveCallback'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{
+ * Remove a previously registered callback function.
+ }
+procedure CGScreenUnregisterMoveCallback( func: CGScreenUpdateMoveCallback; userParameter: UnivPtr ); external name '_CGScreenUnregisterMoveCallback'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{
+ * In some applications it may be preferable to have a seperate thread wait for screen update operations.
+ * This function should be called on a thread seperate from the event processing thread.
+ * If screen refresh callback functions are registered, this function should not be used.
+ * The mechanisms are mutually exclusive.
+ *
+ * Deallocate screen update rects using CGReleaseScreenRefreshRects().
+ *
+ * requestedOperations may be:
+ * kCGScreenUpdateOperationRefresh
+ * All move operations are converted to refresh operations
+ * currentOperation will always be returned as kCGScreenUpdateOperationRefresh
+ * (kCGScreenUpdateOperationRefresh | kCGScreenUpdateOperationMove)
+ * Wait for move or refresh operations.
+ * currentOperation will be either kCGScreenUpdateOperationRefresh or kCGScreenUpdateOperationMove
+ *
+ * pDelta is updated with valid content if the currentOperation is kCGScreenUpdateOperationMove
+ *
+ * Returns an error code if parameters are invalid or an error occurs in retrieving
+ * the screen rect data from the server.
+ }
+function CGWaitForScreenUpdateRects( requestedOperations: CGScreenUpdateOperation; var currentOperation: CGScreenUpdateOperation; var pRectArray: {variable-size-array} CGRectPtr; var pCount: size_t; var pDelta: CGScreenUpdateMoveDelta ): CGError; external name '_CGWaitForScreenUpdateRects'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{ End New API }
+{
+ * Deallocate the list of rects recieved from CGWaitForScreenRefreshRects()
+ }
+procedure CGReleaseScreenRefreshRects( pRectArray: {variable-size-array} CGRectPtr); external name '_CGReleaseScreenRefreshRects';
+
+{
+ * Programs reading the frame buffer content may want to hide the cursor, if it is visible and
+ * drawn in framebuffer memory. A cursor may also be generated in an overlay plane of some form.
+ *
+ * These APIs provide basic cursor visibility and drawing information.
+ * The cursor may be hidden or shown using the CGDisplayHideCursor() and CGDisplayShowCursor() API.
+ }
+function CGCursorIsVisible: boolean_t; external name '_CGCursorIsVisible'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+function CGCursorIsDrawnInFramebuffer: boolean_t; external name '_CGCursorIsDrawnInFramebuffer'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{
+ * Posting events: These functions post events into the system. Use for remote
+ * operation and virtualization.
+ *
+ * Note that remote operation requires a valid connection to the server, which
+ * must be owned by either the root/Administrator user or the logged in console
+ * user. This means that your application must be running as root/Administrator
+ * user or the logged in console user.
+ }
+
+{
+ * Synthesize mouse events.
+ * mouseCursorPosition should be the global coordinates the mouse is at for the event.
+ * updateMouseCursor should be TRUE if the on-screen cursor
+ * should be moved to mouseCursorPosition.
+ *
+ * Based on the values entered, the appropriate mouse-down, mouse-up, mouse-move,
+ * or mouse-drag events are generated, by comparing the new state with the current state.
+ *
+ * The current implemementation of the event system supports a maximum of thirty-two buttons.
+ * The buttonCount parameter should be followed by 'buttonCount' boolean_t values
+ * indicating button state. The first value should reflect the state of the primary
+ * button on the mouse. The second value, if any, should reflect the state of the secondary
+ * mouse button (right), if any. A third value woule be the center button, and the remaining
+ * buttons would be in USB device order.
+ }
+type
+ CGButtonCount = UInt32;
+function CGPostMouseEvent( mouseCursorPosition: CGPoint; updateMouseCursorPosition: boolean_t; buttonCount: CGButtonCount; mouseButtonDown: boolean_t; ... ): CGError; external name '_CGPostMouseEvent';
+
+{
+ * Synthesize scroll wheel events.
+ *
+ * The current implemementation of the event system supports a maximum of three wheels.
+ *
+ * The wheelCount parameter should be followed by 'wheelCount' 32 bit integer values
+ * indicating wheel movements. The first value should reflect the state of the primary
+ * wheel on the mouse. The second value, if any, should reflect the state of a secondary
+ * mouse wheel, if any.
+ *
+ * Wheel movement is represented by small signed integer values,
+ * typically in a range from -10 to +10. Large values may have unexpected results,
+ * depending on the application that processes the event.
+ }
+type
+ CGWheelCount = UInt32;
+function CGPostScrollWheelEvent( wheelCount: CGWheelCount; wheel1: SInt32; ... ): CGError; external name '_CGPostScrollWheelEvent';
+
+{
+ * Synthesize keyboard events. Based on the values entered,
+ * the appropriate key down, key up, and flags changed events are generated.
+ * If keyChar is NUL (0), an appropriate value will be guessed at, based on the
+ * default keymapping.
+ *
+ * All keystrokes needed to generate a character must be entered, including
+ * SHIFT, CONTROL, OPTION, and COMMAND keys. For example, to produce a 'Z',
+ * the SHIFT key must be down, the 'z' key must go down, and then the SHIFT
+ * and 'z' key must be released:
+ * CGPostKeyboardEvent( (CGCharCode)0, (CGKeyCode)56, true ); // shift down
+ * CGPostKeyboardEvent( (CGCharCode)'Z', (CGKeyCode)6, true ); // 'z' down
+ * CGPostKeyboardEvent( (CGCharCode)'Z', (CGKeyCode)6, false ); // 'z' up
+ * CGPostKeyboardEvent( (CGCharCode)0, (CGKeyCode)56, false ); // 'shift up
+ }
+type
+ CGCharCode = UInt16; { Character represented by event, if any }
+type
+ CGKeyCode = UInt16; { Virtual keycode for event }
+
+function CGPostKeyboardEvent( keyChar: CGCharCode; virtualKey: CGKeyCode; keyDown: boolean_t ): CGError; external name '_CGPostKeyboardEvent';
+
+{
+ * Warp the mouse cursor to the desired position in global
+ * coordinates without generating events
+ }
+function CGWarpMouseCursorPosition( newCursorPosition: CGPoint ): CGError; external name '_CGWarpMouseCursorPosition';
+
+{
+ * Remote operation may want to inhibit local events (events from
+ * the machine's keyboard and mouse). This may be done either as a
+ * explicit request (tracked per app) or as a short term side effect of
+ * posting an event.
+ *
+ * CGInhibitLocalEvents() is typically used for long term remote operation
+ * of a system, as in automated system testing or telecommuting applications.
+ * Local device state changes are discarded.
+ *
+ * Local event inhibition is turned off if the app that requested it terminates.
+ }
+function CGInhibitLocalEvents( doInhibit: boolean_t ): CGError; external name '_CGInhibitLocalEvents';
+
+{
+ * Set the period of time in seconds that local hardware events (keyboard and mouse)
+ * are suppressed after posting an event. Defaults to 0.25 second.
+ }
+function CGSetLocalEventsSuppressionInterval( seconds: CFTimeInterval ): CGError; external name '_CGSetLocalEventsSuppressionInterval';
+
+{
+ * By default, the flags that indicate modifier key state (Command, Alt, Shift, etc.)
+ * from the system's keyboard and from other event sources are ORed together as an event is
+ * posted into the system, and current key and mouse button state is considered in generating new events.
+ * This function allows your application to enable or disable the
+ * merging of event state. When combining is turned off, the event state propagated in the events
+ * posted by your app reflect state built up only by your app. The state within your app's generated
+ * event will not be combined with the system's current state, so the system-wide state reflecting key
+ * and mouse button state will remain unchanged
+ *
+ * When called with doCombineState equal to FALSE, this function initializes local (per application)
+ * state tracking information to a state of all keys, modifiers, and mouse buttons up.
+ *
+ * When called with doCombineState equal to TRUE, the current global state of keys, modifiers,
+ * and mouse buttons are used in generating events.
+ }
+function CGEnableEventStateCombining( doCombineState: boolean_t ): CGError; external name '_CGEnableEventStateCombining';
+
+{
+ * By default the system suppresses local hardware events from the keyboard and mouse during
+ * a short interval after a synthetic event is posted (see CGSetLocalEventsSuppressionInterval())
+ * and while a synthetic mouse drag (mouse movement with the left/only mouse button down).
+ *
+ * Some classes of applications may want to enable events from some of the local hardware.
+ * For example, an app may want to post only mouse events, and so may wish to permit local
+ * keyboard hardware events to pass through. Set the filter state to permit keyboard events
+ * prior to posting the mouse event after which you want to get keyboard events.
+ *
+ * This interface lets an app specify a state (event suppression interval, or mouse drag), and
+ * a mask of event categories to be passed through. The new filter state takes effect
+ * with the next event your app posts.
+ }
+const
+ kCGEventFilterMaskPermitLocalMouseEvents = $00000001; { Mouse, scroll wheel }
+ kCGEventFilterMaskPermitLocalKeyboardEvents = $00000002; { Alphanumeric keys and Command, Option, Control, Shift, AlphaLock }
+ kCGEventFilterMaskPermitSystemDefinedEvents = $00000004; { Power key, bezel buttons, sticky keys }
+type
+ CGEventFilterMask = UInt32;
+
+const
+ kCGEventSuppressionStateSuppressionInterval = 0;
+ kCGEventSuppressionStateRemoteMouseDrag = 1;
+ kCGNumberOfEventSuppressionStates = 2;
+type
+ CGEventSuppressionState = UInt32;
+
+const
+ kCGEventFilterMaskPermitAllEvents = $00000007;
+
+function CGSetLocalEventsFilterDuringSuppressionState( filter: CGEventFilterMask; state: CGEventSuppressionState ): CGError; external name '_CGSetLocalEventsFilterDuringSuppressionState';
+
+{
+ * After posting a left mouse down, with remote mouse drag suppressing hardware mouse
+ * move events, after some time with no remote mouse drag events, a warning is logged
+ * to aid in diagnosing 'my hardware mouse is dead' problems.
+ * No mechanism is provided to defeat this timeout.
+ *
+ * Mouse-down conditions of arbitrary length may be produced deliberately, as when scrolling
+ * through a lengthly document.
+ }
+const
+ kCGMouseDownEventMaskingDeadSwitchTimeout = 60.0;
+
+
+{
+ * Helper function to connect or disconnect the mouse and mouse cursor while the calling app
+ * is in the foreground.
+ *
+ * While disconnected, mouse move and drag events will reflect the current position of
+ * the mouse cursor position, which will not change with mouse movement. Use the
+ * <CoreGraphics/CGDirectDisplay.h> function:
+ *
+ * void CGGetLastMouseDelta( CGMouseDelta * deltaX, CGMouseDelta * deltaY );
+ *
+ * This will report mouse movement associated with the last mouse move or drag event.
+ *
+ * To update the display cursor position, use the function defined in this module:
+ *
+ * CGError CGWarpMouseCursorPosition( CGPoint newCursorPosition );
+ *
+ * Note: The Force Quit key combination (CMD-OPT-ESC by default) will reconnect the mouse and cursor.
+ }
+function CGAssociateMouseAndMouseCursorPosition( connected: boolean_t ): CGError; external name '_CGAssociateMouseAndMouseCursorPosition';
+
+{
+ * Some classes of applications need to detect when the window server process dies, or
+ * is not running. The easiest way to do this is to use a CFMachPortRef.
+ *
+ * If the CoreGraphics window server is not running, this function returns NULL.
+ * If the server is running, a CFMachPortRef is returned.
+ *
+ * A program can register a callback function to use a CFMachPortRef to determine
+ * when the CoreGraphics window server exits:
+ *
+ * static void handleWindowServerDeath( CFMachPortRef port, void *info )
+ * (
+ * printf( "Window Server port death detected!\n" );
+ * CFRelease( port );
+ * exit( 1 );
+ * )
+ *
+ * static void watchForServerDeath()
+ * (
+ * CFMachPortRef port;
+ *
+ * port = CGWindowServerCFMachPort();
+ * CFMachPortSetInvalidationCallBack( port, handleWindowServerDeath );
+ * )
+ *
+ * Note that when the window server exits, there may be a few seconds during which
+ * no window server is running, until the operating system starts a new
+ * window server/loginwindow pair of processes. This function will return NULL
+ * until a new window server is running.
+ *
+ * Multiple calls to this function may return multiple CFMachPortRefs, each referring
+ * to the same Mach port. Multiple callbacks registered on multiple CFMachPortRefs
+ * obtained in this way may fire in a nondetermanistic manner.
+ *
+ * Your program will need to run a CFRunLoop for the port death
+ * callback to function. A program which does not use a CFRunLoop may use
+ * CFMachPortIsValid(CFMachPortRef port) periodically to check if the port is valid.
+ }
+function CGWindowServerCFMachPort: CFMachPortRef; external name '_CGWindowServerCFMachPort';
+
+
+{
+ * OBSOLETE!
+ *
+ * Present for backwards compatibility with old header typos.
+ }
+{
+#define kCGEventSupressionStateSupressionInterval kCGEventSuppressionStateSuppressionInterval
+#define kCGEventSupressionStateRemoteMouseDrag kCGEventSuppressionStateRemoteMouseDrag
+#define kCGNumberOfEventSupressionStates kCGNumberOfEventSuppressionStates
+#define CGEventSupressionState CGEventSuppressionState
+#define CGSetLocalEventsFilterDuringSupressionState(filter, state) \
+ CGSetLocalEventsFilterDuringSuppressionState(filter, state)
+}
+
+{unit Components}
+{
+ File: Components.p
+
+ Contains: Component Manager Interfaces.
+
+ Version: Technology: QuickTime 5.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1991-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ kAppleManufacturer = $6170706C (* 'appl' *); { Apple supplied components }
+ kComponentResourceType = $74686E67 (* 'thng' *); { a components resource type }
+ kComponentAliasResourceType = $74686761 (* 'thga' *); { component alias resource type }
+
+ kAnyComponentType = 0;
+ kAnyComponentSubType = 0;
+ kAnyComponentManufacturer = 0;
+ kAnyComponentFlagsMask = 0;
+
+ cmpIsMissing = $20000000;
+ cmpWantsRegisterMessage = $80000000;
+
+ kComponentOpenSelect = -1; { ComponentInstance for this open }
+ kComponentCloseSelect = -2; { ComponentInstance for this close }
+ kComponentCanDoSelect = -3; { selector # being queried }
+ kComponentVersionSelect = -4; { no params }
+ kComponentRegisterSelect = -5; { no params }
+ kComponentTargetSelect = -6; { ComponentInstance for top of call chain }
+ kComponentUnregisterSelect = -7; { no params }
+ kComponentGetMPWorkFunctionSelect = -8; { some params }
+ kComponentExecuteWiredActionSelect = -9; { QTAtomContainer actionContainer, QTAtom actionAtom, QTCustomActionTargetPtr target, QTEventRecordPtr event }
+ kComponentGetPublicResourceSelect = -10; { OSType resourceType, short resourceId, Handle *resource }
+
+ { Component Resource Extension flags }
+ componentDoAutoVersion = $01;
+ componentWantsUnregister = $02;
+ componentAutoVersionIncludeFlags = $04;
+ componentHasMultiplePlatforms = $08;
+ componentLoadResident = $10;
+
+
+ { Set Default Component flags }
+ defaultComponentIdentical = 0;
+ defaultComponentAnyFlags = 1;
+ defaultComponentAnyManufacturer = 2;
+ defaultComponentAnySubType = 4;
+ defaultComponentAnyFlagsAnyManufacturer = 3;
+ defaultComponentAnyFlagsAnyManufacturerAnySubType = 7;
+
+ { RegisterComponentResource flags }
+ registerComponentGlobal = 1;
+ registerComponentNoDuplicates = 2;
+ registerComponentAfterExisting = 4;
+ registerComponentAliasesOnly = 8;
+
+
+type
+ ComponentDescriptionPtr = ^ComponentDescription;
+ ComponentDescription = record
+ componentType: OSType; { A unique 4-byte code indentifying the command set }
+ componentSubType: OSType; { Particular flavor of this instance }
+ componentManufacturer: OSType; { Vendor indentification }
+ componentFlags: UInt32; { 8 each for Component,Type,SubType,Manuf/revision }
+ componentFlagsMask: UInt32; { Mask for specifying which flags to consider in search, zero during registration }
+ end;
+
+
+ ResourceSpecPtr = ^ResourceSpec;
+ ResourceSpec = record
+ resType: OSType; { 4-byte code }
+ resID: SInt16; { }
+ end;
+
+ ComponentResourcePtr = ^ComponentResource;
+ ComponentResource = record
+ cd: ComponentDescription; { Registration parameters }
+ component: ResourceSpec; { resource where Component code is found }
+ componentName: ResourceSpec; { name string resource }
+ componentInfo: ResourceSpec; { info string resource }
+ componentIcon: ResourceSpec; { icon resource }
+ end;
+
+ ComponentResourceHandle = ^ComponentResourcePtr;
+ ComponentPlatformInfoPtr = ^ComponentPlatformInfo;
+ ComponentPlatformInfo = record
+ componentFlags: SInt32; { flags of Component }
+ component: ResourceSpec; { resource where Component code is found }
+ platformType: SInt16; { gestaltSysArchitecture result }
+ end;
+
+ ComponentResourceExtensionPtr = ^ComponentResourceExtension;
+ ComponentResourceExtension = record
+ componentVersion: SInt32; { version of Component }
+ componentRegisterFlags: SInt32; { flags for registration }
+ componentIconFamily: SInt16; { resource id of Icon Family }
+ end;
+
+ ComponentPlatformInfoArrayPtr = ^ComponentPlatformInfoArray;
+ ComponentPlatformInfoArray = record
+ count: SInt32;
+ platformArray: array [0..0] of ComponentPlatformInfo;
+ end;
+
+ ExtComponentResourcePtr = ^ExtComponentResource;
+ ExtComponentResource = record
+ cd: ComponentDescription; { registration parameters }
+ component: ResourceSpec; { resource where Component code is found }
+ componentName: ResourceSpec; { name string resource }
+ componentInfo: ResourceSpec; { info string resource }
+ componentIcon: ResourceSpec; { icon resource }
+ componentVersion: SInt32; { version of Component }
+ componentRegisterFlags: SInt32; { flags for registration }
+ componentIconFamily: SInt16; { resource id of Icon Family }
+ count: SInt32; { elements in platformArray }
+ platformArray: array [0..0] of ComponentPlatformInfo;
+ end;
+
+ ExtComponentResourceHandle = ^ExtComponentResourcePtr;
+ ComponentAliasResourcePtr = ^ComponentAliasResource;
+ ComponentAliasResource = record
+ cr: ComponentResource; { Registration parameters }
+ aliasCD: ComponentDescription; { component alias description }
+ end;
+
+ { Structure received by Component: }
+ ComponentParametersPtr = ^ComponentParameters;
+ ComponentParameters = packed record
+ flags: UInt8; { call modifiers: sync/async, deferred, immed, etc }
+ paramSize: UInt8; { size in bytes of actual parameters passed to this call }
+ what: SInt16; { routine selector, negative for Component management calls }
+ params: array [0..0] of SInt32; { actual parameters for the indicated routine }
+ end;
+
+ ComponentRecordPtr = ^ComponentRecord;
+ ComponentRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ Component = ^ComponentRecord;
+ ComponentInstanceRecordPtr = ^ComponentInstanceRecord;
+ ComponentInstanceRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ ComponentInstance = ^ComponentInstanceRecord;
+ RegisteredComponentRecordPtr = ^RegisteredComponentRecord;
+ RegisteredComponentRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ RegisteredComponentInstanceRecordPtr = ^RegisteredComponentInstanceRecord;
+ RegisteredComponentInstanceRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ ComponentResult = SInt32;
+
+const
+ platform68k = 1; { platform type (response from gestaltComponentPlatform) }
+ platformPowerPC = 2; { (when gestaltComponentPlatform is not implemented, use }
+ platformInterpreted = 3; { gestaltSysArchitecture) }
+ platformWin32 = 4;
+ platformPowerPCNativeEntryPoint = 5;
+
+ mpWorkFlagDoWork = $01;
+ mpWorkFlagDoCompletion = $02;
+ mpWorkFlagCopyWorkBlock = $04;
+ mpWorkFlagDontBlock = $08;
+ mpWorkFlagGetProcessorCount = $10;
+ mpWorkFlagGetIsRunning = $40;
+
+ cmpAliasNoFlags = 0;
+ cmpAliasOnlyThisFile = 1;
+
+
+type
+ ComponentMPWorkFunctionHeaderRecordPtr = ^ComponentMPWorkFunctionHeaderRecord;
+ ComponentMPWorkFunctionHeaderRecord = record
+ headerSize: UInt32;
+ recordSize: UInt32;
+ workFlags: UInt32;
+ processorCount: UInt16;
+ unused: SInt8;
+ isRunning: SInt8;
+ end;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ ComponentMPWorkFunctionProcPtr = function(globalRefCon: UnivPtr; header: ComponentMPWorkFunctionHeaderRecordPtr): ComponentResult;
+{$elsec}
+ ComponentMPWorkFunctionProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ ComponentRoutineProcPtr = function(var cp: ComponentParameters; componentStorage: Handle): ComponentResult;
+{$elsec}
+ ComponentRoutineProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ GetMissingComponentResourceProcPtr = function(c: Component; resType: OSType; resID: SInt16; refCon: UnivPtr; var resource: Handle): OSErr;
+{$elsec}
+ GetMissingComponentResourceProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ ComponentMPWorkFunctionUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ComponentMPWorkFunctionUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ ComponentRoutineUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ComponentRoutineUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ GetMissingComponentResourceUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ GetMissingComponentResourceUPP = UniversalProcPtr;
+{$endc}
+ {
+ The parameter list for each ComponentFunction is unique. It is
+ therefore up to users to create the appropriate procInfo for their
+ own ComponentFunctions where necessary.
+ }
+ ComponentFunctionUPP = UniversalProcPtr;
+ {
+ * NewComponentFunctionUPP()
+ *
+ * Discussion:
+ * For use in writing a Carbon compliant Component. It is used to
+ * create a ComponentFunctionUPP needed to call
+ * CallComponentFunction in the Components dispatch routine.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewComponentFunctionUPP(userRoutine: ProcPtr; procInfo: ProcInfoType): ComponentFunctionUPP; external name '_NewComponentFunctionUPP';
+
+{
+ * DisposeComponentFunctionUPP()
+ *
+ * Discussion:
+ * For use in writing a Carbon compliant Component. It is used to
+ * dispose of a ComponentFunctionUPP created by
+ * NewComponentFunctionUPP.
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeComponentFunctionUPP(userUPP: ComponentFunctionUPP); external name '_DisposeComponentFunctionUPP';
+
+
+{
+ * CallComponentUPP
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+
+
+{*******************************************************
+* *
+* APPLICATION LEVEL CALLS *
+* *
+*******************************************************}
+{*******************************************************
+* Component Database Add, Delete, and Query Routines
+*******************************************************}
+{
+ * RegisterComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function RegisterComponent(var cd: ComponentDescription; componentEntryPoint: ComponentRoutineUPP; global: SInt16; componentName: Handle; componentInfo: Handle; componentIcon: Handle): Component; external name '_RegisterComponent';
+{
+ * RegisterComponentResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function RegisterComponentResource(cr: ComponentResourceHandle; global: SInt16): Component; external name '_RegisterComponentResource';
+{
+ * UnregisterComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function UnregisterComponent(aComponent: Component): OSErr; external name '_UnregisterComponent';
+{
+ * FindNextComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function FindNextComponent(aComponent: Component; var looking: ComponentDescription): Component; external name '_FindNextComponent';
+{
+ * CountComponents()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CountComponents(var looking: ComponentDescription): SInt32; external name '_CountComponents';
+{
+ * GetComponentInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetComponentInfo(aComponent: Component; var cd: ComponentDescription; componentName: Handle; componentInfo: Handle; componentIcon: Handle): OSErr; external name '_GetComponentInfo';
+{
+ * GetComponentListModSeed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetComponentListModSeed: SInt32; external name '_GetComponentListModSeed';
+{
+ * GetComponentTypeModSeed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetComponentTypeModSeed(componentType: OSType): SInt32; external name '_GetComponentTypeModSeed';
+{*******************************************************
+* Component Instance Allocation and dispatch routines
+*******************************************************}
+{
+ * OpenAComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function OpenAComponent(aComponent: Component; var ci: ComponentInstance): OSErr; external name '_OpenAComponent';
+{
+ * OpenComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function OpenComponent(aComponent: Component): ComponentInstance; external name '_OpenComponent';
+{
+ * CloseComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CloseComponent(aComponentInstance: ComponentInstance): OSErr; external name '_CloseComponent';
+{
+ * GetComponentInstanceError()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetComponentInstanceError(aComponentInstance: ComponentInstance): OSErr; external name '_GetComponentInstanceError';
+{*******************************************************
+* Component aliases
+*******************************************************}
+{
+ * ResolveComponentAlias()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ResolveComponentAlias(aComponent: Component): Component; external name '_ResolveComponentAlias';
+{*******************************************************
+* Component public resources and public string lists
+*******************************************************}
+{ Note: GetComponentPublicResource returns a Handle, not a resource. The caller must dispose it with DisposeHandle. }
+{
+ * GetComponentPublicResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetComponentPublicResource(aComponent: Component; resourceType: OSType; resourceID: SInt16; var theResource: Handle): OSErr; external name '_GetComponentPublicResource';
+{
+ * GetComponentPublicResourceList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetComponentPublicResourceList(resourceType: OSType; resourceID: SInt16; flags: SInt32; var cd: ComponentDescription; missingProc: GetMissingComponentResourceUPP; refCon: UnivPtr; atomContainerPtr: UnivPtr): OSErr; external name '_GetComponentPublicResourceList';
+{
+ * GetComponentPublicIndString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 4.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetComponentPublicIndString(aComponent: Component; var theString: Str255; strListID: SInt16; index: SInt16): OSErr; external name '_GetComponentPublicIndString';
+{*******************************************************
+* *
+* CALLS MADE BY COMPONENTS *
+* *
+*******************************************************}
+{*******************************************************
+* Component Management routines
+*******************************************************}
+{
+ * SetComponentInstanceError()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetComponentInstanceError(aComponentInstance: ComponentInstance; theError: OSErr); external name '_SetComponentInstanceError';
+{
+ * GetComponentRefcon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetComponentRefcon(aComponent: Component): SInt32; external name '_GetComponentRefcon';
+{
+ * SetComponentRefcon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetComponentRefcon(aComponent: Component; theRefcon: SInt32); external name '_SetComponentRefcon';
+{
+ * OpenComponentResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function OpenComponentResFile(aComponent: Component): SInt16; external name '_OpenComponentResFile';
+{
+ * OpenAComponentResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function OpenAComponentResFile(aComponent: Component; var resRef: SInt16): OSErr; external name '_OpenAComponentResFile';
+{
+ * CloseComponentResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CloseComponentResFile(refnum: SInt16): OSErr; external name '_CloseComponentResFile';
+{ Note: GetComponentResource returns a Handle, not a resource. The caller must dispose it with DisposeHandle. }
+{
+ * GetComponentResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetComponentResource(aComponent: Component; resType: OSType; resID: SInt16; var theResource: Handle): OSErr; external name '_GetComponentResource';
+{
+ * GetComponentIndString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetComponentIndString(aComponent: Component; var theString: Str255; strListID: SInt16; index: SInt16): OSErr; external name '_GetComponentIndString';
+{*******************************************************
+* Component Instance Management routines
+*******************************************************}
+{
+ * GetComponentInstanceStorage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetComponentInstanceStorage(aComponentInstance: ComponentInstance): Handle; external name '_GetComponentInstanceStorage';
+{
+ * SetComponentInstanceStorage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetComponentInstanceStorage(aComponentInstance: ComponentInstance; theStorage: Handle); external name '_SetComponentInstanceStorage';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * GetComponentInstanceA5()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetComponentInstanceA5(aComponentInstance: ComponentInstance): SInt32; external name '_GetComponentInstanceA5';
+{
+ * SetComponentInstanceA5()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetComponentInstanceA5(aComponentInstance: ComponentInstance; theA5: SInt32); external name '_SetComponentInstanceA5';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * CountComponentInstances()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CountComponentInstances(aComponent: Component): SInt32; external name '_CountComponentInstances';
+{ useful helper routines for convenient method dispatching }
+{
+ * CallComponentFunction()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CallComponentFunction(var params: ComponentParameters; func: ComponentFunctionUPP): SInt32; external name '_CallComponentFunction';
+{
+ * CallComponentFunctionWithStorage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CallComponentFunctionWithStorage(storage: Handle; var params: ComponentParameters; func: ComponentFunctionUPP): SInt32; external name '_CallComponentFunctionWithStorage';
+
+{
+ * CallComponentFunctionWithStorageProcInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CallComponentFunctionWithStorageProcInfo(storage: Handle; var params: ComponentParameters; func: ProcPtr; funcProcInfo: ProcInfoType): SInt32; external name '_CallComponentFunctionWithStorageProcInfo';
+
+{
+ * DelegateComponentCall()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DelegateComponentCall(var originalParams: ComponentParameters; ci: ComponentInstance): SInt32; external name '_DelegateComponentCall';
+{
+ * SetDefaultComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetDefaultComponent(aComponent: Component; flags: SInt16): OSErr; external name '_SetDefaultComponent';
+{
+ * OpenDefaultComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function OpenDefaultComponent(componentType: OSType; componentSubType: OSType): ComponentInstance; external name '_OpenDefaultComponent';
+{
+ * OpenADefaultComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function OpenADefaultComponent(componentType: OSType; componentSubType: OSType; var ci: ComponentInstance): OSErr; external name '_OpenADefaultComponent';
+{
+ * CaptureComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CaptureComponent(capturedComponent: Component; capturingComponent: Component): Component; external name '_CaptureComponent';
+{
+ * UncaptureComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function UncaptureComponent(aComponent: Component): OSErr; external name '_UncaptureComponent';
+{
+ * RegisterComponentResourceFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function RegisterComponentResourceFile(resRefNum: SInt16; global: SInt16): SInt32; external name '_RegisterComponentResourceFile';
+{
+ * GetComponentIconSuite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetComponentIconSuite(aComponent: Component; var iconSuite: Handle): OSErr; external name '_GetComponentIconSuite';
+{*******************************************************
+* *
+* Direct calls to the Components *
+* *
+*******************************************************}
+{ Old style names }
+
+{
+ * ComponentFunctionImplemented()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ComponentFunctionImplemented(ci: ComponentInstance; ftnNumber: SInt16): SInt32; external name '_ComponentFunctionImplemented';
+{
+ * GetComponentVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetComponentVersion(ci: ComponentInstance): SInt32; external name '_GetComponentVersion';
+{
+ * ComponentSetTarget()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ComponentSetTarget(ci: ComponentInstance; target: ComponentInstance): SInt32; external name '_ComponentSetTarget';
+{ New style names }
+
+{
+ * CallComponentOpen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CallComponentOpen(ci: ComponentInstance; self: ComponentInstance): ComponentResult; external name '_CallComponentOpen';
+{
+ * CallComponentClose()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CallComponentClose(ci: ComponentInstance; self: ComponentInstance): ComponentResult; external name '_CallComponentClose';
+{
+ * CallComponentCanDo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CallComponentCanDo(ci: ComponentInstance; ftnNumber: SInt16): ComponentResult; external name '_CallComponentCanDo';
+{
+ * CallComponentVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CallComponentVersion(ci: ComponentInstance): ComponentResult; external name '_CallComponentVersion';
+{
+ * CallComponentRegister()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CallComponentRegister(ci: ComponentInstance): ComponentResult; external name '_CallComponentRegister';
+{
+ * CallComponentTarget()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CallComponentTarget(ci: ComponentInstance; target: ComponentInstance): ComponentResult; external name '_CallComponentTarget';
+{
+ * CallComponentUnregister()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CallComponentUnregister(ci: ComponentInstance): ComponentResult; external name '_CallComponentUnregister';
+{
+ * CallComponentGetMPWorkFunction()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CallComponentGetMPWorkFunction(ci: ComponentInstance; var workFunction: ComponentMPWorkFunctionUPP; var refCon: UnivPtr): ComponentResult; external name '_CallComponentGetMPWorkFunction';
+{
+ * CallComponentGetPublicResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib via QuickTime 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CallComponentGetPublicResource(ci: ComponentInstance; resourceType: OSType; resourceID: SInt16; var resource: Handle): ComponentResult; external name '_CallComponentGetPublicResource';
+{$ifc NOT TARGET_OS_MAC}
+{
+ CallComponent is used by ComponentGlue routines to manually call a component function.
+ }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * CallComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CallComponent(ci: ComponentInstance; var cp: ComponentParameters): ComponentResult; external name '_CallComponent';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc}
+
+{
+ CallComponentDispatch is a CarbonLib routine that replaces CallComponent inline glue
+ to call a component function.
+ }
+{
+ * CallComponentDispatch()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CallComponentDispatch(var cp: ComponentParameters): ComponentResult; external name '_CallComponentDispatch';
+
+
+{ UPP call backs }
+
+const
+ uppComponentMPWorkFunctionProcInfo = $000003F0;
+ uppComponentRoutineProcInfo = $000003F0;
+ uppGetMissingComponentResourceProcInfo = $0000FBE0;
+ {
+ * NewComponentMPWorkFunctionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewComponentMPWorkFunctionUPP(userRoutine: ComponentMPWorkFunctionProcPtr): ComponentMPWorkFunctionUPP; external name '_NewComponentMPWorkFunctionUPP'; { old name was NewComponentMPWorkFunctionProc }
+{
+ * NewComponentRoutineUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewComponentRoutineUPP(userRoutine: ComponentRoutineProcPtr): ComponentRoutineUPP; external name '_NewComponentRoutineUPP'; { old name was NewComponentRoutineProc }
+{
+ * NewGetMissingComponentResourceUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewGetMissingComponentResourceUPP(userRoutine: GetMissingComponentResourceProcPtr): GetMissingComponentResourceUPP; external name '_NewGetMissingComponentResourceUPP'; { old name was NewGetMissingComponentResourceProc }
+{
+ * DisposeComponentMPWorkFunctionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeComponentMPWorkFunctionUPP(userUPP: ComponentMPWorkFunctionUPP); external name '_DisposeComponentMPWorkFunctionUPP';
+{
+ * DisposeComponentRoutineUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeComponentRoutineUPP(userUPP: ComponentRoutineUPP); external name '_DisposeComponentRoutineUPP';
+{
+ * DisposeGetMissingComponentResourceUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeGetMissingComponentResourceUPP(userUPP: GetMissingComponentResourceUPP); external name '_DisposeGetMissingComponentResourceUPP';
+{
+ * InvokeComponentMPWorkFunctionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeComponentMPWorkFunctionUPP(globalRefCon: UnivPtr; header: ComponentMPWorkFunctionHeaderRecordPtr; userRoutine: ComponentMPWorkFunctionUPP): ComponentResult; external name '_InvokeComponentMPWorkFunctionUPP'; { old name was CallComponentMPWorkFunctionProc }
+{
+ * InvokeComponentRoutineUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeComponentRoutineUPP(var cp: ComponentParameters; componentStorage: Handle; userRoutine: ComponentRoutineUPP): ComponentResult; external name '_InvokeComponentRoutineUPP'; { old name was CallComponentRoutineProc }
+{
+ * InvokeGetMissingComponentResourceUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeGetMissingComponentResourceUPP(c: Component; resType: OSType; resID: SInt16; refCon: UnivPtr; var resource: Handle; userRoutine: GetMissingComponentResourceUPP): OSErr; external name '_InvokeGetMissingComponentResourceUPP'; { old name was CallGetMissingComponentResourceProc }
+{ ProcInfos }
+
+
+{$ALIGN MAC68K}
+
+
+{unit Debugging}
+{
+ File: Debugging.p
+
+ Contains: Macros to handle exceptions and assertions.
+
+ Version: Technology: Carbon
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1989-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{
+ ______________________________________________________________________________________
+
+ This file defines standard exception handling and assertion macros for
+ system-level programming in C. Originally used in QuickDraw GX, and heavily
+ modified since, these macros are used extensively throughout Mac OS system
+ software. Now *you* can look and feel like a system software engineer.
+
+ To activate debugger breaks, #define DEBUG to 1 (one) before including this file.
+ Five further levels of debugging are available, selected by #defining one
+ of the following conditionals to 1 after DEBUG is defined to 1.
+
+ DEBUG_INTERNAL the default; includes file and line number information
+
+ DEBUG_EXTERNAL used for code which must ship to developers outside
+ your organization; no file or line number information is
+ included in asserts
+
+ DEBUG_BREAK_ONLY where an assertion would normally be sent to the debugger,
+ send an empty string instead.
+
+ PRODUCTION used for shipping code; no debugger breaks are emitted
+
+ PERFORMANCE same as PRODUCTION
+
+ #defining DEBUG to 0 is equivalent to #defining PRODUCTION 1 when DEBUG is 1.
+ (No code for debugger breaks is emitted in either case.)
+
+ Of the multitude of macros, the preferred ones are:
+
+ debug_string(c-string)
+ If debugging is on, c-string is printed in the debugger.
+ In production builds, debug_string() does nothing.
+
+ check(expression)
+ check_noerr(error)
+ If (expression) evaluates to false, break into the debugger.
+ In production builds, check() does nothing.
+ Code inside check() statements is not compiled into production builds.
+
+ require(expression, label)
+ require_noerr(expression, label)
+ If (expression) evaluates to false, announce this fact via the
+ debugger and then goto label. In production builds, does not call
+ the debugger but still goes to label if expression is false.
+
+ require_action(expression, label, action)
+ require_noerr_action(expression, label, action)
+ Same as require, but executes (action) before jumping to label.
+
+ check_string(expression, c-string)
+ require_string(expression, label, c-string)
+ require_noerr_string(expression, label, c-string)
+ If expression evaluates to false, print string and then proceed as in
+ a normal check/require statement
+
+ verify(expression)
+ verify_noerr(error)
+ If debugging is on, verify is the same as check(expression).
+ If debugging is off, verify still evaluates (expression)
+ but ignores the result. Code inside verify() statements
+ is executed in both production and debug builds.
+
+ Common usage:
+
+ // my pixmap is not purgeable, so locking it should never fail
+ verify( LockPixels(myPixMap) );
+ verify_noerr( DisposeThread(myThread, &threadResult, true) );
+ ______________________________________________________________________________________
+}
+
+
+{
+ ______________________________________________________________________________________
+
+ Before including this file, #define kComponentSignatureString to a C-string
+ containing the name of your client.
+
+ example: #define kComponentSignatureString "SurfWriter"
+ ______________________________________________________________________________________
+}
+
+
+{
+ ______________________________________________________________________________________
+
+ DEBUGASSERTMSG - all error reporting is routed through this macro, which calls the
+ system routine DebugAssert(). If you wish to use your own assertion/debugger break
+ routine, you can override DEBUGASSERTMSG by defining it before including this file.
+ ______________________________________________________________________________________
+}
+
+
+{$ALIGN MAC68K}
+
+{
+ * DebugAssert()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DebugLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DebugAssert(componentSignature: OSType; options: UInt32; assertionString: ConstCStringPtr; exceptionString: ConstCStringPtr; errorString: ConstCStringPtr; fileName: ConstCStringPtr; lineNumber: SInt32; value: UnivPtr); external name '_DebugAssert';
+{
+ kBlessedBusErrorBait is an address that will never be mapped
+ by Mac OS 8 or 9. It is close to the middle of the 64K range from
+ 0x68F10000 to 0x68F1FFFF that is unmapped and cannot be accessed
+ without causing an exception. Thus, it's a good value to use for
+ filling uninitialized pointers, etc.
+}
+
+const
+ kBlessedBusErrorBait = $68F168F1;
+
+
+ { TaskLevel masks }
+ k68kInterruptLevelMask = $00000007;
+ kInVBLTaskMask = $00000010;
+ kInDeferredTaskMask = $00000020;
+ kInSecondaryIntHandlerMask = $00000040;
+ kInNestedInterruptMask = $00000080;
+
+ kComponentDebugOption = 0; { optionSelectorNum to turn breaks for component on/off }
+
+ kGetDebugOption = 1; { get current debug option setting }
+ kSetDebugOption = 2; { set debug option }
+
+ {
+ DebugComponentCallback
+ DebugComponentCallback is the callback into a component that registers with DebugLib.
+ It is called to get the debug option setting, or to turn a debug option on or off.
+ Inputs:
+ optionSelectorNum The component debug option to set
+ command The command:
+ kGetDebugOption - get current debug option setting
+ kSetDebugOption - set debug option
+ Outputs:
+ optionSetting The current setting if kGetDebugOption;
+ the new debug option if kSetDebugOption
+ }
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ DebugComponentCallbackProcPtr = procedure(optionSelectorNum: SInt32; command: UInt32; var optionSetting: boolean);
+{$elsec}
+ DebugComponentCallbackProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ DebugComponentCallbackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DebugComponentCallbackUPP = UniversalProcPtr;
+{$endc}
+ {
+ TaskLevel
+ TaskLevel returns 0 if we're (probably) running at non-interrupt time.
+ There's no way to make this perfect, but this is as close as we can get.
+ If TaskLevel doesn't return 0, then the following masks can be used to learn more:
+ k68kInterruptLevelMask = 0x00000007
+ kInVBLTaskMask = 0x00000010
+ kInDeferredTaskMask = 0x00000020
+ kInSecondaryIntHandlerMask = 0x00000040
+ kInNestedInterruptMask = 0x00000080
+ }
+ {
+ * TaskLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DebugLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TaskLevel: UInt32; external name '_TaskLevel';
+{
+ NewDebugComponent
+ NewDebugComponent registers a component with DebugLib.
+ Inputs:
+ componentSignature The unique signature of component
+ componentName The displayable string naming the component
+ componentCallback The callback into component for working with options
+ Result:
+ noErr no error
+ memFullErr could not allocate memory
+ debuggingExecutionContextErr routine cannot be called at this time
+ debuggingDuplicateSignatureErr componentSignature already registered
+ debuggingInvalidNameErr componentName is invalid (NULL)
+}
+{
+ * NewDebugComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DebugLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewDebugComponent(componentSignature: OSType; const (*var*) componentName: Str255; componentCallback: DebugComponentCallbackUPP): OSStatus; external name '_NewDebugComponent';
+{
+ NewDebugOption
+ NewDebugOption registers a debug option with DebugLib.
+ Inputs:
+ componentSignature The signature of component to register a debug option for
+ optionSelectorNum The selector number of this debug option
+ optionName The displayable string naming this debug option
+ Result:
+ noErr no error
+ memFullErr could not allocate memory
+ debuggingExecutionContextErr called at interrupt time
+ debuggingDuplicateOptionErr optionSelectorNum already registered
+ debuggingInvalidSignatureErr componentSignature not registered
+ debuggingInvalidNameErr optionName is invalid (NULL)
+ debuggingNoCallbackErr debugging component has no callback
+}
+{
+ * NewDebugOption()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DebugLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewDebugOption(componentSignature: OSType; optionSelectorNum: SInt32; const (*var*) optionName: Str255): OSStatus; external name '_NewDebugOption';
+{
+ DisposeDebugComponent
+ DisposeDebugComponent removes a component registration and all related debug options from DebugLib.
+ Input:
+ componentSignature The unique signature of a component
+ Result:
+ noErr no error
+ debuggingExecutionContextErr called at interrupt time
+ debuggingInvalidSignatureErr componentSignature not registered
+}
+{
+ * DisposeDebugComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DebugLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DisposeDebugComponent(componentSignature: OSType): OSStatus; external name '_DisposeDebugComponent';
+{
+ GetDebugComponentInfo
+ GetDebugComponentInfo returns a component registered with DebugLib.
+ Inputs:
+ index The index into the list of registered components (1-based)
+ Outputs:
+ componentSignature The unique signature of a component
+ componentName The displayable string naming a component
+ Result:
+ noErr no error
+ debuggingNoMatchErr debugging component not found at this index
+}
+{
+ * GetDebugComponentInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DebugLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetDebugComponentInfo(index: UInt32; var componentSignature: OSType; var componentName: Str255): OSStatus; external name '_GetDebugComponentInfo';
+{
+ GetDebugOptionInfo
+ GetDebugOptionInfo returns a debug option registered with DebugLib.
+ Inputs:
+ index The index into the list of registered debug options (0-based);
+ 0 = kComponentDebugOption
+ componentSignature The unique signature of a component
+ Outputs:
+ optionSelectorNum The selector number of this debug option
+ optionName The displayable string naming this debug option
+ optionSetting The current debug option setting
+ Result:
+ noErr no error
+ debuggingInvalidSignatureErr componentSignature not registered
+ debuggingNoMatchErr option not found at this index
+}
+{
+ * GetDebugOptionInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DebugLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetDebugOptionInfo(index: UInt32; componentSignature: OSType; var optionSelectorNum: SInt32; var optionName: Str255; var optionSetting: boolean): OSStatus; external name '_GetDebugOptionInfo';
+{
+ SetDebugOptionValue
+ SetDebugOptionValue sets a debug option registered with DebugLib.
+ Inputs:
+ componentSignature The unique signature of a component
+ optionSelectorNum The selector number of this debug option
+ newOptionSetting The new debug option setting
+ Result:
+ noErr no error
+ debuggingInvalidSignatureErr componentSignature not registered
+ debuggingInvalidOptionErr optionSelectorNum is not registered
+}
+{
+ * SetDebugOptionValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DebugLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetDebugOptionValue(componentSignature: OSType; optionSelectorNum: SInt32; newOptionSetting: boolean): OSStatus; external name '_SetDebugOptionValue';
+{
+ DebugAssertOutputHandler
+ DebugAssertOutputHandler is the callback that registers with DebugLib to handle the
+ output from DebugAssert.
+ Inputs:
+ "componentSignature" through "value" are the raw values passed to DebugAssert
+ when an exception occurs.
+ outputMsg is the string DebugAssert build which would normally be passed to
+ DebugStr if a DebugAssertOutputHandler isn't installed.
+}
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ DebugAssertOutputHandlerProcPtr = procedure(componentSignature: OSType; options: UInt32; assertionString: ConstCStringPtr; exceptionString: ConstCStringPtr; errorString: ConstCStringPtr; fileName: ConstCStringPtr; lineNumber: SInt32; value: UnivPtr; outputMsg: Str255);
+{$elsec}
+ DebugAssertOutputHandlerProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ DebugAssertOutputHandlerUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DebugAssertOutputHandlerUPP = UniversalProcPtr;
+{$endc}
+ {
+ InstallDebugAssertOutputHandler
+ InstallDebugAssertOutputHandler installs a DebugAssertOutputHandler which DebugAssert calls
+ instead of DebugStr.
+ Inputs:
+ handler the DebugAssertOutputHandler to install or NULL to switch back to
+ the default handler (DebugStr).
+ }
+ {
+ * InstallDebugAssertOutputHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DebugLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InstallDebugAssertOutputHandler(handler: DebugAssertOutputHandlerUPP); external name '_InstallDebugAssertOutputHandler';
+{
+ dprintf() takes a variable argument list and 'prints' that to the debugging output
+ handler. Calling dprintf() from anything but C or C++ is tricky.
+}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * dprintf()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DebugLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure dprintf(format: ConstCStringPtr; ...); external name '_dprintf';
+
+
+{ vdprintf() takes a va_args list and 'prints' that to the debugging output handler. }
+{
+ * vdprintf()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DebugLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure vdprintf(format: ConstCStringPtr; va_args_list: CStringPtr); external name '_vdprintf';
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+const
+ uppDebugComponentCallbackProcInfo = $00000FC0;
+ uppDebugAssertOutputHandlerProcInfo = $00FFFFC0;
+ {
+ * NewDebugComponentCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewDebugComponentCallbackUPP(userRoutine: DebugComponentCallbackProcPtr): DebugComponentCallbackUPP; external name '_NewDebugComponentCallbackUPP'; { old name was NewDebugComponentCallbackProc }
+{
+ * NewDebugAssertOutputHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewDebugAssertOutputHandlerUPP(userRoutine: DebugAssertOutputHandlerProcPtr): DebugAssertOutputHandlerUPP; external name '_NewDebugAssertOutputHandlerUPP'; { old name was NewDebugAssertOutputHandlerProc }
+{
+ * DisposeDebugComponentCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeDebugComponentCallbackUPP(userUPP: DebugComponentCallbackUPP); external name '_DisposeDebugComponentCallbackUPP';
+{
+ * DisposeDebugAssertOutputHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeDebugAssertOutputHandlerUPP(userUPP: DebugAssertOutputHandlerUPP); external name '_DisposeDebugAssertOutputHandlerUPP';
+{
+ * InvokeDebugComponentCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeDebugComponentCallbackUPP(optionSelectorNum: SInt32; command: UInt32; var optionSetting: boolean; userRoutine: DebugComponentCallbackUPP); external name '_InvokeDebugComponentCallbackUPP'; { old name was CallDebugComponentCallbackProc }
+{
+ * InvokeDebugAssertOutputHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeDebugAssertOutputHandlerUPP(componentSignature: OSType; options: UInt32; assertionString: ConstCStringPtr; exceptionString: ConstCStringPtr; errorString: ConstCStringPtr; fileName: ConstCStringPtr; lineNumber: SInt32; value: UnivPtr; const (*var*) outputMsg: Str255; userRoutine: DebugAssertOutputHandlerUPP); external name '_InvokeDebugAssertOutputHandlerUPP'; { old name was CallDebugAssertOutputHandlerProc }
+{
+ ______________________________________________________________________________________
+
+ Tech Q&A PLAT-30 says to check bit 5 of the byte at 0xbff to
+ determine whether MacsBug ( or any other low level debugger )
+ is installed; I also check that MacJmp ( which points to the
+ entry point for the debugger ) is not nil and not -1.
+
+ MacJmpFlag:
+ Bit 5 should be set to indicate the debugger is installed.
+ Bit 6 should be set to indicate the debugger is initialized.
+ Bit 7 should be clear to indicate that the debugger is NOT busy
+
+ Dr. MacsBug says to also check that the byte at 0xBFF isn't 0xFF.
+ ______________________________________________________________________________________
+}
+{$ifc CALL_NOT_IN_CARBON}
+{$endc} {CALL_NOT_IN_CARBON}
+
+{ no-op asserts for production code }
+
+{______________________________________________________________________________________}
+{______________________________________________________________________________________}
+{______________________________________________________________________________________}
+
+
+{______________________________________________________________________________________}
+{______________________________________________________________________________________}
+{______________________________________________________________________________________}
+{______________________________________________________________________________________}
+{______________________________________________________________________________________}
+
+{______________________________________________________________________________________}
+{______________________________________________________________________________________}
+
+{______________________________________________________________________________________}
+
+{______________________________________________________________________________________}
+{______________________________________________________________________________________}
+{______________________________________________________________________________________}
+
+{______________________________________________________________________________________}
+
+{______________________________________________________________________________________}
+
+
+{______________________________________________________________________________________}
+
+
+{$ALIGN MAC68K}
+
+
+{unit InternetConfig}
+{
+ File: InternetConfig.p
+
+ Contains: Internet Config interfaces
+
+ Version: Technology: based on IC 2.5 alpha
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1999-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{*********************************************************************************************}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{***********************************************************************************************
+ IC error codes
+ ***********************************************************************************************}
+
+
+const
+ icPrefNotFoundErr = -666; { preference not found (duh!) }
+ icPermErr = -667; { cannot set preference }
+ icPrefDataErr = -668; { problem with preference data }
+ icInternalErr = -669; { hmm, this is not good }
+ icTruncatedErr = -670; { more data was present than was returned }
+ icNoMoreWritersErr = -671; { you cannot begin a write session because someone else is already doing it }
+ icNothingToOverrideErr = -672; { no component for the override component to capture }
+ icNoURLErr = -673; { no URL found }
+ icConfigNotFoundErr = -674; { no configuration was found }
+ icConfigInappropriateErr = -675; { incorrect manufacturer code }
+ icProfileNotFoundErr = -676; { profile not found }
+ icTooManyProfilesErr = -677; { too many profiles in database }
+
+ { ***********************************************************************************************
+ IC versions (not necessarily, but historically, from a component)
+ *********************************************************************************************** }
+
+ kICComponentInterfaceVersion0 = $00000000; { IC >= 1.0 }
+ kICComponentInterfaceVersion1 = $00010000; { IC >= 1.1 }
+ kICComponentInterfaceVersion2 = $00020000; { IC >= 1.2 }
+ kICComponentInterfaceVersion3 = $00030000; { IC >= 2.0 }
+ kICComponentInterfaceVersion4 = $00040000; { IC >= 2.5 }
+ kICComponentInterfaceVersion = $00040000; { current version number is 4 }
+
+ { ***********************************************************************************************
+ opaque type for preference reference
+ *********************************************************************************************** }
+
+
+type
+ ICInstance = ^SInt32; { an opaque 32-bit type }
+ ICInstancePtr = ^ICInstance; { when a var xx:ICInstance parameter can be nil, it is changed to xx: ICInstancePtr }
+
+ { ***********************************************************************************************
+ a record that specifies a folder, an array of such records, and a pointer to such an array
+ *********************************************************************************************** }
+ ICDirSpecPtr = ^ICDirSpec;
+ ICDirSpec = record
+ vRefNum: SInt16;
+ dirID: SInt32;
+ end;
+
+ ICDirSpecArray = array [0..3] of ICDirSpec;
+ ICDirSpecArrayPtr = ^ICDirSpecArray;
+
+ { ***********************************************************************************************
+ preference attributes type, bit number constants, and mask constants
+ *********************************************************************************************** }
+ ICAttr = UInt32;
+
+
+const
+ kICAttrLockedBit = 0;
+ kICAttrVolatileBit = 1;
+
+ kICAttrNoChange = $FFFFFFFF; { pass this to ICSetPref to tell it not to change the attributes }
+ kICAttrLockedMask = $00000001;
+ kICAttrVolatileMask = $00000002;
+
+ { ***********************************************************************************************
+ permissions for use with ICBegin
+ *********************************************************************************************** }
+
+
+type
+ ICPerm = UInt8;
+
+
+const
+ icNoPerm = 0;
+ icReadOnlyPerm = 1;
+ icReadWritePerm = 2;
+
+ { ***********************************************************************************************
+ a reference to an instance's current configuration
+ *********************************************************************************************** }
+
+{$ifc CALL_NOT_IN_CARBON}
+
+type
+ ICConfigRefPtr = ^ICConfigRef;
+ ICConfigRef = record
+ manufacturer: OSType;
+ { other private data follows }
+ end;
+
+ ICConfigRefHandle = ^ICConfigRefPtr;
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{***********************************************************************************************
+ profile IDs
+ ***********************************************************************************************}
+
+type
+ ICProfileID = SInt32;
+ ICProfileIDPtr = ^ICProfileID;
+
+
+const
+ kICNilProfileID = 0;
+
+ { ***********************************************************************************************
+ other constants
+ *********************************************************************************************** }
+
+ kICNoUserInteractionBit = 0;
+
+ kICNoUserInteractionMask = $00000001;
+
+ kICFileType = $49434170 (* 'ICAp' *);
+ kICCreator = $49434170 (* 'ICAp' *);
+
+ { ***********************************************************************************************
+ Apple event constants
+ *********************************************************************************************** }
+
+ kInternetEventClass = $4755524C (* 'GURL' *);
+ kAEGetURL = $4755524C (* 'GURL' *);
+ kAEFetchURL = $4655524C (* 'FURL' *);
+ keyAEAttaching = $41746368 (* 'Atch' *);
+
+ { AERegistry.i defines a compatible keyAEDestination }
+
+ kICEditPreferenceEventClass = $49434170 (* 'ICAp' *);
+ kICEditPreferenceEvent = $49434170 (* 'ICAp' *);
+ keyICEditPreferenceDestination = $64657374 (* 'dest' *);
+
+ { ***********************************************************************************************
+ constants for use with ICGetVersion
+ *********************************************************************************************** }
+
+ kICComponentVersion = 0; { Return a component version, comparable to kICComponentInterfaceVersion }
+ kICNumVersion = 1; { Return a NumVersion structure }
+
+ { ***********************************************************************************************
+ types and constants for use with kICDocumentFont, et. al.
+ *********************************************************************************************** }
+
+type
+ ICFontRecordPtr = ^ICFontRecord;
+ ICFontRecord = record
+ size: SInt16;
+ face: SInt8;
+ pad: SInt8;
+ font: Str255;
+ end;
+
+ ICFontRecordHandle = ^ICFontRecordPtr;
+
+ { ***********************************************************************************************
+ types and constants for use with kICCharacterSet, et. al.
+ *********************************************************************************************** }
+ ICCharTablePtr = ^ICCharTable;
+ ICCharTable = record
+ netToMac: packed array [0..255] of UInt8;
+ macToNet: packed array [0..255] of UInt8;
+ end;
+
+ ICCharTableHandle = ^ICCharTablePtr;
+
+ { ***********************************************************************************************
+ types and constants for use with kICHelper, et. al.
+ *********************************************************************************************** }
+ ICAppSpecPtr = ^ICAppSpec;
+ ICAppSpec = record
+ fCreator: OSType;
+ name: Str63;
+ end;
+
+ ICAppSpecHandle = ^ICAppSpecPtr;
+ ICAppSpecListPtr = ^ICAppSpecList;
+ ICAppSpecList = record
+ numberOfItems: SInt16;
+ appSpecs: array [0..0] of ICAppSpec;
+ end;
+
+ ICAppSpecListHandle = ^ICAppSpecListPtr;
+
+ { ***********************************************************************************************
+ types and constants for use with kICDownloadFolder, et. al.
+ *********************************************************************************************** }
+
+{$ifc NOT OLDROUTINENAMES}
+ ICFileSpecPtr = ^ICFileSpec;
+ ICFileSpec = record
+ volName: Str31;
+ volCreationDate: SInt32;
+ fss: FSSpec;
+ alias: AliasRecord;
+ { plus extra data, aliasSize 0 means no alias manager present when }
+ { ICFileSpecification was created }
+ end;
+
+ ICFileSpecHandle = ^ICFileSpecPtr;
+{$elsec}
+ ICFileSpecPtr = ^ICFileSpec;
+ ICFileSpec = record
+ vol_name: Str31;
+ vol_creation_date: SInt32;
+ fss: FSSpec;
+ alias: AliasRecord;
+ end;
+
+ ICFileSpecHandle = ^ICFileSpecPtr;
+{$endc}
+
+
+const
+ kICFileSpecHeaderSize = 106;
+
+ { ***********************************************************************************************
+ types and constants for use with ICMapFilename, et. al.
+ *********************************************************************************************** }
+
+type
+ ICMapEntryFlags = SInt32;
+ ICFixedLength = SInt16;
+
+{$ifc NOT OLDROUTINENAMES}
+ ICMapEntryPtr = ^ICMapEntry;
+ ICMapEntry = record
+ totalLength: SInt16;
+ fixedLength: ICFixedLength;
+ version: SInt16;
+ fileType: OSType;
+ fileCreator: OSType;
+ postCreator: OSType;
+ flags: ICMapEntryFlags;
+ { variable part starts here }
+ extension: Str255;
+ creatorAppName: Str255;
+ postAppName: Str255;
+ MIMEType: Str255;
+ entryName: Str255;
+ end;
+
+ ICMapEntryHandle = ^ICMapEntryPtr;
+
+{$elsec}
+ ICMapEntryPtr = ^ICMapEntry;
+ ICMapEntry = record
+ total_length: SInt16;
+ fixed_length: ICFixedLength;
+ version: SInt16;
+ file_type: OSType;
+ file_creator: OSType;
+ post_creator: OSType;
+ flags: ICMapEntryFlags;
+ extension: Str255;
+ creator_app_name: Str255;
+ post_app_name: Str255;
+ MIME_type: Str255;
+ entry_name: Str255;
+ end;
+
+ ICMapEntryHandle = ^ICMapEntryPtr;
+{$endc}
+
+
+const
+ kICMapFixedLength = 22; { number in fixedLength field }
+
+ kICMapBinaryBit = 0; { file should be transfered in binary as opposed to text mode }
+ kICMapResourceForkBit = 1; { the resource fork of the file is significant }
+ kICMapDataForkBit = 2; { the data fork of the file is significant }
+ kICMapPostBit = 3; { post process using post fields }
+ kICMapNotIncomingBit = 4; { ignore this mapping for incoming files }
+ kICMapNotOutgoingBit = 5; { ignore this mapping for outgoing files }
+
+ kICMapBinaryMask = $00000001; { file should be transfered in binary as opposed to text mode }
+ kICMapResourceForkMask = $00000002; { the resource fork of the file is significant }
+ kICMapDataForkMask = $00000004; { the data fork of the file is significant }
+ kICMapPostMask = $00000008; { post process using post fields }
+ kICMapNotIncomingMask = $00000010; { ignore this mapping for incoming files }
+ kICMapNotOutgoingMask = $00000020; { ignore this mapping for outgoing files }
+
+ { ***********************************************************************************************
+ types and constants for use with kICServices, et. al.
+ *********************************************************************************************** }
+
+type
+ ICServiceEntryFlags = SInt16;
+ ICServiceEntryPtr = ^ICServiceEntry;
+ ICServiceEntry = record
+ name: Str255;
+ port: SInt16;
+ flags: ICServiceEntryFlags;
+ end;
+
+ ICServiceEntryHandle = ^ICServiceEntryPtr;
+
+
+const
+ kICServicesTCPBit = 0;
+ kICServicesUDPBit = 1; { both bits can be set, which means the service is both TCP and UDP, eg daytime }
+
+ kICServicesTCPMask = $00000001;
+ kICServicesUDPMask = $00000002; { both bits can be set, which means the service is both TCP and UDP, eg daytime }
+
+
+type
+ ICServicesPtr = ^ICServices;
+ ICServices = record
+ count: SInt16;
+ services: array [0..0] of ICServiceEntry;
+ end;
+
+ ICServicesHandle = ^ICServicesPtr;
+
+ { ***********************************************************************************************
+ default file name, for internal use, overridden by a component resource
+ *********************************************************************************************** }
+
+{$ifc CALL_NOT_IN_CARBON}
+
+const
+ kICDefaultFileName = 'Internet Preferences';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{***********************************************************************************************
+ keys
+ ***********************************************************************************************}
+{
+ key reserved for use by Internet Config
+}
+
+const
+ kICReservedKey = 'kICReservedKey';
+ {
+ STR# -- formatted, list of Archie servers
+ }
+ kICArchieAll = 'ArchieAll';
+ {
+ PString -- formatted, preferred Archie server
+ }
+ kICArchiePreferred = 'ArchiePreferred';
+ {
+ ICCharTable -- Mac-to-Net and Net-to-Mac character translation
+ }
+ kICCharacterSet = 'CharacterSet';
+ {
+ ICFontRecord -- font used for proportional text
+ }
+ kICDocumentFont = 'DocumentFont';
+ {
+ ICFileSpec -- where to put newly downloaded files
+ }
+ kICDownloadFolder = 'DownloadFolder';
+ {
+ PString -- user@host.domain, email address of user, ie return address
+ }
+ kICEmail = 'Email';
+ {
+ PString -- host.domain, default FTP server
+ }
+ kICFTPHost = 'FTPHost';
+ {
+ PString -- second level FTP proxy authorisation
+ }
+ kICFTPProxyAccount = 'FTPProxyAccount';
+ {
+ PString -- host.domain
+ }
+ kICFTPProxyHost = 'FTPProxyHost';
+ {
+ PString -- scrambled, password for FTPProxyUser
+ }
+ kICFTPProxyPassword = 'FTPProxyPassword';
+ {
+ PString -- first level FTP proxy authorisation
+ }
+ kICFTPProxyUser = 'FTPProxyUser';
+ {
+ PString -- host.domain, default finger server
+ }
+ kICFingerHost = 'FingerHost';
+ {
+ PString -- host.domain, default Gopher server
+ }
+ kICGopherHost = 'GopherHost';
+ {
+ PString -- host.domain, see note in Prog Docs
+ }
+ kICGopherProxy = 'GopherProxy';
+ {
+ PString -- host.domain
+ }
+ kICHTTPProxyHost = 'HTTPProxyHost';
+ {
+ ICAppSpec -- helpers for URL schemes
+ }
+ kICHelper = 'Helper¥';
+ {
+ PString -- description for URL scheme
+ }
+ kICHelperDesc = 'HelperDesc¥';
+ {
+ ICAppSpecList -- list of common helpers for URL schemes
+ }
+ kICHelperList = 'HelperList¥';
+ {
+ PString -- host.domain, Internet Relay Chat server
+ }
+ kICIRCHost = 'IRCHost';
+ {
+ STR# -- formatted, list of Info-Mac servers
+ }
+ kICInfoMacAll = 'InfoMacAll';
+ {
+ PString -- formatted, preferred Info-Mac server
+ }
+ kICInfoMacPreferred = 'InfoMacPreferred';
+ {
+ PString -- string LDAP thing
+ }
+ kICLDAPSearchbase = 'LDAPSearchbase';
+ {
+ PString -- host.domain
+ }
+ kICLDAPServer = 'LDAPServer';
+ {
+ ICFontRecord -- font used for lists of items (eg news article lists)
+ }
+ kICListFont = 'ListFont';
+ {
+ PString -- host for MacSearch queries
+ }
+ kICMacSearchHost = 'MacSearchHost';
+ {
+ PString -- user@host.domain, account from which to fetch mail
+ }
+ kICMailAccount = 'MailAccount';
+ {
+ TEXT -- extra headers for mail messages
+ }
+ kICMailHeaders = 'MailHeaders';
+ {
+ PString -- scrambled, password for MailAccount
+ }
+ kICMailPassword = 'MailPassword';
+ {
+ ICMapEntries -- file type mapping, see documentation
+ }
+ kICMapping = 'Mapping';
+ {
+ PString -- host.domain, NNTP server
+ }
+ kICNNTPHost = 'NNTPHost';
+ {
+ PString -- host.domain, Network Time Protocol (NTP)
+ }
+ kICNTPHost = 'NTPHost';
+ {
+ Boolean
+ }
+ kICNewMailDialog = 'NewMailDialog';
+ {
+ Boolean -- how to announce new mail
+ }
+ kICNewMailFlashIcon = 'NewMailFlashIcon';
+ {
+ Boolean
+ }
+ kICNewMailPlaySound = 'NewMailPlaySound';
+ {
+ PString
+ }
+ kICNewMailSoundName = 'NewMailSoundName';
+ {
+ PString -- scrambled, password for NewsAuthUsername
+ }
+ kICNewsAuthPassword = 'NewsAuthPassword';
+ {
+ PString -- user name for authorised news servers
+ }
+ kICNewsAuthUsername = 'NewsAuthUsername';
+ {
+ TEXT -- extra headers for news messages
+ }
+ kICNewsHeaders = 'NewsHeaders';
+ {
+ STR# -- list of domains not to be proxied
+ }
+ kICNoProxyDomains = 'NoProxyDomains';
+ {
+ PString -- for X-Organization string
+ }
+ kICOrganization = 'Organization';
+ {
+ PString -- host.domain, default Ph server
+ }
+ kICPhHost = 'PhHost';
+ {
+ TEXT -- default response for finger servers
+ }
+ kICPlan = $506C616E (* 'Plan' *);
+ {
+ ICFontRecord -- font used to print ScreenFont
+ }
+ kICPrinterFont = 'PrinterFont';
+ {
+ PString -- used to quote responses in news and mail
+ }
+ kICQuotingString = 'QuotingString';
+ {
+ PString -- real name of user
+ }
+ kICRealName = 'RealName';
+ {
+ PString -- RTSP Proxy Host
+ }
+ kICRTSPProxyHost = 'RTSPProxyHost';
+ {
+ PString -- host.domain, SMTP server
+ }
+ kICSMTPHost = 'SMTPHost';
+ {
+ ICFontRecord -- font used for monospaced text (eg news articles)
+ }
+ kICScreenFont = 'ScreenFont';
+ {
+ ICServices -- TCP and IP port-to-name mapping
+ }
+ kICServices = 'Services';
+ {
+ TEXT -- append to news and mail messages
+ }
+ kICSignature = 'Signature';
+ {
+ TEXT -- preferred mailing address
+ }
+ kICSnailMailAddress = 'SnailMailAddress';
+ {
+ PString -- host.domain, remember that host.domain format allows ":port" and " port"
+ }
+ kICSocksHost = 'SocksHost';
+ {
+ PString -- host.domain, default Telnet address
+ }
+ kICTelnetHost = 'TelnetHost';
+ {
+ STR# -- formatted, list of UMich servers
+ }
+ kICUMichAll = 'UMichAll';
+ {
+ PString -- formatted, preferred UMich server
+ }
+ kICUMichPreferred = 'UMichPreferred';
+ {
+ Boolean
+ }
+ kICUseFTPProxy = 'UseFTPProxy';
+ {
+ Boolean
+ }
+ kICUseGopherProxy = 'UseGopherProxy';
+ {
+ Boolean
+ }
+ kICUseHTTPProxy = 'UseHTTPProxy';
+ {
+ Boolean -- use PASV command for FTP transfers
+ }
+ kICUsePassiveFTP = 'UsePassiveFTP';
+ {
+ Boolean
+ }
+ kICUseRTSPProxy = 'UseRTSPProxy';
+ {
+ Boolean
+ }
+ kICUseSocks = 'UseSocks';
+ {
+ PString -- no idea
+ }
+ kICWAISGateway = 'WAISGateway';
+ {
+ PString -- URL, users default WWW page
+ }
+ kICWWWHomePage = 'WWWHomePage';
+ {
+ RGBColor -- background colour for web pages
+ }
+ kICWebBackgroundColour = 'WebBackgroundColour';
+ {
+ RGBColor -- colour for read links
+ }
+ kICWebReadColor = '646F6777¥WebReadColor';
+ {
+ PString -- URL, users default search page
+ }
+ kICWebSearchPagePrefs = 'WebSearchPagePrefs';
+ {
+ RGBColor -- colour for normal text
+ }
+ kICWebTextColor = 'WebTextColor';
+ {
+ Boolean -- whether to underline links
+ }
+ kICWebUnderlineLinks = '646F6777¥WebUnderlineLinks';
+ {
+ RGBColor -- colour for unread links
+ }
+ kICWebUnreadColor = '646F6777¥WebUnreadColor';
+ {
+ PString -- host.domain, default whois server
+ }
+ kICWhoisHost = 'WhoisHost';
+
+ { ***********************************************************************************************
+
+ FUNCTIONS
+
+ What do the annotations after each API mean?
+ --------------------------------------------
+
+ [r1] Requires IC 1.1 or higher.
+ [r2] Requires IC 1.2 or higher.
+ [r3] Requires IC 2.0 or higher.
+ [r4] Requires IC 2.5 or higher.
+
+ IMPORTANT:
+
+ In IC 2.5, instances automatically use the default configuration.
+ You no longer need to configure an instance explicitly, except
+ if your code might run with an older version of IC. So the following
+ notes only apply to IC 2.0 and earlier.
+
+ [c1] You must have specified a configuration before calling this routine.
+
+ [c2] You must have specified the default configuration before calling this
+ routine.
+
+ [c3] You do not need to specify a configuration before calling this routine.
+
+ [b1] You must be inside a Begin/End pair when calling this routine.
+
+ [b2] You must be inside a Begin/End read/write pair when calling this routine.
+
+ [b3] You do not need to be inside a Begin/End pair when calling this routine.
+
+ [b4] If you are getting or setting multiple preferences, you should make this
+ call inside a Begin/End pair. If you do not make this call inside a Begin/End
+ pair, the call will automatically do it for you.
+
+ [b5] It is illegal to call this routine inside a Begin/End pair.
+
+ *********************************************************************************************** }
+
+ { ***** Starting Up and Shutting Down ***** }
+ {
+ * ICStart()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICStart(var inst: ICInstance; signature: OSType): OSStatus; external name '_ICStart';
+
+{ Call this at application initialisation. Set signature to a value
+ * which has been regsitered with DTS to allow for future expansion
+ * of the IC system. Returns inst as a connection to the IC system.
+ }
+{
+ * ICStop()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICStop(inst: ICInstance): OSStatus; external name '_ICStop';
+
+{ [b5]
+ * Call this at application initialisation, after which inst
+ * is no longer valid connection to IC.
+ }
+{
+ * ICGetVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICGetVersion(inst: ICInstance; whichVersion: SInt32; var version: UInt32): OSStatus; external name '_ICGetVersion';
+{ [r4] [c3] [b3]
+ * Returns the version of Internet Config. Pass kICComponentVersion
+ * to get the version as previously returned by GetComponenVerson.
+ * Pass kICNumVersion to get a NumVersion structure.
+ }
+{ ***** Specifying a Configuration ***** }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * ICFindConfigFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICFindConfigFile(inst: ICInstance; count: SInt16; folders: ICDirSpecArrayPtr): OSStatus; external name '_ICFindConfigFile';
+{ [b5]
+ * Call to configure this connection to IC.
+ * Set count as the number of valid elements in folders.
+ * Set folders to a pointer to the folders to search.
+ * Setting count to 0 and folders to nil is OK.
+ * Searches the specified folders and then the Preferences folder
+ * in a unspecified manner.
+ }
+{
+ * ICFindUserConfigFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICFindUserConfigFile(inst: ICInstance; var where: ICDirSpec): OSStatus; external name '_ICFindUserConfigFile';
+{ [r1] [b5]
+ * Similar to ICFindConfigFile except that it only searches the folder
+ * specified in where. If the input parameters are valid the routine
+ * will always successful configure the instance, creating an
+ * empty configuration if necessary
+ * For use with double-clickable preference files.
+ }
+{
+ * ICGeneralFindConfigFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICGeneralFindConfigFile(inst: ICInstance; searchPrefs: boolean; canCreate: boolean; count: SInt16; folders: ICDirSpecArrayPtr): OSStatus; external name '_ICGeneralFindConfigFile';
+{ [r2] [b5]
+ * Call to configure this connection to IC.
+ * This routine acts as a more general replacement for
+ * ICFindConfigFile and ICFindUserConfigFile.
+ * Set search_prefs to true if you want it to search the preferences folder.
+ * Set can_create to true if you want it to be able to create a new config.
+ * Set count as the number of valid elements in folders.
+ * Set folders to a pointer to the folders to search.
+ * Setting count to 0 and folders to nil is OK.
+ * Searches the specified folders and then optionally the Preferences folder
+ * in a unspecified manner.
+ }
+{
+ * ICChooseConfig()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICChooseConfig(inst: ICInstance): OSStatus; external name '_ICChooseConfig';
+{ [r2] [b5]
+ * Requests the user to choose a configuration, typically using some
+ * sort of modal dialog. If the user cancels the dialog the configuration
+ * state will be unaffected.
+ }
+{
+ * ICChooseNewConfig()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICChooseNewConfig(inst: ICInstance): OSStatus; external name '_ICChooseNewConfig';
+{ [r2] [b5]
+ * Requests the user to create a new configuration, typically using some
+ * sort of modal dialog. If the user cancels the dialog the configuration
+ * state will be unaffected.
+ }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * ICGetConfigName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICGetConfigName(inst: ICInstance; longname: boolean; var name: Str255): OSStatus; external name '_ICGetConfigName';
+{ [r2] [c1] [b3]
+ * Returns a string that describes the current configuration at a user
+ * level. Set longname to true if you want a long name, up to 255
+ * characters, or false if you want a short name, typically about 32
+ * characters.
+ * The returned string is for user display only. If you rely on the
+ * exact format of it, you will conflict with any future IC
+ * implementation that doesn't use explicit preference files.
+ }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * ICGetConfigReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICGetConfigReference(inst: ICInstance; ref: ICConfigRefHandle): OSStatus; external name '_ICGetConfigReference';
+{ [r2] [c1] [b3]
+ * Returns a self-contained reference to the instance's current
+ * configuration.
+ * ref must be a valid non-nil handle and it will be resized to fit the
+ * resulting data.
+ }
+{
+ * ICSetConfigReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICSetConfigReference(inst: ICInstance; ref: ICConfigRefHandle; flags: SInt32): OSStatus; external name '_ICSetConfigReference';
+{ [r2] [b5]
+ * Reconfigures the instance using a configuration reference that was
+ * got using ICGetConfigReference reference. Set the
+ * icNoUserInteraction_bit in flags if you require that this routine
+ * not present a modal dialog. Other flag bits are reserved and should
+ * be set to zero.
+ * ref must not be nil.
+ }
+{ ***** Private Routines *****
+ *
+ * If you are calling these routines, you are most probably doing something
+ * wrong. Please read the documentation for more details.
+ }
+{
+ * ICSpecifyConfigFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICSpecifyConfigFile(inst: ICInstance; var config: FSSpec): OSStatus; external name '_ICSpecifyConfigFile';
+{ [b5]
+ * For use only by the IC application.
+ * If you call this routine yourself, you will conflict with any
+ * future IC implementation that doesn't use explicit preference files.
+ }
+{
+ * ICRefreshCaches()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICRefreshCaches(inst: ICInstance): OSStatus; external name '_ICRefreshCaches';
+{ [r3] [c1] [b3]
+ * For use only by the IC application.
+ * If you call this routine yourself, you will conflict with any
+ * future IC implementation that doesn't use explicit preference files.
+ }
+{ ***** Getting Information ***** }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * ICGetSeed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICGetSeed(inst: ICInstance; var seed: SInt32): OSStatus; external name '_ICGetSeed';
+{ [c3] [b3]
+ * Returns the current seed for the IC prefs database.
+ * This seed changes each time a non-volatile preference is changed.
+ * You can poll this to determine if any cached preferences change.
+ }
+{
+ * ICGetPerm()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICGetPerm(inst: ICInstance; var perm: ICPerm): OSStatus; external name '_ICGetPerm';
+{ [c3] [b3]
+ * Returns the access permissions currently associated with this instance.
+ * While applications normally know what permissions they have,
+ * this routine is designed for use by override components.
+ }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * ICDefaultFileName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICDefaultFileName(inst: ICInstance; var name: Str63): OSStatus; external name '_ICDefaultFileName';
+{ [c3] [b3]
+ * Returns the default file name for IC preference files.
+ * Applications should never need to call this routine.
+ * If you rely on information returned by this routine yourself,
+ * you may conflict with any future IC implementation that doesn't use
+ * explicit preference files.
+ * The component calls this routine to set up the default IC file name.
+ * This allows this operation to be intercepted by a component that has
+ * captured us. It currently gets it from the component resource file.
+ * The glue version is hardwired to "Internet Preferences".
+ }
+{
+ * ICGetComponentInstance()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICGetComponentInstance(inst: ICInstance; var componentInst: ComponentInstance): OSStatus; external name '_ICGetComponentInstance';
+
+{ [c3] [b3]
+ * Returns noErr and the connection to the IC component,
+ * if we're using the component.
+ * Returns badComponenInstance and nil if we're operating with glue.
+ }
+{ ***** Reading and Writing Preferences ***** }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * ICBegin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICBegin(inst: ICInstance; perm: ByteParameter): OSStatus; external name '_ICBegin';
+{ [c1] [b5]
+ * Starting reading or writing multiple preferences.
+ * A call to this must be balanced by a call to ICEnd.
+ * Do not call WaitNextEvent between these calls.
+ * The perm specifies whether you intend to read or read/write.
+ * Only one writer is allowed per instance.
+ * Note that this may open resource files that are not closed
+ * until you call ICEnd.
+ }
+{
+ * ICGetPref()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICGetPref(inst: ICInstance; const (*var*) key: Str255; var attr: ICAttr; buf: UnivPtr; var size: SInt32): OSStatus; external name '_ICGetPref';
+{ [c1] [b4]
+ * Reads the preference specified by key from the IC database to the
+ * buffer pointed to by buf and size.
+ * key must not be the empty string.
+ * If buf is nil then no data is returned.
+ * size must be non-negative.
+ * attr and size are always set on return. On errors (except icTruncatedErr)
+ * attr is set to ICattr_no_change and size is set to 0.
+ * size is the actual size of the data.
+ * attr is set to the attributes associated with the preference.
+ * If this routine returns icTruncatedErr then the other returned
+ * values are valid except that only the first size bytes have been
+ * return. size is adjusted to reflect the true size of the preference.
+ * Returns icPrefNotFound if there is no preference for the key.
+ }
+{
+ * ICSetPref()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICSetPref(inst: ICInstance; const (*var*) key: Str255; attr: ICAttr; buf: UnivPtr; size: SInt32): OSStatus; external name '_ICSetPref';
+{ [c1] [b4]
+ * Sets the preference specified by key from the IC database to the
+ * value pointed to by buf and size.
+ * key must not be the empty string.
+ * size must be non-negative.
+ * If buf is nil then the preference value is not set and size is ignored.
+ * If buf is not nil then the preference value is set to the size
+ * bytes pointed to by buf.
+ * If attr is ICattr_no_change then the preference attributes are not set.
+ * Otherwise the preference attributes are set to attr.
+ * Returns icPermErr if the previous ICBegin was passed icReadOnlyPerm.
+ * Returns icPermErr if current attr is locked, new attr is locked and buf <> nil.
+ }
+{
+ * ICFindPrefHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICFindPrefHandle(inst: ICInstance; const (*var*) key: Str255; var attr: ICAttr; prefh: Handle): OSStatus; external name '_ICFindPrefHandle';
+{ [r2] [c1] [b4]
+ * This routine effectively replaces ICGetPrefHandle.
+ * Reads the preference specified by key from the IC database into
+ * a handle, prefh.
+ * key must not be the empty string.
+ * attr is set to the attributes associated with the preference.
+ * You must set prefh to a non-nil handle before calling this routine.
+ * If the preference does not exist, icPrefNotFoundErr is returned.
+ }
+{
+ * ICGetPrefHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICGetPrefHandle(inst: ICInstance; const (*var*) key: Str255; var attr: ICAttr; var prefh: Handle): OSStatus; external name '_ICGetPrefHandle';
+{ [r1] [c1] [b4]
+ * This routine is now obsolete. Use ICFindPrefHandle instead.
+ * Reads the preference specified by key from the IC database into
+ * a newly created handle, prefh.
+ * key must not be the empty string.
+ * attr is set to the attributes associated with the preference.
+ * The incoming value of prefh is ignored.
+ * A new handle is created in the current heap and returned in prefh.
+ * If the routine returns an error, prefh is set to nil.
+ * If the preference does not exist, no error is returned and prefh is set
+ * to an empty handle.
+ }
+{
+ * ICSetPrefHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICSetPrefHandle(inst: ICInstance; const (*var*) key: Str255; attr: ICAttr; prefh: Handle): OSStatus; external name '_ICSetPrefHandle';
+{ [r1] [c1] [b4]
+ * Sets the preference specified by key from the IC database to the
+ * value contained in prefh.
+ * key must not be the empty string.
+ * If prefh is nil then the preference value is not set.
+ * If buf is not nil then the preference value is set to the data
+ * contained in it.
+ * If attr is ICattr_no_change then the preference attributes are not set.
+ * Otherwise the preference attributes are set to attr.
+ * Returns icPermErr if the previous ICBegin was passed icReadOnlyPerm.
+ * Returns icPermErr if current attr is locked, new attr is locked and prefh <> nil.
+ }
+{
+ * ICCountPref()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICCountPref(inst: ICInstance; var count: SInt32): OSStatus; external name '_ICCountPref';
+{ [c1] [b1]
+ * Counts the total number of preferences.
+ * If the routine returns an error, count is set to 0.
+ }
+{
+ * ICGetIndPref()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICGetIndPref(inst: ICInstance; index: SInt32; var key: Str255): OSStatus; external name '_ICGetIndPref';
+{ [c1] [b1]
+ * Returns the key of the index'th preference.
+ * index must be positive.
+ * Returns icPrefNotFoundErr if index is greater than the total number of preferences.
+ * If the routine returns an error, key is undefined.
+ }
+{
+ * ICDeletePref()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICDeletePref(inst: ICInstance; const (*var*) key: Str255): OSStatus; external name '_ICDeletePref';
+{ [c1] [b2]
+ * Deletes the preference specified by key.
+ * key must not be the empty string.
+ * Returns icPrefNotFound if the preference specified by key is not present.
+ }
+{
+ * ICEnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICEnd(inst: ICInstance): OSStatus; external name '_ICEnd';
+{ [c1] [b1]
+ * Terminates a preference session, as started by ICBegin.
+ * You must have called ICBegin before calling this routine.
+ }
+{
+ * ICGetDefaultPref()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICGetDefaultPref(inst: ICInstance; const (*var*) key: Str255; prefH: Handle): OSStatus; external name '_ICGetDefaultPref';
+{ [r4] [c3] [b5]
+ * Returns a default preference value for the specified key. You
+ * must pass in a valid prefH, which is resized to fit the data.
+ }
+{ ***** User Interface Stuff ***** }
+{
+ * ICEditPreferences()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICEditPreferences(inst: ICInstance; const (*var*) key: Str255): OSStatus; external name '_ICEditPreferences';
+{ [r1] [c1] [b3]
+ * Instructs IC to display the user interface associated with editing
+ * preferences and focusing on the preference specified by key.
+ * If key is the empty string then no preference should be focused upon.
+ * You must have specified a configuration before calling this routine.
+ * You do not need to call ICBegin before calling this routine.
+ * In the current implementation this launches the IC application
+ * (or brings it to the front) and displays the window containing
+ * the preference specified by key.
+ * It may have a radically different implementation in future
+ * IC systems.
+ }
+{ ***** URL Handling ***** }
+{
+ * ICLaunchURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICLaunchURL(inst: ICInstance; const (*var*) hint: Str255; data: UnivPtr; len: SInt32; var selStart: SInt32; var selEnd: SInt32): OSStatus; external name '_ICLaunchURL';
+{ [r1] [c1] [b3]
+ * Parses a URL out of the specified text and feeds it off to the
+ * appropriate helper.
+ * hint indicates the default scheme for URLs of the form "name@address".
+ * If hint is the empty string then URLs of that form are not allowed.
+ * data points to the start of the text. It must not be nil.
+ * len indicates the length of the text. It must be non-negative.
+ * selStart and selEnd should be passed in as the current selection of
+ * the text. This selection is given in the same manner as TextEdit,
+ * ie if selStart = selEnd then there is no selection only an insertion
+ * point. Also selStart ² selEnd and 0 ² selStart ² len and 0 ² selEnd ² len.
+ * selStart and selEnd are returned as the bounds of the URL. If the
+ * routine returns an error then these new boundaries may be
+ * invalid but they will be close.
+ * The URL is parsed out of the text and passed off to the appropriate
+ * helper using the GURL AppleEvent.
+ }
+{
+ * ICParseURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICParseURL(inst: ICInstance; const (*var*) hint: Str255; data: UnivPtr; len: SInt32; var selStart: SInt32; var selEnd: SInt32; url: Handle): OSStatus; external name '_ICParseURL';
+{ [r1] [c1] [b3]
+ * Parses a URL out of the specified text and returns it in a canonical form
+ * in a handle.
+ * hint indicates the default scheme for URLs of the form "name@address".
+ * If hint is the empty string then URLs of that form are not allowed.
+ * data points to the start of the text. It must not be nil.
+ * len indicates the length of the text. It must be non-negative.
+ * selStart and selEnd should be passed in as the current selection of
+ * the text. This selection is given in the same manner as TextEdit,
+ * ie if selStart = selEnd then there is no selection only an insertion
+ * point. Also selStart ² selEnd and 0 ² selStart ² len and 0 ² selEnd ² len.
+ * selStart and selEnd are returned as the bounds of the URL. If the
+ * routine returns an error then these new boundaries may be
+ * invalid but they will be close.
+ * The incoming url handle must not be nil. The resulting URL is normalised
+ * and copied into the url handle, which is resized to fit.
+ }
+{
+ * ICCreateGURLEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICCreateGURLEvent(inst: ICInstance; helperCreator: OSType; urlH: Handle; var theEvent: AppleEvent): OSStatus; external name '_ICCreateGURLEvent';
+{ [r4] [c1] [b3]
+ * Creates a GURL Apple event, targetted at the application whose creator
+ * code is helperCreator, with a direct object containing the URL text from urlH.
+ }
+{
+ * ICSendGURLEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICSendGURLEvent(inst: ICInstance; var theEvent: AppleEvent): OSStatus; external name '_ICSendGURLEvent';
+{ [r4] [c1] [b3]
+ * Sends theEvent to the target application.
+ }
+{ ***** Mappings Routines *****
+ *
+ * Routines for interrogating mappings database.
+ *
+ * ----- High Level Routines -----
+ }
+{
+ * ICMapFilename()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICMapFilename(inst: ICInstance; const (*var*) filename: Str255; var entry: ICMapEntry): OSStatus; external name '_ICMapFilename';
+{ [r1] [c1] [b4]
+ * Takes the name of an incoming file and returns the most appropriate
+ * mappings database entry, based on its extension.
+ * filename must not be the empty string.
+ * Returns icPrefNotFoundErr if no suitable entry is found.
+ }
+{
+ * ICMapTypeCreator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICMapTypeCreator(inst: ICInstance; fType: OSType; fCreator: OSType; const (*var*) filename: Str255; var entry: ICMapEntry): OSStatus; external name '_ICMapTypeCreator';
+{ [r1] [c1] [b4]
+ * Takes the type and creator (and optionally the name) of an outgoing
+ * file and returns the most appropriate mappings database entry.
+ * The filename may be either the name of the outgoing file or
+ * the empty string.
+ * Returns icPrefNotFoundErr if no suitable entry found.
+ }
+{ ----- Mid Level Routines ----- }
+{
+ * ICMapEntriesFilename()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICMapEntriesFilename(inst: ICInstance; entries: Handle; const (*var*) filename: Str255; var entry: ICMapEntry): OSStatus; external name '_ICMapEntriesFilename';
+{ [r1] [c1] [b3]
+ * Takes the name of an incoming file and returns the most appropriate
+ * mappings database entry, based on its extension.
+ * entries must be a handle to a valid IC mappings database preference.
+ * filename must not be the empty string.
+ * Returns icPrefNotFoundErr if no suitable entry is found.
+ }
+{
+ * ICMapEntriesTypeCreator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICMapEntriesTypeCreator(inst: ICInstance; entries: Handle; fType: OSType; fCreator: OSType; const (*var*) filename: Str255; var entry: ICMapEntry): OSStatus; external name '_ICMapEntriesTypeCreator';
+{ [r1] [c1] [b3]
+ * Takes the type and creator (and optionally the name) of an outgoing
+ * file and returns the most appropriate mappings database entry.
+ * entries must be a handle to a valid IC mappings database preference.
+ * The filename may be either the name of the outgoing file or
+ * the empty string.
+ * Returns icPrefNotFoundErr if no suitable entry found.
+ }
+{ ----- Low Level Routines ----- }
+{
+ * ICCountMapEntries()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICCountMapEntries(inst: ICInstance; entries: Handle; var count: SInt32): OSStatus; external name '_ICCountMapEntries';
+{ [r1] [c1] [b3]
+ * Counts the number of entries in the mappings database.
+ * entries must be a handle to a valid IC mappings database preference.
+ * count is set to the number of entries.
+ }
+{
+ * ICGetIndMapEntry()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICGetIndMapEntry(inst: ICInstance; entries: Handle; index: SInt32; var pos: SInt32; var entry: ICMapEntry): OSStatus; external name '_ICGetIndMapEntry';
+{ [r1] [c1] [b3]
+ * Gets the index'th entry in the mappings database.
+ * entries must be a handle to a valid IC mappings database preference.
+ * index must be in the range from 1 to the number of entries in the database.
+ * The value of pos is ignored on input. pos is set to the position of
+ * the index'th entry in the database and is suitable for passing back
+ * into ICSetMapEntry.
+ * Does not return any user data associated with the entry.
+ }
+{
+ * ICGetMapEntry()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICGetMapEntry(inst: ICInstance; entries: Handle; pos: SInt32; var entry: ICMapEntry): OSStatus; external name '_ICGetMapEntry';
+{ [r1] [c1] [b3]
+ * Returns the entry located at position pos in the mappings database.
+ * entries must be a handle to a valid IC mappings database preference.
+ * pos should be 0 to get the first entry. To get the subsequent entries, add
+ * entry.total_size to pos and iterate.
+ * Does not return any user data associated with the entry.
+ }
+{
+ * ICSetMapEntry()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICSetMapEntry(inst: ICInstance; entries: Handle; pos: SInt32; const (*var*) entry: ICMapEntry): OSStatus; external name '_ICSetMapEntry';
+{ [r1] [c1] [b3]
+ * Sets the entry located at position pos in the mappings database.
+ * entries must be a handle to a valid IC mappings database preference.
+ * pos should be either a value returned from ICGetIndMapEntry or a value
+ * calculated using ICGetMapEntry.
+ * entry is a var parameter purely for stack space reasons. It is not
+ * modified in any way.
+ * Any user data associated with the entry is unmodified.
+ }
+{
+ * ICDeleteMapEntry()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICDeleteMapEntry(inst: ICInstance; entries: Handle; pos: SInt32): OSStatus; external name '_ICDeleteMapEntry';
+{ [r1] [c1] [b3]
+ * Deletes the mappings database entry at pos.
+ * entries must be a handle to a valid IC mappings database preference.
+ * pos should be either a value returned from ICGetIndMapEntry or a value
+ * calculated using ICGetMapEntry.
+ * Also deletes any user data associated with the entry.
+ }
+{
+ * ICAddMapEntry()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAddMapEntry(inst: ICInstance; entries: Handle; const (*var*) entry: ICMapEntry): OSStatus; external name '_ICAddMapEntry';
+{ [r1] [c1] [b3]
+ * Adds an entry to the mappings database.
+ * entries must be a handle to a valid IC mappings database preference.
+ * The entry is added to the end of the entries database.
+ * No user data is added.
+ }
+{ ***** Profile Management Routines ***** }
+{
+ * ICGetCurrentProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICGetCurrentProfile(inst: ICInstance; var currentID: ICProfileID): OSStatus; external name '_ICGetCurrentProfile';
+{ [r3] [c1] [b3]
+ * Returns the profile ID of the current profile.
+ }
+{
+ * ICSetCurrentProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICSetCurrentProfile(inst: ICInstance; newID: ICProfileID): OSStatus; external name '_ICSetCurrentProfile';
+{ [r3] [c1] [b3]
+ * Sets the current profile to the profile specified in newProfile.
+ }
+{
+ * ICCountProfiles()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICCountProfiles(inst: ICInstance; var count: SInt32): OSStatus; external name '_ICCountProfiles';
+{ [r3] [c1] [b1]
+ * Returns the total number of profiles.
+ }
+{
+ * ICGetIndProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICGetIndProfile(inst: ICInstance; index: SInt32; var thisID: ICProfileID): OSStatus; external name '_ICGetIndProfile';
+{ [r3] [c1] [b1]
+ * Returns the profile ID of the index'th profile. index must be positive.
+ * Returns icProfileNotFoundErr if index is greater than the total number
+ * of profiles.
+ }
+{
+ * ICGetProfileName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICGetProfileName(inst: ICInstance; thisID: ICProfileID; var name: Str255): OSStatus; external name '_ICGetProfileName';
+{ [r3] [c1] [b3]
+ * Returns the name of a profile given its ID. The name may not uniquely
+ * identify the profile. [That's what the profile ID is for!] The name
+ * is assumed to be in the system script.
+ }
+{
+ * ICSetProfileName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICSetProfileName(inst: ICInstance; thisID: ICProfileID; const (*var*) name: Str255): OSStatus; external name '_ICSetProfileName';
+{ [r3] [c1] [b3]
+ * This routine sets the name of the specified profile. Profile names
+ * need not be unique. The name should be in the system script.
+ }
+{
+ * ICAddProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICAddProfile(inst: ICInstance; prototypeID: ICProfileID; var newID: ICProfileID): OSStatus; external name '_ICAddProfile';
+{ [r3] [c1] [b2]
+ * If prototypeID = kICNilProfileID, this routine
+ * creates a default profile, otherwise it creates a
+ * profile by cloning the prototype profile. The ID
+ * of the new profile is returned in newID.
+ * The new profile will be give a new, unique, name.
+ * This does not switch to the new profile.
+ }
+{
+ * ICDeleteProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ICDeleteProfile(inst: ICInstance; thisID: ICProfileID): OSStatus; external name '_ICDeleteProfile';
+{ [r3] [c1] [b2]
+ * This routine deletes the profile specified by
+ * thisID. Attempting to delete the current profile
+ * or the last profile will return error.
+ }
+{***********************************************************************************************
+ NOTHING BELOW THIS DIVIDER IS IN CARBON
+ ***********************************************************************************************}
+{ ***** Interrupt Safe Routines ***** }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * ICRequiresInterruptSafe()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICRequiresInterruptSafe(inst: ICInstance): OSStatus; external name '_ICRequiresInterruptSafe';
+{ [r3] [c2] [b3]
+ * You must call this routine before calling GetMapEntryInterruptSafe
+ * to give IC chance to cache the mappings data in memory. The only
+ * way to clear this state is to close the instance. You can not reconfigure
+ * the instance after calling this routine.
+ }
+{
+ * ICGetMappingInterruptSafe()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICGetMappingInterruptSafe(inst: ICInstance; var mappingPref: Ptr; var mappingPrefSize: SInt32): OSStatus; external name '_ICGetMappingInterruptSafe';
+{ [r3] [c2] [b3]
+ * Returns the "Mapping" preference in an interrupt safe fashion.
+ * The preference returned pointer is valid until the next
+ * non-interrupt safe call to IC. Typically this API is used
+ * by software that needs to map extensions to type and creator
+ * at interrupt time, eg foreign file systems.
+ }
+{
+ * ICGetSeedInterruptSafe()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICGetSeedInterruptSafe(inst: ICInstance; var seed: SInt32): OSStatus; external name '_ICGetSeedInterruptSafe';
+{ [r3] [c2] [b3]
+ * An interrupt safe version of ICGetSeed.
+ }
+{ ***** Starting Up and Shutting Down ***** }
+{
+ * ICCStart()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCStart(var inst: ComponentInstance; creator: OSType): OSStatus; external name '_ICCStart';
+
+{ See comment for ICCStart. }
+{
+ * ICCStop()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCStop(inst: ComponentInstance): OSStatus; external name '_ICCStop';
+
+{ See comment for ICCStop. }
+{
+ * ICCGetVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetVersion(inst: ComponentInstance; whichVersion: SInt32; var version: UInt32): OSStatus; external name '_ICCGetVersion';
+{ See comment for ICCGetVersion. }
+{ ***** Specifying a Configuration ***** }
+{
+ * ICCFindConfigFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCFindConfigFile(inst: ComponentInstance; count: SInt16; folders: ICDirSpecArrayPtr): OSStatus; external name '_ICCFindConfigFile';
+{ See comment for ICCFindConfigFile. }
+{
+ * ICCFindUserConfigFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCFindUserConfigFile(inst: ComponentInstance; var where: ICDirSpec): OSStatus; external name '_ICCFindUserConfigFile';
+{ See comment for ICCFindUserConfigFile. }
+{
+ * ICCGeneralFindConfigFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGeneralFindConfigFile(inst: ComponentInstance; searchPrefs: boolean; canCreate: boolean; count: SInt16; folders: ICDirSpecArrayPtr): OSStatus; external name '_ICCGeneralFindConfigFile';
+{ See comment for ICCGeneralFindConfigFile. }
+{
+ * ICCChooseConfig()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCChooseConfig(inst: ComponentInstance): OSStatus; external name '_ICCChooseConfig';
+{ See comment for ICCChooseConfig. }
+{
+ * ICCChooseNewConfig()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCChooseNewConfig(inst: ComponentInstance): OSStatus; external name '_ICCChooseNewConfig';
+{ See comment for ICCChooseNewConfig. }
+{
+ * ICCGetConfigName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetConfigName(inst: ComponentInstance; longname: boolean; var name: Str255): OSStatus; external name '_ICCGetConfigName';
+{ See comment for ICCGetConfigName. }
+{
+ * ICCGetConfigReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetConfigReference(inst: ComponentInstance; ref: ICConfigRefHandle): OSStatus; external name '_ICCGetConfigReference';
+{ See comment for ICCGetConfigReference. }
+{
+ * ICCSetConfigReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCSetConfigReference(inst: ComponentInstance; ref: ICConfigRefHandle; flags: SInt32): OSStatus; external name '_ICCSetConfigReference';
+{ See comment for ICCSetConfigReference. }
+{ ***** Private Routines *****
+ *
+ * If you are calling these routines, you are most probably doing something
+ * wrong. Please read the documentation for more details.
+ }
+{
+ * ICCSpecifyConfigFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCSpecifyConfigFile(inst: ComponentInstance; var config: FSSpec): OSStatus; external name '_ICCSpecifyConfigFile';
+{ See comment for ICCSpecifyConfigFile. }
+{
+ * ICCRefreshCaches()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCRefreshCaches(inst: ComponentInstance): OSStatus; external name '_ICCRefreshCaches';
+{ See comment for ICCRefreshCaches. }
+{ ***** Getting Information ***** }
+{
+ * ICCGetSeed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetSeed(inst: ComponentInstance; var seed: SInt32): OSStatus; external name '_ICCGetSeed';
+{ See comment for ICCGetSeed. }
+{
+ * ICCGetPerm()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetPerm(inst: ComponentInstance; var perm: ICPerm): OSStatus; external name '_ICCGetPerm';
+{ See comment for ICCGetPerm. }
+{
+ * ICCDefaultFileName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCDefaultFileName(inst: ComponentInstance; var name: Str63): OSStatus; external name '_ICCDefaultFileName';
+{ See comment for ICCDefaultFileName. }
+{
+ * ICCGetComponentInstance()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetComponentInstance(inst: ComponentInstance; var componentInst: ComponentInstance): OSStatus; external name '_ICCGetComponentInstance';
+
+{ See comment for ICCGetComponentInstance. }
+{ ***** Reading and Writing Preferences ***** }
+{
+ * ICCBegin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCBegin(inst: ComponentInstance; perm: ByteParameter): OSStatus; external name '_ICCBegin';
+{ See comment for ICCBegin. }
+{
+ * ICCGetPref()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetPref(inst: ComponentInstance; const (*var*) key: Str255; var attr: ICAttr; buf: Ptr; var size: SInt32): OSStatus; external name '_ICCGetPref';
+{ See comment for ICCGetPref. }
+{
+ * ICCSetPref()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCSetPref(inst: ComponentInstance; const (*var*) key: Str255; attr: ICAttr; buf: Ptr; size: SInt32): OSStatus; external name '_ICCSetPref';
+{ See comment for ICCSetPref. }
+{
+ * ICCFindPrefHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCFindPrefHandle(inst: ComponentInstance; const (*var*) key: Str255; var attr: ICAttr; prefh: Handle): OSStatus; external name '_ICCFindPrefHandle';
+{ See comment for ICCFindPrefHandle. }
+{
+ * ICCGetPrefHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetPrefHandle(inst: ComponentInstance; const (*var*) key: Str255; var attr: ICAttr; var prefh: Handle): OSStatus; external name '_ICCGetPrefHandle';
+{ See comment for ICCGetPrefHandle. }
+{
+ * ICCSetPrefHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCSetPrefHandle(inst: ComponentInstance; const (*var*) key: Str255; attr: ICAttr; prefh: Handle): OSStatus; external name '_ICCSetPrefHandle';
+{ See comment for ICCSetPrefHandle. }
+{
+ * ICCCountPref()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCCountPref(inst: ComponentInstance; var count: SInt32): OSStatus; external name '_ICCCountPref';
+{ See comment for ICCCountPref. }
+{
+ * ICCGetIndPref()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetIndPref(inst: ComponentInstance; index: SInt32; var key: Str255): OSStatus; external name '_ICCGetIndPref';
+{ See comment for ICCGetIndPref. }
+{
+ * ICCDeletePref()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCDeletePref(inst: ComponentInstance; const (*var*) key: Str255): OSStatus; external name '_ICCDeletePref';
+{ See comment for ICCDeletePref. }
+{
+ * ICCEnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCEnd(inst: ComponentInstance): OSStatus; external name '_ICCEnd';
+{ See comment for ICCEnd. }
+{
+ * ICCGetDefaultPref()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetDefaultPref(inst: ComponentInstance; const (*var*) key: Str255; prefH: Handle): OSStatus; external name '_ICCGetDefaultPref';
+{ See comment for ICCGetDefaultPref. }
+{ ***** User Interface Stuff ***** }
+{
+ * ICCEditPreferences()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCEditPreferences(inst: ComponentInstance; const (*var*) key: Str255): OSStatus; external name '_ICCEditPreferences';
+{ See comment for ICCEditPreferences. }
+{ ***** URL Handling ***** }
+{
+ * ICCLaunchURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCLaunchURL(inst: ComponentInstance; const (*var*) hint: Str255; data: Ptr; len: SInt32; var selStart: SInt32; var selEnd: SInt32): OSStatus; external name '_ICCLaunchURL';
+{ See comment for ICCLaunchURL. }
+{
+ * ICCParseURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCParseURL(inst: ComponentInstance; const (*var*) hint: Str255; data: Ptr; len: SInt32; var selStart: SInt32; var selEnd: SInt32; url: Handle): OSStatus; external name '_ICCParseURL';
+{ See comment for ICCParseURL. }
+{
+ * ICCCreateGURLEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCCreateGURLEvent(inst: ComponentInstance; helperCreator: OSType; urlH: Handle; var theEvent: AppleEvent): OSStatus; external name '_ICCCreateGURLEvent';
+{ See comment for ICCCreateGURLEvent. }
+{
+ * ICCSendGURLEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCSendGURLEvent(inst: ComponentInstance; var theEvent: AppleEvent): OSStatus; external name '_ICCSendGURLEvent';
+{ See comment for ICCSendGURLEvent. }
+{ ***** Mappings Routines *****
+ *
+ * Routines for interrogating mappings database.
+ *
+ * ----- High Level Routines -----
+ }
+{
+ * ICCMapFilename()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCMapFilename(inst: ComponentInstance; const (*var*) filename: Str255; var entry: ICMapEntry): OSStatus; external name '_ICCMapFilename';
+{ See comment for ICCMapFilename. }
+{
+ * ICCMapTypeCreator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCMapTypeCreator(inst: ComponentInstance; fType: OSType; fCreator: OSType; const (*var*) filename: Str255; var entry: ICMapEntry): OSStatus; external name '_ICCMapTypeCreator';
+{ See comment for ICCMapTypeCreator. }
+{ ----- Mid Level Routines ----- }
+{
+ * ICCMapEntriesFilename()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCMapEntriesFilename(inst: ComponentInstance; entries: Handle; const (*var*) filename: Str255; var entry: ICMapEntry): OSStatus; external name '_ICCMapEntriesFilename';
+{ See comment for ICCMapEntriesFilename. }
+{
+ * ICCMapEntriesTypeCreator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCMapEntriesTypeCreator(inst: ComponentInstance; entries: Handle; fType: OSType; fCreator: OSType; const (*var*) filename: Str255; var entry: ICMapEntry): OSStatus; external name '_ICCMapEntriesTypeCreator';
+{ See comment for ICCMapEntriesTypeCreator. }
+{ ----- Low Level Routines ----- }
+{
+ * ICCCountMapEntries()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCCountMapEntries(inst: ComponentInstance; entries: Handle; var count: SInt32): OSStatus; external name '_ICCCountMapEntries';
+{ See comment for ICCCountMapEntries. }
+{
+ * ICCGetIndMapEntry()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetIndMapEntry(inst: ComponentInstance; entries: Handle; index: SInt32; var pos: SInt32; var entry: ICMapEntry): OSStatus; external name '_ICCGetIndMapEntry';
+{ See comment for ICCGetIndMapEntry. }
+{
+ * ICCGetMapEntry()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetMapEntry(inst: ComponentInstance; entries: Handle; pos: SInt32; var entry: ICMapEntry): OSStatus; external name '_ICCGetMapEntry';
+{ See comment for ICCGetMapEntry. }
+{
+ * ICCSetMapEntry()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCSetMapEntry(inst: ComponentInstance; entries: Handle; pos: SInt32; var entry: ICMapEntry): OSStatus; external name '_ICCSetMapEntry';
+{ See comment for ICCSetMapEntry. }
+{
+ * ICCDeleteMapEntry()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCDeleteMapEntry(inst: ComponentInstance; entries: Handle; pos: SInt32): OSStatus; external name '_ICCDeleteMapEntry';
+{ See comment for ICCDeleteMapEntry. }
+{
+ * ICCAddMapEntry()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCAddMapEntry(inst: ComponentInstance; entries: Handle; var entry: ICMapEntry): OSStatus; external name '_ICCAddMapEntry';
+{ See comment for ICCAddMapEntry. }
+{ ***** Profile Management Routines ***** }
+{
+ * ICCGetCurrentProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetCurrentProfile(inst: ComponentInstance; var currentID: ICProfileID): OSStatus; external name '_ICCGetCurrentProfile';
+{ See comment for ICCGetCurrentProfile. }
+{
+ * ICCSetCurrentProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCSetCurrentProfile(inst: ComponentInstance; newID: ICProfileID): OSStatus; external name '_ICCSetCurrentProfile';
+{ See comment for ICCSetCurrentProfile. }
+{
+ * ICCCountProfiles()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCCountProfiles(inst: ComponentInstance; var count: SInt32): OSStatus; external name '_ICCCountProfiles';
+{ See comment for ICCCountProfiles. }
+{
+ * ICCGetIndProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetIndProfile(inst: ComponentInstance; index: SInt32; var thisID: ICProfileID): OSStatus; external name '_ICCGetIndProfile';
+{ See comment for ICCGetIndProfile. }
+{
+ * ICCGetProfileName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetProfileName(inst: ComponentInstance; thisID: ICProfileID; var name: Str255): OSStatus; external name '_ICCGetProfileName';
+{ See comment for ICCGetProfileName. }
+{
+ * ICCSetProfileName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCSetProfileName(inst: ComponentInstance; thisID: ICProfileID; const (*var*) name: Str255): OSStatus; external name '_ICCSetProfileName';
+{ See comment for ICCSetProfileName. }
+{
+ * ICCAddProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCAddProfile(inst: ComponentInstance; prototypeID: ICProfileID; var newID: ICProfileID): OSStatus; external name '_ICCAddProfile';
+{ See comment for ICCAddProfile. }
+{
+ * ICCDeleteProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCDeleteProfile(inst: ComponentInstance; thisID: ICProfileID): OSStatus; external name '_ICCDeleteProfile';
+{ See comment for ICCDeleteProfile. }
+{ ***** Interrupt Safe Routines ***** }
+{
+ * ICCRequiresInterruptSafe()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCRequiresInterruptSafe(inst: ComponentInstance): OSStatus; external name '_ICCRequiresInterruptSafe';
+{ See comment for ICCRequiresInterruptSafe. }
+{
+ * ICCGetMappingInterruptSafe()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetMappingInterruptSafe(inst: ComponentInstance; var mappingPref: Ptr; var mappingPrefSize: SInt32): OSStatus; external name '_ICCGetMappingInterruptSafe';
+{ See comment for ICCGetMappingInterruptSafe. }
+{
+ * ICCGetSeedInterruptSafe()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InternetConfig 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ICCGetSeedInterruptSafe(inst: ComponentInstance; var seed: SInt32): OSStatus; external name '_ICCGetSeedInterruptSafe';
+{ See comment for ICCGetSeedInterruptSafe. }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ifc CALL_NOT_IN_CARBON}
+
+{***********************************************************************************************
+ component selectors
+ ***********************************************************************************************}
+
+
+const
+ kICCStart = 0;
+ kICCStop = 1;
+ kICCGetVersion = 50;
+ kICCFindConfigFile = 2;
+ kICCFindUserConfigFile = 14;
+ kICCGeneralFindConfigFile = 30;
+ kICCChooseConfig = 33;
+ kICCChooseNewConfig = 34;
+ kICCGetConfigName = 35;
+ kICCGetConfigReference = 31;
+ kICCSetConfigReference = 32;
+ kICCSpecifyConfigFile = 3;
+ kICCRefreshCaches = 47;
+ kICCGetSeed = 4;
+ kICCGetPerm = 13;
+ kICCDefaultFileName = 11;
+ kICCBegin = 5;
+ kICCGetPref = 6;
+ kICCSetPref = 7;
+ kICCFindPrefHandle = 36;
+ kICCGetPrefHandle = 26;
+ kICCSetPrefHandle = 27;
+ kICCCountPref = 8;
+ kICCGetIndPref = 9;
+ kICCDeletePref = 12;
+ kICCEnd = 10;
+ kICCGetDefaultPref = 49;
+ kICCEditPreferences = 15;
+ kICCLaunchURL = 17;
+ kICCParseURL = 16;
+ kICCCreateGURLEvent = 51;
+ kICCSendGURLEvent = 52;
+ kICCMapFilename = 24;
+ kICCMapTypeCreator = 25;
+ kICCMapEntriesFilename = 28;
+ kICCMapEntriesTypeCreator = 29;
+ kICCCountMapEntries = 18;
+ kICCGetIndMapEntry = 19;
+ kICCGetMapEntry = 20;
+ kICCSetMapEntry = 21;
+ kICCDeleteMapEntry = 22;
+ kICCAddMapEntry = 23;
+ kICCGetCurrentProfile = 37;
+ kICCSetCurrentProfile = 38;
+ kICCCountProfiles = 39;
+ kICCGetIndProfile = 40;
+ kICCGetProfileName = 41;
+ kICCSetProfileName = 42;
+ kICCAddProfile = 43;
+ kICCDeleteProfile = 44;
+ kICCRequiresInterruptSafe = 45;
+ kICCGetMappingInterruptSafe = 46;
+ kICCGetSeedInterruptSafe = 48;
+ kICCFirstSelector = 0;
+ kICCLastSelector = 52;
+
+ { ***********************************************************************************************
+ component selector proc infos
+ *********************************************************************************************** }
+
+ kICCStartProcInfo = 1008;
+ kICCStopProcInfo = 240;
+ kICCGetVersionProcInfo = 4080;
+ kICCFindConfigFileProcInfo = 3824;
+ kICCFindUserConfigFileProcInfo = 1008;
+ kICCGeneralFindConfigFileProcInfo = 58864;
+ kICCChooseConfigProcInfo = 240;
+ kICCChooseNewConfigProcInfo = 240;
+ kICCGetConfigNameProcInfo = 3568;
+ kICCGetConfigReferenceProcInfo = 1008;
+ kICCSetConfigReferenceProcInfo = 4080;
+ kICCSpecifyConfigFileProcInfo = 1008;
+ kICCRefreshCachesProcInfo = 240;
+ kICCGetSeedProcInfo = 1008;
+ kICCGetPermProcInfo = 1008;
+ kICCDefaultFileNameProcInfo = 1008;
+ kICCGetComponentInstanceProcInfo = 1008;
+ kICCBeginProcInfo = 496;
+ kICCGetPrefProcInfo = 65520;
+ kICCSetPrefProcInfo = 65520;
+ kICCFindPrefHandleProcInfo = 16368;
+ kICCGetPrefHandleProcInfo = 16368;
+ kICCSetPrefHandleProcInfo = 16368;
+ kICCCountPrefProcInfo = 1008;
+ kICCGetIndPrefProcInfo = 4080;
+ kICCDeletePrefProcInfo = 1008;
+ kICCEndProcInfo = 240;
+ kICCGetDefaultPrefProcInfo = 4080;
+ kICCEditPreferencesProcInfo = 1008;
+ kICCLaunchURLProcInfo = 262128;
+ kICCParseURLProcInfo = 1048560;
+ kICCCreateGURLEventProcInfo = 16368;
+ kICCSendGURLEventProcInfo = 1008;
+ kICCMapFilenameProcInfo = 4080;
+ kICCMapTypeCreatorProcInfo = 65520;
+ kICCMapEntriesFilenameProcInfo = 16368;
+ kICCMapEntriesTypeCreatorProcInfo = 262128;
+ kICCCountMapEntriesProcInfo = 4080;
+ kICCGetIndMapEntryProcInfo = 65520;
+ kICCGetMapEntryProcInfo = 16368;
+ kICCSetMapEntryProcInfo = 16368;
+ kICCDeleteMapEntryProcInfo = 4080;
+ kICCAddMapEntryProcInfo = 4080;
+ kICCGetCurrentProfileProcInfo = 1008;
+ kICCSetCurrentProfileProcInfo = 1008;
+ kICCCountProfilesProcInfo = 1008;
+ kICCGetIndProfileProcInfo = 4080;
+ kICCGetProfileNameProcInfo = 4080;
+ kICCSetProfileNameProcInfo = 4080;
+ kICCAddProfileProcInfo = 4080;
+ kICCDeleteProfileProcInfo = 1008;
+ kICCRequiresInterruptSafeProcInfo = 240;
+ kICCGetMappingInterruptSafeProcInfo = 4080;
+ kICCGetSeedInterruptSafeProcInfo = 1008;
+
+ { ***********************************************************************************************
+ component identifiers
+ *********************************************************************************************** }
+
+ kICComponentType = $50524546 (* 'PREF' *);
+ kICComponentSubType = $49434170 (* 'ICAp' *);
+ kICComponentManufacturer = $4A505145 (* 'JPQE' *);
+
+ { ***********************************************************************************************
+ The following type is now obsolete.
+ If you're using it, please switch to ComponentInstance or ICInstance.
+ *********************************************************************************************** }
+
+{$ifc OLDROUTINENAMES}
+
+type
+ internetConfigurationComponent = ComponentInstance;
+
+{$endc} {OLDROUTINENAMES}
+{$endc} {CALL_NOT_IN_CARBON}
+
+{***********************************************************************************************
+ old names for stuff declared above
+ ***********************************************************************************************}
+
+{$ifc OLDROUTINENAMES}
+
+
+type
+ ICError = SInt32;
+
+
+const
+ ICattr_no_change = $FFFFFFFF;
+ ICattr_locked_bit = 0;
+ ICattr_locked_mask = $00000001;
+ ICattr_volatile_bit = 1;
+ ICattr_volatile_mask = $00000002;
+ icNoUserInteraction_bit = 0;
+ icNoUserInteraction_mask = $00000001;
+ ICfiletype = $49434170 (* 'ICAp' *);
+ ICcreator = $49434170 (* 'ICAp' *);
+
+ {
+ ICFileInfo was originally used to define the format of a key.
+ That key was removed, but we forgot to remove ICFileInfo.
+ I hope to remove it entirely, but for the moment it's available
+ if you define OLDROUTINENAMES.
+ }
+
+type
+ ICFileInfoPtr = ^ICFileInfo;
+ ICFileInfo = record
+ fType: OSType;
+ fCreator: OSType;
+ name: Str63;
+ end;
+
+ ICFileInfoHandle = ^ICFileInfoPtr;
+
+
+const
+ ICfile_spec_header_size = 106;
+
+ ICmap_binary_bit = 0;
+ ICmap_binary_mask = $00000001;
+ ICmap_resource_fork_bit = 1;
+ ICmap_resource_fork_mask = $00000002;
+ ICmap_data_fork_bit = 2;
+ ICmap_data_fork_mask = $00000004;
+ ICmap_post_bit = 3;
+ ICmap_post_mask = $00000008;
+ ICmap_not_incoming_bit = 4;
+ ICmap_not_incoming_mask = $00000010;
+ ICmap_not_outgoing_bit = 5;
+ ICmap_not_outgoing_mask = $00000020;
+ ICmap_fixed_length = 22;
+
+ ICservices_tcp_bit = 0;
+ ICservices_tcp_mask = $00000001;
+ ICservices_udp_bit = 1;
+ ICservices_udp_mask = $00000002;
+
+ { This definitions are a) very long, and b) don't conform
+ to Mac OS standards for naming constants, so I've put
+ them in only if you're using OLDROUTINENAMES. Please switch
+ to the new names given above.
+ }
+ internetConfigurationComponentType = $50524546 (* 'PREF' *); { the component type }
+ internetConfigurationComponentSubType = $49434170 (* 'ICAp' *); { the component subtype }
+ internetConfigurationComponentInterfaceVersion0 = $00000000; { IC >= 1.0 }
+ internetConfigurationComponentInterfaceVersion1 = $00010000; { IC >= 1.1 }
+ internetConfigurationComponentInterfaceVersion2 = $00020000; { IC >= 1.2 }
+ internetConfigurationComponentInterfaceVersion3 = $00030000; { IC >= 2.0 }
+ { current version number is version 3 }
+ internetConfigurationComponentInterfaceVersion = $00030000;
+
+{$endc} {OLDROUTINENAMES}
+
+{$ALIGN MAC68K}
+
+
+{unit LaunchServices}
+{
+ File: LaunchServices.p
+
+ Contains: Public interfaces for LaunchServices.framework
+
+ Version: Technology: Mac OS X
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 2001-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+
+{ ======================================================================================================== }
+{ LaunchServices Structures and Enums }
+{ ======================================================================================================== }
+
+
+const
+ kLSAppInTrashErr = -10660; { The app cannot be run when inside a Trash folder }
+ kLSUnknownErr = -10810;
+ kLSNotAnApplicationErr = -10811;
+ kLSNotInitializedErr = -10812;
+ kLSDataUnavailableErr = -10813; { e.g. no kind string }
+ kLSApplicationNotFoundErr = -10814; { e.g. no application claims the file }
+ kLSUnknownTypeErr = -10815;
+ kLSDataTooOldErr = -10816;
+ kLSDataErr = -10817;
+ kLSLaunchInProgressErr = -10818; { e.g. opening an alreay opening application }
+ kLSNotRegisteredErr = -10819;
+ kLSAppDoesNotClaimTypeErr = -10820;
+ kLSAppDoesNotSupportSchemeWarning = -10821; { not an error, just a warning }
+ kLSServerCommunicationErr = -10822; { cannot set recent items }
+ kLSCannotSetInfoErr = -10823; { you may not set item info for this item }
+ kLSNoRegistrationInfoErr = -10824; { the item contains no registration info }
+ kLSIncompatibleSystemVersionErr = -10825; { the app cannot run on the current OS version }
+ kLSNoLaunchPermissionErr = -10826; { user doesn't have permission to launch the app (managed networks) }
+ kLSNoExecutableErr = -10827; { the executable is missing or has an unusable format }
+ kLSNoClassicEnvironmentErr = -10828; { the Classic environment was required but is not available }
+ kLSMultipleSessionsNotSupportedErr = -10829; { the app cannot run simultaneously in two different sessions }
+
+
+type
+ LSInitializeFlags = OptionBits;
+
+const
+ kLSInitializeDefaults = $00000001;
+
+ kLSMinCatInfoBitmap = $0000180A; { do not use }{ minimum info needed to avoid a FSGetCatalogInfo call when fetching item information }
+
+ kLSInvalidExtensionIndex = $FFFFFFFF; { Index returned from LSGetExtensionInfo when name has no extension }
+
+
+type
+ LSRequestedInfo = OptionBits;
+
+const
+ kLSRequestExtension = $00000001; { safe to use from threads } { thread-safe in 10.0 }
+ kLSRequestTypeCreator = $00000002; { safe to use from threads } { thread-safe in 10.0 }
+ kLSRequestBasicFlagsOnly = $00000004; { all but type of application and extension flags - safe to use from threads } { thread-safe in 10.2 }
+ kLSRequestAppTypeFlags = $00000008; { NOT SAFE to use from threads } { thread-safe in 10.2 }
+ kLSRequestAllFlags = $00000010; { NOT SAFE to use from threads } { thread-safe in 10.2 }
+ kLSRequestIconAndKind = $00000020; { NOT SAFE to use from threads } { thread-safe in 10.2 }
+ kLSRequestExtensionFlagsOnly = $00000040; { safe to use from threads } { thread-safe in 10.0 }
+ kLSRequestAllInfo = $FFFFFFFF; { NOT SAFE to use from threads } { thread-safe in 10.2 }
+
+
+type
+ LSItemInfoFlags = OptionBits;
+
+const
+ kLSItemInfoIsPlainFile = $00000001; { none of the following applies }
+ kLSItemInfoIsPackage = $00000002; { app, doc, or bundle package }
+ kLSItemInfoIsApplication = $00000004; { single-file or packaged }
+ kLSItemInfoIsContainer = $00000008; { folder or volume }
+ kLSItemInfoIsAliasFile = $00000010; { 'real' alias }
+ kLSItemInfoIsSymlink = $00000020; { UNIX symbolic link only }
+ kLSItemInfoIsInvisible = $00000040; { does not include '.' files or '.hidden' entries }
+ kLSItemInfoIsNativeApp = $00000080; { Carbon or Cocoa native app }
+ kLSItemInfoIsClassicApp = $00000100; { CFM Classic app }
+ kLSItemInfoAppPrefersNative = $00000200; { Carbon app that prefers to be launched natively }
+ kLSItemInfoAppPrefersClassic = $00000400; { Carbon app that prefers to be launched in Classic }
+ kLSItemInfoAppIsScriptable = $00000800; { App can be scripted }
+ kLSItemInfoIsVolume = $00001000; { item is a volume }
+ kLSItemInfoExtensionIsHidden = $00100000; { item has a hidden extension }
+
+
+type
+ LSRolesMask = OptionBits;
+
+const
+ kLSRolesNone = $00000001; { no claim is made about support for this type/scheme }
+ kLSRolesViewer = $00000002; { claim to be able to view this type/scheme }
+ kLSRolesEditor = $00000004; { claim to be able to edit this type/scheme }
+ kLSRolesAll = $FFFFFFFF; { claim to do it all }
+
+
+type
+ LSKindID = UInt32;
+
+const
+ kLSUnknownKindID = 0;
+
+ kLSUnknownType = 0;
+ kLSUnknownCreator = 0;
+
+
+type
+ LSItemInfoRecordPtr = ^LSItemInfoRecord;
+ LSItemInfoRecord = record
+ flags: LSItemInfoFlags;
+ filetype: OSType;
+ creator: OSType;
+ extension: CFStringRef; { release when finished }
+ iconFileName: CFStringRef; { not for general use }
+ kindID: LSKindID; { not for general use }
+ end;
+
+ LSAcceptanceFlags = OptionBits;
+
+const
+ kLSAcceptDefault = $00000001;
+ kLSAcceptAllowLoginUI = $00000002; { show UI to log in if necessary }
+
+
+type
+ LSLaunchFlags = OptionBits;
+
+const
+ kLSLaunchDefaults = $00000001; { default = open, async, use Info.plist, start Classic }
+ kLSLaunchAndPrint = $00000002; { print items instead of open them }
+ kLSLaunchReserved2 = $00000004;
+ kLSLaunchReserved3 = $00000008;
+ kLSLaunchReserved4 = $00000010;
+ kLSLaunchReserved5 = $00000020;
+ kLSLaunchReserved6 = $00000040;
+ kLSLaunchInhibitBGOnly = $00000080; { causes launch to fail if target is background-only. }
+ kLSLaunchDontAddToRecents = $00000100; { do not add app or documents to recents menus. }
+ kLSLaunchDontSwitch = $00000200; { don't bring new app to the foreground. }
+ kLSLaunchNoParams = $00000800; { Use Info.plist to determine launch parameters }
+ kLSLaunchAsync = $00010000; { launch async; obtain results from kCPSNotifyLaunch. }
+ kLSLaunchStartClassic = $00020000; { start up Classic environment if required for app. }
+ kLSLaunchInClassic = $00040000; { force app to launch in Classic environment. }
+ kLSLaunchNewInstance = $00080000; { Instantiate app even if it is already running. }
+ kLSLaunchAndHide = $00100000; { Send child a "hide" request as soon as it checks in. }
+ kLSLaunchAndHideOthers = $00200000; { Hide all other apps when child checks in. }
+
+
+type
+ LSLaunchFSRefSpecPtr = ^LSLaunchFSRefSpec;
+ LSLaunchFSRefSpec = record
+ appRef: FSRefPtr; { app to use, can be NULL }
+ numDocs: UInt32; { items to open/print, can be NULL }
+ itemRefs: FSRefPtr; { array of FSRefs }
+ passThruParams: AEDescPtr; { passed untouched to application as optional parameter }
+ launchFlags: LSLaunchFlags;
+ asyncRefCon: Ptr; { used if you register for app birth/death notification }
+ end;
+
+ LSLaunchURLSpecPtr = ^LSLaunchURLSpec;
+ LSLaunchURLSpec = record
+ appURL: CFURLRef; { app to use, can be NULL }
+ itemURLs: CFArrayRef; { items to open/print, can be NULL }
+ passThruParams: AEDescPtr; { passed untouched to application as optional parameter }
+ launchFlags: LSLaunchFlags;
+ asyncRefCon: Ptr; { used if you register for app birth/death notification }
+ end;
+
+
+ { ======================================================================================================== }
+ { LaunchServices Public Entry Points }
+ { ======================================================================================================== }
+
+ {
+ * LSInit() *** DEPRECATED in 10.3 ***
+ *
+ * Discussion:
+ * LSInit is deprecated. Do not use.
+ *
+ * Pre 10.3 Summary:
+ * Initialize LaunchServices for use.
+ *
+ * Pre 10.3 Discussion:
+ * LSInit is optional but should be called by top level applications
+ * to explicitly incur any startup costs at a known time. Frameworks
+ * and libraries need never call LSInit.
+ *
+ * Pre 10.3 Parameters:
+ *
+ * inFlags:
+ * Use kLSInitializeDefaults.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.3
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3
+function LSInit(inFlags: LSInitializeFlags): OSStatus; external name '_LSInit';
+
+
+{
+ * LSTerm() *** DEPRECATED in 10.3 ***
+ *
+ * Discussion:
+ * LSTerm is deprecated. It does nothing.
+ *
+ * Pre 10.3 Summary:
+ * Terminate LaunchServices use.
+ *
+ * Pre 10.3 Discussion:
+ * LSTerm is optional but should be called by top level applications
+ * to explicitly terminate LaunchServices activity at a known time.
+ * Frameworks and libraries need never call LSTerm.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.3
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3
+function LSTerm: OSStatus; external name '_LSTerm';
+
+
+{
+ * LSCopyItemInfoForRef()
+ *
+ * Summary:
+ * Return information about an item.
+ *
+ * Discussion:
+ * Returns as much or as little information as requested about
+ * inItemRef. Some information is available in a thread-safe manner,
+ * some is not. All CFStrings must be released after use.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inItemRef:
+ * The FSRef of the item about which information is requested.
+ *
+ * inWhichInfo:
+ * Flags indicating which information to return
+ *
+ * outItemInfo:
+ * Information is returned in this structure. Must not be NULL
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+function LSCopyItemInfoForRef(const (*var*) inItemRef: FSRef; inWhichInfo: LSRequestedInfo; var outItemInfo: LSItemInfoRecord): OSStatus; external name '_LSCopyItemInfoForRef';
+
+
+{
+ * LSCopyItemInfoForURL()
+ *
+ * Summary:
+ * Return information about an item.
+ *
+ * Discussion:
+ * Returns as much or as little information as requested about
+ * inURL. Some information is available in a thread-safe manner,
+ * some is not. All CFStrings must be released after use.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inURL:
+ * The CFURLRef of the item about which information is requested.
+ *
+ * inWhichInfo:
+ * Flags indicating which information to return
+ *
+ * outItemInfo:
+ * Information is returned in this structure. Must not be NULL
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+function LSCopyItemInfoForURL(inURL: CFURLRef; inWhichInfo: LSRequestedInfo; var outItemInfo: LSItemInfoRecord): OSStatus; external name '_LSCopyItemInfoForURL';
+
+
+{
+ * LSGetExtensionInfo()
+ *
+ * Summary:
+ * Get information about the extension for a file system name.
+ *
+ * Discussion:
+ * Returns the starting index of the extension (not including the
+ * period) or kLSInvalidExtensionIndex if the input name has no
+ * extension.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inNameLen:
+ * The number of the UniChars in inNameBuffer.
+ *
+ * inNameBuffer:
+ * The buffer containing the name's Unicode characters.
+ *
+ * outExtStartIndex:
+ * On success, the starting index of the extension if there is one
+ * (not including the period). Set to kLSInvalidExtensionIndex if
+ * inNameBuffer does not contain a valid extension.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ }
+function LSGetExtensionInfo(inNameLen: UniCharCount; inNameBuffer: ConstUniCharPtr; var outExtStartIndex: UniCharCount): OSStatus; external name '_LSGetExtensionInfo';
+
+
+{
+ * LSCopyDisplayNameForRef()
+ *
+ * Summary:
+ * Get the display name for an FSRef.
+ *
+ * Discussion:
+ * Return a copy of the display name for an FSRef. Takes into
+ * consideration whether this item has a hidden extension or not.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inRef:
+ * The FSRef for which the display name is desired.
+ *
+ * outDisplayName:
+ * Pointer to the CFString into which the display name should be
+ * copied. Callers must dispose of the resulting CFString.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ }
+function LSCopyDisplayNameForRef(const (*var*) inRef: FSRef; var outDisplayName: CFStringRef): OSStatus; external name '_LSCopyDisplayNameForRef';
+
+
+{
+ * LSCopyDisplayNameForURL()
+ *
+ * Summary:
+ * Get the display name for a CFURLRef.
+ *
+ * Discussion:
+ * Return a copy of the display name for a CFURLRef. Takes into
+ * consideration whether this item has a hidden extension or not.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inURL:
+ * The URL for which the display name is desired.
+ *
+ * outDisplayName:
+ * Pointer to the CFString into which the display name should be
+ * copied. Callers must dispose of the resulting CFString.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ }
+function LSCopyDisplayNameForURL(inURL: CFURLRef; var outDisplayName: CFStringRef): OSStatus; external name '_LSCopyDisplayNameForURL';
+
+
+{
+ * LSSetExtensionHiddenForRef()
+ *
+ * Summary:
+ * Sets whether the extension for an FSRef is hidden or not.
+ *
+ * Discussion:
+ * Sets the necessary file system state to indicate that the
+ * extension for inRef is hidden, as in the Finder. You can
+ * determine if an FSRef's extension is hidden using
+ * LSCopyItemInfoForRef.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inRef:
+ * The FSRef for which the extension is to be hidden or shown.
+ *
+ * inHide:
+ * True to hide inRef's extension, false to show it.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ }
+function LSSetExtensionHiddenForRef(const (*var*) inRef: FSRef; inHide: boolean): OSStatus; external name '_LSSetExtensionHiddenForRef';
+
+
+{
+ * LSSetExtensionHiddenForURL()
+ *
+ * Summary:
+ * Sets whether the extension for a CFURLRef is hidden or not.
+ *
+ * Discussion:
+ * Sets the necessary file system state to indicate that the
+ * extension for inURL is hidden, as in the Finder. You can
+ * determine if a CFURLRef's extension is hidden using
+ * LSCopyItemInfoForURL.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inURL:
+ * The CFURLRef for which the extension is to be hidden or shown.
+ *
+ * inHide:
+ * True to hide inURL's extension, false to show it.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ }
+function LSSetExtensionHiddenForURL(inURL: CFURLRef; inHide: boolean): OSStatus; external name '_LSSetExtensionHiddenForURL';
+
+
+{
+ * LSCopyKindStringForRef()
+ *
+ * Summary:
+ * Get the kind string for an item.
+ *
+ * Discussion:
+ * Returns the kind string as used in the Finder and elsewhere for
+ * inFSRef. The CFStringRef must be released after use.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inFSRef:
+ * The item for which the kind string is requested.
+ *
+ * outKindString:
+ * A non-NULL CFStringRef* into which the kind string will be
+ * copied. This CFStringRef must be released after use.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+function LSCopyKindStringForRef(const (*var*) inFSRef: FSRef; var outKindString: CFStringRef): OSStatus; external name '_LSCopyKindStringForRef';
+
+
+{
+ * LSCopyKindStringForURL()
+ *
+ * Summary:
+ * Get the kind string for an item.
+ *
+ * Discussion:
+ * Returns the kind string as used in the Finder and elsewhere for
+ * inURL. The CFStringRef must be released after use.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inURL:
+ * The item for which the kind string is requested.
+ *
+ * outKindString:
+ * A non-NULL CFStringRef* into which the kind string will be
+ * copied. This CFStringRef must be released after use.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+function LSCopyKindStringForURL(inURL: CFURLRef; var outKindString: CFStringRef): OSStatus; external name '_LSCopyKindStringForURL';
+
+{
+ * LSCopyKindStringForTypeInfo()
+ *
+ * Summary:
+ * Return the kind string for items like the provided info
+ *
+ * Discussion:
+ * Returns the kind string as shown in the Finder for the those
+ * items whose type, creator, and/or extension match the provided
+ * information. The kind string returned will be the one that most
+ * closely describes all the information provided. The kind string
+ * is subject to the document binding preferences that have been
+ * specified by the user. For example, if a creator is specified but
+ * the user has asked for files with the given
+ * creator/type/extension combination to open in an application with
+ * a different creator, the kind string will be loaded from the
+ * user's preferred application.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inType:
+ * The OSType file type for which you want a kind string. Specify
+ * kLSUnknownType if no file type information is available.
+ *
+ * inCreator:
+ * The OSType creator for which you want a kind string. Specify
+ * kLSUnknownCreator if no creator information is available.
+ *
+ * inExtension:
+ * The extension for which you want a kind string. Specify NULL if
+ * no extension information is available.
+ *
+ * outKindString:
+ * A CFStringRef* to receive the copied kind string object. This
+ * CFStringRef must be released eventually.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function LSCopyKindStringForTypeInfo(
+ inType: OSType;
+ inCreator: OSType;
+ inExtension: CFStringRef; { can be NULL }
+ VAR outKindString: CFStringRef): OSStatus; external name '_LSCopyKindStringForTypeInfo';
+
+
+{
+ * LSCopyKindStringForMIMEType()
+ *
+ * Summary:
+ * Get the kind string for the specified MIME type.
+ *
+ * Discussion:
+ * Returns the localized kind string describing the specified MIME
+ * type.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inMIMEType:
+ * The string specifying the MIME type.
+ *
+ * outKindString:
+ * A CFStringRef* to receive the copied kind string object. This
+ * CFStringRef must be released eventually.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function LSCopyKindStringForMIMEType(
+ inMIMEType: CFStringRef;
+ VAR outKindString: CFStringRef): OSStatus; external name '_LSCopyKindStringForMIMEType';
+
+{
+ * LSGetApplicationForItem()
+ *
+ * Summary:
+ * Return the application used to open an item.
+ *
+ * Discussion:
+ * Consults the binding tables to return the application that would
+ * be used to open inItemRef if it were double-clicked in the
+ * Finder. This application will be the user-specified override if
+ * appropriate or the default otherwise. If no application is known
+ * to LaunchServices suitable for opening this item,
+ * kLSApplicationNotFoundErr will be returned.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inItemRef:
+ * The FSRef of the item for which the application is requested.
+ *
+ * inRoleMask:
+ * Whether to return the editor or viewer for inItemRef. If you
+ * don't care which, use kLSRolesAll.
+ *
+ * outAppRef:
+ * Filled in with the FSRef of the application if not NULL.
+ *
+ * outAppURL:
+ * Filled in with the CFURLRef of the application if not NULL.
+ * THIS FUNCTION, DESPITE ITS NAME, RETAINS THE URL REFERENCE ON
+ * BEHALF OF THE CALLER. THE CALLER MUST EVENTUALLY RELEASE THE
+ * RETURNED URL REFERENCE.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+function LSGetApplicationForItem(const (*var*) inItemRef: FSRef; inRoleMask: LSRolesMask; outAppRef: FSRefPtr; outAppURL: CFURLRefPtr): OSStatus; external name '_LSGetApplicationForItem';
+
+
+{
+ * LSGetApplicationForInfo()
+ *
+ * Summary:
+ * Return the application used to open items with particular data.
+ *
+ * Discussion:
+ * Consults the binding tables to return the application that would
+ * be used to open items with type, creator, and/or extension as
+ * provided if they were double-clicked in the Finder. This
+ * application will be the default for items like this if one has
+ * been set. If no application is known to LaunchServices suitable
+ * for opening such items, kLSApplicationNotFoundErr will be
+ * returned. Not all three input parameters can be NULL at the same
+ * time nor can both output parameters be NULL at the same time.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inType:
+ * The file type to consider. Can be kLSUnknownType.
+ *
+ * inCreator:
+ * The file creator to consider. Can be kLSUnknownCreator.
+ *
+ * inExtension:
+ * The file name extension to consider. Can be NULL.
+ *
+ * inRoleMask:
+ * Whether to return the editor or viewer for inItemRef. If you
+ * don't care which, use kLSRolesAll.
+ *
+ * outAppRef:
+ * Filled in with the FSRef of the application if not NULL.
+ *
+ * outAppURL:
+ * Filled in with the CFURLRef of the application if not NULL.
+ * THIS FUNCTION, DESPITE ITS NAME, RETAINS THE URL REFERENCE ON
+ * BEHALF OF THE CALLER. THE CALLER MUST EVENTUALLY RELEASE THE
+ * RETURNED URL REFERENCE.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+function LSGetApplicationForInfo(inType: OSType; inCreator: OSType; inExtension: CFStringRef; inRoleMask: LSRolesMask; outAppRef: FSRefPtr; outAppURL: CFURLRefPtr): OSStatus; external name '_LSGetApplicationForInfo';
+
+{
+ * LSCopyApplicationForMIMEType()
+ *
+ * Summary:
+ * Return the application used to handle data with the specified
+ * MIME type.
+ *
+ * Discussion:
+ * The returned application URL will be the user's preferred handler
+ * for the MIME type if one has been set. If no user preferred
+ * application has been set, Launch Services will select a default
+ * handler for the MIME type. If no application is known to handle
+ * the MIME type, kLSApplicationNotFoundErr will be returned.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inMIMEType:
+ * The string specifying the MIME type.
+ *
+ * inRoleMask:
+ * A role mask that the chosen application must satisfy. Use
+ * kLSRolesAll if the role is not important.
+ *
+ * outAppURL:
+ * Receives the copied CFURLRef, which must be released by the
+ * caller.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function LSCopyApplicationForMIMEType(
+ inMIMEType: CFStringRef;
+ inRoleMask: LSRolesMask;
+ VAR outAppURL: CFURLRef): OSStatus; external name '_LSCopyApplicationForMIMEType';
+
+
+{
+ * LSGetApplicationForURL()
+ *
+ * Summary:
+ * Return the application used to open an item.
+ *
+ * Discussion:
+ * Consults the binding tables to return the application that would
+ * be used to open inURL if it were double-clicked in the Finder.
+ * This application will be the user-specified override if
+ * appropriate or the default otherwise. If no application is known
+ * to LaunchServices suitable for opening this item,
+ * kLSApplicationNotFoundErr will be returned.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inURL:
+ * The CFURLRef of the item for which the application is requested.
+ *
+ * inRoleMask:
+ * Whether to return the editor or viewer for inItemRef. If you
+ * don't care which, use kLSRolesAll.
+ *
+ * outAppRef:
+ * Filled in with the FSRef of the application if not NULL.
+ *
+ * outAppURL:
+ * Filled in with the CFURLRef of the application if not NULL.
+ * THIS FUNCTION, DESPITE ITS NAME, RETAINS THE URL REFERENCE ON
+ * BEHALF OF THE CALLER. THE CALLER MUST EVENTUALLY RELEASE THE
+ * RETURNED URL REFERENCE.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+function LSGetApplicationForURL(inURL: CFURLRef; inRoleMask: LSRolesMask; var outAppRef: FSRef; var outAppURL: CFURLRef): OSStatus; external name '_LSGetApplicationForURL';
+
+
+{
+ * LSFindApplicationForInfo()
+ *
+ * Summary:
+ * Locate a specific application.
+ *
+ * Discussion:
+ * Returns the application with the corresponding input information.
+ * The registry of applications is consulted first in order of
+ * bundleID, then creator, then name. All comparisons are case
+ * insensitive and 'ties' are decided first by version, then by
+ * native vs. Classic.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inCreator:
+ * The file creator to consider. Can be kLSUnknownCreator.
+ *
+ * inBundleID:
+ * The bundle ID to consider. Can be NULL.
+ *
+ * inName:
+ * The name to consider. Can be NULL. Must include any extensions
+ * that are part of the file system name, e.g. '.app'.
+ *
+ * outAppRef:
+ * Filled in with the FSRef of the application if not NULL.
+ *
+ * outAppURL:
+ * Filled in with the CFURLRef of the application if not NULL.
+ * THIS FUNCTION, DESPITE ITS NAME, RETAINS THE URL REFERENCE ON
+ * BEHALF OF THE CALLER. THE CALLER MUST EVENTUALLY RELEASE THE
+ * RETURNED URL REFERENCE.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+function LSFindApplicationForInfo(inCreator: OSType; inBundleID: CFStringRef; inName: CFStringRef; outAppRef: FSRefPtr; outAppURL: CFURLRefPtr): OSStatus; external name '_LSFindApplicationForInfo';
+
+
+{
+ * LSCanRefAcceptItem()
+ *
+ * Summary:
+ * Determine whether an item can accept another item.
+ *
+ * Discussion:
+ * Returns in outAcceptsItem whether inTargetRef can accept
+ * inItemFSRef as in a drag and drop operation. If inRoleMask is
+ * other than kLSRolesAll then make sure inTargetRef claims to
+ * fulfill the requested role.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inItemFSRef:
+ * FSRef of the item about which acceptance is requested.
+ *
+ * inTargetRef:
+ * FSRef of the potential target.
+ *
+ * inRoleMask:
+ * The role(s) the target must claim in order to consider
+ * acceptance.
+ *
+ * inFlags:
+ * Use kLSAcceptDefault.
+ *
+ * outAcceptsItem:
+ * Filled in with result. Must not be NULL.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+function LSCanRefAcceptItem(const (*var*) inItemFSRef: FSRef; const (*var*) inTargetRef: FSRef; inRoleMask: LSRolesMask; inFlags: LSAcceptanceFlags; var outAcceptsItem: boolean): OSStatus; external name '_LSCanRefAcceptItem';
+
+
+{
+ * LSCanURLAcceptURL()
+ *
+ * Summary:
+ * Determine whether an item can accept another item.
+ *
+ * Discussion:
+ * Returns in outAcceptsItem whether inTargetURL can accept
+ * inItemURL as in a drag and drop operation. If inRoleMask is other
+ * than kLSRolesAll then make sure inTargetRef claims to fulfill the
+ * requested role.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inItemURL:
+ * CFURLRef of the item about which acceptance is requested.
+ *
+ * inTargetURL:
+ * CFURLRef of the potential target.
+ *
+ * inRoleMask:
+ * The role(s) the target must claim in order to consider
+ * acceptance.
+ *
+ * inFlags:
+ * Use kLSAcceptDefault.
+ *
+ * outAcceptsItem:
+ * Filled in with result. Must not be NULL.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+function LSCanURLAcceptURL(inItemURL: CFURLRef; inTargetURL: CFURLRef; inRoleMask: LSRolesMask; inFlags: LSAcceptanceFlags; var outAcceptsItem: boolean): OSStatus; external name '_LSCanURLAcceptURL';
+
+
+{
+ * LSRegisterURL()
+ *
+ * Discussion:
+ * If the specified URL refers to an application or other bundle
+ * claiming to handle documents or URLs, add the bundle's document
+ * and URL claims to the Launch Services database.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * inURL:
+ * The CFURLRef of the item (a directory or file) to be registered.
+ *
+ * inUpdate:
+ * When false, LSRegisterURL does not register the item if it has
+ * already been registered and the current modification date of
+ * the item has not changed from when it was last registered. When
+ * true, the item's registered info is updated, even if the
+ * modification has not changed.
+ *
+ * Result:
+ * An OSStatus value: noErr - Success kLSNoRegistrationInfoErr - The
+ * item does not contain info requiring registration kLSDataErr -
+ * The item's property list info is malformed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function LSRegisterURL(
+ inURL: CFURLRef;
+ inUpdate: Boolean): OSStatus; external name '_LSRegisterURL';
+
+
+{
+ * LSRegisterFSRef()
+ *
+ * Discussion:
+ * If the specified FSRef refers to an application or other bundle
+ * claiming to handle documents or URLs, add the bundle's document
+ * and URL claims to the Launch Services database.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * inRef:
+ * The FSRef of the item to be registered.
+ *
+ * inUpdate:
+ * When false, LSRegisterFSRef does not register the item if it
+ * has already been registered and the current modification date
+ * of the item has not changed from when it was last registered.
+ * When true, the item's registered info is updated, even if the
+ * modification has not changed.
+ *
+ * Result:
+ * An OSStatus value: noErr - Success kLSNoRegistrationInfoErr - The
+ * item does not contain info requiring registration kLSDataErr -
+ * The item's property list info is malformed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function LSRegisterFSRef(
+ const (*var*) inRef: FSRef;
+ inUpdate: Boolean): OSStatus; external name '_LSRegisterFSRef';
+
+
+{
+ * LSCopyApplicationURLsForURL()
+ *
+ * Discussion:
+ * Returns an array of URLs to applications that offer the requested
+ * role(s) for the input item.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * inURL:
+ * The CFURLRef of the item for which all suitable applications
+ * are desired. If the URL is a file URL, it is treated as a
+ * document, and applications are selected based on the document's
+ * type information. Otherwise, applications are selected based on
+ * the URL's scheme.
+ *
+ * inRoleMask:
+ * The role(s) which must intersect with the role provided by an
+ * application for the specified item in order for the application
+ * to be included in the result. Pass kLSRolesAll if any role is
+ * acceptable.
+ *
+ * Result:
+ * An array of CFURLRefs, one for each application which can open
+ * inURL with at least one of the roles in inRoleMask, or NULL if no
+ * applications can open the item. When an array is returned, you
+ * must eventually release it.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function LSCopyApplicationURLsForURL(
+ inURL: CFURLRef;
+ inRoleMask: LSRolesMask): CFArrayRef; external name '_LSCopyApplicationURLsForURL';
+
+
+{
+ * LSOpenFSRef()
+ *
+ * Summary:
+ * Open an application, document, or folder.
+ *
+ * Discussion:
+ * Opens applications, documents, and folders. Applications are
+ * opened via an 'oapp' or 'rapp' event. Documents are opened in
+ * their user-overridden or default applications as appropriate.
+ * Folders are opened in the Finder. Use the more specific
+ * LSOpenFromRefSpec for more control over launching.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inRef:
+ * The FSRef of the item to launch.
+ *
+ * outLaunchedRef:
+ * The FSRef of the item actually launched. For inRefs that are
+ * documents, outLaunchedRef will be the application used to
+ * launch the document. Can be NULL.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+function LSOpenFSRef(const (*var*) inRef: FSRef; outLaunchedRef: FSRefPtr): OSStatus; external name '_LSOpenFSRef';
+
+
+{
+ * LSOpenCFURLRef()
+ *
+ * Summary:
+ * Open an application, document, or folder.
+ *
+ * Discussion:
+ * Opens applications, documents, and folders. Applications are
+ * opened via an 'oapp' or 'rapp' event. Documents are opened in
+ * their user-overridden or default applications as appropriate.
+ * Folders are opened in the Finder. Use the more specific
+ * LSOpenFromURLSpec for more control over launching.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inURL:
+ * The CFURLRef of the item to launch.
+ *
+ * outLaunchedURL:
+ * The CFURLRef of the item actually launched. For inURLs that are
+ * documents, outLaunchedURL will be the application used to
+ * launch the document. Can be NULL. THIS FUNCTION, DESPITE ITS
+ * NAME, RETAINS THE URL REFERENCE ON BEHALF OF THE CALLER. THE
+ * CALLER MUST EVENTUALLY RELEASE THE RETURNED URL REFERENCE.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+function LSOpenCFURLRef(inURL: CFURLRef; outLaunchedURL: CFURLRefPtr): OSStatus; external name '_LSOpenCFURLRef';
+
+
+{
+ * LSOpenFromRefSpec()
+ *
+ * Summary:
+ * Opens an application or one or more documents or folders.
+ *
+ * Discussion:
+ * Opens applications, documents, and folders.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inLaunchSpec:
+ * The specification of what to launch and how to launch it.
+ *
+ * outLaunchedRef:
+ * The FSRef of the item actually launched. For inRefs that are
+ * documents, outLaunchedRef will be the application used to
+ * launch the document. Can be NULL.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+function LSOpenFromRefSpec(const (*var*) inLaunchSpec: LSLaunchFSRefSpec; outLaunchedRef: FSRefPtr): OSStatus; external name '_LSOpenFromRefSpec';
+
+
+{
+ * LSOpenFromURLSpec()
+ *
+ * Summary:
+ * Opens an application or one or more documents or folders.
+ *
+ * Discussion:
+ * Opens applications, documents, and folders.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Parameters:
+ *
+ * inLaunchSpec:
+ * The specification of what to launch and how to launch it.
+ *
+ * outLaunchedURL:
+ * The CFURLRef of the item actually launched. For inURLs that are
+ * documents, outLaunchedURL will be the application used to
+ * launch the document. Can be NULL. THIS FUNCTION, DESPITE ITS
+ * NAME, RETAINS THE URL REFERENCE ON BEHALF OF THE CALLER. THE
+ * CALLER MUST EVENTUALLY RELEASE THE RETURNED URL REFERENCE.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x
+ * Mac OS X: in version 10.0 and later
+ }
+function LSOpenFromURLSpec(const (*var*) inLaunchSpec: LSLaunchURLSpec; outLaunchedURL: CFURLRefPtr): OSStatus; external name '_LSOpenFromURLSpec';
+
+
+{$ALIGN MAC68K}
+
+
+{unit Pasteboard}
+
+{ File: Pasteboard.p(.pas) }
+{ }
+{ Contains: CodeWarrior Pascal(GPC) translation of Apple's Mac OS X 10.3 introduced Pasteboard.h }
+{ Translation compatible with make-gpc-interfaces.pl generated MWPInterfaces }
+{ (GPCPInterfaces) and Mac OS X 10.3.x or higher. The CodeWarrior Pascal translation }
+{ is linkable with Mac OS X 10.3.x or higher CFM CarbonLib. The GPC translation is }
+{ linkable with Mac OS X 10.3.x or higher Mach-O Carbon.framework. }
+{ }
+{ Version: 1.0 }
+{ }
+{ Pascal Translation: Gale Paeper, <gpaeper@empirenet.com>, 2004 }
+{ }
+{ Copyright: Subject to the constraints of Apple's original rights, you're free to use this }
+{ translation as you deem fit. }
+{ }
+{ Bugs?: This is an AS IS translation with no express guarentees of any kind. }
+{ If you do find a bug, please help out the Macintosh Pascal programming community by }
+{ reporting your bug finding and possible fix to either personal e-mail to Gale Paeper }
+{ or a posting to the MacPascal mailing list. }
+{ }
+{
+ Change History (most recent first) (DD/MM/YY):
+
+ <1> 05/12/04 GRP First Pascal translation of Pasteboard.h, version HIServices-125.6~1.
+}
+{ Translation assisted by: }
+{This file was processed by Dan's Source Converter}
+{version 1.3 (this version modified by Ingemar Ragnemalm)}
+
+{The original source on which this file is based: }
+{
+ File: HIServices/Pasteboard.h
+
+ Contains: Pasteboard Manager Interfaces.
+
+ Version: HIServices-125.6~1
+
+ Copyright: © 2003 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN POWER}
+
+
+{
+ * Pasteboard Manager
+ *
+ * Discussion:
+ * Pasteboard Manager is the replacement of the Scrap and Drag
+ * flavor APIs. Like the Scrap Manager, it is a cross process data
+ * transport mechanism. Unlike the Drag Manager, it is not bound to
+ * particular high level user actions to initiate and resolve the
+ * data transport. This allows the Pasteboard Manager to be used as
+ * the data transport mechanism for copy and paste, drag and drop,
+ * services, as well as generic cross process communication.
+ *
+ *
+ * Like scraps, pasteboards are local references to global, cross
+ * process, resources. Although, where scraps exist forever,
+ * pasteboard are CFTypes and should be released at the end of their
+ * usefulness. Multiple pasteboard references in a single
+ * application may point to the same global pasteboard resource.
+ * Once the global pasteboard resource has been cleared, all
+ * pasteboard references to that global resource in the application
+ * share ownership allowing any of them to add data to the
+ * pasteboard. Of course, this is not a free for all. Once a flavor
+ * has been added it can not be overwritten by another local
+ * reference. Calling CFRelease() on any one of these references
+ * will implicitly call in promises, but only those made through the
+ * particular pasteboard reference being released. In this way,
+ * local pasteboard references in various components of the
+ * application can add data, make promises, keep those promises, and
+ * release their local pasteboard reference independently of the
+ * other components.
+ *
+ * For long lived pasteboards, like the clipboard or find
+ * pasteboards, the suggested usage model is for a component to
+ * create a local reference to a pasteboard at the beginning of its
+ * life cycle, hold on to it, and release it at the end of its life
+ * cycle. As long as a pasteboard reference in any application still
+ * points to the global pasteboard resource, the global resource
+ * will not be released. When the final reference is released,
+ * promises will not be called in as the global pasteboard resource
+ * will be released. Only if you want to guarantee a global
+ * pasteboard resource continues to exist beyond the life of your
+ * application should you refrain from calling CFRelease(). In this
+ * case, be sure to call PasteboardResolvePromises() to make sure
+ * any promises are called in. This is not necessary for the
+ * clipboard and find pasteboards as they are retained by the system
+ * and never released.
+ *
+ * Like the Drag Manager, the Pasteboard Manager allows the use of
+ * multiple items each with its own set of flavors. When using the
+ * clipboard or find pasteboards, it's traditionally been common to
+ * only use the first item, but now multiple items can be copied as
+ * is the case in the Finder. This also opens up the ability for
+ * services to act on multiple items. Another difference from both
+ * the Scrap and Drag Managers is the use of Uniform Type Identifier
+ * based flavor types rather than four character code OSTypes. These
+ * have several advantages. They allow compatibility with Cocoa's
+ * NSPasteboard, more accurately describe the data being
+ * transported, provide a type inheritance mechanism and allow
+ * namespacing with a reverse DNS scheme.
+ }
+
+type
+ PasteboardRef = ^SInt32; { an opaque 32-bit type }
+ PasteboardItemID = Ptr;
+
+{ Pasteboard Manager error codes }
+const
+ badPasteboardSyncErr = -25130; { pasteboard has been modified and must be synchronized }
+ badPasteboardIndexErr = -25131; { item index does not exist }
+ badPasteboardItemErr = -25132; { item reference does not exist }
+ badPasteboardFlavorErr = -25133; { item flavor does not exist }
+ duplicatePasteboardFlavorErr = -25134; { item flavor already exists }
+ notPasteboardOwnerErr = -25135; { client did not clear the pasteboard }
+ noPasteboardPromiseKeeperErr = -25136; { a promise is being added without a promise keeper }
+
+
+{
+ * PasteboardSyncFlags
+ *
+ * Summary:
+ * The following constants are used by the PasteboardSynchronize()
+ * routine to indicate the status of the local pasteboard reference
+ * in relation to the global, cross process pasteboard resource.
+ }
+type
+ PasteboardSyncFlags = UInt32;
+
+const
+
+ {
+ * Indicates that the global pasteboard resource has been modified
+ * since the last time it was accessed via the local pasteboard
+ * reference. The call to PasteboardSynchronize() has updated the
+ * local pasteboard reference to sync it up with the global resource.
+ * This is a good time to see what new information has been placed on
+ * the pasteboard to determine whether any tasty flavors have been
+ * added and possibly enable pasting.
+ }
+ kPasteboardModified = $00000001; {(1 << 0)}
+
+ {
+ * Indicates that the global pasteboard resource was most recently
+ * cleared by the this application. Any local pasteboard reference in
+ * the client application may add data to the global pasteboard
+ * resource.
+ }
+ kPasteboardClientIsOwner = $00000002; {(1 << 1)}
+
+
+{
+ * PasteboardFlavorFlags
+ *
+ * Summary:
+ * Pasteboard Flavor Flags
+ *
+ * Discussion:
+ * The following constants are used to tag pasteboard item flavors
+ * with bits of useful information. The first five are settable by
+ * the client via PasteboardPutItemFlavor(). They may all be
+ * received via PasteboardGetItemFlavorFlags().
+ }
+type
+ PasteboardFlavorFlags = UInt32;
+
+const
+
+ {
+ * No additional information exists for this flavor.
+ }
+ kPasteboardFlavorNoFlags = $00000000;
+
+ {
+ * Only the process which has added this flavor can see it. If the
+ * process that owns the pasteboard places this flag on a flavor
+ * you'll never see it as the receiver so there's no reason to test
+ * for it.
+ }
+ kPasteboardFlavorSenderOnly = $00000001; {(1 << 0)}
+
+ {
+ * The data for this flavor was translated in some manner by the
+ * sender before adding it to the pasteboard. Flavors marked with
+ * this flag are not stored by the Finder in clipping files.
+ }
+ kPasteboardFlavorSenderTranslated = $00000002; {(1 << 1)}
+
+ {
+ * Set by the sender if the flavor data should not be saved by the
+ * receiver. The data contained may become stale after the end of the
+ * drag. Flavors marked with this flag are not stored by the Finder
+ * in clipping files.
+ }
+ kPasteboardFlavorNotSaved = $00000004; {(1 << 2)}
+
+ {
+ * Like kPasteboardFlavorSenderOnly, when the sender adds this flag,
+ * the presence of this flavor will not be made known when
+ * PasteboardCopyItemFlavors() is called by the receiver. However,
+ * the flavor flags and data can be accessed when explicitly
+ * requested via PasteboardGetItemFlavorFlags() or
+ * PasteboardCopyItemFlavorData(). This allows a suite of
+ * applications to communicate without exporting their method of
+ * communication.
+ }
+ kPasteboardFlavorRequestOnly = $00000008; {(1 << 3)}
+
+ {
+ * The data for this flavor is provided by the Translation Manager as
+ * a convenience to receivers. Flavors marked with this flag are not
+ * stored by the Finder in clipping files. This flag can not be added
+ * by clients. It is automatically added by the Pasteboard Manager
+ * when appropriate.
+ }
+ kPasteboardFlavorSystemTranslated = $00000100; {(1 << 8)}
+
+ {
+ * The data for this flavor has not yet been added to the pasteboard
+ * by the sender. This may have been done as a performance measure if
+ * the data is expensive to generate. A request by the receiver to
+ * obtain the data will cause the promise to be kept by the sender.
+ * This flag can not be added by clients. It is automatically added
+ * by the Pasteboard Manager when appropriate.
+ }
+ kPasteboardFlavorPromised = $00000200; {(1 << 9)}
+
+{
+ * PasteboardGetTypeID()
+ *
+ * Summary:
+ * Returns the CFType identifier for a pasteboard object.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * A CFTypeID unique to pasteboard instances.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function PasteboardGetTypeID: CFTypeID; external name '_PasteboardGetTypeID';
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPasteboardClipboard CFSTRP('com.apple.pasteboard.clipboard')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kPasteboardFind CFSTRP('com.apple.pasteboard.find')}
+{$endc}
+
+const
+ kPasteboardUniqueName = NIL;
+
+{
+ * PasteboardCreate()
+ *
+ * Summary:
+ * Creates a local pasteboard reference to the global pasteboard
+ * resource of the same name.
+ *
+ * Discussion:
+ * If the the global pasteboard resource doesn't yet exist,
+ * PasteboardCreate creates a new one with the provided name.
+ * Pasteboard names are typically represented in a reverse DNS
+ * scheme (i.e., com.apple.pasteboard.clipboard). Multiple local
+ * pasteboard references may point to the same global pasteboard
+ * resource within an application. An application, window, plug-in,
+ * or object may each hold separate references. These should be held
+ * and used for the life time of the objects. Pasteboard references
+ * are CFTypes. Their memory should be released by calling
+ * CFRelease(). CFRelease() automatically resolves all promises made
+ * to the global pasteboard resource through the reference being
+ * released.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inName:
+ * The name of the pasteboard to reference or create. Passing
+ * kPasteboardUniqueName, or NULL, will guarantee that a new
+ * global pasteboard resource is created. kPasteboardClipboard is
+ * the traditional copy and paste pasteboard. kPasteboardFind is
+ * compatible with Cocoa's global find pasteboard.
+ *
+ * outPasteboard:
+ * The created pasteboard reference.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function PasteboardCreate(
+ inName: CFStringRef; { can be NULL }
+ var outPasteboard: PasteboardRef): OSStatus; external name '_PasteboardCreate';
+
+{
+ * PasteboardSynchronize()
+ *
+ * Summary:
+ * Compares a local pasteboard reference with the global pasteboard
+ * resource to which it refers, determining whether the global
+ * pasteboard resource has been modified. If so, it updates the
+ * local pasteboard reference to reflect the change. The pasteboard
+ * reference provided is always brought up to date. This routine is
+ * lightweight whether a synchronization is required or not.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPasteboard:
+ * A local pasteboard reference.
+ *
+ * Result:
+ * A set of pasteboard synchronization flags.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function PasteboardSynchronize(inPasteboard: PasteboardRef): PasteboardSyncFlags; external name '_PasteboardSynchronize';
+
+
+{
+ * PasteboardClear()
+ *
+ * Summary:
+ * Clears all data from the global pasteboard resource associated
+ * with the pasteboard reference provided. The application now owns
+ * the pasteboard and data may be placed onto the global pasteboard
+ * resource from all local pasteboards in the client application
+ * which reference it. PasteboardClear must be called before the
+ * pasteboard can be modified.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPasteboard:
+ * A local pasteboard reference.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function PasteboardClear(inPasteboard: PasteboardRef): OSStatus; external name '_PasteboardClear';
+
+
+{
+ * PasteboardCopyName()
+ *
+ * Summary:
+ * Copies the name of the given pasteboard. Useful for discovering
+ * the name of a uniquely named pasteboard so other processes may
+ * access it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPasteboard:
+ * A local pasteboard reference.
+ *
+ * outName:
+ * On return, a CFString reference to the pasteboard's name. This
+ * string must be released by the client.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function PasteboardCopyName( inPasteboard: PasteboardRef; var outName: CFStringRef ): OSStatus; external name '_PasteboardCopyName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * PasteboardGetItemCount()
+ *
+ * Summary:
+ * Returns the number of items on the pasteboard.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPasteboard:
+ * A local pasteboard reference.
+ *
+ * outItemCount:
+ * An ItemCount reference which receives number of pasteboard
+ * items.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function PasteboardGetItemCount(
+ inPasteboard: PasteboardRef;
+ var outItemCount: ItemCount): OSStatus; external name '_PasteboardGetItemCount';
+
+
+{
+ * PasteboardGetItemIdentifier()
+ *
+ * Summary:
+ * Returns the item identifier for the nth pasteboard item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPasteboard:
+ * A local pasteboard reference.
+ *
+ * inIndex:
+ * A 1-based UInt32 index requesting the nth pasteboard item reference.
+ *
+ * outItem:
+ * A PasteboardItemID which receives the nth pasteboard item
+ * reference.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function PasteboardGetItemIdentifier(
+ inPasteboard: PasteboardRef;
+ inIndex: UInt32;
+ var outItem: PasteboardItemID): OSStatus; external name '_PasteboardGetItemIdentifier';
+
+{
+ * PasteboardCopyItemFlavors()
+ *
+ * Summary:
+ * Returns the array of flavors for the provided pasteboard
+ * reference.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPasteboard:
+ * A local pasteboard reference.
+ *
+ * inItem:
+ * A pasteboard item identifier containing the flavors of interest.
+ *
+ * outFlavorTypes:
+ * A CFArrayRef reference which receives the array of Uniform Type
+ * Identifier based flavor types. It is the client's
+ * responsibility to release the flavor array via CFRelease().
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function PasteboardCopyItemFlavors(
+ inPasteboard: PasteboardRef;
+ inItem: PasteboardItemID;
+ var outFlavorTypes: CFArrayRef): OSStatus; external name '_PasteboardCopyItemFlavors';
+
+
+{
+ * PasteboardGetItemFlavorFlags()
+ *
+ * Summary:
+ * Returns the array of flags for the provided flavor, including
+ * implicit translations included by the system automatically.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPasteboard:
+ * A local pasteboard reference.
+ *
+ * inItem:
+ * A pasteboard item identifier containing the flavor of interest.
+ *
+ * inFlavorType:
+ * A Uniform Type Identifier based flavor type whose flags are
+ * being interrogated.
+ *
+ * outFlags:
+ * A PasteboardFlavorFlags reference which receives the flavor
+ * flags.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+}
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function PasteboardGetItemFlavorFlags(
+ inPasteboard: PasteboardRef;
+ inItem: PasteboardItemID;
+ inFlavorType: CFStringRef;
+ var outFlags: PasteboardFlavorFlags): OSStatus; external name '_PasteboardGetItemFlavorFlags';
+
+
+{
+ * PasteboardCopyItemFlavorData()
+ *
+ * Summary:
+ * Returns the data for the provided flavor.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPasteboard:
+ * A local pasteboard reference.
+ *
+ * inItem:
+ * A pasteboard item identifier containing the flavor of interest.
+ *
+ * inFlavorType:
+ * A Uniform Type Idendtifier based flavor type whose data is
+ * being retrieved.
+ *
+ * outData:
+ * A CFDataRef reference which receives the flavor data. It is the
+ * client's responsibility to release the data via CFRelease().
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function PasteboardCopyItemFlavorData(
+ inPasteboard: PasteboardRef;
+ inItem: PasteboardItemID;
+ inFlavorType: CFStringRef;
+ var outData: CFDataRef): OSStatus; external name '_PasteboardCopyItemFlavorData';
+
+const
+ kPasteboardPromisedData = NIL;
+
+{
+ * PasteboardPutItemFlavor()
+ *
+ * Summary:
+ * Adds flavor data or a promise to the global pasteboard resource.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPasteboard:
+ * A local pasteboard reference.
+ *
+ * inItem:
+ * A pasteboard item identifier in which to add the data or
+ * promise. Pasteboard item identifiers are unique values created
+ * by the owning application when adding pasteboard item flavor
+ * information to a drag. Additional flavors may be added to an
+ * existing item by using the same item identifier value.
+ * Depending on the application, it might be easier to use
+ * internal memory addresses as item identifiers (as long as each
+ * item being added has a unique item reference number).
+ * Pasteboard item identifiers should only be interpreted by the
+ * owning application.
+ *
+ * inFlavorType:
+ * A Uniform Type Identifier based flavor type associated with the
+ * data. If multiple flavors are to be added to an item, the
+ * owning application should add them in order of preference or
+ * richness as determined by the owing application. The ordering
+ * will be retained when viewed by the receiving application.
+ *
+ * inData:
+ * A CFDataRef reference which receives the flavor data. Passing
+ * kPasteboardPromisedData, or NULL, indicates the data is
+ * promised. This is useful if the data is expensive to generate.
+ * Making promises requires the sender to also implement a promise
+ * keeper which must be set before the promise is made.
+ *
+ * inFlags:
+ * A PasteboardFlavorFlags set of flags to attach to the data.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+}
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function PasteboardPutItemFlavor(
+ inPasteboard: PasteboardRef;
+ inItem: PasteboardItemID;
+ inFlavorType: CFStringRef;
+ inData: CFDataRef; { can be NULL }
+ inFlags: PasteboardFlavorFlags): OSStatus; external name '_PasteboardPutItemFlavor';
+
+
+{
+ * PasteboardCopyPasteLocation()
+ *
+ * Summary:
+ * Called by the owner of a pasteboard while providing promised data
+ * to determine the paste location set by the pasteboard receiver.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPasteboard:
+ * A local pasteboard reference.
+ *
+ * outPasteLocation:
+ * A CFURL reference describing the paste location. It is the
+ * client's responsibility to release the data via CFRelease().
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function PasteboardCopyPasteLocation(
+ inPasteboard: PasteboardRef;
+ var outPasteLocation: CFURLRef): OSStatus; external name '_PasteboardCopyPasteLocation';
+
+
+{
+ * PasteboardSetPasteLocation()
+ *
+ * Summary:
+ * Called by the receiver of a pasteboard before requesting any item
+ * flavor data via PasteboardCopyItemFlavorData. When a sending
+ * application's pasteboard promise keeper is called to provide data
+ * to the receiver, PasteboardGetDropLocation can be called to
+ * determine the paste location while providing data.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPasteboard:
+ * A local pasteboard reference.
+ *
+ * inPasteLocation:
+ * A CFURL describing the paste location.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function PasteboardSetPasteLocation(
+ inPasteboard: PasteboardRef;
+ inPasteLocation: CFURLRef): OSStatus; external name '_PasteboardSetPasteLocation';
+
+
+{
+ * PasteboardPromiseKeeperProcPtr
+ *
+ * Summary:
+ * Callback for providing data previously promised on the pasteboard.
+ *
+ * Parameters:
+ *
+ * pasteboard:
+ * The local pasteboard reference on which the promise was made.
+ *
+ * item:
+ * The pasteboard item identifier containing the promised flavor.
+ *
+ * flavorType:
+ * The Uniform Type Identifier based flavor type for which the
+ * promised data is being requested.
+ *
+ * context:
+ * The value passed as the context in PasteboardSetPromiseKeeper().
+ *
+ * Result:
+ * An operating system result code.
+}
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ PasteboardPromiseKeeperProcPtr = function(pasteboard: PasteboardRef; item: PasteboardItemID; flavorType: CFStringRef; context: Ptr): OSStatus;
+{$elsec}
+ PasteboardPromiseKeeperProcPtr = ProcPtr;
+{$endc}
+
+{
+ * PasteboardSetPromiseKeeper()
+ *
+ * Summary:
+ * Associates a promise keeper callback with a local pasteboard
+ * reference. The promise keeper must be set before a promise is
+ * made.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPasteboard:
+ * The local pasteboard reference on which promises will be made.
+ *
+ * inPromiseKeeper:
+ * A PasteboardPromiseKeeperProcPtr promise keeper proc.
+ *
+ * inContext:
+ * The value passed in this parameter is passed on to your promise
+ * keeper proc when it is called.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function PasteboardSetPromiseKeeper(
+ inPasteboard: PasteboardRef;
+ inPromiseKeeper: PasteboardPromiseKeeperProcPtr;
+ inContext: Ptr): OSStatus; external name '_PasteboardSetPromiseKeeper';
+
+const
+ kPasteboardResolveAllPromises = NIL;
+
+{
+ * PasteboardResolvePromises()
+ *
+ * Summary:
+ * Resolves promises on the provided local pasteboard reference. If
+ * multiple local pasteboard references to the same global
+ * pasteboard resource exist, only those promises made through the
+ * provided reference are resolved.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPasteboard:
+ * The local pasteboard reference for which promises will be
+ * resolved. Passing kPasteboardResolveAllPromises, or NULL, will
+ * cause all promises on all global pasteboard resources currently
+ * owned by this application to be resolved.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
+function PasteboardResolvePromises(inPasteboard: PasteboardRef): OSStatus; external name '_PasteboardResolvePromises';
+
+{$ALIGN MAC68K}
+
+
+{unit TranslationServices}
+{
+ File: HIServices/TranslationServices.h
+
+ Contains: Translation Services Interfaces.
+
+ Version: HIServices-169~377
+
+ Copyright: © 2003-2006 by Apple Computer, Inc., all rights reserved.
+
+}
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{
+ * TranslationServices
+ *
+ * Discussion:
+ * Translation Services provides tools for conversion of data and
+ * file contents from one format to another. All information for
+ * performing a translation is contained within a TranslationRef.
+ * These include source and destination data types, flags indicating
+ * what type of translation can be performed and references to the
+ * system services which execute the translation. TranslationRefs
+ * are CFTypes which must be released after they are created. Source
+ * and destination formats as well as translation flags can be
+ * queried from the TranslationRef. TranslationRefs are generated
+ * either by requesting a specific translation via TranslationCreate
+ * or during discovery of all possible translations via
+ * TranslationCreateWithSourceArray. It is possible to request
+ * TranslationRefs which perform either data or file conversions or
+ * both by using TranslationFlags. When requesting a translation be
+ * executed via TranslationPerformForData, TranslationPerformForFile
+ * or TranslationPerformForURL it is important for the source and
+ * destination data formats to match those found in the
+ * TranslationRef.
+ *
+ * It is possible to extend the set of system services which provide
+ * translations by creating what is called a filter service. Filter
+ * services are applications similar to those which provide the
+ * services available in the application menu but with a few
+ * modifications in the application plist. Filter services provide
+ * an "NSFilter" entry instead of "NSMessage". Filter Services must
+ * also provide an array of both "NSSendTypes" and "NSReturnTypes"
+ * containing Uniform Type Identifiers indicating from which formats
+ * a filter services translates to what format. Each filter service
+ * may translate multiple send types into a single return type.
+ * Finally, a filter service must indicate what type of translations
+ * it supports via the "NSSupportsDataTranslation" and
+ * "NSSupportsFileTranslation" entries. In the end, a filter
+ * service's plist may look like the following,
+ *
+ *
+ *
+ * <key>NSServices</key>
+ * <array>
+ * <dict>
+ * <key>NSFilter</key>
+ * <string>ExampleTranslation</string>
+ * <key>NSReturnTypes</key>
+ * <array>
+ * <string>com.example.returntype</string>
+ * </array>
+ * <key>NSSendTypes</key>
+ * <array>
+ * <string>com.example.sourcetype1</string>
+ * <string>com.example.sourcetype2</string>
+ * </array>
+ * <key>NSSupportsDataTranslation</key>
+ * <string></string>
+ * <key>NSSupportsFileTranslation</key>
+ * <string></string>
+ * </dict>
+ <array>
+
+ *
+ *
+ *
+ * All filter services must handle the kEventServicePerform Carbon
+ * Event. The filter service will be automatically launched when
+ * necessary and it will receive the kEventServicePerform event with
+ * the message indicated by the NSFilter tag in the plist as well as
+ * a Pasteboard Manager pasteboard containing flavors indicating
+ * what type of translation must be performed. If a filter service
+ * only supports data translations a flavor on the pasteboard will
+ * correspond to one of the type identifiers listed in your plist's
+ * send types. Upon translation of the data, the filter service
+ * must clear the pasteboard, add the return identifier and
+ * translated data to the pasteboard, and return from the event. For
+ * a filter service which provides file translations,
+ * "public.file-url" and "com.apple.file-contents-type" will be
+ * available on the pasteboard indicating the file location and
+ * contents format from which to translate. Upon translation, the
+ * filter service should place a "public.file-url" flavor on the
+ * pasteboard indicating where the translated file has been placed,
+ * typically next to the orignal named "<filename> (converted)"
+ * (ala. Finder's "<filename> copy" behavior for duplicated files).
+ }
+type
+ TranslationRef = ^SInt32; { an opaque 32-bit type }
+{ Translation Services error codes}
+const
+ {invalidTranslationPathErr = -3025}
+ {couldNotParseSourceFileErr = -3026}
+ {noTranslationPathErr = -3030 // no translation for source and destination provided}
+ {badTranslationSpecErr = -3031}
+ {noPrefAppErr = -3032}
+ badTranslationRefErr = -3031; { TranslationRef does not perform translation requested}
+
+
+{
+ * TranslationFlags
+ *
+ * Summary:
+ * The following constants are used by the translation creation
+ * routines to indicate which types of translations are requested.
+ * The flags are cumulative (ie. when passing both
+ * kTranslationDataTranslation and kTranslationFileTranslation the
+ * client is requesting only those translations which support both
+ * data AND file translations).
+ }
+type
+ TranslationFlags = UInt32;
+const
+{
+ * Indicates that the client is interested in translations which
+ * provide data translations.
+ }
+ kTranslationDataTranslation = 1 shl 0;
+
+ {
+ * Indicates that the client is interested in translations which
+ * provide file translations.
+ }
+ kTranslationFileTranslation = 1 shl 1;
+
+{
+ * TranslationGetTypeID()
+ *
+ * Summary:
+ * Returns the CFType identifier for a translation object.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * A CFTypeID unique to translation instances.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TranslationGetTypeID: CFTypeID; external name '_TranslationGetTypeID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * TranslationCreate()
+ *
+ * Summary:
+ * Creates a translation reference describing a system service
+ * providing translations of data from the source type to the
+ * destination type.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSourceType:
+ * A Uniform Type Identifier specifying the format of source data
+ * to be translated.
+ *
+ * inDestinationType:
+ * A Uniform Type Identifier specifying the destination format to
+ * which the source data should be translated.
+ *
+ * inTranslationFlags:
+ * A set of TranslationFlags indicating what type of translation
+ * is requested.
+ *
+ * outTranslation:
+ * A TranslationRef reference which receives the requested
+ * translation if a system service providing the translation
+ * exists.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TranslationCreate( inSourceType: CFStringRef; inDestinationType: CFStringRef; inTranslationFlags: TranslationFlags; var outTranslation: TranslationRef ): OSStatus; external name '_TranslationCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * TranslationCreateWithSourceArray()
+ *
+ * Summary:
+ * Creates a list of destination flavors translation references
+ * describing various system services providing translations of data
+ * from the source types to the destination types.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSourceTypes:
+ * An array of Uniform Type Identifiers specifying the formats of
+ * source data to be translated.
+ *
+ * inTranslationFlags:
+ * A set of TranslationFlags indicating what type of translations
+ * are requested.
+ *
+ * outDestinationTypes:
+ * A CFArrayRef reference which receives an array of Uniform Type
+ * Identifiers specifying what destination formats are available
+ * as translations of the provided source formats. Any destination
+ * formats already represented as a format in the source array are
+ * excluded from the returned list. The search for destination
+ * formats is performed in the order of source formats. This array
+ * must be released by the client.
+ *
+ * outTranslations:
+ * A CFDictionaryRef reference which receives a dictionary of
+ * TranslationRefs representing all translations provided by
+ * system services. The dictionary is keyed by destination flavor.
+ * Any translations with destination formats already represented
+ * as a format in the source array are excluded from the returned
+ * dictionary. This dictionary must be released by the client.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TranslationCreateWithSourceArray( inSourceTypes: CFArrayRef; inTranslationFlags: TranslationFlags; var outDestinationTypes: CFArrayRef; var outTranslations: CFDictionaryRef ): OSStatus; external name '_TranslationCreateWithSourceArray';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * TranslationPerformForData()
+ *
+ * Summary:
+ * Executes the translation of source data into destination data.
+ * The formats of the source and destination data are contained
+ * within the TranslationRef.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inTranslation:
+ * A TranslationRef containing information on the source and
+ * destination data formats and how to execute a translation from
+ * one to the other. The formats of the source and destination
+ * data must correspond to those indicated by the TranslationRef.
+ *
+ * inSourceData:
+ * A CFDataRef containing data to be translated.
+ *
+ * outDestinationData:
+ * A CFDataRef reference which receives the translated data.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TranslationPerformForData( inTranslation: TranslationRef; inSourceData: CFDataRef; var outDestinationData: CFDataRef ): OSStatus; external name '_TranslationPerformForData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * TranslationPerformForFile()
+ *
+ * Summary:
+ * Executes the translation of source file contents to a destination
+ * file content format. The formats of the source and destination
+ * file contents are held within the TranslationRef.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inTranslation:
+ * A TranslationRef containing information on the source and
+ * destination file content formats and how to execute a
+ * translation from one to the other. The formats of the source
+ * and destination file contents must correspond to those
+ * indicated by the TranslationRef.
+ *
+ * inSourceFile:
+ * A FSRef reference pointing to a file whose contents are to be
+ * translated.
+ *
+ * inDestinationDirectory:
+ * An optional FSRef reference pointing to the desired directory
+ * for the translation. By default the destination directory is
+ * the same as the source file.
+ *
+ * inDestinationName:
+ * An optional CFStringRef indicating the desired name for the
+ * translated file. By default the translated file's name will be
+ * "<filename> (converted)" (ala. Finder's "<filename> copy"
+ * behavior for duplicated files).
+ *
+ * outTranslatedFile:
+ * A FSRef reference which receives a new file with the translated
+ * contents. It is possible for the translated file to not have
+ * been created in the directory or with the name requested by the
+ * client due to disk space or translator limitations. It is
+ * important to rely only on the file reference returned in this
+ * parameter.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TranslationPerformForFile( inTranslation: TranslationRef; const (*var*) inSourceFile: FSRef; {const} inDestinationDirectory: FSRefPtr { can be NULL }; inDestinationName: CFStringRef { can be NULL }; var outTranslatedFile: FSRef ): OSStatus; external name '_TranslationPerformForFile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * TranslationPerformForURL()
+ *
+ * Summary:
+ * Executes the translation of source data pointed to a URL to a
+ * destination format. The formats of the source and destination URL
+ * contents are held within the TranslationRef. Currently, only file
+ * URLs are accepted for URL translations.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inTranslation:
+ * A TranslationRef containing information on the source and
+ * destination URL content formats and how to execute a
+ * translation from one to the other. The formats of the source
+ * and destination URL contents must correspond to those indicated
+ * by the TranslationRef.
+ *
+ * inSourceURL:
+ * A CFURLRef pointing to source data whose contents are to be
+ * translated. Currently, only file URLs are accepted for URL
+ * translations.
+ *
+ * inDestinationURL:
+ * An optional CFURLRef indicating the desired location for the
+ * translated data. File URLs may either indicate the desired
+ * destination directory or directory and name for the translated
+ * file. By default for file URLs, the translated file's name will
+ * be "<filename> (converted)" (ala. Finder's "<filename> copy"
+ * behavior for duplicated files).
+ *
+ * outTranslatedURL:
+ * A FSRef reference which receives a new file with the translated
+ * contents. For file URLs, it is possible for the translated file
+ * to not have been created in the directory or with the name
+ * requested by the client due to disk space or translator
+ * limitations. It is important to rely only on the URL returned
+ * in this parameter.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TranslationPerformForURL( inTranslation: TranslationRef; inSourceURL: CFURLRef; inDestinationURL: CFURLRef { can be NULL }; var outTranslatedURL: CFURLRef ): OSStatus; external name '_TranslationPerformForURL';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * TranslationCopySourceType()
+ *
+ * Summary:
+ * Accesses a translation's source type.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inTranslation:
+ * A TranslationRef containing the requested source type.
+ *
+ * outSourceType:
+ * A CFStringRef which receives the TranslationRef's source type.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TranslationCopySourceType( inTranslation: TranslationRef; var outSourceType: CFStringRef ): OSStatus; external name '_TranslationCopySourceType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * TranslationCopyDestinationType()
+ *
+ * Summary:
+ * Accesses a translation's destination type.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inTranslation:
+ * A TranslationRef containing the requested destination type.
+ *
+ * outDestinationType:
+ * A CFStringRef which receives the TranslationRef's destination
+ * type.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TranslationCopyDestinationType( inTranslation: TranslationRef; var outDestinationType: CFStringRef ): OSStatus; external name '_TranslationCopyDestinationType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * TranslationGetTranslationFlags()
+ *
+ * Summary:
+ * Accesses a translation's flags.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inTranslation:
+ * A TranslationRef containing the requested flags.
+ *
+ * outTranslationFlags:
+ * A TranslationFlags which receives the TranslationRef's flags.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TranslationGetTranslationFlags( inTranslation: TranslationRef; var outTranslationFlags: TranslationFlags ): OSStatus; external name '_TranslationGetTranslationFlags';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{unit UTType}
+
+{ File: UTType.p(.pas) }
+{ }
+{ Contains: CodeWarrior Pascal(GPC) translation of Apple's Mac OS X 10.3 introduced UTType.h }
+{ Translation compatible with make-gpc-interfaces.pl generated MWPInterfaces }
+{ (GPCPInterfaces) and Mac OS X 10.3.x or higher. The GPC translation is linkable with }
+{ Mac OS X 10.3.x or higher Mach-O ApplicationServices.framework. }
+{ (Note: ApplicationServices is the ÒumbrellaÓ framework encapsulating the }
+{ LaunchServices subframework which contains the UTType declared data and function }
+{ symbols.) }
+{ }
+{ The CodeWarrior Pascal translation is NOT linkable with Mac OS X 10.3.x or higher }
+{ CFM CarbonLib. The declared symbols are exported only from the Mach-O }
+{ ApplicationServices ÒumbrellaÓ framework (encapsulates the LaunchServices subframework)}
+{ and references to symbols used by CFM code must be established at runtime. Individual }
+{ symbol references can be resolved using CFBundleGetFunctionPointerForName and }
+{ CFBundleGetDataPointerForName (see CFBundle.p) respectively for function and data }
+{ symbols. For bulk resolution of Mach-O symbol references, CFMLateImport technology }
+{ can be used. }
+{ }
+{ Version: 1.0 }
+{ }
+{ Pascal Translation: Gale Paeper, <gpaeper@empirenet.com>, 2004 }
+{ }
+{ Copyright: Subject to the constraints of Apple's original rights, you're free to use this }
+{ translation as you deem fit. }
+{ }
+{ Bugs?: This is an AS IS translation with no express guarentees of any kind. }
+{ If you do find a bug, please help out the Macintosh Pascal programming community by }
+{ reporting your bug finding and possible fix to either personal e-mail to Gale Paeper }
+{ or a posting to the MacPascal mailing list. }
+{ }
+{
+ Change History (most recent first) (DD/MM/YY):
+
+ <1> 06/12/04 GRP First Pascal translation of UTType.h, version LaunchServices-98~1.
+}
+{ Translation assisted by: }
+{This file was processed by Dan's Source Converter}
+{version 1.3 (this version modified by Ingemar Ragnemalm)}
+
+{The original source on which this file is based: }
+{
+ File: LaunchServices/UTType.h
+
+ Contains: Public interfaces for Uniform Type Indentification
+
+ Version: LaunchServices-98~1
+
+ Copyright: © 2003 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN POWER}
+
+{ ======================================================================================================== }
+{ Uniform Type Identification API }
+{ ======================================================================================================== }
+{
+ Uniform Type Identification Primer
+
+ Uniform Type Identifiers (or UTIs) are strings which uniquely identify
+ abstract types. They can be used to describe a file format or
+ data type, but can also be used to describe type information for
+ other sorts of entities, such as directories, volumes, or packages.
+
+ The syntax of a uniform type identifier looks like a bundle identifier.
+ It has the form of a reversed DNS name, although some special top-level
+ UTI domains are reserved by Apple and are outside the currect IANA
+ top-level Internet domain name space.
+
+ Examples:
+
+ public.jpeg
+ public.utf16-plain-text
+ com.apple.xml-plist
+ com.apple.appleworks.doc
+
+ Types which are standard or not controlled by any one organization
+ are declared in the "public" domain. Currently, public types may
+ be declared only by Apple.
+
+ Types specific to Mac OS are declared with identifiers in the
+ com.apple.macos domain.
+
+ Third parties should declare their own uniform type identifiers
+ in their respective registered Internet domain spaces.
+
+ Type declarations appear in bundle property lists and tell
+ the system several things about a type, including the following:
+
+ Conformance
+
+ A type may "conform" to one or more other types. For example, the
+ type com.apple.macos.xml-property-list conforms to both the
+ com.apple.macos.property-list and public.xml types. The public.xml
+ type in turn conforms to type public.text. Finally, type public.text
+ conforms to public.data, which is the base type for all types
+ describing bytes stream formats. Conformance relationships between
+ types are established in type declarations.
+
+ Conformance relationships establish a multiple inheritanace hierarchy
+ between types. Type property values may be inherited at runtime
+ according to the conformance relationships each type. When a type's
+ declaration does not include a value for particular type property,
+ then the type's supertypes are searched for a value. Supertypes are
+ searched depth-first, in the order given in the type declaration.
+ This is the only way in which the declared order of the conforms-to
+ supertypes is signitificant.
+
+ Tags
+
+ A "tag" is a string which indicates a type in some other type
+ identification space, such as a filename extension, MIME Type,
+ or NSPboardType. Each type declaration may include a
+ "tag specification", which is a dictionary listing all of the
+ tags associated with the type.
+
+ A tag's "class" is the namespace of a tag: filename extension,
+ MIME type, OSType, etc. Tag classes are themselves identified by
+ uniform type identifiers so that the set of valid tag classes is
+ easily extendend in the future.
+
+ Other Type Properties
+
+ Type declarations may include several other properties: a localizable
+ user description of the type, the name of an icon resource in
+ the declaring bundle, a reference URL identifying technical
+ documentation about the type itself, and finally a version number,
+ which can be incremented as a type evolves. All of these properties
+ are optional.
+
+ Exported vs. Imported Type Declarations
+
+ Type declarations are either exported or imported. An exported
+ type declaration means that the type itself is defined or owned
+ by the organization making the declaration. For example, a propietary
+ document type declaration should only be exported by the application
+ which controls the document format.
+
+ An imported declatation is for applications which depend on the
+ existence of someone else's type declaration. If application A can
+ open application B's document format, then application A makes
+ an imported declaration of application B's document type so that
+ even if application B is not present on the system, there is an
+ acessible declaration of its document type.
+
+ An exported declaration of a particular type identifier is always
+ preferred over an imported declaration.
+
+ Example XML Type Declaration
+
+ Appearing below is an XML excerpt from a bundle Info.plist file which
+ declares the public type "public.jpeg":
+
+ <key>UTExportedTypeDeclarations</key>
+ <array>
+ <dict>
+ <key>UTTypeIdentifier</key>
+ <string>public.jpeg</string>
+ <key>UTTypeReferenceURL</key>
+ <string>http://www.w3.org/Graphics/JPEG/</string>
+ <key>UTTypeDescription</key>
+ <string>JPEG image</string>
+ <key>UTTypeIconName</key>
+ <string>public.jpeg.icns</string>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.image</string>
+ <string>public.data</string>
+ </array>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>com.apple.macos.ostype</key>
+ <string>JPEG</string>
+ <key>public.filename-extension</key>
+ <array>
+ <string>jpeg</string>
+ <string>jpg</string>
+ </array>
+ <key>public.mime-type</key>
+ <string>image/jpeg</string>
+ </dict>
+ </dict>
+ </array>
+
+
+ Dynamic Type Identifiers
+
+ Uniform Type Identifiation uses dynamic type identifiers to
+ represent types for which no identifier has been declared. A
+ dynamic type identifier is syntactially a regular uniform
+ type identifier in the "dyn" domain. However, after the
+ initial domain label, a dynamic type identifier is an
+ opaque encoding of a tag specification. Dynamic type
+ identifiers cannot be declared. They are generated on-demand
+ with whatever type information is available at the time, often
+ a single (otherwise unknown) type tag.
+
+ A dynamic identifier therefore carries within it a minimal
+ amount of type information, but enough to work well with the
+ Uniform Type Identification API. For example, a client can
+ extract from a dynamic type identifier the original tag
+ specification with which it was created. A client can also
+ test a dynamic type identifier for equality to another
+ uniform type identifier. If the dynamic identifier's
+ tag specification is a subset of the other identifier's
+ tags, the two are considered equal.
+
+ Dynamic type identifiers do not express the full richness
+ of type information associated with a declared type
+ identifier, but dynamic type identifiers allow the behavior
+ to degrade gracefully in the presence of incomplete
+ declared type information.
+
+ A dynamic type identifier may be transmitted across processes
+ on a given system, but it should never be stored persistently
+ or transmitted over the wire to another system. In particular,
+ dynamic identifiers should not appear in bundle info property
+ lists, and they will generally be ignored when they do. Apple
+ reserves the right to change the opaque format of dynamic
+ identifiers in future versions of Mac OS X.
+}
+
+{
+ Type Declaration Dictionary Keys
+
+ The following keys are used in type declarations
+}
+{
+ * kUTExportedTypeDeclarationsKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kUTExportedTypeDeclarationsKey: CFStringRef; external name '_kUTExportedTypeDeclarationsKey'; (* attribute const *)
+
+{
+ * kUTImportedTypeDeclarationsKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+}
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kUTImportedTypeDeclarationsKey: CFStringRef; external name '_kUTImportedTypeDeclarationsKey'; (* attribute const *)
+
+{
+ * kUTTypeIdentifierKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kUTTypeIdentifierKey: CFStringRef; external name '_kUTTypeIdentifierKey'; (* attribute const *)
+
+{
+ * kUTTypeTagSpecificationKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kUTTypeTagSpecificationKey: CFStringRef; external name '_kUTTypeTagSpecificationKey'; (* attribute const *)
+
+{
+ * kUTTypeConformsToKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kUTTypeConformsToKey: CFStringRef; external name '_kUTTypeConformsToKey'; (* attribute const *)
+
+{
+ * kUTTypeDescriptionKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kUTTypeDescriptionKey: CFStringRef; external name '_kUTTypeDescriptionKey'; (* attribute const *)
+
+{
+ * kUTTypeIconFileKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kUTTypeIconFileKey: CFStringRef; external name '_kUTTypeIconFileKey'; (* attribute const *)
+
+{
+ * kUTTypeReferenceURLKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kUTTypeReferenceURLKey: CFStringRef; external name '_kUTTypeReferenceURLKey'; (* attribute const *)
+
+{
+ * kUTTypeVersionKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kUTTypeVersionKey: CFStringRef; external name '_kUTTypeVersionKey'; (* attribute const *)
+
+
+{
+ Type Tag Classes
+
+ The following constant strings identify tag classes for use
+ when converting uniform type identifiers to and from
+ equivalent tags.
+}
+{
+ * kUTTagClassFilenameExtension
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER:
+var kUTTagClassFilenameExtension: CFStringRef; external name '_kUTTagClassFilenameExtension'; (* attribute const *)
+
+{
+ * kUTTagClassMIMEType
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kUTTagClassMIMEType: CFStringRef; external name '_kUTTagClassMIMEType'; (* attribute const *)
+
+{
+ * kUTTagClassNSPboardType
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kUTTagClassNSPboardType: CFStringRef; external name '_kUTTagClassNSPboardType'; (* attribute const *)
+
+{
+ * kUTTagClassOSType
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kUTTagClassOSType: CFStringRef; external name '_kUTTagClassOSType'; (* attribute const *)
+
+{
+ * UTTypeCreatePreferredIdentifierForTag()
+ *
+ * Discussion:
+ * Creates a uniform type identifier for the type indicated by the
+ * specified tag. This is the primary function to use for going from
+ * tag (extension/MIMEType/OSType) to uniform type identifier.
+ * Optionally, the returned type identifiers must conform to the
+ * identified "conforming-to" type argument. This is a hint to the
+ * implementation to constrain the search to a particular tree of
+ * types. For example, the client may want to know the type
+ * indicated by a particular extension tag. If the client knows that
+ * the extension is associated with a directory (rather than a
+ * file), the client may specify "public.directory" for the
+ * conforming-to argument. This will allow the implementation to
+ * ignore all types associated with byte data formats (public.data
+ * base type). If more than one type is indicated, preference is
+ * given to a public type over a non-public type on the theory that
+ * instances of public types are more common, and therefore more
+ * likely to be correct. When there a choice must be made between
+ * multiple public types or multiple non-public types, the selection
+ * rules are undefined. Clients needing finer control should use
+ * UTTypeCreateAllIdentifiersWithTag. If no declared type is
+ * indicated, a dynamic type identifier is generated which satisfies
+ * the parameters.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * inTagClass:
+ * the class identifier of the tag argument
+ *
+ * inTag:
+ * the tag string
+ *
+ * inConformingToTypeIdentifier:
+ * the identifier of a type to which the result must conform
+ *
+ * Result:
+ * a new CFStringRef containing the type identifier, or NULL if
+ * inTagClass is not a known tag class
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function UTTypeCreatePreferredIdentifierForTag(
+ inTagClass: CFStringRef;
+ inTag: CFStringRef;
+ inConformingToTypeIdentifier: CFStringRef): CFStringRef; external name '_UTTypeCreatePreferredIdentifierForTag'; { can be NULL }
+
+
+{
+ * UTTypeCreateAllIdentifiersForTag()
+ *
+ * Discussion:
+ * Creates an array of all uniform type identifiers indicated by the
+ * specified tag. An overloaded tag (e.g., an extension used by
+ * several applications for different file formats) may indicate
+ * multiple types. If no declared type identifiers have the
+ * specified tag, then a single dynamic type identifier will be
+ * created for the tag. Optionally, the returned type identifiers
+ * must conform to the identified "conforming-to" type argument.
+ * This is a hint to the implementation to constrain the search to a
+ * particular tree of types. For example, the client may want to
+ * know the type indicated by a particular extension tag. If the
+ * client knows that the extension is associated with a directory
+ * (rather than a file), the client may specify "public.directory"
+ * for the conforming-to argument. This will allow the
+ * implementation to ignore all types associated with byte data
+ * formats (public.data base type).
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * inTagClass:
+ * the class identifier of the tag argument
+ *
+ * inTag:
+ * the tag string
+ *
+ * inConformingToTypeIdentifier:
+ * the identifier of a type to which the results must conform
+ *
+ * Result:
+ * An array of uniform type identifiers, or NULL if inTagClass is
+ * not a known tag class
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function UTTypeCreateAllIdentifiersForTag(
+ inTagClass: CFStringRef;
+ inTag: CFStringRef;
+ inConformingToTypeIdentifier: CFStringRef): CFArrayRef; external name '_UTTypeCreateAllIdentifiersForTag'; { can be NULL }
+
+
+{
+ * UTTypeCopyPreferredTagWithClass()
+ *
+ * Discussion:
+ * Returns the identified type's preferred tag with the specified
+ * tag class as a CSString. This is the primary function to use for
+ * going from uniform type identifier to tag. If the type
+ * declaration included more than one tag with the specified class,
+ * the first tag in the declared tag array is the preferred tag.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * inTypeIdentifier:
+ * the uniform type identifier
+ *
+ * inTagClass:
+ * the class of tags to return
+ *
+ * Result:
+ * an array of tags (as CFStrings), or NULL if there are no tags
+ * with the specified class.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function UTTypeCopyPreferredTagWithClass(
+ inTypeIdentifier: CFStringRef;
+ inTagClass: CFStringRef): CFStringRef; external name '_UTTypeCopyPreferredTagWithClass';
+
+
+{
+ * UTTypeEqual()
+ *
+ * Discussion:
+ * Compares two identified types for equality. Types are equal if
+ * their identifier strings are equal using a case-insensitive
+ * comparison. In addition, if one or both of the identifiers is a
+ * dynamic identifier, then the types are equal if either
+ * identifier's tag specification is a subset of the other
+ * identifier's tag specification.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * inTypeIdentifier1:
+ * a uniform type identifier
+ *
+ * inTypeIdentifier2:
+ * another uniform type identifier
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function UTTypeEqual(
+ inTypeIdentifier1: CFStringRef;
+ inTypeIdentifier2: CFStringRef): Boolean; external name '_UTTypeEqual';
+
+
+{
+ * UTTypeConformsTo()
+ *
+ * Discussion:
+ * Tests for a conformance relationship between the two identified
+ * types. Returns true if the types are equal, or if the first type
+ * conforms, directly or indirectly, to the second type.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * inTypeIdentifier:
+ * the uniform type identifier to test
+ *
+ * inConformsToTypeIdentifier:
+ * the uniform type identifier against which to test conformance.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function UTTypeConformsTo(
+ inTypeIdentifier: CFStringRef;
+ inConformsToTypeIdentifier: CFStringRef): Boolean; external name '_UTTypeConformsTo';
+
+
+{
+ * UTTypeCopyDescription()
+ *
+ * Discussion:
+ * Returns the localized, user-readable type description string
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * inTypeIdentifier:
+ * the uniform type identifier
+ *
+ * Result:
+ * a localized string, or NULL of no type description is available
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function UTTypeCopyDescription(inTypeIdentifier: CFStringRef): CFStringRef; external name '_UTTypeCopyDescription';
+
+
+{
+ * UTTypeCopyDeclaration()
+ *
+ * Discussion:
+ * Returns the identified type's declaration dictionary, as it
+ * appears in the declaring bundle's info property list. This the
+ * access path to other type properties for which direct access is
+ * rarely needed.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * inTypeIdentifier:
+ * the uniform type identifier
+ *
+ * Result:
+ * a tag declaration dictionary, or NULL if the type is not declared
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function UTTypeCopyDeclaration(inTypeIdentifier: CFStringRef): CFDictionaryRef; external name '_UTTypeCopyDeclaration';
+
+
+{
+ * UTTypeCopyDeclaringBundleURL()
+ *
+ * Discussion:
+ * Returns the URL of the bundle containing the type declaration of
+ * the identified type.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * inTypeIdentifier:
+ * the uniform type identifier
+ *
+ * Result:
+ * a URL, or NULL if the bundle cannot be located.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function UTTypeCopyDeclaringBundleURL(inTypeIdentifier: CFStringRef): CFURLRef; external name '_UTTypeCopyDeclaringBundleURL';
+
+
+{
+ * UTCreateStringForOSType()
+ *
+ * Discussion:
+ * A helper function to canonically encode an OSType as a CFString
+ * suitable for use as a tag argument.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * inOSType:
+ * the OSType value to encode
+ *
+ * Result:
+ * a new CFString representing the OSType, or NULL if the argument
+ * is 0 or '????'
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function UTCreateStringForOSType(inOSType: OSType): CFStringRef; external name '_UTCreateStringForOSType';
+
+
+{
+ * UTGetOSTypeFromString()
+ *
+ * Discussion:
+ * A helper function to canonically decode a string-encoded OSType
+ * back to the original OSType value.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * inString:
+ * the string to decode
+ *
+ * Result:
+ * the OSType value encoded in the string, or 0 if the string is not
+ * a valid encoding of an OSType
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function UTGetOSTypeFromString(inString: CFStringRef): OSType; external name '_UTGetOSTypeFromString';
+
+
+{$ALIGN MAC68K}
+
+
+{unit ATSLayoutTypes}
+{
+ File: ATSLayoutTypes.p
+
+ Contains: Apple Type Services layout public structures and constants.
+
+ Version: Technology: Mac OS 9/Carbon
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1994-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ --------------------------------------------------------------------------- }
+{ CONSTANTS and related scalar types }
+{ --------------------------------------------------------------------------- }
+{ Miscellaneous constants }
+
+const
+ kATSUseGlyphAdvance = $7FFFFFFF; { assignment to use natural glyph advance value }
+ kATSUseLineHeight = $7FFFFFFF; { assignment to use natural line ascent/descent values }
+ kATSNoTracking = $80000000; { negativeInfinity }
+
+{
+ * ATSULayoutOperationSelector
+ *
+ * Summary:
+ * This is used to select which operations to override, or which
+ * operation is currently being run.
+ }
+type ATSULayoutOperationSelector = UInt32;
+const
+
+ {
+ * No Layout operation is currently selected.
+ }
+ kATSULayoutOperationNone = $00000000;
+
+ {
+ * Select the Justification operation.
+ }
+ kATSULayoutOperationJustification = $00000001;
+
+ {
+ * Select the character morphing operation.
+ }
+ kATSULayoutOperationMorph = $00000002;
+
+ {
+ * Select the kerning adjustment operation.
+ }
+ kATSULayoutOperationKerningAdjustment = $00000004;
+
+ {
+ * Select the baseline adjustment operation.
+ }
+ kATSULayoutOperationBaselineAdjustment = $00000008;
+
+ {
+ * Select the tracking adjustment operation.
+ }
+ kATSULayoutOperationTrackingAdjustment = $00000010;
+
+ {
+ * Select the period of time after ATSUI has finished all of it's
+ * layout operations.
+ }
+ kATSULayoutOperationPostLayoutAdjustment = $00000020;
+ kATSULayoutOperationAppleReserved = $FFFFFFC0;
+
+{ ---------------------------------------------------------------------------- }
+
+{
+ * ATSULayoutOperationCallbackStatus
+ *
+ * Summary:
+ * One of these must be returned by a
+ * ATSUDLayoutOperationOverrideUPP callback function in order to
+ * indicate ATSUI's status.
+ }
+type ATSULayoutOperationCallbackStatus = UInt32;
+const
+
+ {
+ * Return this if the callback function has totally handled the
+ * operation which triggered the callback and does not need ATSUI to
+ * run any further processing for the operation.
+ }
+ kATSULayoutOperationCallbackStatusHandled = $00000000;
+
+ {
+ * Return this if the callback function has not totally handled the
+ * operation which triggered the callback and needs ATSUI to run it's
+ * own processing.
+ }
+ kATSULayoutOperationCallbackStatusContinue = $00000001;
+
+
+{ ---------------------------------------------------------------------------- }
+
+{
+ * ATSLineLayoutOptions
+ *
+ * Summary:
+ * ATSLineLayoutOptions are normally set in an ATSUTextLayout object
+ * via the kATSULineLayoutOptionsTag layout control attribute. They
+ * can also be set in an ATSLineLayoutParams structure.
+ }
+type ATSLineLayoutOptions = UInt32;
+const
+
+ {
+ * No options specified.
+ }
+ kATSLineNoLayoutOptions = $00000000;
+
+ {
+ * This line option is no longer used.
+ }
+ kATSLineIsDisplayOnly = $00000001; { obsolete option }
+
+ {
+ * Specifies that no hangers to be formed on the line.
+ }
+ kATSLineHasNoHangers = $00000002;
+
+ {
+ * Specifies that no optical alignment to be performed on the line.
+ }
+ kATSLineHasNoOpticalAlignment = $00000004;
+
+ {
+ * Specifies that space charcters should not be treated as hangers.
+ }
+ kATSLineKeepSpacesOutOfMargin = $00000008;
+
+ {
+ * Specifies no post-compensation justification is to be performed.
+ }
+ kATSLineNoSpecialJustification = $00000010;
+
+ {
+ * Specifies that if the line is the last of a paragraph, it will not
+ * get justified.
+ }
+ kATSLineLastNoJustification = $00000020;
+
+ {
+ * Specifies that the displayed line glyphs will adjust for device
+ * metrics.
+ }
+ kATSLineFractDisable = $00000040;
+
+ {
+ * Specifies that the carets at the ends of the line will be
+ * guarenteed to be perpendicular to the baseline.
+ }
+ kATSLineImposeNoAngleForEnds = $00000080;
+
+ {
+ * Highlights for the line end characters will be extended to 0 and
+ * the specified line width.
+ }
+ kATSLineFillOutToWidth = $00000100;
+
+ {
+ * Specifies that the tab character width will be automatically
+ * adjusted to fit the specified line width.
+ }
+ kATSLineTabAdjustEnabled = $00000200;
+
+ {
+ * Specifies that any leading value specified by a font will be
+ * ignored.
+ }
+ kATSLineIgnoreFontLeading = $00000400;
+
+ {
+ * Specifies that ATS produce antialiased glyph images despite system
+ * preferences or CGContext settings.
+ }
+ kATSLineApplyAntiAliasing = $00000800;
+
+ {
+ * Specifies that ATS turn-off antialiasing glyph imaging despite
+ * system preferences or CGContext settings (negates
+ * kATSLineApplyAntiAliasing bit if set).
+ }
+ kATSLineNoAntiAliasing = $00001000;
+
+ {
+ * Specifies that if the line width is not sufficient to hold all its
+ * glyphs, glyph positions are allowed to extend beyond the line's
+ * assigned width so negative justification is not used.
+ }
+ kATSLineDisableNegativeJustification = $00002000;
+
+ {
+ * Specifies that lines with any integer glyph positioning (due to
+ * either any character non-antialiased or kATSLineFractDisable
+ * specified), not automatically esthetically adjust individual
+ * character positions while rendering to display.
+ }
+ kATSLineDisableAutoAdjustDisplayPos = $00004000;
+
+ {
+ * Specifies that rendering be done through Quickdraw (default
+ * rendering in ATSUI is through CoreGraphics on MacOSX).
+ }
+ kATSLineUseQDRendering = $00008000;
+
+ {
+ * Specifies that any Justification operations will not be run.
+ }
+ kATSLineDisableAllJustification = $00010000;
+
+ {
+ * Specifies that any glyph morphing operations will not be run.
+ }
+ kATSLineDisableAllGlyphMorphing = $00020000;
+
+ {
+ * Specifies that any kerning adjustment operations will not be run.
+ }
+ kATSLineDisableAllKerningAdjustments = $00040000;
+
+ {
+ * Specifies that any baseline adjustment operations will not be run.
+ }
+ kATSLineDisableAllBaselineAdjustments = $00080000;
+
+ {
+ * Specifies that any tracking adjustment operations will not be run.
+ }
+ kATSLineDisableAllTrackingAdjustments = $00100000;
+
+ {
+ * Convenience constant for turning-off all adjustments.
+ }
+ kATSLineDisableAllLayoutOperations = kATSLineDisableAllJustification or kATSLineDisableAllGlyphMorphing or kATSLineDisableAllKerningAdjustments or kATSLineDisableAllBaselineAdjustments or kATSLineDisableAllTrackingAdjustments;
+
+ {
+ * Specifies to optimize for displaying text only. Note, rounded
+ * device metrics will be used instead of fractional path metrics.
+ }
+ kATSLineUseDeviceMetrics = $01000000;
+
+ {
+ * Specifies that line breaking should occur at the nearest
+ * character, not word. This could cause a word to be split among
+ * multiple lines.
+ }
+ kATSLineBreakToNearestCharacter = $02000000;
+
+ {
+ * These bits are reserved by Apple and will result in a invalid
+ * value error if attemped to set. Obsolete constants:
+ }
+ kATSLineAppleReserved = $FCE00000;
+
+
+{ --------------------------------------------------------------------------- }
+
+{
+ * ATSStyleRenderingOptions
+ *
+ * Summary:
+ * ATSStyleRenderingOptions are set in the ATSUStyle object via the
+ * attribute tag kATSUStyleRenderingOptions. They provide finer
+ * control over how the style is rendered.
+ }
+type ATSStyleRenderingOptions = UInt32;
+const
+
+ {
+ * No options specified.
+ }
+ kATSStyleNoOptions = $00000000;
+
+ {
+ * Specifies that ATS produce "unhinted" glyph outlines (default is
+ * hinted glyph outlines).
+ }
+ kATSStyleNoHinting = $00000001;
+
+ {
+ * Specifies that ATS produce antialiased glyph images despite system
+ * preferences or CGContext settings.
+ }
+ kATSStyleApplyAntiAliasing = $00000002;
+
+ {
+ * Specifies that ATS turn-off antialiasing glyph imaging despite
+ * system preferences or CGContext settings (negates
+ * kATSStyleApplyAntiAliasing bit if set).
+ }
+ kATSStyleNoAntiAliasing = $00000004;
+
+ {
+ * These bits are reserved by Apple and will result in a invalid
+ * value error if attemped to set.
+ }
+ kATSStyleAppleReserved = $FFFFFFF8;
+
+ {
+ * (OBSOLETE) Specifies that ATS produce "hinted" glyph outlines (the
+ * default behavior). THIS NAME IS OBSOLETE. DO NOT USE. It's only
+ * left in for backwards compatibility.
+ }
+ kATSStyleApplyHints = kATSStyleNoOptions;
+
+{
+ * ATSGlyphInfoFlags
+ *
+ * Summary:
+ * ATSGlyphInfoFlags are set in the individual ATSLayoutRecord
+ * structures and apply only to the ATSGlyphRef in that structure.
+ * The are used by the layout engine to flag a glyph with specific
+ * properties.
+ }
+type ATSGlyphInfoFlags = UInt32;
+const
+
+ {
+ * These bits are Apple reserved and may result in an invalid value
+ * error if attempted to set.
+ }
+ kATSGlyphInfoAppleReserved = $1FFBFFE8;
+
+ {
+ * The glyph attaches to another glyph.
+ }
+ kATSGlyphInfoIsAttachment = $80000000;
+
+ {
+ * The glyph can hang off left/top edge of line.
+ }
+ kATSGlyphInfoIsLTHanger = $40000000;
+
+ {
+ * The glyph can hang off right/bottom edge of line.
+ }
+ kATSGlyphInfoIsRBHanger = $20000000;
+
+ {
+ * The glyph is not really a glyph at all, but an end-marker designed
+ * to allow the calculation of the previous glyph's advance.
+ }
+ kATSGlyphInfoTerminatorGlyph = $00080000;
+
+ {
+ * The glyph is a white space glyph.
+ }
+ kATSGlyphInfoIsWhiteSpace = $00040000;
+
+ {
+ * Glyph has a style specified imposed width (i.e. advance)
+ }
+ kATSGlyphInfoHasImposedWidth = $00000010;
+
+ {
+ * A three-bit mask, that can be used to get the size of the original
+ * character that spawned this glyph. When a logical 'and' operation
+ * with this mask and an ATSGlyphInfoFlags variable, it will yield
+ * the size in bytes of the original character (0 - 7 bytes possible).
+ }
+ kATSGlyphInfoByteSizeMask = $00000007;
+
+
+{ --------------------------------------------------------------------------- }
+
+{
+ * Summary:
+ * These values are passed into the ATSUGetGlyphBounds function to
+ * indicate whether the width of the resulting typographic glyph
+ * bounds will be determined using the caret origin, glyph origin in
+ * device space, or glyph origin in fractional absolute positions
+ }
+const
+
+ {
+ * Specifies that the width of the typographic glyph bounds will be
+ * determined using the caret origin. The caret origin is halfway
+ * between two characters.
+ }
+ kATSUseCaretOrigins = 0;
+
+ {
+ * Specifies that the width of the typographic glyph bounds will be
+ * determined using the glyph origin in device space. This is useful
+ * for adjusting text on the screen.
+ }
+ kATSUseDeviceOrigins = 1;
+
+ {
+ * Specifies that the width of the typographic glyph bounds will be
+ * determined using the glyph origin in fractional absolute
+ * positions, which are uncorrected for device display. This provides
+ * the ideal position of laid-out text and is useful for scaling text
+ * on the screen. This origin is also used to get the width of the
+ * typographic bounding rectangle when you call ATSUMeasureText.
+ }
+ kATSUseFractionalOrigins = 2;
+ kATSUseOriginFlags = 3;
+
+
+ { --------------------------------------------------------------------------- }
+ { STRUCTURED TYPES and related constants }
+ { --------------------------------------------------------------------------- }
+
+ {
+ The ATSTrapezoid structure supplies a convenient container
+ for glyph bounds in trapezoidal form.
+ }
+
+type
+ ATSTrapezoidPtr = ^ATSTrapezoid;
+ ATSTrapezoid = record
+ upperLeft: FixedPoint;
+ upperRight: FixedPoint;
+ lowerRight: FixedPoint;
+ lowerLeft: FixedPoint;
+ end;
+
+ {
+ The JustWidthDeltaEntryOverride structure specifies values for the grow and shrink case during
+ justification, both on the left and on the right. It also contains flags. This particular structure
+ is used for passing justification overrides to LLC. For further sfnt resource 'just' table
+ constants and structures, see SFNTLayoutTypes.h.
+ }
+ ATSJustWidthDeltaEntryOverridePtr = ^ATSJustWidthDeltaEntryOverride;
+ ATSJustWidthDeltaEntryOverride = record
+ beforeGrowLimit: Fixed; { ems AW can grow by at most on LT }
+ beforeShrinkLimit: Fixed; { ems AW can shrink by at most on LT }
+ afterGrowLimit: Fixed; { ems AW can grow by at most on RB }
+ afterShrinkLimit: Fixed; { ems AW can shrink by at most on RB }
+ growFlags: JustificationFlags; { flags controlling grow case }
+ shrinkFlags: JustificationFlags; { flags controlling shrink case }
+ end;
+
+ { 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
+ * used by the ATSUDirectGetLayoutDataArrayPtrFromLineRef function.
+ * The only way to get a line ref is inside of the callback. The
+ * only time the line ref is valid is inside of the callback.
+ }
+type
+ ATSULineRef = ^SInt32; { an opaque 32-bit type }
+{ ---------------------------------------------------------------------------- }
+{ DirectAccess Layout Callback Definitions }
+{ ---------------------------------------------------------------------------- }
+
+{
+ * 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
+ * a ATSULayoutOperationOverrideSpecifier structure into
+ * ATSUSetLayoutAttribute. This callback will be called whenever an
+ * ATSUI call triggers a re-layout for each operation it is
+ * installed for. The operation that triggered the callback will be
+ * set in the iCurrentOperation parameter. The callback function
+ * defined by the developer is only required to do one thing: return
+ * it's status to ATSUI as to what it has done. This is done via the
+ * oCallbackStatus parameter. It needs to tell ATSUI if it had
+ * handled the layout operation or if it still needs ATSUI to run
+ * it's own processes. iOperationCallbackParameterPtr is there in
+ * case there are ever any ATSUDirectLayoutOperationSelector which
+ * require extra parameters to be passed into the callback function.
+ * It is currently unused and will always be set to NULL. iRefCon is
+ * the constant that is set in the ATSUTextLayout object that
+ * spawned the operation by the ATSUSetTextLayoutRefCon() API.
+ * Within the context of the callback itself, only a limited subset
+ * of ATSUI APIs may be called. Basically, only the APIs that have
+ * no chance of triggering a re-layout are allowed to be called. The
+ * reason for this restriction is to prevent runaway recursion. Most
+ * of the APIs that have "create", "get", or "copy" are safe. Any
+ * attempt to call one of the restricted APIs will result in an
+ * immediate return with the kATSUInvalidCallInsideCallbackErr
+ * error. ATSULayoutOperationSelector and
+ * ATSULayoutOperationCallbackStatus are defined in ATSLayoutTypes.i.
+ }
+type ATSUDirectLayoutOperationOverrideProcPtr = function( iCurrentOperation: ATSULayoutOperationSelector; iLineRef: ATSULineRef; iRefCon: UInt32; iOperationCallbackParameterPtr: UnivPtr; var oCallbackStatus: ATSULayoutOperationCallbackStatus ): OSStatus;
+// Beats me what this translates to. If someone finds out they can tell me and we'll update it
+// typedef STACK_UPP_TYPE(ATSUDirectLayoutOperationOverrideProcPtr) ATSUDirectLayoutOperationOverrideUPP;
+type ATSUDirectLayoutOperationOverrideUPP = Ptr;
+{
+ * 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
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function NewATSUDirectLayoutOperationOverrideUPP( userRoutine: ATSUDirectLayoutOperationOverrideProcPtr ): ATSUDirectLayoutOperationOverrideUPP; external name '_NewATSUDirectLayoutOperationOverrideUPP';
+
+{
+ * 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
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+procedure DisposeATSUDirectLayoutOperationOverrideUPP( userUPP: ATSUDirectLayoutOperationOverrideUPP ); external name '_DisposeATSUDirectLayoutOperationOverrideUPP';
+
+{
+ * 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
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function InvokeATSUDirectLayoutOperationOverrideUPP( iCurrentOperation: ATSULayoutOperationSelector; iLineRef: ATSULineRef; iRefCon: UInt32; iOperationCallbackParameterPtr: UnivPtr; var oCallbackStatus: ATSULayoutOperationCallbackStatus; userUPP: ATSUDirectLayoutOperationOverrideUPP ): OSStatus; external name '_InvokeATSUDirectLayoutOperationOverrideUPP';
+
+{ ---------------------------------------------------------------------------- }
+
+{
+ * ATSULayoutOperationOverrideSpecifier
+ *
+ * Summary:
+ * This structure is used to install a callback for one or more
+ * ATSUI operations. To do this, simply passed one of these
+ * structure into the ATSUSetLayoutControls call with the
+ * kATSULayoutOperationOverrideTag tag.
+ }
+type
+ ATSULayoutOperationOverrideSpecifier = record
+ {
+ * A bitfield containing the selector for the operations in which the
+ * callback will be installed for.
+ }
+ operationSelector: ATSULayoutOperationSelector;
+ overrideUPP: ATSUDirectLayoutOperationOverrideUPP;
+ end;
+ ATSULayoutOperationOverrideSpecifierPtr = ^ATSULayoutOperationOverrideSpecifier;
+
+
+{$ALIGN MAC68K}
+
+
+{unit AXUIElement}
+{
+ * AXUIElement.h
+ *
+ * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ *
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+{ Pascal Translation Updated: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+function AXAPIEnabled: Boolean; external name '_AXAPIEnabled';
+function AXIsProcessTrusted: Boolean; external name '_AXIsProcessTrusted';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+// must be called with root privs
+function AXMakeProcessTrusted( executablePath: CFStringRef ): AXError; external name '_AXMakeProcessTrusted';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+type
+ AXUIElementRef = ^SInt32; { an opaque 32-bit type }
+
+const
+ kAXCopyMultipleAttributeOptionStopOnError = $1;
+type
+ AXCopyMultipleAttributeOptions = UInt32;
+
+
+function AXUIElementGetTypeID: CFTypeID; external name '_AXUIElementGetTypeID';
+
+function AXUIElementCopyAttributeNames( element: AXUIElementRef; var names: CFArrayRef ): AXError; external name '_AXUIElementCopyAttributeNames';
+function AXUIElementCopyAttributeValue( element: AXUIElementRef; attribute: CFStringRef; var value: CFTypeRef ): AXError; external name '_AXUIElementCopyAttributeValue';
+function AXUIElementGetAttributeValueCount( element: AXUIElementRef; attribute: CFStringRef; var count: CFIndex ): AXError; external name '_AXUIElementGetAttributeValueCount';
+function AXUIElementCopyAttributeValues( element: AXUIElementRef; attribute: CFStringRef; index: CFIndex; maxValues: CFIndex; var values: CFArrayRef ): AXError; external name '_AXUIElementCopyAttributeValues';
+function AXUIElementIsAttributeSettable( element: AXUIElementRef; attribute: CFStringRef; var settable: Boolean ): AXError; external name '_AXUIElementIsAttributeSettable';
+function AXUIElementSetAttributeValue( element: AXUIElementRef; attribute: CFStringRef; value: CFTypeRef ): AXError; external name '_AXUIElementSetAttributeValue';
+function AXUIElementCopyMultipleAttributeValues( element: AXUIElementRef; attributes: CFArrayRef; options: AXCopyMultipleAttributeOptions; var values: CFArrayRef ): AXError; external name '_AXUIElementCopyMultipleAttributeValues';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function AXUIElementCopyParameterizedAttributeNames( element: AXUIElementRef; var names: CFArrayRef ): AXError; external name '_AXUIElementCopyParameterizedAttributeNames';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+function AXUIElementCopyParameterizedAttributeValue( element: AXUIElementRef; parameterizedAttribute: CFStringRef; parameter: CFTypeRef; var result: CFTypeRef ): AXError; external name '_AXUIElementCopyParameterizedAttributeValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+function AXUIElementCopyActionNames( element: AXUIElementRef; var names: CFArrayRef ): AXError; external name '_AXUIElementCopyActionNames';
+function AXUIElementCopyActionDescription( element: AXUIElementRef; action: CFStringRef; var description: CFStringRef ): AXError; external name '_AXUIElementCopyActionDescription';
+function AXUIElementPerformAction( element: AXUIElementRef; action: CFStringRef ): AXError; external name '_AXUIElementPerformAction';
+
+function AXUIElementCopyElementAtPosition( application: AXUIElementRef; x: Float32; y: Float32; var element: AXUIElementRef ): AXError; external name '_AXUIElementCopyElementAtPosition';
+
+function AXUIElementCreateApplication( pid: pid_t ): AXUIElementRef; external name '_AXUIElementCreateApplication';
+function AXUIElementCreateSystemWide: AXUIElementRef; external name '_AXUIElementCreateSystemWide';
+
+function AXUIElementGetPid( element: AXUIElementRef; var pid: pid_t ): AXError; external name '_AXUIElementGetPid';
+
+// pass the SystemWide element (AXUIElementCreateSystemWide) if you want to set the timeout globally for this process
+// setting the timeout on another AXUIElementRef sets it only for that ref, not for other AXUIElementRef(s) that are
+// equal to it.
+// setting timeout to 0 makes this element use the global timeout
+function AXUIElementSetMessagingTimeout( element: AXUIElementRef; timeoutInSeconds: Float32 ): AXError; external name '_AXUIElementSetMessagingTimeout';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+// see CGRemoteOperation.h for documentation of parameters
+// you can only pass the root or application uielement
+function AXUIElementPostKeyboardEvent( application: AXUIElementRef; keyChar: CGCharCode; virtualKey: CGKeyCode; keyDown: Boolean ): AXError; external name '_AXUIElementPostKeyboardEvent';
+
+
+// Notification APIs
+type
+ AXObserverRef = ^SInt32; { an opaque 32-bit type }
+
+type
+ AXObserverCallback = procedure( observer: AXObserverRef; element: AXUIElementRef; notification: CFStringRef; refcon: UnivPtr );
+
+function AXObserverGetTypeID: CFTypeID; external name '_AXObserverGetTypeID';
+
+function AXObserverCreate( application: pid_t; callback: AXObserverCallback; var outObserver: AXObserverRef ): AXError; external name '_AXObserverCreate';
+
+function AXObserverAddNotification( observer: AXObserverRef; element: AXUIElementRef; notification: CFStringRef; refcon: UnivPtr ): AXError; external name '_AXObserverAddNotification';
+function AXObserverRemoveNotification( observer: AXObserverRef; element: AXUIElementRef; notification: CFStringRef ): AXError; external name '_AXObserverRemoveNotification';
+
+function AXObserverGetRunLoopSource( observer: AXObserverRef ): CFRunLoopSourceRef; external name '_AXObserverGetRunLoopSource';
+
+{unit CFBundle}
+{ CFBundle.h
+ Copyright (c) 1999-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFBundleRef = ^SInt32; { an opaque 32-bit type }
+ CFBundleRefPtr = ^CFBundleRef;
+ CFPlugInRef = ^SInt32; { an opaque 32-bit type }
+ CFPlugInRefPtr = ^CFPlugInRef;
+
+{ ===================== Standard Info.plist keys ===================== }
+var kCFBundleInfoDictionaryVersionKey: CFStringRef; external name '_kCFBundleInfoDictionaryVersionKey'; (* attribute const *)
+ { The version of the Info.plist format }
+var kCFBundleExecutableKey: CFStringRef; external name '_kCFBundleExecutableKey'; (* attribute const *)
+ { The name of the executable in this bundle (if any) }
+var kCFBundleIdentifierKey: CFStringRef; external name '_kCFBundleIdentifierKey'; (* attribute const *)
+ { The bundle identifier (for CFBundleGetBundleWithIdentifier()) }
+var kCFBundleVersionKey: CFStringRef; external name '_kCFBundleVersionKey'; (* attribute const *)
+ { The version number of the bundle. For Mac OS 9 style version numbers (for example "2.5.3d5"), clients can use CFBundleGetVersionNumber() instead of accessing this key directly since that function will properly convert the version string into its compact integer representation. }
+var kCFBundleDevelopmentRegionKey: CFStringRef; external name '_kCFBundleDevelopmentRegionKey'; (* attribute const *)
+ { The name of the development language of the bundle. }
+var kCFBundleNameKey: CFStringRef; external name '_kCFBundleNameKey'; (* attribute const *)
+ { The human-readable name of the bundle. This key is often found in the InfoPlist.strings since it is usually localized. }
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+var kCFBundleLocalizationsKey: CFStringRef; external name '_kCFBundleLocalizationsKey'; (* attribute const *)
+ { Allows an unbundled application that handles localization itself to specify which localizations it has available. }
+{#endif}
+
+{ ===================== Finding Bundles ===================== }
+
+function CFBundleGetMainBundle: CFBundleRef; external name '_CFBundleGetMainBundle';
+
+function CFBundleGetBundleWithIdentifier( bundleID: CFStringRef ): CFBundleRef; external name '_CFBundleGetBundleWithIdentifier';
+ { A bundle can name itself by providing a key in the info dictionary. }
+ { This facility is meant to allow bundle-writers to get hold of their }
+ { bundle from their code without having to know where it was on the disk. }
+ { This is meant to be a replacement mechanism for +bundleForClass: users. }
+ { Note that this does not search for bundles on the disk; it will locate }
+ { only bundles already loaded or otherwise known to the current process. }
+
+function CFBundleGetAllBundles: CFArrayRef; external name '_CFBundleGetAllBundles';
+ { This is potentially expensive. Use with care. }
+
+{ ===================== Creating Bundles ===================== }
+
+function CFBundleGetTypeID: UInt32; external name '_CFBundleGetTypeID';
+
+function CFBundleCreate( allocator: CFAllocatorRef; bundleURL: CFURLRef ): CFBundleRef; external name '_CFBundleCreate';
+ { Might return an existing instance with the ref-count bumped. }
+
+function CFBundleCreateBundlesFromDirectory( allocator: CFAllocatorRef; directoryURL: CFURLRef; bundleType: CFStringRef ): CFArrayRef; external name '_CFBundleCreateBundlesFromDirectory';
+ { Create instances for all bundles in the given directory matching the given }
+ { type (or all of them if bundleType is NULL) }
+
+{ ==================== Basic Bundle Info ==================== }
+
+function CFBundleCopyBundleURL( bundle: CFBundleRef ): CFURLRef; external name '_CFBundleCopyBundleURL';
+
+function CFBundleGetValueForInfoDictionaryKey( bundle: CFBundleRef; key: CFStringRef ): CFTypeRef; external name '_CFBundleGetValueForInfoDictionaryKey';
+ { Returns a localized value if available, otherwise the global value. }
+ { This is the recommended function for examining the info dictionary. }
+
+function CFBundleGetInfoDictionary( bundle: CFBundleRef ): CFDictionaryRef; external name '_CFBundleGetInfoDictionary';
+ { This is the global info dictionary. Note that CFBundle may add }
+ { extra keys to the dictionary for its own use. }
+
+function CFBundleGetLocalInfoDictionary( bundle: CFBundleRef ): CFDictionaryRef; external name '_CFBundleGetLocalInfoDictionary';
+ { This is the localized info dictionary. }
+
+procedure CFBundleGetPackageInfo( bundle: CFBundleRef; var packageType: OSType; var packageCreator: OSType ); external name '_CFBundleGetPackageInfo';
+
+function CFBundleGetIdentifier( bundle: CFBundleRef ): CFStringRef; external name '_CFBundleGetIdentifier';
+
+function CFBundleGetVersionNumber( bundle: CFBundleRef ): UInt32; external name '_CFBundleGetVersionNumber';
+
+function CFBundleGetDevelopmentRegion( bundle: CFBundleRef ): CFStringRef; external name '_CFBundleGetDevelopmentRegion';
+
+function CFBundleCopySupportFilesDirectoryURL( bundle: CFBundleRef ): CFURLRef; external name '_CFBundleCopySupportFilesDirectoryURL';
+
+function CFBundleCopyResourcesDirectoryURL( bundle: CFBundleRef ): CFURLRef; external name '_CFBundleCopyResourcesDirectoryURL';
+
+function CFBundleCopyPrivateFrameworksURL( bundle: CFBundleRef ): CFURLRef; external name '_CFBundleCopyPrivateFrameworksURL';
+
+function CFBundleCopySharedFrameworksURL( bundle: CFBundleRef ): CFURLRef; external name '_CFBundleCopySharedFrameworksURL';
+
+function CFBundleCopySharedSupportURL( bundle: CFBundleRef ): CFURLRef; external name '_CFBundleCopySharedSupportURL';
+
+function CFBundleCopyBuiltInPlugInsURL( bundle: CFBundleRef ): CFURLRef; external name '_CFBundleCopyBuiltInPlugInsURL';
+
+{ ------------- Basic Bundle Info without a CFBundle instance ------------- }
+{ This API is provided to enable developers to retrieve basic information }
+{ about a bundle without having to create an instance of CFBundle. }
+{ Because of caching behavior when a CFBundle instance exists, it will be faster }
+{ to actually create a CFBundle if you need to retrieve multiple pieces of info. }
+function CFBundleCopyInfoDictionaryInDirectory( bundleURL: CFURLRef ): CFDictionaryRef; external name '_CFBundleCopyInfoDictionaryInDirectory';
+
+function CFBundleGetPackageInfoInDirectory( url: CFURLRef; var packageType: UInt32; var packageCreator: UInt32 ): Boolean; external name '_CFBundleGetPackageInfoInDirectory';
+
+{ ==================== Resource Handling API ==================== }
+
+function CFBundleCopyResourceURL( bundle: CFBundleRef; resourceName: CFStringRef; resourceType: CFStringRef; subDirName: CFStringRef ): CFURLRef; external name '_CFBundleCopyResourceURL';
+
+function CFBundleCopyResourceURLsOfType( bundle: CFBundleRef; resourceType: CFStringRef; subDirName: CFStringRef ): CFArrayRef; external name '_CFBundleCopyResourceURLsOfType';
+
+function CFBundleCopyLocalizedString( bundle: CFBundleRef; key: CFStringRef; value: CFStringRef; tableName: CFStringRef ): CFStringRef; external name '_CFBundleCopyLocalizedString';
+
+function CFCopyLocalizedString( key: CFStringRef; comment: PChar ): CFStringRef; inline;
+function CFCopyLocalizedStringFromTable( key: CFStringRef; tableName: CFStringRef; comment: PChar ): CFStringRef; inline;
+function CFCopyLocalizedStringFromTableInBundle( key: CFStringRef; tableName: CFStringRef; bundle: CFBundleRef; comment: PChar ): CFStringRef; inline;
+function CFCopyLocalizedStringWithDefaultValue( key: CFStringRef; tableName: CFStringRef; bundle: CFBundleRef; value: CFStringRef; comment: PChar ): CFStringRef; inline;
+
+{ ------------- Resource Handling without a CFBundle instance ------------- }
+{ This API is provided to enable developers to use the CFBundle resource }
+{ searching policy without having to create an instance of CFBundle. }
+{ Because of caching behavior when a CFBundle instance exists, it will be faster }
+{ to actually create a CFBundle if you need to access several resources. }
+
+function CFBundleCopyResourceURLInDirectory( bundleURL: CFURLRef; resourceName: CFStringRef; resourceType: CFStringRef; subDirName: CFStringRef ): CFURLRef; external name '_CFBundleCopyResourceURLInDirectory';
+
+function CFBundleCopyResourceURLsOfTypeInDirectory( bundleURL: CFURLRef; resourceType: CFStringRef; subDirName: CFStringRef ): CFArrayRef; external name '_CFBundleCopyResourceURLsOfTypeInDirectory';
+
+{ =========== Localization-specific Resource Handling API =========== }
+{ This API allows finer-grained control over specific localizations, }
+{ as distinguished from the above API, which always uses the user's }
+{ preferred localizations for the bundle in the current app context. }
+
+function CFBundleCopyBundleLocalizations( bundle: CFBundleRef ): CFArrayRef; external name '_CFBundleCopyBundleLocalizations';
+ { Lists the localizations that a bundle contains. }
+
+function CFBundleCopyPreferredLocalizationsFromArray( locArray: CFArrayRef ): CFArrayRef; external name '_CFBundleCopyPreferredLocalizationsFromArray';
+ { Given an array of possible localizations, returns the one or more }
+ { of them that CFBundle would use in the current application context. }
+ { To determine the localizations that would be used for a particular }
+ { bundle in the current application context, apply this function to the }
+ { result of CFBundleCopyBundleLocalizations. }
+
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+function CFBundleCopyLocalizationsForPreferences( locArray: CFArrayRef; prefArray: CFArrayRef ): CFArrayRef; external name '_CFBundleCopyLocalizationsForPreferences';
+ { Given an array of possible localizations, returns the one or more of }
+ { them that CFBundle would use, without reference to the current application }
+ { context, if the user's preferred localizations were given by prefArray. }
+ { If prefArray is NULL, the current user's actual preferred localizations will }
+ { be used. This is not the same as CFBundleCopyPreferredLocalizationsFromArray, }
+ { because that function takes the current application context into account. }
+ { To determine the localizations that another application would use, apply }
+ { this function to the result of CFBundleCopyBundleLocalizations. }
+{#endif}
+
+function CFBundleCopyResourceURLForLocalization( bundle: CFBundleRef; resourceName: CFStringRef; resourceType: CFStringRef; subDirName: CFStringRef; localizationName: CFStringRef ): CFURLRef; external name '_CFBundleCopyResourceURLForLocalization';
+
+function CFBundleCopyResourceURLsOfTypeForLocalization( bundle: CFBundleRef; resourceType: CFStringRef; subDirName: CFStringRef; localizationName: CFStringRef ): CFArrayRef; external name '_CFBundleCopyResourceURLsOfTypeForLocalization';
+
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+{ =================== Unbundled application info ===================== }
+{ This API is provided to enable developers to retrieve bundle-related }
+{ information about an application that may be bundled or unbundled. }
+function CFBundleCopyInfoDictionaryForURL( url: CFURLRef ): CFDictionaryRef; external name '_CFBundleCopyInfoDictionaryForURL';
+ { For a directory URL, this is equivalent to CFBundleCopyInfoDictionaryInDirectory. }
+ { For a plain file URL representing an unbundled application, this will attempt to read }
+ { an info dictionary either from the (__TEXT, __info_plist) section (for a Mach-o file) }
+ { or from a 'plst' resource. }
+
+function CFBundleCopyLocalizationsForURL( url: CFURLRef ): CFArrayRef; external name '_CFBundleCopyLocalizationsForURL';
+ { For a directory URL, this is equivalent to calling CFBundleCopyBundleLocalizations }
+ { on the corresponding bundle. For a plain file URL representing an unbundled application, }
+ { this will attempt to determine its localizations using the CFBundleLocalizations and }
+ { CFBundleDevelopmentRegion keys in the dictionary returned by CFBundleCopyInfoDictionaryForURL,}
+ { or a 'vers' resource if those are not present. }
+{#endif}
+
+{ ==================== Primitive Code Loading API ==================== }
+{ This API abstracts the various different executable formats supported on }
+{ various platforms. It can load DYLD, CFM, or DLL shared libraries (on their }
+{ appropriate platforms) and gives a uniform API for looking up functions. }
+{ Note that Cocoa-based bundles containing Objective-C or Java code must }
+{ be loaded with NSBundle, not CFBundle. Once they are loaded, however, }
+{ either CFBundle or NSBundle can be used. }
+
+function CFBundleCopyExecutableURL( bundle: CFBundleRef ): CFURLRef; external name '_CFBundleCopyExecutableURL';
+
+function CFBundleIsExecutableLoaded( bundle: CFBundleRef ): Boolean; external name '_CFBundleIsExecutableLoaded';
+
+function CFBundleLoadExecutable( bundle: CFBundleRef ): Boolean; external name '_CFBundleLoadExecutable';
+
+procedure CFBundleUnloadExecutable( bundle: CFBundleRef ); external name '_CFBundleUnloadExecutable';
+
+function CFBundleGetFunctionPointerForName( bundle: CFBundleRef; functionName: CFStringRef ): UnivPtr; external name '_CFBundleGetFunctionPointerForName';
+
+procedure CFBundleGetFunctionPointersForNames( bundle: CFBundleRef; functionNames: CFArrayRef; ftbl: {variable-size-array} UnivPtrPtr ); external name '_CFBundleGetFunctionPointersForNames';
+
+function CFBundleGetDataPointerForName( bundle: CFBundleRef; symbolName: CFStringRef ): UnivPtr; external name '_CFBundleGetDataPointerForName';
+
+procedure CFBundleGetDataPointersForNames( bundle: CFBundleRef; symbolNames: CFArrayRef; stbl: {variable-size-array} UnivPtrPtr ); external name '_CFBundleGetDataPointersForNames';
+
+function CFBundleCopyAuxiliaryExecutableURL( bundle: CFBundleRef; executableName: CFStringRef ): CFURLRef; external name '_CFBundleCopyAuxiliaryExecutableURL';
+ { This function can be used to find executables other than your main }
+ { executable. This is useful, for instance, for applications that have }
+ { some command line tool that is packaged with and used by the application. }
+ { The tool can be packaged in the various platform executable directories }
+ { in the bundle and can be located with this function. This allows an }
+ { app to ship versions of the tool for each platform as it does for the }
+ { main app executable. }
+
+{ ==================== Getting a bundle's plugIn ==================== }
+
+function CFBundleGetPlugIn( bundle: CFBundleRef ): CFPlugInRef; external name '_CFBundleGetPlugIn';
+
+{ ==================== Resource Manager-Related API ==================== }
+
+function CFBundleOpenBundleResourceMap( bundle: CFBundleRef ): SInt16; external name '_CFBundleOpenBundleResourceMap';
+ { This function opens the non-localized and the localized resource files }
+ { (if any) for the bundle, creates and makes current a single read-only }
+ { resource map combining both, and returns a reference number for it. }
+ { If it is called multiple times, it opens the files multiple times, }
+ { and returns distinct reference numbers. }
+
+function CFBundleOpenBundleResourceFiles( bundle: CFBundleRef; var refNum: SInt16; var localizedRefNum: SInt16 ): SInt32; external name '_CFBundleOpenBundleResourceFiles';
+ { Similar to CFBundleOpenBundleResourceMap, except that it creates two }
+ { separate resource maps and returns reference numbers for both. }
+
+procedure CFBundleCloseBundleResourceMap( bundle: CFBundleRef; refNum: SInt16 ); external name '_CFBundleCloseBundleResourceMap';
+
+
+
+{unit CFHTTPMessage}
+{
+ File: CFNetwork/CFHTTPMessage.h
+
+ Contains: CoreFoundation Network socket streams header
+
+ Version: CFNetwork-71.2~1
+
+ Copyright: © 2001-2003 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{
+ * kCFHTTPVersion1_0
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+var kCFHTTPVersion1_0: CFStringRef; external name '_kCFHTTPVersion1_0'; (* attribute const *)
+{
+ * kCFHTTPVersion1_1
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+var kCFHTTPVersion1_1: CFStringRef; external name '_kCFHTTPVersion1_1'; (* attribute const *)
+{
+ * kCFHTTPAuthenticationSchemeBasic
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+var kCFHTTPAuthenticationSchemeBasic: CFStringRef; external name '_kCFHTTPAuthenticationSchemeBasic'; (* attribute const *)
+{
+ * kCFHTTPAuthenticationSchemeDigest
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+var kCFHTTPAuthenticationSchemeDigest: CFStringRef; external name '_kCFHTTPAuthenticationSchemeDigest'; (* attribute const *)
+{ Currently unsupported }
+type
+ CFHTTPMessageRef = ^SInt32; { an opaque 32-bit type }
+{
+ * CFHTTPMessageGetTypeID()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageGetTypeID: CFTypeID; external name '_CFHTTPMessageGetTypeID';
+
+
+{
+ * CFHTTPMessageCreateRequest()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageCreateRequest( allocator: CFAllocatorRef; requestMethod: CFStringRef; url: CFURLRef; httpVersion: CFStringRef ): CFHTTPMessageRef; external name '_CFHTTPMessageCreateRequest';
+
+
+{ Pass NULL to use the standard description for the given status code, as found in RFC 2616}
+{
+ * CFHTTPMessageCreateResponse()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageCreateResponse( allocator: CFAllocatorRef; statusCode: SInt32; statusDescription: CFStringRef; httpVersion: CFStringRef ): CFHTTPMessageRef; external name '_CFHTTPMessageCreateResponse';
+
+
+{ Creates an empty request or response, which you can then append bytes to via CFHTTPMessageAppendBytes(). The HTTP header information will be parsed out as the bytes are appended.}
+{
+ * CFHTTPMessageCreateEmpty()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageCreateEmpty( allocator: CFAllocatorRef; isRequest: Boolean ): CFHTTPMessageRef; external name '_CFHTTPMessageCreateEmpty';
+
+
+{
+ * CFHTTPMessageCreateCopy()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageCreateCopy( allocator: CFAllocatorRef; message: CFHTTPMessageRef ): CFHTTPMessageRef; external name '_CFHTTPMessageCreateCopy';
+
+
+{ Whether the message is a response or a request}
+{
+ * CFHTTPMessageIsRequest()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageIsRequest( message: CFHTTPMessageRef ): Boolean; external name '_CFHTTPMessageIsRequest';
+
+
+{
+ * CFHTTPMessageCopyVersion()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageCopyVersion( message: CFHTTPMessageRef ): CFStringRef; external name '_CFHTTPMessageCopyVersion';
+
+
+{
+ * CFHTTPMessageCopyBody()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageCopyBody( message: CFHTTPMessageRef ): CFDataRef; external name '_CFHTTPMessageCopyBody';
+
+
+{
+ * CFHTTPMessageSetBody()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+procedure CFHTTPMessageSetBody( message: CFHTTPMessageRef; bodyData: CFDataRef ); external name '_CFHTTPMessageSetBody';
+
+
+{
+ * CFHTTPMessageCopyHeaderFieldValue()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageCopyHeaderFieldValue( message: CFHTTPMessageRef; headerField: CFStringRef ): CFStringRef; external name '_CFHTTPMessageCopyHeaderFieldValue';
+
+
+{
+ * CFHTTPMessageCopyAllHeaderFields()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageCopyAllHeaderFields( message: CFHTTPMessageRef ): CFDictionaryRef; external name '_CFHTTPMessageCopyAllHeaderFields';
+
+
+{
+ * CFHTTPMessageSetHeaderFieldValue()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+procedure CFHTTPMessageSetHeaderFieldValue( message: CFHTTPMessageRef; headerField: CFStringRef; value: CFStringRef ); external name '_CFHTTPMessageSetHeaderFieldValue';
+
+
+{ The following function appends the given bytes to the message given (parsing out any control information if appropriate). Returns FALSE if a parsing error occurs while processing the new data.}
+{
+ * CFHTTPMessageAppendBytes()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageAppendBytes( message: CFHTTPMessageRef; newBytes: UnivPtr; numBytes: CFIndex ): Boolean; external name '_CFHTTPMessageAppendBytes';
+
+
+{ Whether further header data is expected by the message}
+{
+ * CFHTTPMessageIsHeaderComplete()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageIsHeaderComplete( message: CFHTTPMessageRef ): Boolean; external name '_CFHTTPMessageIsHeaderComplete';
+
+
+{
+ * CFHTTPMessageCopySerializedMessage()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageCopySerializedMessage( request: CFHTTPMessageRef ): CFDataRef; external name '_CFHTTPMessageCopySerializedMessage';
+
+
+{*******************}
+{ Request functions }
+{*******************}
+{
+ * CFHTTPMessageCopyRequestURL()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageCopyRequestURL( request: CFHTTPMessageRef ): CFURLRef; external name '_CFHTTPMessageCopyRequestURL';
+
+
+{
+ * CFHTTPMessageCopyRequestMethod()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageCopyRequestMethod( request: CFHTTPMessageRef ): CFStringRef; external name '_CFHTTPMessageCopyRequestMethod';
+
+
+{ Tries to modify request to contain the authentication information
+ requested by authenticationFailureResponse (which presumably is a
+ 401 or 407 response). Returns TRUE if successful; FALSE otherwise
+ (leaving request unmodified). If authenticationScheme is NULL, the
+ strongest supported scheme listed in failedResponse will be used. }
+{
+ * CFHTTPMessageAddAuthentication()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageAddAuthentication( request: CFHTTPMessageRef; authenticationFailureResponse: CFHTTPMessageRef; username: CFStringRef; password: CFStringRef; authenticationScheme: CFStringRef; forProxy: Boolean ): Boolean; external name '_CFHTTPMessageAddAuthentication';
+
+
+{********************}
+{ Response functions }
+{********************}
+{
+ * CFHTTPMessageGetResponseStatusCode()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageGetResponseStatusCode( response: CFHTTPMessageRef ): UInt32; external name '_CFHTTPMessageGetResponseStatusCode';
+
+
+{
+ * CFHTTPMessageCopyResponseStatusLine()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFHTTPMessageCopyResponseStatusLine( response: CFHTTPMessageRef ): CFStringRef; external name '_CFHTTPMessageCopyResponseStatusLine';
+
+{unit CFPlugIn}
+{ CFPlugIn.h
+ Copyright (c) 1999-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+{
+# if !defined(COREFOUNDATION_CFPLUGINCOM_SEPARATE)
+const
+ COREFOUNDATION_CFPLUGINCOM_SEPARATE = 1;
+# endif
+}
+
+{ ================ Standard Info.plist keys for plugIns ================ }
+
+var kCFPlugInDynamicRegistrationKey: CFStringRef; external name '_kCFPlugInDynamicRegistrationKey'; (* attribute const *)
+var kCFPlugInDynamicRegisterFunctionKey: CFStringRef; external name '_kCFPlugInDynamicRegisterFunctionKey'; (* attribute const *)
+var kCFPlugInUnloadFunctionKey: CFStringRef; external name '_kCFPlugInUnloadFunctionKey'; (* attribute const *)
+var kCFPlugInFactoriesKey: CFStringRef; external name '_kCFPlugInFactoriesKey'; (* attribute const *)
+var kCFPlugInTypesKey: CFStringRef; external name '_kCFPlugInTypesKey'; (* attribute const *)
+
+{ ================= Function prototypes for various callbacks ================= }
+{ Function types that plugIn authors can implement for various purposes. }
+
+type
+ CFPlugInDynamicRegisterFunction = procedure( plugIn: CFPlugInRef );
+ CFPlugInUnloadFunction = procedure( plugIn: CFPlugInRef );
+ CFPlugInFactoryFunction = function( allocator: CFAllocatorRef; typeUUID: CFUUIDRef ): UnivPtr;
+
+{ ================= Creating PlugIns ================= }
+
+function CFPlugInGetTypeID: UInt32; external name '_CFPlugInGetTypeID';
+
+function CFPlugInCreate( allocator: CFAllocatorRef; plugInURL: CFURLRef ): CFPlugInRef; external name '_CFPlugInCreate';
+ { Might return an existing instance with the ref-count bumped. }
+
+function CFPlugInGetBundle( plugIn: CFPlugInRef ): CFBundleRef; external name '_CFPlugInGetBundle';
+
+{ ================= Controlling load on demand ================= }
+{ For plugIns. }
+{ PlugIns that do static registration are load on demand by default. }
+{ PlugIns that do dynamic registration are not load on demand by default. }
+{ A dynamic registration function can call CFPlugInSetLoadOnDemand(). }
+
+procedure CFPlugInSetLoadOnDemand( plugIn: CFPlugInRef; flag: Boolean ); external name '_CFPlugInSetLoadOnDemand';
+
+function CFPlugInIsLoadOnDemand( plugIn: CFPlugInRef ): Boolean; external name '_CFPlugInIsLoadOnDemand';
+
+{ ================= Finding factories and creating instances ================= }
+{ For plugIn hosts. }
+{ Functions for finding factories to create specific types and actually creating instances of a type. }
+
+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. }
+
+function CFPlugInInstanceCreate( allocator: CFAllocatorRef; factoryUUID: CFUUIDRef; typeUUID: CFUUIDRef ): UnivPtr; external name '_CFPlugInInstanceCreate';
+ { This function returns the IUnknown interface for the new instance. }
+
+{ ================= Registering factories and types ================= }
+{ For plugIn writers who must dynamically register things. }
+{ Functions to register factory functions and to associate factories with types. }
+
+function CFPlugInRegisterFactoryFunction( factoryUUID: CFUUIDRef; func: CFPlugInFactoryFunction ): Boolean; external name '_CFPlugInRegisterFactoryFunction';
+
+function CFPlugInRegisterFactoryFunctionByName( factoryUUID: CFUUIDRef; plugIn: CFPlugInRef; functionName: CFStringRef ): Boolean; external name '_CFPlugInRegisterFactoryFunctionByName';
+
+function CFPlugInUnregisterFactory( factoryUUID: CFUUIDRef ): Boolean; external name '_CFPlugInUnregisterFactory';
+
+function CFPlugInRegisterPlugInType( factoryUUID: CFUUIDRef; typeUUID: CFUUIDRef ): Boolean; external name '_CFPlugInRegisterPlugInType';
+
+function CFPlugInUnregisterPlugInType( factoryUUID: CFUUIDRef; typeUUID: CFUUIDRef ): Boolean; external name '_CFPlugInUnregisterPlugInType';
+
+{ ================= Registering instances ================= }
+{ When a new instance of a type is created, the instance is responsible for registering itself with the factory that created it and unregistering when it deallocates. }
+{ This means that an instance must keep track of the CFUUIDRef of the factory that created it so it can unregister when it goes away. }
+
+procedure CFPlugInAddInstanceForFactory( factoryID: CFUUIDRef ); external name '_CFPlugInAddInstanceForFactory';
+
+procedure CFPlugInRemoveInstanceForFactory( factoryID: CFUUIDRef ); external name '_CFPlugInRemoveInstanceForFactory';
+
+
+{ Obsolete API }
+
+type
+ CFPlugInInstanceRef = ^SInt32; { an opaque 32-bit type }
+ CFPlugInInstanceRefPtr = ^CFPlugInInstanceRef;
+
+type
+ CFPlugInInstanceGetInterfaceFunction = function( instance: CFPlugInInstanceRef; interfaceName: CFStringRef; var ftbl: UnivPtr ): Boolean;
+ CFPlugInInstanceDeallocateInstanceDataFunction = procedure( instanceData: UnivPtr );
+
+function CFPlugInInstanceGetInterfaceFunctionTable( instance: CFPlugInInstanceRef; interfaceName: CFStringRef; var ftbl: UnivPtr ): Boolean; external name '_CFPlugInInstanceGetInterfaceFunctionTable';
+function CFPlugInInstanceGetFactoryName( instance: CFPlugInInstanceRef ): CFStringRef; external name '_CFPlugInInstanceGetFactoryName';
+function CFPlugInInstanceGetInstanceData( instance: CFPlugInInstanceRef ): UnivPtr; external name '_CFPlugInInstanceGetInstanceData';
+function CFPlugInInstanceGetTypeID: UInt32; external name '_CFPlugInInstanceGetTypeID';
+function CFPlugInInstanceCreateWithInstanceDataSize( allocator: CFAllocatorRef; instanceDataSize: CFIndex; deallocateInstanceFunction: CFPlugInInstanceDeallocateInstanceDataFunction; factoryName: CFStringRef; getInterfaceFunction: CFPlugInInstanceGetInterfaceFunction ): CFPlugInInstanceRef; external name '_CFPlugInInstanceCreateWithInstanceDataSize';
+
+
+
+
+{unit CFPlugInCOM}
+{ CFPlugInCOM.h
+ Copyright (c) 1999-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ ================= IUnknown definition (C struct) ================= }
+
+{ All interface structs must have an IUnknownStruct at the beginning. }
+{ The _reserved field is part of the Microsoft COM binary standard on Macintosh. }
+{ You can declare new C struct interfaces by defining a new struct that includes "IUNKNOWN_C_GUTS;" before the first field of the struct. }
+
+type
+ HRESULT = SInt32;
+ ULONG = UInt32;
+ LPVOID = UnivPtr;
+ REFIID = CFUUIDBytes;
+
+{ Macros for more detailed HRESULT analysis }
+
+function SUCCEEDED( Status: HRESULT ): Boolean; inline;
+function FAILED( Status: HRESULT ): Boolean; inline;
+function IS_ERROR( Status: HRESULT ): Boolean; inline;
+function HRESULT_CODE( hr: HRESULT ): HRESULT; inline;
+function HRESULT_FACILITY( hr: HRESULT ): HRESULT; inline;
+function HRESULT_SEVERITY( hr: HRESULT ): HRESULT; inline;
+
+const
+ SEVERITY_SUCCESS = 0;
+const
+ SEVERITY_ERROR = 1;
+
+{ Creating an HRESULT from its component pieces }
+function MAKE_HRESULT( sev, fac, code: ULONG ): HRESULT; inline;
+
+{ Pre-defined success HRESULTS }
+const
+ S_OK = 0;
+const
+ S_FALSE = 1;
+
+{ Common error HRESULTS }
+const
+ E_UNEXPECTED = $8000FFFF;
+ E_NOTIMPL = $80000001;
+ E_OUTOFMEMORY = $80000002;
+ E_INVALIDARG = $80000003;
+ E_NOINTERFACE = $80000004;
+ E_POINTER = $80000005;
+ E_HANDLE = $80000006;
+ E_ABORT = $80000007;
+ E_FAIL = $80000008;
+ E_ACCESSDENIED = $80000009;
+
+{ This macro should be used when defining all interface functions (as it is for the IUnknown functions below). }
+{#define STDMETHODCALLTYPE}
+
+{ The __RPC_FAR macro is for COM source compatibility only. This macro is used a lot in COM interface definitions. If your CFPlugIn interfaces need to be COM interfaces as well, you can use this macro to get better source compatibility. It is not used in the IUnknown definition below, because when doing COM, you will be using the Microsoft supplied IUnknown interface anyway. }
+{#define __RPC_FAR}
+
+{ The IUnknown interface }
+function IUnknownUUID: CFUUIDRef; inline;
+
+type
+ IUnknownVTbl = record
+ _reserved: UnivPtr;
+ QueryInterface: function( thisPointer: UnivPtr; iid: REFIID; var ppv: LPVOID ): HRESULT;
+ AddRef: function( thisPointer: UnivPtr ): ULONG;
+ Release: function( thisPointer: UnivPtr ): ULONG;
+ end;
+
+{ End of extern "C" stuff }
+
+
+{ C++ specific stuff }
+
+
+{unit CFStream}
+{ CFStream.h
+ Copyright (c) 2000-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFStreamStatus = SInt32;
+const
+ kCFStreamStatusNotOpen = 0;
+ kCFStreamStatusOpening = 1; { open is in-progress }
+ kCFStreamStatusOpen = 2;
+ kCFStreamStatusReading = 3;
+ kCFStreamStatusWriting = 4;
+ kCFStreamStatusAtEnd = 5; { no further bytes can be read/written }
+ kCFStreamStatusClosed = 6;
+ kCFStreamStatusError = 7;
+
+type
+ CFStreamErrorDomain = SInt32;
+const
+ kCFStreamErrorDomainCustom = -1; { custom to the kind of stream in question }
+ kCFStreamErrorDomainPOSIX = 1; { POSIX errno; interpret using <sys/errno.h> }
+ kCFStreamErrorDomainMacOSStatus = 2; { OSStatus type from Carbon APIs; interpret using <MacTypes.h> }
+
+type
+ CFStreamError = record
+ domain: CFStreamErrorDomain;
+ error: SInt32;
+ end;
+ CFStreamErrorPtr = ^CFStreamError;
+
+type
+ CFStreamEventType = SInt32;
+const
+ kCFStreamEventNone = 0;
+ kCFStreamEventOpenCompleted = 1;
+ kCFStreamEventHasBytesAvailable = 2;
+ kCFStreamEventCanAcceptBytes = 4;
+ kCFStreamEventErrorOccurred = 8;
+ kCFStreamEventEndEncountered = 16;
+
+type
+ CFStreamClientContext = record
+ version: CFIndex;
+ info: UnivPtr;
+ retain: function( info: {const} UnivPtr ): UnivPtr;
+ release: procedure( info: {const} UnivPtr );
+ copyDescription: function( info: {const} UnivPtr ): CFStringRef;
+ end;
+
+type
+ CFReadStreamRef = ^SInt32; { an opaque 32-bit type }
+ CFReadStreamRefPtr = ^CFReadStreamRef;
+ CFWriteStreamRef = ^SInt32; { an opaque 32-bit type }
+ CFWriteStreamRefPtr = ^CFWriteStreamRef;
+
+type
+ CFReadStreamClientCallBack = procedure( stream: CFReadStreamRef; typ: CFStreamEventType; clientCallBackInfo: UnivPtr );
+ CFWriteStreamClientCallBack = procedure( stream: CFWriteStreamRef; typ: CFStreamEventType; clientCallBackInfo: UnivPtr );
+
+function CFReadStreamGetTypeID: CFTypeID; external name '_CFReadStreamGetTypeID';
+function CFWriteStreamGetTypeID: CFTypeID; external name '_CFWriteStreamGetTypeID';
+
+{ Memory streams }
+
+{ Value will be a CFData containing all bytes thusfar written; used to recover the data written to a memory write stream. }
+var kCFStreamPropertyDataWritten: CFStringRef; external name '_kCFStreamPropertyDataWritten'; (* attribute const *)
+
+{ Pass kCFAllocatorNull for bytesDeallocator to prevent CFReadStream from deallocating bytes; otherwise, CFReadStream will deallocate bytes when the stream is destroyed }
+function CFReadStreamCreateWithBytesNoCopy( alloc: CFAllocatorRef; bytes: UnivPtr; length: CFIndex; bytesDeallocator: CFAllocatorRef ): CFReadStreamRef; external name '_CFReadStreamCreateWithBytesNoCopy';
+
+{ The stream writes into the buffer given; when bufferCapacity is exhausted, the stream is exhausted (status becomes kCFStreamStatusAtEnd) }
+function CFWriteStreamCreateWithBuffer( alloc: CFAllocatorRef; buffer: UnivPtr; bufferCapacity: CFIndex ): CFWriteStreamRef; external name '_CFWriteStreamCreateWithBuffer';
+
+{ New buffers are allocated from bufferAllocator as bytes are written to the stream. At any point, you can recover the bytes thusfar written by asking for the property kCFStreamPropertyDataWritten, above }
+function CFWriteStreamCreateWithAllocatedBuffers( alloc: CFAllocatorRef; bufferAllocator: CFAllocatorRef ): CFWriteStreamRef; external name '_CFWriteStreamCreateWithAllocatedBuffers';
+
+{ File streams }
+function CFReadStreamCreateWithFile( alloc: CFAllocatorRef; fileURL: CFURLRef ): CFReadStreamRef; external name '_CFReadStreamCreateWithFile';
+function CFWriteStreamCreateWithFile( alloc: CFAllocatorRef; fileURL: CFURLRef ): CFWriteStreamRef; external name '_CFWriteStreamCreateWithFile';
+
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+{ Property for file write streams; value should be a CFBoolean. Set to TRUE to append to a file, rather than to replace its contents }
+var kCFStreamPropertyAppendToFile: CFStringRef; external name '_kCFStreamPropertyAppendToFile'; (* attribute const *)
+{#endif}
+
+var kCFStreamPropertyFileCurrentOffset: CFStringRef; external name '_kCFStreamPropertyFileCurrentOffset'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Socket stream properties }
+
+{ Value will be a CFData containing the native handle }
+var kCFStreamPropertySocketNativeHandle: CFStringRef; external name '_kCFStreamPropertySocketNativeHandle'; (* attribute const *)
+
+{ Value will be a CFString, or NULL if unknown }
+var kCFStreamPropertySocketRemoteHostName: CFStringRef; external name '_kCFStreamPropertySocketRemoteHostName'; (* attribute const *)
+
+{ Value will be a CFNumber, or NULL if unknown }
+var kCFStreamPropertySocketRemotePortNumber: CFStringRef; external name '_kCFStreamPropertySocketRemotePortNumber'; (* attribute const *)
+
+{ Socket streams; the returned streams are paired such that they use the same socket; pass NULL if you want only the read stream or the write stream }
+procedure CFStreamCreatePairWithSocket( alloc: CFAllocatorRef; sock: CFSocketNativeHandle; var readStream: CFReadStreamRef; var writeStream: CFWriteStreamRef ); external name '_CFStreamCreatePairWithSocket';
+procedure CFStreamCreatePairWithSocketToHost( alloc: CFAllocatorRef; host: CFStringRef; port: UInt32; var readStream: CFReadStreamRef; var writeStream: CFWriteStreamRef ); external name '_CFStreamCreatePairWithSocketToHost';
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+procedure CFStreamCreatePairWithPeerSocketSignature( alloc: CFAllocatorRef; const (*var*) signature: CFSocketSignature; var readStream: CFReadStreamRef; var writeStream: CFWriteStreamRef ); external name '_CFStreamCreatePairWithPeerSocketSignature';
+{#endif}
+
+
+{ Returns the current state of the stream }
+function CFReadStreamGetStatus( stream: CFReadStreamRef ): CFStreamStatus; external name '_CFReadStreamGetStatus';
+function CFWriteStreamGetStatus( stream: CFWriteStreamRef ): CFStreamStatus; external name '_CFWriteStreamGetStatus';
+
+{ 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
+ interested. }
+function CFReadStreamGetError( stream: CFReadStreamRef ): CFStreamError; external name '_CFReadStreamGetError';
+function CFWriteStreamGetError( stream: CFWriteStreamRef ): CFStreamError; external name '_CFWriteStreamGetError';
+
+{ 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
+ 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
+ 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
+ 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
+ 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.
+ 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
+ kCFStreamCanRead event for notification of data available. }
+function CFReadStreamRead( stream: CFReadStreamRef; buffer: UnivPtr; bufferLength: CFIndex ): CFIndex; external name '_CFReadStreamRead';
+
+{ Returns a pointer to an internal buffer if possible (setting *numBytesRead
+ to the length of the returned buffer), otherwise returns NULL; guaranteed
+ to return in O(1). Bytes returned in the buffer are considered read from
+ the stream; if maxBytesToRead is greater than 0, not more than maxBytesToRead
+ will be returned. If maxBytesToRead is less than or equal to zero, as many bytes
+ as are readily available will be returned. The returned buffer is good only
+ until the next stream operation called on the stream. Caller should neither
+ change the contents of the returned buffer nor attempt to deallocate the buffer;
+ it is still owned by the stream. }
+function CFReadStreamGetBuffer( stream: CFReadStreamRef; maxBytesToRead: CFIndex; var numBytesRead: CFIndex ): UInt8Ptr; external name '_CFReadStreamGetBuffer';
+
+{ Whether the stream can currently be written to without blocking;
+ returns TRUE if it's impossible to tell without trying }
+function CFWriteStreamCanAcceptBytes( stream: CFWriteStreamRef ): Boolean; external name '_CFWriteStreamCanAcceptBytes';
+
+{ Returns the number of bytes successfully written, -1 if an error has
+ occurred, or 0 if the stream has been filled to capacity (for fixed-length
+ streams). If the stream is not full, this call will block until at least
+ one byte is written. To avoid blocking, either poll via CFWriteStreamCanAcceptBytes
+ or use the run loop and listen for the kCFStreamCanWrite event. }
+function CFWriteStreamWrite( stream: CFWriteStreamRef; buffer: UnivPtr; bufferLength: CFIndex ): CFIndex; external name '_CFWriteStreamWrite';
+
+{ 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
+ 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
+ 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;
+ 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
+ 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, you need to schedule a run loop on which that client
+ can be notified. You may schedule multiple run loops (for instance, if you are
+ using a thread pool). The client callback will be triggered via one of the scheduled
+ run loops; It is the caller's responsibility to ensure that at least one of the
+ scheduled run loops is being run.
+
+ NOTE: not all streams provide these notifications. If a stream does not support
+ asynchronous notification, CFStreamSetClient() will return NO; typically, such
+ streams will never block for device I/O (e.g. a stream on memory)
+}
+
+function CFReadStreamSetClient( stream: CFReadStreamRef; streamEvents: CFOptionFlags; clientCB: CFReadStreamClientCallBack; var clientContext: CFStreamClientContext ): Boolean; external name '_CFReadStreamSetClient';
+function CFWriteStreamSetClient( stream: CFWriteStreamRef; streamEvents: CFOptionFlags; clientCB: CFWriteStreamClientCallBack; var clientContext: CFStreamClientContext ): Boolean; external name '_CFWriteStreamSetClient';
+
+procedure CFReadStreamScheduleWithRunLoop( stream: CFReadStreamRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef ); external name '_CFReadStreamScheduleWithRunLoop';
+procedure CFWriteStreamScheduleWithRunLoop( stream: CFWriteStreamRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef ); external name '_CFWriteStreamScheduleWithRunLoop';
+
+procedure CFReadStreamUnscheduleFromRunLoop( stream: CFReadStreamRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef ); external name '_CFReadStreamUnscheduleFromRunLoop';
+procedure CFWriteStreamUnscheduleFromRunLoop( stream: CFWriteStreamRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef ); external name '_CFWriteStreamUnscheduleFromRunLoop';
+
+
+{unit CGColorSpace}
+{ CoreGraphics - CGColorSpace.h
+ * Copyright (c) 1999-2004 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{ Pascal Translation Updated: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CGColorSpaceRef = ^SInt32; { an opaque 32-bit type }
+
+type
+ TristimulusValue = array[0..2] of Float32;
+ RedGreenBlueValue = array[0..2] of Float32;
+ Single4 = array[0..3] of Float32;
+ Single9 = array[0..8] of Float32;
+
+type
+ CGColorRenderingIntent = SInt32;
+const
+ kCGRenderingIntentDefault = 0;
+ kCGRenderingIntentAbsoluteColorimetric = 1;
+ kCGRenderingIntentRelativeColorimetric = 2;
+ kCGRenderingIntentPerceptual = 3;
+ kCGRenderingIntentSaturation = 4;
+
+var kCGColorSpaceGenericGray: CFStringRef; external name '_kCGColorSpaceGenericGray'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+var kCGColorSpaceGenericRGB: CFStringRef; external name '_kCGColorSpaceGenericRGB'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+var kCGColorSpaceGenericCMYK: CFStringRef; external name '_kCGColorSpaceGenericCMYK'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ Return the CFTypeID for CGColorSpaces. }
+
+function CGColorSpaceGetTypeID: CFTypeID; external name '_CGColorSpaceGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{* Device-dependent color spaces. *}
+
+{ Create a DeviceGray colorspace. }
+
+function CGColorSpaceCreateDeviceGray: CGColorSpaceRef; external name '_CGColorSpaceCreateDeviceGray';
+
+{ Create a DeviceRGB colorspace. }
+
+function CGColorSpaceCreateDeviceRGB: CGColorSpaceRef; external name '_CGColorSpaceCreateDeviceRGB';
+
+{ Create a DeviceCMYK colorspace. }
+
+function CGColorSpaceCreateDeviceCMYK: CGColorSpaceRef; external name '_CGColorSpaceCreateDeviceCMYK';
+
+{* Device-independent color spaces. *}
+
+{ Create a calibrated gray colorspace. `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 tristimulus value, in CIE 1931 XYZ-space, of the diffuse
+ * black point. `gamma' defines the gamma for the gray component. }
+
+function CGColorSpaceCreateCalibratedGray( const (*var*) whitePoint: TristimulusValue; const (*var*) blackPoint: TristimulusValue; gamma: Float32 ): CGColorSpaceRef; external name '_CGColorSpaceCreateCalibratedGray';
+
+{ Create a calibrated RGB colorspace. `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 tristimulus value, in CIE 1931 XYZ-space, of the diffuse
+ * black point. `gamma' is an array of 3 numbers specifying the gamma for
+ * the red, green, and blue components of the color space. `matrix' is an
+ * array of 9 numbers specifying the linear interpretation of the
+ * gamma-modified RGB values of the colorspace with respect to the final
+ * XYZ representation. }
+
+function CGColorSpaceCreateCalibratedRGB( const (*var*) whitePoint: TristimulusValue; const (*var*) blackPoint: TristimulusValue; const (*var*) gamma: RedGreenBlueValue; const (*var*) matrix: Single9 ): CGColorSpaceRef; external name '_CGColorSpaceCreateCalibratedRGB';
+
+{ Create an L*a*b* colorspace. `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 tristimulus value, in CIE 1931 XYZ-space, of the diffuse black
+ * point. `range' is an array of four numbers specifying the range of valid
+ * values for the a* and b* components of the color space. }
+
+function CGColorSpaceCreateLab(const (*var*) whitePoint: TristimulusValue; const (*var*) blackPoint: TristimulusValue; const (*var*) range: Single4): CGColorSpaceRef; external name '_CGColorSpaceCreateLab';
+
+{ Create an ICC-based colorspace. `nComponents' specifies the number of
+ * color components in the color space defined by the ICC profile data.
+ * This must match the number of components actually in the ICC profile,
+ * and must be 1, 3, or 4. `range' is an array of 2*nComponents numbers
+ * specifying the minimum and maximum valid values of the corresponding
+ * color components, so that for color component k, range[2*k] <= c[k] <=
+ * range[2*k+1], where c[k] is the k'th color component. `profile' is a
+ * data provider specifying the ICC profile. `alternate' specifies an
+ * alternate colorspace to be used in case the ICC profile is not
+ * supported. It must have `nComponents' color components. If `alternate'
+ * is NULL, then the color space used will be DeviceGray, DeviceRGB, or
+ * DeviceCMYK, depending on whether `nComponents' is 1, 3, or 4,
+ * respectively. }
+
+function CGColorSpaceCreateICCBased( nComponents: size_t; {const} range: {variable-size-array} Float32Ptr; profile: CGDataProviderRef; alternate: CGColorSpaceRef ): CGColorSpaceRef; external name '_CGColorSpaceCreateICCBased';
+
+{* Special colorspaces. *}
+
+{ Create an indexed colorspace. A sample value in an indexed color space
+ * is treated as an index into the color table of the color space. `base'
+ * specifies the base color space in which the values in the color table
+ * are to be interpreted. `lastIndex' is an integer which specifies the
+ * maximum valid index value; it must be less than or equal to 255.
+ * `colorTable' is an array of m * (lastIndex + 1) bytes, where m is
+ * the number of color components in the base color space. Each byte
+ * is an unsigned integer in the range 0 to 255 that is scaled to the
+ * range of the corresponding color component in the base color space. }
+
+function CGColorSpaceCreateIndexed( baseSpace: CGColorSpaceRef; lastIndex: size_t; colorTable: UInt8Ptr ): CGColorSpaceRef; external name '_CGColorSpaceCreateIndexed';
+
+{ Create a pattern colorspace. `baseSpace' is the underlying colorspace of
+ * the pattern colorspace. For colored patterns, `baseSpace' should be
+ * NULL; for uncolored patterns, `baseSpace' specifies the colorspace of
+ * colors which will be painted through the pattern. }
+
+function CGColorSpaceCreatePattern( baseSpace: CGColorSpaceRef ): CGColorSpaceRef; external name '_CGColorSpaceCreatePattern';
+
+{ Create a CGColorSpace using `platformColorSpaceReference', a
+ * platform-specific color space reference. For MacOS X,
+ * `platformColorSpaceReference' should be a CMProfileRef. }
+
+function CGColorSpaceCreateWithPlatformColorSpace( platformColorSpaceReference: UnivPtr ): CGColorSpaceRef; external name '_CGColorSpaceCreateWithPlatformColorSpace';
+
+{ Create a colorspace using `name' as the identifier for the colorspace. }
+
+function CGColorSpaceCreateWithName( name: CFStringRef ): CGColorSpaceRef; external name '_CGColorSpaceCreateWithName'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{* Colorspace information. *}
+
+{ Return the number of color components in the colorspace `cs'. }
+
+function CGColorSpaceGetNumberOfComponents( cs: CGColorSpaceRef ): size_t; external name '_CGColorSpaceGetNumberOfComponents';
+
+{* Retaining & releasing colorspaces. *}
+
+{ Equivalent to `CFRetain(cs)'. }
+
+function CGColorSpaceRetain( cs: CGColorSpaceRef ): CGColorSpaceRef; external name '_CGColorSpaceRetain';
+
+{ Equivalent to `CFRelease(cs)'. }
+
+procedure CGColorSpaceRelease( cs: CGColorSpaceRef ); external name '_CGColorSpaceRelease';
+
+
+{* Deprecated APIs. *}
+
+{ Use "kCGColorSpaceGenericGray" instead. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGColorSpaceUserGray CFSTRP('kCGColorSpaceUserGray')}
+{$endc}
+
+{ Use "kCGColorSpaceGenericRGB" instead. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGColorSpaceUserRGB CFSTRP('kCGColorSpaceUserRGB')}
+{$endc}
+
+{ Use "kCGColorSpaceGenericCMYK" instead. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGColorSpaceUserCMYK CFSTRP('kCGColorSpaceUserCMYK')}
+{$endc}
+
+
+{unit CGEventTypes}
+{
+* CGEventTypes.h
+* CoreGraphics
+*
+* Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+*
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{
+ * The CGEventRef object may be created or copied, retained, released, and
+ * modified. The object provides an opaque representation of one low level
+ * hardware event.
+ }
+type
+ CGEventRef = ^SInt32; { an opaque 32-bit type }
+
+{
+ * Types common to both CGEvent.h and CGEventSource.h
+ }
+type
+ _CGMouseButton = SInt32;
+const
+ kCGMouseButtonLeft = 0;
+ kCGMouseButtonRight = 1;
+ kCGMouseButtonCenter = 2;
+type
+ CGMouseButton = UInt32;
+
+{
+ * The flags field includes both modifier key state at the time the event was created,
+ * as well as other event related state.
+ *
+ * Note that any bits not specified are reserved.
+ }
+type
+ _CGEventFlags = SInt32;
+(*
+Uncomment when IOKit is translated
+
+const { Masks for the bits in event flags }
+{ device-independent modifier key bits }
+ kCGEventFlagMaskAlphaShift = NX_ALPHASHIFTMASK;
+ kCGEventFlagMaskShift = NX_SHIFTMASK;
+ kCGEventFlagMaskControl = NX_CONTROLMASK;
+ kCGEventFlagMaskAlternate = NX_ALTERNATEMASK;
+ kCGEventFlagMaskCommand = NX_COMMANDMASK;
+
+ { Special key identifiers }
+ kCGEventFlagMaskHelp = NX_HELPMASK;
+ kCGEventFlagMaskSecondaryFn = NX_SECONDARYFNMASK;
+
+ { Identifies key events from numeric keypad area on extended keyboards }
+ kCGEventFlagMaskNumericPad = NX_NUMERICPADMASK;
+
+ { Indicates if mouse/pen movement events are not being coalesced }
+ kCGEventFlagMaskNonCoalesced = NX_NONCOALSESCEDMASK;
+*)
+type
+ CGEventFlags = UInt64; { Flags for events }
+
+
+{
+ *
+ * The following enumeration describes all event types currently presented
+ * in this API. Apple reserves the right to extend or create new event
+ * types at any time.
+ *
+ * Notes:
+ * Tablet devices may generate mice events with embedded tablet
+ * data, or tablet pointer and proximity events. The tablet
+ * events as mouse events allow tablets to be used with programs
+ * which are not tablet-aware.
+ }
+
+{ Event types }
+type
+ _CGEventType = SInt32;
+(*
+Uncomment when IOKit is translated
+
+const
+ kCGEventNull = NX_NULLEVENT; { Placeholder; the Null Event }
+ { mouse events }
+ kCGEventLeftMouseDown = NX_LMOUSEDOWN; { left mouse-down event }
+ kCGEventLeftMouseUp = NX_LMOUSEUP; { left mouse-up event }
+ kCGEventRightMouseDown = NX_RMOUSEDOWN; { right mouse-down event }
+ kCGEventRightMouseUp = NX_RMOUSEUP; { right mouse-up event }
+ kCGEventMouseMoved = NX_MOUSEMOVED; { mouse-moved event }
+ kCGEventLeftMouseDragged = NX_LMOUSEDRAGGED; { left mouse-dragged event }
+ kCGEventRightMouseDragged = NX_RMOUSEDRAGGED; { right mouse-dragged event }
+
+ { keyboard events }
+ kCGEventKeyDown = NX_KEYDOWN; { key-down event }
+ kCGEventKeyUp = NX_KEYUP; { key-up event }
+ kCGEventFlagsChanged = NX_FLAGSCHANGED; { flags-changed (modifier keys and status) event }
+
+ { Specialized control devices }
+ kCGEventScrollWheel = NX_SCROLLWHEELMOVED; { Scroll wheel input device }
+ kCGEventTabletPointer = NX_TABLETPOINTER; { specialized tablet pointer event, in addition to tablet mouse event }
+ kCGEventTabletProximity = NX_TABLETPROXIMITY; { specialized tablet proximity event, in addition to tablet mouse event }
+ kCGEventOtherMouseDown = NX_OMOUSEDOWN; { Mouse button 2-31 down }
+ kCGEventOtherMouseUp = NX_OMOUSEUP; { Mouse button 2-31 up }
+ kCGEventOtherMouseDragged = NX_OMOUSEDRAGGED; { Drag with mouse button 2-31 down }
+*)
+
+ {
+ * Out of band types, delivered for unusual conditions
+ * These are delivered to the event tap callback to notify of unusual
+ * conditions that disable the event tap.
+ }
+const
+ kCGEventTapDisabledByTimeout = $FFFFFFFE;
+ kCGEventTapDisabledByUserInput = $FFFFFFFF;
+type
+ CGEventType = UInt32;
+
+
+type
+ CGEventTimestamp = UInt64; { Event timestamp, roughly, nanoseconds since startup }
+
+{
+ * Low level functions provide access to specialized fields of the events
+ * The fields are identified by tokens defined in this enumeration.
+ }
+type
+ _CGEventField = SInt32;
+const
+{ Additional keys and values found in mouse events, including the OtherMouse events: }
+
+ kCGMouseEventNumber = 0;
+ { Key associated with an integer encoding the mouse button event number as an integer. Matching mouse-down and mouse-up events will have the same event number. }
+
+ kCGMouseEventClickState = 1;
+ { Key associated with an integer encoding the mouse button clickState as an integer. A clickState of 1 represents a single click. A clickState of 2 represents a double-click. A clickState of 3 represents a triple-click. }
+
+ kCGMouseEventPressure = 2;
+ { Key associated with a double encoding the mouse button pressurr. The pressure value may range from 0 to 1.0, with 0 representing the mouse being up. This value is commonly set by tablet pens mimicing a mouse. }
+
+ kCGMouseEventButtonNumber = 3;
+ { Key associated with an integer representing the mouse button number. The left mouse button reports as button 0. A right mouse button reports as button 1. A middle button reports as button 2, and additional buttons report as the appropriate USB button. }
+
+ kCGMouseEventDeltaX = 4;
+ kCGMouseEventDeltaY = 5;
+ { Key associated with an integer encoding the mouse delta since the last mouse movement event. }
+
+ kCGMouseEventInstantMouser = 6;
+ { Key associated with an integer value, non-zero if the event should be ignored by the Inkwell subsystem. }
+
+ kCGMouseEventSubtype = 7;
+ {
+ * Key associated with an integer encoding the mouse event subtype as a kCFNumberIntType.
+ *
+ * Tablets may generate specially annotated mouse events,
+ * which will contain additional keys and values.
+ *
+ * Mouse events of subtype kCGEventMouseSubtypeTabletPoint may also use the tablet accessor keys.
+ * Mouse events of subtype kCGEventMouseSubtypeTabletProximity may also use the tablet proximity accessor keys.
+ }
+
+ { Additional keys and values found in keyboard events: }
+
+ kCGKeyboardEventAutorepeat = 8;
+ { Key associated with an integer, non-zero when when this is an autorepeat of a key-down, and zero otherwise. }
+
+ kCGKeyboardEventKeycode = 9;
+ { Key associated with the integer virtual keycode of the key-down or key-up event. }
+
+ kCGKeyboardEventKeyboardType = 10;
+ { Key associated with the integer representing the keyboard type identifier. }
+
+
+ { Additional keys and values found in scroll wheel events: }
+
+ kCGScrollWheelEventDeltaAxis1 = 11;
+ kCGScrollWheelEventDeltaAxis2 = 12;
+ kCGScrollWheelEventDeltaAxis3 = 13;
+ { Key associated with an integer value representing a change in scrollwheel position. }
+
+ kCGScrollWheelEventInstantMouser = 14;
+ { Key associated with an integer value, non-zero if the event should be ignored by the Inkwell subsystem. }
+
+
+ {
+ * Additional keys and values found in tablet pointer events,
+ * and in mouse events containing embedded tablet event data:
+ }
+
+ kCGTabletEventPointX = 15;
+ kCGTabletEventPointY = 16;
+ kCGTabletEventPointZ = 17;
+ { Key associated with an integer encoding the absolute X, Y, or Z tablet coordinate in tablet space at full tablet resolution. }
+
+ kCGTabletEventPointButtons = 18;
+ { Key associated with an integer encoding the tablet button state. Bit 0 is the first button, and a set bit represents a closed or pressed button. Up to 16 buttons are supported. }
+
+ kCGTabletEventPointPressure = 19;
+ { Key associated with a double encoding the tablet pen pressure. 0 represents no pressure, and 1.0 represents maximum pressure. }
+
+ kCGTabletEventTiltX = 20;
+ kCGTabletEventTiltY = 21;
+ { Key associated with a double encoding the tablet pen tilt. 0 represents no tilt, and 1.0 represents maximum tilt. }
+
+ kCGTabletEventRotation = 22;
+ { Key associated with a double encoding the tablet pen rotation. }
+
+ kCGTabletEventTangentialPressure = 23;
+ { Key associated with a double encoding the tangential pressure on the device. 0 represents no pressure, and 1.0 represents maximum pressure. }
+
+ kCGTabletEventDeviceID = 24;
+ { Key associated with an integer encoding the system-assigned unique device ID. }
+
+ kCGTabletEventVendor1 = 25;
+ kCGTabletEventVendor2 = 26;
+ kCGTabletEventVendor3 = 27;
+ { Key associated with an integer containing vendor-specified values.}
+
+
+ {
+ * Additional keys and values found in tablet proximity events,
+ * and in mouse events containing embedded tablet proximity data:
+ }
+
+ kCGTabletProximityEventVendorID = 28;
+ { Key associated with an integer encoding the vendor-defined ID, typically the USB vendor ID. }
+
+ kCGTabletProximityEventTabletID = 29;
+ { Key associated with an integer encoding the vendor-defined tablet ID, typically the USB product ID. }
+
+ kCGTabletProximityEventPointerID = 30;
+ { Key associated with an integer encoding the vendor-defined ID of the pointing device. }
+
+ kCGTabletProximityEventDeviceID = 31;
+ { Key associated with an integer encoding the system-assigned device ID. }
+
+ kCGTabletProximityEventSystemTabletID = 32;
+ { Key associated with an integer encoding the system-assigned unique tablet ID. }
+
+ kCGTabletProximityEventVendorPointerType = 33;
+ { Key associated with an integer encoding the vendor-assigned pointer type. }
+
+ kCGTabletProximityEventVendorPointerSerialNumber = 34;
+ { Key associated with an integer encoding the vendor-defined pointer serial number. }
+
+ kCGTabletProximityEventVendorUniqueID = 35;
+ { Key associated with an integer encoding the vendor-defined unique ID. }
+
+ kCGTabletProximityEventCapabilityMask = 36;
+ { Key associated with an integer encoding the device capabilities mask. }
+
+ kCGTabletProximityEventPointerType = 37;
+ { Key associated with an integer encoding the pointer type. }
+
+ kCGTabletProximityEventEnterProximity = 38;
+ { Key associated with an integer, non-zero when pen is in proximity to the tablet, and zero when leaving the tablet. }
+
+ kCGEventTargetProcessSerialNumber = 39;
+ { Key for the event target process serial number as a 64 bit longword. }
+
+ kCGEventTargetUnixProcessID = 40;
+ { Key for the event target Unix process ID }
+
+ kCGEventSourceUnixProcessID = 41;
+ { Key for the event source, or poster's Unix process ID }
+
+ kCGEventSourceUserData = 42;
+ { Key for the event source user-supplied data, up to 64 bits }
+
+ kCGEventSourceUserID = 43;
+ { Key for the event source Unix effective UID }
+
+ kCGEventSourceGroupID = 44;
+ { Key for the event source Unix effective GID }
+
+ kCGEventSourceStateID = 45;
+ { Key for the event source state ID used to create this event }
+type
+ CGEventField = UInt32;
+
+{ Values used with the kCGMouseEventSubtype }
+type
+ _CGEventMouseSubtype = SInt32;
+const
+ kCGEventMouseSubtypeDefault = 0;
+ kCGEventMouseSubtypeTabletPoint = 1;
+ kCGEventMouseSubtypeTabletProximity = 2;
+type
+ CGEventMouseSubtype = UInt32;
+
+{
+ * Event Taps
+ *
+ * Taps may be placed at the point where HIDSystem events enter
+ * the server, at the point where HIDSystem and remote control
+ * events enter a session, at the point where events have been
+ * annotated to flow to a specific application, or at the point
+ * where events are delivered to the application. Taps may be
+ * inserted at a specified point at the head of pre-existing filters,
+ * or appended after any pre-existing filters.
+ *
+ * Taps may be passive event listeners, or active filters.
+ * An active filter may pass an event through unmodified, modify
+ * an event, or discard an event. When a tap is registered, it
+ * identifies the set of events to be observed with a mask, and
+ * indicates if it is a passive or active event filter. Multiple
+ * event type bitmasks may be ORed together.
+ *
+ * Taps may only be placed at kCGHIDEventTap by a process running
+ * as the root user. NULL is returned for other users.
+ *
+ * Taps placed at kCGHIDEventTap, kCGSessionEventTap,
+ * kCGAnnotatedSessionEventTap, or on a specific process may
+ * only receive key up and down events if access for assistive
+ * devices is enabled (Preferences Universal Access panel,
+ * Keyboard view). If the tap is not permitted to monitor these
+ * when the tap is being created, then the appropriate bits
+ * in the mask are cleared. If that results in an empty mask,
+ * then NULL is returned.
+ *
+ * The CGEventTapProxy is an opaque reference to state within
+ * the client application associated with the tap. The tap
+ * function may pass this reference to other functions, such as
+ * the event-posting routines.
+ *
+ }
+{ Possible tapping points for events }
+type
+ _CGEventTapLocation = SInt32;
+const
+ kCGHIDEventTap = 0;
+ kCGSessionEventTap = 1;
+ kCGAnnotatedSessionEventTap = 2;
+type
+ CGEventTapLocation = UInt32;
+
+type
+ _CGEventTapPlacement = SInt32;
+const
+ kCGHeadInsertEventTap = 0;
+ kCGTailAppendEventTap = 1;
+type
+ CGEventTapPlacement = UInt32;
+
+type
+ _CGEventTapOptions = SInt32;
+const
+ kCGEventTapOptionListenOnly = $00000001;
+type
+ CGEventTapOptions = UInt32;
+
+
+type
+ CGEventMask = UInt64;
+{
+#define CGEventMaskBit(eventType) ((CGEventMask)1 << (eventType))
+}
+
+type
+ CGEventTapProxy = ^SInt32; { an opaque 32-bit type }
+
+{
+ * The callback is passed a proxy for the tap, the event type, the incoming event,
+ * and the refcon the callback was registered with.
+ * The function should return the (possibly modified) passed in event,
+ * a newly constructed event, or NULL if the event is to be deleted.
+ *
+ * The CGEventRef passed into the callback is retained by the calling code, and is
+ * released after the callback returns and the data is passed back to the event
+ * system. If a different event is returned by the callback function, then that
+ * event will be released by the calling code along with the original event, after
+ * the event data has been passed back to the event system.
+ }
+type
+ CGEventTapCallBack = function( proxy: CGEventTapProxy; typ: CGEventType; event: CGEventRef; refcon: UnivPtr ): CGEventRef;
+
+
+{
+ * When an event tap is installed or released, a notification
+ * is posted via the notify_post() API. See notify (3) and
+ * notify.h for details.
+ }
+const
+ kCGNotifyEventTapAdded = 'com.apple.coregraphics.eventTapAdded';
+const
+ kCGNotifyEventTapRemoved = 'com.apple.coregraphics.eventTapRemoved';
+
+{
+ * Structure used to report information on event taps
+ }
+type
+ CGEventTapInformationPtr = ^CGEventTapInformation;
+ CGEventTapInformation = record
+ eventTapID: UInt32;
+ tapPoint: CGEventTapLocation; { HID, session, annotated session }
+ options: CGEventTapOptions; { Listener, Filter }
+ eventsOfInterest: CGEventMask; { Mask of events being tapped }
+ tappingProcess: pid_t; { Process that is tapping events }
+ processBeingTapped: pid_t; { Zero if not a per-process tap }
+ enabled: CBool; { True if tap is enabled }
+ minUsecLatency: Float32; { Minimum latency in microseconds }
+ avgUsecLatency: Float32; { Average latency in microseconds }
+ maxUsecLatency: Float32; { Maximum latency in microseconds }
+ end;
+
+
+{
+ * The CGEventSourceRef is an opaque representation of the source of an event.
+ *
+ * API is provided to obtain the CGEventSource from an event, and to create
+ * a new event with a CGEventSourceRef.
+ }
+type
+ CGEventSourceRef = ^SInt32; { an opaque 32-bit type }
+
+type
+ CGEventSourceStateID = UInt32;
+const
+ kCGEventSourceStatePrivate = -1;
+ kCGEventSourceStateCombinedSessionState = 0;
+ kCGEventSourceStateHIDSystemState = 1;
+
+type
+ CGEventSourceKeyboardType = UInt32;
+
+const
+ kCGAnyInputEventType = $FFFFFFFF;
+
+
+{unit CGImage}
+{ CoreGraphics - CGImage.h
+ * Copyright (c) 2000-2004 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{ Pascal Translation Updated: Gale R Paeper, <gpaeper@empirenet.com>, 2007 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CGImageRef = ^SInt32; { an opaque 32-bit type }
+
+
+type
+ CGImageAlphaInfo = SInt32;
+const
+ kCGImageAlphaNone = 0; { For example, RGB. }
+ kCGImageAlphaPremultipliedLast = 1; { For example, premultiplied RGBA }
+ kCGImageAlphaPremultipliedFirst = 2; { For example, premultiplied ARGB }
+ kCGImageAlphaLast = 3; { For example, non-premultiplied RGBA }
+ kCGImageAlphaFirst = 4; { For example, non-premultiplied ARGB }
+ kCGImageAlphaNoneSkipLast = 5; { For example, RBGX. }
+ kCGImageAlphaNoneSkipFirst = 6; { For example, XRGB. }
+ kCGImageAlphaOnly = 7; { No color data, alpha data only }
+
+const
+ kCGBitmapAlphaInfoMask = $1F;
+ kCGBitmapFloatComponents = 1 shl 8;
+
+ kCGBitmapByteOrderMask = $7000;
+ kCGBitmapByteOrder16Little = 1 shl 12;
+ kCGBitmapByteOrder32Little = 2 shl 12;
+ kCGBitmapByteOrder16Big = 3 shl 12;
+ kCGBitmapByteOrder32Big = 4 shl 12;
+type
+ CGBitmapInfo = UInt32; { Available in MAC OS X 10.4 & later. }
+
+const
+{$ifc TARGET_RT_BIG_ENDIAN}
+ kCGBitmapByteOrder16Host = kCGBitmapByteOrder16Big;
+ kCGBitmapByteOrder32Host = kCGBitmapByteOrder32Big;
+{$elsec}
+ kCGBitmapByteOrder16Host = kCGBitmapByteOrder16Little;
+ kCGBitmapByteOrder32Host = kCGBitmapByteOrder32Little;
+{$endc}
+
+{ Return the CFTypeID for CGImageRefs. }
+
+function CGImageGetTypeID: CFTypeID; external name '_CGImageGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Create an image. }
+
+function CGImageCreate( width: size_t; height: size_t; bitsPerComponent: size_t; bitsPerPixel: size_t; bytesPerRow: size_t; colorspace: CGColorSpaceRef; bitmapInfo: CGBitmapInfo; provider: CGDataProviderRef; {const} decode: {variable-size-array} Float32Ptr; shouldInterpolate: CBool; intent: CGColorRenderingIntent ): CGImageRef; external name '_CGImageCreate';
+
+{ Create an image mask. }
+
+function CGImageMaskCreate( width: size_t; height: size_t; bitsPerComponent: size_t; bitsPerPixel: size_t; bytesPerRow: size_t; provider: CGDataProviderRef; {const} decode: {variable-size-array} Float32Ptr; shouldInterpolate: CBool ): CGImageRef; external name '_CGImageMaskCreate';
+
+{ Return a copy of `image'. Only the image structure itself is copied; the
+ * underlying data is not. }
+
+function CGImageCreateCopy( image: CGImageRef ): CGImageRef; external name '_CGImageCreateCopy';
+
+{ Create an image from `source', a data provider of JPEG-encoded data. }
+
+function CGImageCreateWithJPEGDataProvider( source: CGDataProviderRef; {const} decode: {variable-size-array} Float32Ptr; shouldInterpolate: CBool; intent: CGColorRenderingIntent ): CGImageRef; external name '_CGImageCreateWithJPEGDataProvider'; (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{ Create an image using `source', a data provider for PNG-encoded data. }
+
+function CGImageCreateWithPNGDataProvider( source: CGDataProviderRef; {const} decode: {variable-size-array} Float32Ptr; shouldInterpolate: CBool; intent: CGColorRenderingIntent ): CGImageRef; external name '_CGImageCreateWithPNGDataProvider'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Create an image using the data contained within the subrectangle `rect'
+ * of `image'.
+ *
+ * The new image is created by
+ * 1) adjusting `rect' to integral bounds by calling "CGRectIntegral";
+ * 2) intersecting the result with a rectangle with origin (0, 0) and
+ * size equal to the size of `image';
+ * 3) referencing the pixels within the resulting rectangle, treating the
+ * first pixel of the image data as the origin of the image.
+ * If the resulting rectangle is the null rectangle, this function returns
+ * NULL.
+ *
+ * If W and H are the width and height of image, respectively, then the
+ * point (0,0) corresponds to the first pixel of the image data; the point
+ * (W-1, 0) is the last pixel of the first row of the image data; (0, H-1)
+ * is the first pixel of the last row of the image data; and (W-1, H-1) is
+ * the last pixel of the last row of the image data.
+ *
+ * The resulting image retains a reference to the original image, so you
+ * may release the original image after calling this function. }
+
+function CGImageCreateWithImageInRect( image: CGImageRef; rect: CGRect ): CGImageRef; external name '_CGImageCreateWithImageInRect'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create a new image from `image' masked by `mask', which may be an image
+ * mask or an image.
+ *
+ * If `mask' is an image mask, then it indicates which parts of the context
+ * are to be painted with the image when drawn in a context, and which are
+ * to be masked out (left unchanged). The source samples of the image mask
+ * determine which areas are painted, acting as an "inverse alpha": if the
+ * value of a source sample in the image mask is S, then the corresponding
+ * region in `image' is blended with the destination using an alpha of
+ * (1-S). (For example, if S is 1, then the region is not painted, while
+ * if S is 0, the region is fully painted.)
+ *
+ * If `mask' is an image, then it serves as alpha mask for blending the
+ * image onto the destination. The source samples of `mask' determine
+ * which areas are painted: if the value of the source sample in mask is S,
+ * then the corresponding region in image is blended with the destination
+ * with an alpha of S. (For example, if S is 0, then the region is not
+ * painted, while if S is 1, the region is fully painted.)
+ *
+ * The parameter `image' may not be an image mask and may not have an image
+ * mask or masking color associated with it.
+ *
+ * If `mask' is an image, then it must be in the DeviceGray color space,
+ * may not have alpha, and may not itself be masked by an image mask
+ * or a masking color. }
+
+function CGImageCreateWithMask( image: CGImageRef; mask: CGImageRef ): CGImageRef; external name '_CGImageCreateWithMask'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create a new image from `image' masked by `components', an array of 2N
+ * values ( min[1], max[1], ... min[N], max[N] ) where N is the number of
+ * components in color space of `image'. Any image sample with color value
+ * (c[1], ... c[N]) where min[i] <= c[i] <= max[i] for 1 <= i <= N is
+ * masked out (that is, not painted).
+ *
+ * Each value in `components' must be a valid image sample value: if
+ * `image' has integral pixel components, then each value of must be in the
+ * range [0 .. 2**bitsPerComponent - 1] (where `bitsPerComponent' is the
+ * number of bits/component of `image'); if `image' has floating-point
+ * pixel components, then each value may be any floating-point number which
+ * is a valid color component.
+ *
+ * The parameter `image' may not be an image mask, and may not already have
+ * an image mask or masking color associated with it. }
+
+function CGImageCreateWithMaskingColors( image: CGImageRef; {const} components: {variable-size-array} Float32Ptr ): CGImageRef; external name '_CGImageCreateWithMaskingColors'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create a copy of `image', replacing the image's colorspace with
+ * `colorspace'. Returns NULL if `image' is an image mask, or if the
+ * number of components of `colorspace' isn't the same as the number of
+ * components of the colorspace of `image'. }
+
+function CGImageCreateCopyWithColorSpace( image: CGImageRef; colorspace: CGColorSpaceRef ): CGImageRef; external name '_CGImageCreateCopyWithColorSpace'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Equivalent to `CFRetain(image)'. }
+
+function CGImageRetain( image: CGImageRef ): CGImageRef; external name '_CGImageRetain';
+
+{ Equivalent to `CFRelease(image)'. }
+
+procedure CGImageRelease( image: CGImageRef ); external name '_CGImageRelease';
+
+{ Return true if `image' is an image mask, false otherwise. }
+
+function CGImageIsMask( image: CGImageRef ): CBool; external name '_CGImageIsMask';
+
+{ Return the width of `image'. }
+
+function CGImageGetWidth( image: CGImageRef ): size_t; external name '_CGImageGetWidth';
+
+{ Return the height of `image'. }
+
+function CGImageGetHeight( image: CGImageRef ): size_t; external name '_CGImageGetHeight';
+
+{ Return the number of bits/component of `image'. }
+
+function CGImageGetBitsPerComponent( image: CGImageRef ): size_t; external name '_CGImageGetBitsPerComponent';
+
+{ Return the number of bits/pixel of `image'. }
+
+function CGImageGetBitsPerPixel( image: CGImageRef ): size_t; external name '_CGImageGetBitsPerPixel';
+
+{ Return the number of bytes/row of `image'. }
+
+function CGImageGetBytesPerRow( image: CGImageRef ): size_t; external name '_CGImageGetBytesPerRow';
+
+{ Return the colorspace of `image', or NULL if `image' is an image
+ * mask. }
+
+function CGImageGetColorSpace( image: CGImageRef ): CGColorSpaceRef; external name '_CGImageGetColorSpace';
+
+{ Return the alpha info of `image'. }
+
+function CGImageGetAlphaInfo( image: CGImageRef ): CGImageAlphaInfo; external name '_CGImageGetAlphaInfo';
+
+{ Return the data provider of `image'. }
+
+function CGImageGetDataProvider( image: CGImageRef ): CGDataProviderRef; external name '_CGImageGetDataProvider';
+
+{ Return the decode array of `image'. }
+
+function CGImageGetDecode( image: CGImageRef ): Float32Ptr; external name '_CGImageGetDecode';
+
+{ Return the interpolation parameter of `image'. }
+
+function CGImageGetShouldInterpolate( image: CGImageRef ): CBool; external name '_CGImageGetShouldInterpolate';
+
+{ Return the rendering intent of `image'. }
+
+function CGImageGetRenderingIntent( image: CGImageRef ): CGColorRenderingIntent; external name '_CGImageGetRenderingIntent';
+
+{ Return the bitmap info of `image'. }
+
+function CGImageGetBitmapInfo( image: CGImageRef ): CGBitmapInfo; external name '_CGImageGetBitmapInfo'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit CGImageSource}
+{
+ * ImageIO - CGImageSource.h
+ * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CGImageSourceRef = ^SInt32; { an opaque 32-bit type }
+
+
+type
+ CGImageSourceStatus = SInt32;
+const
+ kCGImageStatusUnexpectedEOF = -5;
+ kCGImageStatusInvalidData = -4;
+ kCGImageStatusUnknownType = -3;
+ kCGImageStatusReadingHeader = -2;
+ kCGImageStatusIncomplete = -1;
+ kCGImageStatusComplete = 0;
+
+{* Keys for the options dictionary when creating a CGImageSourceRef. *}
+
+{ Specifies the "best guess" of the type identifier for the format of the
+ * image source file. If specified, the value of this key must be a
+ * CFStringRef. For more information about type identifiers, see "UTType.h"
+ * in the Application Services framework. }
+
+var kCGImageSourceTypeIdentifierHint: CFStringRef; external name '_kCGImageSourceTypeIdentifierHint'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{* Keys for the options dictionary of "CGImageSourceCopyPropertiesAtIndex"
+ ** and "CGImageSourceCreateImageAtIndex". *}
+
+{ Specifies whether the image should be cached in a decoded form. The
+ * value of this key must be a CFBooleanRef; the default value is
+ * kCFBooleanFalse. }
+
+var kCGImageSourceShouldCache: CFStringRef; external name '_kCGImageSourceShouldCache'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Specifies whether the image should be returned as a floating
+ * point CGImageRef if supported by the file format. Extended
+ * range floating point CGImageRef may require additional
+ * processing to render pleasingly. The value of this key must
+ * be a CFBooleanRef; the default value is kCFBooleanFalse. }
+
+var kCGImageSourceShouldAllowFloat: CFStringRef; external name '_kCGImageSourceShouldAllowFloat'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{* Keys for the options dictionary of
+ ** "CGImageSourceCreateThumbnailAtIndex". *}
+
+{ Specifies whether a thumbnail should be automatically created for an
+ * image if a thumbnail isn't present in the image source file. The
+ * thumbnail will be created from the full image, subject to the limit
+ * specified by kCGImageSourceThumbnailMaxPixelSize---if a maximum pixel
+ * size isn't specified, then the thumbnail will be the size of the full
+ * image, which probably isn't what you want. The value of this key must be
+ * a CFBooleanRef; the default value of this key is kCFBooleanFalse. }
+
+var kCGImageSourceCreateThumbnailFromImageIfAbsent: CFStringRef; external name '_kCGImageSourceCreateThumbnailFromImageIfAbsent'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Specifies whether a thumbnail should be created from the full image even
+ * if a thumbnail is present in the image source file. The thumbnail will
+ * be created from the full image, subject to the limit specified by
+ * kCGImageSourceThumbnailMaxPixelSize---if a maximum pixel size isn't
+ * specified, then the thumbnail will be the size of the full image, which
+ * probably isn't what you want. The value of this key must be a
+ * CFBooleanRef; the default value of this key is kCFBooleanFalse. }
+
+var kCGImageSourceCreateThumbnailFromImageAlways: CFStringRef; external name '_kCGImageSourceCreateThumbnailFromImageAlways'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Specifies the maximum width and height in pixels of a thumbnail. If
+ * this this key is not specified, the width and height of a thumbnail is
+ * not limited and thumbnails may be as big as the image itself. If
+ * present, this value of this key must be a CFNumberRef. }
+
+var kCGImageSourceThumbnailMaxPixelSize: CFStringRef; external name '_kCGImageSourceThumbnailMaxPixelSize'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Specifies whether the thumbnail should be rotated and scaled according
+ * to the orientation and pixel aspect ratio of the full image. The value
+ * of this key must be a CFBooleanRef; the default value of this key is
+ * kCFBooleanFalse. }
+
+var kCGImageSourceCreateThumbnailWithTransform: CFStringRef; external name '_kCGImageSourceCreateThumbnailWithTransform'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ Return the CFTypeID for CGImageSources. }
+
+function CGImageSourceGetTypeID: CFTypeID; external name '_CGImageSourceGetTypeID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return an array of supported type identifiers. }
+
+function CGImageSourceCopyTypeIdentifiers: CFArrayRef; external name '_CGImageSourceCopyTypeIdentifiers';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create an image source reading from the data provider `provider'. The
+ * `options' dictionary may be used to request additional creation options;
+ * see the list of keys above for more information. }
+
+function CGImageSourceCreateWithDataProvider( provider: CGDataProviderRef; options: CFDictionaryRef ): CGImageSourceRef; external name '_CGImageSourceCreateWithDataProvider';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create an image source reading from `data'. The `options' dictionary
+ * may be used to request additional creation options; see the list of keys
+ * above for more information. }
+
+function CGImageSourceCreateWithData( data: CFDataRef; options: CFDictionaryRef ): CGImageSourceRef; external name '_CGImageSourceCreateWithData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create an image source reading from `url'. The `options' dictionary may
+ * be used to request additional creation options; see the list of keys
+ * above for more information. }
+
+function CGImageSourceCreateWithURL( url: CFURLRef; options: CFDictionaryRef ): CGImageSourceRef; external name '_CGImageSourceCreateWithURL';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the type identifier of the image source `isrc'. This type is the
+ * type of the source "container", which is not necessarily the type of the
+ * image(s) in the container. For example, the .icns format supports
+ * embedded JPEG2000 but the source type will be "com.apple.icns". }
+
+function CGImageSourceGetType( isrc: CGImageSourceRef ): CFStringRef; external name '_CGImageSourceGetType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the number of images (not including thumbnails) in the image
+ * source `isrc'. }
+
+function CGImageSourceGetCount( isrc: CGImageSourceRef ): size_t; external name '_CGImageSourceGetCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the properties of the image source `isrc'. These properties
+ * apply to the container in general but not necessarily to any individual
+ * image that it contains. }
+
+function CGImageSourceCopyProperties( isrc: CGImageSourceRef; options: CFDictionaryRef ): CFDictionaryRef; external name '_CGImageSourceCopyProperties';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the properties of the image at `index' in the image source
+ * `isrc'. The index is zero-based. The `options' dictionary may be used
+ * to request additional options; see the list of keys above for more
+ * information. }
+
+function CGImageSourceCopyPropertiesAtIndex( isrc: CGImageSourceRef; index: size_t; options: CFDictionaryRef ): CFDictionaryRef; external name '_CGImageSourceCopyPropertiesAtIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the image at `index' in the image source `isrc'. The index is
+ * zero-based. The `options' dictionary may be used to request additional
+ * creation options; see the list of keys above for more information. }
+
+function CGImageSourceCreateImageAtIndex( isrc: CGImageSourceRef; index: size_t; options: CFDictionaryRef ): CGImageRef; external name '_CGImageSourceCreateImageAtIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the thumbnail of the image at `index' in the image source `isrc'.
+ * The index is zero-based. The `options' dictionary may be used to request
+ * additional thumbnail creation options; see the list of keys above for
+ * more information. }
+
+function CGImageSourceCreateThumbnailAtIndex( isrc: CGImageSourceRef; index: size_t; options: CFDictionaryRef ): CGImageRef; external name '_CGImageSourceCreateThumbnailAtIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create an incremental image source. No data is provided at creation
+ * time; it is assumed that data will eventually be provided using
+ * "CGImageSourceUpdateDataProvider" or "CGImageSourceUpdateData". The
+ * `options' dictionary may be used to request additional creation options;
+ * see the list of keys above for more information. }
+
+function CGImageSourceCreateIncremental( options: CFDictionaryRef ): CGImageSourceRef; external name '_CGImageSourceCreateIncremental';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Update the incremental image source `isrc' with new data. The new data
+ * must include all the previous data plus any additional new data. The
+ * `final' parameter should be true when the final set of data is provided;
+ * false otherwise. }
+
+procedure CGImageSourceUpdateData( isrc: CGImageSourceRef; data: CFDataRef; final: CBool ); external name '_CGImageSourceUpdateData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Update the incremental image source `isrc' with a new data provider.
+ * The new data provider must provide all the previous data plus any
+ * additional new data. The `final' parameter should be true when the final
+ * set of data is provided; false otherwise. }
+
+procedure CGImageSourceUpdateDataProvider( isrc: CGImageSourceRef; provider: CGDataProviderRef; final: CBool ); external name '_CGImageSourceUpdateDataProvider';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the overall status of the image source `isrc'. The status is
+ * particularly informative for incremental image sources, but may be used
+ * by clients providing non-incremental data as well. }
+
+function CGImageSourceGetStatus( isrc: CGImageSourceRef ): CGImageSourceStatus; external name '_CGImageSourceGetStatus';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the current status of the image at `index' in the image source
+ * `isrc'. The index is zero-based. The returned status is particularly
+ * informative for incremental image sources but may used by clients
+ * providing non-incremental data as well. }
+
+function CGImageSourceGetStatusAtIndex( isrc: CGImageSourceRef; index: size_t ): CGImageSourceStatus; external name '_CGImageSourceGetStatusAtIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit CGShading}
+{ CoreGraphics - CGShading.h
+ * Copyright (c) 2001-2002 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CGShadingRef = ^SInt32; { an opaque 32-bit type }
+
+
+{! @function CGShadingGetTypeID
+ * Return the CFTypeID for CGShadingRefs.
+ }
+
+function CGShadingGetTypeID: CFTypeID; external name '_CGShadingGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{! @function CGShadingCreateAxial
+ *
+ * Create a shading defining a color blend which varies along a linear axis
+ * between two endpoints and extends indefinitely perpendicular to that
+ * axis. The shading may optionally extend beyond either endpoint by
+ * continuing the boundary colors indefinitely.
+ *
+ * @param colorspace
+ * The colorspace in which color values are expressed.
+ * @param start
+ * The starting point of the axis, in the shading's target coordinate space.
+ * @param end
+ * The ending point of the axis, in the shading's target coordinate space.
+ * @param function
+ * A 1-in, N-out function, where N is one more (for alpha) than the
+ * number of color components in the shading's colorspace. The input
+ * value 0 corresponds to the color at the starting point of the shading;
+ * the input value 1 corresponds to the color at the ending point of the
+ * shading.
+ * @param extendStart
+ * A boolean specifying whether to extend the shading beyond the starting
+ * point of the axis.
+ * @param extendEnd
+ * A boolean specifying whether to extend the shading beyond the ending
+ * point of the axis.
+ }
+
+function CGShadingCreateAxial( colorspace: CGColorSpaceRef; start: CGPoint; finish: CGPoint; func: CGFunctionRef; extendStart: CBool; extendEnd: CBool ): CGShadingRef; external name '_CGShadingCreateAxial'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{! @function CGShadingCreateRadial
+ *
+ * Create a shading defining a color blend which varies between two
+ * circles. The shading may optionally extend beyond either circle by
+ * continuing the boundary colors.
+ *
+ * @param colorspace
+ * The colorspace in which color values are expressed.
+ * @param start
+ * The center of the starting circle, in the shading's target coordinate
+ * space.
+ * @param startRadius
+ * The radius of the starting circle, in the shading's target coordinate
+ * space.
+ * @param end
+ * The center of the ending circle, in the shading's target coordinate
+ * space.
+ * @param endRadius
+ * The radius of the ending circle, in the shading's target coordinate
+ * space.
+ * @param function
+ * A 1-in, N-out function, where N is one more (for alpha) than the
+ * number of color components in the shading's colorspace. The input
+ * value 0 corresponds to the color of the starting circle; the input
+ * value 1 corresponds to the color of the ending circle.
+ * @param extendStart
+ * A boolean specifying whether to extend the shading beyond the starting
+ * circle.
+ * @param extendEnd
+ * A boolean specifying whether to extend the shading beyond the ending
+ * circle.
+ }
+
+function CGShadingCreateRadial( colorspace: CGColorSpaceRef; start: CGPoint; startRadius: Float32; finish: CGPoint; endRadius: Float32; func: CGFunctionRef; extendStart: CBool; extendEnd: CBool ): CGShadingRef; external name '_CGShadingCreateRadial'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{! @function CGShadingRetain
+ *
+ * Equivalent to <tt>CFRetain(shading)</tt>.
+ }
+
+function CGShadingRetain( shading: CGShadingRef ): CGShadingRef; external name '_CGShadingRetain'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{! @function CGShadingRelease
+ *
+ * Equivalent to <tt>CFRelease(shading)</tt>.
+ }
+
+procedure CGShadingRelease( shading: CGShadingRef ); external name '_CGShadingRelease'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{unit CodeFragments}
+{
+ File: CodeFragments.p
+
+ Contains: Public Code Fragment Manager Interfaces.
+
+ Version: Technology: Forte CFM and Carbon
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1992-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{
+ ¥
+ ===========================================================================================
+ The Code Fragment Manager API
+ =============================
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+ ¤
+ ===========================================================================================
+ General Types and Constants
+ ===========================
+}
+
+
+const
+ kCFragResourceType = $63667267 (* 'cfrg' *);
+ kCFragResourceID = 0;
+ kCFragLibraryFileType = $73686C62 (* 'shlb' *);
+ kCFragAllFileTypes = $FFFFFFFF;
+
+
+type
+ CFragArchitecture = OSType;
+
+const
+ { Values for type CFragArchitecture. }
+ kPowerPCCFragArch = $70777063 (* 'pwpc' *);
+ kMotorola68KCFragArch = $6D36386B (* 'm68k' *);
+ kAnyCFragArch = $3F3F3F3F;
+
+
+{$ifc TARGET_CPU_PPC}
+ kCompiledCFragArch = $70777063 (* 'pwpc' *);
+{$endc}
+
+{$ifc TARGET_CPU_68K}
+ kCompiledCFragArch = $6D36386B (* 'm68k' *);
+{$endc}
+
+{$ifc TARGET_CPU_X86}
+ kCompiledCFragArch = $6E6F6E65 (* 'none' *);
+{$endc}
+
+
+type
+ CFragVersionNumber = UInt32;
+
+const
+ kNullCFragVersion = 0;
+ kWildcardCFragVersion = $FFFFFFFF;
+
+
+type
+ CFragUsage = UInt8;
+
+const
+ { Values for type CFragUsage. }
+ kImportLibraryCFrag = 0; { Standard CFM import library. }
+ kApplicationCFrag = 1; { MacOS application. }
+ kDropInAdditionCFrag = 2; { Application or library private extension/plug-in }
+ kStubLibraryCFrag = 3; { Import library used for linking only }
+ kWeakStubLibraryCFrag = 4; { Import library used for linking only and will be automatically weak linked }
+
+
+ kIsCompleteCFrag = 0; { A "base" fragment, not an update. }
+ kFirstCFragUpdate = 1; { The first update, others are numbered 2, 3, ... }
+
+
+ kCFragGoesToEOF = 0;
+
+
+type
+ CFragLocatorKind = UInt8;
+
+const
+ { Values for type CFragLocatorKind. }
+ kMemoryCFragLocator = 0; { Container is in memory. }
+ kDataForkCFragLocator = 1; { Container is in a file's data fork. }
+ kResourceCFragLocator = 2; { Container is in a file's resource fork. }
+ kNamedFragmentCFragLocator = 4; { ! Reserved for possible future use! }
+ kCFBundleCFragLocator = 5; { Container is in the executable of a CFBundle }
+ kCFBundleIntCFragLocator = 6; { passed to init routines in lieu of kCFBundleCFragLocator }
+
+
+ {
+ --------------------------------------------------------------------------------------
+ A 'cfrg' resource consists of a header followed by a sequence of variable length
+ members. The constant kDefaultCFragNameLen only provides for a legal ANSI declaration
+ and for a reasonable display in a debugger. The actual name field is cut to fit.
+ There may be "extensions" after the name, the memberSize field includes them. The
+ general form of an extension is a 16 bit type code followed by a 16 bit size in bytes.
+ Only one standard extension type is defined at present, it is used by SOM's searching
+ mechanism.
+ }
+
+
+type
+ CFragUsage1UnionPtr = ^CFragUsage1Union;
+ CFragUsage1Union = record
+ case SInt16 of
+ { ! Meaning differs depending on value of "usage". }
+ 0: (
+ appStackSize: UInt32; { If the fragment is an application. (Not used by CFM!) }
+ );
+ end;
+
+ CFragUsage2UnionPtr = ^CFragUsage2Union;
+ CFragUsage2Union = record
+ case SInt16 of
+ { ! Meaning differs depending on value of "usage". }
+ 0: (
+ appSubdirID: SInt16; { If the fragment is an application. }
+ );
+ 1: (
+ libFlags: UInt16; { If the fragment is an import library. }
+ );
+ end;
+
+
+const
+ { Bit masks for the CFragUsage2Union libFlags variant. }
+ kCFragLibUsageMapPrivatelyMask = $0001; { Put container in app heap if necessary. }
+
+
+type
+ CFragWhere1UnionPtr = ^CFragWhere1Union;
+ CFragWhere1Union = record
+ case SInt16 of
+ { ! Meaning differs depending on value of "where". }
+ 0: (
+ spaceID: UInt32; { If the fragment is in memory. (Actually an AddressSpaceID.) }
+ );
+ end;
+
+ CFragWhere2UnionPtr = ^CFragWhere2Union;
+ CFragWhere2Union = record
+ case SInt16 of
+ { ! Meaning differs depending on value of "where". }
+ 0: (
+ reserved: UInt16;
+ );
+ end;
+
+
+const
+ kDefaultCFragNameLen = 16;
+
+
+type
+ CFragResourceMemberPtr = ^CFragResourceMember;
+ CFragResourceMember = record
+ architecture: CFragArchitecture;
+ reservedA: UInt16; { ! Must be zero! }
+ reservedB: SInt8; { ! Must be zero! }
+ updateLevel: SInt8;
+ currentVersion: CFragVersionNumber;
+ oldDefVersion: CFragVersionNumber;
+ uUsage1: CFragUsage1Union;
+ uUsage2: CFragUsage2Union;
+ usage: SInt8;
+ where: SInt8;
+ offset: UInt32;
+ length: UInt32;
+ uWhere1: CFragWhere1Union;
+ uWhere2: CFragWhere2Union;
+ extensionCount: UInt16; { The number of extensions beyond the name. }
+ memberSize: UInt16; { Size in bytes, includes all extensions. }
+ name: packed array [0..15] of UInt8; { ! Actually a sized PString. }
+ end;
+
+ CFragResourceExtensionHeaderPtr = ^CFragResourceExtensionHeader;
+ CFragResourceExtensionHeader = record
+ extensionKind: UInt16;
+ extensionSize: UInt16;
+ end;
+
+ CFragResourceSearchExtensionPtr = ^CFragResourceSearchExtension;
+ CFragResourceSearchExtension = record
+ header: CFragResourceExtensionHeader;
+ libKind: OSType;
+ qualifiers: SInt8; { ! Actually four PStrings. }
+ end;
+
+
+const
+ kCFragResourceSearchExtensionKind = $30EE;
+
+
+type
+ CFragResourcePtr = ^CFragResource;
+ CFragResource = record
+ reservedA: UInt32; { ! Must be zero! }
+ reservedB: UInt32; { ! Must be zero! }
+ reservedC: UInt16; { ! Must be zero! }
+ version: UInt16;
+ reservedD: UInt32; { ! Must be zero! }
+ reservedE: UInt32; { ! Must be zero! }
+ reservedF: UInt32; { ! Must be zero! }
+ reservedG: UInt32; { ! Must be zero! }
+ reservedH: UInt16; { ! Must be zero! }
+ memberCount: UInt16;
+ firstMember: CFragResourceMember;
+ end;
+
+ CFragResourceHandle = ^CFragResourcePtr;
+
+const
+ kCurrCFragResourceVersion = 1;
+
+
+type
+ CFragContextID = MPProcessID;
+ CFragConnectionID = ^SInt32; { an opaque 32-bit type }
+ CFragConnectionIDPtr = ^CFragConnectionID; { when a var xx:CFragConnectionID parameter can be nil, it is changed to xx: CFragConnectionIDPtr }
+ CFragClosureID = ^SInt32; { an opaque 32-bit type }
+ CFragClosureIDPtr = ^CFragClosureID; { when a var xx:CFragClosureID parameter can be nil, it is changed to xx: CFragClosureIDPtr }
+ CFragContainerID = ^SInt32; { an opaque 32-bit type }
+ CFragContainerIDPtr = ^CFragContainerID; { when a var xx:CFragContainerID parameter can be nil, it is changed to xx: CFragContainerIDPtr }
+ CFragLoadOptions = OptionBits;
+ mainAddrPtr = ^Ptr; { when a var mainAddr: Ptr parameter can be nil, it is changed to mainAddr: mainAddrPtr }
+ symAddrPtr = ^Ptr; { when a var symAddr: Ptr parameter can be nil, it is changed to symAddr: symAddrPtr }
+
+const
+ { Values for type CFragLoadOptions. }
+ kReferenceCFrag = $0001; { Try to use existing copy, increment reference counts. }
+ kFindCFrag = $0002; { Try find an existing copy, do not increment reference counts. }
+ kPrivateCFragCopy = $0005; { Prepare a new private copy. (kReferenceCFrag | 0x0004) }
+
+
+ kUnresolvedCFragSymbolAddress = 0;
+
+
+type
+ CFragSymbolClass = UInt8;
+ CFragSymbolClassPtr = ^CFragSymbolClass; { when a var xx:CFragSymbolClass parameter can be nil, it is changed to xx: CFragSymbolClassPtr }
+
+const
+ { Values for type CFragSymbolClass. }
+ kCodeCFragSymbol = 0;
+ kDataCFragSymbol = 1;
+ kTVectorCFragSymbol = 2;
+ kTOCCFragSymbol = 3;
+ kGlueCFragSymbol = 4;
+
+
+ {
+ ¤
+ ===========================================================================================
+ Macros and Functions
+ ====================
+ }
+
+
+ {
+ * GetSharedLibrary()
+ *
+ * Discussion:
+ * The connID, mainAddr, and errMessage parameters may be NULL with
+ * MacOS 8.5 and later. Passing NULL as those parameters when
+ * running Mac OS 8.1 and earlier systems will corrupt low-memory.
+ *
+ * Availability:
+ * Non-Carbon CFM: in CFragManager 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetSharedLibrary(const (*var*) libName: Str63; archType: CFragArchitecture; options: CFragLoadOptions; var connID: CFragConnectionID; var mainAddr: Ptr; var errMessage: Str255): OSErr; external name '_GetSharedLibrary';
+{
+ * GetDiskFragment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CFragManager 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetDiskFragment(const (*var*) fileSpec: FSSpec; offset: UInt32; length: UInt32; fragName: ConstStringPtr; options: CFragLoadOptions; connID: CFragConnectionIDPtr; mainAddr: mainAddrPtr; errMessage: StringPtr): OSErr; external name '_GetDiskFragment';
+{
+ * GetMemFragment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CFragManager 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetMemFragment(memAddr: UnivPtr; length: UInt32; fragName: ConstStringPtr; options: CFragLoadOptions; connID: CFragConnectionIDPtr; mainAddr: mainAddrPtr; errMessage: StringPtr): OSErr; external name '_GetMemFragment';
+{
+ * CloseConnection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CFragManager 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CloseConnection(var connID: CFragConnectionID): OSErr; external name '_CloseConnection';
+{
+ * FindSymbol()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CFragManager 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FindSymbol(connID: CFragConnectionID; const (*var*) symName: Str255; symAddr: symAddrPtr; symClass: CFragSymbolClassPtr): OSErr; external name '_FindSymbol';
+{
+ * CountSymbols()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CFragManager 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CountSymbols(connID: CFragConnectionID; var symCount: SInt32): OSErr; external name '_CountSymbols';
+{
+ * GetIndSymbol()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CFragManager 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIndSymbol(connID: CFragConnectionID; symIndex: SInt32; symName: StringPtr; symAddr: symAddrPtr; symClass: CFragSymbolClassPtr): OSErr; external name '_GetIndSymbol';
+{
+ ¤
+ ===========================================================================================
+ Initialization & Termination Routines
+ =====================================
+}
+
+
+{
+ -----------------------------------------------------------------------------------------
+ A fragment's initialization and termination routines are called when a new incarnation of
+ the fragment is created or destroyed, respectively. Exactly when this occurs depends on
+ what kinds of section sharing the fragment has and how the fragment is prepared. Import
+ libraries have at most one incarnation per process. Fragments prepared with option
+ kPrivateCFragCopy may have many incarnations per process.
+ The initialization function is passed a pointer to an initialization information structure
+ and returns an OSErr. If an initialization function returns a non-zero value the entire
+ closure of which it is a part fails. The C prototype for an initialization function is:
+ OSErr CFragInitFunction ( const CFragInitBlock * initBlock );
+ The termination procedure takes no parameters and returns nothing. The C prototype for a
+ termination procedure is:
+ void CFragTermProcedure ( void );
+ Note that since the initialization and termination routines are themselves "CFM"-style
+ routines whether or not they have the "pascal" keyword is irrelevant.
+}
+
+
+{
+ -----------------------------------------------------------------------------------------
+ ! Note:
+ ! The "System7" portion of these type names was introduced during the evolution towards
+ ! the now defunct Copland version of Mac OS. Copland was to be called System 8 and there
+ ! were slightly different types for System 7 and System 8. The "generic" type names were
+ ! conditionally defined for the desired target system.
+ ! Always use the generic types, e.g. CFragInitBlock! The "System7" names have been kept
+ ! only to avoid perturbing code that (improperly) used the target specific type.
+}
+
+
+type
+ CFragSystem7MemoryLocatorPtr = ^CFragSystem7MemoryLocator;
+ CFragSystem7MemoryLocator = record
+ address: LogicalAddress;
+ length: UInt32;
+ inPlace: boolean;
+ reservedA: SInt8; { ! Must be zero! }
+ reservedB: UInt16; { ! Must be zero! }
+ end;
+
+ CFragSystem7DiskFlatLocatorPtr = ^CFragSystem7DiskFlatLocator;
+ CFragSystem7DiskFlatLocator = record
+ fileSpec: FSSpecPtr;
+ offset: UInt32;
+ length: UInt32;
+ end;
+
+ { ! This must have a file specification at the same offset as a disk flat locator! }
+ CFragSystem7SegmentedLocatorPtr = ^CFragSystem7SegmentedLocator;
+ CFragSystem7SegmentedLocator = record
+ fileSpec: FSSpecPtr;
+ rsrcType: OSType;
+ rsrcID: SInt16;
+ reservedA: UInt16; { ! Must be zero! }
+ end;
+
+ {
+ The offset and length for a "Bundle" locator refers to the offset in
+ the CFM executable contained by the bundle.
+ }
+ CFragCFBundleLocatorPtr = ^CFragCFBundleLocator;
+ CFragCFBundleLocator = record
+ fragmentBundle: CFBundleRef; { Do not call CFRelease on this bundle! }
+ offset: UInt32;
+ length: UInt32;
+ end;
+
+ CFragSystem7LocatorPtr = ^CFragSystem7Locator;
+ CFragSystem7Locator = record
+ where: SInt32;
+ case SInt16 of
+ 0: (
+ onDisk: CFragSystem7DiskFlatLocator;
+ );
+ 1: (
+ inMem: CFragSystem7MemoryLocator;
+ );
+ 2: (
+ inSegs: CFragSystem7SegmentedLocator;
+ );
+ 3: (
+ inBundle: CFragCFBundleLocator;
+ );
+ end;
+
+ CFragSystem7InitBlockPtr = ^CFragSystem7InitBlock;
+ CFragSystem7InitBlock = record
+ contextID: CFragContextID;
+ closureID: CFragClosureID;
+ connectionID: CFragConnectionID;
+ fragLocator: CFragSystem7Locator;
+ libName: StringPtr;
+ reservedA: UInt32; { ! Must be zero! }
+ end;
+
+ CFragInitBlock = CFragSystem7InitBlock;
+ CFragInitBlockPtr = ^CFragInitBlock;
+ { These init/term routine types are only of value to CFM itself. }
+{$ifc TYPED_FUNCTION_POINTERS}
+ CFragInitFunction = function(const (*var*) initBlock: CFragInitBlock): OSErr;
+{$elsec}
+ CFragInitFunction = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ CFragTermProcedure = procedure;
+{$elsec}
+ CFragTermProcedure = ProcPtr;
+{$endc}
+
+ {
+ For use by init routines. If you get a BundleIntLocator (used to be BundlePreLocator),
+ convert it to a CFBundleLocator with this. Only call this once per locator.
+ }
+ {
+ * ConvertBundlePreLocator()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ConvertBundlePreLocator(initBlockLocator: CFragSystem7LocatorPtr): OSErr; external name '_ConvertBundlePreLocator';
+
+
+{
+ ¤
+ ===========================================================================================
+ Old Name Spellings
+ ==================
+}
+
+
+{
+ -------------------------------------------------------------------------------------------
+ We've tried to reduce the risk of name collisions in the future by introducing the phrase
+ "CFrag" into constant and type names. The old names are defined below in terms of the new.
+}
+
+
+const
+ kLoadCFrag = $0001;
+
+
+{$ifc OLDROUTINENAMES}
+
+type
+ ConnectionID = CFragConnectionID;
+ LoadFlags = CFragLoadOptions;
+ SymClass = CFragSymbolClass;
+ InitBlock = CFragInitBlock;
+ InitBlockPtr = ^InitBlock;
+ MemFragment = CFragSystem7MemoryLocator;
+ MemFragmentPtr = ^MemFragment;
+ DiskFragment = CFragSystem7DiskFlatLocator;
+ DiskFragmentPtr = ^DiskFragment;
+ SegmentedFragment = CFragSystem7SegmentedLocator;
+ SegmentedFragmentPtr = ^SegmentedFragment;
+ FragmentLocator = CFragSystem7Locator;
+ FragmentLocatorPtr = ^FragmentLocator;
+ CFragHFSMemoryLocator = CFragSystem7MemoryLocator;
+ CFragHFSMemoryLocatorPtr = ^CFragHFSMemoryLocator;
+ CFragHFSDiskFlatLocator = CFragSystem7DiskFlatLocator;
+ CFragHFSDiskFlatLocatorPtr = ^CFragHFSDiskFlatLocator;
+ CFragHFSSegmentedLocator = CFragSystem7SegmentedLocator;
+ CFragHFSSegmentedLocatorPtr = ^CFragHFSSegmentedLocator;
+ CFragHFSLocator = CFragSystem7Locator;
+ CFragHFSLocatorPtr = ^CFragHFSLocator;
+
+const
+ kPowerPCArch = $70777063 (* 'pwpc' *);
+ kMotorola68KArch = $6D36386B (* 'm68k' *);
+ kAnyArchType = $3F3F3F3F;
+ kNoLibName = 0;
+ kNoConnectionID = 0;
+ kLoadLib = $0001;
+ kFindLib = $0002;
+ kNewCFragCopy = $0005;
+ kLoadNewCopy = $0005;
+ kUseInPlace = $80;
+ kCodeSym = 0;
+ kDataSym = 1;
+ kTVectSym = 2;
+ kTOCSym = 3;
+ kGlueSym = 4;
+ kInMem = 0;
+ kOnDiskFlat = 1;
+ kOnDiskSegmented = 2;
+ kIsLib = 0;
+ kIsApp = 1;
+ kIsDropIn = 2;
+ kFullLib = 0;
+ kUpdateLib = 1;
+ kWholeFork = 0;
+ kCFMRsrcType = $63667267 (* 'cfrg' *);
+ kCFMRsrcID = 0;
+ kSHLBFileType = $73686C62 (* 'shlb' *);
+ kUnresolvedSymbolAddress = 0;
+
+ kPowerPC = $70777063 (* 'pwpc' *);
+ kMotorola68K = $6D36386B (* 'm68k' *);
+
+{$endc} {OLDROUTINENAMES}
+
+
+{$ALIGN MAC68K}
+
+
+{unit DriverFamilyMatching}
+{
+ File: DriverFamilyMatching.p
+
+ Contains: Interfaces for create native drivers NDRV
+
+ Version: Universal Interfaces 3.4.2
+
+ Copyright: © 1995-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+ ##############################################
+ Well known properties in the Name Registry
+ ##############################################
+}
+{ CPassThru }
+{
+ #########################################################
+ Descriptor for Drivers and NDRVs
+ #########################################################
+}
+{
+ QuickTime 3.0: "DriverType" has a name collision with cross-platform code.
+ Use Mac prefix to avoid collision
+}
+{ Driver Typing Information Used to Match Drivers With Devices }
+
+type
+ MacDriverTypePtr = ^MacDriverType;
+ MacDriverType = record
+ nameInfoStr: Str31; { Driver Name/Info String }
+ version: NumVersion; { Driver Version Number }
+ end;
+
+{$ifc TARGET_OS_MAC}
+ DriverType = MacDriverType;
+ DriverTypePtr = ^DriverType;
+{$endc} {TARGET_OS_MAC}
+
+ { OS Runtime Information Used to Setup and Maintain a Driver's Runtime Environment }
+ RuntimeOptions = OptionBits;
+
+const
+ kDriverIsLoadedUponDiscovery = $00000001; { auto-load driver when discovered }
+ kDriverIsOpenedUponLoad = $00000002; { auto-open driver when loaded }
+ kDriverIsUnderExpertControl = $00000004; { I/O expert handles loads/opens }
+ kDriverIsConcurrent = $00000008; { supports concurrent requests }
+ kDriverQueuesIOPB = $00000010; { device manager doesn't queue IOPB }
+ kDriverIsLoadedAtBoot = $00000020; { Driver is loaded at the boot time }
+ kDriverIsForVirtualDevice = $00000040; { Driver is for a virtual Device }
+ kDriverSupportDMSuspendAndResume = $00000080; { Driver supports Device Manager Suspend and Resume command }
+
+
+type
+ DriverOSRuntimePtr = ^DriverOSRuntime;
+ DriverOSRuntime = record
+ driverRuntime: RuntimeOptions; { Options for OS Runtime }
+ driverName: Str31; { Driver's name to the OS }
+ driverDescReserved: array [0..7] of UInt32; { Reserved area }
+ end;
+
+ { OS Service Information Used To Declare What APIs a Driver Supports }
+ ServiceCount = UInt32;
+ DriverServiceInfoPtr = ^DriverServiceInfo;
+ DriverServiceInfo = record
+ serviceCategory: OSType; { Service Category Name }
+ serviceType: OSType; { Type within Category }
+ serviceVersion: NumVersion; { Version of service }
+ end;
+
+ DriverOSServicePtr = ^DriverOSService;
+ DriverOSService = record
+ nServices: ServiceCount; { Number of Services Supported }
+ service: array [0..0] of DriverServiceInfo; { The List of Services (at least one) }
+ end;
+
+ { Categories }
+
+const
+ kServiceCategoryDisplay = $64697370 (* 'disp' *); { Display Manager }
+ kServiceCategoryOpenTransport = $6F74616E (* 'otan' *); { Open Transport }
+ kServiceCategoryBlockStorage = $626C6F6B (* 'blok' *); { Block Storage }
+ kServiceCategoryNdrvDriver = $6E647276 (* 'ndrv' *); { Generic Native Driver }
+ kServiceCategoryScsiSIM = $73637369 (* 'scsi' *); { SCSI }
+ kServiceCategoryFileManager = $66696C65 (* 'file' *); { File Manager }
+ kServiceCategoryIDE = $6964652D (* 'ide-' *); { ide }
+ kServiceCategoryADB = $6164622D (* 'adb-' *); { adb }
+ kServiceCategoryPCI = $7063692D (* 'pci-' *); { pci bus }
+ { Nu Bus }
+ kServiceCategoryDFM = $64666D2D (* 'dfm-' *); { DFM }
+ kServiceCategoryMotherBoard = $6D726264 (* 'mrbd' *); { mother Board }
+ kServiceCategoryKeyboard = $6B796264 (* 'kybd' *); { Keyboard }
+ kServiceCategoryPointing = $706F6974 (* 'poit' *); { Pointing }
+ kServiceCategoryRTC = $7274632D (* 'rtc-' *); { RTC }
+ kServiceCategoryNVRAM = $6E72616D (* 'nram' *); { NVRAM }
+ kServiceCategorySound = $736F6E64 (* 'sond' *); { Sound (1/3/96 MCS) }
+ kServiceCategoryPowerMgt = $70676D74 (* 'pgmt' *); { Power Management }
+ kServiceCategoryGeneric = $67656E72 (* 'genr' *); { Generic Service Category to receive general Events }
+
+ { Ndrv ServiceCategory Types }
+ kNdrvTypeIsGeneric = $67656E72 (* 'genr' *); { generic }
+ kNdrvTypeIsVideo = $7669646F (* 'vido' *); { video }
+ kNdrvTypeIsBlockStorage = $626C6F6B (* 'blok' *); { block storage }
+ kNdrvTypeIsNetworking = $6E657477 (* 'netw' *); { networking }
+ kNdrvTypeIsSerial = $7365726C (* 'serl' *); { serial }
+ kNdrvTypeIsParallel = $7061726C (* 'parl' *); { parallel }
+ kNdrvTypeIsSound = $736F6E64 (* 'sond' *); { sound }
+ kNdrvTypeIsBusBridge = $62726467 (* 'brdg' *);
+ kNdrvTypeIsFWConference = $63727368 (* 'crsh' *); { FireWire conference camera }
+ kNdrvTypeIsAVC = $61766320 (* 'avc ' *); { FireWire AVC devices (DV cameras) }
+
+
+type
+ DriverDescVersion = UInt32;
+ DriverDescVersion_fix = DriverDescVersion; { used as field type when a record declaration contains a DriverDescVersion field identifier }
+ { The Driver Description }
+
+const
+ kTheDescriptionSignature = $6D74656A (* 'mtej' *);
+ kDriverDescriptionSignature = $70646573 (* 'pdes' *);
+
+ kInitialDriverDescriptor = 0;
+ kVersionOneDriverDescriptor = 1;
+
+
+type
+ DriverDescriptionPtr = ^DriverDescription;
+ DriverDescription = record
+ driverDescSignature: OSType; { Signature field of this structure }
+ driverDescVersion: DriverDescVersion_fix; { Version of this data structure }
+ driverType: MacDriverType; { Type of Driver }
+ driverOSRuntimeInfo: DriverOSRuntime; { OS Runtime Requirements of Driver }
+ driverServices: DriverOSService; { Apple Service API Membership }
+ end;
+
+
+{$ALIGN MAC68K}
+
+
+{unit NSLCore}
+{
+ File: NSLCore.p
+
+ Contains: Interface to API for using the NSL Manager
+
+ Version: Technology: Mac OS X
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ kNSLMinSystemVersion = $0900; { equivalent to 9.0 }
+ kNSLMinOTVersion = $0130; { equivalent to 1.3 }
+
+ kNSLDefaultListSize = 256; { default list size for service and protocol lists }
+
+ kNSLURLDelimiter = 44; { delimits URL's within memory buffers }
+
+ kNSLNoContext = 0; { the default context for NSLError structs }
+
+
+type
+ NSLErrorPtr = ^NSLError;
+ NSLError = record
+ theErr: OSStatus;
+ theContext: UInt32;
+ end;
+
+
+const
+ { Constants to use with NSLPrepareRequest }
+ { kNSLDuplicateSearchInProgress is not strictly an error. The client is free to ignore }
+ { this result, and nothing bad will happen if it does. It is }
+ { informational only. }
+ kNSLDuplicateSearchInProgress = 100;
+ kNSLUserCanceled = -128; { User hit cancel from the NSLStandardGetURL dialog }
+ { Invalid enumeratorRef }
+ kNSLInvalidEnumeratorRef = 0; { this is not an error; it is the equiv to a NULL ptr }
+
+
+type
+ NSLSearchState = UInt16;
+const
+ { State codes for notifiers. }
+ kNSLSearchStateBufferFull = 1;
+ kNSLSearchStateOnGoing = 2;
+ kNSLSearchStateComplete = 3;
+ kNSLSearchStateStalled = 4;
+ kNSLWaitingForContinue = 5;
+
+
+type
+ NSLEventCode = UInt32;
+const
+ { Event codes }
+ kNSLServicesLookupDataEvent = 6;
+ kNSLNeighborhoodLookupDataEvent = 7;
+ kNSLNewDataEvent = 8;
+ kNSLContinueLookupEvent = 9;
+
+
+type
+ NSLClientRef = UInt32;
+ NSLRequestRef = UInt32;
+ NSLOneBasedIndex = UInt32;
+ NSLPath = ^char;
+ NSLServiceType = ^char;
+ NSLServicesList = Handle;
+ NSLNeighborhood = ^UInt8;
+ {
+ cstring which is a comma delimited list of protocols which can be used to
+ create a NSLProtocolList internally
+ }
+ { the async information block for client<->manager interaction }
+ NSLClientAsyncInfoPtr = ^NSLClientAsyncInfo;
+ NSLClientAsyncInfo = record
+ clientContextPtr: Ptr; { set by the client for its own use }
+ mgrContextPtr: Ptr; { set by NSL mgr; ptr to request object ptr }
+ resultBuffer: CStringPtr;
+ bufferLen: SInt32;
+ maxBufferSize: SInt32;
+ startTime: UInt32; { when the search starts, to use with maxSearchTime to determine time-out condition }
+ intStartTime: UInt32; { used with alertInterval }
+ maxSearchTime: UInt32; { total time for search, in ticks (0 == no time limit) }
+ alertInterval: UInt32; { call client's notifier or return, every this many ticks ( 0 == don't use this param) }
+ totalItems: UInt32; { total number of tuples currently in buffer }
+ alertThreshold: UInt32; { call client's notifier or return, every this many items found ( 0 == don't use this param) }
+ searchState: NSLSearchState;
+ searchResult: NSLError;
+ searchDataType: NSLEventCode; { this is a data type code which allows the client's asyncNotifier to properly }
+ { handle the data in resultBuffer. }
+ end;
+
+ { the async information block plugin<->manager interaction }
+ NSLPluginAsyncInfoPtr = ^NSLPluginAsyncInfo;
+ NSLPluginAsyncInfo = record
+ mgrContextPtr: Ptr; { set by NSL mgr; ptr to request object ptr }
+ pluginContextPtr: Ptr; { set/used by individual plugins }
+ pluginPtr: Ptr; { ptr to the plugin object waiting for continue lookup call }
+ resultBuffer: CStringPtr; { set by plugin to point at data }
+ bufferLen: SInt32;
+ maxBufferSize: SInt32;
+ maxSearchTime: UInt32; { total time for search, in ticks (0 == no time limit) }
+ reserved1: UInt32;
+ reserved2: UInt32;
+ reserved3: UInt32;
+ clientRef: NSLClientRef;
+ requestRef: NSLRequestRef;
+ searchState: NSLSearchState;
+ searchResult: OSStatus;
+ end;
+
+ { the manager asynchronous notifier routine. }
+{$ifc TYPED_FUNCTION_POINTERS}
+ NSLMgrNotifyProcPtr = procedure(var thePluginAsyncInfo: NSLPluginAsyncInfo);
+{$elsec}
+ NSLMgrNotifyProcPtr = ProcPtr;
+{$endc}
+
+ { the client asynchronous notifier routine. }
+{$ifc TYPED_FUNCTION_POINTERS}
+ NSLClientNotifyProcPtr = procedure(var theClientAsyncInfo: NSLClientAsyncInfo);
+{$elsec}
+ NSLClientNotifyProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ NSLMgrNotifyUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ NSLMgrNotifyUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ NSLClientNotifyUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ NSLClientNotifyUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppNSLMgrNotifyProcInfo = $000000C0;
+ uppNSLClientNotifyProcInfo = $000000C0;
+ {
+ * NewNSLMgrNotifyUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewNSLMgrNotifyUPP(userRoutine: NSLMgrNotifyProcPtr): NSLMgrNotifyUPP; external name '_NewNSLMgrNotifyUPP'; { old name was NewNSLMgrNotifyProc }
+{
+ * NewNSLClientNotifyUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewNSLClientNotifyUPP(userRoutine: NSLClientNotifyProcPtr): NSLClientNotifyUPP; external name '_NewNSLClientNotifyUPP'; { old name was NewNSLClientNotifyProc }
+{
+ * DisposeNSLMgrNotifyUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeNSLMgrNotifyUPP(userUPP: NSLMgrNotifyUPP); external name '_DisposeNSLMgrNotifyUPP';
+{
+ * DisposeNSLClientNotifyUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeNSLClientNotifyUPP(userUPP: NSLClientNotifyUPP); external name '_DisposeNSLClientNotifyUPP';
+{
+ * InvokeNSLMgrNotifyUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeNSLMgrNotifyUPP(var thePluginAsyncInfo: NSLPluginAsyncInfo; userRoutine: NSLMgrNotifyUPP); external name '_InvokeNSLMgrNotifyUPP'; { old name was CallNSLMgrNotifyProc }
+{
+ * InvokeNSLClientNotifyUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeNSLClientNotifyUPP(var theClientAsyncInfo: NSLClientAsyncInfo; userRoutine: NSLClientNotifyUPP); external name '_InvokeNSLClientNotifyUPP'; { old name was CallNSLClientNotifyProc }
+{
+ this struct is a format for dealing with our internal data representation. Typed data will be contiguous chunk of
+ memory, with the first 4 bytes being a data "descriptor".
+}
+
+type
+ NSLTypedDataPtr = ^NSLTypedData;
+ NSLTypedData = record
+ dataType: UInt32;
+ lengthOfData: UInt32;
+ end;
+
+ {
+ This is just a header at the beginning of a handle that stores our list of service types.
+ Each service type is a pascal string, so each service type starts after the end of the
+ previous one.
+ }
+ NSLServicesListHeaderPtr = ^NSLServicesListHeader;
+ NSLServicesListHeader = record
+ numServices: UInt32;
+ logicalLen: UInt32; { length of all usable data in handle }
+ end;
+
+ { some defs for common protocols }
+ {
+ general information from a plug-in. Includes supported protocols, data types and services,
+ as well as an info/comment string describing the function of the plug-in in human-readable
+ form. The offsets point to the beginning of each list of data returned, and the protocol
+ data offset is the startOfData member of the struct
+ }
+ NSLPluginDataPtr = ^NSLPluginData;
+ NSLPluginData = record
+ reserved1: SInt32;
+ reserved2: SInt32;
+ reserved3: SInt32;
+ supportsRegistration: boolean;
+ isPurgeable: boolean;
+ totalLen: UInt16; { length of everything, including header }
+ dataTypeOffset: UInt16;
+ serviceListOffset: UInt16;
+ protocolListOffset: UInt16;
+ commentStringOffset: UInt16;
+ { protocol data is first on the list }
+ end;
+
+ {
+ -----------------------------------------------------------------------------
+ Finding out if the library is present and getting its version
+ -----------------------------------------------------------------------------
+ }
+
+ {
+ * NSLLibraryVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLLibraryVersion: UInt32; external name '_NSLLibraryVersion';
+
+
+{
+ NSLLibraryPresent() is a macro available only in C/C++.
+}
+{
+ -----------------------------------------------------------------------------
+ High level API calls: the following two calls are ALL an application needs
+ to register/deregister its service.
+ If you use these, you don't need to make any of the other calls to NSLAPI
+ (including NSLOpenNavigationAPI)
+ -----------------------------------------------------------------------------
+}
+
+{ <--- error code from registration }
+{ ---> urlToRegister is a null terminated url that has only legal characters defined for URLs. Use HexEncodeText to encode}
+{ portions of the url that have illegal characters }
+{ ---> neighborhoodToRegisterIn is an optional parameter for explicitly defining a neighborhood to register in.
+ If parameter is NULL, then the plugins will determine where to register the service }
+{
+ * NSLStandardRegisterURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLStandardRegisterURL(urlToRegister: NSLPath; neighborhoodToRegisterIn: NSLNeighborhood): NSLError; external name '_NSLStandardRegisterURL';
+
+{ <--- error code from registration }
+{ ---> urlToRegister is a null terminated url that has only legal characters defined for URLs. Use HexEncodeText to encode}
+{ portions of the url that have illegal characters }
+{ ---> neighborhoodToDeregisterIn is an optional parameter for explicitly defining a neighborhood to register in.
+ If parameter is NULL, then the plugins will determine where to register the service }
+{
+ * NSLStandardDeregisterURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLStandardDeregisterURL(urlToDeregister: NSLPath; neighborhoodToDeregisterIn: NSLNeighborhood): NSLError; external name '_NSLStandardDeregisterURL';
+
+
+{ ----------------------------------------------------------------------------- }
+
+{
+ * NSLHexEncodeText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLHexEncodeText(rawText: ConstCStringPtr; rawTextLen: UInt16; newTextBuffer: CStringPtr; var newTextBufferLen: UInt16; var textChanged: boolean): OSStatus; external name '_NSLHexEncodeText';
+
+{
+ * NSLHexDecodeText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLHexDecodeText(encodedText: ConstCStringPtr; encodedTextLen: UInt16; decodedTextBuffer: CStringPtr; var decodedTextBufferLen: UInt16; var textChanged: boolean): OSStatus; external name '_NSLHexDecodeText';
+
+{
+ -----------------------------------------------------------------------------
+ Basic API Utility calls: sufficient to create, and parse data structures
+ -----------------------------------------------------------------------------
+}
+
+{
+ * NSLMakeNewServicesList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLMakeNewServicesList(initialServiceList: ConstCStringPtr): NSLServicesList; external name '_NSLMakeNewServicesList';
+
+{
+ * NSLAddServiceToServicesList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLAddServiceToServicesList(serviceList: NSLServicesList; serviceType: NSLServiceType): NSLError; external name '_NSLAddServiceToServicesList';
+
+{
+ * NSLDisposeServicesList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure NSLDisposeServicesList(theList: NSLServicesList); external name '_NSLDisposeServicesList';
+
+{
+ The name reflects the name of the Neighborhood, i.e. "apple.com." or "AppleTalk Zone One".
+ The protocolList is a comma delimited list of protocols that the Neighborhood might exist in.
+ If the user passes in NULL, then all protocols will be queried. The result must be disposed
+ of by the user by calling NSLFreeNeighborhood.
+}
+{
+ * NSLMakeNewNeighborhood()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLMakeNewNeighborhood(name: ConstCStringPtr; protocolList: ConstCStringPtr): NSLNeighborhood; external name '_NSLMakeNewNeighborhood';
+
+{ creates an exact copy of an existing neighborhood }
+{
+ * NSLCopyNeighborhood()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLCopyNeighborhood(neighborhood: NSLNeighborhood): NSLNeighborhood; external name '_NSLCopyNeighborhood';
+
+{
+ * NSLFreeNeighborhood()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLFreeNeighborhood(neighborhood: NSLNeighborhood): NSLNeighborhood; external name '_NSLFreeNeighborhood';
+
+{
+ * NSLGetNameFromNeighborhood()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure NSLGetNameFromNeighborhood(neighborhood: NSLNeighborhood; var name: CStringPtr; var length: SInt32); external name '_NSLGetNameFromNeighborhood';
+
+{
+ create a block of formatted data, pointed to by newDataPtr. This will be used
+ in calls (typically request-related calls) for plug-ins that handle the NSL data type.
+}
+{
+ * NSLMakeServicesRequestPB()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLMakeServicesRequestPB(serviceList: NSLServicesList; var newDataPtr: NSLTypedDataPtr): OSStatus; external name '_NSLMakeServicesRequestPB';
+
+{ releases any storage created with MakeXXXPB calls, associated with TypedData. }
+{
+ * NSLFreeTypedDataPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLFreeTypedDataPtr(nslTypeData: NSLTypedDataPtr): NSLTypedDataPtr; external name '_NSLFreeTypedDataPtr';
+
+{
+ utility function that returns whether a url was found, a pointer to the beginning
+ of the url, and the length of the URL.
+}
+{
+ * NSLGetNextUrl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLGetNextUrl(infoPtr: NSLClientAsyncInfoPtr; var urlPtr: CStringPtr; var urlLength: SInt32): boolean; external name '_NSLGetNextUrl';
+
+{
+ utility function that returns whether a Neighborhood was found, a pointer to the beginning
+ of the Neighborhood, and the length of the Neighborhood.
+}
+{
+ * NSLGetNextNeighborhood()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLGetNextNeighborhood(infoPtr: NSLClientAsyncInfoPtr; var neighborhood: NSLNeighborhood; var neighborhoodLength: SInt32): boolean; external name '_NSLGetNextNeighborhood';
+
+
+{
+ NSLErrorToString: convert a numeric error code to its string equivalent. Caller must
+ have allocated sufficient space to store both strings. (Max 255 chars each)
+
+ The errorString parameter will return a textual explanation of what is wrong,
+ while the solutionString returns a possible solution to get around the problem
+}
+
+{
+ * NSLErrorToString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLErrorToString(theErr: NSLError; errorString: CStringPtr; solutionString: CStringPtr): OSStatus; external name '_NSLErrorToString';
+
+
+{
+ -----------------------------------------------------------------------------
+ Basic API calls: sufficient to create simple requests, and receive answers
+ -----------------------------------------------------------------------------
+}
+
+{
+ * NSLOpenNavigationAPI()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLOpenNavigationAPI(var newRef: NSLClientRef): OSStatus; external name '_NSLOpenNavigationAPI';
+
+{
+ * NSLCloseNavigationAPI()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure NSLCloseNavigationAPI(theClient: NSLClientRef); external name '_NSLCloseNavigationAPI';
+
+{
+ NSLPrepareRequest: creates an NSLRequestRef, sets up some internal data
+ notifier is an NSLClientNotifyUPP that will be called when data is available, when the lookup has
+ completed, or if an error occurs. When the notifier is called, the cookie will be the NSLRequestRef.
+ If notifier is NULL, then the NSLManager will assume that the request is made synchronously. This
+ should only be used while in a separate thread, so that the client app can still process events, etc.
+
+ contextPtr is a void* which is passed as the contextPtr argument when the notifier is called.
+
+ upon exit:
+ 1) ref will contain a pointer to a NSLRequestRef which must be passed to all other functions
+ which require a NSLRequestRef.
+ 2) infoPtr will point to a newly created ClientAsycnInfoPtr which will be disposed by the manager when the search is completed
+ NOTE: Only one search can be running at a time per clientRef.
+}
+
+{
+ * NSLPrepareRequest()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLPrepareRequest(notifier: NSLClientNotifyUPP; contextPtr: UnivPtr; theClient: NSLClientRef; var ref: NSLRequestRef; bufPtr: CStringPtr; bufLen: UInt32; var infoPtr: NSLClientAsyncInfoPtr): NSLError; external name '_NSLPrepareRequest';
+
+
+{
+ NSLStartNeighborhoodLookup: looking for neighborhoods associated with or neighboring a particular neighborhood
+ Passing in NULL for neighborhood will generate a list of a default neighborhood(s)
+
+}
+
+{
+ * NSLStartNeighborhoodLookup()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLStartNeighborhoodLookup(ref: NSLRequestRef; neighborhood: NSLNeighborhood; var asyncInfo: NSLClientAsyncInfo): NSLError; external name '_NSLStartNeighborhoodLookup';
+
+{
+ NSLStartServicesLookup: starts looking for entities if the specified type in the specified neighborhood
+
+}
+
+{
+ * NSLStartServicesLookup()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLStartServicesLookup(ref: NSLRequestRef; neighborhood: NSLNeighborhood; requestData: NSLTypedDataPtr; var asyncInfo: NSLClientAsyncInfo): NSLError; external name '_NSLStartServicesLookup';
+
+
+{ NSLContinueLookup: continues a paused/outstanding lookup }
+
+{
+ * NSLContinueLookup()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLContinueLookup(var asyncInfo: NSLClientAsyncInfo): NSLError; external name '_NSLContinueLookup';
+
+
+{ NSLCancelRequest: cancels an ongoing search }
+
+{
+ * NSLCancelRequest()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLCancelRequest(ref: NSLRequestRef): NSLError; external name '_NSLCancelRequest';
+
+{
+ NSLDeleteRequest: deletes info associated with this ref. The ClientAsyncInfoPtr will no longer be valid
+ This must be called when the client is no longer using this requestRef.
+}
+
+{
+ * NSLDeleteRequest()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLDeleteRequest(ref: NSLRequestRef): NSLError; external name '_NSLDeleteRequest';
+
+
+{
+ -----------------------------------------------------------------------------
+ Utility API calls: use these accessors to manipulate NSL's typed data
+ -----------------------------------------------------------------------------
+}
+
+{ NSLParseServicesRequestPB provides the inverse of NSLMakeRequestPB, filling out the offsets found within newDataPtr }
+{ <--- returns an OSStatus if any errors occur parsing the data }
+{ <--- newDataPtr is the construct passed to the plugin }
+{ ---> serviceListPtr is the address of a pointer which will be set to point at the portion of the newDataPtr that holds the serviceList to be searched }
+{ ---> serviceListLen is the length of the serviceListPtr data pointed to by serviceListPtr }
+{
+ * NSLParseServicesRequestPB()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLParseServicesRequestPB(newDataPtr: NSLTypedDataPtr; var serviceListPtr: CStringPtr; var serviceListLen: UInt16): OSStatus; external name '_NSLParseServicesRequestPB';
+
+
+{ NSLParseServiceRegistrationPB provides for breaking apart a registration request from a client to a plugin }
+{ <--- returns an OSStatus if any errors occur parsing the data }
+{ <--- newDataPtr is the construct passed to the plugin }
+{ ---> neighborhoodPtr gets set to point at the portion of the newDataPtr that contains the neighborhood }
+{ ---> neighborhoodLen is the length of the neighborhood pointed to by neighborhoodPtr }
+{ ---> urlPtr is the address of a pointer which will be set to point at the portion of the newDataPtr that holds the url to be registered }
+{ ---> urlLen is the length of the url data pointed to by urlPtr }
+{
+ * NSLParseServiceRegistrationPB()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLParseServiceRegistrationPB(newDataPtr: NSLTypedDataPtr; var neighborhoodPtr: NSLNeighborhood; var neighborhoodLen: UInt16; var urlPtr: CStringPtr; var urlLen: UInt16): OSStatus; external name '_NSLParseServiceRegistrationPB';
+
+{ NSLGetErrorStringsFromResource is obsolete in X. It will ignore the fileSpecPtr }
+{ and errorResID parameters and return the standard error strings. }
+{ NSLGetErrorStringsFromResource makes a basic assumption: }
+{ errorString and solutionString both point to valid memory of at least 256 bytes! }
+{ <--- returns an OSStatus if any errors occur }
+{ ---> theErr is an OSStatus to be matched against a resource list of errors }
+{ ---> fileSpecPtr is a FSSpecPtr to the resource containing the list of errors }
+{ ---> errorResID is the resourceID of the NSLI resource of the list of errors }
+{ <--> errorString is a pointer to valid memory of at least 256 bytes which will be filled out by the error portion of the error string }
+{ <--> solutionString is a pointer to valid memory of at least 256 bytes which will be filled out by the solution portion of the error string }
+{
+ * NSLGetErrorStringsFromResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLGetErrorStringsFromResource(theErr: OSStatus; const (*var*) fileSpecPtr: FSSpec; errorResID: SInt16; errorString: CStringPtr; solutionString: CStringPtr): OSStatus; external name '_NSLGetErrorStringsFromResource';
+
+{ <--- Returns true if given service is in the given service list }
+{ ---> serviceList is a valid NSLServicesList containing information about services to be searched }
+{ ---> svcToFind is an NSLServiceType of a particular service to check if it is in the serviceList }
+{
+ * NSLServiceIsInServiceList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLServiceIsInServiceList(serviceList: NSLServicesList; svcToFind: NSLServiceType): boolean; external name '_NSLServiceIsInServiceList';
+
+{ <--- returns an OSStatus if any errors occur parsing the data }
+{ ---> svcString is the address of a pointer which will be set to point at the portion of theURL that holds the serviceType of theURL }
+{ ---> svcLen is the length of the serviceType pointed to by svcString }
+{
+ * NSLGetServiceFromURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLGetServiceFromURL(theURL: CStringPtr; var svcString: CStringPtr; var svcLen: UInt16): OSStatus; external name '_NSLGetServiceFromURL';
+
+{ <--- returns the length of a Neighborhood data structure }
+{ ---> neighborhood is a valid NSLNeighborhood }
+{
+ * NSLGetNeighborhoodLength()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLGetNeighborhoodLength(neighborhood: NSLNeighborhood): SInt32; external name '_NSLGetNeighborhoodLength';
+
+{
+ -------------------------------------------------------------------------------------
+ Utility API calls: use these routines to separate plugin threads from client threads
+ -------------------------------------------------------------------------------------
+}
+
+{ this routine works the same as the Thread manager's routine NewThread, except }
+{ that the thread is added to the NSL manager's thread list. }
+{
+ * NSLNewThread()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLNewThread(threadStyle_: ThreadStyle; threadEntry: ThreadEntryProcPtr; threadParam: UnivPtr; stackSize: Size; options: ThreadOptions; var threadResult: UnivPtr; var threadMade: ThreadID): OSErr; external name '_NSLNewThread';
+
+{ this routine works the same as the Thread manager's routine DisposeThread, except }
+{ that the thread is removed from the NSL manager's thread list. }
+{
+ * NSLDisposeThread()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLDisposeThread(threadToDump: ThreadID; threadResult: UnivPtr; recycleThread: boolean): OSErr; external name '_NSLDisposeThread';
+
+
+{$ifc OLDROUTINENAMES}
+
+type
+ ClientAsyncInfo = NSLClientAsyncInfo;
+ ClientAsyncInfoPtr = ^ClientAsyncInfo;
+ PluginAsyncInfo = NSLPluginAsyncInfo;
+ PluginAsyncInfoPtr = ^PluginAsyncInfo;
+ TypedData = NSLTypedData;
+ TypedDataPtr = ^TypedData;
+ PluginData = NSLPluginData;
+ PluginDataPtr = ^PluginData;
+{$endc} {OLDROUTINENAMES}
+
+{$ALIGN MAC68K}
+
+
+{unit OpenTransportProtocol}
+{
+ File: OT/OpenTransportProtocol.h
+
+ Contains: Definitions likely to be used by low-level protocol stack implementation.
+
+ Version: OpenTransport-97~544
+
+ Copyright: © 1993-2005 by Apple Computer, Inc. and Mentat Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, November 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{ ***** Setup Default Compiler Variables *****}
+
+{
+ OTKERNEL is used to indicate whether the code is being built
+ for the kernel environment. It defaults to 0. If you include
+ "OpenTransportKernel.h" before including this file,
+ it will be 1 and you will only be able to see stuff available
+ to kernel code.
+ As we've included "OpenTransport.h" and it defaults this variable
+ to 0 if it's not already been defined, it should always be defined
+ by the time we get here. So we just assert that. Assertions in
+ header files! Cool (-:
+}
+
+{$ifc undefined OTKERNEL}
+{$setc OTKERNEL := 0}
+{$endc}
+
+{ ***** Shared Client Memory *****}
+{$ifc NOT OTKERNEL}
+{
+ These allocators allocate memory in the shared client pool,
+ which is shared between all clients and is not disposed when
+ a particular client goes away. See DTS Technote ¥¥¥
+ "Understanding Open Transport Memory Management" for details.
+}
+{
+ * OTAllocSharedClientMem()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTFreeSharedClientMem()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{$endc} { !OTKERNEL }
+
+{ ***** UNIX Types *****}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ On UNIX, uid_t and gid_t are defined to be big enough
+ to hold a user ID and group ID respectively. As Mac OS
+ has no such concepts, we just define them as UInt32 place
+ holders.
+}
+type
+ uid_t = UInt32;
+ gid_t = UInt32;
+{ Similarly, dev_t is a UNIX type for denoting a device number.}
+type
+ dev_t = UInt32;
+{ ***** From the Mentat "strstat.h" *****}
+
+{ module statistics structure }
+type
+ module_statPtr = ^module_stat;
+ module_stat = record
+ ms_pcnt: SInt32; { count of calls to put proc }
+ ms_scnt: SInt32; { count of calls to service proc }
+ ms_ocnt: SInt32; { count of calls to open proc }
+ ms_ccnt: SInt32; { count of calls to close proc }
+ ms_acnt: SInt32; { count of calls to admin proc }
+ ms_xptr: UnivPtr; { pointer to private statistics }
+ ms_xsize: SInt16; { length of private statistics buffer }
+ end;
+{ ***** From the Mentat "cred.h" *****}
+
+type
+ credPtr = ^cred;
+ cred = record
+ cr_ref: UInt16; { reference count on processes using cred structures }
+ cr_ngroups: UInt16; { number of groups in cr_groups }
+ cr_uid: uid_t; { effective user id }
+ cr_gid: gid_t; { effective group id }
+ cr_ruid: uid_t; { real user id }
+ cr_rgid: gid_t; { real group id }
+ cr_suid: uid_t; { user id saved by exec }
+ cr_sgid: gid_t; { group id saved by exec }
+ cr_groups: array [0..0] of gid_t; { supplementary groups list }
+ end;
+type
+ cred_t = cred;
+{ Free return structure for esballoc }
+type
+ FreeFuncType = procedure( var arg: char );
+ free_rtnPtr = ^free_rtn;
+ free_rtn = record
+ free_func: FreeFuncType; { Routine to call to free buffer }
+ free_arg: UnivPtr; { Parameter to free_func }
+ end;
+type
+ frtn_t = free_rtn;
+ frtn_tPtr = ^frtn_t;
+{ data descriptor }
+type
+ databPtr = ^datab;
+ datab_db_f = record
+ case SInt16 of
+ 0: (
+ freep: databPtr;
+ );
+ 1: (
+ frtnp: free_rtnPtr;
+ );
+ end;
+ datab_db_fPtr = ^datab_db_f;
+ datab = record
+ db_f: datab_db_f;
+ db_base: UInt8Ptr; { first byte of buffer }
+ db_lim: UInt8Ptr; { last byte+1 of buffer }
+ db_ref: UInt8; { count of messages pointing to block}
+ db_type: UInt8; { message type }
+ db_iswhat: UInt8; { message status }
+ db_filler2: UInt8; { for spacing }
+ db_size: UInt32; { used internally }
+ db_msgaddr: UInt8Ptr; { used internally }
+ db_filler: SInt32;
+ end;
+
+
+type
+ dblk_t = datab;
+ dblk_tPtr = ^dblk_t;
+
+{ message block }
+type
+ msgbPtr = ^msgb;
+ msgb = record
+ b_next: struct msgb *; { next message on queue }
+ b_prev: struct msgb *; { previous message on queue }
+ b_cont: struct msgb *; { next message block of message }
+ b_rptr: UInt8Ptr; { first unread data byte in buffer }
+ b_wptr: UInt8Ptr; { first unwritten data byte }
+ b_datap: databPtr; { data block }
+ b_band: UInt8; { message priority }
+ b_pad1: UInt8;
+ b_flag: UInt16;
+ end;
+type
+ mblk_t = msgb;
+ mblk_tPtr = ^mblk_t;
+{ mblk flags }
+const
+ MSGMARK = $01; { last byte of message is tagged }
+ MSGNOLOOP = $02; { don't pass message to write-side of stream }
+ MSGDELIM = $04; { message is delimited }
+ MSGNOGET = $08;
+
+{ STREAMS environments are expected to define these constants in a public header file.}
+
+const
+ STRCTLSZ = 256; { Maximum Control buffer size for messages }
+ STRMSGSZ = 8192; { Maximum # data bytes for messages }
+
+{ Message types }
+const
+ QNORM = 0;
+ M_DATA = 0; { Ordinary data }
+ M_PROTO = 1; { Internal control info and data }
+ M_BREAK = $08; { Request a driver to send a break }
+ M_PASSFP = $09; { Used to pass a file pointer }
+ M_SIG = $0B; { Requests a signal to be sent }
+ M_DELAY = $0C; { Request a real-time delay }
+ M_CTL = $0D; { For inter-module communication }
+ M_IOCTL = $0E; { Used internally for I_STR requests }
+ M_SETOPTS = $10; { Alters characteristics of Stream head }
+ M_RSE = $11; { Reserved for internal use }
+
+{ MPS private type }
+const
+ M_MI = $40;
+ M_MI_READ_RESET = 1;
+ M_MI_READ_SEEK = 2;
+ M_MI_READ_END = 4;
+
+{ Priority messages types }
+const
+ QPCTL = $80;
+ M_IOCACK = $81; { Positive ack of previous M_IOCTL }
+ M_IOCNAK = $82; { Previous M_IOCTL failed }
+ M_PCPROTO = $83; { Same as M_PROTO except for priority }
+ M_PCSIG = $84; { Priority signal }
+ M_FLUSH = $86; { Requests modules to flush queues }
+ M_STOP = $87; { Request drivers to stop output }
+ M_START = $88; { Request drivers to start output }
+ M_HANGUP = $89; { Driver can no longer produce data }
+ M_ERROR = $8A; { Reports downstream error condition }
+ M_READ = $8B; { Reports client read at Stream head }
+ M_COPYIN = $8C; { Requests the Stream to copy data in for a module }
+ M_COPYOUT = $8D; { Requests the Stream to copy data out for a module }
+ M_IOCDATA = $8E; { Status from M_COPYIN/M_COPYOUT message }
+ M_PCRSE = $90; { Reserved for internal use }
+ M_STOPI = $91; { Request drivers to stop input }
+ M_STARTI = $92; { Request drivers to start input }
+ M_HPDATA = $93; { MPS-private type; high priority data }
+
+{ Defines for flush messages }
+const
+ FLUSHALL = 1;
+ FLUSHDATA = 0;
+
+
+const
+ NOERROR = -1; { used in M_ERROR messages }
+
+type
+ sth_sPtr = ^sth_s;
+ sth_s = record
+ dummy: UInt32;
+ end;
+
+ sqh_sPtr = ^sqh_s;
+ sqh_s = record
+ dummy: UInt32;
+ end;
+
+ q_xtraPtr = ^q_xtra;
+ q_xtra = record
+ dummy: UInt32;
+ end;
+
+{$ifc OTKERNEL}
+{
+ module_info is aligned differently on 68K than
+ on PowerPC. Yucky. I can't defined a conditionalised
+ pad field because a) you can't conditionalise specific
+ fields in the interface definition language used to
+ create Universal Interfaces, and b) lots of code
+ assigns C structured constants to global variables
+ of this type, and these assignments break if you
+ add an extra field to the type. Instead, I
+ set the alignment appropriately before defining the
+ structure. The problem with doing that is that
+ the interface definition language doesn't allow
+ my to set the alignment in the middle of a file,
+ so I have to do this via "pass throughs". This
+ works fine for the well known languages (C, Pascal),
+ but may cause problems for other languages (Java,
+ Asm).
+}
+{$ALIGN POWER}
+type
+ module_info = record
+ mi_idnum: UInt16; { module ID number }
+ mi_idname: UnivPtr; { module name }
+ mi_minpsz: SInt32; { min pkt size, for developer use }
+ mi_maxpsz: SInt32; { max pkt size, for developer use }
+ mi_hiwat: UInt32; { hi-water mark, for flow control }
+ mi_lowat: UInt32; { lo-water mark, for flow control }
+ end;
+ module_infoPtr = ^module_info;
+{$ALIGN MAC68K}
+
+
+type
+ queuePtr = ^queue;
+ admin_t = function: OTInt32;
+ bufcall_t = procedure( size: SInt32 );
+ bufcallp_t = procedure( size: SInt32 );
+ closep_t = function( q: queuePtr; foo: OTInt32; var cred: cred_t ): OTInt32;
+ old_closep_t = function( q: queuePtr ): OTInt32;
+ openp_t = function( q: queuePtr; var dev: dev_t; foo: OTInt32; bar: OTInt32; var cred: cred_t ): OTInt32;
+ openOld_t = function( q: queuePtr; dev: dev_t; foo: OTInt32; bar: OTInt32 ): OTInt32;
+ old_openp_t = function( q: queuePtr; dev: dev_t; foo: OTInt32; bar: OTInt32 ): OTInt32;
+ closeOld_t = function( q: queuePtr ): OTInt32;
+ putp_t = function( q: queuePtr; var mp: msgb ): OTInt32;
+ srvp_t = function( q: queuePtr ): OTInt32;
+ qinitPtr = ^qinit;
+ qinit = record
+ qi_putp: putp_t; { put procedure }
+ qi_srvp: srvp_t; { service procedure }
+ qi_qopen: openp_t; { called on each open or a push }
+ qi_qclose: closep_t; { called on last close or a pop }
+ qi_qadmin: admin_t; { reserved for future use }
+ qi_minfo: module_infoPtr; { information structure }
+ qi_mstat: module_statPtr; { statistics structure - optional }
+ end;
+{ defines module or driver }
+ streamtabPtr = ^streamtab;
+ streamtab = record
+ st_rdinit: qinitPtr; { defines read QUEUE }
+ st_wrinit: qinitPtr; { defines write QUEUE }
+ st_muxrinit: qinitPtr; { for multiplexing drivers only }
+ st_muxwinit: qinitPtr; { ditto }
+ end;
+ qbandPtr = ^qband;
+ qband = record
+ qb_next: struct qband *; { next band for this queue }
+ qb_count: UInt32; { weighted count of characters in this band }
+ qb_first: msgbPtr; { head of message queue }
+ qb_last: msgbPtr; { tail of message queue }
+ qb_hiwat: UInt32; { high water mark }
+ qb_lowat: UInt32; { low water mark }
+ qb_flag: UInt16; { ¥¥¥Êstate }
+ qb_pad1: SInt16; { ¥¥¥ reserved }
+ end;
+ qband_t = qband;
+ qband_tPtr = ^qband_t;
+ queue_q_uPtr = ^queue_q_u;
+ queue_q_u = record
+ case SInt16 of
+ 0: (
+ q_u_link: queuePtr; { link to scheduling queue }
+ );
+ 1: (
+ q_u_sqh_parent: sqh_sPtr;
+ );
+ end;
+ queue = record
+ q_qinfo: qinitPtr; { procedures and limits for queue }
+ q_first: msgbPtr; { head of message queue }
+ q_last: msgbPtr; { tail of message queue }
+ q_next: queuePtr; { next queue in Stream }
+ q_u: queue_q_u;
+ q_ptr: UnivPtr; { to private data structure }
+ q_count: UInt32; { weighted count of characters on q }
+ q_minpsz: SInt32; { min packet size accepted }
+ q_maxpsz: SInt32; { max packet size accepted }
+ q_hiwat: UInt32; { high water mark, for flow control }
+ q_lowat: UInt32; { low water mark }
+ q_bandp: qbandPtr; { band information }
+ q_flag: UInt16; { ¥¥¥ queue state }
+ q_nband: UInt8; { ¥¥¥ number of bands }
+ q_pad1: SInt8; { ¥¥¥ reserved }
+ q_osx: q_xtraPtr; { Pointer to OS-dependent extra stuff }
+ q_ffcp: queuePtr; { Forward flow control pointer }
+ q_bfcp: queuePtr; { Backward flow control pointer }
+ end;
+ queue_t = queue;
+ queue_tPtr = ^queue_t;
+
+{ queue_t flag defines }
+const
+ QREADR = $01; { This queue is a read queue }
+ QNOENB = $02; { Don't enable in putq }
+ QFULL = $04; { The queue is full }
+ QWANTR = $08; { The queue should be scheduled in the next putq }
+ QWANTW = $10; { The stream should be back enabled when this queue drains }
+ QUSE = $20; { The queue is allocated and ready for use }
+ QENAB = $40; { The queue is scheduled (on the run queue) }
+ QBACK = $80; { The queue has been back enabled }
+ QOLD = $0100; { Module supports old style opens and closes }
+ QHLIST = $0200; { The Stream head is doing something with this queue (Not supported by MPS) }
+ QWELDED = $0400; { Mentat flag for welded queues }
+ QUNWELDING = $0800; { Queue is scheduled to be unwelded }
+ QPROTECTED = $1000; { Mentat flag for unsafe q access }
+ QEXCOPENCLOSE = $2000; { Queue wants exclusive open/close calls }
+
+{ qband_t flag defines }
+const
+ QB_FULL = $01; { The band is full }
+ QB_WANTW = $02; { The stream should be back enabled when this band/queue drains }
+ QB_BACK = $04; { The queue has been back enabled }
+
+{$elsec}
+{
+ Client code views a queue_t as a simple cookie.
+ The real definition lives above and is only available
+ to kernel code.
+}
+type
+ queue_t = SInt32;
+ queue_tPtr = ^queue_t;
+{$endc} {OTKERNEL}
+
+{ structure contained in M_COPYIN/M_COPYOUT messages }
+type
+ caddr_t = ^char;
+ copyreqPtr = ^copyreq;
+ copyreq = record
+ cq_cmd: SInt32; { ioctl command (from ioc_cmd) }
+ cq_cr: credPtr; { pointer to full credentials }
+ cq_id: UInt32; { ioctl id (from ioc_id) }
+ cq_addr: caddr_t; { address to copy data to/from }
+ cq_size: UInt32; { number of bytes to copy }
+ cq_flag: SInt32; { state }
+ cq_private: mblk_tPtr; { private state information }
+ cq_filler: array [0..3] of SInt32;
+ end;
+
+
+{ copyreq defines }
+const
+ STRCANON = $01; { b_cont data block contains canonical format specifier }
+ RECOPY = $02; { perform I_STR copyin again this time using canonical format specifier }
+
+{ structure contained in M_IOCDATA message block }
+type
+ copyrespPtr = ^copyresp;
+ copyresp = record
+ cp_cmd: SInt32; { ioctl command (from ioc_cmd) }
+ cp_cr: credPtr; { pointer to full credentials }
+ cp_id: UInt32; { ioctl id (from ioc_id) }
+ cp_rval: caddr_t; { status of request; 0 for success; error value for failure }
+ cp_pad1: UInt32;
+ cp_pad2: SInt32;
+ cp_private: mblk_tPtr; { private state information }
+ cp_filler: array [0..3] of SInt32;
+ end;
+
+{ structure contained in an M_IOCTL message block }
+type
+ iocblkPtr = ^iocblk;
+ iocblk = record
+ ioc_cmd: SInt32; { ioctl command type }
+ ioc_cr: credPtr; { pointer to full credentials }
+ ioc_id: UInt32; { ioctl id }
+ ioc_count: UInt32; { count of bytes in data field }
+ ioc_error: SInt32; { error code }
+ ioc_rval: SInt32; { return value }
+ ioc_filler: array [0..3] of SInt32;
+ end;
+
+
+const
+ TRANSPARENT = $FFFFFFFF;
+
+{ Used in M_IOCTL mblks to muxes (ioc_cmd I_LINK) }
+type
+ linkblkPtr = ^linkblk;
+ linkblk = record
+ l_qtop: queue_tPtr; { lowest level write queue of upper stream }
+ l_qbot: queue_tPtr; { highest level write queue of lower stream }
+ l_index: SInt32; { system-unique index for lower stream }
+ l_pad: array [0..4] of SInt32;
+ end;
+{ structure contained in an M_PASSFP message block }
+type
+ strpfp = record
+ pass_file_cookie: UInt32; { file 'pointer' }
+ pass_uid: UInt16; { user id of sending stream }
+ pass_gid: UInt16;
+ pass_sth: sth_sPtr; { Stream head pointer of passed stream }
+ end;
+{ structure contained in an M_SETOPTS message block }
+type
+ stroptions = packed record
+ so_flags: UInt32; { options to set }
+ so_readopt: SInt16; { read option }
+ so_wroff: UInt16; { write offset }
+ so_minpsz: SInt32; { minimum read packet size }
+ so_maxpsz: SInt32; { maximum read packet size }
+ so_hiwat: UInt32; { read queue high-water mark }
+ so_lowat: UInt32; { read queue low-water mark }
+ so_band: UInt8; { band for water marks }
+ so_filler: packed array [0..2] of UInt8; { added for alignment }
+ so_poll_set: UInt32; { poll events to set }
+ so_poll_clr: UInt32; { poll events to clear }
+ end;
+{ definitions for so_flags field }
+const
+ SO_ALL = $7FFF; { Update all options }
+ SO_READOPT = $0001; { Set the read mode }
+ SO_WROFF = $0002; { Insert an offset in write M_DATA mblks }
+ SO_MINPSZ = $0004; { Change the min packet size on sth rq }
+ SO_MAXPSZ = $0008; { Change the max packet size on sth rq }
+ SO_HIWAT = $0010; { Change the high water mark on sth rq }
+ SO_LOWAT = $0020; { Change the low water mark }
+ SO_MREADON = $0040; { Request M_READ messages }
+ SO_MREADOFF = $0080; { Don't gen M_READ messages }
+ SO_NDELON = $0100; { old TTY semantics for O_NDELAY reads and writes }
+ SO_NDELOFF = $0200; { STREAMS semantics for O_NDELAY reads and writes }
+ SO_ISTTY = $0400; { Become a controlling tty }
+ SO_ISNTTY = $0800; { No longer a controlling tty }
+ SO_TOSTOP = $1000; { Stop on background writes }
+ SO_TONSTOP = $2000; { Don't stop on background writes }
+ SO_BAND = $4000; { Water marks are for a band }
+ SO_POLL_SET = $8000; { Set events to poll }
+ SO_POLL_CLR = $00010000; { Clear events to poll }
+
+{ Buffer Allocation Priority }
+const
+ BPRI_LO = 1;
+ BPRI_MED = 2;
+ BPRI_HI = 3;
+
+const
+ INFPSZ = -1;
+
+
+{* Test whether message is a data message }
+// #define datamsg(type) ((type) == M_DATA || (type) == M_PROTO || (type) == M_PCPROTO || (type) == M_DELAY)
+
+const
+ CLONEOPEN = $02;
+ MODOPEN = $01;
+ OPENFAIL = -1;
+
+
+{ Enumeration values for strqget and strqset }
+type
+ qfields = SInt32;
+const
+ QHIWAT = 0;
+ QLOWAT = 1;
+ QMAXPSZ = 2;
+ QMINPSZ = 3;
+ QCOUNT = 4;
+ QFIRST = 5;
+ QLAST = 6;
+ QFLAG = 7;
+ QBAD = 8;
+
+
+type
+ qfields_t = qfields;
+{$endc} { CALL_NOT_IN_CARBON }
+
+{ ***** From the Mentat "stropts.h" *****}
+
+
+const
+ I_NREAD = $4101; { return the number of bytes in 1st msg }
+ I_PUSH = $4102; { push module just below stream head }
+ I_POP = $4103; { pop module below stream head }
+ I_LOOK = $4104; { retrieve name of first stream module }
+ I_FLUSH = $4105; { flush all input and/or output queues }
+ I_SRDOPT = $4106; { set the read mode }
+ I_GRDOPT = $4107; { get the current read mode }
+ I_STR = $4108; { create an internal ioctl message }
+ I_SETSIG = $4109; { request SIGPOLL signal on events }
+ I_GETSIG = $410A; { query the registered events }
+ I_FIND = $410B; { check for module in stream }
+ I_LINK = $410C; { connect stream under mux fd }
+ I_UNLINK = $410D; { disconnect two streams }
+ I_PEEK = $410F; { peek at data on read queue }
+ I_FDINSERT = $4110; { create a message and send downstream }
+ I_SENDFD = $4111; { send an fd to a connected pipe stream }
+ I_RECVFD = $4112; { retrieve a file descriptor }
+ I_FLUSHBAND = $4113; { flush a particular input and/or output band }
+ I_SWROPT = $4114; { set the write mode }
+ I_GWROPT = $4115; { get the current write mode }
+ I_LIST = $4116; { get a list of all modules on a stream }
+ I_ATMARK = $4117; { check to see if the next message is "marked" }
+ I_CKBAND = $4118; { check for a message of a particular band }
+ I_GETBAND = $4119; { get the band of the next message to be read }
+ I_CANPUT = $411A; { check to see if a message may be passed on a stream }
+ I_SETCLTIME = $411B; { set the close timeout wait }
+ I_GETCLTIME = $411C; { get the current close timeout wait }
+ I_PLINK = $411D; { permanently connect a stream under a mux }
+ I_PUNLINK = $411E; { disconnect a permanent link }
+ I_GETMSG = $4128; { getmsg() system call }
+ I_PUTMSG = $4129; { putmsg() system call }
+ I_POLL = $412A; { poll() system call }
+ I_SETDELAY = $412B; { set blocking status }
+ I_GETDELAY = $412C; { get blocking status }
+ I_RUN_QUEUES = $412D; { sacrifice for the greater good }
+ I_GETPMSG = $412E; { getpmsg() system call }
+ I_PUTPMSG = $412F; { putpmsg() system call }
+ I_AUTOPUSH = $4130; { for systems that cannot do the autopush in open }
+ I_PIPE = $4131; { for pipe library call }
+ I_HEAP_REPORT = $4132; { get heap statistics }
+ I_FIFO = $4133; { for fifo library call }
+
+{ priority message request on putmsg() or strpeek }
+const
+ RS_HIPRI = $01;
+
+{ flags for getpmsg and putpmsg }
+const
+ MSG_HIPRI = $01;
+ MSG_BAND = $02; { Retrieve a message from a particular band }
+ MSG_ANY = $04; { Retrieve a message from any band }
+
+{ return values from getmsg(), 0 indicates all ok }
+const
+ MORECTL = $01; { more control info available }
+ MOREDATA = $02; { more data available }
+
+
+const
+ FMNAMESZ = 31; { maximum length of a module or device name }
+
+
+{ Infinite poll wait time }
+const
+ INFTIM = $FFFFFFFF;
+
+{ flush requests }
+const
+ FLUSHR = $01; { Flush the read queue }
+ FLUSHW = $02; { Flush the write queue }
+ FLUSHRW = FLUSHW or FLUSHR; { Flush both }
+
+const
+ FLUSHBAND = $40; { Flush a particular band }
+
+{
+ Mentat's code does an #ifdef on this symbol, so we have to #define
+ it as well as declare it as an enum. But only for Apple builds because
+ we don't want internal weirdness to propagate to developers.
+}
+// #define FLUSHBAND FLUSHBAND
+{ I_FLUSHBAND }
+type
+ bandinfoPtr = ^bandinfo;
+ bandinfo = record
+ bi_pri: SInt8; { Band to flush }
+ pad1: SInt8;
+ bi_flag: SInt32; { One of the above flush requests }
+ end;
+{ flags for I_ATMARK }
+const
+ ANYMARK = $01; { Check if message is marked }
+ LASTMARK = $02; { Check if this is the only message marked }
+
+{ signal event masks }
+const
+ S_INPUT = $01; { A non-M_PCPROTO message has arrived }
+ S_HIPRI = $02; { A priority (M_PCPROTO) message is available }
+ S_OUTPUT = $04; { The write queue is no longer full }
+ S_MSG = $08; { A signal message has reached the front of read queue }
+ S_RDNORM = $10; { A non-priority message is available }
+ S_RDBAND = $20; { A banded messsage is available }
+ S_WRNORM = $40; { Same as S_OUTPUT }
+ S_WRBAND = $80; { A priority band exists and is writable }
+ S_ERROR = $0100; { Error message has arrived }
+ S_HANGUP = $0200; { Hangup message has arrived }
+ S_BANDURG = $0400; { Use SIGURG instead of SIGPOLL on S_RDBAND signals }
+
+{ read mode bits for I_S|GRDOPT; choose one of the following }
+const
+ RNORM = $01; { byte-stream mode, default }
+ RMSGD = $02; { message-discard mode }
+ RMSGN = $04; { message-nondiscard mode }
+ RFILL = $08; { fill read buffer mode (PSE private) }
+
+{ More read modes, these are bitwise or'ed with the modes above }
+const
+ RPROTNORM = $10; { Normal handling of M_PROTO/M_PCPROTO messages, default }
+ RPROTDIS = $20; { Discard M_PROTO/M_PCPROTO message blocks }
+ RPROTDAT = $40; { Convert M_PROTO/M_PCPROTO message blocks into M_DATA }
+
+{ write modes for I_S|GWROPT }
+const
+ SNDZERO = $01; { Send a zero-length message downstream on a write of zero bytes }
+
+const
+ MUXID_ALL = -1; { Unlink all lower streams for I_UNLINK and I_PUNLINK }
+
+{
+ strbuf is moved to "OpenTransport.h" because that header file
+ exports provider routines that take it as a parameter.
+}
+
+{ structure of ioctl data on I_FDINSERT }
+type
+ strfdinsertPtr = ^strfdinsert;
+ strfdinsert = record
+ ctlbuf: strbuf;
+ databuf: strbuf;
+ flags: SInt32; { type of message, 0 or RS_HIPRI }
+ fildes: SInt32; { fd of other stream (FDCELL) }
+ offset: SInt32; { where to put other stream read qp }
+ end;
+{ I_LIST structures }
+type
+ str_mlistPtr = ^str_mlist;
+ str_mlist = record
+ l_name: packed array [0..31] of char;
+ end;
+type
+ str_listPtr = ^str_list;
+ str_list = record
+ sl_nmods: SInt32; { number of modules in sl_modlist array }
+ sl_modlist: str_mlistPtr;
+ end;
+{ I_PEEK structure }
+type
+ strpeekPtr = ^strpeek;
+ strpeek = record
+ ctlbuf: strbuf;
+ databuf: strbuf;
+ flags: SInt32; { if RS_HIPRI, get priority messages only }
+ end;
+{ structure for getpmsg and putpmsg }
+type
+ strpmsgPtr = ^strpmsg;
+ strpmsg = record
+ ctlbuf: strbuf;
+ databuf: strbuf;
+ band: SInt32;
+ flags: SInt32;
+ end;
+{ structure of ioctl data on I_RECVFD }
+type
+ strrecvfdPtr = ^strrecvfd;
+ strrecvfd = record
+ fd: SInt32; { new file descriptor (FDCELL) }
+ uid: UInt16; { user id of sending stream }
+ gid: UInt16;
+ fill: packed array [0..7] of char;
+ end;
+{ structure of ioctl data on I_STR }
+type
+ strioctlPtr = ^strioctl;
+ strioctl = record
+ ic_cmd: SInt32; { downstream command }
+ ic_timout: SInt32; { ACK/NAK timeout }
+ ic_len: SInt32; { length of data arg }
+ ic_dp: UnivPtr; { ptr to data arg }
+ end;
+{ ***** From the Mentat "strlog.h" *****}
+
+type
+ log_ctlPtr = ^log_ctl;
+ log_ctl = record
+ mid: SInt16;
+ sid: SInt16;
+ level: SInt8;
+ pad1: SInt8;
+ flags: SInt16;
+ ltime: SInt32;
+ ttime: SInt32;
+ seq_no: SInt32;
+ end;
+const
+ SL_FATAL = $01; { Fatal error }
+ SL_NOTIFY = $02; { Notify the system administrator }
+ SL_ERROR = $04; { Pass message to error logger }
+ SL_TRACE = $08; { Pass message to tracer }
+ SL_CONSOLE = $00; { Console messages are disabled }
+ SL_WARN = $20; { Warning }
+ SL_NOTE = $40; { Notice this message }
+
+type
+ trace_idsPtr = ^trace_ids;
+ trace_ids = record
+ ti_mid: SInt16;
+ ti_sid: SInt16;
+ ti_level: char;
+ end;
+const
+ I_TRCLOG = $6201;
+ I_ERRLOG = $6202;
+
+const
+ LOGMSGSZ = 128;
+
+{ ***** From the Mentat "tihdr.h" *****}
+
+{$ifc CALL_NOT_IN_CARBON}
+
+{ TPI Primitives}
+
+
+const
+ T_BIND_REQ = 101;
+ T_CONN_REQ = 102; { connection request }
+ T_CONN_RES = 103; { respond to connection indication }
+ T_DATA_REQ = 104;
+ T_DISCON_REQ = 105;
+ T_EXDATA_REQ = 106;
+ T_INFO_REQ = 107;
+ T_OPTMGMT_REQ = 108;
+ T_ORDREL_REQ = 109;
+ T_UNBIND_REQ = 110;
+ T_UNITDATA_REQ = 111;
+ T_ADDR_REQ = 112; { Get address request }
+ T_UREQUEST_REQ = 113; { UnitRequest (transaction) req }
+ T_REQUEST_REQ = 114; { Request (CO transaction) req }
+ T_UREPLY_REQ = 115; { UnitRequest (transaction) req }
+ T_REPLY_REQ = 116; { REPLY (CO transaction) req }
+ T_CANCELREQUEST_REQ = 117; { Cancel outgoing request }
+ T_CANCELREPLY_REQ = 118; { Cancel incoming request }
+ T_REGNAME_REQ = 119; { Request name registration }
+ T_DELNAME_REQ = 120; { Request delete name registration }
+ T_LKUPNAME_REQ = 121; { Request name lookup }
+
+ T_BIND_ACK = 122;
+ T_CONN_CON = 123; { connection confirmation }
+ T_CONN_IND = 124; { incoming connection indication }
+ T_DATA_IND = 125;
+ T_DISCON_IND = 126;
+ T_ERROR_ACK = 127;
+ T_EXDATA_IND = 128;
+ T_INFO_ACK = 129;
+ T_OK_ACK = 130;
+ T_OPTMGMT_ACK = 131;
+ T_ORDREL_IND = 132;
+ T_UNITDATA_IND = 133;
+ T_UDERROR_IND = 134;
+ T_ADDR_ACK = 135; { Get address ack }
+ T_UREQUEST_IND = 136; { UnitRequest (transaction) ind }
+ T_REQUEST_IND = 137; { Request (CO transaction) ind }
+ T_UREPLY_IND = 138; { Incoming unit reply }
+ T_REPLY_IND = 139; { Incoming reply }
+ T_UREPLY_ACK = 140; { outgoing Unit Reply is complete }
+ T_REPLY_ACK = 141; { outgoing Reply is complete }
+ T_RESOLVEADDR_REQ = 142;
+ T_RESOLVEADDR_ACK = 143;
+ T_LKUPNAME_CON = 146; { Results of name lookup }
+ T_LKUPNAME_RES = 147; { Partial results of name lookup }
+ T_REGNAME_ACK = 148; { Request name registration }
+ T_SEQUENCED_ACK = 149; { Sequenced version of OK or ERROR ACK }
+
+ T_EVENT_IND = 160; { Miscellaneous event Indication }
+
+{ State values }
+const
+ TS_UNBND = 1;
+ TS_WACK_BREQ = 2;
+ TS_WACK_UREQ = 3;
+ TS_IDLE = 4;
+ TS_WACK_OPTREQ = 5;
+ TS_WACK_CREQ = 6;
+ TS_WCON_CREQ = 7;
+ TS_WRES_CIND = 8;
+ TS_WACK_CRES = 9;
+ TS_DATA_XFER = 10;
+ TS_WIND_ORDREL = 11;
+ TS_WREQ_ORDREL = 12;
+ TS_WACK_DREQ6 = 13;
+ TS_WACK_DREQ7 = 14;
+ TS_WACK_DREQ9 = 15;
+ TS_WACK_DREQ10 = 16;
+ TS_WACK_DREQ11 = 17;
+ TS_WACK_ORDREL = 18;
+ TS_NOSTATES = 19;
+ TS_BAD_STATE = 19;
+
+{ Transport events }
+const
+ TE_OPENED = 1;
+ TE_BIND = 2;
+ TE_OPTMGMT = 3;
+ TE_UNBIND = 4;
+ TE_CLOSED = 5;
+ TE_CONNECT1 = 6;
+ TE_CONNECT2 = 7;
+ TE_ACCEPT1 = 8;
+ TE_ACCEPT2 = 9;
+ TE_ACCEPT3 = 10;
+ TE_SND = 11;
+ TE_SNDDIS1 = 12;
+ TE_SNDDIS2 = 13;
+ TE_SNDREL = 14;
+ TE_SNDUDATA = 15;
+ TE_LISTEN = 16;
+ TE_RCVCONNECT = 17;
+ TE_RCV = 18;
+ TE_RCVDIS1 = 19;
+ TE_RCVDIS2 = 20;
+ TE_RCVDIS3 = 21;
+ TE_RCVREL = 22;
+ TE_RCVUDATA = 23;
+ TE_RCVUDERR = 24;
+ TE_PASS_CONN = 25;
+ TE_BAD_EVENT = 26;
+
+type
+ T_addr_ackPtr = ^T_addr_ack;
+ T_addr_ack = record
+ PRIM_type: SInt32; { Always T_ADDR_ACK }
+ LOCADDR_length: SInt32;
+ LOCADDR_offset: SInt32;
+ REMADDR_length: SInt32;
+ REMADDR_offset: SInt32;
+ end;
+type
+ T_addr_reqPtr = ^T_addr_req;
+ T_addr_req = record
+ PRIM_type: SInt32; { Always T_ADDR_REQ }
+ end;
+type
+ T_bind_ackPtr = ^T_bind_ack;
+ T_bind_ack = record
+ PRIM_type: SInt32; { always T_BIND_ACK }
+ ADDR_length: SInt32;
+ ADDR_offset: SInt32;
+ CONIND_number: UInt32;
+ end;
+type
+ T_bind_reqPtr = ^T_bind_req;
+ T_bind_req = record
+ PRIM_type: SInt32; { always T_BIND_REQ }
+ ADDR_length: SInt32;
+ ADDR_offset: SInt32;
+ CONIND_number: UInt32;
+ end;
+type
+ T_conn_conPtr = ^T_conn_con;
+ T_conn_con = record
+ PRIM_type: SInt32; { always T_CONN_CON }
+ RES_length: SInt32; { responding address length }
+ RES_offset: SInt32;
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ end;
+type
+ T_conn_indPtr = ^T_conn_ind;
+ T_conn_ind = record
+ PRIM_type: SInt32; { always T_CONN_IND }
+ SRC_length: SInt32;
+ SRC_offset: SInt32;
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ SEQ_number: SInt32;
+ end;
+type
+ T_conn_reqPtr = ^T_conn_req;
+ T_conn_req = record
+ PRIM_type: SInt32; { always T_CONN_REQ }
+ DEST_length: SInt32;
+ DEST_offset: SInt32;
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ end;
+type
+ T_conn_resPtr = ^T_conn_res;
+ T_conn_res = record
+ PRIM_type: SInt32; { always T_CONN_RES }
+ QUEUE_ptr: queue_tPtr;
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ SEQ_number: SInt32;
+ end;
+type
+ T_data_indPtr = ^T_data_ind;
+ T_data_ind = record
+ PRIM_type: SInt32; { always T_DATA_IND }
+ MORE_flag: SInt32;
+ end;
+type
+ T_data_reqPtr = ^T_data_req;
+ T_data_req = record
+ PRIM_type: SInt32; { always T_DATA_REQ }
+ MORE_flag: SInt32;
+ end;
+type
+ T_discon_indPtr = ^T_discon_ind;
+ T_discon_ind = record
+ PRIM_type: SInt32; { always T_DISCON_IND }
+ DISCON_reason: SInt32;
+ SEQ_number: SInt32;
+ end;
+type
+ T_discon_reqPtr = ^T_discon_req;
+ T_discon_req = record
+ PRIM_type: SInt32; { always T_DISCON_REQ }
+ SEQ_number: SInt32;
+ end;
+type
+ T_exdata_indPtr = ^T_exdata_ind;
+ T_exdata_ind = record
+ PRIM_type: SInt32; { always T_EXDATA_IND }
+ MORE_flag: SInt32;
+ end;
+type
+ T_exdata_reqPtr = ^T_exdata_req;
+ T_exdata_req = record
+ PRIM_type: SInt32; { always T_EXDATA_REQ }
+ MORE_flag: SInt32;
+ end;
+type
+ T_error_ackPtr = ^T_error_ack;
+ T_error_ack = record
+ PRIM_type: SInt32; { always T_ERROR_ACK }
+ ERROR_prim: SInt32; { primitive in error }
+ TLI_error: SInt32;
+ UNIX_error: SInt32;
+ end;
+type
+ T_info_ackPtr = ^T_info_ack;
+ T_info_ack = record
+ PRIM_type: SInt32; { always T_INFO_ACK }
+ TSDU_size: SInt32; { max TSDU size }
+ ETSDU_size: SInt32; { max ETSDU size }
+ CDATA_size: SInt32; { connect data size }
+ DDATA_size: SInt32; { disconnect data size }
+ ADDR_size: SInt32; { TSAP size }
+ OPT_size: SInt32; { options size }
+ TIDU_size: SInt32; { TIDU size }
+ SERV_type: SInt32; { service type }
+ CURRENT_state: SInt32; { current state }
+ PROVIDER_flag: SInt32; { provider flags (see xti.h for defines) }
+ end;
+{ Provider flags }
+const
+ SENDZERO = $0001; { supports 0-length TSDU's }
+ XPG4_1 = $0002; { provider supports recent stuff }
+
+type
+ T_info_reqPtr = ^T_info_req;
+ T_info_req = record
+ PRIM_type: SInt32; { always T_INFO_REQ }
+ end;
+type
+ T_ok_ackPtr = ^T_ok_ack;
+ T_ok_ack = record
+ PRIM_type: SInt32; { always T_OK_ACK }
+ CORRECT_prim: SInt32;
+ end;
+type
+ T_optmgmt_ackPtr = ^T_optmgmt_ack;
+ T_optmgmt_ack = record
+ PRIM_type: SInt32; { always T_OPTMGMT_ACK }
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ MGMT_flags: SInt32;
+ end;
+type
+ T_optmgmt_reqPtr = ^T_optmgmt_req;
+ T_optmgmt_req = record
+ PRIM_type: SInt32; { always T_OPTMGMT_REQ }
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ MGMT_flags: SInt32;
+ end;
+type
+ T_ordrel_indPtr = ^T_ordrel_ind;
+ T_ordrel_ind = record
+ PRIM_type: SInt32; { always T_ORDREL_IND }
+ end;
+type
+ T_ordrel_reqPtr = ^T_ordrel_req;
+ T_ordrel_req = record
+ PRIM_type: SInt32; { always T_ORDREL_REQ }
+ end;
+type
+ T_unbind_reqPtr = ^T_unbind_req;
+ T_unbind_req = record
+ PRIM_type: SInt32; { always T_UNBIND_REQ }
+ end;
+type
+ T_uderror_indPtr = ^T_uderror_ind;
+ T_uderror_ind = record
+ PRIM_type: SInt32; { always T_UDERROR_IND }
+ DEST_length: SInt32;
+ DEST_offset: SInt32;
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ ERROR_type: SInt32;
+ end;
+type
+ T_unitdata_indPtr = ^T_unitdata_ind;
+ T_unitdata_ind = record
+ PRIM_type: SInt32; { always T_UNITDATA_IND }
+ SRC_length: SInt32;
+ SRC_offset: SInt32;
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ end;
+type
+ T_unitdata_reqPtr = ^T_unitdata_req;
+ T_unitdata_req = record
+ PRIM_type: SInt32; { always T_UNITDATA_REQ }
+ DEST_length: SInt32;
+ DEST_offset: SInt32;
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ end;
+type
+ T_resolveaddr_ackPtr = ^T_resolveaddr_ack;
+ T_resolveaddr_ack = record
+ PRIM_type: SInt32; { always T_RESOLVEADDR_ACK }
+ SEQ_number: SInt32;
+ ADDR_length: SInt32;
+ ADDR_offset: SInt32;
+ ORIG_client: SInt32;
+ ORIG_data: SInt32;
+ TLI_error: SInt32;
+ UNIX_error: SInt32;
+ end;
+type
+ T_resolveaddr_reqPtr = ^T_resolveaddr_req;
+ T_resolveaddr_req = record
+ PRIM_type: SInt32; { always T_RESOLVEADDR_REQ }
+ SEQ_number: SInt32;
+ ADDR_length: SInt32;
+ ADDR_offset: SInt32;
+ ORIG_client: SInt32;
+ ORIG_data: SInt32;
+ MAX_milliseconds: SInt32;
+ end;
+type
+ T_unitreply_indPtr = ^T_unitreply_ind;
+ T_unitreply_ind = record
+ PRIM_type: SInt32; { Always T_UREPLY_IND }
+ SEQ_number: SInt32;
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ REP_flags: SInt32;
+ TLI_error: SInt32;
+ UNIX_error: SInt32;
+ end;
+type
+ T_unitrequest_indPtr = ^T_unitrequest_ind;
+ T_unitrequest_ind = record
+ PRIM_type: SInt32; { Always T_UREQUEST_IND }
+ SEQ_number: SInt32;
+ SRC_length: SInt32;
+ SRC_offset: SInt32;
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ REQ_flags: SInt32;
+ end;
+type
+ T_unitrequest_reqPtr = ^T_unitrequest_req;
+ T_unitrequest_req = record
+ PRIM_type: SInt32; { Always T_UREQUEST_REQ }
+ SEQ_number: SInt32;
+ DEST_length: SInt32;
+ DEST_offset: SInt32;
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ REQ_flags: SInt32;
+ end;
+type
+ T_unitreply_reqPtr = ^T_unitreply_req;
+ T_unitreply_req = record
+ PRIM_type: SInt32; { Always T_UREPLY_REQ }
+ SEQ_number: SInt32;
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ REP_flags: SInt32;
+ end;
+type
+ T_unitreply_ackPtr = ^T_unitreply_ack;
+ T_unitreply_ack = record
+ PRIM_type: SInt32; { Always T_UREPLY_ACK }
+ SEQ_number: SInt32;
+ TLI_error: SInt32;
+ UNIX_error: SInt32;
+ end;
+type
+ T_cancelrequest_reqPtr = ^T_cancelrequest_req;
+ T_cancelrequest_req = record
+ PRIM_type: SInt32; { Always T_CANCELREQUEST_REQ }
+ SEQ_number: SInt32;
+ end;
+type
+ T_cancelreply_reqPtr = ^T_cancelreply_req;
+ T_cancelreply_req = record
+ PRIM_type: SInt32; { Always T_CANCELREPLY_REQ }
+ SEQ_number: SInt32;
+ end;
+type
+ T_reply_indPtr = ^T_reply_ind;
+ T_reply_ind = record
+ PRIM_type: SInt32; { Always T_REPLY_IND }
+ SEQ_number: SInt32;
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ REP_flags: SInt32;
+ TLI_error: SInt32;
+ UNIX_error: SInt32;
+ end;
+type
+ T_request_indPtr = ^T_request_ind;
+ T_request_ind = record
+ PRIM_type: SInt32; { Always T_REQUEST_IND }
+ SEQ_number: SInt32;
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ REQ_flags: SInt32;
+ end;
+type
+ T_request_reqPtr = ^T_request_req;
+ T_request_req = record
+ PRIM_type: SInt32; { Always T_REQUEST_REQ }
+ SEQ_number: SInt32;
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ REQ_flags: SInt32;
+ end;
+type
+ T_reply_reqPtr = ^T_reply_req;
+ T_reply_req = record
+ PRIM_type: SInt32; { Always T_REPLY_REQ }
+ SEQ_number: SInt32;
+ OPT_length: SInt32;
+ OPT_offset: SInt32;
+ REP_flags: SInt32;
+ end;
+type
+ T_reply_ackPtr = ^T_reply_ack;
+ T_reply_ack = record
+ PRIM_type: SInt32; { Always T_REPLY_ACK }
+ SEQ_number: SInt32;
+ TLI_error: SInt32;
+ UNIX_error: SInt32;
+ end;
+type
+ T_regname_reqPtr = ^T_regname_req;
+ T_regname_req = record
+ PRIM_type: SInt32; { Always T_REGNAME_REQ }
+ SEQ_number: SInt32; { Reply is sequence ack }
+ NAME_length: SInt32;
+ NAME_offset: SInt32;
+ ADDR_length: SInt32;
+ ADDR_offset: SInt32;
+ REQ_flags: SInt32;
+ end;
+type
+ T_regname_ackPtr = ^T_regname_ack;
+ T_regname_ack = record
+ PRIM_type: SInt32; { always T_REGNAME_ACK }
+ SEQ_number: SInt32;
+ REG_id: SInt32;
+ ADDR_length: SInt32;
+ ADDR_offset: SInt32;
+ end;
+type
+ T_delname_reqPtr = ^T_delname_req;
+ T_delname_req = record
+ PRIM_type: SInt32; { Always T_DELNAME_REQ }
+ SEQ_number: SInt32; { Reply is sequence ack }
+ NAME_length: SInt32;
+ NAME_offset: SInt32;
+ end;
+type
+ T_lkupname_reqPtr = ^T_lkupname_req;
+ T_lkupname_req = record
+ PRIM_type: SInt32; { Always T_LKUPNAME_REQ }
+ SEQ_number: SInt32; { Reply is sequence ack }
+ NAME_length: SInt32; { ... or T_LKUPNAME_CON }
+ NAME_offset: SInt32;
+ ADDR_length: SInt32;
+ ADDR_offset: SInt32;
+ MAX_number: SInt32;
+ MAX_milliseconds: SInt32;
+ REQ_flags: SInt32;
+ end;
+type
+ T_lkupname_conPtr = ^T_lkupname_con;
+ T_lkupname_con = record
+ PRIM_type: SInt32; { Either T_LKUPNAME_CON }
+ SEQ_number: SInt32; { Or T_LKUPNAME_RES }
+ NAME_length: SInt32;
+ NAME_offset: SInt32;
+ RSP_count: SInt32;
+ RSP_cumcount: SInt32;
+ end;
+type
+ T_sequence_ackPtr = ^T_sequence_ack;
+ T_sequence_ack = record
+ PRIM_type: SInt32; { always T_SEQUENCED_ACK }
+ ORIG_prim: SInt32; { original primitive }
+ SEQ_number: SInt32;
+ TLI_error: SInt32;
+ UNIX_error: SInt32;
+ end;
+type
+ T_event_indPtr = ^T_event_ind;
+ T_event_ind = record
+ PRIM_type: SInt32; { always T_EVENT_IND }
+ EVENT_code: SInt32;
+ EVENT_cookie: SInt32;
+ end;
+ T_primitivesPtr = ^T_primitives;
+ T_primitives = record
+ case SInt16 of
+ 0: (
+ primType: SInt32;
+ );
+ 1: (
+ taddrack: T_addr_ack;
+ );
+ 2: (
+ tbindack: T_bind_ack;
+ );
+ 3: (
+ tbindreq: T_bind_req;
+ );
+ 4: (
+ tconncon: T_conn_con;
+ );
+ 5: (
+ tconnind: T_conn_ind;
+ );
+ 6: (
+ tconnreq: T_conn_req;
+ );
+ 7: (
+ tconnres: T_conn_res;
+ );
+ 8: (
+ tdataind: T_data_ind;
+ );
+ 9: (
+ tdatareq: T_data_req;
+ );
+ 10: (
+ tdisconind: T_discon_ind;
+ );
+ 11: (
+ tdisconreq: T_discon_req;
+ );
+ 12: (
+ texdataind: T_exdata_ind;
+ );
+ 13: (
+ texdatareq: T_exdata_req;
+ );
+ 14: (
+ terrorack: T_error_ack;
+ );
+ 15: (
+ tinfoack: T_info_ack;
+ );
+ 16: (
+ tinforeq: T_info_req;
+ );
+ 17: (
+ tokack: T_ok_ack;
+ );
+ 18: (
+ toptmgmtack: T_optmgmt_ack;
+ );
+ 19: (
+ toptmgmtreq: T_optmgmt_req;
+ );
+ 20: (
+ tordrelind: T_ordrel_ind;
+ );
+ 21: (
+ tordrelreq: T_ordrel_req;
+ );
+ 22: (
+ tunbindreq: T_unbind_req;
+ );
+ 23: (
+ tuderrorind: T_uderror_ind;
+ );
+ 24: (
+ tunitdataind: T_unitdata_ind;
+ );
+ 25: (
+ tunitdatareq: T_unitdata_req;
+ );
+ 26: (
+ tunitreplyind: T_unitreply_ind;
+ );
+ 27: (
+ tunitrequestind: T_unitrequest_ind;
+ );
+ 28: (
+ tunitrequestreq: T_unitrequest_req;
+ );
+ 29: (
+ tunitreplyreq: T_unitreply_req;
+ );
+ 30: (
+ tunitreplyack: T_unitreply_ack;
+ );
+ 31: (
+ treplyind: T_reply_ind;
+ );
+ 32: (
+ trequestind: T_request_ind;
+ );
+ 33: (
+ trequestreq: T_request_req;
+ );
+ 34: (
+ treplyreq: T_reply_req;
+ );
+ 35: (
+ treplyack: T_reply_ack;
+ );
+ 36: (
+ tcancelreqreq: T_cancelrequest_req;
+ );
+ 37: (
+ tresolvereq: T_resolveaddr_req;
+ );
+ 38: (
+ tresolveack: T_resolveaddr_ack;
+ );
+ 39: (
+ tregnamereq: T_regname_req;
+ );
+ 40: (
+ tregnameack: T_regname_ack;
+ );
+ 41: (
+ tdelnamereq: T_delname_req;
+ );
+ 42: (
+ tlkupnamereq: T_lkupname_req;
+ );
+ 43: (
+ tlkupnamecon: T_lkupname_con;
+ );
+ 44: (
+ tsequenceack: T_sequence_ack;
+ );
+ 45: (
+ teventind: T_event_ind;
+ );
+ end;
+{ ***** From the Mentat "dlpi.h" *****}
+
+{
+ This header file has encoded the values so an existing driver
+ or user which was written with the Logical Link Interface(LLI)
+ can migrate to the DLPI interface in a binary compatible manner.
+ Any fields which require a specific format or value are flagged
+ with a comment containing the message LLI compatibility.
+}
+
+{ DLPI revision definition history}
+
+const
+ DL_CURRENT_VERSION = $02; { current version of dlpi }
+ DL_VERSION_2 = $02; { version of dlpi March 12,1991 }
+
+
+const
+ DL_INFO_REQ = $00; { Information Req, LLI compatibility }
+ DL_INFO_ACK = $03; { Information Ack, LLI compatibility }
+ DL_ATTACH_REQ = $0B; { Attach a PPA }
+ DL_DETACH_REQ = $0C; { Detach a PPA }
+ DL_BIND_REQ = $01; { Bind dlsap address, LLI compatibility }
+ DL_BIND_ACK = $04; { Dlsap address bound, LLI compatibility }
+ DL_UNBIND_REQ = $02; { Unbind dlsap address, LLI compatibility }
+ DL_OK_ACK = $06; { Success acknowledgment, LLI compatibility }
+ DL_ERROR_ACK = $05; { Error acknowledgment, LLI compatibility }
+ DL_SUBS_BIND_REQ = $1B; { Bind Subsequent DLSAP address }
+ DL_SUBS_BIND_ACK = $1C; { Subsequent DLSAP address bound }
+ DL_SUBS_UNBIND_REQ = $15; { Subsequent unbind }
+ DL_ENABMULTI_REQ = $1D; { Enable multicast addresses }
+ DL_DISABMULTI_REQ = $1E; { Disable multicast addresses }
+ DL_PROMISCON_REQ = $1F; { Turn on promiscuous mode }
+ DL_PROMISCOFF_REQ = $20; { Turn off promiscuous mode }
+ DL_UNITDATA_REQ = $07; { datagram send request, LLI compatibility }
+ DL_UNITDATA_IND = $08; { datagram receive indication, LLI compatibility }
+ DL_UDERROR_IND = $09; { datagram error indication, LLI compatibility }
+ DL_UDQOS_REQ = $0A; { set QOS for subsequent datagram transmissions }
+ DL_CONNECT_REQ = $0D; { Connect request }
+ DL_CONNECT_IND = $0E; { Incoming connect indication }
+ DL_CONNECT_RES = $0F; { Accept previous connect indication }
+ DL_CONNECT_CON = $10; { Connection established }
+ DL_TOKEN_REQ = $11; { Passoff token request }
+ DL_TOKEN_ACK = $12; { Passoff token ack }
+ DL_DISCONNECT_REQ = $13; { Disconnect request }
+ DL_DISCONNECT_IND = $14; { Disconnect indication }
+ DL_RESET_REQ = $17; { Reset service request }
+ DL_RESET_IND = $18; { Incoming reset indication }
+ DL_RESET_RES = $19; { Complete reset processing }
+ DL_RESET_CON = $1A; { Reset processing complete }
+ DL_DATA_ACK_REQ = $21; { data unit transmission request }
+ DL_DATA_ACK_IND = $22; { Arrival of a command PDU }
+ DL_DATA_ACK_STATUS_IND = $23; { Status indication of DATA_ACK_REQ}
+ DL_REPLY_REQ = $24; { Request a DLSDU from the remote }
+ DL_REPLY_IND = $25; { Arrival of a command PDU }
+ DL_REPLY_STATUS_IND = $26; { Status indication of REPLY_REQ }
+ DL_REPLY_UPDATE_REQ = $27; { Hold a DLSDU for transmission }
+ DL_REPLY_UPDATE_STATUS_IND = $28; { Status of REPLY_UPDATE req }
+ DL_XID_REQ = $29; { Request to send an XID PDU }
+ DL_XID_IND = $2A; { Arrival of an XID PDU }
+ DL_XID_RES = $2B; { request to send a response XID PDU}
+ DL_XID_CON = $2C; { Arrival of a response XID PDU }
+ DL_TEST_REQ = $2D; { TEST command request }
+ DL_TEST_IND = $2E; { TEST response indication }
+ DL_TEST_RES = $2F; { TEST response }
+ DL_TEST_CON = $30; { TEST Confirmation }
+ DL_PHYS_ADDR_REQ = $31; { Request to get physical addr }
+ DL_PHYS_ADDR_ACK = $32; { Return physical addr }
+ DL_SET_PHYS_ADDR_REQ = $33; { set physical addr }
+ DL_GET_STATISTICS_REQ = $34; { Request to get statistics }
+ DL_GET_STATISTICS_ACK = $35; { Return statistics }
+
+{ DLPI interface states}
+const
+ DL_UNATTACHED = $04; { PPA not attached }
+ DL_ATTACH_PENDING = $05; { Waiting ack of DL_ATTACH_REQ }
+ DL_DETACH_PENDING = $06; { Waiting ack of DL_DETACH_REQ }
+ DL_UNBOUND = $00; { PPA attached, LLI compatibility }
+ DL_BIND_PENDING = $01; { Waiting ack of DL_BIND_REQ, LLI compatibility }
+ DL_UNBIND_PENDING = $02; { Waiting ack of DL_UNBIND_REQ, LLI compatibility }
+ DL_IDLE = $03; { dlsap bound, awaiting use, LLI compatibility }
+ DL_UDQOS_PENDING = $07; { Waiting ack of DL_UDQOS_REQ }
+ DL_OUTCON_PENDING = $08; { outgoing connection, awaiting DL_CONN_CON }
+ DL_INCON_PENDING = $09; { incoming connection, awaiting DL_CONN_RES }
+ DL_CONN_RES_PENDING = $0A; { Waiting ack of DL_CONNECT_RES }
+ DL_DATAXFER = $0B; { connection-oriented data transfer }
+ DL_USER_RESET_PENDING = $0C; { user initiated reset, awaiting DL_RESET_CON }
+ DL_PROV_RESET_PENDING = $0D; { provider initiated reset, awaiting DL_RESET_RES }
+ DL_RESET_RES_PENDING = $0E; { Waiting ack of DL_RESET_RES }
+ DL_DISCON8_PENDING = $0F; { Waiting ack of DL_DISC_REQ when in DL_OUTCON_PENDING }
+ DL_DISCON9_PENDING = $10; { Waiting ack of DL_DISC_REQ when in DL_INCON_PENDING }
+ DL_DISCON11_PENDING = $11; { Waiting ack of DL_DISC_REQ when in DL_DATAXFER }
+ DL_DISCON12_PENDING = $12; { Waiting ack of DL_DISC_REQ when in DL_USER_RESET_PENDING }
+ DL_DISCON13_PENDING = $13; { Waiting ack of DL_DISC_REQ when in DL_DL_PROV_RESET_PENDING }
+ DL_SUBS_BIND_PND = $14; { Waiting ack of DL_SUBS_BIND_REQ }
+ DL_SUBS_UNBIND_PND = $15; { Waiting ack of DL_SUBS_UNBIND_REQ }
+
+{ DL_ERROR_ACK error return values}
+
+const
+ DL_ACCESS = $02; { Improper permissions for request, LLI compatibility }
+ DL_BADADDR = $01; { DLSAP address in improper format or invalid }
+ DL_BADCORR = $05; { Sequence number not from outstanding DL_CONN_IND }
+ DL_BADDATA = $06; { User data exceeded provider limit }
+ DL_BADPPA = $08; { Specified PPA was invalid }
+ DL_BADPRIM = $09; { Primitive received is not known by DLS provider }
+ DL_BADQOSPARAM = $0A; { QOS parameters contained invalid values }
+ DL_BADQOSTYPE = $0B; { QOS structure type is unknown or unsupported }
+ DL_BADSAP = $00; { Bad LSAP selector, LLI compatibility }
+ DL_BADTOKEN = $0C; { Token used not associated with an active stream }
+ DL_BOUND = $0D; { Attempted second bind with dl_max_conind or }
+ { dl_conn_mgmt > 0 on same DLSAP or PPA }
+ DL_INITFAILED = $0E; { Physical Link initialization failed }
+ DL_NOADDR = $0F; { Provider couldn't allocate alternate address }
+ DL_NOTINIT = $10; { Physical Link not initialized }
+ DL_OUTSTATE = $03; { Primitive issued in improper state, LLI compatibility }
+ DL_SYSERR = $04; { UNIX system error occurred, LLI compatibility }
+ DL_UNSUPPORTED = $07; { Requested service not supplied by provider }
+ DL_UNDELIVERABLE = $11; { Previous data unit could not be delivered }
+ DL_NOTSUPPORTED = $12; { Primitive is known but not supported by DLS provider }
+ DL_TOOMANY = $13; { limit exceeded }
+ DL_NOTENAB = $14; { Promiscuous mode not enabled }
+ DL_BUSY = $15; { Other streams for a particular PPA in the post-attached state }
+ DL_NOAUTO = $16; { Automatic handling of XID & TEST responses not supported }
+ DL_NOXIDAUTO = $17; { Automatic handling of XID not supported }
+ DL_NOTESTAUTO = $18; { Automatic handling of TEST not supported }
+ DL_XIDAUTO = $19; { Automatic handling of XID response }
+ DL_TESTAUTO = $1A; { AUtomatic handling of TEST response}
+ DL_PENDING = $1B; { pending outstanding connect indications }
+
+{ DLPI media types supported}
+
+const
+ DL_CSMACD = $00; { IEEE 802.3 CSMA/CD network, LLI Compatibility }
+ DL_TPB = $01; { IEEE 802.4 Token Passing Bus, LLI Compatibility }
+ DL_TPR = $02; { IEEE 802.5 Token Passing Ring, LLI Compatibility }
+ DL_METRO = $03; { IEEE 802.6 Metro Net, LLI Compatibility }
+ DL_ETHER = $04; { Ethernet Bus, LLI Compatibility }
+ DL_HDLC = $05; { ISO HDLC protocol support, bit synchronous }
+ DL_CHAR = $06; { Character Synchronous protocol support, eg BISYNC }
+ DL_CTCA = $07; { IBM Channel-to-Channel Adapter }
+ DL_FDDI = $08; { Fiber Distributed data interface }
+ DL_OTHER = $09; { Any other medium not listed above }
+
+{
+ DLPI provider service supported.
+ These must be allowed to be bitwise-OR for dl_service_mode in
+ DL_INFO_ACK.
+}
+const
+ DL_CODLS = $01; { support connection-oriented service }
+ DL_CLDLS = $02; { support connectionless data link service }
+ DL_ACLDLS = $04; { support acknowledged connectionless service}
+
+{
+ DLPI provider style.
+ The DLPI provider style which determines whether a provider
+ requires a DL_ATTACH_REQ to inform the provider which PPA
+ user messages should be sent/received on.
+}
+
+const
+ DL_STYLE1 = $0500; { PPA is implicitly bound by open(2) }
+ DL_STYLE2 = $0501; { PPA must be explicitly bound via DL_ATTACH_REQ }
+
+{ DLPI Originator for Disconnect and Resets}
+
+const
+ DL_PROVIDER = $0700;
+ DL_USER = $0701;
+
+{ DLPI Disconnect Reasons}
+
+const
+ DL_CONREJ_DEST_UNKNOWN = $0800;
+ DL_CONREJ_DEST_UNREACH_PERMANENT = $0801;
+ DL_CONREJ_DEST_UNREACH_TRANSIENT = $0802;
+ DL_CONREJ_QOS_UNAVAIL_PERMANENT = $0803;
+ DL_CONREJ_QOS_UNAVAIL_TRANSIENT = $0804;
+ DL_CONREJ_PERMANENT_COND = $0805;
+ DL_CONREJ_TRANSIENT_COND = $0806;
+ DL_DISC_ABNORMAL_CONDITION = $0807;
+ DL_DISC_NORMAL_CONDITION = $0808;
+ DL_DISC_PERMANENT_CONDITION = $0809;
+ DL_DISC_TRANSIENT_CONDITION = $080A;
+ DL_DISC_UNSPECIFIED = $080B;
+
+{ DLPI Reset Reasons}
+
+const
+ DL_RESET_FLOW_CONTROL = $0900;
+ DL_RESET_LINK_ERROR = $0901;
+ DL_RESET_RESYNCH = $0902;
+
+{ DLPI status values for acknowledged connectionless data transfer}
+
+const
+ DL_CMD_MASK = $0F; { mask for command portion of status }
+ DL_CMD_OK = $00; { Command Accepted }
+ DL_CMD_RS = $01; { Unimplemented or inactivated service }
+ DL_CMD_UE = $05; { Data Link User interface error }
+ DL_CMD_PE = $06; { Protocol error }
+ DL_CMD_IP = $07; { Permanent implementation dependent error}
+ DL_CMD_UN = $09; { Resources temporarily unavailable }
+ DL_CMD_IT = $0F; { Temporary implementation dependent error }
+ DL_RSP_MASK = $F0; { mask for response portion of status }
+ DL_RSP_OK = $00; { Response DLSDU present }
+ DL_RSP_RS = $10; { Unimplemented or inactivated service }
+ DL_RSP_NE = $30; { Response DLSDU never submitted }
+ DL_RSP_NR = $40; { Response DLSDU not requested }
+ DL_RSP_UE = $50; { Data Link User interface error }
+ DL_RSP_IP = $70; { Permanent implementation dependent error }
+ DL_RSP_UN = $90; { Resources temporarily unavailable }
+ DL_RSP_IT = $F0; { Temporary implementation dependent error }
+
+{ Service Class values for acknowledged connectionless data transfer}
+
+const
+ DL_RQST_RSP = $01; { Use acknowledge capability in MAC sublayer}
+ DL_RQST_NORSP = $02; { No acknowledgement service requested }
+
+{ DLPI address type definition}
+
+const
+ DL_FACT_PHYS_ADDR = $01; { factory physical address }
+ DL_CURR_PHYS_ADDR = $02; { current physical address }
+
+{ DLPI flag definitions}
+
+const
+ DL_POLL_FINAL = $01; { if set,indicates poll/final bit set}
+
+{ XID and TEST responses supported by the provider}
+
+const
+ DL_AUTO_XID = $01; { provider will respond to XID }
+ DL_AUTO_TEST = $02; { provider will respond to TEST }
+
+{ Subsequent bind type}
+
+const
+ DL_PEER_BIND = $01; { subsequent bind on a peer addr }
+ DL_HIERARCHICAL_BIND = $02; { subs_bind on a hierarchical addr}
+
+{ DLPI promiscuous mode definitions}
+
+const
+ DL_PROMISC_PHYS = $01; { promiscuous mode at phys level }
+ DL_PROMISC_SAP = $02; { promiscous mode at sap level }
+ DL_PROMISC_MULTI = $03; { promiscuous mode for multicast }
+
+{ M_DATA "raw" mode }
+// #define DLIOCRAW MIOC_CMD(MIOC_DLPI,1)
+{
+ DLPI Quality Of Service definition for use in QOS structure definitions.
+ The QOS structures are used in connection establishment, DL_INFO_ACK,
+ and setting connectionless QOS values.
+}
+{
+ Throughput
+
+ This parameter is specified for both directions.
+}
+
+type
+ dl_through_t = record
+ dl_target_value: SInt32; { desired bits/second desired }
+ dl_accept_value: SInt32; { min. acceptable bits/second }
+ end;
+{
+ transit delay specification
+
+ This parameter is specified for both directions.
+ expressed in milliseconds assuming a DLSDU size of 128 octets.
+ The scaling of the value to the current DLSDU size is provider dependent.
+}
+type
+ dl_transdelay_tPtr = ^dl_transdelay_t;
+ dl_transdelay_t = record
+ dl_target_value: SInt32; { desired value of service }
+ dl_accept_value: SInt32; { min. acceptable value of service }
+ end;
+{
+ priority specification
+ priority range is 0-100, with 0 being highest value.
+}
+
+type
+ dl_priority_tPtr = ^dl_priority_t;
+ dl_priority_t = record
+ dl_min: SInt32;
+ dl_max: SInt32;
+ end;
+{ protection specification}
+const
+ DL_NONE = $0B01; { no protection supplied }
+ DL_MONITOR = $0B02; { protection against passive monitoring }
+ DL_MAXIMUM = $0B03; { protection against modification, replay, addition, or deletion }
+
+type
+ dl_protect_tPtr = ^dl_protect_t;
+ dl_protect_t = record
+ dl_min: SInt32;
+ dl_max: SInt32;
+ end;
+{
+ Resilience specification
+ probabilities are scaled by a factor of 10,000 with a time interval
+ of 10,000 seconds.
+}
+type
+ dl_resilience_tPtr = ^dl_resilience_t;
+ dl_resilience_t = record
+ dl_disc_prob: SInt32; { probability of provider init DISC }
+ dl_reset_prob: SInt32; { probability of provider init RESET }
+ end;
+{
+ QOS type definition to be used for negotiation with the
+ remote end of a connection, or a connectionless unitdata request.
+ There are two type definitions to handle the negotiation
+ process at connection establishment. The typedef dl_qos_range_t
+ is used to present a range for parameters. This is used
+ in the DL_CONNECT_REQ and DL_CONNECT_IND messages. The typedef
+ dl_qos_sel_t is used to select a specific value for the QOS
+ parameters. This is used in the DL_CONNECT_RES, DL_CONNECT_CON,
+ and DL_INFO_ACK messages to define the selected QOS parameters
+ for a connection.
+
+ NOTE
+ A DataLink provider which has unknown values for any of the fields
+ will use a value of DL_UNKNOWN for all values in the fields.
+
+ NOTE
+ A QOS parameter value of DL_QOS_DONT_CARE informs the DLS
+ provider the user requesting this value doesn't care
+ what the QOS parameter is set to. This value becomes the
+ least possible value in the range of QOS parameters.
+ The order of the QOS parameter range is then:
+
+ DL_QOS_DONT_CARE < 0 < MAXIMUM QOS VALUE
+}
+const
+ DL_UNKNOWN = -1;
+ DL_QOS_DONT_CARE = -2;
+
+{
+ Every QOS structure has the first 4 bytes containing a type
+ field, denoting the definition of the rest of the structure.
+ This is used in the same manner has the dl_primitive variable
+ is in messages.
+
+ The following list is the defined QOS structure type values and structures.
+}
+const
+ DL_QOS_CO_RANGE1 = $0101; { QOS range struct. for Connection modeservice }
+ DL_QOS_CO_SEL1 = $0102; { QOS selection structure }
+ DL_QOS_CL_RANGE1 = $0103; { QOS range struct. for connectionless}
+ DL_QOS_CL_SEL1 = $0104; { QOS selection for connectionless mode}
+
+type
+ dl_qos_co_range1_tPtr = ^dl_qos_co_range1_t;
+ dl_qos_co_range1_t = record
+ dl_qos_type: UInt32;
+ dl_rcv_throughput: dl_through_t; { desired and acceptable}
+ dl_rcv_trans_delay: dl_transdelay_t; { desired and acceptable}
+ dl_xmt_throughput: dl_through_t;
+ dl_xmt_trans_delay: dl_transdelay_t;
+ dl_priority: dl_priority_t; { min and max values }
+ dl_protection: dl_protect_t; { min and max values }
+ dl_residual_error: SInt32;
+ dl_resilience: dl_resilience_t;
+ end;
+type
+ dl_qos_co_sel1_tPtr = ^dl_qos_co_sel1_t;
+ dl_qos_co_sel1_t = record
+ dl_qos_type: UInt32;
+ dl_rcv_throughput: SInt32;
+ dl_rcv_trans_delay: SInt32;
+ dl_xmt_throughput: SInt32;
+ dl_xmt_trans_delay: SInt32;
+ dl_priority: SInt32;
+ dl_protection: SInt32;
+ dl_residual_error: SInt32;
+ dl_resilience: dl_resilience_t;
+ end;
+type
+ dl_qos_cl_range1_tPtr = ^dl_qos_cl_range1_t;
+ dl_qos_cl_range1_t = record
+ dl_qos_type: UInt32;
+ dl_trans_delay: dl_transdelay_t;
+ dl_priority: dl_priority_t;
+ dl_protection: dl_protect_t;
+ dl_residual_error: SInt32;
+ end;
+type
+ dl_qos_cl_sel1_tPtr = ^dl_qos_cl_sel1_t;
+ dl_qos_cl_sel1_t = record
+ dl_qos_type: UInt32;
+ dl_trans_delay: SInt32;
+ dl_priority: SInt32;
+ dl_protection: SInt32;
+ dl_residual_error: SInt32;
+ end;
+{
+ DLPI interface primitive definitions.
+
+ Each primitive is sent as a stream message. It is possible that
+ the messages may be viewed as a sequence of bytes that have the
+ following form without any padding. The structure definition
+ of the following messages may have to change depending on the
+ underlying hardware architecture and crossing of a hardware
+ boundary with a different hardware architecture.
+
+ Fields in the primitives having a name of the form
+ dl_reserved cannot be used and have the value of
+ binary zero, no bits turned on.
+
+ Each message has the name defined followed by the
+ stream message type (M_PROTO, M_PCPROTO, M_DATA)
+ }
+{ LOCAL MANAGEMENT SERVICE PRIMITIVES}
+
+{ DL_INFO_REQ, M_PCPROTO type}
+
+type
+ dl_info_req_tPtr = ^dl_info_req_t;
+ dl_info_req_t = record
+ dl_primitive: UInt32; { set to DL_INFO_REQ }
+ end;
+{ DL_INFO_ACK, M_PCPROTO type}
+type
+ dl_info_ack_tPtr = ^dl_info_ack_t;
+ dl_info_ack_t = record
+ dl_primitive: UInt32; { set to DL_INFO_ACK }
+ dl_max_sdu: UInt32; { Max bytes in a DLSDU }
+ dl_min_sdu: UInt32; { Min bytes in a DLSDU }
+ dl_addr_length: UInt32; { length of DLSAP address }
+ dl_mac_type: UInt32; { type of medium supported}
+ dl_reserved: UInt32; { value set to zero }
+ dl_current_state: UInt32; { state of DLPI interface }
+ dl_sap_length: SInt32; { current length of SAP part of dlsap address }
+ dl_service_mode: UInt32; { CO, CL or ACL }
+ dl_qos_length: UInt32; { length of qos values }
+ dl_qos_offset: UInt32; { offset from beg. of block}
+ dl_qos_range_length: UInt32; { available range of qos }
+ dl_qos_range_offset: UInt32; { offset from beg. of block}
+ dl_provider_style: UInt32; { style1 or style2 }
+ dl_addr_offset: UInt32; { offset of the dlsap addr }
+ dl_version: UInt32; { version number }
+ dl_brdcst_addr_length: UInt32; { length of broadcast addr }
+ dl_brdcst_addr_offset: UInt32; { offset from beg. of block}
+ dl_growth: UInt32; { set to zero }
+ end;
+{ DL_ATTACH_REQ, M_PROTO type}
+type
+ dl_attach_req_tPtr = ^dl_attach_req_t;
+ dl_attach_req_t = record
+ dl_primitive: UInt32; { set to DL_ATTACH_REQ}
+ dl_ppa: UInt32; { id of the PPA }
+ end;
+{ DL_DETACH_REQ, M_PROTO type}
+type
+ dl_detach_req_tPtr = ^dl_detach_req_t;
+ dl_detach_req_t = record
+ dl_primitive: UInt32; { set to DL_DETACH_REQ }
+ end;
+{ DL_BIND_REQ, M_PROTO type}
+type
+ dl_bind_req_tPtr = ^dl_bind_req_t;
+ dl_bind_req_t = record
+ dl_primitive: UInt32; { set to DL_BIND_REQ }
+ dl_sap: UInt32; { info to identify dlsap addr}
+ dl_max_conind: UInt32; { max # of outstanding con_ind}
+ dl_service_mode: UInt16; { CO, CL or ACL }
+ dl_conn_mgmt: UInt16; { if non-zero, is con-mgmt stream}
+ dl_xidtest_flg: UInt32; { if set to 1 indicates automatic initiation of test and xid frames }
+ end;
+{ DL_BIND_ACK, M_PCPROTO type}
+type
+ dl_bind_ack_tPtr = ^dl_bind_ack_t;
+ dl_bind_ack_t = record
+ dl_primitive: UInt32; { DL_BIND_ACK }
+ dl_sap: UInt32; { DLSAP addr info }
+ dl_addr_length: UInt32; { length of complete DLSAP addr }
+ dl_addr_offset: UInt32; { offset from beginning of M_PCPROTO}
+ dl_max_conind: UInt32; { allowed max. # of con-ind }
+ dl_xidtest_flg: UInt32; { responses supported by provider}
+ end;
+{ DL_SUBS_BIND_REQ, M_PROTO type}
+type
+ dl_subs_bind_req_tPtr = ^dl_subs_bind_req_t;
+ dl_subs_bind_req_t = record
+ dl_primitive: UInt32; { DL_SUBS_BIND_REQ }
+ dl_subs_sap_offset: UInt32; { offset of subs_sap }
+ dl_subs_sap_length: UInt32; { length of subs_sap }
+ dl_subs_bind_class: UInt32; { peer or hierarchical }
+ end;
+{ DL_SUBS_BIND_ACK, M_PCPROTO type}
+type
+ dl_subs_bind_ack_tPtr = ^dl_subs_bind_ack_t;
+ dl_subs_bind_ack_t = record
+ dl_primitive: UInt32; { DL_SUBS_BIND_ACK }
+ dl_subs_sap_offset: UInt32; { offset of subs_sap }
+ dl_subs_sap_length: UInt32; { length of subs_sap }
+ end;
+{ DL_UNBIND_REQ, M_PROTO type}
+type
+ dl_unbind_req_tPtr = ^dl_unbind_req_t;
+ dl_unbind_req_t = record
+ dl_primitive: UInt32; { DL_UNBIND_REQ }
+ end;
+{ DL_SUBS_UNBIND_REQ, M_PROTO type}
+type
+ dl_subs_unbind_req_tPtr = ^dl_subs_unbind_req_t;
+ dl_subs_unbind_req_t = record
+ dl_primitive: UInt32; { DL_SUBS_UNBIND_REQ }
+ dl_subs_sap_offset: UInt32; { offset of subs_sap }
+ dl_subs_sap_length: UInt32; { length of subs_sap }
+ end;
+{ DL_OK_ACK, M_PCPROTO type}
+type
+ dl_ok_ack_tPtr = ^dl_ok_ack_t;
+ dl_ok_ack_t = record
+ dl_primitive: UInt32; { DL_OK_ACK }
+ dl_correct_primitive: UInt32; { primitive being acknowledged }
+ end;
+{ DL_ERROR_ACK, M_PCPROTO type}
+type
+ dl_error_ack_tPtr = ^dl_error_ack_t;
+ dl_error_ack_t = record
+ dl_primitive: UInt32; { DL_ERROR_ACK }
+ dl_error_primitive: UInt32; { primitive in error }
+ dl_errno: UInt32; { DLPI error code }
+ dl_unix_errno: UInt32; { UNIX system error code }
+ end;
+{ DL_ENABMULTI_REQ, M_PROTO type}
+type
+ dl_enabmulti_req_tPtr = ^dl_enabmulti_req_t;
+ dl_enabmulti_req_t = record
+ dl_primitive: UInt32; { DL_ENABMULTI_REQ }
+ dl_addr_length: UInt32; { length of multicast address }
+ dl_addr_offset: UInt32; { offset from beg. of M_PROTO block}
+ end;
+{ DL_DISABMULTI_REQ, M_PROTO type}
+type
+ dl_disabmulti_req_tPtr = ^dl_disabmulti_req_t;
+ dl_disabmulti_req_t = record
+ dl_primitive: UInt32; { DL_DISABMULTI_REQ }
+ dl_addr_length: UInt32; { length of multicast address }
+ dl_addr_offset: UInt32; { offset from beg. of M_PROTO block}
+ end;
+{ DL_PROMISCON_REQ, M_PROTO type}
+type
+ dl_promiscon_req_tPtr = ^dl_promiscon_req_t;
+ dl_promiscon_req_t = record
+ dl_primitive: UInt32; { DL_PROMISCON_REQ }
+ dl_level: UInt32; { physical,SAP level or ALL multicast}
+ end;
+{ DL_PROMISCOFF_REQ, M_PROTO type}
+type
+ dl_promiscoff_req_tPtr = ^dl_promiscoff_req_t;
+ dl_promiscoff_req_t = record
+ dl_primitive: UInt32; { DL_PROMISCOFF_REQ }
+ dl_level: UInt32; { Physical,SAP level or ALL multicast}
+ end;
+{ Primitives to get and set the Physical address}
+{ DL_PHYS_ADDR_REQ, M_PROTO type}
+
+type
+ dl_phys_addr_req_tPtr = ^dl_phys_addr_req_t;
+ dl_phys_addr_req_t = record
+ dl_primitive: UInt32; { DL_PHYS_ADDR_REQ }
+ dl_addr_type: UInt32; { factory or current physical addr }
+ end;
+{ DL_PHYS_ADDR_ACK, M_PCPROTO type}
+type
+ dl_phys_addr_ack_tPtr = ^dl_phys_addr_ack_t;
+ dl_phys_addr_ack_t = record
+ dl_primitive: UInt32; { DL_PHYS_ADDR_ACK }
+ dl_addr_length: UInt32; { length of the physical addr }
+ dl_addr_offset: UInt32; { offset from beg. of block }
+ end;
+{ DL_SET_PHYS_ADDR_REQ, M_PROTO type}
+type
+ dl_set_phys_addr_req_tPtr = ^dl_set_phys_addr_req_t;
+ dl_set_phys_addr_req_t = record
+ dl_primitive: UInt32; { DL_SET_PHYS_ADDR_REQ }
+ dl_addr_length: UInt32; { length of physical addr }
+ dl_addr_offset: UInt32; { offset from beg. of block }
+ end;
+{ Primitives to get statistics}
+{ DL_GET_STATISTICS_REQ, M_PROTO type}
+
+type
+ dl_get_statistics_req_tPtr = ^dl_get_statistics_req_t;
+ dl_get_statistics_req_t = record
+ dl_primitive: UInt32; { DL_GET_STATISTICS_REQ }
+ end;
+{ DL_GET_STATISTICS_ACK, M_PCPROTO type}
+type
+ dl_get_statistics_ack_tPtr = ^dl_get_statistics_ack_t;
+ dl_get_statistics_ack_t = record
+ dl_primitive: UInt32; { DL_GET_STATISTICS_ACK }
+ dl_stat_length: UInt32; { length of statistics structure}
+ dl_stat_offset: UInt32; { offset from beg. of block }
+ end;
+{ CONNECTION-ORIENTED SERVICE PRIMITIVES}
+
+{ DL_CONNECT_REQ, M_PROTO type}
+
+type
+ dl_connect_req_tPtr = ^dl_connect_req_t;
+ dl_connect_req_t = record
+ dl_primitive: UInt32; { DL_CONNECT_REQ }
+ dl_dest_addr_length: UInt32; { len. of dlsap addr}
+ dl_dest_addr_offset: UInt32; { offset }
+ dl_qos_length: UInt32; { len. of QOS parm val}
+ dl_qos_offset: UInt32; { offset }
+ dl_growth: UInt32; { set to zero }
+ end;
+{ DL_CONNECT_IND, M_PROTO type}
+type
+ dl_connect_ind_tPtr = ^dl_connect_ind_t;
+ dl_connect_ind_t = record
+ dl_primitive: UInt32; { DL_CONNECT_IND }
+ dl_correlation: UInt32; { provider's correlation token}
+ dl_called_addr_length: UInt32; { length of called address }
+ dl_called_addr_offset: UInt32; { offset from beginning of block }
+ dl_calling_addr_length: UInt32; { length of calling address }
+ dl_calling_addr_offset: UInt32; { offset from beginning of block }
+ dl_qos_length: UInt32; { length of qos structure }
+ dl_qos_offset: UInt32; { offset from beginning of block }
+ dl_growth: UInt32; { set to zero }
+ end;
+{ DL_CONNECT_RES, M_PROTO type}
+type
+ dl_connect_res_tPtr = ^dl_connect_res_t;
+ dl_connect_res_t = record
+ dl_primitive: UInt32; { DL_CONNECT_RES }
+ dl_correlation: UInt32; { provider's correlation token }
+ dl_resp_token: UInt32; { token associated with responding stream }
+ dl_qos_length: UInt32; { length of qos structure }
+ dl_qos_offset: UInt32; { offset from beginning of block }
+ dl_growth: UInt32; { set to zero }
+ end;
+{ DL_CONNECT_CON, M_PROTO type}
+type
+ dl_connect_con_tPtr = ^dl_connect_con_t;
+ dl_connect_con_t = record
+ dl_primitive: UInt32; { DL_CONNECT_CON}
+ dl_resp_addr_length: UInt32; { length of responder's address }
+ dl_resp_addr_offset: UInt32; { offset from beginning of block}
+ dl_qos_length: UInt32; { length of qos structure }
+ dl_qos_offset: UInt32; { offset from beginning of block}
+ dl_growth: UInt32; { set to zero }
+ end;
+{ DL_TOKEN_REQ, M_PCPROTO type}
+type
+ dl_token_req_tPtr = ^dl_token_req_t;
+ dl_token_req_t = record
+ dl_primitive: UInt32; { DL_TOKEN_REQ }
+ end;
+{ DL_TOKEN_ACK, M_PCPROTO type}
+type
+ dl_token_ack_tPtr = ^dl_token_ack_t;
+ dl_token_ack_t = record
+ dl_primitive: UInt32; { DL_TOKEN_ACK }
+ dl_token: UInt32; { Connection response token associated with the stream }
+ end;
+{ DL_DISCONNECT_REQ, M_PROTO type}
+type
+ dl_disconnect_req_tPtr = ^dl_disconnect_req_t;
+ dl_disconnect_req_t = record
+ dl_primitive: UInt32; { DL_DISCONNECT_REQ }
+ dl_reason: UInt32; {normal, abnormal, perm. or transient}
+ dl_correlation: UInt32; { association with connect_ind }
+ end;
+{ DL_DISCONNECT_IND, M_PROTO type}
+type
+ dl_disconnect_ind_tPtr = ^dl_disconnect_ind_t;
+ dl_disconnect_ind_t = record
+ dl_primitive: UInt32; { DL_DISCONNECT_IND }
+ dl_originator: UInt32; { USER or PROVIDER }
+ dl_reason: UInt32; { permanent or transient }
+ dl_correlation: UInt32; { association with connect_ind }
+ end;
+{ DL_RESET_REQ, M_PROTO type}
+type
+ dl_reset_req_tPtr = ^dl_reset_req_t;
+ dl_reset_req_t = record
+ dl_primitive: UInt32; { DL_RESET_REQ }
+ end;
+{ DL_RESET_IND, M_PROTO type}
+type
+ dl_reset_ind_tPtr = ^dl_reset_ind_t;
+ dl_reset_ind_t = record
+ dl_primitive: UInt32; { DL_RESET_IND }
+ dl_originator: UInt32; { Provider or User }
+ dl_reason: UInt32; { flow control, link error or resynch}
+ end;
+{ DL_RESET_RES, M_PROTO type}
+type
+ dl_reset_res_tPtr = ^dl_reset_res_t;
+ dl_reset_res_t = record
+ dl_primitive: UInt32; { DL_RESET_RES }
+ end;
+{ DL_RESET_CON, M_PROTO type}
+type
+ dl_reset_con_tPtr = ^dl_reset_con_t;
+ dl_reset_con_t = record
+ dl_primitive: UInt32; { DL_RESET_CON }
+ end;
+{ CONNECTIONLESS SERVICE PRIMITIVES}
+{ DL_UNITDATA_REQ, M_PROTO type, with M_DATA block(s)}
+
+type
+ dl_unitdata_req_tPtr = ^dl_unitdata_req_t;
+ dl_unitdata_req_t = record
+ dl_primitive: UInt32; { DL_UNITDATA_REQ }
+ dl_dest_addr_length: UInt32; { DLSAP length of dest. user }
+ dl_dest_addr_offset: UInt32; { offset from beg. of block }
+ dl_priority: dl_priority_t; { priority value }
+ end;
+{ DL_UNITDATA_IND, M_PROTO type, with M_DATA block(s)}
+type
+ dl_unitdata_ind_tPtr = ^dl_unitdata_ind_t;
+ dl_unitdata_ind_t = record
+ dl_primitive: UInt32; { DL_UNITDATA_IND }
+ dl_dest_addr_length: UInt32; { DLSAP length of dest. user }
+ dl_dest_addr_offset: UInt32; { offset from beg. of block }
+ dl_src_addr_length: UInt32; { DLSAP addr length of sending user}
+ dl_src_addr_offset: UInt32; { offset from beg. of block }
+ dl_group_address: UInt32; { set to one if multicast/broadcast}
+ end;
+{
+ DL_UDERROR_IND, M_PROTO type
+ (or M_PCPROTO type if LLI-based provider)
+}
+type
+ dl_uderror_ind_tPtr = ^dl_uderror_ind_t;
+ dl_uderror_ind_t = record
+ dl_primitive: UInt32; { DL_UDERROR_IND }
+ dl_dest_addr_length: UInt32; { Destination DLSAP }
+ dl_dest_addr_offset: UInt32; { Offset from beg. of block }
+ dl_unix_errno: UInt32; { unix system error code}
+ dl_errno: UInt32; { DLPI error code }
+ end;
+{ DL_UDQOS_REQ, M_PROTO type}
+type
+ dl_udqos_req_tPtr = ^dl_udqos_req_t;
+ dl_udqos_req_t = record
+ dl_primitive: UInt32; { DL_UDQOS_REQ }
+ dl_qos_length: UInt32; { length in bytes of requested qos}
+ dl_qos_offset: UInt32; { offset from beg. of block }
+ end;
+{ Primitives to handle XID and TEST operations}
+{ DL_TEST_REQ, M_PROTO type}
+
+type
+ dl_test_req_tPtr = ^dl_test_req_t;
+ dl_test_req_t = record
+ dl_primitive: UInt32; { DL_TEST_REQ }
+ dl_flag: UInt32; { poll/final }
+ dl_dest_addr_length: UInt32; { DLSAP length of dest. user }
+ dl_dest_addr_offset: UInt32; { offset from beg. of block }
+ end;
+{ DL_TEST_IND, M_PROTO type}
+type
+ dl_test_ind_tPtr = ^dl_test_ind_t;
+ dl_test_ind_t = record
+ dl_primitive: UInt32; { DL_TEST_IND }
+ dl_flag: UInt32; { poll/final }
+ dl_dest_addr_length: UInt32; { dlsap length of dest. user }
+ dl_dest_addr_offset: UInt32; { offset from beg. of block }
+ dl_src_addr_length: UInt32; { dlsap length of source user }
+ dl_src_addr_offset: UInt32; { offset from beg. of block }
+ end;
+{ DL_TEST_RES, M_PROTO type}
+type
+ dl_test_res_tPtr = ^dl_test_res_t;
+ dl_test_res_t = record
+ dl_primitive: UInt32; { DL_TEST_RES }
+ dl_flag: UInt32; { poll/final }
+ dl_dest_addr_length: UInt32; { DLSAP length of dest. user }
+ dl_dest_addr_offset: UInt32; { offset from beg. of block }
+ end;
+{ DL_TEST_CON, M_PROTO type}
+type
+ dl_test_con_tPtr = ^dl_test_con_t;
+ dl_test_con_t = record
+ dl_primitive: UInt32; { DL_TEST_CON }
+ dl_flag: UInt32; { poll/final }
+ dl_dest_addr_length: UInt32; { dlsap length of dest. user }
+ dl_dest_addr_offset: UInt32; { offset from beg. of block }
+ dl_src_addr_length: UInt32; { dlsap length of source user }
+ dl_src_addr_offset: UInt32; { offset from beg. of block }
+ end;
+{ DL_XID_REQ, M_PROTO type}
+type
+ dl_xid_req_tPtr = ^dl_xid_req_t;
+ dl_xid_req_t = record
+ dl_primitive: UInt32; { DL_XID_REQ }
+ dl_flag: UInt32; { poll/final }
+ dl_dest_addr_length: UInt32; { dlsap length of dest. user }
+ dl_dest_addr_offset: UInt32; { offset from beg. of block }
+ end;
+{ DL_XID_IND, M_PROTO type}
+type
+ dl_xid_ind_tPtr = ^dl_xid_ind_t;
+ dl_xid_ind_t = record
+ dl_primitive: UInt32; { DL_XID_IND }
+ dl_flag: UInt32; { poll/final }
+ dl_dest_addr_length: UInt32; { dlsap length of dest. user }
+ dl_dest_addr_offset: UInt32; { offset from beg. of block }
+ dl_src_addr_length: UInt32; { dlsap length of source user }
+ dl_src_addr_offset: UInt32; { offset from beg. of block }
+ end;
+{ DL_XID_RES, M_PROTO type}
+type
+ dl_xid_res_tPtr = ^dl_xid_res_t;
+ dl_xid_res_t = record
+ dl_primitive: UInt32; { DL_XID_RES }
+ dl_flag: UInt32; { poll/final }
+ dl_dest_addr_length: UInt32; { DLSAP length of dest. user }
+ dl_dest_addr_offset: UInt32; { offset from beg. of block }
+ end;
+{ DL_XID_CON, M_PROTO type}
+type
+ dl_xid_con_tPtr = ^dl_xid_con_t;
+ dl_xid_con_t = record
+ dl_primitive: UInt32; { DL_XID_CON }
+ dl_flag: UInt32; { poll/final }
+ dl_dest_addr_length: UInt32; { dlsap length of dest. user }
+ dl_dest_addr_offset: UInt32; { offset from beg. of block }
+ dl_src_addr_length: UInt32; { dlsap length of source user }
+ dl_src_addr_offset: UInt32; { offset from beg. of block }
+ end;
+{ ACKNOWLEDGED CONNECTIONLESS SERVICE PRIMITIVES}
+
+{ DL_DATA_ACK_REQ, M_PROTO type}
+
+type
+ dl_data_ack_req_tPtr = ^dl_data_ack_req_t;
+ dl_data_ack_req_t = record
+ dl_primitive: UInt32; { DL_DATA_ACK_REQ }
+ dl_correlation: UInt32; { User's correlation token }
+ dl_dest_addr_length: UInt32; { length of destination addr }
+ dl_dest_addr_offset: UInt32; { offset from beginning of block }
+ dl_src_addr_length: UInt32; { length of source address }
+ dl_src_addr_offset: UInt32; { offset from beginning of block }
+ dl_priority: UInt32; { priority }
+ dl_service_class: UInt32; { DL_RQST_RSP or DL_RQST_NORSP }
+ end;
+{ DL_DATA_ACK_IND, M_PROTO type}
+type
+ dl_data_ack_ind_tPtr = ^dl_data_ack_ind_t;
+ dl_data_ack_ind_t = record
+ dl_primitive: UInt32; { DL_DATA_ACK_IND }
+ dl_dest_addr_length: UInt32; { length of destination addr }
+ dl_dest_addr_offset: UInt32; { offset from beginning of block }
+ dl_src_addr_length: UInt32; { length of source address }
+ dl_src_addr_offset: UInt32; { offset from beginning of block }
+ dl_priority: UInt32; { priority for data unit transm. }
+ dl_service_class: UInt32; { DL_RQST_RSP or DL_RQST_NORSP }
+ end;
+{ DL_DATA_ACK_STATUS_IND, M_PROTO type}
+type
+ dl_data_ack_status_ind_tPtr = ^dl_data_ack_status_ind_t;
+ dl_data_ack_status_ind_t = record
+ dl_primitive: UInt32; { DL_DATA_ACK_STATUS_IND }
+ dl_correlation: UInt32; { User's correlation token }
+ dl_status: UInt32; { success or failure of previous req}
+ end;
+{ DL_REPLY_REQ, M_PROTO type}
+type
+ dl_reply_req_tPtr = ^dl_reply_req_t;
+ dl_reply_req_t = record
+ dl_primitive: UInt32; { DL_REPLY_REQ }
+ dl_correlation: UInt32; { User's correlation token }
+ dl_dest_addr_length: UInt32; { length of destination address }
+ dl_dest_addr_offset: UInt32; { offset from beginning of block }
+ dl_src_addr_length: UInt32; { source address length }
+ dl_src_addr_offset: UInt32; { offset from beginning of block }
+ dl_priority: UInt32; { priority for data unit transmission}
+ dl_service_class: UInt32;
+ end;
+{ DL_REPLY_IND, M_PROTO type}
+type
+ dl_reply_ind_tPtr = ^dl_reply_ind_t;
+ dl_reply_ind_t = record
+ dl_primitive: UInt32; { DL_REPLY_IND }
+ dl_dest_addr_length: UInt32; { length of destination address }
+ dl_dest_addr_offset: UInt32; { offset from beginning of block}
+ dl_src_addr_length: UInt32; { length of source address }
+ dl_src_addr_offset: UInt32; { offset from beginning of block }
+ dl_priority: UInt32; { priority for data unit transmission}
+ dl_service_class: UInt32; { DL_RQST_RSP or DL_RQST_NORSP }
+ end;
+{ DL_REPLY_STATUS_IND, M_PROTO type}
+type
+ dl_reply_status_ind_tPtr = ^dl_reply_status_ind_t;
+ dl_reply_status_ind_t = record
+ dl_primitive: UInt32; { DL_REPLY_STATUS_IND }
+ dl_correlation: UInt32; { User's correlation token }
+ dl_status: UInt32; { success or failure of previous req}
+ end;
+{ DL_REPLY_UPDATE_REQ, M_PROTO type}
+type
+ dl_reply_update_req_tPtr = ^dl_reply_update_req_t;
+ dl_reply_update_req_t = record
+ dl_primitive: UInt32; { DL_REPLY_UPDATE_REQ }
+ dl_correlation: UInt32; { user's correlation token }
+ dl_src_addr_length: UInt32; { length of source address }
+ dl_src_addr_offset: UInt32; { offset from beginning of block }
+ end;
+{ DL_REPLY_UPDATE_STATUS_IND, M_PROTO type}
+type
+ dl_reply_update_status_ind_tPtr = ^dl_reply_update_status_ind_t;
+ dl_reply_update_status_ind_t = record
+ dl_primitive: UInt32; { DL_REPLY_UPDATE_STATUS_IND }
+ dl_correlation: UInt32; { User's correlation token }
+ dl_status: UInt32; { success or failure of previous req}
+ end;
+ DL_primitivesPtr = ^DL_primitives;
+ DL_primitives = record
+ case SInt16 of
+ 0: (
+ dl_primitive: UInt32;
+ );
+ 1: (
+ info_req: dl_info_req_t;
+ );
+ 2: (
+ info_ack: dl_info_ack_t;
+ );
+ 3: (
+ attach_req: dl_attach_req_t;
+ );
+ 4: (
+ detach_req: dl_detach_req_t;
+ );
+ 5: (
+ bind_req: dl_bind_req_t;
+ );
+ 6: (
+ bind_ack: dl_bind_ack_t;
+ );
+ 7: (
+ unbind_req: dl_unbind_req_t;
+ );
+ 8: (
+ subs_bind_req: dl_subs_bind_req_t;
+ );
+ 9: (
+ subs_bind_ack: dl_subs_bind_ack_t;
+ );
+ 10: (
+ subs_unbind_req: dl_subs_unbind_req_t;
+ );
+ 11: (
+ ok_ack: dl_ok_ack_t;
+ );
+ 12: (
+ error_ack: dl_error_ack_t;
+ );
+ 13: (
+ connect_req: dl_connect_req_t;
+ );
+ 14: (
+ connect_ind: dl_connect_ind_t;
+ );
+ 15: (
+ connect_res: dl_connect_res_t;
+ );
+ 16: (
+ connect_con: dl_connect_con_t;
+ );
+ 17: (
+ token_req: dl_token_req_t;
+ );
+ 18: (
+ token_ack: dl_token_ack_t;
+ );
+ 19: (
+ disconnect_req: dl_disconnect_req_t;
+ );
+ 20: (
+ disconnect_ind: dl_disconnect_ind_t;
+ );
+ 21: (
+ reset_req: dl_reset_req_t;
+ );
+ 22: (
+ reset_ind: dl_reset_ind_t;
+ );
+ 23: (
+ reset_res: dl_reset_res_t;
+ );
+ 24: (
+ reset_con: dl_reset_con_t;
+ );
+ 25: (
+ unitdata_req: dl_unitdata_req_t;
+ );
+ 26: (
+ unitdata_ind: dl_unitdata_ind_t;
+ );
+ 27: (
+ uderror_ind: dl_uderror_ind_t;
+ );
+ 28: (
+ udqos_req: dl_udqos_req_t;
+ );
+ 29: (
+ enabmulti_req: dl_enabmulti_req_t;
+ );
+ 30: (
+ disabmulti_req: dl_disabmulti_req_t;
+ );
+ 31: (
+ promiscon_req: dl_promiscon_req_t;
+ );
+ 32: (
+ promiscoff_req: dl_promiscoff_req_t;
+ );
+ 33: (
+ physaddr_req: dl_phys_addr_req_t;
+ );
+ 34: (
+ physaddr_ack: dl_phys_addr_ack_t;
+ );
+ 35: (
+ set_physaddr_req: dl_set_phys_addr_req_t;
+ );
+ 36: (
+ get_statistics_req: dl_get_statistics_req_t;
+ );
+ 37: (
+ get_statistics_ack: dl_get_statistics_ack_t;
+ );
+ 38: (
+ test_req: dl_test_req_t;
+ );
+ 39: (
+ test_ind: dl_test_ind_t;
+ );
+ 40: (
+ test_res: dl_test_res_t;
+ );
+ 41: (
+ test_con: dl_test_con_t;
+ );
+ 42: (
+ xid_req: dl_xid_req_t;
+ );
+ 43: (
+ xid_ind: dl_xid_ind_t;
+ );
+ 44: (
+ xid_res: dl_xid_res_t;
+ );
+ 45: (
+ xid_con: dl_xid_con_t;
+ );
+ 46: (
+ data_ack_req: dl_data_ack_req_t;
+ );
+ 47: (
+ data_ack_ind: dl_data_ack_ind_t;
+ );
+ 48: (
+ data_ack_status_ind: dl_data_ack_status_ind_t;
+ );
+ 49: (
+ reply_req: dl_reply_req_t;
+ );
+ 50: (
+ reply_ind: dl_reply_ind_t;
+ );
+ 51: (
+ reply_status_ind: dl_reply_status_ind_t;
+ );
+ 52: (
+ reply_update_req: dl_reply_update_req_t;
+ );
+ 53: (
+ reply_update_status_ind: dl_reply_update_status_ind_t;
+ );
+ end;
+const
+ DL_INFO_REQ_SIZE = SizeOf(dl_info_req_t);
+ DL_INFO_ACK_SIZE = SizeOf(dl_info_ack_t);
+ DL_ATTACH_REQ_SIZE = SizeOf(dl_attach_req_t);
+ DL_DETACH_REQ_SIZE = SizeOf(dl_detach_req_t);
+ DL_BIND_REQ_SIZE = SizeOf(dl_bind_req_t);
+ DL_BIND_ACK_SIZE = SizeOf(dl_bind_ack_t);
+ DL_UNBIND_REQ_SIZE = SizeOf(dl_unbind_req_t);
+ DL_SUBS_BIND_REQ_SIZE = SizeOf(dl_subs_bind_req_t);
+ DL_SUBS_BIND_ACK_SIZE = SizeOf(dl_subs_bind_ack_t);
+ DL_SUBS_UNBIND_REQ_SIZE = SizeOf(dl_subs_unbind_req_t);
+ DL_OK_ACK_SIZE = SizeOf(dl_ok_ack_t);
+ DL_ERROR_ACK_SIZE = SizeOf(dl_error_ack_t);
+ DL_CONNECT_REQ_SIZE = SizeOf(dl_connect_req_t);
+ DL_CONNECT_IND_SIZE = SizeOf(dl_connect_ind_t);
+ DL_CONNECT_RES_SIZE = SizeOf(dl_connect_res_t);
+ DL_CONNECT_CON_SIZE = SizeOf(dl_connect_con_t);
+ DL_TOKEN_REQ_SIZE = SizeOf(dl_token_req_t);
+ DL_TOKEN_ACK_SIZE = SizeOf(dl_token_ack_t);
+ DL_DISCONNECT_REQ_SIZE = SizeOf(dl_disconnect_req_t);
+ DL_DISCONNECT_IND_SIZE = SizeOf(dl_disconnect_ind_t);
+ DL_RESET_REQ_SIZE = SizeOf(dl_reset_req_t);
+ DL_RESET_IND_SIZE = SizeOf(dl_reset_ind_t);
+ DL_RESET_RES_SIZE = SizeOf(dl_reset_res_t);
+ DL_RESET_CON_SIZE = SizeOf(dl_reset_con_t);
+ DL_UNITDATA_REQ_SIZE = SizeOf(dl_unitdata_req_t);
+ DL_UNITDATA_IND_SIZE = SizeOf(dl_unitdata_ind_t);
+ DL_UDERROR_IND_SIZE = SizeOf(dl_uderror_ind_t);
+ DL_UDQOS_REQ_SIZE = SizeOf(dl_udqos_req_t);
+ DL_ENABMULTI_REQ_SIZE = SizeOf(dl_enabmulti_req_t);
+ DL_DISABMULTI_REQ_SIZE = SizeOf(dl_disabmulti_req_t);
+ DL_PROMISCON_REQ_SIZE = SizeOf(dl_promiscon_req_t);
+ DL_PROMISCOFF_REQ_SIZE = SizeOf(dl_promiscoff_req_t);
+ DL_PHYS_ADDR_REQ_SIZE = SizeOf(dl_phys_addr_req_t);
+ DL_PHYS_ADDR_ACK_SIZE = SizeOf(dl_phys_addr_ack_t);
+ DL_SET_PHYS_ADDR_REQ_SIZE = SizeOf(dl_set_phys_addr_req_t);
+ DL_GET_STATISTICS_REQ_SIZE = SizeOf(dl_get_statistics_req_t);
+ DL_GET_STATISTICS_ACK_SIZE = SizeOf(dl_get_statistics_ack_t);
+ DL_XID_REQ_SIZE = SizeOf(dl_xid_req_t);
+ DL_XID_IND_SIZE = SizeOf(dl_xid_ind_t);
+ DL_XID_RES_SIZE = SizeOf(dl_xid_res_t);
+ DL_XID_CON_SIZE = SizeOf(dl_xid_con_t);
+ DL_TEST_REQ_SIZE = SizeOf(dl_test_req_t);
+ DL_TEST_IND_SIZE = SizeOf(dl_test_ind_t);
+ DL_TEST_RES_SIZE = SizeOf(dl_test_res_t);
+ DL_TEST_CON_SIZE = SizeOf(dl_test_con_t);
+ DL_DATA_ACK_REQ_SIZE = SizeOf(dl_data_ack_req_t);
+ DL_DATA_ACK_IND_SIZE = SizeOf(dl_data_ack_ind_t);
+ DL_DATA_ACK_STATUS_IND_SIZE = SizeOf(dl_data_ack_status_ind_t);
+ DL_REPLY_REQ_SIZE = SizeOf(dl_reply_req_t);
+ DL_REPLY_IND_SIZE = SizeOf(dl_reply_ind_t);
+ DL_REPLY_STATUS_IND_SIZE = SizeOf(dl_reply_status_ind_t);
+ DL_REPLY_UPDATE_REQ_SIZE = SizeOf(dl_reply_update_req_t);
+ DL_REPLY_UPDATE_STATUS_IND_SIZE = SizeOf(dl_reply_update_status_ind_t);
+
+const
+ DL_IOC_HDR_INFO = $6C0A; { Fast path request }
+
+{ ***** From the Mentat "modnames.h" *****}
+
+
+const
+ MI_AFU_NAME = 'afu';
+const
+ MI_AHARP_NAME = 'ahar';
+const
+ MI_AHENET_NAME = 'ahen';
+const
+ MI_ARP_NAME = 'arp';
+const
+ MI_ARPM_NAME = 'arpm';
+const
+ MI_COURMUX_NAME = 'courmux';
+const
+ MI_CLONE_NAME = 'clone';
+const
+ MI_DLB_NAME = 'dlb';
+const
+ MI_DLM_NAME = 'dlm';
+const
+ MI_DMODD_NAME = 'disdlpi';
+const
+ MI_DMODT_NAME = 'distpi';
+const
+ MI_DN_NAME = 'dn';
+const
+ MI_DNF_NAME = 'dnf';
+const
+ MI_DRVE_NAME = 'drve';
+const
+ MI_ECHO_NAME = 'echo';
+const
+ MI_ENXR_NAME = 'enxr';
+const
+ MI_RAWIP_NAME = 'rawip';
+const
+ MI_RAWIPM_NAME = 'rawipm';
+const
+ MI_HAVOC_NAME = 'havoc';
+const
+ MI_HAVOCM_NAME = 'havocm';
+const
+ MI_IP_NAME = 'ip';
+const
+ MI_IPM_NAME = 'ipm';
+const
+ MI_IPX_NAME = 'ipx';
+const
+ MI_LOG_NAME = 'log';
+const
+ MI_MODE_NAME = 'mode';
+const
+ MI_MUX_NAME = 'mux';
+const
+ MI_NECHO_NAME = 'necho';
+const
+ MI_NPEP_NAME = 'npep';
+const
+ MI_NULS_NAME = 'nuls';
+const
+ MI_NULZ_NAME = 'nulz';
+const
+ MI_PASS_NAME = 'pass';
+const
+ MI_PIPEMOD_NAME = 'pipemod';
+const
+ MI_SAD_NAME = 'sad';
+const
+ MI_SC_NAME = 'sc';
+const
+ MI_SOCKMOD_NAME = 'sockmod';
+const
+ MI_SPASS_NAME = 'spass';
+const
+ MI_SPX_NAME = 'spx';
+const
+ MI_STH_NAME = 'mi_sth';
+const
+ MI_TCP_NAME = 'tcp';
+const
+ MI_TCPM_NAME = 'tcpm';
+const
+ MI_TIMOD_NAME = 'timod';
+const
+ MI_TIRDWR_NAME = 'tirdwr';
+const
+ MI_TMOD_NAME = 'tmod';
+const
+ MI_TMUX_NAME = 'tmux';
+const
+ MI_TPIT_NAME = 'tpit';
+const
+ MI_TRSR_NAME = 'trsr';
+const
+ MI_TRXR_NAME = 'trxr';
+const
+ MI_UDP_NAME = 'udp';
+const
+ MI_UDPM_NAME = 'udpm';
+const
+ MI_WELD_NAME = 'mi_weld';
+const
+ MI_XDG_NAME = 'xdg';
+const
+ MI_XECHO_NAME = 'xecho';
+const
+ MI_XF_NAME = 'xf';
+const
+ MI_XFIPX_NAME = 'xfipx';
+const
+ MI_XFXNS_NAME = 'xfxns';
+const
+ MI_XPE_NAME = 'xpe';
+const
+ MI_XS_NAME = 'xs';
+const
+ MI_XTINDG_NAME = 'xtindg';
+const
+ MI_XTINVC_NAME = 'xtinvc';
+const
+ MI_XTM_NAME = 'xtm';
+const
+ MI_XTMIP_NAME = 'xtmip';
+
+const
+ MI_AFU_DEVICE = '/dev/afu';
+const
+ MI_ARP_DEVICE = '/dev/arp';
+const
+ MI_COURMUX_DEVICE = '/dev/courmux';
+const
+ MI_CLONE_DEVICE = '/dev/clone';
+const
+ MI_DLB_DEVICE = '/dev/dlb';
+const
+ MI_DN_DEVICE = '/dev/dn';
+const
+ MI_DNF_DEVICE = '/dev/dnf';
+const
+ MI_DRVE_DEVICE = '/dev/drve';
+const
+ MI_ECHO_DEVICE = '/dev/echo';
+const
+ MI_RAWIP_DEVICE = '/dev/rawip';
+const
+ MI_HAVOC_DEVICE = '/dev/havoc';
+const
+ MI_IP_DEVICE = '/dev/ip';
+const
+ MI_IPX_DEVICE = '/dev/ipx';
+const
+ MI_LOG_DEVICE = '/dev/log';
+const
+ MI_MODE_DEVICE = '/dev/mode';
+const
+ MI_MUX_DEVICE = '/dev/mux';
+const
+ MI_NECHO_DEVICE = '/dev/necho';
+const
+ MI_NPEP_DEVICE = '/dev/npep';
+const
+ MI_NULS_DEVICE = '/dev/nuls';
+const
+ MI_NULZ_DEVICE = '/dev/nulz';
+const
+ MI_SAD_DEVICE = '/dev/sad';
+const
+ MI_SPX_DEVICE = '/dev/spx';
+const
+ MI_TCP_DEVICE = '/dev/tcp';
+const
+ MI_TMUX_DEVICE = '/dev/tmux';
+const
+ MI_TMUX0_DEVICE = '/dev/tmux#0';
+const
+ MI_TMUX1_DEVICE = '/dev/tmux#1';
+const
+ MI_TPIT_DEVICE = '/dev/tpit';
+const
+ MI_UDP_DEVICE = '/dev/udp';
+const
+ MI_XDG_DEVICE = '/dev/xdg';
+const
+ MI_XECHO_DEVICE = '/dev/xecho';
+const
+ MI_XF_DEVICE = '/dev/xf';
+const
+ MI_XPE_DEVICE = '/dev/xpe';
+const
+ MI_XS_DEVICE = '/dev/xs';
+const
+ MI_XTINDG_DEVICE = '/dev/xtindg';
+const
+ MI_XTINVC_DEVICE = '/dev/xtinvc';
+
+
+{ Streamtab entries }
+// #define MI_AFU_STREAMTAB afuinfo
+// #define MI_AHARP_STREAMTAB aharinfo
+// #define MI_AHENET_STREAMTAB aheninfo
+// #define MI_ARP_STREAMTAB arpinfo
+// #define MI_ARPM_STREAMTAB arpminfo
+// #define MI_COURMUX_STREAMTAB courmuxinfo
+// #define MI_CLONE_STREAMTAB cloneinfo
+// #define MI_DLB_STREAMTAB dlbinfo
+// #define MI_DLM_STREAMTAB dlminfo
+// #define MI_DMODD_STREAMTAB dmoddinfo
+// #define MI_DMODT_STREAMTAB dmodtinfo
+// #define MI_DN_STREAMTAB dninfo
+// #define MI_DNF_STREAMTAB dnfinfo
+// #define MI_DRVE_STREAMTAB drveinfo
+// #define MI_ECHO_STREAMTAB echoinfo
+// #define MI_ENXR_STREAMTAB enxrinfo
+// #define MI_HAVOC_STREAMTAB hvcinfo
+// #define MI_HAVOCM_STREAMTAB hvcminfo
+// #define MI_IP_STREAMTAB ipinfo
+// #define MI_IPM_STREAMTAB ipminfo
+// #define MI_IPX_STREAMTAB ipxinfo
+// #define MI_LOG_STREAMTAB loginfo
+// #define MI_MODE_STREAMTAB modeinfo
+// #define MI_MUX_STREAMTAB muxinfo
+// #define MI_NECHO_STREAMTAB nechoinfo
+// #define MI_NPEP_STREAMTAB npepinfo
+// #define MI_NULS_STREAMTAB nulsinfo
+// #define MI_NULZ_STREAMTAB nulzinfo
+// #define MI_PASS_STREAMTAB passinfo
+// #define MI_PIPEMOD_STREAMTAB pmodinfo
+// #define MI_RAWIP_STREAMTAB rawipinfo
+// #define MI_RAWIPM_STREAMTAB rawipminfo
+// #define MI_SAD_STREAMTAB sadinfo
+// #define MI_SC_STREAMTAB scinfo
+// #define MI_SOCKMOD_STREAMTAB sockmodinfo
+// #define MI_SPASS_STREAMTAB spassinfo
+// #define MI_SPX_STREAMTAB spxinfo
+// #define MI_STH_STREAMTAB mi_sthinfo
+// #define MI_TCP_STREAMTAB tcpinfo
+// #define MI_TCPM_STREAMTAB tcpminfo
+// #define MI_TIMOD_STREAMTAB timodinfo
+// #define MI_TIRDWR_STREAMTAB tirdwrinfo
+// #define MI_TMOD_STREAMTAB tmodinfo
+// #define MI_TMUX_STREAMTAB tmuxinfo
+// #define MI_TPIT_STREAMTAB tpitinfo
+// #define MI_TRSR_STREAMTAB trsrinfo
+// #define MI_TRXR_STREAMTAB trxrinfo
+// #define MI_UDP_STREAMTAB udpinfo
+// #define MI_UDPM_STREAMTAB udpminfo
+// #define MI_WELD_STREAMTAB mi_weldinfo
+// #define MI_XDG_STREAMTAB xdginfo
+// #define MI_XECHO_STREAMTAB xechoinfo
+// #define MI_XF_STREAMTAB xfinfo
+// #define MI_XFIPX_STREAMTAB xfipxinfo
+// #define MI_XFXNS_STREAMTAB xfxnsinfo
+// #define MI_XPE_STREAMTAB xpeinfo
+// #define MI_XS_STREAMTAB xsinfo
+// #define MI_XTINDG_STREAMTAB xtindginfo
+// #define MI_XTINVC_STREAMTAB xtinvcinfo
+// #define MI_XTM_STREAMTAB xtminfo
+// #define MI_XTMIP_STREAMTAB xtmipinfo
+
+
+// #define MI_AFU_DEVFLAG afudevflag
+// #define MI_AHARP_DEVFLAG ahardevflag
+// #define MI_AHENET_DEVFLAG ahendevflag
+// #define MI_ARP_DEVFLAG arpdevflag
+// #define MI_ARPM_DEVFLAG arpmdevflag
+// #define MI_COURMUX_DEVFLAG courmuxdevflag
+// #define MI_CLONE_DEVFLAG clonedevflag
+// #define MI_DLB_DEVFLAG dlbdevflag
+// #define MI_DLM_DEVFLAG dlmdevflag
+// #define MI_DMODD_DEVFLAG dmodddevflag
+// #define MI_DMODT_DEVFLAG dmodtdevflag
+// #define MI_DN_DEVFLAG dndevflag
+// #define MI_DNF_DEVFLAG dnfdevflag
+// #define MI_DRVE_DEVFLAG drvedevflag
+// #define MI_ECHO_DEVFLAG echodevflag
+// #define MI_ENXR_DEVFLAG enxrdevflag
+// #define MI_HAVOC_DEVFLAG hvcdevflag
+// #define MI_HAVOCM_DEVFLAG hvcmdevflag
+// #define MI_IP_DEVFLAG ipdevflag
+// #define MI_IPM_DEVFLAG ipmdevflag
+// #define MI_IPX_DEVFLAG ipxdevflag
+// #define MI_LOG_DEVFLAG logdevflag
+// #define MI_MODE_DEVFLAG modedevflag
+// #define MI_MUX_DEVFLAG muxdevflag
+// #define MI_NECHO_DEVFLAG nechodevflag
+// #define MI_NPEP_DEVFLAG npepdevflag
+// #define MI_NULS_DEVFLAG nulsdevflag
+// #define MI_NULZ_DEVFLAG nulzdevflag
+// #define MI_PASS_DEVFLAG passdevflag
+// #define MI_PIPEMOD_DEVFLAG pipemoddevflag
+// #define MI_RAWIP_DEVFLAG rawipdevflag
+// #define MI_RAWIPM_DEVFLAG rawipmdevflag
+
+// #define MI_SAD_DEVFLAG saddevflag
+// #define MI_SC_DEVFLAG scdevflag
+// #define MI_SOCKMOD_DEVFLAG sockmoddevflag
+// #define MI_SPASS_DEVFLAG spassdevflag
+// #define MI_SPX_DEVFLAG spxdevflag
+// #define MI_TCP_DEVFLAG tcpdevflag
+// #define MI_TCPM_DEVFLAG tcpmdevflag
+// #define MI_TIMOD_DEVFLAG timoddevflag
+// #define MI_TIRDWR_DEVFLAG tirdwrdevflag
+// #define MI_TMOD_DEVFLAG tmoddevflag
+// #define MI_TMUX_DEVFLAG tmuxdevflag
+// #define MI_TPIT_DEVFLAG tpitdevflag
+// #define MI_TRSR_DEVFLAG trsrdevflag
+// #define MI_TRXR_DEVFLAG trxrdevflag
+// #define MI_UDP_DEVFLAG udpdevflag
+// #define MI_UDPM_DEVFLAG udpmdevflag
+// #define MI_XDG_DEVFLAG xdgdevflag
+// #define MI_XECHO_DEVFLAG xechodevflag
+// #define MI_XF_DEVFLAG xfdevflag
+// #define MI_XFIPX_DEVFLAG xfipxdevflag
+// #define MI_XFXNS_DEVFLAG xfxnsdevflag
+// #define MI_XPE_DEVFLAG xpedevflag
+// #define MI_XS_DEVFLAG xsdevflag
+// #define MI_XTINDG_DEVFLAG xtindgdevflag
+// #define MI_XTINVC_DEVFLAG xtinvcdevflag
+// #define MI_XTM_DEVFLAG xtmdevflag
+// #define MI_XTMIP_DEVFLAG xtmipdevflag
+
+// #define MI_AFU_SQLVL SQLVL_QUEUEPAIR
+// #define MI_AHARP_SQLVL SQLVL_QUEUE
+// #define MI_AHENET_SQLVL SQLVL_QUEUE
+// #define MI_ARP_SQLVL SQLVL_MODULE
+// #define MI_ARPM_SQLVL SQLVL_MODULE
+// #define MI_COURMUX_SQLVL SQLVL_MODULE
+// #define MI_CLONE_SQLVL SQLVL_MODULE
+// #define MI_DLB_SQLVL SQLVL_QUEUE
+// #define MI_DLM_SQLVL SQLVL_QUEUE
+// #define MI_DMODD_SQLVL SQLVL_QUEUE
+// #define MI_DMODT_SQLVL SQLVL_QUEUE
+// #define MI_DN_SQLVL SQLVL_QUEUE
+// #define MI_DNF_SQLVL SQLVL_QUEUE
+// #define MI_DRVE_SQLVL SQLVL_QUEUEPAIR
+// #define MI_ECHO_SQLVL SQLVL_QUEUE
+// #define MI_ENXR_SQLVL SQLVL_QUEUE
+// #define MI_RAWIP_SQLVL SQLVL_QUEUE
+// #define MI_RAWIPM_SQLVL SQLVL_QUEUE
+// #define MI_HAVOC_SQLVL SQLVL_QUEUE
+// #define MI_HAVOCM_SQLVL SQLVL_QUEUE
+// #define MI_IP_SQLVL SQLVL_QUEUEPAIR
+// #define MI_IPM_SQLVL SQLVL_QUEUEPAIR
+// #define MI_IPX_SQLVL SQLVL_QUEUE
+// #define MI_LOG_SQLVL SQLVL_MODULE
+// #define MI_MODE_SQLVL SQLVL_QUEUEPAIR
+// #define MI_MUX_SQLVL SQLVL_MODULE
+// #define MI_NECHO_SQLVL SQLVL_QUEUE
+
+// #define MI_NPEP_SQLVL SQLVL_QUEUE
+// #define MI_NULS_SQLVL SQLVL_QUEUE
+// #define MI_NULZ_SQLVL SQLVL_QUEUE
+// #define MI_PASS_SQLVL SQLVL_QUEUE
+// #define MI_PIPEMOD_SQLVL SQLVL_QUEUE
+
+// #define MI_SAD_SQLVL SQLVL_MODULE
+// #define MI_SC_SQLVL SQLVL_QUEUE
+// #define MI_SOCKMOD_SQLVL SQLVL_QUEUEPAIR
+// #define MI_SPASS_SQLVL SQLVL_QUEUE
+// #define MI_SPX_SQLVL SQLVL_QUEUE
+// #define MI_TCP_SQLVL SQLVL_QUEUEPAIR
+// #define MI_TCPM_SQLVL SQLVL_QUEUEPAIR
+// #define MI_TIMOD_SQLVL SQLVL_QUEUEPAIR
+// #define MI_TIRDWR_SQLVL SQLVL_QUEUE
+// #define MI_TMOD_SQLVL SQLVL_QUEUEPAIR
+// #define MI_TMUX_SQLVL SQLVL_MODULE
+// #define MI_TPIT_SQLVL SQLVL_MODULE
+// #define MI_TRSR_SQLVL SQLVL_MODULE
+// #define MI_TRXR_SQLVL SQLVL_QUEUE
+// #define MI_UDP_SQLVL SQLVL_QUEUE
+// #define MI_UDPM_SQLVL SQLVL_QUEUE
+// #define MI_XDG_SQLVL SQLVL_QUEUE
+// #define MI_XECHO_SQLVL SQLVL_QUEUE
+// #define MI_XF_SQLVL SQLVL_MODULE
+// #define MI_XFIPX_SQLVL SQLVL_MODULE
+// #define MI_XFXNS_SQLVL SQLVL_MODULE
+// #define MI_XPE_SQLVL SQLVL_QUEUE
+// #define MI_XS_SQLVL SQLVL_QUEUEPAIR
+// #define MI_XTINDG_SQLVL SQLVL_QUEUEPAIR
+// #define MI_XTINVC_SQLVL SQLVL_QUEUEPAIR
+// #define MI_XTM_SQLVL SQLVL_QUEUEPAIR
+// #define MI_XTMIP_SQLVL SQLVL_QUEUEPAIR
+{ ***** Raw Streams *****}
+
+
+{
+ Flags used in the fType field of OTReadInfo for functions.
+ I've removed the terse and confusing comments in this header
+ file. For a full description, read "Open Transport Advanced
+ Client Programming".
+}
+
+const
+ kOTNoMessagesAvailable = $FFFFFFFF;
+ kOTAnyMsgType = $FFFFFFFE;
+ kOTDataMsgTypes = $FFFFFFFC;
+ kOTMProtoMsgTypes = $FFFFFFFB;
+ kOTOnlyMProtoMsgTypes = $FFFFFFFA;
+
+{
+ OTPutCommand, OTPutData, and OTPutWriteData flags.
+ These equates must not conflict with any of the other putmsg flags,
+ ie MSG_ANY, MSG_BAND, MSG_HIPRI, or RS_HIPRI.
+ ¥¥¥ These should probably move into whereever their
+ corresponding functions end up but, seeing as this
+ is APPLE_ONLY, I'm not too concerned ¥¥¥
+}
+const
+ RS_EXDATA = $20;
+ RS_ALLOWAGAIN = $40;
+ RS_DELIMITMSG = $80;
+
+{$ifc NOT OTKERNEL}
+{ StreamRef is an opaque reference to a raw stream.}
+
+type
+ StreamRef = UnivPtr;
+const
+ kOTInvalidStreamRef = nil;
+{ PollRef structure is used with the OTStreamPoll function.}
+type
+ PollRefPtr = ^PollRef;
+ PollRef = record
+ filler: SInt32; { holds a file descriptor an a UNIX system, replaced by ref (at end of structure) under OT}
+ events: SInt16;
+ revents: SInt16;
+ ref: StreamRef;
+ end;
+
+{ Poll masks for use with OTStreamPoll: }
+
+const
+ POLLIN = $001; { A non-priority message is available }
+ POLLPRI = $002; { A high priority message is available }
+ POLLOUT = $004; { The stream is writable for non-priority messages }
+ POLLERR = $008; { A error message has arrived }
+ POLLHUP = $010; { A hangup has occurred }
+ POLLNVAL = $020; { This fd is bogus }
+ POLLRDNORM = $040; { A non-priority message is available }
+ POLLRDBAND = $080; { A priority message (band > 0) message is available }
+ POLLWRNORM = $100; { Same as POLLOUT }
+ POLLWRBAND = $200; { A priority band exists and is writable }
+ POLLMSG = $400; { A signal message has reached the front of the queue }
+
+{ OTReadInfo structure is used with the various functions that read and peek at the stream head.}
+
+type
+ OTReadInfoPtr = ^OTReadInfo;
+ OTReadInfo = record
+ fType: UInt32;
+ fCommand: OTCommand;
+ fFiller: UInt32; { For compatibility with OT 1.0 and 1.1 }
+ fBytes: ByteCount;
+ fError: OSStatus;
+ end;
+{ Opening and closing raw streams}
+{
+ * OTStreamOpen()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTAsyncStreamOpen()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCreateStream()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTAsyncCreateStream()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTStreamClose()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Polling a stream for activity}
+
+{
+ * OTStreamPoll()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTAsyncStreamPoll()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Classic UNIX file descriptor operations}
+
+{
+ * OTStreamRead()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTStreamWrite()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTStreamIoctl()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTStreamPipe()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ there can be only 2!}
+{ Notifiers and modes of operation}
+{
+ * OTStreamInstallNotifier()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTStreamRemoveNotifier()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTStreamUseSyncIdleEvents()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTStreamSetBlocking()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTStreamSetNonBlocking()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTStreamIsBlocking()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTStreamSetSynchronous()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTStreamSetAsynchronous()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTStreamIsSynchronous()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ STREAMS primitives}
+
+{
+ * OTStreamGetMessage()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTStreamGetPriorityMessage()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTStreamPutMessage()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTStreamPutPriorityMessage()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Miscellaneous stuff}
+
+{
+ * OTStreamSetControlMask()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ Opening endpoints and mappers on a Stream - these calls are synchronous, and may
+ only be used at System Task time. Once the stream has been installed into a provider
+ or endpoint, you should not continue to use STREAMS APIs on it
+}
+
+{
+ * OTOpenProviderOnStream()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTOpenEndpointOnStream()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ To quote an earlier version of this header file:
+
+ Some functions that should only be used if
+ you really know what you're doing.
+}
+
+{
+ * OTRemoveStreamFromProvider()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTPeekMessage()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTReadMessage()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTPutBackBuffer()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTPutBackPartialBuffer()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{$endc} { !OTKERNEL }
+
+{$endc} { CALL_NOT_IN_CARBON }
+
+{ ***** Port Utilities *****}
+{$ifc NOT OTKERNEL}
+{
+ These types and routines are used during sophisticated
+ port management. High-level clients may get involved
+ for things like request a port to be yielding, but typically
+ this stuff is used by protocol infrastructure.
+}
+{
+ OTPortCloseStruct is used when processing the kOTClosePortRequest
+ and kOTYieldPortRequest events.
+}
+
+type
+ OTPortCloseStructPtr = ^OTPortCloseStruct;
+ OTPortCloseStruct = record
+ fPortRef: OTPortRef; { The port requested to be closed.}
+ fTheProvider: ProviderRef; { The provider using the port.}
+ fDenyReason: OSStatus; { Set to a negative number to deny the request}
+ end;
+{ OTClientList structure is used with the OTYieldPortRequest function.}
+type
+ OTClientListPtr = ^OTClientList;
+ OTClientList = record
+ fNumClients: ItemCount;
+ fBuffer: packed array [0..3] of UInt8;
+ end;
+{
+ Returns a buffer containing all of the clients that refused to yield the port.
+ "size" is the total number of bytes @ buffer, including the fNumClients field.
+}
+{
+ * OTYieldPortRequest()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Send a notification to all Open Transport registered clients}
+{
+ * OTNotifyAllClients()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Determine if "child" is a child port of "parent"}
+{
+ * OTIsDependentPort()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{$endc} { !OTKERNEL }
+
+{ ***** Timers ***** }
+{
+ STREAMS plug-ins code should not use these timers, instead
+ they should use timer messages, ie mi_timer etc.
+}
+
+{$ifc NOT OTKERNEL}
+
+type
+ OTTimerTask = SInt32;
+{
+ Under Carbon, OTCreateTimerTask takes a client context pointer. Applications may pass NULL
+ after calling InitOpenTransport(kInitOTForApplicationMask, ...). Non-applications must always pass a
+ valid client context.
+}
+{
+ * OTCreateTimerTaskInContext() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTCreateTimerTaskInContext( upp: OTProcessUPP; arg: UnivPtr; clientContext: OTClientContextPtr ): SInt32; external name '_OTCreateTimerTaskInContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTCreateTimerTask()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCancelTimerTask() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTCancelTimerTask( timerTask: OTTimerTask ): Boolean; external name '_OTCancelTimerTask';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTDestroyTimerTask() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure OTDestroyTimerTask( timerTask: OTTimerTask ); external name '_OTDestroyTimerTask';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTScheduleTimerTask() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OTScheduleTimerTask( timerTask: OTTimerTask; milliSeconds: OTTimeout ): Boolean; external name '_OTScheduleTimerTask';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ The following macro may be used by applications only.}
+// #define OTCreateTimerTask(upp, arg) OTCreateTimerTaskInContext(upp, arg, NULL)
+
+{$endc} { !OTKERNEL }
+
+{ ***** Miscellaneous Helpful Functions *****}
+
+{$ifc NOT OTKERNEL}
+{
+ These routines allow you to manipulate OT's buffer structures.
+ If you use no-copy receives (described in "OpenTransport.h")
+ you will need some of these routines, and may choose to use others.
+ See "Open Tranport Advanced Client Programming" for documentation.
+}
+{
+ * OTBufferDataSize() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTBufferDataSize( var buffer: OTBuffer ): OTByteCount; external name '_OTBufferDataSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTReadBuffer() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTReadBuffer( var buffer: OTBufferInfo; dest: UnivPtr; var len: OTByteCount ): Boolean; external name '_OTReadBuffer';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTReleaseBuffer() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+procedure OTReleaseBuffer( var buffer: OTBuffer ); external name '_OTReleaseBuffer';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * StoreIntoNetbuf()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * StoreMsgIntoNetbuf()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{$endc} { !OTKERNEL }
+
+{ ***** OTConfiguration *****}
+{$ifc CALL_NOT_IN_CARBON}
+{$ifc NOT OTKERNEL}
+{
+ As promised in "OpenTransport.h", here are the routines
+ for advanced operations on configurations.
+}
+{ Manipulating a configuration}
+
+{
+ * OTCfigNewConfiguration()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigDeleteConfiguration()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigCloneConfiguration()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigPushNewSingleChild()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigPushParent()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigPushChild()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigPopChild()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigGetChild()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigSetPath()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigNewChild()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigAddChild()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigRemoveChild()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigSetPortRef()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigChangeProviderName()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Query a configuration}
+
+{
+ * OTCfigNumberOfChildren()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigGetParent()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigGetOptionNetbuf()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigGetPortRef()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigGetInstallFlags()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigGetProviderName()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCfigIsPort()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{$endc} { !OTKERNEL }
+
+{ ***** Configurators *****}
+{
+ The kOTConfiguratorInterfaceID define is what you need to add to your
+ export file for the "interfaceID = " clause to export a configurator
+ for ASLM. Similarly, kOTConfiguratorCFMTag is used for CFM-based
+ configurators.
+}
+
+
+// #define kOTConfiguratorInterfaceID kOTClientPrefix "cfigMkr"
+// #define kOTConfiguratorCFMTag kOTClientPrefix "cfigMkr"
+
+{$ifc NOT OTKERNEL}
+type
+ TOTConfiguratorRef = ^SInt32; { an opaque 32-bit type }
+ TOTConfiguratorRefPtr = ^TOTConfiguratorRef;
+{
+ Typedef for the OTCanConfigure function, and the enum for which pass we're doing.
+ The first (kOTSpecificConfigPass) is to give configurators a shot at the configuration
+ before we start allowing the generic configurators to get into the act.
+}
+const
+ kOTSpecificConfigPass = 0;
+ kOTGenericConfigPass = 1;
+
+type
+ OTCanConfigureProcPtr = function( cfig: OTConfigurationRef; pass: UInt32 ): Boolean;
+{ Typedef for the function to create and return a configurator object}
+type
+ OTCreateConfiguratorProcPtr = function( var cfigor: TOTConfiguratorRef ): OSStatus;
+{
+ Typedef for the "OTSetupConfigurator" function that your configurator library must export.
+ The enum is for the type of configurator that it is.
+}
+const
+ kOTSetupConfiguratorID = 'OTSetupConfigurator';
+const
+ kOTDefaultConfigurator = 0;
+ kOTProtocolFamilyConfigurator = 1;
+ kOTLinkDriverConfigurator = 2;
+
+type
+ OTSetupConfiguratorProcPtr = function( var canConfigure: OTCanConfigureProcPtr; var createConfigurator: OTCreateConfiguratorProcPtr; var configuratorType: UInt8 ): OSStatus;
+{
+ Procedure pointer definitions for the three key callbacks associated
+ with a configurator, as established by OTNewConfigurator.
+}
+type
+ OTCFConfigureProcPtr = function( cfigor: TOTConfiguratorRef; cfig: OTConfigurationRef ): OSStatus;
+ OTCFCreateStreamProcPtr = function( cfigor: TOTConfiguratorRef; cfig: OTConfigurationRef; oFlags: OTOpenFlags; proc: OTNotifyUPP; contextPtr: UnivPtr ): OSStatus;
+ OTCFHandleSystemEventProcPtr = procedure( cfigor: TOTConfiguratorRef; code: OTEventCode; result: OTResult; cookie: UnivPtr );
+{
+ Determine if this instance of your configurator is the "master"
+ (the one that can create and destroy control streams)
+}
+{
+ * OTIsMasterConfigurator()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Get back the userData you passed in to OTNewConfigurator}
+{
+ * OTGetConfiguratorUserData()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Create a configurator object for use by Open Transport}
+{
+ * OTNewConfigurator()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Delete a configurator object created by OTNewConfigurator}
+{
+ * OTDeleteConfigurator()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ A utility function to send notifications to the user - it takes care of calls
+ from deferred tasks
+}
+{
+ * OTNotifyUser()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Call when the configurator unloads from memory}
+{
+ * OTConfiguratorUnloaded()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ Call to create your control stream if you're not the master
+ configurator. You can also use the state machine function
+ OTSMCreateControlStream(OTStateMachine*, OTConfigurationRef, TOTConfiguratorRef cfigor).
+}
+{
+ * OTCreateControlStream()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ A helpful function for the configurators to
+ be able to recursively configure the children.
+}
+{
+ * OTConfigureChildren()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Allocate a bit in the system-wide control mask for streams.}
+{
+ * OTNewControlMask()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Warning: These 2 APIs is going away}
+{
+ * OTCloseProvidersByUseCount()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCloseProvidersByPortRef()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ These are the "real" APIs}
+{
+ * OTCloseProviderByStream()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTCloseMatchingProviders()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ The following defines are for use in building an 'epcf' resource: }
+
+{ Defines for fFlags field: }
+const
+ kIsReliable = $00000001;
+ kIsNotReliable = $00000002;
+ kSupportsOrderlyRelease = $00000004;
+
+{ Defines for fProtocolType field: }
+ kStream = $0001;
+ kUStream = $0002;
+ kTransaction = $0004;
+ kUTransaction = $0008;
+ kMapper = $0010;
+ kGenericProtocol = $0020;
+
+{ Defines for optionType field: }
+const
+ kBooleanOption = 0;
+const
+ kUnsignedValueOption = 1;
+const
+ kSignedValueOption = 2;
+const
+ kHexValueOption = 3;
+const
+ kPrintableStringOption = 4;
+const
+ kOctetStringOption = 5;
+
+{ Defines for fUpperInterface and fLowerInterface: }
+const
+ kTPIInterface = $54504920 (* 'TPI ' *);
+ kDLPIInterface = $444C5049 (* 'DLPI' *);
+ kMapperInterface = $4D415052 (* 'MAPR' *);
+ kPrivateInterface = -1;
+const
+ kNoInterface = 0;
+
+
+{$endc} { !OTKERNEL }
+
+{$endc} { CALL_NOT_IN_CARBON }
+
+{ ***** OTStateMachine *****}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ This utility set allows you to write an asynchronous chain of code that looks
+ somewhat like it is synchronous. This is primarily used for plumbing
+ streams asynchronously, especially in configurators
+}
+{$ifc NOT OTKERNEL}
+{ Alas, the state machine is only available to client code. Sorry.}
+
+{
+ There are 12 or 8 bytes of reserved space at the front of
+ the OTStateMachine structure, depending on whether you're
+ building PowerPC or 68K code.. The OTStateMachineDataPad
+ type compensates for this.
+}
+
+{$ifc TARGET_CPU_PPC}
+type
+ OTStateMachineDataPad = packed array [0..11] of UInt8;
+{$elsec}
+type
+ OTStateMachineDataPad = packed array [0..7] of UInt8;
+{$endc} {TARGET_CPU_PPC}
+
+{
+ Forward define OTStateMachine so that OTStateProcPtr has
+ access to it.
+}
+type
+ OTStateMachinePtr = ^OTStateMachine;
+{
+ This type is is the required prototype of a state machine
+ entry point.
+}
+ OTStateProcPtr = procedure( var sm: OTStateMachine );
+{
+ This type defines a routine that the state machine will
+ call when the top level completes.
+}
+ OTSMCompleteProcPtr = procedure( contextPtr: UnivPtr );
+{ And now for the state machine structure itself.}
+ OTStateMachine = record
+ fData: OTStateMachineDataPad;
+ fCookie: UnivPtr;
+ fCode: OTEventCode;
+ fResult: OTResult;
+ end;
+
+// #define kOTSMBufferSize(callDepth) (80 + (callDepth * 8))
+{
+ For structSize, pass the size of your structure that you want associated with
+ the state machine. It can later be obtained by calling OTSMGetClientData.
+ For bufSize, use the kOTSMBufferSize macro, plus the size of your structure
+ to create a buffer on the stack. For synchronous calls, the stack buffer will
+ be used (unless you pass in NULL). The callDepth is the depth level of nested
+ calls using OTSMCallStateProc.
+}
+{
+ * OTCreateStateMachine()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTDestroyStateMachine()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ OTSMCallStateProc used to take a parameter of type UInt16_p,
+ which was defined to be the same as UInt32. In an attempt
+ to reduce the number of wacky types defined by the OT
+ interfaces, we've changed these routines to just take a
+ straight UInt32. You should be warned that the current
+ implementation does not support values outside of the
+ range 0..32767. The same applies to OTSMSetState.
+}
+
+{
+ * OTSMCallStateProc()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTSMGetState()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTSMSetState()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Fill out the fCookie, fCode, and fResult fields before calling!}
+{
+ * OTSMComplete()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTSMPopCallback()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTSMWaitForComplete()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTSMCreateStream()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTSMOpenStream()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTSMIoctl()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTSMPutMessage()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTSMGetMessage()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTSMReturnToCaller()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTSMGetClientData()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTSMInstallCompletionProc()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * OTSMCreateControlStream()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{$endc} { !OTKERNEL }
+
+{ ***** Autopush Definitions *****}
+{
+ The autopush functionality for Open Transport is based on the names of
+ devices and modules, rather than on the major number information like
+ SVR4. This is so that autopush information can be set up for modules
+ that are not yet loaded.
+}
+
+
+{ The name of the STREAMS driver you open and send the ioctls to.}
+const
+ kSADModuleName = 'sad';
+{ Autopush ioctls.}
+const
+ I_SAD_SAP = $6701; { Set autopush information }
+ I_SAD_GAP = $6702; { Get autopush information }
+ I_SAD_VML = $6703; { Validate a list of modules (uses str_list structure) }
+
+{ Maximum number of modules autopushed on a driver.}
+
+const
+ kOTAutopushMax = 8;
+
+
+{ ioctl structure used for SAD_SAP and SAD_GAP commands.}
+
+type
+ OTAutopushInfoPtr = ^OTAutopushInfo;
+ OTAutopushInfo = record
+ sap_cmd: UInt32;
+ sap_device_name: packed array [0..31] of char;
+ sap_minor: SInt32;
+ sap_lastminor: SInt32;
+ sap_npush: SInt32;
+ sap_list: packed array [0..7,0..31] of char;
+ end;
+{ Command values for sap_cmd field of the above.}
+const
+ kSAP_ONE = 1; { Configure a single minor device }
+ kSAP_RANGE = 2; { Configure a range of minor devices }
+ kSAP_ALL = 3; { Configure all minor devices }
+ kSAP_CLEAR = 4; { Clear autopush information }
+
+
+{ ***** Configuration Helpers *****}
+
+{
+ These definitions are used by device driver and port scanner
+ developers to provide a library giving client-side information about
+ the registered ports, such as a user-visible name or an icon.
+}
+
+{ Configuration helper library prefix}
+
+{
+ This prefix is prepended to the string found in the "fResourceInfo"
+ field of the OTPortRecord to build the actual library name of the
+ configuration helper library.
+}
+
+const
+ kPortConfigLibPrefix = 'OTPortCfg$';
+
+{ Get user visible port name entry point.}
+
+{
+ This entry point returns the user visible name of the port. If includeSlot
+ is true, a slot distinguishing suffix (eg "slot X") should be added. If
+ includePort is true, a port distinguishing suffix (eg " port X") should be added for
+ multiport cards.
+}
+
+const
+ kOTGetUserPortNameID = 'OTGetUserPortName';
+type
+ OTGetPortNameProcPtr = procedure( var port: OTPortRecord; includeSlot: OTBooleanParam; includePort: OTBooleanParam; var userVisibleName: Str255 );
+{ Get icon entry point.}
+{
+ This entry point returns the location of the icon for the port. Return false if no
+ icon is provided.
+}
+
+const
+ kOTGetPortIconID = 'OTGetPortIcon';
+type
+ OTResourceLocatorPtr = ^OTResourceLocator;
+ OTResourceLocator = record
+ fFile: FSSpec;
+ fResID: UInt16;
+ end;
+type
+ OTGetPortIconProcPtr = function( var port: OTPortRecord; var iconLocation: OTResourceLocator ): Boolean;
+{ ***** Application Access to Configuration Helpers *****}
+
+{$ifc NOT OTKERNEL}
+{
+ These routines are used by clients to get information about ports.
+ The canonical user of these routines is the OT control panel(s),
+ but applications may want to use them as well (to display the list
+ of available Ethernet cards, for example).
+}
+{ Returns a user friendly name for a port.}
+{
+ * OTGetUserPortNameFromPortRef()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ Returns the location for the icon familly representing the port.
+ Returns false if the port has no icon.
+}
+{
+ * OTGetPortIconFromPortRef()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ Gets the slot and other value for the default port of the given device type
+ Returns false if there is no default port of that device type
+}
+{
+ * OTGetDefaultPort()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Returns true if the port can be used with the specified protocol.}
+{
+ * OTIsPortCompatibleWith()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{$endc} { !OTKERNEL }
+
+{$endc} { CALL_NOT_IN_CARBON }
+
+{ ***** Common Utilities *****}
+{
+ The utilities defined in this section are available to both client
+ and kernel code. Cool huh? These utilities differ from those
+ provided in "OpenTransport.h" in that they are only available to native
+ architecture clients.
+}
+
+{ Bitmap functions}
+
+{ These functions atomically deal with a bitmap that is multiple-bytes long}
+
+{
+ Set the first clear bit in "bitMap", starting with bit "startBit",
+ giving up after "numBits". Returns the bit # that was set, or
+ a kOTNotFoundErr if there was no clear bit available
+}
+{
+ * OTSetFirstClearBit() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTSetFirstClearBit( bitMap: UInt8Ptr; startBit: OTByteCount; numBits: OTByteCount ): OTResult; external name '_OTSetFirstClearBit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Standard clear, set and test bit functions}
+{
+ * OTClearBit() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTClearBit( bitMap: UInt8Ptr; bitNo: OTByteCount ): Boolean; external name '_OTClearBit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTSetBit() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTSetBit( bitMap: UInt8Ptr; bitNo: OTByteCount ): Boolean; external name '_OTSetBit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * OTTestBit() *** DEPRECATED ***
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+function OTTestBit( bitMap: UInt8Ptr; bitNo: OTByteCount ): Boolean; external name '_OTTestBit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ OTHashList}
+
+{
+ This implements a simple, but efficient hash list. It is not
+ thread-safe.
+}
+
+type
+ OTHashProcPtr = function( var linkToHash: OTLink ): UInt32;
+ OTHashSearchProcPtr = function( ref: {const} UnivPtr; var linkToCheck: OTLink ): Boolean;
+ OTHashListPtr = ^OTHashList;
+ OTHashList = record
+ fHashProc: OTHashProcPtr;
+ fHashTableSize: ByteCount;
+ fHashBuckets: ^OTLinkPtr;
+ end;
+{
+ Return the number of bytes of memory needed to create a hash list
+ of at least "numEntries" entries.
+}
+{
+ * OTCalculateHashListMemoryNeeds()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ Create an OTHashList from "memory". Return an error if it
+ couldn't be done.
+}
+{
+ * OTInitHashList()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ * OTAddToHashList()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ * OTRemoveLinkFromHashList()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ * OTIsInHashList()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ * OTFindInHashList()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ * OTRemoveFromHashList()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{ Random functions}
+
+{
+ These implement a very simple random number generator, suitable
+ for protocol implementations but not "cryptographically" random.
+}
+
+{
+ * OTGetRandomSeed()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ * OTGetRandomNumber()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{ Concurrency Control}
+
+{
+ OTGate implements a cool concurrency control primitive.
+ You're not going to understand it without reading the documentation!
+ See "Open Transport Advanced Client Programming" for details.
+ WARNING:
+ This structure must be on a 4-byte boundary.
+}
+
+type
+ OTGateProcPtr = function( var thisLink: OTLink ): Boolean;
+ CFMLibraryInfoPtr = ^CFMLibraryInfo;
+ CFMLibraryInfo = record
+ fLIFO: OTLIFO;
+ fList: OTList;
+ fProc: OTGateProcPtr;
+ fNumQueued: SInt32;
+ fInside: SInt32;
+ end;
+{
+ * OTInitGate()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ * OTEnterGate()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{
+ * OTLeaveGate()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in OTUtilityLib 1.0 and later
+ }
+
+
+{ ***** Shared Library Bonus Extras *****}
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ These routines provide addition shared library support beyond
+ that provided by the base shared library mechanism.
+}
+{
+ Some flags which can be passed to the "loadFlags" parameter of the
+ various CFM routines. Not all flags can be used with all routines.
+ See "Open Transport Advanced Client Programming" for details.
+}
+
+const
+ kOTGetDataSymbol = 0;
+ kOTGetCodeSymbol = 1;
+ kOTLoadNewCopy = 2;
+ kOTLoadACopy = 4;
+ kOTFindACopy = 8;
+ kOTLibMask = kOTLoadNewCopy or kOTLoadACopy or kOTFindACopy;
+ kOTLoadLibResident = $20;
+
+{ Finding all matching CFM libraries.}
+
+{
+ The routine OTFindCFMLibraries allows you to find all CFM libraries
+ that match specific criteria. The result is placed in a list
+ of CFMLibraryInfo structures. OT allocates those structures using
+ a routine of type OTAllocMemProcPtr that you pass to OTFindCFMLibraries.
+}
+
+{
+ A list of CFMLibraryInfo structures is returned by the OTFindCFMLibraries routine.
+ The list is created out of the data that is passed to the function.
+
+ IMPORTANT:
+ Only the first 3 fields are valid when using OT 1.2 and older.
+}
+
+type
+ CFMLibraryInfoPtr = ^CFMLibraryInfo;
+ CFMLibraryInfo = record
+ link: OTLink; { To link them all up on a list }
+ libName: UnivPtr; { "C" String which is fragment name }
+ intlName: StringPtr; { Pascal String which is internationalized name }
+ fileSpec: FSSpecPtr; { location of fragment's file }
+ pstring2: StringPtr; { Secondary string from extended cfrg }
+ pstring3: StringPtr; { Extra info from extended cfrg }
+ end;
+{
+ You must pass a routine of type OTAllocMemProcPtr to OTFindCFMLibraries
+ which it calls to allocate memory for the CFMLibraryInfo structures.
+}
+type
+ OTAllocMemProcPtr = function( size: OTByteCount ): UnivPtr;
+{ Find CFM libraries of the specified kind and type}
+{
+ * OTFindCFMLibraries()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Loading libraries and connecting to symbols.}
+
+{ Load a CFM library by name}
+{
+ * OTLoadCFMLibrary()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Load a CFM library and get a named pointer from it}
+{
+ * OTGetCFMPointer()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Get a named pointer from a CFM library that's already loaded}
+{
+ * OTGetCFMSymbol()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Release a connection to a CFM library}
+{
+ * OTReleaseCFMConnection()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ You can call these routines in your CFM initialisation and termination
+ routines to hold or unhold your libraries sections.
+}
+{
+ Used in a CFM InitProc, will hold the executable code, if applicable.
+ This can also be the InitProc of the library
+}
+{
+ * OTHoldThisCFMLibrary()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ Used in a CFM terminate proc, will unhold the executable code, if applicable.
+ This can also be the terminate proc of the library
+}
+{
+ * OTUnholdThisCFMLibrary()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ ASLM Utilities}
+{ Load an ASLM library}
+{
+ * OTLoadASLMLibrary()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ Unload an ASLM library}
+{
+ * OTUnloadASLMLibrary()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ This is an ASLM utility routine. You can get it by including
+ "LibraryManagerUtilities.h", but since we only use a few ASLM utilities,
+ we put the prototype here for convenience.
+}
+
+{
+ * UnloadUnusedLibraries()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{$ifc NOT OTKERNEL}
+{******************************************************************************
+** A few C++ objects for C++ fans
+*******************************************************************************}
+{$ifc CALL_NOT_IN_CARBON}
+
+
+{$endc} { CALL_NOT_IN_CARBON }
+{$endc} { !OTKERNEL }
+
+{$endc} { CALL_NOT_IN_CARBON }
+
+
+
+{unit AuthorizationDB}
+{
+ * Copyright (c) 2003 Apple Computer, Inc. All Rights Reserved.
+ *
+ * The contents of this file constitute Original Code as defined in and are
+ * subject to the Apple Public Source License Version 1.2 (the 'License').
+ * You may not use this file except in compliance with the License. Please obtain
+ * a copy of the License at http://www.apple.com/publicsource and read it before
+ * using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY of ANY KIND, EITHER EXPRESS
+ * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
+ * LIMITATION, ANY WARRANTIES of MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
+ * specific language governing rights and limitations under the License.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+{
+ * AuthorizationDB.h -- APIs for managing the authorization policy database
+ * and daemons.
+ }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+{!
+ @header AuthorizationDB
+ 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(NULL, "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(NULL, "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.
+
+ Keep in mind while specifying a comment to be specific about what you need to authorize for (1 fax), in terms of a general message for user. The means of proof required for kRuleIsAdmin (enter username/password for example) should not be included here, since it could be configured differently.
+
+}
+
+{! @define kRightRule
+ rule delegation key. Instead of specifying exact behavior some canned rules
+ are shipped that may be switched by configurable security.
+}
+const kAuthorizationRightRule = 'rule';
+
+{! @defined kRuleIsAdmin
+ canned rule values for use with rule delegation definitions: require user to be an admin.
+}
+const kAuthorizationRuleIsAdmin = 'is-admin';
+
+{! @defined kRuleAuthenticateAsSessionUser
+ canned rule value for use with rule delegation definitions: require user to authenticate as the session owner (logged-in user).
+}
+const kAuthorizationRuleAuthenticateAsSessionUser= 'authenticate-session-user';
+
+{! @defined kRuleAuthenticateAsAdmin
+ Canned rule value for use with rule delegation definitions: require user to authenticate as admin.
+}
+const kAuthorizationRuleAuthenticateAsAdmin = 'authenticate-admin';
+
+{! @defined kAuthorizationRuleClassAllow
+ Class that allows anything.
+}
+const kAuthorizationRuleClassAllow = 'allow';
+
+{! @defined kAuthorizationRuleClassDeny
+ Class that denies anything.
+}
+const kAuthorizationRuleClassDeny = 'deny';
+
+{! @defined kAuthorizationComment
+ comments for the administrator on what is being customized here;
+ as opposed to (localized) descriptions presented to the user.
+}
+const kAuthorizationComment = 'comment';
+
+
+{!
+ @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.
+
+ @result errAuthorizationSuccess 0 No error.
+
+ errAuthorizationDenied -60005 No definition found.
+
+}
+function AuthorizationRightGet( rightName: ConstCStringPtr; rightDefinition: CFDictionaryRefPtr ): OSStatus; external name '_AuthorizationRightGet';
+// attribute(weak_import);
+
+{!
+ @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.
+ @param rightName (input) the rightname (ASCII). Wildcard rightnames are not okay.
+ @param rightDefinition (input) a CFString of the name of a rule to use (delegate) or CFDictionary containing keys defining one.
+ @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.
+
+ errAuthorizationCanceled -60006 Authorization was canceled by user.
+
+ errAuthorizationInteractionNotAllowed -60007 Interaction was required but not possible.
+
+}
+function AuthorizationRightSet(authRef: AuthorizationRef; rightName: ConstCStringPtr; rightDefinition: CFTypeRef; descriptionKey: CFStringRef; bundle: CFBundleRef; localeTableName: CFStringRef): OSStatus; external name '_AuthorizationRightSet';
+// attribute(weak_import);
+
+
+{!
+ @function AuthorizationRightRemove
+
+ Request to remove a right from the policy database.
+
+ @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';
+
+{unit CFFTPStream}
+{
+ File: CFNetwork/CFFTPStream.h
+
+ Contains: CoreFoundation FTP stream header
+
+ Version: CFNetwork-71.2~1
+
+ Copyright: © 2001-2003 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{
+ * kCFStreamErrorDomainFTP
+ *
+ * Discussion:
+ * Result code returned by FTP server
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamErrorDomainFTP: SInt32; external name '_kCFStreamErrorDomainFTP'; (* attribute const *)
+
+
+{
+FTP Stream Property keys. These keys can be passed to the stream
+property "set/get" functions, such as CFReadStreamSetProperty/
+CFReadStreamCopyProperty, or to a CFDictionary creator or an item
+accessor/mutator. The comment before each key declaration (treated
+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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamPropertyFTPUserName: CFStringRef; external name '_kCFStreamPropertyFTPUserName'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamPropertyFTPPassword: CFStringRef; external name '_kCFStreamPropertyFTPPassword'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamPropertyFTPUsePassiveMode: CFStringRef; external name '_kCFStreamPropertyFTPUsePassiveMode'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamPropertyFTPResourceSize: CFStringRef; external name '_kCFStreamPropertyFTPResourceSize'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamPropertyFTPFetchResourceInfo: CFStringRef; external name '_kCFStreamPropertyFTPFetchResourceInfo'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamPropertyFTPFileTransferOffset: CFStringRef; external name '_kCFStreamPropertyFTPFileTransferOffset'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamPropertyFTPAttemptPersistentConnection: CFStringRef; external name '_kCFStreamPropertyFTPAttemptPersistentConnection'; (* attribute const *)
+
+
+{
+ * kCFStreamPropertyFTPProxy
+ *
+ * Discussion:
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamPropertyFTPProxy: CFStringRef; external name '_kCFStreamPropertyFTPProxy'; (* attribute const *)
+
+
+{
+ * 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.
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamPropertyFTPProxyHost: CFStringRef; external name '_kCFStreamPropertyFTPProxyHost'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamPropertyFTPProxyPort: CFStringRef; external name '_kCFStreamPropertyFTPProxyPort'; (* attribute const *)
+
+{
+ * kCFStreamPropertyFTPProxyUser
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamPropertyFTPProxyUser: CFStringRef; external name '_kCFStreamPropertyFTPProxyUser'; (* attribute const *)
+{
+ * kCFStreamPropertyFTPProxyPassword
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamPropertyFTPProxyPassword: CFStringRef; external name '_kCFStreamPropertyFTPProxyPassword'; (* attribute const *)
+
+
+{
+CFDictionary keys for resource information. The information is
+extracted from a line of the directory list by function
+CFFTPCreateParsedResourceListing.
+}
+
+
+{
+ * kCFFTPResourceMode
+ *
+ * Discussion:
+ * CFDictinary 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFFTPResourceMode: CFStringRef; external name '_kCFFTPResourceMode'; (* attribute const *)
+
+
+{
+ * kCFFTPResourceName
+ *
+ * Discussion:
+ * CFDictinary 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFFTPResourceName: CFStringRef; external name '_kCFFTPResourceName'; (* attribute const *)
+
+
+{
+ * kCFFTPResourceOwner
+ *
+ * Discussion:
+ * CFDictinary 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFFTPResourceOwner: CFStringRef; external name '_kCFFTPResourceOwner'; (* attribute const *)
+
+
+{
+ * kCFFTPResourceGroup
+ *
+ * Discussion:
+ * CFDictinary 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFFTPResourceGroup: CFStringRef; external name '_kCFFTPResourceGroup'; (* attribute const *)
+
+
+{
+ * kCFFTPResourceLink
+ *
+ * Discussion:
+ * CFDictinary 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFFTPResourceLink: CFStringRef; external name '_kCFFTPResourceLink'; (* attribute const *)
+
+
+{
+ * kCFFTPResourceSize
+ *
+ * Discussion:
+ * CFDictinary 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFFTPResourceSize: CFStringRef; external name '_kCFFTPResourceSize'; (* attribute const *)
+
+
+{
+ * kCFFTPResourceType
+ *
+ * Discussion:
+ * CFDictinary 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFFTPResourceType: CFStringRef; external name '_kCFFTPResourceType'; (* attribute const *)
+
+
+{
+ * kCFFTPResourceModDate
+ *
+ * Discussion:
+ * CFDictinary 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFFTPResourceModDate: CFStringRef; external name '_kCFFTPResourceModDate'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function CFReadStreamCreateWithFTPURL( alloc: CFAllocatorRef; ftpURL: CFURLRef ): CFReadStreamRef; external name '_CFReadStreamCreateWithFTPURL';
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function CFFTPCreateParsedResourceListing( alloc: CFAllocatorRef; buffer: UnivPtr; bufferLength: CFIndex; var parsed: CFDictionaryRef ): CFIndex; external name '_CFFTPCreateParsedResourceListing';
+
+
+{
+ * 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.
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function CFWriteStreamCreateWithFTPURL( alloc: CFAllocatorRef; ftpURL: CFURLRef ): CFWriteStreamRef; external name '_CFWriteStreamCreateWithFTPURL';
+
+{unit CFHTTPStream}
+{
+ File: CFNetwork/CFHTTPStream.h
+
+ Contains: CoreFoundation Network HTTP streams header
+
+ Version: CFNetwork-71.2~1
+
+ Copyright: © 2001-2003 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{
+ * kCFStreamErrorDomainHTTP
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+var kCFStreamErrorDomainHTTP: SInt32; external name '_kCFStreamErrorDomainHTTP'; (* attribute const *)
+type
+ CFStreamErrorHTTP = SInt32;
+const
+ kCFStreamErrorHTTPParseFailure = -1;
+ kCFStreamErrorHTTPRedirectionLoop = -2;
+ kCFStreamErrorHTTPBadURL = -3;
+
+{ Value is a CFHTTPMessage with 0 bytes data. }
+{
+ * kCFStreamPropertyHTTPResponseHeader
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+var kCFStreamPropertyHTTPResponseHeader: CFStringRef; external name '_kCFStreamPropertyHTTPResponseHeader'; (* attribute const *)
+{ Value is the CFURL from the final request; will only differ from the URL in the original request if an autoredirection has occurred. }
+{
+ * kCFStreamPropertyHTTPFinalURL
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+var kCFStreamPropertyHTTPFinalURL: CFStringRef; external name '_kCFStreamPropertyHTTPFinalURL'; (* attribute const *)
+{************************************}
+{Set-able properties on HTTP streams }
+{************************************}
+{ HTTP proxy information is set the same way as SOCKS proxies (see CFSocketStream.h).
+ Call CFReadStreamSetProperty() passing an HTTP stream and the property kCFStreamPropertyHTTPProxy.
+ The value should be a CFDictionary that includes at least one Host/Port pair from the keys below.
+ The dictionary returned by SystemConfiguration.framework can also be passed directly as the value }
+{
+ * kCFStreamPropertyHTTPProxy
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+var kCFStreamPropertyHTTPProxy: CFStringRef; external name '_kCFStreamPropertyHTTPProxy'; (* attribute const *)
+{
+ * kCFStreamPropertyHTTPProxyHost
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+var kCFStreamPropertyHTTPProxyHost: CFStringRef; external name '_kCFStreamPropertyHTTPProxyHost'; (* attribute const *)
+{ matches kSCPropNetProxiesHTTPProxy; value should be a CFString}
+{
+ * kCFStreamPropertyHTTPProxyPort
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+var kCFStreamPropertyHTTPProxyPort: CFStringRef; external name '_kCFStreamPropertyHTTPProxyPort'; (* attribute const *)
+{ matches kSCPropNetProxiesHTTPPort; value should be a CFNumber }
+{
+ * kCFStreamPropertyHTTPSProxyHost
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+var kCFStreamPropertyHTTPSProxyHost: CFStringRef; external name '_kCFStreamPropertyHTTPSProxyHost'; (* attribute const *)
+{ matches kSCPropNetProxiesHTTPSProxy; value should be a CFString }
+{
+ * kCFStreamPropertyHTTPSProxyPort
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+var kCFStreamPropertyHTTPSProxyPort: CFStringRef; external name '_kCFStreamPropertyHTTPSProxyPort'; (* attribute const *)
+{ matches kSCPropNetProxiesHTTPSPort; value should be a CFNumber }
+{ Value should be a CFBoolean }
+{
+ * kCFStreamPropertyHTTPShouldAutoredirect
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+var kCFStreamPropertyHTTPShouldAutoredirect: CFStringRef; external name '_kCFStreamPropertyHTTPShouldAutoredirect'; (* attribute const *)
+{ Value should be a CFBoolean. If this property is set to true, an HTTP stream will look for an appropriate extant persistent connection to use, and if it finds none, will try to create one. }
+{
+ * kCFStreamPropertyHTTPAttemptPersistentConnection
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+var kCFStreamPropertyHTTPAttemptPersistentConnection: CFStringRef; external name '_kCFStreamPropertyHTTPAttemptPersistentConnection'; (* attribute const *)
+{ 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 }
+{
+ * kCFStreamPropertyHTTPRequestBytesWrittenCount
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamPropertyHTTPRequestBytesWrittenCount: CFStringRef; external name '_kCFStreamPropertyHTTPRequestBytesWrittenCount'; (* attribute const *)
+{*******************}
+{ Creation routines }
+{*******************}
+{ Creates a read stream for the response to the given request; when the stream is opened,
+ it will begin transmitting the request. The bytes returned are the pure body bytes; the response header has been parsed off.
+ To retrieve the response header, ask for kCFStreamPropertyHTTPResponseHeader, above, any time after the first bytes arrive on
+ the stream (or when stream end is reported, if there are no data bytes).
+}
+{
+ * CFReadStreamCreateForHTTPRequest()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function CFReadStreamCreateForHTTPRequest( alloc: CFAllocatorRef; request: CFHTTPMessageRef ): CFReadStreamRef; external name '_CFReadStreamCreateForHTTPRequest';
+
+
+{ Creates a read stream for the response to the given requestHeaders plus requestBody. Use in preference to
+ CFReadStreamCreateForHTTPRequest() when the body of the request is larger than you wish to be resident in memory. Note that
+ because streams cannot be reset, read streams created this way cannot have autoredirection enabled. If the Content-Length
+ header is set in requestHeaders, it is assumed that the caller got the length right and that requestBody will report
+ end-of-stream after precisely Content-Length bytes have been read from it. If the Content-Length header is not set, the
+ chunked transfer-encoding will be added to requestHeaders, and bytes read from requestBody will be transmitted chunked.
+ The body of requestHeaders is ignored.
+}
+{
+ * CFReadStreamCreateForStreamedHTTPRequest()
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function CFReadStreamCreateForStreamedHTTPRequest( alloc: CFAllocatorRef; requestHeaders: CFHTTPMessageRef; requestBody: CFReadStreamRef ): CFReadStreamRef; external name '_CFReadStreamCreateForStreamedHTTPRequest';
+
+
+{ Deprecated - Use the properties kCFStreamPropertyHTTPShouldAutoredirect and kCFStreamPropertyHTTPProxy above instead }
+{
+ * CFHTTPReadStreamSetRedirectsAutomatically()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+procedure CFHTTPReadStreamSetRedirectsAutomatically( httpStream: CFReadStreamRef; shouldAutoRedirect: Boolean ); external name '_CFHTTPReadStreamSetRedirectsAutomatically';
+
+
+{
+ * CFHTTPReadStreamSetProxy()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+procedure CFHTTPReadStreamSetProxy( httpStream: CFReadStreamRef; proxyHost: CFStringRef; proxyPort: CFIndex ); external name '_CFHTTPReadStreamSetProxy';
+
+{unit CFHost}
+{
+ File: CFNetwork/CFHost.h
+
+ Contains: CoreFoundation CFHost header
+
+ Version: CFNetwork-71.2~1
+
+ Copyright: © 2001-2003 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{
+ * CFHostRef
+ *
+ * Discussion:
+ * This is the type of a reference to a host name or address lookup.
+ }
+type
+ CFHostRef = ^SInt32; { an opaque 32-bit type }
+
+{
+ * kCFStreamErrorDomainNetDB
+ *
+ * Discussion:
+ * Errors listed in netdb.h
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamErrorDomainNetDB: SInt32; external name '_kCFStreamErrorDomainNetDB'; (* attribute const *)
+
+
+{
+ * kCFStreamErrorDomainSystemConfiguration
+ *
+ * Discussion:
+ * Errors listed in SystemConfiguration/SystemConfiguration.h
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamErrorDomainSystemConfiguration: SInt32; external name '_kCFStreamErrorDomainSystemConfiguration'; (* attribute const *)
+
+
+{
+ * CFHostInfoType
+ *
+ * Discussion:
+ * Host information types to be resolved.
+ }
+type
+ CFHostInfoType = SInt32;
+const
+ {
+ * Results value is a CFArray of CFData's (each being a struct
+ * sockaddr)
+ }
+ kCFHostAddresses = 0;
+
+ {
+ * Results value is a CFArray of CFString's
+ }
+ kCFHostNames = 1;
+
+ {
+ * Results value is a CFData wrapping SCNetworkConnectionFlags
+ * (defined in SystemConfiguration/SCNetwork.h)
+ }
+ kCFHostReachability = 2;
+
+
+{
+ * CFHostClientContext
+ *
+ * Discussion:
+ * Structure containing the user-defined data and callbacks for
+ * CFHost objects.
+ }
+type
+ CFHostClientContext = record
+ {
+ * The version number of the structure type being passed in as a
+ * parameter to the CFHost client function. Valid version number is
+ * currently 0.
+ }
+ version: CFIndex;
+
+ {
+ * An arbitrary pointer to client-defined data, which can be
+ * associated with the host and is passed to the callbacks.
+ }
+ info: Ptr;
+
+ {
+ * The callback used to add a retain for the host on the info pointer
+ * for the life of the host, and may be used for temporary references
+ * the host needs to take. This callback returns the actual info
+ * pointer to store in the host, almost always just the pointer
+ * passed as the parameter.
+ }
+ retain: CFAllocatorRetainCallBack;
+
+ {
+ * The callback used to remove a retain previously added for the host
+ * on the info pointer.
+ }
+ release: CFAllocatorReleaseCallBack;
+
+ {
+ * 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. This is used by the CFCopyDescription()
+ * function.
+ }
+ copyDescription: CFAllocatorCopyDescriptionCallBack;
+ end;
+ CFHostClientContextPtr = ^CFHostClientContext;
+
+{
+ * 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.
+ }
+type CFHostClientCallBack = procedure( theHost: CFHostRef; typeInfo: CFHostInfoType; const (*var*) error: CFStreamError; info: UnivPtr );
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+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 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function CFHostCreateWithName( allocator: CFAllocatorRef; hostname: CFStringRef ): CFHostRef; external name '_CFHostCreateWithName';
+
+
+{
+ * 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 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function CFHostCreateWithAddress( allocator: CFAllocatorRef; addr: CFDataRef ): CFHostRef; external name '_CFHostCreateWithAddress';
+
+
+{
+ * 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.
+ * If this 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function CFHostCreateCopy( alloc: CFAllocatorRef; host: CFHostRef ): CFHostRef; external name '_CFHostCreateCopy';
+
+
+{
+ * CFHostStartInfoResolution()
+ *
+ * Discussion:
+ * Performs a lookup for the given host. It will search for the
+ * 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.
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function CFHostStartInfoResolution( theHost: CFHostRef; info: CFHostInfoType; error: CFStreamErrorPtr ): Boolean; external name '_CFHostStartInfoResolution';
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function CFHostGetAddressing( theHost: CFHostRef; var hasBeenResolved: Boolean ): CFArrayRef; external name '_CFHostGetAddressing';
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function CFHostGetNames( theHost: CFHostRef; var hasBeenResolved: Boolean ): CFArrayRef; external name '_CFHostGetNames';
+
+
+{
+ * CFHostGetReachability()
+ *
+ * Discussion:
+ * Tries to retrieve the reachability of the given host. Returns a
+ * CFDataRef which wraps the reachability flags. NULL will be
+ * returned if the value has not been resolved. The possible values
+ * of these flags is declared in SystemConfiguration/SCNetwork.h.
+ * 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. can be NULL
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function CFHostGetReachability( theHost: CFHostRef; hasBeenResolved: BooleanPtr ): CFDataRef; external name '_CFHostGetReachability';
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure CFHostCancelInfoResolution( theHost: CFHostRef; info: CFHostInfoType ); external name '_CFHostCancelInfoResolution';
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function CFHostSetClient( theHost: CFHostRef; clientCB: CFHostClientCallBack; clientContext: CFHostClientContextPtr ): Boolean; external name '_CFHostSetClient';
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure CFHostScheduleWithRunLoop( theHost: CFHostRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef ); external name '_CFHostScheduleWithRunLoop';
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure CFHostUnscheduleFromRunLoop( theHost: CFHostRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef ); external name '_CFHostUnscheduleFromRunLoop';
+
+
+{unit CFNetServices}
+{
+ File: CFNetwork/CFNetServices.h
+
+ Contains: CoreFoundation Network Net Services header
+
+ Version: CFNetwork-71.2~1
+
+ Copyright: © 2001-2003 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+{
+CFNetServices
+Network Services is composed of two objects, a Network Service and
+a Network Service Browser. A Network Service represents a single
+point service on the network. Associated with a service is its name,
+type of service, domain, port, and possibly protocol specific information
+(for legacy protocols). Services can be registered and resolved.
+Registering a service advertises the service on the network, so other
+computers can use the service. Resolving a service performs a network
+lookup in order to find the computer which has registered the service.
+Lookup is contained by the services name, type of service, and the domain.
+The port and address of the registered service will be returned. Services
+can be created or discovered.
+
+Discovery of services takes place through the use of the Network Service
+Browser. Given a domain and a service type, the browser will search out
+those services on the network. The returned services can then be resolved
+and then used.
+
+Service type values are keywords as registered with IANA. A list of values
+may be retrieved from their web site at
+<http://www.iana.org/assignments/port-numbers>.
+}
+
+{
+ * CFNetServiceRef
+ *
+ * Discussion:
+ * This is the type of a reference to a service. It may be used for
+ * registering or for resolving.
+ }
+type
+ CFNetServiceRef = ^SInt32;
+
+{
+ * CFNetServiceBrowserRef
+ *
+ * Discussion:
+ * This is the type of a reference to a service or domain browser.
+ * It may be used for discovering services or domains.
+ }
+type
+ CFNetServiceBrowserRef = ^SInt32;
+
+{
+ * kCFStreamErrorDomainMach
+ *
+ * Discussion:
+ * Errors reported by mach. See <mach/error.h>
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+var kCFStreamErrorDomainMach: SInt32; external name '_kCFStreamErrorDomainMach'; (* attribute const *)
+
+
+{
+ * kCFStreamErrorDomainNetServices
+ *
+ * Discussion:
+ * Errors listed below
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+var kCFStreamErrorDomainNetServices: SInt32; external name '_kCFStreamErrorDomainNetServices'; (* attribute const *)
+
+
+{
+ * CFNetServicesError
+ *
+ * Discussion:
+ * Errors from the kCFStreamErrorDomainNetServices domain.
+ }
+type CFNetServicesError = SInt32;
+const
+ {
+ * An error of unknown type has occured.
+ }
+ kCFNetServicesErrorUnknown = -72000;
+
+ {
+ * The given registration has had a name collision. Registration
+ * should be cancelled and should try again probably with a different
+ * name.
+ }
+ kCFNetServicesErrorCollision = -72001;
+
+ {
+ * Not used
+ }
+ kCFNetServicesErrorNotFound = -72002;
+
+ {
+ * There is already a register, resolve, or browse invoke on the
+ * given object.
+ }
+ kCFNetServicesErrorInProgress = -72003;
+
+ {
+ * Not used
+ }
+ kCFNetServicesErrorBadArgument = -72004;
+
+ {
+ * The register, resolve, or browse on the object has been cancelled.
+ }
+ kCFNetServicesErrorCancel = -72005;
+
+ {
+ * The given CFNetServiceBrowser has already been invalidated and can
+ * no longer be used for browsing.
+ }
+ kCFNetServicesErrorInvalid = -72006;
+
+
+{
+ * CFNetServiceBrowser flags
+ *
+ * Discussion:
+ * Result bit flags passed to CFNetServiceBrowserClientCallBack.
+ }
+const
+ kCFNetServiceFlagMoreComing = 1; { Client will get another callback briefly and shouldn't do costly screen updates (or such). }
+ kCFNetServiceFlagIsDomain = 2; { If off, the result is a service. }
+ kCFNetServiceFlagIsRegistrationDomain = 4; { The result domain is the default registration domain. }
+ kCFNetServiceFlagRemove = 8; { The result item should be removed and not added. }
+
+
+{
+ * CFNetServiceClientContext
+ *
+ * Discussion:
+ * Structure containing the user-defined data and callbacks for
+ * CFNetService and CFNetServiceBrowser objects.
+ }
+type CFNetServiceClientContext = record
+
+ {
+ * The version number of the structure type being passed in as a
+ * parameter to the CFNetService(Browser) client function. Valid
+ * version number is currently 0.
+ }
+ version: CFIndex;
+
+ {
+ * An arbitrary pointer to client-defined data, which can be
+ * associated with the service/browser and is passed to the callbacks.
+ }
+ info: Ptr;
+
+ {
+ * The callback used to add a retain for the service/browser on the
+ * info pointer for the life of the service/browser, and may be used
+ * for temporary references the service/browser needs to take. This
+ * callback returns the actual info pointer to store in the
+ * service/browser, almost always just the pointer passed as the
+ * parameter.
+ }
+ retain: CFAllocatorRetainCallBack;
+
+ {
+ * The callback used to remove a retain previously added for the
+ * service/browser on the info pointer.
+ }
+ release: CFAllocatorReleaseCallBack;
+
+ {
+ * 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. This is used by the CFCopyDescription()
+ * function.
+ }
+ copyDescription: CFAllocatorCopyDescriptionCallBack;
+end;
+CFNetServiceClientContextPtr = ^CFNetServiceClientContext;
+
+{
+ * CFNetServiceClientCallBack
+ *
+ * Discussion:
+ * Callback function which is called upon error or completion of
+ * resolve or register. If resolving, the callback may be called
+ * multiple times, once for each resolved address.
+ *
+ * Parameters:
+ *
+ * theService:
+ * Service receiving the event.
+ *
+ * error:
+ * Reference to an error structure if the event is a failure.
+ *
+ * info:
+ * Client's info reference which was passed into the client
+ * context.
+ }
+ type
+ CFNetServiceClientCallBack = procedure( service: CFNetServiceRef; var error: CFStreamError; info: Ptr );
+
+{
+ * CFNetServiceBrowserClientCallBack
+ *
+ * Discussion:
+ * Callback function which is called upon error or upon successful
+ * discovery of services or domains.
+ *
+ * Parameters:
+ *
+ * browser:
+ * CFNetServiceBrowser receiving the event.
+ *
+ * flags:
+ * Bitwise flags indicating the event or further information about
+ * the event.
+ *
+ * domainOrService:
+ * If searching for domains, a CFStringRef indicating the domain
+ * which was found or is going away. If searching for services,
+ * the service which was found or is going away.
+ *
+ * error:
+ * Reference to an error structure if the event is a failure.
+ *
+ * info:
+ * Client's info reference which was passed into the client
+ * context.
+ }
+ type
+ CFNetServiceBrowserClientCallBack = procedure( browser: CFNetServiceBrowserRef; flags: CFOptionFlags; domainOrService: CFTypeRef; var error: CFStreamError; info: Ptr );
+
+
+{
+ * CFNetServiceGetTypeID()
+ *
+ * Discussion:
+ * Returns the type identifier of all CFNetService instances.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function CFNetServiceGetTypeID: CFTypeID; external name '_CFNetServiceGetTypeID';
+
+
+{
+ * CFNetServiceBrowserGetTypeID()
+ *
+ * Discussion:
+ * Returns the type identifier of all CFNetServiceBrowser instances.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function CFNetServiceBrowserGetTypeID: CFTypeID; external name '_CFNetServiceBrowserGetTypeID';
+
+
+{
+ * CFNetServiceCreate()
+ *
+ * Discussion:
+ * Creates an instance of a Network Service.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * alloc:
+ * The CFAllocator which should be used to allocate memory for the
+ * service and its storage for values. If this reference is not a
+ * valid CFAllocator, the behavior is undefined.
+ *
+ * domain:
+ * The network domain in which it is registered or will be
+ * registered. This value must be non-NULL.
+ *
+ * serviceType:
+ * The type of service being registered or resolved on the
+ * network. This value must be non-NULL.
+ *
+ * name:
+ * The name of the machine or application advertising the service.
+ * If this value is not unique, registering will eventually fail.
+ * This value must be non-NULL. This value is usually displayed
+ * in a browser for the user.
+ *
+ * port:
+ * The port on which the service is listening. This must be
+ * non-zero for services which are to be registered.
+ *
+ * Result:
+ * A valid CFNetService which may now be registered or resolved, or
+ * NULL if unsuccessful.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function CFNetServiceCreate(alloc: CFAllocatorRef; domain: CFStringRef; typ: CFStringRef; name: CFStringRef; port: UInt32): CFNetServiceRef; external name '_CFNetServiceCreate';
+
+
+{
+ * CFNetServiceCreateCopy()
+ *
+ * Discussion:
+ * Creates a new CFNetService object as a copy of service argument.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * alloc:
+ * The CFAllocator which should be used to allocate memory for the
+ * new service. If this reference is not a valid CFAllocator, the
+ * behavior is undefined.
+ *
+ * service:
+ * A CFNetServiceRef representing the original service. Must be
+ * non-NULL. If this If this reference is not a valid
+ * CFNetServiceRef, the behavior is undefined.
+ *
+ * Result:
+ * Returns a valid CFNetServiceRef 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function CFNetServiceCreateCopy( alloc: CFAllocatorRef; service: CFNetServiceRef ): CFNetServiceRef; external name '_CFNetServiceCreateCopy';
+
+
+{
+ * CFNetServiceGetDomain()
+ *
+ * Discussion:
+ * Query a Network Service for its domain.
+ *
+ * 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 service is
+ * being altered from another thread.
+ *
+ * Parameters:
+ *
+ * theService:
+ * The Network Service to be queried. Must be non-NULL.
+ *
+ * Result:
+ * CFStringRef which is the service's domain.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function CFNetServiceGetDomain(theService: CFNetServiceRef): CFStringRef; external name '_CFNetServiceGetDomain';
+
+
+{
+ * CFNetServiceGetType()
+ *
+ * Discussion:
+ * Query a Network Service for its type.
+ *
+ * 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 service is
+ * being altered from another thread.
+ *
+ * Parameters:
+ *
+ * theService:
+ * The Network Service to be queried. Must be non-NULL.
+ *
+ * Result:
+ * CFStringRef which is the service's service type.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function CFNetServiceGetType(theService: CFNetServiceRef): CFStringRef; external name '_CFNetServiceGetType';
+
+
+{
+ * CFNetServiceGetName()
+ *
+ * Discussion:
+ * Query a Network Service for its name.
+ *
+ * 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 service is
+ * being altered from another thread.
+ *
+ * Parameters:
+ *
+ * theService:
+ * The Network Service to be queried. Must be non-NULL.
+ *
+ * Result:
+ * CFStringRef which is the service's name.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function CFNetServiceGetName(theService: CFNetServiceRef): CFStringRef; external name '_CFNetServiceGetName';
+
+
+{
+ * CFNetServiceGetAddressing()
+ *
+ * Discussion:
+ * Query a Network Service for its addressing.
+ *
+ * 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 service is
+ * being altered from another thread.
+ *
+ * Parameters:
+ *
+ * theService:
+ * The Network Service to be queried. Must be non-NULL.
+ *
+ * Result:
+ * Returns NULL if the entity's addressing is not known (has not
+ * been resolved). The array will contain a CFDataRef for each
+ * address resolved. Each CFDataRef contains a struct sockaddr
+ * representing the address of the service.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function CFNetServiceGetAddressing(theService: CFNetServiceRef): CFArrayRef; external name '_CFNetServiceGetAddressing';
+
+
+{
+ * CFNetServiceGetProtocolSpecificInformation()
+ *
+ * Discussion:
+ * Query a Network Service for its protocol specific 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 service is
+ * being altered from another thread.
+ *
+ * Parameters:
+ *
+ * theService:
+ * The Network Service to be queried. Must be non-NULL.
+ *
+ * Result:
+ * Returns NULL if a resolve has not been performed or if
+ * CFNetServiceSetProtocolSpecificInformation has not been called.
+ * It will return a CFStringRef containing the specific information
+ * if there is some.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function CFNetServiceGetProtocolSpecificInformation(theService: CFNetServiceRef): CFStringRef; external name '_CFNetServiceGetProtocolSpecificInformation';
+
+
+{
+ * CFNetServiceSetProtocolSpecificInformation()
+ *
+ * Discussion:
+ * Set a Network Service's protocol specific information.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * theService:
+ * The Network Service to be queried. Must be non-NULL.
+ *
+ * theInfo:
+ * The protocol specific information to be added. Pass NULL to
+ * remove the information from the service.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+procedure CFNetServiceSetProtocolSpecificInformation(theService: CFNetServiceRef;theInfo: CFStringRef); external name '_CFNetServiceSetProtocolSpecificInformation';
+
+
+{
+ * CFNetServiceRegister()
+ *
+ * Discussion:
+ * Registers the entity on the network. This requires that the
+ * service has a domain, a type, a name, and a port. The service is
+ * registered on the network until this function returns or is
+ * cancelled by calling CFNetServiceCancel. In synchronous mode,
+ * this function will block until there is an error or it is
+ * cancelled from another thread. In asynchronous mode, this
+ * function returns immediately and the underlying network
+ * registration process will start.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * theService:
+ * The Network Service to register on the network. Must be
+ * non-NULL.
+ *
+ * error:
+ * A reference to an error struct which will be set to the error
+ * and domain of the error should one occur. If the value of
+ * error is not desired, set to NULL.
+ *
+ * Result:
+ * Returns FALSE if domain, type, name or port is NULL. In
+ * synchronous mode, it will always return FALSE as a result of the
+ * error or the cancellation. In asynchronous mode, it will return
+ * TRUE if the registration process could start.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function CFNetServiceRegister(theService: CFNetServiceRef;error: CFStreamErrorPtr): Boolean; external name '_CFNetServiceRegister';
+
+
+{
+ * CFNetServiceResolve()
+ *
+ * Discussion:
+ * Resolves the addressing for the given service. This requires
+ * that the service has a domain, a type, and a name. The service
+ * is resolved on the network until this function returns or is
+ * cancelled by calling CFNetServiceCancel. In synchronous mode,
+ * this function will block until there is an error or it is
+ * cancelled from another thread. In asynchronous mode, this
+ * function returns immediately and the underlying network
+ * resolution process will start.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * theService:
+ * The Network Service to resolve on the network. Must be
+ * non-NULL.
+ *
+ * error:
+ * A reference to an error struct which will be set to the error
+ * and domain of the error should one occur. If the value of
+ * error is not desired, set to NULL.
+ *
+ * Result:
+ * Returns FALSE if domain, type, or name is NULL. In synchronous
+ * mode, it will return FALSE as a result of an error or a
+ * cancellation. It will return TRUE if the resolution does
+ * succeed. In asynchronous mode, it will return TRUE if the
+ * resolution process could start.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function CFNetServiceResolve(theService: CFNetServiceRef;error: CFStreamErrorPtr): Boolean; external name '_CFNetServiceResolve';
+
+
+{
+ * CFNetServiceCancel()
+ *
+ * Discussion:
+ * Cancels an outstanding request for registration or resolution.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * theService:
+ * The Network Service which is active. Must be non-NULL.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+procedure CFNetServiceCancel(theService: CFNetServiceRef); external name '_CFNetServiceCancel';
+
+
+{
+ * CFNetServiceSetClient()
+ *
+ * Discussion:
+ * Sets up the service to be used in asynchronous mode.
+ * Notification of registration failure or resolution completion
+ * will occur through the given callback. Once the client is set,
+ * the service must be scheduled on a runloop. The client callback
+ * will be triggered via one of the scheduled run loops; It is the
+ * caller's responsibility to ensure that at least one of the
+ * scheduled run loops is being run. This call must be performed
+ * before calling CFNetServiceRegister or CFNetServiceResolve,
+ * otherwise it will return FALSE. TRUE will be returned if the
+ * client could be set.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * theService:
+ * The service to set up for asynchronous mode. Must be non-NULL.
+ *
+ * clientCB:
+ * Function pointer will be called upon registration failure or
+ * upon resolution completion. In the case of resolution, this
+ * callback may be called multiple times if there is more than one
+ * address for a service. Passing NULL will remove the client
+ * from the entity and cancel any outstanding activity.
+ *
+ * clientContext:
+ * Client contextual information to be used when calling clientCB.
+ * Passing NULL will remove the client from the entity and cancel
+ * any outstanding activity.
+ *
+ * Result:
+ * Returns FALSE if the client could not be set, TRUE otherwise.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function CFNetServiceSetClient(theService: CFNetServiceRef; clientCB: CFNetServiceClientCallBack; clientContext: CFNetServiceClientContextPtr): Boolean; external name '_CFNetServiceSetClient';
+
+
+{
+ * CFNetServiceScheduleWithRunLoop()
+ *
+ * Discussion:
+ * Schedule the given service on the given run loop and mode.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * theService:
+ * The service which is set up for asynchronous mode. Must be
+ * non-NULL.
+ *
+ * runLoop:
+ * A reference to a runloop on which the service should be
+ * scheduled. Must be non-NULL.
+ *
+ * runLoopMode:
+ * The mode on which to schedule the service. Must be non-NULL.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+procedure CFNetServiceScheduleWithRunLoop(theService: CFNetServiceRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef); external name '_CFNetServiceScheduleWithRunLoop';
+
+
+{
+ * CFNetServiceUnscheduleFromRunLoop()
+ *
+ * Discussion:
+ * Unschedule the given service from the given run loop and mode.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * theService:
+ * The service which is set up for asynchronous mode. Must be
+ * non-NULL.
+ *
+ * runLoop:
+ * A reference to a runloop from which the service should be
+ * unscheduled. Must be non-NULL.
+ *
+ * runLoopMode:
+ * The mode from which to unschedule the service. Must be
+ * non-NULL.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+procedure CFNetServiceUnscheduleFromRunLoop(theService: CFNetServiceRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef); external name '_CFNetServiceUnscheduleFromRunLoop';
+
+
+{
+ * CFNetServiceBrowserCreate()
+ *
+ * Discussion:
+ * Creates an instance of a browser object.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * alloc:
+ * The CFAllocator which should be used to allocate memory for the
+ * browser and its storage for values. If this reference is not a
+ * valid CFAllocator, the behavior is undefined.
+ *
+ * clientCB:
+ * Function pointer that will be called as domains or services are
+ * found on the network. Must be non-NULL.
+ *
+ * clientContext:
+ * Client ontextual information to be used when calling clientCB.
+ * Must be non-NULL.
+ *
+ * Result:
+ * Returns a new instance of a browser, or NULL if the instance
+ * could not be created.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function CFNetServiceBrowserCreate(alloc: CFAllocatorRef; clientCB: CFNetServiceBrowserClientCallBack; var clientContext: CFNetServiceClientContext): CFNetServiceBrowserRef; external name '_CFNetServiceBrowserCreate';
+
+
+{
+ * CFNetServiceBrowserInvalidate()
+ *
+ * Discussion:
+ * Invalidates the given browser object so that it may no longer be
+ * scheduled and callback never be called. This will also stop any
+ * searches currently in progress.
+ *
+ * Parameters:
+ *
+ * browser:
+ * Network Service Browser to invalidate. Must be non-NULL.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+procedure CFNetServiceBrowserInvalidate(browser: CFNetServiceBrowserRef); external name '_CFNetServiceBrowserInvalidate';
+
+
+{
+ * CFNetServiceBrowserSearchForDomains()
+ *
+ * Discussion:
+ * Starts a search for domains. The browser will either try to find
+ * "Browse" domains or will search for "Registration" domains. If
+ * there is already an outstanding search, it will return FALSE. In
+ * syncronous mode, this call blocks until the search is stopped.
+ * It will return FALSE if there is an error performing the search.
+ * It will return TRUE otherwise. In asynchronous mode, this call
+ * will return TRUE or FALSE depending if the underlying network
+ * search could be started.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * browser:
+ * Network Service Browser to perform the search. Must be
+ * non-NULL.
+ *
+ * registrationDomains:
+ * FALSE if "Browse" domains are to be discovered. TRUE if only
+ * "Registration" domains are to be discovered.
+ *
+ * error:
+ * A reference to an error struct which will be set to the error
+ * and domain of the error should one occur. If the value of
+ * error is not desired, set to NULL.
+ *
+ * Result:
+ * Returns FALSE if an error occurs during a synchronous search or
+ * if the search could not start. It returns TRUE otherwise.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function CFNetServiceBrowserSearchForDomains(browser: CFNetServiceBrowserRef; registrationDomains: Boolean; error: CFStreamErrorPtr): Boolean; external name '_CFNetServiceBrowserSearchForDomains';
+
+
+{
+ * CFNetServiceBrowserSearchForServices()
+ *
+ * Discussion:
+ * Starts a search for a service type on the given domain. If there
+ * is already an outstanding search, it will return FALSE. In
+ * syncronous mode, this call blocks until the search is stopped.
+ * It will return FALSE if there is an error performing the search
+ * or if there is some other error. It will return TRUE otherwise.
+ * In asynchronous mode, this call will return TRUE or FALSE
+ * depending if the underlying network search could be instantiated.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * browser:
+ * Network Service Browser to perform the search. Must be
+ * non-NULL.
+ *
+ * domain:
+ * Network domain to search in order to find the service. Must be
+ * non-NULL.
+ *
+ * serviceType:
+ * Service type for which to search. Must be non-NULL.
+ *
+ * error:
+ * A reference to an error struct which will be set to the error
+ * and domain of the error should one occur. If the value of
+ * error is not desired, set to NULL.
+ *
+ * Result:
+ * Returns FALSE if an error occurs during a synchronous search or
+ * if the search could not start. It returns TRUE otherwise.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function CFNetServiceBrowserSearchForServices(browser: CFNetServiceBrowserRef; domain: CFStringRef; typ: CFStringRef; error: CFStreamErrorPtr): Boolean; external name '_CFNetServiceBrowserSearchForServices';
+
+
+{
+ * CFNetServiceBrowserStopSearch()
+ *
+ * Discussion:
+ * Stops an outstanding browser search.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * browser:
+ * Network Service Browser performing the search. Must be
+ * non-NULL.
+ *
+ * error:
+ * Error value to be returned in "error" in
+ * CFNetServiceBrowserStartServiceSearch if search is being
+ * performed in synchronous mode. In this case, a non-zero of the
+ * error field of the struct will cause
+ * CFNetServiceBrowserStartServiceSearch to return FALSE. In
+ * asynchronous mode, the client call back will be called with
+ * this error.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+procedure CFNetServiceBrowserStopSearch(browser: CFNetServiceBrowserRef;var error: CFStreamError); external name '_CFNetServiceBrowserStopSearch';
+
+
+{
+ * CFNetServiceBrowserScheduleWithRunLoop()
+ *
+ * Discussion:
+ * Schedules the browser on a run loop and mode. Use this to place
+ * the given browser into asynchronous mode. The client callback
+ * will be triggered via one of the scheduled run loops; It is the
+ * caller's responsibility to ensure that at least one of the
+ * scheduled run loops is being run.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * browser:
+ * Network Service Browser to schedule. Must be non-NULL.
+ *
+ * runLoop:
+ * A reference to a runloop on which the browser should be
+ * scheduled. Must be non-NULL.
+ *
+ * runLoopMode:
+ * The mode on which to schedule the browser. Must be non-NULL.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+procedure CFNetServiceBrowserScheduleWithRunLoop(browser: CFNetServiceBrowserRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef); external name '_CFNetServiceBrowserScheduleWithRunLoop';
+
+
+{
+ * CFNetServiceBrowserUnscheduleFromRunLoop()
+ *
+ * Discussion:
+ * Unschedules the browser from a run loop and mode.
+ *
+ * Mac OS X threading:
+ * Thread safe
+ *
+ * Parameters:
+ *
+ * browser:
+ * Network Service Browser to unschedule. Must be non-NULL.
+ *
+ * runLoop:
+ * A reference to a runloop from which the browser should be
+ * unscheduled. Must be non-NULL.
+ *
+ * runLoopMode:
+ * The mode from which to unschedule the browser. Must be
+ * non-NULL.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in CoreServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+procedure CFNetServiceBrowserUnscheduleFromRunLoop(browser: CFNetServiceBrowserRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef); external name '_CFNetServiceBrowserUnscheduleFromRunLoop';
+
+{unit CFPropertyList}
+{ CFPropertyList.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CFPropertyListMutabilityOptions = SInt32;
+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
+ file. Returns NULL if the data cannot be parsed; if the parse fails
+ and errorString is non-NULL, a human-readable description of the failure
+ is returned in errorString. It is the caller's responsibility to release
+ either the returned object or the error string, whichever is applicable.
+}
+function CFPropertyListCreateFromXMLData( allocator: CFAllocatorRef; xmlData: CFDataRef; mutabilityOption: CFOptionFlags; errorString: CFStringRefPtr ): CFPropertyListRef; external name '_CFPropertyListCreateFromXMLData';
+
+{
+ Returns the XML description of the given object; propertyList must
+ be one of the supported property list types, and (for composite types
+ like CFArray and CFDictionary) must not contain any elements that
+ are not themselves of a property list type. If a non-property list
+ type is encountered, NULL is returned. The returned data is
+ appropriate for writing out to an XML file. Note that a data, not a
+ string, is returned because the bytes contain in them a description
+ of the string encoding used.
+}
+function CFPropertyListCreateXMLData( allocator: CFAllocatorRef; propertyList: CFPropertyListRef ): CFDataRef; external name '_CFPropertyListCreateXMLData';
+
+{
+ Recursively creates a copy of the given property list (so nested arrays
+ and dictionaries are copied as well as the top-most container). The
+ resulting property list has the mutability characteristics determined
+ by mutabilityOption.
+}
+function CFPropertyListCreateDeepCopy( allocator: CFAllocatorRef; propertyList: CFPropertyListRef; mutabilityOption: CFOptionFlags ): CFPropertyListRef; external name '_CFPropertyListCreateDeepCopy';
+
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+
+type
+ CFPropertyListFormat = SInt32;
+const
+ kCFPropertyListOpenStepFormat = 1;
+ kCFPropertyListXMLFormat_v1_0 = 100;
+ kCFPropertyListBinaryFormat_v1_0 = 200;
+
+function CFPropertyListIsValid( plist: CFPropertyListRef; format: CFPropertyListFormat ): Boolean; external name '_CFPropertyListIsValid';
+
+{ Returns true if the object graph rooted at plist is a valid property list
+ * graph -- that is, no cycles, containing only plist objects, and dictionary
+ * keys are strings. The debugging library version spits out some messages
+ * to be helpful. The plist structure which is to be allowed is given by
+ * the format parameter. }
+
+function CFPropertyListWriteToStream( propertyList: CFPropertyListRef; stream: CFWriteStreamRef; format: CFPropertyListFormat; var errorString: CFStringRef ): CFIndex; external name '_CFPropertyListWriteToStream';
+
+{ Writes the bytes of a plist serialization out to the stream. The
+ * stream must be opened and configured -- the function simply writes
+ * a bunch of bytes to the stream. The output plist format can be chosen.
+ * Leaves the stream open, but note that reading a plist expects the
+ * 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. }
+
+function CFPropertyListCreateFromStream( allocator: CFAllocatorRef; stream: CFReadStreamRef; streamLength: CFIndex; mutabilityOption: CFOptionFlags; var format: CFPropertyListFormat; var errorString: CFStringRef ): CFPropertyListRef; external name '_CFPropertyListCreateFromStream';
+
+{ Same as current function CFPropertyListCreateFromXMLData()
+ * but takes a stream instead of data, and works on any plist file format.
+ * CFPropertyListCreateFromXMLData() also works on any plist file format.
+ * The stream must be open and configured -- the function simply reads a bunch
+ * of bytes from it starting at the current location in the stream, to the END
+ * 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. }
+
+{#endif}
+
+
+{unit CFSocketStream}
+{
+ File: CFNetwork/CFSocketStream.h
+
+ Contains: CoreFoundation Network socket streams header
+
+ Version: CFNetwork-71.2~1
+
+ Copyright: © 2001-2003 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{
+ * kCFStreamErrorDomainSSL
+ *
+ * Discussion:
+ * Errors located in Security/SecureTransport.h
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamErrorDomainSSL: SInt32; external name '_kCFStreamErrorDomainSSL'; (* attribute const *)
+
+
+{
+ * kCFStreamPropertySocketSecurityLevel
+ *
+ * Discussion:
+ * Stream property key, for both set and copy operations. To set a
+ * stream to be secure, call CFReadStreamSetProperty or
+ * CFWriteStreamSetPropertywith the property name set to
+ * 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
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamPropertySocketSecurityLevel: CFStringRef; external name '_kCFStreamPropertySocketSecurityLevel'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamSocketSecurityLevelNone: CFStringRef; external name '_kCFStreamSocketSecurityLevelNone'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamSocketSecurityLevelSSLv2: CFStringRef; external name '_kCFStreamSocketSecurityLevelSSLv2'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamSocketSecurityLevelSSLv3: CFStringRef; external name '_kCFStreamSocketSecurityLevelSSLv3'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamSocketSecurityLevelTLSv1: CFStringRef; external name '_kCFStreamSocketSecurityLevelTLSv1'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamSocketSecurityLevelNegotiatedSSL: CFStringRef; external name '_kCFStreamSocketSecurityLevelNegotiatedSSL'; (* attribute const *)
+
+
+{
+ * kCFStreamErrorDomainSOCKS
+ *
+ * Discussion:
+ * SOCKS proxy error domain. Errors formulated using inlines below.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamErrorDomainSOCKS: SInt32; external name '_kCFStreamErrorDomainSOCKS'; (* attribute const *)
+
+
+{
+CF_INLINE
+SInt32 CFSocketStreamSOCKSGetErrorSubdomain(CFStreamError* error)
+ return ((error->domain >> 16) & 0x0000FFFF);
+
+CF_INLINE
+SInt32 CFSocketStreamSOCKSGetError(CFStreamError* error)
+ return (error->domain & 0x0000FFFF);
+}
+
+const
+ kCFStreamErrorSOCKSSubDomainNone = 0; { Error code is a general SOCKS error }
+ kCFStreamErrorSOCKSSubDomainVersionCode = 1; { Error code is the version of SOCKS which the server wishes to use }
+ kCFStreamErrorSOCKS4SubDomainResponse = 2; { Error code is the status code returned by the server }
+ kCFStreamErrorSOCKS5SubDomainUserPass = 3; { Error code is the status code that the server returned }
+ kCFStreamErrorSOCKS5SubDomainMethod = 4; { Error code is the server's desired negotiation method }
+ kCFStreamErrorSOCKS5SubDomainResponse = 5; { Error code is the response code that the server returned in reply to the connection request }
+
+
+{ kCFStreamErrorSOCKSSubDomainNone}
+const
+ kCFStreamErrorSOCKS5BadResponseAddr = 1;
+ kCFStreamErrorSOCKS5BadState = 2;
+ kCFStreamErrorSOCKSUnknownClientVersion = 3;
+
+{ kCFStreamErrorSOCKS4SubDomainResponse}
+const
+ kCFStreamErrorSOCKS4RequestFailed = 91; { request rejected or failed }
+ kCFStreamErrorSOCKS4IdentdFailed = 92; { request rejected because SOCKS server cannot connect to identd on the client }
+ kCFStreamErrorSOCKS4IdConflict = 93; { request rejected because the client program and identd report different user-ids }
+
+{ kCFStreamErrorSOCKS5SubDomainMethod}
+const
+ kSOCKS5NoAcceptableMethod = $0FF; { other values indicate the server's desired method }
+
+
+{
+ * kCFStreamPropertySOCKSProxy
+ *
+ * Discussion:
+ * Stream property key, for both set and copy operations. To set a
+ * stream to use a SOCKS proxy, call CFReadStreamSetProperty or
+ * CFWriteStreamSetProperty with the property name set to
+ * kCFStreamPropertySOCKSProxy and the value being a dictionary with
+ * at least the following two keys: kCFStreamPropertySOCKSProxyHost
+ * 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
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamPropertySOCKSProxy: CFStringRef; external name '_kCFStreamPropertySOCKSProxy'; (* attribute const *)
+
+{
+ * kCFStreamPropertySOCKSProxyHost
+ *
+ * Discussion:
+ * CFDictinary 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
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamPropertySOCKSProxyHost: CFStringRef; external name '_kCFStreamPropertySOCKSProxyHost'; (* attribute const *)
+
+{
+ * kCFStreamPropertySOCKSProxyPort
+ *
+ * Discussion:
+ * CFDictinary 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
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamPropertySOCKSProxyPort: CFStringRef; external name '_kCFStreamPropertySOCKSProxyPort'; (* attribute const *)
+
+{
+ * kCFStreamPropertySOCKSVersion
+ *
+ * Discussion:
+ * CFDictinary 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
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamPropertySOCKSVersion: CFStringRef; external name '_kCFStreamPropertySOCKSVersion'; (* attribute const *)
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamSocketSOCKSVersion4: CFStringRef; external name '_kCFStreamSocketSOCKSVersion4'; (* attribute const *)
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamSocketSOCKSVersion5: CFStringRef; external name '_kCFStreamSocketSOCKSVersion5'; (* attribute const *)
+
+{
+ * kCFStreamPropertySOCKSUser
+ *
+ * Discussion:
+ * CFDictinary 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
+ * 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
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamPropertySOCKSUser: CFStringRef; external name '_kCFStreamPropertySOCKSUser'; (* attribute const *)
+
+{
+ * kCFStreamPropertySOCKSPassword
+ *
+ * Discussion:
+ * CFDictinary 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
+ * 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
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamPropertySOCKSPassword: CFStringRef; external name '_kCFStreamPropertySOCKSPassword'; (* 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.
+ * Set the value to kCFBooleanFalse to keep the native socket from
+ * closing and releasing when the stream is released. If the stream
+ * was created with a native socket, the default property setting on
+ * the stream is kCFBooleanFalse. The
+ * kCFStreamPropertyShouldCloseNativeSocket can be set through
+ * 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
+ * Non-Carbon CFM: not available
+ }
+var kCFStreamPropertyShouldCloseNativeSocket: CFStringRef; external name '_kCFStreamPropertyShouldCloseNativeSocket'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamPropertySocketRemoteHost: CFStringRef; external name '_kCFStreamPropertySocketRemoteHost'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+var kCFStreamPropertySocketRemoteNetService: CFStringRef; external name '_kCFStreamPropertySocketRemoteNetService'; (* attribute const *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure CFStreamCreatePairWithSocketToCFHost( alloc: CFAllocatorRef; host: CFHostRef; port: UInt32; readStream: CFReadStreamRefPtr; writeStream: CFWriteStreamRefPtr ); external name '_CFStreamCreatePairWithSocketToCFHost';
+
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure CFStreamCreatePairWithSocketToNetService( alloc: CFAllocatorRef; service: CFNetServiceRef; readStream: CFReadStreamRefPtr; writeStream: CFWriteStreamRefPtr ); external name '_CFStreamCreatePairWithSocketToNetService';
+
+
+{
+ * CFStreamSocketSecurityProtocol
+ *
+ * Discussion:
+ * These enum values and CFSocketStreamPairSetSecurityProtocol have
+ * been deprecated in favor of CFReadStreamSetProperty and
+ * CFWriteStreamSetProperty with the previously mentioned property
+ * and values.
+ }
+type
+ CFStreamSocketSecurityProtocol = SInt32;
+const
+ {
+ * DEPRECATED, use kCFStreamSocketSecurityLevelNone
+ }
+ kCFStreamSocketSecurityNone = 0;
+
+ {
+ * DEPRECATED, use kCFStreamSocketSecurityLevelSSLv2
+ }
+ kCFStreamSocketSecuritySSLv2 = 1;
+
+ {
+ * DEPRECATED, use kCFStreamSocketSecurityLevelSSLv3
+ }
+ kCFStreamSocketSecuritySSLv3 = 2;
+
+ {
+ * DEPRECATED, use kCFStreamSocketSecurityLevelNegotiatedSSL
+ }
+ kCFStreamSocketSecuritySSLv23 = 3;
+
+ {
+ * DEPRECATED, use kCFStreamSocketSecurityLevelTLSv1
+ }
+ kCFStreamSocketSecurityTLSv1 = 4;
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2
+function CFSocketStreamPairSetSecurityProtocol( socketReadStream: CFReadStreamRef; socketWriteStream: CFWriteStreamRef; securityProtocol: CFStreamSocketSecurityProtocol ): Boolean; external name '_CFSocketStreamPairSetSecurityProtocol';
+
+{unit CGColor}
+{ CoreGraphics - CGColor.h
+ * Copyright (c) 2003 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+// CGColorRef defined in CGBase
+
+
+{ Return the CFTypeID for CGColors. }
+
+function CGColorGetTypeID: CFTypeID; external name '_CGColorGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Create a color in colorspace `colorspace' with color components
+ * (including alpha) specified by `components'. `colorspace' may be any
+ * colorspace except a pattern colorspace. }
+
+function CGColorCreate( colorspace: CGColorSpaceRef; {const} components: {variable-size-array} Float32Ptr ): CGColorRef; external name '_CGColorCreate'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Create a color in colorspace `colorspace' with pattern `pattern' and
+ * components `components'. `colorspace' must be a pattern colorspace. }
+
+function CGColorCreateWithPattern( colorspace: CGColorSpaceRef; pattern: CGPatternRef; {const} components: {variable-size-array} Float32Ptr ): CGColorRef; external name '_CGColorCreateWithPattern'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Create a copy of `color'. }
+
+function CGColorCreateCopy( color: CGColorRef ): CGColorRef; external name '_CGColorCreateCopy'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Create a copy of `color' with alpha set to `alpha'. }
+
+function CGColorCreateCopyWithAlpha( color: CGColorRef; alpha: Float32 ): CGColorRef; external name '_CGColorCreateCopyWithAlpha'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Equivalent to `CFRetain(color)', except it doesn't crash (as CFRetain
+ * does) if `color' is NULL. }
+
+function CGColorRetain( color: CGColorRef ): CGColorRef; external name '_CGColorRetain'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Equivalent to `CFRelease(color)', except it doesn't crash (as CFRelease
+ * does) if `color' is NULL. }
+
+procedure CGColorRelease( color: CGColorRef ); external name '_CGColorRelease'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return true if `color1' is equal to `color2'; false otherwise. }
+
+function CGColorEqualToColor( color1: CGColorRef; color2: CGColorRef ): CBool; external name '_CGColorEqualToColor'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return the number of color components (including alpha) associated with
+ * `color'. }
+
+function CGColorGetNumberOfComponents( color: CGColorRef ): size_t; external name '_CGColorGetNumberOfComponents'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return the color components (including alpha) associated with
+ * `color'. }
+
+function CGColorGetComponents( color: CGColorRef ): Float32Ptr; external name '_CGColorGetComponents'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return the alpha component associated with `color'. }
+
+function CGColorGetAlpha( color: CGColorRef ): Float32; external name '_CGColorGetAlpha'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return the colorspace associated with `color'. }
+
+function CGColorGetColorSpace( color: CGColorRef ): CGColorSpaceRef; external name '_CGColorGetColorSpace'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Return the pattern associated with `color', if it's a color in a pattern
+ * colorspace; NULL otherwise. }
+
+function CGColorGetPattern( color: CGColorRef ): CGPatternRef; external name '_CGColorGetPattern'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{unit CGContext}
+{ CoreGraphics - CGContext.h
+ * Copyright (c) 2000-2003 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CGContextRef = ^SInt32; { an opaque 32-bit type }
+
+
+{ Line join styles. }
+
+type
+ CGLineJoin = SInt32;
+const
+ kCGLineJoinMiter = 0;
+ kCGLineJoinRound = 1;
+ kCGLineJoinBevel = 2;
+
+{ Line cap styles. }
+
+type
+ CGLineCap = SInt32;
+const
+ kCGLineCapButt = 0;
+ kCGLineCapRound = 1;
+ kCGLineCapSquare = 2;
+
+{ Drawing modes for paths. }
+
+type
+ CGPathDrawingMode = SInt32;
+const
+ kCGPathFill = 0;
+ kCGPathEOFill = 1;
+ kCGPathStroke = 2;
+ kCGPathFillStroke = 3;
+ kCGPathEOFillStroke = 4;
+
+{ Drawing modes for text. }
+
+type
+ CGTextDrawingMode = SInt32;
+const
+ kCGTextFill = 0;
+ kCGTextStroke = 1;
+ kCGTextFillStroke = 2;
+ kCGTextInvisible = 3;
+ kCGTextFillClip = 4;
+ kCGTextStrokeClip = 5;
+ kCGTextFillStrokeClip = 6;
+ kCGTextClip = 7;
+
+{ Text encodings. }
+
+type
+ CGTextEncoding = SInt32;
+const
+ kCGEncodingFontSpecific = 0;
+ kCGEncodingMacRoman = 1;
+
+{ Interpolation quality. }
+
+type
+ CGInterpolationQuality = SInt32;
+const
+ kCGInterpolationDefault = 0; { Let the context decide. }
+ kCGInterpolationNone = 1; { Never interpolate. }
+ kCGInterpolationLow = 2; { Faster, lower quality. }
+ kCGInterpolationHigh = 3; { Slower, higher quality. }
+
+{ Blend modes. }
+
+type
+ CGBlendMode = SInt32;
+const
+ kCGBlendModeNormal = 0;
+ kCGBlendModeMultiply = 1;
+ kCGBlendModeScreen = 2;
+ kCGBlendModeOverlay = 3;
+ kCGBlendModeDarken = 4;
+ kCGBlendModeLighten = 5;
+ kCGBlendModeColorDodge = 6;
+ kCGBlendModeColorBurn = 7;
+ kCGBlendModeSoftLight = 8;
+ kCGBlendModeHardLight = 9;
+ kCGBlendModeDifference = 10;
+ kCGBlendModeExclusion = 11;
+ kCGBlendModeHue = 12;
+ kCGBlendModeSaturation = 13;
+ kCGBlendModeColor = 14;
+ kCGBlendModeLuminosity = 15; { Available in Mac OS X 10.4 & later. }
+
+
+{ Return the CFTypeID for CGContextRefs. }
+
+function CGContextGetTypeID: CFTypeID; external name '_CGContextGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{* Graphics state functions. *}
+
+{ Push a copy of the current graphics state onto the graphics state
+ * stack. Note that the path is not considered part of the gstate, and is
+ * not saved. }
+
+procedure CGContextSaveGState( c: CGContextRef ); external name '_CGContextSaveGState';
+
+{ Restore the current graphics state from the one on the top of the
+ * graphics state stack, popping the graphics state stack in the
+ * process. }
+
+procedure CGContextRestoreGState( c: CGContextRef ); external name '_CGContextRestoreGState';
+
+{* Coordinate space transformations. *}
+
+{ Scale the current graphics state's transformation matrix (the CTM) by
+ * `(sx, sy)'. }
+
+procedure CGContextScaleCTM( c: CGContextRef; sx: Float32; sy: Float32 ); external name '_CGContextScaleCTM';
+
+{ Translate the current graphics state's transformation matrix (the CTM)
+ * by `(tx, ty)'. }
+
+procedure CGContextTranslateCTM( c: CGContextRef; tx: Float32; ty: Float32 ); external name '_CGContextTranslateCTM';
+
+{ Rotate the current graphics state's transformation matrix (the CTM) by
+ * `angle' radians. }
+
+procedure CGContextRotateCTM( c: CGContextRef; angle: Float32 ); external name '_CGContextRotateCTM';
+
+{ Concatenate the current graphics state's transformation matrix (the CTM)
+ * with the affine transform `transform'. }
+
+procedure CGContextConcatCTM( c: CGContextRef; transform: CGAffineTransform ); external name '_CGContextConcatCTM';
+
+{ Return the current graphics state's transformation matrix. }
+
+function CGContextGetCTM( c: CGContextRef ): CGAffineTransform; external name '_CGContextGetCTM';
+
+{* Drawing attribute functions. *}
+
+{ Set the line width in the current graphics state to `width'. }
+
+procedure CGContextSetLineWidth( c: CGContextRef; width: Float32 ); external name '_CGContextSetLineWidth';
+
+{ Set the line cap in the current graphics state to `cap'. }
+
+procedure CGContextSetLineCap( c: CGContextRef; cap: CGLineCap ); external name '_CGContextSetLineCap';
+
+{ Set the line join in the current graphics state to `join'. }
+
+procedure CGContextSetLineJoin( c: CGContextRef; join: CGLineJoin ); external name '_CGContextSetLineJoin';
+
+{ Set the miter limit in the current graphics state to `limit'. }
+
+procedure CGContextSetMiterLimit( c: CGContextRef; limit: Float32 ); external name '_CGContextSetMiterLimit';
+
+{ Set the line dash patttern in the current graphics state of `c'. }
+
+procedure CGContextSetLineDash( c: CGContextRef; phase: Float32; {const} lengths: {variable-size-array} Float32Ptr; count: size_t ); external name '_CGContextSetLineDash';
+
+{ Set the path flatness parameter in the current graphics state of `c' to
+ * `flatness'. }
+
+procedure CGContextSetFlatness( c: CGContextRef; flatness: Float32 ); external name '_CGContextSetFlatness';
+
+{ Set the alpha value in the current graphics state of `c' to `alpha'. }
+
+procedure CGContextSetAlpha( c: CGContextRef; alpha: Float32 ); external name '_CGContextSetAlpha';
+
+{ Set the blend mode of `context' to `mode'. }
+
+procedure CGContextSetBlendMode( context: CGContextRef; mode: CGBlendMode ); external name '_CGContextSetBlendMode'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{* Path construction functions. *}
+
+{ Note that a context has a single path in use at any time: a path is not
+ * part of the graphics state. }
+
+{ Begin a new path. The old path is discarded. }
+
+procedure CGContextBeginPath( c: CGContextRef ); external name '_CGContextBeginPath';
+
+{ Start a new subpath at point `(x, y)' in the context's path. }
+
+procedure CGContextMoveToPoint( c: CGContextRef; x: Float32; y: Float32 ); external name '_CGContextMoveToPoint';
+
+{ Append a straight line segment from the current point to `(x, y)'. }
+
+procedure CGContextAddLineToPoint( c: CGContextRef; x: Float32; y: Float32 ); external name '_CGContextAddLineToPoint';
+
+{ Append a cubic Bezier curve from the current point to `(x,y)', with
+ * control points `(cp1x, cp1y)' and `(cp2x, cp2y)'. }
+
+procedure CGContextAddCurveToPoint( c: CGContextRef; cp1x: Float32; cp1y: Float32; cp2x: Float32; cp2y: Float32; x: Float32; y: Float32 ); external name '_CGContextAddCurveToPoint';
+
+{ Append a quadratic curve from the current point to `(x, y)', with
+ * control point `(cpx, cpy)'. }
+
+procedure CGContextAddQuadCurveToPoint( c: CGContextRef; cpx: Float32; cpy: Float32; x: Float32; y: Float32 ); external name '_CGContextAddQuadCurveToPoint';
+
+{ Close the current subpath of the context's path. }
+
+procedure CGContextClosePath( c: CGContextRef ); external name '_CGContextClosePath';
+
+{* Path construction convenience functions. *}
+
+{ Add a single rect to the context's path. }
+
+procedure CGContextAddRect( c: CGContextRef; rect: CGRect ); external name '_CGContextAddRect';
+
+{ Add a set of rects to the context's path. }
+
+procedure CGContextAddRects( c: CGContextRef; {const} rects: {variable-size-array} CGRectPtr; count: size_t ); external name '_CGContextAddRects';
+
+{ Add a set of lines to the context's path. }
+
+procedure CGContextAddLines( c: CGContextRef; {const} points: {variable-size-array} CGPointPtr; count: size_t ); external name '_CGContextAddLines';
+
+{ Add an ellipse inside `rect' to the current path of `context'. See the
+ * function `CGPathAddEllipseInRect' for more information on how the path
+ * for the ellipse is constructed. }
+
+procedure CGContextAddEllipseInRect( context: CGContextRef; rect: CGRect ); external name '_CGContextAddEllipseInRect'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Add an arc of a circle to the context's path, possibly preceded by a
+ * straight line segment. `(x, y)' is the center of the arc; `radius' is
+ * its radius; `startAngle' is the angle to the first endpoint of the arc;
+ * `endAngle' is the angle to the second endpoint of the arc; and
+ * `clockwise' is 1 if the arc is to be drawn clockwise, 0 otherwise.
+ * `startAngle' and `endAngle' are measured in radians. }
+
+procedure CGContextAddArc( c: CGContextRef; x: Float32; y: Float32; radius: Float32; startAngle: Float32; endAngle: Float32; clockwise: SInt32 ); external name '_CGContextAddArc';
+
+{ Add an arc of a circle to the context's path, possibly preceded by a
+ * straight line segment. `radius' is the radius of the arc. The arc is
+ * tangent to the line from the current point to `(x1, y1)', and the line
+ * from `(x1, y1)' to `(x2, y2)'. }
+
+procedure CGContextAddArcToPoint( c: CGContextRef; x1: Float32; y1: Float32; x2: Float32; y2: Float32; radius: Float32 ); external name '_CGContextAddArcToPoint';
+
+{ Add `path' to the path of context. The points in `path' are transformed
+ * by the CTM of context before they are added. }
+
+procedure CGContextAddPath( context: CGContextRef; path: CGPathRef ); external name '_CGContextAddPath'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{* Path stroking. *}
+
+{ Replace the path in context with the stroked version of the path, using
+ * the parameters of `context' to calculate the stroked path. The
+ * resulting path is created such that filling it with the appropriate
+ * color will produce the same results as stroking the original path. You
+ * can use this path in the same way you can use the path of any context;
+ * for example, you can clip to the stroked version of a path by calling
+ * this function followed by a call to "CGContextClipPath". }
+
+procedure CGContextReplacePathWithStrokedPath( c: CGContextRef ); external name '_CGContextReplacePathWithStrokedPath'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{* Path information functions. *}
+
+{ Return true if the context's path contains no elements, false otherwise. }
+
+function CGContextIsPathEmpty( c: CGContextRef ): CBool; external name '_CGContextIsPathEmpty';
+
+{ Return the current point of the current subpath of the context's
+ * path. }
+
+function CGContextGetPathCurrentPoint( c: CGContextRef ): CGPoint; external name '_CGContextGetPathCurrentPoint';
+
+{ Return the bounding box of the context's path. The bounding box is the
+ * smallest rectangle completely enclosing all points in the path,
+ * including control points for Bezier and quadratic curves. }
+
+function CGContextGetPathBoundingBox( c: CGContextRef ): CGRect; external name '_CGContextGetPathBoundingBox';
+
+{ Return true if `point' is contained in the current path of `context'. A
+ * point is contained within a context's path if it is inside the painted
+ * region when the path is stroked or filled with opaque colors using the
+ * path drawing mode `mode'. `point' is specified is user space. }
+
+function CGContextPathContainsPoint( context: CGContextRef; point: CGPoint; mode: CGPathDrawingMode ): CBool; external name '_CGContextPathContainsPoint'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{* Path drawing functions. *}
+
+{ Draw the context's path using drawing mode `mode'. }
+
+procedure CGContextDrawPath( c: CGContextRef; mode: CGPathDrawingMode ); external name '_CGContextDrawPath';
+
+{* Path drawing convenience functions. *}
+
+{ Fill the context's path using the winding-number fill rule. Any open
+ * subpath of the path is implicitly closed. }
+
+procedure CGContextFillPath( c: CGContextRef ); external name '_CGContextFillPath';
+
+{ Fill the context's path using the even-odd fill rule. Any open subpath
+ * of the path is implicitly closed. }
+
+procedure CGContextEOFillPath( c: CGContextRef ); external name '_CGContextEOFillPath';
+
+{ Stroke the context's path. }
+
+procedure CGContextStrokePath( c: CGContextRef ); external name '_CGContextStrokePath';
+
+{ Fill `rect' with the current fill color. }
+
+procedure CGContextFillRect( c: CGContextRef; rect: CGRect ); external name '_CGContextFillRect';
+
+{ Fill `rects', an array of `count' CGRects, with the current fill
+ * color. }
+
+procedure CGContextFillRects( c: CGContextRef; {const} rects: {variable-size-array} CGRectPtr; count: size_t ); external name '_CGContextFillRects';
+
+{ Stroke `rect' with the current stroke color and the current linewidth. }
+
+procedure CGContextStrokeRect( c: CGContextRef; rect: CGRect ); external name '_CGContextStrokeRect';
+
+{ Stroke `rect' with the current stroke color, using `width' as the the
+ * line width. }
+
+procedure CGContextStrokeRectWithWidth( c: CGContextRef; rect: CGRect; width: Float32 ); external name '_CGContextStrokeRectWithWidth';
+
+{ Clear `rect' (that is, set the region within the rect to
+ * transparent). }
+
+procedure CGContextClearRect( c: CGContextRef; rect: CGRect ); external name '_CGContextClearRect';
+
+{ Fill an ellipse (an oval) inside `rect'. }
+
+procedure CGContextFillEllipseInRect( context: CGContextRef; rect: CGRect ); external name '_CGContextFillEllipseInRect'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Stroke an ellipse (an oval) inside `rect'. }
+
+procedure CGContextStrokeEllipseInRect( context: CGContextRef; rect: CGRect ); external name '_CGContextStrokeEllipseInRect'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Stroke a sequence of line segments one after another in `context'. The
+ * line segments are specified by `points', an array of `count' CGPoints.
+ * This function is equivalent to
+ * CGContextBeginPath(context);
+ * for (k = 0; k < count; k += 2) begin
+ * CGContextMoveToPoint(context, s[k].x, s[k].y);
+ * CGContextAddLineToPoint(context, s[k+1].x, s[k+1].y);
+ * end;
+ * CGContextStrokePath(context);
+ }
+
+procedure CGContextStrokeLineSegments( c: CGContextRef; {const} points: {variable-size-array} CGPointPtr; count: size_t ); external name '_CGContextStrokeLineSegments'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{* Clipping functions. *}
+
+{ Intersect the context's path with the current clip path and use the
+ * resulting path as the clip path for subsequent rendering operations.
+ * Use the winding-number fill rule for deciding what's inside the path. }
+
+procedure CGContextClip( c: CGContextRef ); external name '_CGContextClip';
+
+{ Intersect the context's path with the current clip path and use the
+ * resulting path as the clip path for subsequent rendering operations.
+ * Use the even-odd fill rule for deciding what's inside the path. }
+
+procedure CGContextEOClip( c: CGContextRef ); external name '_CGContextEOClip';
+
+{ Add `mask' transformed to `rect' to the clipping area of `context'. The
+ * mask, which may be either an image mask or an image, is mapped into the
+ * specified rectangle and intersected with the current clipping area of
+ * the context.
+ *
+ * If `mask' is an image mask, then it clips in a manner identical to the
+ * behavior if it were used with "CGContextDrawImage": it indicates an area
+ * to be masked out (left unchanged) when drawing. The source samples of
+ * the image mask determine which points of the clipping area are changed,
+ * acting as an "inverse alpha": if the value of a source sample in the
+ * image mask is S, then the corresponding point in the current clipping
+ * area will be multiplied by an alpha of (1-S). (For example, if S is 1,
+ * then the point in the clipping area becomes clear, while if S is 0, the
+ * point in the clipping area is unchanged.
+ *
+ * If `mask' is an image, then it serves as alpha mask and is blended with
+ * the current clipping area. The source samples of mask determine which
+ * points of the clipping area are changed: if the value of the source
+ * sample in mask is S, then the corresponding point in the current
+ * clipping area will be multiplied by an alpha of S. (For example, if S
+ * is 0, then the point in the clipping area becomes clear, while if S is
+ * 1, the point in the clipping area is unchanged.
+ *
+ * If `mask' is an image, then it must be in the DeviceGray color space,
+ * may not have alpha, and may not be masked by an image mask or masking
+ * color. }
+
+procedure CGContextClipToMask( c: CGContextRef; rect: CGRect; mask: CGImageRef ); external name '_CGContextClipToMask';
+
+{ Return the bounding box of the clip path of `c' in user space. The
+ * bounding box is the smallest rectangle completely enclosing all points
+ * in the clip. }
+
+function CGContextGetClipBoundingBox( c: CGContextRef ): CGRect; external name '_CGContextGetClipBoundingBox'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{* Clipping convenience functions. *}
+
+{ Intersect the current clipping path with `rect'. Note that this
+ * function resets the context's path to the empty path. }
+
+procedure CGContextClipToRect( c: CGContextRef; rect: CGRect ); external name '_CGContextClipToRect';
+
+{ Intersect the current clipping path with the clipping region formed by
+ * creating a path consisting of all rects in `rects'. Note that this
+ * function resets the context's path to the empty path. }
+
+procedure CGContextClipToRects( c: CGContextRef; {const} rects: {variable-size-array} CGRectPtr; count: size_t ); external name '_CGContextClipToRects';
+
+{* Primitive color functions. *}
+
+{ Set the current fill color in the context `c' to `color'. }
+
+procedure CGContextSetFillColorWithColor( c: CGContextRef; color: CGColorRef ); external name '_CGContextSetFillColorWithColor'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Set the current stroke color in the context `c' to `color'. }
+
+procedure CGContextSetStrokeColorWithColor( c: CGContextRef; color: CGColorRef ); external name '_CGContextSetStrokeColorWithColor'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{* Colorspace functions. *}
+
+{ Set the current fill colorspace in the context `c' to `colorspace'. As
+ * a side-effect, set the fill color to a default value appropriate for the
+ * colorspace. }
+
+procedure CGContextSetFillColorSpace( c: CGContextRef; colorspace: CGColorSpaceRef ); external name '_CGContextSetFillColorSpace';
+
+{ Set the current stroke colorspace in the context `c' to `colorspace'.
+ * As a side-effect, set the stroke color to a default value appropriate
+ * for the colorspace. }
+
+procedure CGContextSetStrokeColorSpace( c: CGContextRef; colorspace: CGColorSpaceRef ); external name '_CGContextSetStrokeColorSpace';
+
+{* Color functions. *}
+
+{ Set the components of the current fill color in the context `c' to the
+ * values specifed by `components'. The number of elements in `components'
+ * must be one greater than the number of components in the current fill
+ * colorspace (N color components + 1 alpha component). The current fill
+ * colorspace must not be a pattern colorspace. }
+
+procedure CGContextSetFillColor( c: CGContextRef; {const} components: {variable-size-array} Float32Ptr ); external name '_CGContextSetFillColor';
+
+{ Set the components of the current stroke color in the context `c' to the
+ * values specifed by `components'. The number of elements in `components'
+ * must be one greater than the number of components in the current stroke
+ * colorspace (N color components + 1 alpha component). The current stroke
+ * colorspace must not be a pattern colorspace. }
+
+procedure CGContextSetStrokeColor( c: CGContextRef; {const} components: {variable-size-array} Float32Ptr ); external name '_CGContextSetStrokeColor';
+
+{* Pattern functions. *}
+
+{ Set the components of the current fill color in the context `c' to the
+ * values specifed by `components', and set the current fill pattern to
+ * `pattern'. The number of elements in `components' must be one greater
+ * than the number of components in the current fill colorspace (N color
+ * components + 1 alpha component). The current fill colorspace must be a
+ * pattern colorspace. }
+
+procedure CGContextSetFillPattern( c: CGContextRef; pattern: CGPatternRef; {const} components: {variable-size-array} Float32Ptr ); external name '_CGContextSetFillPattern';
+
+{ Set the components of the current stroke color in the context `c' to the
+ * values specifed by `components', and set the current stroke pattern to
+ * `pattern'. The number of elements in `components' must be one greater
+ * than the number of components in the current stroke colorspace (N color
+ * components + 1 alpha component). The current stroke colorspace must be
+ * a pattern colorspace. }
+
+procedure CGContextSetStrokePattern( c: CGContextRef; pattern: CGPatternRef; {const} components: {variable-size-array} Float32Ptr ); external name '_CGContextSetStrokePattern';
+
+{ Set the pattern phase in the current graphics state of the context `c'
+ * to `phase'. }
+
+procedure CGContextSetPatternPhase( c: CGContextRef; phase: CGSize ); external name '_CGContextSetPatternPhase';
+
+{* Color convenience functions. *}
+
+{ Set the current fill colorspace in the context `c' to `DeviceGray' and
+ * set the components of the current fill color to `(gray, alpha)'. }
+
+procedure CGContextSetGrayFillColor( c: CGContextRef; gray: Float32; alpha: Float32 ); external name '_CGContextSetGrayFillColor';
+
+{ Set the current stroke colorspace in the context `c' to `DeviceGray' and
+ * set the components of the current stroke color to `(gray, alpha)'. }
+
+procedure CGContextSetGrayStrokeColor( c: CGContextRef; gray: Float32; alpha: Float32 ); external name '_CGContextSetGrayStrokeColor';
+
+{ Set the current fill colorspace in the context `c' to `DeviceRGB' and
+ * set the components of the current fill color to `(red, green, blue,
+ * alpha)'. }
+
+procedure CGContextSetRGBFillColor( c: CGContextRef; red: Float32; green: Float32; blue: Float32; alpha: Float32 ); external name '_CGContextSetRGBFillColor';
+
+{ Set the current stroke colorspace in the context `c' to `DeviceRGB' and
+ * set the components of the current stroke color to `(red, green, blue,
+ * alpha)'. }
+
+procedure CGContextSetRGBStrokeColor( c: CGContextRef; red: Float32; green: Float32; blue: Float32; alpha: Float32 ); external name '_CGContextSetRGBStrokeColor';
+
+{ Set the current fill colorspace in the context `c' to `DeviceCMYK' and
+ * set the components of the current fill color to `(cyan, magenta, yellow,
+ * black, alpha)'. }
+
+procedure CGContextSetCMYKFillColor( c: CGContextRef; cyan: Float32; magenta: Float32; yellow: Float32; black: Float32; alpha: Float32 ); external name '_CGContextSetCMYKFillColor';
+
+{ Set the current stroke colorspace in the context `c' to `DeviceCMYK' and
+ * set the components of the current stroke color to `(cyan, magenta,
+ * yellow, black, alpha)'. }
+
+procedure CGContextSetCMYKStrokeColor( c: CGContextRef; cyan: Float32; magenta: Float32; yellow: Float32; black: Float32; alpha: Float32 ); external name '_CGContextSetCMYKStrokeColor';
+
+{* Rendering intent. *}
+
+{ Set the rendering intent in the current graphics state of context `c' to
+ * `intent'. }
+
+procedure CGContextSetRenderingIntent( c: CGContextRef; intent: CGColorRenderingIntent ); external name '_CGContextSetRenderingIntent';
+
+{* Image functions. *}
+
+{ Draw `image' in the rectangular area specified by `rect' in the context
+ * `c'. The image is scaled, if necessary, to fit into `rect'. }
+
+procedure CGContextDrawImage( c: CGContextRef; rect: CGRect; image: CGImageRef ); external name '_CGContextDrawImage';
+
+{ Return the interpolation quality for image rendering of the context `c'.
+ * The interpolation quality is a gstate-parameter which controls the level
+ * of interpolation performed when an image is interpolated (for example,
+ * when scaling the image). Note that it is merely a hint to the context:
+ * not all contexts support all interpolation quality levels. }
+
+function CGContextGetInterpolationQuality( c: CGContextRef ): CGInterpolationQuality; external name '_CGContextGetInterpolationQuality';
+
+{ Set the interpolation quality of the context `c' to `quality'. }
+
+procedure CGContextSetInterpolationQuality( c: CGContextRef; quality: CGInterpolationQuality ); external name '_CGContextSetInterpolationQuality';
+
+{* Shadow support. *}
+
+{ Set the shadow parameters in `context'. `offset' specifies a
+ * translation in base-space; `blur' is a non-negative number specifying
+ * the amount of blur; `color' specifies the color of the shadow, which may
+ * contain a non-opaque alpha value. If `color' is NULL, it's equivalent
+ * to specifying a fully transparent color. The shadow is a gstate
+ * parameter. After a shadow is specified, all objects drawn subsequently
+ * will be shadowed. To turn off shadowing, set the shadow color to a
+ * fully transparent color (or pass NULL as the color), or use the standard
+ * gsave/grestore mechanism. }
+
+procedure CGContextSetShadowWithColor( context: CGContextRef; offset: CGSize; blur: Float32; color: CGColorRef ); external name '_CGContextSetShadowWithColor'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Equivalent to calling
+ * CGContextSetShadowWithColor(context, offset, blur, color)
+ * where color is black with 1/3 alpha (i.e., RGBA = (0, 0, 0, 1.0/3.0)) in
+ * the DeviceRGB colorspace. }
+
+procedure CGContextSetShadow( context: CGContextRef; offset: CGSize; blur: Float32 ); external name '_CGContextSetShadow'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{* Shading functions. *}
+
+{ Fill the current clipping region of `c' with `shading'. }
+
+procedure CGContextDrawShading( c: CGContextRef; shading: CGShadingRef ); external name '_CGContextDrawShading'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{* Text functions. *}
+
+{ Set the current character spacing in the context `c' to `spacing'. The
+ * character spacing is added to the displacement between the origin of one
+ * character and the origin of the next. }
+
+procedure CGContextSetCharacterSpacing( c: CGContextRef; spacing: Float32 ); external name '_CGContextSetCharacterSpacing';
+
+{ Set the user-space point at which text will be drawn in the context `c'
+ * to `(x, y)'. }
+
+procedure CGContextSetTextPosition( c: CGContextRef; x: Float32; y: Float32 ); external name '_CGContextSetTextPosition';
+
+{ Return the user-space point at which text will be drawn in the context
+ * `c'. }
+
+function CGContextGetTextPosition( c: CGContextRef ): CGPoint; external name '_CGContextGetTextPosition';
+
+{ Set the text matrix in the context `c' to `t'. }
+
+procedure CGContextSetTextMatrix( c: CGContextRef; t: CGAffineTransform ); external name '_CGContextSetTextMatrix';
+
+{ Return the text matrix in the context `c'. }
+
+function CGContextGetTextMatrix( c: CGContextRef ): CGAffineTransform; external name '_CGContextGetTextMatrix';
+
+{ Set the text drawing mode in the current graphics state of the context
+ * `c' to `mode'. }
+
+procedure CGContextSetTextDrawingMode( c: CGContextRef; mode: CGTextDrawingMode ); external name '_CGContextSetTextDrawingMode';
+
+{ Set the font in the current graphics state of the context `c' to
+ * `font'. }
+
+procedure CGContextSetFont( c: CGContextRef; font: CGFontRef ); external name '_CGContextSetFont';
+
+{ Set the font size in the current graphics state of the context `c' to
+ * `size'. }
+
+procedure CGContextSetFontSize( c: CGContextRef; size: Float32 ); external name '_CGContextSetFontSize';
+
+{ Attempts to find the font named `name' and, if successful, sets it as
+ * the font in the current graphics state of `c' and sets the font size in
+ * the current graphics state to `size'. `textEncoding' specifies how to
+ * translate from bytes to glyphs when displaying text. }
+
+procedure CGContextSelectFont( c: CGContextRef; name: ConstCStringPtr; size: Float32; textEncoding: CGTextEncoding ); external name '_CGContextSelectFont';
+
+{ Draw `string', a string of `length' bytes, at the point specified by the
+ * text matrix in the context `c'. Each byte of the string is mapped
+ * through the encoding vector of the current font to obtain the glyph to
+ * display. }
+
+procedure CGContextShowText( c: CGContextRef; strng: ConstCStringPtr; length: size_t ); external name '_CGContextShowText';
+
+{ Draw the glyphs pointed to by `g', an array of `count' glyphs, at the
+ * point specified by the text matrix in the context `c'. }
+
+procedure CGContextShowGlyphs( c: CGContextRef; {const} g: {variable-size-array} CGGlyphPtr; count: size_t ); external name '_CGContextShowGlyphs';
+
+{ Draw `glyphs', an array of `count' CGGlyphs, at the current point
+ * specified by the text matrix. Each element of `advances' specifies the
+ * offset from the previous glyph's origin to the origin of the associated
+ * glyph; the advances are specified in user space. }
+
+procedure CGContextShowGlyphsWithAdvances( c: CGContextRef; {const} glyphs: {variable-size-array} CGGlyphPtr; {const} advances: {variable-size-array} CGSizePtr; count: size_t ); external name '_CGContextShowGlyphsWithAdvances'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{* Text convenience functions. *}
+
+{ Draw `string', a string of `length' bytes, at the point `(x, y)',
+ * specified in user space, in the context `c'. Each byte of the string is
+ * mapped through the encoding vector of the current font to obtain the
+ * glyph to display. }
+
+procedure CGContextShowTextAtPoint( c: CGContextRef; x: Float32; y: Float32; strng: ConstCStringPtr; length: size_t ); external name '_CGContextShowTextAtPoint';
+
+{ Display the glyphs pointed to by `glyphs', an array of `count' glyphs,
+ * at at the point `(x, y)', specified in user space, in the context
+ * `c'. }
+
+procedure CGContextShowGlyphsAtPoint( c: CGContextRef; x: Float32; y: Float32; {const} glyphs: {variable-size-array} CGGlyphPtr; count: size_t ); external name '_CGContextShowGlyphsAtPoint';
+
+{* PDF functions. *}
+
+{ Draw `page' in the current user space of the context `c'. }
+
+procedure CGContextDrawPDFPage( c: CGContextRef; page: CGPDFPageRef ); external name '_CGContextDrawPDFPage'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ DEPRECATED; use the CGPDFPage API instead.
+ * Draw `page' in `document' in the rectangular area specified by `rect' in
+ * the context `c'. The media box of the page is scaled, if necessary, to
+ * fit into `rect'. }
+
+procedure CGContextDrawPDFDocument( c: CGContextRef; rect: CGRect; document: CGPDFDocumentRef; page: SInt32 ); external name '_CGContextDrawPDFDocument';
+
+{* Output page functions. *}
+
+{ Begin a new page. }
+
+procedure CGContextBeginPage( c: CGContextRef; const (*var*) mediaBox: CGRect ); external name '_CGContextBeginPage';
+
+{ End the current page. }
+
+procedure CGContextEndPage( c: CGContextRef ); external name '_CGContextEndPage';
+
+{* Context functions. *}
+
+{ Equivalent to `CFRetain(c)'. }
+
+function CGContextRetain( c: CGContextRef ): CGContextRef; external name '_CGContextRetain';
+
+{ Equivalent to `CFRelease(c)'. }
+
+procedure CGContextRelease( c: CGContextRef ); external name '_CGContextRelease';
+
+{ Flush all drawing to the destination. }
+
+procedure CGContextFlush( c: CGContextRef ); external name '_CGContextFlush';
+
+{ Synchronized drawing. }
+
+procedure CGContextSynchronize( c: CGContextRef ); external name '_CGContextSynchronize';
+
+{* Antialiasing functions. *}
+
+{ Turn on antialiasing if `shouldAntialias' is true; turn it off
+ * otherwise. This parameter is part of the graphics state. }
+
+procedure CGContextSetShouldAntialias( c: CGContextRef; shouldAntialias: CBool ); external name '_CGContextSetShouldAntialias';
+
+{ Allow antialiasing in context `c' if `allowsAntialiasing' is true; don't
+ * allow it otherwise. This parameter is not part of the graphics state. A
+ * context will perform antialiasing if both `allowsAntialiasing' and the
+ * graphics state parameter `shouldAntialias' are true. }
+
+procedure CGContextSetAllowsAntialiasing( context: CGContextRef; allowsAntialiasing: CBool ); external name '_CGContextSetAllowsAntialiasing'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{* Font smoothing functions. *}
+
+{ Turn on font smoothing if `shouldSmoothFonts' is true; turn it off
+ * otherwise. This parameter is part of the graphics state. Note that this
+ * doesn't guarantee that font smoothing will occur: not all destination
+ * contexts support font smoothing. }
+
+procedure CGContextSetShouldSmoothFonts( c: CGContextRef; shouldSmoothFonts: CBool ); external name '_CGContextSetShouldSmoothFonts'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{* Transparency layer support. *}
+
+{ Begin a transparency layer. All subsequent drawing operations until a
+ * corresponding CGContextEndTransparencyLayer are composited into a fully
+ * transparent backdrop (which is treated as a separate destination buffer
+ * from the context); after a call to CGContextEndTransparencyLayer, the
+ * result is composited into the context using the global alpha and shadow
+ * state of the context. This operation respects the clipping region of
+ * the context. After a call to this function, all of the parameters in
+ * the graphics state remain unchanged with the exception of the following:
+ * The global alpha is set to 1.
+ * The shadow is turned off.
+ * Ending the transparency layer restores these parameters to the values
+ * they had before CGContextBeginTransparencyLayer was called.
+ * Transparency layers may be nested. }
+
+procedure CGContextBeginTransparencyLayer( context: CGContextRef; auxiliaryInfo: CFDictionaryRef ); external name '_CGContextBeginTransparencyLayer'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ End a tranparency layer. }
+
+procedure CGContextEndTransparencyLayer( context: CGContextRef ); external name '_CGContextEndTransparencyLayer'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{* User space to device space tranformations. *}
+
+{ Return the affine transform mapping the user space (abstract
+ * coordinates) of `context' to device space (pixels). }
+
+function CGContextGetUserSpaceToDeviceSpaceTransform( c: CGContextRef ): CGAffineTransform; external name '_CGContextGetUserSpaceToDeviceSpaceTransform'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Transform `point' from the user space of `context' to device space. }
+
+function CGContextConvertPointToDeviceSpace( c: CGContextRef; point: CGPoint ): CGPoint; external name '_CGContextConvertPointToDeviceSpace'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Transform `point' from device space to the user space of `context'. }
+
+function CGContextConvertPointToUserSpace( c: CGContextRef; point: CGPoint ): CGPoint; external name '_CGContextConvertPointToUserSpace'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Transform `size' from the user space of `context' to device space. }
+
+function CGContextConvertSizeToDeviceSpace( c: CGContextRef; size: CGSize ): CGSize; external name '_CGContextConvertSizeToDeviceSpace'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Transform `size' from device space to the user space of `context'. }
+
+function CGContextConvertSizeToUserSpace( c: CGContextRef; size: CGSize ): CGSize; external name '_CGContextConvertSizeToUserSpace'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Transform `rect' from the user space of `context' to device space. Since
+ * affine transforms do not preserve rectangles in general, this function
+ * returns the smallest rectangle which contains the transformed corner
+ * points of `rect'. }
+
+function CGContextConvertRectToDeviceSpace( c: CGContextRef; rect: CGRect ): CGRect; external name '_CGContextConvertRectToDeviceSpace'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Transform `rect' from device space to the user space of `context'. Since
+ * affine transforms do not preserve rectangles in general, this function
+ * returns the smallest rectangle which contains the transformed corner
+ * points of `rect'. }
+
+function CGContextConvertRectToUserSpace( c: CGContextRef; rect: CGRect ): CGRect; external name '_CGContextConvertRectToUserSpace'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit CGDirectDisplay}
+{
+ * CGDirectDisplay.h
+ * CoreGraphics
+ *
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{
+ * The following construct is present to avoid problems with some Apple tools.
+ * API in this module is not available in Mac OS Classic variations!
+ }
+
+
+type
+ CGDirectDisplayID = ^SInt32; { an opaque 32-bit type }
+ CGDirectDisplayIDPtr = ^CGDirectDisplayID; { when a var xx:CGDirectDisplayID parameter can be nil, it is changed to xx: CGDirectDisplayIDPtr }
+type
+ CGDirectPaletteRef = ^SInt32; { an opaque 32-bit type }
+ CGDirectPaletteRefPtr = ^CGDirectPaletteRef; { when a var xx:CGDirectPaletteRef parameter can be nil, it is changed to xx: CGDirectPaletteRefPtr }
+type
+ CGDisplayCount = UInt32;
+type
+ CGTableCount = UInt32;
+type
+ CGDisplayCoord = SInt32;
+type
+ CGByteValue = SInt8;
+ CGByteValuePtr = ^CGByteValue;
+type
+ CGOpenGLDisplayMask = UInt32;
+type
+ CGBeamPosition = UInt32;
+type
+ CGMouseDelta = SInt32;
+type
+ CGRefreshRate = double;
+type
+ CGCaptureOptions = UInt32;
+
+type
+ CGDisplayErr = CGError;
+
+const
+ CGDisplayNoErr = kCGErrorSuccess;
+
+ kCGDirectMainDisplay = nil;
+
+{ Returns the display ID of the current main display }
+function CGMainDisplayID: CGDirectDisplayID; external name '_CGMainDisplayID';
+
+{
+ * Mechanisms used to find screen IDs
+ * An array length (maxDisplays) and array of CGDirectDisplayIDs are passed in.
+ * Up to maxDisplays of the array are filled in with the displays meeting the
+ * specified criteria. The actual number of displays filled in is returned in
+ * dspyCnt.
+ *
+ * If the dspys array is NULL, maxDisplays is ignored, and *dspyCnt is filled
+ * in with the number of displays meeting the function's requirements.
+ }
+function CGGetDisplaysWithPoint( point: CGPoint; maxDisplays: CGDisplayCount; dspys: CGDirectDisplayIDPtr; var dspyCnt: CGDisplayCount ): CGDisplayErr; external name '_CGGetDisplaysWithPoint';
+
+function CGGetDisplaysWithRect( rect: CGRect; maxDisplays: CGDisplayCount; dspys: CGDirectDisplayIDPtr; var dspyCnt: CGDisplayCount ): CGDisplayErr; external name '_CGGetDisplaysWithRect';
+
+function CGGetDisplaysWithOpenGLDisplayMask( mask: CGOpenGLDisplayMask; maxDisplays: CGDisplayCount; dspys: CGDirectDisplayIDPtr; var dspyCnt: CGDisplayCount ): CGDisplayErr; external name '_CGGetDisplaysWithOpenGLDisplayMask';
+
+{
+ * Get lists of displays. Use this to determine display IDs
+ *
+ * If the activeDspys array is NULL, maxDisplays is ignored, and *dspyCnt is filled
+ * in with the number of displays meeting the function's requirements.
+ *
+ * The first display returned in the list is the main display,
+ * the one with the menu bar.
+ * When mirroring, this will be the largest drawable display in the mirror,
+ * set, or if all are the same size, the one with the deepest pixel depth.
+ }
+function CGGetActiveDisplayList( maxDisplays: CGDisplayCount; activeDspys: CGDirectDisplayIDPtr; var dspyCnt: CGDisplayCount ): CGDisplayErr; external name '_CGGetActiveDisplayList';
+
+{
+ * With hardware mirroring, a display may be on-line,
+ * but not necessarily active, or drawable.
+ * Programs which manipulate display settings such as the
+ * palette or gamma tables need access to all displays in use,
+ * including hardware mirrors which are not drawable.
+ }
+function CGGetOnlineDisplayList( maxDisplays: CGDisplayCount; onlineDspys: CGDirectDisplayIDPtr; var dspyCnt: CGDisplayCount ): CGDisplayErr; external name '_CGGetOnlineDisplayList';
+
+{ Map a display to an OpenGL display mask; returns 0 on invalid display }
+function CGDisplayIDToOpenGLDisplayMask( display: CGDirectDisplayID ): CGOpenGLDisplayMask; external name '_CGDisplayIDToOpenGLDisplayMask';
+
+{
+ * Map an OpenGL display mask to a display.
+ * Returns kCGNullDirectDisplay if a bit doesn't
+ * match a display.
+ * Passing in multiple bits results in an arbitrary match.
+ }
+function CGOpenGLDisplayMaskToDisplayID( mask: CGOpenGLDisplayMask ): CGDirectDisplayID; external name '_CGOpenGLDisplayMaskToDisplayID';
+
+{ Return screen size and origin in global coords; Empty rect if display is invalid }
+function CGDisplayBounds( display: CGDirectDisplayID ): CGRect; external name '_CGDisplayBounds';
+
+function CGDisplayPixelsWide( display: CGDirectDisplayID ): size_t; external name '_CGDisplayPixelsWide';
+function CGDisplayPixelsHigh( display: CGDirectDisplayID ): size_t; external name '_CGDisplayPixelsHigh';
+
+{
+ * Display mode selection
+ * Display modes are represented as CFDictionaries
+ * All dictionaries and arrays returned via these mechanisms are
+ * owned by the framework and should not be released. The framework
+ * will not release them out from under your application.
+ *
+ * Values associated with the following keys are CFNumber types.
+ * With CFNumberGetValue(), use kCFNumberLongType for best results.
+ * kCGDisplayRefreshRate encodes a double value, so to get the fractional
+ * refresh rate use kCFNumberDoubleType.
+ }
+
+{
+ * 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.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGDisplayWidth CFSTRP('Width')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGDisplayHeight CFSTRP('Height')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGDisplayMode CFSTRP('Mode')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGDisplayBitsPerPixel CFSTRP('BitsPerPixel')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGDisplayBitsPerSample CFSTRP('BitsPerSample')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGDisplaySamplesPerPixel CFSTRP('SamplesPerPixel')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGDisplayRefreshRate CFSTRP('RefreshRate')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGDisplayModeUsableForDesktopGUI CFSTRP('UsableForDesktopGUI')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGDisplayIOFlags CFSTRP('IOFlags')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGDisplayBytesPerRow CFSTRP('kCGDisplayBytesPerRow')}
+{$endc}
+
+{
+ * Keys to describe optional properties of display modes.
+ *
+ * The key will only be present if the property applies,
+ * and will be associated with a value of kCFBooleanTrue.
+ * Keys not relevant to a particular display mode will not
+ * appear in the mode dictionary.
+ *
+ * These strings must remain unchanged in future releases, of course.
+ }
+
+{ Set if display mode doesn't need a confirmation dialog to be set }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGDisplayModeIsSafeForHardware CFSTRP('kCGDisplayModeIsSafeForHardware')}
+{$endc}
+
+{ The following keys reflect interesting bits of the IOKit display mode flags }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGDisplayModeIsInterlaced CFSTRP('kCGDisplayModeIsInterlaced')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGDisplayModeIsStretched CFSTRP('kCGDisplayModeIsStretched')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGDisplayModeIsTelevisionOutput CFSTRP('kCGDisplayModeIsTelevisionOutput')}
+{$endc}
+
+
+{
+ * Return a CFArray of CFDictionaries describing all display modes.
+ * Returns NULL if the display is invalid.
+ }
+function CGDisplayAvailableModes( display: CGDirectDisplayID ): CFArrayRef; external name '_CGDisplayAvailableModes';
+{
+ * Try to find a display mode of specified depth with dimensions equal or greater than
+ * specified.
+ * If no depth match is found, try for the next larger depth with dimensions equal or greater
+ * than specified. If no luck, then just return the current mode.
+ *
+ * exactmatch, if not NULL, is set to 'true' if an exact match in width, height, and depth is found,
+ * and 'false' otherwise.
+ *
+ * CGDisplayBestModeForParametersAndRefreshRateWithProperty searches the list, looking for
+ * display modes with the specified property. The property should be one of:
+ * kCGDisplayModeIsSafeForHardware;
+ * kCGDisplayModeIsInterlaced;
+ * kCGDisplayModeIsStretched;
+ * kCGDisplayModeIsTelevisionOutput
+ *
+ * Returns NULL if display is invalid.
+ }
+function CGDisplayBestModeForParameters( display: CGDirectDisplayID; bitsPerPixel: size_t; width: size_t; height: size_t; var exactMatch: boolean_t ): CFDictionaryRef; external name '_CGDisplayBestModeForParameters';
+
+function CGDisplayBestModeForParametersAndRefreshRate( display: CGDirectDisplayID; bitsPerPixel: size_t; width: size_t; height: size_t; refresh: CGRefreshRate; var exactMatch: boolean_t ): CFDictionaryRef; external name '_CGDisplayBestModeForParametersAndRefreshRate';
+
+function CGDisplayBestModeForParametersAndRefreshRateWithProperty( display: CGDirectDisplayID; bitsPerPixel: size_t; width: size_t; height: size_t; refresh: CGRefreshRate; property: CFStringRef; var exactMatch: boolean_t ): CFDictionaryRef; external name '_CGDisplayBestModeForParametersAndRefreshRateWithProperty';
+
+{
+ * Return a CFDictionary describing the current display mode.
+ * Returns NULL if display is invalid.
+ }
+function CGDisplayCurrentMode( display: CGDirectDisplayID ): CFDictionaryRef; external name '_CGDisplayCurrentMode';
+{
+ * 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.
+ * The mode dictionary passed in must be a dictionary vended by other CGDirectDisplay
+ * APIs such as CGDisplayBestModeForParameters() and CGDisplayAvailableModes().
+ *
+ * The mode dictionary passed in must be a dictionary vended by other CGDirectDisplay
+ * APIs such as CGDisplayBestModeForParameters() and CGDisplayAvailableModes().
+ *
+ * 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.
+ }
+function CGDisplaySwitchToMode( display: CGDirectDisplayID; mode: CFDictionaryRef ): CGDisplayErr; external name '_CGDisplaySwitchToMode';
+
+{ Query parameters for current mode }
+function CGDisplayBitsPerPixel( display: CGDirectDisplayID ): size_t; external name '_CGDisplayBitsPerPixel';
+function CGDisplayBitsPerSample( display: CGDirectDisplayID ): size_t; external name '_CGDisplayBitsPerSample';
+function CGDisplaySamplesPerPixel( display: CGDirectDisplayID ): size_t; external name '_CGDisplaySamplesPerPixel';
+function CGDisplayBytesPerRow( display: CGDirectDisplayID ): size_t; external name '_CGDisplayBytesPerRow';
+
+{
+ * Set a display gamma/transfer function from a formula specifying
+ * min and max values and a gamma for each channel.
+ * Gamma values must be greater than 0.0.
+ * To get an antigamma of 1.6, one would specify a value of (1.0 / 1.6)
+ * Min values must be greater than or equal to 0.0 and less than 1.0.
+ * Max values must be greater than 0.0 and less than or equal to 1.0.
+ * Out of range values, or Max greater than or equal to Min result
+ * in a kCGSRangeCheck error.
+ *
+ * Values are computed by sampling a function for a range of indices from 0 through 1:
+ * value = Min + ((Max - Min) * pow(index, Gamma))
+ * The resulting values are converted to a machine specific format
+ * and loaded into hardware.
+ }
+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 ): CGDisplayErr; external name '_CGSetDisplayTransferByFormula';
+
+function CGGetDisplayTransferByFormula( display: CGDirectDisplayID; var redMin: CGGammaValue; var redMax: CGGammaValue; var redGamma: CGGammaValue; var greenMin: CGGammaValue; var greenMax: CGGammaValue; var greenGamma: CGGammaValue; var blueMin: CGGammaValue; var blueMax: CGGammaValue; var blueGamma: CGGammaValue ): CGDisplayErr; external name '_CGGetDisplayTransferByFormula';
+{
+ * Returns the capacity, or nunber of entries, in the camma table for the specified
+ * display. If 'display' is invalid, returns 0.
+ }
+function CGDisplayGammaTableCapacity( display: CGDirectDisplayID ): CGTableCount; external name '_CGDisplayGammaTableCapacity'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{
+ * Set a display gamma/transfer function using tables of data for each channel.
+ * Values within each table should have values in the range of 0.0 through 1.0.
+ * The same table may be passed in for red, green, and blue channels. 'tableSize'
+ * indicates the number of entries in each table.
+ * The tables are interpolated as needed to generate the number of samples needed
+ * by hardware.
+ }
+function CGSetDisplayTransferByTable( display: CGDirectDisplayID; tableSize: CGTableCount; redTable: {const} CGGammaValuePtr; greenTable: {const} CGGammaValuePtr; blueTable: {const} CGGammaValuePtr ): CGDisplayErr; external name '_CGSetDisplayTransferByTable';
+
+{
+ * Get transfer tables. Capacity should contain the number of samples each
+ * array can hold, and *sampleCount is filled in with the number of samples
+ * actually copied in.
+ }
+function CGGetDisplayTransferByTable( display: CGDirectDisplayID; capacity: CGTableCount; redTable: CGGammaValuePtr; greenTable: CGGammaValuePtr; blueTable: CGGammaValuePtr; var sampleCount: CGTableCount ): CGDisplayErr; external name '_CGGetDisplayTransferByTable';
+
+{ As a convenience, allow setting of the gamma table by byte values }
+function CGSetDisplayTransferByByteTable( display: CGDirectDisplayID; tableSize: CGTableCount; redTable: {const} CGByteValuePtr; greenTable: {const} CGByteValuePtr; blueTable: {const} CGByteValuePtr ): CGDisplayErr; external name '_CGSetDisplayTransferByByteTable';
+
+{ Restore gamma tables of system displays to the user's ColorSync specified values }
+procedure CGDisplayRestoreColorSyncSettings; external name '_CGDisplayRestoreColorSyncSettings';
+
+{
+ * Options used with CGDisplayCaptureWithOptions and CGCaptureAllDisplaysWithOptions
+ }
+const
+ kCGCaptureNoOptions = 0; { Default behavior }
+ kCGCaptureNoFill = 1 shl 0; { Disables fill with black on display capture }
+
+{ Display capture and release }
+function CGDisplayIsCaptured( display: CGDirectDisplayID ): boolean_t; external name '_CGDisplayIsCaptured';
+function CGDisplayCapture( display: CGDirectDisplayID ): CGDisplayErr; external name '_CGDisplayCapture';
+function CGDisplayCaptureWithOptions( display: CGDirectDisplayID; options: CGCaptureOptions ): CGDisplayErr; external name '_CGDisplayCaptureWithOptions'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+function CGDisplayRelease( display: CGDirectDisplayID ): CGDisplayErr; external name '_CGDisplayRelease';
+
+{
+ * Capture all displays; this has the nice effect of providing an immersive
+ * environment, and preventing other apps from trying to adjust themselves
+ * to display changes only needed by your app.
+ }
+function CGCaptureAllDisplays: CGDisplayErr; external name '_CGCaptureAllDisplays';
+function CGCaptureAllDisplaysWithOptions( options: CGCaptureOptions ): CGDisplayErr; external name '_CGCaptureAllDisplaysWithOptions'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{
+ * Release all captured displays, and restore the display modes to the
+ * user's preferences. May be used in conjunction with CGDisplayCapture()
+ * or CGCaptureAllDisplays().
+ }
+function CGReleaseAllDisplays: CGDisplayErr; external name '_CGReleaseAllDisplays';
+
+{
+ * Returns CoreGraphics raw shield window ID or NULL if not shielded
+ * This value may be used with drawing surface APIs.
+ }
+function CGShieldingWindowID( display: CGDirectDisplayID ): UnivPtr; external name '_CGShieldingWindowID';
+
+{
+ * Returns the window level used for the shield window.
+ * This value may be used with Cocoa windows to position the
+ * Cocoa window in the same window level as the shield window.
+ }
+function CGShieldingWindowLevel: SInt32; external name '_CGShieldingWindowLevel';
+
+{
+ * Returns base address of display or NULL for an invalid display.
+ * If the display has not been captured, the returned address may refer
+ * to read-only memory.
+ }
+function CGDisplayBaseAddress( display: CGDirectDisplayID ): UnivPtr; external name '_CGDisplayBaseAddress';
+{
+ * return address for X,Y in global coordinates;
+ * (0,0) represents the upper left corner of the main display.
+ * returns NULL for an invalid display or out of bounds coordinates
+ * If the display has not been captured, the returned address may refer
+ * to read-only memory.
+ }
+function CGDisplayAddressForPosition( display: CGDirectDisplayID; x: CGDisplayCoord; y: CGDisplayCoord ): UnivPtr; external name '_CGDisplayAddressForPosition';
+
+
+{ Mouse Cursor controls }
+function CGDisplayHideCursor( display: CGDirectDisplayID ): CGDisplayErr; external name '_CGDisplayHideCursor'; { increments hide cursor count }
+function CGDisplayShowCursor( display: CGDirectDisplayID ): CGDisplayErr; external name '_CGDisplayShowCursor'; { decrements hide cursor count }
+
+{
+ * Move the cursor to the specified point relative to the display origin
+ * (the upper left corner of the display). Returns CGDisplayNoErr on success.
+ * No events are generated as a result of this move.
+ * Points that would lie outside the desktop are clipped to the desktop.
+ }
+function CGDisplayMoveCursorToPoint( display: CGDirectDisplayID; point: CGPoint ): CGDisplayErr; external name '_CGDisplayMoveCursorToPoint';
+
+{
+ * Report the mouse position change associated with the last mouse move event
+ * recieved by this application.
+ }
+procedure CGGetLastMouseDelta( var deltaX: CGMouseDelta; var deltaY: CGMouseDelta ); external name '_CGGetLastMouseDelta';
+
+
+{ Palette controls (8 bit pseudocolor only) }
+
+{
+ * Returns TRUE if the current display mode supports palettes.
+ * Display must not be a hardware mirror of another, and should
+ * have a depth of 8 bits per pixel for this to return TRUE.
+ }
+function CGDisplayCanSetPalette( display: CGDirectDisplayID ): boolean_t; external name '_CGDisplayCanSetPalette';
+
+{
+ * Set a palette. The current gamma function is applied to the palette
+ * elements before being loaded into hardware. The display must not be
+ * a hardware mirror of another, and should have a depth of 8 bits per pixel.
+ * Setting the palette on the active, or primary display in a hardware
+ * mirroring set affects all displays in that set.
+ }
+function CGDisplaySetPalette( display: CGDirectDisplayID; palette: CGDirectPaletteRef ): CGDisplayErr; external name '_CGDisplaySetPalette';
+
+{
+ * Wait until the beam position is outside the range specified by upperScanLine and lowerScanLine.
+ * Note that if upperScanLine and lowerScanLine encompass the entire display height,
+ * the function returns an error.
+ * lowerScanLine must be greater than or equal to upperScanLine.
+ *
+ * Some display systems may not conventional video vertical and horizontal sweep in painting.
+ * These displays report a kCGDisplayRefreshRate of 0 in the CFDictionaryRef returned by
+ * CGDisplayCurrentMode(). On such displays, this function returns at once.
+ *
+ * Some drivers may not implement support for this mechanism.
+ * On such displays, this function returns at once.
+ *
+ * Returns CGDisplayNoErr on success, and an error if display or upperScanLine and
+ * lowerScanLine are invalid.
+ *
+ * The app should set the values of upperScanLine and lowerScanLine to allow enough lead time
+ * for the drawing operation to complete. A common strategy is to wait for the beam to pass
+ * the bottom of the drawing area, allowing almost a full vertical sweep period to perform drawing.
+ * To do this, set upperScanLine to 0, and set lowerScanLine to the bottom of the bounding box:
+ * lowerScanLine = (CGBeamPosition)(cgrect.origin.y + cgrect.size.height);
+ *
+ * IOKit may implement this as a spin-loop on the beam position call used for CGDisplayBeamPosition().
+ * On such system the function is CPU bound, and subject to all the usual scheduling pre-emption.
+ * In particular, attempting to wait for the beam to hit a specific scanline may be an exercise in frustration.
+ *
+ * These functions are advisary in nature, and depend on IOKit and hardware specific drivers to implement
+ * support. If you need extremely precise timing, or access to vertical blanking interrupts,
+ * you should consider writing a device driver to tie into hardware-specific capabilities.
+ }
+function CGDisplayWaitForBeamPositionOutsideLines( display: CGDirectDisplayID; upperScanLine: CGBeamPosition; lowerScanLine: CGBeamPosition ): CGDisplayErr; external name '_CGDisplayWaitForBeamPositionOutsideLines';
+
+{
+ * Returns the current beam position on the display. If display is invalid,
+ * or the display does not implement conventional video vertical and horizontal
+ * sweep in painting, or the driver does not implement this functionality, 0 is returned.
+ }
+function CGDisplayBeamPosition( display: CGDirectDisplayID ): CGBeamPosition; external name '_CGDisplayBeamPosition';
+
+{
+ * Obtain a CGContextRef suitable for drawing to a captured display.
+ *
+ * Returns a drawing context suitable for use on the display device.
+ * The context is owned by the device, and should not be released by
+ * the caller.
+ *
+ * The context remains valid while the display is captured, and the
+ * display configuration is unchanged. Releasing the captured display
+ * or reconfiguring the display invalidates the drawing context.
+ *
+ * An application may register a display reconfiguration callback to determine
+ * when the display configuration is changing via CGRegisterDisplayReconfigurationProc().
+ *
+ * After a display configuration change, or on capturing a display, call this
+ * function to obtain a current drawing context.
+ *
+ * If the display has not been captured, this function returns NULL.
+ }
+function CGDisplayGetDrawingContext( display: CGDirectDisplayID ): CGContextRef; external name '_CGDisplayGetDrawingContext'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{unit CGDirectPalette}
+{
+ * CGDirectPalette.h
+ * CoreGraphics
+ *
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CGPaletteBlendFraction = Float32; { A value between 0.0 and 1.0 }
+
+{
+ * Convenient device color representation
+ *
+ * Values should be in the range from 0.0 to 1.0, where 0.0 is black, and 1.0
+ * is full on for each channel.
+ }
+type
+ CGDeviceColorPtr = ^CGDeviceColor;
+ CGDeviceColor = record
+ red: Float32;
+ green: Float32;
+ blue: Float32;
+ end;
+
+ CGDeviceByteColorPtr = ^CGDeviceByteColor;
+ CGDeviceByteColor = record
+ red: SInt8;
+ green: SInt8;
+ blue: SInt8;
+ end;
+
+{
+ * Create a new palette object representing the default 8 bit color palette.
+ * Release the palette using CGPaletteRelease().
+ }
+function CGPaletteCreateDefaultColorPalette: CGDirectPaletteRef; external name '_CGPaletteCreateDefaultColorPalette';
+
+{
+ * Create a copy of the display's current palette, if any.
+ * Returns NULL if the current display mode does not support a palette.
+ * Release the palette using CGPaletteRelease().
+ }
+function CGPaletteCreateWithDisplay( display: CGDirectDisplayID ): CGDirectPaletteRef; external name '_CGPaletteCreateWithDisplay';
+
+{
+ * Create a new palette with a capacity as specified. Entries are initialized from
+ * the default color palette. Release the palette using CGPaletteRelease().
+ }
+function CGPaletteCreateWithCapacity( capacity: CGTableCount ): CGDirectPaletteRef; external name '_CGPaletteCreateWithCapacity';
+
+{
+ * Create a new palette with a capacity and contents as specified.
+ * Release the palette using CGPaletteRelease().
+ }
+function CGPaletteCreateWithSamples( var sampleTable: CGDeviceColor; sampleCount: CGTableCount ): CGDirectPaletteRef; external name '_CGPaletteCreateWithSamples';
+
+{
+ * Convenience function:
+ * Create a new palette with a capacity and contents as specified.
+ * Release the palette using CGPaletteRelease().
+ }
+function CGPaletteCreateWithByteSamples( var sampleTable: CGDeviceByteColor; sampleCount: CGTableCount ): CGDirectPaletteRef; external name '_CGPaletteCreateWithByteSamples';
+
+{
+ * Release a palette
+ }
+procedure CGPaletteRelease( palette: CGDirectPaletteRef ); external name '_CGPaletteRelease';
+
+{
+ * Get the color value at the specified index
+ }
+function CGPaletteGetColorAtIndex( palette: CGDirectPaletteRef; index: CGTableCount ): CGDeviceColor; external name '_CGPaletteGetColorAtIndex';
+
+{
+ * Get the index for the specified color value
+ * The index returned is for a palette color with the
+ * lowest RMS error to the specified color.
+ }
+function CGPaletteGetIndexForColor( palette: CGDirectPaletteRef; color: CGDeviceColor ): CGTableCount; external name '_CGPaletteGetIndexForColor';
+
+{
+ * Get the number of samples in the palette
+ }
+function CGPaletteGetNumberOfSamples( palette: CGDirectPaletteRef ): CGTableCount; external name '_CGPaletteGetNumberOfSamples';
+
+
+{
+ * Set the color value at the specified index
+ }
+procedure CGPaletteSetColorAtIndex( palette: CGDirectPaletteRef; color: CGDeviceColor; index: CGTableCount ); external name '_CGPaletteSetColorAtIndex';
+
+{
+ * Copy a palette
+ }
+function CGPaletteCreateCopy( palette: CGDirectPaletteRef ): CGDirectPaletteRef; external name '_CGPaletteCreateCopy';
+
+{
+ * Compare two palettes
+ }
+function CGPaletteIsEqualToPalette( palette1: CGDirectPaletteRef; palette2: CGDirectPaletteRef ): Boolean; external name '_CGPaletteIsEqualToPalette';
+
+{
+ * Create a new palette blended with a fraction of a device color.
+ * Free the resulting palette with CGPaletteRelease()
+ }
+function CGPaletteCreateFromPaletteBlendedWithColor( palette: CGDirectPaletteRef; fraction: CGPaletteBlendFraction; color: CGDeviceColor ): CGDirectPaletteRef; external name '_CGPaletteCreateFromPaletteBlendedWithColor';
+
+
+{unit CGDisplayConfiguration}
+{
+ * CGDisplayConfiguration.h
+ * CoreGraphics
+ *
+ * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ *
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{
+ * Display reconfiguration process.
+ * Call CGBeginDisplayConfiguration to start.
+ * Make all desired changes, for all displays.
+ * Commit the changes using CGPerformDisplayConfiguration(), or cancel with
+ * CGCancelDisplayConfiguration()
+ *
+ * The resulting layout will be adjusted so as to remove gaps or overlaps from
+ * the requested layout, if needed.
+ }
+type
+ CGDisplayConfigRef = ^SInt32; { an opaque 32-bit type }
+
+{ Get a new CGDisplayConfigRef }
+function CGBeginDisplayConfiguration( var pConfigRef: CGDisplayConfigRef ): CGError; external name '_CGBeginDisplayConfiguration';
+
+{
+ * Set the origin point for a display
+ *
+ * Note that setting the origin of a display which is mirroring
+ * another display will remove that display from any mirroring set.
+ *
+ * Any display whose origin is not explicitly set in a reconfiguration
+ * will be repositioned to a location as close as possible to it's
+ * current location without overlapping or leaving a gap between displays.
+ *
+ * The actual position a display is placed at will be as close as possible
+ * to the requested location without overlapping or leaving a gap between
+ * displays.
+ }
+function CGConfigureDisplayOrigin( configRef: CGDisplayConfigRef; display: CGDirectDisplayID; x: CGDisplayCoord; y: CGDisplayCoord ): CGError; external name '_CGConfigureDisplayOrigin';
+
+{
+ * Set the display mode
+ *
+ * The mode dictionary passed in must be a dictionary vended by other CGDirectDisplay
+ * APIs such as CGDisplayBestModeForParameters() and CGDisplayAvailableModes().
+ *
+ * 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.
+ }
+function CGConfigureDisplayMode( configRef: CGDisplayConfigRef; display: CGDirectDisplayID; mode: CFDictionaryRef ): CGError; external name '_CGConfigureDisplayMode';
+
+{
+ * Make a display a mirror of masterDisplay.
+ *
+ * Use a CGDirectDisplayID of kCGNullDirectDisplay for the masterDisplay to disable
+ * mirroring.
+ * Use a CGDirectDisplayID of CGMainDisplayID() for the masterDisplay to mirror
+ * the main display.
+ *
+ * Mirroring requests will be filled with hardware mirroring when possible,
+ * at the device driver's choice. Displays will be matted as appropriate,
+ * using either hardware or software matte generation, again at the device driver's choice.
+ *
+ * Note that when hardware mirroring is in effect, the device driver may bind the hardware
+ * accelerator, drawing engine, and 3D engine to any one of the displays in the hardware
+ * mirroring set. That display will become the active display for drawing purposes in that
+ * hardware mirroring set. Use CGDisplayPrimaryDisplay() to determine the correct display
+ * device to process drawing operations in a hardware mirroring set.
+ *
+ * An app that uses CGGetActiveDisplayList() to determine the proper displays to draw to
+ * (All Carbon and Cocoa apps using windows and/or DrawSprocket fall into this class)
+ * will automatically get the correct behavior.
+ }
+function CGConfigureDisplayMirrorOfDisplay( configRef: CGDisplayConfigRef; display: CGDirectDisplayID; masterDisplay: CGDirectDisplayID ): CGError; external name '_CGConfigureDisplayMirrorOfDisplay';
+
+{ Cancel a reconfiguration operation, discarding the configRef }
+function CGCancelDisplayConfiguration( configRef: CGDisplayConfigRef ): CGError; external name '_CGCancelDisplayConfiguration';
+
+{
+ * Perform the requested reconfigurations and discard the configRef
+ *
+ * A configuration change can apply for the life of an app, the life of a login session, or
+ * permanently. If a request is made to make a change permanent, and the change
+ * cannot be supported by the Aqua UI (resolution and pixel depth constraints apply),
+ * then the configuration change is demoted to lasting the session.
+ *
+ * A permanent configuration change also becomes the current session's
+ * configuration.
+ *
+ * When the system reverts confgurations at app termination, the
+ * configuration always reverts to the session or permanent configuration setting.
+ *
+ * When the system reverts confgurations at session termination, the
+ * configuration always reverts to the permanent configuration setting.
+ *
+ * This operation may fail if:
+ * An unsupported display mode is requested
+ * Another app is running in full-screen mode
+ *
+ }
+const
+ kCGConfigureForAppOnly = 0;
+ kCGConfigureForSession = 1;
+ kCGConfigurePermanently = 2;
+type
+ CGConfigureOption = UInt32;
+
+function CGCompleteDisplayConfiguration( configRef: CGDisplayConfigRef; option: CGConfigureOption ): CGError; external name '_CGCompleteDisplayConfiguration';
+
+{ Restore the permanent display configuration from the user's display preferences settings }
+procedure CGRestorePermanentDisplayConfiguration; external name '_CGRestorePermanentDisplayConfiguration';
+
+{
+ * Applications may want to register for notifications of display changes.
+ *
+ * Display changes are reported via a callback mechanism.
+ *
+ * Callbacks are invoked when the app is listening for events,
+ * on the event processing thread, or from within the display
+ * reconfiguration function when in the program that is driving the
+ * reconfiguration.
+ *
+ * Callbacks should avoid attempting to change display configurations,
+ * and should not raise exceptions or perform a non-local return such as
+ * calling longjmp().
+ *
+ * Before display reconfiguration, a callback fires to inform
+ * applications of a pending configuration change. The callback runs
+ * once for each on-line display. The flags passed in are set to
+ * kCGDisplayBeginConfigurationFlag. This callback does not
+ * carry other per-display information, as details of how a
+ * reconfiguration affects a particular device rely on device-specific
+ * behaviors which may not be exposed by a device driver.
+ *
+ * After display reconfiguration, at the time the callback function
+ * is invoked, all display state reported by CoreGraphics, QuickDraw,
+ * and the Carbon Display Manager API will be up to date. This callback
+ * runs after the Carbon Display Manager notification callbacks.
+ * The callback runs once for each added, removed, and currently
+ * on-line display. Note that in the case of removed displays, calls into
+ * the CoreGraphics API with the removed display ID will fail.
+ }
+
+const
+ kCGDisplayBeginConfigurationFlag = 1 shl 0; { Set in pre-reconfiguration callback }
+ kCGDisplayMovedFlag = 1 shl 1; { post-reconfiguration callback flag }
+ kCGDisplaySetMainFlag = 1 shl 2; { post-reconfiguration callback flag }
+ kCGDisplaySetModeFlag = 1 shl 3; { post-reconfiguration callback flag }
+ kCGDisplayAddFlag = 1 shl 4; { post-reconfiguration callback flag }
+ kCGDisplayRemoveFlag = 1 shl 5; { post-reconfiguration callback flag }
+ kCGDisplayEnabledFlag = 1 shl 8; { post-reconfiguration callback flag }
+ kCGDisplayDisabledFlag = 1 shl 9; { post-reconfiguration callback flag }
+ kCGDisplayMirrorFlag = 1 shl 10;{ post-reconfiguration callback flag }
+ kCGDisplayUnMirrorFlag = 1 shl 11; { post-reconfiguration callback flag }
+type
+ CGDisplayChangeSummaryFlags = UInt32;
+
+type
+ CGDisplayReconfigurationCallBack = procedure( display: CGDirectDisplayID; flags: CGDisplayChangeSummaryFlags; userInfo: UnivPtr );
+
+{
+ * Register and remove a display reconfiguration callback procedure
+ * The userInfo argument is passed back to the callback procedure each time
+ * it is invoked.
+ }
+function CGDisplayRegisterReconfigurationCallback( proc: CGDisplayReconfigurationCallBack; userInfo: UnivPtr ): CGError; external name '_CGDisplayRegisterReconfigurationCallback'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+function CGDisplayRemoveReconfigurationCallback( proc: CGDisplayReconfigurationCallBack; userInfo: UnivPtr ): CGError; external name '_CGDisplayRemoveReconfigurationCallback'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{
+ * These APIs allow applications and higher level frameworks
+ * such as DrawSprocket to determine interesting properties
+ * of displays, such as if a display is built-in, if a display
+ * is the main display, if a display is being mirrored, which
+ * display in a hardware mirror set is bound to the graphics
+ * accelerator (important for games!) and so on.
+ *
+ * An app that uses CGGetActiveDisplayList() to determine the
+ * proper displays to draw to (All Carbon and Cocoa apps using
+ * windows and/or DrawSprocket fall into this class) will
+ * automatically get the correct behavior without using these APIs.
+ * These APIs are primarily of interest to specialized applications
+ * such as movie players, integrated TV/video graphics utilities,
+ * and similar specialized applications.
+ }
+
+{ True if the display is connected, awake, and drawable }
+function CGDisplayIsActive( display: CGDirectDisplayID ): boolean_t; external name '_CGDisplayIsActive';
+
+{ True if the display is asleep and therefore not drawable }
+function CGDisplayIsAsleep( display: CGDirectDisplayID ): boolean_t; external name '_CGDisplayIsAsleep';
+
+{
+ * True if the display is valid, with a monitor connected
+ * (support for hot plugging of monitors)
+ }
+function CGDisplayIsOnline( display: CGDirectDisplayID ): boolean_t; external name '_CGDisplayIsOnline';
+
+{ True if the display is the current main display }
+function CGDisplayIsMain( display: CGDirectDisplayID ): boolean_t; external name '_CGDisplayIsMain';
+
+{ True if the display is built in, such as the internal display in portables }
+function CGDisplayIsBuiltin( display: CGDirectDisplayID ): boolean_t; external name '_CGDisplayIsBuiltin';
+
+{ True if the display is in a mirroring set }
+function CGDisplayIsInMirrorSet( display: CGDirectDisplayID ): boolean_t; external name '_CGDisplayIsInMirrorSet';
+
+{ True if the display is always in a mirroring set, and cannot be unmirrored }
+function CGDisplayIsAlwaysInMirrorSet( display: CGDirectDisplayID ): boolean_t; external name '_CGDisplayIsAlwaysInMirrorSet';
+
+{ True if the display is in a hardware mirroring set }
+function CGDisplayIsInHWMirrorSet( display: CGDirectDisplayID ): boolean_t; external name '_CGDisplayIsInHWMirrorSet';
+
+{ Returns display being mirrored, or kCGNullDirectDisplay if master or unmirrored }
+function CGDisplayMirrorsDisplay( display: CGDirectDisplayID ): CGDirectDisplayID; external name '_CGDisplayMirrorsDisplay';
+
+{ True if the display is using OpenGL acceleration }
+function CGDisplayUsesOpenGLAcceleration( display: CGDirectDisplayID ): boolean_t; external name '_CGDisplayUsesOpenGLAcceleration';
+
+
+{
+ * Returns the display bound to the hardware accelerator in a HW mirror set,
+ * or 'display' if software mirrored or unmirrored
+ }
+function CGDisplayPrimaryDisplay( display: CGDirectDisplayID ): CGDirectDisplayID; external name '_CGDisplayPrimaryDisplay';
+
+{
+ * Returns the logical unit, vendor ID, vendor model number,
+ * and serial number for a display
+ }
+function CGDisplayUnitNumber( display: CGDirectDisplayID ): UInt32; external name '_CGDisplayUnitNumber';
+function CGDisplayVendorNumber( display: CGDirectDisplayID ): UInt32; external name '_CGDisplayVendorNumber';
+function CGDisplayModelNumber( display: CGDirectDisplayID ): UInt32; external name '_CGDisplayModelNumber';
+function CGDisplaySerialNumber( display: CGDirectDisplayID ): UInt32; external name '_CGDisplaySerialNumber';
+
+{ Returns the IOKit service port for a display device }
+// uncomment when IOKit translated function CGDisplayIOServicePort( display: CGDirectDisplayID ): io_service_t;
+
+{
+ * Returns the size of the specified display in millimeters.
+ *
+ * If 'display' is not a valid display ID, the size returned has a width and height of 0.
+ *
+ * If EDID data for the display device is not available, the size is estimated based on
+ * the device width and height in pixels from CGDisplayBounds(), with an assumed resolution
+ * of 2.835 pixels/mm, or 72 DPI, a reasonable guess for displays predating EDID support.
+ }
+function CGDisplayScreenSize( display: CGDirectDisplayID ): CGSize; external name '_CGDisplayScreenSize'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{unit CGDisplayFade}
+{
+ * CGDisplayFade.h
+ * CoreGraphics
+ *
+ * API to fade displays to and from a solid color, without resorting
+ * to playing with the gamma table APIs and losing ColorSync calibration.
+ *
+ * These APIs should be used in perference to manipulating the gamma tables
+ * for purposes of performing fade effects.
+ *
+ * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ *
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CGDisplayFadeReservationToken = UInt32;
+const
+ kCGDisplayFadeReservationInvalidToken = 0;
+
+type
+ CGDisplayBlendFraction = Float32;
+{
+ * Values for the limits of the fade.
+ * kCGDisplayBlendNormal represents a normal display state
+ * kCGDisplayBlendSolidColor represents a display blended to a solid color
+ }
+const
+ kCGDisplayBlendNormal = 0.0;
+const
+ kCGDisplayBlendSolidColor = 1.0;
+
+{
+ * Time in seconds to perform a fade operation.
+ }
+type
+ CGDisplayFadeInterval = Float32;
+
+{
+ *
+ * Most fade operations done by apps and games are done around display
+ * configuration changes. This API adds control over a built-in fade
+ * effect when performing display configuration changes.
+ *
+ * The default fade effect on a display mode change uses a fade-out of
+ * 0.3 seconds and a fade-in of 0.5 seconds. Color fades to French Blue
+ * for a normal desktop, and black when displays are captured.
+ *
+ * CGConfigureDisplayFadeEffect sets the display fade time and color
+ * for a display reconfigure operation.
+ * Call after CGBeginDisplayConfiguration() and before
+ * calling CGCompleteDisplayConfiguration().
+ *
+ * When CGCompleteDisplayConfiguration() is called, a fade-out effect will be
+ * done prior to the display reconfiguration. When the display reconfiguration
+ * is complete, control returns to the calling program, while a fade-in effect
+ * runs asynchronously.
+ }
+function CGConfigureDisplayFadeEffect( configRef: CGDisplayConfigRef; fadeOutSeconds: CGDisplayFadeInterval; fadeInSeconds: CGDisplayFadeInterval; fadeRed: Float32; fadeGreen: Float32; fadeBlue: Float32 ): CGError; external name '_CGConfigureDisplayFadeEffect';
+
+{
+ * It may also be desirable to perform fade operations at other times, as when
+ * transitioning between game play and cinematic sequences. The following API
+ * provides a mechanism for controlling display fade operations outside of display
+ * mode reconfigurations.
+ }
+type
+ CGDisplayReservationInterval = Float32;
+const
+ kCGMaxDisplayReservationInterval = 15.0;
+{
+ * Before performing fade operation, the caller must reserve the hardware
+ * for the expected period of time that the program will be doing fades
+ *
+ * A reservation token is returned that must be passed in on subsequent calls.
+ *
+ * Failing to release the hardware by the end of the reservation interval will
+ * result in the reservation token becomingn invalid, and the hardware being
+ * unfaded back to a normal state. The reservation interval is limited (clipped)
+ * to 15 seconds maximum, and should be greater than zero.
+ *
+ * Returns kCGErrorNoneAvailable if another reservation is in effect,
+ * and kCGErrorSuccess on success.
+ }
+function CGAcquireDisplayFadeReservation( seconds: CGDisplayReservationInterval; var pNewToken: CGDisplayFadeReservationToken ): CGError; external name '_CGAcquireDisplayFadeReservation';
+
+{
+ * Releases a display fade reservation, and unfades the display if needed
+ * The reservation token myToken is no longer valid after this operation.
+ *
+ * CGReleaseDisplayFadeReservation may be safely called while an async fade
+ * operation is running, and if the ending blend value is kCGDisplayBlendNormal,
+ * will not disturb the running operation. The reservation is dropped when the
+ * fade opertion completes.
+ *
+ * Returns kCGErrorIllegalArgument if myToken is not the valid reservation token,
+ * and kCGErrorSuccess on success.
+ }
+function CGReleaseDisplayFadeReservation( myToken: CGDisplayFadeReservationToken ): CGError; external name '_CGReleaseDisplayFadeReservation';
+
+{
+ * The actual fade mechanism:
+ *
+ * The function takes the current reservation token,
+ * a time interval to perform the fade operation in seconds,
+ * a starting and ending blend coefficient, an RGB color in device space,
+ * and a boolean to indicate that the operation should be done synchronously.
+ *
+ * Over the fade operation time interval, the system will interpolate a
+ * blending coefficient between the starting and ending values given,
+ * applying a nonlinear (sine-based) bias term, and will blend the video output
+ * with the specified color based on the resulting value.
+ *
+ * If the time interval is specifed as 0.0, then the ending state blend value is
+ * applied at once and the function returns.
+ *
+ * The maximum allowable time interval is 15 seconds.
+ *
+ * If the parameter 'synchronous' is true, the function does not return
+ * til the fade operation is complete. If false, the function returns at once,
+ * and the fade operation runs asynchronously.
+ *
+ * CGReleaseDisplayFadeReservation may be safely called while an async fade
+ * operation is running, and if the ending blend value is kCGDisplayBlendNormal,
+ * will not disturb the running operation. The reservation is dropped when the
+ * fade opertion completes.
+ *
+ * Invalid parameters result in a return value of kCGErrorIllegalArgument.
+ * Trying to start a fade operation while an asynchronous fade operation is running
+ * results in a return value of kCGErrorNoneAvailable.
+ *
+ * To perform a 2 second fade to black, waiting til complete:
+ *
+ * CGDisplayFade(myToken,
+ * 2.0, // 2 seconds
+ * kCGDisplayBlendNormal, // Starting state
+ * kCGDisplayBlendSolidColor, // Ending state
+ * 0.0, 0.0, 0.0, // black
+ * true); // Wait for completion
+ *
+ * To perform a 2 second fade from black to normal, without waiting for completion:
+ *
+ * CGDisplayFade(myToken,
+ * 2.0, // 2 seconds
+ * kCGDisplayBlendSolidColor, // Starting state
+ * kCGDisplayBlendNormal, // Ending state
+ * 0.0, 0.0, 0.0, // black
+ * false); // Don't wait for completion
+ }
+function CGDisplayFade( myToken: CGDisplayFadeReservationToken; seconds: CGDisplayFadeInterval; startBlend: CGDisplayBlendFraction; endBlend: CGDisplayBlendFraction; redBlend: Float32; greenBlend: Float32; blueBlend: Float32; synchronous: boolean_t ): CGError; external name '_CGDisplayFade';
+
+{
+ * Returns true if a fade operation is currently in progress.
+ }
+function CGDisplayFadeOperationInProgress: boolean_t; external name '_CGDisplayFadeOperationInProgress';
+
+
+{unit CGEventSource}
+{
+* CGEventSource.h
+* CoreGraphics
+*
+* Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+*
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ Return the CFTypeID for CGEventSourceRefs. }
+function CGEventSourceGetTypeID: CFTypeID; external name '_CGEventSourceGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * Create a new CGEventSource
+ *
+ * The event source contains accumulated state related to event
+ * generation and event posting, allowing for customized event
+ * generation and processing.
+ *
+ * The CGEventSourceStateID refers to a global event state table.
+ * These tables contain accumulated information on modifier flag state,
+ * keyboard key state, mouse button state, and related internal parameters
+ * placed in effect by posting events with associated sources.
+ *
+ * Two pre-existing tables are defined.
+ *
+ * The kCGEventSourceStateCombinedSessionState table reflects the combined state
+ * of all event sources posting to this user login session. Mouse button,
+ * keyboard state, and modifier flag state (derived from keyboard state)
+ * are logically ORed together in this state table.
+ *
+ * The kCGEventSourceStateHIDSystemState table reflects the combined state
+ * of all hardware event sources posting from the HID system. Mouse button,
+ * keyboard state, and modifier flag state (derived from keyboard state)
+ * for the hardware devices are logically ORed together in this state table.
+ *
+ * A program, or application posting from within a login session should use
+ * the kCGEventSourceStateCombinedSessionState.
+ *
+ * A user space device driver interpreting hardware state and generating events
+ * should use the kCGEventSourceStateHIDSystemState.
+ *
+ * Very specialized applications such as remote control programs may want to
+ * generate and track event source state independent of other processes.
+ * These programs should use the kCGEventSourceStatePrivate value in creating
+ * their event source. An independent state table and unique CGEventSourceStateID
+ * are created to track the event source's state. The independent sate table is owned
+ * by the creating event source and released with it.
+ *
+ * If the CGEventSourceStateID from another CGEventSourceRef
+ * is released while being used in a second CGEventSourceRef, the second source
+ * will behave as if all keys and buttons on input devices are up in generating
+ * new events from this source.
+ *
+ * Default behavior without an event source, that is, passing NULL to
+ * CGEvent creation functions, is identical to using an unmodified
+ * CGEventSource created with the kCGEventSourceStateCombinedSystemState
+ * source state ID, if running within a login session, or using
+ * kCGEventSourceStateHIDSystemState if running outside of a login session,
+ * as in a daemon or user space device driver.
+ *
+ * Returns NULL if the specified event source is not a valid CGEventSourceStateID,
+ * or is a private event source owned by another process,
+ * or is not a member of the following enumeration.
+ *
+ * The returned object should be released with CFRelease when no longer needed.
+ }
+function CGEventSourceCreate( sourceState: CGEventSourceStateID ): CGEventSourceRef; external name '_CGEventSourceCreate'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * Set and get the keyboard type to be used with this source
+ * The value will be used with UCKeyTranslate() to drive keyboard translation
+ }
+function CGEventSourceGetKeyboardType( source: CGEventSourceRef ): CGEventSourceKeyboardType; external name '_CGEventSourceGetKeyboardType'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+procedure CGEventSourceSetKeyboardType( source: CGEventSourceRef; keyboardType: CGEventSourceKeyboardType ); external name '_CGEventSourceSetKeyboardType'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * Return the event source state ID associated with the event source.
+ * For event sources created with the kCGEventSourceStatePrivate
+ * CGEventSourceStateID, this returns the actual CGEventSourceStateID
+ * created for the CGEventSourceRef.
+ *
+ * The value returned may be passed to CGEventSourceCreate() to create a
+ * second event source sharing the same state table. This may be useful,
+ * for example, in creating seperate mouse and keyboard sources which share
+ * a common private state.
+ *
+ * If the CGEventSourceStateID from another CGEventSourceRef
+ * is released while being used in a second CGEventSourceRef, the second source
+ * will behave as if all keys and buttons on input devices are up in generating
+ * new events from this source.
+ }
+function CGEventSourceGetSourceStateID( source: CGEventSourceRef ): CGEventSourceStateID; external name '_CGEventSourceGetSourceStateID'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * The state of an event source may be queried for specialized event processing
+ * purposes.
+ }
+function CGEventSourceButtonState( sourceState: CGEventSourceStateID; button: CGMouseButton ): CBool; external name '_CGEventSourceButtonState'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+function CGEventSourceKeyState( sourceState: CGEventSourceStateID; key: CGKeyCode ): CBool; external name '_CGEventSourceKeyState'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+function CGEventSourceFlagsState( sourceState: CGEventSourceStateID ): CGEventFlags; external name '_CGEventSourceFlagsState'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * Time since last event for an event source.
+ *
+ * The kCGAnyInputEventType eventType will report the last timestamp for any
+ * input event, keyboard, mouse, or tablet. The various system and app
+ * defined events do not contribute to this event type's time.
+ *
+ * Again, a program or application posting from within a login session should use
+ * the kCGEventSourceStateCombinedSessionState.
+ *
+ * A user space device driver interpreting hardware state and generating events
+ * should use the kCGEventSourceStateHIDSystemState.
+ }
+
+function CGEventSourceSecondsSinceLastEventType( source: CGEventSourceStateID; eventType: CGEventType ): CFTimeInterval; external name '_CGEventSourceSecondsSinceLastEventType'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * Returns a count of events of different types seen since the window server started.
+ *
+ * Note that modifier keys produce kCGEventFlagsChanged events, not kCGEventKeyDown
+ * events, and do so both on press and release.
+ *
+ * Please note that some keys on the keyboard are not implemented as keys,
+ * but instead are USB button devices. We account for the ones we can see as
+ * kCGEventKeyDown events. Where we don't get a different event for key-up, we
+ * record both a key down and a key up.
+ *
+ * There is no guarantee that the number of key down and key up events will match
+ * when all keyboard keys are up, due to the inconsistent nature of the USB button device keys.
+ *
+ * Key autorepeat events are not counted.
+ *
+ * Synthetic events posted into the system may also produce assymetric 'down' and 'up' event counts.
+ *
+ * Again, a program or application posting from within a login session should use
+ * the kCGEventSourceStateCombinedSessionState.
+ *
+ * A user space device driver interpreting hardware state and generating events
+ * should use the kCGEventSourceStateHIDSystemState.
+ *
+ }
+function CGEventSourceCounterForEventType( source: CGEventSourceStateID; evType: CGEventType ): UInt32; external name '_CGEventSourceCounterForEventType'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * Each event carries a payload of 64 bits of user specified data.
+ * The values may be individually set per event using the
+ * CGEventSetIntegerValueField() API, or may be set for all events
+ * created by this event source using this API.
+ * This mechanism is more convenient for uses such as vendor hardware IDs.
+ }
+procedure CGEventSourceSetUserData( source: CGEventSourceRef; userData: SInt64 ); external name '_CGEventSourceSetUserData'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+function CGEventSourceGetUserData( source: CGEventSourceRef ): SInt64; external name '_CGEventSourceGetUserData'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * The CGRemoteOperation APIs (CoreGraphics/CGRemoteOperation.h) use an implicit event
+ * source to affect system behavior on event posting. Here we expose the same mechanism
+ * on a per event source basis. Default values are different than the remote operation API
+ * exposes, based on developer feedback.
+ }
+
+{
+ * The system may optionally suppress local hardware events
+ * from the keyboard and mouse during a short interval after
+ * a program posts an event (see CGSetLocalEventsSuppressionInterval())
+ * or while your program has a left mouse button down (mouse drag) in effect.
+ *
+ * Some classes of applications may want to disable events from some of the local hardware.
+ * For example, an app may want to post only mouse events, and so may wish to permit local
+ * keyboard hardware events to pass through while blocking local mouse events.
+ * Set the event source to permit keyboard events
+ * prior to creating the mouse event after which you want to get keyboard events.
+ *
+ * This interface lets an app specify a state (event suppression interval, or mouse drag), and
+ * a mask of event categories to be passed through. The new filter state takes effect
+ * with the next event your app posts that is created with this event source.
+ *
+ * The kCGEventSuppressionStateSuppressionInterval state allows one to set a filter that
+ * permits local hardware mouse events, local keyboard events, both, or neither during the
+ * specified short interval of time after your process posts an event created with this source.
+ *
+ * The kCGEventSuppressionStateRemoteMouseDrag state allows one to set a filter that
+ * permits local hardware mouse events, local keyboard events, both, or neither during
+ * the time that your event source has a left mouse button down (mouse drag) in effect.
+ *
+ * The default state for a CGEventSourceRef is to have all filtering off, so that local
+ * hardware events are unaffected.
+ *
+ * When a user enters the 'Force Quit' keyboard attention sequence, Command-Option-Escape,
+ * all local event supression filters in effect are disabled, and all local hardware
+ * events are delivered as normal. This allows for recovery from unfortunate programming
+ * errors.
+ }
+
+procedure CGEventSourceSetLocalEventsFilterDuringSuppressionState( source: CGEventSourceRef; filter: CGEventFilterMask; state: CGEventSuppressionState ); external name '_CGEventSourceSetLocalEventsFilterDuringSuppressionState'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CGEventSourceGetLocalEventsFilterDuringSuppressionState( source: CGEventSourceRef; state: CGEventSuppressionState ): CGEventFilterMask; external name '_CGEventSourceGetLocalEventsFilterDuringSuppressionState'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * Set the period of time in seconds that specified local hardware events (keyboard or mouse)
+ * may suppressed after posting a CGEventRef created with this source, if the event
+ * source is set to apply the kCGEventSuppressionStateSuppressionInterval.
+ *
+ * Defaults to 0.25 second.
+ }
+procedure CGEventSourceSetLocalEventsSuppressionInterval( source: CGEventSourceRef; seconds: CFTimeInterval ); external name '_CGEventSourceSetLocalEventsSuppressionInterval'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+function CGEventSourceGetLocalEventsSuppressionInterval( source: CGEventSourceRef ): CFTimeInterval; external name '_CGEventSourceGetLocalEventsSuppressionInterval'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit CGGLContext}
+{ CoreGraphics - CGGLContext.h
+ * Copyright (c) 2003 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ Create a context from the OpenGL context `glContext'. `size' specifies
+ * the dimensions of the OpenGL viewport rectangle which the CGContext will
+ * establish by calling glViewport(3G). If non-NULL, `colorspace' should
+ * be an RGB profile which specifies the destination space when rendering
+ * device-independent colors. }
+
+function CGGLContextCreate( var glContext: UnivPtr; size: CGSize; colorspace: CGColorSpaceRef ): CGContextRef; external name '_CGGLContextCreate'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Update the OpenGL viewport associated with the OpenGL context `c' to a
+ * new size. `size' specifies the dimensions of a new OpenGL viewport
+ * rectangle which the CGContext will establish by calling glViewport(3G).
+ * This function should be called whenever the size of the OpenGL context
+ * changes. }
+
+procedure CGGLContextUpdateViewportSize( c: CGContextRef; size: CGSize ); external name '_CGGLContextUpdateViewportSize'; (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{unit CGImageDestination}
+{
+ * ImageIO - CGImageDestination.h
+ * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CGImageDestinationRef = ^SInt32; { an opaque 32-bit type }
+
+
+{* Properties which may be passed to "CGImageDestinationAddImage"
+ ** or "CGImageDestinationAddImageFromSource" to effect the output.
+ ** The values apply to a single image of an image destination. *}
+
+
+{ The desired compression quality to use when writing to an image
+ * destination. If present, the value of this key is a CFNumberRef
+ * in the range 0.0 to 1.0. A value of 1.0 implies lossless
+ * compression is desired if destination format supports it.
+ * A value of 0.0 implies that that maximum compression is
+ * desired. }
+
+var kCGImageDestinationLossyCompressionQuality: CFStringRef; external name '_kCGImageDestinationLossyCompressionQuality'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ The desired background color to composite against when writing
+ * an image with alpha to a destination format that does not support
+ * alpha. If present, the value of this key is a CGColorRef without
+ * any alpha component of its own. If not present a white color
+ * will be used if needed. }
+
+var kCGImageDestinationBackgroundColor: CFStringRef; external name '_kCGImageDestinationBackgroundColor'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ Return the CFTypeID for CGImageDestinations. }
+
+function CGImageDestinationGetTypeID: CFTypeID; external name '_CGImageDestinationGetTypeID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return an array of supported type identifiers. }
+
+function CGImageDestinationCopyTypeIdentifiers: CFArrayRef; external name '_CGImageDestinationCopyTypeIdentifiers';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create an image destination writing to the data consumer `consumer'.
+ * The parameter `type' specifies the type identifier of the resulting
+ * image file. The parameter `count' specifies number of images (not
+ * including thumbnails) that the image file will contain. The `options'
+ * dictionary is reserved for future use; currently, you should pass NULL
+ * for this parameter. }
+
+function CGImageDestinationCreateWithDataConsumer( consumer: CGDataConsumerRef; typ: CFStringRef; count: size_t; options: CFDictionaryRef ): CGImageDestinationRef; external name '_CGImageDestinationCreateWithDataConsumer';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create an image destination writing to `data'. The parameter `type'
+ * specifies the type identifier of the resulting image file. The
+ * parameter `count' specifies number of images (not including thumbnails)
+ * that the image file will contain. The `options' dictionary is reserved
+ * for future use; currently, you should pass NULL for this parameter. }
+
+function CGImageDestinationCreateWithData( data: CFMutableDataRef; typ: CFStringRef; count: size_t; options: CFDictionaryRef ): CGImageDestinationRef; external name '_CGImageDestinationCreateWithData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create an image destination writing to `url'. The parameter `type'
+ * specifies the type identifier of the resulting image file. The
+ * parameter `count' specifies number of images (not including thumbnails)
+ * that the image file will contain. The `options' dictionary is reserved
+ * for future use; currently, you should pass NULL for this parameter.
+ * Note that if `url' already exists, it will be overwritten. }
+
+function CGImageDestinationCreateWithURL( url: CFURLRef; typ: CFStringRef; count: size_t; options: CFDictionaryRef ): CGImageDestinationRef; external name '_CGImageDestinationCreateWithURL';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Specify the dictionary `properties' of properties which apply to all
+ * images in the image destination `idst'. }
+
+procedure CGImageDestinationSetProperties( idst: CGImageDestinationRef; properties: CFDictionaryRef ); external name '_CGImageDestinationSetProperties';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Set the next image in the image destination `idst' to be `image' with
+ * optional properties specified in `properties'. An error is logged if
+ * more images are added than specified in the original count of the image
+ * destination. }
+
+procedure CGImageDestinationAddImage( idst: CGImageDestinationRef; image: CGImageRef; properties: CFDictionaryRef ); external name '_CGImageDestinationAddImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Set the next image in the image destination `idst' to be the image at
+ * `index' in the image source `isrc'. The index is zero-based. The
+ * properties of the source image can be added to or overriden by supplying
+ * additional keys/values in `properties'. If a key in `properties' has
+ * the value kCFNull, the corresponding property in the destination will be
+ * removed. }
+
+procedure CGImageDestinationAddImageFromSource( idst: CGImageDestinationRef; isrc: CGImageSourceRef; index: size_t; properties: CFDictionaryRef ); external name '_CGImageDestinationAddImageFromSource';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Write everything to the destination data, url or consumer of the image
+ * destination `idst'. You must call this function or the image
+ * destination will not be valid. After this function is called, no
+ * additional data will be written to the image destination. Return true
+ * if the image was successfully written; false otherwise. }
+
+function CGImageDestinationFinalize( idst: CGImageDestinationRef ): CBool; external name '_CGImageDestinationFinalize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit CGLayer}
+{ CoreGraphics - CGLayer.h
+ * Copyright (c) 2004 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ CGLayerRef = ^SInt32; { an opaque 32-bit type }
+
+
+{ Create a layer of size `size' relative to the context `context'. The
+ * value of `size' is specified in default user space (base space) units.
+ * If `size' is NULL, then the underlying size of `context' is used. The
+ * parameter `auxiliaryInfo' should be NULL; it is reserved for future
+ * expansion. }
+
+function CGLayerCreateWithContext( context: CGContextRef; size: CGSize; auxiliaryInfo: CFDictionaryRef ): CGLayerRef; external name '_CGLayerCreateWithContext'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Equivalent to `CFRetain(layer)', except it doesn't crash (as CFRetain
+ * does) if `layer' is NULL. }
+
+function CGLayerRetain( layer: CGLayerRef ): CGLayerRef; external name '_CGLayerRetain'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Equivalent to `CFRelease(layer)', except it doesn't crash (as CFRelease
+ * does) if `layer' is NULL. }
+
+procedure CGLayerRelease( layer: CGLayerRef ); external name '_CGLayerRelease'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the size of the layer `layer'. }
+
+function CGLayerGetSize( layer: CGLayerRef ): CGSize; external name '_CGLayerGetSize'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the context of `layer'. }
+
+function CGLayerGetContext( layer: CGLayerRef ): CGContextRef; external name '_CGLayerGetContext'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Draw the contents of `layer' into `rect' of `context'. The contents are
+ * scaled, if necessary, to fit into `rect'; the rectangle `rect' is in
+ * user space. }
+
+procedure CGContextDrawLayerInRect( context: CGContextRef; rect: CGRect; layer: CGLayerRef ); external name '_CGContextDrawLayerInRect'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Draw the contents of `layer' at `point' in `context'. This is
+ * equivalent to calling "CGContextDrawLayerInRect" with a rectangle having
+ * origin at `point' and size equal to the size of `layer'. }
+
+procedure CGContextDrawLayerAtPoint( context: CGContextRef; point: CGPoint; layer: CGLayerRef ); external name '_CGContextDrawLayerAtPoint'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return the CFTypeID for CGLayerRefs. }
+
+function CGLayerGetTypeID: CFTypeID; external name '_CGLayerGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit CGPDFContext}
+{ CoreGraphics - CGPDFContext.h
+ * Copyright (c) 2000-2004 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ Create a PDF context, using `consumer' for output. `mediaBox' is the
+ * default page media bounding box; if NULL, then a default page size is
+ * used. `auxiliaryInfo' specifies additional information used by the PDF
+ * context when generating the PDF file. The keys and values in
+ * `auxiliaryInfo' are described below. If `mediaBox' is non-NULL, then its
+ * value overrides the value of `kCGPDFContextMediaBox' if specified in the
+ * `auxiliaryInfo' dictionary. }
+
+function CGPDFContextCreate( consumer: CGDataConsumerRef; const (*var*) mediaBox: CGRect; auxiliaryInfo: CFDictionaryRef ): CGContextRef; external name '_CGPDFContextCreate';
+
+{ Create a PDF context for writing to `url'. This function behaves in the
+ * same manner as the above function, except that the output data will be
+ * written to `url'. }
+
+function CGPDFContextCreateWithURL( url: CFURLRef; const (*var*) mediaBox: CGRect; auxiliaryInfo: CFDictionaryRef ): CGContextRef; external name '_CGPDFContextCreateWithURL';
+
+{ Begin a new page in the PDF context `context'. }
+
+procedure CGPDFContextBeginPage( context: CGContextRef; pageInfo: CFDictionaryRef ); external name '_CGPDFContextBeginPage'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ End the current page in the PDF context `context'. }
+
+procedure CGPDFContextEndPage( context: CGContextRef ); external name '_CGPDFContextEndPage'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Set the URL associated with `rect' to `url' in the PDF context
+ * `context'. }
+
+procedure CGPDFContextSetURLForRect( context: CGContextRef; url: CFURLRef; rect: CGRect ); external name '_CGPDFContextSetURLForRect'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Create a PDF destination named `name' at `point' in the current page of
+ * the PDF context `context'. }
+
+procedure CGPDFContextAddDestinationAtPoint( context: CGContextRef; name: CFStringRef; point: CGPoint ); external name '_CGPDFContextAddDestinationAtPoint'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Specify a destination named `name' to jump to when clicking in `rect' of
+ * the current page of the PDF context `context'. }
+
+procedure CGPDFContextSetDestinationForRect( context: CGContextRef; name: CFStringRef; rect: CGRect ); external name '_CGPDFContextSetDestinationForRect'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{** Keys for the auxiliary info dictionary or the page info dictionary. **}
+
+{ The media box for the document or for a given page. Optional; if
+ * present, the value of this key must be a CFData containing a CGRect
+ * (stored by value, not by reference). }
+
+var kCGPDFContextMediaBox: CFStringRef; external name '_kCGPDFContextMediaBox'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The crop box for the document or for a given page. Optional; if present,
+ * the value of this key must be a CFData containing a CGRect (stored by
+ * value, not by reference). }
+
+var kCGPDFContextCropBox: CFStringRef; external name '_kCGPDFContextCropBox'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The bleed box for the document or for a given page. Optional; if
+ * present, the value of this key must be a CFData containing a CGRect
+ * (stored by value, not by reference). }
+
+var kCGPDFContextBleedBox: CFStringRef; external name '_kCGPDFContextBleedBox'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The trim box for the document or for a given page. Optional; if present,
+ * the value of this key must be a CFData containing a CGRect (stored by
+ * value, not by reference). }
+
+var kCGPDFContextTrimBox: CFStringRef; external name '_kCGPDFContextTrimBox'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The art box for the document or for a given page. Optional; if present,
+ * the value of this key must be a CFData containing a CGRect (stored by
+ * value, not by reference). }
+
+var kCGPDFContextArtBox: CFStringRef; external name '_kCGPDFContextArtBox'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{** Keys for auxiliary info dictionary. **}
+
+{ The document's title. Optional; if present, the value of this key must
+ * be a CFString. }
+
+// const kCGPDFContextTitle: CFStringRef; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The name of the person who created this document. Optional; if present,
+ * the value of this key must be a CFString. }
+
+// const kCGPDFContextAuthor: CFStringRef; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The name of the application that created the original data used to
+ * create this document. Optional; if present, the value of this key must
+ * be a CFString. }
+
+// const kCGPDFContextCreator: CFStringRef; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The "owner password" of the PDF document. If this key is specified, the
+ * document will be encrypted using the value as the owner password;
+ * otherwise, the document will not be encrypted. The value of this key
+ * must be a CFStringRef which can be represented in ASCII encoding; only
+ * the first 32 bytes will be used for the password. There is no default
+ * value for this key.
+ *
+ * If the value of this key cannot be represented in ASCII, the document
+ * will not be created and the creation function will return NULL. }
+
+var kCGPDFContextOwnerPassword: CFStringRef; external name '_kCGPDFContextOwnerPassword'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The "user password" of the PDF document. If the document is encrypted,
+ * then the value of this key will be the user password for the document;
+ * if unspecified, the user password will be the empty string. The value of
+ * this key must be a CFStringRef which can be represented in ASCII
+ * encoding; only the first 32 bytes will be used for the password.
+ *
+ * If the value of this key cannot be represented in ASCII, the document
+ * will not be created and the creation function will return NULL. }
+
+var kCGPDFContextUserPassword: CFStringRef; external name '_kCGPDFContextUserPassword'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Used to specify whether the document allows printing when unlocked with
+ * the user password. The value of this key must be a CFBooleanRef. The
+ * default value of this key is "kCFBooleanTrue". }
+
+var kCGPDFContextAllowsPrinting: CFStringRef; external name '_kCGPDFContextAllowsPrinting'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Used to specify whether the document allows copying when unlocked with
+ * the user password. The value of this key must be a CFBooleanRef. The
+ * default value of this key is "kCFBooleanTrue". }
+
+var kCGPDFContextAllowsCopying: CFStringRef; external name '_kCGPDFContextAllowsCopying'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The document's PDF/X output intent. Optional; if present, the value of
+ * this key must be a CFDictionaryRef. The dictionary is added to the
+ * /OutputIntents entry in the PDF file's document catalog. The keys and
+ * values contained in the dictionary must match those specified in section
+ * 9.10.4 of the PDF 1.4 specification, ISO/DIS 15930-3 document published
+ * by ISO/TC 130, and Adobe Technical Note #5413. }
+
+// const kCGPDFContextOutputIntent: CFStringRef; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The following keys are supported in the output intent dictionary:
+ *
+ * kCGPDFXOutputIntentSubtype ("S") - The output intent subtype. This key
+ * is required; the value of this key must be a CFString equal to
+ * "GTS_PDFX"; otherwise, the dictionary is ignored. }
+
+var kCGPDFXOutputIntentSubtype: CFStringRef; external name '_kCGPDFXOutputIntentSubtype'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ kCGPDFXOutputConditionIdentifier ("OutputConditionIdentifier") - A
+ * string identifying the intended output device or production condition
+ * in a human- or machine-readable form. This key is required; the
+ * value of this key must be a CFString. For best results, the string
+ * should be representable losslessly in ASCII encoding. }
+
+var kCGPDFXOutputConditionIdentifier: CFStringRef; external name '_kCGPDFXOutputConditionIdentifier'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ kCGPDFXOutputCondition ("OutputCondition") - A text string identifying
+ * the intended output device or production condition in a human-
+ * readable form. This key is optional; if present, the value of this
+ * key must be a CFString. }
+
+var kCGPDFXOutputCondition: CFStringRef; external name '_kCGPDFXOutputCondition'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ kCGPDFXRegistryName ("RegistryName") - A string identifying the registry
+ * in which the condition designated by kCGPDFXOutputConditionIdentifier
+ * is defined. This key is optional; if present, the value of this key
+ * must be a CFString. For best results, the string should be
+ * representable losslessly in ASCII encoding. }
+
+var kCGPDFXRegistryName: CFStringRef; external name '_kCGPDFXRegistryName'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ kCGPDFXInfo ("Info") - A human-readable text string containing
+ * additional information or comments about the intended target device
+ * or production condition. This key is required if the value of
+ * kCGPDFXOutputConditionIdentifier does not specify a standard
+ * production condition; it is optional otherwise. If present, the
+ * value of this key must be a CFString. }
+
+var kCGPDFXInfo: CFStringRef; external name '_kCGPDFXInfo'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ kCGPDFXDestinationOutputProfile ("DestOutputProfile") - An ICC profile
+ * stream defining the transformation from the PDF document's source
+ * colors to output device colorants. This key is required if the value
+ * of kCGPDFXOutputConditionIdentifier does not specify a standard
+ * production condition; it is optional otherwise. If present, the
+ * value of this key must be a ICC-based CGColorSpaceRef. }
+
+var kCGPDFXDestinationOutputProfile: CFStringRef; external name '_kCGPDFXDestinationOutputProfile'; (* attribute const *) (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ The document's output intents. Optional; if present, the value must be a
+ * CFArrayRef containing one or more CFDictionaryRefs. The array is added
+ * to the PDF document in the /OutputIntents entry in the PDF file's
+ * document catalog. Each dictionary in the array must be of form
+ * specified above for the "kCGPDFContextOutputIntent" key, except that
+ * only the first dictionary in the array may contain the
+ * kCGPDFXOutputIntentSubtype ("S") key with a value of "GTS_PDFX". If both
+ * the "kCGPDFContextOutputIntent" and "kCGPDFContextOutputIntents" keys
+ * are specified, the former is ignored. }
+
+// const kCGPDFContextOutputIntents: CFStringRef; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ Compatibility with earlier versions of Mac OS X. }
+
+// #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4
+
+{
+ PNL comments:
+
+ There is an issue here that these types below are macro defines, and they
+ conflict with the definitions above unless only one or the other is defined.
+
+ This only applies to GPC where GPCMacros.inc contains the macros and
+ is typically read before this Pascal source file.
+}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGPDFContextTitle CFSTRP('kCGPDFContextTitle')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGPDFContextAuthor CFSTRP('kCGPDFContextAuthor')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGPDFContextCreator CFSTRP('kCGPDFContextCreator')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGPDFContextOutputIntent CFSTRP('kCGPDFContextOutputIntent')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCGPDFContextOutputIntents CFSTRP('kCGPDFContextOutputIntents')}
+{$endc}
+
+// #endif { MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4 }
+
+
+{unit CGPattern}
+{ CoreGraphics - CGPattern.h
+ * Copyright (c) 2000-2002 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+// CGPatternRef defined in CGBase
+
+
+{ kCGPatternTilingNoDistortion: The pattern cell is not distorted when
+ * painted, however the spacing between pattern cells may vary by as much
+ * as 1 device pixel.
+ *
+ * kCGPatternTilingConstantSpacingMinimalDistortion: Pattern cells are
+ * spaced consistently, however the pattern cell may be distorted by as
+ * much as 1 device pixel when the pattern is painted.
+ *
+ * kCGPatternTilingConstantSpacing: Pattern cells are spaced consistently
+ * as with kCGPatternTilingConstantSpacingMinimalDistortion, however the
+ * pattern cell may be distorted additionally to permit a more efficient
+ * implementation. }
+
+type
+ CGPatternTiling = SInt32;
+const
+ kCGPatternTilingNoDistortion = 0;
+ kCGPatternTilingConstantSpacingMinimalDistortion = 1;
+ kCGPatternTilingConstantSpacing = 2;
+
+
+{ The drawing of the pattern is delegated to the callbacks. The callbacks
+ * may be called one or many times to draw the pattern.
+ *
+ * `version' is the version number of the structure passed in as a
+ * parameter to the CGPattern creation functions. The structure defined
+ * below is version 0.
+ *
+ * `drawPattern' should draw the pattern in the context `c'. `info' is the
+ * parameter originally passed to the CGPattern creation functions.
+ *
+ * `releaseInfo' is called when the pattern is deallocated. }
+
+type
+ CGPatternDrawPatternCallback = procedure( info: UnivPtr; c: CGContextRef );
+type
+ CGPatternReleaseInfoCallback = procedure( info: UnivPtr );
+
+type
+ CGPatternCallbacksPtr = ^CGPatternCallbacks;
+ CGPatternCallbacks = record
+ version: UInt32;
+ drawPattern: CGPatternDrawPatternCallback;
+ releaseInfo: CGPatternReleaseInfoCallback;
+ end;
+
+{ Return the CFTypeID for CGPatternRefs. }
+
+function CGPatternGetTypeID: CFTypeID; external name '_CGPatternGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Create a pattern. }
+
+function CGPatternCreate( info: UnivPtr; bounds: CGRect; matrix: CGAffineTransform; xStep: Float32; yStep: Float32; tiling: CGPatternTiling; isColored: CBool; const (*var*) callbacks: CGPatternCallbacks ): CGPatternRef; external name '_CGPatternCreate';
+
+{ Equivalent to `CFRetain(pattern)', except it doesn't crash (as CF does)
+ * if `pattern' is NULL. }
+
+function CGPatternRetain( pattern: CGPatternRef ): CGPatternRef; external name '_CGPatternRetain';
+
+{ Equivalent to `CFRelease(pattern)', except it doesn't crash (as CF does)
+ * if `pattern' is NULL. }
+
+procedure CGPatternRelease( pattern: CGPatternRef ); external name '_CGPatternRelease';
+
+
+{unit QDPictToCGContext}
+{
+ File: QD/QDPictToCGContext.h
+
+ Contains: API to draw Quickdraw PICTs into CoreGraphics context
+
+ Version: Quickdraw-150~1
+
+ Copyright: © 2001-2003 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+type
+ QDPictRef = ^SInt32; { an opaque 32-bit type }
+
+{
+ Note: QuickDraw picture data typically comes in two forms: a PICT resource
+ that begins the picture header data at the beginning of the resource and PICT
+ files that begin with 512 bytes of arbitrary data, followed by
+ the picture header data. For this reason, the routines that create a QDPictRef
+ attempt to find the picture header data beginning at either the first byte
+ of the data provided or at byte 513 of the data provided.
+
+ Additionally the Picture Bounds must not be an empty rect.
+}
+{ Create a QDPict reference, using `provider' to obtain the QDPict's data.
+ * It is assumed that either the first byte or the 513th byte of data
+ * in the file referenced by the URL is the first byte of the
+ * picture header. If the URL does not begin PICT data at one
+ * of these places in the data fork then the QDPictRef returned will be NULL.
+}
+{
+ * QDPictCreateWithProvider()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function QDPictCreateWithProvider( provider: CGDataProviderRef ): QDPictRef; external name '_QDPictCreateWithProvider';
+
+
+{ Create a QDPict reference from `url'.
+ * It is assumed that either the first byte or the 513th byte of data
+ * in the file referenced by the URL is the first byte of the
+ * picture header. If the URL does not begin PICT data at one
+ * of these places in the data fork then the QDPictRef returned will be NULL.
+}
+{
+ * QDPictCreateWithURL()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function QDPictCreateWithURL( url: CFURLRef ): QDPictRef; external name '_QDPictCreateWithURL';
+
+
+{ Increment the retain count of `pictRef' and return it. All
+ * pictRefs are created with an initial retain count of 1. }
+{
+ * QDPictRetain()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function QDPictRetain( pictRef: QDPictRef ): QDPictRef; external name '_QDPictRetain';
+
+
+{ Decrement the retain count of `pictRef'. If the retain count reaches 0,
+ * then free it and any associated resources. }
+{
+ * QDPictRelease()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+procedure QDPictRelease( pictRef: QDPictRef ); external name '_QDPictRelease';
+
+
+{ Return the Picture Bounds of the QuickDraw picture represented by `pictRef'. This
+ rectangle is in the default user space with one unit = 1/72 inch.
+}
+{
+ * QDPictGetBounds()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function QDPictGetBounds( pictRef: QDPictRef ): CGRect; external name '_QDPictGetBounds';
+
+
+{ Return the resolution of the QuickDraw picture represented by `pictRef'.
+ This data, together with the CGRect returned by QDPictGetBounds, can be
+ used to compute the size of the picture in pixels, which is what QuickDraw
+ really records into pictures.
+}
+{
+ * QDPictGetResolution()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+procedure QDPictGetResolution( pictRef: QDPictRef; var xRes, yRes: Float32 ); external name '_QDPictGetResolution';
+
+
+{ Draw `pictRef' in the rectangular area specified by `rect'.
+ * The PICT bounds of the page is scaled, if necessary, to fit into
+ * `rect'. To get unscaled results, supply a rect the size of the rect
+ * returned by QDPictGetBounds.
+}
+{
+ * QDPictDrawToCGContext()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function QDPictDrawToCGContext( ctx: CGContextRef; rect: CGRect; pictRef: QDPictRef ): OSStatus; external name '_QDPictDrawToCGContext';
+
+{unit Quickdraw}
+{
+ File: QD/Quickdraw.h
+
+ Contains: Interface to Quickdraw Graphics
+
+ Version: Quickdraw-192.20~75
+
+ Copyright: © 1985-2006 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Gale R Paeper, <gpaeper@empirenet.com>, 2007 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{*********************************************************************************
+// NOTE: Quickdraw has been deprecated for deployment targets 10.4 and later.
+// The replacement API is Quartz (CoreGraphics).
+// Because of the fundamental differences in the imaging models and design
+// goals between Quickdraw and Quartz, there is no direct correspondence
+// possible (or even desirable) between Quickdraw and Quartz APIs and concepts.
+// For certain purposes, some Quickdraw functions may even still be needed during
+// a transition period; nevertheless, they have all been tagged as deprecated
+// to express the overriding goal of eliminating all Quickdraw usage in the future.
+ |********************************************************************************}
+
+
+const
+ invalColReq = -1; { invalid color table request }
+
+ { transfer modes }
+ srcCopy = 0; { the 16 transfer modes }
+ srcOr = 1;
+ srcXor = 2;
+ srcBic = 3;
+ notSrcCopy = 4;
+ notSrcOr = 5;
+ notSrcXor = 6;
+ notSrcBic = 7;
+ patCopy = 8;
+ patOr = 9;
+ patXor = 10;
+ patBic = 11;
+ notPatCopy = 12;
+ notPatOr = 13;
+ notPatXor = 14;
+ notPatBic = 15; { Special Text Transfer Mode }
+ grayishTextOr = 49;
+ hilitetransfermode = 50;
+ hilite = 50; { Arithmetic transfer modes }
+ blend = 32;
+ addPin = 33;
+ addOver = 34;
+ subPin = 35;
+ addMax = 37;
+ adMax = 37;
+ subOver = 38;
+ adMin = 39;
+ ditherCopy = 64; { Transparent mode constant }
+ transparent = 36;
+
+ italicBit = 1;
+ ulineBit = 2;
+ outlineBit = 3;
+ shadowBit = 4;
+ condenseBit = 5;
+ extendBit = 6;
+
+ { QuickDraw color separation constants }
+ normalBit = 0; { normal screen mapping }
+ inverseBit = 1; { inverse screen mapping }
+ redBit = 4; { RGB additive mapping }
+ greenBit = 3;
+ blueBit = 2;
+ cyanBit = 8; { CMYBk subtractive mapping }
+ magentaBit = 7;
+ yellowBit = 6;
+ blackBit = 5;
+
+ blackColor = 33; { colors expressed in these mappings }
+ whiteColor = 30;
+ redColor = 205;
+ greenColor = 341;
+ blueColor = 409;
+ cyanColor = 273;
+ magentaColor = 137;
+ yellowColor = 69;
+
+ picLParen = 0; { standard picture comments }
+ picRParen = 1;
+ clutType = 0; { 0 if lookup table }
+ fixedType = 1; { 1 if fixed table }
+ directType = 2; { 2 if direct values }
+
+ { gdFlags bits. Bits 1..10 are legacy, and currently unused }
+ gdDevType = 0; { 0 = monochrome 1 = color }
+
+ interlacedDevice = 2; { 1 if single pixel lines look bad }
+ hwMirroredDevice = 4; { 1 if device is HW mirrored }
+ roundedDevice = 5; { 1 if device has been ÒroundedÓ into the GrayRgn }
+ hasAuxMenuBar = 6; { 1 if device has an aux menu bar on it }
+ burstDevice = 7;
+ ext32Device = 8;
+ ramInit = 10; { 1 if initialized from 'scrn' resource }
+ mainScreen = 11; { 1 if main screen }
+ allInit = 12; { 1 if all devices initialized }
+ screenDevice = 13; { 1 if screen device [not used] }
+ noDriver = 14; { 1 if no driver for this GDevice }
+ screenActive = 15; { 1 if in use }
+ hiliteBit = 7; { flag bit in LMGet/SetHiliteMode }
+ pHiliteBit = 0; { flag bit in LMGet/SetHiliteMode when used with BitClr }
+
+ { miscellaneous constants }
+ defQDColors = 127; { resource ID of clut for default QDColors } { (legacy - now unused) }
+ { pixel type }
+ RGBDirect = 16; { 16 & 32 bits/pixel pixelType value }
+ { pmVersion values }
+ baseAddr32 = 4; { pixmap base address is 32-bit address }
+
+
+ sysPatListID = 0;
+ iBeamCursor = 1;
+ crossCursor = 2;
+ plusCursor = 3;
+ watchCursor = 4;
+
+ kQDGrafVerbFrame = 0;
+ kQDGrafVerbPaint = 1;
+ kQDGrafVerbErase = 2;
+ kQDGrafVerbInvert = 3;
+ kQDGrafVerbFill = 4;
+
+{$ifc OLDROUTINENAMES}
+ frame = kQDGrafVerbFrame;
+ paint = kQDGrafVerbPaint;
+ erase = kQDGrafVerbErase;
+ invert = kQDGrafVerbInvert;
+ fill = kQDGrafVerbFill;
+
+{$endc} {OLDROUTINENAMES}
+
+
+type
+ GrafVerb = SInt8;
+
+const
+ chunky = 0;
+ chunkyPlanar = 1;
+ planar = 2;
+
+
+type
+ PixelType = SInt8;
+ Bits16 = array [0..15] of SInt16;
+
+ { ************** IMPORTANT NOTE REGARDING Pattern **************************************
+ Patterns were originally defined as:
+
+ C: typedef unsigned char Pattern[8];
+ Pascal: Pattern = packed array [0..7] of 0..255;
+
+ The old array definition of Pattern would cause 68000 based CPU's to crash in certain circum-
+ stances. The new struct definition is safe, but may require source code changes to compile.
+
+ ******************************************************************************************** }
+ PatternPtr = ^Pattern;
+ Pattern = record
+ pat: packed array [0..7] of UInt8;
+ end;
+
+{
+ ConstPatternParam is no longer needed. It was first created when Pattern was an array.
+ Now that Pattern is a struct, it is more straight forward to just add the "const" qualifier
+ on the parameter type (e.g. "const Pattern * pat" instead of "ConstPatternParam pat").
+
+ ConstPatternParam = PatternPtr;
+}
+
+ PatPtr = ^Pattern;
+ PatHandle = ^PatPtr;
+ QDByte = SignedByte;
+ QDPtr = Ptr;
+ QDHandle = Handle;
+ QDErr = SInt16;
+
+const
+ singleDevicesBit = 0;
+ dontMatchSeedsBit = 1;
+ allDevicesBit = 2;
+
+ singleDevices = $01;
+ dontMatchSeeds = $02;
+ allDevices = $04;
+
+
+type
+ DeviceLoopFlags = UInt32;
+ {
+ PrinterStatusOpcode. For communication with downloading and printing services.
+ }
+ PrinterStatusOpcode = SInt32;
+
+const
+ kPrinterFontStatus = 0;
+ kPrinterScalingStatus = 1;
+
+
+type
+ PrinterFontStatusPtr = ^PrinterFontStatus;
+ PrinterFontStatus = record
+ oResult: SInt32;
+ iFondID: SInt16;
+ iStyle: Style;
+ end;
+
+ PrinterScalingStatusPtr = ^PrinterScalingStatus;
+ PrinterScalingStatus = record
+ oScalingFactors: Point;
+ end;
+
+ BitMapPtr = ^BitMap;
+ BitMap = record
+ baseAddr: Ptr;
+ rowBytes: SInt16;
+ bounds: Rect;
+ end;
+
+ BitMapHandle = ^BitMapPtr;
+ CursorPtr = ^Cursor;
+ Cursor = record
+ data: Bits16;
+ mask: Bits16;
+ hotSpot: Point;
+ end;
+
+ CursPtr = ^Cursor;
+ CursHandle = ^CursPtr;
+ PenStatePtr = ^PenState;
+ PenState = record
+ pnLoc: Point;
+ pnSize: Point;
+ pnMode: SInt16;
+ pnPat: Pattern;
+ end;
+
+{$ifc NOT OPAQUE_TOOLBOX_STRUCTS}
+ MacRegionPtr = ^MacRegion;
+ MacRegion = record
+ rgnSize: UInt16; { size in bytes; don't rely on it }
+ rgnBBox: Rect; { enclosing rectangle; in Carbon use GetRegionBounds }
+ end;
+
+ {
+ The type name "Region" has a name space collision on Win32.
+ Use MacRegion to be cross-platfrom safe.
+ }
+{$ifc TARGET_OS_MAC}
+ Region = MacRegion;
+ RegionPtr = ^Region;
+{$endc} {TARGET_OS_MAC}
+ RgnPtr = ^MacRegion;
+ RgnHandle = ^RgnPtr;
+{$elsec}
+ RgnHandle = ^SInt32; { an opaque 32-bit type }
+ RgnHandlePtr = ^RgnHandle; { when a var xx:RgnHandle parameter can be nil, it is changed to xx: RgnHandlePtr }
+{$endc}
+
+ PicturePtr = ^Picture;
+ Picture = record
+ picSize: SInt16;
+ picFrame: Rect;
+ end;
+
+ PicPtr = ^Picture;
+ PicHandle = ^PicPtr;
+ MacPolygonPtr = ^MacPolygon;
+ MacPolygon = record
+ polySize: SInt16;
+ polyBBox: Rect;
+ polyPoints: array [0..0] of Point;
+ end;
+
+ {
+ The type name "Polygon" has a name space collision on Win32.
+ Use MacPolygon to be cross-platfrom safe.
+ }
+{$ifc TARGET_OS_MAC}
+ Polygon = MacPolygon;
+ PolygonPtr = ^Polygon;
+{$endc} {TARGET_OS_MAC}
+
+ PolyPtr = ^MacPolygon;
+ PolyHandle = ^PolyPtr;
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDTextProcPtr = procedure(byteCount: SInt16; textBuf: UnivPtr; numer: Point; denom: Point);
+{$elsec}
+ QDTextProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDLineProcPtr = procedure(newPt: Point);
+{$elsec}
+ QDLineProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDRectProcPtr = procedure(verb: GrafVerb; const (*var*) r: Rect);
+{$elsec}
+ QDRectProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDRRectProcPtr = procedure(verb: GrafVerb; const (*var*) r: Rect; ovalWidth: SInt16; ovalHeight: SInt16);
+{$elsec}
+ QDRRectProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDOvalProcPtr = procedure(verb: GrafVerb; const (*var*) r: Rect);
+{$elsec}
+ QDOvalProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDArcProcPtr = procedure(verb: GrafVerb; const (*var*) r: Rect; startAngle: SInt16; arcAngle: SInt16);
+{$elsec}
+ QDArcProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDPolyProcPtr = procedure(verb: GrafVerb; poly: PolyHandle);
+{$elsec}
+ QDPolyProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDRgnProcPtr = procedure(verb: GrafVerb; rgn: RgnHandle);
+{$elsec}
+ QDRgnProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDBitsProcPtr = procedure(const (*var*) srcBits: BitMap; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect; mode: SInt16; maskRgn: RgnHandle);
+{$elsec}
+ QDBitsProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDCommentProcPtr = procedure(kind: SInt16; dataSize: SInt16; dataHandle: Handle);
+{$elsec}
+ QDCommentProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDTxMeasProcPtr = function(byteCount: SInt16; textAddr: UnivPtr; var numer: Point; var denom: Point; var info: FontInfo): SInt16;
+{$elsec}
+ QDTxMeasProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDGetPicProcPtr = procedure(dataPtr: UnivPtr; byteCount: SInt16);
+{$elsec}
+ QDGetPicProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDPutPicProcPtr = procedure(dataPtr: UnivPtr; byteCount: SInt16);
+{$elsec}
+ QDPutPicProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDOpcodeProcPtr = procedure(const (*var*) fromRect: Rect; const (*var*) toRect: Rect; opcode: UInt16; version: SInt16);
+{$elsec}
+ QDOpcodeProcPtr = ProcPtr;
+{$endc}
+
+{ The following is unused on Mac OS X - ignore it! }
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDStdGlyphsProcPtr = function(dataStream: UnivPtr; size: ByteCount): OSStatus;
+{$elsec}
+ QDStdGlyphsProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDJShieldCursorProcPtr = procedure(left: SInt16; top: SInt16; right: SInt16; bottom: SInt16);
+{$elsec}
+ QDJShieldCursorProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ QDTextUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDTextUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDLineUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDLineUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDRectUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDRectUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDRRectUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDRRectUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDOvalUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDOvalUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDArcUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDArcUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDPolyUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDPolyUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDRgnUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDRgnUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDBitsUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDBitsUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDCommentUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDCommentUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDTxMeasUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDTxMeasUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDGetPicUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDGetPicUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDPutPicUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDPutPicUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDOpcodeUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDOpcodeUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDStdGlyphsUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDStdGlyphsUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDJShieldCursorUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDJShieldCursorUPP = UniversalProcPtr;
+{$endc}
+ QDProcsPtr = ^QDProcs;
+ QDProcs = record
+ textProc: QDTextUPP;
+ lineProc: QDLineUPP;
+ rectProc: QDRectUPP;
+ rRectProc: QDRRectUPP;
+ ovalProc: QDOvalUPP;
+ arcProc: QDArcUPP;
+ polyProc: QDPolyUPP;
+ rgnProc: QDRgnUPP;
+ bitsProc: QDBitsUPP;
+ commentProc: QDCommentUPP;
+ txMeasProc: QDTxMeasUPP;
+ getPicProc: QDGetPicUPP;
+ putPicProc: QDPutPicUPP;
+ end;
+
+
+const
+ uppQDTextProcInfo = $00003F80;
+ uppQDLineProcInfo = $000000C0;
+ uppQDRectProcInfo = $00000340;
+ uppQDRRectProcInfo = $00002B40;
+ uppQDOvalProcInfo = $00000340;
+ uppQDArcProcInfo = $00002B40;
+ uppQDPolyProcInfo = $00000340;
+ uppQDRgnProcInfo = $00000340;
+ uppQDBitsProcInfo = $0000EFC0;
+ uppQDCommentProcInfo = $00000E80;
+ uppQDTxMeasProcInfo = $0000FFA0;
+ uppQDGetPicProcInfo = $000002C0;
+ uppQDPutPicProcInfo = $000002C0;
+ uppQDOpcodeProcInfo = $00002BC0;
+ uppQDStdGlyphsProcInfo = $000003F1;
+ uppQDJShieldCursorProcInfo = $00002A80;
+ {
+ * NewQDTextUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewQDTextUPP(userRoutine: QDTextProcPtr): QDTextUPP; external name '_NewQDTextUPP'; { old name was NewQDTextProc }
+
+{
+ * NewQDLineUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4
+function NewQDLineUPP(userRoutine: QDLineProcPtr): QDLineUPP; external name '_NewQDLineUPP'; { old name was NewQDLineProc }
+
+{
+ * NewQDRectUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewQDRectUPP(userRoutine: QDRectProcPtr): QDRectUPP; external name '_NewQDRectUPP'; { old name was NewQDRectProc }
+
+{
+ * NewQDRRectUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewQDRRectUPP(userRoutine: QDRRectProcPtr): QDRRectUPP; external name '_NewQDRRectUPP'; { old name was NewQDRRectProc }
+
+{
+ * NewQDOvalUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewQDOvalUPP(userRoutine: QDOvalProcPtr): QDOvalUPP; external name '_NewQDOvalUPP'; { old name was NewQDOvalProc }
+
+{
+ * NewQDArcUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewQDArcUPP(userRoutine: QDArcProcPtr): QDArcUPP; external name '_NewQDArcUPP'; { old name was NewQDArcProc }
+
+{
+ * NewQDPolyUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewQDPolyUPP(userRoutine: QDPolyProcPtr): QDPolyUPP; external name '_NewQDPolyUPP'; { old name was NewQDPolyProc }
+
+{
+ * NewQDRgnUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewQDRgnUPP(userRoutine: QDRgnProcPtr): QDRgnUPP; external name '_NewQDRgnUPP'; { old name was NewQDRgnProc }
+
+{
+ * NewQDBitsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewQDBitsUPP(userRoutine: QDBitsProcPtr): QDBitsUPP; external name '_NewQDBitsUPP'; { old name was NewQDBitsProc }
+
+{
+ * NewQDCommentUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewQDCommentUPP(userRoutine: QDCommentProcPtr): QDCommentUPP; external name '_NewQDCommentUPP'; { old name was NewQDCommentProc }
+
+{
+ * NewQDTxMeasUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewQDTxMeasUPP(userRoutine: QDTxMeasProcPtr): QDTxMeasUPP; external name '_NewQDTxMeasUPP'; { old name was NewQDTxMeasProc }
+
+{
+ * NewQDGetPicUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewQDGetPicUPP(userRoutine: QDGetPicProcPtr): QDGetPicUPP; external name '_NewQDGetPicUPP'; { old name was NewQDGetPicProc }
+
+{
+ * NewQDPutPicUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewQDPutPicUPP(userRoutine: QDPutPicProcPtr): QDPutPicUPP; external name '_NewQDPutPicUPP'; { old name was NewQDPutPicProc }
+
+{
+ * NewQDOpcodeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewQDOpcodeUPP(userRoutine: QDOpcodeProcPtr): QDOpcodeUPP; external name '_NewQDOpcodeUPP'; { old name was NewQDOpcodeProc }
+
+{
+ * NewQDStdGlyphsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewQDStdGlyphsUPP(userRoutine: QDStdGlyphsProcPtr): QDStdGlyphsUPP; external name '_NewQDStdGlyphsUPP'; { old name was NewQDStdGlyphsProc }
+
+{
+ * NewQDJShieldCursorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewQDJShieldCursorUPP(userRoutine: QDJShieldCursorProcPtr): QDJShieldCursorUPP; external name '_NewQDJShieldCursorUPP'; { old name was NewQDJShieldCursorProc }
+
+{
+ * DisposeQDTextUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDTextUPP(userUPP: QDTextUPP); external name '_DisposeQDTextUPP';
+
+{
+ * DisposeQDLineUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDLineUPP(userUPP: QDLineUPP); external name '_DisposeQDLineUPP';
+
+{
+ * DisposeQDRectUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDRectUPP(userUPP: QDRectUPP); external name '_DisposeQDRectUPP';
+
+{
+ * DisposeQDRRectUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDRRectUPP(userUPP: QDRRectUPP); external name '_DisposeQDRRectUPP';
+
+{
+ * DisposeQDOvalUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDOvalUPP(userUPP: QDOvalUPP); external name '_DisposeQDOvalUPP';
+
+{
+ * DisposeQDArcUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDArcUPP(userUPP: QDArcUPP); external name '_DisposeQDArcUPP';
+
+{
+ * DisposeQDPolyUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDPolyUPP(userUPP: QDPolyUPP); external name '_DisposeQDPolyUPP';
+
+{
+ * DisposeQDRgnUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDRgnUPP(userUPP: QDRgnUPP); external name '_DisposeQDRgnUPP';
+
+{
+ * DisposeQDBitsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDBitsUPP(userUPP: QDBitsUPP); external name '_DisposeQDBitsUPP';
+
+{
+ * DisposeQDCommentUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDCommentUPP(userUPP: QDCommentUPP); external name '_DisposeQDCommentUPP';
+
+{
+ * DisposeQDTxMeasUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDTxMeasUPP(userUPP: QDTxMeasUPP); external name '_DisposeQDTxMeasUPP';
+
+{
+ * DisposeQDGetPicUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDGetPicUPP(userUPP: QDGetPicUPP); external name '_DisposeQDGetPicUPP';
+
+{
+ * DisposeQDPutPicUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDPutPicUPP(userUPP: QDPutPicUPP); external name '_DisposeQDPutPicUPP';
+
+{
+ * DisposeQDOpcodeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDOpcodeUPP(userUPP: QDOpcodeUPP); external name '_DisposeQDOpcodeUPP';
+
+{
+ * DisposeQDStdGlyphsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDStdGlyphsUPP(userUPP: QDStdGlyphsUPP); external name '_DisposeQDStdGlyphsUPP';
+
+{
+ * DisposeQDJShieldCursorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeQDJShieldCursorUPP(userUPP: QDJShieldCursorUPP); external name '_DisposeQDJShieldCursorUPP';
+
+{
+ * InvokeQDTextUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvokeQDTextUPP(byteCount: SInt16; textBuf: UnivPtr; numer: Point; denom: Point; userRoutine: QDTextUPP); external name '_InvokeQDTextUPP'; { old name was CallQDTextProc }
+
+{
+ * InvokeQDLineUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvokeQDLineUPP(newPt: Point; userRoutine: QDLineUPP); external name '_InvokeQDLineUPP'; { old name was CallQDLineProc }
+
+{
+ * InvokeQDRectUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvokeQDRectUPP(verb: GrafVerb; const (*var*) r: Rect; userRoutine: QDRectUPP); external name '_InvokeQDRectUPP'; { old name was CallQDRectProc }
+
+{
+ * InvokeQDRRectUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvokeQDRRectUPP(verb: GrafVerb; const (*var*) r: Rect; ovalWidth: SInt16; ovalHeight: SInt16; userRoutine: QDRRectUPP); external name '_InvokeQDRRectUPP'; { old name was CallQDRRectProc }
+{
+ * InvokeQDOvalUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvokeQDOvalUPP(verb: GrafVerb; const (*var*) r: Rect; userRoutine: QDOvalUPP); external name '_InvokeQDOvalUPP'; { old name was CallQDOvalProc }
+
+{
+ * InvokeQDArcUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvokeQDArcUPP(verb: GrafVerb; const (*var*) r: Rect; startAngle: SInt16; arcAngle: SInt16; userRoutine: QDArcUPP); external name '_InvokeQDArcUPP'; { old name was CallQDArcProc }
+
+{
+ * InvokeQDPolyUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvokeQDPolyUPP(verb: GrafVerb; poly: PolyHandle; userRoutine: QDPolyUPP); external name '_InvokeQDPolyUPP'; { old name was CallQDPolyProc }
+
+{
+ * InvokeQDRgnUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvokeQDRgnUPP(verb: GrafVerb; rgn: RgnHandle; userRoutine: QDRgnUPP); external name '_InvokeQDRgnUPP'; { old name was CallQDRgnProc }
+
+{
+ * InvokeQDBitsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvokeQDBitsUPP(const (*var*) srcBits: BitMap; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect; mode: SInt16; maskRgn: RgnHandle; userRoutine: QDBitsUPP); external name '_InvokeQDBitsUPP'; { old name was CallQDBitsProc }
+
+{
+ * InvokeQDCommentUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvokeQDCommentUPP(kind: SInt16; dataSize: SInt16; dataHandle: Handle; userRoutine: QDCommentUPP); external name '_InvokeQDCommentUPP'; { old name was CallQDCommentProc }
+
+{
+ * InvokeQDTxMeasUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function InvokeQDTxMeasUPP(byteCount: SInt16; textAddr: UnivPtr; var numer: Point; var denom: Point; var info: FontInfo; userRoutine: QDTxMeasUPP): SInt16; external name '_InvokeQDTxMeasUPP'; { old name was CallQDTxMeasProc }
+
+{
+ * InvokeQDGetPicUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvokeQDGetPicUPP(dataPtr: UnivPtr; byteCount: SInt16; userRoutine: QDGetPicUPP); external name '_InvokeQDGetPicUPP'; { old name was CallQDGetPicProc }
+
+{
+ * InvokeQDPutPicUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvokeQDPutPicUPP(dataPtr: UnivPtr; byteCount: SInt16; userRoutine: QDPutPicUPP); external name '_InvokeQDPutPicUPP'; { old name was CallQDPutPicProc }
+
+{
+ * InvokeQDOpcodeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvokeQDOpcodeUPP(const (*var*) fromRect: Rect; const (*var*) toRect: Rect; opcode: UInt16; version: SInt16; userRoutine: QDOpcodeUPP); external name '_InvokeQDOpcodeUPP'; { old name was CallQDOpcodeProc }
+
+{
+ * InvokeQDStdGlyphsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function InvokeQDStdGlyphsUPP(dataStream: UnivPtr; size: ByteCount; userRoutine: QDStdGlyphsUPP): OSStatus; external name '_InvokeQDStdGlyphsUPP'; { old name was CallQDStdGlyphsProc }
+
+{
+ * InvokeQDJShieldCursorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvokeQDJShieldCursorUPP(left: SInt16; top: SInt16; right: SInt16; bottom: SInt16; userRoutine: QDJShieldCursorUPP); external name '_InvokeQDJShieldCursorUPP'; { old name was CallQDJShieldCursorProc }
+
+{$ifc NOT OPAQUE_TOOLBOX_STRUCTS}
+
+type
+ GrafPortPtr = ^GrafPort;
+ GrafPort = record
+ device: SInt16; { not available in Carbon }
+ portBits: BitMap; { in Carbon use GetPortBitMapForCopyBits or IsPortColor }
+ portRect: Rect; { in Carbon use Get/SetPortBounds }
+ visRgn: RgnHandle; { in Carbon use Get/SetPortVisibleRegion }
+ clipRgn: RgnHandle; { in Carbon use Get/SetPortClipRegion }
+ bkPat: Pattern; { not available in Carbon all GrafPorts are CGrafPorts }
+ fillPat: Pattern; { not available in Carbon all GrafPorts are CGrafPorts }
+ pnLoc: Point; { in Carbon use GetPortPenLocation or MoveTo }
+ pnSize: Point; { in Carbon use Get/SetPortPenSize }
+ pnMode: SInt16; { in Carbon use Get/SetPortPenMode }
+ pnPat: Pattern; { not available in Carbon all GrafPorts are CGrafPorts }
+ pnVis: SInt16; { in Carbon use GetPortPenVisibility or Show/HidePen }
+ txFont: SInt16; { in Carbon use GetPortTextFont or TextFont }
+ txFace: StyleField; { in Carbon use GetPortTextFace or TextFace }
+ { StyleField occupies 16-bits, but only first 8-bits are used }
+ txMode: SInt16; { in Carbon use GetPortTextMode or TextMode }
+ txSize: SInt16; { in Carbon use GetPortTextSize or TextSize }
+ spExtra: Fixed; { in Carbon use GetPortSpExtra or SpaceExtra }
+ fgColor: SInt32; { not available in Carbon }
+ bkColor: SInt32; { not available in Carbon }
+ colrBit: SInt16; { not available in Carbon }
+ patStretch: SInt16; { not available in Carbon }
+ picSave: Handle; { in Carbon use IsPortPictureBeingDefined }
+ rgnSave: Handle; { not available in Carbon }
+ polySave: Handle; { not available in Carbon }
+ grafProcs: QDProcsPtr; { not available in Carbon all GrafPorts are CGrafPorts }
+ end;
+
+ GrafPtr = ^GrafPort;
+ {
+ * This set of definitions "belongs" in Windows.
+ * But, there is a circularity in the headers where Windows includes Controls and
+ * Controls includes Windows. To break the circle, the information
+ * needed by Controls is moved from Windows to Quickdraw.
+ }
+ WindowPtr = GrafPtr;
+ DialogPtr = WindowPtr;
+{$elsec}
+
+type
+ WindowPtr = ^SInt32; { an opaque 32-bit type }
+ WindowPtrPtr = ^WindowPtr; { when a var xx:WindowPtr parameter can be nil, it is changed to xx: WindowPtrPtr }
+ DialogPtr = ^SInt32; { an opaque 32-bit type }
+ DialogPtrPtr = ^DialogPtr; { when a var xx:DialogPtr parameter can be nil, it is changed to xx: DialogPtrPtr }
+ GrafPtr = ^SInt32; { an opaque 32-bit type }
+ GrafPtrPtr = ^GrafPtr; { when a var xx:GrafPtr parameter can be nil, it is changed to xx: GrafPtrPtr }
+{$endc}
+
+ WindowRef = WindowPtr;
+ WindowRefPtr = ^WindowRef; { when a var xx:WindowRef parameter can be nil, it is changed to xx: WindowRefPtr }
+ { DragConstraint constants to pass to DragGray,DragTheRgn, or ConstrainedDragRgn }
+ DragConstraint = UInt16;
+
+const
+ kNoConstraint = 0;
+ kVerticalConstraint = 1;
+ kHorizontalConstraint = 2;
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ DragGrayRgnProcPtr = procedure;
+{$elsec}
+ DragGrayRgnProcPtr = ProcPtr;
+{$endc}
+
+ {
+ * Here ends the list of things that "belong" in Windows.
+ }
+
+
+ RGBColorPtr = ^RGBColor;
+ RGBColor = record
+ red: UInt16; { magnitude of red component }
+ green: UInt16; { magnitude of green component }
+ blue: UInt16; { magnitude of blue component }
+ end;
+
+ RGBColorHdl = ^RGBColorPtr;
+{$ifc TYPED_FUNCTION_POINTERS}
+ ColorSearchProcPtr = function(var rgb: RGBColor; var position: SInt32): boolean;
+{$elsec}
+ ColorSearchProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ ColorComplementProcPtr = function(var rgb: RGBColor): boolean;
+{$elsec}
+ ColorComplementProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ DragGrayRgnUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DragGrayRgnUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ ColorSearchUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ColorSearchUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ ColorComplementUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ColorComplementUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppDragGrayRgnProcInfo = $00000000;
+ uppColorSearchProcInfo = $000003D0;
+ uppColorComplementProcInfo = $000000D0;
+ {
+ * NewDragGrayRgnUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewDragGrayRgnUPP(userRoutine: DragGrayRgnProcPtr): DragGrayRgnUPP; external name '_NewDragGrayRgnUPP'; { old name was NewDragGrayRgnProc }
+
+{
+ * NewColorSearchUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewColorSearchUPP(userRoutine: ColorSearchProcPtr): ColorSearchUPP; external name '_NewColorSearchUPP'; { old name was NewColorSearchProc }
+
+{
+ * NewColorComplementUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewColorComplementUPP(userRoutine: ColorComplementProcPtr): ColorComplementUPP; external name '_NewColorComplementUPP'; { old name was NewColorComplementProc }
+
+{
+ * DisposeDragGrayRgnUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+
+procedure DisposeDragGrayRgnUPP(userUPP: DragGrayRgnUPP); external name '_DisposeDragGrayRgnUPP';
+{
+ * DisposeColorSearchUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeColorSearchUPP(userUPP: ColorSearchUPP); external name '_DisposeColorSearchUPP';
+
+{
+ * DisposeColorComplementUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeColorComplementUPP(userUPP: ColorComplementUPP); external name '_DisposeColorComplementUPP';
+
+{
+ * InvokeDragGrayRgnUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+
+procedure InvokeDragGrayRgnUPP(userRoutine: DragGrayRgnUPP); external name '_InvokeDragGrayRgnUPP'; { old name was CallDragGrayRgnProc }
+{
+ * InvokeColorSearchUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function InvokeColorSearchUPP(var rgb: RGBColor; var position: SInt32; userRoutine: ColorSearchUPP): boolean; external name '_InvokeColorSearchUPP'; { old name was CallColorSearchProc }
+
+{
+ * InvokeColorComplementUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function InvokeColorComplementUPP(var rgb: RGBColor; userRoutine: ColorComplementUPP): boolean; external name '_InvokeColorComplementUPP'; { old name was CallColorComplementProc }
+
+type
+ ColorSpecPtr = ^ColorSpec;
+ ColorSpec = record
+ value: SInt16; { index or other value }
+ rgb: RGBColor; { true color }
+ end;
+
+ CSpecArray = array [0..0] of ColorSpec;
+ ColorTablePtr = ^ColorTable;
+ ColorTable = record
+ ctSeed: SInt32; { unique identifier for table }
+ ctFlags: SInt16; { high bit: 0 = PixMap; 1 = device }
+ ctSize: SInt16; { number of entries in CTTable }
+ ctTable: CSpecArray; { array [0..0] of ColorSpec }
+ end;
+
+ CTabPtr = ^ColorTable;
+ CTabHandle = ^CTabPtr;
+ xColorSpecPtr = ^xColorSpec;
+ xColorSpec = record
+ value: SInt16; { index or other value }
+ rgb: RGBColor; { true color }
+ xalpha: SInt16;
+ end;
+
+ xCSpecArray = array [0..0] of xColorSpec;
+ MatchRecPtr = ^MatchRec;
+ MatchRec = record
+ red: UInt16;
+ green: UInt16;
+ blue: UInt16;
+ matchData: SInt32;
+ end;
+
+ {
+ QuickTime 3.0 makes PixMap data structure available on non-Mac OS's.
+ In order to implement PixMap in these alternate environments, the PixMap
+ had to be extended. The pmReserved field was changed to pmExt which is
+ a Handle to extra info. The planeBytes field was changed to pixelFormat.
+
+ In OS X, Quickdraw also uses the new PixMap data structure.
+ }
+{$ifc undefined OLDPIXMAPSTRUCT}
+{$ifc TARGET_OS_MAC AND TARGET_API_MAC_OS8}
+{$setc OLDPIXMAPSTRUCT := 1}
+{$elsec}
+{$setc OLDPIXMAPSTRUCT := 0}
+{$endc}
+{$endc}
+
+ { pixel formats }
+
+const
+ k1MonochromePixelFormat = $00000001; { 1 bit indexed }
+ k2IndexedPixelFormat = $00000002; { 2 bit indexed }
+ k4IndexedPixelFormat = $00000004; { 4 bit indexed }
+ k8IndexedPixelFormat = $00000008; { 8 bit indexed }
+ k16BE555PixelFormat = $00000010; { 16 bit BE rgb 555 (Mac) }
+ k24RGBPixelFormat = $00000018; { 24 bit rgb }
+ k32ARGBPixelFormat = $00000020; { 32 bit argb (Mac) }
+ k1IndexedGrayPixelFormat = $00000021; { 1 bit indexed gray }
+ k2IndexedGrayPixelFormat = $00000022; { 2 bit indexed gray }
+ k4IndexedGrayPixelFormat = $00000024; { 4 bit indexed gray }
+ k8IndexedGrayPixelFormat = $00000028; { 8 bit indexed gray }
+
+
+ { values for PixMap.pixelFormat }
+ k16LE555PixelFormat = $4C353535 (* 'L555' *); { 16 bit LE rgb 555 (PC) }
+ k16LE5551PixelFormat = $35353531 (* '5551' *); { 16 bit LE rgb 5551 }
+ k16BE565PixelFormat = $42353635 (* 'B565' *); { 16 bit BE rgb 565 }
+ k16LE565PixelFormat = $4C353635 (* 'L565' *); { 16 bit LE rgb 565 }
+ k24BGRPixelFormat = $32344247 (* '24BG' *); { 24 bit bgr }
+ k32BGRAPixelFormat = $42475241 (* 'BGRA' *); { 32 bit bgra (Matrox) }
+ k32ABGRPixelFormat = $41424752 (* 'ABGR' *); { 32 bit abgr }
+ k32RGBAPixelFormat = $52474241 (* 'RGBA' *); { 32 bit rgba }
+ kYUVSPixelFormat = $79757673 (* 'yuvs' *); { YUV 4:2:2 byte ordering 16-unsigned = 'YUY2' }
+ kYUVUPixelFormat = $79757675 (* 'yuvu' *); { YUV 4:2:2 byte ordering 16-signed }
+ kYVU9PixelFormat = $59565539 (* 'YVU9' *); { YVU9 Planar 9 }
+ kYUV411PixelFormat = $59343131 (* 'Y411' *); { YUV 4:1:1 Interleaved 16 }
+ kYVYU422PixelFormat = $59565955 (* 'YVYU' *); { YVYU 4:2:2 byte ordering 16 }
+ kUYVY422PixelFormat = $55595659 (* 'UYVY' *); { UYVY 4:2:2 byte ordering 16 }
+ kYUV211PixelFormat = $59323131 (* 'Y211' *); { YUV 2:1:1 Packed 8 }
+ k2vuyPixelFormat = $32767579 (* '2vuy' *); { UYVY 4:2:2 byte ordering 16 }
+
+
+type
+ PixMapPtr = ^PixMap;
+ PixMap = record
+ baseAddr: Ptr; { pointer to pixels }
+ rowBytes: SInt16; { offset to next line } { Carbon: uses extended rowbytes in pmExt field pixMap extension. Use ImageCompression's (QTGet|QTSet)PixMap(Handle|Ptr)RowBytes functions }
+ bounds: Rect; { encloses bitmap }
+ pmVersion: SInt16; { pixMap version number }
+ packType: SInt16; { defines packing format }
+ packSize: SInt32; { length of pixel data }
+ hRes: Fixed; { horiz. resolution (ppi) }
+ vRes: Fixed; { vert. resolution (ppi) }
+ pixelType: SInt16; { defines pixel type }
+ pixelSize: SInt16; { # bits in pixel }
+ cmpCount: SInt16; { # components in pixel }
+ cmpSize: SInt16; { # bits per component }
+{$ifc OLDPIXMAPSTRUCT}
+ planeBytes: SInt32; { offset to next plane }
+ pmTable: CTabHandle; { color map for this pixMap }
+ pmReserved: SInt32;
+{$elsec}
+ pixelFormat: OSType; {fourCharCode representation}
+ pmTable: CTabHandle; {color map for this pixMap}
+ pmExt: Handle; {Handle to pixMap extension}
+{$endc}
+ end;
+
+ PixMapHandle = ^PixMapPtr;
+ PixPatPtr = ^PixPat;
+ PixPat = record
+ patType: SInt16; { type of pattern }
+ patMap: PixMapHandle; { the pattern's pixMap }
+ patData: Handle; { pixmap's data }
+ patXData: Handle; { expanded Pattern data }
+ patXValid: SInt16; { flags whether expanded Pattern valid }
+ patXMap: Handle; { Handle to expanded Pattern data }
+ pat1Data: Pattern; { old-Style pattern/RGB color }
+ end;
+
+ PixPatHandle = ^PixPatPtr;
+ CCrsrPtr = ^CCrsr;
+ CCrsr = record
+ crsrType: SInt16; { type of cursor }
+ crsrMap: PixMapHandle; { the cursor's pixmap }
+ crsrData: Handle; { cursor's data }
+ crsrXData: Handle; { expanded cursor data }
+ crsrXValid: SInt16; { depth of expanded data (0 if none) }
+ crsrXHandle: Handle; { future use }
+ crsr1Data: Bits16; { one-bit cursor }
+ crsrMask: Bits16; { cursor's mask }
+ crsrHotSpot: Point; { cursor's hotspot }
+ crsrXTable: SInt32; { private }
+ crsrID: SInt32; { private }
+ end;
+
+ CCrsrHandle = ^CCrsrPtr;
+ GammaTblPtr = ^GammaTbl;
+ GammaTbl = record
+ gVersion: SInt16; { gamma version number }
+ gType: SInt16; { gamma data type }
+ gFormulaSize: SInt16; { Formula data size }
+ gChanCnt: SInt16; { number of channels of data }
+ gDataCnt: SInt16; { number of values/channel }
+ gDataWidth: SInt16; { bits/corrected value (data packed to next larger byte size) }
+ gFormulaData: array [0..0] of SInt16; { data for formulas followed by gamma values }
+ end;
+
+ GammaTblHandle = ^GammaTblPtr;
+ ITabPtr = ^ITab;
+ ITab = record
+ iTabSeed: SInt32; { copy of CTSeed from source CTable }
+ iTabRes: SInt16; { bits/channel resolution of iTable }
+ iTTable: SInt8; { byte colortable index values }
+ end;
+
+ ITabHandle = ^ITabPtr;
+ SProcRecPtr = ^SProcRec;
+ SProcRec = record
+ nxtSrch: Handle; { SProcHndl Handle to next SProcRec }
+ srchProc: ColorSearchUPP; { search procedure proc ptr }
+ end;
+
+ SProcPtr = ^SProcRec;
+ SProcHndl = ^SProcPtr;
+ CProcRecPtr = ^CProcRec;
+ CProcRec = record
+ nxtComp: Handle; { CProcHndl Handle to next CProcRec }
+ compProc: ColorComplementUPP; { complement procedure proc ptr }
+ end;
+
+ CProcPtr = ^CProcRec;
+ CProcHndl = ^CProcPtr;
+ {
+ QuickTime 3.0 makes GDevice data structure available on non-Mac OS's.
+ In order to implement GDevice in these alternate environments, the GDevice
+ had to be extended. The gdReserved field was changed to gdExt which is
+ a Handle to extra info.
+ }
+{$ifc undefined OLDGDEVICESTRUCT}
+{$ifc TARGET_OS_MAC AND TARGET_API_MAC_OS8}
+{$setc OLDGDEVICESTRUCT := 1}
+{$elsec}
+{$setc OLDGDEVICESTRUCT := 0}
+{$endc}
+{$endc}
+
+ GDevicePtr = ^GDevice;
+ GDPtr = ^GDevice;
+ GDHandle = ^GDPtr;
+ GDHandle_fix = GDHandle; { used as field type when a record declaration contains a GDHandle field identifier }
+ GDHandlePtr = ^GDHandle; { when a VAR xx: GDHandle parameter can be nil, it is changed to xx: GDHandlePtr }
+ GDevice = record
+ gdRefNum: SInt16; { driver's unit number }
+ gdID: SInt16; { client ID for search procs }
+ gdType: SInt16; { fixed/CLUT/direct }
+ gdITable: ITabHandle; { Handle to inverse lookup table }
+ gdResPref: SInt16; { preferred resolution of GDITable }
+ gdSearchProc: SProcHndl; { search proc list head }
+ gdCompProc: CProcHndl; { complement proc list }
+ gdFlags: SInt16; { grafDevice flags word }
+ gdPMap: PixMapHandle; { describing pixMap }
+ gdRefCon: SInt32; { reference value }
+ gdNextGD: GDHandle; { GDHandle Handle of next gDevice }
+ gdRect: Rect; { device's bounds in global coordinates }
+ gdMode: SInt32; { device's current mode }
+ gdCCBytes: SInt16; { depth of expanded cursor data }
+ gdCCDepth: SInt16; { depth of expanded cursor data }
+ gdCCXData: Handle; { Handle to cursor's expanded data }
+ gdCCXMask: Handle; { Handle to cursor's expanded mask }
+{$ifc OLDGDEVICESTRUCT}
+ gdReserved: SInt32; { future use. MUST BE 0 }
+{$elsec}
+ gdExt: Handle; {QuickTime 3.0 private info}
+{$endc}
+ end;
+
+ GrafVars = record
+ rgbOpColor: RGBColor; { color for addPin subPin and average }
+ rgbHiliteColor: RGBColor; { color for hiliting }
+ pmFgColor: Handle; { palette Handle for foreground color }
+ pmFgIndex: SInt16; { index value for foreground }
+ pmBkColor: Handle; { palette Handle for background color }
+ pmBkIndex: SInt16; { index value for background }
+ pmFlags: SInt16; { flags for Palette Manager }
+ end;
+ GVarPtr = ^GrafVars;
+ GVarHandle = ^GVarPtr;
+
+{$ifc NOT OPAQUE_TOOLBOX_STRUCTS}
+ CGrafPortPtr = ^CGrafPort;
+ CGrafPtr = ^CGrafPort;
+{$elsec}
+ CGrafPtr = GrafPtr;
+{$endc}
+ CGrafPtrPtr = ^CGrafPtr;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDPrinterStatusProcPtr = function(opcode: PrinterStatusOpcode; currentPort: CGrafPtr; printerStatus: UnivPtr): OSStatus;
+{$elsec}
+ QDPrinterStatusProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ QDPrinterStatusUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDPrinterStatusUPP = UniversalProcPtr;
+{$endc}
+
+ CQDProcsPtr = ^CQDProcs;
+ CQDProcs = record
+ textProc: QDTextUPP;
+ lineProc: QDLineUPP;
+ rectProc: QDRectUPP;
+ rRectProc: QDRRectUPP;
+ ovalProc: QDOvalUPP;
+ arcProc: QDArcUPP;
+ polyProc: QDPolyUPP;
+ rgnProc: QDRgnUPP;
+ bitsProc: QDBitsUPP;
+ commentProc: QDCommentUPP;
+ txMeasProc: QDTxMeasUPP;
+ getPicProc: QDGetPicUPP;
+ putPicProc: QDPutPicUPP;
+ opcodeProc: QDOpcodeUPP;
+ newProc1: UniversalProcPtr; { this is the StdPix bottleneck -- see ImageCompression.h }
+ glyphsProc: QDStdGlyphsUPP; { unused on Mac OS X. was newProc2; now used in Unicode text drawing }
+ printerStatusProc: QDPrinterStatusUPP; { was newProc3; now used to communicate status between Printing code and System imaging code }
+ newProc4: UniversalProcPtr;
+ newProc5: UniversalProcPtr;
+ newProc6: UniversalProcPtr;
+ end;
+
+{$ifc NOT OPAQUE_TOOLBOX_STRUCTS}
+ CGrafPort = record
+ device: SInt16; { not available in Carbon }
+ portPixMap: PixMapHandle; { in Carbon use GetPortPixMap }
+ portVersion: SInt16; { in Carbon use IsPortColor }
+ grafVars: Handle; { not available in Carbon }
+ chExtra: SInt16; { in Carbon use GetPortChExtra }
+ pnLocHFrac: SInt16; { in Carbon use Get/SetPortFracHPenLocation }
+ portRect: Rect; { in Carbon use Get/SetPortBounds }
+ visRgn: RgnHandle; { in Carbon use Get/SetPortVisibleRegion }
+ clipRgn: RgnHandle; { in Carbon use Get/SetPortClipRegion }
+ bkPixPat: PixPatHandle; { in Carbon use GetPortBackPixPat or BackPixPat }
+ rgbFgColor: RGBColor; { in Carbon use GetPortForeColor or RGBForeColor }
+ rgbBkColor: RGBColor; { in Carbon use GetPortBackColor or RGBBackColor }
+ pnLoc: Point; { in Carbon use GetPortPenLocation or MoveTo }
+ pnSize: Point; { in Carbon use Get/SetPortPenSize }
+ pnMode: SInt16; { in Carbon use Get/SetPortPenMode }
+ pnPixPat: PixPatHandle; { in Carbon use Get/SetPortPenPixPat }
+ fillPixPat: PixPatHandle; { in Carbon use GetPortFillPixPat }
+ pnVis: SInt16; { in Carbon use GetPortPenVisibility or Show/HidePen }
+ txFont: SInt16; { in Carbon use GetPortTextFont or TextFont }
+ txFace: StyleField; { in Carbon use GetPortTextFace or TextFace }
+ { StyleField occupies 16-bits, but only first 8-bits are used }
+ txMode: SInt16; { in Carbon use GetPortTextMode or TextMode }
+ txSize: SInt16; { in Carbon use GetPortTextSize or TextSize }
+ spExtra: Fixed; { in Carbon use GetPortSpExtra or SpaceExtra }
+ fgColor: SInt32; { not available in Carbon }
+ bkColor: SInt32; { not available in Carbon }
+ colrBit: SInt16; { not available in Carbon }
+ patStretch: SInt16; { not available in Carbon }
+ picSave: Handle; { in Carbon use IsPortPictureBeingDefined }
+ rgnSave: Handle; { in Carbon use IsPortRegionBeingDefined }
+ polySave: Handle; { in Carbon use IsPortPolyBeingDefined }
+ grafProcs: CQDProcsPtr; { in Carbon use Get/SetPortGrafProcs }
+ end;
+
+{$endc}
+
+{$ifc OPAQUE_TOOLBOX_STRUCTS}
+ CWindowPtr = WindowPtr;
+{$elsec}
+ CWindowPtr = CGrafPtr;
+{$endc} {OPAQUE_TOOLBOX_STRUCTS}
+
+ ReqListRecPtr = ^ReqListRec;
+ ReqListRec = record
+ reqLSize: SInt16; { request list size }
+ reqLData: array [0..0] of SInt16; { request list data }
+ end;
+
+ OpenCPicParamsPtr = ^OpenCPicParams;
+ OpenCPicParams = record
+ srcRect: Rect;
+ hRes: Fixed;
+ vRes: Fixed;
+ version: SInt16;
+ reserved1: SInt16;
+ reserved2: SInt32;
+ end;
+
+
+const
+ kCursorImageMajorVersion = $0001;
+ kCursorImageMinorVersion = $0000;
+
+
+type
+ CursorImageRecPtr = ^CursorImageRec;
+ CursorImageRec = record
+ majorVersion: UInt16;
+ minorVersion: UInt16;
+ cursorPixMap: PixMapHandle;
+ cursorBitMask: BitMapHandle;
+ end;
+
+ CursorImagePtr = ^CursorImageRec;
+{$ifc TYPED_FUNCTION_POINTERS}
+ DeviceLoopDrawingProcPtr = procedure(depth: SInt16; deviceFlags: SInt16; targetDevice: GDHandle; userData: SInt32);
+{$elsec}
+ DeviceLoopDrawingProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ DeviceLoopDrawingUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DeviceLoopDrawingUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppQDPrinterStatusProcInfo = $00000FF1;
+ uppDeviceLoopDrawingProcInfo = $00003E80;
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * NewQDPrinterStatusUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewQDPrinterStatusUPP(userRoutine: QDPrinterStatusProcPtr): QDPrinterStatusUPP; external name '_NewQDPrinterStatusUPP'; { old name was NewQDPrinterStatusProc }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * NewDeviceLoopDrawingUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewDeviceLoopDrawingUPP(userRoutine: DeviceLoopDrawingProcPtr): DeviceLoopDrawingUPP; external name '_NewDeviceLoopDrawingUPP'; { old name was NewDeviceLoopDrawingProc }
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * DisposeQDPrinterStatusUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposeQDPrinterStatusUPP(userUPP: QDPrinterStatusUPP); external name '_DisposeQDPrinterStatusUPP';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * DisposeDeviceLoopDrawingUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeDeviceLoopDrawingUPP(userUPP: DeviceLoopDrawingUPP); external name '_DisposeDeviceLoopDrawingUPP';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * InvokeQDPrinterStatusUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InvokeQDPrinterStatusUPP(opcode: PrinterStatusOpcode; currentPort: CGrafPtr; printerStatus: UnivPtr; userRoutine: QDPrinterStatusUPP): OSStatus; external name '_InvokeQDPrinterStatusUPP'; { old name was CallQDPrinterStatusProc }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * InvokeDeviceLoopDrawingUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvokeDeviceLoopDrawingUPP(depth: SInt16; deviceFlags: SInt16; targetDevice: GDHandle; userData: SInt32; userRoutine: DeviceLoopDrawingUPP); external name '_InvokeDeviceLoopDrawingUPP'; { old name was CallDeviceLoopDrawingProc }
+
+{$ifc NOT OPAQUE_TOOLBOX_STRUCTS OR NOT TARGET_API_MAC_CARBON}
+
+type
+ QDGlobalsPtr = ^QDGlobals;
+ QDGlobals = record
+ privates: packed array [0..75] of char;
+ randSeed: SInt32; { in Carbon use GetQDGlobalsRandomSeed }
+ screenBits: BitMap; { in Carbon use GetQDGlobalsScreenBits }
+ arrow: Cursor; { in Carbon use GetQDGlobalsArrow }
+ dkGray: Pattern; { in Carbon use GetQDGlobalsDarkGray }
+ ltGray: Pattern; { in Carbon use GetQDGlobalsLightGray }
+ gray: Pattern; { in Carbon use GetQDGlobalsGray }
+ black: Pattern; { in Carbon use GetQDGlobalsBlack }
+ white: Pattern; { in Carbon use GetQDGlobalsWhite }
+ thePort: GrafPtr; { in Carbon use GetQDGlobalsThePort }
+ end;
+
+ QDGlobalsHdl = ^QDGlobalsPtr;
+
+{ To be in sync with the C interface to QuickDraw globals, pascal code must now }
+{ qualify the QuickDraw globals with Òqd.Ó (e.g. InitGraf(@qd.thePort); ) }
+var qd: QDGlobals; external name '_qd'; (* attribute const *)
+{$endc}
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * InitGraf()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure InitGraf(globalPtr: UnivPtr); external name '_InitGraf';
+{
+ * OpenPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure OpenPort(port: GrafPtr); external name '_OpenPort';
+{
+ * InitPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure InitPort(port: GrafPtr); external name '_InitPort';
+{
+ * ClosePort()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure ClosePort(port: GrafPtr); external name '_ClosePort';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ General comments about thread-safety of Quickdraw
+ -------------------------------------------------
+
+ The original design and implementation principles of Quickdraw seriously
+ conflict with the goal of making Quickdraw thread-safe. Many Quickdraw
+ functions rely on globals instead of explicit parameters. Even though the
+ current port (and the current GDevice) are being maintained per-thread,
+ a simple call like "MoveTo(x, y)" just doesn't make sense with preemptive threads,
+ if two different threads use the same port. Also, as soon as a client replaces
+ bottleneck procedures (SetStdCProcs), thread-safety is compromised.
+ That's why we maintain by default the "Not thread safe" attribute in Quickdraw APIs,
+ even though they may appear to be thread-safe.
+}
+{
+ These are Carbon only routines. They do nothing at all on
+ Mac OS 8, but work flawlessly on Mac OS X.
+}
+
+{
+ * LockPortBits() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4
+function LockPortBits(port: GrafPtr): OSErr; external name '_LockPortBits';
+
+{
+ * UnlockPortBits() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4
+function UnlockPortBits(port: GrafPtr): OSErr; external name '_UnlockPortBits';
+
+{ Break a region up into rectangles. }
+
+
+const
+ kQDParseRegionFromTop = $01;
+ kQDParseRegionFromBottom = $02;
+ kQDParseRegionFromLeft = $04;
+ kQDParseRegionFromRight = $08;
+ kQDParseRegionFromTopLeft = $05;
+ kQDParseRegionFromBottomRight = $0A;
+
+
+type
+ QDRegionParseDirection = SInt32;
+
+const
+ kQDRegionToRectsMsgInit = 1;
+ kQDRegionToRectsMsgParse = 2;
+ kQDRegionToRectsMsgTerminate = 3;
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ RegionToRectsProcPtr = function(message: UInt16; rgn: RgnHandle; const (*var*) rect_: Rect; refCon: UnivPtr): OSStatus;
+{$elsec}
+ RegionToRectsProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ RegionToRectsUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ RegionToRectsUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppRegionToRectsProcInfo = $00003FB1;
+ {
+ * NewRegionToRectsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewRegionToRectsUPP(userRoutine: RegionToRectsProcPtr): RegionToRectsUPP; external name '_NewRegionToRectsUPP'; { old name was NewRegionToRectsProc }
+
+{
+ * DisposeRegionToRectsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeRegionToRectsUPP(userUPP: RegionToRectsUPP); external name '_DisposeRegionToRectsUPP';
+
+{
+ * InvokeRegionToRectsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function InvokeRegionToRectsUPP(message: UInt16; rgn: RgnHandle; const (*var*) rect_: Rect; refCon: UnivPtr; userRoutine: RegionToRectsUPP): OSStatus; external name '_InvokeRegionToRectsUPP'; { old name was CallRegionToRectsProc }
+
+{
+ * QDRegionToRects()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function QDRegionToRects(rgn: RgnHandle; dir: QDRegionParseDirection; proc: RegionToRectsUPP; userData: UnivPtr): OSStatus; external name '_QDRegionToRects';
+
+{$ifc NOT TARGET_OS_MAC}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * UpdatePort()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function UpdatePort(port: GrafPtr): OSErr; external name '_UpdatePort';
+
+{
+ * GetPortNativeWindow()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetPortNativeWindow(macPort: GrafPtr): Ptr; external name '_GetPortNativeWindow';
+
+{
+ * GetNativeWindowPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetNativeWindowPort(nativeWindow: UnivPtr): GrafPtr; external name '_GetNativeWindowPort';
+
+{
+ * MacRegionToNativeRegion()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function MacRegionToNativeRegion(macRegion: RgnHandle): Ptr; external name '_MacRegionToNativeRegion';
+
+{
+ * NativeRegionToMacRegion()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NativeRegionToMacRegion(nativeRegion: UnivPtr): RgnHandle; external name '_NativeRegionToMacRegion';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc}
+
+{$ifc TARGET_OS_WIN32}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * GetPortHWND()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetPortHWND(port: GrafPtr): Ptr; external name '_GetPortHWND';
+
+{
+ * GetHWNDPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetHWNDPort(theHWND: UnivPtr): GrafPtr; external name '_GetHWNDPort';
+
+{
+ * GetPortHDC()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetPortHDC(port: GrafPtr): Ptr; external name '_GetPortHDC';
+
+{
+ * GetPortHBITMAP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetPortHBITMAP(port: GrafPtr): Ptr; external name '_GetPortHBITMAP';
+
+{
+ * GetPortHPALETTE()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetPortHPALETTE(port: GrafPtr): Ptr; external name '_GetPortHPALETTE';
+
+{
+ * GetPortHFONT()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetPortHFONT(port: GrafPtr): Ptr; external name '_GetPortHFONT';
+
+{
+ * GetDIBFromPICT()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetDIBFromPICT(hPict: PicHandle): Ptr; external name '_GetDIBFromPICT';
+
+{
+ * GetPICTFromDIB()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetPICTFromDIB(h: UnivPtr): PicHandle; external name '_GetPICTFromDIB';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {TARGET_OS_WIN32}
+
+{
+ * [Mac]SetPort() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetPort(port: GrafPtr); external name '_SetPort';
+
+{
+ * GetPort() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure GetPort(var port: GrafPtr); external name '_GetPort';
+
+{
+ * QDSwapPort()
+ *
+ * Summary:
+ * Combines a GetPort(&savePort); SetPort(newPort) sequence.
+ *
+ * Discussion:
+ * On X, the GetPort/SetPort calls act on per-thread globals, and
+ * cost more processor cycles than in the past, where they were
+ * simple memory accessors. To optimize, use the QDSwapPort call
+ * which combines both, and returns a Boolean indicating if the port
+ * actually did change. Typical usage: portChanged =
+ * QDSwapPort(newPort, &savePort); // some drawing into newPort if
+ * (portChanged) QDSwapPort(savePort, NULL);
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inNewPort:
+ * The new port to be set.
+ *
+ * outOldPort:
+ * Receives the previous port. Can be NULL.
+ *
+ * Result:
+ * A Boolean indicating whether the port was changed, i.e.
+ * (inNewPort != *outOldPort)
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER;
+function QDSwapPort(inNewPort: CGrafPtr; outOldPort: CGrafPtrPtr): boolean; external name '_QDSwapPort';
+
+{
+ * GrafDevice() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure GrafDevice(device: SInt16); external name '_GrafDevice';
+
+{
+ * SetPortBits() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetPortBits(const (*var*) bm: BitMap); external name '_SetPortBits';
+
+{
+ * PortSize() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure PortSize(width: SInt16; height: SInt16); external name '_PortSize';
+
+{
+ * MovePortTo() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure MovePortTo(leftGlobal: SInt16; topGlobal: SInt16); external name '_MovePortTo';
+
+{
+ * SetOrigin() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetOrigin(h: SInt16; v: SInt16); external name '_SetOrigin';
+
+{
+ * SetClip() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetClip(rgn: RgnHandle); external name '_SetClip';
+
+{
+ * GetClip() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure GetClip(rgn: RgnHandle); external name '_GetClip';
+
+{
+ * ClipRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure ClipRect(const (*var*) r: Rect); external name '_ClipRect';
+
+{
+ * BackPat() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure BackPat(const (*var*) pat: Pattern); external name '_BackPat';
+
+{
+ * InitCursor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InitCursor; external name '_InitCursor';
+
+{
+ * [Mac]SetCursor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetCursor(const (*var*) crsr: Cursor); external name '_SetCursor';
+
+{
+ * HideCursor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure HideCursor; external name '_HideCursor';
+
+{
+ * [Mac]ShowCursor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure ShowCursor; external name '_ShowCursor';
+
+{
+ * ObscureCursor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure ObscureCursor; external name '_ObscureCursor';
+
+{
+ * HidePen() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure HidePen; external name '_HidePen';
+
+{
+ * ShowPen() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure ShowPen; external name '_ShowPen';
+
+{
+ * GetPen() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure GetPen(var pt: Point); external name '_GetPen';
+
+{
+ * GetPenState() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure GetPenState(var pnState: PenState); external name '_GetPenState';
+
+{
+ * SetPenState() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetPenState(const (*var*) pnState: PenState); external name '_SetPenState';
+
+{
+ * PenSize() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure PenSize(width: SInt16; height: SInt16); external name '_PenSize';
+
+{
+ * PenMode() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure PenMode(mode: SInt16); external name '_PenMode';
+
+{
+ * PenPat() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure PenPat(const (*var*) pat: Pattern); external name '_PenPat';
+
+{
+ * PenNormal() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure PenNormal; external name '_PenNormal';
+
+{
+ * MoveTo() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure MoveTo(h: SInt16; v: SInt16); external name '_MoveTo';
+
+{
+ * Move() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure Move(dh: SInt16; dv: SInt16); external name '_Move';
+
+{
+ * [Mac]LineTo() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure LineTo(h: SInt16; v: SInt16); external name '_LineTo';
+
+{
+ * Line() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure Line(dh: SInt16; dv: SInt16); external name '_Line';
+
+{
+ * ForeColor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure ForeColor(color: SInt32); external name '_ForeColor';
+
+{
+ * BackColor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure BackColor(color: SInt32); external name '_BackColor';
+
+{
+ * ColorBit() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure ColorBit(whichBit: SInt16); external name '_ColorBit';
+
+{
+ * [Mac]SetRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetRect(var r: Rect; left: SInt16; top: SInt16; right: SInt16; bottom: SInt16); external name '_SetRect';
+
+{
+ * [Mac]OffsetRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure OffsetRect(var r: Rect; dh: SInt16; dv: SInt16); external name '_OffsetRect';
+
+{
+ * [Mac]InsetRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InsetRect(var r: Rect; dh: SInt16; dv: SInt16); external name '_InsetRect';
+
+{
+ * SectRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function SectRect(const (*var*) src1: Rect; const (*var*) src2: Rect; var dstRect: Rect): boolean; external name '_SectRect';
+
+{
+ * [Mac]UnionRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure UnionRect(const (*var*) src1: Rect; const (*var*) src2: Rect; var dstRect: Rect); external name '_UnionRect';
+
+{
+ * [Mac]EqualRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function EqualRect(const (*var*) rect1: Rect; const (*var*) rect2: Rect): boolean; external name '_EqualRect';
+
+{
+ * EmptyRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function EmptyRect(const (*var*) r: Rect): boolean; external name '_EmptyRect';
+
+{
+ * [Mac]FrameRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FrameRect(const (*var*) r: Rect); external name '_FrameRect';
+
+{
+ * PaintRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure PaintRect(const (*var*) r: Rect); external name '_PaintRect';
+
+{
+ * EraseRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure EraseRect(const (*var*) r: Rect); external name '_EraseRect';
+
+{
+ * [Mac]InvertRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvertRect(const (*var*) r: Rect); external name '_InvertRect';
+
+{
+ * [Mac]FillRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FillRect(const (*var*) r: Rect; const (*var*) pat: Pattern); external name '_FillRect';
+
+{
+ * FrameOval() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FrameOval(const (*var*) r: Rect); external name '_FrameOval';
+
+{
+ * PaintOval() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure PaintOval(const (*var*) r: Rect); external name '_PaintOval';
+
+{
+ * EraseOval() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure EraseOval(const (*var*) r: Rect); external name '_EraseOval';
+
+{
+ * InvertOval() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvertOval(const (*var*) r: Rect); external name '_InvertOval';
+
+{
+ * FillOval() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FillOval(const (*var*) r: Rect; const (*var*) pat: Pattern); external name '_FillOval';
+
+{
+ * FrameRoundRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FrameRoundRect(const (*var*) r: Rect; ovalWidth: SInt16; ovalHeight: SInt16); external name '_FrameRoundRect';
+
+{
+ * PaintRoundRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure PaintRoundRect(const (*var*) r: Rect; ovalWidth: SInt16; ovalHeight: SInt16); external name '_PaintRoundRect';
+
+{
+ * EraseRoundRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure EraseRoundRect(const (*var*) r: Rect; ovalWidth: SInt16; ovalHeight: SInt16); external name '_EraseRoundRect';
+
+{
+ * InvertRoundRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvertRoundRect(const (*var*) r: Rect; ovalWidth: SInt16; ovalHeight: SInt16); external name '_InvertRoundRect';
+
+{
+ * FillRoundRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FillRoundRect(const (*var*) r: Rect; ovalWidth: SInt16; ovalHeight: SInt16; const (*var*) pat: Pattern); external name '_FillRoundRect';
+
+{
+ * FrameArc() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FrameArc(const (*var*) r: Rect; startAngle: SInt16; arcAngle: SInt16); external name '_FrameArc';
+
+{
+ * PaintArc() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure PaintArc(const (*var*) r: Rect; startAngle: SInt16; arcAngle: SInt16); external name '_PaintArc';
+
+{
+ * EraseArc() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure EraseArc(const (*var*) r: Rect; startAngle: SInt16; arcAngle: SInt16); external name '_EraseArc';
+
+{
+ * InvertArc() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvertArc(const (*var*) r: Rect; startAngle: SInt16; arcAngle: SInt16); external name '_InvertArc';
+
+{
+ * FillArc() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FillArc(const (*var*) r: Rect; startAngle: SInt16; arcAngle: SInt16; const (*var*) pat: Pattern); external name '_FillArc';
+
+{
+ * NewRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewRgn: RgnHandle; external name '_NewRgn';
+
+{
+ * OpenRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure OpenRgn; external name '_OpenRgn';
+
+{
+ * CloseRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure CloseRgn(dstRgn: RgnHandle); external name '_CloseRgn';
+
+{
+ * BitMapToRegion() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function BitMapToRegion(region: RgnHandle; const (*var*) bMap: BitMap): OSErr; external name '_BitMapToRegion';
+
+{
+ * RgnToHandle()
+ *
+ * Summary:
+ * Allows to "flatten" the opaque region data, for persistent
+ * storage. HandleToRgn is the reciprocal call.
+ *
+ * Discussion:
+ * These calls were introduced to facilitate Carbonization of
+ * applications, that relied on the undocumented format of region
+ * data. Since the internal (opaque) region format changed in 10.3,
+ * the purpose of these functions became questionable at best. They
+ * should be considered deprecated. Applications that need to
+ * preserve region data within their documents should convert the
+ * regions to a sequence of rectangles, using QDRegionToRects. The
+ * original region can then be rebuilt using RectRgn() and
+ * UnionRgn() calls.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * region:
+ * The input RgnHandle
+ *
+ * flattenedRgnDataHdl:
+ * A valid Handle that gets resized and filled with the region
+ * data.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER;
+procedure RgnToHandle(region: RgnHandle; flattenedRgnDataHdl: Handle); external name '_RgnToHandle';
+
+{
+ * HandleToRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure HandleToRgn(oldRegion: Handle; region: RgnHandle); external name '_HandleToRgn';
+
+{
+ * DisposeRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeRgn(rgn: RgnHandle); external name '_DisposeRgn';
+
+{
+ * [Mac]CopyRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure CopyRgn(srcRgn: RgnHandle; dstRgn: RgnHandle); external name '_CopyRgn';
+
+{
+ * SetEmptyRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetEmptyRgn(rgn: RgnHandle); external name '_SetEmptyRgn';
+
+{
+ * [Mac]SetRectRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetRectRgn(rgn: RgnHandle; left: SInt16; top: SInt16; right: SInt16; bottom: SInt16); external name '_SetRectRgn';
+
+{
+ * RectRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure RectRgn(rgn: RgnHandle; const (*var*) r: Rect); external name '_RectRgn';
+
+{
+ * [Mac]OffsetRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure OffsetRgn(rgn: RgnHandle; dh: SInt16; dv: SInt16); external name '_OffsetRgn';
+
+{
+ * InsetRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InsetRgn(rgn: RgnHandle; dh: SInt16; dv: SInt16); external name '_InsetRgn';
+
+{
+ * SectRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SectRgn(srcRgnA: RgnHandle; srcRgnB: RgnHandle; dstRgn: RgnHandle); external name '_SectRgn';
+
+{
+ * [Mac]UnionRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure UnionRgn(srcRgnA: RgnHandle; srcRgnB: RgnHandle; dstRgn: RgnHandle); external name '_UnionRgn';
+
+{
+ * DiffRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DiffRgn(srcRgnA: RgnHandle; srcRgnB: RgnHandle; dstRgn: RgnHandle); external name '_DiffRgn';
+
+{
+ * [Mac]XorRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure XorRgn(srcRgnA: RgnHandle; srcRgnB: RgnHandle; dstRgn: RgnHandle); external name '_XorRgn';
+
+{
+ * RectInRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function RectInRgn(const (*var*) r: Rect; rgn: RgnHandle): boolean; external name '_RectInRgn';
+
+{
+ * [Mac]EqualRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function EqualRgn(rgnA: RgnHandle; rgnB: RgnHandle): boolean; external name '_EqualRgn';
+
+{
+ * EmptyRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function EmptyRgn(rgn: RgnHandle): boolean; external name '_EmptyRgn';
+
+{
+ * [Mac]FrameRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FrameRgn(rgn: RgnHandle); external name '_FrameRgn';
+
+{
+ * [Mac]PaintRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure PaintRgn(rgn: RgnHandle); external name '_PaintRgn';
+
+{
+ * EraseRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure EraseRgn(rgn: RgnHandle); external name '_EraseRgn';
+
+{
+ * [Mac]InvertRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvertRgn(rgn: RgnHandle); external name '_InvertRgn';
+
+{
+ * [Mac]FillRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FillRgn(rgn: RgnHandle; const (*var*) pat: Pattern); external name '_FillRgn';
+
+{
+ * ScrollRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure ScrollRect(const (*var*) r: Rect; dh: SInt16; dv: SInt16; updateRgn: RgnHandle); external name '_ScrollRect';
+
+{
+ * CopyBits() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure CopyBits(const (*var*) srcBits: BitMap; const (*var*) dstBits: BitMap; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect; mode: SInt16; maskRgn: RgnHandle); external name '_CopyBits';
+
+{
+ * SeedFill() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SeedFill(srcPtr: UnivPtr; dstPtr: UnivPtr; srcRow: SInt16; dstRow: SInt16; height: SInt16; words: SInt16; seedH: SInt16; seedV: SInt16); external name '_SeedFill';
+
+{
+ * CalcMask() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure CalcMask(srcPtr: UnivPtr; dstPtr: UnivPtr; srcRow: SInt16; dstRow: SInt16; height: SInt16; words: SInt16); external name '_CalcMask';
+
+{
+ * CopyMask() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure CopyMask(const (*var*) srcBits: BitMap; const (*var*) maskBits: BitMap; const (*var*) dstBits: BitMap; const (*var*) srcRect: Rect; const (*var*) maskRect: Rect; const (*var*) dstRect: Rect); external name '_CopyMask';
+
+{
+ * OpenPicture() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function OpenPicture(const (*var*) picFrame: Rect): PicHandle; external name '_OpenPicture';
+
+{
+ * PicComment() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure PicComment(kind: SInt16; dataSize: SInt16; dataHandle: Handle); external name '_PicComment';
+
+{
+ * ClosePicture() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure ClosePicture; external name '_ClosePicture';
+
+{
+ * QDGetPictureBounds()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
+function QDGetPictureBounds( picH: PicHandle; var outRect: Rect ): RectPtr; external name '_QDGetPictureBounds'; (* attribute ignoreable *)
+
+{
+ * DrawPicture() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DrawPicture(myPicture: PicHandle; const (*var*) dstRect: Rect); external name '_DrawPicture';
+
+{
+ * KillPicture() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure KillPicture(myPicture: PicHandle); external name '_KillPicture';
+
+{
+ * OpenPoly() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function OpenPoly: PolyHandle; external name '_OpenPoly';
+
+{
+ * ClosePoly() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure ClosePoly; external name '_ClosePoly';
+
+{
+ * KillPoly() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure KillPoly(poly: PolyHandle); external name '_KillPoly';
+
+{
+ * OffsetPoly() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure OffsetPoly(poly: PolyHandle; dh: SInt16; dv: SInt16); external name '_OffsetPoly';
+
+{
+ * FramePoly() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FramePoly(poly: PolyHandle); external name '_FramePoly';
+
+{
+ * PaintPoly() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure PaintPoly(poly: PolyHandle); external name '_PaintPoly';
+
+{
+ * ErasePoly() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure ErasePoly(poly: PolyHandle); external name '_ErasePoly';
+
+{
+ * InvertPoly() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvertPoly(poly: PolyHandle); external name '_InvertPoly';
+
+{
+ * FillPoly() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FillPoly(poly: PolyHandle; const (*var*) pat: Pattern); external name '_FillPoly';
+
+{
+ * SetPt() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetPt(var pt: Point; h: SInt16; v: SInt16); external name '_SetPt';
+
+{
+ * LocalToGlobal() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure LocalToGlobal(var pt: Point); external name '_LocalToGlobal';
+
+{
+ * GlobalToLocal() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure GlobalToLocal(var pt: Point); external name '_GlobalToLocal';
+
+{
+ * Random() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function Random: SInt16; external name '_Random';
+
+{
+ * StuffHex() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure StuffHex(thingPtr: UnivPtr; const (*var*) s: Str255); external name '_StuffHex';
+
+{
+ * [Mac]GetPixel() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetPixel(h: SInt16; v: SInt16): boolean; external name '_GetPixel';
+
+{
+ * ScalePt() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure ScalePt(var pt: Point; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect); external name '_ScalePt';
+
+{
+ * MapPt() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure MapPt(var pt: Point; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect); external name '_MapPt';
+
+{
+ * MapRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure MapRect(var r: Rect; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect); external name '_MapRect';
+
+{
+ * MapRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure MapRgn(rgn: RgnHandle; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect); external name '_MapRgn';
+
+{
+ * MapPoly() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure MapPoly(poly: PolyHandle; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect); external name '_MapPoly';
+
+{
+ * SetStdProcs() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetStdProcs(var procs: QDProcs); external name '_SetStdProcs';
+
+{
+ * StdRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure StdRect(verb: GrafVerb; const (*var*) r: Rect); external name '_StdRect';
+
+{
+ * StdRRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure StdRRect(verb: GrafVerb; const (*var*) r: Rect; ovalWidth: SInt16; ovalHeight: SInt16); external name '_StdRRect';
+
+{
+ * StdOval() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure StdOval(verb: GrafVerb; const (*var*) r: Rect); external name '_StdOval';
+
+{
+ * StdArc() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure StdArc(verb: GrafVerb; const (*var*) r: Rect; startAngle: SInt16; arcAngle: SInt16); external name '_StdArc';
+
+{
+ * StdPoly() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure StdPoly(verb: GrafVerb; poly: PolyHandle); external name '_StdPoly';
+
+{
+ * StdRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure StdRgn(verb: GrafVerb; rgn: RgnHandle); external name '_StdRgn';
+
+{
+ * StdBits() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure StdBits(const (*var*) srcBits: BitMap; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect; mode: SInt16; maskRgn: RgnHandle); external name '_StdBits';
+
+{
+ * StdComment() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure StdComment(kind: SInt16; dataSize: SInt16; dataHandle: Handle); external name '_StdComment';
+
+{
+ * StdGetPic() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure StdGetPic(dataPtr: UnivPtr; byteCount: SInt16); external name '_StdGetPic';
+
+{
+ * StdPutPic() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure StdPutPic(dataPtr: UnivPtr; byteCount: SInt16); external name '_StdPutPic';
+
+{
+ * StdOpcode() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure StdOpcode(const (*var*) fromRect: Rect; const (*var*) toRect: Rect; opcode: UInt16; version: SInt16); external name '_StdOpcode';
+
+{
+ * AddPt() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure AddPt(src: Point; var dst: Point); external name '_AddPt';
+
+{
+ * EqualPt() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function EqualPt(pt1: Point; pt2: Point): boolean; external name '_EqualPt';
+
+{
+ * [Mac]PtInRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function PtInRect(pt: Point; const (*var*) r: Rect): boolean; external name '_PtInRect';
+
+{
+ * Pt2Rect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure Pt2Rect(pt1: Point; pt2: Point; var dstRect: Rect); external name '_Pt2Rect';
+
+{
+ * PtToAngle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure PtToAngle(const (*var*) r: Rect; pt: Point; var angle: SInt16); external name '_PtToAngle';
+
+{
+ * SubPt() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SubPt(src: Point; var dst: Point); external name '_SubPt';
+
+{
+ * PtInRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function PtInRgn(pt: Point; rgn: RgnHandle): boolean; external name '_PtInRgn';
+
+{
+ * StdLine() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure StdLine(newPt: Point); external name '_StdLine';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * OpenCPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure OpenCPort(port: CGrafPtr); external name '_OpenCPort';
+{
+ * InitCPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure InitCPort(port: CGrafPtr); external name '_InitCPort';
+{
+ * CloseCPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure CloseCPort(port: CGrafPtr); external name '_CloseCPort';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * NewPixMap() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewPixMap: PixMapHandle; external name '_NewPixMap';
+
+{
+ * DisposePixMap() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposePixMap(pm: PixMapHandle); external name '_DisposePixMap';
+
+{
+ * CopyPixMap() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure CopyPixMap(srcPM: PixMapHandle; dstPM: PixMapHandle); external name '_CopyPixMap';
+
+{
+ * NewPixPat() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewPixPat: PixPatHandle; external name '_NewPixPat';
+
+{
+ * DisposePixPat() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposePixPat(pp: PixPatHandle); external name '_DisposePixPat';
+
+{
+ * CopyPixPat() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure CopyPixPat(srcPP: PixPatHandle; dstPP: PixPatHandle); external name '_CopyPixPat';
+
+{
+ * PenPixPat() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure PenPixPat(pp: PixPatHandle); external name '_PenPixPat';
+
+{
+ * BackPixPat() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure BackPixPat(pp: PixPatHandle); external name '_BackPixPat';
+
+{
+ * GetPixPat() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetPixPat(patID: SInt16): PixPatHandle; external name '_GetPixPat';
+
+{
+ * MakeRGBPat() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure MakeRGBPat(pp: PixPatHandle; const (*var*) myColor: RGBColor); external name '_MakeRGBPat';
+
+{
+ * FillCRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FillCRect(const (*var*) r: Rect; pp: PixPatHandle); external name '_FillCRect';
+
+{
+ * FillCOval() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FillCOval(const (*var*) r: Rect; pp: PixPatHandle); external name '_FillCOval';
+
+{
+ * FillCRoundRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FillCRoundRect(const (*var*) r: Rect; ovalWidth: SInt16; ovalHeight: SInt16; pp: PixPatHandle); external name '_FillCRoundRect';
+
+{
+ * FillCArc() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FillCArc(const (*var*) r: Rect; startAngle: SInt16; arcAngle: SInt16; pp: PixPatHandle); external name '_FillCArc';
+
+{
+ * FillCRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FillCRgn(rgn: RgnHandle; pp: PixPatHandle); external name '_FillCRgn';
+
+{
+ * FillCPoly() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure FillCPoly(poly: PolyHandle; pp: PixPatHandle); external name '_FillCPoly';
+
+{
+ * RGBForeColor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure RGBForeColor(const (*var*) color: RGBColor); external name '_RGBForeColor';
+
+{
+ * RGBBackColor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure RGBBackColor(const (*var*) color: RGBColor); external name '_RGBBackColor';
+
+{
+ * SetCPixel() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetCPixel(h: SInt16; v: SInt16; const (*var*) cPix: RGBColor); external name '_SetCPixel';
+
+{
+ * SetPortPix() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetPortPix(pm: PixMapHandle); external name '_SetPortPix';
+
+{
+ * GetCPixel() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure GetCPixel(h: SInt16; v: SInt16; var cPix: RGBColor); external name '_GetCPixel';
+
+{
+ * GetForeColor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure GetForeColor(var color: RGBColor); external name '_GetForeColor';
+
+{
+ * GetBackColor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure GetBackColor(var color: RGBColor); external name '_GetBackColor';
+
+{
+ * SeedCFill() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SeedCFill(const (*var*) srcBits: BitMap; const (*var*) dstBits: BitMap; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect; seedH: SInt16; seedV: SInt16; matchProc: ColorSearchUPP; matchData: SInt32); external name '_SeedCFill';
+
+{
+ * CalcCMask() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure CalcCMask(const (*var*) srcBits: BitMap; const (*var*) dstBits: BitMap; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect; const (*var*) seedRGB: RGBColor; matchProc: ColorSearchUPP; matchData: SInt32); external name '_CalcCMask';
+
+{
+ * OpenCPicture() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function OpenCPicture(const (*var*) newHeader: OpenCPicParams): PicHandle; external name '_OpenCPicture';
+
+{
+ * OpColor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure OpColor(const (*var*) color: RGBColor); external name '_OpColor';
+
+{
+ * HiliteColor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure HiliteColor(const (*var*) color: RGBColor); external name '_HiliteColor';
+
+{
+ * DisposeCTable() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeCTable(cTable: CTabHandle); external name '_DisposeCTable';
+
+{
+ * GetCTable() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetCTable(ctID: SInt16): CTabHandle; external name '_GetCTable';
+
+{
+ * GetCCursor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetCCursor(crsrID: SInt16): CCrsrHandle; external name '_GetCCursor';
+
+{
+ * SetCCursor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetCCursor(cCrsr: CCrsrHandle); external name '_SetCCursor';
+
+{
+ * AllocCursor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure AllocCursor; external name '_AllocCursor';
+
+{
+ * DisposeCCursor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeCCursor(cCrsr: CCrsrHandle); external name '_DisposeCCursor';
+
+{ GetCIcon(), PlotCIcon(), and DisposeCIcon() moved to Icons.h }
+
+{
+ * SetStdCProcs() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetStdCProcs(var procs: CQDProcs); external name '_SetStdCProcs';
+
+{
+ * GetMaxDevice() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetMaxDevice(const (*var*) globalRect: Rect): GDHandle; external name '_GetMaxDevice';
+
+{
+ * GetCTSeed() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetCTSeed: SInt32; external name '_GetCTSeed';
+
+{
+ * GetDeviceList() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetDeviceList: GDHandle; external name '_GetDeviceList';
+
+{
+ * GetMainDevice() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetMainDevice: GDHandle; external name '_GetMainDevice';
+
+{
+ * GetNextDevice() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetNextDevice(curDevice: GDHandle): GDHandle; external name '_GetNextDevice';
+
+{
+ * TestDeviceAttribute() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function TestDeviceAttribute(gdh: GDHandle; attribute: SInt16): boolean; external name '_TestDeviceAttribute';
+
+{
+ * SetDeviceAttribute() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetDeviceAttribute(gdh: GDHandle; attribute: SInt16; value: boolean); external name '_SetDeviceAttribute';
+
+{
+ * InitGDevice() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InitGDevice(qdRefNum: SInt16; mode: SInt32; gdh: GDHandle); external name '_InitGDevice';
+
+{
+ * NewGDevice() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function NewGDevice(refNum: SInt16; mode: SInt32): GDHandle; external name '_NewGDevice';
+
+{
+ * DisposeGDevice() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DisposeGDevice(gdh: GDHandle); external name '_DisposeGDevice';
+
+{
+ * SetGDevice() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetGDevice(gd: GDHandle); external name '_SetGDevice';
+
+{
+ * GetGDevice() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetGDevice: GDHandle; external name '_GetGDevice';
+
+{
+ * Color2Index() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function Color2Index(const (*var*) myColor: RGBColor): SInt32; external name '_Color2Index';
+
+{
+ * Index2Color() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure Index2Color(index: SInt32; var aColor: RGBColor); external name '_Index2Color';
+
+{
+ * InvertColor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure InvertColor(var myColor: RGBColor); external name '_InvertColor';
+
+{
+ * RealColor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function RealColor(const (*var*) color: RGBColor): boolean; external name '_RealColor';
+
+{
+ * GetSubTable() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure GetSubTable(myColors: CTabHandle; iTabRes: SInt16; targetTbl: CTabHandle); external name '_GetSubTable';
+
+{
+ * MakeITable() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure MakeITable(cTabH: CTabHandle; iTabH: ITabHandle; res: SInt16); external name '_MakeITable';
+
+{
+ * AddSearch() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure AddSearch(searchProc: ColorSearchUPP); external name '_AddSearch';
+
+{
+ * AddComp() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure AddComp(compProc: ColorComplementUPP); external name '_AddComp';
+
+{
+ * DelSearch() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DelSearch(searchProc: ColorSearchUPP); external name '_DelSearch';
+
+{
+ * DelComp() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DelComp(compProc: ColorComplementUPP); external name '_DelComp';
+
+{
+ * SetClientID() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetClientID(id: SInt16); external name '_SetClientID';
+
+{
+ * ProtectEntry() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure ProtectEntry(index: SInt16; protect: boolean); external name '_ProtectEntry';
+
+{
+ * ReserveEntry() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure ReserveEntry(index: SInt16; reserve: boolean); external name '_ReserveEntry';
+
+{
+ * SetEntries() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SetEntries(start: SInt16; count: SInt16; var aTable: CSpecArray); external name '_SetEntries';
+
+{
+ * SaveEntries() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure SaveEntries(srcTable: CTabHandle; resultTable: CTabHandle; var selection: ReqListRec); external name '_SaveEntries';
+
+{
+ * RestoreEntries() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure RestoreEntries(srcTable: CTabHandle; dstTable: CTabHandle; var selection: ReqListRec); external name '_RestoreEntries';
+
+{
+ * QDError() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function QDError: SInt16; external name '_QDError';
+
+{
+ * CopyDeepMask() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure CopyDeepMask(const (*var*) srcBits: BitMap; const (*var*) maskBits: BitMap; const (*var*) dstBits: BitMap; const (*var*) srcRect: Rect; const (*var*) maskRect: Rect; const (*var*) dstRect: Rect; mode: SInt16; maskRgn: RgnHandle); external name '_CopyDeepMask';
+
+{
+ * DeviceLoop() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure DeviceLoop(drawingRgn: RgnHandle; drawingProc: DeviceLoopDrawingUPP; userData: SInt32; flags: DeviceLoopFlags); external name '_DeviceLoop';
+
+{
+ * GetMaskTable() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetMaskTable: Ptr; external name '_GetMaskTable';
+
+{
+ * GetPattern() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetPattern(patternID: SInt16): PatHandle; external name '_GetPattern';
+
+{
+ * [Mac]GetCursor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetCursor(cursorID: SInt16): CursHandle; external name '_GetCursor';
+
+{
+ * GetPicture() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetPicture(pictureID: SInt16): PicHandle; external name '_GetPicture';
+
+{
+ * DeltaPoint() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function DeltaPoint(ptA: Point; ptB: Point): SInt32; external name '_DeltaPoint';
+
+{
+ * ShieldCursor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure ShieldCursor(const (*var*) shieldRect: Rect; offsetPt: Point); external name '_ShieldCursor';
+
+{
+ * ScreenRes() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure ScreenRes(var scrnHRes: SInt16; var scrnVRes: SInt16); external name '_ScreenRes';
+
+{
+ * GetIndPattern() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure GetIndPattern(var thePat: Pattern; patternListID: SInt16; index: SInt16); external name '_GetIndPattern';
+
+{$ifc OLDROUTINENAMES}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * DisposPixMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposPixMap(pm: PixMapHandle); external name '_DisposPixMap';
+{
+ * DisposPixPat()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposPixPat(pp: PixPatHandle); external name '_DisposPixPat';
+{
+ * DisposCTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposCTable(cTable: CTabHandle); external name '_DisposCTable';
+{
+ * DisposCCursor()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposCCursor(cCrsr: CCrsrHandle); external name '_DisposCCursor';
+{
+ * DisposGDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposGDevice(gdh: GDHandle); external name '_DisposGDevice';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {OLDROUTINENAMES}
+
+{
+ From ToolUtils.i
+}
+{
+ * PackBits() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure PackBits(var srcPtr: Ptr; var dstPtr: Ptr; srcBytes: SInt16); external name '_PackBits';
+
+{
+ * UnpackBits() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+procedure UnpackBits(var srcPtr: Ptr; var dstPtr: Ptr; dstBytes: SInt16); external name '_UnpackBits';
+
+{
+ * SlopeFromAngle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function SlopeFromAngle(angle: SInt16): Fixed; external name '_SlopeFromAngle';
+
+{
+ * AngleFromSlope() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function AngleFromSlope(slope: Fixed): SInt16; external name '_AngleFromSlope';
+
+{ New transfer modes }
+
+const
+ colorXorXFer = 52;
+ noiseXFer = 53;
+ customXFer = 54;
+
+ { Custom XFer flags }
+ kXFer1PixelAtATime = $00000001; { 1 pixel passed to custom XFer proc }
+ kXFerConvertPixelToRGB32 = $00000002; { All color depths converted to 32 bit RGB }
+
+
+type
+ CustomXFerRecPtr = ^CustomXFerRec;
+ CustomXFerRec = record
+ version: UInt32;
+ srcPixels: Ptr;
+ destPixels: Ptr;
+ resultPixels: Ptr;
+ refCon: UInt32;
+ pixelSize: UInt32;
+ pixelCount: UInt32;
+ firstPixelHV: Point;
+ destBounds: Rect;
+ end;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ CustomXFerProcPtr = procedure(info: CustomXFerRecPtr);
+{$elsec}
+ CustomXFerProcPtr = ProcPtr;
+{$endc}
+
+{
+ * GetPortCustomXFerProc() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetPortCustomXFerProc(port: CGrafPtr; var proc: CustomXFerProcPtr; var flags: UInt32; var refCon: UInt32): OSErr; external name '_GetPortCustomXFerProc';
+
+{
+ * SetPortCustomXFerProc() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function SetPortCustomXFerProc(port: CGrafPtr; proc: CustomXFerProcPtr; flags: UInt32; refCon: UInt32): OSErr; external name '_SetPortCustomXFerProc';
+
+const
+ kCursorComponentsVersion = $00010001;
+
+ kCursorComponentType = $63757273 (* 'curs' *);
+
+ { Cursor Component capabilities flags }
+ cursorDoesAnimate = $00000001;
+ cursorDoesHardware = $00000002;
+ cursorDoesUnreadableScreenBits = $00000004;
+
+ { Cursor Component output mode flags }
+ kRenderCursorInHardware = $00000001;
+ kRenderCursorInSoftware = $00000002;
+
+ { Cursor Component Info }
+
+type
+ CursorInfoPtr = ^CursorInfo;
+ CursorInfo = record
+ version: SInt32; { use kCursorComponentsVersion }
+ capabilities: SInt32;
+ animateDuration: SInt32; { approximate time between animate tickles }
+ bounds: Rect;
+ hotspot: Point;
+ reserved: SInt32; { must set to zero }
+ end;
+
+ { Cursor Component Selectors }
+
+const
+ kCursorComponentInit = $0001;
+ kCursorComponentGetInfo = $0002;
+ kCursorComponentSetOutputMode = $0003;
+ kCursorComponentSetData = $0004;
+ kCursorComponentReconfigure = $0005;
+ kCursorComponentDraw = $0006;
+ kCursorComponentErase = $0007;
+ kCursorComponentMove = $0008;
+ kCursorComponentAnimate = $0009;
+ kCursorComponentLastReserved = $0050;
+
+{
+ * OpenCursorComponent() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function OpenCursorComponent(c: Component; var ci: ComponentInstance): OSErr; external name '_OpenCursorComponent';
+
+{
+ * CloseCursorComponent() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function CloseCursorComponent(ci: ComponentInstance): OSErr; external name '_CloseCursorComponent';
+
+{
+ * SetCursorComponent() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function SetCursorComponent(ci: ComponentInstance): OSErr; external name '_SetCursorComponent';
+
+{
+ * CursorComponentChanged() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function CursorComponentChanged(ci: ComponentInstance): OSErr; external name '_CursorComponentChanged';
+
+{
+ * CursorComponentSetData() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function CursorComponentSetData(ci: ComponentInstance; data: SInt32): OSErr; external name '_CursorComponentSetData';
+
+{ Quickdraw-specific ColorSync matching }
+{ Mac OS X active declarations location. CMApplication.p[.pas] text copy not compiled for Mac OS X. }
+
+{
+ * CWMatchPixMap() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: not available [in CarbonLib 1.0 and later]
+ * Non-Carbon CFM: not available [in ColorSyncLib 1.0 and later]
+ }
+function CWMatchPixMap( cw: CMWorldRef; var myPixMap: PixMap; progressProc: CMBitmapCallBackUPP { can be NULL }; refCon: UnivPtr ): CMError; external name '_CWMatchPixMap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * CWCheckPixMap() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: not available [in CarbonLib 1.0 and later]
+ * Non-Carbon CFM: not available [in ColorSyncLib 1.0 and later]
+ }
+function CWCheckPixMap( cw: CMWorldRef; var myPixMap: PixMap; progressProc: CMBitmapCallBackUPP { can be NULL }; refCon: UnivPtr; var resultBitMap: BitMap ): CMError; external name '_CWCheckPixMap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NCMBeginMatching() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: not available [in CarbonLib 1.0 and later]
+ * Non-Carbon CFM: not available [in ColorSyncLib 2.0 and later]
+ }
+function NCMBeginMatching( src: CMProfileRef; dst: CMProfileRef; var myRef: CMMatchRef ): CMError; external name '_NCMBeginMatching';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * CMEndMatching() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: not available [in CarbonLib 1.0 and later]
+ * Non-Carbon CFM: not available [in ColorSyncLib 2.0 and later]
+ }
+procedure CMEndMatching( myRef: CMMatchRef ); external name '_CMEndMatching';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NCMDrawMatchedPicture() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: not available [in CarbonLib 1.0 and later]
+ * Non-Carbon CFM: not available [in ColorSyncLib 2.0 and later]
+ }
+procedure NCMDrawMatchedPicture( myPicture: PicHandle; dst: CMProfileRef; var myRect: Rect ); external name '_NCMDrawMatchedPicture';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * CMEnableMatchingComment() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: not available [in CarbonLib 1.0 and later]
+ * Non-Carbon CFM: not available [in ColorSyncLib 2.0 and later]
+ }
+procedure CMEnableMatchingComment( enableIt: Boolean ); external name '_CMEnableMatchingComment';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NCMUseProfileComment() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: not available [in CarbonLib 1.0 and later]
+ * Non-Carbon CFM: not available [in ColorSyncLib 2.0 and later]
+ }
+function NCMUseProfileComment( prof: CMProfileRef; flags: UInt32 ): CMError; external name '_NCMUseProfileComment';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{ Available in CarbonLib... }
+{
+ * IsValidPort() *** DEPRECATED ***
+ *
+ * Summary:
+ * Attempts to detect invalid ports
+ *
+ * Discussion:
+ * A grafPort structure contains many nested Handles. An attempt to
+ * guarantee that they are all valid is prohibitively costly. Since
+ * 10.1, IsValidPort only compares the CGrafPtr parameter against
+ * the list of grafPorts maintained internally by Quickdraw. The
+ * function returns true if it is found, false otherwise. This is
+ * enough to detect ports belonging to windows that have been
+ * closed, or GWorlds that have been deallocated.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * port:
+ * The CGrafPtr in question.
+ *
+ * Result:
+ * If false, port is definitely invalid. If true, port is probably
+ * valid (unless memory has been clobbered)
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function IsValidPort(port: CGrafPtr): boolean; external name '_IsValidPort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * IsValidRgnHandle()
+ *
+ * Summary:
+ * Tests a RgnHandle
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * rgn:
+ * The RgnHandle in question.
+ *
+ * Result:
+ * If false, either the RgnHandle parameter is NULL, or has been
+ * deallocated, or the region data are corrupt. The latter can
+ * happen when memory has been overwritten. If true, the RgnHandle
+ * is valid. NOTE: In 10.3, the internal (opaque) format of region
+ * data has changed, to overcome size and performance limitations.
+ * Do not attempt to access region data by dereferencing the
+ * RgnHandle.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function IsValidRgnHandle( rgn: RgnHandle ): Boolean; external name '_IsValidRgnHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{$ifc ACCESSOR_CALLS_ARE_FUNCTIONS}
+{ GrafPort }
+{ Getters }
+{
+ * GetPortPixMap() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortPixMap(port: CGrafPtr): PixMapHandle; external name '_GetPortPixMap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * GetPortBitMapForCopyBits()
+ *
+ * Discussion:
+ * GetPortBitMapForCopyBits is provided for the specific purpose of
+ * using the return value as a parameter to CopyBits. The return
+ * value can be used as the srcBits or dstBits parameter to CopyBits
+ * regardless of whether the port is color. If the port parameter is
+ * a color port, however, the returned BitMapPtr does not actually
+ * point to a BitMap; it points to the PixMapHandle and other fields
+ * in the CGrafPort structure. You should not dereference the
+ * BitMapPtr or otherwise depend on its contents unless you've
+ * confirmed that this port is a non-color port.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
+ }
+function GetPortBitMapForCopyBits(port: CGrafPtr): BitMapPtr; external name '_GetPortBitMapForCopyBits';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortBounds()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortBounds(port: CGrafPtr; var rect_: Rect): RectPtr; external name '_GetPortBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortForeColor()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortForeColor(port: CGrafPtr; var foreColor: RGBColor): RGBColorPtr; external name '_GetPortForeColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortBackColor()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortBackColor(port: CGrafPtr; var backColor: RGBColor): RGBColorPtr; external name '_GetPortBackColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortOpColor()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortOpColor(port: CGrafPtr; var opColor: RGBColor): RGBColorPtr; external name '_GetPortOpColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortHiliteColor()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortHiliteColor(port: CGrafPtr; var hiliteColor: RGBColor): RGBColorPtr; external name '_GetPortHiliteColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortGrafProcs()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortGrafProcs(port: CGrafPtr): CQDProcsPtr; external name '_GetPortGrafProcs';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortTextFont()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortTextFont(port: CGrafPtr): SInt16; external name '_GetPortTextFont';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortTextFace()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortTextFace(port: CGrafPtr): ByteParameter; external name '_GetPortTextFace';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortTextMode()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortTextMode(port: CGrafPtr): SInt16; external name '_GetPortTextMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortTextSize()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortTextSize(port: CGrafPtr): SInt16; external name '_GetPortTextSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortChExtra()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortChExtra(port: CGrafPtr): SInt16; external name '_GetPortChExtra';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortFracHPenLocation()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortFracHPenLocation(port: CGrafPtr): SInt16; external name '_GetPortFracHPenLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortSpExtra()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortSpExtra(port: CGrafPtr): Fixed; external name '_GetPortSpExtra';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortPenVisibility()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortPenVisibility(port: CGrafPtr): SInt16; external name '_GetPortPenVisibility';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortVisibleRegion()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortVisibleRegion(port: CGrafPtr; visRgn: RgnHandle): RgnHandle; external name '_GetPortVisibleRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortClipRegion()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortClipRegion(port: CGrafPtr; clipRgn: RgnHandle): RgnHandle; external name '_GetPortClipRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortBackPixPat()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortBackPixPat(port: CGrafPtr; backPattern: PixPatHandle): PixPatHandle; external name '_GetPortBackPixPat';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortPenPixPat()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortPenPixPat(port: CGrafPtr; penPattern: PixPatHandle): PixPatHandle; external name '_GetPortPenPixPat';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortFillPixPat()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortFillPixPat(port: CGrafPtr; fillPattern: PixPatHandle): PixPatHandle; external name '_GetPortFillPixPat';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortPenSize()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortPenSize(port: CGrafPtr; var penSize: Point): PointPtr; external name '_GetPortPenSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortPenMode()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortPenMode(port: CGrafPtr): SInt32; external name '_GetPortPenMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetPortPenLocation()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPortPenLocation(port: CGrafPtr; var penLocation: Point): PointPtr; external name '_GetPortPenLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * IsPortRegionBeingDefined()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function IsPortRegionBeingDefined(port: CGrafPtr): boolean; external name '_IsPortRegionBeingDefined';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * IsPortPictureBeingDefined()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function IsPortPictureBeingDefined(port: CGrafPtr): boolean; external name '_IsPortPictureBeingDefined';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * IsPortPolyBeingDefined()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.3 and later
+ }
+function IsPortPolyBeingDefined(port: CGrafPtr): boolean; external name '_IsPortPolyBeingDefined';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * IsPortOffscreen()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function IsPortOffscreen(port: CGrafPtr): boolean; external name '_IsPortOffscreen';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * IsPortColor()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.0
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
+ }
+function IsPortColor(port: CGrafPtr): boolean; external name '_IsPortColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * IsPortVisibleRegionEmpty()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.1
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function IsPortVisibleRegionEmpty(port: CGrafPtr): boolean; external name '_IsPortVisibleRegionEmpty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * IsPortClipRegionEmpty()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.1
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function IsPortClipRegionEmpty(port: CGrafPtr): boolean; external name '_IsPortClipRegionEmpty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * SectRegionWithPortClipRegion()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+procedure SectRegionWithPortClipRegion(port: CGrafPtr; ioRegion: RgnHandle); external name '_SectRegionWithPortClipRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * SectRegionWithPortVisibleRegion()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+procedure SectRegionWithPortVisibleRegion(port: CGrafPtr; ioRegion: RgnHandle); external name '_SectRegionWithPortVisibleRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{ Swappers }
+{
+ * SwapPortPicSaveHandle()
+ *
+ * Summary:
+ * Sets the port's picSave Handle, and returns the previous picSave
+ *
+ * Discussion:
+ * Historically, the picSave field in a GrafPort is != NULL if a
+ * Picture is being defined; and it has been documented that picture
+ * definition can be temporarily suspended by saving the current
+ * picSave Handle and setting picSave to NULL. Restoring the saved
+ * picSave Handle resumes picture definition.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * port:
+ * The port whose picSave field is being swapped.
+ *
+ * inPicSaveHdl:
+ * The picSave Handle to be set.
+ *
+ * Result:
+ * The previous picSave Handle in the port.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function SwapPortPicSaveHandle(port: CGrafPtr; inPicSaveHdl: Handle): Handle; external name '_SwapPortPicSaveHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{ Similarly: }
+{
+ * SwapPortPolySaveHandle()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Non-Carbon CFM: not available
+ }
+function SwapPortPolySaveHandle(port: CGrafPtr; inPolySaveHdl: Handle): Handle; external name '_SwapPortPolySaveHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{
+ * SwapPortRegionSaveHandle()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Non-Carbon CFM: not available
+ }
+function SwapPortRegionSaveHandle(port: CGrafPtr; inRegionSaveHdl: Handle): Handle; external name '_SwapPortRegionSaveHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{ Setters }
+{
+ * SetPortBounds() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetPortBounds(port: CGrafPtr; const (*var*) rect_: Rect); external name '_SetPortBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * SetPortOpColor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetPortOpColor(port: CGrafPtr; const (*var*) opColor: RGBColor); external name '_SetPortOpColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * SetPortGrafProcs() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetPortGrafProcs(port: CGrafPtr; procs: CQDProcsPtr); external name '_SetPortGrafProcs';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * SetPortTextFont()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+procedure SetPortTextFont(port: CGrafPtr; txFont: SInt16); external name '_SetPortTextFont';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * SetPortTextSize()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+procedure SetPortTextSize(port: CGrafPtr; txSize: SInt16); external name '_SetPortTextSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * SetPortTextFace()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+procedure SetPortTextFace(port: CGrafPtr; face: StyleParameter); external name '_SetPortTextFace';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * SetPortTextMode()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+procedure SetPortTextMode(port: CGrafPtr; mode: SInt16); external name '_SetPortTextMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * SetPortVisibleRegion() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetPortVisibleRegion(port: CGrafPtr; visRgn: RgnHandle); external name '_SetPortVisibleRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * SetPortClipRegion() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetPortClipRegion(port: CGrafPtr; clipRgn: RgnHandle); external name '_SetPortClipRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * SetPortPenPixPat() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetPortPenPixPat(port: CGrafPtr; penPattern: PixPatHandle); external name '_SetPortPenPixPat';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * SetPortFillPixPat() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.2 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.2 and later
+ }
+procedure SetPortFillPixPat(port: CGrafPtr; penPattern: PixPatHandle); external name '_SetPortFillPixPat';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * SetPortBackPixPat() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetPortBackPixPat(port: CGrafPtr; backPattern: PixPatHandle); external name '_SetPortBackPixPat';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * SetPortPenSize() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetPortPenSize(port: CGrafPtr; penSize: Point); external name '_SetPortPenSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * SetPortPenMode() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetPortPenMode(port: CGrafPtr; penMode: SInt32); external name '_SetPortPenMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * SetPortFracHPenLocation() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetPortFracHPenLocation(port: CGrafPtr; pnLocHFrac: SInt16); external name '_SetPortFracHPenLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{ PixMap }
+{
+ * GetPixBounds() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPixBounds(pixMap: PixMapHandle; var bounds: Rect): RectPtr; external name '_GetPixBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * GetPixDepth() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetPixDepth(pixMap: PixMapHandle): SInt16; external name '_GetPixDepth';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{ QDGlobals }
+{ Getters }
+{
+ * GetQDGlobalsRandomSeed() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetQDGlobalsRandomSeed: SInt32; external name '_GetQDGlobalsRandomSeed';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * GetQDGlobalsScreenBits() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetQDGlobalsScreenBits(var screenBits: BitMap): BitMapPtr; external name '_GetQDGlobalsScreenBits';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * GetQDGlobalsArrow() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetQDGlobalsArrow(var arrow: Cursor): CursorPtr; external name '_GetQDGlobalsArrow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * GetQDGlobalsDarkGray() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetQDGlobalsDarkGray(var dkGray: Pattern): PatternPtr; external name '_GetQDGlobalsDarkGray';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * GetQDGlobalsLightGray() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetQDGlobalsLightGray(var ltGray: Pattern): PatternPtr; external name '_GetQDGlobalsLightGray';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * GetQDGlobalsGray() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetQDGlobalsGray(var gray: Pattern): PatternPtr; external name '_GetQDGlobalsGray';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * GetQDGlobalsBlack() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetQDGlobalsBlack(var black: Pattern): PatternPtr; external name '_GetQDGlobalsBlack';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * GetQDGlobalsWhite() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetQDGlobalsWhite(var white: Pattern): PatternPtr; external name '_GetQDGlobalsWhite';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * GetQDGlobalsThePort() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetQDGlobalsThePort: CGrafPtr; external name '_GetQDGlobalsThePort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{ Setters }
+{
+ * SetQDGlobalsRandomSeed() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetQDGlobalsRandomSeed(randomSeed: SInt32); external name '_SetQDGlobalsRandomSeed';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * SetQDGlobalsArrow() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetQDGlobalsArrow(const (*var*) arrow: Cursor); external name '_SetQDGlobalsArrow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{ Regions }
+{
+ * GetRegionBounds() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+//AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
+function GetRegionBounds(region: RgnHandle; var bounds: Rect): RectPtr; external name '_GetRegionBounds'; (* attribute ignoreable *)
+
+{
+ * IsRegionRectangular() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function IsRegionRectangular(region: RgnHandle): boolean; external name '_IsRegionRectangular';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{ Utilities }
+{ To prevent upward dependencies, GetWindowFromPort() is defined in Window Manager interface: }
+{ pascal WindowRef GetWindowFromPort(CGrafPtr port); }
+{ NewPtr/OpenCPort doesn't work with opaque structures }
+{
+ * CreateNewPort() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function CreateNewPort: CGrafPtr; external name '_CreateNewPort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposePort() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure DisposePort(port: CGrafPtr); external name '_DisposePort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * SetQDError() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
+ }
+procedure SetQDError(err: OSErr); external name '_SetQDError';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{$endc} {ACCESSOR_CALLS_ARE_FUNCTIONS}
+
+{ Helpful Carbon-only utilities (finally made public) }
+
+{
+ * QDLocalToGlobalPoint() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function QDLocalToGlobalPoint(port: CGrafPtr; var point_: Point): PointPtr; external name '_QDLocalToGlobalPoint';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * QDGlobalToLocalPoint() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function QDGlobalToLocalPoint(port: CGrafPtr; var point_: Point): PointPtr; external name '_QDGlobalToLocalPoint';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * QDLocalToGlobalRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function QDLocalToGlobalRect(port: CGrafPtr; var bounds: Rect): RectPtr; external name '_QDLocalToGlobalRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * QDGlobalToLocalRect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function QDGlobalToLocalRect(port: CGrafPtr; var bounds: Rect): RectPtr; external name '_QDGlobalToLocalRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * QDLocalToGlobalRegion() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function QDLocalToGlobalRegion(port: CGrafPtr; region: RgnHandle): RgnHandle; external name '_QDLocalToGlobalRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * QDGlobalToLocalRegion() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function QDGlobalToLocalRegion(port: CGrafPtr; region: RgnHandle): RgnHandle; external name '_QDGlobalToLocalRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ Routines available on Mac OS X to flush buffered window ports...
+ These calls do nothing on Mac OS 8/9. QDIsPortBuffered will always return false there.
+}
+
+{
+ * QDIsPortBuffered() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: not available
+ }
+function QDIsPortBuffered(port: CGrafPtr): boolean; external name '_QDIsPortBuffered';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * QDIsPortBufferDirty() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: not available
+ }
+function QDIsPortBufferDirty(port: CGrafPtr): boolean; external name '_QDIsPortBufferDirty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * QDFlushPortBuffer() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: not available
+ }
+procedure QDFlushPortBuffer(port: CGrafPtr; region: RgnHandle); external name '_QDFlushPortBuffer';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * QDGetDirtyRegion() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function QDGetDirtyRegion(port: CGrafPtr; rgn: RgnHandle): OSStatus; external name '_QDGetDirtyRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * QDSetDirtyRegion() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function QDSetDirtyRegion(port: CGrafPtr; rgn: RgnHandle): OSStatus; external name '_QDSetDirtyRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * QDAddRectToDirtyRegion() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function QDAddRectToDirtyRegion(inPort: CGrafPtr; const (*var*) inBounds: Rect): OSStatus; external name '_QDAddRectToDirtyRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * QDAddRegionToDirtyRegion() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function QDAddRegionToDirtyRegion(inPort: CGrafPtr; inRegion: RgnHandle): OSStatus; external name '_QDAddRegionToDirtyRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * CreateCGContextForPort() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateCGContextForPort(inPort: CGrafPtr; var outContext: CGContextRef): OSStatus; external name '_CreateCGContextForPort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * ClipCGContextToRegion() *** DEPRECATED ***
+ *
+ * Summary:
+ * Set a CGContext's clip path to the equivalent of a RgnHandle
+ *
+ * Discussion:
+ * When Quickdraw and CoreGraphics drawing are being mixed, it is
+ * often necessary to convert a QD clipRgn to a clipPath in CG. In
+ * order to produce the expected outcome in ClipCGContextToRegion,
+ * this function needs to reset any CGContext clipPath before
+ * setting it to the converted region, in contrast to the usual
+ * behavior of CGContextClip which takes the intersection with the
+ * previous clip.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * gc:
+ * The CGContext
+ *
+ * portRect:
+ * A bounding box for the region (needed by conversion to
+ * clipPath). Can be the GrafPort bounds, or the region bounds
+ *
+ * region:
+ * The RgnHandle (usually a clipRgn) to be converted to the
+ * CGContextClip.
+ *
+ * Result:
+ * OSStatus noErr, or a memory error is some internal allocation
+ * failed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function ClipCGContextToRegion(gc: CGContextRef; const (*var*) portRect: Rect; region: RgnHandle): OSStatus; external name '_ClipCGContextToRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * SyncCGContextOriginWithPort() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function SyncCGContextOriginWithPort(inContext: CGContextRef; port: CGrafPtr): OSStatus; external name '_SyncCGContextOriginWithPort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * QDBeginCGContext()
+ *
+ * Summary:
+ * Allow CoreGraphics drawing in a CGrafPort
+ *
+ * Discussion:
+ * So far, CreateCGContextForPort() was used to create a CGContext
+ * for CG drawing from a CGrafPort. However, if the current port is
+ * a printing port, the CreateCGContextForPort fails; consequently,
+ * there was no way to mix Quickdraw and CoreGraphics drawing and
+ * still print it. If, instead, the CoreGraphics drawing is
+ * bracketed by QDBeginCGContext/QDEndCGContext calls, the drawing
+ * will also appear in print. There are some restrictions on the
+ * usage of QDBeginCGContext/QDEndCGContext:
+ * - Between QDBeginCGContext and QDEndCGContext, Quickdraw drawing
+ * is disabled; only CoreGraphics drawing is allowed
+ * - QDBeginCGContext/QDEndCGContext calls can not be nested
+ * - QDEndCGContext releases the CGContext returned from
+ * QDBeginCGContext and sets it to NULL.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPort:
+ * The current port
+ *
+ * outContext:
+ * The CGContextRef to be used for CG drawing
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+function QDBeginCGContext(inPort: CGrafPtr; var outContext: CGContextRef): OSStatus; external name '_QDBeginCGContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * QDEndCGContext()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+function QDEndCGContext(inPort: CGrafPtr; var inoutContext: CGContextRef): OSStatus; external name '_QDEndCGContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ The following routines are implemented in CarbonLib, and on Mac OS X in QD proper.
+ They save the pixel data of a region in a packed format for quick save/restore
+ without using a lot of memory to do a large, hollow region, such as the region
+ used when drag hiliting (which is where this is used).
+}
+
+
+type
+ QDRegionBitsRef = ^SInt32; { an opaque 32-bit type }
+ QDRegionBitsRefPtr = ^QDRegionBitsRef; { when a var xx:QDRegionBitsRef parameter can be nil, it is changed to xx: QDRegionBitsRefPtr }
+{
+ * QDSaveRegionBits()
+ *
+ * Summary:
+ * Saves the pixel data of a region in a packed format for quick
+ * restore
+ *
+ * Discussion:
+ * Implemented in CarbonLib, and on Mac OS X in QD proper. Used in
+ * particular for drag hiliting. The packed format doesn't use too
+ * much memory for large hollow regions.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * region:
+ * The RgnHandle corresponding to the pixel data to be saved.
+ *
+ * Result:
+ * The QDRegionBitsRef to be passed later into QDRestoreRegionBits.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function QDSaveRegionBits(region: RgnHandle): QDRegionBitsRef; external name '_QDSaveRegionBits';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * QDRestoreRegionBits()
+ *
+ * Summary:
+ * Restores the pixel data of a region, as returned from
+ * QDSaveRegionBits
+ *
+ * Discussion:
+ * Implemented in CarbonLib, and on Mac OS X in QD proper. Used in
+ * particular for drag hiliting. NOTE: QDRestoreRegionBits also
+ * calls QDDisposeRegionBits on the regionBits passed in - don't
+ * call it again!
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * region:
+ * The RgnHandle corresponding to the regionBits.
+ *
+ * regionBits:
+ * The QDRegionBitsRef returned from a preceding QDSaveRegionBits
+ * call
+ *
+ * Result:
+ * OSStatus noErr, or paramErr if a NULL parameter is passed in
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function QDRestoreRegionBits(region: RgnHandle; regionBits: QDRegionBitsRef): OSStatus; external name '_QDRestoreRegionBits';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * QDDisposeRegionBits()
+ *
+ * Summary:
+ * Disposes of data allocated in QDSaveRegionBits, when the
+ * QDRegionBitsRef needs to be discarded without being passed to
+ * QDRestoreRegionBits.
+ *
+ * Discussion:
+ * Implemented in CarbonLib, and on Mac OS X in QD proper. NOTE: If
+ * the QDRegionBitsRef has been passed to QDRestoreRegionBits, it
+ * has been deallocated already - don't call QDDisposeRegionBits,
+ * then.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * regionBits:
+ * The QDRegionBitsRef returned from a preceding QDSaveRegionBits
+ * call
+ *
+ * Result:
+ * OSStatus noErr, or paramErr if a NULL parameter is passed in
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function QDDisposeRegionBits(regionBits: QDRegionBitsRef): OSStatus; external name '_QDDisposeRegionBits';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ Developers need a way to go from a CGDirectDisplay environment to Quickdraw.
+ The following is equivalent to CreateNewPort(), but instead of taking the
+ portPixMap from the current GDevice, it uses the GDevice corresponding to
+ the CGSDisplayID passed in. If the CGSDisplayID is invalid, the mainDevice
+ is used instead.
+}
+{
+ * CreateNewPortForCGDisplayID() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateNewPortForCGDisplayID(inCGDisplayID: UInt32): CGrafPtr; external name '_CreateNewPortForCGDisplayID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ In Mac OS X, developers should be able to turn the WaitCursor (spinning wheel)
+ on and off. QDDisplayWaitCursor() keeps track of nested calls.
+ Passing FALSE will resume automatic wait cursor operation.
+ Call this function only from an application in the foreground.
+}
+{
+ * QDDisplayWaitCursor() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure QDDisplayWaitCursor(forceWaitCursor: boolean); external name '_QDDisplayWaitCursor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * QDSetPatternOrigin()
+ *
+ * Summary:
+ * Sets the pattern origin for the current port.
+ *
+ * Discussion:
+ * When a QuickDraw drawing operation uses a pattern (either a
+ * black&white pattern or a PixPat), the pattern's image is aligned
+ * with port origin, modified by the pattern origin of the port. For
+ * example, if the background pattern is a 8x8 image, and a
+ * rectangle with coordinates (3, 3, 8, 8) is filled with that
+ * pattern, then only the bottom right 5x5 portion of the pattern
+ * image will be drawn into the rectangle. When drawing a pattern,
+ * QuickDraw always starts with the port origin and then adjusts it
+ * by the pattern origin to determine the actual origin point of
+ * pattern drawing. QDSetPatternOrigin can be used to set the
+ * pattern origin relative to the port origin. It is often used in
+ * conjuction with SetOrigin to maintain the pattern alignment at
+ * (0,0) in a window's content area, regardless of the port origin;
+ * for example, after changing the port's origin to (10,10), an
+ * application might change the port's pattern origin to (-10, -10)
+ * so that patterns are still aligned with the window's content area.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * origin:
+ * The new pattern origin of the port.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: in NQD 8.5 and later
+ }
+procedure QDSetPatternOrigin(origin: Point); external name '_QDSetPatternOrigin';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * QDGetPatternOrigin()
+ *
+ * Summary:
+ * Returns the pattern origin of the current port.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * origin:
+ * On exit, contains the current port's pattern origin.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: in NQD 8.5 and later
+ }
+procedure QDGetPatternOrigin(var origin: Point); external name '_QDGetPatternOrigin';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * QDIsNamedPixMapCursorRegistered()
+ *
+ * Summary:
+ * Returns whether a named cursor has already been registered.
+ *
+ * Discussion:
+ * The CoreGraphics Scalable Cursor Registry provides support for
+ * cursors based on PixMaps for crsrData and crsrMask, with sizes up
+ * to 64x64 pixels. Such cursors need to be registered via
+ * QDRegisterNamedPixMapCursor, and can then be set by
+ * QDSetNamedPixMapCursor.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * name:
+ * (see below at QDRegisterNamedPixMapCursor)
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function QDIsNamedPixMapCursorRegistered( name: ConstCStringPtr ): Boolean; external name '_QDIsNamedPixMapCursorRegistered';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * QDRegisterNamedPixMapCursor()
+ *
+ * Summary:
+ * Register a new cursor by name
+ *
+ * Discussion:
+ * In order to set a PixMapCursor, it needs to be registered first
+ * by name. This only succeeds if the system supports Hardware
+ * Cursors (depending on video circuits). There is also the obvious
+ * companion function QDUnregisterNamedPixMapCursor. NOTE: The
+ * original implementation of QDUnregisterNamedPixMapCursor was
+ * misspelled "QDUnregisterNamedPixMapCursur".
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * crsrData:
+ * A PixMapHandle representing the cursor pixels. If the
+ * pixelDepth is 32, the crsrMask PixMapHandle can be NULL; in
+ * this case, the alpha channel in the ARGB PixMap is used as
+ * mask. If a crsrMask is provided, the alpha channel in crsrData
+ * is ignored. The pixelDepth can be any of 1, 2, 4, 8, 16 or 32.
+ *
+ * crsrMask:
+ * A PixMapHandle representing the mask. It is assumed to be in
+ * 8-bit deep grayScale format, although other depths are accepted
+ * and converted to 8-bit grayScale (using CopyBits). The
+ * (**crsrMask).bounds rectangle needs to match
+ * (**crsrData).bounds. If the crsrData are 32-bit deep, crsrMask
+ * can be NULL, and the alpha bytes in the crsrData ARGB pixels
+ * are used as mask.
+ *
+ * hotSpot:
+ * The usual cursor hotspot, in coordinates relativ to
+ * (**crsrData).bounds.topLeft.
+ *
+ * name:
+ * A naming convention involving the name of your application and
+ * descriptive cursor names or resource IDs is suggested. Cursor
+ * names are 0-terminated C-strings up to a length of 127. $result
+ * OSStatus: noErr = 0 for success, or (constants from
+ * MacErrors.h): kQDNoColorHWCursorSupport,
+ * kQDCursorAlreadyRegistered, paramErr, memFullErr, or a CGError
+ * as returned internally from CoreGraphics.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function QDRegisterNamedPixMapCursor( crsrData: PixMapHandle; crsrMask: PixMapHandle; hotSpot: Point; name: ConstCStringPtr ): OSStatus; external name '_QDRegisterNamedPixMapCursor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * QDUnregisterNamedPixMapCursur()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function QDUnregisterNamedPixMapCursur( name: ConstCStringPtr ): OSStatus; external name '_QDUnregisterNamedPixMapCursur';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * QDUnregisterNamedPixMapCursor()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function QDUnregisterNamedPixMapCursor( name: ConstCStringPtr ): OSStatus; external name '_QDUnregisterNamedPixMapCursor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * QDSetNamedPixMapCursor()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function QDSetNamedPixMapCursor( name: ConstCStringPtr ): OSStatus; external name '_QDSetNamedPixMapCursor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+type
+ QDXSystemCursorID = UInt32;
+const
+ kQDXArrowCursor = 0;
+ kQDXIBeamCursor = 1;
+ kQDXIBeamXORCursor = 2;
+ kQDXAliasCursor = 3;
+ kQDXCopyCursor = 4;
+ kQDXMoveCursor = 5;
+ kQDXNumberOfSystemCursors = 6; { Must be last }
+
+
+{
+ * QDGetCursorNameForSystemCursor()
+ *
+ * Summary:
+ * Return the name of one of the predefined Mac OS X system cursors
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * cursorID:
+ * UInt32 in the range 0 ... kQDXNumberOfSystemCursors - 1 (see
+ * enum above)
+ *
+ * Result:
+ * const char* name, or NULL if 'cursorID' is out of range
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function QDGetCursorNameForSystemCursor( cursorID: QDXSystemCursorID ): ConstCStringPtr; external name '_QDGetCursorNameForSystemCursor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * QDSetCursorScale()
+ *
+ * Summary:
+ * Set a scaling factor for the cursor.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * scale:
+ * Must be at least 0.5, and integer values (1.0, 2.0, 3.0, 4.0)
+ * are recommended. The scaling factor is system-wide (applies to
+ * all apps), and is intended for use in such things as assisting
+ * the visually impaired. The scaling factor is treated as a hint
+ * to the system, and the exact scale applied may be limited by
+ * device driver capabilities and performance considerations.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function QDSetCursorScale( scale: Float32 ): OSStatus; external name '_QDSetCursorScale';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * QDGetCursorScale()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function QDGetCursorScale( outScale: Float32Ptr ): OSStatus; external name '_QDGetCursorScale';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * QDGetCursorData()
+ *
+ * Summary:
+ * Allocate and return a PixMapHandle with the cursor data; also
+ * return the hotSpot. The caller is responsible for calling
+ * DisposePtr((**crsrData).baseAddr) and DisposePixMap(crsrData)
+ * when done with the crsrData returned.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * contextCursor:
+ * A Boolean; if true, return data for the current context cursor,
+ * if false, return data for the currently showing global cursor.
+ *
+ * crsrData:
+ * Allocates a PixMapHandle and pixelData in baseAddr,
+ * corresponding to the cursorData. The pixelData are in 32-bit
+ * ARGB format, with the mask contained in the alpha channel. This
+ * PixMapHandle can be passed as crsrData to
+ * QDRegisterNamedPixMapCursor, above (with crsrMask = NULL). If
+ * the return result indicates an error, NULL is returned.
+ *
+ * hotSpot:
+ * Contains the cursor hotSpot, if successful.
+ *
+ * Result:
+ * noErr if successful, or whatever error is returned from lower
+ * levels otherwise.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function QDGetCursorData( contextCursor: Boolean; var crsrData: PixMapHandle; var hotSpot: Point ): OSStatus; external name '_QDGetCursorData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+const
+ kQDUseDefaultTextRendering = 0; { Sets whatever is specified in system defaults. }
+ { Currently sets kQDUseTrueTypeScalerGlyphs if nothing is specified.}
+ kQDUseTrueTypeScalerGlyphs = (1 shl 0); { bit 0}
+ kQDUseCGTextRendering = (1 shl 1); { bit 1}
+ kQDUseCGTextMetrics = (1 shl 2); { bit 2}
+ kQDSupportedFlags = kQDUseTrueTypeScalerGlyphs or kQDUseCGTextRendering or kQDUseCGTextMetrics;
+ kQDDontChangeFlags = $FFFFFFFF; { to request the current state, without changing anything }
+
+
+{
+ * QDSwapTextFlags()
+ *
+ * Summary:
+ * Returns current flags and optionally sets new flags.
+ *
+ * Discussion:
+ * Currently, only the flag bits in the enum above are supported.
+ * The typical usage is UInt32 savedFlags =
+ * QDSwapTextFlags(newFlags); // ... draw text under the conditions
+ * of "newFlags" ... (void)QDSwapTextFlags(savedFlags); // restore
+ * previous setting
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * newFlags:
+ * Use the enums above; example "kQDUseCGTextRendering |
+ * kQDUseCGTextMetrics".
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function QDSwapTextFlags( newFlags: UInt32 ): UInt32; external name '_QDSwapTextFlags';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * QDSwapPortTextFlags()
+ *
+ * Summary:
+ * Same as QDSwapTextFlags, but per GrafPort.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * port:
+ * Settings per port override any global settings. If port ==
+ * NULL, the current port is used.
+ *
+ * newFlags:
+ * As in QDSwapTextFlags, above.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function QDSwapPortTextFlags( port: CGrafPtr; newFlags: UInt32 ): UInt32; external name '_QDSwapPortTextFlags';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * QDGetCGDirectDisplayID()
+ *
+ * Summary:
+ * Return the CGDirectDisplayID corresponding to a GDHandle
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGDevice:
+ * The GDevice handle corresponding to the device for which the
+ * CGDirectDisplayID is requested
+ *
+ * Result:
+ * The CGDirectDisplayID, or 0 if the GDHandle does not represent a
+ * display.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function QDGetCGDirectDisplayID( inGDevice: GDHandle ): CGDirectDisplayID; external name '_QDGetCGDirectDisplayID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{
+ LowMem accessor functions previously in LowMem.h
+}
+{
+ * LMGetScrVRes() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetScrVRes: SInt16; external name '_LMGetScrVRes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMSetScrVRes() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetScrVRes(value: SInt16); external name '_LMSetScrVRes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMGetScrHRes() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetScrHRes: SInt16; external name '_LMGetScrHRes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMSetScrHRes() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetScrHRes(value: SInt16); external name '_LMSetScrHRes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMGetMainDevice() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetMainDevice: GDHandle; external name '_LMGetMainDevice';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMSetMainDevice() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetMainDevice(value: GDHandle); external name '_LMSetMainDevice';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMGetDeviceList() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetDeviceList: GDHandle; external name '_LMGetDeviceList';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMSetDeviceList() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetDeviceList(value: GDHandle); external name '_LMSetDeviceList';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMGetQDColors() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetQDColors: Handle; external name '_LMGetQDColors';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMSetQDColors() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetQDColors(value: Handle); external name '_LMSetQDColors';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMGetWidthListHand() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetWidthListHand: Handle; external name '_LMGetWidthListHand';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMSetWidthListHand() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetWidthListHand(value: Handle); external name '_LMSetWidthListHand';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMGetHiliteMode() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetHiliteMode: ByteParameter; external name '_LMGetHiliteMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMSetHiliteMode() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetHiliteMode(value: ByteParameter); external name '_LMSetHiliteMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMGetWidthPtr() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetWidthPtr: Ptr; external name '_LMGetWidthPtr';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMSetWidthPtr() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetWidthPtr(value: Ptr); external name '_LMSetWidthPtr';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMGetWidthTabHandle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetWidthTabHandle: Handle; external name '_LMGetWidthTabHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMSetWidthTabHandle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetWidthTabHandle(value: Handle); external name '_LMSetWidthTabHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMGetLastSPExtra() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetLastSPExtra: SInt32; external name '_LMGetLastSPExtra';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMSetLastSPExtra() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetLastSPExtra(value: SInt32); external name '_LMSetLastSPExtra';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMGetLastFOND() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetLastFOND: Handle; external name '_LMGetLastFOND';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMSetLastFOND() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetLastFOND(value: Handle); external name '_LMSetLastFOND';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMGetFractEnable() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetFractEnable: ByteParameter; external name '_LMGetFractEnable';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMSetFractEnable() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetFractEnable(value: ByteParameter); external name '_LMSetFractEnable';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMGetTheGDevice() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetTheGDevice: GDHandle; external name '_LMGetTheGDevice';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMSetTheGDevice() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetTheGDevice(value: GDHandle); external name '_LMSetTheGDevice';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMGetHiliteRGB() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMGetHiliteRGB(var hiliteRGBValue: RGBColor); external name '_LMGetHiliteRGB';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMSetHiliteRGB() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetHiliteRGB(const (*var*) hiliteRGBValue: RGBColor); external name '_LMSetHiliteRGB';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMGetCursorNew() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ }
+function LMGetCursorNew: boolean; external name '_LMGetCursorNew';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * LMSetCursorNew() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ }
+procedure LMSetCursorNew(value: boolean); external name '_LMSetCursorNew';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{$ALIGN MAC68K}
+
+
+{unit SCDynamicStore}
+{
+ * Copyright (c) 2000 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,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES of MERCHANTABILITY,
+ * 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, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{!
+ @header SCDynamicStore
+ The SystemConfiguration framework provides access to the
+ data used to configure a running system. The APIs provided
+ by this framework communicate with the "configd" daemon.
+
+ The "configd" daemon manages a "dynamic store" reflecting the
+ desired configuration settings as well as the current state
+ of the system. The daemon provides a notification mechanism
+ for user-level processes that need to be aware of changes
+ made to the data. Lastly, the daemon loads a number of
+ bundles (or plug-ins) that monitor low-level kernel events
+ and, via a set of policy modules, keep the state data up
+ to date.
+ }
+
+
+{!
+ @typedef SCDynamicStoreRef
+ @discussion This is the handle to an open "dynamic store" session
+ with the system configuration daemon.
+ }
+type
+ SCDynamicStoreRef = ^SInt32; { an opaque 32-bit type }
+
+{!
+ @typedef SCDynamicStoreContext
+ }
+type
+ SCDynamicStoreContext = record
+ version: CFIndex;
+ info: Ptr;
+ retain: function( info: Ptr ): Ptr;
+ release: procedure( info: Ptr );
+ copyDescription: function( info: Ptr ): CFStringRef;
+ end;
+ SCDynamicStoreContextPtr = ^SCDynamicStoreContext;
+
+{!
+ @typedef SCDynamicStoreCallBack
+ @discussion Type of the callback function used when a
+ dynamic store change is delivered.
+ @param store The "dynamic store" session.
+ @param changedKeys The list of changed keys.
+ @param info ....
+ }
+type SCDynamicStoreCallBack = procedure( store: SCDynamicStoreRef; changedKeys: CFArrayRef; info: Ptr );
+
+{!
+ @function SCDynamicStoreGetTypeID
+ Returns the type identifier of all SCDynamicStore instances.
+ }
+function SCDynamicStoreGetTypeID: CFTypeID; external name '_SCDynamicStoreGetTypeID';
+
+
+{!
+ @function SCDynamicStoreCreate
+ @discussion Creates a new session used to interact with the dynamic
+ store maintained by the SystemConfiguration server.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the local "dynamic store" and its storage for
+ values.
+ 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 name A string that describes the name of the calling
+ process or plug-in of the caller.
+ @param callout The function to be called when a watched value
+ in the "dynamic store" is changed.
+ A NULL value can be specified if no callouts are
+ desired.
+ @param context The SCDynamicStoreContext associated with the callout.
+ @result A reference to the new SCDynamicStore.
+ }
+function SCDynamicStoreCreate( allocator: CFAllocatorRef; name: CFStringRef; callout: SCDynamicStoreCallBack; var context: SCDynamicStoreContext ): SCDynamicStoreRef; external name '_SCDynamicStoreCreate';
+
+{!
+ @function SCDynamicStoreCreateRunLoopSource
+ @discussion Creates a new session used to interact with the dynamic
+ store maintained by the SystemConfiguration server.
+ @param allocator The CFAllocator which should be used to allocate
+ memory for the local "dynamic store" and its storage for
+ values.
+ 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 store The "dynamic store" session.
+ @param order On platforms which support it, this parameter
+ determines the order in which the sources which are
+ ready to be processed are handled. A lower order
+ number causes processing before higher order number
+ sources. It is inadvisable to depend on the order
+ number for any architectural or design aspect of
+ code. In the absence of any reason to do otherwise,
+ zero should be used.
+ @result A reference to the new CFRunLoopSource.
+ You must release the returned value.
+
+ }
+function SCDynamicStoreCreateRunLoopSource( allocator: CFAllocatorRef; store: SCDynamicStoreRef; order: CFIndex ): CFRunLoopSourceRef; external name '_SCDynamicStoreCreateRunLoopSource';
+
+{!
+ @function SCDynamicStoreCopyKeyList
+ @discussion Returns an array of CFString keys representing the
+ configuration "dynamic store" entries that match a
+ specified pattern.
+ @param store The "dynamic store" session.
+ @param pattern A regex(3) regular expression pattern that
+ will be used to match the "dynamic store" keys.
+ @result The list of matching keys.
+ You must release the returned value.
+ A NULL value will be returned if the list could not be obtained.
+ }
+function SCDynamicStoreCopyKeyList( store: SCDynamicStoreRef; pattern: CFStringRef ): CFArrayRef; external name '_SCDynamicStoreCopyKeyList';
+
+{!
+ @function SCDynamicStoreAddValue
+ @discussion Adds the key-value pair to the "dynamic store" if no
+ such key already exists.
+ @param store The "dynamic store" session.
+ @param key The key of the value to add to the "dynamic store".
+ @param value The value to add to the "dynamic store".
+ @result TRUE if the key was added; FALSE if the key was already
+ present in the "dynamic store" or if an error was encountered.
+ }
+function SCDynamicStoreAddValue( store: SCDynamicStoreRef; key: CFStringRef; value: CFPropertyListRef ): Boolean; external name '_SCDynamicStoreAddValue';
+
+{!
+ @function SCDynamicStoreAddTemporaryValue
+ @discussion Adds the key-value pair on a temporary basis to the
+ "dynamic store" if no such key already exists. This entry
+ will, unless updated by another session, automatically be
+ removed when the session is closed.
+ @param store The "dynamic store" session.
+ @param key The key of the value to add to the "dynamic store".
+ @param value The value to add to the "dynamic store".
+ @result TRUE if the key was added; FALSE if the key was already
+ present in the "dynamic store" or if an error was encountered.
+ }
+function SCDynamicStoreAddTemporaryValue( store: SCDynamicStoreRef; key: CFStringRef; value: CFPropertyListRef ): Boolean; external name '_SCDynamicStoreAddTemporaryValue';
+
+{!
+ @function SCDynamicStoreCopyValue
+ @discussion Obtains a value from the "dynamic store" for the
+ specified key.
+ @param store The "dynamic store" session.
+ @param key The key you wish to obtain.
+ @result The value from the store that is associated with the
+ given key. The value is returned as a Core Foundation
+ Property List data type.
+ You must release the returned value.
+ If no value was located, NULL is returned.
+ }
+function SCDynamicStoreCopyValue( store: SCDynamicStoreRef; key: CFStringRef ): CFPropertyListRef; external name '_SCDynamicStoreCopyValue';
+
+{!
+ @function SCDynamicStoreCopyMultiple
+ @discussion Fetches multiple values in the "dynamic store".
+ @param store The "dynamic store" session.
+ @param keys The keys to be fetched; NULL if no specific keys
+ are requested.
+ @param patterns The regex(3) pattern strings to be fetched; NULL
+ if no key patterns are requested.
+ @result A dictionary containing the specific keys which were found
+ in the "dynamic store" and any keys which matched the specified
+ patterns; NULL is returned if an error was encountered.
+ You must release the returned value.
+ }
+function SCDynamicStoreCopyMultiple( store: SCDynamicStoreRef; keys: CFArrayRef; patterns: CFArrayRef ): CFDictionaryRef; external name '_SCDynamicStoreCopyMultiple';
+
+{!
+ @function SCDynamicStoreSetValue
+ @discussion Adds or replaces a value in the "dynamic store" for
+ the specified key.
+ @param store The "dynamic store" session.
+ @param key The key you wish to set.
+ @param value The value to add to or replace in the "dynamic store".
+ @result TRUE if the key was updated; FALSE if an error was encountered.
+ }
+function SCDynamicStoreSetValue( store: SCDynamicStoreRef; key: CFStringRef; value: CFPropertyListRef ): Boolean; external name '_SCDynamicStoreSetValue';
+
+{!
+ @function SCDynamicStoreSetMultiple
+ @discussion Updates multiple values in the "dynamic store".
+ @param store The "dynamic store" session.
+ @param keysToSet Key/value pairs you wish to set into the "dynamic store".
+ @param keysToRemove A list of keys you wish to remove from the "dynamic store".
+ @param keysToNotify A list of keys to flag as changed (without actually changing the data).
+ @result TRUE if the dynamic store updates were successful; FALSE if an error was encountered.
+ }
+function SCDynamicStoreSetMultiple( store: SCDynamicStoreRef; keysToSet: CFDictionaryRef; keysToRemove: CFArrayRef; keysToNotify: CFArrayRef ): Boolean; external name '_SCDynamicStoreSetMultiple';
+
+{!
+ @function SCDynamicStoreRemoveValue
+ @discussion Removes the value of the specified key from the
+ "dynamic store".
+ @param store The "dynamic store" session.
+ @param key The key of the value you wish to remove.
+ @result TRUE if the key was removed; FALSE if no value was
+ located or an error was encountered.
+ }
+function SCDynamicStoreRemoveValue( store: SCDynamicStoreRef; key: CFStringRef ): Boolean; external name '_SCDynamicStoreRemoveValue';
+
+{!
+ @function SCDynamicStoreNotifyValue
+ @discussion Triggers a notification to be delivered for the
+ specified key in the dynamic store.
+ @param store The "dynamic store" session.
+ @param key The key which should be flagged as changed (without actually changing the data).
+ @result TRUE if the value was updated; FALSE if an error was encountered.
+ }
+function SCDynamicStoreNotifyValue( store: SCDynamicStoreRef; key: CFStringRef ): Boolean; external name '_SCDynamicStoreNotifyValue';
+
+{!
+ @function SCDynamicStoreSetNotificationKeys
+ @discussion Specifies a set of specific keys and key patterns
+ which should be monitored for changes.
+ @param store The "dynamic store" session being watched.
+ @param keys The keys to be monitored; NULL if no specific keys
+ are to be monitored.
+ @param patterns The regex(3) pattern strings to be monitored; NULL
+ if no key patterns are to be monitored.
+ @result TRUE if the monitored keys were set; FALSE if an error
+ was encountered.
+ }
+function SCDynamicStoreSetNotificationKeys( store: SCDynamicStoreRef; keys: CFArrayRef; patterns: CFArrayRef ): Boolean; external name '_SCDynamicStoreSetNotificationKeys';
+
+{!
+ @function SCDynamicStoreCopyNotifiedKeys
+ @discussion Returns an array of CFString keys representing the
+ "dynamic store" entries that have changed since this
+ function was last called.
+ @param store The "dynamic store" session.
+ @result The list of changed keys.
+ You must release the returned value.
+ A NULL value will be returned if the list could not be obtained.
+ }
+function SCDynamicStoreCopyNotifiedKeys( store: SCDynamicStoreRef ): CFArrayRef; external name '_SCDynamicStoreCopyNotifiedKeys';
+
+{unit SCDynamicStoreCopyDHCPInfos}
+{
+ * Copyright (c) 2001-2002 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,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES of MERCHANTABILITY,
+ * 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, <peter@stairways.com.au>, 2004 }
+{ Unit name changed to SCDynamicStoreCopyDHCPInfos to avoid conflict with
+ SCDynamicStoreCopyDHCPInfo function }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{!
+ @header SCDynamicStoreCopyDHCPInfo.h
+ The following APIs allow an application to retrieve DHCP/BOOTP
+ information, in particular DHCP/BOOTP options.
+ }
+
+{!
+ @function SCDynamicStoreCopyDHCPInfo
+ @discussion Copies the DHCP/BOOTP information dictionary for the
+ requested serviceID, or the primary service if
+ serviceID == NULL.
+ @param store An SCDynamicStoreRef that should be used for communication
+ with the server.
+ If NULL, a temporary session will be used.
+ @param serviceID A CFStringRef containing the requested service.
+ If NULL, returns information for the primary service.
+ @result A dictionary containing DHCP/BOOTP information if successful,
+ NULL otherwise.
+ Use the DHCPInfoGetOption() to retrieve
+ individual options from the returned dictionary.
+
+ A non-NULL return value must be released using CFRelease().
+ }
+function SCDynamicStoreCopyDHCPInfo( store: SCDynamicStoreRef; serviceID: CFStringRef ): CFDictionaryRef; external name '_SCDynamicStoreCopyDHCPInfo';
+
+{!
+ @function DHCPInfoGetOptionData
+ @discussion Returns a non-NULL CFDataRef containing the BOOTP/DHCP
+ option data if present, NULL otherwise.
+ @param info The non-NULL DHCP information dictionary returned by
+ calling SCDynamicStoreCopyDHCPInfo.
+ @param code The DHCP/BOOTP option code (see RFC 2132) to return
+ data for.
+ @result A non-NULL CFDataRef containing the option data,
+ NULL otherwise.
+
+ The return value must NOT be released.
+ }
+function DHCPInfoGetOptionData( info: CFDictionaryRef; code: UInt8 ): CFDataRef; external name '_DHCPInfoGetOptionData';
+
+{!
+ @function DHCPInfoGetLeaseStartTime
+ @discussion Returns a CFDateRef corresponding to the lease start time,
+ if present, NULL otherwise. A NULL return value is returned
+ if the configuration method is BOOTP.
+ @param info The non-NULL DHCP information dictionary returned by
+ calling SCDynamicStoreCopyDHCPInfo.
+ @result A non-NULL CFDateRef if present, NULL otherwise.
+
+ The return value must NOT be released.
+ }
+function DHCPInfoGetLeaseStartTime( info: CFDictionaryRef ): CFDateRef; external name '_DHCPInfoGetLeaseStartTime';
+
+{unit SCDynamicStoreCopySpecific}
+{
+ * 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,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES of MERCHANTABILITY,
+ * 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, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{!
+ @header SCDynamicStoreCopySpecific
+ The following APIs allow an application to determine specific
+ configuration information about the current system (e.g. the
+ computer/sharing name, the currently logged in user, etc).
+ }
+
+{!
+ @function SCDynamicStoreCopyComputerName
+ @discussion Gets the current computer/host name.
+ @param store An SCDynamicStoreRef that should be used for communication
+ with the server.
+ If NULL, a temporary session will be used.
+ @param nameEncoding A pointer to memory that, if non-NULL, will be
+ filled with the encoding associated with the computer/host name.
+ @result The current computer/host name;
+ NULL if the name has not been set or if an error was encountered.
+ You must release the returned value.
+ }
+function SCDynamicStoreCopyComputerName( store: SCDynamicStoreRef; nameEncoding: CFStringEncodingPtr ): CFStringRef; external name '_SCDynamicStoreCopyComputerName';
+
+{!
+ @function SCDynamicStoreCopyConsoleUser
+ @discussion Gets the name, user ID, and group ID of the currently
+ logged in user.
+ @param store An SCDynamicStoreRef that should be used for communication
+ with the server.
+ If NULL, a temporary session will be used.
+ @param uid A pointer to memory that will be filled with the user ID
+ of the current "Console" user. If NULL, this value will not
+ be returned.
+ @param gid A pointer to memory that will be filled with the group ID
+ of the current "Console" user. If NULL, this value will not be
+ returned.
+ @result The current user logged into the system;
+ NULL if no user is logged in or if an error was encountered.
+ You must release the returned value.
+ }
+function SCDynamicStoreCopyConsoleUser( store: SCDynamicStoreRef; uid: uid_t_ptr; gid: gid_t_ptr ): CFStringRef; external name '_SCDynamicStoreCopyConsoleUser';
+
+{!
+ @function SCDynamicStoreCopyLocalHostName
+ @discussion Gets the current local host name.
+
+ See SCDynamicStoreKeyCreateHostNames() for notification
+ key information.
+ @param store An SCDynamicStoreRef that should be used for communication
+ with the server.
+ If NULL, a temporary session will be used.
+ @result The current local host name;
+ NULL if the name has not been set or if an error was encountered.
+ You must release the returned value.
+ }
+function SCDynamicStoreCopyLocalHostName( store: SCDynamicStoreRef ): CFStringRef; external name '_SCDynamicStoreCopyLocalHostName';
+
+{!
+ @function SCDynamicStoreCopyLocation
+ @discussion Gets the current "location" identifier.
+ @param store An SCDynamicStoreRef that should be used for communication
+ with the server.
+ If NULL, a temporary session will be used.
+ @result A string representing the current "location" identifier;
+ NULL if no "location" identifier has been defined or if an error
+ was encountered.
+ You must release the returned value.
+ }
+function SCDynamicStoreCopyLocation( store: SCDynamicStoreRef ): CFStringRef; external name '_SCDynamicStoreCopyLocation';
+
+{!
+ @function SCDynamicStoreCopyProxies
+ @discussion Gets the current internet proxy settings.
+ @param store An SCDynamicStoreRef that should be used for communication
+ with the server.
+ If NULL, a temporary session will be used.
+ @result A dictionary with key/value pairs representing the current
+ internet proxy settings (HTTP, FTP, etc);
+ NULL if no proxy settings have been defined or if an error was encountered.
+ You must release the returned value.
+ }
+function SCDynamicStoreCopyProxies( store: SCDynamicStoreRef ): CFDictionaryRef; external name '_SCDynamicStoreCopyProxies';
+
+{unit SCPreferences}
+{
+ * 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,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES of MERCHANTABILITY,
+ * 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, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{!
+ @header SCPreferences
+ The SCPreferencesXXX() APIs allow an application to load and
+ store XML configuration data in a controlled manner and provide
+ the necessary notifications to other applications that need to
+ be aware of configuration changes.
+
+ The stored XML configuration data is accessed using a prefsID. A
+ NULL value indicates that the default system preferences are to
+ be accessed.
+ A string which starts with a leading "/" character specifies the
+ path to the file containing te preferences to be accessed.
+ A string which does not start with a leading "/" character
+ specifies a file relative to the default system preferences
+ directory.
+ }
+
+
+{!
+ @typedef SCPreferencesRef
+ @discussion This is the handle to an open "session" for
+ accessing system configuration preferences.
+ }
+type
+ SCPreferencesRef = ^SInt32; { an opaque 32-bit type }
+
+{!
+ @function SCPreferencesGetTypeID
+ Returns the type identifier of all SCPreferences instances.
+ }
+function SCPreferencesGetTypeID: CFTypeID; external name '_SCPreferencesGetTypeID';
+
+
+{!
+ @function SCPreferencesCreate
+ @discussion Initiates access to the per-system set of configuration
+ preferences.
+ @param allocator ...
+ @param name A string that describes the name of the calling
+ process.
+ @param prefsID A string that identifies the name of the
+ group of preferences to be accessed/updated.
+ @result prefs A pointer to memory that will be filled with an
+ SCPreferencesRef handle to be used for all subsequent requests.
+ If a session cannot be established, the contents of
+ memory pointed to by this parameter are undefined.
+ }
+function SCPreferencesCreate( allocator: CFAllocatorRef; name: CFStringRef; prefsID: CFStringRef ): SCPreferencesRef; external name '_SCPreferencesCreate';
+
+{!
+ @function SCPreferencesLock
+ @discussion Locks access to the configuration preferences.
+
+ This function obtains exclusive access to the configuration
+ preferences associated with this prefsID. Clients attempting
+ to obtain exclusive access to the preferences will either receive
+ an kSCStatusPrefsBusy error or block waiting for the lock to be
+ released.
+ @param session An SCPreferencesRef handle that should be used for
+ all API calls.
+ @param wait A boolean flag indicating whether the calling process
+ should block waiting for another process to complete its update
+ operation and release its lock.
+ @result TRUE if the lock was obtained; FALSE if an error occurred.
+ }
+function SCPreferencesLock( session: SCPreferencesRef; wait: Boolean ): Boolean; external name '_SCPreferencesLock';
+
+{!
+ @function SCPreferencesCommitChanges
+ @discussion Commits changes made to the configuration preferences to
+ persitent storage.
+
+ This function commits any changes to permanent storage. An
+ implicit call to SCPreferencesLock/SCPreferencesUnlock will
+ be made if exclusive access has not already been established.
+
+ Note: This routine commits changes to persistent storage.
+ Call SCPreferencesApplyChanges() to apply the changes
+ to the running system.
+ @param session An SCPreferencesRef handle that should be used for
+ all API calls.
+ @result TRUE if the lock was obtained; FALSE if an error occurred.
+ }
+function SCPreferencesCommitChanges( session: SCPreferencesRef ): Boolean; external name '_SCPreferencesCommitChanges';
+
+{!
+ @function SCPreferencesApplyChanges
+ @discussion Requests that the currently stored configuration
+ preferences be applied to the active configuration.
+ @param session An SCPreferencesRef handle that should be used for
+ all API calls.
+ @result TRUE if the lock was obtained; FALSE if an error occurred.
+ }
+function SCPreferencesApplyChanges( session: SCPreferencesRef ): Boolean; external name '_SCPreferencesApplyChanges';
+
+{!
+ @function SCPreferencesUnlock
+ @discussion Releases exclusive access to the configuration preferences.
+
+ This function releases the exclusive access "lock" for this prefsID.
+ Other clients will be now be able to establish exclusive access to
+ the preferences.
+ @param session An SCPreferencesRef handle that should be used for
+ all API calls.
+ @result TRUE if the lock was obtained; FALSE if an error occurred.
+ }
+function SCPreferencesUnlock( session: SCPreferencesRef ): Boolean; external name '_SCPreferencesUnlock';
+
+{!
+ @function SCPreferencesGetSignature
+ @discussion Returns a sequence of bytes that can be used to determine
+ if the saved configuration preferences have changed.
+ @param session An SCPreferencesRef handle that should be used for
+ all API calls.
+ @param signature A pointer to a CFDataRef that will reflect
+ the signature of the configuration preferences at the time
+ of the call to SCPreferencesCreate().
+ @result A CFDataRef that reflects the signature of the configuration
+ preferences at the time of the call to SCPreferencesCreate().
+ }
+function SCPreferencesGetSignature( session: SCPreferencesRef ): CFDataRef; external name '_SCPreferencesGetSignature';
+
+{!
+ @function SCPreferencesCopyKeyList
+ @discussion Returns an array of currently defined preference keys.
+ @param session An SCPreferencesRef handle that should be used for
+ all API calls.
+ @result The list of keys. You must release the returned value.
+ }
+function SCPreferencesCopyKeyList( session: SCPreferencesRef ): CFArrayRef; external name '_SCPreferencesCopyKeyList';
+
+{!
+ @function SCPreferencesGetValue
+ @discussion Returns the data associated with a preference key.
+
+ This function retrieves data associated with a key for the prefsID.
+
+ Note: You could read stale data and not know it, unless you
+ first call SCPreferencesLock().
+ @param session An SCPreferencesRef handle that should be used for
+ all API calls.
+ @param key The preference key to be returned.
+ @result The value associated with the specified preference key; If no
+ value was located, NULL is returned.
+ }
+function SCPreferencesGetValue( session: SCPreferencesRef; key: CFStringRef ): CFPropertyListRef; external name '_SCPreferencesGetValue';
+
+{!
+ @function SCPreferencesAddValue
+ @discussion Adds data for a preference key.
+
+ This function associates new data with the specified key. In order
+ to commit these changes to permanent storage a call must be made to
+ SCPreferencesCommitChanges().
+ @param session The SCPreferencesRef handle that should be used to
+ communicate with the APIs.
+ @param key The preference key to be updated.
+ @param value The CFPropertyListRef object containing the
+ value to be associated with the specified preference key.
+ @result TRUE if the value was added; FALSE if the key already exists or
+ if an error occurred.
+ }
+function SCPreferencesAddValue( session: SCPreferencesRef; key: CFStringRef; value: CFPropertyListRef ): Boolean; external name '_SCPreferencesAddValue';
+
+{!
+ @function SCPreferencesSetValue
+ @discussion Updates the data associated with a preference key.
+
+ This function adds or replaces the value associated with the
+ specified key. In order to commit these changes to permanent
+ storage a call must be made to SCPreferencesCommitChanges().
+ @param session The SCPreferencesRef handle that should be used to
+ communicate with the APIs.
+ @param key The preference key to be updated.
+ @param value The CFPropertyListRef object containing the
+ data to be associated with the specified preference key.
+ @result TRUE if the value was set; FALSE if an error occurred.
+ }
+function SCPreferencesSetValue( session: SCPreferencesRef; key: CFStringRef; value: CFPropertyListRef ): Boolean; external name '_SCPreferencesSetValue';
+
+{!
+ @function SCPreferencesRemoveValue
+ @discussion Removes the data associated with a preference key.
+
+ This function removes the data associated with the specified
+ key. In order to commit these changes to permanent storage a
+ call must be made to SCPreferencesCommitChanges().
+ @param session The SCPreferencesRef handle that should be used to
+ communicate with the APIs.
+ @param key The preference key to be removed.
+ @result TRUE if the value was removed; FALSE if the key did not exist or
+ if an error occurred.
+ }
+function SCPreferencesRemoveValue( session: SCPreferencesRef; key: CFStringRef ): Boolean; external name '_SCPreferencesRemoveValue';
+
+{unit SCPreferencesPath}
+{
+ * 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,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES of MERCHANTABILITY,
+ * 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, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{!
+ @header SCPreferencesPath
+ The SCPreferencesPathXXX() APIs allow an application to
+ load and store XML configuration data in a controlled
+ manner and provide the necessary notifications to other
+ applications that need to be aware of configuration
+ changes.
+
+ The SCPreferencesPathXXX() APIs make certain assumptions
+ about the layout of the preferences data. These APIs view
+ the data as a collection of dictionaries of key/value pairs
+ and an associated path name. The root path ("/") identifies
+ the top-level dictionary. Additional path components
+ specify the keys for sub-dictionaries.
+
+ For example, the following dictionary can be accessed via
+ two paths. The root ("/") path would return a dictionary
+ with all keys and values. The path "/path1" would only
+ return the dictionary with the "key3" and "key4" properties.
+
+ <PRE>
+ <BR> &lt;dict&gt;
+ <BR> &lt;key&gt;key1&lt;/key&gt;
+ <BR> &lt;string&gt;val1&lt;/string&gt;
+ <BR> &lt;key&gt;key2&lt;/key&gt;
+ <BR> &lt;string&gt;val2&lt;/string&gt;
+ <BR> &lt;key&gt;path1&lt;/key&gt;
+ <BR> &lt;dict&gt;
+ <BR> &lt;key&gt;key3&lt;/key&gt;
+ <BR> &lt;string&gt;val3&lt;/string&gt;
+ <BR> &lt;key&gt;key4&lt;/key&gt;
+ <BR> &lt;string&gt;val4&lt;/string&gt;
+ <BR> &lt;/dict&gt;
+ <BR> &lt;/dict&gt;
+ </PRE>
+
+ Each dictionary can also include the kSCResvLink key. The
+ value associated with this key is interpreted as a "link" to
+ another path. If this key is present, a call to the
+ SCPreferencesPathGetValue() API will return the dictionary
+ specified by the link.
+ }
+
+{!
+ @function SCPreferencesPathCreateUniqueChild
+ @discussion Creates a new path component within the dictionary
+ hierarchy.
+ @param session The SCPreferencesRef handle that should be used to
+ communicate with the APIs.
+ @param prefix A string that represents the parent path.
+ @result A string representing the new (unique) child path; NULL
+ if the specified path does not exist.
+ }
+function SCPreferencesPathCreateUniqueChild( session: SCPreferencesRef; prefix: CFStringRef ): CFStringRef; external name '_SCPreferencesPathCreateUniqueChild';
+
+{!
+ @function SCPreferencesPathGetValue
+ @discussion Returns the dictionary associated with the specified
+ path.
+ @param session The SCPreferencesRef handle that should be used to
+ communicate with the APIs.
+ @param path A string that represents the path to be returned.
+ @result The dictionary associated with the specified path; NULL
+ if the path does not exist.
+ }
+function SCPreferencesPathGetValue( session: SCPreferencesRef; path: CFStringRef ): CFDictionaryRef; external name '_SCPreferencesPathGetValue';
+
+{!
+ @function SCPreferencesPathGetLink
+ @discussion Returns the link (if one exists) associated with the
+ specified path.
+ @param session The SCPreferencesRef handle that should be used to
+ communicate with the APIs.
+ @param path A string that represents the path to be returned.
+ @result The dictionary associated with the specified path; NULL
+ if the path is not a link or does not exist.
+ }
+function SCPreferencesPathGetLink( session: SCPreferencesRef; path: CFStringRef ): CFStringRef; external name '_SCPreferencesPathGetLink';
+
+{!
+ @function SCPreferencesPathSetValue
+ @discussion Associates a dictionary with the specified path.
+ @param session The SCPreferencesRef handle that should be used to
+ communicate with the APIs.
+ @param path A string that represents the path to be updated.
+ @param value A dictionary that represents the data to be
+ stored at the specified path.
+ @result A boolean indicating the success (or failure) of the call.
+ }
+function SCPreferencesPathSetValue( session: SCPreferencesRef; path: CFStringRef; value: CFDictionaryRef ): Boolean; external name '_SCPreferencesPathSetValue';
+
+{!
+ @function SCPreferencesPathSetLink
+ @discussion Associates a link to a second dictionary at the
+ specified path.
+ @param session The SCPreferencesRef handle that should be used to
+ communicate with the APIs.
+ @param path A string that represents the path to be updated.
+ @param link A string that represents the link to be stored
+ at the specified path.
+ @result A boolean indicating the success (or failure) of the call.
+ }
+function SCPreferencesPathSetLink( session: SCPreferencesRef; path: CFStringRef; link: CFStringRef ): Boolean; external name '_SCPreferencesPathSetLink';
+
+{!
+ @function SCPreferencesPathRemoveValue
+ @discussion Removes the data associated with the specified path.
+ @param session The SCPreferencesRef handle that should be used to
+ communicate with the APIs.
+ @param path A string that represents the path to be returned.
+ @result A boolean indicating the success (or failure) of the call.
+ }
+function SCPreferencesPathRemoveValue( session: SCPreferencesRef; path: CFStringRef ): Boolean; external name '_SCPreferencesPathRemoveValue';
+
+{unit SCPreferencesSetSpecific}
+{
+ * Copyright (c) 2000-2002 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,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES of MERCHANTABILITY,
+ * 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, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{!
+ @header SCPreferencesSetSpecific
+ The following APIs allow an application to set specific
+ configuration information about the current system (e.g. the
+ computer/sharing name).
+ }
+
+{!
+ @function SCPreferencesSetComputerName
+ @discussion Updates the computer/host name in the system preferences.
+
+ Note: In order to commit these changes to permanent storage a call
+ must be made to SCPreferencesCommitChanges().
+ A call to SCPreferencesApplyChanges() is also required for the new
+ name to become active.
+ @param prefs An SCPreferencesRef that should be used for all API calls.
+ @param name The computer/host name to be set.
+ @param nameEncoding The encoding associated with the computer/host name.
+ @result A boolean indicating the success (or failure) of the call.
+ }
+function SCPreferencesSetComputerName( prefs: SCPreferencesRef; name: CFStringRef; nameEncoding: CFStringEncoding ): Boolean; external name '_SCPreferencesSetComputerName';
+
+{!
+ @function SCPreferencesSetLocalHostName
+ @discussion Updates the local host name in the system preferences.
+
+ Note: In order to commit these changes to permanent storage a call
+ must be made to SCPreferencesCommitChanges().
+ A call to SCPreferencesApplyChanges() is also required for the new
+ name to become active.
+ @param prefs An SCPreferencesRef that should be used for all API calls.
+ @param name The local host name to be set.
+
+ Note: the string must conform to the naming conventions of a DNS host
+ name as specified in RFC 1034 (section 3.5).
+ @result A boolean indicating the success (or failure) of the call.
+ }
+function SCPreferencesSetLocalHostName( prefs: SCPreferencesRef; name: CFStringRef ): Boolean; external name '_SCPreferencesSetLocalHostName';
+
+{unit TextEdit}
+{
+ File: HIToolbox/TextEdit.h
+
+ Contains: TextEdit Interfaces.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1985-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{***********************************************************************************************
+ All functions in this file are deprecated for Mac OS 10.4. The Multilingual Text Engine (MLTE)
+ API is recommended instead. Although there is no one-to-one correspondence between the two API,
+ MLTE should be used instead of TE since it provides support for Unicode text. MLTE uses ATSUI
+ for text layout and Quartz for text rendering. Please see MacTextEditor.h for a description of
+ the MLTE API.
+*************************************************************************************************}
+
+
+{$ALIGN MAC68K}
+
+type
+ TERecPtr = ^TERec;
+ TEPtr = TERecPtr;
+ TEHandle = ^TEPtr;
+ HighHookProcPtr = procedure( const (*var*) r: Rect; pTE: TEPtr );
+ EOLHookProcPtr = function( theChar: ByteParameter; pTE: TEPtr; hTE: TEHandle ): Boolean;
+ CaretHookProcPtr = procedure( const (*var*) r: Rect; pTE: TEPtr );
+ WidthHookProcPtr = function( textLen: UInt16; textOffset: UInt16; textBufferPtr: UnivPtr; pTE: TEPtr; hTE: TEHandle ): UInt16;
+ TextWidthHookProcPtr = function( textLen: UInt16; textOffset: UInt16; textBufferPtr: UnivPtr; pTE: TEPtr; hTE: TEHandle ): UInt16;
+ NWidthHookProcPtr = function( styleRunLen: UInt16; styleRunOffset: UInt16; slop: SInt16; direction: SInt16; textBufferPtr: UnivPtr; var lineStart: SInt16; pTE: TEPtr; hTE: TEHandle ): UInt16;
+ DrawHookProcPtr = procedure( textOffset: UInt16; drawLen: UInt16; textBufferPtr: UnivPtr; pTE: TEPtr; hTE: TEHandle );
+ HitTestHookProcPtr = function( styleRunLen: UInt16; styleRunOffset: UInt16; slop: UInt16; textBufferPtr: UnivPtr; pTE: TEPtr; hTE: TEHandle; var pixelWidth: UInt16; var charOffset: UInt16; var pixelInChar: Boolean ): Boolean;
+ TEFindWordProcPtr = procedure( currentPos: UInt16; caller: SInt16; pTE: TEPtr; hTE: TEHandle; var wordStart: UInt16; var wordEnd: UInt16 );
+ TERecalcProcPtr = procedure( pTE: TEPtr; changeLength: UInt16; var lineStart: UInt16; var firstChar: UInt16; var lastChar: UInt16 );
+ TEDoTextProcPtr = procedure( pTE: TEPtr; firstChar: UInt16; lastChar: UInt16; selector: SInt16; var currentGrafPort: GrafPtr; var charPosition: SInt16 );
+ TEClickLoopProcPtr = function( pTE: TEPtr ): Boolean;
+ WordBreakProcPtr = function( text: Ptr; charPos: SInt16 ): Boolean;
+{
+ Important note about TEClickLoopProcPtr and WordBreakProcPtr
+
+ At one point these were defined as returning the function result in the
+ condition code Z-bit. This was correct, in that it was what the 68K
+ implementation of TextEdit actually tested. But, MixedMode had a different
+ idea of what returning a boolean in the Z-bit meant. MixedMode was setting
+ the Z-bit the complement of what was wanted.
+
+ Therefore, these ProcPtrs have been changed (back) to return the result in
+ register D0. It turns out that for register based routines,
+ MixedMode sets the Z-bit of the 68K emulator based on the contents
+ of the return result register. Thus we can get the Z-bit set correctly.
+
+ But, when TextEdit is recoded in PowerPC, if it calls a 68K ClickLoop
+ or WordBreak routine, register D0 had better have the result (in addition
+ to the Z-bit). Therefore all 68K apps should make sure their ClickLoop or
+ WordBreak routines set register D0 at the end.
+}
+
+{
+ There is no function to get/set the low-mem for FindWordHook at 0x07F8.
+ This is because it is not a low-mem ProcPtr. That address is the entry
+ in the OS TrapTable for trap 0xA0FE. You can use Get/SetTrapAddress to
+ acccess it.
+}
+
+{
+ The following ProcPtrs cannot be written in or called from a high-level
+ language without the help of mixed mode or assembly glue because they
+ use the following parameter-passing conventions:
+
+ typedef pascal void (*HighHookProcPtr)(const Rect *r, TEPtr pTE);
+ typedef pascal void (*CaretHookProcPtr)(const Rect *r, TEPtr pTE);
+
+ In:
+ => r on stack
+ => pTE A3.L
+ Out:
+ none
+
+ typedef pascal Boolean (*EOLHookProcPtr)(char theChar, TEPtr pTE, TEHandle hTE);
+
+ In:
+ => theChar D0.B
+ => pTE A3.L
+ => hTE A4.L
+ Out:
+ <= Boolean Z bit of the CCR
+
+ typedef pascal unsigned short (*WidthHookProcPtr)(unsigned short textLen,
+ unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
+ typedef pascal unsigned short (*TextWidthHookProcPtr)(unsigned short textLen,
+ unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
+
+ In:
+ => textLen D0.W
+ => textOffset D1.W
+ => textBufferPtr A0.L
+ => pTE A3.L
+ => hTE A4.L
+ Out:
+ <= unsigned short D1.W
+
+ typedef pascal unsigned short (*NWidthHookProcPtr)(unsigned short styleRunLen,
+ unsigned short styleRunOffset, short slop, short direction, void *textBufferPtr,
+ short *lineStart, TEPtr pTE, TEHandle hTE);
+
+ In:
+ => styleRunLen D0.W
+ => styleRunOffset D1.W
+ => slop D2.W (low)
+ => direction D2.W (high)
+ => textBufferPtr A0.L
+ => lineStart A2.L
+ => pTE A3.L
+ => hTE A4.L
+ Out:
+ <= unsigned short D1.W
+
+ typedef pascal void (*DrawHookProcPtr)(unsigned short textOffset, unsigned short drawLen,
+ void *textBufferPtr, TEPtr pTE, TEHandle hTE);
+
+ In:
+ => textOffset D0.W
+ => drawLen D1.W
+ => textBufferPtr A0.L
+ => pTE A3.L
+ => hTE A4.L
+ Out:
+ none
+
+ typedef pascal Boolean (*HitTestHookProcPtr)(unsigned short styleRunLen,
+ unsigned short styleRunOffset, unsigned short slop, void *textBufferPtr,
+ TEPtr pTE, TEHandle hTE, unsigned short *pixelWidth, unsigned short *charOffset,
+ Boolean *pixelInChar);
+
+ In:
+ => styleRunLen D0.W
+ => styleRunOffset D1.W
+ => slop D2.W
+ => textBufferPtr A0.L
+ => pTE A3.L
+ => hTE A4.L
+ Out:
+ <= pixelWidth D0.W (low)
+ <= Boolean D0.W (high)
+ <= charOffset D1.W
+ <= pixelInChar D2.W
+
+ typedef pascal void (*TEFindWordProcPtr)(unsigned short currentPos, short caller,
+ TEPtr pTE, TEHandle hTE, unsigned short *wordStart, unsigned short *wordEnd);
+
+ In:
+ => currentPos D0.W
+ => caller D2.W
+ => pTE A3.L
+ => hTE A4.L
+ Out:
+ <= wordStart D0.W
+ <= wordEnd D1.W
+
+ typedef pascal void (*TERecalcProcPtr)(TEPtr pTE, unsigned short changeLength,
+ unsigned short *lineStart, unsigned short *firstChar, unsigned short *lastChar);
+
+ In:
+ => pTE A3.L
+ => changeLength D7.W
+ Out:
+ <= lineStart D2.W
+ <= firstChar D3.W
+ <= lastChar D4.W
+
+ typedef pascal void (*TEDoTextProcPtr)(TEPtr pTE, unsigned short firstChar, unsigned short lastChar,
+ short selector, GrafPtr *currentGrafPort, short *charPosition);
+
+ In:
+ => pTE A3.L
+ => firstChar D3.W
+ => lastChar D4.W
+ => selector D7.W
+ Out:
+ <= currentGrafPort A0.L
+ <= charPosition D0.W
+
+}
+ HighHookUPP = HighHookProcPtr;
+ EOLHookUPP = EOLHookProcPtr;
+ CaretHookUPP = CaretHookProcPtr;
+ WidthHookUPP = WidthHookProcPtr;
+ TextWidthHookUPP = TextWidthHookProcPtr;
+ NWidthHookUPP = NWidthHookProcPtr;
+ DrawHookUPP = DrawHookProcPtr;
+ HitTestHookUPP = HitTestHookProcPtr;
+ TEFindWordUPP = TEFindWordProcPtr;
+ TERecalcUPP = TERecalcProcPtr;
+ TEDoTextUPP = TEDoTextProcPtr;
+ TEClickLoopUPP = TEClickLoopProcPtr;
+ WordBreakUPP = WordBreakProcPtr;
+ TERec = record
+ destRect: Rect;
+ viewRect: Rect;
+ selRect: Rect;
+ lineHeight: SInt16;
+ fontAscent: SInt16;
+ selPoint: Point;
+ selStart: SInt16;
+ selEnd: SInt16;
+ active: SInt16;
+ wordBreak: WordBreakUPP; { NOTE: This field is ignored on non-Roman systems and on Carbon (see IM-Text 2-60) }
+ clickLoop: TEClickLoopUPP;
+ clickTime: SInt32;
+ clickLoc: SInt16;
+ caretTime: SInt32;
+ caretState: SInt16;
+ just: SInt16;
+ teLength: SInt16;
+ hText: Handle;
+ hDispatchRec: SInt32; { added to replace recalBack & recalLines. it's a handle anyway }
+ clikStuff: SInt16;
+ crOnly: SInt16;
+ txFont: SInt16;
+ txFace: StyleField; {StyleField occupies 16-bits, but only first 8-bits are used}
+ txMode: SInt16;
+ txSize: SInt16;
+ inPort: GrafPtr;
+ highHook: HighHookUPP;
+ caretHook: CaretHookUPP;
+ nLines: SInt16;
+ lineStarts: array[0..16000] of SInt16;
+ end;
+
+const
+{ Justification (word alignment) styles }
+ teJustLeft = 0;
+ teJustCenter = 1;
+ teJustRight = -1;
+ teForceLeft = -2; { new names for the Justification (word alignment) styles }
+ teFlushDefault = 0; {flush according to the line direction }
+ teCenter = 1; {center justify (word alignment) }
+ teFlushRight = -1; {flush right for all scripts }
+ teFlushLeft = -2; {flush left for all scripts }
+
+const
+{ Set/Replace style modes }
+ fontBit = 0; {set font}
+ faceBit = 1; {set face}
+ sizeBit = 2; {set size}
+ clrBit = 3; {set color}
+ addSizeBit = 4; {add size mode}
+ toggleBit = 5; {set faces in toggle mode}
+
+const
+{ TESetStyle/TEContinuousStyle modes }
+ doFont = 1; { set font (family) number}
+ doFace = 2; {set character style}
+ doSize = 4; {set type size}
+ doColor = 8; {set color}
+ doAll = 15; {set all attributes}
+ addSize = 16; {adjust type size}
+ doToggle = 32; {toggle mode for TESetStyle}
+
+const
+{ offsets into TEDispatchRec }
+ EOLHook = 0; {[UniversalProcPtr] TEEOLHook}
+ DRAWHook = 4; {[UniversalProcPtr] TEWidthHook}
+ WIDTHHook = 8; {[UniversalProcPtr] TEDrawHook}
+ HITTESTHook = 12; {[UniversalProcPtr] TEHitTestHook}
+ nWIDTHHook = 24; {[UniversalProcPtr] nTEWidthHook}
+ TextWidthHook = 28; {[UniversalProcPtr] TETextWidthHook}
+
+const
+{ selectors for TECustomHook }
+ intEOLHook = 0; {TEIntHook value}
+ intDrawHook = 1; {TEIntHook value}
+ intWidthHook = 2; {TEIntHook value}
+ intHitTestHook = 3; {TEIntHook value}
+ intNWidthHook = 6; {TEIntHook value for new version of WidthHook}
+ intTextWidthHook = 7; {TEIntHook value for new TextWidthHook}
+ intInlineInputTSMTEPreUpdateHook = 8; {TEIntHook value for TSMTEPreUpdateProcPtr callback}
+ intInlineInputTSMTEPostUpdateHook = 9; {TEIntHook value for TSMTEPostUpdateProcPtr callback}
+
+const
+{ feature or bit definitions for TEFeatureFlag }
+ teFAutoScroll = 0; {00000001b}
+ teFTextBuffering = 1; {00000010b}
+ teFOutlineHilite = 2; {00000100b}
+ teFInlineInput = 3; {00001000b }
+ teFUseWhiteBackground = 4; {00010000b }
+ teFUseInlineInput = 5; {00100000b }
+ teFInlineInputAutoScroll = 6; {01000000b }
+
+const
+{ feature or bit definitions for TEFeatureFlag -- Carbon only }
+ { To avoid having to call TEIdle in Carbon apps, automatic idling can be activated }
+ { via the following feature flag, but you must ensure that the destRect and/or }
+ { GrafPort's origin be setup properly for drawing in a given TERec when }
+ { the timer fires. When this feature flag is set, TEIdle is a noop. }
+ { Activate this feature flag before calling TEActivate. }
+ teFIdleWithEventLoopTimer = 7; {10000000b }
+
+const
+{ action for the new "bit (un)set" interface, TEFeatureFlag }
+ teBitClear = 0;
+ teBitSet = 1; {set the selector bit}
+ teBitTest = -1; {no change; just return the current setting}
+
+const
+{constants for identifying the routine that called FindWord }
+ teWordSelect = 4; {clickExpand to select word}
+ teWordDrag = 8; {clickExpand to drag new word}
+ teFromFind = 12; {FindLine called it ($0C)}
+ teFromRecal = 16; {RecalLines called it ($10) obsolete }
+
+const
+{constants for identifying TEDoText selectors }
+ teFind = 0; {TEDoText called for searching}
+ teHighlight = 1; {TEDoText called for highlighting}
+ teDraw = -1; {TEDoText called for drawing text}
+ teCaret = -2; {TEDoText called for drawing the caret}
+
+
+type
+ Chars = packed array [0..32000] of char;
+ CharsPtr = ^Chars;
+ CharsHandle = ^CharsPtr;
+ StyleRunPtr = ^StyleRun;
+ StyleRun = record
+ startChar: SInt16; {starting character position}
+ styleIndex: SInt16; {index in style table}
+ end;
+type
+ STElementPtr = ^STElement;
+ STElement = record
+ stCount: SInt16; {number of runs in this style}
+ stHeight: SInt16; {line height}
+ stAscent: SInt16; {font ascent}
+ stFont: SInt16; {font (family) number}
+ stFace: StyleField; {StyleField occupies 16-bits, but only first 8-bits are used }
+ stSize: SInt16; {size in points}
+ stColor: RGBColor; {absolute (RGB) color}
+ end;
+ TEStyleTable = array [0..1776] of STElement;
+type
+ STPtr = ^TEStyleTable;
+ STHandle = ^STPtr;
+ LHElementPtr = ^LHElement;
+ LHElement = record
+ lhHeight: SInt16; {maximum height in line}
+ lhAscent: SInt16; {maximum ascent in line}
+ end;
+ LHTable = array [0..8000] of LHElement;
+ LHPtr = ^LHTable;
+ LHHandle = ^LHPtr;
+ ScrpSTElementPtr = ^ScrpSTElement;
+ ScrpSTElement = record
+ scrpStartChar: SInt32; {starting character position}
+ scrpHeight: SInt16;
+ scrpAscent: SInt16;
+ scrpFont: SInt16;
+ scrpFace: StyleField; {StyleField occupies 16-bits, but only first 8-bits are used}
+ scrpSize: SInt16;
+ scrpColor: RGBColor;
+ end;
+{ ARRAY [0..1600] OF ScrpSTElement }
+ ScrpSTTable = array [0..1600] of ScrpSTElement;
+type
+ StScrpRecPtr = ^StScrpRec;
+ StScrpRec = record
+ scrpNStyles: SInt16; {number of styles in scrap}
+ scrpStyleTab: ScrpSTTable; {table of styles for scrap}
+ end;
+type
+ StScrpPtr = StScrpRecPtr;
+ StScrpHandle = ^StScrpPtr;
+ NullStRecPtr = ^NullStRec;
+ NullStRec = record
+ teReserved: SInt32; {reserved for future expansion}
+ nullScrap: StScrpHandle; {handle to scrap style table}
+ end;
+type
+ NullStPtr = NullStRecPtr;
+ NullStHandle = ^NullStPtr;
+ TEStyleRecPtr = ^TEStyleRec;
+ TEStyleRec = record
+ nRuns: SInt16; {number of style runs}
+ nStyles: SInt16; {size of style table}
+ styleTab: STHandle; {handle to style table}
+ lhTab: LHHandle; {handle to line-height table}
+ teRefCon: SInt32; {reserved for application use}
+ nullStyle: NullStHandle; {Handle to style set at null selection}
+ runs: array [0..8000] of StyleRun; { array [0..8000] of StyleRun }
+ end;
+type
+ TEStylePtr = TEStyleRecPtr;
+ TEStyleHandle = ^TEStylePtr;
+ TextStyle = record
+ tsFont: SInt16; {font (family) number}
+ tsFace: StyleField; {StyleField occupies 16-bits, but only first 8-bits are used}
+ tsSize: SInt16; {size in point}
+ tsColor: RGBColor; {absolute (RGB) color}
+ end;
+ TextStylePtr = ^TextStyle;
+type
+ TextStyleHandle = ^TextStylePtr;
+ TEIntHook = SInt16;
+{
+ * NewHighHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewHighHookUPP( userRoutine: HighHookProcPtr ): HighHookUPP; external name '_NewHighHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NewEOLHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewEOLHookUPP( userRoutine: EOLHookProcPtr ): EOLHookUPP; external name '_NewEOLHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NewCaretHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewCaretHookUPP( userRoutine: CaretHookProcPtr ): CaretHookUPP; external name '_NewCaretHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NewWidthHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewWidthHookUPP( userRoutine: WidthHookProcPtr ): WidthHookUPP; external name '_NewWidthHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NewTextWidthHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewTextWidthHookUPP( userRoutine: TextWidthHookProcPtr ): TextWidthHookUPP; external name '_NewTextWidthHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NewNWidthHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewNWidthHookUPP( userRoutine: NWidthHookProcPtr ): NWidthHookUPP; external name '_NewNWidthHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NewDrawHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewDrawHookUPP( userRoutine: DrawHookProcPtr ): DrawHookUPP; external name '_NewDrawHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NewHitTestHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewHitTestHookUPP( userRoutine: HitTestHookProcPtr ): HitTestHookUPP; external name '_NewHitTestHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NewTEFindWordUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewTEFindWordUPP( userRoutine: TEFindWordProcPtr ): TEFindWordUPP; external name '_NewTEFindWordUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NewTERecalcUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewTERecalcUPP( userRoutine: TERecalcProcPtr ): TERecalcUPP; external name '_NewTERecalcUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NewTEDoTextUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewTEDoTextUPP( userRoutine: TEDoTextProcPtr ): TEDoTextUPP; external name '_NewTEDoTextUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NewTEClickLoopUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewTEClickLoopUPP( userRoutine: TEClickLoopProcPtr ): TEClickLoopUPP; external name '_NewTEClickLoopUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NewWordBreakUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * DisposeHighHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeHighHookUPP( userUPP: HighHookUPP ); external name '_DisposeHighHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeEOLHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeEOLHookUPP( userUPP: EOLHookUPP ); external name '_DisposeEOLHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeCaretHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeCaretHookUPP( userUPP: CaretHookUPP ); external name '_DisposeCaretHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeWidthHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeWidthHookUPP( userUPP: WidthHookUPP ); external name '_DisposeWidthHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeTextWidthHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeTextWidthHookUPP( userUPP: TextWidthHookUPP ); external name '_DisposeTextWidthHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeNWidthHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeNWidthHookUPP( userUPP: NWidthHookUPP ); external name '_DisposeNWidthHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeDrawHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeDrawHookUPP( userUPP: DrawHookUPP ); external name '_DisposeDrawHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeHitTestHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeHitTestHookUPP( userUPP: HitTestHookUPP ); external name '_DisposeHitTestHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeTEFindWordUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeTEFindWordUPP( userUPP: TEFindWordUPP ); external name '_DisposeTEFindWordUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeTERecalcUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeTERecalcUPP( userUPP: TERecalcUPP ); external name '_DisposeTERecalcUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeTEDoTextUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeTEDoTextUPP( userUPP: TEDoTextUPP ); external name '_DisposeTEDoTextUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeTEClickLoopUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeTEClickLoopUPP( userUPP: TEClickLoopUPP ); external name '_DisposeTEClickLoopUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeWordBreakUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * InvokeHighHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeHighHookUPP( const (*var*) r: Rect; pTE: TEPtr; userUPP: HighHookUPP ); external name '_InvokeHighHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeEOLHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeEOLHookUPP( theChar: ByteParameter; pTE: TEPtr; hTE: TEHandle; userUPP: EOLHookUPP ): Boolean; external name '_InvokeEOLHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeCaretHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeCaretHookUPP( const (*var*) r: Rect; pTE: TEPtr; userUPP: CaretHookUPP ); external name '_InvokeCaretHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeWidthHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeWidthHookUPP( textLen: UInt16; textOffset: UInt16; textBufferPtr: UnivPtr; pTE: TEPtr; hTE: TEHandle; userUPP: WidthHookUPP ): UInt16; external name '_InvokeWidthHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeTextWidthHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeTextWidthHookUPP( textLen: UInt16; textOffset: UInt16; textBufferPtr: UnivPtr; pTE: TEPtr; hTE: TEHandle; userUPP: TextWidthHookUPP ): UInt16; external name '_InvokeTextWidthHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeNWidthHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeNWidthHookUPP( styleRunLen: UInt16; styleRunOffset: UInt16; slop: SInt16; direction: SInt16; textBufferPtr: UnivPtr; var lineStart: SInt16; pTE: TEPtr; hTE: TEHandle; userUPP: NWidthHookUPP ): UInt16; external name '_InvokeNWidthHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeDrawHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeDrawHookUPP( textOffset: UInt16; drawLen: UInt16; textBufferPtr: UnivPtr; pTE: TEPtr; hTE: TEHandle; userUPP: DrawHookUPP ); external name '_InvokeDrawHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeHitTestHookUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeHitTestHookUPP( styleRunLen: UInt16; styleRunOffset: UInt16; slop: UInt16; textBufferPtr: UnivPtr; pTE: TEPtr; hTE: TEHandle; var pixelWidth: UInt16; var charOffset: UInt16; var pixelInChar: Boolean; userUPP: HitTestHookUPP ): Boolean; external name '_InvokeHitTestHookUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeTEFindWordUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeTEFindWordUPP( currentPos: UInt16; caller: SInt16; pTE: TEPtr; hTE: TEHandle; var wordStart: UInt16; var wordEnd: UInt16; userUPP: TEFindWordUPP ); external name '_InvokeTEFindWordUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeTERecalcUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeTERecalcUPP( pTE: TEPtr; changeLength: UInt16; var lineStart: UInt16; var firstChar: UInt16; var lastChar: UInt16; userUPP: TERecalcUPP ); external name '_InvokeTERecalcUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeTEDoTextUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeTEDoTextUPP( pTE: TEPtr; firstChar: UInt16; lastChar: UInt16; selector: SInt16; var currentGrafPort: GrafPtr; var charPosition: SInt16; userUPP: TEDoTextUPP ); external name '_InvokeTEDoTextUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeTEClickLoopUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeTEClickLoopUPP( pTE: TEPtr; userUPP: TEClickLoopUPP ): Boolean; external name '_InvokeTEClickLoopUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeWordBreakUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+const
+{ feature bit 4 for TEFeatureFlag no longer in use }
+ teFUseTextServices = 4; {00010000b }
+
+
+
+{
+ * TEScrapHandle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TEScrapHandle: Handle; external name '_TEScrapHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEGetScrapLength() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TEGetScrapLength: SInt32; external name '_TEGetScrapLength';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEInit()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * TENew() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TENew( const (*var*) destRect: Rect; const (*var*) viewRect: Rect ): TEHandle; external name '_TENew';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEDispose() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEDispose( hTE: TEHandle ); external name '_TEDispose';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TESetText() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TESetText( text: {const} UnivPtr; length: SInt32; hTE: TEHandle ); external name '_TESetText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEGetText() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TEGetText( hTE: TEHandle ): CharsHandle; external name '_TEGetText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEIdle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEIdle( hTE: TEHandle ); external name '_TEIdle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TESetSelect() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TESetSelect( selStart: SInt32; selEnd: SInt32; hTE: TEHandle ); external name '_TESetSelect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEActivate() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEActivate( hTE: TEHandle ); external name '_TEActivate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEDeactivate() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEDeactivate( hTE: TEHandle ); external name '_TEDeactivate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEKey() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEKey( key: CharParameter; hTE: TEHandle ); external name '_TEKey';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TECut() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TECut( hTE: TEHandle ); external name '_TECut';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TECopy() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TECopy( hTE: TEHandle ); external name '_TECopy';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEPaste() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEPaste( hTE: TEHandle ); external name '_TEPaste';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEDelete() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEDelete( hTE: TEHandle ); external name '_TEDelete';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEInsert() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEInsert( text: {const} UnivPtr; length: SInt32; hTE: TEHandle ); external name '_TEInsert';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TESetAlignment() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TESetAlignment( just: SInt16; hTE: TEHandle ); external name '_TESetAlignment';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEUpdate() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEUpdate( const (*var*) rUpdate: Rect; hTE: TEHandle ); external name '_TEUpdate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TETextBox() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TETextBox( text: {const} UnivPtr; length: SInt32; const (*var*) box: Rect; just: SInt16 ); external name '_TETextBox';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEScroll() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEScroll( dh: SInt16; dv: SInt16; hTE: TEHandle ); external name '_TEScroll';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TESelView() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TESelView( hTE: TEHandle ); external name '_TESelView';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEPinScroll() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEPinScroll( dh: SInt16; dv: SInt16; hTE: TEHandle ); external name '_TEPinScroll';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEAutoView() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEAutoView( fAuto: Boolean; hTE: TEHandle ); external name '_TEAutoView';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TECalText() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TECalText( hTE: TEHandle ); external name '_TECalText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEGetOffset() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TEGetOffset( pt: Point; hTE: TEHandle ): SInt16; external name '_TEGetOffset';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEGetPoint() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TEGetPoint( offset: SInt16; hTE: TEHandle ): Point; external name '_TEGetPoint';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEClick() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEClick( pt: Point; fExtend: Boolean; h: TEHandle ); external name '_TEClick';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEStyleNew() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TEStyleNew( const (*var*) destRect: Rect; const (*var*) viewRect: Rect ): TEHandle; external name '_TEStyleNew';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TESetStyleHandle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TESetStyleHandle( theHandle: TEStyleHandle; hTE: TEHandle ); external name '_TESetStyleHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEGetStyleHandle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TEGetStyleHandle( hTE: TEHandle ): TEStyleHandle; external name '_TEGetStyleHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEGetStyle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEGetStyle( offset: SInt16; var theStyle: TextStyle; var lineHeight: SInt16; var fontAscent: SInt16; hTE: TEHandle ); external name '_TEGetStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEStylePaste() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEStylePaste( hTE: TEHandle ); external name '_TEStylePaste';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TESetStyle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TESetStyle( mode: SInt16; const (*var*) newStyle: TextStyle; fRedraw: Boolean; hTE: TEHandle ); external name '_TESetStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEReplaceStyle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEReplaceStyle( mode: SInt16; const (*var*) oldStyle: TextStyle; const (*var*) newStyle: TextStyle; fRedraw: Boolean; hTE: TEHandle ); external name '_TEReplaceStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEGetStyleScrapHandle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TEGetStyleScrapHandle( hTE: TEHandle ): StScrpHandle; external name '_TEGetStyleScrapHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEStyleInsert() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEStyleInsert( text: {const} UnivPtr; length: SInt32; hST: StScrpHandle; hTE: TEHandle ); external name '_TEStyleInsert';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEGetHeight() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TEGetHeight( endLine: SInt32; startLine: SInt32; hTE: TEHandle ): SInt32; external name '_TEGetHeight';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEContinuousStyle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TEContinuousStyle( var mode: SInt16; var aStyle: TextStyle; hTE: TEHandle ): Boolean; external name '_TEContinuousStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEUseStyleScrap() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TEUseStyleScrap( rangeStart: SInt32; rangeEnd: SInt32; newStyles: StScrpHandle; fRedraw: Boolean; hTE: TEHandle ); external name '_TEUseStyleScrap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TECustomHook() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TECustomHook( which: TEIntHook; var addr: UniversalProcPtr; hTE: TEHandle ); external name '_TECustomHook';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TENumStyles() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TENumStyles( rangeStart: SInt32; rangeEnd: SInt32; hTE: TEHandle ): SInt32; external name '_TENumStyles';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEFeatureFlag() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TEFeatureFlag( feature: SInt16; action: SInt16; hTE: TEHandle ): SInt16; external name '_TEFeatureFlag';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEGetHiliteRgn() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function TEGetHiliteRgn( region: RgnHandle; hTE: TEHandle ): OSErr; external name '_TEGetHiliteRgn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TESetInlineInputContextPtr()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * TEConfirmInlineInput()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * TESetScrapLength() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TESetScrapLength( length: SInt32 ); external name '_TESetScrapLength';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEFromScrap() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TEFromScrap: OSErr; external name '_TEFromScrap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEToScrap() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TEToScrap: OSErr; external name '_TEToScrap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TESetClickLoop() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure TESetClickLoop( clikProc: TEClickLoopUPP; hTE: TEHandle ); external name '_TESetClickLoop';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ check}
+{
+ * TESetWordBreak()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * TEGetDoTextHook() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function TEGetDoTextHook: TEDoTextUPP; external name '_TEGetDoTextHook';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TESetDoTextHook() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure TESetDoTextHook( value: TEDoTextUPP ); external name '_TESetDoTextHook';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEGetRecalcHook() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function TEGetRecalcHook: TERecalcUPP; external name '_TEGetRecalcHook';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TESetRecalcHook() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure TESetRecalcHook( value: TERecalcUPP ); external name '_TESetRecalcHook';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEGetFindWordHook() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function TEGetFindWordHook: TEFindWordUPP; external name '_TEGetFindWordHook';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TESetFindWordHook() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure TESetFindWordHook( value: TEFindWordUPP ); external name '_TESetFindWordHook';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TEGetScrapHandle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function TEGetScrapHandle: Handle; external name '_TEGetScrapHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TESetScrapHandle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure TESetScrapHandle( value: Handle ); external name '_TESetScrapHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ LMGetWordRedraw and LMSetWordRedraw were previously in LowMem.h }
+{ Deprecated for Carbon on MacOS X }
+{ This lomem is no longer used by the implementation of TextEdit }
+{ on MacOS X, so setting it will have no effect. }
+{
+ * LMGetWordRedraw() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetWordRedraw: UInt8; external name '_LMGetWordRedraw';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * LMSetWordRedraw() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetWordRedraw( value: UInt8 ); external name '_LMSetWordRedraw';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * teclick()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+
+
+
+
+{unit TranslationExtensions}
+{
+ File: HIToolbox/TranslationExtensions.h
+
+ Contains: Macintosh Easy Open Translation Extension Interfaces.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1993-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+ Translation Extensions are no longer supported. Carbon clients interested in extending translations
+ should use filter services as described in TranslationServices.h. The definitions below will NOT work
+ for Carbon and are only defined for those files that need to build pre-Carbon applications.
+}
+const
+ kSupportsFileTranslation = 1;
+ kSupportsScrapTranslation = 2;
+ kTranslatorCanGenerateFilename = 4;
+
+{****************************************************************************************}
+{ better names for 4-char codes}
+type
+ FileType = OSType;
+ FileTypePtr = ^FileType;
+ ScrapType = ResType;
+{****************************************************************************************}
+type
+ TranslationAttributes = UInt32;
+const
+ taDstDocNeedsResourceFork = 1;
+ taDstIsAppTranslation = 2;
+
+{****************************************************************************************}
+type
+ FileTypeSpecPtr = ^FileTypeSpec;
+ FileTypeSpec = record
+ format: FileType;
+ hint: SInt32;
+ flags: TranslationAttributes; { taDstDocNeedsResourceFork, taDstIsAppTranslation}
+ catInfoType: OSType;
+ catInfoCreator: OSType;
+ end;
+type
+ FileTranslationList = record
+ modDate: UInt32;
+ groupCount: UInt32;
+
+ { conceptual declarations:}
+
+ { unsigned long group1SrcCount;}
+ { unsigned long group1SrcEntrySize = sizeof(FileTypeSpec);}
+ { FileTypeSpec group1SrcTypes[group1SrcCount]}
+ { unsigned long group1DstCount;}
+ { unsigned long group1DstEntrySize = sizeof(FileTypeSpec);}
+ { FileTypeSpec group1DstTypes[group1DstCount]}
+ end;
+ FileTranslationListPtr = ^FileTranslationList;
+ FileTranslationListHandle = ^FileTranslationListPtr;
+{****************************************************************************************}
+type
+ ScrapTypeSpecPtr = ^ScrapTypeSpec;
+ ScrapTypeSpec = record
+ format: ScrapType;
+ hint: SInt32;
+ end;
+type
+ ScrapTranslationList = record
+ modDate: UInt32;
+ groupCount: UInt32;
+
+ { conceptual declarations:}
+
+ { unsigned long group1SrcCount;}
+ { unsigned long group1SrcEntrySize = sizeof(ScrapTypeSpec);}
+ { ScrapTypeSpec group1SrcTypes[group1SrcCount]}
+ { unsigned long group1DstCount;}
+ { unsigned long group1DstEntrySize = sizeof(ScrapTypeSpec);}
+ { ScrapTypeSpec group1DstTypes[group1DstCount]}
+ end;
+ ScrapTranslationListPtr = ^ScrapTranslationList;
+ ScrapTranslationListHandle = ^ScrapTranslationListPtr;
+{******************************************************************************************
+
+ definition of callbacks to update progress dialog
+
+******************************************************************************************}
+type
+ TranslationRefNum = SInt32;
+{******************************************************************************************
+
+ This routine sets the advertisement in the top half of the progress dialog.
+ It is called once at the beginning of your DoTranslateFile routine.
+
+ Enter : refNum Translation reference supplied to DoTranslateFile.
+ advertisement A handle to the picture to display. This must be non-purgable.
+ Before returning from DoTranslateFile, you should dispose
+ of the memory. (Normally, it is in the temp translation heap
+ so it is cleaned up for you.)
+
+ Exit : returns noErr, paramErr, or memFullErr
+
+******************************************************************************************}
+{
+ * SetTranslationAdvertisement() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * There is no direct replacement at this time.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 thru 1.0.2
+ * Non-Carbon CFM: in Translation 1.0 and later
+ }
+function SetTranslationAdvertisement( refNum: TranslationRefNum; advertisement: PicHandle ): OSErr; external name '_SetTranslationAdvertisement';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{******************************************************************************************
+
+ This routine updates the progress bar in the progress dialog.
+ It is called repeatedly from within your DoTranslateFile routine.
+ It should be called often, so that the user will get feedback if
+ he tries to cancel.
+
+ Enter : refNum translation reference supplied to DoTranslateFile.
+ progress percent complete (0-100)
+
+ Exit : canceled TRUE if the user clicked the Cancel button, FALSE otherwise
+
+ Return : noErr, paramErr, or memFullErr
+
+******************************************************************************************}
+{
+ * UpdateTranslationProgress() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * There is no direct replacement at this time.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 thru 1.0.2
+ * Non-Carbon CFM: in Translation 1.0 and later
+ }
+function UpdateTranslationProgress( refNum: TranslationRefNum; percentDone: SInt16; var canceled: Boolean ): OSErr; external name '_UpdateTranslationProgress';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{******************************************************************************************
+
+ Component Manager component selectors for translation extension routines
+
+******************************************************************************************}
+const
+ kTranslateGetFileTranslationList = 0;
+ kTranslateIdentifyFile = 1;
+ kTranslateTranslateFile = 2;
+ kTranslateGetTranslatedFilename = 3;
+ kTranslateGetScrapTranslationList = 10;
+ kTranslateIdentifyScrap = 11;
+ kTranslateTranslateScrap = 12;
+ kTranslateGetScrapTranslationListConsideringData = 13;
+
+
+{******************************************************************************************
+
+ routines which implement translation extensions
+
+******************************************************************************************}
+type
+ DoGetFileTranslationListProcPtr = function( self: ComponentInstance; translationList: FileTranslationListHandle ): ComponentResult;
+ DoIdentifyFileProcPtr = function( self: ComponentInstance; const (*var*) theDocument: FSSpec; var docType: FileType ): ComponentResult;
+ DoTranslateFileProcPtr = function( self: ComponentInstance; refNum: TranslationRefNum; const (*var*) sourceDocument: FSSpec; srcType: FileType; srcTypeHint: SInt32; const (*var*) dstDoc: FSSpec; dstType: FileType; dstTypeHint: SInt32 ): ComponentResult;
+ DoGetTranslatedFilenameProcPtr = function( self: ComponentInstance; dstType: FileType; dstTypeHint: SInt32; var theDocument: FSSpec ): ComponentResult;
+ DoGetScrapTranslationListProcPtr = function( self: ComponentInstance; list: ScrapTranslationListHandle ): ComponentResult;
+ DoIdentifyScrapProcPtr = function( self: ComponentInstance; dataPtr: {const} UnivPtr; dataLength: Size; var dataFormat: ScrapType ): ComponentResult;
+ DoTranslateScrapProcPtr = function( self: ComponentInstance; refNum: TranslationRefNum; srcDataPtr: {const} UnivPtr; srcDataLength: Size; srcType: ScrapType; srcTypeHint: SInt32; dstData: Handle; dstType: ScrapType; dstTypeHint: SInt32 ): ComponentResult;
+
+
+
+{unit Video}
+{
+ File: Video.p
+
+ Contains: Video Driver Interfaces.
+
+ Version: Technology: System 9.X
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1986-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ mBaseOffset = 1; { Id of mBaseOffset. }
+ mRowBytes = 2; { Video sResource parameter Id's }
+ mBounds = 3; { Video sResource parameter Id's }
+ mVersion = 4; { Video sResource parameter Id's }
+ mHRes = 5; { Video sResource parameter Id's }
+ mVRes = 6; { Video sResource parameter Id's }
+ mPixelType = 7; { Video sResource parameter Id's }
+ mPixelSize = 8; { Video sResource parameter Id's }
+ mCmpCount = 9; { Video sResource parameter Id's }
+ mCmpSize = 10; { Video sResource parameter Id's }
+ mPlaneBytes = 11; { Video sResource parameter Id's }
+ mVertRefRate = 14; { Video sResource parameter Id's }
+ mVidParams = 1; { Video parameter block id. }
+ mTable = 2; { Offset to the table. }
+ mPageCnt = 3; { Number of pages }
+ mDevType = 4; { Device Type }
+ oneBitMode = 128; { Id of OneBitMode Parameter list. }
+ twoBitMode = 129; { Id of TwoBitMode Parameter list. }
+ fourBitMode = 130; { Id of FourBitMode Parameter list. }
+ eightBitMode = 131; { Id of EightBitMode Parameter list. }
+
+ sixteenBitMode = 132; { Id of SixteenBitMode Parameter list. }
+ thirtyTwoBitMode = 133; { Id of ThirtyTwoBitMode Parameter list. }
+ firstVidMode = 128; { The new, better way to do the above. }
+ secondVidMode = 129; { QuickDraw only supports six video }
+ thirdVidMode = 130; { at this time. }
+ fourthVidMode = 131;
+ fifthVidMode = 132;
+ sixthVidMode = 133;
+ spGammaDir = 64;
+ spVidNamesDir = 65;
+
+
+ { csTimingFormat values in VDTimingInfo }
+ { look in the declaration rom for timing info }
+ kDeclROMtables = $6465636C (* 'decl' *);
+ kDetailedTimingFormat = $61726261 (* 'arba' *); { Timing is a detailed timing }
+
+ { Size of a block of EDID (Extended Display Identification Data) }
+ kDDCBlockSize = 128;
+
+ { ddcBlockType constants }
+ kDDCBlockTypeEDID = 0; { EDID block type. }
+
+ { ddcFlags constants }
+ kDDCForceReadBit = 0; { Force a new read of the EDID. }
+ kDDCForceReadMask = $01; { Mask for kddcForceReadBit. }
+
+
+ { Timing mode constants for Display Manager MultiMode support
+ Corresponding .h equates are in Video.h
+ .a equates are in Video.a
+ .r equates are in DepVideoEqu.r
+
+ The second enum is the old names (for compatibility).
+ The first enum is the new names.
+ }
+ timingInvalid = 0; { Unknown timingÉ force user to confirm. }
+ timingInvalid_SM_T24 = 8; { Work around bug in SM Thunder24 card. }
+ timingApple_FixedRateLCD = 42; { Lump all fixed-rate LCDs into one category. }
+ timingApple_512x384_60hz = 130; { 512x384 (60 Hz) Rubik timing. }
+ timingApple_560x384_60hz = 135; { 560x384 (60 Hz) Rubik-560 timing. }
+ timingApple_640x480_67hz = 140; { 640x480 (67 Hz) HR timing. }
+ timingApple_640x400_67hz = 145; { 640x400 (67 Hz) HR-400 timing. }
+ timingVESA_640x480_60hz = 150; { 640x480 (60 Hz) VGA timing. }
+ timingVESA_640x480_72hz = 152; { 640x480 (72 Hz) VGA timing. }
+ timingVESA_640x480_75hz = 154; { 640x480 (75 Hz) VGA timing. }
+ timingVESA_640x480_85hz = 158; { 640x480 (85 Hz) VGA timing. }
+ timingGTF_640x480_120hz = 159; { 640x480 (120 Hz) VESA Generalized Timing Formula }
+ timingApple_640x870_75hz = 160; { 640x870 (75 Hz) FPD timing. }
+ timingApple_640x818_75hz = 165; { 640x818 (75 Hz) FPD-818 timing. }
+ timingApple_832x624_75hz = 170; { 832x624 (75 Hz) GoldFish timing. }
+ timingVESA_800x600_56hz = 180; { 800x600 (56 Hz) SVGA timing. }
+ timingVESA_800x600_60hz = 182; { 800x600 (60 Hz) SVGA timing. }
+ timingVESA_800x600_72hz = 184; { 800x600 (72 Hz) SVGA timing. }
+ timingVESA_800x600_75hz = 186; { 800x600 (75 Hz) SVGA timing. }
+ timingVESA_800x600_85hz = 188; { 800x600 (85 Hz) SVGA timing. }
+ timingVESA_1024x768_60hz = 190; { 1024x768 (60 Hz) VESA 1K-60Hz timing. }
+ timingVESA_1024x768_70hz = 200; { 1024x768 (70 Hz) VESA 1K-70Hz timing. }
+ timingVESA_1024x768_75hz = 204; { 1024x768 (75 Hz) VESA 1K-75Hz timing (very similar to timingApple_1024x768_75hz). }
+ timingVESA_1024x768_85hz = 208; { 1024x768 (85 Hz) VESA timing. }
+ timingApple_1024x768_75hz = 210; { 1024x768 (75 Hz) Apple 19" RGB. }
+ timingApple_1152x870_75hz = 220; { 1152x870 (75 Hz) Apple 21" RGB. }
+ timingAppleNTSC_ST = 230; { 512x384 (60 Hz, interlaced, non-convolved). }
+ timingAppleNTSC_FF = 232; { 640x480 (60 Hz, interlaced, non-convolved). }
+ timingAppleNTSC_STconv = 234; { 512x384 (60 Hz, interlaced, convolved). }
+ timingAppleNTSC_FFconv = 236; { 640x480 (60 Hz, interlaced, convolved). }
+ timingApplePAL_ST = 238; { 640x480 (50 Hz, interlaced, non-convolved). }
+ timingApplePAL_FF = 240; { 768x576 (50 Hz, interlaced, non-convolved). }
+ timingApplePAL_STconv = 242; { 640x480 (50 Hz, interlaced, convolved). }
+ timingApplePAL_FFconv = 244; { 768x576 (50 Hz, interlaced, convolved). }
+ timingVESA_1280x960_75hz = 250; { 1280x960 (75 Hz) }
+ timingVESA_1280x960_60hz = 252; { 1280x960 (60 Hz) }
+ timingVESA_1280x960_85hz = 254; { 1280x960 (85 Hz) }
+ timingVESA_1280x1024_60hz = 260; { 1280x1024 (60 Hz) }
+ timingVESA_1280x1024_75hz = 262; { 1280x1024 (75 Hz) }
+ timingVESA_1280x1024_85hz = 268; { 1280x1024 (85 Hz) }
+ timingVESA_1600x1200_60hz = 280; { 1600x1200 (60 Hz) VESA timing. }
+ timingVESA_1600x1200_65hz = 282; { 1600x1200 (65 Hz) VESA timing. }
+ timingVESA_1600x1200_70hz = 284; { 1600x1200 (70 Hz) VESA timing. }
+ timingVESA_1600x1200_75hz = 286; { 1600x1200 (75 Hz) VESA timing (pixel clock is 189.2 Mhz dot clock). }
+ timingVESA_1600x1200_80hz = 288; { 1600x1200 (80 Hz) VESA timing (pixel clock is 216>? Mhz dot clock) - proposed only. }
+ timingVESA_1600x1200_85hz = 289; { 1600x1200 (85 Hz) VESA timing (pixel clock is 229.5 Mhz dot clock). }
+ timingVESA_1792x1344_60hz = 296; { 1792x1344 (60 Hz) VESA timing (204.75 Mhz dot clock). }
+ timingVESA_1792x1344_75hz = 298; { 1792x1344 (75 Hz) VESA timing (261.75 Mhz dot clock). }
+ timingVESA_1856x1392_60hz = 300; { 1856x1392 (60 Hz) VESA timing (218.25 Mhz dot clock). }
+ timingVESA_1856x1392_75hz = 302; { 1856x1392 (75 Hz) VESA timing (288 Mhz dot clock). }
+ timingVESA_1920x1440_60hz = 304; { 1920x1440 (60 Hz) VESA timing (234 Mhz dot clock). }
+ timingVESA_1920x1440_75hz = 306; { 1920x1440 (75 Hz) VESA timing (297 Mhz dot clock). }
+ timingSMPTE240M_60hz = 400; { 60Hz V, 33.75KHz H, interlaced timing, 16:9 aspect, typical resolution of 1920x1035. }
+ timingFilmRate_48hz = 410; { 48Hz V, 25.20KHz H, non-interlaced timing, typical resolution of 640x480. }
+ timingSony_1600x1024_76hz = 500; { 1600x1024 (76 Hz) Sony timing (pixel clock is 170.447 Mhz dot clock). }
+ timingSony_1920x1080_60hz = 510; { 1920x1080 (60 Hz) Sony timing (pixel clock is 159.84 Mhz dot clock). }
+ timingSony_1920x1080_72hz = 520; { 1920x1080 (72 Hz) Sony timing (pixel clock is 216.023 Mhz dot clock). }
+ timingSony_1920x1200_76hz = 540; { 1900x1200 (76 Hz) Sony timing (pixel clock is 243.20 Mhz dot clock). }
+ timingApple_0x0_0hz_Offline = 550; { Indicates that this timing will take the display off-line and remove it from the system. }
+
+
+ { Deprecated timing names. }
+ timingApple12 = 130;
+ timingApple12x = 135;
+ timingApple13 = 140;
+ timingApple13x = 145;
+ timingAppleVGA = 150;
+ timingApple15 = 160;
+ timingApple15x = 165;
+ timingApple16 = 170;
+ timingAppleSVGA = 180;
+ timingApple1Ka = 190;
+ timingApple1Kb = 200;
+ timingApple19 = 210;
+ timingApple21 = 220;
+ timingSony_1900x1200_74hz = 530; { 1900x1200 (74 Hz) Sony timing (pixel clock is 236.25 Mhz dot clock). }
+ timingSony_1900x1200_76hz = 540; { 1900x1200 (76 Hz) Sony timing (pixel clock is 245.48 Mhz dot clock). }
+
+ { csConnectFlags values in VDDisplayConnectInfo }
+ kAllModesValid = 0; { All modes not trimmed by primary init are good close enough to try }
+ kAllModesSafe = 1; { All modes not trimmed by primary init are know to be safe }
+ kReportsTagging = 2; { Can detect tagged displays (to identify smart monitors) }
+ kHasDirectConnection = 3; { True implies that driver can talk directly to device (e.g. serial data link via sense lines) }
+ kIsMonoDev = 4; { Says whether thereÕs an RGB (0) or Monochrome (1) connection. }
+ kUncertainConnection = 5; { There may not be a display (no sense lines?). }
+ kTaggingInfoNonStandard = 6; { Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). }
+ kReportsDDCConnection = 7; { Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). }
+ kHasDDCConnection = 8; { Card has ddc connect now. }
+ kConnectionInactive = 9; { Set when the connection is NOT currently active (generally used in a multiconnection environment). }
+ kDependentConnection = 10; { Set when some ascpect of THIS connection depends on another (will generally be set in a kModeSimulscan environment). }
+ kBuiltInConnection = 11; { Set when connection is KNOWN to be built-in (this is not the same as kHasDirectConnection). }
+ kOverrideConnection = 12; { Set when the reported connection is not the true one, but is one that has been forced through a SetConnection call }
+ kFastCheckForDDC = 13; { Set when all 3 are true: 1) sense codes indicate DDC display could be attached 2) attempted fast check 3) DDC failed }
+ kReportsHotPlugging = 14; { Detects and reports hot pluggging on connector (via VSL also implies DDC will be up to date w/o force read) }
+
+
+ { csDisplayType values in VDDisplayConnectInfo }
+ kUnknownConnect = 1; { Not sure how weÕll use this, but seems like a good idea. }
+ kPanelConnect = 2; { For use with fixed-in-place LCD panels. }
+ kPanelTFTConnect = 2; { Alias for kPanelConnect }
+ kFixedModeCRTConnect = 3; { For use with fixed-mode (i.e., very limited range) displays. }
+ kMultiModeCRT1Connect = 4; { 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe }
+ kMultiModeCRT2Connect = 5; { 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe }
+ kMultiModeCRT3Connect = 6; { 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain }
+ kMultiModeCRT4Connect = 7; { Expansion to large multi mode (not yet used) }
+ kModelessConnect = 8; { Expansion to modeless model (not yet used) }
+ kFullPageConnect = 9; { 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) }
+ kVGAConnect = 10; { 640x480 VGA default -- question everything else }
+ kNTSCConnect = 11; { NTSC ST (default), FF, STconv, FFconv }
+ kPALConnect = 12; { PAL ST (default), FF, STconv, FFconv }
+ kHRConnect = 13; { Straight-6 connect -- 640x480 and 640x400 (to get 8bpp in 256K case) (these two only) }
+ kPanelFSTNConnect = 14; { For use with fixed-in-place LCD FSTN (aka ÒSupertwistÓ) panels }
+ kMonoTwoPageConnect = 15; { 1152x870 Apple color two-page display }
+ kColorTwoPageConnect = 16; { 1152x870 Apple B&W two-page display }
+ kColor16Connect = 17; { 832x624 Apple B&W two-page display }
+ kColor19Connect = 18; { 1024x768 Apple B&W two-page display }
+ kGenericCRT = 19; { Indicates nothing except that connection is CRT in nature. }
+ kGenericLCD = 20; { Indicates nothing except that connection is LCD in nature. }
+ kDDCConnect = 21; { DDC connection, always set kHasDDCConnection }
+ kNoConnect = 22; { No display is connected - load sensing or similar level of hardware detection is assumed (used by resident drivers that support hot plugging when nothing is currently connected) }
+
+ { csTimingFlags values in VDTimingInfoRec }
+ kModeValid = 0; { Says that this mode should NOT be trimmed. }
+ kModeSafe = 1; { This mode does not need confirmation }
+ kModeDefault = 2; { This is the default mode for this type of connection }
+ kModeShowNow = 3; { This mode should always be shown (even though it may require a confirm) }
+ kModeNotResize = 4; { This mode should not be used to resize the display (eg. mode selects a different connector on card) }
+ kModeRequiresPan = 5; { This mode has more pixels than are actually displayed }
+ kModeInterlaced = 6; { This mode is interlaced (single pixel lines look bad). }
+ kModeShowNever = 7; { This mode should not be shown in the user interface. }
+ kModeSimulscan = 8; { Indicates that more than one display connection can be driven from a single framebuffer controller. }
+ kModeNotPreset = 9; { Indicates that the timing is not a factory preset for the current display (geometry may need correction) }
+ kModeBuiltIn = 10; { Indicates that the display mode is for the built-in connect only (on multiconnect devices like the PB 3400) Only the driver is quieried }
+ kModeStretched = 11; { Indicates that the display mode will be stretched/distorted to match the display aspect ratio }
+ kModeNotGraphicsQuality = 12; { Indicates that the display mode is not the highest quality (eg. stretching artifacts). Intended as a hint }
+
+ { csDepthFlags in VDVideoParametersInfoRec }
+ kDepthDependent = 0; { Says that this depth mode may cause dependent changes in other framebuffers (and . }
+
+ { csResolutionFlags bit flags for VDResolutionInfoRec }
+ kResolutionHasMultipleDepthSizes = 0; { Says that this mode has different csHorizontalPixels, csVerticalLines at different depths (usually slightly larger at lower depths) }
+
+
+ { Power Mode constants for VDPowerStateRec.powerState. Note the numeric order does not match the power state order }
+ kAVPowerOff = 0;
+ kAVPowerStandby = 1;
+ kAVPowerSuspend = 2;
+ kAVPowerOn = 3;
+ kHardwareSleep = 128;
+ kHardwareWake = 129;
+ kHardwareWakeFromSuspend = 130;
+ kHardwareWakeToDoze = 131;
+ kHardwareWakeToDozeFromSuspend = 132;
+ kHardwarePark = 133;
+ kHardwareDrive = 134;
+
+ { Power Mode masks and bits for VDPowerStateRec.powerFlags. }
+ kPowerStateNeedsRefresh = 0; { When leaving this power mode, a display will need refreshing }
+ kPowerStateSleepAwareBit = 1; { if gestaltPCCardDockingSelectorFix, Docking mgr checks this bit before checking kPowerStateSleepAllowedBit }
+ kPowerStateSleepForbiddenBit = 2; { if kPowerStateSleepAwareBit, Docking mgr checks this bit before sleeping }
+ kPowerStateSleepCanPowerOffBit = 3; { supports power down sleep (ie PCI power off) }
+ kPowerStateSleepNoDPMSBit = 4; { Bug #2425210. Do not use DPMS with this display. }
+ kPowerStateSleepWaketoDozeBit = 5; { Supports Wake to Doze }
+ kPowerStateNeedsRefreshMask = $00000001;
+ kPowerStateSleepAwareMask = $00000002;
+ kPowerStateSleepForbiddenMask = $00000004;
+ kPowerStateSleepCanPowerOffMask = $00000008;
+ kPowerStateSleepNoDPMSMask = $00000010;
+ kPowerStateSleepWaketoDozeMask = $00000020;
+
+
+ { Control Codes }
+ cscReset = 0;
+ cscKillIO = 1;
+ cscSetMode = 2;
+ cscSetEntries = 3;
+ cscSetGamma = 4;
+ cscGrayPage = 5;
+ cscGrayScreen = 5;
+ cscSetGray = 6;
+ cscSetInterrupt = 7;
+ cscDirectSetEntries = 8;
+ cscSetDefaultMode = 9;
+ cscSwitchMode = 10; { Takes a VDSwitchInfoPtr }
+ cscSetSync = 11; { Takes a VDSyncInfoPtr }
+ cscSavePreferredConfiguration = 16; { Takes a VDSwitchInfoPtr }
+ cscSetHardwareCursor = 22; { Takes a VDSetHardwareCursorPtr }
+ cscDrawHardwareCursor = 23; { Takes a VDDrawHardwareCursorPtr }
+ cscSetConvolution = 24; { Takes a VDConvolutionInfoPtr }
+ cscSetPowerState = 25; { Takes a VDPowerStatePtr }
+ cscPrivateControlCall = 26; { Takes a VDPrivateSelectorDataPtr }
+ cscSetMultiConnect = 28; { Takes a VDMultiConnectInfoPtr }
+ cscSetClutBehavior = 29; { Takes a VDClutBehavior }
+ cscSetDetailedTiming = 31; { Takes a VDDetailedTimingPtr }
+ cscDoCommunication = 33; { Takes a VDCommunicationPtr }
+ cscProbeConnection = 34; { Takes nil pointer (may generate a kFBConnectInterruptServiceType service interrupt) }
+ cscSetScaler = 36; { Takes a VDScalerPtr }
+ cscSetMirror = 37; { Takes a VDMirrorPtr }
+ cscUnusedCall = 127; { This call used to expend the scrn resource. Its imbedded data contains more control info }
+
+ { Status Codes }
+ cscGetMode = 2;
+ cscGetEntries = 3;
+ cscGetPageCnt = 4;
+ cscGetPages = 4; { This is what C&D 2 calls it. }
+ cscGetPageBase = 5;
+ cscGetBaseAddr = 5; { This is what C&D 2 calls it. }
+ cscGetGray = 6;
+ cscGetInterrupt = 7;
+ cscGetGamma = 8;
+ cscGetDefaultMode = 9;
+ cscGetCurMode = 10; { Takes a VDSwitchInfoPtr }
+ cscGetSync = 11; { Takes a VDSyncInfoPtr }
+ cscGetConnection = 12; { Return information about the connection to the display }
+ cscGetModeTiming = 13; { Return timing info for a mode }
+ cscGetModeBaseAddress = 14; { Return base address information about a particular mode }
+ cscGetScanProc = 15; { QuickTime scan chasing routine }
+ cscGetPreferredConfiguration = 16; { Takes a VDSwitchInfoPtr }
+ cscGetNextResolution = 17; { Takes a VDResolutionInfoPtr }
+ cscGetVideoParameters = 18; { Takes a VDVideoParametersInfoPtr }
+ cscGetGammaInfoList = 20; { Takes a VDGetGammaListPtr }
+ cscRetrieveGammaTable = 21; { Takes a VDRetrieveGammaPtr }
+ cscSupportsHardwareCursor = 22; { Takes a VDSupportsHardwareCursorPtr }
+ cscGetHardwareCursorDrawState = 23; { Takes a VDHardwareCursorDrawStatePtr }
+ cscGetConvolution = 24; { Takes a VDConvolutionInfoPtr }
+ cscGetPowerState = 25; { Takes a VDPowerStatePtr }
+ cscPrivateStatusCall = 26; { Takes a VDPrivateSelectorDataPtr }
+ cscGetDDCBlock = 27; { Takes a VDDDCBlockPtr }
+ cscGetMultiConnect = 28; { Takes a VDMultiConnectInfoPtr }
+ cscGetClutBehavior = 29; { Takes a VDClutBehaviorPtr }
+ cscGetTimingRanges = 30; { Takes a VDDisplayTimingRangePtr }
+ cscGetDetailedTiming = 31; { Takes a VDDetailedTimingPtr }
+ cscGetCommunicationInfo = 32; { Takes a VDCommunicationInfoPtr }
+ cscGetScalerInfo = 35; { Takes a VDScalerInfoPtr }
+ cscGetScaler = 36; { Takes a VDScalerPtr }
+ cscGetMirror = 37; { Takes a VDMirrorPtr }
+
+ { Bit definitions for the Get/Set Sync call }
+ kDisableHorizontalSyncBit = 0;
+ kDisableVerticalSyncBit = 1;
+ kDisableCompositeSyncBit = 2;
+ kEnableSyncOnBlue = 3;
+ kEnableSyncOnGreen = 4;
+ kEnableSyncOnRed = 5;
+ kNoSeparateSyncControlBit = 6;
+ kTriStateSyncBit = 7;
+ kHorizontalSyncMask = $01;
+ kVerticalSyncMask = $02;
+ kCompositeSyncMask = $04;
+ kDPMSSyncMask = $07;
+ kTriStateSyncMask = $80;
+ kSyncOnBlueMask = $08;
+ kSyncOnGreenMask = $10;
+ kSyncOnRedMask = $20;
+ kSyncOnMask = $38;
+
+ { Power Mode constants for translating DPMS modes to Get/SetSync calls. }
+ kDPMSSyncOn = 0;
+ kDPMSSyncStandby = 1;
+ kDPMSSyncSuspend = 2;
+ kDPMSSyncOff = 7;
+
+ { Bit definitions for the Get/Set Convolution call }
+ kConvolved = 0;
+ kLiveVideoPassThru = 1;
+ kConvolvedMask = $01;
+ kLiveVideoPassThruMask = $02;
+
+
+type
+ VPBlockPtr = ^VPBlock;
+ VPBlock = record
+ vpBaseOffset: SInt32; { Offset to page zero of video RAM (From minorBaseOS). }
+ vpRowBytes: SInt16; { Width of each row of video memory. }
+ vpBounds: Rect; { BoundsRect for the video display (gives dimensions). }
+ vpVersion: SInt16; { PixelMap version number. }
+ vpPackType: SInt16;
+ vpPackSize: SInt32;
+ vpHRes: SInt32; { Horizontal resolution of the device (pixels per inch). }
+ vpVRes: SInt32; { Vertical resolution of the device (pixels per inch). }
+ vpPixelType: SInt16; { Defines the pixel type. }
+ vpPixelSize: SInt16; { Number of bits in pixel. }
+ vpCmpCount: SInt16; { Number of components in pixel. }
+ vpCmpSize: SInt16; { Number of bits per component }
+ vpPlaneBytes: SInt32; { Offset from one plane to the next. }
+ end;
+
+ VDEntryRecordPtr = ^VDEntryRecord;
+ VDEntryRecord = record
+ csTable: Ptr; { (long) pointer to color table entry=value, r,g,b:SInt16 }
+ end;
+
+ VDEntRecPtr = ^VDEntryRecord;
+ { Parm block for SetGray control call }
+ VDGrayRecordPtr = ^VDGrayRecord;
+ VDGrayRecord = record
+ csMode: boolean; { Same as GDDevType value (0=color, 1=mono) }
+ filler: SInt8;
+ end;
+
+ VDGrayPtr = ^VDGrayRecord;
+ { Parm block for SetInterrupt call }
+ VDFlagRecordPtr = ^VDFlagRecord;
+ VDFlagRecord = record
+ csMode: SInt8;
+ filler: SInt8;
+ end;
+
+ VDFlagRecPtr = ^VDFlagRecord;
+ { Parm block for SetEntries control call }
+ VDSetEntryRecordPtr = ^VDSetEntryRecord;
+ VDSetEntryRecord = record
+ csTable: ColorSpecPtr; { Pointer to an array of color specs }
+ csStart: SInt16; { Which spec in array to start with, or -1 }
+ csCount: SInt16; { Number of color spec entries to set }
+ end;
+
+ VDSetEntryPtr = ^VDSetEntryRecord;
+ { Parm block for SetGamma control call }
+ VDGammaRecordPtr = ^VDGammaRecord;
+ VDGammaRecord = record
+ csGTable: Ptr; { pointer to gamma table }
+ end;
+
+ VDGamRecPtr = ^VDGammaRecord;
+ VDBaseAddressInfoRecPtr = ^VDBaseAddressInfoRec;
+ VDBaseAddressInfoRec = record
+ csDevData: SInt32; { SInt32 - (long) timing mode }
+ csDevBase: SInt32; { SInt32 - (long) base address of the mode }
+ csModeReserved: SInt16; { SInt16 - (short) will some day be the depth }
+ csModeBase: SInt32; { SInt32 - (long) reserved }
+ end;
+
+ VDBaseAddressInfoPtr = ^VDBaseAddressInfoRec;
+ VDSwitchInfoRecPtr = ^VDSwitchInfoRec;
+ VDSwitchInfoRec = record
+ csMode: UInt16; { (word) mode depth }
+ csData: UInt32; { (long) functional sResource of mode }
+ csPage: UInt16; { (word) page to switch in }
+ csBaseAddr: Ptr; { (long) base address of page (return value) }
+ csReserved: UInt32; { (long) Reserved (set to 0) }
+ end;
+
+ VDSwitchInfoPtr = ^VDSwitchInfoRec;
+ VDTimingInfoRecPtr = ^VDTimingInfoRec;
+ VDTimingInfoRec = record
+ csTimingMode: UInt32; { SInt32 - (long) timing mode (a la InitGDevice) }
+ csTimingReserved: UInt32; { SInt32 - (long) reserved }
+ csTimingFormat: UInt32; { SInt32 - (long) what format is the timing info }
+ csTimingData: UInt32; { SInt32 - (long) data supplied by driver }
+ csTimingFlags: UInt32; { SInt32 - (long) mode within device }
+ end;
+
+ VDTimingInfoPtr = ^VDTimingInfoRec;
+ VDDisplayConnectInfoRecPtr = ^VDDisplayConnectInfoRec;
+ VDDisplayConnectInfoRec = record
+ csDisplayType: UInt16; { SInt16 - (word) Type of display connected }
+ csConnectTaggedType: SInt8; { BYTE - type of tagging }
+ csConnectTaggedData: SInt8; { BYTE - tagging data }
+ csConnectFlags: UInt32; { SInt32 - (long) tell us about the connection }
+ csDisplayComponent: UInt32; { SInt32 - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE) }
+ csConnectReserved: UInt32; { SInt32 - (long) reserved }
+ end;
+
+ VDDisplayConnectInfoPtr = ^VDDisplayConnectInfoRec;
+ VDMultiConnectInfoRecPtr = ^VDMultiConnectInfoRec;
+ VDMultiConnectInfoRec = record
+ csDisplayCountOrNumber: UInt32; { For GetMultiConnect, returns count n of 1..n connections; otherwise, indicates the ith connection. }
+ csConnectInfo: VDDisplayConnectInfoRec; { Standard VDDisplayConnectionInfo for connection i. }
+ end;
+
+ VDMultiConnectInfoPtr = ^VDMultiConnectInfoRec;
+ { RawSenseCode
+ This abstract data type is not exactly abstract. Rather, it is merely enumerated constants
+ for the possible raw sense code values when 'standard' sense code hardware is implemented.
+
+ For 'standard' sense code hardware, the raw sense is obtained as follows:
+ ¥ Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines
+ ¥ Read the state of the monitor sense lines 2, 1, and 0. (2 is the MSB, 0 the LSB)
+
+ IMPORTANT Note:
+ When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants
+ are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo'
+
+ }
+ RawSenseCode = UInt8;
+
+const
+ kRSCZero = 0;
+ kRSCOne = 1;
+ kRSCTwo = 2;
+ kRSCThree = 3;
+ kRSCFour = 4;
+ kRSCFive = 5;
+ kRSCSix = 6;
+ kRSCSeven = 7;
+
+
+ { ExtendedSenseCode
+ This abstract data type is not exactly abstract. Rather, it is merely enumerated constants
+ for the values which are possible when the extended sense algorithm is applied to hardware
+ which implements 'standard' sense code hardware.
+
+ For 'standard' sense code hardware, the extended sense code algorithm is as follows:
+ (Note: as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0')
+ ¥ Drive sense line 'A' low and read the values of 'B' and 'C'.
+ ¥ Drive sense line 'B' low and read the values of 'A' and 'C'.
+ ¥ Drive sense line 'C' low and read the values of 'A' and 'B'.
+
+ In this way, a six-bit number of the form BC/AC/AB is generated.
+
+ IMPORTANT Note:
+ When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants
+ are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo'
+
+ }
+
+type
+ ExtendedSenseCode = UInt8;
+
+const
+ kESCZero21Inch = $00; { 21" RGB }
+ kESCOnePortraitMono = $14; { Portrait Monochrome }
+ kESCTwo12Inch = $21; { 12" RGB }
+ kESCThree21InchRadius = $31; { 21" RGB (Radius) }
+ kESCThree21InchMonoRadius = $34; { 21" Monochrome (Radius) }
+ kESCThree21InchMono = $35; { 21" Monochrome }
+ kESCFourNTSC = $0A; { NTSC }
+ kESCFivePortrait = $1E; { Portrait RGB }
+ kESCSixMSB1 = $03; { MultiScan Band-1 (12" thru 1Six") }
+ kESCSixMSB2 = $0B; { MultiScan Band-2 (13" thru 19") }
+ kESCSixMSB3 = $23; { MultiScan Band-3 (13" thru 21") }
+ kESCSixStandard = $2B; { 13"/14" RGB or 12" Monochrome }
+ kESCSevenPAL = $00; { PAL }
+ kESCSevenNTSC = $14; { NTSC }
+ kESCSevenVGA = $17; { VGA }
+ kESCSeven16Inch = $2D; { 16" RGB (GoldFish) }
+ kESCSevenPALAlternate = $30; { PAL (Alternate) }
+ kESCSeven19Inch = $3A; { Third-Party 19Ó }
+ kESCSevenDDC = $3E; { DDC display }
+ kESCSevenNoDisplay = $3F; { No display connected }
+
+ { DepthMode
+ This abstract data type is used to to reference RELATIVE pixel depths.
+ Its definition is largely derived from its past usage, analogous to 'xxxVidMode'
+
+ Bits per pixel DOES NOT directly map to 'DepthMode' For example, on some
+ graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
+ hardware, 'kDepthMode1' may represent 8BPP.
+
+ DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc.
+ behave as expected. The values of the constants which comprise the set are such
+ that 'kDepthMode4 < kDepthMode6' behaves as expected.
+ }
+
+type
+ DepthMode = UInt16;
+
+const
+ kDepthMode1 = 128;
+ kDepthMode2 = 129;
+ kDepthMode3 = 130;
+ kDepthMode4 = 131;
+ kDepthMode5 = 132;
+ kDepthMode6 = 133;
+
+ kFirstDepthMode = 128; { These constants are obsolete, and just included }
+ kSecondDepthMode = 129; { for clients that have converted to the above }
+ kThirdDepthMode = 130; { kDepthModeXXX constants. }
+ kFourthDepthMode = 131;
+ kFifthDepthMode = 132;
+ kSixthDepthMode = 133;
+
+
+type
+ VDPageInfoPtr = ^VDPageInfo;
+ VDPageInfo = record
+ csMode: SInt16; { (word) mode within device }
+ csData: SInt32; { (long) data supplied by driver }
+ csPage: SInt16; { (word) page to switch in }
+ csBaseAddr: Ptr; { (long) base address of page }
+ end;
+
+ VDPgInfoPtr = ^VDPageInfo;
+ VDSizeInfoPtr = ^VDSizeInfo;
+ VDSizeInfo = record
+ csHSize: SInt16; { (word) desired/returned h size }
+ csHPos: SInt16; { (word) desired/returned h position }
+ csVSize: SInt16; { (word) desired/returned v size }
+ csVPos: SInt16; { (word) desired/returned v position }
+ end;
+
+ VDSzInfoPtr = ^VDSizeInfo;
+ VDSettingsPtr = ^VDSettings;
+ VDSettings = record
+ csParamCnt: SInt16; { (word) number of params }
+ csBrightMax: SInt16; { (word) max brightness }
+ csBrightDef: SInt16; { (word) default brightness }
+ csBrightVal: SInt16; { (word) current brightness }
+ csCntrstMax: SInt16; { (word) max contrast }
+ csCntrstDef: SInt16; { (word) default contrast }
+ csCntrstVal: SInt16; { (word) current contrast }
+ csTintMax: SInt16; { (word) max tint }
+ csTintDef: SInt16; { (word) default tint }
+ csTintVal: SInt16; { (word) current tint }
+ csHueMax: SInt16; { (word) max hue }
+ csHueDef: SInt16; { (word) default hue }
+ csHueVal: SInt16; { (word) current hue }
+ csHorizDef: SInt16; { (word) default horizontal }
+ csHorizVal: SInt16; { (word) current horizontal }
+ csHorizMax: SInt16; { (word) max horizontal }
+ csVertDef: SInt16; { (word) default vertical }
+ csVertVal: SInt16; { (word) current vertical }
+ csVertMax: SInt16; { (word) max vertical }
+ end;
+
+ VDDefModePtr = ^VDDefMode;
+ VDDefMode = record
+ csID: SInt8;
+ filler: SInt8;
+ end;
+
+ VDSyncInfoRecPtr = ^VDSyncInfoRec;
+ VDSyncInfoRec = record
+ csMode: SInt8;
+ csFlags: SInt8;
+ end;
+
+ VDSyncInfoPtr = ^VDSyncInfoRec;
+ AVIDType = UInt32;
+ DisplayIDType = AVIDType;
+ DisplayModeID = UInt32;
+ VideoDeviceType = UInt32;
+ GammaTableID = UInt32;
+ {
+ All displayModeID values from 0x80000000 to 0xFFFFFFFF and 0x00
+ are reserved for Apple Computer.
+ }
+ { Constants for the cscGetNextResolution call }
+
+const
+ kDisplayModeIDCurrent = $00; { Reference the Current DisplayModeID }
+ kDisplayModeIDInvalid = $FFFFFFFF; { A bogus DisplayModeID in all cases }
+ kDisplayModeIDFindFirstResolution = $FFFFFFFE; { Used in cscGetNextResolution to reset iterator }
+ kDisplayModeIDNoMoreResolutions = $FFFFFFFD; { Used in cscGetNextResolution to indicate End Of List }
+ kDisplayModeIDFindFirstProgrammable = $FFFFFFFC; { Used in cscGetNextResolution to find unused programmable timing }
+ kDisplayModeIDBootProgrammable = $FFFFFFFB; { This is the ID given at boot time by the of driver to a programmable timing }
+ kDisplayModeIDReservedBase = $80000000; { Lowest (unsigned) DisplayModeID reserved by Apple }
+
+ { Constants for the GetGammaInfoList call }
+ kGammaTableIDFindFirst = $FFFFFFFE; { Get the first gamma table ID }
+ kGammaTableIDNoMoreTables = $FFFFFFFD; { Used to indicate end of list }
+ kGammaTableIDSpecific = $00; { Return the info for the given table id }
+
+ { Constants for GetMultiConnect call }
+ kGetConnectionCount = $FFFFFFFF; { Used to get the number of possible connections in a Òmulti-headedÓ framebuffer environment. }
+ kActivateConnection = $00; { Used for activating a connection (csConnectFlags value). }
+ kDeactivateConnection = $0200; { Used for deactivating a connection (csConnectFlags value.) }
+
+ { VDCommunicationRec.csBusID values }
+ kVideoDefaultBus = 0;
+
+
+ { VDCommunicationInfoRec.csBusType values }
+ kVideoBusTypeInvalid = 0;
+ kVideoBusTypeI2C = 1;
+
+
+ { VDCommunicationRec.csSendType and VDCommunicationRec.csReplyType values and bits in VDCommunicationInfoRec.csSupportedTypes. }
+ kVideoNoTransactionType = 0; { No transaction }
+ kVideoSimpleI2CType = 1; { Simple I2C message }
+ kVideoDDCciReplyType = 2; { DDC/ci message (with imbedded length) }
+
+ { VDCommunicationRec.csCommFlags and VDCommunicationInfoRec.csSupportedCommFlags }
+ kVideoReplyMicroSecDelayMask = $01; { If set, the driver should delay csMinReplyDelay micro seconds between send and recieve }
+
+
+type
+ VDResolutionInfoRecPtr = ^VDResolutionInfoRec;
+ VDResolutionInfoRec = record
+ csPreviousDisplayModeID: DisplayModeID; { ID of the previous resolution in a chain }
+ csDisplayModeID: DisplayModeID; { ID of the next resolution }
+ csHorizontalPixels: UInt32; { # of pixels in a horizontal line at the max depth }
+ csVerticalLines: UInt32; { # of lines in a screen at the max depth }
+ csRefreshRate: Fixed; { Vertical Refresh Rate in Hz }
+ csMaxDepthMode: DepthMode; { 0x80-based number representing max bit depth }
+ csResolutionFlags: UInt32; { Reserved - flag bits }
+ csReserved: UInt32; { Reserved }
+ end;
+
+ VDResolutionInfoPtr = ^VDResolutionInfoRec;
+ VDVideoParametersInfoRecPtr = ^VDVideoParametersInfoRec;
+ VDVideoParametersInfoRec = record
+ csDisplayModeID: DisplayModeID; { the ID of the resolution we want info on }
+ csDepthMode: DepthMode; { The bit depth we want the info on (0x80 based) }
+ csVPBlockPtr: VPBlockPtr; { Pointer to a video parameter block }
+ csPageCount: UInt32; { Number of pages supported by the resolution }
+ csDeviceType: VideoDeviceType; { Device Type: Direct, Fixed or CLUT; }
+ csDepthFlags: UInt32; { Flags }
+ end;
+
+ VDVideoParametersInfoPtr = ^VDVideoParametersInfoRec;
+ VDGammaInfoRecPtr = ^VDGammaInfoRec;
+ VDGammaInfoRec = record
+ csLastGammaID: GammaTableID; { the ID of the previous gamma table }
+ csNextGammaID: GammaTableID; { the ID of the next gamma table }
+ csGammaPtr: Ptr; { Ptr to a gamma table data }
+ csReserved: UInt32; { Reserved }
+ end;
+
+ VDGammaInfoPtr = ^VDGammaInfoRec;
+ VDGetGammaListRecPtr = ^VDGetGammaListRec;
+ VDGetGammaListRec = record
+ csPreviousGammaTableID: GammaTableID; { ID of the previous gamma table }
+ csGammaTableID: GammaTableID; { ID of the gamma table following csPreviousDisplayModeID }
+ csGammaTableSize: UInt32; { Size of the gamma table in bytes }
+ csGammaTableName: CStringPtr; { Gamma table name (c-string) }
+ end;
+
+ VDGetGammaListPtr = ^VDGetGammaListRec;
+ VDRetrieveGammaRecPtr = ^VDRetrieveGammaRec;
+ VDRetrieveGammaRec = record
+ csGammaTableID: GammaTableID; { ID of gamma table to retrieve }
+ csGammaTablePtr: GammaTblPtr; { Location to copy desired gamma to }
+ end;
+
+ VDRetrieveGammaPtr = ^VDRetrieveGammaRec;
+ VDSetHardwareCursorRecPtr = ^VDSetHardwareCursorRec;
+ VDSetHardwareCursorRec = record
+ csCursorRef: Ptr; { reference to cursor data }
+ csReserved1: UInt32; { reserved for future use }
+ csReserved2: UInt32; { should be ignored }
+ end;
+
+ VDSetHardwareCursorPtr = ^VDSetHardwareCursorRec;
+ VDDrawHardwareCursorRecPtr = ^VDDrawHardwareCursorRec;
+ VDDrawHardwareCursorRec = record
+ csCursorX: SInt32; { x coordinate }
+ csCursorY: SInt32; { y coordinate }
+ csCursorVisible: UInt32; { true if cursor is must be visible }
+ csReserved1: UInt32; { reserved for future use }
+ csReserved2: UInt32; { should be ignored }
+ end;
+
+ VDDrawHardwareCursorPtr = ^VDDrawHardwareCursorRec;
+ VDSupportsHardwareCursorRecPtr = ^VDSupportsHardwareCursorRec;
+ VDSupportsHardwareCursorRec = record
+ csSupportsHardwareCursor: UInt32;
+ { true if hardware cursor is supported }
+ csReserved1: UInt32; { reserved for future use }
+ csReserved2: UInt32; { must be zero }
+ end;
+
+ VDSupportsHardwareCursorPtr = ^VDSupportsHardwareCursorRec;
+ VDHardwareCursorDrawStateRecPtr = ^VDHardwareCursorDrawStateRec;
+ VDHardwareCursorDrawStateRec = record
+ csCursorX: SInt32; { x coordinate }
+ csCursorY: SInt32; { y coordinate }
+ csCursorVisible: UInt32; { true if cursor is visible }
+ csCursorSet: UInt32; { true if cursor successfully set by last set control call }
+ csReserved1: UInt32; { reserved for future use }
+ csReserved2: UInt32; { must be zero }
+ end;
+
+ VDHardwareCursorDrawStatePtr = ^VDHardwareCursorDrawStateRec;
+ VDConvolutionInfoRecPtr = ^VDConvolutionInfoRec;
+ VDConvolutionInfoRec = record
+ csDisplayModeID: DisplayModeID; { the ID of the resolution we want info on }
+ csDepthMode: DepthMode; { The bit depth we want the info on (0x80 based) }
+ csPage: UInt32;
+ csFlags: UInt32;
+ csReserved: UInt32;
+ end;
+
+ VDConvolutionInfoPtr = ^VDConvolutionInfoRec;
+ VDPowerStateRecPtr = ^VDPowerStateRec;
+ VDPowerStateRec = record
+ powerState: UInt32;
+ powerFlags: UInt32;
+ powerReserved1: UInt32;
+ powerReserved2: UInt32;
+ end;
+
+ VDPowerStatePtr = ^VDPowerStateRec;
+ {
+ Private Data to video drivers.
+
+ In versions of MacOS with multiple address spaces (System 8), the OS
+ must know the extent of parameters in order to move them between the caller
+ and driver. The old private-selector model for video drivers does not have
+ this information so:
+
+ For post-7.x Systems private calls should be implemented using the cscPrivateCall
+ }
+ VDPrivateSelectorDataRecPtr = ^VDPrivateSelectorDataRec;
+ VDPrivateSelectorDataRec = record
+ privateParameters: LogicalAddress; { Caller's parameters }
+ privateParametersSize: ByteCount; { Size of data sent from caller to driver }
+ privateResults: LogicalAddress; { Caller's return area. Can be nil, or same as privateParameters. }
+ privateResultsSize: ByteCount; { Size of data driver returns to caller. Can be nil, or same as privateParametersSize. }
+ end;
+
+
+ VDPrivateSelectorRecPtr = ^VDPrivateSelectorRec;
+ VDPrivateSelectorRec = record
+ reserved: UInt32; { Reserved (set to 0). }
+ data: array [0..0] of VDPrivateSelectorDataRec;
+ end;
+
+ VDDDCBlockRecPtr = ^VDDDCBlockRec;
+ VDDDCBlockRec = record
+ ddcBlockNumber: UInt32; { Input -- DDC EDID (Extended Display Identification Data) number (1-based) }
+ ddcBlockType: ResType; { Input -- DDC block type (EDID/VDIF) }
+ ddcFlags: UInt32; { Input -- DDC Flags }
+ ddcReserved: UInt32; { Reserved }
+ ddcBlockData: packed array [0..127] of Byte; { Output -- DDC EDID/VDIF data (kDDCBlockSize) }
+ end;
+
+ VDDDCBlockPtr = ^VDDDCBlockRec;
+
+
+const
+ { timingSyncConfiguration }
+ kSyncInterlaceMask = $80;
+ kSyncAnalogCompositeMask = 0;
+ kSyncAnalogCompositeSerrateMask = $04;
+ kSyncAnalogCompositeRGBSyncMask = $02;
+ kSyncAnalogBipolarMask = $08;
+ kSyncAnalogBipolarSerrateMask = $04;
+ kSyncAnalogBipolarSRGBSyncMask = $02;
+ kSyncDigitalCompositeMask = $10;
+ kSyncDigitalCompositeSerrateMask = $04;
+ kSyncDigitalCompositeMatchHSyncMask = $04;
+ kSyncDigitalSeperateMask = $18;
+ kSyncDigitalVSyncPositiveMask = $04;
+ kSyncDigitalHSyncPositiveMask = $02;
+
+
+type
+ VDDisplayTimingRangeRecPtr = ^VDDisplayTimingRangeRec;
+ VDDisplayTimingRangeRec = record
+ csRangeSize: UInt32; { Init to sizeof(VDDisplayTimingRangeRec) }
+ csRangeType: UInt32; { Init to 0 }
+ csRangeVersion: UInt32; { Init to 0 }
+ csRangeReserved: UInt32; { Init to 0 }
+ csRangeBlockIndex: UInt32; { Requested block (first index is 0) }
+ csRangeGroup: UInt32; { set to 0 }
+ csRangeBlockCount: UInt32; { # blocks }
+ csRangeFlags: UInt32; { dependent video }
+ csMinPixelClock: UInt64; { Min dot clock in Hz }
+ csMaxPixelClock: UInt64; { Max dot clock in Hz }
+ csMaxPixelError: UInt32; { Max dot clock error }
+ csTimingRangeSyncFlags: UInt32;
+ csTimingRangeSignalLevels: UInt32;
+ csReserved0: UInt32;
+ csMinFrameRate: UInt32; { Hz }
+ csMaxFrameRate: UInt32; { Hz }
+ csMinLineRate: UInt32; { Hz }
+ csMaxLineRate: UInt32; { Hz }
+ csMaxHorizontalTotal: UInt32; { Clocks - Maximum total (active + blanking) }
+ csMaxVerticalTotal: UInt32; { Clocks - Maximum total (active + blanking) }
+ csMaxTotalReserved1: UInt32; { Reserved }
+ csMaxTotalReserved2: UInt32; { Reserved }
+ { Some cards require that some timing elements }
+ { be multiples of a "character size" (often 8 }
+ { clocks). The "xxxxCharSize" fields document }
+ { those requirements. }
+ csCharSizeHorizontalActive: SInt8; { Character size }
+ csCharSizeHorizontalBlanking: SInt8; { Character size }
+ csCharSizeHorizontalSyncOffset: SInt8; { Character size }
+ csCharSizeHorizontalSyncPulse: SInt8; { Character size }
+ csCharSizeVerticalActive: SInt8; { Character size }
+ csCharSizeVerticalBlanking: SInt8; { Character size }
+ csCharSizeVerticalSyncOffset: SInt8; { Character size }
+ csCharSizeVerticalSyncPulse: SInt8; { Character size }
+ csCharSizeHorizontalBorderLeft: SInt8; { Character size }
+ csCharSizeHorizontalBorderRight: SInt8; { Character size }
+ csCharSizeVerticalBorderTop: SInt8; { Character size }
+ csCharSizeVerticalBorderBottom: SInt8; { Character size }
+ csCharSizeHorizontalTotal: SInt8; { Character size for active + blanking }
+ csCharSizeVerticalTotal: SInt8; { Character size for active + blanking }
+ csCharSizeReserved1: UInt16; { Reserved (Init to 0) }
+ csMinHorizontalActiveClocks: UInt32;
+ csMaxHorizontalActiveClocks: UInt32;
+ csMinHorizontalBlankingClocks: UInt32;
+ csMaxHorizontalBlankingClocks: UInt32;
+ csMinHorizontalSyncOffsetClocks: UInt32;
+ csMaxHorizontalSyncOffsetClocks: UInt32;
+ csMinHorizontalPulseWidthClocks: UInt32;
+ csMaxHorizontalPulseWidthClocks: UInt32;
+ csMinVerticalActiveClocks: UInt32;
+ csMaxVerticalActiveClocks: UInt32;
+ csMinVerticalBlankingClocks: UInt32;
+ csMaxVerticalBlankingClocks: UInt32;
+ csMinVerticalSyncOffsetClocks: UInt32;
+ csMaxVerticalSyncOffsetClocks: UInt32;
+ csMinVerticalPulseWidthClocks: UInt32;
+ csMaxVerticalPulseWidthClocks: UInt32;
+ csMinHorizontalBorderLeft: UInt32;
+ csMaxHorizontalBorderLeft: UInt32;
+ csMinHorizontalBorderRight: UInt32;
+ csMaxHorizontalBorderRight: UInt32;
+ csMinVerticalBorderTop: UInt32;
+ csMaxVerticalBorderTop: UInt32;
+ csMinVerticalBorderBottom: UInt32;
+ csMaxVerticalBorderBottom: UInt32;
+ csReserved1: UInt32; { Reserved (Init to 0) }
+ csReserved2: UInt32; { Reserved (Init to 0) }
+ csReserved3: UInt32; { Reserved (Init to 0) }
+ csReserved4: UInt32; { Reserved (Init to 0) }
+ csReserved5: UInt32; { Reserved (Init to 0) }
+ csReserved6: UInt32; { Reserved (Init to 0) }
+ csReserved7: UInt32; { Reserved (Init to 0) }
+ csReserved8: UInt32; { Reserved (Init to 0) }
+ end;
+
+ VDDisplayTimingRangePtr = ^VDDisplayTimingRangeRec;
+
+
+const
+ { csDisplayModeState }
+ kDMSModeReady = 0; { Display Mode ID is configured and ready }
+ kDMSModeNotReady = 1; { Display Mode ID is is being programmed }
+ kDMSModeFree = 2; { Display Mode ID is not associated with a timing }
+
+
+ { Video driver Errors -10930 to -10959 }
+ kTimingChangeRestrictedErr = -10930;
+ kVideoI2CReplyPendingErr = -10931;
+ kVideoI2CTransactionErr = -10932;
+ kVideoI2CBusyErr = -10933;
+ kVideoI2CTransactionTypeErr = -10934;
+ kVideoBufferSizeErr = -10935;
+ kVideoCannotMirrorErr = -10936;
+
+
+ { csTimingRangeSignalLevels }
+ kRangeSupportsSignal_0700_0300_Bit = 0;
+ kRangeSupportsSignal_0714_0286_Bit = 1;
+ kRangeSupportsSignal_1000_0400_Bit = 2;
+ kRangeSupportsSignal_0700_0000_Bit = 3;
+ kRangeSupportsSignal_0700_0300_Mask = $01;
+ kRangeSupportsSignal_0714_0286_Mask = $02;
+ kRangeSupportsSignal_1000_0400_Mask = $04;
+ kRangeSupportsSignal_0700_0000_Mask = $08;
+
+
+ { csSignalConfig }
+ kDigitalSignalBit = 0; { Do not set. Mac OS does not currently support arbitrary digital timings }
+ kAnalogSetupExpectedBit = 1; { Analog displays - display expects a blank-to-black setup or pedestal. See VESA signal standards. }
+ kDigitalSignalMask = $01;
+ kAnalogSetupExpectedMask = $02;
+
+
+ { csSignalLevels for analog }
+ kAnalogSignalLevel_0700_0300 = 0;
+ kAnalogSignalLevel_0714_0286 = 1;
+ kAnalogSignalLevel_1000_0400 = 2;
+ kAnalogSignalLevel_0700_0000 = 3;
+
+
+ { csTimingRangeSyncFlags }
+ kRangeSupportsSeperateSyncsBit = 0;
+ kRangeSupportsSyncOnGreenBit = 1;
+ kRangeSupportsCompositeSyncBit = 2;
+ kRangeSupportsVSyncSerrationBit = 3;
+ kRangeSupportsSeperateSyncsMask = $01;
+ kRangeSupportsSyncOnGreenMask = $02;
+ kRangeSupportsCompositeSyncMask = $04;
+ kRangeSupportsVSyncSerrationMask = $08;
+
+
+ { csHorizontalSyncConfig and csVerticalSyncConfig }
+ kSyncPositivePolarityBit = 0; { Digital separate sync polarity for analog interfaces (0 => negative polarity) }
+ kSyncPositivePolarityMask = $01;
+
+
+ { For timings with kDetailedTimingFormat. }
+
+type
+ VDDetailedTimingRecPtr = ^VDDetailedTimingRec;
+ VDDetailedTimingRec = record
+ csTimingSize: UInt32; { Init to sizeof(VDDetailedTimingRec) }
+ csTimingType: UInt32; { Init to 0 }
+ csTimingVersion: UInt32; { Init to 0 }
+ csTimingReserved: UInt32; { Init to 0 }
+ csDisplayModeID: DisplayModeID; { Init to 0 }
+ csDisplayModeSeed: UInt32; { }
+ csDisplayModeState: UInt32; { Display Mode state }
+ csDisplayModeAlias: UInt32; { Mode to use when programmed. }
+ csSignalConfig: UInt32;
+ csSignalLevels: UInt32;
+ csPixelClock: UInt64; { Hz }
+ csMinPixelClock: UInt64; { Hz - With error what is slowest actual clock }
+ csMaxPixelClock: UInt64; { Hz - With error what is fasted actual clock }
+ csHorizontalActive: UInt32; { Pixels }
+ csHorizontalBlanking: UInt32; { Pixels }
+ csHorizontalSyncOffset: UInt32; { Pixels }
+ csHorizontalSyncPulseWidth: UInt32; { Pixels }
+ csVerticalActive: UInt32; { Lines }
+ csVerticalBlanking: UInt32; { Lines }
+ csVerticalSyncOffset: UInt32; { Lines }
+ csVerticalSyncPulseWidth: UInt32; { Lines }
+ csHorizontalBorderLeft: UInt32; { Pixels }
+ csHorizontalBorderRight: UInt32; { Pixels }
+ csVerticalBorderTop: UInt32; { Lines }
+ csVerticalBorderBottom: UInt32; { Lines }
+ csHorizontalSyncConfig: UInt32;
+ csHorizontalSyncLevel: UInt32; { Future use (init to 0) }
+ csVerticalSyncConfig: UInt32;
+ csVerticalSyncLevel: UInt32; { Future use (init to 0) }
+ csReserved1: UInt32; { Init to 0 }
+ csReserved2: UInt32; { Init to 0 }
+ csReserved3: UInt32; { Init to 0 }
+ csReserved4: UInt32; { Init to 0 }
+ csReserved5: UInt32; { Init to 0 }
+ csReserved6: UInt32; { Init to 0 }
+ csReserved7: UInt32; { Init to 0 }
+ csReserved8: UInt32; { Init to 0 }
+ end;
+
+ VDDetailedTimingPtr = ^VDDetailedTimingRec;
+
+
+const
+ { csScalerFeatures }
+ kScaleStretchOnlyMask = $01; { True means the driver cannot add borders to avoid non-square pixels }
+ kScaleCanUpSamplePixelsMask = $02; { True means timings with more active clocks than pixels (ie 640x480 pixels on a 1600x1200 timing) }
+ kScaleCanDownSamplePixelsMask = $04; { True means timings with fewer active clocks than pixels (ie 1600x1200 pixels on a 640x480 timing) }
+
+ { csScalerFlags }
+ kScaleStretchToFitMask = $01; { True means the driver should avoid borders and allow non-square pixels }
+
+
+type
+ VDClutBehavior = UInt32;
+ VDClutBehaviorPtr = ^VDClutBehavior;
+
+const
+ kSetClutAtSetEntries = 0; { SetEntries behavior is to update clut during SetEntries call }
+ kSetClutAtVBL = 1; { SetEntries behavior is to upate clut at next vbl }
+
+
+type
+ VDCommunicationRecPtr = ^VDCommunicationRec;
+ VDCommunicationRec = record
+ csBusID: SInt32; { kVideoDefaultBus for single headed cards. }
+ csCommFlags: UInt32; { Always zero }
+ csMinReplyDelay: UInt32; { Minimum delay between send and reply transactions (units depend on csCommFlags) }
+ csReserved2: UInt32; { Always zero }
+ csSendAddress: UInt32; { Usually I2C address (eg 0x6E) }
+ csSendType: UInt32; { See kVideoSimpleI2CType etc. }
+ csSendBuffer: LogicalAddress; { Pointer to the send buffer }
+ csSendSize: ByteCount; { Number of bytes to send }
+ csReplyAddress: UInt32; { Address from which to read (eg 0x6F for kVideoDDCciReplyType I2C address) }
+ csReplyType: UInt32; { See kVideoDDCciReplyType etc. }
+ csReplyBuffer: LogicalAddress; { Pointer to the reply buffer }
+ csReplySize: ByteCount; { Max bytes to reply (size of csReplyBuffer) }
+ csReserved3: UInt32;
+ csReserved4: UInt32;
+ csReserved5: UInt32; { Always zero }
+ csReserved6: UInt32; { Always zero }
+ end;
+
+ VDCommunicationPtr = ^VDCommunicationRec;
+ VDCommunicationInfoRecPtr = ^VDCommunicationInfoRec;
+ VDCommunicationInfoRec = record
+ csBusID: SInt32; { kVideoDefaultBus for single headed cards. }
+ csBusType: UInt32; { See kVideoBusI2C etc. }
+ csMinBus: SInt32; { Minimum bus (usually kVideoDefaultBus). Used to probe additional busses }
+ csMaxBus: SInt32; { Max bus (usually kVideoDefaultBus). Used to probe additional busses }
+ csSupportedTypes: UInt32; { Bit field for first 32 supported transaction types. Eg. 0x07 => support for kVideoNoTransactionType, kVideoSimpleI2CType and kVideoDDCciReplyType. }
+ csSupportedCommFlags: UInt32; { Return the flags csCommFlags understood by this driver. }
+ csReserved2: UInt32; { Always zero }
+ csReserved3: UInt32; { Always zero }
+ csReserved4: UInt32; { Always zero }
+ csReserved5: UInt32; { Always zero }
+ csReserved6: UInt32; { Always zero }
+ csReserved7: UInt32; { Always zero }
+ end;
+
+ VDCommunicationInfoPtr = ^VDCommunicationInfoRec;
+ VDScalerRecPtr = ^VDScalerRec;
+ VDScalerRec = record
+ csScalerSize: UInt32; { Init to sizeof(VDScalerRec) }
+ csScalerVersion: UInt32; { Init to 0 }
+ csReserved1: UInt32; { Init to 0 }
+ csReserved2: UInt32; { Init to 0 }
+ csDisplayModeID: DisplayModeID; { Display Mode ID modified by this call. }
+ csDisplayModeSeed: UInt32; { }
+ csDisplayModeState: UInt32; { Display Mode state }
+ csReserved3: UInt32; { Init to 0 }
+ csScalerFlags: UInt32; { Init to 0 }
+ csHorizontalPixels: UInt32; { Graphics system addressable pixels }
+ csVerticalPixels: UInt32; { Graphics system addressable lines }
+ csReserved4: UInt32; { Init to 0 }
+ csReserved5: UInt32; { Init to 0 }
+ csReserved6: UInt32; { Init to 0 }
+ csReserved7: UInt32; { Init to 0 }
+ csReserved8: UInt32; { Init to 0 }
+ end;
+
+ VDScalerPtr = ^VDScalerRec;
+ VDScalerInfoRecPtr = ^VDScalerInfoRec;
+ VDScalerInfoRec = record
+ csScalerInfoSize: UInt32; { Init to sizeof(VDScalerInfoRec) }
+ csScalerInfoVersion: UInt32; { Init to 0 }
+ csReserved1: UInt32; { Init to 0 }
+ csReserved2: UInt32; { Init to 0 }
+ csScalerFeatures: UInt32; { Feature flags }
+ csMaxHorizontalPixels: UInt32; { limit to horizontal scaled pixels }
+ csMaxVerticalPixels: UInt32; { limit to vertical scaled pixels }
+ csReserved3: UInt32; { Init to 0 }
+ csReserved4: UInt32; { Init to 0 }
+ csReserved5: UInt32; { Init to 0 }
+ csReserved6: UInt32; { Init to 0 }
+ csReserved7: UInt32; { Init to 0 }
+ end;
+
+ VDScalerInfoPtr = ^VDScalerInfoRec;
+
+const
+ { csMirrorFeatures }
+ kMirrorSameDepthOnlyMirrorMask = $01; { Commonly true - Mirroring can only be done if the displays are the same bitdepth }
+ kMirrorSameSizeOnlyMirrorMask = $02; { Commonly false - Mirroring can only be done if the displays are the same size }
+ kMirrorSameTimingOnlyMirrorMask = $04; { Sometimes true - Mirroring can only be done if the displays are the same timing }
+ kMirrorCommonGammaMask = $08; { Sometimes true - Only one gamma correction LUT. }
+
+ { csMirrorSupportedFlags and csMirrorFlags }
+ kMirrorCanMirrorMask = $01; { Set means we can HW mirrored right now (uses csMirrorEntryID) }
+ kMirrorAreMirroredMask = $02; { Set means we are HW mirrored right now (uses csMirrorEntryID) }
+ kMirrorUnclippedMirrorMask = $04; { Set means mirrored displays are not clipped to their intersection }
+ kMirrorHAlignCenterMirrorMask = $08; { Set means mirrored displays can/should be centered horizontally }
+ kMirrorVAlignCenterMirrorMask = $10; { Set means mirrored displays can/should be centered vertically }
+ kMirrorCanChangePixelFormatMask = $20; { Set means mirrored the device should change the pixel format of mirrored displays to allow mirroring. }
+ kMirrorCanChangeTimingMask = $40; { Set means mirrored the device should change the timing of mirrored displays to allow mirroring. }
+
+
+type
+ VDMirrorRecPtr = ^VDMirrorRec;
+ VDMirrorRec = record
+ csMirrorSize: UInt32; { Init to sizeof(VDMirrorRec) }
+ csMirrorVersion: UInt32; { Init to 0 }
+ csMirrorRequestID: RegEntryID; { Input RegEntryID to check for mirroring support and state }
+ csMirrorResultID: RegEntryID; { Output RegEntryID of the next mirrored device }
+ csMirrorFeatures: UInt32; { Output summary features of the driver }
+ csMirrorSupportedFlags: UInt32; { Output configuration options supported by the driver }
+ csMirrorFlags: UInt32; { Output configuration options active now }
+ csReserved1: UInt32; { Init to 0 }
+ csReserved2: UInt32; { Init to 0 }
+ csReserved3: UInt32; { Init to 0 }
+ csReserved4: UInt32; { Init to 0 }
+ csReserved5: UInt32; { Init to 0 }
+ end;
+
+ VDMirrorPtr = ^VDMirrorRec;
+{$ALIGN MAC68K}
+
+
+{unit ATSFont}
+{
+ File: ATSFont.p
+
+ Contains: Public interface to the font access and data management functions of ATS.
+
+ Version: Technology: Mac OS
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 2000-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ kATSOptionFlagsDefault = 0;
+ kATSOptionFlagsComposeFontPostScriptName = $01; { ATSFontGetPostScriptName }
+ kATSOptionFlagsUseDataForkAsResourceFork = $0100; { ATSFontActivateFromFileSpecification }
+ kATSOptionFlagsUseResourceFork = $0200;
+ kATSOptionFlagsUseDataFork = $0300;
+
+ kATSIterationCompleted = -980;
+ kATSInvalidFontFamilyAccess = -981;
+ kATSInvalidFontAccess = -982;
+ kATSIterationScopeModified = -983;
+ kATSInvalidFontTableAccess = -984;
+ kATSInvalidFontContainerAccess = -985;
+ kATSInvalidGlyphAccess = -986;
+
+
+type
+ ATSFontContext = UInt32;
+
+const
+ kATSFontContextUnspecified = 0;
+ kATSFontContextGlobal = 1;
+ kATSFontContextLocal = 2;
+
+const
+ kATSOptionFlagsProcessSubdirectories = $00000001 shl 6; { Used by activation/deactivation & iteration }
+ kATSOptionFlagsDoNotNotify = $00000001 shl 7; { Do not notify after global activation/deactivation }
+
+{ Iteration Option Flags }
+const
+ kATSOptionFlagsIterateByPrecedenceMask = $00000001 shl 5;
+ kATSOptionFlagsIterationScopeMask = $00000007 shl 12; { Mask option bits 12-14 for iteration scopes }
+ kATSOptionFlagsDefaultScope = $00000000 shl 12;
+ kATSOptionFlagsUnRestrictedScope = $00000001 shl 12;
+ kATSOptionFlagsRestrictedScope = $00000002 shl 12;
+
+
+type
+ ATSFontFormat = UInt32;
+
+const
+ kATSFontFormatUnspecified = 0;
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ ATSFontFamilyApplierFunction = function(iFamily: ATSFontFamilyRef; iRefCon: UnivPtr): OSStatus;
+{$elsec}
+ ATSFontFamilyApplierFunction = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ ATSFontApplierFunction = function(iFont: ATSFontRef; iRefCon: UnivPtr): OSStatus;
+{$elsec}
+ ATSFontApplierFunction = ProcPtr;
+{$endc}
+
+ ATSFontFamilyIterator = ^SInt32; { an opaque 32-bit type }
+ ATSFontFamilyIteratorPtr = ^ATSFontFamilyIterator; { when a var xx:ATSFontFamilyIterator parameter can be nil, it is changed to xx: ATSFontFamilyIteratorPtr }
+ ATSFontIterator = ^SInt32; { an opaque 32-bit type }
+ ATSFontIteratorPtr = ^ATSFontIterator; { when a var xx:ATSFontIterator parameter can be nil, it is changed to xx: ATSFontIteratorPtr }
+
+const
+ kATSFontFilterCurrentVersion = 0;
+
+
+type
+ ATSFontFilterSelector = SInt32;
+const
+ kATSFontFilterSelectorUnspecified = 0;
+ kATSFontFilterSelectorGeneration = 3;
+ kATSFontFilterSelectorFontFamily = 7;
+ kATSFontFilterSelectorFontFamilyApplierFunction = 8;
+ kATSFontFilterSelectorFontApplierFunction = 9;
+
+
+type
+ ATSFontFilterPtr = ^ATSFontFilter;
+ ATSFontFilter = record
+ version: UInt32;
+ filterSelector: ATSFontFilterSelector;
+ case SInt16 of
+ 0: (
+ generationFilter: ATSGeneration;
+ );
+ 1: (
+ fontFamilyFilter: ATSFontFamilyRef;
+ );
+ 2: (
+ fontFamilyApplierFunctionFilter: ATSFontFamilyApplierFunction;
+ );
+ 3: (
+ fontApplierFunctionFilter: ATSFontApplierFunction;
+ );
+ end;
+
+{ Notification related }
+type
+ ATSFontNotificationRef = ^SInt32; { an opaque 32-bit type }
+ ATSFontNotificationRefPtr = ^ATSFontNotificationRef;
+ ATSFontNotificationInfoRef = ^SInt32; { an opaque 32-bit type }
+ ATSFontNotificationInfoRefPtr = ^ATSFontNotificationInfoRef;
+
+{
+ * ATSFontNotifyOption
+ *
+ * Discussion:
+ * Options used with ATSFontNotificationSubscribe. Any of the
+ * options that follow may be used together in order to alter the
+ * default behavior of ATS notifications.
+ }
+type
+ ATSFontNotifyOption = SInt32;
+const
+
+ {
+ * Default behavior of ATSFontNotificationSubscribe.
+ }
+ kATSFontNotifyOptionDefault = 0;
+
+ {
+ * Normally applications will only receive ATS notifications while in
+ * the foreground. If suspended, the notification will be delivered
+ * when then application comes to the foreground. This is the
+ * default. You should set this option if you are a server or tool
+ * that performs font management functions and require immediate
+ * notification when something changes.
+ }
+ kATSFontNotifyOptionReceiveWhileSuspended = 1 shl 0;
+
+{
+ * ATSFontNotifyAction
+ *
+ * Discussion:
+ * Used with ATSFontNotify. The following is a list of actions you
+ * might wish the ATS server to perform and notify clients if
+ * appropriate.
+ }
+type
+ ATSFontNotifyAction = SInt32;
+const
+
+ {
+ * Used after a batch (de)activation of fonts occurs. Typically the
+ * caller has exercised multiple global (De)Activation calls with the
+ * kATSOptionFlagsDoNotNotify set. Once all calls are completed, one
+ * may use ATSFontNotify with this action to ask ATS to notify all
+ * clients.
+ }
+ kATSFontNotifyActionFontsChanged = 1;
+
+ {
+ * The ATS system with the help of the Finder keeps track of changes
+ * to any of the font directories in the system domains ( System,
+ * Local, Network, User, & Classic). However, one may wish to
+ * add/remove fonts to these locations programmatically. This action
+ * is used to let ATS server to rescan these directories and post
+ * notifications if necessary.
+ }
+ kATSFontNotifyActionDirectoriesChanged = 2;
+
+
+{
+ * ATSNotificationCallback
+ *
+ * Discussion:
+ * Callback delivered for ATS notifications.
+ *
+ * Parameters:
+ *
+ * info:
+ * Parameter is placed here for future improvements. Initially
+ * the contents of this parameter will be NULL.
+ *
+ * refCon:
+ * User data/state to be supplied to callback function
+ }
+type ATSNotificationCallback = procedure( info: ATSFontNotificationInfoRef; refCon: UnivPtr );
+
+ { ----------------------------------------------------------------------------------------- }
+ { Font container }
+ { ----------------------------------------------------------------------------------------- }
+ {
+ * ATSGetGeneration()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSGetGeneration: ATSGeneration; external name '_ATSGetGeneration';
+
+{
+ * ATSFontActivateFromFileSpecification()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontActivateFromFileSpecification(const (*var*) iFile: FSSpec; iContext: ATSFontContext; iFormat: ATSFontFormat; iReserved: UnivPtr; iOptions: ATSOptionFlags; var oContainer: ATSFontContainerRef): OSStatus; external name '_ATSFontActivateFromFileSpecification';
+
+{
+ * ATSFontActivateFromMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontActivateFromMemory(iData: LogicalAddress; iLength: ByteCount; iContext: ATSFontContext; iFormat: ATSFontFormat; iReserved: UnivPtr; iOptions: ATSOptionFlags; var oContainer: ATSFontContainerRef): OSStatus; external name '_ATSFontActivateFromMemory';
+
+{
+ * ATSFontDeactivate()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontDeactivate(iContainer: ATSFontContainerRef; iRefCon: UnivPtr; iOptions: ATSOptionFlags): OSStatus; external name '_ATSFontDeactivate';
+
+{ ----------------------------------------------------------------------------------------- }
+{ Font family }
+{ ----------------------------------------------------------------------------------------- }
+{
+ * ATSFontFamilyApplyFunction()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontFamilyApplyFunction(iFunction: ATSFontFamilyApplierFunction; iRefCon: UnivPtr): OSStatus; external name '_ATSFontFamilyApplyFunction';
+
+{
+ * ATSFontFamilyIteratorCreate()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontFamilyIteratorCreate(iContext: ATSFontContext; iFilter: {Const}ATSFontFilterPtr; iRefCon: UnivPtr; iOptions: ATSOptionFlags; var ioIterator: ATSFontFamilyIterator): OSStatus; external name '_ATSFontFamilyIteratorCreate';
+
+{
+ * ATSFontFamilyIteratorRelease()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontFamilyIteratorRelease(var ioIterator: ATSFontFamilyIterator): OSStatus; external name '_ATSFontFamilyIteratorRelease';
+
+{
+ * ATSFontFamilyIteratorReset()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontFamilyIteratorReset(iContext: ATSFontContext; iFilter: {Const}ATSFontFilterPtr; iRefCon: UnivPtr; iOptions: ATSOptionFlags; var ioIterator: ATSFontFamilyIterator): OSStatus; external name '_ATSFontFamilyIteratorReset';
+
+{
+ * ATSFontFamilyIteratorNext()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontFamilyIteratorNext(iIterator: ATSFontFamilyIterator; var oFamily: ATSFontFamilyRef): OSStatus; external name '_ATSFontFamilyIteratorNext';
+
+{
+ * ATSFontFamilyFindFromName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontFamilyFindFromName(iName: CFStringRef; iOptions: ATSOptionFlags): ATSFontFamilyRef; external name '_ATSFontFamilyFindFromName';
+
+{
+ * ATSFontFamilyGetGeneration()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontFamilyGetGeneration(iFamily: ATSFontFamilyRef): ATSGeneration; external name '_ATSFontFamilyGetGeneration';
+
+{
+ * ATSFontFamilyGetName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontFamilyGetName(iFamily: ATSFontFamilyRef; iOptions: ATSOptionFlags; var oName: CFStringRef): OSStatus; external name '_ATSFontFamilyGetName';
+
+{
+ * ATSFontFamilyGetEncoding()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontFamilyGetEncoding(iFamily: ATSFontFamilyRef): TextEncoding; external name '_ATSFontFamilyGetEncoding';
+
+{ ----------------------------------------------------------------------------------------- }
+{ Font }
+{ ----------------------------------------------------------------------------------------- }
+{
+ * ATSFontApplyFunction()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontApplyFunction(iFunction: ATSFontApplierFunction; iRefCon: UnivPtr): OSStatus; external name '_ATSFontApplyFunction';
+
+{
+ * ATSFontIteratorCreate()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontIteratorCreate(iContext: ATSFontContext; iFilter: {Const}ATSFontFilterPtr; iRefCon: UnivPtr; iOptions: ATSOptionFlags; var ioIterator: ATSFontIterator): OSStatus; external name '_ATSFontIteratorCreate';
+
+{
+ * ATSFontIteratorRelease()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontIteratorRelease(var ioIterator: ATSFontIterator): OSStatus; external name '_ATSFontIteratorRelease';
+
+{
+ * ATSFontIteratorReset()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontIteratorReset(iContext: ATSFontContext; iFilter: {Const}ATSFontFilterPtr; iRefCon: UnivPtr; iOptions: ATSOptionFlags; var ioIterator: ATSFontIterator): OSStatus; external name '_ATSFontIteratorReset';
+
+{
+ * ATSFontIteratorNext()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontIteratorNext(iIterator: ATSFontIterator; var oFont: ATSFontRef): OSStatus; external name '_ATSFontIteratorNext';
+
+{
+ * ATSFontFindFromName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontFindFromName(iName: CFStringRef; iOptions: ATSOptionFlags): ATSFontRef; external name '_ATSFontFindFromName';
+
+{
+ * ATSFontFindFromPostScriptName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontFindFromPostScriptName(iName: CFStringRef; iOptions: ATSOptionFlags): ATSFontRef; external name '_ATSFontFindFromPostScriptName';
+
+{
+ * ATSFontFindFromContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontFindFromContainer(iContainer: ATSFontContainerRef; iOptions: ATSOptionFlags; iCount: ItemCount; var ioArray: ATSFontRef; var oCount: ItemCount): OSStatus; external name '_ATSFontFindFromContainer';
+
+{
+ * ATSFontGetGeneration()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontGetGeneration(iFont: ATSFontRef): ATSGeneration; external name '_ATSFontGetGeneration';
+
+{
+ * ATSFontGetName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontGetName(iFont: ATSFontRef; iOptions: ATSOptionFlags; var oName: CFStringRef): OSStatus; external name '_ATSFontGetName';
+
+{
+ * ATSFontGetPostScriptName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontGetPostScriptName(iFont: ATSFontRef; iOptions: ATSOptionFlags; var oName: CFStringRef): OSStatus; external name '_ATSFontGetPostScriptName';
+
+{
+ * ATSFontGetTableDirectory()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontGetTableDirectory(iFont: ATSFontRef; iBufferSize: ByteCount; ioBuffer: UnivPtr; oSize: ByteCountPtr): OSStatus; external name '_ATSFontGetTableDirectory';
+
+{
+ * ATSFontGetTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontGetTable(iFont: ATSFontRef; iTag: FourCharCode; iOffset: ByteOffset; iBufferSize: ByteCount; ioBuffer: UnivPtr; oSize: ByteCountPtr): OSStatus; external name '_ATSFontGetTable';
+
+{
+ * ATSFontGetHorizontalMetrics()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontGetHorizontalMetrics(iFont: ATSFontRef; iOptions: ATSOptionFlags; var oMetrics: ATSFontMetrics): OSStatus; external name '_ATSFontGetHorizontalMetrics';
+
+{
+ * ATSFontGetVerticalMetrics()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontGetVerticalMetrics(iFont: ATSFontRef; iOptions: ATSOptionFlags; var oMetrics: ATSFontMetrics): OSStatus; external name '_ATSFontGetVerticalMetrics';
+
+{ ----------------------------------------------------------------------------------------- }
+{ Compatibiity }
+{ ----------------------------------------------------------------------------------------- }
+{
+ * ATSFontFamilyFindFromQuickDrawName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontFamilyFindFromQuickDrawName(const (*var*) iName: Str255): ATSFontFamilyRef; external name '_ATSFontFamilyFindFromQuickDrawName';
+
+{
+ * ATSFontFamilyGetQuickDrawName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontFamilyGetQuickDrawName(iFamily: ATSFontFamilyRef; var oName: Str255): OSStatus; external name '_ATSFontFamilyGetQuickDrawName';
+
+{
+ * ATSFontGetFileSpecification()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontGetFileSpecification(iFont: ATSFontRef; var oFile: FSSpec): OSStatus; external name '_ATSFontGetFileSpecification';
+
+{
+ * ATSFontGetFontFamilyResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ATSFontGetFontFamilyResource(iFont: ATSFontRef; iBufferSize: ByteCount; ioBuffer: UnivPtr; oSize: ByteCountPtr): OSStatus; external name '_ATSFontGetFontFamilyResource';
+
+{ ----------------------------------------------------------------------------------------- }
+{ Notification }
+{ ----------------------------------------------------------------------------------------- }
+{
+ * ATSFontNotify()
+ *
+ * Summary:
+ * Used to alert ATS that an action which may require notification
+ * to clients has occurred.
+ *
+ * Parameters:
+ *
+ * action:
+ * Action that should be taken by the ATS Server
+ *
+ * info:
+ * Any required or optional information that may be required by
+ * the action taken. can be NULL
+ *
+ * Result:
+ * noErr Action successfully reported paramErr Invalid action passed
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function ATSFontNotify( action: ATSFontNotifyAction; info: UnivPtr ): OSStatus; external name '_ATSFontNotify';
+
+
+{
+ * ATSFontNotificationSubscribe()
+ *
+ * Summary:
+ * Ask the ATS System to notify caller when certain events have
+ * occurred. Note that your application must have a CFRunLoop in
+ * order to receive notifications. Any Appkit or Carbon event loop
+ * based application will have one by default.
+ *
+ * Parameters:
+ *
+ * callback:
+ * Function that will be called by the ATS system whenever an
+ * event of interest takes place.
+ *
+ * options:
+ * Set the wanted ATSFontNotificationOptions to modify the default
+ * behavior of ATS Notifications.
+ *
+ * iRefcon:
+ * User data/state which will be passed to the callback funtion. can be NULL
+ *
+ * oNotificationRef:
+ * You may use this reference to un-subscribe to this notification. can be NULL
+ *
+ * Result:
+ * noErr Subscribed successfully paramErr NULL callback was passed.
+ * memFullErr Could not allocate enough memory for internal data
+ * structures.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function ATSFontNotificationSubscribe( callback: ATSNotificationCallback; options: ATSFontNotifyOption; iRefcon: UnivPtr; oNotificationRef: ATSFontNotificationRefPtr ): OSStatus; external name '_ATSFontNotificationSubscribe';
+
+
+{
+ * ATSFontNotificationUnsubscribe()
+ *
+ * Summary:
+ * Release subscription and stop receiving notifications for a given
+ * reference.
+ *
+ * Parameters:
+ *
+ * notificationRef:
+ * Notification reference for which you want to stop receiving
+ * notifications. Note, if more than one notification has been
+ * requested of ATS, you will still receive notifications on those
+ * requests.
+ *
+ * Result:
+ * noErr Unsubscribed successfully paramErr NULL/invalid
+ * notificationRef passed
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function ATSFontNotificationUnsubscribe( notificationRef: ATSFontNotificationRef ): OSStatus; external name '_ATSFontNotificationUnsubscribe';
+
+
+{ ----------------------------------------------------------------------------------------- }
+{ Font query message hooks }
+{ ----------------------------------------------------------------------------------------- }
+
+{
+ * ATSFontQuerySourceContext
+ *
+ * Summary:
+ * A parameter block for client information to be retained by ATS
+ * and passed back to an ATSFontQueryCallback function.
+ }
+type
+ ATSFontQuerySourceContext = record
+
+ {
+ * A 32-bit unsigned integer that indicates the version of this
+ * structure. This should be set to 0.
+ }
+ version: UInt32;
+
+ {
+ * A pointer-sized client datum that should be passed back to an
+ * ATSFontQueryCallback function.
+ }
+ refCon: Ptr;
+
+ {
+ * The callback used to add a retain to the refCon.
+ }
+ retain: CFAllocatorRetainCallBack;
+
+ {
+ * The callback used to remove a retain to the refCon.
+ }
+ release: CFAllocatorReleaseCallBack;
+ end;
+ ATSFontQuerySourceContextPtr = ^ATSFontQuerySourceContext;
+
+{
+ * ATSFontQueryMessageID
+ *
+ * Discussion:
+ * Constants for ATS font query message types.
+ }
+type
+ ATSFontQueryMessageID = SInt32;
+const
+
+ {
+ * The message ID for a font request query. The data for a message
+ * with this ID is a flattened CFDictionaryRef with keys and values
+ * as decribed below. A query dictionary may have any or all of these
+ * entries.
+ }
+ kATSQueryActivateFontMessage = $61747361 (* 'atsa' *);
+
+
+{
+ * ATSFontQueryCallback
+ *
+ * Summary:
+ * Callback for receiving font-related queries from ATS.
+ *
+ * Parameters:
+ *
+ * msgid:
+ * An ATSFontQueryMessageID that identifies the message type.
+ *
+ * data:
+ * A CFPropertyListRef that represents the query. The content is
+ * message type-specific.
+ *
+ * refCon:
+ * A pointer-sized client datum that was optionally provided to
+ * ATSCreateFontQueryRunLoopSource.
+ *
+ * Result:
+ * A CFPropertyListRef that represents the message type-specific
+ * response to the query. May be NULL.
+ }
+type ATSFontQueryCallback = function( msgid: ATSFontQueryMessageID; data: CFPropertyListRef; refCon: UnivPtr ): CFPropertyListRef;
+{
+ * ATSCreateFontQueryRunLoopSource()
+ *
+ * Summary:
+ * Creates a CFRunLoopSourceRef that will be used to convey font
+ * queries from ATS.
+ *
+ * Parameters:
+ *
+ * queryOrder:
+ * A CFIndex that specifies the priority of this query receiver
+ * relative to others. When ATS makes a font query, it will send
+ * the query to each receiver in priority order, from highest to
+ * lowest. "Normal" priority is 0.
+ *
+ * sourceOrder:
+ * The order of the created run loop source.
+ *
+ * callout:
+ * A function pointer of type ATSFontQueryCallback that will be
+ * called to process a font query.
+ *
+ * context:
+ * An ATSFontQuerySourceContext parameter block that provides a
+ * pointer-sized client datum which will be retained by ATS and
+ * passed to the callout function. May be NULL.
+ *
+ * Result:
+ * A CFRunLoopSourceRef. To stop receiving queries, invalidate this
+ * run loop source.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function ATSCreateFontQueryRunLoopSource( queryOrder: CFIndex; sourceOrder: CFIndex; callout: ATSFontQueryCallback; context: ATSFontQuerySourceContextPtr ): CFRunLoopSourceRef; external name '_ATSCreateFontQueryRunLoopSource';
+
+{ ----------------------------------------------------------------------------------------- }
+{ Font request query message content }
+{ ----------------------------------------------------------------------------------------- }
+{ Keys in a font request query dictionary. }
+{ These keys appear in the dictionary for a kATSQueryActivateFontMessage query. }
+
+//const
+{
+ * kATSQueryClientPID
+ *
+ * Discussion:
+ * The process ID of the application making the query. The
+ * corresponding value is a CFNumberRef that contains a pid_t.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kATSQueryClientPID CFSTRP('ATS client pid')}
+{$endc}
+
+{
+ * kATSQueryQDFamilyName
+ *
+ * Discussion:
+ * The Quickdraw-style family name of the font being requested, e.g.
+ * the name passed to GetFNum. The corresponding value is a
+ * CFStringRef.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kATSQueryQDFamilyName CFSTRP('font family name')}
+{$endc}
+
+{
+ * kATSQueryFontName
+ *
+ * Discussion:
+ * The name of the font being requested. The corresponding value is
+ * a CFStringRef suitable as an argument to ATSFontFindFromName().
+ * This should match a candidate font's unique or full name.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kATSQueryFontName CFSTRP('font name')}
+{$endc}
+
+{
+ * kATSQueryFontPostScriptName
+ *
+ * Discussion:
+ * The PostScript name of the font being requested. The
+ * corresponding value is a CFStringRef suitable as an argument to
+ * ATSFontFindFromPostScriptName(). This should match either the
+ * PostScript name derived from the font's FOND resource or its sfnt
+ * name table, with preference given to the FOND PostScript name.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kATSQueryFontPostScriptName CFSTRP('font PS name')}
+{$endc}
+
+{
+ * kATSQueryFontNameTableEntries
+ *
+ * Discussion:
+ * A descriptor for sfnt name table entries that the requested font
+ * must have. The corresponding value is a CFArrayRef of
+ * CFDictionaryRefs that describe name table entries. A font must
+ * have all of the specified entries to be considered a match.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kATSQueryFontNameTableEntries CFSTRP('font name table entries')}
+{$endc}
+{ Keys in a font raw name descriptor dictionary. }
+
+{
+ * kATSFontNameTableCode
+ *
+ * Discussion:
+ * The font name's name code. The corresponding value is a
+ * CFNumberRef. If missing, assume kFontNoNameCode.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kATSFontNameTableCode CFSTRP('font name code')}
+{$endc}
+
+{
+ * kATSFontNameTablePlatform
+ *
+ * Discussion:
+ * The font name's platform code. The corresponding value is a
+ * CFNumberRef. If missing, assume kFontNoPlatformCode.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kATSFontNameTablePlatform CFSTRP('font platform code')}
+{$endc}
+
+{
+ * kATSFontNameTableScript
+ *
+ * Discussion:
+ * The font name's script code. The corresponding value is a
+ * CFNumberRef. If missing, assume kFontNoScriptCode.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kATSFontNameTableScript CFSTRP('font script code')}
+{$endc}
+
+{
+ * kATSFontNameTableLanguage
+ *
+ * Discussion:
+ * The font name's language code. The corresponding value is a
+ * CFNumberRef. If missing, assume kFontNoLanguageCode.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kATSFontNameTableLanguage CFSTRP('font language code')}
+{$endc}
+
+{
+ * kATSFontNameTableBytes
+ *
+ * Discussion:
+ * The raw bytes of the font name. The corresponding value is a
+ * CFDataRef that contains the raw name bytes.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kATSFontNameTableBytes CFSTRP('font name table bytes')}
+{$endc}
+
+{$ALIGN MAC68K}
+
+
+{unit CFPreferences}
+{ CFPreferences.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, September 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+var kCFPreferencesAnyApplication: CFStringRef; external name '_kCFPreferencesAnyApplication'; (* attribute const *)
+var kCFPreferencesCurrentApplication: CFStringRef; external name '_kCFPreferencesCurrentApplication'; (* attribute const *)
+var kCFPreferencesAnyHost: CFStringRef; external name '_kCFPreferencesAnyHost'; (* attribute const *)
+var kCFPreferencesCurrentHost: CFStringRef; external name '_kCFPreferencesCurrentHost'; (* attribute const *)
+var kCFPreferencesAnyUser: CFStringRef; external name '_kCFPreferencesAnyUser'; (* attribute const *)
+var kCFPreferencesCurrentUser: CFStringRef; external name '_kCFPreferencesCurrentUser'; (* attribute const *)
+
+{ NOTE: All CFPropertyListRef values returned from
+ CFPreferences API should be assumed to be immutable.
+}
+
+{ The "App" functions search the various sources of defaults that
+ apply to the given application, and should never be called with
+ kCFPreferencesAnyApplication - only kCFPreferencesCurrentApplication
+ or an application's ID (its bundle identifier).
+}
+
+{ Searches the various sources of application defaults to find the
+value for the given key. key must not be NULL. If a value is found,
+it returns it; otherwise returns NULL. Caller must release the
+returned value }
+function CFPreferencesCopyAppValue( key: CFStringRef; applicationID: CFStringRef ): CFPropertyListRef; external name '_CFPreferencesCopyAppValue';
+
+{ Convenience to interpret a preferences value as a boolean directly.
+Returns false if the key doesn't exist, or has an improper format; under
+those conditions, keyExistsAndHasValidFormat (if non-NULL) is set to false }
+function CFPreferencesGetAppBooleanValue( key: CFStringRef; applicationID: CFStringRef; var keyExistsAndHasValidFormat: Boolean ): Boolean; external name '_CFPreferencesGetAppBooleanValue';
+
+{ Convenience to interpret a preferences value as an integer directly.
+Returns 0 if the key doesn't exist, or has an improper format; under
+those conditions, keyExistsAndHasValidFormat (if non-NULL) is set to false }
+function CFPreferencesGetAppIntegerValue( key: CFStringRef; applicationID: CFStringRef; var keyExistsAndHasValidFormat: Boolean ): CFIndex; external name '_CFPreferencesGetAppIntegerValue';
+
+{ Sets the given value for the given key in the "normal" place for
+application preferences. key must not be NULL. If value is NULL,
+key is removed instead. }
+procedure CFPreferencesSetAppValue( key: CFStringRef; value: CFPropertyListRef; applicationID: CFStringRef ); external name '_CFPreferencesSetAppValue';
+
+{ Adds the preferences for the given suite to the app preferences for
+ the specified application. To write to the suite domain, use
+ CFPreferencesSetValue(), below, using the suiteName in place
+ of the appName }
+procedure CFPreferencesAddSuitePreferencesToApp( applicationID: CFStringRef; suiteID: CFStringRef ); external name '_CFPreferencesAddSuitePreferencesToApp';
+
+procedure CFPreferencesRemoveSuitePreferencesFromApp( applicationID: CFStringRef; suiteID: CFStringRef ); external name '_CFPreferencesRemoveSuitePreferencesFromApp';
+
+{ Writes all changes in all sources of application defaults.
+Returns success or failure. }
+function CFPreferencesAppSynchronize( applicationID: CFStringRef ): Boolean; external name '_CFPreferencesAppSynchronize';
+
+{ The primitive get mechanism; all arguments must be non-NULL
+(use the constants above for common values). Only the exact
+location specified by app-user-host is searched. The returned
+CFType must be released by the caller when it is finished with it. }
+function CFPreferencesCopyValue( key: CFStringRef; applicationID: CFStringRef; userName: CFStringRef; hostName: CFStringRef ): CFPropertyListRef; external name '_CFPreferencesCopyValue';
+
+{ 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. }
+function CFPreferencesCopyMultiple( keysToFetch: CFArrayRef; applicationID: CFStringRef; userName: CFStringRef; hostName: CFStringRef ): CFDictionaryRef; external name '_CFPreferencesCopyMultiple';
+
+{ The primitive set function; all arguments except value must be
+non-NULL. If value is NULL, the given key is removed }
+procedure CFPreferencesSetValue( key: CFStringRef; value: CFPropertyListRef; applicationID: CFStringRef; userName: CFStringRef; hostName: CFStringRef ); external name '_CFPreferencesSetValue';
+
+{ Convenience to set multiple values at once. Behavior is undefined
+if a key is in both keysToSet and keysToRemove }
+procedure CFPreferencesSetMultiple( keysToSet: CFDictionaryRef; keysToRemove: CFArrayRef; applicationID: CFStringRef; userName: CFStringRef; hostName: CFStringRef ); external name '_CFPreferencesSetMultiple';
+
+function CFPreferencesSynchronize( applicationID: CFStringRef; userName: CFStringRef; hostName: CFStringRef ): Boolean; external name '_CFPreferencesSynchronize';
+
+{ Constructs and returns the list of the name of all applications
+which have preferences in the scope of the given user and host.
+The returned value must be released by the caller; neither argument
+may be NULL. }
+function CFPreferencesCopyApplicationList( userName: CFStringRef; hostName: CFStringRef ): CFArrayRef; external name '_CFPreferencesCopyApplicationList';
+
+{ Constructs and returns the list of all keys set in the given
+location. The returned value must be released by the caller;
+all arguments must be non-NULL }
+function CFPreferencesCopyKeyList( applicationID: CFStringRef; userName: CFStringRef; hostName: CFStringRef ): CFArrayRef; external name '_CFPreferencesCopyKeyList';
+
+{#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED}
+
+{ Function to determine whether or not a given key has been imposed on the
+user - In cases where machines and/or users are under some kind of management,
+callers should use this function to determine whether or not to disable UI elements
+corresponding to those preference keys. }
+function CFPreferencesAppValueIsForced( key: CFStringRef; applicationID: CFStringRef ): Boolean; external name '_CFPreferencesAppValueIsForced';
+
+{#endif}
+
+
+{unit CGBitmapContext}
+{ CoreGraphics - CGBitmapContext.h
+ * Copyright (c) 2000 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ Create a bitmap context. The context draws into a bitmap which is
+ * `width' pixels wide and `height' pixels high. The number of components
+ * for each pixel is specified by `colorspace', which also may specify a
+ * destination color profile. The number of bits for each component of a
+ * pixel is specified by `bitsPerComponent', which must be 1, 2, 4, or 8.
+ * Each row of the bitmap consists of `bytesPerRow' bytes, which must be at
+ * least `(width * bitsPerComponent * number of components + 7)/8' bytes.
+ * `data' points a block of memory at least `bytesPerRow * height' bytes.
+ * `bitmapInfo' specifies whether the bitmap should contain an alpha
+ * channel and how it's to be generated, along with whether the components
+ * are floating-point or integer. }
+
+function CGBitmapContextCreate( data: UnivPtr; width: size_t; height: size_t; bitsPerComponent: size_t; bytesPerRow: size_t; colorspace: CGColorSpaceRef; bitmapInfo: CGBitmapInfo ): CGContextRef; external name '_CGBitmapContextCreate';
+
+{ Return the data associated with the bitmap context `c', or NULL if `c'
+ * is not a bitmap context. }
+
+function CGBitmapContextGetData( c: CGContextRef ): UnivPtr; external name '_CGBitmapContextGetData'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return the width of the bitmap context `c', or 0 if `c' is not a bitmap
+ * context. }
+
+function CGBitmapContextGetWidth( c: CGContextRef ): size_t; external name '_CGBitmapContextGetWidth'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return the height of the bitmap context `c', or 0 if `c' is not a bitmap
+ * context. }
+
+function CGBitmapContextGetHeight( c: CGContextRef ): size_t; external name '_CGBitmapContextGetHeight'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return the bits per component of the bitmap context `c', or 0 if `c' is
+ * not a bitmap context. }
+
+function CGBitmapContextGetBitsPerComponent( c: CGContextRef ): size_t; external name '_CGBitmapContextGetBitsPerComponent'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return the bits per pixel of the bitmap context `c', or 0 if `c' is not
+ * a bitmap context. }
+
+function CGBitmapContextGetBitsPerPixel( c: CGContextRef ): size_t; external name '_CGBitmapContextGetBitsPerPixel'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return the bytes per row of the bitmap context `c', or 0 if `c' is not a
+ * bitmap context. }
+
+function CGBitmapContextGetBytesPerRow( c: CGContextRef ): size_t; external name '_CGBitmapContextGetBytesPerRow'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return the colorspace of the bitmap context `c', or NULL if `c' is not a
+ * bitmap context. }
+
+function CGBitmapContextGetColorSpace( c: CGContextRef ): CGColorSpaceRef; external name '_CGBitmapContextGetColorSpace'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return the alpha info of the bitmap context `c', or kCGImageAlphaNone if
+ * `c' is not a bitmap context. }
+
+function CGBitmapContextGetAlphaInfo( c: CGContextRef ): CGImageAlphaInfo; external name '_CGBitmapContextGetAlphaInfo'; (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{ Return the bitmap info of the bitmap context `c', or 0 if `c' is not a
+ * bitmap context. }
+
+function CGBitmapContextGetBitmapInfo( c: CGContextRef ): CGBitmapInfo; external name '_CGBitmapContextGetBitmapInfo'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Return an image containing a snapshot of the bitmap context `c'. If
+ * context is not a bitmap context, or if the image cannot be created for
+ * any reason, this function returns NULL. This is a "copy" operation ---
+ * subsequent changes to context will not affect the contents of the
+ * returned image.
+ *
+ * Note that in some cases the copy will actually follow "copy-on-write"
+ * semantics, so that the actual physical copy of the bits will only occur
+ * if the underlying data in the bitmap context is modified. As a
+ * consequence, you may wish to use the resulting image and release it
+ * before performing more drawing into the bitmap context; in this way, the
+ * actual physical copy of the data may be avoided. }
+
+function CGBitmapContextCreateImage( c: CGContextRef ): CGImageRef; external name '_CGBitmapContextCreateImage'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit CGEvent}
+{
+ * CGEvent.h
+ * CoreGraphics
+ *
+ * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
+ *
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ Return the CFTypeID for CGEventRefs. }
+function CGEventGetTypeID: CFTypeID; external name '_CGEventGetTypeID'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * APIs provide the ability to create a NULL event, or to create specialized
+ * events reflecting a state specified as parameters to the creation functions.
+ }
+
+{ Create a NULL event to be filled in. 'source' may be NULL. }
+function CGEventCreate( source: CGEventSourceRef ): CGEventRef; external name '_CGEventCreate'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * Functions to flatten and reconstruct a CGEventRef for network transport.
+ * These may be useful in remote control and helpdesk applications.
+ *
+ * Returns a CGEventRef built from the flattened data representation, or NULL
+ * if the eventData is invalid.
+ }
+function CGEventCreateFromData( allocator: CFAllocatorRef; eventData: CFDataRef ): CGEventRef; external name '_CGEventCreateFromData';
+
+{
+ * Returns a CFDataRef containing the flattened data representation of the event,
+ * or NULL if the eventData is invalid.
+ }
+function CGEventCreateData( allocator: CFAllocatorRef; event: CGEventRef ): CFDataRef; external name '_CGEventCreateData';
+
+{
+ * Create mouse events.
+ *
+ * The event source may be taken from another event, or may be NULL.
+ * mouseType should be one of the mouse event types.
+ * mouseCursorPosition should be the global coordinates the mouse is at for the event.
+ * For kCGEventOtherMouseDown, kCGEventOtherMouseDragged, and
+ * kCGEventOtherMouseUp events, the mouseButton parameter should
+ * indicate which button is changing state.
+ *
+ * The current implemementation of the event system supports a maximum of thirty-two buttons.
+ * Mouse button 0 is the primary button on the mouse. Mouse button 1 is the secondary
+ * mouse button (right). Mouse button 2 is the center button, and the remaining
+ * buttons would be in USB device order.
+ }
+function CGEventCreateMouseEvent( source: CGEventSourceRef; mouseType: CGEventType; mouseCursorPosition: CGPoint; mouseButton: CGMouseButton ): CGEventRef; external name '_CGEventCreateMouseEvent'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * Create keyboard events.
+ *
+ * The event source may be taken from another event, or may be NULL.
+ * Based on the virtual key code values entered,
+ * the appropriate key down, key up, or flags changed events are generated.
+ *
+ * All keystrokes needed to generate a character must be entered, including
+ * SHIFT, CONTROL, OPTION, and COMMAND keys. For example, to produce a 'Z',
+ * the SHIFT key must be down, the 'z' key must go down, and then the SHIFT
+ * and 'z' key must be released:
+ * CGEventCreateKeyboardEvent((CGKeyCode)56, true ); // shift down
+ * CGEventCreateKeyboardEvent( (CGKeyCode)6, true ); // 'z' down
+ * CGEventCreateKeyboardEvent( (CGKeyCode)6, false ); // 'z' up
+ * CGEventCreateKeyboardEvent( (CGKeyCode)56, false ); // 'shift up
+ }
+function CGEventCreateKeyboardEvent( source: CGEventSourceRef; virtualKey: CGKeyCode; keyDown: CBool ): CGEventRef; external name '_CGEventCreateKeyboardEvent'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CGEventCreateCopy( event: CGEventRef ): CGEventRef; external name '_CGEventCreateCopy'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * CFRetain() and CFRelease() may be used to retain and release CGEventRefs.
+ }
+
+function CGEventGetSource( event: CGEventRef ): CGEventSourceRef; external name '_CGEventGetSource'; (* DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * These functions provide access to the event source for an event.
+ * Event filters may use these to generate events that are compatible
+ * with an event being filtered.
+ *
+ * Note that CGEventCreateSourceFromEvent may return NULL if the event
+ * was generated with a private CGEventSourceStateID owned by another
+ * process. Such events should be filtered based on the public state.
+ }
+function CGEventCreateSourceFromEvent( event: CGEventRef ): CGEventSourceRef; external name '_CGEventCreateSourceFromEvent'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+procedure CGEventSetSource( event: CGEventRef; source: CGEventSourceRef ); external name '_CGEventSetSource'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * The following functions will provide high level access to selected event data.
+ }
+function CGEventGetType( event: CGEventRef ): CGEventType; external name '_CGEventGetType'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+procedure CGEventSetType( event: CGEventRef; typ: CGEventType ); external name '_CGEventSetType'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CGEventGetTimestamp( event: CGEventRef ): CGEventTimestamp; external name '_CGEventGetTimestamp'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+procedure CGEventSetTimestamp( event: CGEventRef; timestamp: CGEventTimestamp ); external name '_CGEventSetTimestamp'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CGEventGetLocation( event: CGEventRef ): CGPoint; external name '_CGEventGetLocation'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+procedure CGEventSetLocation( event: CGEventRef; location: CGPoint ); external name '_CGEventSetLocation'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+function CGEventGetFlags( event: CGEventRef ): CGEventFlags; external name '_CGEventGetFlags'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+procedure CGEventSetFlags( event: CGEventRef; flags: CGEventFlags ); external name '_CGEventSetFlags'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * Access to UniChar data in keyboard events.
+ *
+ * There are no runtime errors associated with these functions.
+ * Use on non-keyboard events leaves the event unchanged.
+ * Note that many frameworks use a fixed length representation
+ * of a CGEvent, and so are limited to a maximum string length
+ * of 20 Unicode characters. The CGEventRef itself is limited to 65535
+ * characters.
+ *
+ * Calling CGEventKeyboardGetUnicodeString() with a NULL unicodeString
+ * or zero maxStringLength will still return the actual count of
+ * UniCode characters in the event data.
+ }
+procedure CGEventKeyboardGetUnicodeString( event: CGEventRef; maxStringLength: UniCharCount; var actualStringLength: UniCharCount; unicodeString: {variable-size-array} UniCharPtr ); external name '_CGEventKeyboardGetUnicodeString'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+procedure CGEventKeyboardSetUnicodeString( event: CGEventRef; stringLength: UniCharCount; {const} unicodeString: {variable-size-array} UniCharPtr ); external name '_CGEventKeyboardSetUnicodeString'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * Additional low level functions provide access to specialized fields of the events
+ }
+
+{
+ * The CGEventGetDoubleValueField and CGEventSetDoubleValueField
+ * Functions renormalize certain fixed point and integer values
+ * to an appropriate floating point range. Keys this is done for
+ * are:
+ *
+ * kCGMouseEventPressure pressure value in the range 0-255
+ * scaled to [0.0-1.0]
+ * kCGTabletEventPointPressure scaled pressure value; MAX=(2^16)-1, MIN=0
+ * kCGTabletEventTiltX tilt range is -((2^15)-1) to (2^15)-1 (-32767 to 32767)
+ * kCGTabletEventTiltY scaled to [0.0-1.0]
+ * kCGTabletEventTangentialPressure Same range as tilt
+ * kCGTabletEventRotation Fixed-point representation of device
+ * rotation in a 10.6 format
+ }
+
+function CGEventGetIntegerValueField( event: CGEventRef; field: CGEventField ): SInt64; external name '_CGEventGetIntegerValueField'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+function CGEventGetDoubleValueField( event: CGEventRef; field: CGEventField ): Float64; external name '_CGEventGetDoubleValueField'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * Before using the Set functions, the event type must be set
+ * properly by using the appropriate type creation function or by calling
+ * CGEventSetType().
+ *
+ * If this is to be a mouse event generated by a tablet, call
+ * CGEventSetIntegerValueField(event, kCGMouseEventSubtype) with a value of
+ * kCGEventMouseSubtypeTabletPoint or kCGEventMouseSubtypeTabletProximity
+ * before setting other parameters.
+ *
+ * The correct type and subtype must be set so that the internal
+ * event-specific data structures may be properly filled in.
+ }
+procedure CGEventSetIntegerValueField( event: CGEventRef; field: CGEventField; value: SInt64 ); external name '_CGEventSetIntegerValueField'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+procedure CGEventSetDoubleValueField( event: CGEventRef; field: CGEventField; value: Float64 ); external name '_CGEventSetDoubleValueField'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * Registering an Event Tap
+ *
+ * A function registers an event tap, taking a pointer to the
+ * program's tap function and an arbitrary reference to be passed
+ * to the tap function, and returning a CFMachPortRef the program
+ * can add to the appropriate run loop by creating a surce and
+ * using CFRunLoopAddSource().
+ *
+ * Taps may be placed at the point where HIDSystem events enter
+ * the server, at the point where HIDSystem and remote control
+ * events enter a session, at the point where events have been
+ * annotated to flow to a specific application, or at the point
+ * where events are delivered to the application. Taps may be
+ * inserted at a specified point at the head of pre-existing filters,
+ * or appended after any pre-existing filters.
+ *
+ * Taps may be passive event listeners, or active filters.
+ * An active filter may pass an event through unmodified, modify
+ * an event, or discard an event. When a tap is registered, it
+ * identifies the set of events to be observed with a mask, and
+ * indicates if it is a passive or active event filter. Multiple
+ * event type bitmasks may be ORed together.
+ *
+ * Taps may only be placed at kCGHIDEventTap by a process running
+ * as the root user. NULL is returned for other users.
+ *
+ * Taps placed at kCGHIDEventTap, kCGSessionEventTap,
+ * kCGAnnotatedSessionEventTap, or on a specific process may
+ * only receive key up and down events if access for assistive
+ * devices is enabled (Preferences Universal Access panel,
+ * Keyboard view). If the tap is not permitted to monitor these
+ * when the tap is being created, then the appropriate bits
+ * in the mask are cleared. If that results in an empty mask,
+ * then NULL is returned.
+ *
+ * Releasing the CFMachPortRef will release the tap.
+ *
+ * The CGEventTapProxy is an opaque reference to state within
+ * the client application associated with the tap. The tap
+ * function may pass this reference to other functions, such as
+ * the event-posting routines.
+ *
+ * The event tap callback runs from the CFRunLoop to which the
+ * tap CFMachPort is added as a source. The thread safety is defined
+ * by the CFRunLoop and it's environment.
+ }
+
+{ Return the a CFMachPortRef for the event tap. }
+function CGEventTapCreate( tap: CGEventTapLocation; place: CGEventTapPlacement; options: CGEventTapOptions; eventsOfInterest: CGEventMask; callback: CGEventTapCallBack; refcon: UnivPtr ): CFMachPortRef; external name '_CGEventTapCreate'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * Events being routed to individual applications may be tapped
+ * using another function. CGEventTapCreateForPSN() will report
+ * all events being routed to the specified application.
+ }
+
+{ Return the a CFMachPortRef for an event tap for the specified process. }
+function CGEventTapCreateForPSN( processSerialNumber: { Temp type, til def moves to CoreServices } UnivPtr; place: CGEventTapPlacement; options: CGEventTapOptions; eventsOfInterest: CGEventMask; callback: CGEventTapCallBack; refcon: UnivPtr ): CFMachPortRef; external name '_CGEventTapCreateForPSN'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * Enable or disable an event tap.
+ *
+ * The taps are normally enabled when created.
+ * If a tap becomes unresponsive, or a user requests taps be disabled,
+ * then an appropriate kCGEventTapDisabled... event is passed to the
+ * registered CGEventTapCallBack function.
+ *
+ * Event taps may be re-enabled by calling this function.
+ }
+procedure CGEventTapEnable( myTap: CFMachPortRef; enable: CBool ); external name '_CGEventTapEnable'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+function CGEventTapIsEnabled( myTap: CFMachPortRef ): CBool; external name '_CGEventTapIsEnabled'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * A function to post events from a tap is provided. The events
+ * are posted to the same points that an event returned from an
+ * event tap would be posted to. If an event tap posts new events,
+ * the new events enter the system before the event returned by
+ * the tap enters the system. This order may be changed by
+ * explicitly posting the filtered event along with new events
+ * in the desired order, and then setting the returned event
+ * *pEventOut to NULL.
+ *
+ * Events posted into the system will be seen by all taps placed
+ * after the tap posting the event.
+ }
+
+{ Post an event from the event tap into the event stream. }
+procedure CGEventTapPostEvent( proxy: CGEventTapProxy; event: CGEventRef ); external name '_CGEventTapPostEvent'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * Functions to post events into the system at various points
+ * are also provided. Each event posted by these functions
+ * enters the system at a point immediately before any taps
+ * instantiated for that point, and will pass through any such taps.
+ *
+ * This mechanism permits an external process to establish an
+ * event routing policy, for example, by tapping events at the
+ * kCGAnnotatedSessionEventTap and then posting the events to
+ * the desired PSN.
+ }
+
+{ Post an event from the event tap into the event stream. }
+procedure CGEventPost( tap: CGEventTapLocation; event: CGEventRef ); external name '_CGEventPost'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Post an event from the event tap into the event stream for a specific application. }
+procedure CGEventPostToPSN( processSerialNumber: { Temp type, til def moves to CoreServices } UnivPtr; event: CGEventRef ); external name '_CGEventPostToPSN'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * Mechanism used to list event taps.
+ * An array length (maxNumberOfTaps) and array of CGEventTapInformation structures
+ * are passed in.
+ * Up to maxNumberOfTaps elements of the array are filled in with event tap information.
+ * The actual number of elements filled in is returned in eventTapCount.
+ *
+ * The call resets the accumulated minUsecLatency and maxUsecLatency fields. Values
+ * reported in these fields reflect the min and max values seen since the preceding call,
+ * or the instantiation of the tap.
+ *
+ * If the CGEventTapInformation array is NULL, maxNumberOfTaps is ignored, and *eventTapCount
+ * is filled in with the number of event taps that are currently installed.
+ }
+function CGGetEventTapList( maxNumberOfTaps: CGTableCount; tapList: {variable-size-array} CGEventTapInformationPtr; var eventTapCount: CGTableCount ): CGError; external name '_CGGetEventTapList'; (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit CoreFoundation}
+{ CoreFoundation.h
+ Copyright (c) 1998-2005, Apple, Inc. All rights reserved.
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+{unit CoreGraphics}
+{ CoreGraphics - CoreGraphics.h
+ * Copyright (c) 2000 Apple Computer, Inc.
+ * All rights reserved.
+ }
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{unit Devices}
+{
+ File: Devices.p
+
+ Contains: Device Manager Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+{ Values of the 'message' parameter to a Chooser device package }
+
+const
+ chooserInitMsg = 11; { the user selected this device package }
+ newSelMsg = 12; { the user made new device selections }
+ fillListMsg = 13; { fill the device list with choices }
+ getSelMsg = 14; { mark one or more choices as selected }
+ selectMsg = 15; { the user made a selection }
+ deselectMsg = 16; { the user canceled a selection }
+ terminateMsg = 17; { allows device package to clean up }
+ buttonMsg = 19; { the user selected a button }
+
+
+ { Values of the 'caller' parameter to a Chooser device package }
+ chooserID = 1;
+
+
+ { Values of the 'message' parameter to a Monitor 'mntr' }
+ initMsg = 1; { initialization }
+ okMsg = 2; { user clicked OK button }
+ cancelMsg = 3; { user clicked Cancel button }
+ hitMsg = 4; { user clicked control in Options dialog }
+ nulMsg = 5; { periodic event }
+ updateMsg = 6; { update event }
+ activateMsg = 7; { not used }
+ deactivateMsg = 8; { not used }
+ keyEvtMsg = 9; { keyboard event }
+ superMsg = 10; { show superuser controls }
+ normalMsg = 11; { show only normal controls }
+ startupMsg = 12; { code has been loaded }
+
+
+ { control codes for DeskAccessories }
+ goodbye = -1; { heap being reinitialized }
+ killCode = 1; { KillIO requested }
+ accEvent = 64; { handle an event }
+ accRun = 65; { time for periodic action }
+ accCursor = 66; { change cursor shape }
+ accMenu = 67; { handle menu item }
+ accUndo = 68; { handle undo command }
+ accCut = 70; { handle cut command }
+ accCopy = 71; { handle copy command }
+ accPaste = 72; { handle paste command }
+ accClear = 73; { handle clear command }
+
+ { Control/Status Call Codes }
+ { drvStsCode, ejectCode and tgBuffCode are now defined in Disks.h/p/a }
+
+ { miscellaneous Device Manager constants }
+ ioInProgress = 1; { predefined value of ioResult while I/O is pending }
+ aRdCmd = 2; { low byte of ioTrap for Read calls }
+ aWrCmd = 3; { low byte of ioTrap for Write calls }
+ asyncTrpBit = 10; { trap word modifier }
+ noQueueBit = 9; { trap word modifier }
+
+ { flags used in the driver header and device control entry }
+ dReadEnable = 0; { set if driver responds to read requests }
+ dWritEnable = 1; { set if driver responds to write requests }
+ dCtlEnable = 2; { set if driver responds to control requests }
+ dStatEnable = 3; { set if driver responds to status requests }
+ dNeedGoodBye = 4; { set if driver needs time for performing periodic tasks }
+ dNeedTime = 5; { set if driver needs time for performing periodic tasks }
+ dNeedLock = 6; { set if driver must be locked in memory as soon as it is opened }
+
+ dNeedLockMask = $4000; { set if driver must be locked in memory as soon as it is opened }
+ dNeedTimeMask = $2000; { set if driver needs time for performing periodic tasks }
+ dNeedGoodByeMask = $1000; { set if driver needs to be called before the application heap is initialized }
+ dStatEnableMask = $0800; { set if driver responds to status requests }
+ dCtlEnableMask = $0400; { set if driver responds to control requests }
+ dWritEnableMask = $0200; { set if driver responds to write requests }
+ dReadEnableMask = $0100; { set if driver responds to read requests }
+
+
+ { run-time flags used in the device control entry }
+ dVMImmuneBit = 0; { driver does not need VM protection }
+ dOpened = 5; { driver is open }
+ dRAMBased = 6; { dCtlDriver is a handle (1) or pointer (0) }
+ drvrActive = 7; { driver is currently processing a request }
+
+ dVMImmuneMask = $0001; { driver does not need VM protection }
+ dOpenedMask = $0020; { driver is open }
+ dRAMBasedMask = $0040; { dCtlDriver is a handle (1) or pointer (0) }
+ drvrActiveMask = $0080; { driver is currently processing a request }
+
+
+type
+ DRVRHeaderPtr = ^DRVRHeader;
+ DRVRHeader = record
+ drvrFlags: SInt16;
+ drvrDelay: SInt16;
+ drvrEMask: SInt16;
+ drvrMenu: SInt16;
+ drvrOpen: SInt16;
+ drvrPrime: SInt16;
+ drvrCtl: SInt16;
+ drvrStatus: SInt16;
+ drvrClose: SInt16;
+ drvrName: SInt8;
+ end;
+
+ DRVRHeaderHandle = ^DRVRHeaderPtr;
+ DCtlEntryPtr = ^DCtlEntry;
+ DCtlEntry = record
+ dCtlDriver: Ptr;
+ dCtlFlags: SInt16;
+ dCtlQHdr: QHdr;
+ dCtlPosition: SInt32;
+ dCtlStorage: Handle;
+ dCtlRefNum: SInt16;
+ dCtlCurTicks: SInt32;
+ dCtlWindow: GrafPtr;
+ dCtlDelay: SInt16;
+ dCtlEMask: SInt16;
+ dCtlMenu: SInt16;
+ end;
+
+ DCtlPtr = ^DCtlEntry;
+ DCtlHandle = ^DCtlPtr;
+ AuxDCEPtr = ^AuxDCE;
+ AuxDCE = packed record
+ dCtlDriver: Ptr;
+ dCtlFlags: SInt16;
+ dCtlQHdr: QHdr;
+ dCtlPosition: SInt32;
+ dCtlStorage: Handle;
+ dCtlRefNum: SInt16;
+ dCtlCurTicks: SInt32;
+ dCtlWindow: GrafPtr;
+ dCtlDelay: SInt16;
+ dCtlEMask: SInt16;
+ dCtlMenu: SInt16;
+ dCtlSlot: SInt8;
+ dCtlSlotId: SInt8;
+ dCtlDevBase: SInt32;
+ dCtlOwner: Ptr;
+ dCtlExtDev: SInt8;
+ fillByte: SInt8;
+ dCtlNodeID: UInt32;
+ end;
+
+ AuxDCEHandle = ^AuxDCEPtr;
+ { The NDRV Driver IO Entry Point and Commands }
+ UnitNumber = UInt16;
+ DriverOpenCount = UInt32;
+ DriverRefNum = SInt16;
+ DriverFlags = SInt16;
+ IOCommandCode = UInt32;
+
+const
+ kOpenCommand = 0;
+ kCloseCommand = 1;
+ kReadCommand = 2;
+ kWriteCommand = 3;
+ kControlCommand = 4;
+ kStatusCommand = 5;
+ kKillIOCommand = 6;
+ kInitializeCommand = 7; { init driver and device }
+ kFinalizeCommand = 8; { shutdown driver and device }
+ kReplaceCommand = 9; { replace an old driver }
+ kSupersededCommand = 10; { prepare to be replaced by a new driver }
+ kSuspendCommand = 11; { prepare driver to go to sleep }
+ kResumeCommand = 12; { wake up sleeping driver }
+
+ { one more IOCommandCode }
+ kPowerManagementCommand = 13; { power management command, supercedes kSuspendCommand and kResumeCommand }
+
+
+type
+ AddressSpaceID = MPAddressSpaceID;
+ IOCommandID = ^SInt32; { an opaque 32-bit type }
+ IOCommandIDPtr = ^IOCommandID; { when a var xx:IOCommandID parameter can be nil, it is changed to xx: IOCommandIDPtr }
+ IOCommandKind = UInt32;
+
+const
+ kSynchronousIOCommandKind = $00000001;
+ kAsynchronousIOCommandKind = $00000002;
+ kImmediateIOCommandKind = $00000004;
+
+
+type
+ DriverInitInfoPtr = ^DriverInitInfo;
+ DriverInitInfo = record
+ refNum: DriverRefNum;
+ deviceEntry: RegEntryID;
+ end;
+
+ DriverReplaceInfo = DriverInitInfo;
+ DriverReplaceInfoPtr = ^DriverReplaceInfo;
+ DriverFinalInfoPtr = ^DriverFinalInfo;
+ DriverFinalInfo = record
+ refNum: DriverRefNum;
+ deviceEntry: RegEntryID;
+ end;
+
+ DriverSupersededInfo = DriverFinalInfo;
+ DriverSupersededInfoPtr = ^DriverSupersededInfo;
+
+ { Contents are command specific }
+
+ IOCommandContentsPtr = ^IOCommandContents;
+ IOCommandContents = record
+ case SInt16 of
+ 0: (
+ pb: ParmBlkPtr;
+ );
+ 1: (
+ initialInfo: DriverInitInfoPtr;
+ );
+ 2: (
+ finalInfo: DriverFinalInfoPtr;
+ );
+ 3: (
+ replaceInfo: DriverReplaceInfoPtr;
+ );
+ 4: (
+ supersededInfo: DriverSupersededInfoPtr;
+ );
+ end;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ DriverEntryPointPtr = function(SpaceID: AddressSpaceID; CommandID: IOCommandID; Contents: IOCommandContents; Code: IOCommandCode; Kind: IOCommandKind): OSErr;
+{$elsec}
+ DriverEntryPointPtr = ProcPtr;
+{$endc}
+
+ { Record to describe a file-based driver candidate }
+ FileBasedDriverRecordPtr = ^FileBasedDriverRecord;
+ FileBasedDriverRecord = record
+ theSpec: FSSpec; { file specification }
+ theType: MacDriverType; { nameInfoStr + version number }
+ compatibleProp: boolean; { true if matched using a compatible name }
+ pad1,pad2,pad3: SInt8; { alignment }
+ end;
+
+ { Detailed Record to describe a file-based driver candidate. Includes fragment name }
+ FileBasedDriverDetailedPtr = ^FileBasedDriverDetailed;
+ FileBasedDriverDetailed = record
+ fileBasedDriver: FileBasedDriverRecord;
+ fragName: Str63;
+ end;
+
+ { Driver Loader API }
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * HigherDriverVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function HigherDriverVersion(const (*var*) driverVersion1: NumVersion; const (*var*) driverVersion2: NumVersion): SInt16; external name '_HigherDriverVersion';
+
+{
+ * VerifyFragmentAsDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function VerifyFragmentAsDriver(fragmentConnID: CFragConnectionID; var fragmentMain: DriverEntryPointPtr; var driverDesc: DriverDescriptionPtr): OSErr; external name '_VerifyFragmentAsDriver';
+
+{
+ * GetDriverMemoryFragment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetDriverMemoryFragment(memAddr: Ptr; length: SInt32; const (*var*) fragName: Str63; var fragmentConnID: CFragConnectionID; var fragmentMain: DriverEntryPointPtr; var driverDesc: DriverDescriptionPtr): OSErr; external name '_GetDriverMemoryFragment';
+
+{
+ * GetDriverDiskFragment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetDriverDiskFragment(fragmentSpec: FSSpecPtr; var fragmentConnID: CFragConnectionID; var fragmentMain: DriverEntryPointPtr; var driverDesc: DriverDescriptionPtr): OSErr; external name '_GetDriverDiskFragment';
+
+{
+ * GetNamedDriverDiskFragment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetNamedDriverDiskFragment(fragmentSpec: FSSpecPtr; const (*var*) fragName: Str63; var fragmentConnID: CFragConnectionID; var fragmentMain: DriverEntryPointPtr; var driverDesc: DriverDescriptionPtr): OSErr; external name '_GetNamedDriverDiskFragment';
+
+{
+ * InstallDriverFromFragment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InstallDriverFromFragment(fragmentConnID: CFragConnectionID; var device: RegEntryID; beginningUnit: UnitNumber; endingUnit: UnitNumber; var refNum: DriverRefNum): OSErr; external name '_InstallDriverFromFragment';
+
+{
+ * InstallDriverFromFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InstallDriverFromFile(fragmentSpec: FSSpecPtr; var device: RegEntryID; beginningUnit: UnitNumber; endingUnit: UnitNumber; var refNum: DriverRefNum): OSErr; external name '_InstallDriverFromFile';
+
+{
+ * InstallDriverFromMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InstallDriverFromMemory(memory: Ptr; length: SInt32; const (*var*) fragName: Str63; var device: RegEntryID; beginningUnit: UnitNumber; endingUnit: UnitNumber; var refNum: DriverRefNum): OSErr; external name '_InstallDriverFromMemory';
+
+{
+ * InstallDriverFromResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InstallDriverFromResource(theRsrcID: SInt16; const (*var*) theRsrcName: Str255; theDevice: RegEntryIDPtr; theBeginningUnit: UnitNumber; theEndingUnit: UnitNumber; var theRefNum: DriverRefNum): OSErr; external name '_InstallDriverFromResource';
+
+{
+ * InstallDriverFromDisk()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InstallDriverFromDisk(theDriverName: Ptr; var theDevice: RegEntryID; theBeginningUnit: UnitNumber; theEndingUnit: UnitNumber; var theRefNum: DriverRefNum): OSErr; external name '_InstallDriverFromDisk';
+
+{
+ * FindDriversForDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function FindDriversForDevice(var device: RegEntryID; var fragmentSpec: FSSpec; var fileDriverDesc: DriverDescription; var memAddr: Ptr; var length: SInt32; fragName: StringPtr; var memDriverDesc: DriverDescription): OSErr; external name '_FindDriversForDevice';
+
+{
+ * FindDriverForDeviceFromFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function FindDriverForDeviceFromFile(var device: RegEntryID; var fragmentSpec: FSSpec; var driverDesc: DriverDescription; fragName: StringPtr): OSErr; external name '_FindDriverForDeviceFromFile';
+
+{
+ * FindDriverCandidates()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function FindDriverCandidates(var deviceID: RegEntryID; var propBasedDriver: Ptr; var propBasedDriverSize: RegPropertyValueSize; deviceName: StringPtr; var propBasedDriverType: MacDriverType; var gotPropBasedDriver: boolean; fileBasedDrivers: FileBasedDriverRecordPtr; var nFileBasedDrivers: ItemCount): OSErr; external name '_FindDriverCandidates';
+
+{
+ * FindDriverCandidatesDetailed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function FindDriverCandidatesDetailed(deviceID: RegEntryIDPtr; var propBasedDriver: Ptr; var propBasedDriverSize: RegPropertyValueSize; deviceName: StringPtr; var propBasedDriverType: MacDriverType; var gotPropBasedDriver: boolean; fileBasedDrivers: FileBasedDriverDetailedPtr; var nFileBasedDrivers: ItemCount): OSErr; external name '_FindDriverCandidatesDetailed';
+
+{
+ * ScanDriverCandidates()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ScanDriverCandidates(var deviceID: RegEntryID; fileBasedDrivers: FileBasedDriverRecordPtr; nFileBasedDrivers: ItemCount; matchingDrivers: FileBasedDriverRecordPtr; var nMatchingDrivers: ItemCount): OSErr; external name '_ScanDriverCandidates';
+
+{
+ * ScanDriverCandidatesDetailed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ScanDriverCandidatesDetailed(var deviceID: RegEntryID; fileBasedDrivers: FileBasedDriverDetailedPtr; nFileBasedDrivers: ItemCount; matchingDrivers: FileBasedDriverDetailedPtr; var nMatchingDrivers: ItemCount): OSErr; external name '_ScanDriverCandidatesDetailed';
+
+{
+ * CompareFileCandToPropCand()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CompareFileCandToPropCand(var device: RegEntryID; deviceName: StringPtr; propBasedCandidate: DriverTypePtr; fileBasedCandidate: FileBasedDriverRecordPtr): SInt16; external name '_CompareFileCandToPropCand';
+
+{
+ * GetCompatibleProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure GetCompatibleProperty(var device: RegEntryID; var compatibleNames: StringPtr; var nCompatibleNames: ItemCount); external name '_GetCompatibleProperty';
+
+{
+ * CompatibleDriverNames()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CompatibleDriverNames(nameInfoStr: StringPtr; compatibleNames: StringPtr; nCompatibleNames: ItemCount; var nameCount: SInt32): boolean; external name '_CompatibleDriverNames';
+
+{
+ * GetDriverForDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetDriverForDevice(var device: RegEntryID; var fragmentConnID: CFragConnectionID; var fragmentMain: DriverEntryPointPtr; var driverDesc: DriverDescriptionPtr): OSErr; external name '_GetDriverForDevice';
+
+{
+ * InstallDriverForDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InstallDriverForDevice(var device: RegEntryID; beginningUnit: UnitNumber; endingUnit: UnitNumber; var refNum: DriverRefNum): OSErr; external name '_InstallDriverForDevice';
+
+{
+ * GetDriverInformation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetDriverInformation(refNum: DriverRefNum; var unitNum: UnitNumber; var flags: DriverFlags; var count: DriverOpenCount; name: StringPtr; var device: RegEntryID; var driverLoadLocation: CFragSystem7Locator; var fragmentConnID: CFragConnectionID; var fragmentMain: DriverEntryPointPtr; var driverDesc: DriverDescription): OSErr; external name '_GetDriverInformation';
+
+{
+ * GetDriverDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetDriverDescription(fragmentPtr: LogicalAddress; var theDriverDesc: DriverDescriptionPtr): OSErr; external name '_GetDriverDescription';
+
+{
+ * GetNamedDriverDescFromFSSpec()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetNamedDriverDescFromFSSpec(fragmentSpec: FSSpecPtr; fragName: StringPtr; var driverDesc: DriverDescriptionPtr): OSStatus; external name '_GetNamedDriverDescFromFSSpec';
+
+{
+ * SetDriverClosureMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SetDriverClosureMemory(fragmentConnID: CFragConnectionID; holdDriverMemory: boolean): OSErr; external name '_SetDriverClosureMemory';
+
+{
+ * ReplaceDriverWithFragment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ReplaceDriverWithFragment(theRefNum: DriverRefNum; fragmentConnID: CFragConnectionID): OSErr; external name '_ReplaceDriverWithFragment';
+
+{
+ * OpenInstalledDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function OpenInstalledDriver(refNum: DriverRefNum; ioPermission: SInt8): OSErr; external name '_OpenInstalledDriver';
+
+{
+ * RenameDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RenameDriver(refNum: DriverRefNum; newDriverName: StringPtr): OSErr; external name '_RenameDriver';
+
+{
+ * RemoveDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function RemoveDriver(refNum: DriverRefNum; immediate: boolean): OSErr; external name '_RemoveDriver';
+
+{
+ * LookupDrivers()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LookupDrivers(beginningUnit: UnitNumber; endingUnit: UnitNumber; emptyUnits: boolean; var returnedRefNums: ItemCount; var refNums: DriverRefNum): OSErr; external name '_LookupDrivers';
+
+{
+ * HighestUnitNumber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function HighestUnitNumber: UnitNumber; external name '_HighestUnitNumber';
+
+{
+ * DriverGestaltOn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DriverGestaltOn(refNum: DriverRefNum): OSErr; external name '_DriverGestaltOn';
+
+{
+ * DriverGestaltOff()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DriverGestaltOff(refNum: DriverRefNum): OSErr; external name '_DriverGestaltOff';
+
+{
+ * DriverGestaltIsOn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DriverLoaderLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DriverGestaltIsOn(flags: DriverFlags): boolean; external name '_DriverGestaltIsOn';
+
+{
+ * PBOpenSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBOpenSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBOpenSync';
+{
+ * PBOpenAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBOpenAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBOpenAsync';
+{
+ * PBOpenImmed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBOpenImmed(paramBlock: ParmBlkPtr): OSErr; external name '_PBOpenImmed';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * PBCloseSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBCloseSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBCloseSync';
+{
+ * PBCloseAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBCloseAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBCloseAsync';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBCloseImmed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBCloseImmed(paramBlock: ParmBlkPtr): OSErr; external name '_PBCloseImmed';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * PBReadSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBReadSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBReadSync';
+{
+ * PBReadAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBReadAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBReadAsync';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBReadImmed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBReadImmed(paramBlock: ParmBlkPtr): OSErr; external name '_PBReadImmed';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * PBWriteSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBWriteSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBWriteSync';
+{
+ * PBWriteAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBWriteAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBWriteAsync';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBWriteImmed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBWriteImmed(paramBlock: ParmBlkPtr): OSErr; external name '_PBWriteImmed';
+{
+ PBWaitIOComplete is a friendly way for applications to monitor
+ a pending asynchronous I/O operation in power-managed and
+ preemptive multitasking systems.
+ }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * PBWaitIOComplete()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PBWaitIOComplete(paramBlock: ParmBlkPtr; timeout: Duration): OSErr; external name '_PBWaitIOComplete';
+
+{ AddDrive and GetDrvQHdr are now defined in Disks.h/p/a }
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * GetDCtlEntry()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetDCtlEntry(refNum: SInt16): DCtlHandle; external name '_GetDCtlEntry';
+
+{
+ SetChooserAlert used to simply set a bit in a low-mem global
+ to tell the Chooser not to display its warning message when
+ the printer is changed. However, under MultiFinder and System 7,
+ this low-mem is swapped out when a layer change occurs, and the
+ Chooser never sees the change. It is obsolete, and completely
+ unsupported on the PowerPC. 68K apps can still call it if they
+ wish.
+
+ pascal Boolean SetChooserAlert(Boolean f);
+
+}
+{
+ * DriverInstall()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DriverInstall(drvrPtr: DRVRHeaderPtr; refNum: SInt16): OSErr; external name '_DriverInstall';
+{
+ * DriverInstallReserveMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DriverInstallReserveMem(drvrPtr: DRVRHeaderPtr; refNum: SInt16): OSErr; external name '_DriverInstallReserveMem';
+{
+ Note: DrvrInstall() is no longer supported, becuase it never really worked anyways.
+ There will soon be a DriverInstall() which does the right thing.
+
+ DrvrRemove has been renamed to DriverRemove. But, InterfaceLib for PowerPC
+ still exports DrvrRemove, so a macro is used to map the new name to old.
+
+}
+{
+ * DrvrRemove()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DrvrRemove(refNum: SInt16): OSErr; external name '_DrvrRemove';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ifc TARGET_CPU_68K}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * DriverRemove()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DriverRemove(refNum: SInt16): OSErr; external name '_DriverRemove';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {TARGET_CPU_68K}
+
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * [Mac]OpenDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function OpenDriver(const (*var*) name: Str255; var drvrRefNum: SInt16): OSErr; external name '_OpenDriver';
+
+{
+ * [Mac]CloseDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CloseDriver(refNum: SInt16): OSErr; external name '_CloseDriver';
+
+{
+ * Control()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Control(refNum: SInt16; csCode: SInt16; csParamPtr: UnivPtr): OSErr; external name '_Control';
+
+{
+ * Status()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Status(refNum: SInt16; csCode: SInt16; csParamPtr: UnivPtr): OSErr; external name '_Status';
+
+{
+ * KillIO()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function KillIO(refNum: SInt16): OSErr; external name '_KillIO';
+
+{
+ * Fetch()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Fetch(dce: DCtlPtr): SInt32; external name '_Fetch';
+{
+ * Stash()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function Stash(dce: DCtlPtr; data: ByteParameter): SInt32; external name '_Stash';
+{
+ * IODone()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure IODone(dce: DCtlPtr; ioResult: OSErr); external name '_IODone';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBControlSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBControlSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBControlSync';
+{
+ * PBControlAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBControlAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBControlAsync';
+{
+ * PBControlImmed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBControlImmed(paramBlock: ParmBlkPtr): OSErr; external name '_PBControlImmed';
+{
+ * PBStatusSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBStatusSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBStatusSync';
+{
+ * PBStatusAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBStatusAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBStatusAsync';
+{
+ * PBStatusImmed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBStatusImmed(paramBlock: ParmBlkPtr): OSErr; external name '_PBStatusImmed';
+{
+ * PBKillIOSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBKillIOSync(paramBlock: ParmBlkPtr): OSErr; external name '_PBKillIOSync';
+{
+ * PBKillIOAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBKillIOAsync(paramBlock: ParmBlkPtr): OSErr; external name '_PBKillIOAsync';
+{
+ * PBKillIOImmed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBKillIOImmed(paramBlock: ParmBlkPtr): OSErr; external name '_PBKillIOImmed';
+{
+ * OpenDeskAcc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function OpenDeskAcc(const (*var*) deskAccName: Str255): SInt16; external name '_OpenDeskAcc';
+{
+ * CloseDeskAcc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure CloseDeskAcc(refNum: SInt16); external name '_CloseDeskAcc';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ The PBxxx() routines are obsolete.
+
+ Use the PBxxxSync(), PBxxxAsync(), or PBxxxImmed version instead.
+}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBControl()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBControl(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBControl';
+
+{
+ * PBStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBStatus(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBStatus';
+
+{
+ * PBKillIO()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBKillIO(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBKillIO';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PBOpen()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBOpen(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBOpen';
+
+{
+ * PBClose()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBClose(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBClose';
+
+{
+ * PBRead()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBRead(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBRead';
+
+{
+ * PBWrite()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PBWrite(paramBlock: ParmBlkPtr; async: boolean): OSErr; external name '_PBWrite';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+{$ALIGN MAC68K}
+
+
+{unit Events}
+{
+ File: HIToolbox/Events.h
+
+ Contains: Event Manager Interfaces.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1985-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+type
+ EventKind = UInt16;
+type
+ EventMask = UInt16;
+const
+ nullEvent = 0;
+ mouseDown = 1;
+ mouseUp = 2;
+ keyDown = 3;
+ keyUp = 4;
+ autoKey = 5;
+ updateEvt = 6;
+ diskEvt = 7; { Not sent in Carbon. See kEventClassVolume in CarbonEvents.h}
+ activateEvt = 8;
+ osEvt = 15;
+ kHighLevelEvent = 23;
+
+const
+ mDownMask = 1 shl mouseDown; { mouse button pressed}
+ mUpMask = 1 shl mouseUp; { mouse button released}
+ keyDownMask = 1 shl keyDown; { key pressed}
+ keyUpMask = 1 shl keyUp; { key released}
+ autoKeyMask = 1 shl autoKey; { key repeatedly held down}
+ updateMask = 1 shl updateEvt; { window needs updating}
+ diskMask = 1 shl diskEvt; { disk inserted}
+ activMask = 1 shl activateEvt; { activate/deactivate window}
+ highLevelEventMask = $0400; { high-level events (includes AppleEvents)}
+ osMask = 1 shl osEvt; { operating system events (suspend, resume)}
+ everyEvent = $FFFF; { all of the above}
+
+const
+ charCodeMask = $000000FF;
+ keyCodeMask = $0000FF00;
+ adbAddrMask = $00FF0000;
+ osEvtMessageMask = $FF000000;
+
+const
+{ OS event messages. Event (sub)code is in the high byte of the message field.}
+ mouseMovedMessage = $00FA;
+ suspendResumeMessage = $0001;
+
+const
+ resumeFlag = 1; { Bit 0 of message indicates resume vs suspend}
+
+
+{
+ CARBON ALERT! BATTLESTATIONS!
+
+ The EventModifiers bits defined here are also used in the newer Carbon Event
+ key modifiers parameters. There are two main differences:
+
+ 1) The Carbon key modifiers parameter is a UInt32, not a UInt16. Never try to
+ extract the key modifiers parameter from a Carbon Event into an EventModifiers
+ type. You will probably get your stack trashed.
+ 2) The Carbon key modifiers is just that: key modifiers. That parameter will
+ never contain the button state bit.
+}
+type
+ EventModifiers = UInt16;
+const
+{ modifiers }
+ activeFlagBit = 0; { activate? (activateEvt and mouseDown)}
+ btnStateBit = 7; { state of button?}
+ cmdKeyBit = 8; { command key down?}
+ shiftKeyBit = 9; { shift key down?}
+ alphaLockBit = 10; { alpha lock down?}
+ optionKeyBit = 11; { option key down?}
+ controlKeyBit = 12; { control key down?}
+ rightShiftKeyBit = 13; { right shift key down? Not supported on Mac OS X.}
+ rightOptionKeyBit = 14; { right Option key down? Not supported on Mac OS X.}
+ rightControlKeyBit = 15; { right Control key down? Not supported on Mac OS X.}
+
+const
+ activeFlag = 1 shl activeFlagBit;
+ btnState = 1 shl btnStateBit;
+ cmdKey = 1 shl cmdKeyBit;
+ shiftKey = 1 shl shiftKeyBit;
+ alphaLock = 1 shl alphaLockBit;
+ optionKey = 1 shl optionKeyBit;
+ controlKey = 1 shl controlKeyBit;
+ rightShiftKey = 1 shl rightShiftKeyBit; { Not supported on Mac OS X.}
+ rightOptionKey = 1 shl rightOptionKeyBit; { Not supported on Mac OS X.}
+ rightControlKey = 1 shl rightControlKeyBit; { Not supported on Mac OS X.}
+
+{ MacRoman character codes}
+const
+ kNullCharCode = 0;
+ kHomeCharCode = 1;
+ kEnterCharCode = 3;
+ kEndCharCode = 4;
+ kHelpCharCode = 5;
+ kBellCharCode = 7;
+ kBackspaceCharCode = 8;
+ kTabCharCode = 9;
+ kLineFeedCharCode = 10;
+ kVerticalTabCharCode = 11;
+ kPageUpCharCode = 11;
+ kFormFeedCharCode = 12;
+ kPageDownCharCode = 12;
+ kReturnCharCode = 13;
+ kFunctionKeyCharCode = 16;
+ kCommandCharCode = 17; { glyph available only in system fonts}
+ kCheckCharCode = 18; { glyph available only in system fonts}
+ kDiamondCharCode = 19; { glyph available only in system fonts}
+ kAppleLogoCharCode = 20; { glyph available only in system fonts}
+ kEscapeCharCode = 27;
+ kClearCharCode = 27;
+ kLeftArrowCharCode = 28;
+ kRightArrowCharCode = 29;
+ kUpArrowCharCode = 30;
+ kDownArrowCharCode = 31;
+ kSpaceCharCode = 32;
+ kDeleteCharCode = 127;
+ kBulletCharCode = 165;
+ kNonBreakingSpaceCharCode = 202;
+
+{ useful Unicode code points}
+const
+ kShiftUnicode = $21E7; { Unicode UPWARDS WHITE ARROW}
+ kControlUnicode = $2303; { Unicode UP ARROWHEAD}
+ kOptionUnicode = $2325; { Unicode OPTION KEY}
+ kCommandUnicode = $2318; { Unicode PLACE OF INTEREST SIGN}
+ kPencilUnicode = $270E; { Unicode LOWER RIGHT PENCIL; actually pointed left until Mac OS X 10.3}
+ kPencilLeftUnicode = $F802; { Unicode LOWER LEFT PENCIL; available in Mac OS X 10.3 and later}
+ kCheckUnicode = $2713; { Unicode CHECK MARK}
+ kDiamondUnicode = $25C6; { Unicode BLACK DIAMOND}
+ kBulletUnicode = $2022; { Unicode BULLET}
+ kAppleLogoUnicode = $F8FF; { Unicode APPLE LOGO}
+
+type
+ EventRecord = record
+ what: EventKind;
+ message: UInt32;
+ when: UInt32;
+ where: Point;
+ modifiers: EventModifiers;
+ end;
+ EventRecordPtr = ^EventRecord;
+type
+ FKEYProcPtr = procedure;
+type
+ FKEYUPP = FKEYProcPtr;
+{
+ * NewFKEYUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * DisposeFKEYUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * InvokeFKEYUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * GetMouse()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure GetMouse( var mouseLoc: Point ); external name '_GetMouse';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * Button()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function Button: Boolean; external name '_Button';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * StillDown()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function StillDown: Boolean; external name '_StillDown';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * WaitMouseUp()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function WaitMouseUp: Boolean; external name '_WaitMouseUp';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * KeyTranslate()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function KeyTranslate( transData: {const} UnivPtr; keycode: UInt16; var state: UInt32 ): UInt32; external name '_KeyTranslate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetCaretTime()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetCaretTime: UInt32; external name '_GetCaretTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ QuickTime 3.0 supports GetKeys() on unix and win32
+ But, on little endian machines you will have to be
+ careful about bit numberings and/or use a KeyMapByteArray
+ instead
+}
+type
+ KeyMap = array [0..3] of BigEndianLong;
+
+
+{
+ * GetKeys()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure GetKeys( var theKeys: KeyMap ); external name '_GetKeys';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Obsolete event types & masks }
+const
+ networkEvt = 10;
+ driverEvt = 11;
+ app1Evt = 12;
+ app2Evt = 13;
+ app3Evt = 14;
+ app4Evt = 15;
+ networkMask = $0400;
+ driverMask = $0800;
+ app1Mask = $1000;
+ app2Mask = $2000;
+ app3Mask = $4000;
+ app4Mask = $8000;
+
+type
+ EvQEl = record
+ qLink: QElemPtr;
+ qType: SInt16;
+ evtQWhat: EventKind; { this part is identical to the EventRecord as defined above }
+ evtQMessage: UInt32;
+ evtQWhen: UInt32;
+ evtQWhere: Point;
+ evtQModifiers: EventModifiers;
+ end;
+ EvQElPtr = ^EvQEl;
+type
+ GetNextEventFilterProcPtr = procedure( var theEvent: EventRecord; var result: Boolean );
+type
+ GetNextEventFilterUPP = GetNextEventFilterProcPtr;
+{
+ * NewGetNextEventFilterUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * DisposeGetNextEventFilterUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * InvokeGetNextEventFilterUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+type
+ GNEFilterUPP = GetNextEventFilterUPP;
+{
+ * GetDblTime()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetDblTime: UInt32; external name '_GetDblTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetEventMask()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetEventMask( value: EventMask ); external name '_SetEventMask';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetEvQHdr()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * PPostEvent()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * GetNextEvent()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetNextEvent( eventMask_: EventMask; var theEvent: EventRecord ): Boolean; external name '_GetNextEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * WaitNextEvent()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function WaitNextEvent( eventMask_: EventMask; var theEvent: EventRecord; sleep: UInt32; mouseRgn: RgnHandle { can be NULL } ): Boolean; external name '_WaitNextEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * EventAvail()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function EventAvail( eventMask_: EventMask; var theEvent: EventRecord ): Boolean; external name '_EventAvail';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * PostEvent()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function PostEvent( eventNum: EventKind; eventMsg: UInt32 ): OSErr; external name '_PostEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ For Carbon, use EventAvail, TickCount, GetGlobalMouse,
+ GetKeys, or GetCurrentKeyModifiers instead of
+ OSEventAvail, and use GetNextEvent or WaitNextEvent
+ instead of GetOSEvent.
+}
+
+{
+ * OSEventAvail()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * GetOSEvent()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * FlushEvents()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure FlushEvents( whichMask: EventMask; stopMask: EventMask ); external name '_FlushEvents';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SystemClick()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * SystemTask()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * SystemEvent()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+(*
+#if OLDROUTINENAMES
+#define KeyTrans(transData, keycode, state) KeyTranslate(transData, keycode, state)
+#endif { OLDROUTINENAMES }
+*)
+{
+ GetGlobalMouse, GetCurrentKeyModifiers, and CheckEventQueueForUserCancel
+ are only available as part of the Carbon API.
+}
+
+{
+ * GetGlobalMouse()
+ *
+ * Summary:
+ * Returns the position of the mouse in global coordinates.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * globalMouse:
+ * On exit, contains the mouse position in global coordinates.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure GetGlobalMouse( var globalMouse: Point ); external name '_GetGlobalMouse';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetCurrentKeyModifiers()
+ *
+ * Summary:
+ * Returns the current hardware keyboard modifier state.
+ *
+ * Discussion:
+ * In most cases, you should not use GetCurrentKeyModifiers, but
+ * should use the GetCurrentEventKeyModifiers function instead.
+ * GetCurrentEventKeyModifiers is much faster than
+ * GetCurrentKeyModifiers because it returns the locally cached
+ * modifier state; GetCurrentKeyModifiers must get the modifier
+ * state from the window server, which is slower. Using
+ * GetCurrentKeyModifiers also can prevent your application from
+ * being operated by remote posting of events, since the hardware
+ * input device is not actually changing state in that case. Most
+ * commonly, you might need to use GetCurrentKeyModifiers when your
+ * application is not the active application (as determined by the
+ * Process Manager function GetFrontProcess). In that case, the
+ * cached modifier state returned by GetCurrentEventKeyModifiers is
+ * not valid because modifier-changed events are not flowing to your
+ * application, and you must use GetCurrentKeyModifiers to determine
+ * the current hardware state.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * The hardware state of the keyboard modifiers. The format of the
+ * return value is the same as the modifiers field of an EventRecord
+ * (but only includes keyboard modifiers and not the other modifier
+ * flags included in an EventRecord).
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetCurrentKeyModifiers: UInt32; external name '_GetCurrentKeyModifiers';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CheckEventQueueForUserCancel()
+ *
+ * Summary:
+ * Determines if there is a cancel event in the main thread's event
+ * queue.
+ *
+ * Discussion:
+ * This API supports two cancel events: Escape and Cmd-Period. The
+ * cancel event itself, as well as mouse or keyboard events in front
+ * of the cancel event in the event queue, will be removed from the
+ * queue.
+ *
+ * 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.2 and later
+ * Non-Carbon CFM: not available
+ }
+function CheckEventQueueForUserCancel: Boolean; external name '_CheckEventQueueForUserCancel';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * KeyScript()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure KeyScript( code: SInt16 ); external name '_KeyScript';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsCmdChar()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function IsCmdChar( const (*var*) event: EventRecord; test: SInt16 ): Boolean; external name '_IsCmdChar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ LowMem accessor functions previously in LowMem.h
+}
+{
+ * LMGetKeyThresh()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetKeyThresh: SInt16; external name '_LMGetKeyThresh';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LMSetKeyThresh()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetKeyThresh( value: SInt16 ); external name '_LMSetKeyThresh';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LMGetKeyRepThresh()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetKeyRepThresh: SInt16; external name '_LMGetKeyRepThresh';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LMSetKeyRepThresh()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetKeyRepThresh( value: SInt16 ); external name '_LMSetKeyRepThresh';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LMGetKbdLast()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetKbdLast: UInt8; external name '_LMGetKbdLast';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LMSetKbdLast()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetKbdLast( value: UInt8 ); external name '_LMSetKbdLast';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LMGetKbdType()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetKbdType: UInt8; external name '_LMGetKbdType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LMSetKbdType()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LMSetKbdType( value: UInt8 ); external name '_LMSetKbdType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+
+
+{unit Fonts}
+{
+ File: Fonts.p
+
+ Contains: Public interface to the Font Manager.
+
+ Version: Technology: Mac OS 9 / Carbon
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ systemFont = 0;
+ applFont = 1;
+
+ kFMDefaultOptions = 0;
+
+ { Activation contexts }
+ kFMDefaultActivationContext = 0;
+ kFMGlobalActivationContext = $00000001;
+ kFMLocalActivationContext = 0;
+
+ { Iteration scopes }
+ kFMDefaultIterationScope = 0;
+ kFMGlobalIterationScope = $00000001;
+ kFMLocalIterationScope = 0;
+
+
+ { kPlatformDefaultGuiFontID is used in QuickTime 3.0. }
+{$ifc TARGET_OS_MAC}
+ kPlatformDefaultGuiFontID = 1;
+
+{$elsec}
+ kPlatformDefaultGuiFontID = -1;
+
+{$endc} {TARGET_OS_MAC}
+
+ commandMark = 17;
+ checkMark = 18;
+ diamondMark = 19;
+ appleMark = 20;
+
+ propFont = 36864;
+ prpFntH = 36865;
+ prpFntW = 36866;
+ prpFntHW = 36867;
+ fixedFont = 45056;
+ fxdFntH = 45057;
+ fxdFntW = 45058;
+ fxdFntHW = 45059;
+ fontWid = 44208;
+
+
+type
+ FMInputPtr = ^FMInput;
+ FMInput = packed record
+ family: SInt16;
+ size: SInt16;
+ face: Style;
+ needBits: boolean;
+ device: SInt16;
+ numer: Point;
+ denom: Point;
+ end;
+
+ FMOutputPtr = ^FMOutput;
+ FMOutput = packed record
+ errNum: SInt16;
+ fontHandle: Handle;
+ boldPixels: UInt8;
+ italicPixels: UInt8;
+ ulOffset: UInt8;
+ ulShadow: UInt8;
+ ulThick: UInt8;
+ shadowPixels: UInt8;
+ extra: SInt8;
+ ascent: UInt8;
+ descent: UInt8;
+ widMax: UInt8;
+ leading: SInt8;
+ curStyle: SInt8;
+ numer: Point;
+ denom: Point;
+ end;
+
+ FMOutPtr = FMOutputPtr;
+ FMetricRecPtr = ^FMetricRec;
+ FMetricRec = record
+ ascent: Fixed; { base line to top }
+ descent: Fixed; { base line to bottom }
+ leading: Fixed; { leading between lines }
+ widMax: Fixed; { maximum character width }
+ wTabHandle: Handle; { handle to font width table }
+ end;
+
+ FMetricRecHandle = ^FMetricRecPtr;
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * InitFonts()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure InitFonts; external name '_InitFonts';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * GetFontName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetFontName(familyID: SInt16; var name: Str255); external name '_GetFontName';
+{
+ * GetFNum()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetFNum(const (*var*) name: Str255; var familyID: SInt16); external name '_GetFNum';
+{
+ * RealFont()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RealFont(fontNum: SInt16; size: SInt16): boolean; external name '_RealFont';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * SetFontLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure SetFontLock(lockFlag: boolean); external name '_SetFontLock';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * FMSwapFont()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMSwapFont(const (*var*) inRec: FMInput): FMOutPtr; external name '_FMSwapFont';
+{
+ * SetFScaleDisable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetFScaleDisable(fscaleDisable: boolean); external name '_SetFScaleDisable';
+{
+ * FontMetrics()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure FontMetrics(theMetrics: FMetricRecPtr); external name '_FontMetrics';
+{
+ * SetFractEnable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetFractEnable(fractEnable: boolean); external name '_SetFractEnable';
+{
+ * GetDefFontSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetDefFontSize: SInt16; external name '_GetDefFontSize';
+{
+ * IsOutline()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IsOutline(numer: Point; denom: Point): boolean; external name '_IsOutline';
+{
+ * SetOutlinePreferred()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetOutlinePreferred(outlinePreferred: boolean); external name '_SetOutlinePreferred';
+{
+ * GetOutlinePreferred()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetOutlinePreferred: boolean; external name '_GetOutlinePreferred';
+{
+ * OutlineMetrics()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OutlineMetrics(byteCount: SInt16; textPtr: UnivPtr; numer: Point; denom: Point; var yMax: SInt16; var yMin: SInt16; awArray: FixedPtr; lsbArray: FixedPtr; boundsArray: RectPtr): OSErr; external name '_OutlineMetrics';
+{
+ * SetPreserveGlyph()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetPreserveGlyph(preserveGlyph: boolean); external name '_SetPreserveGlyph';
+{
+ * GetPreserveGlyph()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetPreserveGlyph: boolean; external name '_GetPreserveGlyph';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * FlushFonts()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function FlushFonts: OSErr; external name '_FlushFonts';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * GetSysFont()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetSysFont: SInt16; external name '_GetSysFont';
+{
+ * GetAppFont()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetAppFont: SInt16; external name '_GetAppFont';
+{--------------------------------------------------------------------------------------}
+{ Extended font data functions (available only with Mac OS 8.5 or later) }
+{--------------------------------------------------------------------------------------}
+{
+ * SetAntiAliasedTextEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetAntiAliasedTextEnabled(iEnable: boolean; iMinFontSize: SInt16): OSStatus; external name '_SetAntiAliasedTextEnabled';
+{
+ * IsAntiAliasedTextEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IsAntiAliasedTextEnabled(var oMinFontSize: SInt16): boolean; external name '_IsAntiAliasedTextEnabled';
+{
+ * QDTextBounds()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure QDTextBounds(byteCount: SInt16; textAddr: UnivPtr; var bounds: Rect); external name '_QDTextBounds';
+{
+ * FetchFontInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FetchFontInfo(fontID: SInt16; fontSize: SInt16; fontStyle: SInt16; var info: FontInfo): OSErr; external name '_FetchFontInfo';
+{--------------------------------------------------------------------------------------}
+{ Font access and data management functions (available only with Mac OS 9.0 or later) }
+{--------------------------------------------------------------------------------------}
+{ Enumeration }
+{
+ * FMCreateFontFamilyIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMCreateFontFamilyIterator(iFilter: {Const}FMFilterPtr; iRefCon: UnivPtr; iOptions: OptionBits; var ioIterator: FMFontFamilyIterator): OSStatus; external name '_FMCreateFontFamilyIterator';
+
+{
+ * FMDisposeFontFamilyIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMDisposeFontFamilyIterator(var ioIterator: FMFontFamilyIterator): OSStatus; external name '_FMDisposeFontFamilyIterator';
+
+{
+ * FMResetFontFamilyIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMResetFontFamilyIterator(iFilter: {Const}FMFilterPtr; iRefCon: UnivPtr; iOptions: OptionBits; var ioIterator: FMFontFamilyIterator): OSStatus; external name '_FMResetFontFamilyIterator';
+
+{
+ * FMGetNextFontFamily()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMGetNextFontFamily(var ioIterator: FMFontFamilyIterator; var oFontFamily: FMFontFamily): OSStatus; external name '_FMGetNextFontFamily';
+
+{
+ * FMCreateFontIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMCreateFontIterator(iFilter: {Const}FMFilterPtr; iRefCon: UnivPtr; iOptions: OptionBits; var ioIterator: FMFontIterator): OSStatus; external name '_FMCreateFontIterator';
+
+{
+ * FMDisposeFontIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMDisposeFontIterator(var ioIterator: FMFontIterator): OSStatus; external name '_FMDisposeFontIterator';
+
+{
+ * FMResetFontIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMResetFontIterator(iFilter: {Const}FMFilterPtr; iRefCon: UnivPtr; iOptions: OptionBits; var ioIterator: FMFontIterator): OSStatus; external name '_FMResetFontIterator';
+
+{
+ * FMGetNextFont()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMGetNextFont(var ioIterator: FMFontIterator; var oFont: FMFont): OSStatus; external name '_FMGetNextFont';
+
+{ Font families }
+{
+ * FMCreateFontFamilyInstanceIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMCreateFontFamilyInstanceIterator(iFontFamily: FMFontFamily; var ioIterator: FMFontFamilyInstanceIterator): OSStatus; external name '_FMCreateFontFamilyInstanceIterator';
+
+{
+ * FMDisposeFontFamilyInstanceIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMDisposeFontFamilyInstanceIterator(var ioIterator: FMFontFamilyInstanceIterator): OSStatus; external name '_FMDisposeFontFamilyInstanceIterator';
+
+{
+ * FMResetFontFamilyInstanceIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMResetFontFamilyInstanceIterator(iFontFamily: FMFontFamily; var ioIterator: FMFontFamilyInstanceIterator): OSStatus; external name '_FMResetFontFamilyInstanceIterator';
+
+{
+ * FMGetNextFontFamilyInstance()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMGetNextFontFamilyInstance(var ioIterator: FMFontFamilyInstanceIterator; var oFont: FMFont; oStyle: FMFontStylePtr; oSize: FMFontSizePtr): OSStatus; external name '_FMGetNextFontFamilyInstance';
+
+{
+ * FMGetFontFamilyFromName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMGetFontFamilyFromName(const (*var*) iName: Str255): FMFontFamily; external name '_FMGetFontFamilyFromName';
+
+{
+ * FMGetFontFamilyName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMGetFontFamilyName(iFontFamily: FMFontFamily; var oName: Str255): OSStatus; external name '_FMGetFontFamilyName';
+
+{
+ * FMGetFontFamilyTextEncoding()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMGetFontFamilyTextEncoding(iFontFamily: FMFontFamily; var oTextEncoding: TextEncoding): OSStatus; external name '_FMGetFontFamilyTextEncoding';
+
+{
+ * FMGetFontFamilyGeneration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMGetFontFamilyGeneration(iFontFamily: FMFontFamily; var oGeneration: FMGeneration): OSStatus; external name '_FMGetFontFamilyGeneration';
+
+{ Fonts }
+{
+ * FMGetFontFormat()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMGetFontFormat(iFont: FMFont; var oFormat: FourCharCode): OSStatus; external name '_FMGetFontFormat';
+
+{
+ * FMGetFontTableDirectory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMGetFontTableDirectory(iFont: FMFont; iLength: ByteCount; iBuffer: UnivPtr; oActualLength: ByteCountPtr): OSStatus; external name '_FMGetFontTableDirectory';
+
+{
+ * FMGetFontTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMGetFontTable(iFont: FMFont; iTag: FourCharCode; iOffset: ByteOffset; iLength: ByteCount; iBuffer: UnivPtr; oActualLength: ByteCountPtr): OSStatus; external name '_FMGetFontTable';
+
+{
+ * FMGetFontGeneration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMGetFontGeneration(iFont: FMFont; var oGeneration: FMGeneration): OSStatus; external name '_FMGetFontGeneration';
+
+{
+ * FMGetFontContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMGetFontContainer(iFont: FMFont; var oFontContainer: FSSpec): OSStatus; external name '_FMGetFontContainer';
+
+{ Conversion }
+{
+ * FMGetFontFromFontFamilyInstance()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMGetFontFromFontFamilyInstance(iFontFamily: FMFontFamily; iStyle: FMFontStyle; var oFont: FMFont; oIntrinsicStyle: FMFontStylePtr): OSStatus; external name '_FMGetFontFromFontFamilyInstance';
+
+{
+ * FMGetFontFamilyInstanceFromFont()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMGetFontFamilyInstanceFromFont(iFont: FMFont; var oFontFamily: FMFontFamily; var oStyle: FMFontStyle): OSStatus; external name '_FMGetFontFamilyInstanceFromFont';
+
+{
+ * FMGetATSFontRefFromFont()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function FMGetATSFontRefFromFont(iFont: FMFont): ATSFontRef; external name '_FMGetATSFontRefFromFont';
+
+{
+ * FMGetATSFontFamilyRefFromFontFamily()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function FMGetATSFontFamilyRefFromFontFamily(iFamily: FMFontFamily): ATSFontFamilyRef; external name '_FMGetATSFontFamilyRefFromFontFamily';
+
+{
+ * FMGetFontFromATSFontRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function FMGetFontFromATSFontRef(iFont: ATSFontRef): FMFont; external name '_FMGetFontFromATSFontRef';
+
+{
+ * FMGetFontFamilyFromATSFontFamilyRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function FMGetFontFamilyFromATSFontFamilyRef(iFamily: ATSFontFamilyRef): FMFontFamily; external name '_FMGetFontFamilyFromATSFontFamilyRef';
+
+{ Activation }
+{
+ * FMActivateFonts()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMActivateFonts(const (*var*) iFontContainer: FSSpec; iFilter: {Const}FMFilterPtr; iRefCon: UnivPtr; iOptions: OptionBits): OSStatus; external name '_FMActivateFonts';
+
+{
+ * FMDeactivateFonts()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMDeactivateFonts(const (*var*) iFontContainer: FSSpec; iFilter: {Const}FMFilterPtr; iRefCon: UnivPtr; iOptions: OptionBits): OSStatus; external name '_FMDeactivateFonts';
+
+{
+ * FMGetGeneration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontManager 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FMGetGeneration: FMGeneration; external name '_FMGetGeneration';
+
+{ Container Access }
+{
+ * FMGetFontContainerFromFontFamilyInstance()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function FMGetFontContainerFromFontFamilyInstance(iFontFamily: FMFontFamily; iStyle: FMFontStyle; iFontSize: FMFontSize; var oFontContainer: FSSpec): OSStatus; external name '_FMGetFontContainerFromFontFamilyInstance';
+
+{
+ * FMGetFontFamilyResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function FMGetFontFamilyResource(iFontFamily: FMFontFamily; iFontStyle: FMFontStyle; iFontSize: FMFontSize; iBufferSize: ByteCount; ioBuffer: UnivPtr; oSize: ByteCountPtr): OSStatus; external name '_FMGetFontFamilyResource';
+
+
+type
+ FontFamilyID = FMFontFamily;
+ FontPointSize = FMFontSize;
+ { -------------------------------------------------------------------------------------- }
+ { Deprecated constant and type definitions }
+ { -------------------------------------------------------------------------------------- }
+ { The font identifier constants are deprecated; use GetFNum or FMGetFontFamilyFromName
+ to find a font family from a standard QuickDraw name.
+ }
+
+const
+ kFMUseGlobalScopeOption = $00000001;
+
+ kFontIDNewYork = 2;
+ kFontIDGeneva = 3;
+ kFontIDMonaco = 4;
+ kFontIDVenice = 5;
+ kFontIDLondon = 6;
+ kFontIDAthens = 7;
+ kFontIDSanFrancisco = 8;
+ kFontIDToronto = 9;
+ kFontIDCairo = 11;
+ kFontIDLosAngeles = 12;
+ kFontIDTimes = 20;
+ kFontIDHelvetica = 21;
+ kFontIDCourier = 22;
+ kFontIDSymbol = 23;
+ kFontIDMobile = 24;
+
+ { The following data structures referenced by the low memory global variables of the
+ Font Manager are deprecated on Mac OS X and CarbonLib 1.1. The low memory global
+ variables are not shared between processes and may result in inconsistencies
+ compared to previous releases of the system software. Changes made to the
+ information contained in the low memory global variables, including any
+ indirectly referenced width tables, font family records, and font records, are
+ not reflected in the global state of the Font Manager and may only be accessed
+ through the font access and data management functions of the Font Manager or ATS.
+ }
+
+type
+ WidEntryPtr = ^WidEntry;
+ WidEntry = record
+ widStyle: SInt16; { style entry applies to }
+ end;
+
+ WidTablePtr = ^WidTable;
+ WidTable = record
+ numWidths: SInt16; { number of entries - 1 }
+ end;
+
+ AsscEntryPtr = ^AsscEntry;
+ AsscEntry = record
+ fontSize: SInt16;
+ fontStyle: SInt16;
+ fontID: SInt16; { font resource ID }
+ end;
+
+ FontAssocPtr = ^FontAssoc;
+ FontAssoc = record
+ numAssoc: SInt16; { number of entries - 1 }
+ end;
+
+ StyleTablePtr = ^StyleTable;
+ StyleTable = record
+ fontClass: SInt16;
+ offset: SInt32;
+ reserved: SInt32;
+ indexes: packed array [0..47] of char;
+ end;
+
+ NameTablePtr = ^NameTable;
+ NameTable = record
+ stringCount: SInt16;
+ baseFontName: Str255;
+ end;
+
+ KernPairPtr = ^KernPair;
+ KernPair = record
+ kernFirst: SInt8; { 1st character of kerned pair }
+ kernSecond: SInt8; { 2nd character of kerned pair }
+ kernWidth: SInt16; { kerning in 1pt fixed format }
+ end;
+
+ KernEntryPtr = ^KernEntry;
+ KernEntry = record
+ kernStyle: SInt16; { style the entry applies to }
+ kernLength: SInt16; { length of this entry }
+ end;
+
+ KernTablePtr = ^KernTable;
+ KernTable = record
+ numKerns: SInt16; { number of kerning entries }
+ end;
+
+ WidthTablePtr = ^WidthTable;
+ WidthTable = packed record
+ tabData: array [0..255] of Fixed; { character widths }
+ tabFont: Handle; { font record used to build table }
+ sExtra: SInt32; { space extra used for table }
+ style: SInt32; { extra due to style }
+ fID: SInt16; { font family ID }
+ fSize: SInt16; { font size request }
+ face: SInt16; { style (face) request }
+ device: SInt16; { device requested }
+ inNumer: Point; { scale factors requested }
+ inDenom: Point; { scale factors requested }
+ aFID: SInt16; { actual font family ID for table }
+ fHand: Handle; { family record used to build up table }
+ usedFam: boolean; { used fixed point family widths }
+ aFace: UInt8; { actual face produced }
+ vOutput: SInt16; { vertical scale output value }
+ hOutput: SInt16; { horizontal scale output value }
+ vFactor: SInt16; { vertical scale output value }
+ hFactor: SInt16; { horizontal scale output value }
+ aSize: SInt16; { actual size of actual font used }
+ tabSize: SInt16; { total size of table }
+ end;
+
+ WidthTableHdl = ^WidthTablePtr;
+ FamRecPtr = ^FamRec;
+ FamRec = record
+ ffFlags: SInt16; { flags for family }
+ ffFamID: SInt16; { family ID number }
+ ffFirstChar: SInt16; { ASCII code of 1st character }
+ ffLastChar: SInt16; { ASCII code of last character }
+ ffAscent: SInt16; { maximum ascent for 1pt font }
+ ffDescent: SInt16; { maximum descent for 1pt font }
+ ffLeading: SInt16; { maximum leading for 1pt font }
+ ffWidMax: SInt16; { maximum widMax for 1pt font }
+ ffWTabOff: SInt32; { offset to width table }
+ ffKernOff: SInt32; { offset to kerning table }
+ ffStylOff: SInt32; { offset to style mapping table }
+ ffProperty: array [0..8] of SInt16; { style property info }
+ ffIntl: array [0..1] of SInt16; { for international use }
+ ffVersion: SInt16; { version number }
+ end;
+
+ FontRecPtr = ^FontRec;
+ FontRec = record
+ fontType: SInt16; { font type }
+ firstChar: SInt16; { ASCII code of first character }
+ lastChar: SInt16; { ASCII code of last character }
+ widMax: SInt16; { maximum character width }
+ kernMax: SInt16; { negative of maximum character kern }
+ nDescent: SInt16; { negative of descent }
+ fRectWidth: SInt16; { width of font rectangle }
+ fRectHeight: SInt16; { height of font rectangle }
+ owTLoc: UInt16; { offset to offset/width table }
+ ascent: SInt16; { ascent }
+ descent: SInt16; { descent }
+ leading: SInt16; { leading }
+ rowWords: SInt16; { row width of bit image / 2 }
+ end;
+
+ FontRecHdl = ^FontRecPtr;
+ { -------------------------------------------------------------------------------------- }
+{$ifc OLDROUTINENAMES}
+
+const
+ newYork = 2;
+ geneva = 3;
+ monaco = 4;
+ venice = 5;
+ london = 6;
+ athens = 7;
+ sanFran = 8;
+ toronto = 9;
+ cairo = 11;
+ losAngeles = 12;
+ times = 20;
+ helvetica = 21;
+ courier = 22;
+ symbol = 23;
+ mobile = 24;
+
+{$endc} {OLDROUTINENAMES}
+
+{--------------------------------------------------------------------------------------}
+{$ALIGN MAC68K}
+
+
+{unit Icons}
+{
+ File: Icons.p
+
+ Contains: Icon Utilities and Icon Services Interfaces.
+
+ Version: Technology: Mac OS 9.x
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1990-2002 by Apple Computer, Inc. All rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+{ Pascal Translation Updated: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ The following are icons for which there are both icon suites and SICNs. }
+{ Avoid using icon resources if possible. Use IconServices instead. }
+
+const
+ kGenericDocumentIconResource = -4000;
+ kGenericStationeryIconResource = -3985;
+ kGenericEditionFileIconResource = -3989;
+ kGenericApplicationIconResource = -3996;
+ kGenericDeskAccessoryIconResource = -3991;
+ kGenericFolderIconResource = -3999;
+ kPrivateFolderIconResource = -3994;
+ kFloppyIconResource = -3998;
+ kTrashIconResource = -3993;
+ kGenericRAMDiskIconResource = -3988;
+ kGenericCDROMIconResource = -3987;
+
+ { The following are icons for which there are SICNs only. }
+ { Avoid using icon resources if possible. Use IconServices instead. }
+ kDesktopIconResource = -3992;
+ kOpenFolderIconResource = -3997;
+ kGenericHardDiskIconResource = -3995;
+ kGenericFileServerIconResource = -3972;
+ kGenericSuitcaseIconResource = -3970;
+ kGenericMoverObjectIconResource = -3969;
+
+ { The following are icons for which there are icon suites only. }
+ { Avoid using icon resources if possible. Use IconServices instead. }
+ kGenericPreferencesIconResource = -3971;
+ kGenericQueryDocumentIconResource = -16506;
+ kGenericExtensionIconResource = -16415;
+ kSystemFolderIconResource = -3983;
+ kHelpIconResource = -20271;
+ kAppleMenuFolderIconResource = -3982;
+
+ { Obsolete. Use named constants defined above. }
+ genericDocumentIconResource = -4000;
+ genericStationeryIconResource = -3985;
+ genericEditionFileIconResource = -3989;
+ genericApplicationIconResource = -3996;
+ genericDeskAccessoryIconResource = -3991;
+ genericFolderIconResource = -3999;
+ privateFolderIconResource = -3994;
+ floppyIconResource = -3998;
+ trashIconResource = -3993;
+ genericRAMDiskIconResource = -3988;
+ genericCDROMIconResource = -3987;
+ desktopIconResource = -3992;
+ openFolderIconResource = -3997;
+ genericHardDiskIconResource = -3995;
+ genericFileServerIconResource = -3972;
+ genericSuitcaseIconResource = -3970;
+ genericMoverObjectIconResource = -3969;
+ genericPreferencesIconResource = -3971;
+ genericQueryDocumentIconResource = -16506;
+ genericExtensionIconResource = -16415;
+ systemFolderIconResource = -3983;
+ appleMenuFolderIconResource = -3982;
+
+ { Avoid using icon resources if possible. Use IconServices instead. }
+ kStartupFolderIconResource = -3981;
+ kOwnedFolderIconResource = -3980;
+ kDropFolderIconResource = -3979;
+ kSharedFolderIconResource = -3978;
+ kMountedFolderIconResource = -3977;
+ kControlPanelFolderIconResource = -3976;
+ kPrintMonitorFolderIconResource = -3975;
+ kPreferencesFolderIconResource = -3974;
+ kExtensionsFolderIconResource = -3973;
+ kFontsFolderIconResource = -3968;
+ kFullTrashIconResource = -3984;
+
+ { Obsolete. Use named constants defined above. }
+ startupFolderIconResource = -3981;
+ ownedFolderIconResource = -3980;
+ dropFolderIconResource = -3979;
+ sharedFolderIconResource = -3978;
+ mountedFolderIconResource = -3977;
+ controlPanelFolderIconResource = -3976;
+ printMonitorFolderIconResource = -3975;
+ preferencesFolderIconResource = -3974;
+ extensionsFolderIconResource = -3973;
+ fontsFolderIconResource = -3968;
+ fullTrashIconResource = -3984;
+
+ { The following icon types can only be used as an icon element }
+ { inside a 'icns' icon family }
+ kIconServices256PixelDataARGB = $69633038 (* 'ic08' *);
+ kThumbnail32BitData = $69743332 (* 'it32' *);
+ kThumbnail8BitMask = $74386D6B (* 't8mk' *);
+
+ kHuge1BitMask = $69636823 (* 'ich#' *);
+ kHuge4BitData = $69636834 (* 'ich4' *);
+ kHuge8BitData = $69636838 (* 'ich8' *);
+ kHuge32BitData = $69683332 (* 'ih32' *);
+ kHuge8BitMask = $68386D6B (* 'h8mk' *);
+
+ { The following icon types can be used as a resource type }
+ { or as an icon element type inside a 'icns' icon family }
+ kLarge1BitMask = $49434E23 (* 'ICN#' *);
+ kLarge4BitData = $69636C34 (* 'icl4' *);
+ kLarge8BitData = $69636C38 (* 'icl8' *);
+ kLarge32BitData = $696C3332 (* 'il32' *);
+ kLarge8BitMask = $6C386D6B (* 'l8mk' *);
+ kSmall1BitMask = $69637323 (* 'ics#' *);
+ kSmall4BitData = $69637334 (* 'ics4' *);
+ kSmall8BitData = $69637338 (* 'ics8' *);
+ kSmall32BitData = $69733332 (* 'is32' *);
+ kSmall8BitMask = $73386D6B (* 's8mk' *);
+ kMini1BitMask = $69636D23 (* 'icm#' *);
+ kMini4BitData = $69636D34 (* 'icm4' *);
+ kMini8BitData = $69636D38 (* 'icm8' *);
+
+ { Icon Variants }
+ { These can be used as an element of an 'icns' icon family }
+ { or as a parameter to GetIconRefVariant }
+ kTileIconVariant = $74696C65 (* 'tile' *);
+ kRolloverIconVariant = $6F766572 (* 'over' *);
+ kDropIconVariant = $64726F70 (* 'drop' *);
+ kOpenIconVariant = $6F70656E (* 'open' *);
+ kOpenDropIconVariant = $6F647270 (* 'odrp' *);
+
+ { Obsolete. Use names defined above. }
+ large1BitMask = $49434E23 (* 'ICN#' *);
+ large4BitData = $69636C34 (* 'icl4' *);
+ large8BitData = $69636C38 (* 'icl8' *);
+ small1BitMask = $69637323 (* 'ics#' *);
+ small4BitData = $69637334 (* 'ics4' *);
+ small8BitData = $69637338 (* 'ics8' *);
+ mini1BitMask = $69636D23 (* 'icm#' *);
+ mini4BitData = $69636D34 (* 'icm4' *);
+ mini8BitData = $69636D38 (* 'icm8' *);
+
+ { Alignment type values. }
+ kAlignNone = $00;
+ kAlignVerticalCenter = $01;
+ kAlignTop = $02;
+ kAlignBottom = $03;
+ kAlignHorizontalCenter = $04;
+ kAlignAbsoluteCenter = $05;
+ kAlignCenterTop = $06;
+ kAlignCenterBottom = $07;
+ kAlignLeft = $08;
+ kAlignCenterLeft = $09;
+ kAlignTopLeft = $0A;
+ kAlignBottomLeft = $0B;
+ kAlignRight = $0C;
+ kAlignCenterRight = $0D;
+ kAlignTopRight = $0E;
+ kAlignBottomRight = $0F;
+
+ { Obsolete. Use names defined above. }
+ atNone = $00;
+ atVerticalCenter = $01;
+ atTop = $02;
+ atBottom = $03;
+ atHorizontalCenter = $04;
+ atAbsoluteCenter = $05;
+ atCenterTop = $06;
+ atCenterBottom = $07;
+ atLeft = $08;
+ atCenterLeft = $09;
+ atTopLeft = $0A;
+ atBottomLeft = $0B;
+ atRight = $0C;
+ atCenterRight = $0D;
+ atTopRight = $0E;
+ atBottomRight = $0F;
+
+
+type
+ IconAlignmentType = SInt16;
+ { Transform type values. }
+
+const
+ kTransformNone = $00;
+ kTransformDisabled = $01;
+ kTransformOffline = $02;
+ kTransformOpen = $03;
+ kTransformLabel1 = $0100;
+ kTransformLabel2 = $0200;
+ kTransformLabel3 = $0300;
+ kTransformLabel4 = $0400;
+ kTransformLabel5 = $0500;
+ kTransformLabel6 = $0600;
+ kTransformLabel7 = $0700;
+ kTransformSelected = $4000;
+ kTransformSelectedDisabled = $4001;
+ kTransformSelectedOffline = $4002;
+ kTransformSelectedOpen = $4003;
+
+ { Obsolete. Use names defined above. }
+ ttNone = $00;
+ ttDisabled = $01;
+ ttOffline = $02;
+ ttOpen = $03;
+ ttLabel1 = $0100;
+ ttLabel2 = $0200;
+ ttLabel3 = $0300;
+ ttLabel4 = $0400;
+ ttLabel5 = $0500;
+ ttLabel6 = $0600;
+ ttLabel7 = $0700;
+ ttSelected = $4000;
+ ttSelectedDisabled = $4001;
+ ttSelectedOffline = $4002;
+ ttSelectedOpen = $4003;
+
+
+type
+ IconTransformType = SInt16;
+ { Selector mask values. }
+
+const
+ kSelectorLarge1Bit = $00000001;
+ kSelectorLarge4Bit = $00000002;
+ kSelectorLarge8Bit = $00000004;
+ kSelectorLarge32Bit = $00000008;
+ kSelectorLarge8BitMask = $00000010;
+ kSelectorSmall1Bit = $00000100;
+ kSelectorSmall4Bit = $00000200;
+ kSelectorSmall8Bit = $00000400;
+ kSelectorSmall32Bit = $00000800;
+ kSelectorSmall8BitMask = $00001000;
+ kSelectorMini1Bit = $00010000;
+ kSelectorMini4Bit = $00020000;
+ kSelectorMini8Bit = $00040000;
+ kSelectorHuge1Bit = $01000000;
+ kSelectorHuge4Bit = $02000000;
+ kSelectorHuge8Bit = $04000000;
+ kSelectorHuge32Bit = $08000000;
+ kSelectorHuge8BitMask = $10000000;
+ kSelectorAllLargeData = $000000FF;
+ kSelectorAllSmallData = $0000FF00;
+ kSelectorAllMiniData = $00FF0000;
+ kSelectorAllHugeData = $FF000000;
+ kSelectorAll1BitData = $01010101;
+ kSelectorAll4BitData = $02020202;
+ kSelectorAll8BitData = $04040404;
+ kSelectorAll32BitData = $08000808;
+ kSelectorAllAvailableData = $FFFFFFFF;
+
+
+ { Obsolete. Use names defined above. }
+ svLarge1Bit = $00000001;
+ svLarge4Bit = $00000002;
+ svLarge8Bit = $00000004;
+ svSmall1Bit = $00000100;
+ svSmall4Bit = $00000200;
+ svSmall8Bit = $00000400;
+ svMini1Bit = $00010000;
+ svMini4Bit = $00020000;
+ svMini8Bit = $00040000;
+ svAllLargeData = $000000FF;
+ svAllSmallData = $0000FF00;
+ svAllMiniData = $00FF0000;
+ svAll1BitData = $01010101;
+ svAll4BitData = $02020202;
+ svAll8BitData = $04040404;
+ svAllAvailableData = $FFFFFFFF;
+
+
+type
+ IconSelectorValue = UInt32;
+{$ifc TYPED_FUNCTION_POINTERS}
+ IconActionProcPtr = function(theType: ResType; var theIcon: Handle; yourDataPtr: UnivPtr): OSErr;
+{$elsec}
+ IconActionProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ IconGetterProcPtr = function(theType: ResType; yourDataPtr: UnivPtr): Handle;
+{$elsec}
+ IconGetterProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ IconActionUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ IconActionUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ IconGetterUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ IconGetterUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppIconActionProcInfo = $00000FE0;
+ uppIconGetterProcInfo = $000003F0;
+ {
+ * NewIconActionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewIconActionUPP(userRoutine: IconActionProcPtr): IconActionUPP; external name '_NewIconActionUPP'; { old name was NewIconActionProc }
+{
+ * NewIconGetterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewIconGetterUPP(userRoutine: IconGetterProcPtr): IconGetterUPP; external name '_NewIconGetterUPP'; { old name was NewIconGetterProc }
+{
+ * DisposeIconActionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeIconActionUPP(userUPP: IconActionUPP); external name '_DisposeIconActionUPP';
+{
+ * DisposeIconGetterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeIconGetterUPP(userUPP: IconGetterUPP); external name '_DisposeIconGetterUPP';
+{
+ * InvokeIconActionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeIconActionUPP(theType: ResType; var theIcon: Handle; yourDataPtr: UnivPtr; userRoutine: IconActionUPP): OSErr; external name '_InvokeIconActionUPP'; { old name was CallIconActionProc }
+{
+ * InvokeIconGetterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeIconGetterUPP(theType: ResType; yourDataPtr: UnivPtr; userRoutine: IconGetterUPP): Handle; external name '_InvokeIconGetterUPP'; { old name was CallIconGetterProc }
+type
+ IconGetter = IconGetterProcPtr;
+ IconAction = IconActionProcPtr;
+ { CIconHandle, GetCIcon(), PlotCIcon(), and DisposeCIcon() moved here from Quickdraw.h }
+ CIconPtr = ^CIcon;
+ CIcon = record
+ iconPMap: PixMap; { the icon's pixMap }
+ iconMask: BitMap; { the icon's mask }
+ iconBMap: BitMap; { the icon's bitMap }
+ iconData: Handle; { the icon's data }
+ iconMaskData: array [0..0] of SInt16; { icon's mask and BitMap data }
+ end;
+
+ CIconHandle = ^CIconPtr;
+ CIconHandle_fix = CIconHandle; { used as field type when a record declaration contains a CIconHandle field identifier }
+ {
+ * GetCIcon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetCIcon(iconID: SInt16): CIconHandle; external name '_GetCIcon';
+{
+ * PlotCIcon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PlotCIcon(const (*var*) theRect: Rect; theIcon: CIconHandle); external name '_PlotCIcon';
+{
+ * DisposeCIcon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeCIcon(theIcon: CIconHandle); external name '_DisposeCIcon';
+{ GetIcon and PlotIcon moved here from ToolUtils }
+{
+ * GetIcon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIcon(iconID: SInt16): Handle; external name '_GetIcon';
+{
+ * PlotIcon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PlotIcon(const (*var*) theRect: Rect; theIcon: Handle); external name '_PlotIcon';
+{
+ Note: IconSuiteRef and IconCacheRef should be an abstract types,
+ but too much source code already relies on them being of type Handle.
+}
+
+type
+ IconSuiteRef = Handle;
+ IconCacheRef = Handle;
+ { IconRefs are 32-bit values identifying cached icon data. IconRef 0 is invalid. }
+ IconRef = ^SInt32; { an opaque 32-bit type }
+ IconRef_fix = IconRef; { used as field type when a record declaration contains a IconRef field identifier }
+ IconRefPtr = ^IconRef; { when a var xx:IconRef parameter can be nil, it is changed to xx: IconRefPtr }
+ {
+ * PlotIconID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PlotIconID(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theResID: SInt16): OSErr; external name '_PlotIconID';
+{
+ * NewIconSuite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewIconSuite(var theIconSuite: IconSuiteRef): OSErr; external name '_NewIconSuite';
+{
+ * AddIconToSuite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AddIconToSuite(theIconData: Handle; theSuite: IconSuiteRef; theType: ResType): OSErr; external name '_AddIconToSuite';
+{
+ * GetIconFromSuite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIconFromSuite(var theIconData: Handle; theSuite: IconSuiteRef; theType: ResType): OSErr; external name '_GetIconFromSuite';
+{
+ * ForEachIconDo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ForEachIconDo(theSuite: IconSuiteRef; selector: IconSelectorValue; action: IconActionUPP; yourDataPtr: UnivPtr): OSErr; external name '_ForEachIconDo';
+{
+ * GetIconSuite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIconSuite(var theIconSuite: IconSuiteRef; theResID: SInt16; selector: IconSelectorValue): OSErr; external name '_GetIconSuite';
+{
+ * DisposeIconSuite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DisposeIconSuite(theIconSuite: IconSuiteRef; disposeData: boolean): OSErr; external name '_DisposeIconSuite';
+{
+ * PlotIconSuite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PlotIconSuite(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theIconSuite: IconSuiteRef): OSErr; external name '_PlotIconSuite';
+{
+ * MakeIconCache()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function MakeIconCache(var theCache: IconCacheRef; makeIcon: IconGetterUPP; yourDataPtr: UnivPtr): OSErr; external name '_MakeIconCache';
+{
+ * LoadIconCache()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LoadIconCache(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theIconCache: IconCacheRef): OSErr; external name '_LoadIconCache';
+{
+ * PlotIconMethod()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PlotIconMethod(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theMethod: IconGetterUPP; yourDataPtr: UnivPtr): OSErr; external name '_PlotIconMethod';
+{
+ * GetLabel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetLabel(labelNumber: SInt16; var labelColor: RGBColor; var labelString: Str255): OSErr; external name '_GetLabel';
+{
+ * PtInIconID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PtInIconID(testPt: Point; const (*var*) iconRect: Rect; align: IconAlignmentType; iconID: SInt16): boolean; external name '_PtInIconID';
+{
+ * PtInIconSuite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PtInIconSuite(testPt: Point; const (*var*) iconRect: Rect; align: IconAlignmentType; theIconSuite: IconSuiteRef): boolean; external name '_PtInIconSuite';
+{
+ * PtInIconMethod()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PtInIconMethod(testPt: Point; const (*var*) iconRect: Rect; align: IconAlignmentType; theMethod: IconGetterUPP; yourDataPtr: UnivPtr): boolean; external name '_PtInIconMethod';
+{
+ * RectInIconID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RectInIconID(const (*var*) testRect: Rect; const (*var*) iconRect: Rect; align: IconAlignmentType; iconID: SInt16): boolean; external name '_RectInIconID';
+{
+ * RectInIconSuite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RectInIconSuite(const (*var*) testRect: Rect; const (*var*) iconRect: Rect; align: IconAlignmentType; theIconSuite: IconSuiteRef): boolean; external name '_RectInIconSuite';
+{
+ * RectInIconMethod()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RectInIconMethod(const (*var*) testRect: Rect; const (*var*) iconRect: Rect; align: IconAlignmentType; theMethod: IconGetterUPP; yourDataPtr: UnivPtr): boolean; external name '_RectInIconMethod';
+{
+ * IconIDToRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IconIDToRgn(theRgn: RgnHandle; const (*var*) iconRect: Rect; align: IconAlignmentType; iconID: SInt16): OSErr; external name '_IconIDToRgn';
+{
+ * IconSuiteToRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IconSuiteToRgn(theRgn: RgnHandle; const (*var*) iconRect: Rect; align: IconAlignmentType; theIconSuite: IconSuiteRef): OSErr; external name '_IconSuiteToRgn';
+{
+ * IconMethodToRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IconMethodToRgn(theRgn: RgnHandle; const (*var*) iconRect: Rect; align: IconAlignmentType; theMethod: IconGetterUPP; yourDataPtr: UnivPtr): OSErr; external name '_IconMethodToRgn';
+{
+ * SetSuiteLabel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetSuiteLabel(theSuite: IconSuiteRef; theLabel: SInt16): OSErr; external name '_SetSuiteLabel';
+{
+ * GetSuiteLabel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetSuiteLabel(theSuite: IconSuiteRef): SInt16; external name '_GetSuiteLabel';
+{
+ * GetIconCacheData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIconCacheData(theCache: IconCacheRef; var theData: UnivPtr): OSErr; external name '_GetIconCacheData';
+{
+ * SetIconCacheData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetIconCacheData(theCache: IconCacheRef; theData: UnivPtr): OSErr; external name '_SetIconCacheData';
+{
+ * GetIconCacheProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIconCacheProc(theCache: IconCacheRef; var theProc: IconGetterUPP): OSErr; external name '_GetIconCacheProc';
+{
+ * SetIconCacheProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetIconCacheProc(theCache: IconCacheRef; theProc: IconGetterUPP): OSErr; external name '_SetIconCacheProc';
+{
+ * PlotIconHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PlotIconHandle(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theIcon: Handle): OSErr; external name '_PlotIconHandle';
+{
+ * PlotSICNHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PlotSICNHandle(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theSICN: Handle): OSErr; external name '_PlotSICNHandle';
+{
+ * PlotCIconHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PlotCIconHandle(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theCIcon: CIconHandle): OSErr; external name '_PlotCIconHandle';
+{
+ IconServices is an efficient mechanism to share icon data amongst multiple
+ clients. It avoids duplication of data; it provides efficient caching,
+ releasing memory when the icon data is no longer needed; it can provide
+ the appropriate icon for any filesystem object; it can provide commonly
+ used icons (caution, note, help...); it is Appearance-savvy: the icons
+ are switched when appropriate.
+ IconServices refer to cached icon data using IconRef, a 32-bit opaque
+ value. IconRefs are reference counted. When there are no more "owners"
+ of an IconRef, the memory used by the icon bitmap is disposed of.
+ Two files of same type and creator with no custom icon will have the same IconRef.
+ Files with custom icons will have their own IconRef.
+}
+
+{
+ Use the special creator kSystemIconsCreator to get "standard" icons
+ that are not associated with a file, such as the help icon.
+ Note that all lowercase creators are reserved by Apple.
+}
+
+const
+ kSystemIconsCreator = $6D616373 (* 'macs' *);
+
+
+ {
+ Type of the predefined/generic icons. For example, the call:
+ err = GetIconRef(kOnSystemDisk, kSystemIconsCreator, kHelpIcon, &iconRef);
+ will retun in iconRef the IconRef for the standard help icon.
+ }
+
+ { Generic Finder icons }
+ kClipboardIcon = $434C4950 (* 'CLIP' *);
+ kClippingUnknownTypeIcon = $636C7075 (* 'clpu' *);
+ kClippingPictureTypeIcon = $636C7070 (* 'clpp' *);
+ kClippingTextTypeIcon = $636C7074 (* 'clpt' *);
+ kClippingSoundTypeIcon = $636C7073 (* 'clps' *);
+ kDesktopIcon = $6465736B (* 'desk' *);
+ kFinderIcon = $464E4452 (* 'FNDR' *);
+ kComputerIcon = $726F6F74 (* 'root' *);
+ kFontSuitcaseIcon = $4646494C (* 'FFIL' *);
+ kFullTrashIcon = $66747268 (* 'ftrh' *);
+ kGenericApplicationIcon = $4150504C (* 'APPL' *);
+ kGenericCDROMIcon = $63646472 (* 'cddr' *);
+ kGenericControlPanelIcon = $41505043 (* 'APPC' *);
+ kGenericControlStripModuleIcon = $73646576 (* 'sdev' *);
+ kGenericComponentIcon = $74686E67 (* 'thng' *);
+ kGenericDeskAccessoryIcon = $41505044 (* 'APPD' *);
+ kGenericDocumentIcon = $646F6375 (* 'docu' *);
+ kGenericEditionFileIcon = $65647466 (* 'edtf' *);
+ kGenericExtensionIcon = $494E4954 (* 'INIT' *);
+ kGenericFileServerIcon = $73727672 (* 'srvr' *);
+ kGenericFontIcon = $6666696C (* 'ffil' *);
+ kGenericFontScalerIcon = $73636C72 (* 'sclr' *);
+ kGenericFloppyIcon = $666C7079 (* 'flpy' *);
+ kGenericHardDiskIcon = $6864736B (* 'hdsk' *);
+ kGenericIDiskIcon = $6964736B (* 'idsk' *);
+ kGenericRemovableMediaIcon = $726D6F76 (* 'rmov' *);
+ kGenericMoverObjectIcon = $6D6F7672 (* 'movr' *);
+ kGenericPCCardIcon = $70636D63 (* 'pcmc' *);
+ kGenericPreferencesIcon = $70726566 (* 'pref' *);
+ kGenericQueryDocumentIcon = $71657279 (* 'qery' *);
+ kGenericRAMDiskIcon = $72616D64 (* 'ramd' *);
+ kGenericSharedLibaryIcon = $73686C62 (* 'shlb' *);
+ kGenericStationeryIcon = $73646F63 (* 'sdoc' *);
+ kGenericSuitcaseIcon = $73756974 (* 'suit' *);
+ kGenericURLIcon = $6775726C (* 'gurl' *);
+ kGenericWORMIcon = $776F726D (* 'worm' *);
+ kInternationalResourcesIcon = $6966696C (* 'ifil' *);
+ kKeyboardLayoutIcon = $6B66696C (* 'kfil' *);
+ kSoundFileIcon = $7366696C (* 'sfil' *);
+ kSystemSuitcaseIcon = $7A737973 (* 'zsys' *);
+ kTrashIcon = $74727368 (* 'trsh' *);
+ kTrueTypeFontIcon = $7466696C (* 'tfil' *);
+ kTrueTypeFlatFontIcon = $73666E74 (* 'sfnt' *);
+ kTrueTypeMultiFlatFontIcon = $74746366 (* 'ttcf' *);
+ kUserIDiskIcon = $7564736B (* 'udsk' *);
+ kUnknownFSObjectIcon = $756E6673 (* 'unfs' *);
+ kInternationResourcesIcon = $6966696C (* 'ifil' *); { old misspelling }
+
+ { Internet locations }
+ kInternetLocationHTTPIcon = $696C6874 (* 'ilht' *);
+ kInternetLocationFTPIcon = $696C6674 (* 'ilft' *);
+ kInternetLocationAppleShareIcon = $696C6166 (* 'ilaf' *);
+ kInternetLocationAppleTalkZoneIcon = $696C6174 (* 'ilat' *);
+ kInternetLocationFileIcon = $696C6669 (* 'ilfi' *);
+ kInternetLocationMailIcon = $696C6D61 (* 'ilma' *);
+ kInternetLocationNewsIcon = $696C6E77 (* 'ilnw' *);
+ kInternetLocationNSLNeighborhoodIcon = $696C6E73 (* 'ilns' *);
+ kInternetLocationGenericIcon = $696C6765 (* 'ilge' *);
+
+ { Folders }
+ kGenericFolderIcon = $666C6472 (* 'fldr' *);
+ kDropFolderIcon = $64626F78 (* 'dbox' *);
+ kMountedFolderIcon = $6D6E7464 (* 'mntd' *);
+ kOpenFolderIcon = $6F666C64 (* 'ofld' *);
+ kOwnedFolderIcon = $6F776E64 (* 'ownd' *);
+ kPrivateFolderIcon = $70727666 (* 'prvf' *);
+ kSharedFolderIcon = $7368666C (* 'shfl' *);
+
+ { Sharing Privileges icons }
+ kSharingPrivsNotApplicableIcon = $73686E61 (* 'shna' *);
+ kSharingPrivsReadOnlyIcon = $7368726F (* 'shro' *);
+ kSharingPrivsReadWriteIcon = $73687277 (* 'shrw' *);
+ kSharingPrivsUnknownIcon = $7368756B (* 'shuk' *);
+ kSharingPrivsWritableIcon = $77726974 (* 'writ' *);
+
+
+ { Users and Groups icons }
+ kUserFolderIcon = $75666C64 (* 'ufld' *);
+ kWorkgroupFolderIcon = $77666C64 (* 'wfld' *);
+ kGuestUserIcon = $67757372 (* 'gusr' *);
+ kUserIcon = $75736572 (* 'user' *);
+ kOwnerIcon = $73757372 (* 'susr' *);
+ kGroupIcon = $67727570 (* 'grup' *);
+
+ { Special folders }
+ kAppearanceFolderIcon = $61707072 (* 'appr' *);
+ kAppleExtrasFolderIcon = $616578C6 (* 'aexÄ' *);
+ kAppleMenuFolderIcon = $616D6E75 (* 'amnu' *);
+ kApplicationsFolderIcon = $61707073 (* 'apps' *);
+ kApplicationSupportFolderIcon = $61737570 (* 'asup' *);
+ kAssistantsFolderIcon = $617374C6 (* 'astÄ' *);
+ kColorSyncFolderIcon = $70726F66 (* 'prof' *);
+ kContextualMenuItemsFolderIcon = $636D6E75 (* 'cmnu' *);
+ kControlPanelDisabledFolderIcon = $63747244 (* 'ctrD' *);
+ kControlPanelFolderIcon = $6374726C (* 'ctrl' *);
+ kControlStripModulesFolderIcon = $736476C6 (* 'sdvÄ' *);
+ kDocumentsFolderIcon = $646F6373 (* 'docs' *);
+ kExtensionsDisabledFolderIcon = $65787444 (* 'extD' *);
+ kExtensionsFolderIcon = $6578746E (* 'extn' *);
+ kFavoritesFolderIcon = $66617673 (* 'favs' *);
+ kFontsFolderIcon = $666F6E74 (* 'font' *);
+ kHelpFolderIcon = $C692686C (* 'Ählp' *);
+ kInternetFolderIcon = $696E74C6 (* 'intÄ' *);
+ kInternetPlugInFolderIcon = $C6926E65 (* 'Änet' *);
+ kInternetSearchSitesFolderIcon = $69737366 (* 'issf' *);
+ kLocalesFolderIcon = $C6926C6F (* 'Äloc' *);
+ kMacOSReadMeFolderIcon = $6D6F72C6 (* 'morÄ' *);
+ kPublicFolderIcon = $70756266 (* 'pubf' *);
+ kPreferencesFolderIcon = $707266C6 (* 'prfÄ' *);
+ kPrinterDescriptionFolderIcon = $70706466 (* 'ppdf' *);
+ kPrinterDriverFolderIcon = $C6927072 (* 'Äprd' *);
+ kPrintMonitorFolderIcon = $70726E74 (* 'prnt' *);
+ kRecentApplicationsFolderIcon = $72617070 (* 'rapp' *);
+ kRecentDocumentsFolderIcon = $72646F63 (* 'rdoc' *);
+ kRecentServersFolderIcon = $72737276 (* 'rsrv' *);
+ kScriptingAdditionsFolderIcon = $C6927363 (* 'Äscr' *);
+ kSharedLibrariesFolderIcon = $C6926C69 (* 'Älib' *);
+ kScriptsFolderIcon = $736372C6 (* 'scrÄ' *);
+ kShutdownItemsDisabledFolderIcon = $73686444 (* 'shdD' *);
+ kShutdownItemsFolderIcon = $73686466 (* 'shdf' *);
+ kSpeakableItemsFolder = $73706B69 (* 'spki' *);
+ kStartupItemsDisabledFolderIcon = $73747244 (* 'strD' *);
+ kStartupItemsFolderIcon = $73747274 (* 'strt' *);
+ kSystemExtensionDisabledFolderIcon = $6D616344 (* 'macD' *);
+ kSystemFolderIcon = $6D616373 (* 'macs' *);
+ kTextEncodingsFolderIcon = $C6927465 (* 'Ätex' *);
+ kUsersFolderIcon = $757372C6 (* 'usrÄ' *);
+ kUtilitiesFolderIcon = $757469C6 (* 'utiÄ' *);
+ kVoicesFolderIcon = $66766F63 (* 'fvoc' *);
+ kSystemFolderXIcon = $6D616378 (* 'macx' *);
+
+ { Badges }
+ kAppleScriptBadgeIcon = $73637270 (* 'scrp' *);
+ kLockedBadgeIcon = $6C626467 (* 'lbdg' *);
+ kMountedBadgeIcon = $6D626467 (* 'mbdg' *);
+ kSharedBadgeIcon = $73626467 (* 'sbdg' *);
+ kAliasBadgeIcon = $61626467 (* 'abdg' *);
+ kAlertCautionBadgeIcon = $63626467 (* 'cbdg' *);
+
+ { Alert icons }
+ kAlertNoteIcon = $6E6F7465 (* 'note' *);
+ kAlertCautionIcon = $63617574 (* 'caut' *);
+ kAlertStopIcon = $73746F70 (* 'stop' *);
+
+ { Networking icons }
+ kAppleTalkIcon = $61746C6B (* 'atlk' *);
+ kAppleTalkZoneIcon = $61747A6E (* 'atzn' *);
+ kAFPServerIcon = $61667073 (* 'afps' *);
+ kFTPServerIcon = $66747073 (* 'ftps' *);
+ kHTTPServerIcon = $68747073 (* 'htps' *);
+ kGenericNetworkIcon = $676E6574 (* 'gnet' *);
+ kIPFileServerIcon = $69737276 (* 'isrv' *);
+
+ { Toolbar icons }
+ kToolbarCustomizeIcon = $74637573 (* 'tcus' *);
+ kToolbarDeleteIcon = $7464656C (* 'tdel' *);
+ kToolbarFavoritesIcon = $74666176 (* 'tfav' *);
+ kToolbarHomeIcon = $74686F6D (* 'thom' *);
+
+ { Other icons }
+ kAppleLogoIcon = $6361706C (* 'capl' *);
+ kAppleMenuIcon = $7361706C (* 'sapl' *);
+ kBackwardArrowIcon = $6261726F (* 'baro' *);
+ kFavoriteItemsIcon = $66617672 (* 'favr' *);
+ kForwardArrowIcon = $6661726F (* 'faro' *);
+ kGridIcon = $67726964 (* 'grid' *);
+ kHelpIcon = $68656C70 (* 'help' *);
+ kKeepArrangedIcon = $61726E67 (* 'arng' *);
+ kLockedIcon = $6C6F636B (* 'lock' *);
+ kNoFilesIcon = $6E66696C (* 'nfil' *);
+ kNoFolderIcon = $6E666C64 (* 'nfld' *);
+ kNoWriteIcon = $6E777274 (* 'nwrt' *);
+ kProtectedApplicationFolderIcon = $70617070 (* 'papp' *);
+ kProtectedSystemFolderIcon = $70737973 (* 'psys' *);
+ kRecentItemsIcon = $72636E74 (* 'rcnt' *);
+ kShortcutIcon = $73687274 (* 'shrt' *);
+ kSortAscendingIcon = $61736E64 (* 'asnd' *);
+ kSortDescendingIcon = $64736E64 (* 'dsnd' *);
+ kUnlockedIcon = $756C636B (* 'ulck' *);
+ kConnectToIcon = $636E6374 (* 'cnct' *);
+ kGenericWindowIcon = $6777696E (* 'gwin' *);
+ kQuestionMarkIcon = $71756573 (* 'ques' *);
+ kDeleteAliasIcon = $64616C69 (* 'dali' *);
+ kEjectMediaIcon = $656A6563 (* 'ejec' *);
+ kBurningIcon = $6275726E (* 'burn' *);
+ kRightContainerArrowIcon = $72636172 (* 'rcar' *);
+
+
+ { IconServicesUsageFlags }
+
+type
+ IconServicesUsageFlags = UInt32;
+
+const
+ kIconServicesNormalUsageFlag = $00000000;
+ kIconServicesNoBadgeFlag = $00000001; // available on Panther and later
+ kIconServicesUpdateIfNeededFlag = $00000002; // available on Panther and later
+
+
+ {
+ kIconServicesCatalogInfoMask - Minimal bitmask for use with
+ GetIconRefFromFileInfo(). Use this mask with FSGetCatalogInfo
+ before calling GetIconRefFromFileInfo().
+ }
+ kIconServicesCatalogInfoMask = $0008181E;
+
+
+ {
+ * PlotIconRefFlags
+ *
+ * Discussion:
+ * Flags that can be passed to the PlotIconRefInContext routine.
+ }
+
+type
+ PlotIconRefFlags = UInt32;
+const
+ kPlotIconRefNormalFlags = 0;
+ kPlotIconRefNoImage = $02;
+ kPlotIconRefNoMask = $04;
+
+
+ {
+ IconFamily 'icns' resources contain an entire IconFamily (all sizes and depths).
+ For custom icons, icns IconFamily resources of the custom icon resource ID are fetched first before
+ the classic custom icons (individual 'ics#, ICN#, etc) are fetched. If the fetch of the icns resource
+ succeeds then the icns is looked at exclusively for the icon data.
+ For custom icons, new icon features such as 32-bit deep icons are only fetched from the icns resource.
+ This is to avoid incompatibilities with cut & paste of new style icons with an older version of the
+ MacOS Finder.
+ DriverGestalt is called with code kdgMediaIconSuite by IconServices after calling FSM to determine a
+ driver icon for a particular device. The result of the kdgMediaIconSuite call to DriverGestalt should
+ be a pointer an an IconFamily. In this manner driver vendors can provide rich, detailed drive icons
+ instead of the 1-bit variety previously supported.
+ }
+ kIconFamilyType = $69636E73 (* 'icns' *);
+
+
+type
+ IconFamilyElementPtr = ^IconFamilyElement;
+ IconFamilyElement = record
+ elementType: OSType; { 'ICN#', 'icl8', etc... }
+ elementSize: Size; { Size of this element }
+ elementData: SInt8;
+ end;
+
+ IconFamilyResourcePtr = ^IconFamilyResource;
+ IconFamilyResource = record
+ resourceType: OSType; { Always 'icns' }
+ resourceSize: Size; { Total size of this resource }
+ elements: array [0..0] of IconFamilyElement;
+ end;
+
+ IconFamilyPtr = ^IconFamilyResource;
+ IconFamilyHandle = ^IconFamilyPtr;
+ {
+ ==============================================================================
+ Initialization and Termination
+ ==============================================================================
+ }
+
+ {
+ IconServicesInit
+
+ Call this routine once per classic 68K application initialization.
+ This routine does not need to be called at boot time.
+ }
+
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * IconServicesInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IconServicesInit(initBlockPtr: CFragInitBlockPtr): OSErr; external name '_IconServicesInit';
+{
+ IconServicesTerminate:
+
+ Call this routine once from the termination of a classic 68K application.
+ This routine does not need to be called at boot time.
+}
+
+{
+ * IconServicesTerminate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure IconServicesTerminate; external name '_IconServicesTerminate';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ ==============================================================================
+ Converting data structures
+ ==============================================================================
+}
+
+
+{
+ IconRefToIconFamily
+ This routines returns a new IconFamily that contains the data corresponding
+ to the specified IconRef.
+}
+
+{
+ * IconRefToIconFamily()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IconRefToIconFamily(theIconRef: IconRef; whichIcons: IconSelectorValue; var iconFamily: IconFamilyHandle): OSErr; external name '_IconRefToIconFamily';
+{
+ IconFamilyToIconSuite
+ This routine transfers the data from an icon family handle into an icon suite.
+}
+
+{
+ * IconFamilyToIconSuite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IconFamilyToIconSuite(iconFamily: IconFamilyHandle; whichIcons: IconSelectorValue; var iconSuite: IconSuiteRef): OSErr; external name '_IconFamilyToIconSuite';
+{
+ IconSuiteToIconFamily
+ This routine transfers the data in an icon suite into an icon family.
+}
+
+{
+ * IconSuiteToIconFamily()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IconSuiteToIconFamily(iconSuite: IconSuiteRef; whichIcons: IconSelectorValue; var iconFamily: IconFamilyHandle): OSErr; external name '_IconSuiteToIconFamily';
+{
+ SetIconFamilyData
+ Change the data of an icon family. The data is copied.
+ The type can be one of the icon type, or 'PICT'.
+ The data will be compressed if needed.
+}
+
+{
+ * SetIconFamilyData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetIconFamilyData(iconFamily: IconFamilyHandle; iconType: OSType; h: Handle): OSErr; external name '_SetIconFamilyData';
+{
+ GetIconFamilyData
+ Return a copy of the data in the icon family.
+ The type can be one of the icon type, or 'PICT'
+ The data will be returned uncompressed.
+ The handle (h) will be resized as appropriate. If no data of the
+ requested type is present, the handle size will be set to 0.
+}
+
+{
+ * GetIconFamilyData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIconFamilyData(iconFamily: IconFamilyHandle; iconType: OSType; h: Handle): OSErr; external name '_GetIconFamilyData';
+{
+ ==============================================================================
+ Reference counting
+ ==============================================================================
+}
+
+
+{
+ GetIconRefOwners
+
+ This routine returns the reference count for the IconRef, or number of owners.
+
+ A valid IconRef always has at least one owner.
+}
+
+{
+ * GetIconRefOwners()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIconRefOwners(theIconRef: IconRef; var owners: UInt16): OSErr; external name '_GetIconRefOwners';
+{
+ AcquireIconRef
+ This routine increments the reference count for the IconRef
+}
+
+{
+ * AcquireIconRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AcquireIconRef(theIconRef: IconRef): OSErr; external name '_AcquireIconRef';
+{
+ ReleaseIconRef
+
+ This routine decrements the reference count for the IconRef.
+
+ When the reference count reaches 0, all memory allocated for the icon
+ is disposed. Any subsequent use of the IconRef is invalid.
+}
+
+{
+ * ReleaseIconRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ReleaseIconRef(theIconRef: IconRef): OSErr; external name '_ReleaseIconRef';
+{
+ ==============================================================================
+ Getting an IconRef
+ ==============================================================================
+}
+
+
+{
+ GetIconRefFromFile
+
+ This routine returns an icon ref for the specified file, folder or volume.
+ The label information is provided separately, since two files with the same icon
+ but a different label would share the same iconRef. The label can be used in
+ PlotIconRef() for example.
+
+ Use this routine if you have no information about the file system object. If
+ you have already done a GetCatInfo on the file and want to save some I/O,
+ call GetIconRefFromFolder() if you know it's a folder with no custom icon or
+ call GetIconRef() if it's a file with no custom icon.
+ This routine increments the reference count of the returned IconRef. Call
+ ReleaseIconRef() when you're done with it.
+}
+
+{
+ * GetIconRefFromFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIconRefFromFile(const (*var*) theFile: FSSpec; var theIconRef: IconRef; var theLabel: SInt16): OSErr; external name '_GetIconRefFromFile';
+{
+ GetIconRef
+
+ This routine returns an icon ref for an icon in the desktop database or
+ for a registered icon.
+ The system registers a set of icon such as the help icon with the creator
+ code kSystemIconsCreator. See above for a list of the registered system types.
+ The vRefNum is used as a hint on where to look for the icon first. Use
+ kOnSystemDisk if you don't know what to pass.
+ This routine increments the reference count of the returned IconRef. Call
+ ReleaseIconRef() when you're done with it.
+}
+
+{
+ * GetIconRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIconRef(vRefNum: SInt16; creator: OSType; iconType: OSType; var theIconRef: IconRef): OSErr; external name '_GetIconRef';
+{
+ GetIconRefFromFolder
+
+ This routine returns an icon ref for a folder with no custom icon.
+ Use the more generic, but slightly slower, GetIconRefFromFile() if
+ you don't already have the necessary info about the file.
+ Attributes should be CInfoPBRec.dirInfo.ioFlAttrib for this folder.
+ Access privileges should be CInfoPBRec.dirInfo.ioACUser for this folder.
+ This routine increments the reference count of the IconRef. Call ReleaseIconRef()
+ when you're done with it.
+}
+
+{
+ * GetIconRefFromFolder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIconRefFromFolder(vRefNum: SInt16; parentFolderID: SInt32; folderID: SInt32; attributes: SInt8; accessPrivileges: SInt8; var theIconRef: IconRef): OSErr; external name '_GetIconRefFromFolder';
+{ GetIconRefFromFileInfo }
+{
+ * GetIconRefFromFileInfo()
+ *
+ * Summary:
+ * This routine returns an IconRef for a file with minimal file I/O.
+ *
+ * Discussion:
+ * To minimize file operations, FSGetCatalogInfo should be called
+ * prior to calling this routine. The FSCatalogInfo should
+ * correspond to kIconServicesCatalogInfoMask The name should be
+ * fetched and passed in. If either the name or the correct catalog
+ * info is not passed in, this routine will do file operations for
+ * this information instead.
+ *
+ * Parameters:
+ *
+ * inRef:
+ * An FSRef for the target file
+ *
+ * inFileNameLength:
+ * The length of the name of the target file
+ *
+ * inFileName:
+ * The name of the target file
+ *
+ * inWhichInfo:
+ * The mask of file info already acquired.
+ *
+ * inCatalogInfo:
+ * The catalog info already acquired.
+ *
+ * inUsageFlags:
+ * The usage flags for this call (use
+ * kIconServicesNormalUsageFlag).
+ *
+ * outIconRef:
+ * The output IconRef for the routine.
+ *
+ * outLabel:
+ * The output label for the icon/file.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function GetIconRefFromFileInfo(const (*var*) inRef: FSRef; inFileNameLength: UniCharCount; inFileName: UniCharPtr; inWhichInfo: FSCatalogInfoBitmap; inCatalogInfo: {Const}FSCatalogInfoPtr; inUsageFlags: IconServicesUsageFlags; var outIconRef: IconRef; var outLabel: SInt16): OSStatus; external name '_GetIconRefFromFileInfo';
+
+{ GetIconRefFromTypeInfo}
+{
+ * GetIconRefFromTypeInfo()
+ *
+ * Summary:
+ * Create an IconRef for a type information.
+ *
+ * Discussion:
+ * Creates IconRef based on provided type info. Any of the input
+ * parameters can be zero (meaning it is unknown). Returns generic
+ * document icon in case if all parameters are zeroes. Calling the
+ * routine with non zero inCreator and inType and zero inExtension
+ * and inMIMEType is equivalent to GetIconRef(kOnSystemDisk,
+ * inCreator, inType).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inCreator:
+ * The creator.
+ *
+ * inType:
+ * The type.
+ *
+ * inExtension:
+ * The extension.
+ *
+ * inMIMEType:
+ * The MIME type.
+ *
+ * inUsageFlags:
+ * The usage flags for this call (use
+ * kIconServicesNormalUsageFlag).
+ *
+ * outIconRef:
+ * The output IconRef for the routine.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function GetIconRefFromTypeInfo( inCreator: OSType; inType: OSType; inExtension: CFStringRef; inMIMEType: CFStringRef; inUsageFlags: IconServicesUsageFlags; var outIconRef: IconRef ): OSErr; external name '_GetIconRefFromTypeInfo';
+
+{ GetIconRefFromIconFamilyPtr}
+{
+ * GetIconRefFromIconFamilyPtr()
+ *
+ * Summary:
+ * Create an IconRef for the IconFamilyPtr.
+ *
+ * Discussion:
+ * This routine creates IconRef for the IconFamilyPtr.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inIconFamilyPtr:
+ * The icon data
+ *
+ * inSize:
+ * The icon data size
+ *
+ * outIconRef:
+ * The output IconRef for the routine.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function GetIconRefFromIconFamilyPtr( const (*var*) inIconFamilyPtr: IconFamilyResource; inSize: Size; var outIconRef: IconRef ): OSStatus; external name '_GetIconRefFromIconFamilyPtr';
+
+{
+ ==============================================================================
+ Adding and modifying IconRef
+ ==============================================================================
+}
+
+
+{
+ RegisterIconRefFromIconFamily
+ This routine adds a new entry to the IconRef registry. Other clients will be
+ able to access it using the (creator, iconType) pair specified here.
+ Lower-case creators are reserved for the system.
+ Consider using RegisterIconRefFromResource() if possible, since the data
+ registered using RegisterIconRefFromFamily() cannot be purged.
+ The iconFamily data is copied and the caller is reponsible for disposing of it.
+ This routine increments the reference count of the IconRef. Call ReleaseIconRef()
+ when you're done with it.
+}
+
+{
+ * RegisterIconRefFromIconFamily()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RegisterIconRefFromIconFamily(creator: OSType; iconType: OSType; iconFamily: IconFamilyHandle; var theIconRef: IconRef): OSErr; external name '_RegisterIconRefFromIconFamily';
+{
+ RegisterIconRefFromResource
+
+ Registers an IconRef from a resouce file.
+ Lower-case creators are reserved for the system.
+ The icon data to be fetched is either classic icon data or an icon family.
+ The 'icns' icon family is searched for before the classic icon data.
+ This routine increments the reference count of the IconRef. Call ReleaseIconRef()
+ when you're done with it.
+}
+
+{
+ * RegisterIconRefFromResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RegisterIconRefFromResource(creator: OSType; iconType: OSType; const (*var*) resourceFile: FSSpec; resourceID: SInt16; var theIconRef: IconRef): OSErr; external name '_RegisterIconRefFromResource';
+{ RegisterIconRefFromFSRef }
+{
+ * RegisterIconRefFromFSRef()
+ *
+ * Discussion:
+ * This routine registers an IconRef from a ".icns" file and
+ * associates it with a creator/type pair.
+ *
+ * Parameters:
+ *
+ * creator:
+ * The creator code for the icns file.
+ *
+ * iconType:
+ * The type code for the icns file
+ *
+ * iconFile:
+ * The FSRef of the icns file.
+ *
+ * theIconRef:
+ * The output IconRef for the routine.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function RegisterIconRefFromFSRef(creator: OSType; iconType: OSType; const (*var*) iconFile: FSRef; var theIconRef: IconRef): OSStatus; external name '_RegisterIconRefFromFSRef';
+
+{
+ UnregisterIconRef
+
+ Removes the specified icon from the icon cache (if there are no users of it).
+ If some clients are using this iconRef, then the IconRef will be removed when the
+ last user calls ReleaseIconRef.
+}
+
+{
+ * UnregisterIconRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UnregisterIconRef(creator: OSType; iconType: OSType): OSErr; external name '_UnregisterIconRef';
+{
+ UpdateIconRef
+
+ Call this routine to force an update of the data for iconRef.
+
+ For example after changing an icon in the desktop database or changing the custom
+ icon of a file. Note that after _adding_ a custom icon to file or folder, you
+ need to call GetIconRefFromFile() to get a new IconRef specific to this file.
+
+ This routine does nothing if the IconRef is a registered icon.
+}
+
+{
+ * UpdateIconRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UpdateIconRef(theIconRef: IconRef): OSErr; external name '_UpdateIconRef';
+{
+ OverrideIconRefFromResource
+
+ This routines replaces the bitmaps of the specified IconRef with the ones
+ in the specified resource file.
+}
+
+{
+ * OverrideIconRefFromResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OverrideIconRefFromResource(theIconRef: IconRef; const (*var*) resourceFile: FSSpec; resourceID: SInt16): OSErr; external name '_OverrideIconRefFromResource';
+{
+ OverrideIconRef
+
+ This routines replaces the bitmaps of the specified IconRef with the ones
+ from the new IconRef.
+}
+
+{
+ * OverrideIconRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OverrideIconRef(oldIconRef: IconRef; newIconRef: IconRef): OSErr; external name '_OverrideIconRef';
+{
+ RemoveIconRefOverride
+ This routine remove an override if one was applied to the icon and
+ reverts back to the original bitmap data.
+}
+
+{
+ * RemoveIconRefOverride()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RemoveIconRefOverride(theIconRef: IconRef): OSErr; external name '_RemoveIconRefOverride';
+{
+ ==============================================================================
+ Creating composite IconRef
+ ==============================================================================
+}
+
+
+{
+ CompositeIconRef
+
+ Superimposes an IconRef on top of another one
+}
+
+{
+ * CompositeIconRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CompositeIconRef(backgroundIconRef: IconRef; foregroundIconRef: IconRef; var compositeIconRef: IconRef): OSErr; external name '_CompositeIconRef';
+{
+ IsIconRefComposite
+ Indicates if a given icon ref is a composite of two other icon refs (and which ones)
+ If it isn't a composite, backgroundIconRef and foreGroundIconRef will be 0.
+}
+
+{
+ * IsIconRefComposite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IsIconRefComposite(compositeIconRef: IconRef; var backgroundIconRef: IconRef; var foregroundIconRef: IconRef): OSErr; external name '_IsIconRefComposite';
+{
+ ==============================================================================
+ Using IconRef
+ ==============================================================================
+}
+
+{
+ IsValidIconRef
+ Return true if the iconRef passed in is a valid icon ref
+}
+
+{
+ * IsValidIconRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IsValidIconRef(theIconRef: IconRef): boolean; external name '_IsValidIconRef';
+{
+ PlotIconRef
+
+ This routine plots the IconRef. It mostly takes the same parameters as
+ PlotIconSuite. Pass kIconServicesNormalUsageFlag as a default value for
+ IconServicesUsageFlags.
+}
+
+{
+ * PlotIconRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PlotIconRef(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theIconServicesUsageFlags: IconServicesUsageFlags; theIconRef: IconRef): OSErr; external name '_PlotIconRef';
+{ PlotIconRefInContext }
+{
+ * PlotIconRefInContext()
+ *
+ * Discussion:
+ * This routines plots an IconRef using Quartz/CoreGraphics.
+ *
+ * Parameters:
+ *
+ * inContext:
+ * The graphics context to use.
+ *
+ * inRect:
+ * The rect to plot the icon in.
+ *
+ * inAlign:
+ * The icon alignment.
+ *
+ * inTransform:
+ * The icon transform.
+ *
+ * inLabelColor:
+ * The icon label color.
+ *
+ * inFlags:
+ * The drawing flags to use (usually kPlotIconRefNormalFlags).
+ *
+ * inIconRef:
+ * The IconRef to plot.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function PlotIconRefInContext(inContext: CGContextRef; const (*var*) inRect: CGRect; inAlign: IconAlignmentType; inTransform: IconTransformType; inLabelColor: RGBColorPtr; inFlags: PlotIconRefFlags; inIconRef: IconRef): OSStatus; external name '_PlotIconRefInContext';
+
+
+{
+ PtInIconRef
+
+ This routine indicates if testPt would hit the icon designated by iconRef.
+ It mostly takes the same parameters as PtInIconSuite.
+ Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags.
+}
+
+
+{
+ * PtInIconRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PtInIconRef(const (*var*) testPt: Point; const (*var*) iconRect: Rect; align: IconAlignmentType; theIconServicesUsageFlags: IconServicesUsageFlags; theIconRef: IconRef): boolean; external name '_PtInIconRef';
+{
+ RectInIconRef
+
+ This routine indicates if testRect would intersect the icon designated by iconRef.
+ It mostly takes the same parameters as RectInIconSuite.
+ Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags.
+}
+
+
+{
+ * RectInIconRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RectInIconRef(const (*var*) testRect: Rect; const (*var*) iconRect: Rect; align: IconAlignmentType; iconServicesUsageFlags_: IconServicesUsageFlags; theIconRef: IconRef): boolean; external name '_RectInIconRef';
+{
+ IconRefToRgn
+
+ This routine returns a region for the icon.
+ It mostly takes the same parameters as IconSuiteToRgn.
+ Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags.
+}
+
+{
+ * IconRefToRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IconRefToRgn(theRgn: RgnHandle; const (*var*) iconRect: Rect; align: IconAlignmentType; iconServicesUsageFlags_: IconServicesUsageFlags; theIconRef: IconRef): OSErr; external name '_IconRefToRgn';
+{
+ GetIconSizesFromIconRef
+
+ This routine returns an IconSelectorValue indicating the depths and sizes of
+ icon data which are actually available. It takes an IconSelectorValue
+ indicating which sizes/depths the caller is interested and returns an
+ IconSelectorValue indicating which sizes/depths exist.
+
+ Caution:
+
+ This is potentially an extremely expensive call as IconServices may be forced
+ to attempt fetching the data for the IconRef's sizes/depths which may result
+ in hitting the local disk or even the network to obtain the data to determine
+ which sizes/depths actually exist.
+ Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags.
+
+ This call is deprecated. Please use IsDataAvailableInIconRef() instead.
+}
+
+{
+ * GetIconSizesFromIconRef() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIconSizesFromIconRef(iconSelectorInput: IconSelectorValue; var iconSelectorOutputPtr: IconSelectorValue; iconServicesUsageFlags_: IconServicesUsageFlags; theIconRef: IconRef): OSErr; external name '_GetIconSizesFromIconRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+{ IsDataAvailableInIconRef}
+{
+ * IsDataAvailableInIconRef()
+ *
+ * Summary:
+ * Check if IconRef has specific data.
+ *
+ * Discussion:
+ * This routine returns true if inIconKind icon data is availabe or
+ * can be created.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inIconKind:
+ * The icon data kind
+ *
+ * inIconRef:
+ * The IconRef to test.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function IsDataAvailableInIconRef( inIconKind: OSType; inIconRef: IconRef ): Boolean; external name '_IsDataAvailableInIconRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{
+ ==============================================================================
+ Flushing IconRef data
+ ==============================================================================
+}
+
+
+{
+ FlushIconRefs
+
+ Making this call will dispose of all the data for the specified icons if
+ the data can be reacquired, for example if the data is provided from a resource.
+ '****' is a wildcard for all types or all creators.
+}
+
+{
+ * FlushIconRefs() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ }
+function FlushIconRefs(creator: OSType; iconType: OSType): OSErr; external name '_FlushIconRefs';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+{
+ FlushIconRefsByVolume
+
+ This routine disposes of the data for the icons related to the indicated volume
+ if this data can be reacquired, for example if the data is provided from a
+ resource.
+}
+
+{
+ * FlushIconRefsByVolume() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ }
+function FlushIconRefsByVolume(vRefNum: SInt16): OSErr; external name '_FlushIconRefsByVolume';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+{
+ ==============================================================================
+ Controling custom icons
+ ==============================================================================
+}
+
+
+{
+ SetCustomIconsEnabled
+
+ Enable or disable custom icons on the specified volume.
+}
+
+{
+ * SetCustomIconsEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetCustomIconsEnabled(vRefNum: SInt16; enableCustomIcons: boolean): OSErr; external name '_SetCustomIconsEnabled';
+{
+ GetCustomIconsEnabled
+
+ Return true if custom icons are enabled on the specified volume, false otherwise.
+}
+
+{
+ * GetCustomIconsEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetCustomIconsEnabled(vRefNum: SInt16; var customIconsEnabled: boolean): OSErr; external name '_GetCustomIconsEnabled';
+{
+ IsIconRefMaskEmpty
+ Returns true if the mask for this icon is blank
+}
+
+{
+ * IsIconRefMaskEmpty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IsIconRefMaskEmpty(iconRef_: IconRef): boolean; external name '_IsIconRefMaskEmpty';
+{
+ GetIconRefVariant
+ Icon variants allows different images to be used with different icon state.
+ For example, the 'open' variant for a folder could be represented with
+ an open folder.
+ Given an icon ref and a desired variant, this routine returns an icon
+ ref (which may be the same as the input icon ref) and a transformation
+ which should be used with PlotIconRef() to render the icon appropriately.
+ The returned icon ref should be used to do hit-testing.
+}
+
+{
+ * GetIconRefVariant()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetIconRefVariant(inIconRef: IconRef; inVariant: OSType; var outTransform: IconTransformType): IconRef; external name '_GetIconRefVariant';
+{
+ ==============================================================================
+ Icon files (.icns files)
+ ==============================================================================
+}
+
+
+{
+ RegisterIconRefFromIconFile
+ This routine adds a new entry to the IconRef registry. Other clients will be
+ able to access it using the (creator, iconType) pair specified here.
+ Lower-case creators are reserved for the system.
+ If the creator is kSystemIconsCreator and the iconType is 0, a new IconRef
+ is always returned. Otherwise, if the creator and type have already been
+ registered, the previously registered IconRef is returned.
+ This routine increments the reference count of the IconRef. Call ReleaseIconRef()
+ when you're done with it.
+}
+
+{
+ * RegisterIconRefFromIconFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RegisterIconRefFromIconFile(creator: OSType; iconType: OSType; const (*var*) iconFile: FSSpec; var theIconRef: IconRef): OSErr; external name '_RegisterIconRefFromIconFile';
+{
+ ReadIconFile
+ Read the specified icon file into the icon family handle.
+ The caller is responsible for disposing the iconFamily
+}
+
+{
+ * ReadIconFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ReadIconFile(const (*var*) iconFile: FSSpec; var iconFamily: IconFamilyHandle): OSErr; external name '_ReadIconFile';
+{ ReadIconFromFSRef }
+{
+ * ReadIconFromFSRef()
+ *
+ * Discussion:
+ * This routine reads an icon (icns) file into memory.
+ *
+ * Parameters:
+ *
+ * ref:
+ * The FSRef for the icon file.
+ *
+ * iconFamily:
+ * The handle for the icon family.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function ReadIconFromFSRef(const (*var*) ref: FSRef; var iconFamily: IconFamilyHandle): OSStatus; external name '_ReadIconFromFSRef';
+
+
+{
+ WriteIconFile
+ Write the iconFamily handle to the specified file
+}
+
+{
+ * WriteIconFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in IconServicesLib 9.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function WriteIconFile(iconFamily: IconFamilyHandle; const (*var*) iconFile: FSSpec): OSErr; external name '_WriteIconFile';
+{$ALIGN MAC68K}
+
+
+{unit NSL}
+{
+ File: NSL.p
+
+ Contains: Interface to API for using the NSL User Interface
+
+ Version: Technology: Mac OS X
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+ NSLDialogOptionFlags = UInt32;
+const
+ kNSLDefaultNSLDlogOptions = $00000000; { use defaults for all the options }
+ kNSLNoURLTEField = $00000001; { don't show url text field for manual entry }
+ kNSLAddServiceTypes = $00000002; { add the service type if a user enters an incomplete URL }
+ kNSLClientHandlesRecents = $00000004; { Stops NSLStandardGetURL from adding the selection to the recent items folder }
+
+
+type
+ NSLDialogOptionsPtr = ^NSLDialogOptions;
+ NSLDialogOptions = record
+ version: UInt16;
+ dialogOptionFlags: NSLDialogOptionFlags; { option flags for affecting the dialog's behavior }
+ windowTitle: Str255;
+ actionButtonLabel: Str255; { label of the default button (or null string for default) }
+ cancelButtonLabel: Str255; { label of the cancel button (or null string for default) }
+ message: Str255; { custom message prompt (or null string for default) }
+ end;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ NSLURLFilterProcPtr = function(url: CStringPtr; var displayString: Str255): boolean;
+{$elsec}
+ NSLURLFilterProcPtr = ProcPtr;
+{$endc}
+
+ { you can provide for calls to NSLStandardGetURL }
+{$ifc TYPED_FUNCTION_POINTERS}
+ NSLEventProcPtr = procedure(var newEvent: EventRecord; userContext: UnivPtr);
+{$elsec}
+ NSLEventProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ NSLURLFilterUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ NSLURLFilterUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ NSLEventUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ NSLEventUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppNSLURLFilterProcInfo = $000003D0;
+ uppNSLEventProcInfo = $000003C0;
+ {
+ * NewNSLURLFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewNSLURLFilterUPP(userRoutine: NSLURLFilterProcPtr): NSLURLFilterUPP; external name '_NewNSLURLFilterUPP'; { old name was NewNSLURLFilterProc }
+{
+ * NewNSLEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewNSLEventUPP(userRoutine: NSLEventProcPtr): NSLEventUPP; external name '_NewNSLEventUPP'; { old name was NewNSLEventProc }
+{
+ * DisposeNSLURLFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeNSLURLFilterUPP(userUPP: NSLURLFilterUPP); external name '_DisposeNSLURLFilterUPP';
+{
+ * DisposeNSLEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeNSLEventUPP(userUPP: NSLEventUPP); external name '_DisposeNSLEventUPP';
+{
+ * InvokeNSLURLFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeNSLURLFilterUPP(url: CStringPtr; var displayString: Str255; userRoutine: NSLURLFilterUPP): boolean; external name '_InvokeNSLURLFilterUPP'; { old name was CallNSLURLFilterProc }
+{
+ * InvokeNSLEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeNSLEventUPP(var newEvent: EventRecord; userContext: UnivPtr; userRoutine: NSLEventUPP); external name '_InvokeNSLEventUPP'; { old name was CallNSLEventProc }
+{ <--- function returns OSStatus of the operation. noErr will be returned if valid, kNSLUserCanceled will be returned if the user cancels }
+{ ---> dialogOptions }
+{ ---> eventProc }
+{ ---> eventProcContextPtr }
+{ ---> filterProc }
+{ ---> serviceTypeList }
+{ <--- userSelectedURL }
+{ NSLDialogOptions* dialogOptions }
+{
+ dialogOptions is a user defined structure defining the look, feel and operation of NSLStandardGetURL dialog
+ default behavior can be achieved by passing in a pointer to a structure that has been filled out by a previous
+ call to NSLGetDefaultDialogOptions or by passing in NULL.
+}
+{ NSLEventUPP eventProc }
+{
+ the eventProc is a callback NSLURLFilterUPP that will
+ get called with Events that the dialog doesn't handle. If you pass in nil,
+ you won't get update events while the NSLStandardGetURL dialog is open.
+}
+{ void* eventProcContextPtr }
+{ you can provide a pointer to some contextual data that you want to have sent to your eventProc filter }
+{ NSLURLFilterProcPtr filterProc }
+{
+ the filter param is a callback NSLURLFilterUPP that
+ will get called (if not nil) for each url that is going to be displayed in
+ the dialog's result list. A result of false will not include the url for the
+ user to select from. You also have the option of handling the way the url looks
+ in the dialog listing by copying the preferred name into the displayString
+ parameter. (If left alone, NSLStandardGetURL dialog will strip the service type
+ portion off the url).
+}
+{ char* serviceTypeList }
+{
+ the serviceTypeList parameter is a null terminated string that will
+ directly affect the contents of the services popup in the dialog.
+ The structure of this string is a set of tuples as follows:
+ Name of ServiceType as to be represented in the popup followed by
+ a comma delimted list of service descriptors (ie http,https) that will
+ used in the search of that type. Each comma delimited tuple is delimited
+ by semi-colons.
+}
+{
+ For example:
+ If you want to search for services of type http (web), https (secure web),
+ and ftp, you could pass in the string "Web Servers,http,https;FTP Servers,ftp".
+ This would result in a popup list with two items ("Web Servers" and "FTP Servers")
+ and searches performed on them will provide results of type http and https for the
+ first, and ftp for the second.
+}
+
+{
+ Results list Icons:
+ NSLStandardGetURL provides icons in its listings for the following types:
+ "http", "https", "ftp", "afp", "lpr", "LaserWriter", "AFPServer"
+ any other types will get a generic icon. However, you can provide icons
+ if you wish by including an '#ics8' resource id at the end of your comma
+ delimited list. The dialog will then use that icon if found in its results
+ list. This icon will be used for all types in a tuple.
+ For example:
+ The param "Web Servers,http,https;Telnet Servers,telnet;NFS Servers,nfs,129"
+ would result in lists of http and https services to be shown with their default
+ icons, telnet servers would be shown with the default misc. icon and nfs
+ servers would be shown with your icon at resource id 129.
+}
+
+{ char** url }
+{
+ pass in the address of a char* and it will point to the resulting url. If the user
+ cancels (the function returns false), the pointer will be set to nil. If the function
+ returns true (user selected a url), then you must call NSLFreeURL on the pointer when
+ you are done with it.
+}
+{
+ Call this to have the user select a url based service from a dialog.
+ Function takes on input an optional filter proc, a serviceTypeList, and an address to a Ptr.
+ Function sets the value of the Ptr to a newly created c-style null terminated string
+ containing the user's choice of URL.
+}
+
+{
+ * NSLStandardGetURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLStandardGetURL(dialogOptions: NSLDialogOptionsPtr; eventProc: NSLEventUPP; eventProcContextPtr: UnivPtr; filterProc: NSLURLFilterUPP; serviceTypeList: CStringPtr; var userSelectedURL: CStringPtr): OSStatus; external name '_NSLStandardGetURL';
+
+{
+ * NSLGetDefaultDialogOptions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLGetDefaultDialogOptions(var dialogOptions: NSLDialogOptions): OSStatus; external name '_NSLGetDefaultDialogOptions';
+
+{ <--- function returns null (useful for setting variable at same time as freeing it }
+{ ---> url is memory created by a call to NSLStandardGetURL }
+{
+ * NSLFreeURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLFreeURL(url: CStringPtr): CStringPtr; external name '_NSLFreeURL';
+
+{ <--- function returns kNSLErrNullPtrError, file mgr errors, or resource mgr errors }
+{ ---> folderSelectorType is one of the well-known folders defined in Folders.h }
+{ ---> url is any valid url }
+{ ---> userFriendlyName is used for the file name and the display name (in the UI) }
+{
+ * NSLSaveURLAliasToFolder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NSLPPCLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function NSLSaveURLAliasToFolder(folderSelectorType: OSType; url: ConstCStringPtr; userFriendlyName: ConstCStringPtr): OSErr; external name '_NSLSaveURLAliasToFolder';
+
+
+{$ALIGN MAC68K}
+
+
+{unit Palettes}
+{
+ File: Palettes.p
+
+ Contains: Palette Manager Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1987-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ pmCourteous = 0; { Record use of color on each device touched. }
+ pmDithered = $0001;
+ pmTolerant = $0002; { render ciRGB if ciTolerance is exceeded by best match. }
+ pmAnimated = $0004; { reserve an index on each device touched and render ciRGB. }
+ pmExplicit = $0008; { no reserve, no render, no record; stuff index into port. }
+ pmWhite = $0010;
+ pmBlack = $0020;
+ pmInhibitG2 = $0100;
+ pmInhibitC2 = $0200;
+ pmInhibitG4 = $0400;
+ pmInhibitC4 = $0800;
+ pmInhibitG8 = $1000;
+ pmInhibitC8 = $2000; { NSetPalette Update Constants }
+ pmNoUpdates = $8000; { no updates }
+ pmBkUpdates = $A000; { background updates only }
+ pmFgUpdates = $C000; { foreground updates only }
+ pmAllUpdates = $E000; { all updates }
+
+
+type
+ ColorInfoPtr = ^ColorInfo;
+ ColorInfo = record
+ ciRGB: RGBColor; { true RGB values }
+ ciUsage: SInt16; { color usage }
+ ciTolerance: SInt16; { tolerance value }
+ ciDataFields: array [0..2] of SInt16; { private fields }
+ end;
+
+ ColorInfoHandle = ^ColorInfoPtr;
+ PalettePtr = ^Palette;
+ Palette = record
+ pmEntries: SInt16; { entries in pmTable }
+ pmDataFields: array [0..6] of SInt16; { private fields }
+ pmInfo: array [0..0] of ColorInfo;
+ end;
+
+ PaletteHandle = ^PalettePtr;
+ {
+ * InitPalettes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InitPalettes; external name '_InitPalettes';
+{
+ * NewPalette()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewPalette(entries: SInt16; srcColors: CTabHandle; srcUsage: SInt16; srcTolerance: SInt16): PaletteHandle; external name '_NewPalette';
+{
+ * GetNewPalette()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetNewPalette(PaletteID: SInt16): PaletteHandle; external name '_GetNewPalette';
+{
+ * DisposePalette()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposePalette(srcPalette: PaletteHandle); external name '_DisposePalette';
+{
+ * ActivatePalette()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure ActivatePalette(srcWindow: WindowRef); external name '_ActivatePalette';
+{
+ * SetPalette()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetPalette(dstWindow: WindowRef; srcPalette: PaletteHandle; cUpdates: boolean); external name '_SetPalette';
+{
+ * NSetPalette()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure NSetPalette(dstWindow: WindowRef; srcPalette: PaletteHandle; nCUpdates: SInt16); external name '_NSetPalette';
+{
+ * GetPalette()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetPalette(srcWindow: WindowRef): PaletteHandle; external name '_GetPalette';
+{
+ * CopyPalette()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure CopyPalette(srcPalette: PaletteHandle; dstPalette: PaletteHandle; srcEntry: SInt16; dstEntry: SInt16; dstLength: SInt16); external name '_CopyPalette';
+{
+ * PmForeColor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PmForeColor(dstEntry: SInt16); external name '_PmForeColor';
+{
+ * PmBackColor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PmBackColor(dstEntry: SInt16); external name '_PmBackColor';
+{
+ * AnimateEntry()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure AnimateEntry(dstWindow: WindowRef; dstEntry: SInt16; const (*var*) srcRGB: RGBColor); external name '_AnimateEntry';
+{
+ * [Mac]AnimatePalette()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure AnimatePalette(dstWindow: WindowRef; srcCTab: CTabHandle; srcIndex: SInt16; dstEntry: SInt16; dstLength: SInt16); external name '_AnimatePalette';
+{
+ * GetEntryColor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetEntryColor(srcPalette: PaletteHandle; srcEntry: SInt16; var dstRGB: RGBColor); external name '_GetEntryColor';
+{
+ * SetEntryColor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetEntryColor(dstPalette: PaletteHandle; dstEntry: SInt16; const (*var*) srcRGB: RGBColor); external name '_SetEntryColor';
+{
+ * GetEntryUsage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetEntryUsage(srcPalette: PaletteHandle; srcEntry: SInt16; var dstUsage: SInt16; var dstTolerance: SInt16); external name '_GetEntryUsage';
+{
+ * SetEntryUsage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetEntryUsage(dstPalette: PaletteHandle; dstEntry: SInt16; srcUsage: SInt16; srcTolerance: SInt16); external name '_SetEntryUsage';
+{
+ * CTab2Palette()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure CTab2Palette(srcCTab: CTabHandle; dstPalette: PaletteHandle; srcUsage: SInt16; srcTolerance: SInt16); external name '_CTab2Palette';
+{
+ * Palette2CTab()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure Palette2CTab(srcPalette: PaletteHandle; dstCTab: CTabHandle); external name '_Palette2CTab';
+{
+ * Entry2Index()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function Entry2Index(entry: SInt16): SInt32; external name '_Entry2Index';
+{
+ * RestoreDeviceClut()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure RestoreDeviceClut(gd: GDHandle); external name '_RestoreDeviceClut';
+{
+ * [Mac]ResizePalette()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure ResizePalette(p: PaletteHandle; size: SInt16); external name '_ResizePalette';
+{
+ * SaveFore()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SaveFore(var c: ColorSpec); external name '_SaveFore';
+{
+ * SaveBack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SaveBack(var c: ColorSpec); external name '_SaveBack';
+{
+ * RestoreFore()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure RestoreFore(const (*var*) c: ColorSpec); external name '_RestoreFore';
+{
+ * RestoreBack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure RestoreBack(const (*var*) c: ColorSpec); external name '_RestoreBack';
+{
+ * SetDepth()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetDepth(gd: GDHandle; depth: SInt16; whichFlags: SInt16; flags: SInt16): OSErr; external name '_SetDepth';
+{
+ * HasDepth()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HasDepth(gd: GDHandle; depth: SInt16; whichFlags: SInt16; flags: SInt16): SInt16; external name '_HasDepth';
+{
+ * PMgrVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMgrVersion: SInt16; external name '_PMgrVersion';
+{
+ * SetPaletteUpdates()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetPaletteUpdates(p: PaletteHandle; updates: SInt16); external name '_SetPaletteUpdates';
+{
+ * GetPaletteUpdates()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetPaletteUpdates(p: PaletteHandle): SInt16; external name '_GetPaletteUpdates';
+{
+ * GetGray()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetGray(device: GDHandle; const (*var*) backGround: RGBColor; var foreGround: RGBColor): boolean; external name '_GetGray';
+{$ALIGN MAC68K}
+
+
+{unit PictUtils}
+{
+ File: PictUtils.p
+
+ Contains: Picture Utilities Interfaces.
+
+ Version: Technology: Mac OS 8.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1990-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ verbs for the GetPictInfo, GetPixMapInfo, and NewPictInfo calls }
+
+const
+ returnColorTable = $0001;
+ returnPalette = $0002;
+ recordComments = $0004;
+ recordFontInfo = $0008;
+ suppressBlackAndWhite = $0010;
+
+ { color pick methods }
+ systemMethod = 0; { system color pick method }
+ popularMethod = 1; { method that chooses the most popular set of colors }
+ medianMethod = 2; { method that chooses a good average mix of colors }
+
+ { color bank types }
+ ColorBankIsCustom = -1;
+ ColorBankIsExactAnd555 = 0;
+ ColorBankIs555 = 1;
+
+
+type
+ PictInfoID = SInt32;
+ CommentSpecPtr = ^CommentSpec;
+ CommentSpec = record
+ count: SInt16; { number of occurrances of this comment ID }
+ ID: SInt16; { ID for the comment in the picture }
+ end;
+
+ CommentSpecHandle = ^CommentSpecPtr;
+ FontSpecPtr = ^FontSpec;
+ FontSpec = record
+ pictFontID: SInt16; { ID of the font in the picture }
+ sysFontID: SInt16; { ID of the same font in the current system file }
+ size: array [0..3] of SInt32; { bit array of all the sizes found (1..127) (bit 0 means > 127) }
+ style: SInt16; { combined style of all occurrances of the font }
+ nameOffset: SInt32; { offset into the fontNamesHdl handle for the fontÕs name }
+ end;
+
+ FontSpecHandle = ^FontSpecPtr;
+ PictInfoPtr = ^PictInfo;
+ PictInfo = record
+ version: SInt16; { this is always zero, for now }
+ uniqueColors: SInt32; { the number of actual colors in the picture(s)/pixmap(s) }
+ thePalette: PaletteHandle; { handle to the palette information }
+ theColorTable: CTabHandle; { handle to the color table }
+ hRes: Fixed; { maximum horizontal resolution for all the pixmaps }
+ vRes: Fixed; { maximum vertical resolution for all the pixmaps }
+ depth: SInt16; { maximum depth for all the pixmaps (in the picture) }
+ sourceRect: Rect; { the picture frame rectangle (this contains the entire picture) }
+ textCount: SInt32; { total number of text strings in the picture }
+ lineCount: SInt32; { total number of lines in the picture }
+ rectCount: SInt32; { total number of rectangles in the picture }
+ rRectCount: SInt32; { total number of round rectangles in the picture }
+ ovalCount: SInt32; { total number of ovals in the picture }
+ arcCount: SInt32; { total number of arcs in the picture }
+ polyCount: SInt32; { total number of polygons in the picture }
+ regionCount: SInt32; { total number of regions in the picture }
+ bitMapCount: SInt32; { total number of bitmaps in the picture }
+ pixMapCount: SInt32; { total number of pixmaps in the picture }
+ commentCount: SInt32; { total number of comments in the picture }
+ uniqueComments: SInt32; { the number of unique comments in the picture }
+ commentHandle: CommentSpecHandle; { handle to all the comment information }
+ uniqueFonts: SInt32; { the number of unique fonts in the picture }
+ fontHandle: FontSpecHandle; { handle to the FontSpec information }
+ fontNamesHandle: Handle; { handle to the font names }
+ reserved1: SInt32;
+ reserved2: SInt32;
+ end;
+
+ PictInfoHandle = ^PictInfoPtr;
+{$ifc TYPED_FUNCTION_POINTERS}
+ InitPickMethodProcPtr = function(colorsRequested: SInt16; var dataRef: UInt32; var colorBankType: SInt16): OSErr;
+{$elsec}
+ InitPickMethodProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ RecordColorsProcPtr = function(dataRef: UInt32; var colorsArray: RGBColor; colorCount: SInt32; var uniqueColors: SInt32): OSErr;
+{$elsec}
+ RecordColorsProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ CalcColorTableProcPtr = function(dataRef: UInt32; colorsRequested: SInt16; colorBankPtr: UnivPtr; var resultPtr: CSpecArray): OSErr;
+{$elsec}
+ CalcColorTableProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ DisposeColorPickMethodProcPtr = function(dataRef: UInt32): OSErr;
+{$elsec}
+ DisposeColorPickMethodProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ InitPickMethodUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ InitPickMethodUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ RecordColorsUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ RecordColorsUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ CalcColorTableUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CalcColorTableUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ DisposeColorPickMethodUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DisposeColorPickMethodUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppInitPickMethodProcInfo = $00000FA0;
+ uppRecordColorsProcInfo = $00003FE0;
+ uppCalcColorTableProcInfo = $00003EE0;
+ uppDisposeColorPickMethodProcInfo = $000000E0;
+ {
+ * NewInitPickMethodUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewInitPickMethodUPP(userRoutine: InitPickMethodProcPtr): InitPickMethodUPP; external name '_NewInitPickMethodUPP'; { old name was NewInitPickMethodProc }
+{
+ * NewRecordColorsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewRecordColorsUPP(userRoutine: RecordColorsProcPtr): RecordColorsUPP; external name '_NewRecordColorsUPP'; { old name was NewRecordColorsProc }
+{
+ * NewCalcColorTableUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewCalcColorTableUPP(userRoutine: CalcColorTableProcPtr): CalcColorTableUPP; external name '_NewCalcColorTableUPP'; { old name was NewCalcColorTableProc }
+{
+ * NewDisposeColorPickMethodUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewDisposeColorPickMethodUPP(userRoutine: DisposeColorPickMethodProcPtr): DisposeColorPickMethodUPP; external name '_NewDisposeColorPickMethodUPP'; { old name was NewDisposeColorPickMethodProc }
+{
+ * DisposeInitPickMethodUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeInitPickMethodUPP(userUPP: InitPickMethodUPP); external name '_DisposeInitPickMethodUPP';
+{
+ * DisposeRecordColorsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeRecordColorsUPP(userUPP: RecordColorsUPP); external name '_DisposeRecordColorsUPP';
+{
+ * DisposeCalcColorTableUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeCalcColorTableUPP(userUPP: CalcColorTableUPP); external name '_DisposeCalcColorTableUPP';
+{
+ * DisposeDisposeColorPickMethodUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeDisposeColorPickMethodUPP(userUPP: DisposeColorPickMethodUPP); external name '_DisposeDisposeColorPickMethodUPP';
+{
+ * InvokeInitPickMethodUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeInitPickMethodUPP(colorsRequested: SInt16; var dataRef: UInt32; var colorBankType: SInt16; userRoutine: InitPickMethodUPP): OSErr; external name '_InvokeInitPickMethodUPP'; { old name was CallInitPickMethodProc }
+{
+ * InvokeRecordColorsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeRecordColorsUPP(dataRef: UInt32; var colorsArray: RGBColor; colorCount: SInt32; var uniqueColors: SInt32; userRoutine: RecordColorsUPP): OSErr; external name '_InvokeRecordColorsUPP'; { old name was CallRecordColorsProc }
+{
+ * InvokeCalcColorTableUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeCalcColorTableUPP(dataRef: UInt32; colorsRequested: SInt16; colorBankPtr: UnivPtr; var resultPtr: CSpecArray; userRoutine: CalcColorTableUPP): OSErr; external name '_InvokeCalcColorTableUPP'; { old name was CallCalcColorTableProc }
+{
+ * InvokeDisposeColorPickMethodUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeDisposeColorPickMethodUPP(dataRef: UInt32; userRoutine: DisposeColorPickMethodUPP): OSErr; external name '_InvokeDisposeColorPickMethodUPP'; { old name was CallDisposeColorPickMethodProc }
+{
+ * GetPictInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetPictInfo(thePictHandle: PicHandle; var thePictInfo: PictInfo; verb: SInt16; colorsRequested: SInt16; colorPickMethod: SInt16; version: SInt16): OSErr; external name '_GetPictInfo';
+{
+ * GetPixMapInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetPixMapInfo(thePixMapHandle: PixMapHandle; var thePictInfo: PictInfo; verb: SInt16; colorsRequested: SInt16; colorPickMethod: SInt16; version: SInt16): OSErr; external name '_GetPixMapInfo';
+{
+ * NewPictInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewPictInfo(var thePictInfoID: PictInfoID; verb: SInt16; colorsRequested: SInt16; colorPickMethod: SInt16; version: SInt16): OSErr; external name '_NewPictInfo';
+{
+ * RecordPictInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RecordPictInfo(thePictInfoID: PictInfoID; thePictHandle: PicHandle): OSErr; external name '_RecordPictInfo';
+{
+ * RecordPixMapInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RecordPixMapInfo(thePictInfoID: PictInfoID; thePixMapHandle: PixMapHandle): OSErr; external name '_RecordPixMapInfo';
+{
+ * RetrievePictInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RetrievePictInfo(thePictInfoID: PictInfoID; var thePictInfo: PictInfo; colorsRequested: SInt16): OSErr; external name '_RetrievePictInfo';
+{
+ * DisposePictInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DisposePictInfo(thePictInfoID: PictInfoID): OSErr; external name '_DisposePictInfo';
+{$ifc OLDROUTINENAMES}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * DisposPictInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DisposPictInfo(thePictInfoID: PictInfoID): OSErr; external name '_DisposPictInfo';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {OLDROUTINENAMES}
+
+
+{$ALIGN MAC68K}
+
+
+{unit Processes}
+{
+ File: HIServices/Processes.h
+
+ Contains: Process Manager Interfaces.
+
+ Version: HIServices-162.0.81~21
+
+ Copyright: © 1989-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+const
+{ Process identifier - Various reserved process serial numbers }
+ kNoProcess = 0;
+ kSystemProcess = 1;
+ kCurrentProcess = 2;
+
+{ Definition of the parameter block passed to _Launch }
+{ Typedef and flags for launchControlFlags field}
+type
+ LaunchFlags = UInt16;
+const
+ launchContinue = $4000;
+ launchNoFileFlags = $0800;
+ launchUseMinimum = $0400;
+ launchDontSwitch = $0200;
+ launchAllow24Bit = $0100;
+ launchInhibitDaemon = $0080;
+
+{ Format for first AppleEvent to pass to new process. The size of the overall
+ buffer variable: the message body immediately follows the messageLength }
+type
+ AppParameters = record
+ theMsgEvent: EventRecord;
+ eventRefCon: UInt32;
+ messageLength: UInt32;
+ end;
+ AppParametersPtr = ^AppParameters;
+{ Parameter block to _Launch }
+type
+ LaunchParamBlockRecPtr = ^LaunchParamBlockRec;
+ LaunchParamBlockRec = record
+ reserved1: UInt32;
+ reserved2: UInt16;
+ launchBlockID: UInt16;
+ launchEPBLength: UInt32;
+ launchFileFlags: UInt16;
+ launchControlFlags: LaunchFlags;
+ launchAppSpec: FSSpecPtr;
+ launchProcessSN: ProcessSerialNumber;
+ launchPreferredSize: UInt32;
+ launchMinimumSize: UInt32;
+ launchAvailableSize: UInt32;
+ launchAppParameters: AppParametersPtr;
+ end;
+type
+ LaunchPBPtr = LaunchParamBlockRecPtr;
+{ Set launchBlockID to extendedBlock to specify that extensions exist.
+ Set launchEPBLength to extendedBlockLen for compatibility.}
+const
+ extendedBlock = $4C43; { 'LC' }
+ extendedBlockLen = SizeOf(LaunchParamBlockRec) - 12;
+
+const
+{ Definition of the information block returned by GetProcessInformation }
+ modeReserved = $01000000;
+ modeControlPanel = $00080000;
+ modeLaunchDontSwitch = $00040000;
+ modeDeskAccessory = $00020000;
+ modeMultiLaunch = $00010000;
+ modeNeedSuspendResume = $00004000;
+ modeCanBackground = $00001000;
+ modeDoesActivateOnFGSwitch = $00000800;
+ modeOnlyBackground = $00000400;
+ modeGetFrontClicks = $00000200;
+ modeGetAppDiedMsg = $00000100;
+ mode32BitCompatible = $00000080;
+ modeHighLevelEventAware = $00000040;
+ modeLocalAndRemoteHLEvents = $00000020;
+ modeStationeryAware = $00000010;
+ modeUseTextEditServices = $00000008;
+ modeDisplayManagerAware = $00000004;
+
+type
+ ProcessApplicationTransformState = UInt32;
+const
+ kProcessTransformToForegroundApplication = 1;
+
+{
+ Record returned by GetProcessInformation
+ When calling GetProcessInformation(), the input ProcessInfoRec
+ should have the processInfoLength set to sizeof(ProcessInfoRec),
+ the processName field set to nil or a pointer to a Str255, and
+ processAppSpec set to nil or a pointer to an FSSpec. If
+ processName or processAppSpec are not specified, this routine
+ will very likely write data to whatever random location in memory
+ these happen to point to, which is not a good thing.
+ Note: The processName field may not be what you expect, especially if
+ an application has a localized name. The .processName field, if not NULL,
+ on return will contain the filename part of the executable file of the
+ application. If you want the localized, user-displayable name for an
+ application, call CopyProcessName().
+ On Mac OS X, some flags in processMode will not be set as they were on
+ Mac OS 9, even for Classic applications. Mac OS X doesn't support
+ applications which can't be sent into the background, so
+ modeCanBackground will always be set. Similarly, Mac OS X applications
+ will always have mode32BitCompatible and modeHighLevelEventAware
+ set.
+
+}
+type
+ ProcessInfoRec = record
+ processInfoLength: UInt32;
+ processName: StringPtr;
+ processNumber: ProcessSerialNumber;
+ processType: UInt32;
+ processSignature: OSType;
+ processMode: UInt32;
+ processLocation: Ptr;
+ processSize: UInt32;
+ processFreeMem: UInt32;
+ processLauncher: ProcessSerialNumber;
+ processLaunchDate: UInt32;
+ processActiveTime: UInt32;
+ processAppSpec: FSSpecPtr;
+ end;
+ ProcessInfoRecPtr = ^ProcessInfoRec;
+{
+ Some applications assumed the size of a ProcessInfoRec would never change,
+ which has caused problems trying to return additional information. In
+ the future, we will add fields to ProcessInfoExtendedRec when necessary,
+ and callers which wish to access 'more' data than originally was present
+ in ProcessInfoRec should allocate space for a ProcessInfoExtendedRec,
+ fill in the processInfoLength ( and processName and processAppSpec ptrs ),
+ then coerce this to a ProcessInfoRecPtr in the call to
+ GetProcessInformation().
+ Note: The processName field may not be what you expect, especially if
+ an application has a localized name. The .processName field, if not NULL,
+ on return will contain the filename part of the executable file of the
+ application. If you want the localized, user-displayable name for an
+ application, call CopyProcessName().
+ On Mac OS X, some flags in processMode will not be set as they were on
+ Mac OS 9, even for Classic applications. Mac OS X doesn't support
+ applications which can't be sent into the background, so
+ modeCanBackground will always be set. Similarly, Mac OS X applications
+ will always have mode32BitCompatible and modeHighLevelEventAware
+ set.
+
+}
+type
+ ProcessInfoExtendedRec = record
+ processInfoLength: UInt32;
+ processName: StringPtr;
+ processNumber: ProcessSerialNumber;
+ processType: UInt32;
+ processSignature: OSType;
+ processMode: UInt32;
+ processLocation: Ptr;
+ processSize: UInt32;
+ processFreeMem: UInt32;
+ processLauncher: ProcessSerialNumber;
+ processLaunchDate: UInt32;
+ processActiveTime: UInt32;
+ processAppSpec: FSSpecPtr;
+ processTempMemTotal: UInt32;
+ processPurgeableTempMemTotal: UInt32;
+ end;
+ ProcessInfoExtendedRecPtr = ^ProcessInfoExtendedRec;
+{ Record corresponding to the SIZE resource definition }
+type
+ SizeResourceRec = record
+ flags: UInt16;
+ preferredHeapSize: UInt32;
+ minimumHeapSize: UInt32;
+ end;
+ SizeResourceRecPtr = ^SizeResourceRec;
+type
+ SizeResourceRecHandle = ^SizeResourceRecPtr;
+
+{
+ * Summary:
+ * Options for ProcessInformationCopyDictionary
+ }
+const
+{
+ * Return all information known about the application in the
+ * dictionary.
+ }
+ kProcessDictionaryIncludeAllInformationMask = $FFFFFFFF;
+
+{
+ Applications and background applications can control when they are asked to quit
+ by the system at restart/shutdown by setting these bits in a 'quit' ( 0 ) resource
+ in their application's resource fork. Applications without a 'quit' ( 0 ) will
+ be quit at kQuitAtNormalTime mask.
+ These options only function on Mac OS 9.x at this time.
+}
+const
+ kQuitBeforeNormalTimeMask = 1;
+ kQuitAtNormalTimeMask = 2;
+ kQuitBeforeFBAsQuitMask = 4;
+ kQuitBeforeShellQuitsMask = 8;
+ kQuitBeforeTerminatorAppQuitsMask = 16;
+ kQuitNeverMask = 32;
+ kQuitOptionsMask = $7F;
+ kQuitNotQuitDuringInstallMask = $0100;
+ kQuitNotQuitDuringLogoutMask = $0200;
+
+
+{
+ * LaunchApplication()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LaunchApplication( LaunchParams: LaunchPBPtr ): OSErr; external name '_LaunchApplication';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LaunchDeskAccessory()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * [Mac]GetCurrentProcess()
+ *
+ * Discussion:
+ * Return the canonical process serial number to the caller.
+ *
+ * All applications ( things which can appear in the Dock or which
+ * are not documents and are launched by the Finder or Dock ) on Mac
+ * OS 10 have a unique process serial number. This number is created
+ * when the application launches, and remains until the application
+ * quits. Other system services, like AppleEvents, use the
+ * ProcessSerialNumber to specify an application.
+ *
+ * During launch, every application 'checks in' with the Process
+ * Manager. Before this checkin, the application can not receive
+ * events or draw to the screen. Prior to Mac OS 10.2, this 'check
+ * in' happened before the applications's main() function was
+ * entered. In Mac OS 10.2 and later, this 'check in' does not
+ * happen until the first time the application calls a Process
+ * Manager function, or until it enters CFRunLoopRun() for the main
+ * runloop. This allows tools and other executables which do not
+ * need to receive events to link against more of the higher level
+ * toolbox frameworks, but may cause a problem if the application
+ * expects to be able to retrieve events or use CoreGraphics
+ * services before this checkin has occurred.
+ *
+ * An application can force the connection to the Process Manager to
+ * be set up by calling any Process Manager routine, but the
+ * recommended way to do this is to call GetCurrentProcess() to ask
+ * for the current application's PSN. This will initialize the
+ * connection to the Process Manager if it has not already been set
+ * up and 'check in' the application with the system.
+ *
+ * This function is named MacGetCurrentProcess() on non Macintosh
+ * platforms and GetCurrentProcess on the Macintosh. However, even
+ * Macintosh code can use the MacGetCurrentProcess() name since
+ * there is a macro which maps back to GetCurrentProcess().
+ *
+ * Lastly, it is usually not necessary to call GetCurrentProcess()
+ * to get the 'current' process psn merely to pass it to another
+ * Process Manager routine. Instead, just construct a
+ * ProcessSerialNumber with 0 in highLongOfPSN and kCurrentProcess
+ * in lowLongOfPSN and pass that. For example, to make the current
+ * process the frontmost process, use ( C code follows )
+ *
+ * ProcessSerialNumber psn = ( 0, kCurrentProcess );
+ *
+ * OSErr err = SetFrontProcess( & psn );
+ *
+ * If you need to pass a ProcessSerialNumber to another application
+ * or use it in an AppleEvent, you do need to get the canonical PSN
+ * with this routine.
+ *
+ * Parameters:
+ *
+ * PSN:
+ * Pass in where the current application process serial number
+ * should be returned.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetCurrentProcess( var PSN: ProcessSerialNumber ): OSErr; external name '_GetCurrentProcess';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+function MacGetCurrentProcess( var PSN: ProcessSerialNumber ): OSErr; external name '_GetCurrentProcess';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetFrontProcess()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetFrontProcess( var PSN: ProcessSerialNumber ): OSErr; external name '_GetFrontProcess';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetNextProcess()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetNextProcess( var PSN: ProcessSerialNumber ): OSErr; external name '_GetNextProcess';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetProcessInformation()
+ *
+ * Discussion:
+ * Fill in the provided record with information about the process
+ * with the provided process serial number.
+ *
+ * The caller must fill in the .processInfoLength field with the
+ * value sizeof ( ProcessInformationRecord ) before making this
+ * call. Also, the .processName field must point to either NULL or
+ * to a Str31 structure in the caller's memory space, and the
+ * .processAppSpec field must point to a FSSpec in the caller's
+ * memory space.
+ *
+ * If the caller does not care about the process name or the process
+ * application spec values, then setting those fields in the
+ * structure to NULL before this call means less work must be done
+ * to construct these values and so the call is more
+ * efficient.
+ *
+ * The processName field may not be what you expect, especially if
+ * an application has a localized name. The .processName field, if
+ * not NULL, on return will contain the filename part of the
+ * executable file of the application. If you want the localized,
+ * user-displayable name for an application, call
+ * CopyProcessName().
+ *
+ * On Mac OS X, the processSize and processFreeMem fields are
+ * returned with the value 0.
+ *
+ * Parameters:
+ *
+ * PSN:
+ * Pass in the process serial number of the process to return
+ * information for.
+ *
+ * info:
+ * Pass in a structure where the information will be returned.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetProcessInformation( const (*var*) PSN: ProcessSerialNumber; var info: ProcessInfoRec ): OSErr; external name '_GetProcessInformation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ProcessInformationCopyDictionary()
+ *
+ * Discussion:
+ * Return a CFDictionary containing information about the given
+ * process. This is intended to return a superset of the information
+ * returned by GetProcessInformation(), in more modern datatypes.
+ *
+ * Parameters:
+ *
+ * PSN:
+ * Pass in the process serial number of the process to return
+ * information for.
+ *
+ * infoToReturn:
+ * Pass in the value kProcessDictionaryIncludeAllInformationMask.
+ *
+ * Result:
+ * An immutable CFDictionaryRef containing these keys and their
+ * values. Keys marked with a '*' are optional. Over time more keys
+ * may be added.
+ *
+ * Key Name Type
+ * -------- ----
+ * "PSN" CFNumber, kCFNumberLongLongType
+ * "Flavor" CFNumber, kCFNumberSInt32. A hint
+ * as to the flavor of the application. Note that this should only
+ * be used as a hint, since a bundle of a different flavor might be
+ * loaded into an application's address space. The assigned values
+ * at present are: Mac OS Classic aplications have the value 0,
+ * Carbon applications have the value 2, Cocoa applications have the
+ * value 4. Other undocumented values may also be returned.
+ * "Attributes" CFNumber, kCFNumberSInt32
+ * "ParentPSN" * CFNumber, kCFNumberLongLong
+ * "FileType" * CFString, file type
+ * "FileCreator" * CFString, file creator
+ * "pid" * CFNumber, kCFNumberLongType
+ * "LSBackgroundOnly" CFBoolean
+ * "LSUIElement" CFBoolean
+ * "IsHiddenAttr" CFBoolean
+ * "IsCheckedInAttr" CFBoolean
+ * "RequiresClassic" CFBoolean
+ * "RequiresCarbon" CFBoolean
+ * "LSUserQuitOnly" CFBoolean
+ * "LSUIPresentationMode" CFNumber, kCFNumberShortType
+ * "BundlePath" * CFString
+ * kIOBundleExecutableKey * CFString
+ * kIOBundleNameKey * CFString
+ * kIOBundleIdentifierKey * CFString
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+function ProcessInformationCopyDictionary( const (*var*) PSN: ProcessSerialNumber; infoToReturn: UInt32 ): CFDictionaryRef; external name '_ProcessInformationCopyDictionary';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * SetFrontProcess()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function SetFrontProcess( const (*var*) PSN: ProcessSerialNumber ): OSErr; external name '_SetFrontProcess';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * Summary:
+ * Options for SetFrontProcessWithOptions
+ }
+const
+{
+ * Activate the process, but bring only the frontmost non-floating
+ * window forward. If this option is not set, all process windows are
+ * brought forward.
+ }
+ kSetFrontProcessFrontWindowOnly = 1 shl 0;
+
+
+{
+ * SetFrontProcessWithOptions()
+ *
+ * Discussion:
+ * Brings a process to the front of the process list and activates
+ * it. This is much like the SetFrontProcess API, though we allow
+ * more control here. Passing 0 for the options is equivalent to
+ * calling SetFrontProcess. Alternatively, you can pass
+ * kSetFrontProcessFrontWindowOnly, which will activate a process
+ * without bringing all of the process's windows forward (just the
+ * front window of the process will come forward).
+ *
+ * Parameters:
+ *
+ * inProcess:
+ * The process to make frontmost.
+ *
+ * inOptions:
+ * Any options you wish to specify.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function SetFrontProcessWithOptions( const (*var*) inProcess: ProcessSerialNumber; inOptions: OptionBits ): OSStatus; external name '_SetFrontProcessWithOptions';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * WakeUpProcess()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function WakeUpProcess( const (*var*) PSN: ProcessSerialNumber ): OSErr; external name '_WakeUpProcess';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SameProcess()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function SameProcess( const (*var*) PSN1: ProcessSerialNumber; const (*var*) PSN2: ProcessSerialNumber; var result: Boolean ): OSErr; external name '_SameProcess';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ ExitToShell was previously in SegLoad.h}
+{
+ * ExitToShell()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure ExitToShell; external name '_ExitToShell';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * KillProcess()
+ *
+ * Discussion:
+ * Kills the process with the given process serial number, without
+ * sending it a 'quit' AppleEvent or otherwise allowing it to save
+ * user data or clean up. This should be a last resort way to 'kill'
+ * an application, after all other attempts to make it stop have
+ * failed. It is not guaranteed that this will succeed and that the
+ * target application will be killed, even if this function returns
+ * noErr and seems to work.
+ *
+ * Parameters:
+ *
+ * inProcess:
+ * The process to kill.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+function KillProcess( const (*var*) inProcess: ProcessSerialNumber ): OSErr; external name '_KillProcess';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ LaunchControlPanel is similar to LaunchDeskAccessory, but for Control Panel files instead.
+ It launches a control panel in an application shell maintained by the Process Manager.
+}
+{
+ * LaunchControlPanel()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 9.0 and later
+ }
+
+
+{
+ * GetProcessBundleLocation()
+ *
+ * Summary:
+ * Retrieve the filesystem location of the process bundle, or
+ * executable if unbundled.
+ *
+ * Discussion:
+ * Retrieves a reference to the filesystem location of the specified
+ * application. For an application that is packaged as an app
+ * bundle, this will be the app bundle directory; otherwise it will
+ * be the location of the executable itself.
+ *
+ * Parameters:
+ *
+ * psn:
+ * Serial number of the target process
+ *
+ * location:
+ * Location of the bundle or executable, as an FSRef
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function GetProcessBundleLocation( const (*var*) psn: ProcessSerialNumber; var location: FSRef ): OSStatus; external name '_GetProcessBundleLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CopyProcessName()
+ *
+ * Summary:
+ * Get a copy of the name of a process.
+ *
+ * Discussion:
+ * Use this call to get the name of a process as a CFString. The
+ * name returned is a copy, so the caller must CFRelease the name
+ * when finished with it. The difference between this call and the
+ * processName field filled in by GetProcessInformation is that the
+ * name here is a CFString, and thus is capable of representing a
+ * multi-lingual name, whereas previously only a mac-encoded string
+ * was possible.
+ *
+ * Parameters:
+ *
+ * psn:
+ * Serial number of the target process
+ *
+ * name:
+ * CFString representing the name of the process (must be released
+ * by caller with CFRelease)
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function CopyProcessName( const (*var*) psn: ProcessSerialNumber; var name: CFStringRef ): OSStatus; external name '_CopyProcessName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetProcessPID()
+ *
+ * Summary:
+ * Get the UNIX process ID corresponding to a process.
+ *
+ * Discussion:
+ * Given a Process serial number, this call will get the UNIX
+ * process ID for that process. Note that this call does not make
+ * sense for Classic apps, since they all share a single UNIX
+ * process ID.
+ *
+ * Parameters:
+ *
+ * psn:
+ * Serial number of the target process
+ *
+ * pid:
+ * UNIX process ID of the process
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetProcessPID( const (*var*) psn: ProcessSerialNumber; var pid: pid_t ): OSStatus; external name '_GetProcessPID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetProcessForPID()
+ *
+ * Summary:
+ * Get the process serial number corresponding to a UNIX process ID.
+ *
+ * Discussion:
+ * Given a UNIX process ID, this call will get the process serial
+ * number for that process, if appropriate. Note that this call does
+ * not make sense for Classic apps, since they all share a single
+ * UNIX process ID.
+ *
+ * Parameters:
+ *
+ * psn:
+ * Serial number of the process
+ *
+ * pid:
+ * UNIX process ID of the target process
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetProcessForPID( pid: pid_t; var psn: ProcessSerialNumber ): OSStatus; external name '_GetProcessForPID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{************************************************************************
+ * Process Visibility.
+ ************************************************************************}
+{
+ * IsProcessVisible()
+ *
+ * Summary:
+ * Determines whether a particular process is visible or not.
+ *
+ * Discussion:
+ * Given a psn, this call will return true or false depending on
+ * whether or not the process is currently visible.
+ *
+ * Parameters:
+ *
+ * psn:
+ * Serial number of the process
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function IsProcessVisible( const (*var*) psn: ProcessSerialNumber ): Boolean; external name '_IsProcessVisible';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ * ShowHideProcess()
+ *
+ * Summary:
+ * Hides or shows a given process.
+ *
+ * Discussion:
+ * Given a psn, this call will hide or show the process specified in
+ * the psn parameter. You determine whether you would like to show
+ * or hide the process with the visible parameter. True passed into
+ * visible indicates you wish for the process to become visible.
+ *
+ * Parameters:
+ *
+ * psn:
+ * Serial number of the process
+ *
+ * visible:
+ * true = show process; false = hide process
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function ShowHideProcess( const (*var*) psn: ProcessSerialNumber; visible: Boolean ): OSErr; external name '_ShowHideProcess';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ * TransformProcessType()
+ *
+ * Summary:
+ * Changes the 'type' of the process specified in the psn parameter.
+ * The type is specified in the transformState parameter.
+ *
+ * Discussion:
+ * Given a psn which is a background-only application, this call can
+ * cause that application to be transformed into a foreground
+ * application. A background only application does not appear in
+ * the Dock or in the Force Quit dialog, and never has a menu bar or
+ * is frontmost, while a foreground application does appear in the
+ * Dock and Force Quit dialog and does have a menu bar. This call
+ * does not cause the application to be brought to the front ( use
+ * SetFrontProcess for that ).
+ *
+ * Parameters:
+ *
+ * psn:
+ * Serial number of the process
+ *
+ * transformState:
+ * state to tranform the application to.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+function TransformProcessType( const (*var*) psn: ProcessSerialNumber; transformState: ProcessApplicationTransformState ): OSStatus; external name '_TransformProcessType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ Values of the 'message' parameter to a Control Panel 'cdev' }
+const
+ initDev = 0; {Time for cdev to initialize itself}
+ hitDev = 1; {Hit on one of my items}
+ closeDev = 2; {Close yourself}
+ nulDev = 3; {Null event}
+ updateDev = 4; {Update event}
+ activDev = 5; {Activate event}
+ deactivDev = 6; {Deactivate event}
+ keyEvtDev = 7; {Key down/auto key}
+ macDev = 8; {Decide whether or not to show up}
+ undoDev = 9;
+ cutDev = 10;
+ copyDev = 11;
+ pasteDev = 12;
+ clearDev = 13;
+ cursorDev = 14;
+
+{ Special values a Control Panel 'cdev' can return }
+const
+ cdevGenErr = -1; {General error; gray cdev w/o alert}
+ cdevMemErr = 0; {Memory shortfall; alert user please}
+ cdevResErr = 1; {Couldn't get a needed resource; alert}
+ cdevUnset = 3; { cdevValue is initialized to this}
+
+{ Control Panel Default Proc }
+
+
+
+
+{unit QDOffscreen}
+{
+ File: QDOffscreen.p
+
+ Contains: Quickdraw Offscreen GWorld Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+ NOTE: GWorldFlags is no longer defined as a set. Instead it is a SInt32
+ and the set elements are bit masks. You will need to use Bit-OR's
+ to build a set and Bit-AND's to test sets.
+}
+
+const
+ pixPurgeBit = 0;
+ noNewDeviceBit = 1;
+ useTempMemBit = 2;
+ keepLocalBit = 3;
+ useDistantHdwrMemBit = 4;
+ useLocalHdwrMemBit = 5;
+ pixelsPurgeableBit = 6;
+ pixelsLockedBit = 7;
+ mapPixBit = 16;
+ newDepthBit = 17;
+ alignPixBit = 18;
+ newRowBytesBit = 19;
+ reallocPixBit = 20;
+ clipPixBit = 28;
+ stretchPixBit = 29;
+ ditherPixBit = 30;
+ gwFlagErrBit = 31;
+
+ pixPurge = $00000001;
+ noNewDevice = $00000002;
+ useTempMem = $00000004;
+ keepLocal = $00000008;
+ useDistantHdwrMem = $00000010;
+ useLocalHdwrMem = $00000020;
+ pixelsPurgeable = $00000040;
+ pixelsLocked = $00000080;
+ kAllocDirectDrawSurface = $00004000;
+ mapPix = $00010000;
+ newDepth = $00020000;
+ alignPix = $00040000;
+ newRowBytes = $00080000;
+ reallocPix = $00100000;
+ clipPix = $10000000;
+ stretchPix = $20000000;
+ ditherPix = $40000000;
+ gwFlagErr = $80000000;
+
+
+type
+ GWorldFlags = UInt32;
+ { Type definition of a GWorldPtr }
+ GWorldPtr = CGrafPtr;
+ {
+ * NewGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewGWorld(var offscreenGWorld: GWorldPtr; PixelDepth: SInt16; const (*var*) boundsRect: Rect; cTable: CTabHandle; aGDevice: GDHandle; flags: GWorldFlags): QDErr; external name '_NewGWorld';
+{ GDevice attribute bits for Carbon and QuickTime 3.0 }
+
+const
+ deviceIsIndirect = $00000001;
+ deviceNeedsLock = $00000002;
+ deviceIsStatic = $00000004;
+ deviceIsExternalBuffer = $00000008;
+ deviceIsDDSurface = $00000010;
+ deviceIsDCISurface = $00000020;
+ deviceIsGDISurface = $00000040;
+ deviceIsAScreen = $00000080;
+ deviceIsOverlaySurface = $00000100;
+
+{$ifc TARGET_OS_WIN32}
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * GetGDeviceSurface()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetGDeviceSurface(gdh: GDHandle): Ptr; external name '_GetGDeviceSurface';
+
+{
+ * GetGDeviceAttributes()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetGDeviceAttributes(gdh: GDHandle): UInt32; external name '_GetGDeviceAttributes';
+
+{ to allocate non-mac-rgb GWorlds use QTNewGWorld (ImageCompression.h) }
+{
+ * NewGWorldFromHBITMAP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewGWorldFromHBITMAP(var offscreenGWorld: GWorldPtr; cTable: CTabHandle; aGDevice: GDHandle; flags: GWorldFlags; newHBITMAP: UnivPtr; newHDC: UnivPtr): QDErr; external name '_NewGWorldFromHBITMAP';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {TARGET_OS_WIN32}
+
+{
+ * NewGWorldFromPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewGWorldFromPtr(var offscreenGWorld: GWorldPtr; PixelFormat: UInt32; const (*var*) boundsRect: Rect; cTable: CTabHandle; aGDevice: GDHandle; flags: GWorldFlags; newBuffer: Ptr; rowBytes: SInt32): QDErr; external name '_NewGWorldFromPtr';
+
+{
+ * LockPixels()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LockPixels(pm: PixMapHandle): boolean; external name '_LockPixels';
+{
+ * UnlockPixels()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure UnlockPixels(pm: PixMapHandle); external name '_UnlockPixels';
+{
+ * UpdateGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function UpdateGWorld(var offscreenGWorld: GWorldPtr; pixelDepth: SInt16; const (*var*) boundsRect: Rect; cTable: CTabHandle; aGDevice: GDHandle; flags: GWorldFlags): GWorldFlags; external name '_UpdateGWorld';
+{
+ * DisposeGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeGWorld(offscreenGWorld: GWorldPtr); external name '_DisposeGWorld';
+{
+ * GetGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetGWorld(var port: CGrafPtr; var gdh: GDHandle); external name '_GetGWorld';
+{
+ * SetGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetGWorld(port: CGrafPtr; gdh: GDHandle); external name '_SetGWorld';
+{
+ * CTabChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure CTabChanged(ctab: CTabHandle); external name '_CTabChanged';
+{
+ * PixPatChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PixPatChanged(ppat: PixPatHandle); external name '_PixPatChanged';
+{
+ * PortChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure PortChanged(port: GrafPtr); external name '_PortChanged';
+{
+ * GDeviceChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GDeviceChanged(gdh: GDHandle); external name '_GDeviceChanged';
+{
+ * AllowPurgePixels()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure AllowPurgePixels(pm: PixMapHandle); external name '_AllowPurgePixels';
+{
+ * NoPurgePixels()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure NoPurgePixels(pm: PixMapHandle); external name '_NoPurgePixels';
+{
+ * GetPixelsState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetPixelsState(pm: PixMapHandle): GWorldFlags; external name '_GetPixelsState';
+{
+ * SetPixelsState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetPixelsState(pm: PixMapHandle; state: GWorldFlags); external name '_SetPixelsState';
+{
+ * GetPixBaseAddr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetPixBaseAddr(pm: PixMapHandle): Ptr; external name '_GetPixBaseAddr';
+{
+ * GetPixRowBytes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetPixRowBytes(pm: PixMapHandle): SInt32; external name '_GetPixRowBytes';
+{
+ * NewScreenBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewScreenBuffer(const (*var*) globalRect: Rect; purgeable: boolean; var gdh: GDHandle; var offscreenPixMap: PixMapHandle): QDErr; external name '_NewScreenBuffer';
+{
+ * DisposeScreenBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeScreenBuffer(offscreenPixMap: PixMapHandle); external name '_DisposeScreenBuffer';
+{
+ * GetGWorldDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetGWorldDevice(offscreenGWorld: GWorldPtr): GDHandle; external name '_GetGWorldDevice';
+{
+ * QDDone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QDDone(port: GrafPtr): boolean; external name '_QDDone';
+{
+ * OffscreenVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OffscreenVersion: SInt32; external name '_OffscreenVersion';
+{
+ * NewTempScreenBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewTempScreenBuffer(const (*var*) globalRect: Rect; purgeable: boolean; var gdh: GDHandle; var offscreenPixMap: PixMapHandle): QDErr; external name '_NewTempScreenBuffer';
+{
+ * PixMap32Bit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PixMap32Bit(pmHandle: PixMapHandle): boolean; external name '_PixMap32Bit';
+{
+ * GetGWorldPixMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetGWorldPixMap(offscreenGWorld: GWorldPtr): PixMapHandle; external name '_GetGWorldPixMap';
+{$ALIGN MAC68K}
+
+
+{unit Translation}
+{
+ File: HIToolbox/Translation.h
+
+ Contains: Translation Manager (Macintosh Easy Open) Interfaces.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1991-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+ Carbon clients should use Translation Services. The definitions below will NOT work for Carbon and
+ are only defined for those files that need to build pre-Carbon applications.
+}
+
+{ enumerated types on how a document can be opened}
+type
+ DocOpenMethod = SInt16;
+const
+ domCannot = 0;
+ domNative = 1;
+ domTranslateFirst = 2;
+ domWildcard = 3;
+
+{ 0L terminated array of OSTypes, or FileTypes}
+type
+ TypesBlock = array [0..63] of OSType;
+ TypesBlockPtr = ^TypesBlock;
+{ Progress dialog resource ID}
+const
+ kTranslationScrapProgressDialogID = -16555;
+
+{ block of data that describes how to translate}
+type
+ FileTranslationSpecPtr = ^FileTranslationSpec;
+ FileTranslationSpec = record
+ componentSignature: OSType;
+ translationSystemInfo: UnivPtr;
+ src: FileTypeSpec;
+ dst: FileTypeSpec;
+ end;
+type
+ FileTranslationSpecArray = array [0..$7F000000 div SizeOf(FileTranslationSpec)-1] of FileTranslationSpec;
+ FileTranslationSpecArrayPtr = ^FileTranslationSpecArray;
+ FileTranslationSpecArrayHandle = ^FileTranslationSpecArrayPtr;
+
+{
+ * GetFileTypesThatAppCanNativelyOpen() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * There is no direct replacement at this time.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Translation 1.0 and later
+ }
+function GetFileTypesThatAppCanNativelyOpen( appVRefNumHint: SInt16; appSignature: OSType; var nativeTypes: TypesBlock ): OSErr; external name '_GetFileTypesThatAppCanNativelyOpen';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * ExtendFileTypeList() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TranslationCreateWithSourceArray instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Translation 1.0 and later
+ }
+function ExtendFileTypeList( originalTypeList: {variable-size-array} FileTypePtr; numberOriginalTypes: SInt16; extendedTypeList: {variable-size-array} FileTypePtr; var numberExtendedTypes: SInt16 ): OSErr; external name '_ExtendFileTypeList';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * CanDocBeOpened() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use the Launch Services API instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Translation 1.0 and later
+ }
+function CanDocBeOpened( const (*var*) targetDocument: FSSpec; appVRefNumHint: SInt16; appSignature: OSType; nativeTypes: {variable-size-array} FileTypePtr; onlyNative: Boolean; var howToOpen: DocOpenMethod; var howToTranslate: FileTranslationSpec ): OSErr; external name '_CanDocBeOpened';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * GetFileTranslationPaths() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TranslationCreateWithSourceArray instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Translation 1.0 and later
+ }
+function GetFileTranslationPaths( const (*var*) srcDocument: FSSpec; dstDocType: FileType; maxResultCount: UInt16; resultBuffer: FileTranslationSpecArrayPtr ): SInt16; external name '_GetFileTranslationPaths';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * GetPathFromTranslationDialog() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * There is no direct replacement at this time, but all the
+ * necessary information can be obtained from the Launch Services,
+ * Translation Services and Uniform Type Identification APIs.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Translation 1.0 and later
+ }
+function GetPathFromTranslationDialog( const (*var*) theDocument: FSSpec; const (*var*) theApplication: FSSpec; typeList: TypesBlockPtr; var howToOpen: DocOpenMethod; var howToTranslate: FileTranslationSpec ): OSErr; external name '_GetPathFromTranslationDialog';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * TranslateFile() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TranslationPerformForFile or TranslationPerformForURL instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Translation 1.0 and later
+ }
+function TranslateFile( const (*var*) sourceDocument: FSSpec; const (*var*) destinationDocument: FSSpec; const (*var*) howToTranslate: FileTranslationSpec ): OSErr; external name '_TranslateFile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * GetDocumentKindString() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use the Launch Services API instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Translation 1.0 and later
+ }
+function GetDocumentKindString( docVRefNum: SInt16; docType: OSType; docCreator: OSType; var kindString: Str63 ): OSErr; external name '_GetDocumentKindString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * GetTranslationExtensionName() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * There is no direct replacement at this time, but
+ * TranslationCopySourceType and TranslationCopyDestinationType in
+ * conjunction with UTTypeCopyDescription will provide useful user
+ * level information.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Translation 1.0 and later
+ }
+function GetTranslationExtensionName( const (*var*) translationMethod: FileTranslationSpec; var extensionName: Str31 ): OSErr; external name '_GetTranslationExtensionName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * GetScrapDataProcPtr
+ }
+type
+ GetScrapDataProcPtr = function( requestedFormat: ScrapType; dataH: Handle; srcDataGetterRefCon: UnivPtr ): OSErr;
+ GetScrapDataUPP = GetScrapDataProcPtr;
+{
+ * NewGetScrapDataUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewGetScrapDataUPP( userRoutine: GetScrapDataProcPtr ): GetScrapDataUPP; external name '_NewGetScrapDataUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+{
+ * DisposeGetScrapDataUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeGetScrapDataUPP( userUPP: GetScrapDataUPP ); external name '_DisposeGetScrapDataUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+{
+ * InvokeGetScrapDataUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeGetScrapDataUPP( requestedFormat: ScrapType; dataH: Handle; srcDataGetterRefCon: UnivPtr; userUPP: GetScrapDataUPP ): OSErr; external name '_InvokeGetScrapDataUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+type
+ GetScrapData = GetScrapDataUPP;
+{
+ * TranslateScrap() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TranslationPerformForData instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Translation 1.0 and later
+ }
+function TranslateScrap( sourceDataGetter: GetScrapDataUPP; sourceDataGetterRefCon: UnivPtr; destinationFormat: ScrapType; destinationData: Handle; progressDialogID: SInt16 ): OSErr; external name '_TranslateScrap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+
+
+{unit TypeSelect}
+{
+ File: HIToolbox/TypeSelect.h
+
+ Contains: TypeSelect Utilties
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 2000-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+type
+ TSCode = SInt16;
+const
+ tsPreviousSelectMode = -1;
+ tsNormalSelectMode = 0;
+ tsNextSelectMode = 1;
+
+type
+ TypeSelectRecordPtr = ^TypeSelectRecord;
+ TypeSelectRecord = record
+ tsrLastKeyTime: UInt32;
+ tsrScript: ScriptCode;
+ tsrKeyStrokes: Str63;
+ end;
+type
+ IndexToStringProcPtr = function( item: SInt16; var itemsScript: ScriptCode; var itemsStringPtr: StringPtr; yourDataPtr: UnivPtr ): Boolean;
+ IndexToStringUPP = IndexToStringProcPtr;
+{
+ * TypeSelectClear() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * use CFStringUppercase instead.
+ *
+ * Discussion:
+ * This function is no longer recommended. Please use
+ * CFStringUppercase instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure TypeSelectClear( var tsr: TypeSelectRecord ); external name '_TypeSelectClear';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ Long ago the implementation of TypeSelectNewKey had a bug that
+ required the high word of D0 to be zero or the function did not work.
+ Although fixed now, we are continuing to clear the high word
+ just in case someone tries to run on an older system.
+ }
+{
+ * TypeSelectNewKey() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * use UCTypeSelect instead.
+ *
+ * Discussion:
+ * This function is no longer recommended. Please use UCTypeSelect
+ * instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function TypeSelectNewKey( const (*var*) theEvent: EventRecord; var tsr: TypeSelectRecord ): Boolean; external name '_TypeSelectNewKey';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TypeSelectFindItem() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * use UCTypeSelect instead.
+ *
+ * Discussion:
+ * This function is no longer recommended. Please use UCTypeSelect
+ * instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function TypeSelectFindItem( const (*var*) tsr: TypeSelectRecord; listSize: SInt16; selectMode: TSCode; getStringProc: IndexToStringUPP; yourDataPtr: UnivPtr ): SInt16; external name '_TypeSelectFindItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TypeSelectCompare() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * use CFStringUppercase instead.
+ *
+ * Discussion:
+ * This function is no longer recommended. Please use
+ * CFStringUppercase instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function TypeSelectCompare( const (*var*) tsr: TypeSelectRecord; testStringScript: ScriptCode; testStringPtr: StringPtr ): SInt16; external name '_TypeSelectCompare';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * NewIndexToStringUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewIndexToStringUPP( userRoutine: IndexToStringProcPtr ): IndexToStringUPP; external name '_NewIndexToStringUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeIndexToStringUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeIndexToStringUPP( userUPP: IndexToStringUPP ); external name '_DisposeIndexToStringUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeIndexToStringUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeIndexToStringUPP( item: SInt16; var itemsScript: ScriptCode; var itemsStringPtr: StringPtr; yourDataPtr: UnivPtr; userUPP: IndexToStringUPP ): Boolean; external name '_InvokeIndexToStringUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+
+
+{unit URLAccess}
+{
+ File: URLAccess.p
+
+ Contains: URL Access Interfaces.
+
+ Version: Technology: URLAccess 2.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1994-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+{ Data structures and types }
+
+type
+ URLReference = ^SInt32; { an opaque 32-bit type }
+ URLReferencePtr = ^URLReference; { when a var xx:URLReference parameter can be nil, it is changed to xx: URLReferencePtr }
+ URLOpenFlags = UInt32;
+const
+ kURLReplaceExistingFlag = $01;
+ kURLBinHexFileFlag = $02; { Binhex before uploading if necessary }
+ kURLExpandFileFlag = $04; { Use StuffIt engine to expand file if necessary }
+ kURLDisplayProgressFlag = $08;
+ kURLDisplayAuthFlag = $10; { Display auth dialog if guest connection fails }
+ kURLUploadFlag = $20; { Do an upload instead of a download }
+ kURLIsDirectoryHintFlag = $40; { Hint: the URL is a directory }
+ kURLDoNotTryAnonymousFlag = $80; { Don't try to connect anonymously before getting logon info }
+ kURLDirectoryListingFlag = $0100; { Download the directory listing, not the whole directory }
+ kURLExpandAndVerifyFlag = $0200; { Expand file and then verify using signature resource }
+ kURLNoAutoRedirectFlag = $0400; { Do not automatically redirect to new URL }
+ kURLDebinhexOnlyFlag = $0800; { Do not use Stuffit Expander - just internal debinhex engine }
+ kURLDoNotDeleteOnErrorFlag = $1000; { Do not delete the downloaded file if an error or abort occurs. }
+ { This flag applies to downloading only and should be used if }
+ { interested in later resuming the download. }
+ kURLResumeDownloadFlag = $2000; { The passed in file is partially downloaded, attempt to resume }
+ { it. Currently works for HTTP only. If no FSSpec passed in, }
+ { this flag will be ignored. Overriden by kURLReplaceExistingFlag. }
+ kURLReservedFlag = $80000000; { reserved for Apple internal use }
+
+
+type
+ URLState = UInt32;
+const
+ kURLNullState = 0;
+ kURLInitiatingState = 1;
+ kURLLookingUpHostState = 2;
+ kURLConnectingState = 3;
+ kURLResourceFoundState = 4;
+ kURLDownloadingState = 5;
+ kURLDataAvailableState = $15;
+ kURLTransactionCompleteState = 6;
+ kURLErrorOccurredState = 7;
+ kURLAbortingState = 8;
+ kURLCompletedState = 9;
+ kURLUploadingState = 10;
+
+
+type
+ URLEvent = UInt32;
+const
+ kURLInitiatedEvent = 1;
+ kURLResourceFoundEvent = 4;
+ kURLDownloadingEvent = 5;
+ kURLAbortInitiatedEvent = 8;
+ kURLCompletedEvent = 9;
+ kURLErrorOccurredEvent = 7;
+ kURLDataAvailableEvent = $15;
+ kURLTransactionCompleteEvent = 6;
+ kURLUploadingEvent = 10;
+ kURLSystemEvent = 29;
+ kURLPercentEvent = 30;
+ kURLPeriodicEvent = 31;
+ kURLPropertyChangedEvent = 32;
+
+
+type
+ URLEventMask = UInt32;
+
+const
+ kURLInitiatedEventMask = $01;
+ kURLResourceFoundEventMask = $08;
+ kURLDownloadingMask = $10;
+ kURLUploadingMask = $0200;
+ kURLAbortInitiatedMask = $80;
+ kURLCompletedEventMask = $0100;
+ kURLErrorOccurredEventMask = $40;
+ kURLDataAvailableEventMask = $00100000;
+ kURLTransactionCompleteEventMask = $20;
+ kURLSystemEventMask = $10000000;
+ kURLPercentEventMask = $20000000;
+ kURLPeriodicEventMask = $40000000;
+ kURLPropertyChangedEventMask = $80000000;
+ kURLAllBufferEventsMask = $00100020;
+ kURLAllNonBufferEventsMask = $E00003D1;
+ kURLAllEventsMask = $FFFFFFFF;
+
+
+type
+ URLCallbackInfoPtr = ^URLCallbackInfo;
+ URLCallbackInfo = record
+ version: UInt32;
+ urlRef: URLReference;
+ proprty: ConstCStringPtr;
+ currentSize: UInt32;
+ systemEvent: EventRecordPtr;
+ end;
+
+
+ { authentication type flags }
+
+const
+ kUserNameAndPasswordFlag = $00000001;
+
+ kURLURL = 'URLString';
+ kURLResourceSize = 'URLResourceSize';
+ kURLLastModifiedTime = 'URLLastModifiedTime';
+ kURLMIMEType = 'URLMIMEType';
+ kURLFileType = 'URLFileType';
+ kURLFileCreator = 'URLFileCreator';
+ kURLCharacterSet = 'URLCharacterSet';
+ kURLResourceName = 'URLResourceName';
+ kURLHost = 'URLHost';
+ kURLAuthType = 'URLAuthType';
+ kURLUserName = 'URLUserName';
+ kURLPassword = 'URLPassword';
+ kURLStatusString = 'URLStatusString';
+ kURLIsSecure = 'URLIsSecure';
+ kURLCertificate = 'URLCertificate';
+ kURLTotalItems = 'URLTotalItems';
+ kURLConnectTimeout = 'URLConnectTimeout';
+ { http and https properties }
+ kURLHTTPRequestMethod = 'URLHTTPRequestMethod';
+ kURLHTTPRequestHeader = 'URLHTTPRequestHeader';
+ kURLHTTPRequestBody = 'URLHTTPRequestBody';
+ kURLHTTPRespHeader = 'URLHTTPRespHeader';
+ kURLHTTPUserAgent = 'URLHTTPUserAgent';
+ kURLHTTPRedirectedURL = 'URLHTTPRedirectedURL';
+ kURLSSLCipherSuite = 'URLSSLCipherSuite';
+
+
+ {
+ * URLGetURLAccessVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLGetURLAccessVersion(var returnVers: UInt32): OSStatus; external name '_URLGetURLAccessVersion';
+
+
+{$ifc TARGET_RT_MAC_CFM}
+{
+ URLAccessAvailable() is a macro/inline available only in C/C++.
+ To get the same functionality from pascal or assembly, you need
+ to test if URLGetURLAccessVersion function is not NULL. For instance:
+
+ gURLAccessAvailable = FALSE;
+ IF @URLAccessAvailable <> kUnresolvedCFragSymbolAddress THEN
+ gURLAccessAvailable = TRUE;
+ end
+
+ }
+{$elsec}
+ {$ifc TARGET_RT_MAC_MACHO}
+{ URL Access is always available on OS X }
+ {$endc}
+{$endc}
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ URLNotifyProcPtr = function(userContext: UnivPtr; event: URLEvent; var callbackInfo: URLCallbackInfo): OSStatus;
+{$elsec}
+ URLNotifyProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ URLSystemEventProcPtr = function(userContext: UnivPtr; var event: EventRecord): OSStatus;
+{$elsec}
+ URLSystemEventProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ URLNotifyUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ URLNotifyUPP = URLNotifyProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ URLSystemEventUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ URLSystemEventUPP = URLSystemEventProcPtr;
+{$endc}
+
+const
+ uppURLNotifyProcInfo = $00000FF0;
+ uppURLSystemEventProcInfo = $000003F0;
+ {
+ * NewURLNotifyUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewURLNotifyUPP(userRoutine: URLNotifyProcPtr): URLNotifyUPP; external name '_NewURLNotifyUPP';
+{
+ * NewURLSystemEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewURLSystemEventUPP(userRoutine: URLSystemEventProcPtr): URLSystemEventUPP; external name '_NewURLSystemEventUPP';
+{
+ * DisposeURLNotifyUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeURLNotifyUPP(userUPP: URLNotifyUPP); external name '_DisposeURLNotifyUPP';
+{
+ * DisposeURLSystemEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeURLSystemEventUPP(userUPP: URLSystemEventUPP); external name '_DisposeURLSystemEventUPP';
+{
+ * InvokeURLNotifyUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeURLNotifyUPP(userContext: UnivPtr; event: URLEvent; var callbackInfo: URLCallbackInfo; userRoutine: URLNotifyUPP): OSStatus; external name '_InvokeURLNotifyUPP';
+{
+ * InvokeURLSystemEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeURLSystemEventUPP(userContext: UnivPtr; var event: EventRecord; userRoutine: URLSystemEventUPP): OSStatus; external name '_InvokeURLSystemEventUPP';
+{
+ * URLSimpleDownload()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLSimpleDownload(url: ConstCStringPtr; destination: FSSpecPtr; destinationHandle: Handle; openFlags: URLOpenFlags; eventProc: URLSystemEventUPP; userContext: UnivPtr): OSStatus; external name '_URLSimpleDownload';
+
+{
+ * URLDownload()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLDownload(urlRef: URLReference; destination: FSSpecPtr; destinationHandle: Handle; openFlags: URLOpenFlags; eventProc: URLSystemEventUPP; userContext: UnivPtr): OSStatus; external name '_URLDownload';
+
+{
+ * URLSimpleUpload()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLSimpleUpload(url: ConstCStringPtr; const (*var*) source: FSSpec; openFlags: URLOpenFlags; eventProc: URLSystemEventUPP; userContext: UnivPtr): OSStatus; external name '_URLSimpleUpload';
+
+{
+ * URLUpload()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLUpload(urlRef: URLReference; const (*var*) source: FSSpec; openFlags: URLOpenFlags; eventProc: URLSystemEventUPP; userContext: UnivPtr): OSStatus; external name '_URLUpload';
+
+{
+ * URLNewReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLNewReference(url: ConstCStringPtr; var urlRef: URLReference): OSStatus; external name '_URLNewReference';
+
+{
+ * URLDisposeReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLDisposeReference(urlRef: URLReference): OSStatus; external name '_URLDisposeReference';
+
+{
+ * URLOpen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLOpen(urlRef: URLReference; fileSpec: FSSpecPtr; openFlags: URLOpenFlags; notifyProc: URLNotifyUPP; eventRegister: URLEventMask; userContext: UnivPtr): OSStatus; external name '_URLOpen';
+
+{
+ * URLAbort()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLAbort(urlRef: URLReference): OSStatus; external name '_URLAbort';
+
+{
+ * URLGetDataAvailable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLGetDataAvailable(urlRef: URLReference; var dataSize: Size): OSStatus; external name '_URLGetDataAvailable';
+
+{
+ * URLGetBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLGetBuffer(urlRef: URLReference; var buffer: UnivPtr; var bufferSize: Size): OSStatus; external name '_URLGetBuffer';
+
+{
+ * URLReleaseBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLReleaseBuffer(urlRef: URLReference; buffer: UnivPtr): OSStatus; external name '_URLReleaseBuffer';
+
+{
+ * URLGetProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLGetProperty(urlRef: URLReference; proprty: ConstCStringPtr; propertyBuffer: UnivPtr; bufferSize: Size): OSStatus; external name '_URLGetProperty';
+
+{
+ * URLGetPropertySize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLGetPropertySize(urlRef: URLReference; proprty: ConstCStringPtr; var propertySize: Size): OSStatus; external name '_URLGetPropertySize';
+
+{
+ * URLSetProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLSetProperty(urlRef: URLReference; proprty: ConstCStringPtr; propertyBuffer: UnivPtr; bufferSize: Size): OSStatus; external name '_URLSetProperty';
+
+{
+ * URLGetCurrentState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLGetCurrentState(urlRef: URLReference; var state: URLState): OSStatus; external name '_URLGetCurrentState';
+
+{
+ * URLGetError()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLGetError(urlRef: URLReference; var urlError: OSStatus): OSStatus; external name '_URLGetError';
+
+{
+ * URLIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLIdle: OSStatus; external name '_URLIdle';
+
+{
+ * URLGetFileInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in URLAccessLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function URLGetFileInfo(fName: StringPtr; var fType: OSType; var fCreator: OSType): OSStatus; external name '_URLGetFileInfo';
+
+{$ALIGN MAC68K}
+
+
+{unit USB}
+{
+ File: USB.p
+
+ Contains: Public API for USB Services Library (and associated components)
+
+ Version: Technology: USB 1.4
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1998-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ ************* Constants ************* }
+
+
+const
+ { Flags }
+ kUSBTaskTimeFlag = 1;
+ kUSBHubPower = 2;
+ kUSBPowerReset = 4;
+ kUSBHubReaddress = 8;
+ kUSBAddressRequest = 16;
+ kUSBReturnOnException = 32;
+ kUSBNo5SecTimeout = 64;
+ kUSBTimeout = 128;
+ kUSBNoDataTimeout = 256;
+ kUSBDebugAwareFlag = 512;
+ kUSBResetDescriptorCache = 1024;
+ kUSBHighSpeedFlag = 2048;
+ kUSBDevZeroDetatch = 4096;
+ kUSBLowSpeedFlag = 8192;
+ kUSBTaskTimeSetAddressFlag = 16384;
+
+ { Hub messages }
+ kUSBHubPortResetRequest = 1;
+ kUSBHubPortSuspendRequest = 2;
+ kUSBHubPortStatusRequest = 3;
+
+ kVendorID_AppleComputer = $05AC;
+
+ { ************* types ************* }
+
+
+type
+ USBReference = SInt32;
+ USBReference_fix = USBReference; { used as field type when a record declaration contains a USBReference field identifier }
+ USBDeviceRef = USBReference;
+ USBDeviceRef_fix = USBDeviceRef; { used as field type when a record declaration contains a USBDeviceRef field identifier }
+ USBDeviceRefPtr = ^USBDeviceRef;
+ USBInterfaceRef = USBReference;
+ USBPipeRef = USBReference;
+ USBBusRef = USBReference;
+ USBPipeState = UInt32;
+ USBCount = UInt32;
+ USBFlags = UInt32;
+ USBFlags_fix = USBFlags; { used as field type when a record declaration contains a USBFlags field identifier }
+ USBRequest = UInt8;
+ USBDirection = UInt8;
+ USBRqRecipient = UInt8;
+ USBRqType = UInt8;
+ USBRqIndex = UInt16;
+ USBRqValue = UInt16;
+
+
+ usbControlBitsPtr = ^usbControlBits;
+ usbControlBits = record
+ BMRequestType: SInt8;
+ BRequest: SInt8;
+ WValue: USBRqValue;
+ WIndex: USBRqIndex;
+ reserved4: UInt16;
+ end;
+
+ USBIsocFramePtr = ^USBIsocFrame;
+ USBIsocFrame = record
+ frStatus: OSStatus;
+ frReqCount: UInt16;
+ frActCount: UInt16;
+ end;
+
+
+const
+ kUSBMaxIsocFrameReqCount = 1023; { maximum size (bytes) of any one Isoc frame }
+
+
+type
+ usbIsocBitsPtr = ^usbIsocBits;
+ usbIsocBits = record
+ FrameList: USBIsocFramePtr;
+ NumFrames: UInt32;
+ end;
+
+ usbHubBitsPtr = ^usbHubBits;
+ usbHubBits = record
+ Request: UInt32;
+ Spare: UInt32;
+ end;
+
+ USBPBPtr = ^USBPB;
+{$ifc TYPED_FUNCTION_POINTERS}
+ USBCompletion = procedure(pb: USBPBPtr);
+ USBCompletion_fix = USBCompletion; { used as field type when a record declaration contains a USBCompletion field identifier }
+{$elsec}
+ USBCompletion = ProcPtr;
+ USBCompletion_fix = USBCompletion; { used as field type when a record declaration contains a USBCompletion field identifier }
+{$endc}
+
+ USBVariantBitsPtr = ^USBVariantBits;
+ USBVariantBits = record
+ case SInt16 of
+ 0: (
+ cntl: usbControlBits;
+ );
+ 1: (
+ isoc: usbIsocBits;
+ );
+ 2: (
+ hub: usbHubBits;
+ );
+ end;
+
+ USBPB = packed record
+ qlink: Ptr;
+ qType: UInt16;
+ pbLength: UInt16;
+ pbVersion: UInt16;
+ reserved1: UInt16;
+ reserved2: UInt32;
+ usbStatus: OSStatus;
+ usbCompletion: USBCompletion_fix;
+ usbRefcon: UInt32;
+ usbReference: USBReference_fix;
+ usbBuffer: Ptr;
+ usbReqCount: USBCount;
+ usbActCount: USBCount;
+ usbFlags: USBFlags_fix;
+ usb: USBVariantBits;
+ usbFrame: UInt32;
+ usbClassType: UInt8;
+ usbSubclass: UInt8;
+ usbProtocol: UInt8;
+ usbOther: UInt8;
+ reserved6: UInt32;
+ reserved7: UInt16;
+ reserved8: UInt16;
+ end;
+
+ uslReqPtr = ^uslReq;
+ uslReq = record
+ usbDirection: SInt8;
+ usbType: SInt8;
+ usbRecipient: SInt8;
+ usbRequest: SInt8;
+ end;
+
+
+const
+ { BT 19Aug98, bump up to v1.10 for Isoc }
+ kUSBCurrentPBVersion = $0100; { v1.00 }
+ kUSBIsocPBVersion = $0109; { v1.10 }
+ kUSBCurrentHubPB = $0109;
+
+
+ kUSBNoCallBack = -1;
+
+
+type
+ bcdUSB = UInt8;
+
+const
+ kUSBControl = 0;
+ kUSBIsoc = 1;
+ kUSBBulk = 2;
+ kUSBInterrupt = 3;
+ kUSBAnyType = $FF;
+
+ { endpoint type }
+ kUSBOut = 0;
+ kUSBIn = 1;
+ kUSBNone = 2;
+ kUSBAnyDirn = 3;
+
+ { USBDirection }
+ kUSBStandard = 0;
+ kUSBClass = 1;
+ kUSBVendor = 2;
+
+ { USBRqType }
+ kUSBDevice = 0;
+ kUSBInterface = 1;
+ kUSBEndpoint = 2;
+ kUSBOther = 3;
+
+ { USBRqRecipient }
+ kUSBRqGetStatus = 0;
+ kUSBRqClearFeature = 1;
+ kUSBRqReserved1 = 2;
+ kUSBRqSetFeature = 3;
+ kUSBRqReserved2 = 4;
+ kUSBRqSetAddress = 5;
+ kUSBRqGetDescriptor = 6;
+ kUSBRqSetDescriptor = 7;
+ kUSBRqGetConfig = 8;
+ kUSBRqSetConfig = 9;
+ kUSBRqGetInterface = 10;
+ kUSBRqSetInterface = 11;
+ kUSBRqSyncFrame = 12;
+
+ { USBRequest }
+
+ kUSBDeviceDesc = 1;
+ kUSBConfDesc = 2;
+ kUSBStringDesc = 3;
+ kUSBInterfaceDesc = 4;
+ kUSBEndpointDesc = 5;
+ kUSBHIDDesc = $21;
+ kUSBReportDesc = $22;
+ kUSBPhysicalDesc = $23;
+ kUSBHUBDesc = $29;
+
+ { descriptorType }
+
+ kUSBFeatureDeviceRemoteWakeup = 1;
+ kUSBFeatureEndpointStall = 0;
+
+ { Feature selectors }
+ kUSBActive = 0; { Pipe can accept new transactions }
+ kUSBIdle = 1; { Pipe will not accept new transactions }
+ kUSBStalled = 2; { An error occured on the pipe }
+ kUSBSuspended = 4; { Device is suspended }
+ kUSBNoBandwidth = 8; { (Isoc or Int) Pipe could not be initialised due to bandwidth constraint }
+
+ kUSB100mAAvailable = 50;
+ kUSB500mAAvailable = 250;
+ kUSB100mA = 50;
+ kUSBAtrBusPowered = $80;
+ kUSBAtrSelfPowered = $40;
+ kUSBAtrRemoteWakeup = $20;
+
+ kUSBRel10 = $0100;
+ kUSBRel11 = $0110;
+ kUSBRel20 = $0200;
+
+ kUSBDeviceDescriptorLength = $12;
+ kUSBInterfaceDescriptorLength = $09;
+ kUSBConfigDescriptorLength = $09;
+
+
+type
+ USBDeviceDescriptorPtr = ^USBDeviceDescriptor;
+ USBDeviceDescriptor = record
+ length: SInt8;
+ descType: SInt8;
+ usbRel: UInt16;
+ deviceClass: SInt8;
+ deviceSubClass: SInt8;
+ protocol: SInt8;
+ maxPacketSize: SInt8;
+ vendor: UInt16;
+ product: UInt16;
+ devRel: UInt16;
+ manuIdx: SInt8;
+ prodIdx: SInt8;
+ serialIdx: SInt8;
+ numConf: SInt8;
+ end;
+
+ USBDescriptorHeaderPtr = ^USBDescriptorHeader;
+ USBDescriptorHeader = record
+ length: SInt8;
+ descriptorType: SInt8;
+ end;
+
+ USBConfigurationDescriptorPtr = ^USBConfigurationDescriptor;
+ USBConfigurationDescriptor = packed record
+ length: UInt8;
+ descriptorType: UInt8;
+ totalLength: UInt16;
+ numInterfaces: UInt8;
+ configValue: UInt8;
+ configStrIndex: UInt8;
+ attributes: UInt8;
+ maxPower: UInt8;
+ end;
+
+ USBInterfaceDescriptorPtr = ^USBInterfaceDescriptor;
+ USBInterfaceDescriptor = packed record
+ length: UInt8;
+ descriptorType: UInt8;
+ interfaceNumber: UInt8;
+ alternateSetting: UInt8;
+ numEndpoints: UInt8;
+ interfaceClass: UInt8;
+ interfaceSubClass: UInt8;
+ interfaceProtocol: UInt8;
+ interfaceStrIndex: UInt8;
+ end;
+
+ USBEndPointDescriptorPtr = ^USBEndPointDescriptor;
+ USBEndPointDescriptor = packed record
+ length: UInt8;
+ descriptorType: UInt8;
+ endpointAddress: UInt8;
+ attributes: UInt8;
+ maxPacketSize: UInt16;
+ interval: UInt8;
+ end;
+
+ USBHIDDescriptorPtr = ^USBHIDDescriptor;
+ USBHIDDescriptor = packed record
+ descLen: UInt8;
+ descType: UInt8;
+ descVersNum: UInt16;
+ hidCountryCode: UInt8;
+ hidNumDescriptors: UInt8;
+ hidDescriptorType: UInt8;
+ hidDescriptorLengthLo: UInt8; { can't make this a single 16bit value or the compiler will add a filler byte }
+ hidDescriptorLengthHi: UInt8;
+ end;
+
+ USBHIDReportDescPtr = ^USBHIDReportDesc;
+ USBHIDReportDesc = packed record
+ hidDescriptorType: UInt8;
+ hidDescriptorLengthLo: UInt8; { can't make this a single 16bit value or the compiler will add a filler byte }
+ hidDescriptorLengthHi: UInt8;
+ end;
+
+ USBHubPortStatusPtr = ^USBHubPortStatus;
+ USBHubPortStatus = record
+ portFlags: UInt16; { Port status flags }
+ portChangeFlags: UInt16; { Port changed flags }
+ end;
+
+ { ********* ProtoTypes *************** }
+ { For dealing with endianisms }
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * HostToUSBWord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function HostToUSBWord(value: UInt16): UInt16; external name '_HostToUSBWord';
+
+{
+ * USBToHostWord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBToHostWord(value: UInt16): UInt16; external name '_USBToHostWord';
+
+{
+ * HostToUSBLong()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function HostToUSBLong(value: UInt32): UInt32; external name '_HostToUSBLong';
+
+{
+ * USBToHostLong()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBToHostLong(value: UInt32): UInt32; external name '_USBToHostLong';
+
+{ Main prototypes }
+{ Transfer commands }
+{
+ * USBDeviceRequest()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBDeviceRequest(var pb: USBPB): OSStatus; external name '_USBDeviceRequest';
+
+{
+ * USBBulkWrite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBBulkWrite(var pb: USBPB): OSStatus; external name '_USBBulkWrite';
+
+{
+ * USBBulkRead()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBBulkRead(var pb: USBPB): OSStatus; external name '_USBBulkRead';
+
+{
+ * USBIntRead()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBIntRead(var pb: USBPB): OSStatus; external name '_USBIntRead';
+
+{
+ * USBIntWrite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.2 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBIntWrite(var pb: USBPB): OSStatus; external name '_USBIntWrite';
+
+{
+ * USBIsocRead()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBIsocRead(var pb: USBPB): OSStatus; external name '_USBIsocRead';
+
+{
+ * USBIsocWrite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBIsocWrite(var pb: USBPB): OSStatus; external name '_USBIsocWrite';
+
+{ Pipe state control }
+{
+ * USBClearPipeStallByReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBClearPipeStallByReference(ref: USBPipeRef): OSStatus; external name '_USBClearPipeStallByReference';
+
+{
+ * USBAbortPipeByReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBAbortPipeByReference(ref: USBReference): OSStatus; external name '_USBAbortPipeByReference';
+
+{
+ * USBResetPipeByReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBResetPipeByReference(ref: USBReference): OSStatus; external name '_USBResetPipeByReference';
+
+{
+ * USBSetPipeIdleByReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBSetPipeIdleByReference(ref: USBPipeRef): OSStatus; external name '_USBSetPipeIdleByReference';
+
+{
+ * USBSetPipeActiveByReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBSetPipeActiveByReference(ref: USBPipeRef): OSStatus; external name '_USBSetPipeActiveByReference';
+
+{
+ * USBClosePipeByReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBClosePipeByReference(ref: USBPipeRef): OSStatus; external name '_USBClosePipeByReference';
+
+{
+ * USBGetPipeStatusByReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBGetPipeStatusByReference(ref: USBReference; var state: USBPipeState): OSStatus; external name '_USBGetPipeStatusByReference';
+
+
+{ Configuration services }
+{
+ * USBFindNextInterface()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBFindNextInterface(var pb: USBPB): OSStatus; external name '_USBFindNextInterface';
+
+{
+ * USBOpenDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBOpenDevice(var pb: USBPB): OSStatus; external name '_USBOpenDevice';
+
+{
+ * USBSetConfiguration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBSetConfiguration(var pb: USBPB): OSStatus; external name '_USBSetConfiguration';
+
+{
+ * USBNewInterfaceRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBNewInterfaceRef(var pb: USBPB): OSStatus; external name '_USBNewInterfaceRef';
+
+{
+ * USBDisposeInterfaceRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBDisposeInterfaceRef(var pb: USBPB): OSStatus; external name '_USBDisposeInterfaceRef';
+
+{
+ * USBConfigureInterface()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBConfigureInterface(var pb: USBPB): OSStatus; external name '_USBConfigureInterface';
+
+{
+ * USBFindNextPipe()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBFindNextPipe(var pb: USBPB): OSStatus; external name '_USBFindNextPipe';
+
+{
+ * USBSetPipePolicy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.4 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBSetPipePolicy(var pb: USBPB): OSStatus; external name '_USBSetPipePolicy';
+
+{ Dealing with descriptors. }
+{ Note most of this is temprorary }
+{
+ * USBGetConfigurationDescriptor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBGetConfigurationDescriptor(var pb: USBPB): OSStatus; external name '_USBGetConfigurationDescriptor';
+
+{
+ * USBGetFullConfigurationDescriptor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBGetFullConfigurationDescriptor(var pb: USBPB): OSStatus; external name '_USBGetFullConfigurationDescriptor';
+
+{
+ * USBGetStringDescriptor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBGetStringDescriptor(var pb: USBPB): OSStatus; external name '_USBGetStringDescriptor';
+
+{
+ * USBFindNextEndpointDescriptorImmediate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBFindNextEndpointDescriptorImmediate(var pb: USBPB): OSStatus; external name '_USBFindNextEndpointDescriptorImmediate';
+
+{
+ * USBFindNextInterfaceDescriptorImmediate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBFindNextInterfaceDescriptorImmediate(var pb: USBPB): OSStatus; external name '_USBFindNextInterfaceDescriptorImmediate';
+
+{
+ * USBFindNextAssociatedDescriptor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBFindNextAssociatedDescriptor(var pb: USBPB): OSStatus; external name '_USBFindNextAssociatedDescriptor';
+
+
+{ Utility functions }
+{
+ * USBResetDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBResetDevice(var pb: USBPB): OSStatus; external name '_USBResetDevice';
+
+{
+ * USBPortStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.4 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBPortStatus(var pb: USBPB): OSStatus; external name '_USBPortStatus';
+
+{
+ * USBSuspendDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.3 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBSuspendDevice(var pb: USBPB): OSStatus; external name '_USBSuspendDevice';
+
+{
+ * USBResumeDeviceByReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.3 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBResumeDeviceByReference(refIn: USBReference): OSStatus; external name '_USBResumeDeviceByReference';
+
+{
+ * USBGetBandwidthAvailableByReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.4 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBGetBandwidthAvailableByReference(ref: USBReference; var avail: UInt32): OSStatus; external name '_USBGetBandwidthAvailableByReference';
+
+{
+ * USBGetFrameNumberImmediate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBGetFrameNumberImmediate(var pb: USBPB): OSStatus; external name '_USBGetFrameNumberImmediate';
+
+{
+ * USBDelay()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBDelay(var pb: USBPB): OSStatus; external name '_USBDelay';
+
+{
+ * USBSAbortQueuesByReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.3 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBSAbortQueuesByReference(ref: USBReference): OSStatus; external name '_USBSAbortQueuesByReference';
+
+{
+ * USBAllocMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBAllocMem(var pb: USBPB): OSStatus; external name '_USBAllocMem';
+
+{
+ * USBDeallocMem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBDeallocMem(var pb: USBPB): OSStatus; external name '_USBDeallocMem';
+
+{ Expert interface functions }
+{
+ * USBExpertInstallInterfaceDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBExpertInstallInterfaceDriver(ref: USBDeviceRef; desc: USBDeviceDescriptorPtr; interfacePtr: USBInterfaceDescriptorPtr; hubRef: USBReference; busPowerAvailable: UInt32): OSStatus; external name '_USBExpertInstallInterfaceDriver';
+
+{
+ * USBExpertRemoveInterfaceDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBExpertRemoveInterfaceDriver(ref: USBDeviceRef): OSStatus; external name '_USBExpertRemoveInterfaceDriver';
+
+{
+ * USBExpertInstallDeviceDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBExpertInstallDeviceDriver(ref: USBDeviceRef; desc: USBDeviceDescriptorPtr; hubRef: USBReference; port: UInt32; busPowerAvailable: UInt32): OSStatus; external name '_USBExpertInstallDeviceDriver';
+
+{
+ * USBExpertRemoveDeviceDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBExpertRemoveDeviceDriver(ref: USBDeviceRef): OSStatus; external name '_USBExpertRemoveDeviceDriver';
+
+{
+ * USBExpertStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBExpertStatus(ref: USBDeviceRef; pointer: UnivPtr; value: UInt32): OSStatus; external name '_USBExpertStatus';
+
+{
+ * USBExpertFatalError()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBExpertFatalError(ref: USBDeviceRef; status: OSStatus; pointer: UnivPtr; value: UInt32): OSStatus; external name '_USBExpertFatalError';
+
+{
+ * USBExpertNotify()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBFamilyExpertLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBExpertNotify(note: UnivPtr): OSStatus; external name '_USBExpertNotify';
+
+{
+ * USBExpertStatusLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.2 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBExpertStatusLevel(level: UInt32; ref: USBDeviceRef; status: StringPtr; value: UInt32): OSStatus; external name '_USBExpertStatusLevel';
+
+{
+ * USBExpertGetStatusLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.3 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBExpertGetStatusLevel: UInt32; external name '_USBExpertGetStatusLevel';
+
+{
+ * USBExpertSetStatusLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.3 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure USBExpertSetStatusLevel(level: UInt32); external name '_USBExpertSetStatusLevel';
+
+
+{
+ * USBExpertSetDevicePowerStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBExpertSetDevicePowerStatus(ref: USBDeviceRef; reserved1: UInt32; reserved2: UInt32; powerStatus: UInt32; busPowerAvailable: UInt32; busPowerNeeded: UInt32): OSStatus; external name '_USBExpertSetDevicePowerStatus';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+const
+ kUSBDevicePower_PowerOK = 0;
+ kUSBDevicePower_BusPowerInsufficient = 1;
+ kUSBDevicePower_BusPowerNotAllFeatures = 2;
+ kUSBDevicePower_SelfPowerInsufficient = 3;
+ kUSBDevicePower_SelfPowerNotAllFeatures = 4;
+ kUSBDevicePower_HubPortOk = 5;
+ kUSBDevicePower_HubPortOverCurrent = 6;
+ kUSBDevicePower_BusPoweredHubOnLowPowerPort = 7;
+ kUSBDevicePower_BusPoweredHubToBusPoweredHub = 8;
+ kUSBDevicePower_Reserved3 = 9;
+ kUSBDevicePower_Reserved4 = 10;
+
+
+ { For hubs only }
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * USBHubAddDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBHubAddDevice(var pb: USBPB): OSStatus; external name '_USBHubAddDevice';
+
+{
+ * USBHubConfigurePipeZero()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBHubConfigurePipeZero(var pb: USBPB): OSStatus; external name '_USBHubConfigurePipeZero';
+
+{
+ * USBHubSetAddress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBHubSetAddress(var pb: USBPB): OSStatus; external name '_USBHubSetAddress';
+
+{
+ * USBHubDeviceRemoved()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBHubDeviceRemoved(var pb: USBPB): OSStatus; external name '_USBHubDeviceRemoved';
+
+{
+ * USBMakeBMRequestType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBMakeBMRequestType(direction: ByteParameter; reqtype: ByteParameter; recipient: ByteParameter): ByteParameter; external name '_USBMakeBMRequestType';
+
+{
+ * USBControlRequest()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.2 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBControlRequest(var pb: USBPB): OSStatus; external name '_USBControlRequest';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+type
+ USBLocationID = UInt32;
+
+const
+ kUSBLocationNibbleFormat = 0; { Other values are reserved for future types (like when we have more than 16 ports per hub) }
+
+
+ kNoDeviceRef = -1;
+
+ { Status Level constants }
+ {
+ Level 1: Fatal errors
+ Level 2: General errors that may or may not effect operation
+ Level 3: General driver messages. The "AddStatus" call that drivers use comes through as a level 3. This is also the default level at boot time.
+ Level 4: Important status messages from the Expert and USL.
+ Level 5: General status messages from the Expert and USL.
+ }
+ kUSBStatusLevelFatal = 1;
+ kUSBStatusLevelError = 2;
+ kUSBStatusLevelClient = 3;
+ kUSBStatusLevelGeneral = 4;
+ kUSBStatusLevelVerbose = 5;
+
+ { Expert Notification Types }
+
+type
+ USBNotificationType = UInt8;
+const
+ kNotifyAddDevice = $00;
+ kNotifyRemoveDevice = $01;
+ kNotifyAddInterface = $02;
+ kNotifyRemoveInterface = $03;
+ kNotifyGetDeviceDescriptor = $04;
+ kNotifyGetInterfaceDescriptor = $05;
+ kNotifyGetNextDeviceByClass = $06;
+ kNotifyGetDriverConnectionID = $07;
+ kNotifyInstallDeviceNotification = $08;
+ kNotifyRemoveDeviceNotification = $09;
+ kNotifyDeviceRefToBusRef = $0A;
+ kNotifyDriverNotify = $0C;
+ kNotifyParentNotify = $0D;
+ kNotifyAnyEvent = $FF;
+ kNotifyPowerState = $17;
+ kNotifyStatus = $18;
+ kNotifyFatalError = $19;
+ kNotifyStatusLevel = $20;
+
+
+type
+ USBDriverMessage = USBNotificationType;
+ {
+ USB Manager wildcard constants for USBGetNextDeviceByClass
+ and USBInstallDeviceNotification.
+ }
+ USBManagerWildcard = UInt16;
+const
+ kUSBAnyClass = $FFFF;
+ kUSBAnySubClass = $FFFF;
+ kUSBAnyProtocol = $FFFF;
+ kUSBAnyVendor = $FFFF;
+ kUSBAnyProduct = $FFFF;
+
+
+type
+ ExpertNotificationDataPtr = ^ExpertNotificationData;
+ ExpertNotificationData = record
+ notification: SInt8;
+ filler: SInt8; { unused due to 2-byte 68k alignment }
+ deviceRef: USBDeviceRefPtr;
+ busPowerAvailable: UInt32;
+ data: Ptr;
+ info1: UInt32;
+ info2: UInt32;
+ end;
+
+ { Definition of function pointer passed in ExpertEntryProc }
+{$ifc TYPED_FUNCTION_POINTERS}
+ ExpertNotificationProcPtr = function(pNotificationData: ExpertNotificationDataPtr): OSStatus;
+{$elsec}
+ ExpertNotificationProcPtr = ProcPtr;
+{$endc}
+
+ { Definition of expert's callback installation function }
+{$ifc TYPED_FUNCTION_POINTERS}
+ ExpertEntryProcPtr = function(pExpertNotify: ExpertNotificationProcPtr): OSStatus;
+{$elsec}
+ ExpertEntryProcPtr = ProcPtr;
+{$endc}
+
+ { Device Notification Callback Routine }
+{$ifc TYPED_FUNCTION_POINTERS}
+ USBDeviceNotificationCallbackProcPtr = procedure(pb: UnivPtr);
+{$elsec}
+ USBDeviceNotificationCallbackProcPtr = ProcPtr;
+{$endc}
+
+ { Device Notification Parameter Block }
+ USBDeviceNotificationParameterBlockPtr = ^USBDeviceNotificationParameterBlock;
+ USBDeviceNotificationParameterBlock = record
+ pbLength: UInt16;
+ pbVersion: UInt16;
+ usbDeviceNotification: SInt8;
+ reserved1: SInt8; { needed because of 2-byte 68k alignment }
+ usbDeviceRef: USBDeviceRef_fix;
+ usbClass: UInt16;
+ usbSubClass: UInt16;
+ usbProtocol: UInt16;
+ usbVendor: UInt16;
+ usbProduct: UInt16;
+ result: OSStatus;
+ token: UInt32;
+ callback: USBDeviceNotificationCallbackProcPtr;
+ refcon: UInt32;
+ end;
+
+ { Definition of USBDriverNotificationCallback Routine }
+{$ifc TYPED_FUNCTION_POINTERS}
+ USBDriverNotificationCallbackPtr = procedure(status: OSStatus; refcon: UInt32);
+{$elsec}
+ USBDriverNotificationCallbackPtr = ProcPtr;
+{$endc}
+
+ { Public Functions }
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * USBGetVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBServicesLib 1.3 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBGetVersion: UInt32; external name '_USBGetVersion';
+
+{
+ * USBGetNextDeviceByClass()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBManagerLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBGetNextDeviceByClass(var deviceRef: USBDeviceRef; var connID: CFragConnectionID; theClass: UInt16; theSubClass: UInt16; theProtocol: UInt16): OSStatus; external name '_USBGetNextDeviceByClass';
+
+{
+ * USBGetDeviceDescriptor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBManagerLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBGetDeviceDescriptor(var deviceRef: USBDeviceRef; var deviceDescriptor: USBDeviceDescriptor; size: UInt32): OSStatus; external name '_USBGetDeviceDescriptor';
+
+{
+ * USBGetInterfaceDescriptor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBManagerLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBGetInterfaceDescriptor(var interfaceRef: USBInterfaceRef; var interfaceDescriptor: USBInterfaceDescriptor; size: UInt32): OSStatus; external name '_USBGetInterfaceDescriptor';
+
+{
+ * USBGetDriverConnectionID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBManagerLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBGetDriverConnectionID(var deviceRef: USBDeviceRef; var connID: CFragConnectionID): OSStatus; external name '_USBGetDriverConnectionID';
+
+{
+ * USBInstallDeviceNotification()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBManagerLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure USBInstallDeviceNotification(var pb: USBDeviceNotificationParameterBlock); external name '_USBInstallDeviceNotification';
+
+{
+ * USBRemoveDeviceNotification()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBManagerLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBRemoveDeviceNotification(token: UInt32): OSStatus; external name '_USBRemoveDeviceNotification';
+
+{
+ * USBDeviceRefToBusRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBManagerLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBDeviceRefToBusRef(var deviceRef: USBDeviceRef; var busRef: USBBusRef): OSStatus; external name '_USBDeviceRefToBusRef';
+
+{
+ * USBDriverNotify()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBManagerLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBDriverNotify(reference: USBReference; mesg: ByteParameter; refcon: UInt32; callback: USBDriverNotificationCallbackPtr): OSStatus; external name '_USBDriverNotify';
+
+{
+ * USBExpertNotifyParent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBManagerLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBExpertNotifyParent(reference: USBReference; pointer: UnivPtr): OSStatus; external name '_USBExpertNotifyParent';
+
+{
+ * USBAddDriverForFSSpec()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBManagerLib 1.3 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBAddDriverForFSSpec(reference: USBReference; var fileSpec: FSSpec): OSStatus; external name '_USBAddDriverForFSSpec';
+
+{
+ * USBAddShimFromDisk()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBManagerLib 1.4 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBAddShimFromDisk(var shimFilePtr: FSSpec): OSStatus; external name '_USBAddShimFromDisk';
+
+{
+ * USBReferenceToRegEntry()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBManagerLib 1.4 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBReferenceToRegEntry(var parentEntry: RegEntryID; parentDeviceRef: USBDeviceRef): OSStatus; external name '_USBReferenceToRegEntry';
+
+{
+ * USBConfigureADBShim()
+ *
+ * Availability:
+ * Non-Carbon CFM: in USBManagerLib 1.4 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBConfigureADBShim(inCommandID: UInt32; arg1: UnivPtr; arg2: UnivPtr): OSStatus; external name '_USBConfigureADBShim';
+
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ HIDInterruptProcPtr = procedure(refcon: UInt32; theData: UnivPtr);
+{$elsec}
+ HIDInterruptProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ HIDNotificationProcPtr = procedure(refcon: UInt32; reportSize: UInt32; theReport: UnivPtr; theInterfaceRef: USBReference);
+{$elsec}
+ HIDNotificationProcPtr = ProcPtr;
+{$endc}
+
+ { HID Install Interrupt prototype }
+{$ifc TYPED_FUNCTION_POINTERS}
+ USBHIDInstallInterruptProcPtr = function(pInterruptProc: HIDInterruptProcPtr; refcon: UInt32): OSStatus;
+{$elsec}
+ USBHIDInstallInterruptProcPtr = ProcPtr;
+{$endc}
+
+ { HID Poll Device prototype }
+{$ifc TYPED_FUNCTION_POINTERS}
+ USBHIDPollDeviceProcPtr = function: OSStatus;
+{$elsec}
+ USBHIDPollDeviceProcPtr = ProcPtr;
+{$endc}
+
+ { HID Control Device prototype }
+{$ifc TYPED_FUNCTION_POINTERS}
+ USBHIDControlDeviceProcPtr = function(theControlSelector: UInt32; theControlData: UnivPtr): OSStatus;
+{$elsec}
+ USBHIDControlDeviceProcPtr = ProcPtr;
+{$endc}
+
+ { HID Get Device Info prototype }
+{$ifc TYPED_FUNCTION_POINTERS}
+ USBHIDGetDeviceInfoProcPtr = function(theInfoSelector: UInt32; theInfo: UnivPtr): OSStatus;
+{$elsec}
+ USBHIDGetDeviceInfoProcPtr = ProcPtr;
+{$endc}
+
+ { HID Enter Polled Mode prototype }
+{$ifc TYPED_FUNCTION_POINTERS}
+ USBHIDEnterPolledModeProcPtr = function: OSStatus;
+{$elsec}
+ USBHIDEnterPolledModeProcPtr = ProcPtr;
+{$endc}
+
+ { HID Exit Polled Mode prototype }
+{$ifc TYPED_FUNCTION_POINTERS}
+ USBHIDExitPolledModeProcPtr = function: OSStatus;
+{$elsec}
+ USBHIDExitPolledModeProcPtr = ProcPtr;
+{$endc}
+
+ { HID Install Notification prototype }
+{$ifc TYPED_FUNCTION_POINTERS}
+ USBHIDInstallNotificationProcPtr = function(pNotificationProc: HIDNotificationProcPtr; refcon: UInt32): OSStatus;
+{$elsec}
+ USBHIDInstallNotificationProcPtr = ProcPtr;
+{$endc}
+
+
+const
+ kHIDStandardDispatchVersion = 0;
+ kHIDReservedDispatchVersion = 1;
+ kHIDNotificationDispatchVersion = 2;
+ kHIDCurrentDispatchVersion = 2;
+
+
+type
+ USBHIDRev2DispatchTablePtr = ^USBHIDRev2DispatchTable;
+ USBHIDRev2DispatchTable = record
+ hidDispatchVersion: UInt32;
+ pUSBHIDInstallInterrupt: USBHIDInstallInterruptProcPtr;
+ pUSBHIDPollDevice: USBHIDPollDeviceProcPtr;
+ pUSBHIDControlDevice: USBHIDControlDeviceProcPtr;
+ pUSBHIDGetDeviceInfo: USBHIDGetDeviceInfoProcPtr;
+ pUSBHIDEnterPolledMode: USBHIDEnterPolledModeProcPtr;
+ pUSBHIDExitPolledMode: USBHIDExitPolledModeProcPtr;
+ pUSBHIDInstallNotification: USBHIDInstallNotificationProcPtr;
+ end;
+
+ USBHIDModuleDispatchTablePtr = ^USBHIDModuleDispatchTable;
+ USBHIDModuleDispatchTable = record
+ hidDispatchVersion: UInt32;
+ pUSBHIDInstallInterrupt: USBHIDInstallInterruptProcPtr;
+ pUSBHIDPollDevice: USBHIDPollDeviceProcPtr;
+ pUSBHIDControlDevice: USBHIDControlDeviceProcPtr;
+ pUSBHIDGetDeviceInfo: USBHIDGetDeviceInfoProcPtr;
+ pUSBHIDEnterPolledMode: USBHIDEnterPolledModeProcPtr;
+ pUSBHIDExitPolledMode: USBHIDExitPolledModeProcPtr;
+ end;
+
+ { Prototypes Tue, Mar 17, 1998 4:54:30 PM }
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * USBHIDInstallInterrupt()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBHIDInstallInterrupt(HIDInterruptFunction: HIDInterruptProcPtr; refcon: UInt32): OSStatus; external name '_USBHIDInstallInterrupt';
+
+{
+ * USBHIDPollDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBHIDPollDevice: OSStatus; external name '_USBHIDPollDevice';
+
+{
+ * USBHIDControlDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBHIDControlDevice(theControlSelector: UInt32; theControlData: UnivPtr): OSStatus; external name '_USBHIDControlDevice';
+
+{
+ * USBHIDGetDeviceInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBHIDGetDeviceInfo(theInfoSelector: UInt32; theInfo: UnivPtr): OSStatus; external name '_USBHIDGetDeviceInfo';
+
+{
+ * USBHIDEnterPolledMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBHIDEnterPolledMode: OSStatus; external name '_USBHIDEnterPolledMode';
+
+{
+ * USBHIDExitPolledMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBHIDExitPolledMode: OSStatus; external name '_USBHIDExitPolledMode';
+
+{
+ * USBHIDInstallNotification()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function USBHIDInstallNotification(HIDNotificationFunction: HIDNotificationProcPtr; refcon: UInt32): OSStatus; external name '_USBHIDInstallNotification';
+
+{
+ * HIDNotification()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure HIDNotification(devicetype: UInt32; var NewHIDData: UInt8; var OldHIDData: UInt8); external name '_HIDNotification';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+const
+ kHIDRqGetReport = 1;
+ kHIDRqGetIdle = 2;
+ kHIDRqGetProtocol = 3;
+ kHIDRqSetReport = 9;
+ kHIDRqSetIdle = 10;
+ kHIDRqSetProtocol = 11;
+
+ kHIDRtInputReport = 1;
+ kHIDRtOutputReport = 2;
+ kHIDRtFeatureReport = 3;
+
+ kHIDBootProtocolValue = 0;
+ kHIDReportProtocolValue = 1;
+
+ kHIDKeyboardInterfaceProtocol = 1;
+ kHIDMouseInterfaceProtocol = 2;
+
+ kHIDSetLEDStateByBits = 1;
+ kHIDSetLEDStateByBitMask = 1;
+ kHIDSetLEDStateByIDNumber = 2;
+ kHIDRemoveInterruptHandler = 3;
+ kHIDEnableDemoMode = 4;
+ kHIDDisableDemoMode = 5;
+ kHIDRemoveNotification = $1000;
+
+ kHIDGetLEDStateByBits = 1; { not supported in 1.0 of keyboard module }
+ kHIDGetLEDStateByBitMask = 1; { not supported in 1.0 of keyboard module }
+ kHIDGetLEDStateByIDNumber = 2;
+ kHIDGetDeviceCountryCode = 3; { not supported in 1.0 HID modules }
+ kHIDGetDeviceUnitsPerInch = 4; { only supported in mouse HID module }
+ kHIDGetInterruptHandler = 5;
+ kHIDGetCurrentKeys = 6; { only supported in keyboard HID module }
+ kHIDGetInterruptRefcon = 7;
+ kHIDGetVendorID = 8;
+ kHIDGetProductID = 9;
+
+
+ kNumLockLED = 0;
+ kCapsLockLED = 1;
+ kScrollLockLED = 2;
+ kComposeLED = 3;
+ kKanaLED = 4;
+
+ kNumLockLEDMask = $01;
+ kCapsLockLEDMask = $02;
+ kScrollLockLEDMask = $04;
+ kComposeLEDMask = $08;
+ kKanaLEDMask = $10;
+
+ kUSBCapsLockKey = $39;
+ kUSBNumLockKey = $53;
+ kUSBScrollLockKey = $47;
+
+
+type
+ USBMouseDataPtr = ^USBMouseData;
+ USBMouseData = record
+ buttons: UInt16;
+ XDelta: SInt16;
+ YDelta: SInt16;
+ end;
+
+ USBKeyboardDataPtr = ^USBKeyboardData;
+ USBKeyboardData = record
+ keycount: UInt16;
+ usbkeycode: array [0..31] of UInt16;
+ end;
+
+ USBHIDDataPtr = ^USBHIDData;
+ USBHIDData = record
+ case SInt16 of
+ 0: (
+ kbd: USBKeyboardData;
+ );
+ 1: (
+ mouse: USBMouseData;
+ );
+ end;
+
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * StartCompoundClassDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure StartCompoundClassDriver(device: USBDeviceRef; classID: UInt16; subClass: UInt16); external name '_StartCompoundClassDriver';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+const
+ kUSBCompositeClass = 0;
+ kUSBAudioClass = 1;
+ kUSBCommClass = 2;
+ kUSBHIDClass = 3;
+ kUSBDisplayClass = 4;
+ kUSBPrintingClass = 7;
+ kUSBMassStorageClass = 8;
+ kUSBHubClass = 9;
+ kUSBDataClass = 10;
+ kUSBVendorSpecificClass = $FF;
+
+ kUSBCompositeSubClass = 0;
+ kUSBHubSubClass = 1;
+ kUSBPrinterSubclass = 1;
+ kUSBVendorSpecificSubClass = $FF;
+
+ kUSBHIDInterfaceClass = $03;
+
+ kUSBNoInterfaceSubClass = $00;
+ kUSBBootInterfaceSubClass = $01;
+
+ kUSBNoInterfaceProtocol = $00;
+ kUSBKeyboardInterfaceProtocol = $01;
+ kUSBMouseInterfaceProtocol = $02;
+ kUSBVendorSpecificProtocol = $FF;
+
+ kUSBPrinterUnidirectionalProtocol = $01;
+ kUSBPrinterBidirectionalProtocol = $02;
+
+
+ kServiceCategoryUSB = $75736220 (* 'usb ' *); { USB }
+
+ kUSBDriverFileType = $6E647276 (* 'ndrv' *);
+ kUSBDriverRsrcType = $75736264 (* 'usbd' *);
+ kUSBShimRsrcType = $75736273 (* 'usbs' *);
+
+ kTheUSBDriverDescriptionSignature = $75736264 (* 'usbd' *);
+
+ kInitialUSBDriverDescriptor = 0;
+
+
+type
+ USBDriverDescVersion = UInt32;
+ USBDriverDescVersion_fix = USBDriverDescVersion; { used as field type when a record declaration contains a USBDriverDescVersion field identifier }
+ { Driver Loading Options }
+ USBDriverLoadingOptions = UInt32;
+ USBDriverLoadingOptions_fix = USBDriverLoadingOptions; { used as field type when a record declaration contains a USBDriverLoadingOptions field identifier }
+const
+ kUSBDoNotMatchGenericDevice = $00000001; { Driver's VendorID must match Device's VendorID }
+ kUSBDoNotMatchInterface = $00000002; { Do not load this driver as an interface driver. }
+ kUSBProtocolMustMatch = $00000004; { Do not load this driver if protocol field doesn't match. }
+ kUSBInterfaceMatchOnly = $00000008; { Only load this driver as an interface driver. }
+
+ kClassDriverPluginVersion = $00001100;
+
+
+type
+ USBDeviceInfoPtr = ^USBDeviceInfo;
+ USBDeviceInfo = record
+ usbVendorID: UInt16; { USB Vendor ID }
+ usbProductID: UInt16; { USB Product ID. }
+ usbDeviceReleaseNumber: UInt16; { Release Number of Device }
+ usbDeviceProtocol: UInt16; { Protocol Info. }
+ end;
+ USBDeviceInfo_fix = USBDeviceInfo; { used as field type when a record declaration contains a USBDeviceInfo field identifier }
+
+ USBInterfaceInfoPtr = ^USBInterfaceInfo;
+ USBInterfaceInfo = record
+ usbConfigValue: SInt8; { Configuration Value }
+ usbInterfaceNum: SInt8; { Interface Number }
+ usbInterfaceClass: SInt8; { Interface Class }
+ usbInterfaceSubClass: SInt8; { Interface SubClass }
+ usbInterfaceProtocol: SInt8; { Interface Protocol }
+ pad: SInt8
+ end;
+ USBInterfaceInfo_fix = USBInterfaceInfo; { used as field type when a record declaration contains a USBInterfaceInfo field identifier }
+
+ USBDriverTypePtr = ^USBDriverType;
+ USBDriverType = record
+ nameInfoStr: Str31; { Driver's name when loading into the Name Registry. }
+ usbDriverClass: SInt8; { USB Class this driver belongs to. }
+ usbDriverSubClass: SInt8; { Module type }
+ usbDriverVersion: NumVersion; { Class driver version number. }
+ end;
+ USBDriverType_fix = USBDriverType; { used as field type when a record declaration contains a USBDriverType field identifier }
+
+ USBDriverDescriptionPtr = ^USBDriverDescription;
+ USBDriverDescription = record
+ usbDriverDescSignature: OSType; { Signature field of this structure. }
+ usbDriverDescVersion: USBDriverDescVersion_fix; { Version of this data structure. }
+ usbDeviceInfo: USBDeviceInfo_fix; { Product & Vendor Info }
+ usbInterfaceInfo: USBInterfaceInfo_fix; { Interface info }
+ usbDriverType: USBDriverType_fix; { Driver Info. }
+ usbDriverLoadingOptions: USBDriverLoadingOptions_fix; { Options for class driver loading. }
+ end;
+
+ {
+ Dispatch Table
+ Definition of class driver's HW Validation proc.
+ }
+{$ifc TYPED_FUNCTION_POINTERS}
+ USBDValidateHWProcPtr = function(device: USBDeviceRef; pDesc: USBDeviceDescriptorPtr): OSStatus;
+{$elsec}
+ USBDValidateHWProcPtr = ProcPtr;
+{$endc}
+
+ {
+ Definition of class driver's device initialization proc.
+ Called if the driver is being loaded for a device
+ }
+{$ifc TYPED_FUNCTION_POINTERS}
+ USBDInitializeDeviceProcPtr = function(device: USBDeviceRef; pDesc: USBDeviceDescriptorPtr; busPowerAvailable: UInt32): OSStatus;
+{$elsec}
+ USBDInitializeDeviceProcPtr = ProcPtr;
+{$endc}
+
+ { Definition of class driver's interface initialization proc. }
+{$ifc TYPED_FUNCTION_POINTERS}
+ USBDInitializeInterfaceProcPtr = function(interfaceNum: UInt32; pInterface: USBInterfaceDescriptorPtr; pDevice: USBDeviceDescriptorPtr; interfaceRef: USBInterfaceRef): OSStatus;
+{$elsec}
+ USBDInitializeInterfaceProcPtr = ProcPtr;
+{$endc}
+
+ { Definition of class driver's finalization proc. }
+{$ifc TYPED_FUNCTION_POINTERS}
+ USBDFinalizeProcPtr = function(device: USBDeviceRef; pDesc: USBDeviceDescriptorPtr): OSStatus;
+{$elsec}
+ USBDFinalizeProcPtr = ProcPtr;
+{$endc}
+
+ USBDriverNotification = UInt32;
+const
+ kNotifySystemSleepRequest = $00000001;
+ kNotifySystemSleepDemand = $00000002;
+ kNotifySystemSleepWakeUp = $00000003;
+ kNotifySystemSleepRevoke = $00000004;
+ kNotifyHubEnumQuery = $00000006;
+ kNotifyChildMessage = $00000007;
+ kNotifyExpertTerminating = $00000008;
+ kNotifyDriverBeingRemoved = $0000000B;
+ kNotifyAllowROMDriverRemoval = $0000000E;
+
+ {
+ Definition of driver's notification proc.
+ Added refcon for 1.1 version of dispatch table
+ }
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ USBDDriverNotifyProcPtr = function(notification: USBDriverNotification; pointer: UnivPtr; refcon: UInt32): OSStatus;
+{$elsec}
+ USBDDriverNotifyProcPtr = ProcPtr;
+{$endc}
+
+ USBClassDriverPluginDispatchTablePtr = ^USBClassDriverPluginDispatchTable;
+ USBClassDriverPluginDispatchTable = record
+ pluginVersion: UInt32;
+ validateHWProc: USBDValidateHWProcPtr; { Proc for driver to verify proper HW }
+ initializeDeviceProc: USBDInitializeDeviceProcPtr; { Proc that initializes the class driver. }
+ initializeInterfaceProc: USBDInitializeInterfaceProcPtr; { Proc that initializes a particular interface in the class driver. }
+ finalizeProc: USBDFinalizeProcPtr; { Proc that finalizes the class driver. }
+ notificationProc: USBDDriverNotifyProcPtr; { Proc to pass notifications to the driver. }
+ end;
+
+ { Shim Defines }
+
+const
+ kTheUSBShimDescriptionSignature = $75736273 (* 'usbs' *);
+
+
+type
+ USBShimDescVersion = UInt32;
+ USBShimDescVersion_fix = USBShimDescVersion; { used as field type when a record declaration contains a USBShimDescVersion field identifier }
+const
+ kCurrentUSBShimDescVers = $0100;
+
+ { Shim Loading Options }
+
+type
+ USBShimLoadingOptions = UInt32;
+const
+ kUSBRegisterShimAsSharedLibrary = $00000001; { Driver's VendorID must match Device's VendorID }
+
+
+type
+ USBShimDescriptionPtr = ^USBShimDescription;
+ USBShimDescription = record
+ usbShimDescSignature: OSType; { Signature field of this structure. }
+ usbShimDescVersion: USBShimDescVersion_fix; { Version of this data structure. }
+ usbDriverLoadingOptions: USBShimLoadingOptions; { Options for shim loading. }
+ libraryName: Str63; { For optional shared library registration }
+ end;
+
+ { Hub defines }
+
+
+const
+ kUSBHubDescriptorType = $29;
+
+ { Hub features }
+ kUSBHubLocalPowerChangeFeature = 0;
+ kUSBHubOverCurrentChangeFeature = 1; { port features }
+ kUSBHubPortConnectionFeature = 0;
+ kUSBHubPortEnableFeature = 1;
+ kUSBHubPortSuspendFeature = 2;
+ kUSBHubPortOverCurrentFeature = 3;
+ kUSBHubPortResetFeature = 4;
+ kUSBHubPortPowerFeature = 8;
+ kUSBHubPortLowSpeedFeature = 9;
+ kUSBHubPortConnectionChangeFeature = 16;
+ kUSBHubPortEnableChangeFeature = 17;
+ kUSBHubPortSuspendChangeFeature = 18;
+ kUSBHubPortOverCurrentChangeFeature = 19;
+ kUSBHubPortResetChangeFeature = 20;
+
+
+ kHubPortConnection = 1;
+ kHubPortEnabled = 2;
+ kHubPortSuspend = 4;
+ kHubPortOverCurrent = 8;
+ kHubPortBeingReset = 16;
+ kHubPortPower = $0100;
+ kHubPortLowSpeed = $0200;
+ kHubPortHighSpeed = $0400;
+ kHubPortTestMode = $0800;
+ kHubPortPortIndicator = $1000;
+
+ { Originally this was a Boolean, (low speed)? }
+ kUSBFullSpeed = 0;
+ kUSBLowSpeed = 1;
+ kUSBHighSpeed = 2;
+
+ kHubLocalPowerStatus = 1;
+ kHubOverCurrentIndicator = 2;
+ kHubLocalPowerStatusChange = 1;
+ kHubOverCurrentIndicatorChange = 2;
+
+ off = false;
+ on = true;
+
+
+type
+ hubDescriptorPtr = ^hubDescriptor;
+ hubDescriptor = packed record
+ { See usbDoc pg 250?? }
+ dummy: UInt8; { to align charcteristics }
+ length: UInt8;
+ hubType: UInt8;
+ numPorts: UInt8;
+ characteristics: UInt16;
+ powerOnToGood: UInt8; { Port settling time, in 2ms }
+ hubCurrent: UInt8;
+ { These are received packed, will have to be unpacked }
+ removablePortFlags: packed array [0..7] of UInt8;
+ pwrCtlPortFlags: packed array [0..7] of UInt8;
+ end;
+
+
+{$ALIGN MAC68K}
+
+
+{unit AEInteraction}
+{
+ File: HIToolbox/AEInteraction.h
+
+ Contains: AppleEvent functions that deal with Events and interacting with user
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 2000-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+
+{*************************************************************************
+ AppleEvent callbacks.
+*************************************************************************}
+type
+ AEIdleProcPtr = function( var theEvent: EventRecord; var sleepTime: SInt32; var mouseRgn: RgnHandle ): Boolean;
+type
+ AEFilterProcPtr = function( var theEvent: EventRecord; returnID: SInt32; transactionID: SInt32; const (*var*) sender: AEAddressDesc ): Boolean;
+type
+ AEIdleUPP = AEIdleProcPtr;
+type
+ AEFilterUPP = AEFilterProcPtr;
+
+{*************************************************************************
+ The next couple of calls are basic routines used to create, send,
+ 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function AESend( const (*var*) theAppleEvent: AppleEvent; var reply: AppleEvent; sendMode: AESendMode; sendPriority: AESendPriority; timeOutInTicks: SInt32; idleProc: AEIdleUPP { can be NULL }; filterProc: AEFilterUPP { can be NULL } ): OSErr; external name '_AESend';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function AEProcessAppleEvent( const (*var*) theEventRecord: EventRecord ): OSErr; external name '_AEProcessAppleEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_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.
+}
+{
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function AEResetTimer( const (*var*) reply: AppleEvent ): OSErr; external name '_AEResetTimer';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{*************************************************************************
+ The following three calls are used to allow applications to behave
+ courteously when a user interaction such as a dialog box is needed.
+*************************************************************************}
+
+type
+ AEInteractAllowed = SInt8;
+const
+ kAEInteractWithSelf = 0;
+ kAEInteractWithLocal = 1;
+ kAEInteractWithAll = 2;
+
+{
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function AEGetInteractionAllowed( var level: AEInteractAllowed ): OSErr; external name '_AEGetInteractionAllowed';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function AESetInteractionAllowed( level: AEInteractAllowed ): OSErr; external name '_AESetInteractionAllowed';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function AEInteractWithUser( timeOutInTicks: SInt32; nmReqPtr: NMRecPtr; idleProc: AEIdleUPP ): OSErr; external name '_AEInteractWithUser';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{*************************************************************************
+ The following four calls are available for applications which need more
+ sophisticated control over when and how events are processed. Applications
+ which implement multi-session servers or which implement their own
+ internal event queueing will probably be the major clients of these
+ routines. They can be called from within a handler to prevent the AEM from
+ disposing of the AppleEvent when the handler returns. They can be used to
+ asynchronously process the event (as MacApp does).
+*************************************************************************}
+{
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function AESuspendTheCurrentEvent( const (*var*) theAppleEvent: AppleEvent ): OSErr; external name '_AESuspendTheCurrentEvent';
+(* 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
+ attempt to redispatch the event. Several constants for the dispatcher
+ parameter allow special behavior. They are:
+ - kAEUseStandardDispatch means redispatch as if the event was just
+ received, using the standard AppleEvent dispatch mechanism.
+ - kAENoDispatch means ignore the parameter.
+ Use this in the case where the event has been handled and no
+ redispatch is needed.
+ - non nil means call the routine which the dispatcher points to.
+}
+{ Constants for Refcon in AEResumeTheCurrentEvent with kAEUseStandardDispatch }
+const
+ kAEDoNotIgnoreHandler = $00000000;
+ kAEIgnoreAppPhacHandler = $00000001; { available only in vers 1.0.1 and greater }
+ kAEIgnoreAppEventHandler = $00000002; { available only in vers 1.0.1 and greater }
+ kAEIgnoreSysPhacHandler = $00000004; { available only in vers 1.0.1 and greater }
+ kAEIgnoreSysEventHandler = $00000008; { available only in vers 1.0.1 and greater }
+ kAEIngoreBuiltInEventHandler = $00000010; { available only in vers 1.0.1 and greater }
+ kAEDontDisposeOnResume = $80000000; { available only in vers 1.0.1 and greater }
+
+{ Constants for AEResumeTheCurrentEvent }
+const
+ kAENoDispatch = 0; { dispatch parameter to AEResumeTheCurrentEvent takes a pointer to a dispatch }
+ kAEUseStandardDispatch = $FFFFFFFF; { table, or one of these two constants }
+
+{
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function AEResumeTheCurrentEvent( const (*var*) theAppleEvent: AppleEvent; const (*var*) reply: AppleEvent; dispatcher: AEEventHandlerUPP { can be NULL }; handlerRefcon: SInt32 ): OSErr; external name '_AEResumeTheCurrentEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function AEGetTheCurrentEvent( var theAppleEvent: AppleEvent ): OSErr; external name '_AEGetTheCurrentEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function AESetTheCurrentEvent( const (*var*) theAppleEvent: AppleEvent ): OSErr; external name '_AESetTheCurrentEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{*************************************************************************
+ AppleEvent callbacks.
+*************************************************************************}
+{
+ * NewAEIdleUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewAEIdleUPP( userRoutine: AEIdleProcPtr ): AEIdleUPP; external name '_NewAEIdleUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewAEFilterUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewAEFilterUPP( userRoutine: AEFilterProcPtr ): AEFilterUPP; external name '_NewAEFilterUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeAEIdleUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeAEIdleUPP( userUPP: AEIdleUPP ); external name '_DisposeAEIdleUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeAEFilterUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeAEFilterUPP( userUPP: AEFilterUPP ); external name '_DisposeAEFilterUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeAEIdleUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeAEIdleUPP( var theEvent: EventRecord; var sleepTime: SInt32; var mouseRgn: RgnHandle; userUPP: AEIdleUPP ): Boolean; external name '_InvokeAEIdleUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeAEFilterUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeAEFilterUPP( var theEvent: EventRecord; returnID: SInt32; transactionID: SInt32; const (*var*) sender: AEAddressDesc; userUPP: AEFilterUPP ): Boolean; external name '_InvokeAEFilterUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{unit ATSUnicodeTypes}
+{
+ File: QD/ATSUnicodeTypes.h
+
+ Contains: ATSUI types and constants.
+
+ Version: Quickdraw-150~1
+
+ Copyright: © 2003 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{ See also ATSLayoutTypes.h for more ATSUI-related types and constants }
+{ ---------------------------------------------------------------------------- }
+{ ATSUI types and related constants }
+{ ---------------------------------------------------------------------------- }
+
+{
+ * ATSUTextLayout
+ *
+ * Discussion:
+ * Text layout objects are the heart of ATSUI. These opaque objects
+ * associate Unicode text with style runs, store information about
+ * softbreaks, line and layout controls, and other information about
+ * the text. Text drawing is done by passing a valid layout object
+ * and a range of text to draw to the function ATSUDrawText, after
+ * initial setup work on the layout has been done. See the
+ * definitions of the functions ATSUCreateTextLayout and
+ * ATSUCreateTextLayoutWithTextPtr for more information about
+ * creating layouts.
+ }
+type
+ ATSUTextLayout = ^SInt32; { an opaque 32-bit type }
+
+{
+ * ATSUStyle
+ *
+ * Discussion:
+ * Style objects retain information about text such as font, point
+ * size, color and other attributes. Styles are associated with text
+ * through a layout object. See the definitions of the functions
+ * ATSUSetRunStyle and ATSUCreateTextLayoutWithTextPtr for more
+ * information about assigning styles to runs of text in a layout
+ * object. See the definitions of the functions ATSUCreateStyle and
+ * ATSUSetAttributes for more information on creating and
+ * manipulating styles.
+ }
+type
+ ATSUStyle = ^SInt32; { an opaque 32-bit type }
+ ATSUStylePtr = ^ATSUStyle;
+
+{
+ * ATSUFontFallbacks
+ *
+ * Discussion:
+ * ATSUFontFallbacks objects are used to store the desired font
+ * fallback mode, list, and associated cache information. See the
+ * definitions of ATSUFontFallbackMethod and ATSUSetObjFontFallbacks
+ * for more information about setting up font fallbacks.
+ }
+type
+ ATSUFontFallbacks = ^SInt32; { an opaque 32-bit type }
+
+{
+ * ATSUTextMeasurement
+ *
+ * Discussion:
+ * ATSUTextMeasurement is specific to ATSUI in that measurement
+ * quantities are in fractional Fixed format instead of shorts used
+ * in QuickDraw Text. This provides exact outline metrics and line
+ * specifications such as line width, ascent, descent, and so on.
+ * See FixMath.h for conversion functions for Fixed numbers.
+ }
+type
+ ATSUTextMeasurement = Fixed;
+ ATSUTextMeasurementPtr = ^ATSUTextMeasurement;
+
+{
+ * ATSUFontID
+ *
+ * Discussion:
+ * ATSUFontID indicates a particular font family and face.
+ * ATSUFontID's are not guaranteed to remain constant across
+ * sessions. Clients should use the font's unique name to get a font
+ * token to store in documents which is guaranteed to remain
+ * constant across sessions.
+ }
+type
+ ATSUFontID = FMFont;
+ ATSUFontIDPtr = ^ATSUFontID;
+
+{
+ * ATSUFontFeatureType
+ *
+ * Discussion:
+ * Used to identify a font feature type for a particular font. See
+ * the definitions of the functions ATSUGetAllFontFeatures and
+ * ATSUGetFontFeature for more information about font features.
+ }
+type
+ ATSUFontFeatureType = UInt16;
+ ATSUFontFeatureTypePtr = ^ATSUFontFeatureType;
+
+{
+ * ATSUFontFeatureSelector
+ *
+ * Discussion:
+ * Used to identify a font feature selector for a particular font.
+ * See the definitions of the functions ATSUGetAllFontFeatures and
+ * ATSUGetFontFeature for more information about font features.
+ }
+type
+ ATSUFontFeatureSelector = UInt16;
+ ATSUFontFeatureSelectorPtr = ^ATSUFontFeatureSelector;
+
+{
+ * ATSUFontVariationAxis
+ *
+ * Discussion:
+ * Used to identify a font variation axis for a particular font. See
+ * the definitions of the functions ATSUGetAllFontVariations and
+ * ATSUGetFontVariation for more information about font variations.
+ }
+type
+ ATSUFontVariationAxis = FourCharCode;
+ ATSUFontVariationAxisPtr = ^ATSUFontVariationAxis;
+
+{
+ * ATSUFontVariationValue
+ *
+ * Discussion:
+ * Used to identify a font variation value for a particular font.
+ * See the definitions of the functions ATSUGetAllFontVariations and
+ * ATSUGetFontVariation for more information about font variations.
+ }
+type
+ ATSUFontVariationValue = Fixed;
+ ATSUFontVariationValuePtr = ^ATSUFontVariationValue;
+
+{
+ * 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,
+ * ATSUSetLayoutControls, and ATSUSetAttributes to set these values
+ * in lines, layouts, and styles, respectively. Apple reserves tag
+ * values 0 to 65535 (0 to 0x0000FFFF). ATSUI clients may create
+ * their own tags with any other value.
+ }
+type
+ ATSUAttributeTag = UInt32;
+ ATSUAttributeTagPtr = ^ATSUAttributeTag;
+const
+
+ {
+ * (Type: ATSUTextMeasurement) (Default value: 0) Must not be less
+ * than zero. May be set as a line or layout control.
+ }
+ kATSULineWidthTag = 1;
+
+ {
+ * (Type: Fixed) (Default value: 0) Angle is specified in degrees in
+ * right-handed coordinate system. May be set as a line control.
+ }
+ kATSULineRotationTag = 2;
+
+ {
+ * (Type: Boolean) (Default value: GetSysDirection()) Must be 0 or 1.
+ * See below for convenience constants. May be set as a line or
+ * layout control.
+ }
+ kATSULineDirectionTag = 3;
+
+ {
+ * (Type: Fract) (Default value: kATSUNoJustification) May be set as
+ * a line or layout control.
+ }
+ kATSULineJustificationFactorTag = 4;
+
+ {
+ * (Type: Fract) (Default value: kATSUStartAlignment) May be set as a
+ * line or layout control.
+ }
+ kATSULineFlushFactorTag = 5;
+
+ {
+ * (Type: BslnBaselineRecord) (Default value: all zeros) Calculated
+ * from other style attributes (e.g., font and point size). May be
+ * set as a line or layout control.
+ }
+ kATSULineBaselineValuesTag = 6;
+
+ {
+ * (Type: ATSLineLayoutOptions) (Default value: all zeros) See
+ * ATSLayoutTypes.h for a definition of the ATSLineLayoutOptions type
+ * and a list of possible values. May be set as a line or layout
+ * control.
+ }
+ kATSULineLayoutOptionsTag = 7;
+
+ {
+ * (Type: ATSUTextMeasurement) (Default value: determined by font(s))
+ * Must not be less than zero. Starting in Mac OS X 10.2, you can
+ * retrieve this value as a line or layout control, even if you have
+ * not explicitly set it. This makes it easy to calculate line
+ * height. May be set as a line or layout control.
+ }
+ kATSULineAscentTag = 8;
+
+ {
+ * (Type: ATSUTextMeasurement) (Default value: determined by font(s))
+ * Must not be less than zero. Starting in Mac OS X, you can retrieve
+ * this value as a line or layout control, even if you have not
+ * explicitly set it. This makes it easy to calculate line height.
+ * May be set as a line or layout control.
+ }
+ kATSULineDescentTag = 9;
+
+ {
+ * (Type: RegionCode) (Default value: kTextRegionDontCare) See
+ * Script.h for possible values. May be set as a line or layout
+ * control.
+ }
+ kATSULineLangRegionTag = 10;
+
+ {
+ * (Type: TextBreakLocatorRef) (Default value: NULL) See
+ * UnicodeUtilities.h for more information on creating a
+ * TextBreakLocator. May be set as a line or layout control.
+ }
+ kATSULineTextLocatorTag = 11;
+
+ {
+ * (Type: ATSULineTruncation) (Default value: kATSUTruncateNone) See
+ * the definition of ATSULineTruncation for possible values. May be
+ * set as a line or layout control.
+ }
+ kATSULineTruncationTag = 12;
+
+ {
+ * (Type: ATSUFontFallbacks) (Default value: current global fallback
+ * state) The current global fallback state is determined using the
+ * ATSUSetFontFallbacks function. The use of this function is not
+ * recommended. Instead, use the functions ATSUCreateFontFallbacks
+ * and ATSUSetObjFontFallbacks to create a ATSUFontFallbacks object,
+ * and then use the kATSULineFontFallbacksTag attribute to set the
+ * font fallbacks object as a layout control. See the definition of
+ * ATSUFontFallbacks for more information. May be set as a layout
+ * control.
+ }
+ kATSULineFontFallbacksTag = 13;
+
+ {
+ * (Type: CFStringRef) (Default value: user setting in System
+ * Preferences) Indicates current setting for the decimal separator.
+ * This affects the behavior of decimal tabs. May be set as a line or
+ * layout control.
+ }
+ kATSULineDecimalTabCharacterTag = 14;
+
+ {
+ * (Type: ATSULayoutOperationOverrideSpecifier) (Default value: NULL)
+ * See ATSUnicodeDirectAccess.h for a definition of the
+ * ATSULayoutOperationOverrideSpecifier type. May be set as a layout
+ * control.
+ }
+ kATSULayoutOperationOverrideTag = 15;
+
+ {
+ * (Type: CGColorRef) (Default value: user setting in System
+ * Preferences) Indicates current setting for the highlight color.
+ * May be set as a line or layout control.
+ }
+ kATSULineHighlightCGColorTag = 17;
+
+ {
+ * This is just for convenience. It is the upper limit of the line
+ * and layout tags.
+ }
+ kATSUMaxLineTag = 18;
+
+ {
+ * This tag is obsolete. Please use kATSULineLangRegionTag instead.
+ }
+ kATSULineLanguageTag = 10;
+
+ {
+ * (Type: CGContextRef) (Default value: NULL) Use this tag to produce
+ * Quartz rendering with ATSUI. See the definitions of the functions
+ * QDBeginCGContext and QDEndCGContext in Quickdraw.h for more
+ * information about creating a CGContext from a graphics port. May
+ * be set as a layout control.
+ }
+ kATSUCGContextTag = 32767;
+
+ {
+ * (Type: Boolean) (Default value: false) For compatability purposes
+ * only. Choosing typographic styles from font families is preferred.
+ * Note this tag will produce a synthetic style for fonts that do not
+ * have a typographic style. May be set as a style attribute.
+ }
+ kATSUQDBoldfaceTag = 256;
+
+ {
+ * (Type: Boolean) (Default value: false) For compatability purposes
+ * only. Choosing typographic styles from font families is preferred.
+ * Note this tag will produce a synthetic style for fonts that do not
+ * have a typographic style. May be set as a style attribute.
+ }
+ kATSUQDItalicTag = 257;
+
+ {
+ * (Type: Boolean) (Default value: false) For compatability purposes
+ * only. May be set as a style attribute.
+ }
+ kATSUQDUnderlineTag = 258;
+
+ {
+ * (Type: Boolean) (Default value: false) For compatability purposes
+ * only. May be set as a style attribute.
+ }
+ kATSUQDCondensedTag = 259;
+
+ {
+ * (Type: Boolean) (Default value: false) For compatability purposes
+ * only. May be set as a style attribute.
+ }
+ kATSUQDExtendedTag = 260;
+
+ {
+ * (Type: ATSUFontID) (Default value: LMGetApFontID() or if not
+ * valid, LMGetSysFontFam()) May be set as a style attribute.
+ }
+ kATSUFontTag = 261;
+
+ {
+ * (Type: Fixed) (Default value: Long2Fix(LMGetSysFontSize())) May be
+ * set as a style attribute.
+ }
+ kATSUSizeTag = 262;
+
+ {
+ * (Type: RGBColor) (Default value: (0, 0, 0)) May be set as a style
+ * attribute.
+ }
+ kATSUColorTag = 263;
+
+ {
+ * (Type: RegionCode) (Default value:
+ * GetScriptManagerVariable(smRegionCode)) See Script.h for a list of
+ * possible values. May be set as a style attribute.
+ }
+ kATSULangRegionTag = 264;
+
+ {
+ * (Type: ATSUVerticalCharacterType) (Default value:
+ * kATSUStronglyHorizontal) See the definition of
+ * ATSUVerticalCharacterType for a list of possible values. May be
+ * set as a style attribute.
+ }
+ kATSUVerticalCharacterTag = 265;
+
+ {
+ * (Type: ATSUTextMeasurement) (Default value: kATSUseGlyphAdvance)
+ * Must not be less than zero. May be set as a style attribute.
+ }
+ kATSUImposeWidthTag = 266;
+
+ {
+ * (Type: Fixed) (Default value: 0) May be set as a style attribute.
+ }
+ kATSUBeforeWithStreamShiftTag = 267;
+
+ {
+ * (Type: Fixed) (Default value: 0) May be set as a style attribute.
+ }
+ kATSUAfterWithStreamShiftTag = 268;
+
+ {
+ * (Type: Fixed) (Default value: 0) May be set as a style attribute.
+ }
+ kATSUCrossStreamShiftTag = 269;
+
+ {
+ * (Type: Fixed) (Default value: kATSNoTracking) May be set as a
+ * style attribute.
+ }
+ kATSUTrackingTag = 270;
+
+ {
+ * (Type: Fract) (Default value: 0) May be set as a style attribute.
+ }
+ kATSUHangingInhibitFactorTag = 271;
+
+ {
+ * (Type: Fract) (Default value: 0) May be set as a style attribute.
+ }
+ kATSUKerningInhibitFactorTag = 272;
+
+ {
+ * (Type: Fixed) (Default value: 0) Must be between -1.0 and 1.0. May
+ * be set as a style attribute.
+ }
+ kATSUDecompositionFactorTag = 273;
+
+ {
+ * (Type: BslnBaselineClass) (Default value: kBSLNRomanBaseline) See
+ * SFNTLayoutTypes.h for more information. Use the constant
+ * kBSLNNoBaselineOverride to use intrinsic baselines. May be set as
+ * a style attribute.
+ }
+ kATSUBaselineClassTag = 274;
+
+ {
+ * (Type: ATSJustPriorityWidthDeltaOverrides) (Default value: all
+ * zeros) See ATSLayoutTypes.h for more information. May be set as a
+ * style attribute.
+ }
+ kATSUPriorityJustOverrideTag = 275;
+
+ {
+ * (Type: Boolean) (Default value: false) When set to true, ligatures
+ * and compound characters will not have divisable components. May be
+ * set as a style attribute.
+ }
+ kATSUNoLigatureSplitTag = 276;
+
+ {
+ * (Type: Boolean) (Default value: false) When set to true, ATSUI
+ * will not use a glyph's angularity to determine its boundaries. May
+ * be set as a style attribute.
+ }
+ kATSUNoCaretAngleTag = 277;
+
+ {
+ * (Type: Boolean) (Default value: false) When set to true, ATSUI
+ * will suppress automatic cross kerning (defined by font). May be
+ * set as a style attribute.
+ }
+ kATSUSuppressCrossKerningTag = 278;
+
+ {
+ * (Type: Boolean) (Default value: false) When set to true, ATSUI
+ * will suppress glyphs' automatic optical positional alignment. May
+ * be set as a style attribute.
+ }
+ kATSUNoOpticalAlignmentTag = 279;
+
+ {
+ * (Type: Boolean) (Default value: false) When set to true, ATSUI
+ * will force glyphs to hang beyond the line boundaries. May be set
+ * as a style attribute.
+ }
+ kATSUForceHangingTag = 280;
+
+ {
+ * (Type: Boolean) (Default value: false) When set to true, ATSUI
+ * will not perform post-compensation justification if needed. May be
+ * set as a style attribute.
+ }
+ kATSUNoSpecialJustificationTag = 281;
+
+ {
+ * (Type: TextBreakLocatorRef) (Default value: NULL) See
+ * UnicodeUtilities.h for more information about creating a
+ * TextBreakLocator. May be set as a style attribute.
+ }
+ kATSUStyleTextLocatorTag = 282;
+
+ {
+ * (Type: ATSStyleRenderingOptions) (Default value:
+ * kATSStyleNoOptions) See ATSLayoutTypes.h for a definition of
+ * ATSStyleRenderingOptions and a list of possible values. May be set
+ * as a style attribute.
+ }
+ kATSUStyleRenderingOptionsTag = 283;
+
+ {
+ * (Type: ATSUTextMeasurement) (Default value: determined by font)
+ * Must not be less than zero. Starting in Mac OS X 10.2, you can
+ * retrieve a value for this attribute, even if you have not
+ * explicitly set it. This can make calculating line height easier.
+ * May be set as a style attribute.
+ }
+ kATSUAscentTag = 284;
+
+ {
+ * (Type: ATSUTextMeasurement) (Default value: determined by font)
+ * Must not be less than zero. Starting in Mac OS X 10.2, you can
+ * retrieve a value for this attribute, even if you have not
+ * explicitly set it. This can make calculating line height easier.
+ * May be set as a style attribute.
+ }
+ kATSUDescentTag = 285;
+
+ {
+ * (Type: ATSUTextMeasurement) (Default value: determined by font)
+ * Must not be less than zero. Starting in Mac OS X 10.2, you can
+ * retrieve a value for this attribute, even if you have not
+ * explicitly set it. This can make calculating line height easier.
+ * May be set as a style attribute.
+ }
+ kATSULeadingTag = 286;
+
+ {
+ * (Type: ATSUGlyphSelector) (Default value: 0) See the definition of
+ * ATSUGlyphSelector for more information and a list of possible
+ * values. May be set as a style attribute.
+ }
+ kATSUGlyphSelectorTag = 287;
+
+ {
+ * (Type: ATSURGBAlphaColor) (Default value: (0, 0, 0, 1)) See the
+ * definition of ATSURGBAlphaColor for more information. May be set
+ * as a style attribute.
+ }
+ kATSURGBAlphaColorTag = 288;
+
+ {
+ * (Type: CGAffineTransform) (Default value:
+ * CGAffineTransformIdentity) See the definition of CGAffineTransform
+ * in CGAffineTransform.h for more information. May be set as a style
+ * attribute.
+ }
+ kATSUFontMatrixTag = 289;
+
+ {
+ * (Type: ATSUStyleLineCountType) (Default value:
+ * kATSUStyleSingleLineCount) Used to specify the number of strokes
+ * to be drawn for an underline. May be set as a style attribute.
+ }
+ kATSUStyleUnderlineCountOptionTag = 290;
+
+ {
+ * (Type: CGColorRef) (Default value: NULL) Used to specify the color
+ * of the strokes to draw for an underlined run of text. If NULL, the
+ * text color is used. May be set as a style attribute.
+ }
+ kATSUStyleUnderlineColorOptionTag = 291;
+
+ {
+ * (Type: Boolean) (Default value: false) Used to specify
+ * strikethrough style. May be set as a style attribute.
+ }
+ kATSUStyleStrikeThroughTag = 292;
+
+ {
+ * (Type: ATSUStyleLineCountType) (Default value:
+ * kATSUStyleSingleLineCount) Used to specify the number of strokes
+ * to be drawn for a strikethrough. May be set as a style attribute.
+ }
+ kATSUStyleStrikeThroughCountOptionTag = 293;
+
+ {
+ * (Type: CGColorRef) (Default value: NULL) Used to specify the color
+ * of the strokes to draw for a strikethrough style. If NULL, the
+ * text color is used. May be set as a style attribute.
+ }
+ kATSUStyleStrikeThroughColorOptionTag = 294;
+
+ {
+ * (Type: Boolean) (Default value: false) Used to specify if text
+ * should be drawn with a drop shadow. Only takes effect if a
+ * CGContext is used for drawing. May be set as a style attribute.
+ }
+ kATSUStyleDropShadowTag = 295;
+
+ {
+ * (Type: float) (Default value: 0.0) Used to specify the amount of
+ * blur for a dropshadow. May be set as a style attribute.
+ }
+ kATSUStyleDropShadowBlurOptionTag = 296;
+
+ {
+ * (Type: CGSize) (Default value: (3.0, -3.0)) Used to specify the
+ * amount of offset from the text to be used when drawing a
+ * dropshadow. May be set as a style attribute.
+ }
+ kATSUStyleDropShadowOffsetOptionTag = 297;
+
+ {
+ * (Type: CGColorRef) (Default value: NULL) Used to specify the color
+ * of the dropshadow. May be set as a style attribute.
+ }
+ kATSUStyleDropShadowColorOptionTag = 298;
+
+ {
+ * This is just for convenience. It is the upper limit of the style
+ * tags.
+ }
+ kATSUMaxStyleTag = 299;
+
+ {
+ * This tag is obsolete. Please use kATSULangRegionTag instead. This
+ * is the maximum Apple ATSUI reserved tag value. Client defined
+ * tags must be larger.
+ }
+ kATSULanguageTag = 264;
+ kATSUMaxATSUITagValue = 65535;
+
+
+{
+ * ATSUAttributeValuePtr
+ *
+ * Summary:
+ * Used to provide generic access for storage of attribute values,
+ * which vary in size.
+ }
+type
+ ATSUAttributeValuePtr = Ptr;
+ ConstATSUAttributeValuePtr = Ptr;
+ ATSUAttributeValuePtrPtr = ^ATSUAttributeValuePtr;
+
+{
+ * ATSUAttributeInfo
+ *
+ * Discussion:
+ * ATSUAttributeInfo is used to provide a tag/size pairing. This
+ * makes it possible to provide the client information about all the
+ * attributes for a given range of text. This structure is only
+ * used to return to the client information about a complete set of
+ * attributes. An array of ATSUAttributeInfos is passed as a
+ * parameter so that the client can find out what attributes are set
+ * and what their individual sizes are; with that information, they
+ * can then query about the values of the attributes they're
+ * interested in. Because arrays of ATSUAttributeInfos are used as
+ * parameters to functions, they have to be of a fixed size, hence
+ * the value is not included in the structure.
+ }
+type
+ ATSUAttributeInfo = record
+ fTag: ATSUAttributeTag;
+ fValueSize: ByteCount;
+ end;
+ ATSUAttributeInfoPtr = ^ATSUAttributeInfo;
+
+{
+ * 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
+ * origin position of the line the caret belongs. fDeltaX and
+ * fDeltaY is the position of the caret's other end. Hence, to draw
+ * a caret, simply call MoveTo(fX, fY) followed by LineTo(fDeltaX,
+ * fDeltaY) or equivalent. The ATSUCaret will contain the positions
+ * needed to draw carets on angled lines and reflect angled carets
+ * and leading/trailing split caret appearances.
+ }
+type
+ ATSUCaret = record
+ fX: Fixed;
+ fY: Fixed;
+ fDeltaX: Fixed;
+ fDeltaY: Fixed;
+ end;
+ ATSUCaretPtr = ^ATSUCaret;
+
+{
+ * ATSUCursorMovementType
+ *
+ * Discussion:
+ * Used to indicate how much to move the cursor when using the ATSUI
+ * cusor movement routines. Note that kATSUByCharacterCluster is
+ * only available in Mac OS X and in CarbonLib versions 1.3 and
+ * later.
+ }
+type ATSUCursorMovementType = UInt16;
+const
+
+ {
+ * Cursor movement based on individual characters. The cursor will
+ * step through individual characters within ligatures.
+ }
+ kATSUByCharacter = 0;
+
+ {
+ * Like kATSUByCharacter, but the cursor will treat ligatures as
+ * single entities.
+ }
+ kATSUByTypographicCluster = 1;
+
+ {
+ * Cursor movement by whole words.
+ }
+ kATSUByWord = 2;
+
+ {
+ * Cursor movement by clusters based on characters only.
+ }
+ kATSUByCharacterCluster = 3;
+
+ {
+ * Obsolete name for kATSUByTypographicCluster; do not use.
+ }
+ kATSUByCluster = 1;
+
+
+{
+ * ATSULineTruncation
+ *
+ * Summary:
+ * Constants used with the kATSULineTruncationTag layout and line
+ * control.
+ *
+ * Discussion:
+ * The constants kATSUTruncateNone, kATSUTruncateStart,
+ * kATSUTruncateEnd, and kATSUTruncateMiddle represent different
+ * places in the text where glyphs should be replaced with an
+ * elipsis should the text not fit within the width set by the
+ * kATSULineWidthTag line and layout control. The constant
+ * kATSUTruncFeatNoSquishing is special and can be bitwise OR'd with
+ * any of the other constants. It indicates that ATSUI should not
+ * perform negative justification to make the text fit. This can be
+ * desirable for situations such as live resize, to prevent the text
+ * from "wiggling".
+ }
+type ATSULineTruncation = UInt32;
+const
+ kATSUTruncateNone = 0;
+ kATSUTruncateStart = 1;
+ kATSUTruncateEnd = 2;
+ kATSUTruncateMiddle = 3;
+ kATSUTruncateSpecificationMask = $00000007;
+ kATSUTruncFeatNoSquishing = $00000008;
+
+
+{
+ * ATSUStyleLineCountType
+ *
+ * Discussion:
+ * ATSUStyleLineCountType is used to designate how many lines will
+ * be drawn for a given style type. Currently only the underline
+ * and strikethrough styles support this type.
+ }
+type ATSUStyleLineCountType = UInt16;
+const
+ kATSUStyleSingleLineCount = 1;
+ kATSUStyleDoubleLineCount = 2;
+
+
+{
+ * ATSUVerticalCharacterType
+ *
+ * Discussion:
+ * Use these constants along with the kATSUVerticalCharacterTag
+ * layout control to determine whether the vertical or horizontal
+ * forms of glyphs should be used. Note that this is independent of
+ * line rotation.
+ }
+type ATSUVerticalCharacterType = UInt16;
+const
+ kATSUStronglyHorizontal = 0;
+ kATSUStronglyVertical = 1;
+
+
+{
+ * ATSUStyleComparison
+ *
+ * Discussion:
+ * ATSUStyleComparison is an enumeration with four values, and is
+ * used by ATSUCompareStyles() to indicate if the first style
+ * parameter contains as a proper subset, is equal to, or is
+ * contained by the second style parameter.
+ }
+type ATSUStyleComparison = UInt16;
+const
+ kATSUStyleUnequal = 0;
+ kATSUStyleContains = 1;
+ kATSUStyleEquals = 2;
+ kATSUStyleContainedBy = 3;
+
+
+{
+ * ATSUFontFallbackMethod
+ *
+ * Discussion:
+ * ATSUFontFallbackMethod type defines the method by which ATSUI
+ * will try to find an appropriate font for a character if the
+ * assigned font does not contain the needed glyph(s) to represent
+ * it. This affects ATSUMatchFontsToText and font selection during
+ * layout and drawing when ATSUSetTransientFontMatching is set ON.
+ }
+type ATSUFontFallbackMethod = UInt16;
+const
+
+ {
+ * When this constant is specified, all fonts on the system are
+ * searched for substitute glyphs.
+ }
+ kATSUDefaultFontFallbacks = 0;
+
+ {
+ * This constant specifies that only the special last resort font be
+ * used for substitute glyphs.
+ }
+ kATSULastResortOnlyFallback = 1;
+
+ {
+ * This constant specifies that a font list you provide should be
+ * sequentially searched for substitute glyphs before the ATSUI
+ * searches through all available fonts on the system. You specify
+ * this list through the iFonts parameter to the
+ * ATSUSetObjFontFallbacks function.
+ }
+ kATSUSequentialFallbacksPreferred = 2;
+
+ {
+ * This constants specifies that only the font list you provide
+ * should be sequentially searched for substitute glyphs. All other
+ * fonts on the system are ignored, except for the special last
+ * resort font. You specify the list of fonts you want ATSUI to use
+ * by passing it to the iFonts parameter of the
+ * ATSUSetObjFontFallbacks function.
+ }
+ kATSUSequentialFallbacksExclusive = 3;
+
+
+{
+ * 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
+ * maintained flush against the tab stop. A Right tab type
+ * specifies that the right side of affected text is to be
+ * maintained flush against the tab stop. A Center tab type
+ * specifies that the affected text centered about the tab stop. A
+ * Decimal tab type specifies that the affected text will be aligned
+ * such that the decimal character will by flush against the tab
+ * stop. The default decimal character is defined in System
+ * Preferences. A different decimal character can be defined by
+ * using the ATSUAttributeTag kATSULineDecimalTabCharacterTag.
+ }
+
+type ATSUTabType = UInt16;
+const
+ kATSULeftTab = 0;
+ kATSUCenterTab = 1;
+ kATSURightTab = 2;
+ kATSUDecimalTab = 3;
+ kATSUNumberTabTypes = 4;
+
+
+{
+ * ATSUTab
+ *
+ * Discussion:
+ * ATSUTab specifies the position and type of tab stop to be applied
+ * to a ATSUTextLayout set through the ATSUI routine ATSUSetTabArray
+ * and returned through ATSUGetTabArray.
+ }
+type
+ ATSUTab = record
+ tabPosition: ATSUTextMeasurement;
+ tabType: ATSUTabType;
+ end;
+ ATSUTabPtr = ^ATSUTab;
+
+{
+ * ATSURGBAlphaColor
+ *
+ * Discussion:
+ * Use this structure with the kATSURGBAlphaColorTag attribute to
+ * specify color for your text in an ATSUStyle. All values range
+ * from 0.0 to 1.0.
+ }
+type
+ ATSURGBAlphaColor = record
+ red: Float32;
+ green: Float32;
+ blue: Float32;
+ alpha: Float32;
+ end;
+ ATSURGBAlphaColorPtr = ^ATSURGBAlphaColor;
+
+{
+ * GlyphCollection
+ *
+ * Discussion:
+ * GlyphCollection types represent the specific character
+ * collection. If the value is zero, kGlyphCollectionGID, then this
+ * indicates that the glyph value represents the actual glyphID of a
+ * specific font. Adobe collections are based on CID, rather than
+ * glyph ID.
+ }
+
+type GlyphCollection = UInt16;
+const
+ kGlyphCollectionGID = 0;
+ kGlyphCollectionAdobeCNS1 = 1;
+ kGlyphCollectionAdobeGB1 = 2;
+ kGlyphCollectionAdobeJapan1 = 3;
+ kGlyphCollectionAdobeJapan2 = 4;
+ kGlyphCollectionAdobeKorea1 = 5;
+ kGlyphCollectionUnspecified = $FF;
+
+
+{
+ * ATSUGlyphSelector
+ *
+ * Discussion:
+ * ATSUGlyphSelector can direct ATSUI to use a specific glyph
+ * instead of the one that ATSUI normally derives. The glyph can be
+ * specified either as a glyphID (specific to the font used) or CID
+ * from a specfic collection defined by the collection entry.
+ }
+type
+ ATSUGlyphSelector = record
+
+ {
+ * A glyph collection constant. See the definition of GlyphCollection
+ * for possible values for this field.
+ }
+ collection: GlyphCollection;
+
+ {
+ * The glyph ID of the glyph (when collection is
+ * kGlyphCollectionGID). For Adobe glyph collections, this value
+ * represents a CID
+ }
+ glyphID: GlyphID_fix;
+ end;
+ ATSUGlyphSelectorPtr = ^ATSUGlyphSelector;
+
+type ATSUCustomAllocFunc = function( refCon: UnivPtr; howMuch: ByteCount ): Ptr;
+type ATSUCustomFreeFunc = procedure( refCon: UnivPtr; doomedBlock: UnivPtr );
+type ATSUCustomGrowFunc = function( refCon: UnivPtr; oldBlock: UnivPtr; oldSize: ByteCount; newSize: ByteCount ): Ptr;
+
+{
+ * ATSUMemoryCallbacks
+ *
+ * Discussion:
+ * ATSUMemoryCallbacks is a union struct that allows the ATSUI
+ * client to specify a specific heap for ATSUI use or allocation
+ * callbacks of which ATSUI is to use each time ATSUI performs a
+ * memory operation (alloc, grow, free).
+ }
+type
+ ATSUMemoryCallbacks = record
+ case SInt16 of
+ 1: (
+ callbacks: record
+ Alloc: ATSUCustomAllocFunc;
+ Free: ATSUCustomFreeFunc;
+ Grow: ATSUCustomGrowFunc;
+ memoryRefCon: Ptr;
+ end;
+ );
+ 2: (
+ heapToUse: THz;
+ );
+ end;
+ ATSUMemoryCallbacksPtr = ^ATSUMemoryCallbacks;
+
+{
+ * ATSUHeapSpec
+ *
+ * Discussion:
+ * ATSUHeapSpec provides the ATSUI client a means of specifying the
+ * heap from which ATSUI should allocate its dynamic memory or
+ * specifying that ATSUI should use the memory callback provided by
+ * the client.
+ }
+type ATSUHeapSpec = UInt16;
+const
+ kATSUUseCurrentHeap = 0;
+ kATSUUseAppHeap = 1;
+ kATSUUseSpecificHeap = 2;
+ kATSUUseCallbacks = 3;
+
+
+{
+ * ATSUMemorySetting
+ *
+ * Discussion:
+ * ATSUMemorySetting is used to store the results from a
+ * ATSUSetMemoryAlloc or a ATSUGetCurrentMemorySetting call. It can
+ * also be used to change the current ATSUMemorySetting by passing
+ * it into the ATSUSetCurrentMemorySetting call.
+ }
+type
+ ATSUMemorySetting = ^SInt32; { an opaque 32-bit 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
+ * the data before drawing it with ATSUDrawGlyphInfo. These
+ * functions are no longer recommended; see ATSUnicodeDirectAccess.h
+ * for replacement functions.
+ }
+type
+ ATSUGlyphInfo = record
+ glyphID: GlyphID_fix;
+ reserved: UInt16;
+ layoutFlags: UInt32;
+ charIndex: UniCharArrayOffset;
+ style: ATSUStyle;
+ deltaY: Float32;
+ idealX: Float32;
+ screenX: SInt16;
+ caretX: SInt16;
+ end;
+ ATSUGlyphInfoPtr = ^ATSUGlyphInfo;
+
+{
+ * 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
+ * number of glyphs stored in the array glyphs. See the definition
+ * of ATSUGlyphInfo for more information about the data structures
+ * contained in the glyphs array. The ATSUGetGlyphInfo function is
+ * no longer recommended; see ATSUnicodeDirectAccess.h for
+ * replacement functions.
+ }
+type
+ ATSUGlyphInfoArray = record
+ layout: ATSUTextLayout;
+ numGlyphs: ItemCount;
+ glyphs: array[0..0] of ATSUGlyphInfo;
+ end;
+ ATSUGlyphInfoArrayPtr = ^ATSUGlyphInfoArray;
+{*******************************************************************************}
+{ ATSUI highlighting method constants and typedefs }
+{*******************************************************************************}
+
+{
+ * ATSUHighlightMethod
+ *
+ * Discussion:
+ * Use the constants with the function ATSUSetHighlightingMethod to
+ * determine the method of highlighting to use. kInvertHighlighting
+ * will cause ATSUI to perform a simple color inversion on the area
+ * around the text. Although this method requires the least work, it
+ * does not produce the best visual results. kRedrawHighlighting
+ * will cause ATSUI to redraw the text whenever highlighting or
+ * unhighlighting it. This method produces the best visual results,
+ * but it does require you to specify a way for ATSUI to redraw the
+ * background behind the text after an unhighlight operation. See
+ * the definitions of ATSUUnhighlightData, ATSUBackgroundData,
+ * ATSUBackgroundDataType, and RedrawBackgroundProcPtr for more
+ * information.
+ }
+type ATSUHighlightMethod = UInt32;
+const
+ kInvertHighlighting = 0;
+ kRedrawHighlighting = 1;
+
+
+{
+ * ATSUBackgroundDataType
+ *
+ * Discussion:
+ * Use these constants for the dataType field in the
+ * ATSUUnhighlightData structure. kATSUBackgroundColor refers to a
+ * solid color background, while kATSUBackgroundCallback refers to a
+ * redrawing callback function. Note that if you specify
+ * kATSUBackgroundCallback, you must provide a callback function.
+ }
+type ATSUBackgroundDataType = UInt32;
+const
+ kATSUBackgroundColor = 0;
+ kATSUBackgroundCallback = 1;
+
+
+{
+ * ATSUBackgroundColor
+ *
+ * Discussion:
+ * A background color used by ATSUI to redraw the background after a
+ * call to ATSUUnhighlight text when the highlighting method is set
+ * to kRedrawHighlighting. See the definitions of ATSUBackgroundData
+ * and ATSUUnhighlightData for more information.
+ }
+
+type ATSUBackgroundColor = ATSURGBAlphaColor;
+
+{
+ * RedrawBackgroundProcPtr
+ *
+ * Discussion:
+ * RedrawBackgroundProcPtr is a pointer to a client-supplied
+ * callback function (e.g. MyRedrawBackgroundProc) for redrawing
+ * complex backgrounds (and optionally the text as well) that can be
+ * called by ATSUI for highlighting if the client has called
+ * ATSUSetHighlightingMethod with kRedrawHighlighting for the
+ * iMethod parameter. In order for ATSUI to call the client
+ * function, the client must (1) pass a pointer to the client
+ * function to NewRedrawBackgroundUPP() in order to obtain a
+ * RedrawBackgroundUPP, and (2) pass the RedrawBackgroundUPP in the
+ * unhighlightData.backgroundUPP field of the iUnhighlightData
+ * 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,
+ * otherwise it should return true to have ATSUI redraw any text
+ * that needs to be redrawn.
+ }
+type RedrawBackgroundProcPtr = function( iLayout: ATSUTextLayout; iTextOffset: UniCharArrayOffset; iTextLength: UniCharCount; iUnhighlightArea: ATSTrapezoidPtr; iTrapezoidCount: ItemCount ): Boolean;
+// typedef STACK_UPP_TYPE(RedrawBackgroundProcPtr) RedrawBackgroundUPP;
+// Beats me what this translates to. If someone finds out they can tell me and we'll update it
+type RedrawBackgroundUPP = Ptr;
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function NewRedrawBackgroundUPP( userRoutine: RedrawBackgroundProcPtr ): RedrawBackgroundUPP; external name '_NewRedrawBackgroundUPP';
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+procedure DisposeRedrawBackgroundUPP( userUPP: RedrawBackgroundUPP ); external name '_DisposeRedrawBackgroundUPP';
+
+{
+ * 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
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function InvokeRedrawBackgroundUPP( iLayout: ATSUTextLayout; iTextOffset: UniCharArrayOffset; iTextLength: UniCharCount; iUnhighlightArea: ATSTrapezoidPtr; iTrapezoidCount: ItemCount; userUPP: RedrawBackgroundUPP ): Boolean; external name '_InvokeRedrawBackgroundUPP';
+
+
+{
+ * 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,
+ * including the background, when unhighlighting. The two ways of
+ * doing this are by telling ATSUI to (1) use a solid color to
+ * repaint the background (2) use a callback function to repaint the
+ * background. This union provides that information to ATSUI. See
+ * the definitions of ATSUUnhighlightData, RedrawBackgroundProcPtr,
+ * and ATSUSetHighlightingMethod for more information.
+ }
+type
+ ATSUBackgroundData = record
+ case SInt16 of
+ 1: (
+ {
+ * Specifies a color for ATSUI to repaint the background.
+ }
+ backgroundColor: ATSUBackgroundColor;
+ );
+ 2: (
+ {
+ * Specifies a Universal Procedure Pointer for ATSUI to call to
+ * redraw the background.
+ }
+ backgroundUPP: RedrawBackgroundUPP;
+ );
+ end;
+ ATSUBackgroundDataPtr = ^ATSUBackgroundData;
+
+{
+ * 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
+ * needs to be specified. ATSUI will simply higlight text by
+ * performing a color inversion on the area surrounding the test.
+ * However, for best results, the redraw method is perferred. With
+ * this method, ATSUI will redraw text with a new background when
+ * highlighting, and redraw it again when unhighlighting. When using
+ * the redraw method, ATSUI needs to know how to restore the
+ * backround when unhighlighting text. That is where the unhighlight
+ * data comes in. This struct tells ATSUI how to restore the
+ * background after a highlight. There are two methods for
+ * specifying this information to ATSUI. One is by specifying a
+ * solid color, the other by providing a callback for redrawing part
+ * of the background.
+ }
+type
+ ATSUUnhighlightData = record
+
+ {
+ * Determines which method to use for restoring the background after
+ * a highlight; solid color (kATSUBackgroundColor), or drawing
+ * callback (kATSUBackgroundCallback). See also the definition of
+ * ATSUBackgroundDataType.
+ }
+ dataType: ATSUBackgroundDataType;
+
+ {
+ * This union provides the actual data for ATSUI to use when
+ * redrawing the background. See the definition of ATSUBackgroundData
+ * for more information.
+ }
+ unhighlightData: ATSUBackgroundData;
+ end;
+ ATSUUnhighlightDataPtr = ^ATSUUnhighlightData;
+{******************************************************************************}
+{ Other ATSUI constants }
+{******************************************************************************}
+
+{
+ * Summary:
+ * Line direction types
+ *
+ * Discussion:
+ * These constants are used with the kATSULineDirectionTag control
+ * to determine overall line direction.
+ }
+const
+ {
+ * Imposes left-to-right or top-to-bottom dominant direction.
+ }
+ kATSULeftToRightBaseDirection = 0;
+
+ {
+ * Impose right-to-left or bottom-to-top dominant direction.
+ }
+ kATSURightToLeftBaseDirection = 1;
+
+const
+ kATSUStartAlignment = Fract($00000000);
+ kATSUEndAlignment = Fract($40000000);
+ kATSUCenterAlignment = Fract($20000000);
+ kATSUNoJustification = Fract($00000000);
+ kATSUFullJustification = Fract($40000000);
+
+{
+ * Summary:
+ * This constant will be returned from ATSUFindFontFromName if no
+ * valid font can be found. If you pass this constant to
+ * ATSUSetAttributes, it will produce an error.
+ }
+const
+ kATSUInvalidFontID = 0;
+
+
+{
+ * Summary:
+ * Pass this constant to line breaking functions (i.e.,
+ * ATSUBreakLine, ATSUBatchBreakLines) if you have already set a
+ * line width as a layout control via the kATSULineWidthTag
+ * attribute.
+ }
+const
+ kATSUUseLineControlWidth = $7FFFFFFF;
+
+
+{
+ * Summary:
+ * Pass this constant to the iSelector parameter of the
+ * ATSUGetFontFeatureNameCode function if you wish to obtain the
+ * name code for a feature type rather than a feature selector.
+ }
+const
+ kATSUNoSelector = $0000FFFF;
+
+
+{
+ * 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
+ * pass these constants to functions which do not explicity state
+ * they will accept them.
+ }
+const
+
+ {
+ * Refers to the beginning of a text buffer.
+ }
+ kATSUFromTextBeginning = $FFFFFFFF;
+
+ {
+ * Refers to the end of a text buffer.
+ }
+ kATSUToTextEnd = $FFFFFFFF;
+
+ {
+ * Used for bidi cursor movement between paragraphs.
+ }
+ kATSUFromPreviousLayout = $FFFFFFFE;
+
+ {
+ * Used for bidi cursor movement between paragraphs.
+ }
+ kATSUFromFollowingLayout = $FFFFFFFD;
+
+
+{
+ * Summary:
+ * Other convenience constants.
+ }
+const
+
+ {
+ * Pass this constant to functions that require a set of coordinates
+ * (i.e., ATSUDrawText, ATSUHighlightText) if you want ATSUI to use
+ * the current Quickdraw graphics port pen location.
+ }
+ kATSUUseGrafPortPenLoc = $FFFFFFFF;
+
+ {
+ * Pass this constant to functions such as ATSUClearAttributes and
+ * ATSUClearLayoutControls if you wish to clear all settings instead
+ * of a specific array of settings.
+ }
+ kATSUClearAll = $FFFFFFFF;
+
+{unit AppleEvents}
+{
+ File: AppleEvents.p
+
+ Contains: AppleEvent Package Interfaces.
+
+ Version: Technology: System 7.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1989-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{
+ Note: The functions and types for the building and parsing AppleEvent
+ messages has moved to AEDataModel.h
+}
+
+{
+ Note: The functions for interacting with events has moved to AEInteraction.h
+}
+
+{$ALIGN MAC68K}
+
+
+const
+ { Keywords for Apple event parameters }
+ keyDirectObject = $2D2D2D2D (* '----' *);
+ keyErrorNumber = $6572726E (* 'errn' *);
+ keyErrorString = $65727273 (* 'errs' *);
+ keyProcessSerialNumber = $70736E20 (* 'psn ' *); { Keywords for special handlers }
+ keyPreDispatch = $70686163 (* 'phac' *); { preHandler accessor call }
+ keySelectProc = $73656C68 (* 'selh' *); { more selector call }
+ { Keyword for recording }
+ keyAERecorderCount = $72656372 (* 'recr' *); { available only in vers 1.0.1 and greater }
+ { Keyword for version information }
+ keyAEVersion = $76657273 (* 'vers' *); { available only in vers 1.0.1 and greater }
+
+ { Event Class }
+ kCoreEventClass = $61657674 (* 'aevt' *);
+
+ { Event IDÕs }
+ kAEOpenApplication = $6F617070 (* 'oapp' *);
+ kAEOpenDocuments = $6F646F63 (* 'odoc' *);
+ kAEPrintDocuments = $70646F63 (* 'pdoc' *);
+ kAEQuitApplication = $71756974 (* 'quit' *);
+ kAEAnswer = $616E7372 (* 'ansr' *);
+ kAEApplicationDied = $6F626974 (* 'obit' *);
+ kAEShowPreferences = $70726566 (* 'pref' *); { sent by Mac OS X when the user chooses the Preferences item }
+ kAEAutosaveNow = $61736176 (* 'asav' *); { sent by Mac OS X when it is advisable to autosave all the user's documents with uncommitted changes. }
+
+ { Constants for recording }
+ kAEStartRecording = $72656361 (* 'reca' *); { available only in vers 1.0.1 and greater }
+ kAEStopRecording = $72656363 (* 'recc' *); { available only in vers 1.0.1 and greater }
+ kAENotifyStartRecording = $72656331 (* 'rec1' *); { available only in vers 1.0.1 and greater }
+ kAENotifyStopRecording = $72656330 (* 'rec0' *); { available only in vers 1.0.1 and greater }
+ kAENotifyRecording = $72656372 (* 'recr' *); { available only in vers 1.0.1 and greater }
+
+
+ {
+ * AEEventSource is defined as an SInt8 for compatability with pascal.
+ * Important note: keyEventSourceAttr is returned by AttributePtr as a typeShortInteger.
+ * Be sure to pass at least two bytes of storage to AEGetAttributePtr - the result can be
+ * compared directly against the following enums.
+ }
+
+type
+ AEEventSource = SInt8;
+const
+ kAEUnknownSource = 0;
+ kAEDirectCall = 1;
+ kAESameProcess = 2;
+ kAELocalProcess = 3;
+ kAERemoteProcess = 4;
+
+ { *************************************************************************
+ 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:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEInstallEventHandler(theAEEventClass: AEEventClass; theAEEventID: AEEventID; handler: AEEventHandlerUPP; handlerRefcon: SInt32; isSysHandler: boolean): OSErr; external name '_AEInstallEventHandler';
+{
+ * AERemoveEventHandler()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AERemoveEventHandler(theAEEventClass: AEEventClass; theAEEventID: AEEventID; handler: AEEventHandlerUPP; isSysHandler: boolean): OSErr; external name '_AERemoveEventHandler';
+{
+ * AEGetEventHandler()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEGetEventHandler(theAEEventClass: AEEventClass; theAEEventID: AEEventID; var handler: AEEventHandlerUPP; var handlerRefcon: SInt32; isSysHandler: boolean): OSErr; external name '_AEGetEventHandler';
+{*************************************************************************
+ These calls are used to set up and modify special hooks into the
+ AppleEvent manager.
+*************************************************************************}
+{
+ * AEInstallSpecialHandler()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEInstallSpecialHandler(functionClass: AEKeyword; handler: AEEventHandlerUPP; isSysHandler: boolean): OSErr; external name '_AEInstallSpecialHandler';
+{
+ * AERemoveSpecialHandler()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AERemoveSpecialHandler(functionClass: AEKeyword; handler: AEEventHandlerUPP; isSysHandler: boolean): OSErr; external name '_AERemoveSpecialHandler';
+{
+ * AEGetSpecialHandler()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEGetSpecialHandler(functionClass: AEKeyword; var handler: AEEventHandlerUPP; isSysHandler: boolean): OSErr; external name '_AEGetSpecialHandler';
+{*************************************************************************
+ This call was added in version 1.0.1. If called with the keyword
+ keyAERecorderCount ('recr'), the number of recorders that are
+ currently active is returned in 'result'
+ (available only in vers 1.0.1 and greater).
+*************************************************************************}
+{
+ * AEManagerInfo()
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.2
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEManagerInfo(keyWord: AEKeyword; var result: SInt32): OSErr; external name '_AEManagerInfo';
+
+{
+ AERemoteProcessResolver:
+
+ These calls subsume the functionality of using the PPCToolbox on Mac
+ OS 9 to locate processes on remote computers. (PPCToolbox is not
+ part of Carbon.) These calls are supported on Mac OS X 10.3 or
+ later.
+
+ The model is to create a resolver for a particular URL and schedule
+ it on a CFRunLoop to retrieve the results asynchronously. If
+ synchronous behavior is desired, just call
+ AERemoteProcessResolverGetProcesses to get the array; the call will
+ block until the request is completed.
+
+ A resolver can only be used once; once it has fetched the data or
+ gotten an error it can no longer be scheduled.
+
+ The data obtained from the resolver is a CFArrayRef of
+ CFDictionaryRef objects. Each dictionary contains the URL of the
+ remote application and its human readable name.
+}
+
+{
+ * kAERemoteProcessURLKey
+ *
+ * Discussion:
+ * the full URL to this application, a CFURLRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kAERemoteProcessURLKey: CFStringRef; external name '_kAERemoteProcessURLKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ * kAERemoteProcessNameKey
+ *
+ * Discussion:
+ * the visible name to this application, in the localization
+ * supplied by the server, a CFStringRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kAERemoteProcessNameKey: CFStringRef; external name '_kAERemoteProcessNameKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ * kAERemoteProcessUserIDKey
+ *
+ * Discussion:
+ * the userid of this application, if available. If present, a
+ * CFNumberRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kAERemoteProcessUserIDKey: CFStringRef; external name '_kAERemoteProcessUserIDKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ * kAERemoteProcessProcessIDKey
+ *
+ * Discussion:
+ * the process id of this application, if available. If present, a
+ * CFNumberRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kAERemoteProcessProcessIDKey: CFStringRef; external name '_kAERemoteProcessProcessIDKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{
+ * AERemoteProcessResolverContext
+ *
+ * Discussion:
+ * An optional context parameter for asynchronous resolution. The
+ * context is copied and the info pointer retained. When the
+ * callback is made, the info pointer is passed to the callback.
+ }
+type
+ AERemoteProcessResolverContext = record
+{
+ * set to zero (0)
+ }
+ version: CFIndex;
+
+ {
+ * info pointer to be passed to the callback
+ }
+ info: UnivPtr;
+
+ {
+ * callback made on the info pointer. This field may be NULL.
+ }
+ retain: CFAllocatorRetainCallBack;
+
+ {
+ * callback made on the info pointer. This field may be NULL.
+ }
+ release: CFAllocatorReleaseCallBack;
+
+ {
+ * callback made on the info pointer. This field may be NULL.
+ }
+ copyDescription: CFAllocatorCopyDescriptionCallBack;
+ end;
+
+ AERemoteProcessResolverContextPtr = ^AERemoteProcessResolverContext; { when a var xx: AERemoteProcessResolverContext parameter can be nil, it is changed to xx: AERemoteProcessResolverContextPtr }
+
+{
+ * AERemoteProcessResolverRef
+ *
+ * Discussion:
+ * An opaque reference to an object that encapsulates the mechnanism
+ * by which a list of processes running on a remote machine are
+ * obtained. Created by AECreateRemoteProcessResolver, and must be
+ * disposed of by AEDisposeRemoteProcessResolver. A
+ * AERemoteProcessResolverRef is not a CFType.
+ }
+type
+ AERemoteProcessResolverRef = ^SInt32; { an opaque 32-bit type }
+{
+ * AECreateRemoteProcessResolver()
+ *
+ * Discussion:
+ * Create a Remote Process List Resolver object. The allocator is
+ * used for any CoreFoundation types created or returned by this
+ * API. The resulting object can be scheduled on a run loop, or
+ * queried synchronously. Once the object has retreived results
+ * from the server, or got an error doing so, it will not re-fetch
+ * the data. To retrieve a new list of processes, create a new
+ * instance of this object.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * allocator:
+ * a CFAllocatorRef to use when creating CFTypes
+ *
+ * url:
+ * a CFURL identifying the remote host and port.
+ *
+ * Result:
+ * a AECreateRemoteProcessResolverRef, which must be disposed of
+ * with AEDisposeRemoteProcessResolver.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function AECreateRemoteProcessResolver( allocator: CFAllocatorRef; url: CFURLRef ): AERemoteProcessResolverRef; external name '_AECreateRemoteProcessResolver';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * AEDisposeRemoteProcessResolver()
+ *
+ * Discussion:
+ * Disposes of a AERemoteProcessResolverRef. If this resolver is
+ * currently scheduled on a run loop, it is unscheduled. In this
+ * case, the asynchronous callback will not be executed.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * ref:
+ * The AERemoteProcessResolverRef to dispose
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+procedure AEDisposeRemoteProcessResolver( ref: AERemoteProcessResolverRef ); external name '_AEDisposeRemoteProcessResolver';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * AERemoteProcessResolverGetProcesses()
+ *
+ * Discussion:
+ * Returns a CFArrayRef containing CFDictionary objects containing
+ * information about processses running on a remote machine. If the
+ * result array is NULL, the query failed and the error out
+ * parameter will contain information about the failure. If the
+ * resolver had not been previously scheduled for execution, this
+ * call will block until the resulting array is available or an
+ * error occurs. If the resolver had been scheduled but had not yet
+ * completed fetching the array, this call will block until the
+ * resolver does complete. The array returned is owned by the
+ * resolver, so callers must retain it before disposing of the
+ * resolver object itself.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * ref:
+ * The AERemoteProcessResolverRef to query
+ *
+ * outError:
+ * If the result is NULL, outError will contain a CFStreamError
+ * with information about the type of failure
+ *
+ * Result:
+ * a CFArray of CFDictionary objects containing information about
+ * the remote applications.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function AERemoteProcessResolverGetProcesses( ref: AERemoteProcessResolverRef; var outError: CFStreamError ): CFArrayRef; external name '_AERemoteProcessResolverGetProcesses';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * AERemoteProcessResolverCallback
+ *
+ * Discussion:
+ * A callback made when the asynchronous execution of a resolver
+ * completes, either due to success or failure. The data itself
+ * should be obtained with AERemoteProcessResolverGetProcesses.
+ }
+type
+ AERemoteProcessResolverCallback = procedure( ref: AERemoteProcessResolverRef; info: UnivPtr );
+{
+ * AERemoteProcessResolverScheduleWithRunLoop()
+ *
+ * Discussion:
+ * Schedules a resolver for execution on a given runloop in a given
+ * mode. The resolver will move through various internal states as
+ * long as the specified run loop is run. When the resolver
+ * completes, either with success or an error condition, the
+ * callback is executed. There is no explicit unschedule of the
+ * resolver; you must dispose of it to remove it from the run loop.
+ *
+ * Mac OS X threading:
+ * Thread safe since version 10.3
+ *
+ * Parameters:
+ *
+ * ref:
+ * The AERemoteProcessResolverRef to scheduile
+ *
+ * runLoop:
+ * a CFRunLoop
+ *
+ * runLoopMode:
+ * a CFString specifying the run loop mode
+ *
+ * callback:
+ * a callback to be executed when the reolver completes
+ *
+ * ctx:
+ * a AERemoteProcessResolverContext. If this parameter is not
+ * NULL, the info field of this structure will be passed to the
+ * callback (otherwise, the callback info parameter will
+ * explicitly be NULL.)
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+procedure AERemoteProcessResolverScheduleWithRunLoop( ref: AERemoteProcessResolverRef; runLoop: CFRunLoopRef; runLoopMode: CFStringRef; callback: AERemoteProcessResolverCallback; {const} ctx: AERemoteProcessResolverContextPtr { can be NULL } ); external name '_AERemoteProcessResolverScheduleWithRunLoop';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{$ALIGN MAC68K}
+
+
+{unit Drag}
+{
+ File: HIToolbox/Drag.h
+
+ Contains: Drag and Drop Interfaces.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1992-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ DRAG MANAGER DATA TYPES
+ _________________________________________________________________________________________________________
+}
+type
+ DragRef = ^SInt32; { an opaque 32-bit type }
+ DragRefPtr = ^DragRef; { when a var xx:DragRef parameter can be nil, it is changed to xx: DragRefPtr }
+type
+ DragItemRef = UInt32;
+type
+ FlavorType = OSType;
+{
+ _________________________________________________________________________________________________________
+
+ ¥ DRAG ATTRIBUTES
+ _________________________________________________________________________________________________________
+}
+type
+ DragAttributes = UInt32;
+const
+ kDragHasLeftSenderWindow = 1 shl 0; { drag has left the source window since TrackDrag}
+ kDragInsideSenderApplication = 1 shl 1; { drag is occurring within the sender application}
+ kDragInsideSenderWindow = 1 shl 2; { drag is occurring within the sender window}
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ DRAG BEHAVIORS
+ _________________________________________________________________________________________________________
+}
+type
+ DragBehaviors = UInt32;
+const
+ kDragBehaviorNone = 0;
+ kDragBehaviorZoomBackAnimation = 1 shl 0; { do zoomback animation for failed drags (normally enabled).}
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ DRAG IMAGE FLAGS
+ _________________________________________________________________________________________________________
+}
+
+{
+ * DragImageFlags
+ *
+ * Summary:
+ * Parameters to SetDragImage and SetDragImageWithCGImage.
+ }
+type
+ DragImageFlags = UInt32;
+const
+{
+ * Indicates that the outline region passed to TrackDrag should be
+ * drawn onscreen, in addition to the translucent drag image.
+ }
+ kDragRegionAndImage = 1 shl 4;
+
+ {
+ * Indicates that the image and offset being passed in are already at
+ * device resolution, and the image should be drawn as-is. If this
+ * option is not specified, the image will be scaled according to the
+ * user's current scaling factor. Available in Mac OS X 10.4 and
+ * later.
+ }
+ kDragDoNotScaleImage = 1 shl 5;
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ DRAG IMAGE TRANSLUCENCY LEVELS
+ _________________________________________________________________________________________________________
+}
+
+const
+ kDragStandardTranslucency = 0; { 65% image translucency (standard)}
+ kDragDarkTranslucency = 1; { 50% image translucency}
+ kDragDarkerTranslucency = 2; { 25% image translucency}
+ kDragOpaqueTranslucency = 3; { 0% image translucency (opaque)}
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ DRAG DRAWING PROCEDURE MESSAGES
+ _________________________________________________________________________________________________________
+}
+
+type
+ DragRegionMessage = SInt16;
+const
+ kDragRegionBegin = 1; { initialize drawing}
+ kDragRegionDraw = 2; { draw drag feedback}
+ kDragRegionHide = 3; { hide drag feedback}
+ kDragRegionIdle = 4; { drag feedback idle time}
+ kDragRegionEnd = 5; { end of drawing}
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ ZOOM ACCELERATION
+ _________________________________________________________________________________________________________
+}
+
+type
+ ZoomAcceleration = SInt16;
+const
+ kZoomNoAcceleration = 0; { use linear interpolation}
+ kZoomAccelerate = 1; { ramp up step size}
+ kZoomDecelerate = 2; { ramp down step size}
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ FLAVOR FLAGS
+ _________________________________________________________________________________________________________
+}
+
+type
+ FlavorFlags = UInt32;
+const
+ flavorSenderOnly = 1 shl 0; { flavor is available to sender only}
+ flavorSenderTranslated = 1 shl 1; { flavor is translated by sender}
+ flavorNotSaved = 1 shl 2; { flavor should not be saved}
+ flavorSystemTranslated = 1 shl 8; { flavor is translated by system}
+ flavorDataPromised = 1 shl 9; { flavor data is promised by sender}
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ FILE SYSTEM CONSTANTS
+ _________________________________________________________________________________________________________
+}
+
+const
+ kDragFlavorTypeHFS = $68667320 (* 'hfs ' *); { flavor type for HFS data}
+ kDragFlavorTypePromiseHFS = $70686673 (* 'phfs' *); { flavor type for promised HFS data}
+ flavorTypeHFS = kDragFlavorTypeHFS; { old name}
+ flavorTypePromiseHFS = kDragFlavorTypePromiseHFS; { old name}
+
+const
+ kDragPromisedFlavorFindFile = $72576D31 (* 'rWm1' *); { promisedFlavor value for Find File}
+ kDragPromisedFlavor = $66737350 (* 'fssP' *); { promisedFlavor value for everything else}
+
+const
+ kDragPseudoCreatorVolumeOrDirectory = $4D414353 (* 'MACS' *); { "creator code" for volume or directory}
+ kDragPseudoFileTypeVolume = $6469736B (* 'disk' *); { "file type" for volume}
+ kDragPseudoFileTypeDirectory = $666F6C64 (* 'fold' *); { "file type" for directory}
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ SPECIAL FLAVORS
+ _________________________________________________________________________________________________________
+}
+
+const
+ flavorTypeDirectory = $64697279 (* 'diry' *); { flavor type for AOCE directories}
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ FLAVORS FOR FINDER 8.0 AND LATER
+ _________________________________________________________________________________________________________
+}
+
+const
+ kFlavorTypeClippingName = $636C6E6D (* 'clnm' *); { name hint for clipping file (preferred over 'clfn')}
+ kFlavorTypeClippingFilename = $636C666E (* 'clfn' *); { name for clipping file}
+ kFlavorTypeUnicodeClippingName = $75636C6E (* 'ucln' *); { unicode name hint for clipping file (preferred over 'uclf')}
+ kFlavorTypeUnicodeClippingFilename = $75636C66 (* 'uclf' *); { unicode name for clipping file}
+ kFlavorTypeDragToTrashOnly = $66647474 (* 'fdtt' *); { for apps that want to allow dragging private data to the trash}
+ kFlavorTypeFinderNoTrackingBehavior = $666E7462 (* 'fntb' *); { Finder completely ignores any drag containing this flavor}
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ DRAG TRACKING HANDLER MESSAGES
+ _________________________________________________________________________________________________________
+}
+
+type
+ DragTrackingMessage = SInt16;
+const
+ kDragTrackingEnterHandler = 1; { drag has entered handler}
+ kDragTrackingEnterWindow = 2; { drag has entered window}
+ kDragTrackingInWindow = 3; { drag is moving within window}
+ kDragTrackingLeaveWindow = 4; { drag has exited window}
+ kDragTrackingLeaveHandler = 5; { drag has exited handler}
+
+{
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ ¥ STANDARD DROP LOCATIONS
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+
+
+{
+ * Summary:
+ * Standard Drop Location constants
+ *
+ * Discussion:
+ * The following constants define common "meta" drop locations.
+ }
+const
+{
+ * The drop location was in the trash. This is set when a drag is
+ * dropped on the trash icon. Setting this standard drop location
+ * sets the traditional drop location to an alias to the trash folder
+ * automatically.
+ }
+ kDragStandardDropLocationTrash = $74727368 (* 'trsh' *);
+
+ {
+ * The receiver did not specify a drop lcoation. This is the default.
+ }
+ kDragStandardDropLocationUnknown = $756E6B6E (* 'unkn' *);
+
+type
+ StandardDropLocation = OSType;
+{
+ _________________________________________________________________________________________________________
+
+ ¥ DRAG ACTIONS
+ _________________________________________________________________________________________________________
+}
+
+{
+ * Summary:
+ * Drag Action constants
+ *
+ * Discussion:
+ * The following constants define, in a general way, what actions a
+ * drag should or has performed. Some drag actions enforce a mode
+ * of operation while others are flexible suggestions. These
+ * constants are used in conjunction with the
+ * Get/SetDragAllowableActions() and Get/SetDragDropAction() APIs.
+ * Adopting the Drag Action APIs increases compatability with the
+ * Cocoa drag operation model.
+ }
+const
+{
+ * Suggests nothing should be/was done with the data in a drag. When
+ * set as an allowable action for remote drags, the drag will not be
+ * sent to apps other than the sender.
+ }
+ kDragActionNothing = 0;
+
+ {
+ * Suggests the data contained within the drag can be/was copied.
+ }
+ kDragActionCopy = 1;
+
+ {
+ * Suggests the data contained within the drag can be/is shared.
+ }
+ kDragActionAlias = 1 shl 1;
+
+ {
+ * Suggests the drag action is can be defined by the drag destination
+ * or was not defined by the drag destination.
+ }
+ kDragActionGeneric = 1 shl 2;
+
+ {
+ * Suggests the drag action should be negotiated privately between
+ * the drag source and destination.
+ }
+ kDragActionPrivate = 1 shl 3;
+
+ {
+ * Description forthcoming.
+ }
+ kDragActionMove = 1 shl 4;
+
+ {
+ * Description forthcoming.
+ }
+ kDragActionDelete = 1 shl 5;
+
+ {
+ * All of the above drag actions are allowed.
+ }
+ kDragActionAll = $FFFFFFFF;
+
+type
+ DragActions = UInt32;
+{
+ _________________________________________________________________________________________________________
+
+ ¥ HFS FLAVORS
+ _________________________________________________________________________________________________________
+}
+type
+ HFSFlavorPtr = ^HFSFlavor;
+ HFSFlavor = record
+ fileType: OSType; { file type }
+ fileCreator: OSType; { file creator }
+ fdFlags: UInt16; { Finder flags }
+ fileSpec: FSSpec; { file system specification }
+ end;
+type
+ PromiseHFSFlavorPtr = ^PromiseHFSFlavor;
+ PromiseHFSFlavor = record
+ fileType: OSType; { file type }
+ fileCreator: OSType; { file creator }
+ fdFlags: UInt16; { Finder flags }
+ promisedFlavor: FlavorType; { promised flavor containing an FSSpec }
+ end;
+{
+ _________________________________________________________________________________________________________
+
+ ¥ APPLICATION-DEFINED DRAG HANDLER ROUTINES
+ _________________________________________________________________________________________________________
+}
+type
+ DragTrackingHandlerProcPtr = function( message: DragTrackingMessage; theWindow: WindowRef; handlerRefCon: UnivPtr; theDrag: DragRef ): OSErr;
+type
+ DragReceiveHandlerProcPtr = function( theWindow: WindowRef; handlerRefCon: UnivPtr; theDrag: DragRef ): OSErr;
+type
+ DragTrackingHandlerUPP = DragTrackingHandlerProcPtr;
+type
+ DragReceiveHandlerUPP = DragReceiveHandlerProcPtr;
+{
+ * NewDragTrackingHandlerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewDragTrackingHandlerUPP( userRoutine: DragTrackingHandlerProcPtr ): DragTrackingHandlerUPP; external name '_NewDragTrackingHandlerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDragReceiveHandlerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewDragReceiveHandlerUPP( userRoutine: DragReceiveHandlerProcPtr ): DragReceiveHandlerUPP; external name '_NewDragReceiveHandlerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDragTrackingHandlerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeDragTrackingHandlerUPP( userUPP: DragTrackingHandlerUPP ); external name '_DisposeDragTrackingHandlerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDragReceiveHandlerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeDragReceiveHandlerUPP( userUPP: DragReceiveHandlerUPP ); external name '_DisposeDragReceiveHandlerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDragTrackingHandlerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeDragTrackingHandlerUPP( message: DragTrackingMessage; theWindow: WindowRef; handlerRefCon: UnivPtr; theDrag: DragRef; userUPP: DragTrackingHandlerUPP ): OSErr; external name '_InvokeDragTrackingHandlerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDragReceiveHandlerUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeDragReceiveHandlerUPP( theWindow: WindowRef; handlerRefCon: UnivPtr; theDrag: DragRef; userUPP: DragReceiveHandlerUPP ): OSErr; external name '_InvokeDragReceiveHandlerUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ APPLICATION-DEFINED ROUTINES
+ _________________________________________________________________________________________________________
+}
+type
+ DragSendDataProcPtr = function( theType: FlavorType; dragSendRefCon: UnivPtr; theItemRef: DragItemRef; theDrag: DragRef ): OSErr;
+type
+ DragInputProcPtr = function( var mouse: Point; var modifiers: SInt16; dragInputRefCon: UnivPtr; theDrag: DragRef ): OSErr;
+type
+ DragDrawingProcPtr = function( message: DragRegionMessage; showRegion: RgnHandle; showOrigin: Point; hideRegion: RgnHandle; hideOrigin: Point; dragDrawingRefCon: UnivPtr; theDrag: DragRef ): OSErr;
+type
+ DragSendDataUPP = DragSendDataProcPtr;
+type
+ DragInputUPP = DragInputProcPtr;
+type
+ DragDrawingUPP = DragDrawingProcPtr;
+{
+ * NewDragSendDataUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewDragSendDataUPP( userRoutine: DragSendDataProcPtr ): DragSendDataUPP; external name '_NewDragSendDataUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDragInputUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewDragInputUPP( userRoutine: DragInputProcPtr ): DragInputUPP; external name '_NewDragInputUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDragDrawingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewDragDrawingUPP( userRoutine: DragDrawingProcPtr ): DragDrawingUPP; external name '_NewDragDrawingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDragSendDataUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeDragSendDataUPP( userUPP: DragSendDataUPP ); external name '_DisposeDragSendDataUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDragInputUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeDragInputUPP( userUPP: DragInputUPP ); external name '_DisposeDragInputUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDragDrawingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeDragDrawingUPP( userUPP: DragDrawingUPP ); external name '_DisposeDragDrawingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDragSendDataUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeDragSendDataUPP( theType: FlavorType; dragSendRefCon: UnivPtr; theItemRef: DragItemRef; theDrag: DragRef; userUPP: DragSendDataUPP ): OSErr; external name '_InvokeDragSendDataUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDragInputUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeDragInputUPP( var mouse: Point; var modifiers: SInt16; dragInputRefCon: UnivPtr; theDrag: DragRef; userUPP: DragInputUPP ): OSErr; external name '_InvokeDragInputUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDragDrawingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeDragDrawingUPP( message: DragRegionMessage; showRegion: RgnHandle; showOrigin: Point; hideRegion: RgnHandle; hideOrigin: Point; dragDrawingRefCon: UnivPtr; theDrag: DragRef; userUPP: DragDrawingUPP ): OSErr; external name '_InvokeDragDrawingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ INSTALLING AND REMOVING HANDLERS API'S
+ _________________________________________________________________________________________________________
+}
+
+{
+ * InstallTrackingHandler()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function InstallTrackingHandler( trackingHandler: DragTrackingHandlerUPP; theWindow: WindowRef; handlerRefCon: UnivPtr ): OSErr; external name '_InstallTrackingHandler';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * InstallReceiveHandler()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function InstallReceiveHandler( receiveHandler: DragReceiveHandlerUPP; theWindow: WindowRef; handlerRefCon: UnivPtr ): OSErr; external name '_InstallReceiveHandler';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RemoveTrackingHandler()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function RemoveTrackingHandler( trackingHandler: DragTrackingHandlerUPP; theWindow: WindowRef ): OSErr; external name '_RemoveTrackingHandler';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RemoveReceiveHandler()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function RemoveReceiveHandler( receiveHandler: DragReceiveHandlerUPP; theWindow: WindowRef ): OSErr; external name '_RemoveReceiveHandler';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ CREATING & DISPOSING
+ _________________________________________________________________________________________________________
+}
+
+{
+ * NewDrag()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function NewDrag( var theDrag: DragRef ): OSErr; external name '_NewDrag';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DisposeDrag()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function DisposeDrag( theDrag: DragRef ): OSErr; external name '_DisposeDrag';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ DRAG PASTEBOARD
+ _________________________________________________________________________________________________________
+}
+
+{
+ * NewDragWithPasteboard()
+ *
+ * Discussion:
+ * Creates a new Drag reference containing the pasteboard reference
+ * provided.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPasteboard:
+ * A pasteboard created by the drag sender for use with the drag.
+ * Items may be added to the pasteboard via the Pasteboard Manager
+ * API either before or after this routine is called. It is still
+ * possible to add data via the Drag Manager API, but only after
+ * this routine is called. It is the drag sender's responsibility
+ * to clear the pasteboard before adding items. It is also the
+ * drag sender's responsibility to release the pasteboard. This
+ * may be done at any time after this routine is called. The
+ * pasteboard is retained by the Drag Manager for the duration of
+ * the drag.
+ *
+ * outDrag:
+ * A drag reference which receives the newly created drag.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDragWithPasteboard( inPasteboard: PasteboardRef; var outDrag: DragRef ): OSStatus; external name '_NewDragWithPasteboard';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * GetDragPasteboard()
+ *
+ * Discussion:
+ * Returns the pasteboard reference contained within the provided
+ * drag reference. This routine may be called by a drag sender or
+ * receiver at any point after a valid drag reference has been
+ * created/received.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrag:
+ * The drag reference containing the requested pasteboard.
+ *
+ * outPasteboard:
+ * A pasteboard reference which receives the pasteboard contained
+ * by the drag.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDragPasteboard( inDrag: DragRef; var outPasteboard: PasteboardRef ): OSStatus; external name '_GetDragPasteboard';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ ADDING DRAG ITEM FLAVORS
+ _________________________________________________________________________________________________________
+}
+
+{
+ The method for setting Drag Manager promises differs from that for Scrap Manger promises. This chart
+ describes the method for setting drag promises via AddDragItemFlavor().
+
+ dataPtr dataSize result
+ pointer value actual data size The data of size dataSize pointed to by dataPtr is added to the drag.
+ NULL ignored A promise is placed on the drag.
+}
+{
+ * AddDragItemFlavor()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function AddDragItemFlavor( theDrag: DragRef; theItemRef: DragItemRef; theType: FlavorType; dataPtr: {const} UnivPtr; dataSize: Size; theFlags: FlavorFlags ): OSErr; external name '_AddDragItemFlavor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDragItemFlavorData()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function SetDragItemFlavorData( theDrag: DragRef; theItemRef: DragItemRef; theType: FlavorType; dataPtr: {const} UnivPtr; dataSize: Size; dataOffset: UInt32 ): OSErr; external name '_SetDragItemFlavorData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ PROVIDING CALLBACK PROCEDURES
+ _________________________________________________________________________________________________________
+}
+
+{
+ * SetDragSendProc()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function SetDragSendProc( theDrag: DragRef; sendProc: DragSendDataUPP; dragSendRefCon: UnivPtr ): OSErr; external name '_SetDragSendProc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDragInputProc()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function SetDragInputProc( theDrag: DragRef; inputProc: DragInputUPP; dragInputRefCon: UnivPtr ): OSErr; external name '_SetDragInputProc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDragDrawingProc()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function SetDragDrawingProc( theDrag: DragRef; drawingProc: DragDrawingUPP; dragDrawingRefCon: UnivPtr ): OSErr; external name '_SetDragDrawingProc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ SETTING THE DRAG IMAGE
+ _________________________________________________________________________________________________________
+}
+
+{
+ * SetDragImageWithCGImage()
+ *
+ * Discussion:
+ * Used by the sender of the drag to set the image, in CGImage
+ * format, to be displayed as user feedback during the drag. This
+ * API may be called at any point during the drag to update the
+ * image.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrag:
+ * The drag reference for which the image will be displayed.
+ *
+ * inCGImage:
+ * The CGImageRef for the image to be displayed during the drag.
+ * The image is retained internally by the Drag Manager for the
+ * duration of the drag so it may be released by the client
+ * immediately after setting.
+ *
+ * inImageOffsetPt:
+ * A pointer to the offset from the mouse to the upper left of the
+ * image (normally expressed in negative values). This differs
+ * from the usage of the offset passed to SetDragImage(). Here,
+ * an offset of ( -30, -30 ) will center a 60x60 pixel image on
+ * the drag mouse.
+ *
+ * inImageFlags:
+ * The flags determining image drawing during the drag.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+function SetDragImageWithCGImage( inDrag: DragRef; inCGImage: CGImageRef; const (*var*) inImageOffsetPt: HIPoint; inImageFlags: DragImageFlags ): OSStatus; external name '_SetDragImageWithCGImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ ALTERING THE BEHAVIOR OF A DRAG
+ _________________________________________________________________________________________________________
+}
+{
+ * ChangeDragBehaviors()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 9.0 and later
+ }
+function ChangeDragBehaviors( theDrag: DragRef; inBehaviorsToSet: DragBehaviors; inBehaviorsToClear: DragBehaviors ): OSErr; external name '_ChangeDragBehaviors';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ PERFORMING A DRAG
+ _________________________________________________________________________________________________________
+}
+{
+ * TrackDrag()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function TrackDrag( theDrag: DragRef; const (*var*) theEvent: EventRecord; theRegion: RgnHandle ): OSErr; external name '_TrackDrag';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ GETTING DRAG ITEM INFORMATION
+ _________________________________________________________________________________________________________
+}
+
+{
+ * CountDragItems()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function CountDragItems( theDrag: DragRef; var numItems: UInt16 ): OSErr; external name '_CountDragItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDragItemReferenceNumber()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function GetDragItemReferenceNumber( theDrag: DragRef; index: UInt16; var theItemRef: DragItemRef ): OSErr; external name '_GetDragItemReferenceNumber';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CountDragItemFlavors()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function CountDragItemFlavors( theDrag: DragRef; theItemRef: DragItemRef; var numFlavors: UInt16 ): OSErr; external name '_CountDragItemFlavors';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetFlavorType()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function GetFlavorType( theDrag: DragRef; theItemRef: DragItemRef; index: UInt16; var theType: FlavorType ): OSErr; external name '_GetFlavorType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetFlavorFlags()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function GetFlavorFlags( theDrag: DragRef; theItemRef: DragItemRef; theType: FlavorType; var theFlags: FlavorFlags ): OSErr; external name '_GetFlavorFlags';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetFlavorDataSize()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function GetFlavorDataSize( theDrag: DragRef; theItemRef: DragItemRef; theType: FlavorType; var dataSize: Size ): OSErr; external name '_GetFlavorDataSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetFlavorData()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function GetFlavorData( theDrag: DragRef; theItemRef: DragItemRef; theType: FlavorType; dataPtr: UnivPtr; var dataSize: Size; dataOffset: UInt32 ): OSErr; external name '_GetFlavorData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ DRAG ITEM BOUNDS
+ _________________________________________________________________________________________________________
+}
+
+{
+ * GetDragItemBounds()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function GetDragItemBounds( theDrag: DragRef; theItemRef: DragItemRef; var itemBounds: Rect ): OSErr; external name '_GetDragItemBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDragItemBounds()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function SetDragItemBounds( theDrag: DragRef; theItemRef: DragItemRef; const (*var*) itemBounds: Rect ): OSErr; external name '_SetDragItemBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ DROP LOCATIONS
+ _________________________________________________________________________________________________________
+}
+
+{
+ * GetDropLocation()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function GetDropLocation( theDrag: DragRef; var dropLocation: AEDesc ): OSErr; external name '_GetDropLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDropLocation()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function SetDropLocation( theDrag: DragRef; const (*var*) dropLocation: AEDesc ): OSErr; external name '_SetDropLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ STANDARD DROP LOCATIONS
+ _________________________________________________________________________________________________________
+}
+{
+ * GetStandardDropLocation()
+ *
+ * Discussion:
+ * Gets the standard drop location that was set by the receiver of
+ * the drag.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * theDrag:
+ * The drag reference from which to retrieve the allowable drag
+ * actions.
+ *
+ * outDropLocation:
+ * A pointer to the standard drop location, set by the receiver,
+ * representing the location where the drag was dropped.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetStandardDropLocation( theDrag: DragRef; var outDropLocation: StandardDropLocation ): OSStatus; external name '_GetStandardDropLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * SetStandardDropLocation()
+ *
+ * Discussion:
+ * Used by the receiver of the drag to set the standard drop
+ * location.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * theDrag:
+ * The drag reference from which to retrieve the allowable drag
+ * actions.
+ *
+ * dropLocation:
+ * The standard drop location representing the location where the
+ * drag was dropped.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function SetStandardDropLocation( theDrag: DragRef; dropLocation: StandardDropLocation ): OSStatus; external name '_SetStandardDropLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ GETTING INFORMATION ABOUT A DRAG
+ _________________________________________________________________________________________________________
+}
+
+{
+ * GetDragAttributes()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function GetDragAttributes( theDrag: DragRef; var flags: DragAttributes ): OSErr; external name '_GetDragAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDragMouse()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function GetDragMouse( theDrag: DragRef; var mouse: Point; var globalPinnedMouse: Point ): OSErr; external name '_GetDragMouse';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDragMouse()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function SetDragMouse( theDrag: DragRef; globalPinnedMouse: Point ): OSErr; external name '_SetDragMouse';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDragOrigin()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function GetDragOrigin( theDrag: DragRef; var globalInitialMouse: Point ): OSErr; external name '_GetDragOrigin';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDragModifiers()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function GetDragModifiers( theDrag: DragRef; var modifiers: SInt16; var mouseDownModifiers: SInt16; var mouseUpModifiers: SInt16 ): OSErr; external name '_GetDragModifiers';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ ACCESSING DRAG ACTIONS
+ _________________________________________________________________________________________________________
+}
+
+{
+ * GetDragAllowableActions()
+ *
+ * Discussion:
+ * Gets the actions the drag sender has allowed the receiver to
+ * perform. These are not requirements, but they highly suggested
+ * actions which allows the drag receiver to improve harmony across
+ * the system. The allowable actions received are always those
+ * local to the caller's process.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * theDrag:
+ * The drag reference from which to retreive the allowable drag
+ * actions.
+ *
+ * outActions:
+ * A pointer to receive the field of allowable drag actions.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDragAllowableActions( theDrag: DragRef; var outActions: DragActions ): OSStatus; external name '_GetDragAllowableActions';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ * SetDragAllowableActions()
+ *
+ * Discussion:
+ * Sets the actions the receiver of the drag is allowed to perform.
+ * These are not requirements, but they highly suggested actions
+ * which allows the drag receiver to improve harmony across the
+ * system. The caller may select wether these drag actions apply to
+ * a local or remote process.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * theDrag:
+ * The drag reference in which to set the allowable drag actions.
+ *
+ * inActions:
+ * A field of allowable drag actions to be set.
+ *
+ * isLocal:
+ * A boolean value allowing the drag sender to distinguish between
+ * those drag actions allowable by the local receiver versus a
+ * remote one.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDragAllowableActions( theDrag: DragRef; inActions: DragActions; isLocal: Boolean ): OSStatus; external name '_SetDragAllowableActions';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ * GetDragDropAction()
+ *
+ * Discussion:
+ * Gets the action performed by the receiver of the drag. More than
+ * one action may have been performed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * theDrag:
+ * The drag reference from which to retreive the performed drop
+ * action.
+ *
+ * outAction:
+ * A pointer to receive the drag action performed.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDragDropAction( theDrag: DragRef; var outAction: DragActions ): OSStatus; external name '_GetDragDropAction';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ * SetDragDropAction()
+ *
+ * Discussion:
+ * Sets the action performed by the receiver of the drag. More than
+ * one action may be performed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * theDrag:
+ * The drag reference in which to set the performed drop action.
+ *
+ * inAction:
+ * The drop action performed.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDragDropAction( theDrag: DragRef; inAction: DragActions ): OSStatus; external name '_SetDragDropAction';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ DRAG HIGHLIGHTING
+ _________________________________________________________________________________________________________
+}
+
+{
+ * ShowDragHilite()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function ShowDragHilite( theDrag: DragRef; hiliteFrame: RgnHandle; inside: Boolean ): OSErr; external name '_ShowDragHilite';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HideDragHilite()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function HideDragHilite( theDrag: DragRef ): OSErr; external name '_HideDragHilite';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DragPreScroll()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function DragPreScroll( theDrag: DragRef; dH: SInt16; dV: SInt16 ): OSErr; external name '_DragPreScroll';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DragPostScroll()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function DragPostScroll( theDrag: DragRef ): OSErr; external name '_DragPostScroll';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * UpdateDragHilite()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function UpdateDragHilite( theDrag: DragRef; updateRgn: RgnHandle ): OSErr; external name '_UpdateDragHilite';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDragHiliteColor()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 7.5 and later
+ }
+function GetDragHiliteColor( window: WindowRef; var color: RGBColor ): OSErr; external name '_GetDragHiliteColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ _________________________________________________________________________________________________________
+
+ ¥ UTILITIES
+ _________________________________________________________________________________________________________
+}
+
+
+{
+ * WaitMouseMoved()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function WaitMouseMoved( initialGlobalMouse: Point ): Boolean; external name '_WaitMouseMoved';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ZoomRects()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function ZoomRects( const (*var*) fromRect: Rect; const (*var*) toRect: Rect; zoomSteps: SInt16; acceleration: ZoomAcceleration ): OSErr; external name '_ZoomRects';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ZoomRegion()
+ *
+ * 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
+ * Non-Carbon CFM: in DragLib 1.1 and later
+ }
+function ZoomRegion( region: RgnHandle; zoomDistance: Point; zoomSteps: SInt16; acceleration: ZoomAcceleration ): OSErr; external name '_ZoomRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{--------------------------------------------------------------------------------------}
+{ ¥ DEPRECATED }
+{ All functions below this point are either deprecated (they continue to function }
+{ but are not the most modern nor most efficient solution to a problem), or they are }
+{ completely unavailable on Mac OS X. }
+{--------------------------------------------------------------------------------------}
+
+
+{
+ * SetDragImage() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Applications should use SetDragImageWithCGImage instead.
+ *
+ * Summary:
+ * Associates an image with a drag reference.
+ *
+ * Discussion:
+ * Used by the sender of the drag to set the image, in PixMapHandle
+ * format, to be displayed as user feedback during the drag. This
+ * API may be called at any point during the drag to update the
+ * image.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrag:
+ * The drag reference for which the image will be displayed.
+ *
+ * inImagePixMap:
+ * The PixMapHandle for the image to be displayed during the drag.
+ *
+ * inImageRgn:
+ * A mask describing the portion of the PixMap contained in the
+ * imagePixMap parameter which contains the drag image. Pass NULL
+ * for inImageRgn if the entire PixMap, including white space,
+ * should be dragged.
+ *
+ * inImageOffsetPt:
+ * The offset required to move the PixMap specified in the
+ * imagePixMap parameter to the global coordinates where the image
+ * initially appears. If this parameter is (0,0), the PixMap
+ * should already be in global coordinates.
+ *
+ * inImageFlags:
+ * Flags controlling the appearance of the drag image.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in DragLib 7.5 and later
+ }
+function SetDragImage( inDrag: DragRef; inImagePixMap: PixMapHandle; inImageRgn: RgnHandle; inImageOffsetPt: Point; inImageFlags: DragImageFlags ): OSErr; external name '_SetDragImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ _________________________________________________________________________________________________________
+ ¥ OLD NAMES
+ These are provided for compatiblity with older source bases. It is recommended to not use them since
+ they may removed from this interface file at any time.
+ _________________________________________________________________________________________________________
+}
+
+
+type
+ DragReference = DragRef;
+type
+ ItemReference = DragItemRef;
+(*
+#if OLDROUTINENAMES
+const
+ dragHasLeftSenderWindow = kDragHasLeftSenderWindow; { drag has left the source window since TrackDrag }
+ dragInsideSenderApplication = kDragInsideSenderApplication; { drag is occurring within the sender application }
+ dragInsideSenderWindow = kDragInsideSenderWindow; { drag is occurring within the sender window }
+
+const
+ dragTrackingEnterHandler = kDragTrackingEnterHandler; { drag has entered handler }
+ dragTrackingEnterWindow = kDragTrackingEnterWindow; { drag has entered window }
+ dragTrackingInWindow = kDragTrackingInWindow; { drag is moving within window }
+ dragTrackingLeaveWindow = kDragTrackingLeaveWindow; { drag has exited window }
+ dragTrackingLeaveHandler = kDragTrackingLeaveHandler; { drag has exited handler }
+
+const
+ dragRegionBegin = kDragRegionBegin; { initialize drawing }
+ dragRegionDraw = kDragRegionDraw; { draw drag feedback }
+ dragRegionHide = kDragRegionHide; { hide drag feedback }
+ dragRegionIdle = kDragRegionIdle; { drag feedback idle time }
+ dragRegionEnd = kDragRegionEnd; { end of drawing }
+
+const
+ zoomNoAcceleration = kZoomNoAcceleration; { use linear interpolation }
+ zoomAccelerate = kZoomAccelerate; { ramp up step size }
+ zoomDecelerate = kZoomDecelerate; { ramp down step size }
+
+const
+ kDragStandardImage = kDragStandardTranslucency; { 65% image translucency (standard)}
+ kDragDarkImage = kDragDarkTranslucency; { 50% image translucency}
+ kDragDarkerImage = kDragDarkerTranslucency; { 25% image translucency}
+ kDragOpaqueImage = kDragOpaqueTranslucency; { 0% image translucency (opaque)}
+
+#endif { OLDROUTINENAMES }
+*)
+
+
+
+{unit DriverGestalt}
+{
+ File: DriverGestalt.p
+
+ Contains: Driver Gestalt interfaces
+
+ Version: Technology: Mac OS 9
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1995-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{__________________________________________________________________________________}
+{ The Driver Gestalt bit in the dCtlFlags }
+
+const
+ kbDriverGestaltEnable = 2;
+ kmDriverGestaltEnableMask = $04;
+
+ { __________________________________________________________________________________ }
+ { Driver Gestalt related csCodes }
+ kDriverGestaltCode = 43; { various uses }
+ kDriverConfigureCode = 43; { various uses }
+ kcsSetBootPartitionCode = 44; { Set Startup Partition Control Call }
+ kcsGetBootPartitionStatus = 44; { Get Startup Partition Status Call }
+ kdgLowPowerMode = 70; { Sets/Returns the current energy consumption level }
+ kdgReturnDeviceID = 120; { returns SCSI DevID in csParam[0] }
+ kdgGetCDDeviceInfo = 121; { returns CDDeviceCharacteristics in csParam[0] }
+
+ { __________________________________________________________________________________ }
+ { Driver Gestalt selectors }
+ kdgVersion = $76657273 (* 'vers' *); { Version number of the driver in standard Apple format }
+ kdgDeviceType = $64657674 (* 'devt' *); { The type of device the driver is driving. }
+ kdgInterface = $696E7466 (* 'intf' *); { The underlying interface that the driver is using (if any) }
+ kdgSync = $73796E63 (* 'sync' *); { True if driver only behaves synchronously. }
+ kdgBoot = $626F6F74 (* 'boot' *); { value to place in PRAM for this drive (long) }
+ kdgWide = $77696465 (* 'wide' *); { True if driver supports ioWPosOffset }
+ kdgPurge = $70757267 (* 'purg' *); { Driver purge permission (True = purge; False = no purge) }
+ kdgSupportsSwitching = $6C707772 (* 'lpwr' *); { True if driver supports power switching }
+ kdgMin3VPower = $706D6E33 (* 'pmn3' *); { Minimum 3.3V power consumption in microWatts }
+ kdgMin5VPower = $706D6E35 (* 'pmn5' *); { Minimum 5V power consumption in microWatts }
+ kdgMax3VPower = $706D7833 (* 'pmx3' *); { Maximum 3.3V power consumption in microWatts }
+ kdgMax5VPower = $706D7835 (* 'pmx5' *); { Maximum 5V power consumption in microWatts }
+ kdgInHighPower = $70737461 (* 'psta' *); { True if device is currently in high power mode }
+ kdgSupportsPowerCtl = $70737570 (* 'psup' *); { True if driver supports following five calls }
+ kdgAPI = $64415049 (* 'dAPI' *); { API support for PC Exchange }
+ kdgEject = $656A6563 (* 'ejec' *); { Eject options for shutdown/restart (Shutdown Mgr) }
+ kdgFlush = $666C7573 (* 'flus' *); { Determine if disk driver supports flush and if it needs a flush }
+ kdgVMOptions = $766D6F70 (* 'vmop' *); { Disk drive's Virtual Memory options }
+ kdgMediaInfo = $6D696E66 (* 'minf' *); { return media specific information }
+ kdgPhysDriveIconSuite = $64696373 (* 'dics' *); { Return a pointer to a IconFamily ('icns') data structure for }
+ { Disk Driver physical drive (formerly in csCode 21) in driverGestaltResponse. }
+ kdgMediaIconSuite = $6D696373 (* 'mics' *); { Return a pointer to a IconFamily ('icns') data structure for }
+ { Disk Driver media (formerly in csCode 22) in driverGestaltResponse. }
+ { See IconServices.r for information detailing the 'icns' resource data format }
+ kdgMediaName = $6D6E616D (* 'mnam' *); { Return a pointer to a pascal string describing the Disk Driver (formerly in csCode 21) in driverGestaltResponse. }
+ kdgGetDriveAddInfo = $64696774 (* 'digt' *); { Get a disk driver's add-drive information record }
+ kdcAddDriveWithInfo = $64696164 (* 'diad' *); { Tell disk driver to add the drive specified with the drive information record }
+ { DriverGestalt selector for ATA drivers to signify that they are device 0/1 compliant. }
+ { see http://developer.apple.com/techpubs/hardware/Developer_Notes/System_Software/ATA_Device_Zero_One.pdf }
+ kdgATADev1 = $64657631 (* 'dev1' *);
+ kdgDeviceReference = $64767266 (* 'dvrf' *); { Returns a 32-bit reference number for the device, format is interface specific }
+ kdgNameRegistryEntry = $6E6D7267 (* 'nmrg' *); { Returns a pointer to the Name Registry ID for the device }
+ kdgDeviceModelInfo = $696E666F (* 'info' *); { Returns a pointer to a Device Model Info structure }
+ kdgSupportedMediaTypes = $6D647479 (* 'mdty' *); { Returns a count and a pointer to list of all media types supported by the device }
+ kdgOpenFirmwareBootSupport = $6F667074 (* 'ofpt' *); { Returns information that Open Firmware needs to support booting from the device }
+ kdgOpenFirmwareBootingSupport = $6F666274 (* 'ofbt' *); { Returns same information as kdgOpenFirmwareBootSupport, but is only used during booting }
+
+ { __________________________________________________________________________________ }
+ { Driver Configure selectors }
+ kdcFlush = $666C7573 (* 'flus' *); { Tell a disk driver to flush its cache and any hardware caches }
+ kdcVMOptions = $766D6F70 (* 'vmop' *); { Change the disk driver's Virtual Memory options }
+
+ { __________________________________________________________________________________ }
+ { control parameter block for Driver Configure calls }
+
+type
+ DriverConfigParamPtr = ^DriverConfigParam;
+ DriverConfigParam = record
+ qLink: QElemPtr;
+ qType: SInt16;
+ ioTrap: SInt16;
+ ioCmdAddr: Ptr;
+ ioCompletion: ProcPtr;
+ ioResult: OSErr;
+ ioNamePtr: StringPtr;
+ ioVRefNum: SInt16;
+ ioCRefNum: SInt16; { refNum for I/O operation }
+ csCode: SInt16; { == kDriverConfigureCode }
+ driverConfigureSelector: OSType;
+ driverConfigureParameter: UInt32;
+ end;
+
+ { __________________________________________________________________________________ }
+ { status parameter block for Driver Gestalt calls }
+ DriverGestaltParamPtr = ^DriverGestaltParam;
+ DriverGestaltParam = record
+ qLink: QElemPtr;
+ qType: SInt16;
+ ioTrap: SInt16;
+ ioCmdAddr: Ptr;
+ ioCompletion: ProcPtr;
+ ioResult: OSErr;
+ ioNamePtr: StringPtr;
+ ioVRefNum: SInt16;
+ ioCRefNum: SInt16; { refNum for I/O operation }
+ csCode: SInt16; { == kDriverGestaltCode }
+ driverGestaltSelector: OSType; { 'sync', 'vers', etc. }
+ driverGestaltResponse: UInt32; { Could be a pointer, bit field or other format }
+ driverGestaltResponse1: UInt32; { Could be a pointer, bit field or other format }
+ driverGestaltResponse2: UInt32; { Could be a pointer, bit field or other format }
+ driverGestaltResponse3: UInt32; { Could be a pointer, bit field or other format }
+ driverGestaltfiller: UInt16; { To pad out to the size of a controlPB }
+ end;
+
+ { __________________________________________________________________________________ }
+ { Device Types response }
+ DriverGestaltDevTResponsePtr = ^DriverGestaltDevTResponse;
+ DriverGestaltDevTResponse = record
+ deviceType: OSType;
+ end;
+
+
+const
+ kdgDiskType = $6469736B (* 'disk' *); { standard r/w disk drive }
+ kdgTapeType = $74617065 (* 'tape' *); { tape drive }
+ kdgPrinterType = $70726E74 (* 'prnt' *); { printer }
+ kdgProcessorType = $70726F63 (* 'proc' *); { processor }
+ kdgWormType = $776F726D (* 'worm' *); { write-once }
+ kdgCDType = $6364726D (* 'cdrm' *); { cd-rom drive }
+ kdgFloppyType = $666C6F70 (* 'flop' *); { floppy disk drive }
+ kdgScannerType = $7363616E (* 'scan' *); { scanner }
+ kdgFileType = $66696C65 (* 'file' *); { Logical Partition type based on a file (Drive Container) }
+ kdgRemovableType = $7264736B (* 'rdsk' *); { A removable media hard disk drive ie. Syquest, Bernioulli }
+
+ { __________________________________________________________________________________ }
+ { Device Interfaces response }
+
+type
+ DriverGestaltIntfResponsePtr = ^DriverGestaltIntfResponse;
+ DriverGestaltIntfResponse = record
+ interfaceType: OSType;
+ end;
+
+
+const
+ kdgScsiIntf = $73637369 (* 'scsi' *);
+ kdgPcmciaIntf = $70636D63 (* 'pcmc' *);
+ kdgATAIntf = $61746120 (* 'ata ' *);
+ kdgUSBIntf = $75736220 (* 'usb ' *);
+ kdgFireWireIntf = $66697265 (* 'fire' *);
+ kdgExtBus = $63617264 (* 'card' *);
+ kdgNetworkIntf = $6E657420 (* 'net ' *);
+
+ { __________________________________________________________________________________ }
+ { Power Saving }
+
+type
+ DriverGestaltPowerResponsePtr = ^DriverGestaltPowerResponse;
+ DriverGestaltPowerResponse = record
+ powerValue: UInt32; { Power consumed in µWatts }
+ end;
+
+ { __________________________________________________________________________________ }
+ { Disk Specific }
+ DriverGestaltSyncResponsePtr = ^DriverGestaltSyncResponse;
+ DriverGestaltSyncResponse = record
+ behavesSynchronously: boolean;
+ pad1,pad2,pad3: SInt8;
+ end;
+
+ DriverGestaltBootResponsePtr = ^DriverGestaltBootResponse;
+ DriverGestaltBootResponse = record
+ extDev: SInt8; { Packed target (upper 5 bits) LUN (lower 3 bits) }
+ partition: SInt8; { Unused }
+ SIMSlot: SInt8; { Slot }
+ SIMsRSRC: SInt8; { sRsrcID }
+ end;
+
+ DriverGestaltAPIResponsePtr = ^DriverGestaltAPIResponse;
+ DriverGestaltAPIResponse = record
+ partitionCmds: SInt16; { if bit 0 is nonzero, supports partition control and status calls }
+ { prohibitMounting (control, kProhibitMounting) }
+ { partitionToVRef (status, kGetPartitionStatus) }
+ { getPartitionInfo (status, kGetPartInfo) }
+ unused1: SInt16; { all the unused fields should be zero }
+ unused2: SInt16;
+ unused3: SInt16;
+ unused4: SInt16;
+ unused5: SInt16;
+ unused6: SInt16;
+ unused7: SInt16;
+ unused8: SInt16;
+ unused9: SInt16;
+ unused10: SInt16;
+ end;
+
+ DriverGestaltFlushResponsePtr = ^DriverGestaltFlushResponse;
+ DriverGestaltFlushResponse = record
+ canFlush: boolean; { Return true if driver supports the }
+ { kdcFlush Driver Configure _Control call }
+ needsFlush: boolean; { Return true if driver/device has data cached }
+ { and needs to be flushed when the disk volume }
+ { is flushed by the File Manager }
+ pad: packed array [0..1] of UInt8;
+ end;
+
+ { Flags for purge permissions }
+
+const
+ kbCloseOk = 0; { Ok to call Close }
+ kbRemoveOk = 1; { Ok to call RemoveDrvr }
+ kbPurgeOk = 2; { Ok to call DisposePtr }
+ kmNoCloseNoPurge = 0;
+ kmOkCloseNoPurge = $03;
+ kmOkCloseOkPurge = $07;
+
+ { Driver purge permission structure }
+
+type
+ DriverGestaltPurgeResponsePtr = ^DriverGestaltPurgeResponse;
+ DriverGestaltPurgeResponse = record
+ purgePermission: UInt16; { 0 = Do not change the state of the driver }
+ { 3 = Do Close() and DrvrRemove() this driver }
+ { but don't deallocate driver code }
+ { 7 = Do Close(), DrvrRemove(), and DisposePtr() }
+ purgeReserved: UInt16;
+ purgeDriverPointer: Ptr; { pointer to the start of the driver block (valid }
+ { only of DisposePtr permission is given }
+ end;
+
+ DriverGestaltEjectResponsePtr = ^DriverGestaltEjectResponse;
+ DriverGestaltEjectResponse = record
+ ejectFeatures: UInt32; { }
+ end;
+
+ { Flags for Ejection Features field }
+
+const
+ kRestartDontEject = 0; { Dont Want eject during Restart }
+ kShutDownDontEject = 1; { Dont Want eject during Shutdown }
+ kRestartDontEject_Mask = $01;
+ kShutDownDontEject_Mask = $02;
+
+ {
+ The DriverGestaltVMOptionsResponse is returned by a disk driver in response to a
+ kdgVMOptions Driver Gestalt request. This allows a disk driver to tell VM a few
+ things about a disk drive. For example:
+
+ ¥ A drive that should never be in the page fault path should return kAllowVMNoneMask.
+ Examples of this are drives that have manual eject buttons that are not disabled by
+ software, drives with very slow throughput, or drives that depend on
+ a network connection.
+ ¥ A drive that should never be written to but is safe for read-only file mapping
+ should return kAllowVMReadOnlyMask. Examples of this are WORM drives where each write
+ eats write-once space on the disk and CD-ROM drives which are read-only media.
+ ¥ A drive that should allow VM to create its main backing store file should return
+ kAllowVMReadWriteMask. Examples of this are fast read/write drives that don't allow
+ manual eject and don't use a network connection.
+
+ A disk driver must look at the ioVRefNum field of the DriverGestaltParam to determine
+ what disk drive this call is for. This is a per-drive call, not a per-driver call.
+
+ The only three valid responses to kdgVMOptions at this time are kAllowVMNoneMask,
+ kAllowVMReadOnlyMask, and kAllowVMReadWriteMask (i.e., setting only kAllowVMWriteBit
+ is not valid).
+
+ Important: All bits not defined here are reserved and should be set to zero until
+ they are defined for a specific purpose.
+
+ The kdcVMOptions Driver Configure _Control call provides the ability to change a driver's
+ response to kdgVMOptions Driver Gestalt requests. A driver should return controlErr if
+ it doesn't want to provide the ability to change the kdgVMOptions response. If a driver
+ supports the kdcVMOptions Driver Configure _Control call, but is asked to set an option bit
+ that it doesn't support (for example, if a read-only device is asked to set the kAllowVMWriteBit),
+ it should return paramErr.
+ }
+
+type
+ DriverGestaltVMOptionsResponsePtr = ^DriverGestaltVMOptionsResponse;
+ DriverGestaltVMOptionsResponse = record
+ vmOptions: UInt32;
+ end;
+
+ { Bits and masks for DriverGestaltVMOptionsResponse.vmOptions field }
+
+const
+ kAllowVMReadBit = 0; { Allow VM to use this drive for read access }
+ kAllowVMWriteBit = 1; { Allow VM to use this drive for write access }
+ kAllowVMNoneMask = 0;
+ kAllowVMReadOnlyMask = $01;
+ kAllowVMReadWriteMask = $03;
+
+ {
+ kdgGetDriveAddInfo/kdcAddDriveWithInfo is used by the Alias Manager to
+ assist in the remounting of container files. eg DiskCopy. The driver
+ can use it to store whatever information it needs to remount a drive
+ For example the Volume name and FileID.. What is in here is entirely
+ dependant on the driver, we never interpret it.
+
+ This extension to the Alias Manager works as such:
+
+ When creating an alias
+ ----------------------
+
+ If driver supports Driver Gestalt, the Alias Mgr calls the driver with a
+ kdgGetDriveAddInfo DriverGestalt request.
+
+ Inputs to DriverGestalt:
+ ioVRefNum = drive number
+ ioCRefNum = driver refNum
+ csCode = kDriverGestaltCode
+ driverGestaltSelector = kdgGetDriveAddInfo
+
+ If the driver supports kdgGetDriveAddInfo, it returns a pointer to the drive's
+ drive information record (DriverGestaltDriveAddInfoResponse*) in the
+ driverGestaltResponse field and returns noErr.
+
+ The memory used by the DriverGestaltDriveAddInfoResponse and it's pointed
+ to data, must be previously held by the disk driver with HoldMemory.
+
+ If the driver doesn't support kdgGetDriveAddInfo, it returns statusErr.
+
+ If noErr, the Alias Mgr stores the drive information record in the alias record
+ (the length of the drive information record data is in the length field).
+
+
+ When resolving an alias:
+ ------------------------
+
+ If driver supports Driver Gestalt, the Alias Mgr holds the drive information record
+ in the alias with HoldMemory and then calls the driver with a kdcAddDriveWithInfo
+ DriverConfigure request.
+
+ Inputs to DriverConfigure:
+ ioCRefNum = driver refNum
+ csCode = kDriverConfigureCode
+ driverGestaltSelector = pointer to DriverGestaltDriveAddInfoResponse
+
+
+ If the driver supports kdcAddDriveWithInfo, it uses the information in the drive
+ information record to add a drive to the drive queue. If the drive is added,
+ the driver returns noErr and returns the drive number in the ioVRefNum field of
+ the parameter block.
+
+ If the drive cannot be added (but kdcAddDriveWithInfo is supported), the driver
+ returns nsDrvErr.
+
+ If the driver doesn't support kdcAddDriveWithInfo, it returns controlErr.
+
+ If noErr is returned, but the data in the drive information record is not
+ up-to-date, the driver should set driveInfoChangedBit in the options field of the
+ drive information record.
+
+ If driveInfoInteractBit in the options field is set at input, the driver
+ may perform user interaction to mount the drive.
+
+ If noErr, the Alias Mgr tries to resolve the alias the rest of the way.
+ }
+ { drive info option flags }
+ driveInfoInteractBit = 31; { Input to kdcAddDriveWithInfo: If set, it's OK for the driver }
+ driveInfoInteractMask = $80000000; { to perform user interaction to add the drive }
+ driveInfoChangedBit = 30; { Output from kdgGetDriveInfo: If set, the drive was mounted, but }
+ driveInfoChangedMask = $40000000; { the drive information record needs to be updated. }
+ driveInfoDriverReservedMask = $0000FFFF; { bits 0-15 are defined by each driver for its own use }
+ driveInfoSystemReservedMask = $FFFF0000; { bits 16-31 are reserved for Apple system use }
+
+
+type
+ DriverGestaltDriveAddInfoResponsePtr = ^DriverGestaltDriveAddInfoResponse;
+ DriverGestaltDriveAddInfoResponse = record
+ options: OptionBits; { option flags. }
+ length: ByteCount; { length of data }
+ data: Ptr; { this data must be held with HoldMemory }
+ end;
+
+ {
+ The DriverGestaltMediaInfoResponse is returned by a disk driver in response to a
+ kdgMediaInfo DriverGestalt request. This allows a disk driver to tell callers the
+ physical block size, the number of blocks that are of that size, and the media type
+ for a given device.
+
+ A disk driver must look at the ioVRefNum field of the DriverGestaltParam to determine
+ what disk drive this call is for. This is a per-drive call, not a per-driver call.
+
+ On drives that support ejectable media, the response can change depending on what
+ media is currently in the drive.
+ }
+ DriverGestaltMediaInfoResponsePtr = ^DriverGestaltMediaInfoResponse;
+ DriverGestaltMediaInfoResponse = record
+ numberBlocks: UInt32; { number of blocks }
+ blockSize: UInt32; { physical size of blocks }
+ mediaType: SInt16; { media type identifier }
+ end;
+
+ { DriverGestaltMediaInfoResponse.mediaType constants }
+
+const
+ kMediaTypeUnknown = 128; { media type is unknown }
+ kMediaTypeCDROM = 129; { media type is a CD-ROM }
+ kMediaTypeDVDROM = 130; { media type is a DVD-ROM }
+ kMediaTypeDVDRAM = 131; { media type is a DVD-RAM }
+ kMediaTypeDVDR = 132; { media type is a DVD-RW }
+ kMediaTypeReadOnly = 133; { basic read only type }
+ kMediaTypeWriteOnce = 134; { basic write once type }
+ kMediaTypeRewritable = 135; { rewritable media, i.e CD-RW }
+ kMediaTypeOverwritable = 136; { random access read write media }
+ kMediaTypeNoMedia = -1; { no media is present }
+
+
+type
+ DriverGestaltATADev1ResponsePtr = ^DriverGestaltATADev1Response;
+ DriverGestaltATADev1Response = record
+ dev1Support: UInt32; { 1 = supports devices 0 and 1 }
+ end;
+
+ { __________________________________________________________________________________ }
+ { Device Reference }
+ {
+ The driver will return a 32-bit device reference number in the driverGestaltResponse
+ field of the DriverGestaltParam structure. The device refernce number will be interpreted
+ differently depending on the interface retrieved by using the 'intf' Driver Gestalt call.
+ }
+ { The union for the kdgDeviceReference Gestalt }
+ DriverGestaltDeviceReferenceResponsePtr = ^DriverGestaltDeviceReferenceResponse;
+ DriverGestaltDeviceReferenceResponse = record
+ case SInt16 of
+ 0: (
+ devRef: UInt32; { Generic reference number for interfaces not specified }
+ );
+ 1: (
+ scsiID: DeviceIdent; { kdgScsiIntf devices will return a DeviceIdent }
+ );
+ 2: (
+ ataID: DeviceIdent; { kdgATAIntf devices will return a DeviceIdent }
+ );
+ 3: (
+ usbRef: USBDeviceRef; { kdgUSBIntf devices will return a USBDeviceRef }
+ );
+ end;
+
+ { __________________________________________________________________________________ }
+ { Name Registry ID }
+ {
+ The driver will pass back in the driverGestaltResponse field of the DriverGestaltParam
+ a pointer to the Name Registry Entry ID for the device that it controls
+ }
+ { The structure for the kdgNameRegistryEntry Gestalt }
+ DriverGestaltNameRegistryResponsePtr = ^DriverGestaltNameRegistryResponse;
+ DriverGestaltNameRegistryResponse = record
+ entryID: RegEntryIDPtr;
+ end;
+
+ { __________________________________________________________________________________ }
+ { Device Model Information }
+ {
+ The driver will pass a pointer to the DriverGestaltDeviceModelInfoResponse in the
+ driverGestaltResponse field of the DriverGestaltParam structure
+
+ The structure for the kdgDeviceModelInfo Gestalt
+ If any of theses pointers are nil, that means that the device doesn't provide that information
+ }
+ DriverGestaltDeviceModelInfoResponsePtr = ^DriverGestaltDeviceModelInfoResponse;
+ DriverGestaltDeviceModelInfoResponse = record
+ infoStructVersion: UInt32;
+ vendorName: StringPtr;
+ productName: StringPtr;
+ revisionNumber: StringPtr;
+ subRevisionNumber: StringPtr;
+ serialNumber: StringPtr;
+ end;
+
+ { infoStructVersion field values }
+ { NOTE: May need/want to add a UniCode version of the InfoStruct at some point }
+
+const
+ kInfoStructStringPtrsVers1 = 1;
+
+
+ { __________________________________________________________________________________ }
+ { Supported Media Types }
+ {
+ The driver will return the number of media types supported by the device in the
+ driverGestaltResponse field of the DriverGestaltParam structure and an array of
+ 'devt' values for the supported media types will be returned in the driverGestaltResponse1
+ field of the DriverGestaltParam.
+
+ This call will return the number of media types supported by the device, and an array
+ of 'devt' values for the media types (i.e. if a device supports floppy disks
+ and large capacity removables, the driver would return that 2 media types are supported,
+ and the array would contain kdgFloppyType ('flop') and kdgRemovableType ('rdsk')).
+ }
+ { The structure for the kdgSupportedMediaTypes Gestalt }
+
+type
+ DriverGestaltSupportedMediaTypesResponsePtr = ^DriverGestaltSupportedMediaTypesResponse;
+ DriverGestaltSupportedMediaTypesResponse = record
+ supportTypesCount: UInt32; { The number of Media Types in the array }
+ supportedTypesArray: array [0..0] of OSType; { Array of supported media types }
+ end;
+
+ { __________________________________________________________________________________ }
+ { Open Firmware Boot support and Open Firmware Booting support }
+ {
+ The kdgOpenFirmwareBootSupport selector is used to get information about boot support
+ for the driver/device. The kdgOpenFirmwareBootingSupport is used during the boot
+ process to allow booting from partitions that Open Firmware may not be able to read
+ directly (i.e. Disk Array partitions, encrypted partitions, compressed partitions, etc..)
+
+ The driver will return the bootPartitionQualifier value in the driverGestaltResponse
+ field of the DriverGestaltParam and will return the exact partition map entry for
+ the boot partition in the driverGestaltResponse1 field of the DriverGestaltParam if
+ kOFBootSpecifiedPartition is returned in the driverGestaltResponse.
+ The number that is returned for the bootPartitionMapEntry field if the kOFBootSpecifiedPartition
+ is returned is the partition map entry number for the partition. (i.e. If the partition map entry
+ for the boot partition is the 2nd partition entry in the partition map, the bootPartitionMapEntry
+ field would be set to 2. If the partition map entry for the boot partition is the 3rd partition
+ map, the bootPartitionMapEntry field would be set to 3 and etc.)
+ }
+ DriverGestaltOFBootSupportResponsePtr = ^DriverGestaltOFBootSupportResponse;
+ DriverGestaltOFBootSupportResponse = record
+ bootPartitionQualifier: UInt32; { The exact level of booting that the driver and device supports }
+ bootPartitionMapEntry: UInt32; { The Partition Map entry for the boot partition if applicable }
+ end;
+
+ { Levels of boot support that the driver/device supports }
+ { These values are used in the bootPartitionQualifier field of the DriverGestaltOFBootSupportResponse }
+
+const
+ kOFBootAnyPartition = 1;
+ kOFBootSpecifiedPartition = 2;
+ kOFBootNotBootable = 3;
+ kOFBootNotPartitioned = 4;
+
+ { __________________________________________________________________________________ }
+ { CD-ROM Specific }
+ { The CDDeviceCharacteristics result is returned in csParam[0..2] of a
+ standard CntrlParam parameter block called with csCode kdgGetCDDeviceInfo.
+ }
+
+type
+ CDDeviceCharacteristicsPtr = ^CDDeviceCharacteristics;
+ CDDeviceCharacteristics = record
+ speedMajor: SInt8; { High byte of fixed point number containing drive speed }
+ speedMinor: SInt8; { Low byte of "" CD 300 == 2.2, CD_SC == 1.0 etc. }
+ cdFeatures: UInt16; { Flags field for features and transport type of this CD-ROM }
+ extendedCdFeatures: UInt16; { extended flags to support new DVD-ROM/DVD-R etc. }
+ end;
+
+
+const
+ cdFeatureFlagsMask = $FFFC; { The Flags are in the first 14 bits of the cdFeatures field }
+ cdTransportMask = $0003; { The transport type is in the last 2 bits of the cdFeatures field }
+
+
+ { Flags for cdFeatures field }
+ cdPowerInject = 0; { device supports power inject of media }
+ cdNotPowerEject = 1; { device does not support power eject of media }
+ cdMute = 2; { device supports audio channels muting }
+ cdLeftToChannel = 3; { device supports left channel only mono audio }
+ cdRightToChannel = 4; { device supports right channel only mono audio }
+ cdLeftPlusRight = 5; { device supports left + right channels mono audio }
+ cdSCSI_2 = 10; { device supports SCSI2 command set (SCSI only) }
+ cdStereoVolume = 11; { device supports independent volume per channel }
+ cdDisconnect = 12; { device supports disconnect / reconnect (SCSI only) }
+ cdWriteOnce = 13; { device is a write-once type of drive }
+ cdLockableButton = 14; { device drawer/tray can be locked }
+ cdExtendedFeatures = 15; { extendedCdFeatures field is used }
+ cdPowerInject_Mask = $01;
+ cdNotPowerEject_Mask = $02;
+ cdMute_Mask = $04;
+ cdLeftToChannel_Mask = $08;
+ cdRightToChannel_Mask = $10;
+ cdLeftPlusRight_Mask = $20;
+ cdSCSI_2_Mask = $0400;
+ cdStereoVolume_Mask = $0800;
+ cdDisconnect_Mask = $1000;
+ cdWriteOnce_Mask = $2000;
+ cdLockableButton_Mask = $4000;
+ cdExtendedFeatures_Mask = $8000;
+
+ { Transport types }
+ cdCaddy = 0; { CD_SC,CD_SC_PLUS,CD-300 etc. - power eject only }
+ cdTray = $01; { CD_300_PLUS etc. - power inject only }
+ cdLid = $02; { Power CD - no power inject/no power eject }
+
+ {
+ Flags for extendedCdFeatures field
+ Only valid when cdExtendedFeatures_Mask bit of cdFeatures field is set
+ }
+ cdDVDROM = 0; { device reads DVD-ROM media }
+ cdDVDR = 1; { device writes DVD-R media }
+ cdDVDRAM = 2; { device writes DVD-RAM media }
+ cdDVDAudio = 3; { device reads DVD-Audio media }
+ cdDVDRW = 4; { device writes DVD-RW media }
+ cdCDRom = 5; { device reads CD-ROM media }
+ cdCDR = 6; { device writes CD-R media }
+ cdCDRW = 7; { device writes CD-RW media }
+ cdDVDROM_Mask = $01;
+ cdDVDR_Mask = $02;
+ cdDVDRAM_Mask = $04;
+ cdDVDAudio_Mask = $08;
+ cdDVDRW_Mask = $10;
+ cdCDRom_Mask = $20;
+ cdCDR_Mask = $40;
+ cdCDRW_Mask = $80;
+
+
+ { the following are used by PC Exchange (and Apple DOS/PC Compatibility Card) }
+
+ { Control Codes }
+ kRegisterPartition = 50; { PCX needs a new Drive (for a non-macintosh partition found on the disk) }
+ OLD_REGISTER_PARTITION = 301; { left in for compatibility with shipping Apple DOS/PC Compatibility Card }
+ THE_DRIVE = 0; { DrvQElPtr for the partition to register }
+ THE_PHYS_START = 1; { The start of the partition in logical blocks }
+ THE_PHYS_SIZE = 2; { The size of the partition in logical blocks }
+ kGetADrive = 51; { control call to ask the driver to create a drive }
+ OLD_GET_A_DRIVE = 302; { left in for compatibility with shipping Apple DOS/PC Compatibility Card }
+ THE_VAR_QUEL = 0; { a var parameter for the returned DrvQElPtr }
+ kProhibitMounting = 52; { Dont allow mounting of the following drives }
+ kOldProhibitMounting = 2100; { left in for compatibility with shipping Apple DOS/PC Compatibility Card }
+ kProhibitDevice = 0; { CS Param 0 and 1 (partInfoRecPtr) }
+ kIsContainerMounted = 53;
+ kOldIsContainerMounted = 2201; { left in for compatibility with shipping Apple DOS/PC Compatibility Card }
+ kContainerVRef = 0; { CS Param 0 and 1 (VRefNum) }
+ kContainerParID = 1; { CS Param 2 and 3 (Parent ID) }
+ kContainerName = 2; { CS Param 4 and 5 (File Name) }
+ kContainerResponse = 3; { CS Param 6 and 7 (var pointer to short result) }
+ kMountVolumeImg = 54;
+ OLD_MOUNT_VOLUME_IMG = 2000;
+ MV_HOST_VREFNUM = 0;
+ MV_HOST_PAR_ID = 1;
+ MV_HOST_NAME = 2;
+ MV_REQ_PERM = 3;
+
+ { Status Codes }
+
+ kGetPartitionStatus = 50; { what is the status of this partition? }
+ kOldGetPartitionStatus = 2200; { left in for compatibility with shipping Apple DOS/PC Compatibility Card }
+ kDeviceToQuery = 0; { CS Param 0 and 1 (partInfoRecPtr) }
+ kDeviceResponse = 1; { CS Param 2 and 3 (var pointer to short result) }
+ kGetPartInfo = 51; { Get a partition info record based on the provided vrefnum }
+ kOldGetPartInfo = 2300; { left in for compatibility with shipping Apple DOS/PC Compatibility Card }
+ kPartInfoResponse = 0; { var parameter (pointer to partInfoRec) CSParam [0-1] }
+ kGetContainerAlias = 52; { Get the alias that describes the file this drive was mounted from. }
+ kOldGetContainerAlias = 2400; { left in for compatibility with shipping Apple DOS/PC Compatibility Card }
+ kGetAliasResponse = 0; { var parameter (pointer to a Handle) CSParam [0-1] }
+
+ { the result codes to come from the driver interface }
+
+ DRIVER_NOT_INSTALLED = -1;
+ DRIVER_BUSY = -2;
+ CANT_MOUNT_WITHIN_THIS_FS = -3; { can only mount container within residing on HFS volume }
+ VOLUME_ALREADY_MOUNTED = -4; { Already Mounted }
+
+ { requisite structures for PCX control and status calls }
+
+ kMaxProhibted = 2; { the max number of volumes the PC can possibly have mounted }
+
+ { GestaltSelector for Finding Driver information }
+
+ kGetDriverInfo = $76647263 (* 'vdrc' *);
+
+ { VerifyCmd, FormatCmd and EjectCmd are now defined in Disks.h/p/a }
+ { Partition information passed back and forth between PCX and the driver }
+
+type
+ partInfoRecPtr = ^partInfoRec;
+ partInfoRec = record
+ SCSIID: DeviceIdent; { DeviceIdent for the device }
+ physPartitionLoc: UInt32; { physical block number of beginning of partition }
+ partitionNumber: UInt32; { the partition number of this partition }
+ end;
+
+ vPartInfoRecPtr = ^vPartInfoRec;
+ vPartInfoRec = record
+ VPRTVers: SInt8; { Virtual partition version number }
+ VPRTType: SInt8; { virtual partition type (DOS, HFS, etc) }
+ drvrRefNum: SInt16; { Driver Reference number of partition driver }
+ end;
+
+ { Information related to DOS partitions }
+
+const
+ kDOSSigLow = $01FE; { offset into boot block for DOS signature }
+ kDOSSigHi = $01FF; { offset into boot block for DOS signature }
+ kDOSSigValLo = $55; { DOS signature value in low byte }
+ kDOSSigValHi = $AA; { DOS signature value in high byte }
+
+
+{$ALIGN MAC68K}
+
+
+{unit FontSync}
+{
+ File: FontSync.p
+
+ Contains: Public interface for FontSync
+
+ Version: Technology: Mac OS 9 / Carbon
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1999-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN POWER}
+
+
+{ Matching Options }
+
+type
+ FNSMatchOptions = UInt32;
+ FNSMatchOptionsPtr = ^FNSMatchOptions; { when a VAR xx: FNSMatchOptions parameter can be nil, it is changed to xx: FNSMatchOptionsPtr }
+const
+ kFNSMatchNames = $00000001; { font names must match }
+ kFNSMatchTechnology = $00000002; { scaler technology must match }
+ kFNSMatchGlyphs = $00000004; { glyph data must match }
+ kFNSMatchEncodings = $00000008; { cmaps must match }
+ kFNSMatchQDMetrics = $00000010; { QuickDraw Text metrics must match }
+ kFNSMatchATSUMetrics = $00000020; { ATSUI metrics (incl. vertical) must match }
+ kFNSMatchKerning = $00000040; { kerning data must match }
+ kFNSMatchWSLayout = $00000080; { WorldScript layout tables must match }
+ kFNSMatchAATLayout = $00000100; { AAT (incl. OpenType) layout tables must match }
+ kFNSMatchPrintEncoding = $00000200; { PostScript font and glyph names and re-encoding vector must match }
+ kFNSMissingDataNoMatch = $80000000; { treat missing data as mismatch }
+ kFNSMatchAll = $FFFFFFFF; { everything must match }
+ kFNSMatchDefaults = 0; { use global default match options }
+
+ {
+ * FNSMatchDefaultsGet()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSMatchDefaultsGet: FNSMatchOptions; external name '_FNSMatchDefaultsGet';
+
+
+{ Version control }
+
+type
+ FNSObjectVersion = UInt32;
+const
+ kFNSVersionDontCare = 0;
+ kFNSCurSysInfoVersion = 1;
+
+ { No features defined yet. }
+
+type
+ FNSFeatureFlags = UInt32;
+ {
+ The FontSync library version number is binary-coded decimal:
+ 8 bits of major version, 4 minor version and 4 bits revision.
+ }
+ FNSSysInfoPtr = ^FNSSysInfo;
+ FNSSysInfo = record
+ iSysInfoVersion: FNSObjectVersion; { fill this in before calling FNSSysInfoGet }
+ oFeatures: FNSFeatureFlags;
+ oCurRefVersion: FNSObjectVersion;
+ oMinRefVersion: FNSObjectVersion;
+ oCurProfileVersion: FNSObjectVersion;
+ oMinProfileVersion: FNSObjectVersion;
+ oFontSyncVersion: UInt16;
+ end;
+
+ {
+ * FNSSysInfoGet()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure FNSSysInfoGet(var ioInfo: FNSSysInfo); external name '_FNSSysInfoGet';
+
+
+{ FontSync References }
+
+type
+ FNSFontReference = ^SInt32; { an opaque 32-bit type }
+ FNSFontReferencePtr = ^FNSFontReference; { when a var xx:FNSFontReference parameter can be nil, it is changed to xx: FNSFontReferencePtr }
+ {
+ * FNSReferenceGetVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSReferenceGetVersion(iReference: FNSFontReference; var oVersion: FNSObjectVersion): OSStatus; external name '_FNSReferenceGetVersion';
+
+{
+ * FNSReferenceDispose()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSReferenceDispose(iReference: FNSFontReference): OSStatus; external name '_FNSReferenceDispose';
+
+{
+ * FNSReferenceMatch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSReferenceMatch(iReference1: FNSFontReference; iReference2: FNSFontReference; iOptions: FNSMatchOptions; oFailedMatchOptions: FNSMatchOptionsPtr): OSStatus; external name '_FNSReferenceMatch';
+
+{
+ * FNSReferenceFlattenedSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSReferenceFlattenedSize(iReference: FNSFontReference; var oFlattenedSize: ByteCount): OSStatus; external name '_FNSReferenceFlattenedSize';
+
+{
+ * FNSReferenceFlatten()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSReferenceFlatten(iReference: FNSFontReference; oFlatReference: UnivPtr; oFlattenedSize: ByteCountPtr): OSStatus; external name '_FNSReferenceFlatten';
+
+{
+ * FNSReferenceUnflatten()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSReferenceUnflatten(iFlatReference: UnivPtr; iFlattenedSize: ByteCount; var oReference: FNSFontReference): OSStatus; external name '_FNSReferenceUnflatten';
+
+
+{ FontSync Profiles }
+
+const
+ kFNSCreatorDefault = 0;
+ kFNSProfileFileType = $666E7370 (* 'fnsp' *);
+
+
+type
+ FNSFontProfile = ^SInt32; { an opaque 32-bit type }
+ FNSFontProfilePtr = ^FNSFontProfile; { when a var xx:FNSFontProfile parameter can be nil, it is changed to xx: FNSFontProfilePtr }
+ {
+ * FNSProfileCreate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSProfileCreate(const (*var*) iFile: FSSpec; iCreator: FourCharCode; iEstNumRefs: ItemCount; iDesiredVersion: FNSObjectVersion; var oProfile: FNSFontProfile): OSStatus; external name '_FNSProfileCreate';
+
+{
+ * FNSProfileOpen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSProfileOpen(const (*var*) iFile: FSSpec; iOpenForWrite: boolean; var oProfile: FNSFontProfile): OSStatus; external name '_FNSProfileOpen';
+
+
+{
+ * FNSProfileCreateWithFSRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function FNSProfileCreateWithFSRef(const (*var*) iParentDirectory: FSRef; iNameLength: UniCharCount; iName: ConstUniCharPtr; iCreator: FourCharCode; iEstNumRefs: ItemCount; iDesiredVersion: FNSObjectVersion; var oProfile: FNSFontProfile): OSStatus; external name '_FNSProfileCreateWithFSRef';
+
+{
+ * FNSProfileOpenWithFSRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function FNSProfileOpenWithFSRef(const (*var*) iFile: FSRef; iOpenForWrite: boolean; var oProfile: FNSFontProfile): OSStatus; external name '_FNSProfileOpenWithFSRef';
+
+{
+ * FNSProfileGetVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSProfileGetVersion(iProfile: FNSFontProfile; var oVersion: FNSObjectVersion): OSStatus; external name '_FNSProfileGetVersion';
+
+{
+ * FNSProfileCompact()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSProfileCompact(iProfile: FNSFontProfile): OSStatus; external name '_FNSProfileCompact';
+
+{
+ * FNSProfileClose()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSProfileClose(iProfile: FNSFontProfile): OSStatus; external name '_FNSProfileClose';
+
+{
+ * FNSProfileAddReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSProfileAddReference(iProfile: FNSFontProfile; iReference: FNSFontReference): OSStatus; external name '_FNSProfileAddReference';
+
+{
+ * FNSProfileRemoveReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSProfileRemoveReference(iProfile: FNSFontProfile; iReference: FNSFontReference): OSStatus; external name '_FNSProfileRemoveReference';
+
+{
+ * FNSProfileRemoveIndReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSProfileRemoveIndReference(iProfile: FNSFontProfile; iIndex: UInt32): OSStatus; external name '_FNSProfileRemoveIndReference';
+
+{
+ * FNSProfileClear()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSProfileClear(iProfile: FNSFontProfile): OSStatus; external name '_FNSProfileClear';
+
+{
+ * FNSProfileCountReferences()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSProfileCountReferences(iProfile: FNSFontProfile; var oCount: ItemCount): OSStatus; external name '_FNSProfileCountReferences';
+
+{
+ * FNSProfileGetIndReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSProfileGetIndReference(iProfile: FNSFontProfile; iWhichReference: UInt32; var oReference: FNSFontReference): OSStatus; external name '_FNSProfileGetIndReference';
+
+{
+ * FNSProfileMatchReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSProfileMatchReference(iProfile: FNSFontProfile; iReference: FNSFontReference; iMatchOptions: FNSMatchOptions; iOutputSize: ItemCount; oIndices: UInt32Ptr; oNumMatches: ItemCountPtr): OSStatus; external name '_FNSProfileMatchReference';
+
+
+{ Mapping to and from Font Objects }
+{
+ * FNSReferenceCreate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSReferenceCreate(iFont: FMFont; iDesiredVersion: FNSObjectVersion; var oReference: FNSFontReference): OSStatus; external name '_FNSReferenceCreate';
+
+{
+ * FNSReferenceMatchFonts()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSReferenceMatchFonts(iReference: FNSFontReference; iMatchOptions: FNSMatchOptions; iOutputSize: ItemCount; oFonts: FMFontPtr; oNumMatches: ItemCountPtr): OSStatus; external name '_FNSReferenceMatchFonts';
+
+
+{ Mapping to and from Font Families }
+{
+ * FNSReferenceCreateFromFamily()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSReferenceCreateFromFamily(iFamily: FMFontFamily; iStyle: FMFontStyle; iDesiredVersion: FNSObjectVersion; oReference: FNSFontReferencePtr; oActualStyle: FMFontStylePtr): OSStatus; external name '_FNSReferenceCreateFromFamily';
+
+{
+ * FNSReferenceMatchFamilies()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSReferenceMatchFamilies(iReference: FNSFontReference; iMatchOptions: FNSMatchOptions; iOutputSize: ItemCount; oFonts: FMFontFamilyInstancePtr; oNumMatches: ItemCountPtr): OSStatus; external name '_FNSReferenceMatchFamilies';
+
+
+{ UI Support }
+{
+ * FNSReferenceGetFamilyInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSReferenceGetFamilyInfo(iReference: FNSFontReference; oFamilyName: StringPtr; oFamilyNameScript: ScriptCodePtr; oActualStyle: FMFontStylePtr): OSStatus; external name '_FNSReferenceGetFamilyInfo';
+
+{
+ * FNSReferenceCountNames()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSReferenceCountNames(iReference: FNSFontReference; var oNameCount: ItemCount): OSStatus; external name '_FNSReferenceCountNames';
+
+{
+ * FNSReferenceGetIndName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSReferenceGetIndName(iReference: FNSFontReference; iFontNameIndex: ItemCount; iMaximumNameLength: ByteCount; oName: Ptr; oActualNameLength: ByteCountPtr; oFontNameCode: FontNameCodePtr; oFontNamePlatform: FontPlatformCodePtr; oFontNameScript: FontScriptCodePtr; oFontNameLanguage: FontLanguageCodePtr): OSStatus; external name '_FNSReferenceGetIndName';
+
+{
+ * FNSReferenceFindName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSReferenceFindName(iReference: FNSFontReference; iFontNameCode: FontNameCode; iFontNamePlatform: FontPlatformCode; iFontNameScript: FontScriptCode; iFontNameLanguage: FontLanguageCode; iMaximumNameLength: ByteCount; oName: Ptr; oActualNameLength: ByteCountPtr; oFontNameIndex: ItemCountPtr): OSStatus; external name '_FNSReferenceFindName';
+
+{ Miscellany }
+{
+ * FNSEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in FontSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FNSEnabled: boolean; external name '_FNSEnabled';
+
+{$ALIGN MAC68K}
+
+
+{unit KeychainCore}
+{
+ File: KeychainCore.p
+
+ Contains: Keychain low-level Interfaces
+
+ Version: Technology: Keychain 3.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 2000-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+{ Data structures and types }
+
+type
+ SecKeychainRef = ^SInt32; { an opaque 32-bit type }
+ SecKeychainRefPtr = ^SecKeychainRef; { when a var xx:SecKeychainRef parameter can be nil, it is changed to xx: SecKeychainRefPtr }
+ SecKeychainItemRef = ^SInt32; { an opaque 32-bit type }
+ SecKeychainItemRefPtr = ^SecKeychainItemRef; { when a var xx:SecKeychainItemRef parameter can be nil, it is changed to xx: SecKeychainItemRefPtr }
+ SecKeychainSearchRef = ^SInt32; { an opaque 32-bit type }
+ SecKeychainSearchRefPtr = ^SecKeychainSearchRef; { when a var xx:SecKeychainSearchRef parameter can be nil, it is changed to xx: SecKeychainSearchRefPtr }
+ SecKeychainAttrType = OSType;
+ SecKeychainStatus = UInt32;
+ SecKeychainAttributePtr = ^SecKeychainAttribute;
+ SecKeychainAttribute = record
+ tag: SecKeychainAttrType; { 4-byte attribute tag }
+ length: UInt32; { Length of attribute data }
+ data: Ptr; { Pointer to attribute data }
+ end;
+
+ SecKeychainAttributeListPtr = ^SecKeychainAttributeList;
+ SecKeychainAttributeList = record
+ count: UInt32; { How many attributes in the array }
+ attr: SecKeychainAttributePtr; { Pointer to first attribute in array }
+ end;
+
+ KCRef = SecKeychainRef;
+ KCItemRef = SecKeychainItemRef;
+ KCSearchRef = SecKeychainSearchRef;
+ KCRefPtr = ^KCRef;
+ KCItemRefPtr = ^KCItemRef;
+ KCSearchRefPtr = ^KCSearchRef;
+ KCAttribute = SecKeychainAttribute;
+ KCAttributePtr = ^KCAttribute;
+ KCAttributeList = SecKeychainAttributeList;
+ KCAttributeListPtr = ^KCAttributeList;
+ KCAttrType = SecKeychainAttrType;
+ KCStatus = SecKeychainStatus;
+ KCEvent = UInt16;
+const
+ kIdleKCEvent = 0; { null event }
+ kLockKCEvent = 1; { a keychain was locked }
+ kUnlockKCEvent = 2; { a keychain was unlocked }
+ kAddKCEvent = 3; { an item was added to a keychain }
+ kDeleteKCEvent = 4; { an item was deleted from a keychain }
+ kUpdateKCEvent = 5; { an item was updated }
+ kPasswordChangedKCEvent = 6; { the keychain identity was changed }
+ kSystemKCEvent = 8; { the keychain client can process events }
+ kDefaultChangedKCEvent = 9; { the default keychain was changed }
+ kDataAccessKCEvent = 10; { a process has accessed a keychain item's data }
+ kKeychainListChangedKCEvent = 11; { the list of keychains has changed }
+
+
+type
+ KCEventMask = UInt16;
+const
+ kIdleKCEventMask = $01;
+ kLockKCEventMask = $02;
+ kUnlockKCEventMask = $04;
+ kAddKCEventMask = $08;
+ kDeleteKCEventMask = $10;
+ kUpdateKCEventMask = $20;
+ kPasswordChangedKCEventMask = $40;
+ kSystemEventKCEventMask = $0100;
+ kDefaultChangedKCEventMask = $0200;
+ kDataAccessKCEventMask = $0400;
+ kEveryKCEventMask = $FFFF; { all of the above }
+
+
+type
+ AFPServerSignature = packed array [0..15] of UInt8;
+ AFPServerSignaturePtr = ^AFPServerSignature; { when a VAR xx: AFPServerSignature parameter can be nil, it is changed to xx: AFPServerSignaturePtr }
+ KCPublicKeyHash = packed array [0..19] of UInt8;
+ KCCallbackInfoPtr = ^KCCallbackInfo;
+ KCCallbackInfo = record
+ version: UInt32;
+ item: KCItemRef;
+ processID: ProcessSerialNumber;
+ event: EventRecord;
+ keychain: KCRef;
+ end;
+
+
+const
+ kUnlockStateKCStatus = 1;
+ kRdPermKCStatus = 2;
+ kWrPermKCStatus = 4;
+
+
+ kCertificateKCItemClass = $63657274 (* 'cert' *); { Certificate }
+ kAppleSharePasswordKCItemClass = $61736870 (* 'ashp' *); { Appleshare password }
+ kInternetPasswordKCItemClass = $696E6574 (* 'inet' *); { Internet password }
+ kGenericPasswordKCItemClass = $67656E70 (* 'genp' *); { Generic password }
+
+
+type
+ KCItemClass = FourCharCode;
+
+const
+ { Common attributes }
+ kClassKCItemAttr = $636C6173 (* 'clas' *); { Item class (KCItemClass) }
+ kCreationDateKCItemAttr = $63646174 (* 'cdat' *); { Date the item was created (UInt32) }
+ kModDateKCItemAttr = $6D646174 (* 'mdat' *); { Last time the item was updated (UInt32) }
+ kDescriptionKCItemAttr = $64657363 (* 'desc' *); { User-visible description string (string) }
+ kCommentKCItemAttr = $69636D74 (* 'icmt' *); { User's comment about the item (string) }
+ kCreatorKCItemAttr = $63727472 (* 'crtr' *); { Item's creator (OSType) }
+ kTypeKCItemAttr = $74797065 (* 'type' *); { Item's type (OSType) }
+ kScriptCodeKCItemAttr = $73637270 (* 'scrp' *); { Script code for all strings (ScriptCode) }
+ kLabelKCItemAttr = $6C61626C (* 'labl' *); { Item label (string) }
+ kInvisibleKCItemAttr = $696E7669 (* 'invi' *); { Invisible (boolean) }
+ kNegativeKCItemAttr = $6E656761 (* 'nega' *); { Negative (boolean) }
+ kCustomIconKCItemAttr = $63757369 (* 'cusi' *); { Custom icon (boolean) }
+ kAccountKCItemAttr = $61636374 (* 'acct' *); { User account (string) }
+ { Unique Generic password attributes }
+ kServiceKCItemAttr = $73766365 (* 'svce' *); { Service (string) }
+ kGenericKCItemAttr = $67656E61 (* 'gena' *); { User-defined attribute (untyped bytes) }
+ { Unique Internet password attributes }
+ kSecurityDomainKCItemAttr = $73646D6E (* 'sdmn' *); { Security domain (string) }
+ kServerKCItemAttr = $73727672 (* 'srvr' *); { Server's domain name or IP address (string) }
+ kAuthTypeKCItemAttr = $61747970 (* 'atyp' *); { Authentication Type (KCAuthType) }
+ kPortKCItemAttr = $706F7274 (* 'port' *); { Port (UInt16) }
+ kPathKCItemAttr = $70617468 (* 'path' *); { Path (string) }
+ { Unique Appleshare password attributes }
+ kVolumeKCItemAttr = $766C6D65 (* 'vlme' *); { Volume (string) }
+ kAddressKCItemAttr = $61646472 (* 'addr' *); { Server address (IP or domain name) or zone name (string) }
+ kSignatureKCItemAttr = $73736967 (* 'ssig' *); { Server signature block (AFPServerSignature) }
+ { Unique AppleShare and Internet attributes }
+ kProtocolKCItemAttr = $7074636C (* 'ptcl' *); { Protocol (KCProtocolType) }
+ { Certificate attributes }
+ kSubjectKCItemAttr = $7375626A (* 'subj' *); { Subject distinguished name (DER-encoded data) }
+ kCommonNameKCItemAttr = $636E2020 (* 'cn ' *); { Common Name (UTF8-encoded string) }
+ kIssuerKCItemAttr = $69737375 (* 'issu' *); { Issuer distinguished name (DER-encoded data) }
+ kSerialNumberKCItemAttr = $736E6272 (* 'snbr' *); { Certificate serial number (DER-encoded data) }
+ kEMailKCItemAttr = $6D61696C (* 'mail' *); { E-mail address (ASCII-encoded string) }
+ kPublicKeyHashKCItemAttr = $68706B79 (* 'hpky' *); { Hash of public key (KCPublicKeyHash), 20 bytes max. }
+ kIssuerURLKCItemAttr = $6975726C (* 'iurl' *); { URL of the certificate issuer (ASCII-encoded string) }
+ { Shared by keys and certificates }
+ kEncryptKCItemAttr = $656E6372 (* 'encr' *); { Encrypt (Boolean) }
+ kDecryptKCItemAttr = $64656372 (* 'decr' *); { Decrypt (Boolean) }
+ kSignKCItemAttr = $7369676E (* 'sign' *); { Sign (Boolean) }
+ kVerifyKCItemAttr = $76657269 (* 'veri' *); { Verify (Boolean) }
+ kWrapKCItemAttr = $77726170 (* 'wrap' *); { Wrap (Boolean) }
+ kUnwrapKCItemAttr = $756E7772 (* 'unwr' *); { Unwrap (Boolean) }
+ kStartDateKCItemAttr = $73646174 (* 'sdat' *); { Start Date (UInt32) }
+ kEndDateKCItemAttr = $65646174 (* 'edat' *); { End Date (UInt32) }
+
+
+type
+ KCItemAttr = FourCharCode;
+
+const
+ kKCAuthTypeNTLM = $6E746C6D (* 'ntlm' *);
+ kKCAuthTypeMSN = $6D736E61 (* 'msna' *);
+ kKCAuthTypeDPA = $64706161 (* 'dpaa' *);
+ kKCAuthTypeRPA = $72706161 (* 'rpaa' *);
+ kKCAuthTypeHTTPDigest = $68747464 (* 'httd' *);
+ kKCAuthTypeDefault = $64666C74 (* 'dflt' *);
+
+
+type
+ KCAuthType = FourCharCode;
+
+const
+ kKCProtocolTypeFTP = $66747020 (* 'ftp ' *);
+ kKCProtocolTypeFTPAccount = $66747061 (* 'ftpa' *);
+ kKCProtocolTypeHTTP = $68747470 (* 'http' *);
+ kKCProtocolTypeIRC = $69726320 (* 'irc ' *);
+ kKCProtocolTypeNNTP = $6E6E7470 (* 'nntp' *);
+ kKCProtocolTypePOP3 = $706F7033 (* 'pop3' *);
+ kKCProtocolTypeSMTP = $736D7470 (* 'smtp' *);
+ kKCProtocolTypeSOCKS = $736F7820 (* 'sox ' *);
+ kKCProtocolTypeIMAP = $696D6170 (* 'imap' *);
+ kKCProtocolTypeLDAP = $6C646170 (* 'ldap' *);
+ kKCProtocolTypeAppleTalk = $61746C6B (* 'atlk' *);
+ kKCProtocolTypeAFP = $61667020 (* 'afp ' *);
+ kKCProtocolTypeTelnet = $74656C6E (* 'teln' *);
+
+
+type
+ KCProtocolType = FourCharCode;
+ KCCertAddOptions = UInt32;
+const
+ kSecOptionReserved = $000000FF; { First byte reserved for SecOptions flags }
+ kCertUsageShift = 8; { start at bit 8 }
+ kCertUsageSigningAdd = $0100;
+ kCertUsageSigningAskAndAdd = $0200;
+ kCertUsageVerifyAdd = $0400;
+ kCertUsageVerifyAskAndAdd = $0800;
+ kCertUsageEncryptAdd = $1000;
+ kCertUsageEncryptAskAndAdd = $2000;
+ kCertUsageDecryptAdd = $4000;
+ kCertUsageDecryptAskAndAdd = $8000;
+ kCertUsageKeyExchAdd = $00010000;
+ kCertUsageKeyExchAskAndAdd = $00020000;
+ kCertUsageRootAdd = $00040000;
+ kCertUsageRootAskAndAdd = $00080000;
+ kCertUsageSSLAdd = $00100000;
+ kCertUsageSSLAskAndAdd = $00200000;
+ kCertUsageAllAdd = $7FFFFF00;
+
+
+type
+ KCVerifyStopOn = UInt16;
+const
+ kPolicyKCStopOn = 0;
+ kNoneKCStopOn = 1;
+ kFirstPassKCStopOn = 2;
+ kFirstFailKCStopOn = 3;
+
+
+type
+ KCCertSearchOptions = UInt32;
+const
+ kCertSearchShift = 0; { start at bit 0 }
+ kCertSearchSigningIgnored = 0;
+ kCertSearchSigningAllowed = $01;
+ kCertSearchSigningDisallowed = $02;
+ kCertSearchSigningMask = $03;
+ kCertSearchVerifyIgnored = 0;
+ kCertSearchVerifyAllowed = $04;
+ kCertSearchVerifyDisallowed = $08;
+ kCertSearchVerifyMask = $0C;
+ kCertSearchEncryptIgnored = 0;
+ kCertSearchEncryptAllowed = $10;
+ kCertSearchEncryptDisallowed = $20;
+ kCertSearchEncryptMask = $30;
+ kCertSearchDecryptIgnored = 0;
+ kCertSearchDecryptAllowed = $40;
+ kCertSearchDecryptDisallowed = $80;
+ kCertSearchDecryptMask = $C0;
+ kCertSearchWrapIgnored = 0;
+ kCertSearchWrapAllowed = $0100;
+ kCertSearchWrapDisallowed = $0200;
+ kCertSearchWrapMask = $0300;
+ kCertSearchUnwrapIgnored = 0;
+ kCertSearchUnwrapAllowed = $0400;
+ kCertSearchUnwrapDisallowed = $0800;
+ kCertSearchUnwrapMask = $0C00;
+ kCertSearchPrivKeyRequired = $1000;
+ kCertSearchAny = 0;
+
+ { Other constants }
+ kAnyPort = 0;
+
+ kAnyProtocol = 0;
+ kAnyAuthType = 0;
+
+ { Opening and getting information about the Keychain Manager }
+ {
+ * KCGetKeychainManagerVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: not available
+ }
+function KCGetKeychainManagerVersion(var returnVers: UInt32): OSStatus; external name '_KCGetKeychainManagerVersion';
+
+{$ifc TARGET_RT_MAC_CFM}
+{
+ KeychainManagerAvailable() is a macro/inline available only in C/C++.
+ To get the same functionality from pascal or assembly, you need
+ to test if KCGetKeychainManagerVersion function is not NULL. For instance:
+
+ gKeychainManagerAvailable = FALSE;
+ IF @KCGetKeychainManagerVersion <> kUnresolvedCFragSymbolAddress THEN
+ gKeychainManagerAvailable = TRUE;
+ end
+
+ }
+{$elsec}
+ {$ifc TARGET_RT_MAC_MACHO}
+ {$endc}
+{$endc}
+
+{ Managing the Human Interface }
+{
+ * KCSetInteractionAllowed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCSetInteractionAllowed(state: boolean): OSStatus; external name '_KCSetInteractionAllowed';
+
+{
+ * KCIsInteractionAllowed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCIsInteractionAllowed: boolean; external name '_KCIsInteractionAllowed';
+
+{ Creating references to keychains }
+{
+ * KCMakeKCRefFromFSSpec()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCMakeKCRefFromFSSpec(var keychainFSSpec: FSSpec; var keychain: KCRef): OSStatus; external name '_KCMakeKCRefFromFSSpec';
+
+{
+ * KCMakeKCRefFromAlias()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCMakeKCRefFromAlias(keychainAlias: AliasHandle; var keychain: KCRef): OSStatus; external name '_KCMakeKCRefFromAlias';
+
+{
+ * KCMakeAliasFromKCRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCMakeAliasFromKCRef(keychain: KCRef; var keychainAlias: AliasHandle): OSStatus; external name '_KCMakeAliasFromKCRef';
+
+{
+ * KCReleaseKeychain()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCReleaseKeychain(var keychain: KCRef): OSStatus; external name '_KCReleaseKeychain';
+
+{ Specifying the default keychain }
+{
+ * KCGetDefaultKeychain()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCGetDefaultKeychain(var keychain: KCRef): OSStatus; external name '_KCGetDefaultKeychain';
+
+{
+ * KCSetDefaultKeychain()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCSetDefaultKeychain(keychain: KCRef): OSStatus; external name '_KCSetDefaultKeychain';
+
+{ Getting information about a keychain }
+{
+ * KCGetStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCGetStatus(keychain: KCRef; var keychainStatus: UInt32): OSStatus; external name '_KCGetStatus';
+
+{
+ * KCGetKeychain()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCGetKeychain(item: KCItemRef; var keychain: KCRef): OSStatus; external name '_KCGetKeychain';
+
+{
+ * KCGetKeychainName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCGetKeychainName(keychain: KCRef; keychainName: StringPtr): OSStatus; external name '_KCGetKeychainName';
+
+{ Enumerating available keychains }
+{
+ * KCCountKeychains()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCCountKeychains: UInt16; external name '_KCCountKeychains';
+
+{
+ * KCGetIndKeychain()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCGetIndKeychain(index: UInt16; var keychain: KCRef): OSStatus; external name '_KCGetIndKeychain';
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ KCCallbackProcPtr = function(keychainEvent: KCEvent; var info: KCCallbackInfo; userContext: UnivPtr): OSStatus;
+{$elsec}
+ KCCallbackProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ KCCallbackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ KCCallbackUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppKCCallbackProcInfo = $00000FB0;
+ {
+ * NewKCCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewKCCallbackUPP(userRoutine: KCCallbackProcPtr): KCCallbackUPP; external name '_NewKCCallbackUPP'; { old name was NewKCCallbackProc }
+{
+ * DisposeKCCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeKCCallbackUPP(userUPP: KCCallbackUPP); external name '_DisposeKCCallbackUPP';
+{
+ * InvokeKCCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeKCCallbackUPP(keychainEvent: KCEvent; var info: KCCallbackInfo; userContext: UnivPtr; userRoutine: KCCallbackUPP): OSStatus; external name '_InvokeKCCallbackUPP'; { old name was CallKCCallbackProc }
+{ Keychain Manager callbacks }
+{
+ * KCAddCallback()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCAddCallback(callbackProc: KCCallbackUPP; eventMask: KCEventMask; userContext: UnivPtr): OSStatus; external name '_KCAddCallback';
+
+{
+ * KCRemoveCallback()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCRemoveCallback(callbackProc: KCCallbackUPP): OSStatus; external name '_KCRemoveCallback';
+
+
+{ Creating and editing a keychain item }
+{
+ * KCNewItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCNewItem(itemClass: KCItemClass; itemCreator: OSType; length: UInt32; data: UnivPtr; var item: KCItemRef): OSStatus; external name '_KCNewItem';
+
+{
+ * KCSetAttribute()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCSetAttribute(item: KCItemRef; var attr: KCAttribute): OSStatus; external name '_KCSetAttribute';
+
+{
+ * KCGetAttribute()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCGetAttribute(item: KCItemRef; var attr: KCAttribute; var actualLength: UInt32): OSStatus; external name '_KCGetAttribute';
+
+{
+ * KCSetData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCSetData(item: KCItemRef; length: UInt32; data: UnivPtr): OSStatus; external name '_KCSetData';
+
+{ Managing keychain items }
+{
+ * KCUpdateItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCUpdateItem(item: KCItemRef): OSStatus; external name '_KCUpdateItem';
+
+{
+ * KCReleaseItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCReleaseItem(var item: KCItemRef): OSStatus; external name '_KCReleaseItem';
+
+{
+ * KCCopyItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCCopyItem(item: KCItemRef; destKeychain: KCRef; var copy: KCItemRef): OSStatus; external name '_KCCopyItem';
+
+{ Searching and enumerating keychain items }
+{
+ * KCFindFirstItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCFindFirstItem(keychain: KCRef; attrList: {Const}KCAttributeListPtr; var search: KCSearchRef; var item: KCItemRef): OSStatus; external name '_KCFindFirstItem';
+
+{
+ * KCFindNextItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCFindNextItem(search: KCSearchRef; var item: KCItemRef): OSStatus; external name '_KCFindNextItem';
+
+{
+ * KCReleaseSearch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCReleaseSearch(var search: KCSearchRef): OSStatus; external name '_KCReleaseSearch';
+
+
+{ Managing keychain items }
+{
+ * KCDeleteItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCDeleteItem(item: KCItemRef): OSStatus; external name '_KCDeleteItem';
+
+{
+ * KCGetData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCGetData(item: KCItemRef; maxLength: UInt32; data: UnivPtr; var actualLength: UInt32): OSStatus; external name '_KCGetData';
+
+{ Storing and retrieving AppleShare passwords }
+{
+ * KCAddAppleSharePassword()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCAddAppleSharePassword(var serverSignature: AFPServerSignature; serverAddress: StringPtr; serverName: StringPtr; volumeName: StringPtr; accountName: StringPtr; passwordLength: UInt32; passwordData: UnivPtr; item: KCItemRefPtr): OSStatus; external name '_KCAddAppleSharePassword';
+
+{
+ * KCFindAppleSharePassword()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCFindAppleSharePassword(serverSignature: AFPServerSignaturePtr; serverAddress: StringPtr; serverName: StringPtr; volumeName: StringPtr; accountName: StringPtr; maxLength: UInt32; passwordData: UnivPtr; var actualLength: UInt32; item: KCItemRefPtr): OSStatus; external name '_KCFindAppleSharePassword';
+
+{ Storing and retrieving Internet passwords }
+{
+ * KCAddInternetPassword()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCAddInternetPassword(serverName: StringPtr; securityDomain: StringPtr; accountName: StringPtr; port: UInt16; protocol: OSType; authType: OSType; passwordLength: UInt32; passwordData: UnivPtr; item: KCItemRefPtr): OSStatus; external name '_KCAddInternetPassword';
+
+{
+ * KCAddInternetPasswordWithPath()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCAddInternetPasswordWithPath(serverName: StringPtr; securityDomain: StringPtr; accountName: StringPtr; path: StringPtr; port: UInt16; protocol: OSType; authType: OSType; passwordLength: UInt32; passwordData: UnivPtr; item: KCItemRefPtr): OSStatus; external name '_KCAddInternetPasswordWithPath';
+
+{
+ * KCFindInternetPassword()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCFindInternetPassword(serverName: StringPtr; securityDomain: StringPtr; accountName: StringPtr; port: UInt16; protocol: OSType; authType: OSType; maxLength: UInt32; passwordData: UnivPtr; var actualLength: UInt32; item: KCItemRefPtr): OSStatus; external name '_KCFindInternetPassword';
+
+{
+ * KCFindInternetPasswordWithPath()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCFindInternetPasswordWithPath(serverName: StringPtr; securityDomain: StringPtr; accountName: StringPtr; path: StringPtr; port: UInt16; protocol: OSType; authType: OSType; maxLength: UInt32; passwordData: UnivPtr; var actualLength: UInt32; item: KCItemRefPtr): OSStatus; external name '_KCFindInternetPasswordWithPath';
+
+{ Storing and retrieving other types of passwords }
+{
+ * KCAddGenericPassword()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCAddGenericPassword(serviceName: StringPtr; accountName: StringPtr; passwordLength: UInt32; passwordData: UnivPtr; item: KCItemRefPtr): OSStatus; external name '_KCAddGenericPassword';
+
+{
+ * KCFindGenericPassword()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCFindGenericPassword(serviceName: StringPtr; accountName: StringPtr; maxLength: UInt32; passwordData: UnivPtr; var actualLength: UInt32; item: KCItemRefPtr): OSStatus; external name '_KCFindGenericPassword';
+
+{
+ * KCLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCLock(keychain: KCRef): OSStatus; external name '_KCLock';
+
+
+{$ALIGN MAC68K}
+
+
+{unit KeychainHI}
+{
+ File: KeychainHI.p
+
+ Contains: Keychain API's with Human Interfaces
+
+ Version: Technology: Keychain 3.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 2000-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ Locking and unlocking a keychain }
+{
+ * KCUnlock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCUnlock(keychain: KCRef; password: StringPtr): OSStatus; external name '_KCUnlock';
+
+{ Managing keychain items }
+{
+ * KCAddItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCAddItem(item: KCItemRef): OSStatus; external name '_KCAddItem';
+
+{ Creating a new keychain }
+{
+ * KCCreateKeychain()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCCreateKeychain(password: StringPtr; keychain: KCRefPtr): OSStatus; external name '_KCCreateKeychain';
+
+{ Changing a keychain's settings }
+{
+ * KCChangeSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function KCChangeSettings(keychain: KCRef): OSStatus; external name '_KCChangeSettings';
+
+{ Working with certificates }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * KCFindX509Certificates()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function KCFindX509Certificates(keychain: KCRef; name: CFStringRef; emailAddress: CFStringRef; options: KCCertSearchOptions; certificateItems: CFMutableArrayRefPtr): OSStatus; external name '_KCFindX509Certificates';
+
+{
+ * KCChooseCertificate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in KeychainLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function KCChooseCertificate(items: CFArrayRef; var certificate: KCItemRef; policyOIDs: CFArrayRef; stopOn: KCVerifyStopOn): OSStatus; external name '_KCChooseCertificate';
+
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ALIGN MAC68K}
+
+
+{unit Menus}
+{
+ File: HIToolbox/Menus.h
+
+ Contains: Menu Manager Interfaces.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1985-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+{
+ * Menu Manager
+ }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Menu Constants }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ A Short Course on Menu Definition Functions
+
+ A menu definition function is used to implement a custom visual appearance for a menu.
+ Menu definition functions are still supported in Carbon, but the messages sent to a
+ menu definition function in Carbon are different than for a non-Carbon application.
+
+ In general, Apple recommends using the system menu definition whenever possible.
+ Menu definition functions will continue to be supported, but it is not easy to write
+ a correct menu definition, especially one that attempts to imitate the standard system
+ menu appearance. If you require special features in your menu that the system menu
+ definition does not support, please mail <toolbox@apple.com> and describe your requirements;
+ we would much rather enhance the system menu definition than have you write a custom one.
+
+ Menu definition functions before Carbon used the following messages:
+
+ kMenuDrawMsg
+ kMenuChooseMsg
+ kMenuSizeMsg
+ kMenuPopUpMsg
+ kMenuDrawItemMsg
+ kMenuCalcItemMsg
+ kMenuThemeSavvyMsg
+
+ kMenuChooseMsg and kMenuDrawItemMsg are not supported in Carbon and are not sent to
+ Carbon menu definitions. In Carbon, kMenuChooseMsg is replaced by kMenuFindItemMsg and
+ kMenuHiliteItemMsg. Menu definition functions in Carbon use the following messages:
+
+ kMenuInitMsg
+ kMenuDisposeMsg
+ kMenuFindItemMsg
+ kMenuHiliteItemMsg
+ kMenuDrawItemsMsg
+ kMenuDrawMsg
+ kMenuSizeMsg
+ kMenuPopUpMsg
+ kMenuCalcItemMsg
+ kMenuThemeSavvyMsg
+
+ The rest of this documentation will focus on Carbon menu definitions only.
+
+ Menu Definition Messages
+
+ Carbon menu definition functions should support the following messages:
+
+ kMenuInitMsg
+
+ menuRect unused
+ hitPt unused
+ whichItem OSErr*
+
+ Sent when a menu is created. This message gives the menu definition an opportunity
+ to initialize its own state. If the menu definition encounters an error while
+ initializing, it should set *whichItem to a non-zero error code; this will cause the
+ Menu Manager to destroy the menu and return an error back from the API that was used
+ to create the menu.
+
+ kMenuDisposeMsg
+
+ menuRect unused
+ hitPt unused
+ whichItem unused
+
+ Sent when a menu is destroyed. This message gives the menu definition an opportunity
+ to destroy its own data.
+
+ kMenuFindItemMsg
+
+ menuRect menu bounds
+ hitPt point to hit-test
+ whichItem MDEFFindItemData*
+
+ Sent when the Menu Manager is displaying a menu and needs to know what item is under
+ the mouse. The whichItem parameter is actually a pointer to a MenuTrackingData structure.
+ On entry, the menu, virtualMenuTop, and virtualMenuBottom fields of this structure are
+ valid. The menu definition should determine which item containst the given point, if any,
+ and fill in the itemUnderMouse, itemSelected, and itemRect fields. If an item is found,
+ the menu definition should always fill in the itemUnderMouse and itemRect fields. The
+ menu definition should only fill in the itemSelected field if the item is available for
+ selection; if it is unavailable (because it is disabled, or for some other reason), the
+ menu definition should set the itemSelected field to zero.
+
+ The values placed in the itemUnderMouse and itemSelected fields should be less than or
+ equal to the number of items returned by CountMenuItems on this menu. The values placed
+ in these two fields should be identical if both are non-zero. itemUnderMouse should always
+ be non-zero if the mouse is actually over an item.
+
+ The menu definition should not hilite the found item during this message. The Menu
+ Manager will send a separate kMenuHiliteItemMsg to request hiliting of the item.
+
+ If the menu definition supports scrolling, it should scroll the menu during this message,
+ and update the virtualMenuTop and virtualMenuBottom fields of the MenuTrackingData to
+ indicate the menu's new scrolled position.
+
+ If the menu definition uses QuickDraw to draw while scrolling, it should draw into the
+ current port.
+
+ If the menu definition uses CoreGraphics to draw while scrolling, it should use the
+ CGContextRef passed in the context field of the MDEFHiliteItemData structure.
+
+ Menu definitions must use the ScrollMenuImage API, if available, to scroll the menu contents.
+ This API is available in CarbonLib 1.5 and later, and in Mac OS X 10.1 and later. ScrollMenuImage
+ properly supports scrolling the alpha channel in the menu's image data. Use of QuickDraw's
+ ScrollRect API to scroll the menu contents will result in the alpha channel being set to 0xFF
+ (opaque) and the menu will no longer be transparent.
+
+ The menu definition should not modify the menu field of the MenuTrackingData.
+
+ kMenuHiliteItemMsg
+
+ menuRect menu bounds
+ hitPt unused
+ whichItem MDEFHiliteItemData*
+
+ Sent when the Menu Manager is displaying a menu and needs to hilite a newly selected
+ item. The whichItem parameter is actually a pointer to a MDEFHiliteItemData structure.
+ The menu definition should unhilite the item in the previousItem field, if non-zero,
+ and hilite the item in the newItem field.
+
+ Menu definitions should use the EraseMenuBackground API to erase the old menu contents
+ before unhiliting a menu item, if the menu definition is using the Appearance Manager's
+ menu drawing APIs. This is necessary because the background of a menu is transparent on
+ Aqua, and if the old hilite is not erased first, it will show through the new unhilited
+ menu background.
+
+ If the menu definition uses QuickDraw to draw, it should draw into the current port.
+
+ If the menu definition uses CoreGraphics to draw, it should use the CGContextRef passed
+ in the context field of the MDEFHiliteItemData structure.
+
+ kMenuDrawItemsMsg
+
+ menuRect menu bounds
+ hitPt unused
+ whichItem MDEFDrawItemsData*
+
+ Sent when the Menu Manager is displaying a menu and needs to redraw a portion of the
+ menu. This message is used by the dynamic menu item support code in the Menu Manager;
+ for example, if items five and six in a menu are a dynamic group, the Menu Manager will
+ send a DrawItems message when the group's modifier key is pressed or released to redraw
+ the appropriate item, but no other items in the menu.
+
+ The whichItem parameter for this message is actually a pointer to a MDEFDrawItemsData
+ structure. The menu definition should redraw the items starting with firstItem and
+ ending with lastItem, inclusive.
+
+ If the menu definition uses QuickDraw to draw, it should draw into the current port.
+
+ If the menu definition uses CoreGraphics to draw, it should use the CGContextRef passed
+ in the context field of the MDEFDrawItemsData structure.
+
+ kMenuDrawMsg
+
+ menuRect menu bounds
+ hitPt unused
+ whichItem MDEFDrawData*
+
+ Sent when the Menu Manager is displaying a menu and needs to redraw the entire menu.
+ The whichItem parameter is actually a pointer to a MenuTrackingData structure. On entry,
+ the menu field of this structure is valid. The menu definition should draw the menu and,
+ if it supports scrolling, should also fill in the virtualMenuTop and virtualMenuBottom
+ fields of the structure to indicate the menu's initial unscrolled position; typically,
+ virtualMenuTop would be set to the same value as the top coordinate of the menu rect,
+ and virtualMenuBottom would be set to virtualMenuTop plus the virtual height of the menu.
+
+ If the menu definition uses QuickDraw to draw, it should draw into the current port.
+
+ If the menu definition uses CoreGraphics to draw, it should use the CGContextRef passed
+ in the context field of the MDEFDrawData structure.
+
+ kMenuSizeMsg
+
+ menuRect unused
+ hitPt maximum width and height of the menu
+ whichItem unused
+
+ Sent when the Menu Manager needs to determine the size of a menu. The menu definition
+ should calculate the width and height of the menu and store the sizes into the menu with
+ SetMenuWidth and SetMenuHeight.
+
+ If the gestaltMenuMgrSendsMenuBoundsToDefProc bit is set in the Menu Manager's Gestalt
+ value, then the hitPt parameter to this message is the maximum width (hitPt.h) and height
+ (hitPt.v) of the menu. The menu definition should ensure that the width and height that it
+ places in the menu do not exceed these values. If the gestalt bit is not set, the menu
+ definition should just use the main GDevice's width and height as constraints on the menu's
+ width and height.
+
+ kMenuPopUpMsg
+
+ menuRect on entry, constraints on the menu's position; on exit, menu bounds
+ hitPt requested menu location, with swapped coordinates
+ whichItem on entry, requested initial selection; on exit, virtual menu top
+
+ Sent when the Menu Manager is about to display a popup menu. The menu definition should
+ calculate the appropriate menu bounds to contain the menu based on the requested menu
+ location and selected item. It should write the menuBounds into the rect given by the
+ menuRect parameter.
+
+ If the gestaltMenuMgrSendsMenuBoundsToDefProc bit is set in the Menu Manager's Gestalt
+ value, then the menuRect parameter on entry to this message contains a constraint rect,
+ in global coordinates, outside of which the popup menu should not be positioned. The menu
+ definition should take this constraint rect into account as it calculates the menu bounds.
+ If the gestalt bit is not set, the menu definition should use the bounds of the GDevice
+ containing the menu's top left corner as a constraint on the menu's position.
+
+ The hitPt parameter is a requested location for the top left corner of the menu. The
+ coordinates of this parameter are swapped from their normal order; the h field of the
+ hitPt parameter contains the vertical coordinate, and the v field of hitPt contains
+ the horizontal coordinate.
+
+ On entry, the whichItem parameter points at a menu item index which is requested to be
+ the initial selection when the menu is displayed. After calculating the menu's bounds,
+ the menu definition should write the menu's virtual top coordinate into the location
+ pointed at by the whichItem parameter. If displaying the menu at the requested location
+ does not require scrolling, the virtual top will be the same as the menu bounds top;
+ if the menu must scroll to fit in the requested location, the virtual top may be different.
+
+ kMenuCalcItemMsg
+
+ menuRect on exit, item bounds
+ hitPt unused
+ whichItem the item whose rect to calculate
+
+ Sent when the Menu Manager needs to know the bounds of a menu item. The menu definition
+ should calculate the size of the item specified by the whichItem parameter, and store
+ the bounds in the rect specified by the menuRect parameter.
+
+ Some sample menu definition code provided by Apple has previously shown an implementation
+ of this message that always sets the top left corner of the item bounds to (0,0), regardless
+ of the item's actual position in the menu. For best future compatibility, menu definitions
+ should begin storing an item bounds that gives the item's actual position in the menu based
+ on the menu's current virtual top. For example, if the virtual menu top starts at 20, then
+ the menu definition would calculate an item bounds for the first item that starts at (0,20),
+ an item bounds for the second item that starts at (0,40), and so on. The menu definition
+ should call GetMenuTrackingData to get the menu's current virtual position, and use zero
+ for the menu top if GetMenuTrackingData returns an error.
+
+ kMenuThemeSavvyMsg
+
+ menuRect unused
+ hitPt unused
+ whichItem on exit, indicates theme-savvyness of the menu definition
+
+ Sent by the Menu Manager to determine whether the MDEF uses the Appearance Manager
+ menu-drawing functions to draw its menu. If it does, the menu definition should return
+ kThemeSavvyMenuResponse in the location pointed to by whichItem. If the menu definition
+ draws its own custom content without using the Appearance Manager menu-drawing functions,
+ it should ignore this message.
+
+ Low-memory Global Replacements
+
+ Pre-Carbon menu definitions needed to use several low-memory globals to communicate with the
+ Menu Manager. These globals have all been replaced or made obsolete in Carbon, as follows:
+
+ MenuDisable
+
+ MenuDisable is now set automatically by the Menu Manager using the value returned in the
+ itemUnderMouse field of the MenuTrackingData structure passed to kMenuFindItemMsg.
+
+ TopMenuItem
+ AtMenuBottom
+
+ TopMenuItem and AtMenuBottom are now set automatically by the Menu Manager using the
+ values returned in the virtualMenuTop and virtualMenuBottom fields of the MenuTrackingData
+ structure passed to kMenuDrawMsg and kMenuFindItemMsg.
+
+ mbSaveLoc
+
+ This undocumented low-memory global was used by pre-Carbon menu definitions to store
+ the bounding rect of the currently selected item and to avoid drawing glitches while
+ the menu definition was scrolling the contents of a menu that had submenus. The Menu
+ Manager now automatically sets the selected item bounds using the value returned in
+ the itemRect field of the MenuTrackingData structure passed to kMenuFindItemMsg. In
+ order to correctly support scrolling of menus with submenus, a menu definition should
+ verify, before scrolling the menu contents, that no submenus of the scrolling menu are
+ currently visible. A menu definition can use GetMenuTrackingData to verify this condition,
+ as follows:
+
+ Boolean SafeToScroll( MenuRef menuBeingScrolled )
+ (
+ MenuTrackingData lastMenuData;
+ return GetMenuTrackingData( NULL, &lastMenuData ) == noErr
+ && lastMenuData.menu == menuBeingScrolled;
+ )
+
+ If SafeToScroll returns false, the menu definition should not scroll the menu.
+}
+const
+{ menu defProc messages }
+ kMenuDrawMsg = 0;
+ kMenuSizeMsg = 2;
+ kMenuPopUpMsg = 3; { position the popup menu rect appropriately }
+ kMenuCalcItemMsg = 5;
+ kMenuThemeSavvyMsg = 7; { is your MDEF theme-savvy? If so, return kThemeSavvyMenuResponse in the whichItem parameter}
+ kMenuInitMsg = 8; { Return an error code in *whichItem to indicate success or failure. Only supported in Carbon. }
+ kMenuDisposeMsg = 9; { The menu is being destroyed. Only supported in Carbon.}
+ kMenuFindItemMsg = 10; { Determine which item is under the mouse. Only supported in Carbon.}
+ kMenuHiliteItemMsg = 11; { Hilite the specified item. Only supported in Carbon.}
+ kMenuDrawItemsMsg = 12; { Draw a range of items. Only supported in Carbon.}
+ mDrawMsg = kMenuDrawMsg; { obsolete constant name}
+ mSizeMsg = kMenuSizeMsg; { obsolete constant name}
+ mPopUpMsg = kMenuPopUpMsg; { obsolete constant name}
+ mCalcItemMsg = kMenuCalcItemMsg; { obsolete constant name}
+
+
+const
+ kThemeSavvyMenuResponse = $7473; { should be returned in *whichItem when handling kMenuThemeSavvyMsg}
+
+
+const
+{
+ * Proc ID for a normal text menu. This constant is not typically
+ * used.
+ }
+ textMenuProc = 0;
+
+ {
+ * Menu item command ID to indicate a hierarchical menu; the item
+ * icon ID is the hierarchical menu ID. This constant is deprecated.
+ * Use SetMenuItemHierarchicalID or SetMenuItemHierarchicalMenu
+ * instead of using this constant.
+ }
+ hMenuCmd = 27;
+
+ {
+ * A menu ID used with InsertMenu to insert a menu into the
+ * hierarchical portion of the menubar.
+ }
+ kInsertHierarchicalMenu = -1;
+
+ {
+ * The old name for kInsertHierarchicalMenu. This constant is
+ * deprecated.
+ }
+ hierMenu = -1;
+
+ {
+ * This value may be passed to InsertMenuItem, InsertMenuItemText,
+ * and InsertMenuItemTextWithCFString to indicate that the new item
+ * should be inserted at the end of the menu. Note that you can also
+ * just call AppendMenu[ItemText][WithCFString].
+ }
+ kHIMenuAppendItem = $0000FFFF;
+
+const
+ noMark = 0; { mark symbol for SetItemMark; other mark symbols are defined in Fonts.h }
+
+{ obsolete menu color table constants}
+const
+ mctAllItems = -98; {search for all Items for the given ID}
+ mctLastIDIndic = -99; {last color table entry has this in ID field}
+
+{ Constants for use with MacOS 8.0 (Appearance 1.0) and later}
+const
+ kMenuStdMenuProc = 63;
+ kMenuStdMenuBarProc = 63;
+
+{ For use with Get/SetMenuItemModifiers}
+const
+ kMenuNoModifiers = 0; { Mask for no modifiers}
+ kMenuShiftModifier = 1 shl 0; { Mask for shift key modifier}
+ kMenuOptionModifier = 1 shl 1; { Mask for option key modifier}
+ kMenuControlModifier = 1 shl 2; { Mask for control key modifier}
+ kMenuNoCommandModifier = 1 shl 3; { Mask for no command key modifier}
+
+{ For use with Get/SetMenuItemIconHandle}
+const
+ kMenuNoIcon = 0; { No icon}
+ kMenuIconType = 1; { Type for ICON}
+ kMenuShrinkIconType = 2; { Type for ICON plotted 16 x 16}
+ kMenuSmallIconType = 3; { Type for SICN}
+ kMenuColorIconType = 4; { Type for cicn}
+ kMenuIconSuiteType = 5; { Type for Icon Suite}
+ kMenuIconRefType = 6; { Type for Icon Ref}
+ kMenuCGImageRefType = 7; { Type for a CGImageRef (Mac OS X only)}
+ kMenuSystemIconSelectorType = 8; { Type for an OSType identifying an IconRef registered with Icon Services under kSystemIconsCreator (Mac OS X 10.1 and later only)}
+ kMenuIconResourceType = 9; { Type for a CFStringRef with the full name of a .icns resource in the main bundle of the process (Mac OS X 10.1 and later only)}
+
+{ For use with Get/SetMenuItemKeyGlyph}
+const
+ kMenuNullGlyph = $00; { Null (always glyph 1)}
+ kMenuTabRightGlyph = $02; { Tab to the right key (for left-to-right script systems)}
+ kMenuTabLeftGlyph = $03; { Tab to the left key (for right-to-left script systems)}
+ kMenuEnterGlyph = $04; { Enter key}
+ kMenuShiftGlyph = $05; { Shift key}
+ kMenuControlGlyph = $06; { Control key}
+ kMenuOptionGlyph = $07; { Option key}
+ kMenuSpaceGlyph = $09; { Space (always glyph 3) key}
+ kMenuDeleteRightGlyph = $0A; { Delete to the right key (for right-to-left script systems)}
+ kMenuReturnGlyph = $0B; { Return key (for left-to-right script systems)}
+ kMenuReturnR2LGlyph = $0C; { Return key (for right-to-left script systems)}
+ kMenuNonmarkingReturnGlyph = $0D; { Nonmarking return key}
+ kMenuPencilGlyph = $0F; { Pencil key}
+ kMenuDownwardArrowDashedGlyph = $10; { Downward dashed arrow key}
+ kMenuCommandGlyph = $11; { Command key}
+ kMenuCheckmarkGlyph = $12; { Checkmark key}
+ kMenuDiamondGlyph = $13; { Diamond key}
+ kMenuAppleLogoFilledGlyph = $14; { Apple logo key (filled)}
+ kMenuParagraphKoreanGlyph = $15; { Unassigned (paragraph in Korean)}
+ kMenuDeleteLeftGlyph = $17; { Delete to the left key (for left-to-right script systems)}
+ kMenuLeftArrowDashedGlyph = $18; { Leftward dashed arrow key}
+ kMenuUpArrowDashedGlyph = $19; { Upward dashed arrow key}
+ kMenuRightArrowDashedGlyph = $1A; { Rightward dashed arrow key}
+ kMenuEscapeGlyph = $1B; { Escape key}
+ kMenuClearGlyph = $1C; { Clear key}
+ kMenuLeftDoubleQuotesJapaneseGlyph = $1D; { Unassigned (left double quotes in Japanese)}
+ kMenuRightDoubleQuotesJapaneseGlyph = $1E; { Unassigned (right double quotes in Japanese)}
+ kMenuTrademarkJapaneseGlyph = $1F; { Unassigned (trademark in Japanese)}
+ kMenuBlankGlyph = $61; { Blank key}
+ kMenuPageUpGlyph = $62; { Page up key}
+ kMenuCapsLockGlyph = $63; { Caps lock key}
+ kMenuLeftArrowGlyph = $64; { Left arrow key}
+ kMenuRightArrowGlyph = $65; { Right arrow key}
+ kMenuNorthwestArrowGlyph = $66; { Northwest arrow key}
+ kMenuHelpGlyph = $67; { Help key}
+ kMenuUpArrowGlyph = $68; { Up arrow key}
+ kMenuSoutheastArrowGlyph = $69; { Southeast arrow key}
+ kMenuDownArrowGlyph = $6A; { Down arrow key}
+ kMenuPageDownGlyph = $6B; { Page down key}
+ kMenuAppleLogoOutlineGlyph = $6C; { Apple logo key (outline)}
+ kMenuContextualMenuGlyph = $6D; { Contextual menu key}
+ kMenuPowerGlyph = $6E; { Power key}
+ kMenuF1Glyph = $6F; { F1 key}
+ kMenuF2Glyph = $70; { F2 key}
+ kMenuF3Glyph = $71; { F3 key}
+ kMenuF4Glyph = $72; { F4 key}
+ kMenuF5Glyph = $73; { F5 key}
+ kMenuF6Glyph = $74; { F6 key}
+ kMenuF7Glyph = $75; { F7 key}
+ kMenuF8Glyph = $76; { F8 key}
+ kMenuF9Glyph = $77; { F9 key}
+ kMenuF10Glyph = $78; { F10 key}
+ kMenuF11Glyph = $79; { F11 key}
+ kMenuF12Glyph = $7A; { F12 key}
+ kMenuF13Glyph = $87; { F13 key}
+ kMenuF14Glyph = $88; { F14 key}
+ kMenuF15Glyph = $89; { F15 key}
+ kMenuControlISOGlyph = $8A; { Control key (ISO standard)}
+ kMenuEjectGlyph = $8C; { Eject key (available on Mac OS X 10.2 and later)}
+ kMenuEisuGlyph = $8D; { Japanese eisu key (available in Mac OS X 10.4 and later)}
+ kMenuKanaGlyph = $8E; { Japanese kana key (available in Mac OS X 10.4 and later)}
+
+
+{
+ * MenuAttributes
+ *
+ * Summary:
+ * Menu attributes control behavior of the entire menu. They are
+ * used with the Get/ChangeMenuAttributes APIs.
+ }
+type
+ MenuAttributes = UInt32;
+const
+{
+ * No column space is allocated for the mark character when this menu
+ * is drawn.
+ }
+ kMenuAttrExcludesMarkColumn = 1 shl 0;
+
+ {
+ * The menu title is automatically disabled when all items are
+ * disabled.
+ }
+ kMenuAttrAutoDisable = 1 shl 2;
+
+ {
+ * The pencil glyph from the Keyboard font (kMenuPencilGlyph) is used
+ * to draw the Control modifier key in menu keyboard equivalents.
+ * This appearance is typically used only by Japanese input method
+ * menus.
+ }
+ kMenuAttrUsePencilGlyph = 1 shl 3;
+
+ {
+ * The menu title is not drawn in the menubar, even when the menu is
+ * inserted in the menubar. Useful for adding command keys that don't
+ * correspond to a visible menu item; menu items with the desired
+ * command keys can be added to the menu and inserted in the menubar
+ * without making the menu visible. This attribute is available in
+ * Mac OS X 10.2 and later.
+ }
+ kMenuAttrHidden = 1 shl 4;
+
+ {
+ * If menu item separators are present at the beginning or end of the
+ * menu, or if multiple contiguous separators are present, the extra
+ * separator items are marked as hidden to avoid extra blank space in
+ * the menu. The menu is examined for extra separators whenever the
+ * menu size is recalculated. This attribute is available in Mac OS X
+ * 10.3 and later.
+ }
+ kMenuAttrCondenseSeparators = 1 shl 5;
+
+ {
+ * Disables automatic caching of the menu image by the Menu Manager.
+ * Automatic caching is provided for all menus that use an HIView to
+ * draw their content. Setting this attribute will prevent the Menu
+ * Manager from caching the menu image; instead, the menu will be
+ * drawn using the standard HIView drawing mechanism each time that
+ * it is displayed. This attribute is available in Mac OS X 10.3 and
+ * later.
+ }
+ kMenuAttrDoNotCacheImage = 1 shl 6;
+
+ {
+ * Disables substitution of command keys from the
+ * NSUserKeyEquivalents dictionary. By default, all menu items are
+ * checked for a match in the dictionary. Note that this attribute,
+ * to be effective, should be added at the time that the menu is
+ * created; once the menu has been searched for user command keys
+ * (which occurs in CalcMenuSize, in GetItemCmd and
+ * GetMenuItemCommandKey, and before command key matching), the
+ * original command keys are replaced by the user command keys and
+ * cannot be retrieved. For this reason, it is also not useful to
+ * clear this attribute; the original command keys cannot be
+ * restored. This attribute is available in Mac OS X 10.3 and later.
+ }
+ kMenuAttrDoNotUseUserCommandKeys = 1 shl 7;
+
+
+{
+ * MenuItemAttributes
+ *
+ * Summary:
+ * Menu item attributes control behavior of individual menu items.
+ * They are used with the Get/ChangeMenuItemAttributes APIs.
+ }
+type
+ MenuItemAttributes = UInt32;
+const
+{
+ * This item is disabled.
+ }
+ kMenuItemAttrDisabled = 1 shl 0;
+
+ {
+ * This item's icon is disabled.
+ }
+ kMenuItemAttrIconDisabled = 1 shl 1;
+
+ {
+ * Allows the parent item of a submenu to be selectable.
+ }
+ kMenuItemAttrSubmenuParentChoosable = 1 shl 2;
+
+ {
+ * This item changes dynamically based on modifier key state.
+ }
+ kMenuItemAttrDynamic = 1 shl 3;
+
+ {
+ * This item is not part of the same dynamic group as the previous
+ * item.
+ }
+ kMenuItemAttrNotPreviousAlternate = 1 shl 4;
+
+ {
+ * This item is not drawn when the menu is displayed. It is also not
+ * included in command key matching, unless the item also has either
+ * the Dynamic or IncludeInCmdKeyMatching attributes.
+ }
+ kMenuItemAttrHidden = 1 shl 5;
+
+ {
+ * This item is a separator; the text of the item is ignored.
+ }
+ kMenuItemAttrSeparator = 1 shl 6;
+
+ {
+ * This item is a menu section header; it is disabled and
+ * unselectable.
+ }
+ kMenuItemAttrSectionHeader = 1 shl 7;
+
+ {
+ * Metacharacters in the text of this item (such as the dash) are
+ * ignored.
+ }
+ kMenuItemAttrIgnoreMeta = 1 shl 8;
+
+ {
+ * This item is recognized by IsMenuKeyEvent when it is passed an
+ * auto-repeat keyboard event.
+ }
+ kMenuItemAttrAutoRepeat = 1 shl 9;
+
+ {
+ * When MenuEvent and IsMenuKeyEvent compare this item's keyboard
+ * equivalent against a keyboard event, they use the item's virtual
+ * keycode equivalent rather than its character code equivalent.
+ }
+ kMenuItemAttrUseVirtualKey = 1 shl 10;
+
+ {
+ * This item is drawn in a customized fashion by the application.
+ * Causes custom menu item drawing Carbon events to be sent. This
+ * attribute is available in CarbonLib 1.4 and Mac OS X 10.1, and
+ * later.
+ }
+ kMenuItemAttrCustomDraw = 1 shl 11;
+
+ {
+ * This item is examined during command key matching by MenuKey,
+ * MenuEvent, and IsMenuKeyEvent. Normally, visible menu items are
+ * included in command key matching, but hidden menu items are
+ * excluded (unless the item also has the Dynamic menu item
+ * attribute). The IncludeInCmdKeyMatching attribute can be used to
+ * force a hidden, non-dynamic menu item to be included in command
+ * key matching when it normally wouldn't. This attribute is
+ * available in CarbonLib 1.6 and Mac OS X 10.2 and later.
+ }
+ kMenuItemAttrIncludeInCmdKeyMatching = 1 shl 12;
+
+ {
+ * This item is automatically disabled if, when
+ * kEventCommandUpdateStatus is sent for this item, no handler is
+ * installed or all handlers return eventNotHandledErr. A return
+ * value from any handler of any value other than eventNotHandledErr
+ * will prevent automatic disabling. This attribute is useful for
+ * applications that use kEventCommandUpdateStatus events for all
+ * menu item enabling; previously, an application would need to
+ * install UpdateStatus handlers on its application target to disable
+ * all items in the application that were unnecessary when no
+ * document windows were open. By setting this attribute, all menu
+ * items will be disabled automatically unless specifically enabled
+ * by an UpdateStatus handler on a window, control, or application
+ * target. This attribute is available in Mac OS X 10.3 and later.
+ }
+ kMenuItemAttrAutoDisable = 1 shl 13;
+
+ {
+ * During command key matching, the Menu Manager uses a cache of the
+ * available command keys to locate the menu item that matches an
+ * event. Before returning this item, the Menu Manager sends a
+ * kEventMenuEnableItems event to the menu containing the item, and a
+ * kEventCommandUpdateStatus event to each item in the menu, so that
+ * the item can be properly enabled or disabled. For some
+ * applications, updating the item status for each item in the menu
+ * is quite expensive, and also unnecessary since only a single item
+ * actually needs to be updated. Setting this attribute indicates to
+ * the Menu Manager that it only needs to send a
+ * kEventCommandUpdateStatus event to this menu item before returning
+ * it from command key matching; kEventMenuEnableItems will not be
+ * sent to the menu, and no other menu item will receive
+ * kEventCommandUpdateStatus.
+ }
+ kMenuItemAttrUpdateSingleItem = 1 shl 14;
+
+
+{
+ * MenuTrackingMode
+ *
+ * Summary:
+ * A menu tracking mode constant is part of the
+ * kEventMenuBeginTracking and kEventMenuChangeTrackingMode Carbon
+ * events. It indicates whether menus are being tracked using the
+ * mouse or keyboard.
+ }
+type
+ MenuTrackingMode = UInt32;
+const
+{
+ * Menus are being tracked using the mouse.
+ }
+ kMenuTrackingModeMouse = 1;
+
+ {
+ * Menus are being tracked using the keyboard.
+ }
+ kMenuTrackingModeKeyboard = 2;
+
+
+{
+ * MenuEventOptions
+ *
+ * Summary:
+ * Menu event options control how the menus are searched for an item
+ * matching a particular keyboard event. They are used with the
+ * IsMenuKeyEvent API.
+ }
+type
+ MenuEventOptions = UInt32;
+const
+{
+ * Disabled items are examined for a match.
+ }
+ kMenuEventIncludeDisabledItems = $0001;
+
+ {
+ * Don't hilite the menu title if a match is found.
+ }
+ kMenuEventQueryOnly = $0002;
+
+ {
+ * Don't look for a match in submenus of the starting menu.
+ }
+ kMenuEventDontCheckSubmenus = $0004;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Menu Types }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ MenuID = SInt16;
+type
+ MenuItemIndex = UInt16;
+ MenuItemIndex_fix = MenuItemIndex; { used as field type when a record declaration contains a MenuItemIndex field identifier }
+ MenuItemIndexPtr = ^MenuItemIndex;
+ MenuCommand = UInt32;
+type
+ MenuRef = ^SInt32; { an opaque 32-bit type }
+ MenuRef_fix = MenuRef; { used as field type when a record declaration contains a MenuRef field identifier }
+ MenuRefPtr = ^MenuRef;
+{ MenuHandle is old name for MenuRef}
+type
+ MenuHandle = MenuRef;
+
+
+{
+ A MenuBarHandle is a handle to a MenuBarHeader. An instance of this structure is returned
+ by the GetMenuBar and GetNewMBar APIs. It is typedef'd to a plain Handle to retain
+ source compatibility with previous versions of this header file.
+}
+type
+ MenuBarHandle = Handle;
+
+{
+ * MenuBarHeader
+ *
+ * Summary:
+ * This structure is contained in a MenuBarHandle. It contains a
+ * list of the non-hierarchical menus that have been inserted into
+ * the menubar.
+ *
+ * Discussion:
+ * The MenuBarHandle is a dynamically sized object which cannot be
+ * directly expressed as a C or Pascal structure. First is the
+ * MenuBarHeader structure, followed by a dynamically sized array of
+ * MenuBarMenus, one for each menu. This array is followed by the
+ * HMenuBarHeader, followed by another dynamically sized array of
+ * HMenuBarMenus, one for each hierarchical menu.
+ }
+type
+ MenuBarHeaderPtr = ^MenuBarHeader;
+ MenuBarHeader = record
+{
+ * Offset in bytes from the start of the header to the last menu in
+ * the array of MenuBarMenus.
+ }
+ lastMenu: UInt16;
+
+ {
+ * Global coordinate of the right edge of the rightmost menu; unused
+ * in a MenuBarHandle returned by GetMenuBar or GetNewMBar.
+ }
+ lastRight: SInt16;
+
+ {
+ * The MBDF resource ID; unused in a MenuBarHandle returned by
+ * GetMenuBar or GetNewMBar.
+ }
+ mbResID: SInt16;
+ end;
+
+{
+ * HMenuBarHeader
+ *
+ * Summary:
+ * This structure is contained in a MenuBarHandle. It contains a
+ * list of the hierarchical menus that have been inserted into the
+ * menubar with InsertMenu( menu, -1 ).
+ *
+ * Discussion:
+ * The hierarchical portion of the menubar follows the
+ * non-hierarchical portion in a menubar handle. The hierarchical
+ * portion begins with the HMenuBarHeader structure, followed by a
+ * dynamically sized array of HMenuBarMenus.
+ }
+type
+ HMenuBarHeaderPtr = ^HMenuBarHeader;
+ HMenuBarHeader = record
+{
+ * Offset in bytes from the start of the header to the last menu in
+ * the array of HMenuBarMenus.
+ }
+ lastHMenu: UInt16;
+
+ {
+ * Saved bits behind the hilited menu title; unused in a
+ * MenuBarHandle returned by GetMenuBar or GetNewMBar.
+ }
+ menuTitleBits: PixMapHandle;
+ end;
+
+{
+ * MenuBarMenu
+ *
+ * Summary:
+ * This structure contains a single menu in the menubar. It is an
+ * element in an array in the MenuBarHeader data strucuture.
+ }
+type
+ MenuBarMenuPtr = ^MenuBarMenu;
+ MenuBarMenu = record
+{
+ * A menu in the menubar.
+ }
+ menu: MenuRef;
+
+ {
+ * The global coordinate of the left edge of the menu title; unused
+ * in a MenuBarHandle returned by GetMenuBar or GetNewMBar.
+ }
+ menuLeft: SInt16;
+ end;
+
+{
+ * HMenuBarMenu
+ *
+ * Summary:
+ * This structure contains a single hierarchical menu in the
+ * menubar. It is an element in an array in the HMenuBarHeader data
+ * strucuture.
+ }
+type
+ HMenuBarMenuPtr = ^HMenuBarMenu;
+ HMenuBarMenu = record
+{
+ * An hierarchical menu in the menubar.
+ }
+ menu: MenuRef;
+
+ {
+ * This field is currently unused.
+ }
+ reserved: SInt16;
+ end;
+type
+ MCEntry = record
+ mctID: MenuID; {menu ID. ID = 0 is the menu bar}
+ mctItem: SInt16; {menu Item. Item = 0 is a title}
+ mctRGB1: RGBColor; {usage depends on ID and Item}
+ mctRGB2: RGBColor; {usage depends on ID and Item}
+ mctRGB3: RGBColor; {usage depends on ID and Item}
+ mctRGB4: RGBColor; {usage depends on ID and Item}
+ mctReserved: SInt16; {reserved for internal use}
+ end;
+ MCEntryPtr = ^MCEntry;
+type
+ MCTable = array [0..0] of MCEntry; {ARRAY [1..numEntries] of MCEntry}
+ MCTablePtr = ^MCTable;
+ MCTableHandle = ^MCTablePtr;
+type
+ MenuCRsrc = record
+ numEntries: SInt16; {number of entries}
+ mcEntryRecs: MCTable;
+ end;
+ MenuCRsrcPtr = ^MenuCRsrc;
+type
+ MenuCRsrcHandle = ^MenuCRsrcPtr;
+
+
+{
+ * MenuTrackingData
+ *
+ * Summary:
+ * The MenuTrackingData structure contains information about a menu
+ * currently being displayed. It is used with the
+ * GetMenuTrackingData API.
+ }
+type
+ MenuTrackingData = record
+ menu: MenuRef;
+ itemSelected: MenuItemIndex;
+ itemUnderMouse: MenuItemIndex;
+ itemRect: Rect;
+ virtualMenuTop: SInt32;
+ virtualMenuBottom: SInt32;
+ end;
+ MenuTrackingDataPtr = ^MenuTrackingData;
+
+{
+ * MDEFHiliteItemData
+ *
+ * Summary:
+ * The MDEFHiliteItemData structure contains information about which
+ * menu items should be hilited and unhilited as the user moves
+ * through the menus. It is used by menu definition functions, which
+ * receive a pointer to an MDEFHiliteItemData structure as the
+ * whichItem parameter during kMenuHiliteItemMsg.
+ }
+type
+ MDEFHiliteItemData = record
+{
+ * The item that was previously selected. It should be redrawn in an
+ * unhilited state. May be zero if no item was previously selected.
+ }
+ previousItem: MenuItemIndex;
+
+ {
+ * The item that is now selected. It should be redrawn in a hilited
+ * state. May be zero if no item is now selected.
+ }
+ newItem: MenuItemIndex;
+
+ {
+ * A CoreGraphics context that the MDEF should draw into. The Menu
+ * Manager will flush the context after the MDEF has returned.
+ }
+ context: UnivPtr;
+ end;
+ MDEFHiliteItemDataPtr = ^MDEFHiliteItemData;
+type
+ HiliteMenuItemData = MDEFHiliteItemData;
+type
+ HiliteMenuItemDataPtr = MDEFHiliteItemDataPtr;
+
+{
+ * MDEFDrawData
+ *
+ * Summary:
+ * The MDEFDrawData structure contains information needed to draw a
+ * menu. It is used by menu definition functions, which receive a
+ * pointer to an MDEFDrawData structure as the whichItem parameter
+ * during kMenuDrawMsg.
+ }
+type
+ MDEFDrawData = record
+{
+ * Information about the menu being drawn. The MDEF should fill in
+ * the virtualMenuTop and virtualMenuBottom fields of this structure
+ * while drawing the menu.
+ }
+ trackingData: MenuTrackingData;
+
+ {
+ * A CoreGraphics context that the MDEF should draw into. The Menu
+ * Manager will flush the context after the MDEF has returned.
+ }
+ context: UnivPtr;
+ end;
+ MDEFDrawDataPtr = ^MDEFDrawData;
+
+{
+ * MDEFFindItemData
+ *
+ * Summary:
+ * The MDEFFindItemData structure contains information needed to
+ * determine which item is currently selected by the user. It is
+ * used by menu definition functions, which receive a pointer to an
+ * MDEFDrawData structure as the whichItem parameter during
+ * kMenuFindItemMsg.
+ }
+type
+ MDEFFindItemData = record
+{
+ * Information about the menu being drawn. The MDEF should fill in
+ * the itemSelected, itemUnderMouse, and itemRect fields of this
+ * structure after determining which item is at the specified point.
+ }
+ trackingData: MenuTrackingData;
+
+ {
+ * A CoreGraphics context that the MDEF should draw into if it needs
+ * to scroll the menu during the FindItem message. The Menu Manager
+ * will flush the context after the MDEF has returned.
+ }
+ context: UnivPtr;
+ end;
+ MDEFFindItemDataPtr = ^MDEFFindItemData;
+
+{
+ * MDEFDrawItemsData
+ *
+ * Summary:
+ * The MDEFDrawItemsData structure contains information about which
+ * menu items to redraw. It is used by menu definition functions,
+ * which receive a pointer to an MDEFDrawItemsData structure as the
+ * whichItem parameter during kMenuDrawItemsMsg.
+ }
+type
+ MDEFDrawItemsData = record
+{
+ * The first item to draw.
+ }
+ firstItem: MenuItemIndex;
+
+ {
+ * The last item to draw.
+ }
+ lastItem: MenuItemIndex;
+
+ {
+ * Information about the menu's tracking state. The virtualMenuTop
+ * and virtualMenuBottom fields in this structure will be the most
+ * useful in handling the DrawItems message.
+ }
+ trackingData: MenuTrackingDataPtr;
+
+ {
+ * A CoreGraphics context that the MDEF should draw into. The Menu
+ * Manager will flush the context after the MDEF returns.
+ }
+ context: UnivPtr;
+ end;
+ MDEFDrawItemsDataPtr = ^MDEFDrawItemsData;
+
+{
+ * Summary:
+ * A MenuItemDataFlags value indicates which fields of a
+ * MenuItemDataRec structure should be used by the
+ * Copy/SetMenuItemData APIs. All MenuItemDataFlags may be used when
+ * getting or setting the contents of a menu item; some may also be
+ * used when getting or setting information about the menu itself,
+ * if the item index given to Copy/SetMenuItemData is 0.
+ }
+const
+{
+ * Set or return the Str255 text of a menu using the
+ * MenuItemDataRec.text field. If getting the text, the text field
+ * must be initialized with a pointer to a Str255 variable before
+ * calling CopyMenuItemData. If both kMenuItemDataText and
+ * kMenuItemCFString are set on entry to CopyMenuItemData, the API
+ * will determine whether the menu text was most recently set using a
+ * Str255 or CFString, and return only that text format; the flags
+ * value for the other format will be cleared. Valid for both menu
+ * items and the menu title (if item number is 0).
+ }
+ kMenuItemDataText = 1 shl 0;
+
+ {
+ * Set or return the mark character of a menu item using the
+ * MenuItemDataRec.mark field. Valid only for menu items.
+ }
+ kMenuItemDataMark = 1 shl 1;
+
+ {
+ * Set or return the command key of a menu item using the
+ * MenuItemDataRec.cmdKey field. Valid only for menu items.
+ }
+ kMenuItemDataCmdKey = 1 shl 2;
+
+ {
+ * Set or return the command key glyph of a menu item using the
+ * MenuItemDataRec.cmdKeyGlyph field. Valid only for menu items.
+ }
+ kMenuItemDataCmdKeyGlyph = 1 shl 3;
+
+ {
+ * Set or return the command key modifiers of a menu item using the
+ * MenuItemDataRec.cmdKeyModifiers field. Valid only for menu items.
+ }
+ kMenuItemDataCmdKeyModifiers = 1 shl 4;
+
+ {
+ * Set or return the QuickDraw text style of a menu item using the
+ * MenuItemDataRec.style field. Valid only for menu items.
+ }
+ kMenuItemDataStyle = 1 shl 5;
+
+ {
+ * Set or return the enable state of a menu using the
+ * MenuItemDataRec.enabled field. Valid for both menu items and the
+ * menu itself (if item number is 0).
+ }
+ kMenuItemDataEnabled = 1 shl 6;
+
+ {
+ * Set or return the enable state of a menu item icon using the
+ * MenuItemDataRec.iconEnabled field. Valid only for menu items.
+ }
+ kMenuItemDataIconEnabled = 1 shl 7;
+
+ {
+ * Set or return the icon resource ID of a menu item using the
+ * MenuItemDataRec.iconID field. Valid only for menu items.
+ }
+ kMenuItemDataIconID = 1 shl 8;
+
+ {
+ * Set or return the icon handle of a menu item using the
+ * MenuItemDataRec.iconType and MenuItemDataRec.iconHandle fields.
+ * Both fields must be initialized if setting the icon handle; both
+ * fields will be returned when getting the handle. The iconType
+ * field should contain one of the constants kMenuIconType,
+ * kMenuShrinkIconType, kMenuSmallIconType, kMenuColorIconType,
+ * kMenuIconSuiteType, kMenuIconRefType, kMenuCGImageRefType,
+ * kMenuSystemIconSelectorType, or kMenuIconResourceType. An icon
+ * handle may be a handle to an ICON resource, a SICN resource, a
+ * cicn resource, an IconSuite, an IconRef, a CGImageRef, an OSType,
+ * or a CFStringRef. Valid only for menu items.
+ }
+ kMenuItemDataIconHandle = 1 shl 9;
+
+ {
+ * Set or return the command ID of a menu item using the
+ * MenuItemDataRec.cmdID field. Valid only for menu items.
+ }
+ kMenuItemDataCommandID = 1 shl 10;
+
+ {
+ * Set or return the text encoding of a menu item using the
+ * MenuItemDataRec.encoding field. Valid only for menu items.
+ }
+ kMenuItemDataTextEncoding = 1 shl 11;
+ kMenuItemDataSubmenuID = 1 shl 12;
+ kMenuItemDataSubmenuHandle = 1 shl 13;
+ kMenuItemDataFontID = 1 shl 14;
+ kMenuItemDataRefcon = 1 shl 15;
+ kMenuItemDataAttributes = 1 shl 16;
+ kMenuItemDataCFString = 1 shl 17;
+
+ {
+ * Set or return the properties of a menu using the
+ * MenuItemDataRec.properties field. If setting the properties, the
+ * properties field should contain a collection with the new
+ * properties; existing menu properties with the same collection
+ * creator and tag will be replaced by the new properties. If getting
+ * the properties, the properties field should either be set to NULL
+ * or to a valid Collection. If NULL, a new collection is allocated
+ * by the CopyMenuItemData and returned in the properties field. If
+ * not NULL, the entire contents of the collection are replaced by
+ * the properties of the menu. Valid for both menu items and the menu
+ * itself (if item number is 0).
+ }
+ kMenuItemDataProperties = 1 shl 18;
+
+ {
+ * Set or return the item indent level of a menu item using the
+ * MenuItemDataRec.indent field. Valid only for menu items.
+ }
+ kMenuItemDataIndent = 1 shl 19;
+
+ {
+ * Set or return the virtual key code keyboard equivalent of a menu
+ * item using the MenuItemDataRec.cmdVirtualKey field. Valid only for
+ * menu items. On output, only valid if the item has the
+ * kMenuItemAttrUseVirtualKeyCode attribute.
+ }
+ kMenuItemDataCmdVirtualKey = 1 shl 20;
+ kMenuItemDataAllDataVersionOne = $000FFFFF;
+ kMenuItemDataAllDataVersionTwo = kMenuItemDataAllDataVersionOne or kMenuItemDataCmdVirtualKey;
+
+type
+ MenuItemDataFlags = UInt64;
+
+{
+ * MenuItemDataRec
+ *
+ * Summary:
+ * The MenuItemDataRec structure is used to get and change aspects
+ * of a menu item. It is used with the Copy/SetMenuItemData APIs.
+ *
+ * Discussion:
+ * When using this structure with Copy/SetMenuItemData, the caller
+ * must first set the whichData field to a combination of
+ * MenuItemDataFlags indicating which specific data should be
+ * retrieved or set. Some fields also require initialization before
+ * calling CopyMenuItemData; see the individual MenuItemDataFlags
+ * documentation for details.
+ }
+type
+ MenuItemDataRecPtr = ^MenuItemDataRec;
+ MenuItemDataRec = record
+ whichData: MenuItemDataFlags;
+ text: StringPtr;
+ mark: UniChar;
+ cmdKey: UniChar;
+ cmdKeyGlyph: UInt32;
+ cmdKeyModifiers: UInt32;
+ style: Style_fix;
+ enabled: Boolean;
+ iconEnabled: Boolean;
+ filler1: SInt8;
+ iconID: SInt32;
+ iconType: UInt32;
+ iconHandle: Handle;
+ cmdID: MenuCommand;
+ encoding: TextEncoding;
+ submenuID: MenuID;
+ submenuHandle: MenuRef;
+ fontID: SInt32;
+ refcon: UInt32;
+ attr: OptionBits;
+ cfText: CFStringRef;
+ properties: Collection;
+ indent: UInt32;
+ cmdVirtualKey: UInt16;
+ end;
+type
+ MenuItemDataPtr = MenuItemDataRecPtr;
+type
+ MenuItemID = UInt32;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Menu ProcPtrs }
+{ All of these procs are considered deprecated. Developers interested in portability }
+{ to Carbon should avoid them entirely, if at all possible. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ MenuDefProcPtr = procedure( message: SInt16; theMenu: MenuRef; var menuRect: Rect; hitPt: Point; var whichItem: SInt16 );
+type
+ MenuDefUPP = MenuDefProcPtr;
+{
+ * NewMenuDefUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewMenuDefUPP( userRoutine: MenuDefProcPtr ): MenuDefUPP; external name '_NewMenuDefUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeMenuDefUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeMenuDefUPP( userUPP: MenuDefUPP ); external name '_DisposeMenuDefUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeMenuDefUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeMenuDefUPP( message: SInt16; theMenu: MenuRef; var menuRect: Rect; hitPt: Point; var whichItem: SInt16; userUPP: MenuDefUPP ); external name '_InvokeMenuDefUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+type
+ MenuBarDefProcPtr = function( selector: SInt16; message: SInt16; parameter1: SInt16; parameter2: SInt32 ): SInt32;
+type
+ MenuHookProcPtr = procedure;
+type
+ MBarHookProcPtr = function( var menuRect: Rect ): SInt16;
+type
+ MenuBarDefUPP = MenuBarDefProcPtr;
+type
+ MenuHookUPP = MenuHookProcPtr;
+type
+ MBarHookUPP = MBarHookProcPtr;
+{
+ * NewMenuBarDefUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * NewMenuHookUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * NewMBarHookUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * DisposeMenuBarDefUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * DisposeMenuHookUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * DisposeMBarHookUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * InvokeMenuBarDefUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * InvokeMenuHookUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * InvokeMBarHookUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+
+{
+ * Summary:
+ * Types of custom menu definitions.
+ }
+const
+{
+ * A custom menu definition using a function pointer based on the
+ * pre-Carbon MDEF model.
+ }
+ kMenuDefProcPtr = 0;
+
+ {
+ * A custom menu definition using an HIView subclass. Available in
+ * Mac OS X 10.3 and later.
+ }
+ kMenuDefClassID = 1;
+
+type
+ MenuDefType = UInt32;
+
+{
+ * MenuDefSpec
+ *
+ * Summary:
+ * Specifies a custom menu definition.
+ }
+type
+ MenuDefSpec = record
+{
+ * The type of menu definition: either kMenuDefProcPtr or
+ * kMenuDefClassID. kMenuDefClassID may only be used in Mac OS X 10.3
+ * and later.
+ }
+ defType: MenuDefType;
+ case SInt16 of
+ 0: (
+ defProc: MenuDefUPP;
+ );
+ 1: (
+ classID: CFStringRef;
+ initEvent: EventRef;
+ );
+ end;
+ MenuDefSpecPtr = ^MenuDefSpec;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Menu Manager Initialization }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * InitProcMenu()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * InitMenus()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Menu Manipulation }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * NewMenu()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function NewMenu( menuID_: MenuID; const (*var*) menuTitle: Str255 ): MenuRef; external name '_NewMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * [Mac]GetMenu()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetMenu( resourceID: SInt16 ): MenuRef; external name '_GetMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+function MacGetMenu( resourceID: SInt16 ): MenuRef; external name '_GetMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DisposeMenu()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DisposeMenu( theMenu: MenuRef ); external name '_DisposeMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CalcMenuSize()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure CalcMenuSize( theMenu: MenuRef ); external name '_CalcMenuSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CountMItems()
+ *
+ * Summary:
+ * Renamed to CountMenuItems in Carbon
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * CountMenuItems()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.3 and later or as macro/inline
+ }
+function CountMenuItems( theMenu: MenuRef ): UInt16; external name '_CountMenuItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Routines available in Mac OS 8.5 and later, and on Mac OS 8.1 and later using CarbonLib 1.1 and later}
+
+{
+ * GetMenuFont()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+function GetMenuFont( menu: MenuRef; var outFontID: SInt16; var outFontSize: UInt16 ): OSStatus; external name '_GetMenuFont';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuFont()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+function SetMenuFont( menu: MenuRef; inFontID: SInt16; inFontSize: UInt16 ): OSStatus; external name '_SetMenuFont';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuExcludesMarkColumn()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+function GetMenuExcludesMarkColumn( menu: MenuRef ): Boolean; external name '_GetMenuExcludesMarkColumn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuExcludesMarkColumn()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+function SetMenuExcludesMarkColumn( menu: MenuRef; excludesMark: Boolean ): OSStatus; external name '_SetMenuExcludesMarkColumn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RegisterMenuDefinition()
+ *
+ * Summary:
+ * Registers or unregisters a binding between a resource ID and a
+ * menu definition function.
+ *
+ * Discussion:
+ * In the classic Mac OS Menu Manager, a 'MENU' resource can contain
+ * an embedded MDEF procID that is used by the Menu Manager as the
+ * resource ID of an 'MDEF' resource to measure and draw the menu.
+ * The 'MDEF' resource is loaded by the Menu Manager when you load
+ * the menu with GetMenu. Since MDEFs can no longer be packaged as
+ * code resources on Carbon, the procID can no longer refer directly
+ * to an MDEF resource. However, using RegisterMenuDefinition you
+ * can instead specify a UniversalProcPtr pointing to code in your
+ * application code fragment.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inResID:
+ * An MDEF proc ID, as used in a 'MENU' resource.
+ *
+ * inDefSpec:
+ * Specifies the MenuDefUPP that should be used for menus with the
+ * given MDEF proc ID. Passing NULL allows you to unregister the
+ * menu definition that had been associated with the given MDEF
+ * proc ID.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function RegisterMenuDefinition( inResID: SInt16; inDefSpec: MenuDefSpecPtr ): OSStatus; external name '_RegisterMenuDefinition';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CreateNewMenu()
+ *
+ * Summary:
+ * Creates a new, untitled, empty menu.
+ *
+ * Discussion:
+ * CreateNewMenu is preferred over NewMenu because it allows you to
+ * specify the menu's attributes and it does not require you to
+ * specify a Str255-based menu title. To set the menu title, you can
+ * use either SetMenuTitle or SetMenuTitleWithCFString.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenuID:
+ * The menu ID to use for the new menu. Zero is a valid menu ID in
+ * Carbon.
+ *
+ * inMenuAttributes:
+ * The menu attributes to use for the new menu.
+ *
+ * outMenuRef:
+ * On exit, contains the new menu.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateNewMenu( inMenuID: MenuID; inMenuAttributes: MenuAttributes; var outMenuRef: MenuRef ): OSStatus; external name '_CreateNewMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CreateCustomMenu()
+ *
+ * Summary:
+ * Creates a new, untitled, empty menu using a custom menu
+ * definition function.
+ *
+ * Discussion:
+ * Similar to CreateNewMenu, but also allows you to specify a custom
+ * menu definition function.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDefSpec:
+ * Specifies a custom menu definition function. defSpec->defType
+ * must be kMenuDefProcPtr or, on Mac OS X 10.3 and later,
+ * kMenuDefClassID.
+ *
+ * inMenuID:
+ * The menu ID to use for the new menu.
+ *
+ * inMenuAttributes:
+ * The menu attributes to use for the new menu.
+ *
+ * outMenuRef:
+ * On exit, contains the new menu.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateCustomMenu( const (*var*) inDefSpec: MenuDefSpec; inMenuID: MenuID; inMenuAttributes: MenuAttributes; var outMenuRef: MenuRef ): OSStatus; external name '_CreateCustomMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsValidMenu()
+ *
+ * Summary:
+ * Determines if a menu is valid.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu to check for validity.
+ *
+ * Result:
+ * Indicates whether the menu is valid.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function IsValidMenu( inMenu: MenuRef ): Boolean; external name '_IsValidMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuRetainCount()
+ *
+ * Summary:
+ * Returns the retain count of this menu.
+ *
+ * Discussion:
+ * In Mac OS X 10.2 and later, you can use CFGetRetainCount instead
+ * of GetMenuRetainCount.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu whose retain count to return.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMenuRetainCount( inMenu: MenuRef ): ItemCount; external name '_GetMenuRetainCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RetainMenu()
+ *
+ * Summary:
+ * Increments the retain count of a menu.
+ *
+ * Discussion:
+ * In Mac OS X 10.2 and later, you can use CFRetain instead of
+ * RetainMenu.
+ *
+ * RetainMenu does not create a new menu. It simply adds one to the
+ * retain count. If called on a menu that was not created by
+ * CarbonLib, it will not affect the menu's retain count.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu whose retain count to increment.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function RetainMenu( inMenu: MenuRef ): OSStatus; external name '_RetainMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ReleaseMenu()
+ *
+ * Summary:
+ * Decrements the retain count of a menu.
+ *
+ * Discussion:
+ * In Mac OS X 10.2 and later, you can use CFRelease instead of
+ * ReleaseMenu.
+ *
+ * If called on a menu that was not created by CarbonLib, it will
+ * not affect the menu's retain count.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu whose retain count to decrement. If the retain count
+ * falls to zero, the menu is destroyed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function ReleaseMenu( inMenu: MenuRef ): OSStatus; external name '_ReleaseMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DuplicateMenu()
+ *
+ * Summary:
+ * Creates a new menu that is a copy of another menu.
+ *
+ * Discussion:
+ * Unlike RetainMenu, DuplicateMenu creates an entirely new menu
+ * that is an exact copy of the original menu. The MDEF for the new
+ * menu will receive an init message after the menu has been fully
+ * created.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSourceMenu:
+ * The menu to duplicate.
+ *
+ * outMenu:
+ * On exit, a copy of the source menu.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function DuplicateMenu( inSourceMenu: MenuRef; var outMenu: MenuRef ): OSStatus; external name '_DuplicateMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CopyMenuTitleAsCFString()
+ *
+ * Summary:
+ * Returns a CFString containing the title of a menu.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu whose title to return.
+ *
+ * outString:
+ * On exit, a CFString containing the menu's title. This string
+ * must be released by the caller.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CopyMenuTitleAsCFString( inMenu: MenuRef; var outString: CFStringRef ): OSStatus; external name '_CopyMenuTitleAsCFString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuTitleWithCFString()
+ *
+ * Summary:
+ * Sets the title of a menu to the text contained in a CFString.
+ *
+ * Discussion:
+ * The Menu Manager will either make its own copy or just increment
+ * the refcount of the CFString before returning from
+ * SetMenuTitleWithCFString, depending on whether the string is
+ * mutable or immutable. If the string is mutable, modifying the
+ * string after calling SetMenuTitleWithCFString will have no effect
+ * on the menu's actual title. The caller may release the string
+ * after calling SetMenuTitleWithCFString.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu whose title to set.
+ *
+ * inString:
+ * The string containing the new menu title text.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetMenuTitleWithCFString( inMenu: MenuRef; inString: CFStringRef ): OSStatus; external name '_SetMenuTitleWithCFString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuTitleIcon()
+ *
+ * Summary:
+ * Sets the title of a menu to be an icon.
+ *
+ * Discussion:
+ * The Menu Manager takes ownership of the supplied icon after this
+ * call. When a menu with an title icon is disposed, the Menu
+ * Manager will dispose the icon also; the Menu Manager will also
+ * dispose of the current title icon when a new text or icon title
+ * is supplied for a menu. If an IconRef or CGImageRef is specified,
+ * the Menu Manager will increment its refcount, so you may freely
+ * release your reference to the icon or image without invalidating
+ * the Menu Manager's copy. The menubar will be invalidated by this
+ * call, and redrawn at the next opportunity.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu whose title to set.
+ *
+ * inType:
+ * The type of icon being used to specify the icon title; use
+ * kMenuNoIcon to remove the icon from the menu title. In Mac OS X
+ * 10.2 and earlier, the supported types are kMenuIconSuiteType
+ * and kMenuIconRefType; Mac OS X 10.3 also supports
+ * kMenuCGImageRefType.
+ *
+ * inIcon:
+ * The icon; must be NULL if inType is kMenuNoIcon. The supported
+ * icon formats are IconSuiteRef, IconRef, and in Mac OS X 10.3
+ * and later, CGImageRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetMenuTitleIcon( inMenu: MenuRef; inType: UInt32; inIcon: UnivPtr ): OSStatus; external name '_SetMenuTitleIcon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuTitleIcon()
+ *
+ * Summary:
+ * Retrieves the icon, if any, being used as the title of a menu.
+ *
+ * Discussion:
+ * This API does not increment a refcount on the returned icon. The
+ * caller should not release the icon.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu whose icon title to retrieve.
+ *
+ * outType:
+ * On exit, contains the type of icon being used as the title of
+ * the menu. Contains kMenuNoIcon if the menu does not have an
+ * icon title.
+ *
+ * outIcon:
+ * On exit, contains the IconSuiteRef, IconRef, or CGImageRef
+ * being used as the title of the menu, or NULL if the menu does
+ * not have an icon title. May be NULL.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMenuTitleIcon( inMenu: MenuRef; outType: UInt32Ptr { can be NULL }; outIcon: UnivPtrPtr { can be NULL } ): OSStatus; external name '_GetMenuTitleIcon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * InvalidateMenuSize()
+ *
+ * Summary:
+ * Invalidates the menu size so that it will be recalculated when
+ * next displayed.
+ *
+ * Discussion:
+ * The pre-Carbon technique for invalidating the menu size was to
+ * set the width and height to -1. Although this technique still
+ * works, for best compatibility it's preferable to use the
+ * InvalidateMenuSize API so that the Menu Manager has explicit
+ * notification that the menu is invalid.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu whose size to invalidate.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InvalidateMenuSize( inMenu: MenuRef ): OSStatus; external name '_InvalidateMenuSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsMenuSizeInvalid()
+ *
+ * Summary:
+ * Determines if a menu's size is invalid and should be recalculated.
+ *
+ * Discussion:
+ * The pre-Carbon technique for determining if a menu's size is
+ * invalid was to check if the width or height was -1. This
+ * technique is not always reliable on Carbon due to implementation
+ * changes in the Menu Manager. You should now use IsMenuSizeInvalid
+ * instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu whose size to examine.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function IsMenuSizeInvalid( inMenu: MenuRef ): Boolean; external name '_IsMenuSizeInvalid';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ÊMDEF support }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * EraseMenuBackground()
+ *
+ * Summary:
+ * Erases a portion of a menu background in preparation for further
+ * drawing.
+ *
+ * Discussion:
+ * It is necessary to erase the menu background before calling
+ * DrawThemeMenuBackground because some themes (such as Aqua on Mac
+ * OS X) draw the menu background using the alpha channel, and if
+ * the area underneath the menu background is not erased, portions
+ * of the old image will show through the menu background.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu whose background to erase.
+ *
+ * inEraseRect:
+ * The bounds of the area to erase, in local coordinates to the
+ * current port.
+ *
+ * inContext:
+ * The CG context to erase. If NULL, EraseMenuBackground will
+ * create a context based on the current port.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function EraseMenuBackground( inMenu: MenuRef; const (*var*) inEraseRect: Rect; inContext: CGContextRef { can be NULL } ): OSStatus; external name '_EraseMenuBackground';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ * ScrollMenuImage()
+ *
+ * Summary:
+ * Scrolls a portion of the menu image.
+ *
+ * Discussion:
+ * Menus on Mac OS X use an alpha channel, and QuickDraw does not
+ * support alpha channels. Therefore, scrolling a menu image with
+ * ScrollRect or other QuickDraw APIs does not work correctly; it
+ * results in the destruction of the alpha channel data. The
+ * ScrollMenuImage API uses CoreGraphics to move the menu image,
+ * preserving the alpha channel.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu whose image to scroll.
+ *
+ * inScrollRect:
+ * The bounds of the rect to scroll.
+ *
+ * inHScroll:
+ * The distance to scroll horizontally.
+ *
+ * inVScroll:
+ * The distance to scroll vertically.
+ *
+ * inContext:
+ * The CG context to erase. If NULL, ScrollMenuImage will create a
+ * context based on the current port.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function ScrollMenuImage( inMenu: MenuRef; const (*var*) inScrollRect: Rect; inHScroll: SInt32; inVScroll: SInt32; inContext: CGContextRef { can be NULL } ): OSStatus; external name '_ScrollMenuImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Menu Item Insertion }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * [Mac]AppendMenu()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure AppendMenu( menu: MenuRef; const (*var*) data: Str255 ); external name '_AppendMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+procedure MacAppendMenu( menu: MenuRef; const (*var*) data: Str255 ); external name '_AppendMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * InsertResMenu()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure InsertResMenu( theMenu: MenuRef; theType: ResType; afterItem: MenuItemIndex ); external name '_InsertResMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * AppendResMenu()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure AppendResMenu( theMenu: MenuRef; theType: ResType ); external name '_AppendResMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * [Mac]InsertMenuItem()
+ *
+ * Summary:
+ * Inserts a new menu item into a menu, using a Str255 for the item
+ * text.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * theMenu:
+ * The menu into which to insert the item.
+ *
+ * itemString:
+ * The text of the new item. This string is parsed for the
+ * meta-characters documented in the Menu Manager chapter of
+ * Inside Macintosh.
+ *
+ * afterItem:
+ * The menu item after which to insert the item. Pass 0 to insert
+ * the item at the beginning of the menu. If afterItem is greater
+ * than the number of items in the menu, the item is inserted at
+ * the end of the menu.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure InsertMenuItem( theMenu: MenuRef; const (*var*) itemString: Str255; afterItem: MenuItemIndex ); external name '_InsertMenuItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+procedure MacInsertMenuItem( theMenu: MenuRef; const (*var*) itemString: Str255; afterItem: MenuItemIndex ); external name '_InsertMenuItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DeleteMenuItem()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DeleteMenuItem( theMenu: MenuRef; item: MenuItemIndex ); external name '_DeleteMenuItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * InsertFontResMenu()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure InsertFontResMenu( theMenu: MenuRef; afterItem: MenuItemIndex; scriptFilter: SInt16 ); external name '_InsertFontResMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * InsertIntlResMenu()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure InsertIntlResMenu( theMenu: MenuRef; theType: ResType; afterItem: MenuItemIndex; scriptFilter: SInt16 ); external name '_InsertIntlResMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * AppendMenuItemText()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+function AppendMenuItemText( menu: MenuRef; const (*var*) inString: Str255 ): OSStatus; external name '_AppendMenuItemText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * InsertMenuItemText()
+ *
+ * Summary:
+ * Inserts a new menu item into a menu, using a Str255 for the item
+ * text.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * menu:
+ * The menu into which to insert the item.
+ *
+ * inString:
+ * The text of the new item. This string is not parsed for the
+ * meta-characters documented in the Menu Manager chapter of
+ * Inside Macintosh; the new item's text becomes exactly the
+ * specified text.
+ *
+ * afterItem:
+ * The menu item after which to insert the item. Pass 0 to insert
+ * the item at the beginning of the menu. If afterItem is greater
+ * than the number of items in the menu, the item is inserted at
+ * the end of the menu.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+function InsertMenuItemText( menu: MenuRef; const (*var*) inString: Str255; afterItem: MenuItemIndex ): OSStatus; external name '_InsertMenuItemText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CopyMenuItems()
+ *
+ * Summary:
+ * Copies menu items from one menu to another.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSourceMenu:
+ * The menu from which to copy items.
+ *
+ * inFirstItem:
+ * The first item to copy.
+ *
+ * inNumItems:
+ * The number of items to copy.
+ *
+ * inDestMenu:
+ * The menu to which to copy items.
+ *
+ * inInsertAfter:
+ * The menu item in the destination menu after which to insert the
+ * copied items. Pass 0 to insert the items at the beginning of
+ * the menu. This value of this parameter must not exceed the
+ * number of items in the destination menu.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CopyMenuItems( inSourceMenu: MenuRef; inFirstItem: MenuItemIndex; inNumItems: ItemCount; inDestMenu: MenuRef; inInsertAfter: MenuItemIndex ): OSStatus; external name '_CopyMenuItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DeleteMenuItems()
+ *
+ * Summary:
+ * Deletes multiple menu items.
+ *
+ * Discussion:
+ * This API is more efficient than calling DeleteMenuItem multiple
+ * times.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu from which to delete items.
+ *
+ * inFirstItem:
+ * The first item to delete.
+ *
+ * inNumItems:
+ * The number of items to delete.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function DeleteMenuItems( inMenu: MenuRef; inFirstItem: MenuItemIndex; inNumItems: ItemCount ): OSStatus; external name '_DeleteMenuItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * AppendMenuItemTextWithCFString()
+ *
+ * Summary:
+ * Appends a new menu item with text from a CFString.
+ *
+ * Discussion:
+ * The Menu Manager will either make its own copy or just increment
+ * the refcount of the CFString before returning from
+ * AppendMenuItemWithTextCFString, depending on whether the string
+ * is mutable or immutable. If the string is mutable, modifying the
+ * string after calling AppendMenuItemTextWithCFString will have no
+ * effect on the menu item's actual text. The caller may release the
+ * string after calling AppendMenuItemTextWithCFString.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu to which to append the new item.
+ *
+ * inString:
+ * The text of the new item.
+ *
+ * inAttributes:
+ * The attributes of the new item.
+ *
+ * inCommandID:
+ * The command ID of the new item.
+ *
+ * outNewItem:
+ * On exit, the index of the new item. May be NULL if the caller
+ * does not need this information.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function AppendMenuItemTextWithCFString( inMenu: MenuRef; inString: CFStringRef; inAttributes: MenuItemAttributes; inCommandID: MenuCommand; outNewItem: MenuItemIndexPtr { can be NULL } ): OSStatus; external name '_AppendMenuItemTextWithCFString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * InsertMenuItemTextWithCFString()
+ *
+ * Summary:
+ * Inserts a new menu item with text from a CFString.
+ *
+ * Discussion:
+ * The Menu Manager will either make its own copy or just increment
+ * the refcount of the CFString before returning from
+ * InsertMenuItemWithCFString, depending on whether the string is
+ * mutable or immutable. If the string is mutable, modifying the
+ * string after calling InsertMenuItemWithCFString will have no
+ * effect on the menu item's actual text. The caller may release the
+ * string after calling InsertMenuItemWithCFString.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu in which to insert the new item.
+ *
+ * inString:
+ * The text of the new item.
+ *
+ * inAfterItem:
+ * The item after which to insert the new item. Pass 0 to insert
+ * the item at the beginning of the menu. If inAfterItem is
+ * greater than the number of items in the menu, the item is
+ * inserted at the end of the menu.
+ *
+ * inAttributes:
+ * The attributes of the new item.
+ *
+ * inCommandID:
+ * The command ID of the new item.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InsertMenuItemTextWithCFString( inMenu: MenuRef; inString: CFStringRef; inAfterItem: MenuItemIndex; inAttributes: MenuItemAttributes; inCommandID: MenuCommand ): OSStatus; external name '_InsertMenuItemTextWithCFString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Menu Events }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * MenuKey()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function MenuKey( ch: CharParameter ): SInt32; external name '_MenuKey';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * MenuSelect()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function MenuSelect( startPt: Point ): SInt32; external name '_MenuSelect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * PopUpMenuSelect()
+ *
+ * Summary:
+ * Displays a pop-up menu at a specified location.
+ *
+ * Discussion:
+ * In Mac OS 9 and earlier, PopUpMenuSelect requires that the menu
+ * be inserted into the menubar using InsertMenu( menuRef,
+ * kInsertHierarchicalMenu ). CarbonLib 1.1 and later, and Mac OS X,
+ * do not have this requirement; a menu can be displayed by
+ * PopUpMenuSelect even if it is not inserted in the menubar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * menu:
+ * The menu to display.
+ *
+ * top:
+ * The vertical position, in global coordinates, of the top left
+ * corner of the selected item when the menu is opened.
+ *
+ * left:
+ * The horizontal position, in global coordinates, of the top left
+ * corner of the selected item when the menu is opened.
+ *
+ * popUpItem:
+ * The item that should be positioned at the global point
+ * specified by the top and left parameters. May be zero, in which
+ * case item one is positioned at the specified global point.
+ *
+ * Result:
+ * A 32-value whose high 16-bit word is the menu ID and whose low
+ * 16-bit word is the index of the menu item that was selected, or
+ * zero if no item was selected.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function PopUpMenuSelect( menu: MenuRef; top: SInt16; left: SInt16; popUpItem: MenuItemIndex ): SInt32; external name '_PopUpMenuSelect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * MenuChoice()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function MenuChoice: SInt32; external name '_MenuChoice';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * MenuEvent()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function MenuEvent( const (*var*) inEvent: EventRecord ): UInt32; external name '_MenuEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsMenuKeyEvent()
+ *
+ * Summary:
+ * Determines if an event corresponds to a menu command key.
+ *
+ * Discussion:
+ * By default, IsMenuKeyEvent searches the menus in the current menu
+ * bar and hilites the menu title of the menu containing the
+ * selected item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inStartMenu:
+ * IsMenuKeyEvent searches for matching menu items in this menu
+ * and all of its submenus. May be NULL to search the current menu
+ * bar contents.
+ *
+ * inEvent:
+ * The event to match against. Non-keyboard events are ignored.
+ *
+ * inOptions:
+ * Options controlling how to search. Pass kNilOptions for the
+ * default behavior.
+ *
+ * outMenu:
+ * On exit, the menu containing the matching item. May be NULL.
+ *
+ * outMenuItem:
+ * On exit, the menu item that matched. May be NULL.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function IsMenuKeyEvent( inStartMenu: MenuRef; inEvent: EventRef; inOptions: MenuEventOptions; outMenu: MenuRefPtr { can be NULL }; outMenuItem: MenuItemIndexPtr { can be NULL } ): Boolean; external name '_IsMenuKeyEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * InvalidateMenuEnabling()
+ *
+ * Summary:
+ * Causes the menu enable state to be recalculated at the next
+ * convenient opportunity.
+ *
+ * Discussion:
+ * It is common for state changes in an application (for example,
+ * selection of text) to cause a change in the enabling of items in
+ * the application's menu (for example, the Copy menu item might
+ * become enabled). In a Carbon-event-savvy application, menu items
+ * are enabled or disabled in response to an
+ * kEventCommandUpdateStatus event; however, this event is normally
+ * only sent before a command key press or a click in the menubar.
+ * You can request an explicit recalculation of a menu's enable
+ * state with the InvalidateMenuEnabling API. The Carbon Event
+ * Manager will automatically invalidate the enable state of all
+ * top-level menus when a user event is dispatched, the user focus
+ * changes, or the active window changes, so in many cases you will
+ * not need to explicitly invalidate the menu enabling state.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * A menu to re-enable, or NULL if all menus in the root menu
+ * should be re-enabled.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function InvalidateMenuEnabling( inMenu: MenuRef ): OSStatus; external name '_InvalidateMenuEnabling';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * Summary:
+ * Menu dismissal causation constants
+ }
+const
+{
+ * The menu was dismissed by the selection of a menu item.
+ }
+ kHIMenuDismissedBySelection = 1;
+
+ {
+ * The menu was dismissed because the user canceled menu tracking.
+ }
+ kHIMenuDismissedByUserCancel = 2;
+
+ {
+ * The menu was dismissed by a mouse-down somewhere that did not
+ * result in menu item selection.
+ }
+ kHIMenuDismissedByMouseDown = 3;
+
+ {
+ * The menu was dismissed by a mouse-up.
+ }
+ kHIMenuDismissedByMouseUp = 4;
+
+ {
+ * The menu was dismissed by a keyboard event.
+ }
+ kHIMenuDismissedByKeyEvent = 5;
+
+ {
+ * The menu was dismissed because the current application was no
+ * longer frontmost.
+ }
+ kHIMenuDismissedByAppSwitch = 6;
+
+ {
+ * The menu was dismissed because menu tracking mode timed out.
+ }
+ kHIMenuDismissedByTimeout = 7;
+
+ {
+ * The menu was dismissed by the CancelMenuTracking API.
+ }
+ kHIMenuDismissedByCancelMenuTracking = 8;
+
+ {
+ * The menu was dismissed because the active window changed.
+ }
+ kHIMenuDismissedByActivationChange = 9;
+
+ {
+ * The menu was dismissed bcause the user focus window changed, or
+ * because keyboard focus was removed from the current process.
+ }
+ kHIMenuDismissedByFocusChange = 10;
+
+{
+ * CancelMenuTracking()
+ *
+ * Summary:
+ * Cancels a menu tracking session.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRootMenu:
+ * The root menu of the menu tracking session that should be
+ * dismissed. For menubar tracking, use the result of AcquireRoot
+ * menu; for popup menu tracking, use the menu that was passed to
+ * PopUpMenuSelect.
+ *
+ * inImmediate:
+ * Whether the open menus should disappear immediately or fade out.
+ *
+ * inDismissalReason:
+ * Why the menu is being dismissed; this value will be added to
+ * the kEventMenuEndTracking event. If zero,
+ * kHIMenuDismissedByCancelMenuTracking is added to the
+ * EndTracking event.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function CancelMenuTracking( inRootMenu: MenuRef; inImmediate: Boolean; inDismissalReason: UInt32 ): OSStatus; external name '_CancelMenuTracking';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Menu Bar }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * GetMBarHeight()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetMBarHeight: SInt16; external name '_GetMBarHeight';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * [Mac]DrawMenuBar()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DrawMenuBar; external name '_DrawMenuBar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+procedure MacDrawMenuBar; external name '_DrawMenuBar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * InvalMenuBar()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure InvalMenuBar; external name '_InvalMenuBar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsMenuBarInvalid()
+ *
+ * Summary:
+ * Determines if the menubar is invalid and should be redrawn.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * rootMenu:
+ * The root menu for the menubar to be examined. Pass NULL to
+ * check the state of the current menubar.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function IsMenuBarInvalid( rootMenu: MenuRef ): Boolean; external name '_IsMenuBarInvalid';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HiliteMenu()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure HiliteMenu( menuID_: MenuID ); external name '_HiliteMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetNewMBar()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetNewMBar( menuBarID: SInt16 ): MenuBarHandle; external name '_GetNewMBar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuBar()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetMenuBar: MenuBarHandle; external name '_GetMenuBar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuBar()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetMenuBar( mbar: MenuBarHandle ); external name '_SetMenuBar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DuplicateMenuBar()
+ *
+ * Summary:
+ * Duplicates a menubar handle.
+ *
+ * Discussion:
+ * This API should be used in Carbon applications when duplicating a
+ * handle returned from GetMenuBar or GetNewMBar. You should not use
+ * Memory Manager APIs (HandToHand, NewHandle, etc) to duplicate
+ * such a handle. This is necessary in Carbon so that the refcounts
+ * of the menus in the menubar handle can be incremented when the
+ * handle is duplicated.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMbar:
+ * The menubar handle to duplicate.
+ *
+ * outMbar:
+ * On exit, contains the new menubar handle.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: not available
+ }
+function DuplicateMenuBar( inMbar: MenuBarHandle; var outMbar: MenuBarHandle ): OSStatus; external name '_DuplicateMenuBar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DisposeMenuBar()
+ *
+ * Summary:
+ * Releases a menubar handle.
+ *
+ * Discussion:
+ * This API should be used in Carbon applications when releasing a
+ * handle returned from GetMenuBar or GetNewMBar. You should not use
+ * DisposeHandle to release such a handle. This is necessary in
+ * Carbon so that the refcounts of the menus in the menubar handle
+ * can be decremented when the handle is released.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMbar:
+ * The menubar handle to release.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: not available
+ }
+function DisposeMenuBar( inMbar: MenuBarHandle ): OSStatus; external name '_DisposeMenuBar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuHandle()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetMenuHandle( menuID_: MenuID ): MenuRef; external name '_GetMenuHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+function GetMenuRef( menuID_: MenuID ): MenuRef; external name '_GetMenuHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * [Mac]InsertMenu()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure InsertMenu( theMenu: MenuRef; beforeID: MenuID ); external name '_InsertMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+procedure MacInsertMenu( theMenu: MenuRef; beforeID: MenuID ); external name '_InsertMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * [Mac]DeleteMenu()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DeleteMenu( menuID_: MenuID ); external name '_DeleteMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+procedure MacDeleteMenu( menuID_: MenuID ); external name '_DeleteMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ClearMenuBar()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure ClearMenuBar; external name '_ClearMenuBar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuFlash()
+ *
+ * Summary:
+ * Renamed to SetMenuFlashCount in Carbon
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * SetMenuFlashCount()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.3 and later or as macro/inline
+ }
+procedure SetMenuFlashCount( count: SInt16 ); external name '_SetMenuFlashCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * FlashMenuBar()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure FlashMenuBar( menuID_: MenuID ); external name '_FlashMenuBar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ These are obsolete because Carbon does not support desk accessories.}
+{
+ * SystemEdit()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * SystemMenu()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * IsMenuBarVisible()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+function IsMenuBarVisible: Boolean; external name '_IsMenuBarVisible';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ShowMenuBar()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+procedure ShowMenuBar; external name '_ShowMenuBar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HideMenuBar()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+procedure HideMenuBar; external name '_HideMenuBar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * AcquireRootMenu()
+ *
+ * Summary:
+ * Get the menu whose contents are displayed in the menubar.
+ *
+ * Discussion:
+ * The refcount of the root menu is incremented by this API. The
+ * caller should release a refcount with ReleaseMenu when itÕs done
+ * with the menu.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function AcquireRootMenu: MenuRef; external name '_AcquireRootMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetRootMenu()
+ *
+ * Summary:
+ * Sets the menu whose contents are displayed in the menubar.
+ *
+ * Discussion:
+ * The refcount of the root menu is incremented by this API. The
+ * caller may release the menu after calling SetRootMenu.
+ *
+ * A root menu should contain one menu item for each top-level menu
+ * that should be displayed in the menubar. Each menu item should
+ * have a submenu that was installed with
+ * SetMenuItemHierarchicalMenu.
+ *
+ * SetRootMenu also sets the contents of the hierarchical portion of
+ * the menulist (the set of menus that were inserted with
+ * InsertMenu( menu, kInsertHierarchicalMenu). If a menu that was
+ * returned by AcquireRootMenu is passed to SetRootMenu, the
+ * hierarchical menulist is changed to include the menus that were
+ * in the hierarchical menulist when AcquireRootMenu was called. If
+ * a newly created menu is passed to SetRootMenu, the hierarchical
+ * menulist is cleared and has no menus in it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The new root menu.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetRootMenu( inMenu: MenuRef ): OSStatus; external name '_SetRootMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Menu Item Accessors }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * CheckItem()
+ *
+ * Summary:
+ * Renamed to CheckMenuItem in Carbon
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * [Mac]CheckMenuItem()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.3 and later or as macro/inline
+ }
+procedure CheckMenuItem( theMenu: MenuRef; item: MenuItemIndex; checked: Boolean ); external name '_CheckMenuItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+procedure MacCheckMenuItem( theMenu: MenuRef; item: MenuItemIndex; checked: Boolean ); external name '_CheckMenuItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuItemText()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetMenuItemText( theMenu: MenuRef; item: MenuItemIndex; const (*var*) itemString: Str255 ); external name '_SetMenuItemText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuItemText()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure GetMenuItemText( theMenu: MenuRef; item: MenuItemIndex; var itemString: Str255 ); external name '_GetMenuItemText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetItemMark()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetItemMark( theMenu: MenuRef; item: MenuItemIndex; markChar: CharParameter ); external name '_SetItemMark';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetItemMark()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure GetItemMark( theMenu: MenuRef; item: MenuItemIndex; var markChar: CharParameter ); external name '_GetItemMark';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetItemCmd()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetItemCmd( theMenu: MenuRef; item: MenuItemIndex; cmdChar: CharParameter ); external name '_SetItemCmd';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetItemCmd()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure GetItemCmd( theMenu: MenuRef; item: MenuItemIndex; var cmdChar: CharParameter ); external name '_GetItemCmd';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetItemIcon()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetItemIcon( theMenu: MenuRef; item: MenuItemIndex; iconIndex: SInt16 ); external name '_SetItemIcon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ icon is returned in high byte of 16-bit iconIndex }
+{
+ * GetItemIcon()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure GetItemIcon( theMenu: MenuRef; item: MenuItemIndex; var iconIndex: SInt16 ); external name '_GetItemIcon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetItemStyle()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetItemStyle( theMenu: MenuRef; item: MenuItemIndex; chStyle: StyleParameter ); external name '_SetItemStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetItemStyle()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure GetItemStyle( theMenu: MenuRef; item: MenuItemIndex; var chStyle: Style ); external name '_GetItemStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ These APIs are not supported in Carbon. Please use EnableMenuItem and }
+{ DisableMenuItem (available back through Mac OS 8.5) instead. }
+{
+ * DisableItem()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * EnableItem()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * SetMenuItemCommandID()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetMenuItemCommandID( inMenu: MenuRef; inItem: MenuItemIndex; inCommandID: MenuCommand ): OSErr; external name '_SetMenuItemCommandID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuItemCommandID()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetMenuItemCommandID( inMenu: MenuRef; inItem: MenuItemIndex; var outCommandID: MenuCommand ): OSErr; external name '_GetMenuItemCommandID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuItemModifiers()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetMenuItemModifiers( inMenu: MenuRef; inItem: MenuItemIndex; inModifiers: UInt8 ): OSErr; external name '_SetMenuItemModifiers';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuItemModifiers()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetMenuItemModifiers( inMenu: MenuRef; inItem: MenuItemIndex; var outModifiers: UInt8 ): OSErr; external name '_GetMenuItemModifiers';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuItemIconHandle()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetMenuItemIconHandle( inMenu: MenuRef; inItem: MenuItemIndex; inIconType: UInt8; inIconHandle: Handle ): OSErr; external name '_SetMenuItemIconHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuItemIconHandle()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetMenuItemIconHandle( inMenu: MenuRef; inItem: MenuItemIndex; var outIconType: UInt8; var outIconHandle: Handle ): OSErr; external name '_GetMenuItemIconHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuItemTextEncoding()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetMenuItemTextEncoding( inMenu: MenuRef; inItem: MenuItemIndex; inScriptID: TextEncoding ): OSErr; external name '_SetMenuItemTextEncoding';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuItemTextEncoding()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetMenuItemTextEncoding( inMenu: MenuRef; inItem: MenuItemIndex; var outScriptID: TextEncoding ): OSErr; external name '_GetMenuItemTextEncoding';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuItemHierarchicalID()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetMenuItemHierarchicalID( inMenu: MenuRef; inItem: MenuItemIndex; inHierID: MenuID ): OSErr; external name '_SetMenuItemHierarchicalID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuItemHierarchicalID()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetMenuItemHierarchicalID( inMenu: MenuRef; inItem: MenuItemIndex; var outHierID: MenuID ): OSErr; external name '_GetMenuItemHierarchicalID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuItemFontID()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetMenuItemFontID( inMenu: MenuRef; inItem: MenuItemIndex; inFontID: SInt16 ): OSErr; external name '_SetMenuItemFontID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuItemFontID()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetMenuItemFontID( inMenu: MenuRef; inItem: MenuItemIndex; var outFontID: SInt16 ): OSErr; external name '_GetMenuItemFontID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuItemRefCon()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetMenuItemRefCon( inMenu: MenuRef; inItem: MenuItemIndex; inRefCon: UInt32 ): OSErr; external name '_SetMenuItemRefCon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuItemRefCon()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetMenuItemRefCon( inMenu: MenuRef; inItem: MenuItemIndex; var outRefCon: UInt32 ): OSErr; external name '_GetMenuItemRefCon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Please use the menu item property APIs in Carbon.}
+{
+ * SetMenuItemRefCon2()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+
+
+{
+ * GetMenuItemRefCon2()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+
+
+{
+ * SetMenuItemKeyGlyph()
+ *
+ * Summary:
+ * Sets the command key glyph code for a menu item.
+ *
+ * Discussion:
+ * A menu item's command key may be customized using a key glyph
+ * code; these codes are the kMenu*Glyph constants documented in
+ * Menus.h. In classic Mac OS, a glyph code is only used for
+ * display; it does not affect command key matching. In Carbon, a
+ * menu item's glyph code is used for command key matching if the
+ * menu item does not have a command key character or virtual
+ * keycode assigned to it.
+ *
+ * In CarbonLib 1.2 and Mac OS X 10.0 and later, the Menu Manager
+ * will automatically draw the appropriate glyph for a menu item
+ * that has a virtual keycode command key assigned to it; it is not
+ * necessary to set both the virtual keycode and the glyph for an
+ * item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu to change.
+ *
+ * inItem:
+ * The menu item to change.
+ *
+ * inGlyph:
+ * The new glyph code for the item, or zero to remove the item's
+ * glyph code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetMenuItemKeyGlyph( inMenu: MenuRef; inItem: MenuItemIndex; inGlyph: SInt16 ): OSErr; external name '_SetMenuItemKeyGlyph';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuItemKeyGlyph()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetMenuItemKeyGlyph( inMenu: MenuRef; inItem: MenuItemIndex; var outGlyph: SInt16 ): OSErr; external name '_GetMenuItemKeyGlyph';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Routines available in Mac OS 8.5 and later (supporting enabling/disabling of > 31 items)}
+
+{
+ * [Mac]EnableMenuItem()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+procedure EnableMenuItem( theMenu: MenuRef; item: MenuItemIndex ); external name '_EnableMenuItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+procedure MacEnableMenuItem( theMenu: MenuRef; item: MenuItemIndex ); external name '_EnableMenuItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DisableMenuItem()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+procedure DisableMenuItem( theMenu: MenuRef; item: MenuItemIndex ); external name '_DisableMenuItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsMenuItemEnabled()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+function IsMenuItemEnabled( menu: MenuRef; item: MenuItemIndex ): Boolean; external name '_IsMenuItemEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * EnableMenuItemIcon()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+procedure EnableMenuItemIcon( theMenu: MenuRef; item: MenuItemIndex ); external name '_EnableMenuItemIcon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DisableMenuItemIcon()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+procedure DisableMenuItemIcon( theMenu: MenuRef; item: MenuItemIndex ); external name '_DisableMenuItemIcon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsMenuItemIconEnabled()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+function IsMenuItemIconEnabled( menu: MenuRef; item: MenuItemIndex ): Boolean; external name '_IsMenuItemIconEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuItemHierarchicalMenu()
+ *
+ * Summary:
+ * Attaches a submenu to a menu item.
+ *
+ * Discussion:
+ * Using SetMenuItemHierarchicalMenu, it is possible to directly
+ * specify the submenu for a menu item without specifying its menu
+ * ID. It is not necessary to insert the submenu into the
+ * hierarchical portion of the menubar, and it is not necessary for
+ * the submenu to have a unique menu ID; it is recommended that you
+ * use 0 as the menu ID for the submenu, and identify selections
+ * from the menu by command ID. The Menu Manager will increment the
+ * refcount of the submenu that you specify, and the submenu's
+ * refcount will be decremented automatically when the parent menu
+ * item is deleted or the parent menu is disposed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The parent menu.
+ *
+ * inItem:
+ * The parent item.
+ *
+ * inHierMenu:
+ * The submenu. You may pass NULL to remove any existing submenu.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetMenuItemHierarchicalMenu( inMenu: MenuRef; inItem: MenuItemIndex; inHierMenu: MenuRef { can be NULL } ): OSStatus; external name '_SetMenuItemHierarchicalMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuItemHierarchicalMenu()
+ *
+ * Summary:
+ * Returns the submenu attached to a menu item.
+ *
+ * Discussion:
+ * GetMenuItemHierarchicalMenu will return the submenu attached to a
+ * menu item regardless of how the submenu was specified. If the
+ * submenu was specified by menu ID (using SetItemCmd or
+ * SetMenuItemHierarchicalID), GetMenuItemHierarchicalMenu will
+ * return the currently installed menu with that ID, if any. The
+ * only case where GetMenuItemHierarchicalMenu will fail to return
+ * the item's submenu is when the submenu is specified by menu ID,
+ * but the submenu is not currently inserted in the menu bar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The parent menu.
+ *
+ * inItem:
+ * The parent item.
+ *
+ * outHierMenu:
+ * On exit, the item's submenu, or NULL if it does not have one.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMenuItemHierarchicalMenu( inMenu: MenuRef; inItem: MenuItemIndex; var outHierMenu: MenuRef ): OSStatus; external name '_GetMenuItemHierarchicalMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CopyMenuItemTextAsCFString()
+ *
+ * Summary:
+ * Returns a CFString containing the text of a menu item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu containing the item.
+ *
+ * inItem:
+ * The item whose text to return.
+ *
+ * outString:
+ * On exit, a CFString containing the item's text. This string
+ * must be released by the caller.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CopyMenuItemTextAsCFString( inMenu: MenuRef; inItem: MenuItemIndex; var outString: CFStringRef ): OSStatus; external name '_CopyMenuItemTextAsCFString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuItemTextWithCFString()
+ *
+ * Summary:
+ * Sets the text of a menu item to the text contained in a CFString.
+ *
+ * Discussion:
+ * The Menu Manager will either make its own copy or just increment
+ * the refcount of the CFString before returning from
+ * SetMenuItemTextWithCFString, depending on whether the string is
+ * mutable or immutable. If the string is mutable, modifying the
+ * string after calling SetMenuItemTextWithCFString will have no
+ * effect on the menu item's actual text. The caller may release the
+ * string after calling SetMenuItemTextWithCFString.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu containing the item.
+ *
+ * inItem:
+ * The item whose text to return.
+ *
+ * inString:
+ * The string containing the new menu item text.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetMenuItemTextWithCFString( inMenu: MenuRef; inItem: MenuItemIndex; inString: CFStringRef ): OSStatus; external name '_SetMenuItemTextWithCFString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuItemIndent()
+ *
+ * Summary:
+ * Gets the indent level of a menu item.
+ *
+ * Discussion:
+ * The indent level of an item is an amount of extra space added to
+ * the left of the item's icon or checkmark. The level is simply a
+ * number, starting at zero, which the Menu Manager multiplies by a
+ * constant to get the indent in pixels. The default indent level is
+ * zero.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu containing the item.
+ *
+ * inItem:
+ * The item whose indent to retrieve.
+ *
+ * outIndent:
+ * On exit, the indent level of the item.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMenuItemIndent( inMenu: MenuRef; inItem: MenuItemIndex; var outIndent: UInt32 ): OSStatus; external name '_GetMenuItemIndent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuItemIndent()
+ *
+ * Summary:
+ * Sets the indent level of a menu item.
+ *
+ * Discussion:
+ * The indent level of an item is an amount of extra space added to
+ * the left of the item's icon or checkmark. The level is simply a
+ * number, starting at zero, which the Menu Manager multiplies by a
+ * constant to get the indent in pixels. The default indent level is
+ * zero.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu containing the item.
+ *
+ * inItem:
+ * The item whose indent to set.
+ *
+ * inIndent:
+ * The new indent level of the item.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetMenuItemIndent( inMenu: MenuRef; inItem: MenuItemIndex; inIndent: UInt32 ): OSStatus; external name '_SetMenuItemIndent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuItemCommandKey()
+ *
+ * Summary:
+ * Gets the keyboard equivalent of a menu item.
+ *
+ * Discussion:
+ * A menu item's keyboard equivalent may be either a character code
+ * or a virtual keycode. An item's character code and virtual
+ * keycode are stored separately and may contain different values,
+ * but only one is used by the Menu Manager at any given time. When
+ * requesting a menu item's virtual keycode equivalent, you should
+ * first check that the item is using a virtual keycode by testing
+ * the kMenuItemAttrUseVirtualKey attribute for that item. If this
+ * attribute is not set, the item's virtual keycode is ignored by
+ * the Menu Manager. Note that zero is a valid virtual keycode, so
+ * you cannot test the returned keycode against zero to determine if
+ * the item is using a virtual keycode equivalent. You must test the
+ * kMenuItemAttrUseVirtualKey attribute.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu containing the item.
+ *
+ * inItem:
+ * The item whose keyboard equivalent to retrieve.
+ *
+ * inGetVirtualKey:
+ * Indicates whether to retrieve the item's character code or
+ * virtual keycode equivalent.
+ *
+ * outKey:
+ * On exit, the keyboard equivalent of the item.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMenuItemCommandKey( inMenu: MenuRef; inItem: MenuItemIndex; inGetVirtualKey: Boolean; var outKey: UInt16 ): OSStatus; external name '_GetMenuItemCommandKey';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuItemCommandKey()
+ *
+ * Summary:
+ * Sets the keyboard equivalent of a menu item.
+ *
+ * Discussion:
+ * A menu item's keyboard equivalent may be either a character code
+ * or a virtual keycode. The character code is always used to draw
+ * the item's keyboard equivalent in the menu, but either may be
+ * used for keyboard equivalent matching by MenuEvent and
+ * IsMenuKeyEvent, depending on whether the
+ * kMenuItemAttrUseVirtualKey item attribute is set. If
+ * SetMenuItemCommandKey is used to set the virtual keycode
+ * equivalent for a menu item, it also automatically sets the
+ * kMenuItemAttrUseVirtualKey item attribute. To make the menu item
+ * stop using the virtual keycode equivalent and use the character
+ * code equivalent instead, use ChangeMenuItemAttributes to clear
+ * the kMenuItemAttrUseVirtualKey item attribute.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu containing the item.
+ *
+ * inItem:
+ * The item whose keyboard equivalent to set.
+ *
+ * inSetVirtualKey:
+ * Indicates whether to set the item's character code or virtual
+ * keycode equivalent.
+ *
+ * inKey:
+ * The item's new character code or virtual keycode equivalent.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetMenuItemCommandKey( inMenu: MenuRef; inItem: MenuItemIndex; inSetVirtualKey: Boolean; inKey: UInt16 ): OSStatus; external name '_SetMenuItemCommandKey';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Menu Item Color Tables }
+{ Menu color manipulation is considered deprecated with the advent of the Appearance }
+{ Manager. Avoid using these routines if possible }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * DeleteMCEntries()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DeleteMCEntries( menuID_: MenuID; menuItem: SInt16 ); external name '_DeleteMCEntries';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMCInfo()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetMCInfo: MCTableHandle; external name '_GetMCInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMCInfo()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetMCInfo( menuCTbl: MCTableHandle ); external name '_SetMCInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DisposeMCInfo()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DisposeMCInfo( menuCTbl: MCTableHandle ); external name '_DisposeMCInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMCEntry()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetMCEntry( menuID_: MenuID; menuItem: SInt16 ): MCEntryPtr; external name '_GetMCEntry';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMCEntries()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetMCEntries( numEntries: SInt16; menuCEntries: MCTablePtr ); external name '_SetMCEntries';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Properties (Mac OS 8.5 and later) }
+{ With the following property APIs, you can attach any piece of data you'd like to a }
+{ menu or menu item. Passing zero for the item number parameter indicates you'd like }
+{ to attach the data to the menu itself, and not to any specific menu item. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kMenuPropertyPersistent = $00000001; { whether this property gets saved when flattening the menu}
+
+{
+ * GetMenuItemProperty()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+function GetMenuItemProperty( menu: MenuRef; item: MenuItemIndex; propertyCreator: OSType; propertyTag: OSType; bufferSize: UInt32; var actualSize: UInt32; propertyBuffer: UnivPtr ): OSStatus; external name '_GetMenuItemProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuItemPropertySize()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+function GetMenuItemPropertySize( menu: MenuRef; item: MenuItemIndex; propertyCreator: OSType; propertyTag: OSType; var size: UInt32 ): OSStatus; external name '_GetMenuItemPropertySize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuItemProperty()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+function SetMenuItemProperty( menu: MenuRef; item: MenuItemIndex; propertyCreator: OSType; propertyTag: OSType; propertySize: UInt32; propertyData: {const} UnivPtr ): OSStatus; external name '_SetMenuItemProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RemoveMenuItemProperty()
+ *
+ * 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
+ * Non-Carbon CFM: in MenusLib 8.5 and later
+ }
+function RemoveMenuItemProperty( menu: MenuRef; item: MenuItemIndex; propertyCreator: OSType; propertyTag: OSType ): OSStatus; external name '_RemoveMenuItemProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuItemPropertyAttributes()
+ *
+ * Summary:
+ * Gets the attributes of a menu item property.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * menu:
+ * The menu.
+ *
+ * item:
+ * The menu item.
+ *
+ * propertyCreator:
+ * The creator code of the property.
+ *
+ * propertyTag:
+ * The property tag.
+ *
+ * attributes:
+ * On exit, contains the attributes of the property.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMenuItemPropertyAttributes( menu: MenuRef; item: MenuItemIndex; propertyCreator: OSType; propertyTag: OSType; var attributes: UInt32 ): OSStatus; external name '_GetMenuItemPropertyAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ChangeMenuItemPropertyAttributes()
+ *
+ * Summary:
+ * Changes the attributes of a menu item property.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * menu:
+ * The menu.
+ *
+ * item:
+ * The menu item.
+ *
+ * propertyCreator:
+ * The creator code of the property.
+ *
+ * propertyTag:
+ * The property tag.
+ *
+ * attributesToSet:
+ * The attributes to add to the menu item property.
+ *
+ * attributesToClear:
+ * The attributes to remove from the menu item property.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function ChangeMenuItemPropertyAttributes( menu: MenuRef; item: MenuItemIndex; propertyCreator: OSType; propertyTag: OSType; attributesToSet: UInt32; attributesToClear: UInt32 ): OSStatus; external name '_ChangeMenuItemPropertyAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Attributes (Carbon and later) }
+{ Each menu and menu item has attribute flags. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * GetMenuAttributes()
+ *
+ * Summary:
+ * Gets the attributes of a menu.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * menu:
+ * The menu.
+ *
+ * outAttributes:
+ * On exit, contains the attributes of the menu.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMenuAttributes( menu: MenuRef; var outAttributes: MenuAttributes ): OSStatus; external name '_GetMenuAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ChangeMenuAttributes()
+ *
+ * Summary:
+ * Changes the attributes of a menu.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * menu:
+ * The menu.
+ *
+ * setTheseAttributes:
+ * The attributes to add to the menu.
+ *
+ * clearTheseAttributes:
+ * The attributes to remove from the menu.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function ChangeMenuAttributes( menu: MenuRef; setTheseAttributes: MenuAttributes; clearTheseAttributes: MenuAttributes ): OSStatus; external name '_ChangeMenuAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuItemAttributes()
+ *
+ * Summary:
+ * Gets the attributes of a menu item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * menu:
+ * The menu.
+ *
+ * item:
+ * The menu item.
+ *
+ * outAttributes:
+ * On exit, contains the attributes of the menu item.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMenuItemAttributes( menu: MenuRef; item: MenuItemIndex; var outAttributes: MenuItemAttributes ): OSStatus; external name '_GetMenuItemAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ChangeMenuItemAttributes()
+ *
+ * Summary:
+ * Changes the attributes of a menu item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * menu:
+ * The menu.
+ *
+ * item:
+ * The menu item.
+ *
+ * setTheseAttributes:
+ * The attributes to add to the menu item.
+ *
+ * clearTheseAttributes:
+ * The attributes to remove from the menu item.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function ChangeMenuItemAttributes( menu: MenuRef; item: MenuItemIndex; setTheseAttributes: MenuItemAttributes; clearTheseAttributes: MenuItemAttributes ): OSStatus; external name '_ChangeMenuItemAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Mass menu item enabling and disabling (Carbon and later) }
+{ Useful when rewriting code that modifies the enableFlags field directly. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * DisableAllMenuItems()
+ *
+ * Summary:
+ * Disables all items in a menu.
+ *
+ * Discussion:
+ * This API is equivalent to pre-Carbon code that masked the
+ * enableFlags field of the MenuInfo with 0x01. It disables all
+ * items (including items past item 31) but does not affect the
+ * state of the menu title.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * theMenu:
+ * The menu whose items to disable.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisableAllMenuItems( theMenu: MenuRef ); external name '_DisableAllMenuItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * EnableAllMenuItems()
+ *
+ * Summary:
+ * Enables all items in a menu.
+ *
+ * Discussion:
+ * This API is equivalent to pre-Carbon code that or'd the
+ * enableFlags field of the MenuInfo with 0xFFFFFFFE. It enables all
+ * items (including items past item 31) but does not affect the
+ * state of the menu title.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * theMenu:
+ * The menu whose items to enable.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure EnableAllMenuItems( theMenu: MenuRef ); external name '_EnableAllMenuItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * MenuHasEnabledItems()
+ *
+ * Summary:
+ * Determines if any items in a menu are enabled.
+ *
+ * Discussion:
+ * This API is equivalent to pre-Carbon code that compared the
+ * enableFlags field of the MenuInfo with 0. It checks the enable
+ * state of all items to see if any are enabled, but ignores the
+ * state of the menu title. It will return true even if the menu
+ * title is disabled.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * theMenu:
+ * The menu whose items to examine.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function MenuHasEnabledItems( theMenu: MenuRef ): Boolean; external name '_MenuHasEnabledItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Menu tracking status (Carbon and later) }
+{ Get info about the selected menu item during menu tracking. Replaces direct access }
+{ to low-mem globals that previously held this info. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * GetMenuTrackingData()
+ *
+ * Summary:
+ * Gets information about the menu currently selected by the user.
+ *
+ * Discussion:
+ * This API replaces direct access to the low-memory globals
+ * TopMenuItem, AtMenuBottom, MenuDisable, and mbSaveLoc. It is only
+ * valid to call this API while menu tracking is occurring. This API
+ * will most commonly be used by custom MDEFs.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * theMenu:
+ * The menu about which to get tracking information. May be NULL
+ * to get information about the menu that the user is currently
+ * selecting. If the menu is not currently open, menuNotFoundErr
+ * is returned.
+ *
+ * outData:
+ * On exit, contains tracking data about the menu. On CarbonLib,
+ * the itemRect field is not supported and is always set to an
+ * empty rect.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMenuTrackingData( theMenu: MenuRef; var outData: MenuTrackingData ): OSStatus; external name '_GetMenuTrackingData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuType()
+ *
+ * Summary:
+ * Gets the display type (pulldown, hierarchical, or popup) of a
+ * menu.
+ *
+ * Discussion:
+ * This API may only be called when the menu is displayed. If the
+ * menu is not currently open, an error is returned. The display
+ * type of a menu may vary from one menu tracking session to
+ * another; for example, the same menu might be displayed as a
+ * pulldown menu and as a popup menu.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * theMenu:
+ * The menu whose type to get.
+ *
+ * outType:
+ * On exit, the type of the menu. The returned value will be one
+ * of the ThemeMenuType constants: kThemeMenuTypePullDown, PopUp,
+ * or Hierarchical. The kThemeMenuTypeInactive bit will never be
+ * set.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMenuType( theMenu: MenuRef; var outType: UInt16 ): OSStatus; external name '_GetMenuType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ÊUniversal command ID access (Carbon and later) }
+{ These APIs allow you to operate on menu items strictly by command ID, with no }
+{ knowledge of a menu item's index. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * CountMenuItemsWithCommandID()
+ *
+ * Summary:
+ * Counts the menu items with a specified command ID.
+ *
+ * Discussion:
+ * In CarbonLib 1.0.x and 1.1, this API always returns zero or one;
+ * it stops after finding the first menu item with the specified
+ * command ID. In CarbonLib 1.2 and Mac OS X 10.0 and later, it
+ * counts all menu items with the specified command ID. In Mac OS X
+ * 10.0 and CarbonLib 1.0 through 1.4, this API only searches
+ * top-level menus (menus visible in the menubar) and submenus of
+ * top-level menus. It does not search hierarchical menus that are
+ * inserted in the menubar but are not submenus of a top-level menus
+ * (for example, it does not search menus that are inserted for use
+ * in a popup menu control). In Mac OS X 10.1 and CarbonLib 1.5 and
+ * later, this API also searches inserted hierarchical menus.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu in which to begin searching for items with the
+ * specified command ID. Pass NULL to hegin searching with the
+ * root menu. The search will descend into all submenus of this
+ * menu.
+ *
+ * inCommandID:
+ * The command ID for which to search.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CountMenuItemsWithCommandID( inMenu: MenuRef; inCommandID: MenuCommand ): ItemCount; external name '_CountMenuItemsWithCommandID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetIndMenuItemWithCommandID()
+ *
+ * Summary:
+ * Finds a menu item with a specified command ID.
+ *
+ * Discussion:
+ * This API searches the specified menu and its submenus for the
+ * n'th menu item with the specified command ID. In CarbonLib 1.0.x
+ * and 1.1, only the first menu item is returned. In CarbonLib 1.2
+ * and Mac OS X 10.0 and later, this API iterates over all menu
+ * items with the specified command ID. In Mac OS X 10.0 and
+ * CarbonLib 1.0 through 1.4, this API only searches top-level menus
+ * (menus visible in the menubar) and submenus of top-level menus.
+ * It does not search hierarchical menus that are inserted in the
+ * menubar but are not submenus of a top-level menus (for example,
+ * it does not search menus that are inserted for use in a popup
+ * menu control). In Mac OS X 10.1 and CarbonLib 1.5 and later, this
+ * API also searches inserted hierarchical menus.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu in which to begin searching for items with the
+ * specified command ID. Pass NULL to hegin searching with the
+ * root menu. The search will descend into all submenus of this
+ * menu.
+ *
+ * inCommandID:
+ * The command ID for which to search.
+ *
+ * inItemIndex:
+ * The 1-based index of the menu item to retrieve. In CarbonLib
+ * 1.0.x and 1.1, this parameter must be 1. In CarbonLib 1.2 and
+ * Mac OS X 10.0, this parameter may vary from 1 to the number of
+ * menu items with the specified command ID.
+ *
+ * outMenu:
+ * On exit, the menu containing the menu item with the specified
+ * command ID.
+ *
+ * outIndex:
+ * On exit, the item index of the menu item with the specified
+ * command ID.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetIndMenuItemWithCommandID( inMenu: MenuRef; inCommandID: MenuCommand; inItemIndex: UInt32; outMenu: MenuRefPtr { can be NULL }; outIndex: MenuItemIndexPtr { can be NULL } ): OSStatus; external name '_GetIndMenuItemWithCommandID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * EnableMenuCommand()
+ *
+ * Summary:
+ * Enables the menu item with a specified command ID.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu in which to begin searching for the item. Pass NULL to
+ * begin searching with the root menu. The search will descend
+ * into all submenus of this menu.
+ *
+ * inCommandID:
+ * The command ID of the menu item to be enabled. If more than one
+ * item has this command ID, only the first will be enabled.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure EnableMenuCommand( inMenu: MenuRef; inCommandID: MenuCommand ); external name '_EnableMenuCommand';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DisableMenuCommand()
+ *
+ * Summary:
+ * Disables the menu item with a specified command ID.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu in which to begin searching for the item. Pass NULL to
+ * begin searching with the root menu. The search will descend
+ * into all submenus of this menu.
+ *
+ * inCommandID:
+ * The command ID of the menu item to be disabled. If more than
+ * one item has this command ID, only the first will be disabled.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisableMenuCommand( inMenu: MenuRef; inCommandID: MenuCommand ); external name '_DisableMenuCommand';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsMenuCommandEnabled()
+ *
+ * Summary:
+ * Determines if the menu item with a specified command ID is
+ * enabled.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu in which to begin searching for the item. Pass NULL to
+ * begin searching with the root menu. The search will descend
+ * into all submenus of this menu.
+ *
+ * inCommandID:
+ * The command ID of the menu item to examine. If more than one
+ * item has this command ID, only the first will be examined.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function IsMenuCommandEnabled( inMenu: MenuRef; inCommandID: MenuCommand ): Boolean; external name '_IsMenuCommandEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuCommandMark()
+ *
+ * Summary:
+ * Locates the menu item with a specified command ID and sets its
+ * mark character.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu in which to begin searching for the item. Pass NULL to
+ * begin searching with the root menu. The search will descend
+ * into all submenus of this menu.
+ *
+ * inCommandID:
+ * The command ID of the menu item to be modified. If more than
+ * one item has this command ID, only the first will be modified.
+ *
+ * inMark:
+ * The new mark character. Although the type of this parameter is
+ * UniChar, currently only the low byte of this character will be
+ * used as the mark character, and it is interpreted using the
+ * applicationÕs text encoding.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetMenuCommandMark( inMenu: MenuRef; inCommandID: MenuCommand; inMark: UniChar ): OSStatus; external name '_SetMenuCommandMark';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuCommandMark()
+ *
+ * Summary:
+ * Locates the menu item with a specified command ID and returns its
+ * mark character.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu in which to begin searching for the item. Pass NULL to
+ * begin searching with the root menu. The search will descend
+ * into all submenus of this menu.
+ *
+ * inCommandID:
+ * The command ID of the menu item to be examined. If more than
+ * one item has this command ID, only the first will be examined.
+ *
+ * outMark:
+ * On exit, the menu item's mark character.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMenuCommandMark( inMenu: MenuRef; inCommandID: MenuCommand; var outMark: UniChar ): OSStatus; external name '_GetMenuCommandMark';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuCommandProperty()
+ *
+ * Summary:
+ * Retrives property data for a menu item with a specified command
+ * ID.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu in which to begin searching for the item. Pass NULL to
+ * begin searching with the root menu. The search will descend
+ * into all submenus of this menu.
+ *
+ * inCommandID:
+ * The command ID of the menu item containing the property. If
+ * more than one item has this command ID, only the first will be
+ * used.
+ *
+ * inPropertyCreator:
+ * The property creator.
+ *
+ * inPropertyTag:
+ * The property tag.
+ *
+ * inBufferSize:
+ * The size of the output buffer, in bytes.
+ *
+ * outActualSize:
+ * On exit, contains the actual size of the property data. May be
+ * NULL if you do not need this information.
+ *
+ * inPropertyBuffer:
+ * The address of a buffer in which to place the property data.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMenuCommandProperty( inMenu: MenuRef; inCommandID: MenuCommand; inPropertyCreator: OSType; inPropertyTag: OSType; inBufferSize: ByteCount; outActualSize: ByteCountPtr { can be NULL }; inPropertyBuffer: UnivPtr ): OSStatus; external name '_GetMenuCommandProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuCommandPropertySize()
+ *
+ * Summary:
+ * Retrives the size of property data for a menu item with a
+ * specified command ID.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu in which to begin searching for the item. Pass NULL to
+ * begin searching with the root menu. The search will descend
+ * into all submenus of this menu.
+ *
+ * inCommandID:
+ * The command ID of the menu item containing the property. If
+ * more than one item has this command ID, only the first will be
+ * used.
+ *
+ * inPropertyCreator:
+ * The property creator.
+ *
+ * inPropertyTag:
+ * The property tag.
+ *
+ * outSize:
+ * On exit, contains the size of the property data.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMenuCommandPropertySize( inMenu: MenuRef; inCommandID: MenuCommand; inPropertyCreator: OSType; inPropertyTag: OSType; var outSize: ByteCount ): OSStatus; external name '_GetMenuCommandPropertySize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuCommandProperty()
+ *
+ * Summary:
+ * Sets property data for a menu item with a specified command ID.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu in which to begin searching for the item. Pass NULL to
+ * begin searching with the root menu. The search will descend
+ * into all submenus of this menu.
+ *
+ * inCommandID:
+ * The command ID of the menu item that will receive the property.
+ * If more than one item has this command ID, only the first will
+ * be modified.
+ *
+ * inPropertyCreator:
+ * The property creator.
+ *
+ * inPropertyTag:
+ * The property tag.
+ *
+ * inPropertySize:
+ * The size of the property data, in bytes.
+ *
+ * inPropertyData:
+ * The address of the property data.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function SetMenuCommandProperty( inMenu: MenuRef; inCommandID: MenuCommand; inPropertyCreator: OSType; inPropertyTag: OSType; inPropertySize: ByteCount; inPropertyData: {const} UnivPtr ): OSStatus; external name '_SetMenuCommandProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RemoveMenuCommandProperty()
+ *
+ * Summary:
+ * Removes a property from a menu item with a specified command ID.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu in which to begin searching for the item. Pass NULL to
+ * begin searching with the root menu. The search will descend
+ * into all submenus of this menu.
+ *
+ * inCommandID:
+ * The command ID of the menu item from which the property will be
+ * removed. If more than one item has this command ID, only the
+ * first will be modified.
+ *
+ * inPropertyCreator:
+ * The property creator.
+ *
+ * inPropertyTag:
+ * The property tag.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function RemoveMenuCommandProperty( inMenu: MenuRef; inCommandID: MenuCommand; inPropertyCreator: OSType; inPropertyTag: OSType ): OSStatus; external name '_RemoveMenuCommandProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CopyMenuItemData()
+ *
+ * Summary:
+ * Returns multiple attributes of a menu item at once.
+ *
+ * Discussion:
+ * This function is used to retrieve many attributes of a menu item
+ * simultaneously; for example, it might be used by a menu
+ * definition function that needs to know how to draw a menu item.
+ * It is more efficient to use this function than to use the
+ * accessor functions for the individual attributes of the menu.
+ * This function returns a copy of the data in the menu, so any data
+ * in the MenuItemDataRec that is dynamically allocated (for
+ * example, the CFString item text) should be released by the caller.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu from which to copy data. If inIsCommandID is true, you
+ * may pass NULL for this parameter to search for an item in the
+ * root menu; if inIsCommandID is false, this parameter must be a
+ * valid MenuRef.
+ *
+ * inItem:
+ * The item or command ID from which to copy data.
+ *
+ * inIsCommandID:
+ * Indicates whether inItem is a MenuItemIndex or MenuCommand. If
+ * inIsCommandID is true, the inItem parameter is interpreted as a
+ * menu command ID, and data is copied from the first item in the
+ * menu with that command ID. If inIsCommandID is false, the
+ * inItem parameter is interpreted as a menu item index, and data
+ * is copied for that item in the specified menu.
+ *
+ * ioData:
+ * Data is copied from the item and placed here. On entry, the
+ * whichData field of this structure should be initialized to
+ * indicate which data the caller would like returned. Individual
+ * fields of the MenuItemDataRec structure may require
+ * pre-initialization also; see the individual MenuItemDataFlags
+ * documentation for details.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CopyMenuItemData( inMenu: MenuRef { can be NULL }; inItem: MenuItemID; inIsCommandID: Boolean; ioData: MenuItemDataPtr ): OSStatus; external name '_CopyMenuItemData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuItemData()
+ *
+ * Summary:
+ * Sets multiple attributes of a menu item at once.
+ *
+ * Discussion:
+ * This function is used to set many attributes of a menu item
+ * simultaneously. It is more efficient to use this function than to
+ * use the accessor functions for the individual attributes of the
+ * menu.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu to modify.
+ *
+ * inItem:
+ * The item or command ID to modify.
+ *
+ * inIsCommandID:
+ * Indicates whether inItem is a MenuItemIndex or MenuCommand. If
+ * inIsCommandID is true, the inItem parameter is interpreted as a
+ * menu command ID, and the first item in the menu with that
+ * command ID. is modified. If inIsCommandID is false, the inItem
+ * parameter is interpreted as a menu item index, and the item
+ * with that index in the specified menu is modified.
+ *
+ * inData:
+ * The data to set. The caller should set the whichData field of
+ * this structure to indicate which data should be set. Only the
+ * fields of the structure corresponding to the non-zero whichData
+ * flags must be initialized; other fields are ignored.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetMenuItemData( inMenu: MenuRef; inItem: MenuItemID; inIsCommandID: Boolean; const (*var*) inData: MenuItemDataRec ): OSStatus; external name '_SetMenuItemData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Dynamic menu item support (available in CarbonLib 1.1 and Mac OS X) }
+{ Dynamic menu item support allows a menu item to be redrawn while the menu is open }
+{ and visible to the user. Carbon contains automatic support for dynamic items based }
+{ on keyboard modifier state. If you need to implement your own variable item state }
+{ based on other system state, you can use these APIs to implement it. }
+{ To use the built-in support for dynamic items, you should create a menu containing }
+{ several contiguous items with the same command key but different text and modifier }
+{ keys. For example, you might have: }
+{ Close cmd-W }
+{ Close All cmd-option-W }
+{ The Menu Manager automatically determines a dynamic menu group using the base }
+{ command key of a dynamic menu item ('W' in this case). Only a single item from }
+{ a dynamic group is visible at any time; the other items are hidden. The Menu }
+{ Manager uses the current keyboard modifiers to determine which item is visible. }
+{ It is also possible to have a dynamic menu item group that does not have command }
+{ keys, but only modifiers; for example, in the Finder's View menu, the Clean Up }
+{ and Clean Up Selection items have no command key, but are a dynamic menu item }
+{ group that changes visibility based on the Option modifier key. }
+{ In this example, in your MENU resource, you would create the Close and Close All }
+{ items and give them each the letter 'W' as the command key; using an associated }
+{ xmnu resource, you would specify kMenuOptionModifier as the modifier for the }
+{ Close All item. You can do the same thing using InterfacerBuilder and nib-based }
+{ menus. }
+{ After loading your menu from the resource, you must set the kMenuItemAttrDynamic }
+{ flag for each dynamic item. In this example, you would use: }
+{ ChangeMenuItemAttributes( menu, kCloseItem, kMenuItemAttrDynamic, 0 ); }
+{ ChangeMenuItemAttributes( menu, kCloseAllItem, kMenuItemAttrDynamic, 0 ); }
+{ The Menu Manager will now automatically display the correct item depending on }
+{ whether the Option key is pressed. The result from MenuSelect will be the item }
+{ number of the item that was visible when the menu closed. }
+{ Note that: }
+{ - If you use InterfacerBuilder, you can set the kMenuItemAttrDynamic attribute }
+{ directly in the menu object in the nib, using the Inspector window for the }
+{ menu. You don't need to add the attribute after creating the menu. }
+{ - If your application requires Mac OS X 10.2 or CarbonLib 1.6 or later, you }
+{ can also use a version-one-format 'xmnu' resource, which allows settting }
+{ the menu item attributes in the 'xmnu'. Using a version one resource, you }
+{ can include the kMenuItemAttrDynamic attribute in the resource rather than }
+{ adding it after creating the menu. }
+{ If the Menu Manager's built-in support is not sufficient, you can also change the }
+{ attributes of an item yourself and use the UpdateInvalidMenuItems API to cause }
+{ the menu to redraw. Changes to a menu item (changing text, command key, style, }
+{ etc.) that occur while the menu is open will cause the menu item to be invalidated, }
+{ but not redrawn. If you need to invalidate the item explicitly yourself, perhaps }
+{ because you have a custom MDEF that depends on state not accessed using Menu }
+{ Manager APIs, you can use the InvalidateMenuItems API. UpdateInvalidMenuItems will }
+{ scan the menu for invalid items and redraw each, clearing its invalid flag }
+{ afterwards. }
+{ If you need to change menu contents based on modifier key state without using the }
+{ built-in support in the Menu Manager, we recommend that you install a Carbon event }
+{ handler on your menu for the [kEventClassKeyboard, kEventRawKeyModifiersChanged] }
+{ event. Modifier key events are passed to the currently open menu before being sent }
+{ to the user focus target. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * IsMenuItemInvalid()
+ *
+ * Summary:
+ * Determines if a menu item is invalid and should be redrawn.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu whose item to examine.
+ *
+ * inItem:
+ * The item to examine.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function IsMenuItemInvalid( inMenu: MenuRef; inItem: MenuItemIndex ): Boolean; external name '_IsMenuItemInvalid';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * InvalidateMenuItems()
+ *
+ * Summary:
+ * Invalidates a group of menu items so that they will be redrawn
+ * when UpdateInvalidMenuItems is next called.
+ *
+ * Discussion:
+ * Menu items are automatically invalidated when their contents are
+ * changed using Menu Manager APIs while the menu is open. However,
+ * you might need to use this API if you have a custom MDEF that
+ * draws using state not contained in the menu.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu whose items to invalidate.
+ *
+ * inFirstItem:
+ * The first item to invalidate.
+ *
+ * inNumItems:
+ * The number of items to invalidate.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InvalidateMenuItems( inMenu: MenuRef; inFirstItem: MenuItemIndex; inNumItems: ItemCount ): OSStatus; external name '_InvalidateMenuItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * UpdateInvalidMenuItems()
+ *
+ * Summary:
+ * Redraws the invalid items of an open menu.
+ *
+ * Discussion:
+ * It is not necessary to use UpdateInvalidMenuItems if you are
+ * using Carbon's built-in support for dynamic items based on
+ * modifier key state. However, if you are modifying items
+ * dynamically using your own implementation, you should call
+ * UpdateInvalidMenuItems after completing your modifications for a
+ * single menu. It will redraw any items that have been marked as
+ * invalid, and clear the invalid flag for those items.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu to update.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function UpdateInvalidMenuItems( inMenu: MenuRef ): OSStatus; external name '_UpdateInvalidMenuItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ÊStandard font menu (Carbon and later) }
+{ These APIs allow you to create and use the standard font menu. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kHierarchicalFontMenuOption = $00000001;
+
+{
+ * CreateStandardFontMenu()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function CreateStandardFontMenu( menu: MenuRef; afterItem: MenuItemIndex; firstHierMenuID: MenuID; options: OptionBits; outHierMenuCount: ItemCountPtr { can be NULL } ): OSStatus; external name '_CreateStandardFontMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * UpdateStandardFontMenu()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function UpdateStandardFontMenu( menu: MenuRef; outHierMenuCount: ItemCountPtr { can be NULL } ): OSStatus; external name '_UpdateStandardFontMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetFontFamilyFromMenuSelection()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetFontFamilyFromMenuSelection( menu: MenuRef; item: MenuItemIndex; var outFontFamily: FMFontFamily; var outStyle: FMFontStyle ): OSStatus; external name '_GetFontFamilyFromMenuSelection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Contextual Menu routines and constants }
+{ available with Conxtextual Menu extension 1.0 and later }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Gestalt Selector for classic 68K apps only. }
+{ CFM apps should weak link and check the symbols. }
+const
+ gestaltContextualMenuAttr = $636D6E75 (* 'cmnu' *);
+ gestaltContextualMenuUnusedBit = 0;
+ gestaltContextualMenuTrapAvailable = 1;
+ gestaltContextualMenuHasAttributeAndModifierKeys = 2; { Contextual Menu Manager supports keyContextualMenuAttributes and keyContextualMenuModifiers }
+ gestaltContextualMenuHasUnicodeSupport = 3; { Contextual Menu Manager supports typeUnicodeText and typeCFStringRef }
+
+
+{
+ * Summary:
+ * Values indicating what kind of help the application supports
+ }
+const
+{
+ * The application does not support any help. The Menu Manager will
+ * put an appropriate help string into the contextual menu and
+ * disable the Help item.
+ }
+ kCMHelpItemNoHelp = 0;
+
+ {
+ * The application supports Apple Guide help. The Menu Manager will
+ * put the name of the main Guide file into the contextual menu and
+ * enable the Help item.
+ }
+ kCMHelpItemAppleGuide = 1;
+
+ {
+ * The application supports some other form of help. In this case,
+ * the application must also pass a valid string into the
+ * inHelpItemString parameter of ContextualMenuSelect. This string
+ * will be the text of the Help item in the contextual menu, and the
+ * Help item will be enabled.
+ }
+ kCMHelpItemOtherHelp = 2;
+
+ {
+ * The application does not support any help. The Menu Manager will
+ * remove the Help item from the contextual menu. This constant is
+ * available in Mac OS X and CarbonLib 1.6, and later; however, in
+ * CarbonLib it is translated to kCMHelpItemNoHelp, and the Help item
+ * is only disabled, not removed.
+ }
+ kCMHelpItemRemoveHelp = 3;
+
+
+{
+ * Summary:
+ * Values indicating what was chosen from a contextual menu
+ }
+const
+{
+ * The user did not choose an item from the contextual menu and the
+ * application should do no further processing of the event.
+ }
+ kCMNothingSelected = 0;
+
+ {
+ * The user chose one of the application's items from the menu. The
+ * application can examine the outMenuID and outMenuItem parameters
+ * of ContextualMenuSelect to see what the menu selection was, and it
+ * should then handle the selection appropriately.
+ }
+ kCMMenuItemSelected = 1;
+
+ {
+ * The user chose the Help item from the menu. The application should
+ * open an Apple Guide database to a section appropriate for the
+ * selection. If the application supports some other form of help, it
+ * should be presented instead.
+ }
+ kCMShowHelpSelected = 3;
+
+
+{
+ * Summary:
+ * AERecord keywords used by the ExamineContext method of a
+ * Contextual Menu plugin to specify menu item contents.
+ }
+const
+{
+ * Specifies the text of an item in a contextual menu. Data for this
+ * parameter can be in one of several formats. In Mac OS 7/8/9.x and
+ * Mac OS X 10.0 and 10.1, typeChar and typeIntlText are supported.
+ * In Mac OS X 10.2 and later, typeStyledText, typeAEText,
+ * typeUnicodeText, and typeCFStringRef are also supported. If you
+ * provide data as typeCFStringRef, the Contextual Menu Manager will
+ * automatically release the CFStringRef once the menu has been
+ * displayed. If you need the CFStringRef to have a longer timetime,
+ * your plugin should retain the CFStringRef before inserting it into
+ * the AERecord.
+ }
+ keyContextualMenuName = $706E616D (* 'pnam' *);
+
+ {
+ * Specifies the command ID of an item in a contextual menu. Data for
+ * this parameter should be typeLongInteger.
+ }
+ keyContextualMenuCommandID = $636D6364 (* 'cmcd' *);
+
+ {
+ * Specifies a contextual menu item with a submenu. Typically used
+ * with AEPutKeyDesc to add an entire AEDesc containing the submenu
+ * as the data for the parameter.
+ }
+ keyContextualMenuSubmenu = $636D7362 (* 'cmsb' *);
+
+ {
+ * Specifies the menu item attributes of an item in a contextual
+ * menu. Data for this parameter should be typeLongInteger. Available
+ * in Mac OS X 10.2 and later.
+ }
+ keyContextualMenuAttributes = $636D6174 (* 'cmat' *);
+
+ {
+ * Specifies the modifier keys of an item in a contextual menu (see
+ * kMenuShiftModifier, kMenuControlModifier, etc.) Data for this
+ * parameter should be typeLongInteger. Using this parameter together
+ * with the keyContextualMenuAttributes parameter, it is possible to
+ * create a contextual menu with dynamic items which change according
+ * to the modifier keys pressed by the user. Available in Mac OS X
+ * 10.2 and later.
+ }
+ keyContextualMenuModifiers = $636D6D64 (* 'cmmd' *);
+
+{
+ * InitContextualMenus()
+ *
+ * Summary:
+ * Adds the current process to the system registry of contextual
+ * menu clients.
+ *
+ * Discussion:
+ * On Mac OS 8.x and 9.x, your program should call the
+ * InitContextualMenus function early in your startup code to
+ * register your application as a contextual menu client. If you do
+ * not register your program, some system-level functions may
+ * respond as though your program does not use contextual menus. Not
+ * registering your program may also cause
+ * ProcessIsContextualMenuClient to return an incorrect value. On
+ * Mac OS X, it is not necessary to call InitContextualMenus.
+ *
+ * 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
+ * Non-Carbon CFM: in ContextualMenu 1.0 and later
+ }
+function InitContextualMenus: OSStatus; external name '_InitContextualMenus';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsShowContextualMenuClick()
+ *
+ * Summary:
+ * Determines whether a particular EventRecord could invoke a
+ * contextual menu.
+ *
+ * Discussion:
+ * Applications should call IsShowContextualMenuClick when they
+ * receive non-null events. If IsShowContextualMenuClick returns
+ * true, your application should generate its own menu and Apple
+ * Event descriptor (AEDesc), and then call ContextualMenuSelect to
+ * display and track the contextual menu, and then handle the user's
+ * choice. Some users may choose to use a two-button mouse with
+ * their Macintosh computer. This API does not return true for a
+ * right-click unless the mouse manufacturer has provided driver
+ * software that returns a control-left click in place of a right
+ * click. For proper recognition of a right-click gesture, you must
+ * use the IsShowContextualMenuEvent API.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The event to examine.
+ *
+ * Result:
+ * Returns true if the application should display a contextual menu,
+ * false if not.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ContextualMenu 1.0 and later
+ }
+function IsShowContextualMenuClick( const (*var*) inEvent: EventRecord ): Boolean; external name '_IsShowContextualMenuClick';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsShowContextualMenuEvent()
+ *
+ * Summary:
+ * Determines whether a particular EventRef could invoke a
+ * contextual menu.
+ *
+ * Discussion:
+ * This API is similar to IsShowContextualMenuClick, but takes a
+ * Carbon EventRef as its parameter instead of an EventRecord.
+ * EventRecords cannot express a right-mouse-click, but EventRefs
+ * can, so this API will return true for a right- click where
+ * IsShowContextualMenuClick will not.
+ *
+ * In Mac OS X 10.3 and earlier, this API always returned false if
+ * the event kind was not kEventMouseDown,
+ * kEventWindowClickContentRgn, kEventWindowClickStructureRgn, or
+ * kEventWindowHandleContentClick. In Mac OS X 10.4 and later, this
+ * API no longer requires a specific event kind; it only requires
+ * that the event contain kEventParamMouseButton and
+ * kEventParamKeyModifiers parameters.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The event to examine.
+ *
+ * Result:
+ * Returns true if the application should display a contextual menu,
+ * false if not.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function IsShowContextualMenuEvent( inEvent: EventRef ): Boolean; external name '_IsShowContextualMenuEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ContextualMenuSelect()
+ *
+ * Summary:
+ * Displays a contextual menu.
+ *
+ * Discussion:
+ * If IsShowContextualMenuClick returns true, you should call the
+ * ContextualMenuSelect API after generating your own menu and
+ * preparing an Apple Event descriptor (AEDesc) that describes the
+ * item for which your application is displaying a contextual menu.
+ * This descriptor may contain an object specifier or raw data and
+ * will be passed to all contextual menu plug-ins. The system will
+ * add other items before displaying the contextual menu, and it
+ * will remove those items before returning, leaving the menu in its
+ * original state. After all the system commands are added, the
+ * contextual menu is displayed and tracked. If the user selects one
+ * of the system items, it is handled by the system and the call
+ * returns as though the user didn't select anything from the menu.
+ * If the user selects any other item (or no item at all), the Menu
+ * Manager passes back appropriate values in the parameters
+ * outUserSelectionType, outMenuID, and outMenuItem. Your
+ * application should provide visual feedback indicating the item
+ * that was clicked upon. For example, a click on an icon should
+ * highlight the icon, while a click on editable text should not
+ * eliminate the current selection. If the outUserSelectionType
+ * parameter contains kCMMenuItemSelected, you should look at the
+ * outMenuID and outMenuItem parameters to determine what menu item
+ * the user chose and handle it appropriately. If the user selected
+ * kCMHelpItemSelected, you should open the proper Apple Guide
+ * sequence or other form of custom help.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * A menu containing application commands to display. The caller
+ * creates this menu based on the current context, the mouse
+ * location, and the current selection (if it was the target of
+ * the mouse). If you pass nil, only system commands will be
+ * displayed. The menu should be added to the menu list as a
+ * pop-up menu (using the InsertMenu function).
+ *
+ * inGlobalLocation:
+ * The location (in global coordinates) of the mouse near which
+ * the menu is to be displayed.
+ *
+ * inReserved:
+ * Reserved for future use. Pass false for this parameter.
+ *
+ * inHelpType:
+ * An identifier specifying the type of help to be provided by the
+ * application; see kCMHelpItem constants.
+ *
+ * inHelpItemString:
+ * A string containing the text to be displayed for the help menu
+ * item. This string is unused unless you also pass the constant
+ * kCMHelpItemOtherHelp in the inHelpType parameter.
+ *
+ * inSelection:
+ * An object specifier for the current selection. This allows he
+ * system to examine the selection and add special system commands
+ * accordingly. Passing a value of nil indicates that no selection
+ * should be examined, and most likely, no special system actions
+ * will be included.
+ *
+ * outUserSelectionType:
+ * On exit, the value indicates what the user selected from the
+ * contextual menu; see kCMNothingSelected, kCMMenuItemSelected,
+ * and kCMShowHelpSelected.
+ *
+ * outMenuID:
+ * On exit, if outUserSelectionType is set to kCMMenuItemSelected,
+ * the value is set to the menu ID of the chosen item.
+ *
+ * outMenuItem:
+ * On exit, if outUserSelectionType is set to kCMMenuItemSelected,
+ * the value is set to the menu item chosen.
+ *
+ * Result:
+ * An OSStatus result code. ContextualMenuSelect returns the result
+ * code userCanceledErr and sets outUserSelectionType to
+ * kCMNothingSelected to indicate that the user did not select
+ * anything from the contextual menu and no further processing is
+ * needed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ContextualMenu 1.0 and later
+ }
+function ContextualMenuSelect( inMenu: MenuRef; inGlobalLocation: Point; inReserved: Boolean; inHelpType: UInt32; {const} inHelpItemString:ConstStringPtr { can be NULL }; {const} inSelection: AEDescPtr { can be NULL }; var outUserSelectionType: UInt32; var outMenuID: MenuID; var outMenuItem: MenuItemIndex ): OSStatus; external name '_ContextualMenuSelect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ProcessIsContextualMenuClient()
+ *
+ * Summary:
+ * Determines whether the specified process is a contextual menu
+ * client.
+ *
+ * Discussion:
+ * On Mac OS 9, this API consults a global table of all processes
+ * that have registered with the Contextual Menu Manager by calling
+ * InitContextualMenus. On Mac OS X, this API ignores the inPSN
+ * parameter and always returns whether the current process is
+ * registered with the Contextual Menu Manager.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPSN:
+ * The process to examine.
+ *
+ * Result:
+ * Whether the specified process (or, on Mac OS X, the current
+ * process) is registered with the Contextual Menu Manager.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ContextualMenu 1.0 and later
+ }
+function ProcessIsContextualMenuClient( var inPSN: ProcessSerialNumber ): Boolean; external name '_ProcessIsContextualMenuClient';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Contextual Menu Plugin Interface }
+{ For Mac OS X 10.1, we support a new type of Contextual Menu Plugin: the CFPlugIn }
+{ based plugin. Each plugin must be in a CFPlugIn in the Contextual Menu Items }
+{ folder in one of these paths: }
+{ /System/Library/Contextual Menu Items/ }
+{ /Library/Contextual Menu Items/ }
+{ ~/Library/Contextual Menu Items/ }
+{ It must export the following functions using the following interface or a C++ }
+{ interface inheriting from IUnknown and including similar functions. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+(*
+{ The Contextual Menu Manager will only load CFPlugIns of type kContextualMenuTypeID }
+#define kContextualMenuTypeID ( CFUUIDGetConstantUUIDWithBytes( NULL, \
+ 0x2F, 0x65, 0x22, 0xE9, 0x3E, 0x66, 0x11, 0xD5, \
+ 0x80, 0xA7, 0x00, 0x30, 0x65, 0xB3, 0x00, 0xBC ) )
+ { 2F6522E9-3E66-11D5-80A7-003065B300BC }
+
+{ Contextual Menu Plugins must implement this Contexual Menu Plugin Interface }
+#define kContextualMenuInterfaceID ( CFUUIDGetConstantUUIDWithBytes( NULL, \
+ 0x32, 0x99, 0x7B, 0x62, 0x3E, 0x66, 0x11, 0xD5, \
+ 0xBE, 0xAB, 0x00, 0x30, 0x65, 0xB3, 0x00, 0xBC ) )
+ { 32997B62-3E66-11D5-BEAB-003065B300BC }
+
+#define CM_IUNKNOWN_C_GUTS \
+ void *_reserved; \
+ SInt32 (*QueryInterface)(void *thisPointer, CFUUIDBytes iid, void ** ppv); \
+ UInt32 (*AddRef)(void *thisPointer); \
+ UInt32 (*Release)(void *thisPointer)
+
+{ The function table for the interface }
+type
+ ContextualMenuInterfaceStruct = record
+CM_IUNKNOWN_C_GUTS;
+ OSStatus ( *ExamineContext )(
+ void* thisInstance,
+ const AEDesc* inContext,
+ AEDescList* outCommandPairs );
+ OSStatus ( *HandleSelection )(
+ void* thisInstance,
+ AEDesc* inContext,
+ SInt32 inCommandID );
+ void ( *PostMenuCleanup )(
+ void* thisInstance );
+ end;
+*)
+{
+ * CMPluginExamineContext()
+ *
+ * Availability:
+ * Implemented by client
+ }
+function CMPluginExamineContext( thisInstance: UnivPtr; const (*var*) inContext: AEDesc; var outCommandPairs: AEDescList ): OSStatus; external name '_CMPluginExamineContext';
+
+
+{
+ * CMPluginHandleSelection()
+ *
+ * Availability:
+ * Implemented by client
+ }
+function CMPluginHandleSelection( thisInstance: UnivPtr; var inContext: AEDesc; inCommandID: SInt32 ): OSStatus; external name '_CMPluginHandleSelection';
+
+
+{
+ * CMPluginPostMenuCleanup()
+ *
+ * Availability:
+ * Implemented by client
+ }
+procedure CMPluginPostMenuCleanup( thisInstance: UnivPtr ); external name '_CMPluginPostMenuCleanup';
+
+
+{ previously in LowMem.h. This functions return the menu ID of the hilited menu }
+{
+ * LMGetTheMenu()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LMGetTheMenu: MenuID; external name '_LMGetTheMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * newmenu()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * appendmenu()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * insertmenuitem()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * menuselect()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * setmenuitemtext()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * getmenuitemtext()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+(*
+#if OLDROUTINENAMES
+#define AddResMenu(theMenu, theType) AppendResMenu(theMenu, theType)
+#define InsMenuItem(theMenu, itemString, afterItem) InsertMenuItem(theMenu, itemString, afterItem)
+#define DelMenuItem( theMenu, item ) DeleteMenuItem( theMenu, item )
+#if TARGET_OS_MAC
+#define SetItem MacSetItem
+#define GetItem MacGetItem
+#endif
+#define MacSetItem(theMenu, item, itemString) SetMenuItemText(theMenu, item, itemString)
+#define MacGetItem(theMenu, item, itemString) GetMenuItemText(theMenu, item, itemString)
+#define GetMHandle(menuID) GetMenuHandle(menuID)
+#define DelMCEntries(menuID, menuItem) DeleteMCEntries(menuID, menuItem)
+#define DispMCInfo(menuCTbl) DisposeMCInfo(menuCTbl)
+#if CALL_NOT_IN_CARBON
+#define addresmenu(menu, data) appendresmenu(menu, data)
+#define getitem(menu, item, itemString) getmenuitemtext(menu, item, itemString)
+#define setitem(menu, item, itemString) setmenuitemtext(menu, item, itemString)
+#define insmenuitem(theMenu, itemString, afterItem) insertmenuitem(theMenu, itemString, afterItem)
+#endif
+#endif { OLDROUTINENAMES }
+*)
+
+{ Getters }
+{
+ * GetMenuID()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetMenuID( menu: MenuRef ): MenuID; external name '_GetMenuID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuWidth()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetMenuWidth( menu: MenuRef ): SInt16; external name '_GetMenuWidth';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuHeight()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetMenuHeight( menu: MenuRef ): SInt16; external name '_GetMenuHeight';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuTitle()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetMenuTitle( menu: MenuRef; var title: Str255 ): StringPtr; external name '_GetMenuTitle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuDefinition()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetMenuDefinition( menu: MenuRef; outDefSpec: MenuDefSpecPtr ): OSStatus; external name '_GetMenuDefinition';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Setters }
+{
+ * SetMenuID()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetMenuID( menu: MenuRef; menuID_: MenuID ); external name '_SetMenuID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuWidth()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetMenuWidth( menu: MenuRef; width: SInt16 ); external name '_SetMenuWidth';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuHeight()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetMenuHeight( menu: MenuRef; height: SInt16 ); external name '_SetMenuHeight';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuTitle()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function SetMenuTitle( menu: MenuRef; const (*var*) title: Str255 ): OSStatus; external name '_SetMenuTitle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuDefinition()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function SetMenuDefinition( menu: MenuRef; const (*var*) defSpec: MenuDefSpec ): OSStatus; external name '_SetMenuDefinition';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+
+
+{unit StringCompare}
+{
+ File: StringCompare.p
+
+ Contains: Public interfaces for String Comparison and related operations
+
+ Version: Technology: Mac OS 8
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+{
+
+ Here are the current System 7 routine names and the translations to the older forms.
+ Please use the newer forms in all new code and migrate the older names out of existing
+ code as maintenance permits.
+
+ NEW NAME OLD NAME OBSOLETE FORM (no handle)
+
+ CompareString (Str255) IUCompPString (hp only) IUCompString (hp only)
+ CompareText (ptr/len) IUMagPString IUMagString
+ IdenticalString (Str255) IUEqualPString (hp only) IUEqualString (hp only)
+ IdenticalText (ptr/len) IUMagIDPString IUMagIDString
+ LanguageOrder IULangOrder
+ ScriptOrder IUScriptOrder
+ StringOrder (Str255) IUStringOrder (hp only)
+ TextOrder (ptr/len) IUTextOrder
+
+ RelString
+ CmpString (a only)
+ EqualString (hp only)
+
+ ReplaceText
+
+ Carbon only supports the new names. The old names are undefined for Carbon targets.
+
+ InterfaceLib always has exported the old names. For C macros have been defined to allow
+ the use of the new names. For Pascal and Assembly using the new names will result
+ in link errors.
+
+}
+
+
+const
+ { Special language code values for Language Order }
+ systemCurLang = -2; { current (itlbLang) lang for system script }
+ systemDefLang = -3; { default (table) lang for system script }
+ currentCurLang = -4; { current (itlbLang) lang for current script }
+ currentDefLang = -5; { default lang for current script }
+ scriptCurLang = -6; { current (itlbLang) lang for specified script }
+ scriptDefLang = -7; { default language for a specified script }
+
+ { obsolete names }
+ iuSystemCurLang = -2;
+ iuSystemDefLang = -3;
+ iuCurrentCurLang = -4;
+ iuCurrentDefLang = -5;
+ iuScriptCurLang = -6;
+ iuScriptDefLang = -7;
+
+
+ {
+ * These routines are available in Carbon with the new names.
+ }
+ {
+ * [Mac]ReplaceText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ReplaceText(baseText: Handle; substitutionText: Handle; var key: Str15): SInt16; external name '_ReplaceText';
+{
+ * ScriptOrder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ScriptOrder(script1: ScriptCode; script2: ScriptCode): SInt16; external name '_ScriptOrder';
+{
+ * [Mac]CompareString()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CompareString(const (*var*) aStr: Str255; const (*var*) bStr: Str255; itl2Handle: Handle): SInt16; external name '_CompareString';
+
+{
+ * IdenticalString()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IdenticalString(const (*var*) aStr: Str255; const (*var*) bStr: Str255; itl2Handle: Handle): SInt16; external name '_IdenticalString';
+
+{
+ * StringOrder()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function StringOrder(const (*var*) aStr: Str255; const (*var*) bStr: Str255; aScript: ScriptCode; bScript: ScriptCode; aLang: LangCode; bLang: LangCode): SInt16; external name '_StringOrder';
+
+{
+ * CompareText()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CompareText(aPtr: UnivPtr; bPtr: UnivPtr; aLen: SInt16; bLen: SInt16; itl2Handle: Handle): SInt16; external name '_CompareText';
+{
+ * IdenticalText()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function IdenticalText(aPtr: UnivPtr; bPtr: UnivPtr; aLen: SInt16; bLen: SInt16; itl2Handle: Handle): SInt16; external name '_IdenticalText';
+{
+ * TextOrder()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function TextOrder(aPtr: UnivPtr; bPtr: UnivPtr; aLen: SInt16; bLen: SInt16; aScript: ScriptCode; bScript: ScriptCode; aLang: LangCode; bLang: LangCode): SInt16; external name '_TextOrder';
+{
+ * LanguageOrder()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LanguageOrder(language1: LangCode; language2: LangCode): SInt16; external name '_LanguageOrder';
+{
+ * These routines are available in InterfaceLib with old names.
+ * Macros are provided for C to allow source code use to the new names.
+ }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * IUMagPString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IUMagPString(aPtr: UnivPtr; bPtr: UnivPtr; aLen: SInt16; bLen: SInt16; itl2Handle: Handle): SInt16; external name '_IUMagPString';
+{
+ * IUMagIDPString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IUMagIDPString(aPtr: UnivPtr; bPtr: UnivPtr; aLen: SInt16; bLen: SInt16; itl2Handle: Handle): SInt16; external name '_IUMagIDPString';
+{
+ * IUTextOrder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IUTextOrder(aPtr: UnivPtr; bPtr: UnivPtr; aLen: SInt16; bLen: SInt16; aScript: ScriptCode; bScript: ScriptCode; aLang: LangCode; bLang: LangCode): SInt16; external name '_IUTextOrder';
+{
+ * IULangOrder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IULangOrder(language1: LangCode; language2: LangCode): SInt16; external name '_IULangOrder';
+{
+ * IUScriptOrder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IUScriptOrder(script1: ScriptCode; script2: ScriptCode): SInt16; external name '_IUScriptOrder';
+{
+ * IUMagString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IUMagString(aPtr: UnivPtr; bPtr: UnivPtr; aLen: SInt16; bLen: SInt16): SInt16; external name '_IUMagString';
+{
+ * IUMagIDString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IUMagIDString(aPtr: UnivPtr; bPtr: UnivPtr; aLen: SInt16; bLen: SInt16): SInt16; external name '_IUMagIDString';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * IUCompPString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IUCompPString(const (*var*) aStr: Str255; const (*var*) bStr: Str255; itl2Handle: Handle): SInt16; external name '_IUCompPString';
+
+{
+ * IUEqualPString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IUEqualPString(const (*var*) aStr: Str255; const (*var*) bStr: Str255; itl2Handle: Handle): SInt16; external name '_IUEqualPString';
+
+{
+ * IUStringOrder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IUStringOrder(const (*var*) aStr: Str255; const (*var*) bStr: Str255; aScript: ScriptCode; bScript: ScriptCode; aLang: LangCode; bLang: LangCode): SInt16; external name '_IUStringOrder';
+
+{
+ * IUCompString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IUCompString(const (*var*) aStr: Str255; const (*var*) bStr: Str255): SInt16; external name '_IUCompString';
+
+{
+ * IUEqualString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function IUEqualString(const (*var*) aStr: Str255; const (*var*) bStr: Str255): SInt16; external name '_IUEqualString';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+{
+ * RelString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function RelString(const (*var*) str1: Str255; const (*var*) str2: Str255; caseSensitive: boolean; diacSensitive: boolean): SInt16; external name '_RelString';
+
+{
+ * EqualString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function EqualString(const (*var*) str1: Str255; const (*var*) str2: Str255; caseSensitive: boolean; diacSensitive: boolean): boolean; external name '_EqualString';
+
+
+{$ALIGN MAC68K}
+
+
+{unit TextUtils}
+{
+ File: TextUtils.p
+
+ Contains: Text Utilities Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+
+ Here are the current System 7 routine names and the translations to the older forms.
+ Please use the newer forms in all new code and migrate the older names out of existing
+ code as maintainance permits.
+
+ NEW NAME OLD NAMEs OBSOLETE FORM (no script code)
+
+ FindScriptRun
+ FindWordBreaks NFindWord, FindWord
+ GetIndString
+ GetString
+ Munger
+ NewString
+ SetString
+ StyledLineBreak
+ TruncString
+ TruncText
+
+ UpperString ($A054) UprString, UprText
+ UppercaseText SCUpperText (a only) UpperText ($A456)
+ LowercaseText LwrString, LowerText, LwrText ($A056)
+ StripDiacritics StripText ($A256)
+ UppercaseStripDiacritics StripUpperText ($A656)
+
+
+}
+
+{ TruncCode, StyledLineBreakCode, and truncation constants moved to QuickDrawText.i }
+
+type
+ ScriptRunStatusPtr = ^ScriptRunStatus;
+ ScriptRunStatus = record
+ script: SInt8;
+ runVariant: SInt8;
+ end;
+
+ BreakTablePtr = ^BreakTable;
+ BreakTable = record
+ charTypes: packed array [0..255] of char;
+ tripleLength: SInt16;
+ triples: array [0..0] of SInt16;
+ end;
+
+ NBreakTablePtr = ^NBreakTable;
+ NBreakTable = record
+ flags1: SInt8;
+ flags2: SInt8;
+ version: SInt16;
+ classTableOff: SInt16;
+ auxCTableOff: SInt16;
+ backwdTableOff: SInt16;
+ forwdTableOff: SInt16;
+ doBackup: SInt16;
+ length: SInt16; { length of NBreakTable }
+ charTypes: packed array [0..255] of char;
+ tables: array [0..0] of SInt16;
+ end;
+
+ { The following functions are new names that work on 68k and PowerPC }
+ {
+ * Munger()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function Munger(h: Handle; offset: SInt32; ptr1: UnivPtr; len1: SInt32; ptr2: UnivPtr; len2: SInt32): SInt32; external name '_Munger';
+{
+ * NewString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewString(const (*var*) theString: Str255): StringHandle; external name '_NewString';
+{
+ * SetString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SetString(theString: StringHandle; const (*var*) strNew: Str255); external name '_SetString';
+{
+ * GetString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetString(stringID: SInt16): StringHandle; external name '_GetString';
+{
+ * GetIndString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure GetIndString(var theString: Str255; strListID: SInt16; index: SInt16); external name '_GetIndString';
+
+{
+ * FindWordBreaks()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure FindWordBreaks(textPtr: Ptr; textLength: SInt16; offset: SInt16; leadingEdge: boolean; breaks: BreakTablePtr; var offsets: OffsetTable; script: ScriptCode); external name '_FindWordBreaks';
+{
+ * LowercaseText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LowercaseText(textPtr: Ptr; len: SInt16; script: ScriptCode); external name '_LowercaseText';
+{
+ * UppercaseText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure UppercaseText(textPtr: Ptr; len: SInt16; script: ScriptCode); external name '_UppercaseText';
+{
+ * StripDiacritics()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure StripDiacritics(textPtr: Ptr; len: SInt16; script: ScriptCode); external name '_StripDiacritics';
+{
+ * UppercaseStripDiacritics()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure UppercaseStripDiacritics(textPtr: Ptr; len: SInt16; script: ScriptCode); external name '_UppercaseStripDiacritics';
+{
+ * FindScriptRun()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function FindScriptRun(textPtr: Ptr; textLen: SInt32; var lenUsed: SInt32): ScriptRunStatus; external name '_FindScriptRun';
+{
+ The following functions are old names, but are required for PowerPC builds
+ because InterfaceLib exports these names, instead of the new ones.
+}
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * FindWord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure FindWord(textPtr: Ptr; textLength: SInt16; offset: SInt16; leadingEdge: boolean; breaks: BreakTablePtr; var offsets: OffsetTable); external name '_FindWord';
+{
+ * NFindWord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure NFindWord(textPtr: Ptr; textLength: SInt16; offset: SInt16; leadingEdge: boolean; nbreaks: NBreakTablePtr; var offsets: OffsetTable); external name '_NFindWord';
+{
+ On 68K machines, LwrText, LowerText, StripText, UpperText and StripUpperText
+ return an error code in register D0, but System 7 PowerMacs do not emulate
+ this properly, so checking D0 is unreliable.
+}
+
+{
+ * LwrText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LwrText(textPtr: Ptr; len: SInt16); external name '_LwrText';
+{
+ * LowerText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LowerText(textPtr: Ptr; len: SInt16); external name '_LowerText';
+{
+ * StripText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure StripText(textPtr: Ptr; len: SInt16); external name '_StripText';
+{
+ * UpperText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure UpperText(textPtr: Ptr; len: SInt16); external name '_UpperText';
+{
+ * StripUpperText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure StripUpperText(textPtr: Ptr; len: SInt16); external name '_StripUpperText';
+{ The following are new names which are exported by InterfaceLib }
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * UpperString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure UpperString(var theString: Str255; diacSensitive: boolean); external name '_UpperString';
+
+{ Old routine name but no new names are mapped to it: }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * UprText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure UprText(textPtr: Ptr; len: SInt16); external name '_UprText';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ Functions for converting between C and Pascal Strings
+ (Previously in Strings.h)
+
+ Note: CopyPascalStringToC, CopyCStringToPascal, c2pstrcpy, and p2cstrcpy
+ are written to allow inplace conversion. That is, the src and dst
+ parameters can point to the memory location. These functions
+ are available in CarbonLib and CarbonAccessors.o.
+
+ Note: c2pstr, C2PStr, p2cstr, and P2CStr are all deprecated. These functions
+ only do inplace conversion and often require casts to call them. This can
+ cause bugs because you can easily cast away a const and change the
+ contents of a read-only buffer. These functions are available
+ in InterfaceLib, or when building for Carbon if you #define OLDP2C,
+ then they are available as a macro.
+
+}
+{
+ * c2pstrcpy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure c2pstrcpy(var dst: Str255; src: ConstCStringPtr); external name '_c2pstrcpy';
+
+{
+ * p2cstrcpy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure p2cstrcpy(dst: CStringPtr; const (*var*) src: Str255); external name '_p2cstrcpy';
+
+{
+ * CopyPascalStringToC()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure CopyPascalStringToC(const (*var*) src: Str255; dst: CStringPtr); external name '_CopyPascalStringToC';
+
+{
+ * CopyCStringToPascal()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure CopyCStringToPascal(src: ConstCStringPtr; var dst: Str255); external name '_CopyCStringToPascal';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * C2PStrProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure C2PStrProc(aStr: UnivPtr); external name '_C2PStrProc';
+
+{
+ * P2CStrProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure P2CStrProc(aStr: StringPtr); external name '_P2CStrProc';
+
+{
+ * C2PStr()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function C2PStr(cString: UnivPtr): StringPtr; external name '_C2PStr';
+
+{
+ * P2CStr()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function P2CStr(pString: StringPtr): Ptr; external name '_P2CStr';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+{$ALIGN MAC68K}
+
+
+{unit ToolUtils}
+{
+ File: ToolUtils.p
+
+ Contains: Toolbox Utilities Interfaces.
+
+ Version: Technology: System 7.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1990-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+{
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ Note:
+
+ The following routines that used to be in this header file, have moved to
+ more appropriate headers.
+
+ FixMath.h: FixMul
+ FixRatio
+ FixRound
+
+ Icons.h: GetIcon
+ PlotIcon
+
+ Quickdraw.h: AngleFromSlope
+ DeltaPoint
+ GetCursor
+ GetIndPattern
+ GetPattern
+ GetPicture
+ PackBits
+ ScreenRes
+ ShieldCursor
+ SlopeFromAngle
+ UnpackBits
+
+ TextUtils.h: Munger
+ GetIndString
+ GetString
+ NewString
+ SetString
+ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+
+{
+ * BitTst()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BitTst(bytePtr: UnivPtr; bitNum: SInt32): boolean; external name '_BitTst';
+{
+ * BitSet()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure BitSet(bytePtr: UnivPtr; bitNum: SInt32); external name '_BitSet';
+{
+ * BitClr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure BitClr(bytePtr: UnivPtr; bitNum: SInt32); external name '_BitClr';
+{
+ * BitAnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BitAnd(value1: SInt32; value2: SInt32): SInt32; external name '_BitAnd';
+{
+ * BitOr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BitOr(value1: SInt32; value2: SInt32): SInt32; external name '_BitOr';
+{
+ * BitXor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BitXor(value1: SInt32; value2: SInt32): SInt32; external name '_BitXor';
+{
+ * BitNot()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BitNot(value: SInt32): SInt32; external name '_BitNot';
+{
+ * BitShift()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function BitShift(value: SInt32; count: SInt16): SInt32; external name '_BitShift';
+{$ifc TARGET_CPU_68K}
+
+type
+ Int64BitPtr = ^Int64Bit;
+ Int64Bit = record
+ hiLong: SInt32;
+ loLong: UInt32;
+ end;
+
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * LongMul()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LongMul(a: SInt32; b: SInt32; var result: Int64Bit); external name '_LongMul';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {TARGET_CPU_68K}
+
+{
+ HiWord and LoWord are not in Carbon, but Metrowerks
+ supplies an implementation on PPC
+}
+{
+ * HiWord()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib H.a.c.k and later
+ * Mac OS X: not available
+ }
+
+{
+ * LoWord()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib H.a.c.k and later
+ * Mac OS X: not available
+ }
+
+function HiWord(arg: SInt32): SInt16; inline; overload;
+function HiWord(arg: UInt32): UInt16; inline; overload;
+function LoWord(arg: SInt32): SInt16; inline; overload;
+function LoWord(arg: UInt32): UInt16; inline; overload;
+
+
+
+{$ALIGN MAC68K}
+
+
+
+
+{unit ABPeoplePicker}
+//
+// ABPeoplePickerC.h
+// AddressBook Framework
+//
+// Copyright (c) 2003 Apple Computer. All rights reserved.
+//
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+type
+ ABPickerRef = ^SInt32;
+
+{
+ * Picker creation and manipulation
+ }
+
+// Creates an ABPickerRef. Release with CFRelease(). The window is created hidden. Call
+// ABPickerSetVisibility() to show it.
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function ABPickerCreate: ABPickerRef; external name '_ABPickerCreate';
+
+// Change the structural frame of the window.
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerSetFrame( inPicker: ABPickerRef; const (*var*) inFrame: HIRect ); external name '_ABPickerSetFrame';
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerGetFrame( inPicker: ABPickerRef; var outFrame: HIRect ); external name '_ABPickerGetFrame';
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerSetVisibility( inPicker: ABPickerRef; visible: Boolean ); external name '_ABPickerSetVisibility';
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function ABPickerIsVisible( inPicker: ABPickerRef ): Boolean; external name '_ABPickerIsVisible';
+
+{
+ * Look and Feel
+ }
+
+const
+ // Choose the selection behavior for the value column. If multiple behaviors are selected,
+ // the most restrictive behavior will be used. Defaults to kABPickerSingleValueSelection set
+ // to TRUE.
+ kABPickerSingleValueSelection = 1 shl 0; // Allow user to choose a single value for a person.
+ kABPickerMultipleValueSelection = 1 shl 1; // Allow user to choose multiple values for a person.
+
+ // Allow the user to select entire groups in the group column. If false, at least one
+ // person in the group will be selected. Defaults to FALSE.
+ kABPickerAllowGroupSelection = 1 shl 2;
+
+ // Allow the user to select more than one group/record at a time. Defaults to TRUE.
+ kABPickerAllowMultipleSelection = 1 shl 3;
+
+type ABPickerAttributes = OptionBits;
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function ABPickerGetAttributes( inPicker: ABPickerRef ): ABPickerAttributes; external name '_ABPickerGetAttributes';
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerChangeAttributes( inPicker: ABPickerRef; inAttributesToSet: ABPickerAttributes; inAttributesToClear: ABPickerAttributes ); external name '_ABPickerChangeAttributes';
+
+{
+ * Value column
+ }
+
+ // These methods control what data (if any) is shown in the values column. The column will only
+ // display if an AB property is added. A popup button in the column header will be used if more
+ // than one property is added. Titles for built in properties will localized automatically. A
+ // list of AB properties can be found in <AddressBook/ABGlobals.h>.
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerAddProperty( inPicker: ABPickerRef; inProperty: CFStringRef ); external name '_ABPickerAddProperty';
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerRemoveProperty( inPicker: ABPickerRef; inProperty: CFStringRef ); external name '_ABPickerRemoveProperty';
+ // Returns an array of AB Properties as CFStringRefs.
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function ABPickerCopyProperties( inPicker: ABPickerRef ): CFArrayRef; external name '_ABPickerCopyProperties';
+
+ // Localized titles for third party properties should be set with these methods.
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerSetColumnTitle( inPicker: ABPickerRef; inTitle: CFStringRef; inProperty: CFStringRef ); external name '_ABPickerSetColumnTitle';
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function ABPickerCopyColumnTitle( inPicker: ABPickerRef; inProperty: CFStringRef ): CFStringRef; external name '_ABPickerCopyColumnTitle';
+
+ // Display one of the properties added above in the values column.
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerSetDisplayedProperty( inPicker: ABPickerRef; inProperty: CFStringRef ); external name '_ABPickerSetDisplayedProperty';
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function ABPickerCopyDisplayedProperty( inPicker: ABPickerRef ): CFStringRef; external name '_ABPickerCopyDisplayedProperty';
+
+{
+ * Selection
+ }
+
+ // Returns group column selection as an array of ABGroupRef objects.
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function ABPickerCopySelectedGroups( inPicker: ABPickerRef ): CFArrayRef; external name '_ABPickerCopySelectedGroups';
+
+ // Returns names column selection as an array of ABGroupRef or ABPersonRef objects.
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function ABPickerCopySelectedRecords( inPicker: ABPickerRef ): CFArrayRef; external name '_ABPickerCopySelectedRecords';
+
+ // This method returns an array of selected multi-value identifiers. Returns nil if the displayed
+ // property is a single value type.
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function ABPickerCopySelectedIdentifiers( inPicker: ABPickerRef; inPerson: ABPersonRef ): CFArrayRef; external name '_ABPickerCopySelectedIdentifiers';
+
+ // Returns an array containing CFStringRefs for each item selected in the values column.
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function ABPickerCopySelectedValues( inPicker: ABPickerRef ): CFArrayRef; external name '_ABPickerCopySelectedValues';
+
+ // Select group/name/value programatically.
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerSelectGroup( inPicker: ABPickerRef; inGroup: ABGroupRef; inExtendSelection: Boolean ); external name '_ABPickerSelectGroup';
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerSelectRecord( inPicker: ABPickerRef; inRecord: ABRecordRef; inExtendSelection: Boolean ); external name '_ABPickerSelectRecord';
+ // Individual values contained within an multi-value property can be selected with this method.
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerSelectIdentifier( inPicker: ABPickerRef; inPerson: ABPersonRef; inIdentifier: CFStringRef; inExtendSelection: Boolean ); external name '_ABPickerSelectIdentifier';
+
+ // Remove selection
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerDeselectGroup( inPicker: ABPickerRef; inGroup: ABGroupRef ); external name '_ABPickerDeselectGroup';
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerDeselectRecord( inPicker: ABPickerRef; inRecord: ABRecordRef ); external name '_ABPickerDeselectRecord';
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerDeselectIdentifier( inPicker: ABPickerRef; inPerson: ABPersonRef; inIdentifier: CFStringRef ); external name '_ABPickerDeselectIdentifier';
+
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerDeselectAll( inPicker: ABPickerRef ); external name '_ABPickerDeselectAll';
+
+{
+ * Events and Actions
+ *
+ * Your delegate will be notified when the user changes the selection or displayed property of the picker.
+ * Picker events have an event class of kEventClassABPeoplePicker and one of the kinds listed below. Picker
+ * events contain an event parameter which contains the ABPickerRef. To obtain this:
+ *
+ * GetEventParameter(inEvent, kEventParamABPickerRef,
+ * typeCFTypeRef, NULL, sizeof(ABPickerRef),
+ * NULL, &outPickerRef);
+ *
+ }
+
+const
+ // Carbon Event class for People Picker
+ kEventClassABPeoplePicker = $61627070 (* 'abpp' *);
+
+const
+ // Carbon Event kinds for People Picker
+ kEventABPeoplePickerGroupSelectionChanged = 1;
+ kEventABPeoplePickerNameSelectionChanged = 2;
+ kEventABPeoplePickerValueSelectionChanged = 3;
+ kEventABPeoplePickerDisplayedPropertyChanged = 4;
+
+ kEventABPeoplePickerGroupDoubleClicked = 5;
+ kEventABPeoplePickerNameDoubleClicked = 6;
+
+const
+ // Carbon Event parameter name
+ kEventParamABPickerRef = $61627070 (* 'abpp' *);
+
+ // Set the event handler for People Picker events.
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerSetDelegate( inPicker: ABPickerRef; inDelegate: HIObjectRef ); external name '_ABPickerSetDelegate';
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+function ABPickerGetDelegate( inPicker: ABPickerRef ): HIObjectRef; external name '_ABPickerGetDelegate';
+
+ // Clear the search field and reset the list of displayed names.
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerClearSearchField( inPicker: ABPickerRef ); external name '_ABPickerClearSearchField';
+
+ // Launch AddressBook and edit the current selection
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerEditInAddressBook( inPicker: ABPickerRef ); external name '_ABPickerEditInAddressBook';
+// AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
+procedure ABPickerSelectInAddressBook( inPicker: ABPickerRef ); external name '_ABPickerSelectInAddressBook';
+
+{unit AEHelpers}
+{
+ File: AEHelpers.p
+
+ Contains: AEPrint, AEBuild and AEStream for Carbon
+
+ Version: Technology: Mac OS X, CarbonLib
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1999-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{
+ * Originally from AEGIzmos by Jens Alfke, circa 1992.
+ }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+{
+ * AEBuild is only available for C programmers.
+ }
+{
+ * AEPrintDescToHandle
+ *
+ * AEPrintDescToHandle provides a way to turn an AEDesc into a textual
+ * representation. This is most useful for debugging calls to
+ * AEBuildDesc and friends. The Handle returned should be disposed by
+ * the caller. The size of the handle is the actual number of
+ * characters in the string.
+ }
+{
+ * AEPrintDescToHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEPrintDescToHandle(const (*var*) desc: AEDesc; var result: Handle): OSStatus; external name '_AEPrintDescToHandle';
+
+{
+ * AEStream:
+ *
+ * The AEStream interface allows you to build AppleEvents by appending
+ * to an opaque structure (an AEStreamRef) and then turning this
+ * structure into an AppleEvent. The basic idea is to open the
+ * stream, write data, and then close it - closing it produces an
+ * AEDesc, which may be partially complete, or may be a complete
+ * AppleEvent.
+ }
+
+type
+ AEStreamRef = ^SInt32; { an opaque 32-bit type }
+ AEStreamRefPtr = ^AEStreamRef; { when a var xx:AEStreamRef parameter can be nil, it is changed to xx: AEStreamRefPtr }
+ {
+ Create and return an AEStreamRef
+ Returns NULL on memory allocation failure
+ }
+ {
+ * AEStreamOpen()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamOpen: AEStreamRef; external name '_AEStreamOpen';
+
+{
+ Closes and disposes of an AEStreamRef, producing
+ results in the desc. You must dispose of the desc yourself.
+ If you just want to dispose of the AEStreamRef, you can pass NULL for desc.
+}
+{
+ * AEStreamClose()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamClose(ref: AEStreamRef; var desc: AEDesc): OSStatus; external name '_AEStreamClose';
+
+{
+ Prepares an AEStreamRef for appending data to a newly created desc.
+ You append data with AEStreamWriteData
+}
+{
+ * AEStreamOpenDesc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamOpenDesc(ref: AEStreamRef; newType: DescType): OSStatus; external name '_AEStreamOpenDesc';
+
+{ Append data to the previously opened desc. }
+{
+ * AEStreamWriteData()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamWriteData(ref: AEStreamRef; data: UnivPtr; length: Size): OSStatus; external name '_AEStreamWriteData';
+
+{
+ Finish a desc. After this, you can close the stream, or adding new
+ descs, if you're assembling a list.
+}
+{
+ * AEStreamCloseDesc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamCloseDesc(ref: AEStreamRef): OSStatus; external name '_AEStreamCloseDesc';
+
+{ Write data as a desc to the stream }
+{
+ * AEStreamWriteDesc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamWriteDesc(ref: AEStreamRef; newType: DescType; data: UnivPtr; length: Size): OSStatus; external name '_AEStreamWriteDesc';
+
+{ Write an entire desc to the stream }
+{
+ * AEStreamWriteAEDesc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamWriteAEDesc(ref: AEStreamRef; const (*var*) desc: AEDesc): OSStatus; external name '_AEStreamWriteAEDesc';
+
+{
+ Begin a list. You can then append to the list by doing
+ AEStreamOpenDesc, or AEStreamWriteDesc.
+}
+{
+ * AEStreamOpenList()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamOpenList(ref: AEStreamRef): OSStatus; external name '_AEStreamOpenList';
+
+{ Finish a list. }
+{
+ * AEStreamCloseList()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamCloseList(ref: AEStreamRef): OSStatus; external name '_AEStreamCloseList';
+
+{
+ Begin a record. A record usually has type 'reco', however, this is
+ rather generic, and frequently a different type is used.
+}
+{
+ * AEStreamOpenRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamOpenRecord(ref: AEStreamRef; newType: DescType): OSStatus; external name '_AEStreamOpenRecord';
+
+{ Change the type of a record. }
+{
+ * AEStreamSetRecordType()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamSetRecordType(ref: AEStreamRef; newType: DescType): OSStatus; external name '_AEStreamSetRecordType';
+
+{ Finish a record }
+{
+ * AEStreamCloseRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamCloseRecord(ref: AEStreamRef): OSStatus; external name '_AEStreamCloseRecord';
+
+{
+ Add a keyed descriptor to a record. This is analogous to AEPutParamDesc.
+ it can only be used when writing to a record.
+}
+{
+ * AEStreamWriteKeyDesc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamWriteKeyDesc(ref: AEStreamRef; key: AEKeyword; newType: DescType; data: UnivPtr; length: Size): OSStatus; external name '_AEStreamWriteKeyDesc';
+
+{
+ OpenDesc for a keyed record entry. You can youse AEStreamWriteData
+ after opening a keyed desc.
+}
+{
+ * AEStreamOpenKeyDesc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamOpenKeyDesc(ref: AEStreamRef; key: AEKeyword; newType: DescType): OSStatus; external name '_AEStreamOpenKeyDesc';
+
+{ Write a key to the stream - you can follow this with an AEWriteDesc. }
+{
+ * AEStreamWriteKey()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamWriteKey(ref: AEStreamRef; key: AEKeyword): OSStatus; external name '_AEStreamWriteKey';
+
+{
+ Create a complete AppleEvent. This creates and returns a new stream.
+ Use this call to populate the meta fields in an AppleEvent record.
+ After this, you can add your records, lists and other parameters.
+}
+{
+ * AEStreamCreateEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamCreateEvent(clazz: AEEventClass; id: AEEventID; targetType: DescType; targetData: UnivPtr; targetLength: SInt32; returnID: SInt16; transactionID: SInt32): AEStreamRef; external name '_AEStreamCreateEvent';
+
+{
+ This call lets you augment an existing AppleEvent using the stream
+ APIs. This would be useful, for example, in constructing the reply
+ record in an AppleEvent handler. Note that AEStreamOpenEvent will
+ consume the AppleEvent passed in - you can't access it again until the
+ stream is closed. When you're done building the event, AEStreamCloseStream
+ will reconstitute it.
+}
+{
+ * AEStreamOpenEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamOpenEvent(var event: AppleEvent): AEStreamRef; external name '_AEStreamOpenEvent';
+
+{ Mark a keyword as being an optional parameter. }
+{
+ * AEStreamOptionalParam()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEStreamOptionalParam(ref: AEStreamRef; key: AEKeyword): OSStatus; external name '_AEStreamOptionalParam';
+
+{$ALIGN MAC68K}
+
+
+{unit AEObjects}
+{
+ File: AEObjects.p
+
+ Contains: Object Support Library Interfaces.
+
+ Version: Technology: System 8.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1991-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ { *** LOGICAL OPERATOR CONSTANTS *** }
+ kAEAND = $414E4420 (* 'AND ' *); { 0x414e4420 }
+ kAEOR = $4F522020 (* 'OR ' *); { 0x4f522020 }
+ kAENOT = $4E4F5420 (* 'NOT ' *); { 0x4e4f5420 }
+ { *** ABSOLUTE ORDINAL CONSTANTS *** }
+ kAEFirst = $66697273 (* 'firs' *); { 0x66697273 }
+ kAELast = $6C617374 (* 'last' *); { 0x6c617374 }
+ kAEMiddle = $6D696464 (* 'midd' *); { 0x6d696464 }
+ kAEAny = $616E7920 (* 'any ' *); { 0x616e7920 }
+ kAEAll = $616C6C20 (* 'all ' *); { 0x616c6c20 }
+ { *** RELATIVE ORDINAL CONSTANTS *** }
+ kAENext = $6E657874 (* 'next' *); { 0x6e657874 }
+ kAEPrevious = $70726576 (* 'prev' *); { 0x70726576 }
+ { *** KEYWORD CONSTANT *** }
+ keyAECompOperator = $72656C6F (* 'relo' *); { 0x72656c6f }
+ keyAELogicalTerms = $7465726D (* 'term' *); { 0x7465726d }
+ keyAELogicalOperator = $6C6F6763 (* 'logc' *); { 0x6c6f6763 }
+ keyAEObject1 = $6F626A31 (* 'obj1' *); { 0x6f626a31 }
+ keyAEObject2 = $6F626A32 (* 'obj2' *); { 0x6f626a32 }
+ { ... for Keywords for getting fields out of object specifier records. }
+ keyAEDesiredClass = $77616E74 (* 'want' *); { 0x77616e74 }
+ keyAEContainer = $66726F6D (* 'from' *); { 0x66726f6d }
+ keyAEKeyForm = $666F726D (* 'form' *); { 0x666f726d }
+ keyAEKeyData = $73656C64 (* 'seld' *); { 0x73656c64 }
+
+ { ... for Keywords for getting fields out of Range specifier records. }
+ keyAERangeStart = $73746172 (* 'star' *); { 0x73746172 }
+ keyAERangeStop = $73746F70 (* 'stop' *); { 0x73746f70 }
+ { ... special handler selectors for OSL Callbacks. }
+ keyDisposeTokenProc = $78746F6B (* 'xtok' *); { 0x78746f6b }
+ keyAECompareProc = $636D7072 (* 'cmpr' *); { 0x636d7072 }
+ keyAECountProc = $636F6E74 (* 'cont' *); { 0x636f6e74 }
+ keyAEMarkTokenProc = $6D6B6964 (* 'mkid' *); { 0x6d6b6964 }
+ keyAEMarkProc = $6D61726B (* 'mark' *); { 0x6d61726b }
+ keyAEAdjustMarksProc = $61646A6D (* 'adjm' *); { 0x61646a6d }
+ keyAEGetErrDescProc = $696E6463 (* 'indc' *); { 0x696e6463 }
+
+ { *** VALUE and type CONSTANTS *** }
+ { ... possible values for the keyAEKeyForm field of an object specifier. }
+ formAbsolutePosition = $696E6478 (* 'indx' *); { 0x696e6478 }
+ formRelativePosition = $72656C65 (* 'rele' *); { 0x72656c65 }
+ formTest = $74657374 (* 'test' *); { 0x74657374 }
+ formRange = $72616E67 (* 'rang' *); { 0x72616e67 }
+ formPropertyID = $70726F70 (* 'prop' *); { 0x70726f70 }
+ formName = $6E616D65 (* 'name' *); { 0x6e616d65 }
+ { ... relevant types (some of these are often pared with forms above). }
+ typeObjectSpecifier = $6F626A20 (* 'obj ' *); { 0x6f626a20 }
+ typeObjectBeingExamined = $65786D6E (* 'exmn' *); { 0x65786d6e }
+ typeCurrentContainer = $63636E74 (* 'ccnt' *); { 0x63636e74 }
+ typeToken = $746F6B65 (* 'toke' *); { 0x746f6b65 }
+ typeRelativeDescriptor = $72656C20 (* 'rel ' *); { 0x72656c20 }
+ typeAbsoluteOrdinal = $6162736F (* 'abso' *); { 0x6162736f }
+ typeIndexDescriptor = $696E6465 (* 'inde' *); { 0x696e6465 }
+ typeRangeDescriptor = $72616E67 (* 'rang' *); { 0x72616e67 }
+ typeLogicalDescriptor = $6C6F6769 (* 'logi' *); { 0x6c6f6769 }
+ typeCompDescriptor = $636D7064 (* 'cmpd' *); { 0x636d7064 }
+ typeOSLTokenList = $6F73746C (* 'ostl' *); { 0x6F73746C }
+
+ { Possible values for flags parameter to AEResolve. They're additive }
+ kAEIDoMinimum = $0000;
+ kAEIDoWhose = $0001;
+ kAEIDoMarking = $0004;
+ kAEPassSubDescs = $0008;
+ kAEResolveNestedLists = $0010;
+ kAEHandleSimpleRanges = $0020;
+ kAEUseRelativeIterators = $0040;
+
+ { *** SPECIAL CONSTANTS FOR CUSTOM WHOSE-CLAUSE RESOLUTION }
+ typeWhoseDescriptor = $77686F73 (* 'whos' *); { 0x77686f73 }
+ formWhose = $77686F73 (* 'whos' *); { 0x77686f73 }
+ typeWhoseRange = $77726E67 (* 'wrng' *); { 0x77726e67 }
+ keyAEWhoseRangeStart = $77737472 (* 'wstr' *); { 0x77737472 }
+ keyAEWhoseRangeStop = $77737470 (* 'wstp' *); { 0x77737470 }
+ keyAEIndex = $6B696478 (* 'kidx' *); { 0x6b696478 }
+ keyAETest = $6B747374 (* 'ktst' *); { 0x6b747374 }
+
+ {
+ used for rewriting tokens in place of 'ccnt' descriptors
+ This record is only of interest to those who, when they...
+ ...get ranges as key data in their accessor procs, choose
+ ...to resolve them manually rather than call AEResolve again.
+ }
+
+type
+ ccntTokenRecordPtr = ^ccntTokenRecord;
+ ccntTokenRecord = record
+ tokenClass: DescType;
+ token: AEDesc;
+ end;
+
+ ccntTokenRecPtr = ^ccntTokenRecord;
+ ccntTokenRecHandle = ^ccntTokenRecPtr;
+{$ifc OLDROUTINENAMES}
+ DescPtr = ^AEDesc;
+ DescHandle = ^DescPtr;
+{$endc} {OLDROUTINENAMES}
+
+ { typedefs providing type checking for procedure pointers }
+{$ifc TYPED_FUNCTION_POINTERS}
+ OSLAccessorProcPtr = function(desiredClass: DescType; const (*var*) container: AEDesc; containerClass: DescType; form: DescType; const (*var*) selectionData: AEDesc; var value: AEDesc; accessorRefcon: SInt32): OSErr;
+{$elsec}
+ OSLAccessorProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ OSLCompareProcPtr = function(oper: DescType; const (*var*) obj1: AEDesc; const (*var*) obj2: AEDesc; var result: boolean): OSErr;
+{$elsec}
+ OSLCompareProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ OSLCountProcPtr = function(desiredType: DescType; containerClass: DescType; const (*var*) container: AEDesc; var result: SInt32): OSErr;
+{$elsec}
+ OSLCountProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ OSLDisposeTokenProcPtr = function(var unneededToken: AEDesc): OSErr;
+{$elsec}
+ OSLDisposeTokenProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ OSLGetMarkTokenProcPtr = function(const (*var*) dContainerToken: AEDesc; containerClass: DescType; var result: AEDesc): OSErr;
+{$elsec}
+ OSLGetMarkTokenProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ OSLGetErrDescProcPtr = function(var appDescPtr: AEDescPtr): OSErr;
+{$elsec}
+ OSLGetErrDescProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ OSLMarkProcPtr = function(const (*var*) dToken: AEDesc; const (*var*) markToken: AEDesc; index: SInt32): OSErr;
+{$elsec}
+ OSLMarkProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ OSLAdjustMarksProcPtr = function(newStart: SInt32; newStop: SInt32; const (*var*) markToken: AEDesc): OSErr;
+{$elsec}
+ OSLAdjustMarksProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ OSLAccessorUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ OSLAccessorUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ OSLCompareUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ OSLCompareUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ OSLCountUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ OSLCountUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ OSLDisposeTokenUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ OSLDisposeTokenUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ OSLGetMarkTokenUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ OSLGetMarkTokenUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ OSLGetErrDescUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ OSLGetErrDescUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ OSLMarkUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ OSLMarkUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ OSLAdjustMarksUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ OSLAdjustMarksUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppOSLAccessorProcInfo = $000FFFE0;
+ uppOSLCompareProcInfo = $00003FE0;
+ uppOSLCountProcInfo = $00003FE0;
+ uppOSLDisposeTokenProcInfo = $000000E0;
+ uppOSLGetMarkTokenProcInfo = $00000FE0;
+ uppOSLGetErrDescProcInfo = $000000E0;
+ uppOSLMarkProcInfo = $00000FE0;
+ uppOSLAdjustMarksProcInfo = $00000FE0;
+ {
+ * NewOSLAccessorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewOSLAccessorUPP(userRoutine: OSLAccessorProcPtr): OSLAccessorUPP; external name '_NewOSLAccessorUPP'; { old name was NewOSLAccessorProc }
+{
+ * NewOSLCompareUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewOSLCompareUPP(userRoutine: OSLCompareProcPtr): OSLCompareUPP; external name '_NewOSLCompareUPP'; { old name was NewOSLCompareProc }
+{
+ * NewOSLCountUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewOSLCountUPP(userRoutine: OSLCountProcPtr): OSLCountUPP; external name '_NewOSLCountUPP'; { old name was NewOSLCountProc }
+{
+ * NewOSLDisposeTokenUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewOSLDisposeTokenUPP(userRoutine: OSLDisposeTokenProcPtr): OSLDisposeTokenUPP; external name '_NewOSLDisposeTokenUPP'; { old name was NewOSLDisposeTokenProc }
+{
+ * NewOSLGetMarkTokenUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewOSLGetMarkTokenUPP(userRoutine: OSLGetMarkTokenProcPtr): OSLGetMarkTokenUPP; external name '_NewOSLGetMarkTokenUPP'; { old name was NewOSLGetMarkTokenProc }
+{
+ * NewOSLGetErrDescUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewOSLGetErrDescUPP(userRoutine: OSLGetErrDescProcPtr): OSLGetErrDescUPP; external name '_NewOSLGetErrDescUPP'; { old name was NewOSLGetErrDescProc }
+{
+ * NewOSLMarkUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewOSLMarkUPP(userRoutine: OSLMarkProcPtr): OSLMarkUPP; external name '_NewOSLMarkUPP'; { old name was NewOSLMarkProc }
+{
+ * NewOSLAdjustMarksUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewOSLAdjustMarksUPP(userRoutine: OSLAdjustMarksProcPtr): OSLAdjustMarksUPP; external name '_NewOSLAdjustMarksUPP'; { old name was NewOSLAdjustMarksProc }
+{
+ * DisposeOSLAccessorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeOSLAccessorUPP(userUPP: OSLAccessorUPP); external name '_DisposeOSLAccessorUPP';
+{
+ * DisposeOSLCompareUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeOSLCompareUPP(userUPP: OSLCompareUPP); external name '_DisposeOSLCompareUPP';
+{
+ * DisposeOSLCountUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeOSLCountUPP(userUPP: OSLCountUPP); external name '_DisposeOSLCountUPP';
+{
+ * DisposeOSLDisposeTokenUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeOSLDisposeTokenUPP(userUPP: OSLDisposeTokenUPP); external name '_DisposeOSLDisposeTokenUPP';
+{
+ * DisposeOSLGetMarkTokenUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeOSLGetMarkTokenUPP(userUPP: OSLGetMarkTokenUPP); external name '_DisposeOSLGetMarkTokenUPP';
+{
+ * DisposeOSLGetErrDescUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeOSLGetErrDescUPP(userUPP: OSLGetErrDescUPP); external name '_DisposeOSLGetErrDescUPP';
+{
+ * DisposeOSLMarkUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeOSLMarkUPP(userUPP: OSLMarkUPP); external name '_DisposeOSLMarkUPP';
+{
+ * DisposeOSLAdjustMarksUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeOSLAdjustMarksUPP(userUPP: OSLAdjustMarksUPP); external name '_DisposeOSLAdjustMarksUPP';
+{
+ * InvokeOSLAccessorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeOSLAccessorUPP(desiredClass: DescType; const (*var*) container: AEDesc; containerClass: DescType; form: DescType; const (*var*) selectionData: AEDesc; var value: AEDesc; accessorRefcon: SInt32; userRoutine: OSLAccessorUPP): OSErr; external name '_InvokeOSLAccessorUPP'; { old name was CallOSLAccessorProc }
+{
+ * InvokeOSLCompareUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeOSLCompareUPP(oper: DescType; const (*var*) obj1: AEDesc; const (*var*) obj2: AEDesc; var result: boolean; userRoutine: OSLCompareUPP): OSErr; external name '_InvokeOSLCompareUPP'; { old name was CallOSLCompareProc }
+{
+ * InvokeOSLCountUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeOSLCountUPP(desiredType: DescType; containerClass: DescType; const (*var*) container: AEDesc; var result: SInt32; userRoutine: OSLCountUPP): OSErr; external name '_InvokeOSLCountUPP'; { old name was CallOSLCountProc }
+{
+ * InvokeOSLDisposeTokenUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeOSLDisposeTokenUPP(var unneededToken: AEDesc; userRoutine: OSLDisposeTokenUPP): OSErr; external name '_InvokeOSLDisposeTokenUPP'; { old name was CallOSLDisposeTokenProc }
+{
+ * InvokeOSLGetMarkTokenUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeOSLGetMarkTokenUPP(const (*var*) dContainerToken: AEDesc; containerClass: DescType; var result: AEDesc; userRoutine: OSLGetMarkTokenUPP): OSErr; external name '_InvokeOSLGetMarkTokenUPP'; { old name was CallOSLGetMarkTokenProc }
+{
+ * InvokeOSLGetErrDescUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeOSLGetErrDescUPP(var appDescPtr: AEDescPtr; userRoutine: OSLGetErrDescUPP): OSErr; external name '_InvokeOSLGetErrDescUPP'; { old name was CallOSLGetErrDescProc }
+{
+ * InvokeOSLMarkUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeOSLMarkUPP(const (*var*) dToken: AEDesc; const (*var*) markToken: AEDesc; index: SInt32; userRoutine: OSLMarkUPP): OSErr; external name '_InvokeOSLMarkUPP'; { old name was CallOSLMarkProc }
+{
+ * InvokeOSLAdjustMarksUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeOSLAdjustMarksUPP(newStart: SInt32; newStop: SInt32; const (*var*) markToken: AEDesc; userRoutine: OSLAdjustMarksUPP): OSErr; external name '_InvokeOSLAdjustMarksUPP'; { old name was CallOSLAdjustMarksProc }
+{
+ * AEObjectInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEObjectInit: OSErr; external name '_AEObjectInit';
+
+{ Not done by inline, but by direct linking into code. It sets up the pack
+ such that further calls can be via inline }
+{
+ * AESetObjectCallbacks()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AESetObjectCallbacks(myCompareProc: OSLCompareUPP; myCountProc: OSLCountUPP; myDisposeTokenProc: OSLDisposeTokenUPP; myGetMarkTokenProc: OSLGetMarkTokenUPP; myMarkProc: OSLMarkUPP; myAdjustMarksProc: OSLAdjustMarksUPP; myGetErrDescProcPtr: OSLGetErrDescUPP): OSErr; external name '_AESetObjectCallbacks';
+{
+ * AEResolve()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEResolve(const (*var*) objectSpecifier: AEDesc; callbackFlags: SInt16; var theToken: AEDesc): OSErr; external name '_AEResolve';
+{
+ * AEInstallObjectAccessor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEInstallObjectAccessor(desiredClass: DescType; containerType: DescType; theAccessor: OSLAccessorUPP; accessorRefcon: SInt32; isSysHandler: boolean): OSErr; external name '_AEInstallObjectAccessor';
+{
+ * AERemoveObjectAccessor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AERemoveObjectAccessor(desiredClass: DescType; containerType: DescType; theAccessor: OSLAccessorUPP; isSysHandler: boolean): OSErr; external name '_AERemoveObjectAccessor';
+{
+ * AEGetObjectAccessor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEGetObjectAccessor(desiredClass: DescType; containerType: DescType; var accessor: OSLAccessorUPP; var accessorRefcon: SInt32; isSysHandler: boolean): OSErr; external name '_AEGetObjectAccessor';
+{
+ * AEDisposeToken()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AEDisposeToken(var theToken: AEDesc): OSErr; external name '_AEDisposeToken';
+{
+ * AECallObjectAccessor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function AECallObjectAccessor(desiredClass: DescType; const (*var*) containerToken: AEDesc; containerClass: DescType; keyForm: DescType; const (*var*) keyData: AEDesc; var token: AEDesc): OSErr; external name '_AECallObjectAccessor';
+{$ALIGN MAC68K}
+
+
+{unit AEPackObject}
+{
+ File: AEPackObject.p
+
+ Contains: AppleEvents object packing Interfaces.
+
+ Version: Technology: System 7.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1991-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ These are the object packing routines. }
+{
+ * CreateOffsetDescriptor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CreateOffsetDescriptor(theOffset: SInt32; var theDescriptor: AEDesc): OSErr; external name '_CreateOffsetDescriptor';
+
+{
+ * CreateCompDescriptor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CreateCompDescriptor(comparisonOperator: DescType; var operand1: AEDesc; var operand2: AEDesc; disposeInputs: boolean; var theDescriptor: AEDesc): OSErr; external name '_CreateCompDescriptor';
+
+{
+ * CreateLogicalDescriptor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CreateLogicalDescriptor(var theLogicalTerms: AEDescList; theLogicOperator: DescType; disposeInputs: boolean; var theDescriptor: AEDesc): OSErr; external name '_CreateLogicalDescriptor';
+
+
+{
+ * CreateObjSpecifier()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CreateObjSpecifier(desiredClass: DescType; var theContainer: AEDesc; keyForm: DescType; var keyData: AEDesc; disposeInputs: boolean; var objSpecifier: AEDesc): OSErr; external name '_CreateObjSpecifier';
+
+{
+ * CreateRangeDescriptor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ObjectSupportLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CreateRangeDescriptor(var rangeStart: AEDesc; var rangeStop: AEDesc; disposeInputs: boolean; var theDescriptor: AEDesc): OSErr; external name '_CreateRangeDescriptor';
+
+{$ALIGN MAC68K}
+
+
+{unit AERegistry}
+{
+ File: AERegistry.p
+
+ Contains: AppleEvents Registry Interface.
+
+ Version: Technology: Mac OS 8.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1993-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ cAEList = $6C697374 (* 'list' *); { 0x6c697374 }
+ cApplication = $63617070 (* 'capp' *); { 0x63617070 }
+ cArc = $63617263 (* 'carc' *); { 0x63617263 }
+ cBoolean = $626F6F6C (* 'bool' *); { 0x626f6f6c }
+ cCell = $6363656C (* 'ccel' *); { 0x6363656c }
+ cChar = $63686120 (* 'cha ' *); { 0x63686120 }
+ cColorTable = $636C7274 (* 'clrt' *); { 0x636c7274 }
+ cColumn = $63636F6C (* 'ccol' *); { 0x63636f6c }
+ cDocument = $646F6375 (* 'docu' *); { 0x646f6375 }
+ cDrawingArea = $63647277 (* 'cdrw' *); { 0x63647277 }
+ cEnumeration = $656E756D (* 'enum' *); { 0x656e756d }
+ cFile = $66696C65 (* 'file' *); { 0x66696c65 }
+ cFixed = $66697864 (* 'fixd' *); { 0x66697864 }
+ cFixedPoint = $66706E74 (* 'fpnt' *); { 0x66706e74 }
+ cFixedRectangle = $66726374 (* 'frct' *); { 0x66726374 }
+ cGraphicLine = $676C696E (* 'glin' *); { 0x676c696e }
+ cGraphicObject = $63676F62 (* 'cgob' *); { 0x63676f62 }
+ cGraphicShape = $63677368 (* 'cgsh' *); { 0x63677368 }
+ cGraphicText = $63677478 (* 'cgtx' *); { 0x63677478 }
+ cGroupedGraphic = $63706963 (* 'cpic' *); { 0x63706963 }
+
+ cInsertionLoc = $696E736C (* 'insl' *); { 0x696e736c }
+ cInsertionPoint = $63696E73 (* 'cins' *); { 0x63696e73 }
+ cIntlText = $69747874 (* 'itxt' *); { 0x69747874 }
+ cIntlWritingCode = $696E746C (* 'intl' *); { 0x696e746c }
+ cItem = $6369746D (* 'citm' *); { 0x6369746d }
+ cLine = $636C696E (* 'clin' *); { 0x636c696e }
+ cLongDateTime = $6C647420 (* 'ldt ' *); { 0x6c647420 }
+ cLongFixed = $6C667864 (* 'lfxd' *); { 0x6c667864 }
+ cLongFixedPoint = $6C667074 (* 'lfpt' *); { 0x6c667074 }
+ cLongFixedRectangle = $6C667263 (* 'lfrc' *); { 0x6c667263 }
+ cLongInteger = $6C6F6E67 (* 'long' *); { 0x6c6f6e67 }
+ cLongPoint = $6C706E74 (* 'lpnt' *); { 0x6c706e74 }
+ cLongRectangle = $6C726374 (* 'lrct' *); { 0x6c726374 }
+ cMachineLoc = $6D4C6F63 (* 'mLoc' *); { 0x6d4c6f63 }
+ cMenu = $636D6E75 (* 'cmnu' *); { 0x636d6e75 }
+ cMenuItem = $636D656E (* 'cmen' *); { 0x636d656e }
+ cObject = $636F626A (* 'cobj' *); { 0x636f626a }
+ cObjectSpecifier = $6F626A20 (* 'obj ' *); { 0x6f626a20 }
+ cOpenableObject = $636F6F62 (* 'coob' *); { 0x636f6f62 }
+ cOval = $636F766C (* 'covl' *); { 0x636f766c }
+
+ cParagraph = $63706172 (* 'cpar' *); { 0x63706172 }
+ cPICT = $50494354 (* 'PICT' *); { 0x50494354 }
+ cPixel = $6370786C (* 'cpxl' *); { 0x6370786c }
+ cPixelMap = $63706978 (* 'cpix' *); { 0x63706978 }
+ cPolygon = $6370676E (* 'cpgn' *); { 0x6370676e }
+ cProperty = $70726F70 (* 'prop' *); { 0x70726f70 }
+ cQDPoint = $51447074 (* 'QDpt' *); { 0x51447074 }
+ cQDRectangle = $71647274 (* 'qdrt' *); { 0x71647274 }
+ cRectangle = $63726563 (* 'crec' *); { 0x63726563 }
+ cRGBColor = $63524742 (* 'cRGB' *); { 0x63524742 }
+ cRotation = $74726F74 (* 'trot' *); { 0x74726f74 }
+ cRoundedRectangle = $63727263 (* 'crrc' *); { 0x63727263 }
+ cRow = $63726F77 (* 'crow' *); { 0x63726f77 }
+ cSelection = $6373656C (* 'csel' *); { 0x6373656c }
+ cShortInteger = $73686F72 (* 'shor' *); { 0x73686f72 }
+ cTable = $6374626C (* 'ctbl' *); { 0x6374626c }
+ cText = $63747874 (* 'ctxt' *); { 0x63747874 }
+ cTextFlow = $63666C6F (* 'cflo' *); { 0x63666c6f }
+ cTextStyles = $74737479 (* 'tsty' *); { 0x74737479 }
+ cType = $74797065 (* 'type' *); { 0x74797065 }
+
+ cVersion = $76657273 (* 'vers' *); { 0x76657273 }
+ cWindow = $6377696E (* 'cwin' *); { 0x6377696e }
+ cWord = $63776F72 (* 'cwor' *); { 0x63776f72 }
+ enumArrows = $6172726F (* 'arro' *); { 0x6172726f }
+ enumJustification = $6A757374 (* 'just' *); { 0x6a757374 }
+ enumKeyForm = $6B66726D (* 'kfrm' *); { 0x6b66726d }
+ enumPosition = $706F7369 (* 'posi' *); { 0x706f7369 }
+ enumProtection = $7072746E (* 'prtn' *); { 0x7072746e }
+ enumQuality = $7175616C (* 'qual' *); { 0x7175616c }
+ enumSaveOptions = $7361766F (* 'savo' *); { 0x7361766f }
+ enumStyle = $7374796C (* 'styl' *); { 0x7374796c }
+ enumTransferMode = $7472616E (* 'tran' *); { 0x7472616e }
+ formUniqueID = $49442020 (* 'ID ' *); { 0x49442020 }
+ kAEAbout = $61626F75 (* 'abou' *); { 0x61626f75 }
+ kAEAfter = $61667465 (* 'afte' *); { 0x61667465 }
+ kAEAliasSelection = $73616C69 (* 'sali' *); { 0x73616c69 }
+ kAEAllCaps = $616C6370 (* 'alcp' *); { 0x616c6370 }
+ kAEArrowAtEnd = $6172656E (* 'aren' *); { 0x6172656e }
+ kAEArrowAtStart = $61727374 (* 'arst' *); { 0x61727374 }
+ kAEArrowBothEnds = $6172626F (* 'arbo' *); { 0x6172626f }
+
+ kAEAsk = $61736B20 (* 'ask ' *); { 0x61736b20 }
+ kAEBefore = $6265666F (* 'befo' *); { 0x6265666f }
+ kAEBeginning = $62676E67 (* 'bgng' *); { 0x62676e67 }
+ kAEBeginsWith = $62677774 (* 'bgwt' *); { 0x62677774 }
+ kAEBeginTransaction = $62656769 (* 'begi' *); { 0x62656769 }
+ kAEBold = $626F6C64 (* 'bold' *); { 0x626f6c64 }
+ kAECaseSensEquals = $63736571 (* 'cseq' *); { 0x63736571 }
+ kAECentered = $63656E74 (* 'cent' *); { 0x63656e74 }
+ kAEChangeView = $76696577 (* 'view' *); { 0x76696577 }
+ kAEClone = $636C6F6E (* 'clon' *); { 0x636c6f6e }
+ kAEClose = $636C6F73 (* 'clos' *); { 0x636c6f73 }
+ kAECondensed = $636F6E64 (* 'cond' *); { 0x636f6e64 }
+ kAEContains = $636F6E74 (* 'cont' *); { 0x636f6e74 }
+ kAECopy = $636F7079 (* 'copy' *); { 0x636f7079 }
+ kAECoreSuite = $636F7265 (* 'core' *); { 0x636f7265 }
+ kAECountElements = $636E7465 (* 'cnte' *); { 0x636e7465 }
+ kAECreateElement = $6372656C (* 'crel' *); { 0x6372656c }
+ kAECreatePublisher = $63707562 (* 'cpub' *); { 0x63707562 }
+ kAECut = $63757420 (* 'cut ' *); { 0x63757420 }
+ kAEDelete = $64656C6F (* 'delo' *); { 0x64656c6f }
+
+ kAEDoObjectsExist = $646F6578 (* 'doex' *); { 0x646f6578 }
+ kAEDoScript = $646F7363 (* 'dosc' *); { 0x646f7363 }
+ kAEDrag = $64726167 (* 'drag' *); { 0x64726167 }
+ kAEDuplicateSelection = $73647570 (* 'sdup' *); { 0x73647570 }
+ kAEEditGraphic = $65646974 (* 'edit' *); { 0x65646974 }
+ kAEEmptyTrash = $656D7074 (* 'empt' *); { 0x656d7074 }
+ kAEEnd = $656E6420 (* 'end ' *); { 0x656e6420 }
+ kAEEndsWith = $656E6473 (* 'ends' *); { 0x656e6473 }
+ kAEEndTransaction = $656E6474 (* 'endt' *); { 0x656e6474 }
+ kAEEquals = $3D202020 (* '= ' *); { 0x3d202020 }
+ kAEExpanded = $70657870 (* 'pexp' *); { 0x70657870 }
+ kAEFast = $66617374 (* 'fast' *); { 0x66617374 }
+ kAEFinderEvents = $464E4452 (* 'FNDR' *); { 0x464e4452 }
+ kAEFormulaProtect = $6670726F (* 'fpro' *); { 0x6670726f }
+ kAEFullyJustified = $66756C6C (* 'full' *); { 0x66756c6c }
+ kAEGetClassInfo = $716F626A (* 'qobj' *); { 0x716f626a }
+ kAEGetData = $67657464 (* 'getd' *); { 0x67657464 }
+ kAEGetDataSize = $6473697A (* 'dsiz' *); { 0x6473697a }
+ kAEGetEventInfo = $67746569 (* 'gtei' *); { 0x67746569 }
+ kAEGetInfoSelection = $73696E66 (* 'sinf' *); { 0x73696e66 }
+
+ kAEGetPrivilegeSelection = $73707276 (* 'sprv' *); { 0x73707276 }
+ kAEGetSuiteInfo = $67747369 (* 'gtsi' *); { 0x67747369 }
+ kAEGreaterThan = $3E202020 (* '> ' *); { 0x3e202020 }
+ kAEGreaterThanEquals = $3E3D2020 (* '>= ' *); { 0x3e3d2020 }
+ kAEGrow = $67726F77 (* 'grow' *); { 0x67726f77 }
+ kAEHidden = $6869646E (* 'hidn' *); { 0x6869646e }
+ kAEHiQuality = $68697175 (* 'hiqu' *); { 0x68697175 }
+ kAEImageGraphic = $696D6772 (* 'imgr' *); { 0x696d6772 }
+ kAEIsUniform = $6973756E (* 'isun' *); { 0x6973756e }
+ kAEItalic = $6974616C (* 'ital' *); { 0x6974616c }
+ kAELeftJustified = $6C656674 (* 'left' *); { 0x6c656674 }
+ kAELessThan = $3C202020 (* '< ' *); { 0x3c202020 }
+ kAELessThanEquals = $3C3D2020 (* '<= ' *); { 0x3c3d2020 }
+ kAELowercase = $6C6F7763 (* 'lowc' *); { 0x6c6f7763 }
+ kAEMakeObjectsVisible = $6D766973 (* 'mvis' *); { 0x6d766973 }
+ kAEMiscStandards = $6D697363 (* 'misc' *); { 0x6d697363 }
+ kAEModifiable = $6D6F6466 (* 'modf' *); { 0x6d6f6466 }
+ kAEMove = $6D6F7665 (* 'move' *); { 0x6d6f7665 }
+ kAENo = $6E6F2020 (* 'no ' *); { 0x6e6f2020 }
+ kAENoArrow = $61726E6F (* 'arno' *); { 0x61726e6f }
+
+ kAENonmodifiable = $6E6D6F64 (* 'nmod' *); { 0x6e6d6f64 }
+ kAEOpen = $6F646F63 (* 'odoc' *); { 0x6f646f63 }
+ kAEOpenSelection = $736F7065 (* 'sope' *); { 0x736f7065 }
+ kAEOutline = $6F75746C (* 'outl' *); { 0x6f75746c }
+ kAEPageSetup = $70677375 (* 'pgsu' *); { 0x70677375 }
+ kAEPaste = $70617374 (* 'past' *); { 0x70617374 }
+ kAEPlain = $706C616E (* 'plan' *); { 0x706c616e }
+ kAEPrint = $70646F63 (* 'pdoc' *); { 0x70646f63 }
+ kAEPrintSelection = $73707269 (* 'spri' *); { 0x73707269 }
+ kAEPrintWindow = $7077696E (* 'pwin' *); { 0x7077696e }
+ kAEPutAwaySelection = $73707574 (* 'sput' *); { 0x73707574 }
+ kAEQDAddOver = $6164646F (* 'addo' *); { 0x6164646f }
+ kAEQDAddPin = $61646470 (* 'addp' *); { 0x61646470 }
+ kAEQDAdMax = $61646D78 (* 'admx' *); { 0x61646d78 }
+ kAEQDAdMin = $61646D6E (* 'admn' *); { 0x61646d6e }
+ kAEQDBic = $62696320 (* 'bic ' *); { 0x62696320 }
+ kAEQDBlend = $626C6E64 (* 'blnd' *); { 0x626c6e64 }
+ kAEQDCopy = $63707920 (* 'cpy ' *); { 0x63707920 }
+ kAEQDNotBic = $6E626963 (* 'nbic' *); { 0x6e626963 }
+ kAEQDNotCopy = $6E637079 (* 'ncpy' *); { 0x6e637079 }
+
+ kAEQDNotOr = $6E746F72 (* 'ntor' *); { 0x6e746f72 }
+ kAEQDNotXor = $6E786F72 (* 'nxor' *); { 0x6e786f72 }
+ kAEQDOr = $6F722020 (* 'or ' *); { 0x6f722020 }
+ kAEQDSubOver = $7375626F (* 'subo' *); { 0x7375626f }
+ kAEQDSubPin = $73756270 (* 'subp' *); { 0x73756270 }
+ kAEQDSupplementalSuite = $71647370 (* 'qdsp' *); { 0x71647370 }
+ kAEQDXor = $786F7220 (* 'xor ' *); { 0x786f7220 }
+ kAEQuickdrawSuite = $71647277 (* 'qdrw' *); { 0x71647277 }
+ kAEQuitAll = $71756961 (* 'quia' *); { 0x71756961 }
+ kAERedo = $7265646F (* 'redo' *); { 0x7265646f }
+ kAERegular = $7265676C (* 'regl' *); { 0x7265676c }
+ kAEReopenApplication = $72617070 (* 'rapp' *); { 0x72617070 }
+ kAEReplace = $72706C63 (* 'rplc' *); { 0x72706c63 }
+ kAERequiredSuite = $72657164 (* 'reqd' *); { 0x72657164 }
+ kAERestart = $72657374 (* 'rest' *); { 0x72657374 }
+ kAERevealSelection = $73726576 (* 'srev' *); { 0x73726576 }
+ kAERevert = $72767274 (* 'rvrt' *); { 0x72767274 }
+ kAERightJustified = $72676874 (* 'rght' *); { 0x72676874 }
+ kAESave = $73617665 (* 'save' *); { 0x73617665 }
+ kAESelect = $736C6374 (* 'slct' *); { 0x736c6374 }
+ kAESetData = $73657464 (* 'setd' *); { 0x73657464 }
+
+ kAESetPosition = $706F736E (* 'posn' *); { 0x706f736e }
+ kAEShadow = $73686164 (* 'shad' *); { 0x73686164 }
+ kAEShowClipboard = $7368636C (* 'shcl' *); { 0x7368636c }
+ kAEShutDown = $73687574 (* 'shut' *); { 0x73687574 }
+ kAESleep = $736C6570 (* 'slep' *); { 0x736c6570 }
+ kAESmallCaps = $736D6370 (* 'smcp' *); { 0x736d6370 }
+ kAESpecialClassProperties = $63402321 (* 'c@#!' *); { 0x63402321 }
+ kAEStrikethrough = $7374726B (* 'strk' *); { 0x7374726b }
+ kAESubscript = $73627363 (* 'sbsc' *); { 0x73627363 }
+ kAESuperscript = $73707363 (* 'spsc' *); { 0x73707363 }
+ kAETableSuite = $74626C73 (* 'tbls' *); { 0x74626c73 }
+ kAETextSuite = $54455854 (* 'TEXT' *); { 0x54455854 }
+ kAETransactionTerminated = $7474726D (* 'ttrm' *); { 0x7474726d }
+ kAEUnderline = $756E646C (* 'undl' *); { 0x756e646c }
+ kAEUndo = $756E646F (* 'undo' *); { 0x756e646f }
+ kAEWholeWordEquals = $77776571 (* 'wweq' *); { 0x77776571 }
+ kAEYes = $79657320 (* 'yes ' *); { 0x79657320 }
+ kAEZoom = $7A6F6F6D (* 'zoom' *); { 0x7a6f6f6d }
+
+ { events that can be sent to the "system" process (eg, loginwindow) on OS X 10.2 or later }
+ kAELogOut = $6C6F676F (* 'logo' *);
+ kAEReallyLogOut = $726C676F (* 'rlgo' *);
+ kAEShowRestartDialog = $72727374 (* 'rrst' *);
+ kAEShowShutdownDialog = $7273646E (* 'rsdn' *);
+
+ { EventRecord Classes and EventIDs }
+ kAEMouseClass = $6D6F7573 (* 'mous' *);
+ kAEDown = $646F776E (* 'down' *);
+ kAEUp = $75702020 (* 'up ' *);
+ kAEMoved = $6D6F7665 (* 'move' *);
+ kAEStoppedMoving = $73746F70 (* 'stop' *);
+ kAEWindowClass = $77696E64 (* 'wind' *);
+ kAEUpdate = $75706474 (* 'updt' *);
+ kAEActivate = $61637476 (* 'actv' *);
+ kAEDeactivate = $64616374 (* 'dact' *);
+ kAECommandClass = $636D6E64 (* 'cmnd' *); { Modern Command Event Class }
+ kAEKeyClass = $6B657963 (* 'keyc' *);
+ kAERawKey = $726B6579 (* 'rkey' *); { Modern Raw Key Event }
+ kAEVirtualKey = $6B657963 (* 'keyc' *); { Modern Virtual Key Event }
+ kAENavigationKey = $6E617665 (* 'nave' *); { Modern Navigation Key Event }
+ kAEAutoDown = $6175746F (* 'auto' *);
+ kAEApplicationClass = $6170706C (* 'appl' *);
+ kAESuspend = $73757370 (* 'susp' *);
+ kAEResume = $72736D65 (* 'rsme' *);
+ kAEDiskEvent = $6469736B (* 'disk' *);
+ kAENullEvent = $6E756C6C (* 'null' *);
+ kAEWakeUpEvent = $77616B65 (* 'wake' *);
+ kAEScrapEvent = $73637270 (* 'scrp' *);
+ kAEHighLevel = $68696768 (* 'high' *);
+
+ keyAEAngle = $6B616E67 (* 'kang' *); { 0x6b616e67 }
+ keyAEArcAngle = $70617263 (* 'parc' *); { 0x70617263 }
+
+ keyAEBaseAddr = $62616464 (* 'badd' *); { 0x62616464 }
+ keyAEBestType = $70627374 (* 'pbst' *); { 0x70627374 }
+ keyAEBgndColor = $6B62636C (* 'kbcl' *); { 0x6b62636c }
+ keyAEBgndPattern = $6B627074 (* 'kbpt' *); { 0x6b627074 }
+ keyAEBounds = $70626E64 (* 'pbnd' *); { 0x70626e64 }
+ keyAECellList = $6B636C74 (* 'kclt' *); { 0x6b636c74 }
+ keyAEClassID = $636C4944 (* 'clID' *); { 0x636c4944 }
+ keyAEColor = $636F6C72 (* 'colr' *); { 0x636f6c72 }
+ keyAEColorTable = $636C7462 (* 'cltb' *); { 0x636c7462 }
+ keyAECurveHeight = $6B636864 (* 'kchd' *); { 0x6b636864 }
+ keyAECurveWidth = $6B637764 (* 'kcwd' *); { 0x6b637764 }
+ keyAEDashStyle = $70647374 (* 'pdst' *); { 0x70647374 }
+ keyAEData = $64617461 (* 'data' *); { 0x64617461 }
+ keyAEDefaultType = $64656674 (* 'deft' *); { 0x64656674 }
+ keyAEDefinitionRect = $70647274 (* 'pdrt' *); { 0x70647274 }
+ keyAEDescType = $64737470 (* 'dstp' *); { 0x64737470 }
+ keyAEDestination = $64657374 (* 'dest' *); { 0x64657374 }
+ keyAEDoAntiAlias = $616E7461 (* 'anta' *); { 0x616e7461 }
+ keyAEDoDithered = $67646974 (* 'gdit' *); { 0x67646974 }
+ keyAEDoRotate = $6B647274 (* 'kdrt' *); { 0x6b647274 }
+
+ keyAEDoScale = $6B736361 (* 'ksca' *); { 0x6b736361 }
+ keyAEDoTranslate = $6B747261 (* 'ktra' *); { 0x6b747261 }
+ keyAEEditionFileLoc = $656C6F63 (* 'eloc' *); { 0x656c6f63 }
+ keyAEElements = $656C6D73 (* 'elms' *); { 0x656c6d73 }
+ keyAEEndPoint = $70656E64 (* 'pend' *); { 0x70656e64 }
+ keyAEEventClass = $6576636C (* 'evcl' *); { 0x6576636c }
+ keyAEEventID = $65767469 (* 'evti' *); { 0x65767469 }
+ keyAEFile = $6B66696C (* 'kfil' *); { 0x6b66696c }
+ keyAEFileType = $666C7470 (* 'fltp' *); { 0x666c7470 }
+ keyAEFillColor = $666C636C (* 'flcl' *); { 0x666c636c }
+ keyAEFillPattern = $666C7074 (* 'flpt' *); { 0x666c7074 }
+ keyAEFlipHorizontal = $6B66686F (* 'kfho' *); { 0x6b66686f }
+ keyAEFlipVertical = $6B667674 (* 'kfvt' *); { 0x6b667674 }
+ keyAEFont = $666F6E74 (* 'font' *); { 0x666f6e74 }
+ keyAEFormula = $70666F72 (* 'pfor' *); { 0x70666f72 }
+ keyAEGraphicObjects = $676F6273 (* 'gobs' *); { 0x676f6273 }
+ keyAEID = $49442020 (* 'ID ' *); { 0x49442020 }
+ keyAEImageQuality = $67717561 (* 'gqua' *); { 0x67717561 }
+ keyAEInsertHere = $696E7368 (* 'insh' *); { 0x696e7368 }
+ keyAEKeyForms = $6B657966 (* 'keyf' *); { 0x6b657966 }
+
+ keyAEKeyword = $6B797764 (* 'kywd' *); { 0x6b797764 }
+ keyAELevel = $6C65766C (* 'levl' *); { 0x6c65766c }
+ keyAELineArrow = $6172726F (* 'arro' *); { 0x6172726f }
+ keyAEName = $706E616D (* 'pnam' *); { 0x706e616d }
+ keyAENewElementLoc = $706E656C (* 'pnel' *); { 0x706e656c }
+ keyAEObject = $6B6F626A (* 'kobj' *); { 0x6b6f626a }
+ keyAEObjectClass = $6B6F636C (* 'kocl' *); { 0x6b6f636c }
+ keyAEOffStyles = $6F667374 (* 'ofst' *); { 0x6f667374 }
+ keyAEOnStyles = $6F6E7374 (* 'onst' *); { 0x6f6e7374 }
+ keyAEParameters = $70726D73 (* 'prms' *); { 0x70726d73 }
+ keyAEParamFlags = $706D6667 (* 'pmfg' *); { 0x706d6667 }
+ keyAEPenColor = $7070636C (* 'ppcl' *); { 0x7070636c }
+ keyAEPenPattern = $70707061 (* 'pppa' *); { 0x70707061 }
+ keyAEPenWidth = $70707764 (* 'ppwd' *); { 0x70707764 }
+ keyAEPixelDepth = $70647074 (* 'pdpt' *); { 0x70647074 }
+ keyAEPixMapMinus = $6B706D6D (* 'kpmm' *); { 0x6b706d6d }
+ keyAEPMTable = $6B706D74 (* 'kpmt' *); { 0x6b706d74 }
+ keyAEPointList = $70746C74 (* 'ptlt' *); { 0x70746c74 }
+ keyAEPointSize = $7074737A (* 'ptsz' *); { 0x7074737a }
+ keyAEPosition = $6B706F73 (* 'kpos' *); { 0x6b706f73 }
+
+ keyAEPropData = $70726474 (* 'prdt' *); { 0x70726474 }
+ keyAEProperties = $7170726F (* 'qpro' *); { 0x7170726f }
+ keyAEProperty = $6B707270 (* 'kprp' *); { 0x6b707270 }
+ keyAEPropFlags = $70726667 (* 'prfg' *); { 0x70726667 }
+ keyAEPropID = $70726F70 (* 'prop' *); { 0x70726f70 }
+ keyAEProtection = $7070726F (* 'ppro' *); { 0x7070726f }
+ keyAERenderAs = $6B72656E (* 'kren' *); { 0x6b72656e }
+ keyAERequestedType = $72747970 (* 'rtyp' *); { 0x72747970 }
+ keyAEResult = $2D2D2D2D (* '----' *); { 0x2d2d2d2d }
+ keyAEResultInfo = $7273696E (* 'rsin' *); { 0x7273696e }
+ keyAERotation = $70726F74 (* 'prot' *); { 0x70726f74 }
+ keyAERotPoint = $6B727470 (* 'krtp' *); { 0x6b727470 }
+ keyAERowList = $6B726C73 (* 'krls' *); { 0x6b726c73 }
+ keyAESaveOptions = $7361766F (* 'savo' *); { 0x7361766f }
+ keyAEScale = $7073636C (* 'pscl' *); { 0x7073636c }
+ keyAEScriptTag = $70736374 (* 'psct' *); { 0x70736374 }
+ keyAEShowWhere = $73686F77 (* 'show' *); { 0x73686f77 }
+ keyAEStartAngle = $70616E67 (* 'pang' *); { 0x70616e67 }
+ keyAEStartPoint = $70737470 (* 'pstp' *); { 0x70737470 }
+ keyAEStyles = $6B737479 (* 'ksty' *); { 0x6b737479 }
+
+ keyAESuiteID = $73756974 (* 'suit' *); { 0x73756974 }
+ keyAEText = $6B747874 (* 'ktxt' *); { 0x6b747874 }
+ keyAETextColor = $70747863 (* 'ptxc' *); { 0x70747863 }
+ keyAETextFont = $70747866 (* 'ptxf' *); { 0x70747866 }
+ keyAETextPointSize = $70747073 (* 'ptps' *); { 0x70747073 }
+ keyAETextStyles = $74787374 (* 'txst' *); { 0x74787374 }
+ keyAETextLineHeight = $6B746C68 (* 'ktlh' *); { type ShortInteger }
+ keyAETextLineAscent = $6B746173 (* 'ktas' *); { type ShortInteger }
+ keyAETheText = $74687478 (* 'thtx' *); { 0x74687478 }
+ keyAETransferMode = $7070746D (* 'pptm' *); { 0x7070746d }
+ keyAETranslation = $70747273 (* 'ptrs' *); { 0x70747273 }
+ keyAETryAsStructGraf = $746F6F67 (* 'toog' *); { 0x746f6f67 }
+ keyAEUniformStyles = $7573746C (* 'ustl' *); { 0x7573746c }
+ keyAEUpdateOn = $70757064 (* 'pupd' *); { 0x70757064 }
+ keyAEUserTerm = $7574726D (* 'utrm' *); { 0x7574726d }
+ keyAEWindow = $776E6477 (* 'wndw' *); { 0x776e6477 }
+ keyAEWritingCode = $77726364 (* 'wrcd' *); { 0x77726364 }
+
+ keyMiscellaneous = $666D7363 (* 'fmsc' *); { 0x666d7363 }
+ keySelection = $6673656C (* 'fsel' *); { 0x6673656c }
+ keyWindow = $6B776E64 (* 'kwnd' *); { 0x6b776e64 }
+ { EventRecord keys }
+ keyWhen = $7768656E (* 'when' *);
+ keyWhere = $77686572 (* 'wher' *);
+ keyModifiers = $6D6F6473 (* 'mods' *);
+ keyKey = $6B657920 (* 'key ' *);
+ keyKeyCode = $636F6465 (* 'code' *);
+ keyKeyboard = $6B657962 (* 'keyb' *);
+ keyDriveNumber = $64727623 (* 'drv#' *);
+ keyErrorCode = $65727223 (* 'err#' *);
+ keyHighLevelClass = $68636C73 (* 'hcls' *);
+ keyHighLevelID = $68696420 (* 'hid ' *);
+
+ pArcAngle = $70617263 (* 'parc' *); { 0x70617263 }
+ pBackgroundColor = $7062636C (* 'pbcl' *); { 0x7062636c }
+ pBackgroundPattern = $70627074 (* 'pbpt' *); { 0x70627074 }
+ pBestType = $70627374 (* 'pbst' *); { 0x70627374 }
+ pBounds = $70626E64 (* 'pbnd' *); { 0x70626e64 }
+ pClass = $70636C73 (* 'pcls' *); { 0x70636c73 }
+ pClipboard = $70636C69 (* 'pcli' *); { 0x70636c69 }
+ pColor = $636F6C72 (* 'colr' *); { 0x636f6c72 }
+ pColorTable = $636C7462 (* 'cltb' *); { 0x636c7462 }
+ pContents = $70636E74 (* 'pcnt' *); { 0x70636e74 }
+ pCornerCurveHeight = $70636864 (* 'pchd' *); { 0x70636864 }
+ pCornerCurveWidth = $70637764 (* 'pcwd' *); { 0x70637764 }
+ pDashStyle = $70647374 (* 'pdst' *); { 0x70647374 }
+ pDefaultType = $64656674 (* 'deft' *); { 0x64656674 }
+ pDefinitionRect = $70647274 (* 'pdrt' *); { 0x70647274 }
+ pEnabled = $656E626C (* 'enbl' *); { 0x656e626c }
+ pEndPoint = $70656E64 (* 'pend' *); { 0x70656e64 }
+ pFillColor = $666C636C (* 'flcl' *); { 0x666c636c }
+ pFillPattern = $666C7074 (* 'flpt' *); { 0x666c7074 }
+ pFont = $666F6E74 (* 'font' *); { 0x666f6e74 }
+
+ pFormula = $70666F72 (* 'pfor' *); { 0x70666f72 }
+ pGraphicObjects = $676F6273 (* 'gobs' *); { 0x676f6273 }
+ pHasCloseBox = $68636C62 (* 'hclb' *); { 0x68636c62 }
+ pHasTitleBar = $70746974 (* 'ptit' *); { 0x70746974 }
+ pID = $49442020 (* 'ID ' *); { 0x49442020 }
+ pIndex = $70696478 (* 'pidx' *); { 0x70696478 }
+ pInsertionLoc = $70696E73 (* 'pins' *); { 0x70696e73 }
+ pIsFloating = $6973666C (* 'isfl' *); { 0x6973666c }
+ pIsFrontProcess = $70697366 (* 'pisf' *); { 0x70697366 }
+ pIsModal = $706D6F64 (* 'pmod' *); { 0x706d6f64 }
+ pIsModified = $696D6F64 (* 'imod' *); { 0x696d6f64 }
+ pIsResizable = $7072737A (* 'prsz' *); { 0x7072737a }
+ pIsStationeryPad = $70737064 (* 'pspd' *); { 0x70737064 }
+ pIsZoomable = $69737A6D (* 'iszm' *); { 0x69737a6d }
+ pIsZoomed = $707A756D (* 'pzum' *); { 0x707a756d }
+ pItemNumber = $69746D6E (* 'itmn' *); { 0x69746d6e }
+ pJustification = $706A7374 (* 'pjst' *); { 0x706a7374 }
+ pLineArrow = $6172726F (* 'arro' *); { 0x6172726f }
+ pMenuID = $6D6E6964 (* 'mnid' *); { 0x6d6e6964 }
+ pName = $706E616D (* 'pnam' *); { 0x706e616d }
+
+ pNewElementLoc = $706E656C (* 'pnel' *); { 0x706e656c }
+ pPenColor = $7070636C (* 'ppcl' *); { 0x7070636c }
+ pPenPattern = $70707061 (* 'pppa' *); { 0x70707061 }
+ pPenWidth = $70707764 (* 'ppwd' *); { 0x70707764 }
+ pPixelDepth = $70647074 (* 'pdpt' *); { 0x70647074 }
+ pPointList = $70746C74 (* 'ptlt' *); { 0x70746c74 }
+ pPointSize = $7074737A (* 'ptsz' *); { 0x7074737a }
+ pProtection = $7070726F (* 'ppro' *); { 0x7070726f }
+ pRotation = $70726F74 (* 'prot' *); { 0x70726f74 }
+ pScale = $7073636C (* 'pscl' *); { 0x7073636c }
+ pScript = $73637074 (* 'scpt' *); { 0x73637074 }
+ pScriptTag = $70736374 (* 'psct' *); { 0x70736374 }
+ pSelected = $73656C63 (* 'selc' *); { 0x73656c63 }
+ pSelection = $73656C65 (* 'sele' *); { 0x73656c65 }
+ pStartAngle = $70616E67 (* 'pang' *); { 0x70616e67 }
+ pStartPoint = $70737470 (* 'pstp' *); { 0x70737470 }
+ pTextColor = $70747863 (* 'ptxc' *); { 0x70747863 }
+ pTextFont = $70747866 (* 'ptxf' *); { 0x70747866 }
+ pTextItemDelimiters = $7478646C (* 'txdl' *); { 0x7478646c }
+ pTextPointSize = $70747073 (* 'ptps' *); { 0x70747073 }
+
+ pTextStyles = $74787374 (* 'txst' *); { 0x74787374 }
+ pTransferMode = $7070746D (* 'pptm' *); { 0x7070746d }
+ pTranslation = $70747273 (* 'ptrs' *); { 0x70747273 }
+ pUniformStyles = $7573746C (* 'ustl' *); { 0x7573746c }
+ pUpdateOn = $70757064 (* 'pupd' *); { 0x70757064 }
+ pUserSelection = $7075736C (* 'pusl' *); { 0x7075736c }
+ pVersion = $76657273 (* 'vers' *); { 0x76657273 }
+ pVisible = $70766973 (* 'pvis' *); { 0x70766973 }
+
+ typeAEText = $74545854 (* 'tTXT' *); { 0x74545854 }
+ typeArc = $63617263 (* 'carc' *); { 0x63617263 }
+ typeBest = $62657374 (* 'best' *); { 0x62657374 }
+ typeCell = $6363656C (* 'ccel' *); { 0x6363656c }
+ typeClassInfo = $67636C69 (* 'gcli' *); { 0x67636c69 }
+ typeColorTable = $636C7274 (* 'clrt' *); { 0x636c7274 }
+ typeColumn = $63636F6C (* 'ccol' *); { 0x63636f6c }
+ typeDashStyle = $74646173 (* 'tdas' *); { 0x74646173 }
+ typeData = $74647461 (* 'tdta' *); { 0x74647461 }
+ typeDrawingArea = $63647277 (* 'cdrw' *); { 0x63647277 }
+ typeElemInfo = $656C696E (* 'elin' *); { 0x656c696e }
+ typeEnumeration = $656E756D (* 'enum' *); { 0x656e756d }
+ typeEPS = $45505320 (* 'EPS ' *); { 0x45505320 }
+ typeEventInfo = $6576696E (* 'evin' *); { 0x6576696e }
+
+ typeFinderWindow = $6677696E (* 'fwin' *); { 0x6677696e }
+ typeFixedPoint = $66706E74 (* 'fpnt' *); { 0x66706e74 }
+ typeFixedRectangle = $66726374 (* 'frct' *); { 0x66726374 }
+ typeGraphicLine = $676C696E (* 'glin' *); { 0x676c696e }
+ typeGraphicText = $63677478 (* 'cgtx' *); { 0x63677478 }
+ typeGroupedGraphic = $63706963 (* 'cpic' *); { 0x63706963 }
+ typeInsertionLoc = $696E736C (* 'insl' *); { 0x696e736c }
+ typeIntlText = $69747874 (* 'itxt' *); { 0x69747874 }
+ typeIntlWritingCode = $696E746C (* 'intl' *); { 0x696e746c }
+ typeLongDateTime = $6C647420 (* 'ldt ' *); { 0x6c647420 }
+ typeISO8601DateTime = $69736F74 (* 'isot' *); { 0x69736f74 data is ascii text of an ISO8601 date }
+ typeLongFixed = $6C667864 (* 'lfxd' *); { 0x6c667864 }
+ typeLongFixedPoint = $6C667074 (* 'lfpt' *); { 0x6c667074 }
+ typeLongFixedRectangle = $6C667263 (* 'lfrc' *); { 0x6c667263 }
+ typeLongPoint = $6C706E74 (* 'lpnt' *); { 0x6c706e74 }
+ typeLongRectangle = $6C726374 (* 'lrct' *); { 0x6c726374 }
+ typeMachineLoc = $6D4C6F63 (* 'mLoc' *); { 0x6d4c6f63 }
+ typeOval = $636F766C (* 'covl' *); { 0x636f766c }
+ typeParamInfo = $706D696E (* 'pmin' *); { 0x706d696e }
+ typePict = $50494354 (* 'PICT' *); { 0x50494354 }
+
+ typePixelMap = $63706978 (* 'cpix' *); { 0x63706978 }
+ typePixMapMinus = $74706D6D (* 'tpmm' *); { 0x74706d6d }
+ typePolygon = $6370676E (* 'cpgn' *); { 0x6370676e }
+ typePropInfo = $70696E66 (* 'pinf' *); { 0x70696e66 }
+ typePtr = $70747220 (* 'ptr ' *); { 0x70747220 }
+ typeQDPoint = $51447074 (* 'QDpt' *); { 0x51447074 }
+ typeQDRegion = $5172676E (* 'Qrgn' *); { 0x51447074 (data is actual region data, including rectangle and size, _not_ region handle or ptr) }
+ typeRectangle = $63726563 (* 'crec' *); { 0x63726563 }
+ typeRGB16 = $74723136 (* 'tr16' *); { 0x74723136 }
+ typeRGB96 = $74723936 (* 'tr96' *); { 0x74723936 }
+ typeRGBColor = $63524742 (* 'cRGB' *); { 0x63524742 }
+ typeRotation = $74726F74 (* 'trot' *); { 0x74726f74 }
+ typeRoundedRectangle = $63727263 (* 'crrc' *); { 0x63727263 }
+ typeRow = $63726F77 (* 'crow' *); { 0x63726f77 }
+ typeScrapStyles = $7374796C (* 'styl' *); { 0x7374796c }
+ typeScript = $73637074 (* 'scpt' *); { 0x73637074 }
+ typeStyledText = $53545854 (* 'STXT' *); { 0x53545854 }
+ typeSuiteInfo = $7375696E (* 'suin' *); { 0x7375696e }
+ typeTable = $6374626C (* 'ctbl' *); { 0x6374626c }
+ typeTextStyles = $74737479 (* 'tsty' *); { 0x74737479 }
+
+ typeTIFF = $54494646 (* 'TIFF' *); { 0x54494646 }
+ typeJPEG = $4A504547 (* 'JPEG' *);
+ typeGIF = $47494666 (* 'GIFf' *);
+ typeVersion = $76657273 (* 'vers' *); { 0x76657273 }
+
+ kAEMenuClass = $6D656E75 (* 'menu' *);
+ kAEMenuSelect = $6D686974 (* 'mhit' *);
+ kAEMouseDown = $6D64776E (* 'mdwn' *);
+ kAEMouseDownInBack = $6D64626B (* 'mdbk' *);
+ kAEKeyDown = $6B64776E (* 'kdwn' *);
+ kAEResized = $7273697A (* 'rsiz' *);
+ kAEPromise = $70726F6D (* 'prom' *);
+
+ keyMenuID = $6D696420 (* 'mid ' *);
+ keyMenuItem = $6D69746D (* 'mitm' *);
+ keyCloseAllWindows = $63617720 (* 'caw ' *);
+ keyOriginalBounds = $6F626E64 (* 'obnd' *);
+ keyNewBounds = $6E626E64 (* 'nbnd' *);
+ keyLocalWhere = $6C776872 (* 'lwhr' *);
+
+ typeHIMenu = $6D6F626A (* 'mobj' *);
+ typeHIWindow = $776F626A (* 'wobj' *);
+
+ kBySmallIcon = 0;
+ kByIconView = 1;
+ kByNameView = 2;
+ kByDateView = 3;
+ kBySizeView = 4;
+ kByKindView = 5;
+ kByCommentView = 6;
+ kByLabelView = 7;
+ kByVersionView = 8;
+
+ kAEInfo = 11;
+ kAEMain = 0;
+ kAESharing = 13;
+
+ kAEZoomIn = 7;
+ kAEZoomOut = 8;
+
+ kTextServiceClass = $74737663 (* 'tsvc' *);
+ kUpdateActiveInputArea = $75706474 (* 'updt' *); { update the active input area }
+ kShowHideInputWindow = $73686977 (* 'shiw' *); { show or hide the input window }
+ kPos2Offset = $70327374 (* 'p2st' *); { converting global coordinates to char position }
+ kOffset2Pos = $73743270 (* 'st2p' *); { converting char position to global coordinates }
+ kUnicodeNotFromInputMethod = $756E696D (* 'unim' *); { Unicode text when event not handled by Input Method or no Input Method }
+ kGetSelectedText = $67747874 (* 'gtxt' *); { Get text for current selection }
+ keyAETSMDocumentRefcon = $72656663 (* 'refc' *); { TSM document refcon, typeLongInteger }
+ keyAEServerInstance = $73727669 (* 'srvi' *); { component instance }
+ keyAETheData = $6B646174 (* 'kdat' *); { typeText }
+ keyAEFixLength = $6669786C (* 'fixl' *); { fix len }
+ keyAEUpdateRange = $75646E67 (* 'udng' *); { typeTextRangeArray }
+ keyAECurrentPoint = $63706F73 (* 'cpos' *); { current point }
+ keyAEBufferSize = $62756666 (* 'buff' *); { buffer size to get the text }
+ keyAEMoveView = $6D767677 (* 'mvvw' *); { move view flag }
+ keyAENextBody = $6E786264 (* 'nxbd' *); { next or previous body }
+ keyAETSMScriptTag = $73636C67 (* 'sclg' *);
+ keyAETSMTextFont = $6B747866 (* 'ktxf' *); { FMFontFamily or FOND ID }
+ keyAETSMTextFMFont = $6B74786D (* 'ktxm' *); { FMFont }
+ keyAETSMTextPointSize = $6B747073 (* 'ktps' *);
+ keyAETSMEventRecord = $74657674 (* 'tevt' *); { Low level Event Record, typeLowLevelEventRecord }
+ keyAETSMEventRef = $74657672 (* 'tevr' *); { Carbon EventRef, typeEventRef }
+ keyAETextServiceEncoding = $7473656E (* 'tsen' *); { Text Service encoding, mac or Unicode in UpdateActiveInputArea or GetSelectedText events. }
+ keyAETextServiceMacEncoding = $746D656E (* 'tmen' *); { Target mac encoding for TSM conversion of text from Unicode text service. }
+ typeTextRange = $7478726E (* 'txrn' *); { TextRange }
+ typeComponentInstance = $636D7069 (* 'cmpi' *); { server instance }
+ typeOffsetArray = $6F666179 (* 'ofay' *); { offset array }
+ typeTextRangeArray = $74726179 (* 'tray' *);
+ typeLowLevelEventRecord = $65767472 (* 'evtr' *); { Low Level Event Record }
+ typeEventRef = $65767266 (* 'evrf' *); { Carbon EventRef }
+ typeText = $54455854 (* 'TEXT' *); { Plain text }
+
+
+ { Desc type constants }
+ kTSMOutsideOfBody = 1;
+ kTSMInsideOfBody = 2;
+ kTSMInsideOfActiveInputArea = 3;
+
+ kNextBody = 1;
+ kPreviousBody = 2;
+
+
+type
+ TextRangePtr = ^TextRange;
+ TextRange = record
+ fStart: SInt32;
+ fEnd: SInt32;
+ fHiliteStyle: SInt16;
+ end;
+
+ TextRangeHandle = ^TextRangePtr;
+ TextRangeArrayPtr = ^TextRangeArray;
+ TextRangeArray = record
+ fNumOfRanges: SInt16; { specify the size of the fRange array }
+ fRange: array [0..0] of TextRange; { when fNumOfRanges > 1, the size of this array has to be calculated }
+ end;
+
+ TextRangeArrayHandle = ^TextRangeArrayPtr;
+ OffsetArrayPtr = ^OffsetArray;
+ OffsetArray = record
+ fNumOfOffsets: SInt16; { specify the size of the fOffset array }
+ fOffset: array [0..0] of SInt32; { when fNumOfOffsets > 1, the size of this array has to be calculated }
+ end;
+
+ OffsetArrayHandle = ^OffsetArrayPtr;
+ WritingCodePtr = ^WritingCode;
+ WritingCode = record
+ theScriptCode: ScriptCode;
+ theLangCode: LangCode;
+ end;
+
+ IntlTextPtr = ^IntlText;
+ IntlText = record
+ theScriptCode: ScriptCode;
+ theLangCode: LangCode;
+ theText: SInt8; { variable length data }
+ end;
+
+
+ { Hilite styles }
+
+const
+ kTSMHiliteCaretPosition = 1; { specify caret position }
+ kTSMHiliteRawText = 2; { specify range of raw text }
+ kTSMHiliteSelectedRawText = 3; { specify range of selected raw text }
+ kTSMHiliteConvertedText = 4; { specify range of converted text }
+ kTSMHiliteSelectedConvertedText = 5; { specify range of selected converted text }
+ kTSMHiliteBlockFillText = 6; { Block Fill hilite style }
+ kTSMHiliteOutlineText = 7; { Outline hilite style }
+ kTSMHiliteSelectedText = 8; { Selected hilite style }
+ kTSMHiliteNoHilite = 9; { specify range of non-hilited text }
+
+{$ifc OLDROUTINENAMES}
+{ Hilite styles }
+const
+ kCaretPosition = kTSMHiliteCaretPosition;
+ kRawText = kTSMHiliteRawText;
+ kSelectedRawText = kTSMHiliteSelectedRawText;
+ kConvertedText = kTSMHiliteConvertedText;
+ kSelectedConvertedText = kTSMHiliteSelectedConvertedText;
+ kBlockFillText = kTSMHiliteBlockFillText;
+ kOutlineText = kTSMHiliteOutlineText;
+ kSelectedText = kTSMHiliteSelectedText;
+
+{$endc} {OLDROUTINENAMES}
+
+
+ keyAEHiliteRange = $68726E67 (* 'hrng' *); { typeTextRangeArray for System 7, typeHiliteRangeArray for System 8 }
+ keyAEPinRange = $706E7267 (* 'pnrg' *); { typeTextRange for System 7, typeTextRegionRange for System 8 }
+ keyAEClauseOffsets = $636C6175 (* 'clau' *); { typeOffsetArray for System 7, typeClauseOffsetArray for System 8 }
+ keyAEOffset = $6F667374 (* 'ofst' *); { typeLongInteger for System 7, typeByteOffset for System 8 }
+ keyAEPoint = $67706F73 (* 'gpos' *); { typePoint for System 7, typeQDPoint for System 8 }
+ keyAELeftSide = $6B6C6566 (* 'klef' *); { typeBoolean }
+ keyAERegionClass = $72676E63 (* 'rgnc' *); { typeShortInteger for System 7, typeRegionClass for System 8 }
+ keyAEDragging = $626F6F6C (* 'bool' *); { typeBoolean }
+
+
+{$ifc OLDROUTINENAMES}
+ keyAELeadingEdge = $6B6C6566 (* 'klef' *);
+
+{$endc} {OLDROUTINENAMES}
+
+ { AppleScript 1.3: New Text types }
+{
+ * The following descriptor types are deprecated due to their lack of
+ * explicit encoding or byte order definition. Please use
+ * typeUTF16ExternalRepresentation or typeUTF8Text instead. }
+
+ typeUnicodeText = $75747874 (* 'utxt' *); { native byte ordering, optional BOM
+ typeStyledUnicodeText = $73757478 (* 'sutx' *); { Not implemented }
+ typeEncodedString = $656E6373 (* 'encs' *); { Not implemented }
+ typeCString = $63737472 (* 'cstr' *); { MacRoman characters followed by a NULL byte }
+ typePString = $70737472 (* 'pstr' *); { Unsigned length byte followed by MacRoman characters }
+
+ { AppleScript 1.3: Unit types }
+ typeMeters = $6D657472 (* 'metr' *); { Base Unit }
+ typeInches = $696E6368 (* 'inch' *);
+ typeFeet = $66656574 (* 'feet' *);
+ typeYards = $79617264 (* 'yard' *);
+ typeMiles = $6D696C65 (* 'mile' *);
+ typeKilometers = $6B6D7472 (* 'kmtr' *);
+ typeCentimeters = $636D7472 (* 'cmtr' *);
+ typeSquareMeters = $7371726D (* 'sqrm' *); { Base Unit }
+ typeSquareFeet = $73716674 (* 'sqft' *);
+ typeSquareYards = $73717964 (* 'sqyd' *);
+ typeSquareMiles = $73716D69 (* 'sqmi' *);
+ typeSquareKilometers = $73716B6D (* 'sqkm' *);
+ typeLiters = $6C697472 (* 'litr' *); { Base Unit }
+ typeQuarts = $71727473 (* 'qrts' *);
+ typeGallons = $67616C6E (* 'galn' *);
+ typeCubicMeters = $636D6574 (* 'cmet' *); { Base Unit }
+ typeCubicFeet = $63666574 (* 'cfet' *);
+ typeCubicInches = $6375696E (* 'cuin' *);
+ typeCubicCentimeter = $63636D74 (* 'ccmt' *);
+ typeCubicYards = $63797264 (* 'cyrd' *);
+ typeKilograms = $6B67726D (* 'kgrm' *); { Base Unit }
+ typeGrams = $6772616D (* 'gram' *);
+ typeOunces = $6F7A7320 (* 'ozs ' *);
+ typePounds = $6C627320 (* 'lbs ' *);
+ typeDegreesC = $64656763 (* 'degc' *); { Base Unit }
+ typeDegreesF = $64656766 (* 'degf' *);
+ typeDegreesK = $6465676B (* 'degk' *);
+
+ { AppleScript 1.3: Folder Actions }
+ kFAServerApp = $73737276 (* 'ssrv' *); { Creator code for Folder Actions Server }
+ kDoFolderActionEvent = $666F6C61 (* 'fola' *); { Event the Finder sends to the Folder Actions FBA }
+ kFolderActionCode = $6163746E (* 'actn' *); { Parameter that contains the Folder Action }
+ kFolderOpenedEvent = $666F706E (* 'fopn' *); { Value of kFolderActionCode parameter; sent to script as event }
+ kFolderClosedEvent = $66636C6F (* 'fclo' *);
+ kFolderWindowMovedEvent = $6673697A (* 'fsiz' *);
+ kFolderItemsAddedEvent = $66676574 (* 'fget' *);
+ kFolderItemsRemovedEvent = $666C6F73 (* 'flos' *);
+ kItemList = $666C7374 (* 'flst' *); { List parameter for added and removed items }
+ kNewSizeParameter = $666E737A (* 'fnsz' *); { Parameter for moved window }
+ kFASuiteCode = $6661636F (* 'faco' *); { Suite code for the following events }
+ kFAAttachCommand = $61746661 (* 'atfa' *); { Attach event id }
+ kFARemoveCommand = $726D6661 (* 'rmfa' *); { Remove event id }
+ kFAEditCommand = $65646661 (* 'edfa' *); { Edit event id }
+ kFAFileParam = $6661616C (* 'faal' *); { Key for file parameter for Attach }
+ kFAIndexParam = $696E6478 (* 'indx' *); { Key for index (0-based) parameter for Remove and Edit }
+
+ { AppleScript 1.3 Internet Suite }
+ { Suite code }
+ kAEInternetSuite = $6775726C (* 'gurl' *);
+ kAEISWebStarSuite = $575757CE (* 'WWW½' *);
+
+ { Events }
+ kAEISGetURL = $6775726C (* 'gurl' *);
+ KAEISHandleCGI = $73646F63 (* 'sdoc' *);
+
+ { Classes }
+ cURL = $75726C20 (* 'url ' *);
+ cInternetAddress = $49504144 (* 'IPAD' *);
+ cHTML = $68746D6C (* 'html' *);
+ cFTPItem = $66747020 (* 'ftp ' *);
+
+ { Parameters }
+ kAEISHTTPSearchArgs = $6B666F72 (* 'kfor' *);
+ kAEISPostArgs = $706F7374 (* 'post' *);
+ kAEISMethod = $6D657468 (* 'meth' *);
+ kAEISClientAddress = $61646472 (* 'addr' *);
+ kAEISUserName = $75736572 (* 'user' *);
+ kAEISPassword = $70617373 (* 'pass' *);
+ kAEISFromUser = $66726D75 (* 'frmu' *);
+ kAEISServerName = $73766E6D (* 'svnm' *);
+ kAEISServerPort = $73767074 (* 'svpt' *);
+ kAEISScriptName = $73636E6D (* 'scnm' *);
+ kAEISContentType = $63747970 (* 'ctyp' *);
+ kAEISReferrer = $72656672 (* 'refr' *);
+ kAEISUserAgent = $41676E74 (* 'Agnt' *);
+ kAEISAction = $4B616374 (* 'Kact' *);
+ kAEISActionPath = $4B617074 (* 'Kapt' *);
+ kAEISClientIP = $4B636970 (* 'Kcip' *);
+ kAEISFullRequest = $4B667271 (* 'Kfrq' *);
+
+ { Properties }
+ pScheme = $70757363 (* 'pusc' *);
+ pHost = $484F5354 (* 'HOST' *);
+ pPath = $46545063 (* 'FTPc' *);
+ pUserName = $5241756E (* 'RAun' *);
+ pUserPassword = $52417077 (* 'RApw' *);
+ pDNSForm = $70444E53 (* 'pDNS' *);
+ pURL = $7055524C (* 'pURL' *);
+ pTextEncoding = $70747865 (* 'ptxe' *);
+ pFTPKind = $6B696E64 (* 'kind' *);
+
+ { Scheme enumerations }
+ eScheme = $65736368 (* 'esch' *);
+ eurlHTTP = $68747470 (* 'http' *); { RFC 2068 }
+ eurlHTTPS = $68747073 (* 'htps' *);
+ eurlFTP = $66747020 (* 'ftp ' *); { RFC 1738 }
+ eurlMail = $6D61696C (* 'mail' *); { RFC 2638 }
+ eurlFile = $66696C65 (* 'file' *); { RFC 1738 }
+ eurlGopher = $67706872 (* 'gphr' *); { RFC 1738 }
+ eurlTelnet = $746C6E74 (* 'tlnt' *); { RFC 1738 }
+ eurlNews = $6E657773 (* 'news' *); { RFC 1738 }
+ eurlSNews = $736E7773 (* 'snws' *);
+ eurlNNTP = $6E6E7470 (* 'nntp' *); { RFC 1738 }
+ eurlMessage = $6D657373 (* 'mess' *);
+ eurlMailbox = $6D626F78 (* 'mbox' *);
+ eurlMulti = $6D756C74 (* 'mult' *);
+ eurlLaunch = $6C61756E (* 'laun' *);
+ eurlAFP = $61667020 (* 'afp ' *);
+ eurlAT = $61742020 (* 'at ' *);
+ eurlEPPC = $65707063 (* 'eppc' *);
+ eurlRTSP = $72747370 (* 'rtsp' *); { RFC 2326 }
+ eurlIMAP = $696D6170 (* 'imap' *); { RFC 2192 }
+ eurlNFS = $756E6673 (* 'unfs' *); { RFC 2224 }
+ eurlPOP = $75706F70 (* 'upop' *); { RFC 2384 }
+ eurlLDAP = $756C6470 (* 'uldp' *); { RFC 2255 }
+ eurlUnknown = $75726C3F (* 'url?' *);
+
+ { AppleScript 1.3: Connectivity Suite in aeut }
+ kConnSuite = $6D616363 (* 'macc' *);
+ cDevSpec = $63646576 (* 'cdev' *);
+ cAddressSpec = $63616472 (* 'cadr' *);
+ cADBAddress = $63616462 (* 'cadb' *);
+ cAppleTalkAddress = $63617420 (* 'cat ' *);
+ cBusAddress = $63627573 (* 'cbus' *);
+ cEthernetAddress = $63656E20 (* 'cen ' *);
+ cFireWireAddress = $63667720 (* 'cfw ' *);
+ cIPAddress = $63697020 (* 'cip ' *);
+ cLocalTalkAddress = $636C7420 (* 'clt ' *);
+ cSCSIAddress = $63736373 (* 'cscs' *);
+ cTokenRingAddress = $63746F6B (* 'ctok' *);
+ cUSBAddress = $63757362 (* 'cusb' *); { }
+ { Properties }
+ pDeviceType = $70647674 (* 'pdvt' *);
+ pDeviceAddress = $70647661 (* 'pdva' *);
+ pConduit = $70636F6E (* 'pcon' *);
+ pProtocol = $70707274 (* 'pprt' *); { cde 4/27/98 was 'ppro' conflicted with DB suite }
+ pATMachine = $7061746D (* 'patm' *);
+ pATZone = $7061747A (* 'patz' *);
+ pATType = $70617474 (* 'patt' *);
+ pDottedDecimal = $70697064 (* 'pipd' *);
+ pDNS = $70646E73 (* 'pdns' *);
+ pPort = $70706F72 (* 'ppor' *);
+ pNetwork = $706E6574 (* 'pnet' *);
+ pNode = $706E6F64 (* 'pnod' *);
+ pSocket = $70736F63 (* 'psoc' *);
+ pSCSIBus = $70736362 (* 'pscb' *);
+ pSCSILUN = $70736C75 (* 'pslu' *); { cde 5/22/98 per WWDC developer request }
+ { Enumerations and enumerators }
+ eDeviceType = $65647674 (* 'edvt' *);
+ eAddressSpec = $65616473 (* 'eads' *);
+ eConduit = $65636F6E (* 'econ' *);
+ eProtocol = $6570726F (* 'epro' *);
+ eADB = $65616462 (* 'eadb' *);
+ eAnalogAudio = $65706175 (* 'epau' *);
+ eAppleTalk = $65706174 (* 'epat' *);
+ eAudioLineIn = $65636169 (* 'ecai' *);
+ eAudioLineOut = $6563616C (* 'ecal' *); { cde 4/24/98 changed from 'ecao' to not conflict }
+ eAudioOut = $6563616F (* 'ecao' *);
+ eBus = $65627573 (* 'ebus' *);
+ eCDROM = $65636420 (* 'ecd ' *);
+ eCommSlot = $6563636D (* 'eccm' *);
+ eDigitalAudio = $65706461 (* 'epda' *);
+ eDisplay = $65646473 (* 'edds' *);
+ eDVD = $65647664 (* 'edvd' *);
+ eEthernet = $6563656E (* 'ecen' *);
+ eFireWire = $65636677 (* 'ecfw' *);
+ eFloppy = $65666420 (* 'efd ' *);
+ eHD = $65686420 (* 'ehd ' *);
+ eInfrared = $65636972 (* 'ecir' *);
+ eIP = $65706970 (* 'epip' *);
+ eIrDA = $65706972 (* 'epir' *);
+ eIRTalk = $65706974 (* 'epit' *);
+ eKeyboard = $656B6264 (* 'ekbd' *);
+ eLCD = $65646C63 (* 'edlc' *);
+ eLocalTalk = $65636C74 (* 'eclt' *);
+ eMacIP = $65706D69 (* 'epmi' *);
+ eMacVideo = $65706D76 (* 'epmv' *);
+ eMicrophone = $65636D69 (* 'ecmi' *);
+ eModemPort = $65636D70 (* 'ecmp' *);
+ eModemPrinterPort = $656D7070 (* 'empp' *);
+ eModem = $65646D6D (* 'edmm' *);
+ eMonitorOut = $65636D6E (* 'ecmn' *);
+ eMouse = $656D6F75 (* 'emou' *);
+ eNuBusCard = $65646E62 (* 'ednb' *);
+ eNuBus = $656E7562 (* 'enub' *);
+ ePCcard = $65637063 (* 'ecpc' *);
+ ePCIbus = $65637069 (* 'ecpi' *);
+ ePCIcard = $65647069 (* 'edpi' *);
+ ePDSslot = $65637064 (* 'ecpd' *);
+ ePDScard = $65706473 (* 'epds' *);
+ ePointingDevice = $65647064 (* 'edpd' *);
+ ePostScript = $65707073 (* 'epps' *);
+ ePPP = $65707070 (* 'eppp' *);
+ ePrinterPort = $65637070 (* 'ecpp' *);
+ ePrinter = $65647072 (* 'edpr' *);
+ eSvideo = $65707376 (* 'epsv' *);
+ eSCSI = $65637363 (* 'ecsc' *);
+ eSerial = $65707372 (* 'epsr' *);
+ eSpeakers = $65647370 (* 'edsp' *);
+ eStorageDevice = $65647374 (* 'edst' *);
+ eSVGA = $65707367 (* 'epsg' *);
+ eTokenRing = $65746F6B (* 'etok' *);
+ eTrackball = $6574726B (* 'etrk' *);
+ eTrackpad = $65647470 (* 'edtp' *);
+ eUSB = $65637573 (* 'ecus' *);
+ eVideoIn = $65637669 (* 'ecvi' *);
+ eVideoMonitor = $6564766D (* 'edvm' *);
+ eVideoOut = $6563766F (* 'ecvo' *);
+
+ { AppleScript 1.3: Keystroke class }
+ cKeystroke = $6B707273 (* 'kprs' *);
+ pKeystrokeKey = $6B4D7367 (* 'kMsg' *);
+ pModifiers = $6B4D6F64 (* 'kMod' *);
+ pKeyKind = $6B6B6E64 (* 'kknd' *);
+ eModifiers = $654D6473 (* 'eMds' *);
+ eOptionDown = $4B6F7074 (* 'Kopt' *);
+ eCommandDown = $4B636D64 (* 'Kcmd' *);
+ eControlDown = $4B63746C (* 'Kctl' *);
+ eShiftDown = $4B736674 (* 'Ksft' *);
+ eCapsLockDown = $4B636C6B (* 'Kclk' *);
+ eKeyKind = $656B7374 (* 'ekst' *); { }
+ { Special keys all start with 'ks' }
+ eEscapeKey = $6B733500; { Third byte is virtual key code byte }
+ eDeleteKey = $6B733300; { (see IM Mac Toolbox Essentials, pp. 2-43) }
+ eTabKey = $6B733000;
+ eReturnKey = $6B732400;
+ eClearKey = $6B734700;
+ eEnterKey = $6B734C00;
+ eUpArrowKey = $6B737E00;
+ eDownArrowKey = $6B737D00;
+ eLeftArrowKey = $6B737B00;
+ eRightArrowKey = $6B737C00;
+ eHelpKey = $6B737200;
+ eHomeKey = $6B737300;
+ ePageUpKey = $6B737400;
+ ePageDownKey = $6B737900;
+ eForwardDelKey = $6B737500;
+ eEndKey = $6B737700;
+ eF1Key = $6B737A00;
+ eF2Key = $6B737800;
+ eF3Key = $6B736300;
+ eF4Key = $6B737600;
+ eF5Key = $6B736000;
+ eF6Key = $6B736100;
+ eF7Key = $6B736200;
+ eF8Key = $6B736400;
+ eF9Key = $6B736500;
+ eF10Key = $6B736D00;
+ eF11Key = $6B736700;
+ eF12Key = $6B736F00;
+ eF13Key = $6B736900;
+ eF14Key = $6B736B00;
+ eF15Key = $6B737100;
+
+ keyAEQuitWithoutUI = $6E6F7569 (* 'noui' *); { If present in a kAEQuitApplication event, autosave any documents with uncommitted changes and quit }
+
+{$ALIGN MAC68K}
+
+
+{unit ASRegistry}
+{
+ File: ASRegistry.p
+
+ Contains: AppleScript Registry constants.
+
+ Version: Technology: AppleScript 1.3
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1991-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ keyAETarget = $74617267 (* 'targ' *);
+ keySubjectAttr = $7375626A (* 'subj' *); { Magic 'returning' parameter: }
+ keyASReturning = $4B72746E (* 'Krtn' *); { AppleScript Specific Codes: }
+ kASAppleScriptSuite = $61736372 (* 'ascr' *);
+ kASScriptEditorSuite = $546F7953 (* 'ToyS' *);
+ kASTypeNamesSuite = $74706E6D (* 'tpnm' *); { dynamic terminologies }
+ typeAETE = $61657465 (* 'aete' *);
+ typeAEUT = $61657574 (* 'aeut' *);
+ kGetAETE = $67647465 (* 'gdte' *);
+ kGetAEUT = $67647574 (* 'gdut' *);
+ kUpdateAEUT = $75647574 (* 'udut' *);
+ kUpdateAETE = $75647465 (* 'udte' *);
+ kCleanUpAEUT = $63647574 (* 'cdut' *);
+ kASComment = $636D6E74 (* 'cmnt' *);
+ kASLaunchEvent = $6E6F6F70 (* 'noop' *);
+ keyScszResource = $7363737A (* 'scsz' *);
+ typeScszResource = $7363737A (* 'scsz' *); { subroutine calls }
+ kASSubroutineEvent = $70736272 (* 'psbr' *);
+ keyASSubroutineName = $736E616D (* 'snam' *);
+ kASPrepositionalSubroutine = $70736272 (* 'psbr' *);
+ keyASPositionalArgs = $70617267 (* 'parg' *);
+
+ { Add this parameter to a Get Data result if your app handled the 'as' parameter }
+ keyAppHandledCoercion = $69646173 (* 'idas' *);
+
+ { Miscellaneous AppleScript commands }
+ kASStartLogEvent = $6C6F6731 (* 'log1' *);
+ kASStopLogEvent = $6C6F6730 (* 'log0' *);
+ kASCommentEvent = $636D6E74 (* 'cmnt' *);
+
+
+ { Operator Events: }
+ { Binary: }
+ kASAdd = $2B202020 (* '+ ' *);
+ kASSubtract = $2D202020 (* '- ' *);
+ kASMultiply = $2A202020 (* '* ' *);
+ kASDivide = $2F202020 (* '/ ' *);
+ kASQuotient = $64697620 (* 'div ' *);
+ kASRemainder = $6D6F6420 (* 'mod ' *);
+ kASPower = $5E202020 (* '^ ' *);
+ kASEqual = $3D202020 (* '= ' *);
+ kASNotEqual = $E289A020 (* '­ ' *);
+ kASGreaterThan = $3E202020 (* '> ' *);
+ kASGreaterThanOrEqual = $3E3D2020 (* '>= ' *);
+ kASLessThan = $3C202020 (* '< ' *);
+ kASLessThanOrEqual = $3C3D2020 (* '<= ' *);
+ kASComesBefore = $63626672 (* 'cbfr' *);
+ kASComesAfter = $63616672 (* 'cafr' *);
+ kASConcatenate = $63636174 (* 'ccat' *);
+ kASStartsWith = $62677774 (* 'bgwt' *);
+ kASEndsWith = $656E6473 (* 'ends' *);
+ kASContains = $636F6E74 (* 'cont' *);
+
+ kASAnd = $414E4420 (* 'AND ' *);
+ kASOr = $4F522020 (* 'OR ' *); { Unary: }
+ kASNot = $4E4F5420 (* 'NOT ' *);
+ kASNegate = $6E656720 (* 'neg ' *);
+ keyASArg = $61726720 (* 'arg ' *);
+
+ { event code for the 'error' statement }
+ kASErrorEventCode = $65727220 (* 'err ' *);
+ kOSAErrorArgs = $65727261 (* 'erra' *);
+ keyAEErrorObject = $65726F62 (* 'erob' *); { Properties: }
+ pLength = $6C656E67 (* 'leng' *);
+ pReverse = $72767365 (* 'rvse' *);
+ pRest = $72657374 (* 'rest' *);
+ pInherits = $6340235E (* 'c@#^' *);
+ pProperties = $70414C4C (* 'pALL' *); { User-Defined Record Fields: }
+ keyASUserRecordFields = $75737266 (* 'usrf' *);
+ typeUserRecordFields = $6C697374 (* 'list' *);
+
+ { Prepositions: }
+ keyASPrepositionAt = $61742020 (* 'at ' *);
+ keyASPrepositionIn = $696E2020 (* 'in ' *);
+ keyASPrepositionFrom = $66726F6D (* 'from' *);
+ keyASPrepositionFor = $666F7220 (* 'for ' *);
+ keyASPrepositionTo = $746F2020 (* 'to ' *);
+ keyASPrepositionThru = $74687275 (* 'thru' *);
+ keyASPrepositionThrough = $74686768 (* 'thgh' *);
+ keyASPrepositionBy = $62792020 (* 'by ' *);
+ keyASPrepositionOn = $6F6E2020 (* 'on ' *);
+ keyASPrepositionInto = $696E746F (* 'into' *);
+ keyASPrepositionOnto = $6F6E746F (* 'onto' *);
+ keyASPrepositionBetween = $6274776E (* 'btwn' *);
+ keyASPrepositionAgainst = $61677374 (* 'agst' *);
+ keyASPrepositionOutOf = $6F75746F (* 'outo' *);
+ keyASPrepositionInsteadOf = $6973746F (* 'isto' *);
+ keyASPrepositionAsideFrom = $61736466 (* 'asdf' *);
+ keyASPrepositionAround = $61726E64 (* 'arnd' *);
+ keyASPrepositionBeside = $62736964 (* 'bsid' *);
+ keyASPrepositionBeneath = $626E7468 (* 'bnth' *);
+ keyASPrepositionUnder = $756E6472 (* 'undr' *);
+
+ keyASPrepositionOver = $6F766572 (* 'over' *);
+ keyASPrepositionAbove = $61627665 (* 'abve' *);
+ keyASPrepositionBelow = $62656C77 (* 'belw' *);
+ keyASPrepositionApartFrom = $61707274 (* 'aprt' *);
+ keyASPrepositionGiven = $6769766E (* 'givn' *);
+ keyASPrepositionWith = $77697468 (* 'with' *);
+ keyASPrepositionWithout = $776F7574 (* 'wout' *);
+ keyASPrepositionAbout = $61626F75 (* 'abou' *);
+ keyASPrepositionSince = $736E6365 (* 'snce' *);
+ keyASPrepositionUntil = $74696C6C (* 'till' *);
+
+ { Terminology & Dialect things: }
+ kDialectBundleResType = $4462646C (* 'Dbdl' *); { AppleScript Classes and Enums: }
+ cConstant = $656E756D (* 'enum' *);
+ cClassIdentifier = $70636C73 (* 'pcls' *);
+ cObjectBeingExamined = $65786D6E (* 'exmn' *);
+ cList = $6C697374 (* 'list' *);
+ cSmallReal = $73696E67 (* 'sing' *);
+ cReal = $646F7562 (* 'doub' *);
+ cRecord = $7265636F (* 'reco' *);
+ cReference = $6F626A20 (* 'obj ' *);
+ cUndefined = $756E6466 (* 'undf' *);
+ cMissingValue = $6D736E67 (* 'msng' *);
+ cSymbol = $73796D62 (* 'symb' *);
+ cLinkedList = $6C6C7374 (* 'llst' *);
+ cVector = $76656374 (* 'vect' *);
+ cEventIdentifier = $65766E74 (* 'evnt' *);
+ cKeyIdentifier = $6B796964 (* 'kyid' *);
+ cUserIdentifier = $75696420 (* 'uid ' *);
+ cPreposition = $70726570 (* 'prep' *);
+ cKeyForm = $6B66726D (* 'kfrm' *);
+ cScript = $73637074 (* 'scpt' *);
+ cHandler = $68616E64 (* 'hand' *);
+ cProcedure = $70726F63 (* 'proc' *);
+
+ cHandleBreakpoint = $6272616B (* 'brak' *);
+
+ cClosure = $636C7372 (* 'clsr' *);
+ cRawData = $72646174 (* 'rdat' *);
+ cStringClass = $54455854 (* 'TEXT' *);
+ cNumber = $6E6D6272 (* 'nmbr' *);
+ cListElement = $63656C6D (* 'celm' *);
+ cListOrRecord = $6C722020 (* 'lr ' *);
+ cListOrString = $6C732020 (* 'ls ' *);
+ cListRecordOrString = $6C727320 (* 'lrs ' *);
+ cNumberOrString = $6E732020 (* 'ns ' *);
+ cNumberOrDateTime = $6E642020 (* 'nd ' *);
+ cNumberDateTimeOrString = $6E647320 (* 'nds ' *);
+ cAliasOrString = $73662020 (* 'sf ' *);
+ cSeconds = $73636E64 (* 'scnd' *);
+ typeSound = $736E6420 (* 'snd ' *);
+ enumBooleanValues = $626F6F76 (* 'boov' *); { Use this instead of typeBoolean to avoid with/without conversion }
+ kAETrue = $74727565 (* 'true' *);
+ kAEFalse = $66616C73 (* 'fals' *);
+ enumMiscValues = $6D697363 (* 'misc' *);
+ kASCurrentApplication = $63757261 (* 'cura' *); { User-defined property ospecs: }
+ formUserPropertyID = $75737270 (* 'usrp' *);
+
+// cString = $54455854 (* 'TEXT' *); { old name for cStringClass - can't be used in .r files }
+
+ { Global properties: }
+ pASIt = $69742020 (* 'it ' *);
+ pASMe = $6D652020 (* 'me ' *);
+ pASResult = $72736C74 (* 'rslt' *);
+ pASSpace = $73706163 (* 'spac' *);
+ pASReturn = $72657420 (* 'ret ' *);
+ pASTab = $74616220 (* 'tab ' *);
+ pASPi = $70692020 (* 'pi ' *);
+ pASParent = $70617265 (* 'pare' *);
+ kASInitializeEventCode = $696E6974 (* 'init' *);
+ pASPrintLength = $70726C6E (* 'prln' *);
+ pASPrintDepth = $70726470 (* 'prdp' *);
+ pASTopLevelScript = $61736372 (* 'ascr' *);
+
+ { Considerations }
+ kAECase = $63617365 (* 'case' *);
+ kAEDiacritic = $64696163 (* 'diac' *);
+ kAEWhiteSpace = $77686974 (* 'whit' *);
+ kAEHyphens = $68797068 (* 'hyph' *);
+ kAEExpansion = $65787061 (* 'expa' *);
+ kAEPunctuation = $70756E63 (* 'punc' *);
+ kAEZenkakuHankaku = $7A6B686B (* 'zkhk' *);
+ kAESmallKana = $736B6E61 (* 'skna' *);
+ kAEKataHiragana = $68696B61 (* 'hika' *);
+ kASConsiderReplies = $726D7465 (* 'rmte' *);
+ enumConsiderations = $636F6E73 (* 'cons' *);
+
+ { Considerations bit masks }
+ kAECaseConsiderMask = $00000001;
+ kAEDiacriticConsiderMask = $00000002;
+ kAEWhiteSpaceConsiderMask = $00000004;
+ kAEHyphensConsiderMask = $00000008;
+ kAEExpansionConsiderMask = $00000010;
+ kAEPunctuationConsiderMask = $00000020;
+ kASConsiderRepliesConsiderMask = $00000040;
+ kAECaseIgnoreMask = $00010000;
+ kAEDiacriticIgnoreMask = $00020000;
+ kAEWhiteSpaceIgnoreMask = $00040000;
+ kAEHyphensIgnoreMask = $00080000;
+ kAEExpansionIgnoreMask = $00100000;
+ kAEPunctuationIgnoreMask = $00200000;
+ kASConsiderRepliesIgnoreMask = $00400000;
+ enumConsidsAndIgnores = $63736967 (* 'csig' *);
+
+ cCoercion = $636F6563 (* 'coec' *);
+ cCoerceUpperCase = $74787570 (* 'txup' *);
+ cCoerceLowerCase = $74786C6F (* 'txlo' *);
+ cCoerceRemoveDiacriticals = $74786463 (* 'txdc' *);
+ cCoerceRemovePunctuation = $74787063 (* 'txpc' *);
+ cCoerceRemoveHyphens = $74786879 (* 'txhy' *);
+ cCoerceOneByteToTwoByte = $74786578 (* 'txex' *);
+ cCoerceRemoveWhiteSpace = $74787773 (* 'txws' *);
+ cCoerceSmallKana = $7478736B (* 'txsk' *);
+ cCoerceZenkakuhankaku = $74787A65 (* 'txze' *);
+ cCoerceKataHiragana = $74786B68 (* 'txkh' *); { Lorax things: }
+ cZone = $7A6F6E65 (* 'zone' *);
+ cMachine = $6D616368 (* 'mach' *);
+ cAddress = $61646472 (* 'addr' *);
+ cRunningAddress = $72616464 (* 'radd' *);
+ cStorage = $73746F72 (* 'stor' *);
+
+ { DateTime things: }
+ pASWeekday = $776B6479 (* 'wkdy' *);
+ pASMonth = $6D6E7468 (* 'mnth' *);
+ pASDay = $64617920 (* 'day ' *);
+ pASYear = $79656172 (* 'year' *);
+ pASTime = $74696D65 (* 'time' *);
+ pASDateString = $64737472 (* 'dstr' *);
+ pASTimeString = $74737472 (* 'tstr' *); { Months }
+ cMonth = $6D6E7468 (* 'mnth' *);
+ cJanuary = $6A616E20 (* 'jan ' *);
+ cFebruary = $66656220 (* 'feb ' *);
+ cMarch = $6D617220 (* 'mar ' *);
+ cApril = $61707220 (* 'apr ' *);
+ cMay = $6D617920 (* 'may ' *);
+ cJune = $6A756E20 (* 'jun ' *);
+ cJuly = $6A756C20 (* 'jul ' *);
+ cAugust = $61756720 (* 'aug ' *);
+ cSeptember = $73657020 (* 'sep ' *);
+ cOctober = $6F637420 (* 'oct ' *);
+ cNovember = $6E6F7620 (* 'nov ' *);
+ cDecember = $64656320 (* 'dec ' *);
+
+ { Weekdays }
+ cWeekday = $776B6479 (* 'wkdy' *);
+ cSunday = $73756E20 (* 'sun ' *);
+ cMonday = $6D6F6E20 (* 'mon ' *);
+ cTuesday = $74756520 (* 'tue ' *);
+ cWednesday = $77656420 (* 'wed ' *);
+ cThursday = $74687520 (* 'thu ' *);
+ cFriday = $66726920 (* 'fri ' *);
+ cSaturday = $73617420 (* 'sat ' *); { AS 1.1 Globals: }
+ pASQuote = $71756F74 (* 'quot' *);
+ pASSeconds = $73656373 (* 'secs' *);
+ pASMinutes = $6D696E20 (* 'min ' *);
+ pASHours = $686F7572 (* 'hour' *);
+ pASDays = $64617973 (* 'days' *);
+ pASWeeks = $7765656B (* 'week' *); { Writing Code things: }
+ cWritingCodeInfo = $6369746C (* 'citl' *);
+ pScriptCode = $70736364 (* 'pscd' *);
+ pLangCode = $706C6364 (* 'plcd' *); { Magic Tell and End Tell events for logging: }
+ kASMagicTellEvent = $74656C6C (* 'tell' *);
+ kASMagicEndTellEvent = $74656E64 (* 'tend' *);
+
+{$ALIGN MAC68K}
+
+
+{unit ATSUnicodeDirectAccess}
+{
+ File: QD/ATSUnicodeDirectAccess.h
+
+ Contains: Public Interfaces/Types for Low Level ATSUI
+
+ Version: Quickdraw-150~1
+
+ Copyright: © 2002-2003 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{ ---------------------------------------------------------------------------- }
+{ Constants }
+{ ---------------------------------------------------------------------------- }
+
+{
+ * ATSUDirectDataSelector
+ *
+ * Summary:
+ * These are the data selectors used in the
+ * ATSUDirectGetLayoutDataArrayPtr function to get the needed layout
+ * data array pointer.
+ }
+type ATSUDirectDataSelector = UInt32;
+const
+
+ {
+ * Returns the parallel advance delta (delta X) array. (Array Type):
+ * Fixed (Return Time): Constant, unless creation is necessary, or
+ * unless requested by ATSUDirectGetLayoutDataArrayPtrFromTextLayout.
+ * (Creation): This array is created only on demand. Thus, if any
+ * changes are to be made iCreate should be set to true. If the array
+ * had not been previously allocated it will be allocated and
+ * zero-filled when iCreate is set to true.
+ }
+ kATSUDirectDataAdvanceDeltaFixedArray = 0;
+
+ {
+ * Returns the parallel baseline delta (delta Y) array. (Array Type):
+ * Fixed (Return Time): Constant, unless creation is necessary, or
+ * unless requested by ATSUDirectGetLayoutDataArrayPtrFromTextLayout.
+ * (Creation): This array is created only on demand. Thus, if any
+ * changes are to be made iCreate should be set to true. If the array
+ * had not been previously allocated it will be allocated and
+ * zero-filled when iCreate is set to true.
+ }
+ kATSUDirectDataBaselineDeltaFixedArray = 1;
+
+ {
+ * Returns the parallel device delta array for device- specific
+ * tweaking. This is an array of values which are used to adjust
+ * truncated fractional values for devices that do not accept
+ * fractional positioning. It is also used to provide precise
+ * positioning for connected scripts. (Array Type): SInt16 (Return
+ * Time): Constant, unless creation is necessary, or unless requested
+ * by ATSUDirectGetLayoutDataArrayPtrFromTextLayout. (Creation): This
+ * array is created only on demand. Thus, if any changes are to be
+ * made iCreate should be set to true. If the array had not been
+ * previously allocated it will be allocated and zero-filled when
+ * iCreate is set to true.
+ }
+ kATSUDirectDataDeviceDeltaSInt16Array = 2;
+
+ {
+ * Returns the parallel style index array. The indexes setting in the
+ * array are indexes into the the StyleSetting array, which can be
+ * obtained using the
+ * kATSUDirectDataStyleSettingATSUStyleSettingRefArray below. (Array
+ * Type): UInt16 (Return Time): Constant, unless creation is
+ * necessary, or unless requested by
+ * ATSUDirectGetLayoutDataArrayPtrFromTextLayout. (Creation): This
+ * array is created only on demand. Thus, if any changes are to be
+ * made iCreate should be set to true. If the array had not been
+ * previously allocated it will be allocated and zero-filled when
+ * iCreate is set to true.
+ }
+ kATSUDirectDataStyleIndexUInt16Array = 3;
+
+ {
+ * Returns the style setting ref array. (Array Type):
+ * ATSUStyleSettingRef (Return Time): Linear, based on the number of
+ * styles applied to the given line. (Creation): This array is always
+ * present if the layout has any text assigned to it at all. Setting
+ * iCreate has no effect.
+ }
+ kATSUDirectDataStyleSettingATSUStyleSettingRefArray = 4;
+
+ {
+ * Returns the ATSLayoutRecord, version 1 array. This should not be
+ * used directly at all. Rather, use the
+ * kATSUDirectDataLayoutRecordATSLayoutRecordCurrent selector below.
+ * This will ensure that the code will always be using the most
+ * current version of the ATSLayoutRecord, should there ever be a
+ * change. ATSUI will only ensure the most efficient processing will
+ * occur for the latest version of ATSLayoutRecord. (Array Type):
+ * ATSLayoutRecord, version 1 (Return Time): Constant, unless
+ * creation is necessary, or unless requested by
+ * ATSUDirectGetLayoutDataArrayPtrFromTextLayout. (Creation): This
+ * array is always present if the layout has any text assigned to it
+ * at all. Setting iCreate has no effect
+ }
+ kATSUDirectDataLayoutRecordATSLayoutRecordVersion1 = 100;
+
+ {
+ * Returns the ATSLayoutRecord. This will return the most current
+ * version of the ATSLayoutRecord, and the one that's defined in this
+ * file. Always use kATSUDirectDataLayoutRecordATSLayoutRecordCurrent
+ * to get the array of ATSLayoutRecords. (Array Type):
+ * ATSLayoutRecord (Return Time): Constant, unless creation is
+ * necessary, or unless requested by
+ * ATSUDirectGetLayoutDataArrayPtrFromTextLayout. (Creation): This
+ * array is always present if the layout has any text assigned to it
+ * at all. Setting iCreate has no effect.
+ }
+ kATSUDirectDataLayoutRecordATSLayoutRecordCurrent = kATSUDirectDataLayoutRecordATSLayoutRecordVersion1;
+
+{ ---------------------------------------------------------------------------- }
+{ Data Types }
+{ ---------------------------------------------------------------------------- }
+
+{
+ * ATSUStyleSettingRef
+ *
+ * Summary:
+ * A reference to a style setting object that represents an
+ * ATSUStyle plus any cached/set information about that style.
+ }
+type
+ ATSUStyleSettingRef = ^SInt32; { an opaque 32-bit type }
+{ ---------------------------------------------------------------------------- }
+{ Direct Accessors }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUDirectGetLayoutDataArrayPtrFromLineRef()
+ *
+ * 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
+ * should not be freed directly after it's been used. Rather, it
+ * should be released using ATSUDirectReleaseLayoutDataArrayPtr.
+ * Doing so serves as a signal to ATSUI that the caller is done with
+ * the data and that it can merge it in smoothly and adjust its
+ * internal processes. Furthermore, it may be the case that the
+ * pointer returned may be dynamically allocated one or contain
+ * dynamically allocated data. If it's not properly freed, a memory
+ * leak may result. This function may only be called within the
+ * context of an ATSUDirectLayoutOperationOverrideUPP callback. The
+ * pointer returned points to the exact data referenced by the
+ * ATSUTextLayout object that triggered the callback call. This is
+ * by far the most efficient way to use the direct access calls
+ * because for most requested data, no allocation and copy is done.
+ * Furthermore, because this a direct pointer to the data that ATSUI
+ * will use for it's layout, the data arrays returned by this can be
+ * tweaked and edited. Many of the requested arrays are created by
+ * ATSUI only when necessary. If these arrays are to be altered,
+ * then be sure to set iCreate to true. This will ensure that this
+ * array is created. If the arrays are not created, ATSUI
+ * automatically assumes that all entries in the array are zero. The
+ * 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
+ * returned in oLayoutDataArray if this is set to true. For some
+ * 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
+ * iLineRef references those values. If this is not the case, then
+ * 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. can be NULL
+ *
+ * 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
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function ATSUDirectGetLayoutDataArrayPtrFromLineRef( iLineRef: ATSULineRef; iDataSelector: ATSUDirectDataSelector; iCreate: Boolean; oLayoutDataArrayPtr: PtrPtr; var oLayoutDataCount: ItemCount ): OSStatus; external name '_ATSUDirectGetLayoutDataArrayPtrFromLineRef';
+
+
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUDirectGetLayoutDataArrayPtrFromTextLayout()
+ *
+ * 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
+ * at iLineOffset. This data pointer should not be freed directly
+ * after it's been used. Rather, it should be released using
+ * ATSUDirectReleaseLayoutDataArrayPtr. Doing so serves as a signal
+ * to ATSUI that the caller is done with the data. Furthermore, it
+ * may be the case that the pointer returned may be dynamically
+ * allocated one or contain dynamically allocated data. If it's not
+ * properly freed, a memory leak may result. This function may not
+ * be called inside the context of an
+ * ATSUDirectLayoutOperationOverrideUPP callback for the
+ * ATSUTextLayout data that triggered the callback. All data
+ * returned will be a copy of the data in the object requested. This
+ * means two things: first of all, this means that it's a very
+ * inefficient way of using the data. All of the selectors that
+ * would have returned in constant time now would be forced to
+ * 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
+ * kATSULayoutOperationPostLayoutAdjustment operation selector
+ * override and the ATSUDirectGetLayoutDataArrayPtrFromLineRef is a
+ * great alternative to using this API. Many of the requested arrays
+ * are created by ATSUI only when necessary. This means that it's
+ * possible that this API will return NULL pointer and a count of 0.
+ * 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
+ * in iTextLayout references those values for the line offset
+ * 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. can be NULL
+ *
+ * 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
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function ATSUDirectGetLayoutDataArrayPtrFromTextLayout( iTextLayout: ATSUTextLayout; iLineOffset: UniCharArrayOffset; iDataSelector: ATSUDirectDataSelector; oLayoutDataArrayPtr: PtrPtr; var oLayoutDataCount: ItemCount ): OSStatus; external name '_ATSUDirectGetLayoutDataArrayPtrFromTextLayout';
+
+
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUDirectReleaseLayoutDataArrayPtr()
+ *
+ * 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
+ * ATSUDirectGetLayoutDataArrayPtrFromLineRef() or
+ * 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. can be 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
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function ATSUDirectReleaseLayoutDataArrayPtr( iLineRef: ATSULineRef; iDataSelector: ATSUDirectDataSelector; iLayoutDataArrayPtr: PtrPtr ): OSStatus; external name '_ATSUDirectReleaseLayoutDataArrayPtr';
+
+
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUDirectAddStyleSettingRef()
+ *
+ * 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
+ * look up the style index for iStyleSettingRef, but if the
+ * ATSUStyleSettingRef passed in iStyleSettingRef is not yet part of
+ * the line referenced by iLineRef, it will add it. If there is an
+ * outstanding ATSUStyleSettingRef array obtained by using the
+ * kATSUDirectDataStyleSettingATSUStyleSettingRefArray selector, the
+ * 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
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function ATSUDirectAddStyleSettingRef( iLineRef: ATSULineRef; iStyleSettingRef: ATSUStyleSettingRef; var oStyleIndex: UInt16 ): OSStatus; external name '_ATSUDirectAddStyleSettingRef';
+
+{unit ATSUnicodeDrawing}
+{
+ File: QD/ATSUnicodeDrawing.h
+
+ Contains: ATSUI drawing, measuring, and highlighting functions.
+
+ Version: Quickdraw-150~1
+
+ Copyright: © 2003 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI drawing and measuring }
+{ ---------------------------------------------------------------------------- }
+
+{
+ * ATSUDrawText()
+ *
+ * Summary:
+ * Draws a specified range of text in a QuickDraw graphics port or
+ * Quartz graphics context.
+ *
+ * Discussion:
+ * Before calling ATSUDrawText, you will most likely want to call
+ * ATSUSetLayoutControls to set a value for the kATSUCGContextTag
+ * attribute in order to specify your current graphics context.
+ * Otherwise, ATSUI will attempt to draw using Quickdraw style text
+ * rendering in whatever Quickdraw GrafPort is currently active (use
+ * SetPort to determine the currently active Quickdraw GrafPort, see
+ * Quickdraw.h). Carbon applications can create a CGContext from a
+ * Quickdraw GrafPort using the functions QDBeginCGContext and
+ * QDEndCGContext (see Quickdraw.h). Cocoa applications can call the
+ * method "graphicsPort" on the current NSGraphicsContext in order
+ * to get a CGContextRef to pass into ATSUI (use the method
+ * "currentContext" to obtain the current NSGraphicsContext, see
+ * NSGraphicsContext.h for more information). ATSUDrawText examines
+ * the text layout object to ensure that each of the characters in
+ * the range is assigned to a style run. If there are gaps between
+ * style runs, ATSUI assigns the characters in the gap to the style
+ * run that precedes (in storage order) the gap. If there is no
+ * style run at the beginning of the text range, ATSUI assigns these
+ * characters to the first style run it finds. If there is no style
+ * run at the end of the text range, ATSUI assigns the remaining
+ * characters to the last style run it finds. If you want to draw a
+ * range of text that spans multiple lines, you should call
+ * ATSUDrawText for each line of text to draw, even if all the lines
+ * are in the same text layout object. You should adjust the
+ * iLineOffset parameter to reflect the beginning of each line to be
+ * drawn. Please note that when drawing into a GrafPort, calls to
+ * QDSwapTextFlags have no effect on ATSUI text rendering. The
+ * proper way to achieve Quartz text rendering from ATSUI is to use
+ * the kATSUCGContextTag attribute to specify a CGContextRef in each
+ * ATSUTextLayout before calling ATSUDrawText.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * A layout containing text to draw.
+ *
+ * iLineOffset:
+ * The starting offset of the range of text to draw. To specify
+ * the beginning of the text buffer, pass kATSUFromTextBeginning
+ * for this parameter.
+ *
+ * iLineLength:
+ * The length of the range of text to draw. To specify a range
+ * that continues to the end of the text buffer, pass
+ * kATSUToTextEnd for this parameter.
+ *
+ * iLocationX:
+ * The x-coordinate of the origin (in either the current graphics
+ * port or Quartz graphics context) of the line containing the
+ * text range to render. Note that the ATSUTextMeasurement type is
+ * defined as a Fixed value, so you must ensure that your
+ * coordinates are converted to Fixed values before passing them
+ * to this function (see FixMath.h for conversion functions). Pass
+ * the constant kATSUUseGrafPortPenLoc to draw relative to the
+ * current pen location in the current graphics port.
+ *
+ * iLocationY:
+ * The y-coordinate of the origin (in either the current graphics
+ * port or Quartz graphics context) of the line containing the
+ * text range to render. Note that the ATSUTextMeasurement type is
+ * defined as a Fixed value, so you must ensure that your
+ * coordinates are converted to Fixed values before passing them
+ * to this function (see FixMath.h for conversion functions). Pass
+ * the constant kATSUUseGrafPortPenLoc to draw relative to the
+ * current pen location in the current graphics port.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUDrawText( iTextLayout: ATSUTextLayout; iLineOffset: UniCharArrayOffset; iLineLength: UniCharCount; iLocationX: ATSUTextMeasurement; iLocationY: ATSUTextMeasurement ): OSStatus; external name '_ATSUDrawText';
+
+
+{
+ * ATSUGetUnjustifiedBounds()
+ *
+ * Summary:
+ * Obtains the typographic bounding rectangle for a line of text
+ * prior to final layout.
+ *
+ * Discussion:
+ * This function calculates the typographic bounds (in coordinates
+ * independent of the rendering device) for a line of text. Note
+ * that ATSUGetUnjustifiedBounds calculates these bounds prior to
+ * the text's final layout, and therefore, the calculated bounds
+ * might not reflect those of the final laid-out line.
+ * Justification, truncation, and device level positioning are not
+ * taken into account. To obtain the typographic bounds of a line
+ * after it is laid out, you can call the function
+ * ATSUGetGlyphBounds. For more infomration about the difference
+ * between typographic and image bounds, please refer to the ATSUI
+ * documentation. Note that ATSUGetUnjustifiedBounds treats the
+ * specified text range as a single line. That is, if the range of
+ * text you specify is less than a line, it nevertheless treats the
+ * initial character in the range as the start of a line, for
+ * measuring purposes. If the range of text extends beyond a line,
+ * ATSUGetUnjustifiedBounds ignores soft line breaks, again,
+ * treating the text as a single line.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The text layout object to obtain bounds information for.
+ *
+ * iLineStart:
+ * The start of the line of text to obtain bounds information for.
+ * To indicate that the line starts at the beginning of the text
+ * buffer, you can pass the constant kATSUFromTextBeginning . To
+ * specify the entire text buffer, pass kATSUFromTextBeginning in
+ * this parameter and kATSUToTextEnd in the iLineLength parameter.
+ *
+ * iLineLength:
+ * The length of the line to obtain bounds information for. If you
+ * want the line to extend to the end of the text buffer, you can
+ * pass the constant kATSUToTextEnd .
+ *
+ * oTextBefore:
+ * On return, the value specifies the starting point of the
+ * typographic bounds for the line, relative to the origin (0,0)
+ * of the line and taking into account cross-stream shifting. Note
+ * that the ATSUMeasureText function might produce negative values
+ * for the typographic starting point of the line if, for example,
+ * the initial character of the line is allowed to hang into the
+ * margin. For horizontal text, this value corresponds to the left
+ * side of the bounding rectangle.
+ *
+ * oTextAfter:
+ * On return, the end point of the typographic bounds for the
+ * line, relative to the origin (0,0) of the line and taking into
+ * account cross-stream shifting. For horizontal text, this value
+ * corresponds to the right side of the bounding rectangle.
+ *
+ * oAscent:
+ * On return, the typographic bounds for the line, relative to the
+ * origin (0,0) of the line and taking into account cross-stream
+ * shifting. For horizontal text, this value corresponds to the
+ * top side of the bounding rectangle.
+ *
+ * oDescent:
+ * On return, the typographic bounds for the line, relative to the
+ * origin (0,0) of the line and taking into account cross-stream
+ * shifting. For horizontal text, this value corresponds to the
+ * bottom side of the bounding rectangle.
+ *
+ * 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
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function ATSUGetUnjustifiedBounds( iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset; iLineLength: UniCharCount; var oTextBefore: ATSUTextMeasurement; var oTextAfter: ATSUTextMeasurement; var oAscent: ATSUTextMeasurement; var oDescent: ATSUTextMeasurement ): OSStatus; external name '_ATSUGetUnjustifiedBounds';
+
+
+{
+ * ATSUMeasureTextImage()
+ *
+ * Summary:
+ * Obtains the image bounding rectangle for a line of text after
+ * final layout.
+ *
+ * Discussion:
+ * This function obtains the image bounds of a laid-out line of
+ * text. These bounds are described by the smallest rectangle that
+ * completely encloses the filled or framed parts of a block of
+ * textÑthat is, the text's "inked" glyphs. In measuring the line,
+ * the ATSUMeasureTextImage function takes into account line
+ * rotation, alignment, and justification, as well as other
+ * characteristics that affect layout, such as hanging punctuation.
+ * (If the line is rotated, the sides of the rectangle are parallel
+ * to the coordinate axes and encompass the rotated line.) If no
+ * attributes are set for the line, ATSUMeasureTextImage uses the
+ * global attributes set for the text layout object. Because the
+ * height of the image bounding rectangle is determined by the
+ * actual device metrics, ATSUMeasureTextImage ignores any
+ * previously set line ascent and descent values for the line it is
+ * measuring.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The text layout for which to obtain image bounds.
+ *
+ * iLineOffset:
+ * The first character of the line to examine. To indicate that
+ * the specified line starts at the beginning of the text buffer,
+ * you can pass the constant kATSUFromTextBeginning . To specify
+ * the entire text buffer, pass kATSUFromTextBeginning in this
+ * parameter and kATSUToTextEnd in the iLineLength parameter.
+ *
+ * iLineLength:
+ * The length of the text range. If you want the range of text to
+ * extend to the end of the text buffer, you can pass the constant
+ * kATSUToTextEnd . However, the image bounds is restricted to the
+ * line in which iLineOffset resides.
+ *
+ * iLocationX:
+ * The x-coordinate of the line's origin in the current graphics
+ * port or Quartz graphics context. Pass the constant
+ * kATSUUseGrafPortPenLoc for the dimensions of the bounds
+ * relative to the current pen location in the current graphics
+ * port or graphics context. You can pass 0to obtain only the
+ * dimensions of the bounding rectangle relative to one another,
+ * not their actual onscreen position.
+ *
+ * iLocationY:
+ * The y-coordinate of the line's origin in the current graphics
+ * port or Quartz graphics context. Pass the constant
+ * kATSUUseGrafPortPenLoc for the dimensions of the bounds
+ * relative to the current pen location in the current graphics
+ * port or graphics context. You can pass 0to obtain only the
+ * dimensions of the bounding rectangle relative to one another,
+ * not their actual onscreen position.
+ *
+ * oTextImageRect:
+ * On return, the dimensions of the image bounding rectangle for
+ * the text, offset by the values specified in the iLocationX and
+ * iLocationY parameters. If the line is rotated, the sides of the
+ * rectangle are parallel to the coordinate axis.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUMeasureTextImage( iTextLayout: ATSUTextLayout; iLineOffset: UniCharArrayOffset; iLineLength: UniCharCount; iLocationX: ATSUTextMeasurement; iLocationY: ATSUTextMeasurement; var oTextImageRect: Rect ): OSStatus; external name '_ATSUMeasureTextImage';
+
+
+{
+ * ATSUGetGlyphBounds()
+ *
+ * Summary:
+ * Obtains the typographic bounds of a line of glyphs after final
+ * layout.
+ *
+ * Discussion:
+ * This function produces the enclosing trapezoid(s) that represent
+ * the typographic bounds for glyphs in a final, laid-out range of
+ * text. You typically call this function when you need to obtain an
+ * enclosing trapezoid for a line, taking rotation and all other
+ * layout attributes into account. ATSUI determines the height of
+ * each trapezoid by examining any line ascent and descent attribute
+ * values you may have set for the line. If you have not set these
+ * attributes for the line, the ATSUGetGlyphBounds function uses any
+ * line ascent and descent values you may have set for the text
+ * layout object containing the line. If these are not set,
+ * ATSUGetGlyphBounds uses the font's natural line ascent and
+ * descent values for the line. If these are previously set,
+ * ATSUGetGlyphBounds uses the ATSUStyle ascent and or
+ * descent/leading values. Note that the coordinates produced for
+ * the trapezoid(s) are offset by the amount specified in the
+ * iTextBasePointX and iTextBasePointY parameters. If your goal in
+ * calling the ATSUGetGlyphBounds function is to obtain metrics for
+ * drawing the typographic bounds on the screen, pass the position
+ * of the origin of the line in the current graphics port or
+ * graphics context in these parameters. This enables
+ * ATSUGetGlyphBounds to match the trapezoids to their onscreen
+ * image. When the range specified by the iBoundsCharStart and
+ * iBoundsCharLength parameters covers an entire line, you are
+ * guaranteed to receive only one trapezoid on return. Otherwise,
+ * multiple trapezoids may be returned to cover incomplete sections
+ * of bidi runs. In such cases, you would typically call
+ * ATSUGetGlyphBounds twice, as follows: (1) Pass NULL for the
+ * oGlyphBounds parameter, 0 for the iMaxNumberOfBounds parameter,
+ * and valid values for the other parameters. The ATSUGetGlyphBounds
+ * function returns the actual number of trapezoids needed to
+ * enclose the glyphs in the oActualNumberOfBounds parameter. (2)
+ * Allocate enough space for a buffer of the returned size, then
+ * call the function again, passing a valid pointer to the buffer in
+ * the oGlyphBounds parameter. On return, the buffer contains the
+ * trapezoids for the glyphs' typographic bounds. To obtain the
+ * typographic bounds of a line of text prior to line layout, call
+ * the function ATSUGetUnjustifiedBounds. To calculate the image
+ * bounding rectangle for a final laid-out line, call the function
+ * ATSUMeasureTextImage. For more infomration about the difference
+ * between typographic and image bounds, please refer to the ATSUI
+ * documentation.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The text layout object for which glyph bounds are to be
+ * obtained.
+ *
+ * iTextBasePointX:
+ * The x-coordinate of the origin of the line containing the
+ * glyphs in the current graphics port or Quartz graphics context.
+ * Pass the constant kATSUUseGrafPortPenLoc to obtain the glyph
+ * bounds relative to the current pen location in the current
+ * graphics port or graphics context. You may pass 0 to obtain
+ * only the dimensions of the bounds relative to one another, not
+ * their actual onscreen position.
+ *
+ * iTextBasePointY:
+ * The y-coordinate of the origin of the line containing the
+ * glyphs in the current graphics port or Quartz graphics context.
+ * Pass the constant kATSUUseGrafPortPenLoc to obtain the glyph
+ * bounds relative to the current pen location in the current
+ * graphics port or graphics context. You may pass 0 to obtain
+ * only the dimensions of the bounds relative to one another, not
+ * their actual onscreen position.
+ *
+ * iBoundsCharStart:
+ * The offset from the beginning of the text buffer to the
+ * character corresponding to the first glyph to measure. To
+ * indicate that the text range starts at the beginning of the
+ * text buffer, you can pass the constant kATSUFromTextBeginning.
+ *
+ * iBoundsCharLength:
+ * The length of text range to measure. If you want the range to
+ * extend to the end of the text buffer, you can pass the constant
+ * kATSUToTextEnd.
+ *
+ * iTypeOfBounds:
+ * The type of bounds you wish to obtain. See ATSLayoutTypes.h for
+ * a list of possible values to pass in here.
+ *
+ * iMaxNumberOfBounds:
+ * The maximum number of bounding trapezoids to obtain. Typically,
+ * this is equivalent to the number of bounds in the oGlyphBounds
+ * array. To determine this value, see the Discussion.
+ *
+ * oGlyphBounds:
+ * A pointer to memory you have allocated for an array of
+ * ATSTrapezoid values. On return, the array contains a trapezoid
+ * representing the typographic bounds for glyphs in the text
+ * range. If the specified range of text encloses nested
+ * bidirectional text, ATSUGetGlyphBounds produces multiple
+ * trapezoids defining these regions.In ATSUI 1.1, the maximum
+ * number of enclosing trapezoids that can be returned is 31; in
+ * ATSUI 1.2, the maximum number is 127. If you pass a range that
+ * covers an entire line, ATSUGetGlyphBounds always returns only 1
+ * trapezoid. If you are uncertain of how much memory to allocate
+ * for this array, see the Discussion. can be NULL
+ *
+ * oActualNumberOfBounds:
+ * On return, the value specifies the actual number of enclosing
+ * trapezoids bounding the specified characters. This may be
+ * greater than the value you provide in the iMaxNumberOfBounds
+ * parameter. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetGlyphBounds( iTextLayout: ATSUTextLayout; iTextBasePointX: ATSUTextMeasurement; iTextBasePointY: ATSUTextMeasurement; iBoundsCharStart: UniCharArrayOffset; iBoundsCharLength: UniCharCount; iTypeOfBounds: UInt16; iMaxNumberOfBounds: ItemCount; oGlyphBounds: ATSTrapezoidPtr; var oActualNumberOfBounds: ItemCount ): OSStatus; external name '_ATSUGetGlyphBounds';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI line breaking }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUBatchBreakLines()
+ *
+ * Summary:
+ * Soft wraps a range of text in a layout to a constant line width.
+ *
+ * Discussion:
+ * Equivalent to repeatedly calling the ATSUBreakLine function with
+ * the parameter iUseAsSoftLineBreak set to true. Use this function
+ * to gain a substantial performance increase over the use of
+ * ATSUBreakLine. It will set soft breaks in a layout for multiple
+ * lines in a single call. It assumes constant line width. Soft line
+ * breaks within a layout are what divide it into lines. You can
+ * manipulate the soft breaks that are currently set within a layout
+ * using the functions ATSUGetSoftLineBreaks, ATSUSetSoftLineBreak,
+ * and ATSUClearSoftLineBreaks.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout containing text to be soft wrapped.
+ *
+ * iRangeStart:
+ * Beginning offset for the rage of text to be soft wrapped.
+ *
+ * iRangeLength:
+ * The length of the range of text to be soft wrapped.
+ *
+ * iLineWidth:
+ * The line width at which to force soft wrapping of text. Note
+ * that this parameter is of type ATSUTextMeasurement, which is
+ * defined as Fixed. See FixMath.h for conversion routines for
+ * fixed point values.
+ *
+ * oBreakCount:
+ * On return, the number of soft breaks that were set in the
+ * layout. Use this to determine how much memory to allocate when
+ * calling ATSUGetSoftLineBreaks. can be 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
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function ATSUBatchBreakLines( iTextLayout: ATSUTextLayout; iRangeStart: UniCharArrayOffset; iRangeLength: UniCharCount; iLineWidth: ATSUTextMeasurement; oBreakCount: ItemCountPtr ): OSStatus; external name '_ATSUBatchBreakLines';
+
+
+{
+ * ATSUBreakLine()
+ *
+ * Summary:
+ * Soft wraps a single line of text within a layout.
+ *
+ * Discussion:
+ * This function will automatically determine the optimal place to
+ * set a soft break in a given range of text. It suggests a soft
+ * line break each time it encounters a hard line break character
+ * such as a carriage return, line feed, form feed, line separator,
+ * or paragraph separator. If ATSUBreakLine does not encounter a
+ * hard line break, it uses the line width you specify to determine
+ * how many characters fit on a line and suggests soft line breaks
+ * accordingly. You can loop over ATSUBreakLine, repeatedly calling
+ * it on the same layout, until all the text in the entire layout
+ * has been soft wrapped. However, for maximum efficiency, you
+ * should use ATSUBatchBreakLines. ATSUBreakLine should only be used
+ * if you have special needs, such as a non-constant line width.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout containing text to be soft wrapped.
+ *
+ * iLineStart:
+ * The beginning of the line you wish to soft wrap. To specify the
+ * beginning of the text buffer, pass the constant
+ * kATSUFromTextBeginning.
+ *
+ * iLineWidth:
+ * The line width at which to force soft wrapping of text. Note
+ * that this parameter is of type ATSUTextMeasurement, which is
+ * defined as Fixed. See FixMath.h for conversion routines for
+ * fixed point values.
+ *
+ * iUseAsSoftLineBreak:
+ * A Boolean value indicating whether ATSUBreakLine should
+ * automatically set the line break produced in the oLineBreak
+ * parameter. If true ,ATSUBreakLine sets the line break and
+ * clears any previously-set soft line breaks that precede the new
+ * break in the line but lie after the offset specified by
+ * iLineStart. You should ususally pass true for this parameter,
+ * unless you plan to use ATSUSetSoftLineBreak to set the soft
+ * break somewhere other than what is suggested by ATSUBreakLine.
+ *
+ * oLineBreak:
+ * On return, the value specifies the soft line break as
+ * determined by ATSUBreakLine. If the value returned is the same
+ * value as specified in iLineStart , you have made an input
+ * parameter error. In this case, check to make sure that the line
+ * width specified in iLineWidth is big enough for ATSUBreakLine
+ * to perform line breaking. ATSUBreakLine does not return an
+ * error in this case.
+ *
+ * Result:
+ * On success, noErr is returned. TSUI usually calculates a soft
+ * line break to be at the beginning of the first word that does ont
+ * fit on the line. But if ATSUBreakLine calculates the most optimal
+ * line break to be in the middle of a word, it returns the result
+ * code kATSULineBreakInWord. Note that ATSUI produces a line break
+ * in the middle of a word only as a last resort. See MacErrors.h
+ * for other possible error codes. can be NULL
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUBreakLine( iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset; iLineWidth: ATSUTextMeasurement; iUseAsSoftLineBreak: Boolean; oLineBreak: UniCharArrayOffsetPtr ): OSStatus; external name '_ATSUBreakLine';
+
+
+{
+ * ATSUSetSoftLineBreak()
+ *
+ * Summary:
+ * Sets a soft line break at the specified point in a text layout.
+ *
+ * Discussion:
+ * You should typically only call ATSUSetSoftLineBreak to set line
+ * breaks when you are using your own line-breaking algorithm to
+ * calculate these breaks. For optimal performance, you should use
+ * ATSUBatchBreakLines to both calculate and set soft line breaks in
+ * your text. After calling ATSUSetSoftLineBreak , you should call
+ * the function ATSUGetUnjustifiedBounds to determine whether the
+ * characters still fit within the line, which is necessary due to
+ * end-of-line effects such as swashes.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout in which to set the soft break.
+ *
+ * iLineBreak:
+ * An offset into the text buffer specifying the location to set
+ * the soft break at.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUSetSoftLineBreak( iTextLayout: ATSUTextLayout; iLineBreak: UniCharArrayOffset ): OSStatus; external name '_ATSUSetSoftLineBreak';
+
+
+{
+ * ATSUGetSoftLineBreaks()
+ *
+ * Summary:
+ * Obtains the soft line breaks that are currently set in a given
+ * text range.
+ *
+ * Discussion:
+ * Typically you use the function ATSUGetSoftLineBreaks by calling
+ * it twice, as follows: (1) Pass valid values for the iTextLayout,
+ * iRangeStart, iRangeLength, and oBreakCount parameters. Pass NULL
+ * for the oBreaks parameter and 0 for the iMaximumBreaks parameter.
+ * ATSUGetSoftLineBreaks returns the size of the font array in the
+ * oBreakCount parameter. (2) Allocate enough space for an array of
+ * the returned size, then call the function again, passing a valid
+ * pointer in the oBreaks parameter. On return, the pointer refers
+ * to an array containing the text range's soft line breaks. If you
+ * have just called ATSUBatchBreakLines, the oBreakCount parameter
+ * will give you the value you would normally obtain from step 1,
+ * allowing you to skip this step in such cases.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * A text layout to obtain a list of soft breaks from.
+ *
+ * iRangeStart:
+ * The beginning of the range of text for which to obtain a list
+ * of softbreaks. To indicate that the specified text range starts
+ * at the beginning of the text buffer, you can pass the constant
+ * kATSUFromTextBeginning, To specify the entire text buffer, pass
+ * kATSUFromTextBeginning in this parameter and kATSUToTextEnd in
+ * the iRangeLength parameter.
+ *
+ * iRangeLength:
+ * The end of the range of text for which to obtain a list of
+ * softbreaks. If you want the range of text to extend to the end
+ * of the text buffer, you can pass the constant kATSUToTextEnd.
+ *
+ * iMaximumBreaks:
+ * The maximum number of soft line breaks to obtain. Typically,
+ * this is equivalent to the number of UniCharArrayOffset values
+ * for which you have allocated memory in the oBreaks array. To
+ * determine this value, see the Discussion.
+ *
+ * oBreaks:
+ * On return, the array contains offsets from the beginning of the
+ * text buffer to each of the soft line breaks in the text range.
+ * If you are uncertain of how much memory to allocate for this
+ * array, see the Discussion. can be NULL
+ *
+ * oBreakCount:
+ * On return, the number of soft breaks set in iTextLayout. Note
+ * that this value may be greater than what you pass in for
+ * iMaximumBreaks. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetSoftLineBreaks( iTextLayout: ATSUTextLayout; iRangeStart: UniCharArrayOffset; iRangeLength: UniCharCount; iMaximumBreaks: ItemCount; oBreaks: UniCharArrayOffsetPtr; oBreakCount: ItemCountPtr ): OSStatus; external name '_ATSUGetSoftLineBreaks';
+
+
+{
+ * ATSUClearSoftLineBreaks()
+ *
+ * Summary:
+ * Unsets any currently set soft breaks in a range of text.
+ *
+ * Discussion:
+ * This function clears all previously set soft line breaks for the
+ * specified text range and clears any associated layout caches as
+ * well.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The text layout object for which to remove line breaks.
+ *
+ * iRangeStart:
+ * The beginning of the text range over which to clear soft line
+ * breaks. To indicate that the specified text range starts at the
+ * beginning of the text buffer, you can pass the constant
+ * kATSUFromTextBeginning . To specify the entire text buffer,
+ * pass kATSUFromTextBeginning in this parameter and
+ * kATSUToTextEnd in the iRangeLength parameter.
+ *
+ * iRangeLength:
+ * The length of the text range over which to clear soft line
+ * breaks. If you want the range of text to extend to the end of
+ * the text buffer, you can pass the constant kATSUToTextEnd.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUClearSoftLineBreaks( iTextLayout: ATSUTextLayout; iRangeStart: UniCharArrayOffset; iRangeLength: UniCharCount ): OSStatus; external name '_ATSUClearSoftLineBreaks';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI highlighting }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUSetHighlightingMethod()
+ *
+ * Summary:
+ * Specifies the methods ATSUI will use for highlighting and
+ * unhighlighting text in a given layout.
+ *
+ * Discussion:
+ * By default, ATSUI highlights text by "inverting" the region
+ * containing the text, that is, its background color. Although
+ * inversion provides satisfactory highlighting in most cases, it
+ * does not always provide the best result for grayscale text. (Mac
+ * OS X sets a lower threshold for antialiasing, while in Mac OS 9
+ * grayscale text can be turned off by the user.) In Mac OS X, when
+ * using a Quartz graphics context, you can instruct ATSUI to use
+ * the redraw method of highlighting, rather than simple inversion.
+ * (Note that Cocoa applications always use the redraw method of
+ * highlighting.) The redraw method allows for accurate highlighting
+ * of more complex backgrounds, such as those containing multiple
+ * colors, patterns, or pictures. To set redrawing on, call the
+ * ATSUSetHighlightingMethod function and specify that the redraw
+ * method be used (by passing kRedrawHighlighting in the iMethod
+ * parameter). If you specify the redraw method of highlighting when
+ * you call ATSUSetHighlightingMethod, then you must also specify
+ * how the background is to be redrawn when the function
+ * ATSUUnhighlightText is called. ATSUI can restore the desired
+ * background in one of two ways, depending on the background's
+ * complexity: (1) When the background is a single color (such as
+ * white), ATSUI can readily unhighlight the background. In such a
+ * case, you specify the background color that ATSUI uses by calling
+ * ATSUSetHighlightingMethod and setting iUnhighlightData.dataType
+ * to kATSUBackgroundColor and providing the background color in
+ * iUnhighlightData.unhighlightData. With these settings defined,
+ * when you call ATSUUnhighlightText, ATSUI simply calculates the
+ * previously highlighted area, repaints it with the specified
+ * background color, and then redraws the text. (2) When the
+ * background is more complex (containing, for example, multiple
+ * colors, patterns, or pictures), you must provide a redraw
+ * background callback function when you call
+ * ATSUSetHighlightingMethod. You do this by setting
+ * iUnhighlightData.dataType to kATSUBackgroundCallback and
+ * providing a RedrawBackgroundUPP in
+ * iUnhighlightData.unhighlightData . Then when you call
+ * ATSUUnhighlightText and ATSUI calls your callback, you are
+ * responsible for redrawing the background of the unhighlighted
+ * area. If you choose to also redraw the text, then your callback
+ * should return false as a function result. If your callback
+ * returns true ATSUI redraws any text that needs to be redrawn. See
+ * RedrawBackgroundProcPtr for additional information.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout to which this highlight method should be applied.
+ *
+ * iMethod:
+ * The type of highlighting to use; inversion
+ * (kInvertHighlighting) or redrawing (kRedrawHighlighting). The
+ * default is inversion. If you are happy with that technique
+ * there is no reason to call this function.
+ *
+ * iUnhighlightData:
+ * Data needed to redraw the background or NULL if inversion is
+ * being chosen. See the definition of ATSUUnhighlightData for
+ * more information about the possible contents of this structure.
+ * Also see the Discussion for this function. can be NULL
+ *
+ * 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
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUSetHighlightingMethod( iTextLayout: ATSUTextLayout; iMethod: ATSUHighlightMethod; iUnhighlightData: ATSUUnhighlightDataPtr ): OSStatus; external name '_ATSUSetHighlightingMethod';
+
+
+{
+ * ATSUHighlightText()
+ *
+ * Summary:
+ * Renders a highlighted range of text at a specified location in a
+ * QuickDraw graphics port or Quartz graphics context.
+ *
+ * Discussion:
+ * When the user selects a series of glyphs, the characters in
+ * memory corresponding to the glyphs make up the selection range
+ * and should be highlighted to indicate where the next editing
+ * operation is to occur. The characters in a selection range are
+ * always contiguous in memory, but their corresponding glyphs are
+ * not necessarily so onscreen. If the selection range crosses a
+ * direction boundary, it is appropriate to display discontinuous
+ * highlighting. The ATSUHighlightText function renders a
+ * highlighted range of text at a specified location in a QuickDraw
+ * graphics port or Quartz graphics context, using the highlight
+ * information in the graphics port or context. ATSUHighlightText
+ * automatically produces discontinuous highlighting, if needed. You
+ * typically call the ATSUHighlightText function every time you need
+ * to draw or redraw highlighted text.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * A layout containing text to be highlighted.
+ *
+ * iTextBasePointX:
+ * The x-coordinate of the origin (in either the current graphics
+ * port or in a Quartz graphics context) of the line containing
+ * the text range. Pass the constant kATSUUseGrafPortPenLoc to
+ * draw relative to the current pen location in the current
+ * graphics port.
+ *
+ * iTextBasePointY:
+ * The y-coordinate of the origin (in either the current graphics
+ * port or in a Quartz graphics context) of the line containing
+ * the text range. Pass the constant kATSUUseGrafPortPenLoc to
+ * draw relative to the current pen location in the current
+ * graphics port.
+ *
+ * iHighlightStart:
+ * The first character of the text range to be highlighted. If the
+ * text range spans multiple lines, you should call
+ * ATSUHighlightText for each line, passing the offset
+ * corresponding to the beginning of the new line to draw with
+ * each call. To indicate that the specified text range starts at
+ * the beginning of the text buffer, you can pass the constant
+ * kATSUFromTextBeginning. To specify the entire text buffer, pass
+ * kATSUFromTextBeginning in this parameter and kATSUToTextEnd in
+ * the iHighlightLength parameter.
+ *
+ * iHighlightLength:
+ * The length of the text range to be highlighted. To indicate
+ * that the text range extends to the end of the text buffer, pass
+ * the constant kATSUToTextEnd.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUHighlightText( iTextLayout: ATSUTextLayout; iTextBasePointX: ATSUTextMeasurement; iTextBasePointY: ATSUTextMeasurement; iHighlightStart: UniCharArrayOffset; iHighlightLength: UniCharCount ): OSStatus; external name '_ATSUHighlightText';
+
+
+{
+ * ATSUUnhighlightText()
+ *
+ * Summary:
+ * Renders a previously highlighted range of text in an
+ * unhighlighted state.
+ *
+ * Discussion:
+ * This function renders a previously highlighted range of text in
+ * an unhighlighted state. You should always call
+ * ATSUUnhighlightText after calling the function ATSUHighlightText
+ * to properly redraw the unhighlighted text and background. If the
+ * inversion method of highlighting was used, when you call
+ * ATSUUnhighlightText, it merely undoes the inversion and renders
+ * the text. If the redraw method of highlighting was used,
+ * ATSUUnhighlightText turns off the highlighting and restores the
+ * desired background. Depending on the complexity of the
+ * background, ATSUI restores the background in one of two ways:
+ * filling in a solid color, or repainting the background using a
+ * callback. See the function ATSUSetHighlightingMethod and the
+ * definition ATSUUnhighlightData for more information.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * A layout containing text to be unhighlighted.
+ *
+ * iTextBasePointX:
+ * The x-coordinate of the origin (in either the current graphics
+ * port or in a Quartz graphics context) of the line containing
+ * the text range. Pass the constant kATSUUseGrafPortPenLoc to
+ * draw relative to the current pen location in the current
+ * graphics port.
+ *
+ * iTextBasePointY:
+ * The y-coordinate of the origin (in either the current graphics
+ * port or in a Quartz graphics context) of the line containing
+ * the text range. Pass the constant kATSUUseGrafPortPenLoc to
+ * draw relative to the current pen location in the current
+ * graphics port.
+ *
+ * iHighlightStart:
+ * The first character of the text range to be unhighlighted. If
+ * the text range spans multiple lines, you should call
+ * ATSUUnhighlightText for each line, passing the offset
+ * corresponding to the beginning of the new line to draw with
+ * each call. To indicate that the specified text range starts at
+ * the beginning of the text buffer, you can pass the constant
+ * kATSUFromTextBeginning. To specify the entire text buffer, pass
+ * kATSUFromTextBeginning in this parameter and kATSUToTextEnd in
+ * the iHighlightLength parameter.
+ *
+ * iHighlightLength:
+ * The length of the text range to be unhighlighted. To indicate
+ * that the text range extends to the end of the text buffer, pass
+ * the constant kATSUToTextEnd.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUUnhighlightText( iTextLayout: ATSUTextLayout; iTextBasePointX: ATSUTextMeasurement; iTextBasePointY: ATSUTextMeasurement; iHighlightStart: UniCharArrayOffset; iHighlightLength: UniCharCount ): OSStatus; external name '_ATSUUnhighlightText';
+
+
+{
+ * ATSUGetTextHighlight()
+ *
+ * Summary:
+ * Obtains the highlight region for a range of text.
+ *
+ * Discussion:
+ * Use this function to obtain the screen region that ATSUI would
+ * normally highlight automatically when ATSUHighlightText is
+ * called. This is useful if you wish to perform your own
+ * highlighting.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * A layout containing text to be highlighted.
+ *
+ * iTextBasePointX:
+ * The x-coordinate of the origin (in either the current graphics
+ * port or in a Quartz graphics context) of the line containing
+ * the text range. Pass the constant kATSUUseGrafPortPenLoc to
+ * draw relative to the current pen location in the current
+ * graphics port.
+ *
+ * iTextBasePointY:
+ * The y-coordinate of the origin (in either the current graphics
+ * port or in a Quartz graphics context) of the line containing
+ * the text range. Pass the constant kATSUUseGrafPortPenLoc to
+ * draw relative to the current pen location in the current
+ * graphics port.
+ *
+ * iHighlightStart:
+ * The first character of the text range to be highlighted. If the
+ * text range spans multiple lines, you should call
+ * ATSUGetTextHighlight for each line, passing the offset
+ * corresponding to the beginning of the new line to draw with
+ * each call. To indicate that the specified text range starts at
+ * the beginning of the text buffer, you can pass the constant
+ * kATSUFromTextBeginning. To specify the entire text buffer, pass
+ * kATSUFromTextBeginning in this parameter and kATSUToTextEnd in
+ * the iHighlightLength parameter.
+ *
+ * iHighlightLength:
+ * The length of the text range to be highlighted. To indicate
+ * that the text range extends to the end of the text buffer, pass
+ * the constant kATSUToTextEnd.
+ *
+ * oHighlightRegion:
+ * On return, ATSUGetTextHighlight produces a MacRegion structure
+ * containing the highlight region for the specified range of
+ * text. In the case of discontinuous highlighting, the region
+ * consists of multiple components, with MacRegion.rgnBBox
+ * specifying the bounding box around the entire area of
+ * discontinuous highlighting.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetTextHighlight( iTextLayout: ATSUTextLayout; iTextBasePointX: ATSUTextMeasurement; iTextBasePointY: ATSUTextMeasurement; iHighlightStart: UniCharArrayOffset; iHighlightLength: UniCharCount; oHighlightRegion: RgnHandle ): OSStatus; external name '_ATSUGetTextHighlight';
+
+
+{
+ * ATSUHighlightInactiveText()
+ *
+ * Summary:
+ * Highlights text using the standard Mac OS X UI convention for an
+ * inactive window or UI pane.
+ *
+ * Discussion:
+ * Use this function to redraw text when a window or UI pane
+ * containing highlighted text becomes inactive. Once the window or
+ * UI pane becomes active again, call ATSUHighlightText to
+ * rehighlight the text in active mode.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * A layout containing text to be highlighted.
+ *
+ * iTextBasePointX:
+ * The x-coordinate of the origin (in either the current graphics
+ * port or in a Quartz graphics context) of the line containing
+ * the text range. Pass the constant kATSUUseGrafPortPenLoc to
+ * draw relative to the current pen location in the current
+ * graphics port.
+ *
+ * iTextBasePointY:
+ * The y-coordinate of the origin (in either the current graphics
+ * port or in a Quartz graphics context) of the line containing
+ * the text range. Pass the constant kATSUUseGrafPortPenLoc to
+ * draw relative to the current pen location in the current
+ * graphics port.
+ *
+ * iHighlightStart:
+ * The first character of the text range to be highlighted. If the
+ * text range spans multiple lines, you should call
+ * ATSUHighlightInactiveText for each line, passing the offset
+ * corresponding to the beginning of the new line to draw with
+ * each call. To indicate that the specified text range starts at
+ * the beginning of the text buffer, you can pass the constant
+ * kATSUFromTextBeginning. To specify the entire text buffer, pass
+ * kATSUFromTextBeginning in this parameter and kATSUToTextEnd in
+ * the iHighlightLength parameter.
+ *
+ * iHighlightLength:
+ * The length of the text range to be highlighted. To indicate
+ * that the text range extends to the end of the text buffer, pass
+ * the constant kATSUToTextEnd.
+ *
+ * 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
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function ATSUHighlightInactiveText( iTextLayout: ATSUTextLayout; iTextBasePointX: ATSUTextMeasurement; iTextBasePointY: ATSUTextMeasurement; iHighlightStart: UniCharArrayOffset; iHighlightLength: UniCharCount ): OSStatus; external name '_ATSUHighlightInactiveText';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI hit-testing }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUPositionToOffset()
+ *
+ * Summary:
+ * Obtains the memory offset for the glyph edge nearest a mouse-down
+ * event.
+ *
+ * Discussion:
+ * The process of hit-testing text obtains the location of a
+ * mouse-down event relative both to the position of onscreen glyphs
+ * and to the corresponding offset between character codes in
+ * memory. You can then use the location information obtained by
+ * hit-testing to set the insertion point (that is, the caret) or
+ * selection range (for highlighting). Hit-testing text is
+ * complicated by the fact that a given line of text may be
+ * bidirectional. Therefore, the onscreen order of glyphs may not
+ * readily correspond to the storage order of the corresponding
+ * character codes. And the concept of which glyph comes "first" in
+ * a line of text cannot always be limited to the visual terms
+ * "left" and "right." Because of these complexities, it is more
+ * accurate to speak in terms of "leading" and "trailing" edges to
+ * glyphs. A "leading edge" is defined as the edge of a glyph that
+ * you first encounter when you read the text that includes that
+ * glyph. For example, when reading Roman text, you first encounter
+ * the left edge of a Roman glyph. Similarly, the "trailing edge" is
+ * defined as the edge of the glyph encountered last. This function
+ * produces the memory offset corresponding to the glyph edge
+ * nearest the event. If the mouse-down event occurs at a line
+ * direction boundary or within a glyph cluster,
+ * ATSUPositionToOffset produces two offsets. You can then provide
+ * the offset(s) to the ATSUOffsetToPosition function to obtain the
+ * actual caret position(s) for the event. When you call the
+ * ATSUPositionToOffset function, ATSUI examines the Unicode
+ * directionality of the character corresponding to the event
+ * location. The ATSUPositionToOffset function produces a value of
+ * true in the oIsLeading parameter if the offset is leading (that
+ * is, more closely associated with the subsequent character in
+ * memory and therefore indicative of a left-to-right line
+ * direction). It produces a value of false if the offset is
+ * trailing (that is, more closely associated with the preceding
+ * character in memory and indicative of a right-to-left line
+ * direction). Finally, note that when the event occurs beyond the
+ * leftmost or rightmost caret positions of the line (not taking
+ * into account line rotation), such that no glyph corresponds to
+ * the location of the hit, the ATSUPositionToOffset function
+ * produces the primary offset of the closest edge of the line to
+ * the input location. The oIsLeading flag depends on the
+ * directionality of the closest glyph and the side of the line to
+ * which the input location is closest. In this case, the secondary
+ * offset is equal to the primary offset, since no glyph was hit.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout object in which the mouse-down event occurred.
+ *
+ * iLocationX:
+ * The x-coordinate of the event, in local coordinates, relative
+ * to the origin of the line where the event occurred. That is, to
+ * specify the x-coordinate value, you should subtract the
+ * x-coordinate of the line origin from the x-coordinate of the
+ * hit point (in local coordinates). You can pass the constant
+ * kATSUUseGrafPortPenLoc for the location of the mouse-down event
+ * relative to the current pen location in the current graphics
+ * port.
+ *
+ * iLocationY:
+ * The y-coordinate of the event, in local coordinates, relative
+ * to the origin of the line where the event occurred. That is, to
+ * specify the y-coordinate value, you should subtract the
+ * y-coordinate of the line origin from the y-coordinate of the
+ * hit point (in local coordinates). You can pass the constant
+ * kATSUUseGrafPortPenLoc for the location of the mouse-down event
+ * relative to the current pen location in the current graphics
+ * port.
+ *
+ * ioPrimaryOffset:
+ * On input, a pointer to a UniCharArrayOffset value specifying
+ * the offset corresponding to the beginning of the line where the
+ * event occurred. On return, the value specifies the offset
+ * corresponding to the glyph edge that is visually closest to the
+ * event. To determine whether this offset indicates the leading
+ * or trailing edge of the glyph, you can examine the value
+ * produced in the oIsLeading parameter.
+ *
+ * oIsLeading:
+ * On return, the value indicates whether the offset produced in
+ * the ioPrimaryOffset parameter is leading or trailing. The
+ * function ATSUPositionToOffset produces a value of true if the
+ * offset is leading (that is, more closely associated with the
+ * subsequent character in memory). It produces a value of false
+ * if the offset is trailing (that is, more closely associated
+ * with the preceding character in memory).
+ *
+ * oSecondaryOffset:
+ * On return, the value typically specifies the same offset as
+ * that produced in the ioPrimaryOffset parameter, unless the
+ * event occurred within a glyph cluster or at a line direction
+ * boundary. If so, the value specifies a secondary offset. The
+ * secondary offset is associated with the glyph that has a
+ * different direction from the primary line direction.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUPositionToOffset( iTextLayout: ATSUTextLayout; iLocationX: ATSUTextMeasurement; iLocationY: ATSUTextMeasurement; var ioPrimaryOffset: UniCharArrayOffset; var oIsLeading: Boolean; var oSecondaryOffset: UniCharArrayOffset ): OSStatus; external name '_ATSUPositionToOffset';
+
+
+{
+ * ATSUOffsetToPosition()
+ *
+ * Summary:
+ * Obtains the caret position(s) corresponding to a memory offset.
+ *
+ * Discussion:
+ * This function produces two structures of type ATSUCaret. These
+ * structures contain the pen positioning information needed to draw
+ * the caret(s) for the event, specified relative to the origin of
+ * the line in the current graphics port or graphics context.
+ * Specifically, the ATSUCaret structures contain x-y coordinates
+ * for both the caret's starting and ending pen positions (the
+ * latter taking into account line rotation, caret slanting, and
+ * split-caret appearances). If the offset you pass to
+ * ATSUOffsetToPosition is at a line boundary, the structure
+ * produced in the oMainCaret parameter contains the starting and
+ * ending pen locations for the high caret, while the oSecondCaret
+ * parameter contains the corresponding values for the low caret. If
+ * the offset is not at a line boundary, both parameters contain the
+ * starting and ending pen locations of the main caret. Because you
+ * provide the ATSUOffsetToPosition function an offset relative to
+ * the origin of the line where the hit occurred,
+ * ATSUOffsetToPosition produces positioning information that is
+ * also relative. Therefore, you must transform the positions
+ * produced by the ATSUOffsetToPosition function before drawing the
+ * caret(s). To transform the caret location(s), add the starting
+ * and ending caret coordinates to the coordinates of the origin of
+ * the line in which the hit occurred. For example, if
+ * ATSUOffsetToPosition produces starting and ending pen locations
+ * of (25,0), (25,25) in the oMainCaret parameter (and the
+ * oSecondCaret parameter contains the same coordinates, meaning
+ * that the caret was not split), you would add these to the
+ * position of the origin of the line in the graphics port or
+ * context. If the position of the line origin was at (50,50), then
+ * the starting and ending pen locations of the caret would be
+ * (75,50), (75,75).
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout containing the offset.
+ *
+ * iOffset:
+ * The offset into the text buffer for which you wish to obtain a
+ * caret position. To respond to a mouse-down event, pass the
+ * offset returned in the ioPrimaryOffset parameter from the
+ * function ATSUPositionToOffset. That is, the offset
+ * corresponding to the glyph edge closest to the event.
+ *
+ * iIsLeading:
+ * A Boolean value indicating whether the offset corresponds to
+ * the leading or trailing edge of the glyph. You can obtain this
+ * information from the function ATSUPositionToOffset. This value
+ * is relevant if the offset occurs at a line direction boundary
+ * or within a glyph cluster.
+ *
+ * oMainCaret:
+ * On return, contains the starting and ending pen locations of
+ * the high caret if the value produced in oCaretIsSplit is true.
+ * If the value is false, the structure contains the starting and
+ * ending pen locations of the main caret.
+ *
+ * oSecondCaret:
+ * On return, contains the starting and ending pen locations of
+ * the low caret if the value passed back in the oCaretIsSplit
+ * parameter is true. If the value is false, the structure
+ * contains the starting and ending pen locations of the main
+ * caret (that is, the same values as the oMainCaret parameter).
+ *
+ * oCaretIsSplit:
+ * On return, indicates whether the offset specified in the
+ * iOffset parameter occurs at a line direction boundary. If true,
+ * the offset occurs at a line direction boundary; otherwise,
+ * false.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUOffsetToPosition( iTextLayout: ATSUTextLayout; iOffset: UniCharArrayOffset; iIsLeading: Boolean; var oMainCaret: ATSUCaret; var oSecondCaret: ATSUCaret; var oCaretIsSplit: Boolean ): OSStatus; external name '_ATSUOffsetToPosition';
+
+
+{
+ * ATSUPositionToCursorOffset()
+ *
+ * Summary:
+ * Obtains the memory offset for the glyph edge nearest a mouse-down
+ * event, after a move of the specified length.
+ *
+ * Discussion:
+ * This function produces the memory offset for the glyph edge
+ * nearest a mouse-down event, after a move of the specified length.
+ * This offset corresponds to where an insertion point would be
+ * placed after the move.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout in which the mouse down event occured.
+ *
+ * iLocationX:
+ * The x-coordinate of the event, in local coordinates, relative
+ * to the origin of the line where the event occurred. That is, to
+ * specify the x-coordinate value, you should subtract the
+ * x-coordinate of the line origin from the x-coordinate of the
+ * hit point (in local coordinates). You can pass the constant
+ * kATSUUseGrafPortPenLoc for the location of the mouse-down event
+ * relative to the current pen location in the current graphics
+ * port.
+ *
+ * iLocationY:
+ * The y-coordinate of the event, in local coordinates, relative
+ * to the origin of the line where the event occurred. That is, to
+ * specify the y-coordinate value, you should subtract the
+ * y-coordinate of the line origin from the y-coordinate of the
+ * hit point (in local coordinates). You can pass the constant
+ * kATSUUseGrafPortPenLoc for the location of the mouse-down event
+ * relative to the current pen location in the current graphics
+ * port.
+ *
+ * iMovementType:
+ * A constant specifying the type of cursor movement to use. See
+ * the definition of ATSUCursorMovementType for possible values to
+ * pass for this parameter.
+ *
+ * ioPrimaryOffset:
+ * On input, the offset corresponding to the beginning of the line
+ * where the event occurred. On return, the offset corresponding
+ * to the glyph edge nearest the event, after a movement of the
+ * specified type. This offset corresponds to where the insertion
+ * point would be placed after the move. To determine whether this
+ * offset indicates the leading or trailing edge of the glyph, you
+ * can examine the value produced in the oIsLeading parameter.
+ *
+ * oIsLeading:
+ * On return, the value indicates whether the offset produced in
+ * the ioPrimaryOffset parameter is leading or trailing. The
+ * ATSUPositionToOffset function produces a value of true if the
+ * offset is leading (that is, more closely associated with the
+ * subsequent character in memory). It produces a value of false
+ * if the offset is trailing (that is, more closely associated
+ * with the preceding character in memory).
+ *
+ * oSecondaryOffset:
+ * On return, the value typically specifies the same offset as
+ * that produced in the ioPrimaryOffset parameter, unless the
+ * event occurred within a glyph cluster or at a line direction
+ * boundary. If so, the value specifies the secondary offset, for
+ * the glyph edge furthest from the event.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 9.2.2 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUPositionToCursorOffset( iTextLayout: ATSUTextLayout; iLocationX: ATSUTextMeasurement; iLocationY: ATSUTextMeasurement; iMovementType: ATSUCursorMovementType; var ioPrimaryOffset: UniCharArrayOffset; var oIsLeading: Boolean; var oSecondaryOffset: UniCharArrayOffset ): OSStatus; external name '_ATSUPositionToCursorOffset';
+
+
+{
+ * ATSUOffsetToCursorPosition()
+ *
+ * Summary:
+ * Obtains the caret position(s) corresponding to a memory offset,
+ * after a move of the specified length.
+ *
+ * Discussion:
+ * Use this function in conjunction with ATSUPositionToCursorOffset
+ * to determine where to draw the caret after a mouse-down event.
+ * The movement type parameter allows you to have the cursor "snap"
+ * to different parts of the text depending on the type of movement
+ * selected (i.e., words or characters). See the definition of
+ * ATSUCursorMovementType for more information on possible values.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The text layout object in which the mouse-down event occurred.
+ *
+ * iOffset:
+ * The offset corresponding to the glyph edge nearest the event,
+ * after a movement of the specified type. You can obtain this
+ * value by examining the offset produced in the ioPrimaryOffset
+ * parameter of the function ATSUPositionToCursorOffset.
+ *
+ * iIsLeading:
+ * A Boolean value indicating whether the specified offset
+ * corresponds to the leading or trailing edge of the glyph. You
+ * can obtain this information from the function
+ * ATSUPositionToCursorOffset . This value is relevant if the
+ * offset occurs at a line direction boundary or within a glyph
+ * cluster.
+ *
+ * iMovementType:
+ * A constant specifying the unit of cursor movement. See the
+ * definition of ATSUCursorMovementType for possible values to
+ * pass for this parameter.
+ *
+ * oMainCaret:
+ * On return, the structure contains the starting and ending pen
+ * locations of the high caret if the value produced in the
+ * oCaretIsSplit parameter is true. If the value is false, the
+ * structure contains the starting and ending pen locations of the
+ * main caret.
+ *
+ * oSecondCaret:
+ * On return, the structure contains the starting and ending pen
+ * locations of the low caret if the value passed back in the
+ * oCaretIsSplit parameter is true. If the value is false, the
+ * structure contains the starting and ending pen locations of the
+ * main caret (that is, the same values as the oMainCaret
+ * parameter).
+ *
+ * oCaretIsSplit:
+ * On return, the value indicates whether the offset specified in
+ * the iOffset parameter occurs at a line direction boundary. If
+ * true, the offset occurs at a line direction boundary;
+ * otherwise, false.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 9.2.2 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUOffsetToCursorPosition( iTextLayout: ATSUTextLayout; iOffset: UniCharArrayOffset; iIsLeading: Boolean; iMovementType: ATSUCursorMovementType; var oMainCaret: ATSUCaret; var oSecondCaret: ATSUCaret; var oCaretIsSplit: Boolean ): OSStatus; external name '_ATSUOffsetToCursorPosition';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI cursor movement }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUNextCursorPosition()
+ *
+ * Summary:
+ * Obtains the memory offset for the insertion point that follows
+ * the current insertion point in storage order, as determined by a
+ * move of the specified length and type.
+ *
+ * Discussion:
+ * Together with ATSUPreviousCursorPosition, this function allows an
+ * application to "walk" the text buffer in storage order, moving
+ * the cursor by a specified amount and movement type at each step.
+ * To move through the text buffer in screen order, use the
+ * functions ATSURightwardCursorPosition and
+ * ATSULeftwardCursorPosition.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout in which to perform the cursor movement.
+ *
+ * iOldOffset:
+ * The previous cursor position.
+ *
+ * iMovementType:
+ * A constant specifying the unit of cursor movement. See the
+ * definition of ATSUCursorMovementType for possible values to
+ * pass for this parameter.
+ *
+ * oNewOffset:
+ * On return, the new cursor position.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUNextCursorPosition( iTextLayout: ATSUTextLayout; iOldOffset: UniCharArrayOffset; iMovementType: ATSUCursorMovementType; var oNewOffset: UniCharArrayOffset ): OSStatus; external name '_ATSUNextCursorPosition';
+
+
+{
+ * ATSUPreviousCursorPosition()
+ *
+ * Summary:
+ * Obtains the memory offset for the insertion point that preceeds
+ * the current insertion point in storage order, as determined by a
+ * move of the specified length and type.
+ *
+ * Discussion:
+ * Together with ATSUNextCursorPosition, this function allows an
+ * application to "walk" the text buffer in storage order, moving
+ * the cursor by a specified amount and movement type at each step.
+ * To move through the text buffer in screen order, use the
+ * functions ATSURightwardCursorPosition and
+ * ATSULeftwardCursorPosition.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout in which to perform the cursor movement.
+ *
+ * iOldOffset:
+ * The previous cursor position.
+ *
+ * iMovementType:
+ * A constant specifying the unit of cursor movement. See the
+ * definition of ATSUCursorMovementType for possible values to
+ * pass for this parameter.
+ *
+ * oNewOffset:
+ * On return, the new cursor position.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUPreviousCursorPosition( iTextLayout: ATSUTextLayout; iOldOffset: UniCharArrayOffset; iMovementType: ATSUCursorMovementType; var oNewOffset: UniCharArrayOffset ): OSStatus; external name '_ATSUPreviousCursorPosition';
+
+
+{
+ * ATSURightwardCursorPosition()
+ *
+ * Summary:
+ * Obtains the memory offset for the insertion point that is to the
+ * right of the current insertion point, as determined by a move of
+ * the specified length and type.
+ *
+ * Discussion:
+ * Together with ATSULeftwardCursorPosition, this function allows an
+ * application to "walk" the text buffer in screen order, moving the
+ * cursor by a specified amount and movement type at each step. To
+ * move through the text buffer in storage order, use the functions
+ * ATSUNextCursorPosition and ATSUPreviousCursorPosition. Note that
+ * if you are drawing the cursor after a cursor move, you should use
+ * ATSUOffsetToPosition to obtain an ATSUCaret that determines the
+ * on screen location of the new cursor position. Always store the
+ * ATSUCaret from the previous cursor position as well, as this can
+ * help determine which caret to use in the case of a split caret.
+ * When performing leftward and rightward cursor movement, always
+ * use the caret closest to the previous caret. This maintains
+ * visual order when moving the cursor on screen.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout in which to perform the cursor movement.
+ *
+ * iOldOffset:
+ * The previous cursor position.
+ *
+ * iMovementType:
+ * A constant specifying the unit of cursor movement. See the
+ * definition of ATSUCursorMovementType for possible values to
+ * pass for this parameter.
+ *
+ * oNewOffset:
+ * On return, the new cursor position.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSURightwardCursorPosition( iTextLayout: ATSUTextLayout; iOldOffset: UniCharArrayOffset; iMovementType: ATSUCursorMovementType; var oNewOffset: UniCharArrayOffset ): OSStatus; external name '_ATSURightwardCursorPosition';
+
+
+{
+ * ATSULeftwardCursorPosition()
+ *
+ * Summary:
+ * Obtains the memory offset for the insertion point that is to the
+ * left of the current insertion point, as determined by a move of
+ * the specified length and type.
+ *
+ * Discussion:
+ * Together with ATSURightwardCursorPosition, this function allows
+ * an application to "walk" the text buffer in screen order, moving
+ * the cursor by a specified amount and movement type at each step.
+ * To move through the text buffer in storage order, use the
+ * functions ATSUNextCursorPosition and ATSUPreviousCursorPosition.
+ * Note that if you are drawing the cursor after a cursor move, you
+ * should use ATSUOffsetToPosition to obtain an ATSUCaret that
+ * determines the on screen location of the new cursor position.
+ * Always store the ATSUCaret from the previous cursor position as
+ * well, as this can help determine which caret to use in the case
+ * of a split caret. When performing leftward and rightward cursor
+ * movement, always use the caret closest to the previous caret.
+ * This maintains visual order when moving the cursor on screen.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout in which to perform the cursor movement.
+ *
+ * iOldOffset:
+ * The previous cursor position.
+ *
+ * iMovementType:
+ * A constant specifying the unit of cursor movement. See the
+ * definition of ATSUCursorMovementType for possible values to
+ * pass for this parameter.
+ *
+ * oNewOffset:
+ * On return, the new cursor position.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSULeftwardCursorPosition( iTextLayout: ATSUTextLayout; iOldOffset: UniCharArrayOffset; iMovementType: ATSUCursorMovementType; var oNewOffset: UniCharArrayOffset ): OSStatus; external name '_ATSULeftwardCursorPosition';
+
+
+{ Functions listed beyond this point are either deprecated or not recommended }
+
+{
+ * ATSUMeasureText()
+ *
+ * Discussion:
+ * This function is no longer recommended. Please use
+ * ATSUGetUnjustifiedBounds instead.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUMeasureText( iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset; iLineLength: UniCharCount; var oTextBefore: ATSUTextMeasurement; var oTextAfter: ATSUTextMeasurement; var oAscent: ATSUTextMeasurement; var oDescent: ATSUTextMeasurement ): OSStatus; external name '_ATSUMeasureText';
+
+{unit ATSUnicodeFlattening}
+{
+ File: QD/ATSUnicodeFlattening.h
+
+ Contains: Public interfaces for Apple Type Services for Unicode Imaging
+
+ Version: Quickdraw-150~1
+
+ Copyright: © 2002-2003 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{ ---------------------------------------------------------------------------- }
+{ Constants }
+{ ---------------------------------------------------------------------------- }
+{
+ ATSUFlattenedDataStreamFormat is used to inform the APIs which flatten and
+ unflatten style runs exactly what type of data that they should be generating
+ or parsing.
+}
+
+type ATSUFlattenedDataStreamFormat = UInt32;
+const
+ kATSUDataStreamUnicodeStyledText = $7573746C (* 'ustl' *);
+
+
+{
+ ATSUFlattenStyleRunOptions is a bitfield list of options that can be passed
+ into the ATSUFlattenStyleRunsToStream API. Currently, there are no options.
+ This is here for future expansion.
+}
+type ATSUFlattenStyleRunOptions = UInt32;
+const
+ kATSUFlattenOptionNoOptionsMask = $00000000;
+
+{
+ ATSUUnFlattenStyleRunOptions is a bitfield list of options that can be passed
+ into the ATSUUnFlattenStyleRunsToStream API. Currently, there are no options.
+ This is here for future expansion.
+}
+type ATSUUnFlattenStyleRunOptions = UInt32;
+const
+ kATSUUnFlattenOptionNoOptionsMask = $00000000;
+
+
+{ ---------------------------------------------------------------------------- }
+{ Data Types }
+{ ---------------------------------------------------------------------------- }
+
+{
+ ATSUStyleRunInfo is a structure that contrains 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
+ runLength: UniCharCount;
+ styleObjectIndex: ItemCount;
+ end;
+ ATSUStyleRunInfoPtr = ^ATSUStyleRunInfo;
+{ ---------------------------------------------------------------------------- }
+{ 'ustl' structure data structures and definitions }
+{ ---------------------------------------------------------------------------- }
+{
+ The 'ustl' data structure follows this format:
+ 1. Main Data Structure Block Header
+ 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.
+ For things that are variable width (such as font names), padding bytes must
+ be added to ensure that this alignment is always kept.
+}
+
+{
+ structure versioning - the version of the 'ustl' that the ATSUI parsing
+ and generating functions will handle is version 2 or greater. Earlier
+ versions were not completly specified and have been obsoleted.
+}
+const
+ kATSFlatDataUstlVersion0 = 0;
+ kATSFlatDataUstlVersion1 = 1;
+ kATSFlatDataUstlVersion2 = 2;
+ kATSFlatDataUstlCurrentVersion = kATSFlatDataUstlVersion2;
+
+{ ------------------ }
+{ Block 1 Structures }
+{ ------------------ }
+
+{
+ This is the main data structure block header. It describes the rest
+ of the data and how it is structured.
+}
+type
+ ATSFlatDataMainHeaderBlock = record
+
+ { the 'ustl' version number. This needs to be the first item in the}
+ { data block do as not to confuse parsers of earlier (and possibly}
+ { later) versions of the spec *|}
+ version: UInt32;
+
+ { the total size of the stream in bytes, including the four bytes in}
+ { the version above}
+ sizeOfDataBlock: ByteCount;
+
+ { offset from the beginning of the stream to the flattened text layout data.}
+ { This can be set to 0 if there are no text layouts stored in the stream.}
+ offsetToTextLayouts: ByteCount;
+
+ { offset from the beginning of the stream to the flattened style run data. }
+ { This can be set to 0 if there is no flattened style run data in the stream}
+ offsetToStyleRuns: ByteCount;
+
+ { offset to the flattened style list data. This can be set to 0 if there}
+ { is no flattened style list data}
+ offsetToStyleList: ByteCount;
+ end;
+ ATSFlatDataMainHeaderBlockPtr = ^ATSFlatDataMainHeaderBlock;
+{ ------------------ }
+{ Block 2 Structures }
+{ ------------------ }
+{
+ The Block 2 Structures are not currently used by any of ATSUI's internal parsing
+ or packing routines. They are, however, part of the 'ustl' standard and are put
+ here for developer conveniance, as well as to properly define the standard.
+}
+
+{
+ This is the header that is attached to each flattened text layout. The
+ number of flattened text layouts in the stucture is specified by the
+ ATSFlatDataTextLayoutHeader structure that is below.
+}
+type
+ ATSFlatDataTextLayoutDataHeader = record
+
+ { the total size of this particular flattened text layout, including any}
+ { padding bytes and such. }
+ sizeOfLayoutData: ByteCount;
+
+ { the number of characters covered by this flattened text layout}
+ textLayoutLength: ByteCount;
+
+ { the byte offset relative to the start of this structure to the flattened}
+ { layout control data. This can be set to zero if there are no layout}
+ { controls.}
+ offsetToLayoutControls: ByteCount;
+
+ { the byte offset, relative to the start of this structure to the}
+ { flattened line info. This can be set to zero if there is no line info }
+ { in this layout.}
+ offsetToLineInfo: ByteCount;
+
+ { if the offsetToLayoutControls is non-zero, then following this block}
+ { there will be a ATSFlattenedLayoutDataFlattenedLayoutControlsHeader}
+ { followed by an array of ATSFlattenedLayoutDataFlattenedLayoutControls}
+ { structures. If the offsetToLineInfo is non-zero, then following the}
+ { flattened layout controls will be a ATSFlatDataLineInfoHeader}
+ { structure.}
+ end;
+ ATSFlatDataTextLayoutDataHeaderPtr = ^ATSFlatDataTextLayoutDataHeader;
+{
+ This is the the main header for block 2. If there is a block 2, then there
+ needs to be one of these. This structure is what the offsetToTextLayouts
+ points to in block 1.
+}
+type
+ ATSFlatDataTextLayoutHeader = record
+
+ { the total number of flattened text layouts stored in this block.}
+ { This must be non-zero, as if there were no flattened text layouts, the}
+ { entire block 2 would not exist}
+ numFlattenedTextLayouts: ItemCount;
+
+ { first of possibly many flattened text layouts. There should be one of}
+ { these for each flattened text layout as determined by the}
+ { numFlattenedTextLayouts above. }
+ flattenedTextLayouts: array[0..0] of ATSFlatDataTextLayoutDataHeader;
+ end;
+ ATSFlatDataTextLayoutHeaderPtr = ^ATSFlatDataTextLayoutHeader;
+{
+ This is the header for the flattened layout controls structure. This is
+ the structure that a non-zero offsetToLayoutControls points to in the
+ ATSFlatDataTextLayoutDataHeader
+}
+type
+ ATSFlatDataLayoutControlsDataHeader = record
+
+ { the number of flattened layout controls. It is suggested that there be}
+ { at least one layout control to output the line direction for the layout}
+ numberOfLayoutControls: ItemCount;
+
+ { first of possibly many flattened layout controls. There should be one }
+ { of these for each layout control as determined by the}
+ { numberOfLayoutControls above. Of course, if there are no layout controls,}
+ { then this structure shouldn't even exist. Each attribute info structure}
+ { in the array could be followed by additional padding bytes in order}
+ { to maintain four-byte alignment. These padding bytes are not to be}
+ { included in the fValueSize member of each structure. }
+ controlArray: array[0..0] of ATSUAttributeInfo;
+ end;
+ ATSFlatDataLayoutControlsDataHeaderPtr = ^ATSFlatDataLayoutControlsDataHeader;
+type
+ ATSFlatDataLineInfoData = record
+
+ { the length of this particular line in UniChars}
+ lineLength: UniCharCount;
+
+ { the number of line controls applied to this line. This can be set}
+ { to zero if there are no special line controls applied to this line.}
+ numberOfLineControls: ItemCount;
+
+ { the numberOfLineControls is non-zero, then following this structure}
+ { must be an array of ATSUAttributeInfo structures. There must be one}
+ { ATSUAttributeInfo structure for each numberOfLineControls above.}
+ end;
+ 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
+ ATSFlatDataTextLayoutDataHeader structure above.
+}
+type
+ ATSFlatDataLineInfoHeader = record
+
+ { the number of flattened line info structures that are stored in this}
+ { block. This value should really be equal to the number of soft line}
+ { breaks in the layout + 1. Of course if numberOfLines is zero, then}
+ { this structure shouldn't even be used.}
+ numberOfLines: ItemCount;
+
+ { the first in a array of ATSFlatDataLineInfoData structures. There}
+ { needs to be a ATSFlatDataLineInfoData for each numberOfLines}
+ { specified above.}
+ lineInfoArray: array[0..0] of ATSFlatDataLineInfoData;
+ end;
+ ATSFlatDataLineInfoHeaderPtr = ^ATSFlatDataLineInfoHeader;
+{ ------------------ }
+{ Block 3 Structures }
+{ ------------------ }
+{
+ The block 3 structures are used by ATSUI style run flattening and parsing
+ functions, ATSUFlattenStyleRunsToStream and ATSUUnflattenStyleRunsFromStream
+ to represent flattened style run information. These structures go hand and
+ hand with the block 4 structures.
+}
+
+{
+ This is the data header that appears before the style run data structures.
+ This structure is what a non-zero offsetToStyleRuns in the
+ ATSFlatDataMainHeaderBlock points to in block 1.
+}
+type
+ ATSFlatDataStyleRunDataHeader = record
+
+ { the number of style run data structures stored in this block}
+ numberOfStyleRuns: ItemCount;
+
+ { the first in an array of ATSUStyleRunInfo structures. There needs to}
+ { be a ATSUStyleRunInfo structure for each numberOfStyleRuns specified}
+ { above. This structure is defined in ATSUnicode.h}
+ styleRunArray: array[0..0] of ATSUStyleRunInfo;
+ end;
+ ATSFlatDataStyleRunDataHeaderPtr = ^ATSFlatDataStyleRunDataHeader;
+{ ------------------ }
+{ Block 4 Structures }
+{ ------------------ }
+{
+ 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.
+}
+
+{
+ this structure forms the beginning of an individually flattened ATSUStyle
+ object.
+}
+type
+ ATSFlatDataStyleListStyleDataHeader = record
+
+ { the size of this flattened style object, including these four bytes and}
+ { any padding bytes at the end of the structure. Basically, this can be}
+ { used to determine where the next structure in the array begins.}
+ sizeOfStyleInfo: ByteCount;
+
+ { the number of attributes set in this flattened style object. This should }
+ { be at least one for the font data, although it can be 0 if this is to be}
+ { unspecfied.}
+ numberOfSetAttributes: ItemCount;
+
+ { the number of font features set in the flattened style object. This can}
+ { be set to 0 if there are no font features set in the style object. }
+ numberOfSetFeatures: ItemCount;
+
+ { the number of font variations set in the flattened style object. This}
+ { can be set to 0 if there are no font variations set in the style object.}
+ numberOfSetVariations: ItemCount;
+
+ { after this structure header, there is the following data in this block:}
+
+ { 1. if the numberOfSetAttributes is non-zero, then there will be an}
+ { array of ATSUAttributeInfo structures immediately following the}
+ { above header data to store the style attributes. This is a variable}
+ { structure array. There must be one ATSUAttributeInfo for}
+ { for each numberOfSetAttributes. If numberOfSetAttributes is zero,}
+ { then skip to the next data section 2.}
+
+ { 2. if the numberOfSetFeatures is non-zero, then there will be an array}
+ { of ATSFlatDataStyleListFeatureData structures immediately after}
+ { the ATSUAttributeInfo array above (if any). There must be one}
+ { ATSFlatDataStyleListFeatureData structure for each }
+ { numberOfSetFeatures set in the header above. If numberOfSetFeatures}
+ { is zero, then skip to the next data section 3.}
+
+ { 3. if the numberOfSetVariations is non-zero, then there will be an}
+ { array of ATSFlatDataStyleListVariationData immediately after the}
+ { ATSFlatDataStyleListFeatureData array above (if any). There must be}
+ { one ATSFlatDataStyleListVariationData structure for each }
+ { numberOfSetVariations set in the header above.}
+ end;
+ ATSFlatDataStyleListStyleDataHeaderPtr = ^ATSFlatDataStyleListStyleDataHeader;
+{
+ this structure is the main header for this block. This structure is what a
+ non-zero offsetToStyleList in the ATSFlatDataMainHeaderBlock points to in
+ block 1.
+}
+type
+ ATSFlatDataStyleListHeader = record
+
+ { the total number of flattened style objects stored in this block}
+ numberOfStyles: ItemCount;
+
+ { the first in an array of flattned style entries. The data stored}
+ { in them is variably sized, so a simply array access won't do for}
+ { iterating through these. However, there must be one of these}
+ { ATSFlatDataStyleListStyleDataHeader structures for each }
+ { numberOfStyles above.}
+ styleDataArray: array[0..0] of ATSFlatDataStyleListStyleDataHeader;
+
+ end;
+ ATSFlatDataStyleListHeaderPtr = ^ATSFlatDataStyleListHeader;
+{
+ this structure stores flattened font feature data. An array of these comes
+ after the array of font data attributes (if any) if the numberOfSetFeatures is
+ non-zero. There must be one of these structures for each numberOfSetFeatures.
+}
+type
+ ATSFlatDataStyleListFeatureData = record
+
+ { the font feature type}
+ theFeatureType: ATSUFontFeatureType;
+
+ { the font feature selector}
+ theFeatureSelector: ATSUFontFeatureSelector;
+ end;
+ ATSFlatDataStyleListFeatureDataPtr = ^ATSFlatDataStyleListFeatureData;
+{
+ 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.
+}
+type
+ ATSFlatDataStyleListVariationData = record
+
+ { the variation axis}
+ theVariationAxis: ATSUFontVariationAxis;
+
+ { the variation value}
+ theVariationValue: ATSUFontVariationValue;
+ end;
+ ATSFlatDataStyleListVariationDataPtr = ^ATSFlatDataStyleListVariationData;
+{ ------------------------ }
+{ 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
+ 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
+ 'ustl' above, this structure must maintain four byte alignment.
+}
+
+
+{ these are the currenly supported font specifiers. }
+type ATSFlatDataFontSpeciferType = UInt32;
+const
+ { this specifier allows the storage of font data based on name data. This}
+ { uses the stuctures below to store the actual data itself.}
+ kATSFlattenedFontSpecifierRawNameData = $6E616D64 (* 'namd' *);
+
+{
+ 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.
+}
+type
+ ATSFlatDataFontNameDataHeader = record
+
+ { the type of data that is flattened in this structure}
+ nameSpecifierType: ATSFlatDataFontSpeciferType;
+
+ { the size of the data that is flattened in this structre, not including }
+ { any padding bytes that may be necessary to achive the four byte }
+ { alignment of the data, unless they are specified as part of structure, }
+ { such as with the ATSFlatDataFontSpecRawNameData structure.}
+ nameSpecifierSize: ByteCount;
+
+ { after this header comes the flattened font name data which matches}
+ { the type specified by the nameSpecifierType above. For instance, if }
+ { the nameSpecType is kATSFlattenedFontNameSpecifierRawNameData, the}
+ { structure that immediately follows this would be a}
+ { ATSFlatDataFontNameRawNameDataHeader structure. }
+
+ end;
+ ATSFlatDataFontNameDataHeaderPtr = ^ATSFlatDataFontNameDataHeader;
+{
+ the next two structures are only used when the nameSpecType is set to
+ kATSFlattenedFontSpecifierRawNameData. They are setup to store multiple
+ font name table entries for the purposes of reconstructing an ATSUFontID
+ for (hopefully) the same font some time in the future.
+}
+{ this is the structure in which raw font name data is actually stored. }
+type
+ ATSFlatDataFontSpecRawNameData = record
+
+ { the type of name being specified}
+ fontNameType: FontNameCode;
+
+ { the platform type of the font name, whether it be Unicode, Mac, etc. }
+ { This should be specified if known. If not known, then specify}
+ { kFontNoPlatform, but then all matching will be done based on the first}
+ { font in the name table matching the other parameters.}
+ fontNamePlatform: FontPlatformCode;
+
+ { the script code of the fontÕs name based on the platform that was passed}
+ { in above. If set to kFontNoScript, then the name will be matched based}
+ { on the first font in the name table matching the other font name}
+ { parameters.}
+ fontNameScript: FontScriptCode;
+
+ { the language of the font name. If set to kFontNoLanguage, then the name }
+ { will be matched based on the first font in the name table matching the}
+ { other font name parameters.}
+ fontNameLanguage: FontLanguageCode;
+
+ { the length of the font name in bytes, not including any padding bytes}
+ { added to maintain the four byte alignment}
+ fontNameLength: ByteCount;
+
+ { after the name length comes the actual font name data itself, plus any}
+ { padding bytes needed to maintain the four byte alignment.}
+
+ end;
+ ATSFlatDataFontSpecRawNameDataPtr = ^ATSFlatDataFontSpecRawNameData;
+{
+ 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
+ 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.
+}
+type
+ ATSFlatDataFontSpecRawNameDataHeader = record
+
+ { the number of flattened font names. There must be at least one flattened }
+ { font name, otherwise the structure is malformed.}
+ numberOfFlattenedNames: ItemCount;
+
+ { the first in an array of possibly many font name specifiers - depending}
+ { on how specific the caller wants this. There must be one }
+ { ATSFlatDataFontNameData structure for each numberOfFlattenedNames}
+ { above.}
+ nameDataArray: array[0..0] of ATSFlatDataFontSpecRawNameData;
+
+ end;
+ ATSFlatDataFontSpecRawNameDataHeaderPtr = ^ATSFlatDataFontSpecRawNameDataHeader;
+{ ---------------------------------------------------------------------------- }
+{ Style Flattening and Parsing Functions }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUFlattenStyleRunsToStream()
+ *
+ * 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
+ * style runs must all reference the same block of Unicode text
+ * (usually passed separately as text in the 'utxt' format). The
+ * style runs must also be in ascending order relative to the text
+ * in the text block. Typically you use the function
+ * ATSUFlattenStyleRunsFromStream by calling it twice, as follows:
+ * (1) Provide appropriate values for the iStreamFormat,
+ * iFlattenOptions, iNumberOfRunInfo, iRunInfoArray,
+ * iNumberOfStyleObjects, and iStyleArray parameters. Set
+ * iStreamBufferSize to 0, oStreamBuffer to NULL, and pass a valid
+ * reference to a ByteCount variable in the oActualStreamBufferSize
+ * parameter. Call the function ATSUFlattenStyleRunsToStream. On
+ * return, oActualStreamBufferSize points to the size needed for the
+ * 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
+ * kATSUFlattenOptionsNoOptionsMask.
+ *
+ * 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
+ * iNumberOfRunInfo entries. An ATSUStyleRunInfo structure
+ * contains an index into an array of unique ATSUStyle objects and
+ * the length of the run to which the style object applies. Each
+ * 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
+ * parameter, no data is flattened. Instead, the size of the
+ * buffer is calculated by ATSUI and returned in oActualStreamSize
+ * 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
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function ATSUFlattenStyleRunsToStream( iStreamFormat: ATSUFlattenedDataStreamFormat; iFlattenOptions: ATSUFlattenStyleRunOptions; iNumberOfRunInfo: ItemCount; iRunInfoArray: ATSUStyleRunInfoPtr; iNumberOfStyleObjects: ItemCount; iStyleArray: ATSUStylePtr; iStreamBufferSize: ByteCount; oStreamBuffer: UnivPtr; oActualStreamBufferSize: ByteCountPtr ): OSStatus; external name '_ATSUFlattenStyleRunsToStream';
+
+
+{
+ * ATSUUnflattenStyleRunsFromStream()
+ *
+ * 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
+ * information structures are returned in two separate arraysÑthe
+ * array oStyleArray and the array oRunInfoArray. These arrays are
+ * not parallel. Each ATSUStyle object in the oStyleArray is a
+ * unique ATSUStyle object. To figure out which ATSUStyle object
+ * belongs to which text run, the caller must parse the array of
+ * ATSUStyleRunInfo structures. These structures contain the style
+ * run lengths and an index into the oStyleArray. Typically you use
+ * the function ATSUUnflattenStyleRunsFromStream by calling it
+ * twice, as follows: (1) Provide appropriate values for the
+ * iStreamFormat, iUnflattenOptions, and iStreamBuffer parameters.
+ * Pass 0for the iNumberOfRunInfo and iNumberOfStyleObjects
+ * parameters, NULL for the oRunInfoArray and oStyleArray,
+ * parameters and valid ItemCount references for the
+ * oActualNumberOfRunInfo and oActualNumberOfStyleObjects
+ * parameters. On return, oActualNumberOfRunInfo and
+ * oActualNumberOfStyleObjects point to the sizes needed to allocate
+ * these arrays. (2) Allocate appropriately-sized arrays of
+ * ATSUStyleRunStructures and ATSUStyle object references. Call the
+ * function ATSUUnflattenStyleRunsFromStream a second time, passing
+ * 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
+ * kATSUUnflattenOptionsNoOptionsMask.
+ *
+ * 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
+ * iRunInfoArray 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
+ * index into the oStyleArray array. If you are uncertain of how
+ * 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
+ * in the array oRunInfoArray are indices into this array. If you
+ * are uncertain of how much memory to allocate for this array,
+ * 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
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function ATSUUnflattenStyleRunsFromStream( iStreamFormat: ATSUFlattenedDataStreamFormat; iUnflattenOptions: ATSUUnFlattenStyleRunOptions; iStreamBufferSize: ByteCount; iStreamBuffer: UnivPtr; iNumberOfRunInfo: ItemCount; iNumberOfStyleObjects: ItemCount; oRunInfoArray: ATSUStyleRunInfoPtr; oStyleArray: ATSUStylePtr; oActualNumberOfRunInfo: ItemCountPtr; oActualNumberOfStyleObjects: ItemCountPtr ): OSStatus; external name '_ATSUUnflattenStyleRunsFromStream';
+
+
+{ Functions listed beyond this point are either deprecated or not recommended }
+
+{
+ * ATSUCopyToHandle()
+ *
+ * Discussion:
+ * This function is no longer recommended. Please use
+ * ATSUFlattenStyleRunsToStream instead.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCopyToHandle( iStyle: ATSUStyle; oStyleHandle: Handle ): OSStatus; external name '_ATSUCopyToHandle';
+
+
+{
+ * ATSUPasteFromHandle()
+ *
+ * Discussion:
+ * This function is no longer recommended. Please use
+ * ATSUUnflattenStyleRunsFromStream instead.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUPasteFromHandle( iStyle: ATSUStyle; iStyleHandle: Handle ): OSStatus; external name '_ATSUPasteFromHandle';
+
+
+{unit ATSUnicodeFonts}
+{
+ File: QD/ATSUnicodeFonts.h
+
+ Contains: ATSUI font handling functions.
+
+ Version: Quickdraw-150~1
+
+ Copyright: © 2003 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{ ---------------------------------------------------------------------------- }
+{ Font features }
+{ ---------------------------------------------------------------------------- }
+
+{
+ * ATSUSetFontFeatures()
+ *
+ * Summary:
+ * Sets font features in a style object.
+ *
+ * Discussion:
+ * This function enables you to set multiple font features for a
+ * style object. Any unset font features retain their font-defined
+ * default values. To set style attributes and font variations for a
+ * style object, call the functions ATSUSetAttributes and
+ * ATSUSetVariations, respectively. The constants that represent
+ * font feature types are defined in the header file
+ * SFNTLayoutTypes.h. When you use ATSUI to access and set font
+ * features, you must use the constants defined in this header file,
+ * which are described in "Inside Mac OS X: Rendering Unicode Text
+ * With ATSUI". As feature types can be added at any time, you
+ * should check Apple's font feature registry website for the most
+ * up-to-date list of font feature types and selectors:
+ * http://developer.apple.com/fonts/Registry/index.html.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * The style object for which to set font features.
+ *
+ * iFeatureCount:
+ * The number of font features to set. This value should
+ * correspond to the number of elements in the iType and iSelector
+ * arrays.
+ *
+ * iType:
+ * An array of feature types. Each element in the array must
+ * contain a valid feature type that corresponds to a feature
+ * selector in the iSelector array. To obtain the valid feature
+ * types for a font, call the function ATSUGetFontFeatureTypes .
+ *
+ * iSelector:
+ * An array of feature selectors. Each element in the array must
+ * contain a valid feature selector that corresponds to a feature
+ * type in the iType array. To obtain the valid feature selectors
+ * for a font, call the function ATSUGetFontFeatureSelectors .
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUSetFontFeatures( iStyle: ATSUStyle; iFeatureCount: ItemCount; iType: ATSUFontFeatureTypePtr; iSelector: ATSUFontFeatureSelectorPtr ): OSStatus; external name '_ATSUSetFontFeatures';
+
+
+{
+ * ATSUGetFontFeature()
+ *
+ * Summary:
+ * Obtains the font feature corresponding to an index into an array
+ * of font features for a style object.
+ *
+ * Discussion:
+ * You might typically call ATSUGetFontFeature if you need to obtain
+ * one previously set feature after another within your program's
+ * processing loop. To obtain all previously set font features for a
+ * given style object, you can call the function
+ * ATSUGetAllFontFeatures. Before calling ATSUGetFontFeature, you
+ * should call the function ATSUGetAllFontFeatures to obtain a count
+ * of the font features that are set in the style object. You can
+ * then pass the index for the feature whose setting you want to
+ * obtain in the iTag and iMaximumValueSize parameters of
+ * ATSUGetFontFeature.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * The style you wish to obtain font feature information for.
+ *
+ * iFeatureIndex:
+ * An index into the array of font features for the style object.
+ * This index identifies the font feature to examine. Because this
+ * index is zero-based, you must pass a value between 0 and one
+ * less than the value produced in the oActualFeatureCount
+ * parameter of the function ATSUGetAllFontFeatures.
+ *
+ * oFeatureType:
+ * On return, the value identifies the font feature type
+ * corresponding to the index passed in the iFeatureIndex
+ * parameter. You must allocate space for ATSUGetFontFeature to
+ * store this value.
+ *
+ * oFeatureSelector:
+ * On return, the value identifies the font feature selector that
+ * corresponds to the feature type produced in the oFeatureType
+ * parameter. ou must allocate space for ATSUGetFontFeature to
+ * store this value.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetFontFeature( iStyle: ATSUStyle; iFeatureIndex: ItemCount; oFeatureType: ATSUFontFeatureTypePtr; oFeatureSelector: ATSUFontFeatureSelectorPtr ): OSStatus; external name '_ATSUGetFontFeature';
+
+
+{
+ * ATSUGetAllFontFeatures()
+ *
+ * Summary:
+ * Obtains the font features of a style object that are not at
+ * default settings.
+ *
+ * Discussion:
+ * The ATSUGetAllFontFeatures function obtains all of a style
+ * object's font features that are not at default settings. Font
+ * features are grouped into categories called feature types, within
+ * which individual feature selectors define particular feature
+ * settings. The arrays produced by ATSUGetAllFontFeatures contain
+ * constants identifying the object's font types and their
+ * corresponding font selectors. Typically you use the function
+ * ATSUGetAllFontFeatures by calling it twice, as follows: (1) Pass
+ * a reference to the style object to examine in the iStyle
+ * parameter, a valid pointer to an ItemCount value in the
+ * oActualFeatureCount parameter, NULL for the oFeatureType and
+ * oFeatureSelector parameters, and 0 for the iMaximumFeatureCount
+ * parameter. ATSUGetAllFontFeatures returns the size in the
+ * oActualFeatureCount parameter to use for the feature type and
+ * selector arrays. (2) Allocate enough space for arrays of the
+ * returned size, then call ATSUGetAllFontFeatures again, passing a
+ * pointer to the arrays in the oFeatureType and oFeatureSelector
+ * parameters. On return, the arrays contain the font feature types
+ * and selectors, respectively, for the style object.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * The style for which you wish to obtain font feature information.
+ *
+ * iMaximumFeatureCount:
+ * The maximum number of feature types and selectors to obtain for
+ * the style object. Typically, this is equivalent to the number
+ * of ATSUFontFeatureType and ATSUFontFeatureSelector values for
+ * which you have allocated memory in the oFeatureType and
+ * oFeatureSelector parameters, respectively. To determine this
+ * value, see the Discussion.
+ *
+ * oFeatureType:
+ * On return, the array contains constants identifying each type
+ * of font feature that is at a nondefault setting in the style
+ * object. If you are uncertain of how much memory to allocate for
+ * this array, see the Discussion. can be NULL
+ *
+ * oFeatureSelector:
+ * On return, the array contains constants identifying the feature
+ * selectors that are at nondefault settings in the style object.
+ * Each selector determines the setting for a corresponding
+ * feature type produced in the oFeatureType parameter. If you are
+ * uncertain of how much memory to allocate for this array, see
+ * the Discussion. can be NULL
+ *
+ * oActualFeatureCount:
+ * On return, the value specifies the actual number of font
+ * feature types and selectors in the style object. This may be
+ * greater than the value you specified in the
+ * iMaximumFeatureCount parameter. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetAllFontFeatures( iStyle: ATSUStyle; iMaximumFeatureCount: ItemCount; oFeatureType: ATSUFontFeatureTypePtr; oFeatureSelector: ATSUFontFeatureSelectorPtr; oActualFeatureCount: ItemCountPtr ): OSStatus; external name '_ATSUGetAllFontFeatures';
+
+
+{
+ * ATSUClearFontFeatures()
+ *
+ * Summary:
+ * Restores default settings to the specified font features of a
+ * style object.
+ *
+ * Discussion:
+ * This function removes those font features that are identified by
+ * the feature selector and type constants in the iSelector and
+ * iType arrays and replaces them with their font-defined default
+ * values. Note that if you pass ATSUClearFontFeatures a font
+ * feature and selector that are already at default settings, the
+ * function does not return an error. To restore default font
+ * variations to a style object, call the function
+ * ATSUClearFontVariations. To restore default style attributes to a
+ * style object, call ATSUClearAttributes. To restore all default
+ * settings to a style object (for font features, variations, and
+ * style attributes), call the function ATSUClearStyle.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * A style whose font features you wish to clear.
+ *
+ * iFeatureCount:
+ * The number of font features to restore to default settings.
+ * This value should correspond to the number of elements in the
+ * iType and iSelector arrays. To restore default settings to all
+ * the font features in the specified style object, pass the
+ * constant kATSUClearAll in this parameter. In this case, the
+ * values in the iType and iSelector parameters are ignored.
+ *
+ * iType:
+ * An array of feature types. Each value should identify a font
+ * feature to restore to its default setting. To obtain all
+ * previously set font features for a given style object, you can
+ * call the function ATSUGetAllFontFeatures. You may pass NULL for
+ * this parameter if you are passing kATSUClearAll for the
+ * iFeatureCount parameter. can be NULL
+ *
+ * iSelector:
+ * An array of feature selectors. Each element in the array must
+ * contain a valid feature selector corresponding to a font
+ * feature you provide in the iType parameter. To obtain all
+ * previously set feature selectors for a given style object, you
+ * can call the function ATSUGetAllFontFeatures. You may pass NULL
+ * for this parameter if you are passing kATSUClearAll for the
+ * iFeatureCount parameter. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUClearFontFeatures( iStyle: ATSUStyle; iFeatureCount: ItemCount; iType: ATSUFontFeatureTypePtr; iSelector: ATSUFontFeatureSelectorPtr ): OSStatus; external name '_ATSUClearFontFeatures';
+
+
+{ ---------------------------------------------------------------------------- }
+{ Font variations }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUSetVariations()
+ *
+ * Summary:
+ * Sets font variation axes and values in a style object.
+ *
+ * Discussion:
+ * If you supply font variation axes and values to the
+ * ATSUSetVariations function, you can change the appearance of a
+ * style object's font accordingly. You may specify any number of
+ * variation axes and values in a style object. Any of the font's
+ * variations that you do not set retain their font-defined default
+ * values. You can also use the ATSUSetVariations function to supply
+ * your own value within any variation axes defined for the font.
+ * However, if the font does not support the variation axis you
+ * specify, your custom variation has no visual effect. By calling
+ * the function ATSUGetIndFontVariation, you can obtain a variation
+ * axis and its maximum, minimum, and default values for a font.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * The style object for which to set font variation values.
+ *
+ * iVariationCount:
+ * The number of font variation values to set. This value should
+ * correspond to the number of elements in the iAxes and iValue
+ * arrays.
+ *
+ * iAxes:
+ * An array of font variation axes. Each element in the array must
+ * represent a valid variation axis tag that corresponds to a
+ * variation value in the iValue array. To obtain a valid
+ * variation axis tag for a font, you can call the functions
+ * ATSUGetIndFontVariation or ATSUGetFontInstance.
+ *
+ * iValue:
+ * An array of font variation values. Each element in the array
+ * must contain a value that is valid for the corresponding
+ * variation axis in the iAxes parameter. You can obtain a font's
+ * maximum, minimum, and default values for a given variation axis
+ * by calling the function ATSUGetIndFontVariation . You can
+ * obtain the font variation axis values for a font instance by
+ * calling ATSUGetFontInstance.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUSetVariations( iStyle: ATSUStyle; iVariationCount: ItemCount; iAxes: ATSUFontVariationAxisPtr; iValue: ATSUFontVariationValuePtr ): OSStatus; external name '_ATSUSetVariations';
+
+
+{
+ * ATSUGetFontVariationValue()
+ *
+ * Summary:
+ * Obtains the current value for a single font variation axis in a
+ * style object.
+ *
+ * Discussion:
+ * This function obtains the setting for a specified font variation
+ * axis in a style object. You might typically call
+ * ATSUGetFontVariationValue if you need to obtain one previously
+ * set variation axis value after another within your program's
+ * processing loop. To obtain all nondefault font variation axis
+ * values for a given style object, you can call the function
+ * ATSUGetAllFontVariations. Before calling
+ * ATSUGetFontVariationValue, call the function
+ * ATSUGetAllFontVariations to obtain the font variation axes that
+ * are set for the style object.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * The style for which you want to obtain a variation value.
+ *
+ * iFontVariationAxis:
+ * A tag specifying the style object's variation axis to examine.
+ * You can obtain a list of variation axis tags that are set to
+ * non-default values in a particular style object from the
+ * function ATSUGetAllFontVariations.
+ *
+ * oFontVariationValue:
+ * On return, ATSUGetFontVariationValue produces the currently set
+ * value for the style object's specified variation axis. If this
+ * value has not been set, ATSUGetFontVariationValue produces the
+ * font-defined default value.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetFontVariationValue( iStyle: ATSUStyle; iFontVariationAxis: ATSUFontVariationAxis; oFontVariationValue: ATSUFontVariationValuePtr ): OSStatus; external name '_ATSUGetFontVariationValue';
+
+
+{
+ * ATSUGetAllFontVariations()
+ *
+ * Summary:
+ * Obtains a style object's font variation values that are not at
+ * default settings.
+ *
+ * Discussion:
+ * This function obtains all of a style object's font variation axes
+ * that are not at default settings, as well as the current values
+ * for the axes. Typically you use the function
+ * ATSUGetAllFontVariations by calling it twice, as follows: (1)
+ * Pass a reference to the style object to examine in the iStyle
+ * parameter, a pointer to an ItemCount value in the
+ * oActualVariationCount parameter, NULL for the oVariationAxes and
+ * oFontVariationValues parameters, and 0 for the iVariationCount
+ * parameter. ATSUGetAllFontVariations returns the size to use for
+ * the variation axes and value arrays in the oActualVariationCount
+ * parameter. (2) Allocate enough space for arrays of the returned
+ * size, then call ATSUGetAllFontVariations again, passing a pointer
+ * to the arrays in the oVariationAxes and oFontVariationValues
+ * parameters. On return, the arrays contain the font variation axes
+ * and their corresponding values, respectively, for the style
+ * object.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * A style for which you wish to obtain information about current
+ * variation settings.
+ *
+ * iVariationCount:
+ * The maximum number of font variation values to obtain for the
+ * style object. Typically, this is equivalent to the number of
+ * ATSUFontVariationAxis and ATSUFontVariationValue values for
+ * which you have allocated memory in the oVariationAxes and
+ * oFontVariationValues parameters, respectively. To determine
+ * this value, see the Discussion.
+ *
+ * oVariationAxes:
+ * On return, the array contains the current font variation values
+ * for the font variation axes produced in the oVariationAxes
+ * array. If you are uncertain of how much memory to allocate for
+ * this array, see the Discussion. can be NULL
+ *
+ * oFontVariationValues:
+ * On return, the value specifies the actual number of nondefault
+ * font variation values in the style object. This may be greater
+ * than the value you passed in the iVariationCount parameter. If
+ * you are uncertain of how much memory to allocate for this
+ * array, see the Discussion. can be NULL
+ *
+ * oActualVariationCount:
+ * On return, the value specifies the actual number of nondefault
+ * font variation values in the style object. This may be greater
+ * than the value you passed in the iVariationCount parameter.
+ * can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetAllFontVariations( iStyle: ATSUStyle; iVariationCount: ItemCount; oVariationAxes: ATSUFontVariationAxisPtr; oFontVariationValues: ATSUFontVariationValuePtr; oActualVariationCount: ItemCountPtr ): OSStatus; external name '_ATSUGetAllFontVariations';
+
+
+{
+ * ATSUClearFontVariations()
+ *
+ * Summary:
+ * Restores default values to the specified font variation axes of a
+ * style object.
+ *
+ * Discussion:
+ * The ATSUClearFontVariations function removes those font variation
+ * axis values identified by variation axis tags in the iAxis array
+ * and replaces them with their font-defined default values. You can
+ * remove unset font variation values from a style object without a
+ * function error. To restore default font features to a style
+ * object, call the function ATSUClearFontFeatures. To restore
+ * default style attributes, call ATSUClearAttributes. To restore
+ * all default settings to a style object (for font features,
+ * variations, and style attributes), call the function
+ * ATSUClearStyle.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * The style in which you wish to clear font variation settings.
+ *
+ * iAxisCount:
+ * The number of font variation axes to restore to default
+ * settings. This value should correspond to the number of
+ * elements in the iAxis array. To restore default values to all
+ * the font variation axes in the style object, pass the constant
+ * kATSUClearAll in this parameter. If you pass kATSUClearAll the
+ * value in the iAxis parameter is ignored.
+ *
+ * iAxis:
+ * An array of font variation axes. Each element in the array must
+ * contain a valid tag that corresponds to a font variation axis
+ * to restore to its default setting. You can obtain variation
+ * axis tags for a style object from the function
+ * ATSUGetAllFontVariations. You may pass NULL for this parameter
+ * if you are passing kATSUClearAll for the iAxisCount parameter. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUClearFontVariations( iStyle: ATSUStyle; iAxisCount: ItemCount; iAxis: ATSUFontVariationAxisPtr ): OSStatus; external name '_ATSUClearFontVariations';
+
+
+{ ---------------------------------------------------------------------------- }
+{ Font ID's }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUFontCount()
+ *
+ * Summary:
+ * Obtains the number of ATSUI-compatible fonts installed on a
+ * user's system.
+ *
+ * Discussion:
+ * The ATSUFontCount function obtains the number of fonts on a
+ * user's system that are compatible with ATSUI. Incompatible fonts
+ * include those that cannot be used to represent Unicode, the
+ * missing-character glyph font, and fonts whose names begin with a
+ * period or a percent sign. You can use the count produced in the
+ * oFontCount parameter to determine the amount of memory to
+ * allocate for the oFontIDs array in the function ATSUGetFontIDs.
+ * It is important to note that the set of installed
+ * ATSUI-compatible fonts may change while your application is
+ * running. In Mac OS X, the set of installed fonts may change at
+ * any time. Although in Mac OS 9, fonts cannot be removed from the
+ * Fonts folder while an application other than the Finder is
+ * running, they can be removed from other locations, and it is
+ * possible for fonts to be added. Additionally, just because the
+ * number of fonts stays the same between two successive calls to
+ * ATSUFontCount , this does not mean that the font lists are the
+ * same. It is possible for a font to be added and another removed
+ * between two successive calls to ATSUFontCount , leaving the total
+ * number unchanged.
+ *
+ * Parameters:
+ *
+ * oFontCount:
+ * On return, the number of ATSUI-compatible fonts installed on a
+ * user's system.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUFontCount( var oFontCount: ItemCount ): OSStatus; external name '_ATSUFontCount';
+
+
+{
+ * ATSUGetFontIDs()
+ *
+ * Summary:
+ * Obtains a list of all the ATSUI-compatible fonts installed on the
+ * user's system.
+ *
+ * Discussion:
+ * Use the function ATSUFontCount to determine how much memory to
+ * allocate before calling this function. Also see the discussion
+ * for the ATSUFontCount function.
+ *
+ * Parameters:
+ *
+ * oFontIDs:
+ * On return, the array contains unique identifiers for each of
+ * the ATSUI-compatible fonts installed on the user's system. You
+ * should allocate enough memory to contain an array the size of
+ * the count produced by the function ATSUFontCount.
+ *
+ * iArraySize:
+ * The maximum number of fonts to obtain. Typically, this is
+ * equivalent to the number of ATSUFontID values for which you
+ * have allocated memory in the oFontIDs parameter.
+ *
+ * oFontCount:
+ * On return, the value specifies the actual number of
+ * ATSUI-compatible fonts installed on the user's system. This may
+ * be greater than the value you specified in the iArraySize
+ * parameter. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetFontIDs( oFontIDs: ATSUFontIDPtr; iArraySize: ItemCount; oFontCount: ItemCountPtr ): OSStatus; external name '_ATSUGetFontIDs';
+
+
+{
+ * ATSUFONDtoFontID()
+ *
+ * Summary:
+ * Finds the ATSUI font ID that corresponds to a font family number,
+ * if one exists.
+ *
+ * Discussion:
+ * This function is not recommended. Instead, use the function
+ * FMGetFontFromFontFamilyInstance (see Fonts.h). FMFont values are
+ * equivalent to ATSUFontID values.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUFONDtoFontID( iFONDNumber: SInt16; iFONDStyle: Style; var oFontID: ATSUFontID ): OSStatus; external name '_ATSUFONDtoFontID';
+
+
+{
+ * ATSUFontIDtoFOND()
+ *
+ * Summary:
+ * Finds the font family number and style that correspond to an
+ * ATSUI font ID, if these exist.
+ *
+ * Discussion:
+ * This function is not recommended. Instead, use the function
+ * FMGetFontFamilyInstanceFromFont (see Fonts.h). FMFont values are
+ * equivalent to ATSUFontID values.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUFontIDtoFOND( iFontID: ATSUFontID; var oFONDNumber: SInt16; var oFONDStyle: Style ): OSStatus; external name '_ATSUFontIDtoFOND';
+
+
+{ ---------------------------------------------------------------------------- }
+{ Font names }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUCountFontNames()
+ *
+ * Summary:
+ * Obtains the number of font names that correspond to a given ATSUI
+ * font ID.
+ *
+ * Discussion:
+ * This function obtains the number of font names defined in a font
+ * name table for a given ATSUI font ID. This number includes
+ * repetitions of the same name in different platforms, languages,
+ * and scripts; names of font features, variations, tracking
+ * settings, and instances for the font; and font names identified
+ * by name code constants. You can pass an index value based on this
+ * count to the function ATSUGetIndFontName to obtain a name string,
+ * name code, platform, script, and language for a given ATSUI font
+ * ID.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * The font for which you wish to obtain the font name count.
+ *
+ * oFontNameCount:
+ * On return, the value specifies the number of entries in the
+ * font name table corresponding to the given ATSUI font ID.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCountFontNames( iFontID: ATSUFontID; var oFontNameCount: ItemCount ): OSStatus; external name '_ATSUCountFontNames';
+
+
+{
+ * ATSUGetIndFontName()
+ *
+ * Summary:
+ * Obtains a name string, name code, platform, script, and language
+ * for the font that matches an ATSUI font ID and name table index
+ * value.
+ *
+ * Discussion:
+ * Typically you use the ATSUGetIndFontName function by calling it
+ * twice, as follows: (1) Pass valid values for the iFontID,
+ * iFontNameIndex, and oActualNameLength parameters, 0 for the
+ * iMaximumNameLength parameter, and NULL for the other parameters.
+ * ATSUGetIndFontName returns the length of the font name string in
+ * the oActualNameLength parameter. (2) Allocate enough space for a
+ * buffer of the returned size, then call the function again,
+ * passing a valid pointer to the buffer in the oName parameter. On
+ * return, the buffer contains the font name string. To find a name
+ * string and index value for the first font in a name table that
+ * matches an ATSUI font ID and the specified font parameters, call
+ * the function ATSUFindFontName. To obtain an ATSUI font ID for the
+ * first font in a name table that matches the specified name
+ * string, name code, platform, script, and/or language, call the
+ * function ATSUFindFontFromName.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * The font for which to obtain information. Note that because
+ * Apple Type Services assigns ATSUFontID values systemwide at
+ * runtime, font IDs can change across system restarts.
+ *
+ * iFontNameIndex:
+ * An index to the font for which to obtain information. Because
+ * this index must be 0-based, you should pass a value between 0
+ * and one less than the count produced by the function
+ * ATSUCountFontNames.
+ *
+ * iMaximumNameLength:
+ * The maximum length of the font name string to obtain.
+ * Typically, this is equivalent to the size of the buffer that
+ * you have allocated in the oName parameter. To determine this
+ * length, see the Discussion.
+ *
+ * oName:
+ * On return, the buffer contains the name string of the font
+ * matching the ATSUI font ID and name table index value being
+ * passed. If the buffer you allocate is not large enough to
+ * contain the name string, ATSUGetIndFontName produces a partial
+ * string. If you are unsure how much memory to allocate for this
+ * parameter, see the Discussion.
+ *
+ * oActualNameLength:
+ * On return, the value specifies the actual length of the
+ * complete name string. This may be greater than the value passed
+ * in the iMaximumNameLength parameter. You should check this
+ * value to ensure that you have allocated sufficient memory and
+ * therefore obtained the complete name string for the font. can be NULL
+ *
+ * oFontNameCode:
+ * On return, a value specifying the type of name returned (i.e.,
+ * full name, postscript name) of the font. See SFNTTypes.h for a
+ * list of possible values. can be NULL
+ *
+ * oFontNamePlatform:
+ * On return, a value specifying the encoding of the font. See
+ * SFNTTypes.h for a list of possible values. can be NULL
+ *
+ * oFontNameScript:
+ * On return, a value specifying the script of the font. See
+ * SFNTTypes.h for a list of possible values. can be NULL
+ *
+ * oFontNameLanguage:
+ * On return, a value specifying the language of the font. See
+ * SFNTTypes.h for a list of possible values. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetIndFontName( iFontID: ATSUFontID; iFontNameIndex: ItemCount; iMaximumNameLength: ByteCount; oName: Ptr; oActualNameLength: ByteCountPtr; oFontNameCode: FontNameCodePtr; oFontNamePlatform: FontPlatformCodePtr; oFontNameScript: FontScriptCodePtr; oFontNameLanguage: FontLanguageCodePtr ): OSStatus; external name '_ATSUGetIndFontName';
+
+
+{
+ * ATSUFindFontName()
+ *
+ * Summary:
+ * Obtains a name string and index value for the first font in a
+ * name table that matches the specified ATSUI font ID, name code,
+ * platform, script, and/or language.
+ *
+ * Discussion:
+ * Typically you use the ATSUFindFontName function by calling it
+ * twice, as follows: (1) Pass NULL for the oName and oFontNameIndex
+ * parameters, 0 for the iMaximumNameLength parameter, and valid
+ * values for the other parameters. ATSUFindFontName returns the
+ * length of the font name string in the oActualNameLength
+ * parameter. (2) Allocate enough space for a buffer of the returned
+ * size, then call the function again, passing a valid pointer to
+ * the buffer in the oName parameter. On return, the buffer contains
+ * the font name string. To obtain an ATSUI font ID for the first
+ * font in a name table that matches the specified name string, name
+ * code, platform, script, and/or language, call the function
+ * ATSUFindFontFromName. To obtain the font name string, name code,
+ * platform, script, and language for the font that matches an ATSUI
+ * font ID and name table index, call the function
+ * ATSUGetIndFontName. Although they will each accept NULL on input
+ * individually, you must pass a vaild pointer to at least one of
+ * the three parameters oName, oActualNameLength, or oFontNameIndex,
+ * or ATSUFindFontName will return paramErr.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * The font for which to obtain a name string. Note that because
+ * Apple Type Services assigns ATSUFontID values systemwide at
+ * runtime, font IDs can change across system restarts.
+ *
+ * iFontNameCode:
+ * A constant specifying the FontNameCode value of the font for
+ * which to obtain a name string. See the SFNTTypes.h header file
+ * for a definition of the FontNameCode type and a list of
+ * possible values.
+ *
+ * iFontNamePlatform:
+ * A constant specifying the encoding of the font. See SFNTTypes.h
+ * for possible values to pass for this parameter. If you pass the
+ * kFontNoPlatformCode constant, ATSUFindFontName produces the
+ * first font in the name table matching the other specified
+ * parameters.
+ *
+ * iFontNameScript:
+ * A constant specifying the script of the font. See SFNTTypes.h
+ * for possible values to pass for this parameter. If you pass the
+ * kFontNoScriptCode constant, ATSUFindFontName produces the first
+ * font in the name table matching the other specified parameters.
+ *
+ * iFontNameLanguage:
+ * A constant specifying the language of the font you are
+ * searching for. See SFNTLayoutTypes.h for possible values to
+ * pass for this parameter.
+ *
+ * iMaximumNameLength:
+ * The maximum size of string you want ATSUFindFontName to return.
+ * Typically, this value is equal to the size of the buffer you
+ * have allocated for the oName parameter. To determine this
+ * length, see the Discussion.
+ *
+ * oName:
+ * On return, the name string of the first font in the font name
+ * table matching your specified parameters. If the buffer you
+ * allocate is not large enough, ATSUFindFontName produces a
+ * partial string. If you are unsure how much space to allocate
+ * for this parameter, see the Discussion. can be NULL
+ *
+ * oActualNameLength:
+ * On return, specifies the actual length of the complete name
+ * string. This may be greater than the value passed in the
+ * iMaximumNameLength parameter. You should check this value to
+ * ensure that you have allocated sufficient memory and therefore
+ * obtained the complete name string for the font. can be NULL
+ *
+ * oFontNameIndex:
+ * On return, the value provides a 0-based index to the font name
+ * in the font name table. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUFindFontName( iFontID: ATSUFontID; iFontNameCode: FontNameCode; iFontNamePlatform: FontPlatformCode; iFontNameScript: FontScriptCode; iFontNameLanguage: FontLanguageCode; iMaximumNameLength: ByteCount; oName: Ptr; oActualNameLength: ByteCountPtr; oFontNameIndex: ItemCountPtr ): OSStatus; external name '_ATSUFindFontName';
+
+
+{
+ * ATSUFindFontFromName()
+ *
+ * Summary:
+ * Obtains an ATSUI font ID for the first font in a name table that
+ * matches the specified name string, name code, platform, script,
+ * and/or language.
+ *
+ * Discussion:
+ * Because ATSUI cannot guarantee the uniqueness of names among
+ * installed fonts, ATSUFindFontFromName does not necessarily find
+ * the only font that matches these parameters. As a result, you may
+ * want to create a more sophisticated name-matching algorithm or
+ * guarantee the uniqueness of names among installed fonts.
+ *
+ * Parameters:
+ *
+ * iName:
+ * A pointer to a buffer containing the name string of the font
+ * for which to obtain an ATSUI font ID.
+ *
+ * iNameLength:
+ * The length, in bytes, of the name string provided in the iName
+ * parameter.
+ *
+ * iFontNameCode:
+ * A constant specifying the type of name to search for (i.e.,
+ * full name, postcript name). See SFNTTypes.h for a list possible
+ * values to pass for this parameter.
+ *
+ * iFontNamePlatform:
+ * A constant specifying the encoding of the font you are
+ * searching for. See SFNTTypes.h for possible values to pass for
+ * this parameter. Pass kFontNoPlatformCode if you do not want to
+ * limit your search to a particular encoding.
+ *
+ * iFontNameScript:
+ * A constant specifying the script of the font you are searching
+ * for. See SFNTTypes.h for possible values to pass for this
+ * parameter. Pass kFontNoScriptCode if you do not want to limit
+ * your search to a particular script.
+ *
+ * iFontNameLanguage:
+ * A constant specifying the language of the font you are
+ * searching for. See SFNTTypes.h for possible values to pass for
+ * this parameter. Pass kFontNoLanguageCode if you do not want to
+ * limit your search to a particular language.
+ *
+ * oFontID:
+ * On return, the value provides a unique identifier for the
+ * specified font. If no installed font matches the specified
+ * parameters, kATSUInvalidFontID is returned for this parameter.
+ *
+ * Result:
+ * On success, noErr is returned. If the font cannot be found,
+ * kATSUInvalidFontErr is returned. See MacErrors.h for other
+ * possible error codes.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUFindFontFromName( iName: Ptr; iNameLength: ByteCount; iFontNameCode: FontNameCode; iFontNamePlatform: FontPlatformCode; iFontNameScript: FontScriptCode; iFontNameLanguage: FontLanguageCode; var oFontID: ATSUFontID ): OSStatus; external name '_ATSUFindFontFromName';
+
+
+{ ---------------------------------------------------------------------------- }
+{ Font features }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUCountFontFeatureTypes()
+ *
+ * Summary:
+ * Obtains the number of available feature types in a font.
+ *
+ * Discussion:
+ * This function function obtains the total number of feature types
+ * defined for a font. You can use the count produced by
+ * ATSUCountFontFeatureTypes to determine how much memory to
+ * allocate for the oTypes array in the function
+ * ATSUGetFontFeatureTypes.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * The font for which to obtain a count of feature types.
+ *
+ * oTypeCount:
+ * On return, the actual number of feature types defined for the
+ * font.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCountFontFeatureTypes( iFontID: ATSUFontID; var oTypeCount: ItemCount ): OSStatus; external name '_ATSUCountFontFeatureTypes';
+
+
+{
+ * ATSUCountFontFeatureSelectors()
+ *
+ * Summary:
+ * Obtains the number of available feature selectors for a given
+ * feature type in a font.
+ *
+ * Discussion:
+ * This function obtains the total number of feature selectors
+ * defined for a given feature type in the font. You can use the
+ * count produced by ATSUCountFontFeatureSelectors to determine how
+ * much memory to allocate for the oSelectors array in the function
+ * ATSUGetFontFeatureSelectors.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * The font for which to obtain feature selector information.
+ *
+ * iType:
+ * A value specifying one of the font's supported feature types.
+ * To obtain the available feature types for a font, call the
+ * function ATSUGetFontFeatureTypes.
+ *
+ * oSelectorCount:
+ * On return, specifies the actual number of feature selectors
+ * defined for the feature type by the font.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCountFontFeatureSelectors( iFontID: ATSUFontID; iType: ATSUFontFeatureType; var oSelectorCount: ItemCount ): OSStatus; external name '_ATSUCountFontFeatureSelectors';
+
+
+{
+ * ATSUGetFontFeatureTypes()
+ *
+ * Summary:
+ * Obtains the available feature types of a font.
+ *
+ * Discussion:
+ * A given font may not support all possible feature types and
+ * selectors. If you select features that are not available in a
+ * font, you won't see a change in the glyph's appearance. To
+ * determine the available features of a font, you can call the
+ * functions ATSUGetFontFeatureTypes and
+ * ATSUGetFontFeatureSelectors. The ATSUGetFontFeatureTypes function
+ * reads the font data table for the specified font and obtains its
+ * supported feature types. You can then use this information both
+ * to present the user a list of font features from which to select
+ * and to call such functions as ATSUSetFontFeatures with more
+ * accuracy.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * The font for which to obtain information about feature types.
+ *
+ * iMaximumTypes:
+ * The maximum number of feature types to obtain for the font.
+ * Typically, this is equivalent to the number of elements in the
+ * oTypes array.
+ *
+ * oTypes:
+ * A pointer to memory you have allocated for an array of
+ * ATSUFontFeatureType values. You can call the function
+ * ATSUCountFontFeatureTypes to obtain the number of available
+ * feature types for a given font and thus determine the amount of
+ * memory to allocate. On return, the array contains constants
+ * identifying each type of feature that is defined for the font.
+ * The constants that represent font feature types are defined in
+ * the header file SFNTLayoutTypes.h and are described in the
+ * official ATSUI documentation, available on the Apple developer
+ * website. can be NULL
+ *
+ * oActualTypeCount:
+ * On return, the actual number of feature types defined in the
+ * font. This may be greater than the value you specify in the
+ * iMaximumTypes parameter. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetFontFeatureTypes( iFontID: ATSUFontID; iMaximumTypes: ItemCount; oTypes: ATSUFontFeatureTypePtr; oActualTypeCount: ItemCountPtr ): OSStatus; external name '_ATSUGetFontFeatureTypes';
+
+
+{
+ * ATSUGetFontFeatureSelectors()
+ *
+ * Summary:
+ * Obtains the available feature selectors for a given feature type
+ * in a font.
+ *
+ * Discussion:
+ * A given font may not support all possible feature types and
+ * selectors. If you select features that are not available in a
+ * font, you won't see a change in the glyph's appearance. To
+ * determine the available features of a font, you can call the
+ * functions ATSUGetFontFeatureTypes and
+ * ATSUGetFontFeatureSelectors. The ATSUGetFontFeatureSelectors
+ * function reads the font data table for the specified font and
+ * obtains its supported feature selectors for the given feature
+ * types. You can then use this information both to present the user
+ * a list of font features from which to select and to call such
+ * functions as ATSUSetFontFeatures with more accuracy.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * The font for which to obtain feature selectors.
+ *
+ * iType:
+ * An ATSUFontFeatureType value specifying one of the font's
+ * supported feature types. To obtain the available feature types
+ * for a font, call the function ATSUGetFontFeatureTypes.
+ *
+ * iMaximumSelectors:
+ * An ItemCount value specifying the maximum number of feature
+ * selectors to obtain for the font's specified feature type.
+ * Typically, this is equivalent to the number of elements in the
+ * oSelectors array.
+ *
+ * oSelectors:
+ * A pointer to memory you have allocated for an array of
+ * ATSUFontFeatureSelector values. You can call the function
+ * ATSUCountFontFeatureSelectors to obtain the number of available
+ * feature selectors for a given font feature type and thus
+ * determine the amount of memory to allocate. On return, the
+ * array contains constants identifying each available feature
+ * selector for the given feature type. The constants that
+ * represent font feature selectors are defined in the header file
+ * SFNTLayoutTypes.h and are described in the official ATSUI
+ * documentation, available on the Apple developer website. can be NULL
+ *
+ * oSelectorIsOnByDefault:
+ * A pointer to memory you have allocated for an array of Boolean
+ * values. The number of elements in this array should correspond
+ * to the number of elements in the oSelectors array. On return,
+ * the array contains Boolean values indicating whether the
+ * corresponding feature selector in the oSelectors array is on or
+ * off. If true, the feature selector is on by default; if false,
+ * off. can be NULL
+ *
+ * oActualSelectorCount:
+ * On return, the value specifies the actual number of feature
+ * selectors defined for the given feature type. This value may be
+ * greater than the value you specify in the iMaximumSelectors
+ * parameter. can be NULL
+ *
+ * oIsMutuallyExclusive:
+ * On return, the value indicates whether the feature selectors
+ * for the given feature type are exclusive or nonexclusive. If a
+ * feature type is exclusive you can choose only one of its
+ * available feature selectors at a time, such as whether to
+ * display numbers as proportional or fixed-width. If a feature
+ * type is nonexclusive, you can enable any number of feature
+ * selectors at once. If true , the feature type is exclusive and
+ * only one selector can be used at a time. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetFontFeatureSelectors( iFontID: ATSUFontID; iType: ATSUFontFeatureType; iMaximumSelectors: ItemCount; oSelectors: ATSUFontFeatureSelectorPtr; oSelectorIsOnByDefault: BooleanPtr; oActualSelectorCount: ItemCountPtr; oIsMutuallyExclusive: BooleanPtr ): OSStatus; external name '_ATSUGetFontFeatureSelectors';
+
+
+{
+ * ATSUGetFontFeatureNameCode()
+ *
+ * Summary:
+ * btains the name code for a font's feature type or selector that
+ * matches an ASTUI font ID, feature type, and feature selector.
+ *
+ * Discussion:
+ * This function obtains the name code for a font's feature type or
+ * selector that matches an ASTUI font ID, feature type and feature
+ * selector values. By default, ATSUGetFontFeatureNameCode function
+ * obtains the name code of a feature selector. To determine the
+ * name code of a feature type, pass the constant kATSUNoSelector in
+ * the iSelector parameter. You can use the function
+ * ATSUFindFontName to obtain the localized name string for the name
+ * code produced by ATSUGetFontFeatureNameCode.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * The font for which to obtain the name code for a feature type
+ * or selector.
+ *
+ * iType:
+ * A constant identifying a valid feature type. To obtain the
+ * valid feature types for a font, call the function
+ * ATSUGetFontFeatureTypes.
+ *
+ * iSelector:
+ * A constant identifying a valid feature selector that
+ * corresponds to the feature type passed in the iType parameter.
+ * If you pass the constant kATSUNoSelector, the name code
+ * produced by ATSUGetFontFeatureNameCode is that of the feature
+ * type, not the feature selector. To obtain the valid feature
+ * selectors for a font, call the function
+ * ATSUGetFontFeatureSelectors.
+ *
+ * oNameCode:
+ * On return, the value contains the name code for the font
+ * feature selector or type. See the SFNTTypes.h header file for a
+ * definition of the FontNameCode type and a list of possible
+ * values.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetFontFeatureNameCode( iFontID: ATSUFontID; iType: ATSUFontFeatureType; iSelector: ATSUFontFeatureSelector; var oNameCode: FontNameCode ): OSStatus; external name '_ATSUGetFontFeatureNameCode';
+
+
+{ ---------------------------------------------------------------------------- }
+{ Font tracking value & names }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUCountFontTracking()
+ *
+ * Summary:
+ * Obtains the number of entries in the font tracking table that
+ * correspond to a given ATSUI font ID and glyph orientation.
+ *
+ * Discussion:
+ * This function obtains the number of font tracking entries defined
+ * in a font tracking table for a given ATSUI font ID and glyph
+ * orientation. You can pass an index value based on this count to
+ * the function ATSUGetIndFontTracking to obtain the name code and
+ * tracking value of a font tracking.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * The font for which to obtain tracking table information.
+ *
+ * iCharacterOrientation:
+ * A constant identifying the glyph orientation of the font
+ * tracking entries. See the definition of
+ * ATSUVerticalCharacterType for a list of possible values.
+ *
+ * oTrackingCount:
+ * On return, the number of entries in the font tracking table
+ * corresponding to the given ATSUI font ID and glyph orientation.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCountFontTracking( iFontID: ATSUFontID; iCharacterOrientation: ATSUVerticalCharacterType; var oTrackingCount: ItemCount ): OSStatus; external name '_ATSUCountFontTracking';
+
+
+{
+ * ATSUGetIndFontTracking()
+ *
+ * Summary:
+ * Obtains the name code and tracking value for the font tracking
+ * that matches an ASTUI font ID, glyph orientation, and tracking
+ * table index.
+ *
+ * Discussion:
+ * You can call the ATSUGetIndFontTracking function to obtain the
+ * name code and tracking value that matches the specified ATSUI
+ * font ID, glyph orientation, and tracking table index value. This
+ * information allows you to manipulate tracking settings for a
+ * style using this font via the kATSUTrackingTag attribute. You can
+ * use the function ATSUFindFontName to obtain the localized name
+ * string for the name code produced by ATSUGetIndFontTracking.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * The font for which to obtain tracking information.
+ *
+ * iCharacterOrientation:
+ * A constant identifying the glyph orientation of the font
+ * tracking entries. See the definition of
+ * ATSUVerticalCharacterType for a list of possible values.
+ *
+ * iTrackIndex:
+ * An index to the font tracking for which to obtain information.
+ * Because this index must be 0-based, you should pass a value
+ * between 0 and one less than the count produced by the function
+ * ATSUCountFontTracking.
+ *
+ * oFontTrackingValue:
+ * On return, the value contains the font tracking value.
+ *
+ * oNameCode:
+ * On return, the value contains the name code for the font
+ * tracking. See the SFNTTypes.h header file for a definition of
+ * the FontNameCode type and a list of possible values.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetIndFontTracking( iFontID: ATSUFontID; iCharacterOrientation: ATSUVerticalCharacterType; iTrackIndex: ItemCount; var oFontTrackingValue: Fixed; var oNameCode: FontNameCode ): OSStatus; external name '_ATSUGetIndFontTracking';
+
+
+{ ---------------------------------------------------------------------------- }
+{ Font variations }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUCountFontVariations()
+ *
+ * Summary:
+ * Obtains the number of defined variation axes in a font.
+ *
+ * Discussion:
+ * This function function obtains the total number of variation axes
+ * defined for a font. You can use the count produced by
+ * ATSUCountFontVariations to get information about a specific font
+ * variation axis from the function ATSUGetIndFontVariation.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * The font for which to obtain a count of variation axes.
+ *
+ * oVariationCount:
+ * On return, a count of the number of variation axes defined for
+ * the font.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCountFontVariations( iFontID: ATSUFontID; var oVariationCount: ItemCount ): OSStatus; external name '_ATSUCountFontVariations';
+
+
+{
+ * ATSUGetIndFontVariation()
+ *
+ * Summary:
+ * Obtains a variation axis and its value range for a font.
+ *
+ * Discussion:
+ * By calling this function, you can obtain a variation axis and its
+ * maximum, minimum, and default values for a font. If you supply
+ * font variation axes and values to the function ATSUSetVariations,
+ * you can change the appearance of a style object's font
+ * accordingly. Note that while you may pass NULL for any of the
+ * output parameters, at least one must be non-NULL or paramErr will
+ * be returned.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * A font for which to obtain variation information for.
+ *
+ * iVariationIndex:
+ * A value specifying an index into the array of variation axes
+ * for the font. This index identifies the font variation axis to
+ * examine. Because this index is zero-based, you must pass a
+ * value between 0 and one less than the value produced in the
+ * oVariationCount parameter of the function
+ * ATSUCountFontVariations.
+ *
+ * oATSUFontVariationAxis:
+ * On return, a four-character code identifying the font variation
+ * axis corresponding to the specified index. can be NULL
+ *
+ * oMinimumValue:
+ * On return, the variation axis minimum. can be NULL
+ *
+ * oMaximumValue:
+ * On return, the variation axis maximum. can be NULL
+ *
+ * oDefaultValue:
+ * On return, the variation axis default. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetIndFontVariation( iFontID: ATSUFontID; iVariationIndex: ItemCount; oATSUFontVariationAxis: ATSUFontVariationAxisPtr; oMinimumValue: ATSUFontVariationValuePtr; oMaximumValue: ATSUFontVariationValuePtr; oDefaultValue: ATSUFontVariationValuePtr ): OSStatus; external name '_ATSUGetIndFontVariation';
+
+
+{
+ * ATSUGetFontVariationNameCode()
+ *
+ * Summary:
+ * Obtains the name code for the font variation that matches an
+ * ASTUI font ID and font variation axis.
+ *
+ * Discussion:
+ * This function function obtains the name code for the font
+ * variation that matches an ASTUI font ID and font variation axis
+ * tag. You can use the function ATSUFindFontName to obtain the
+ * localized name string for the name code produced by
+ * ATSUGetFontVariationNameCode.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * The font for which to obtain a font variation name code.
+ *
+ * iAxis:
+ * An ATSUFontVariationAxis value representing a valid variation
+ * axis tag. To obtain a valid variation axis tag for a font, you
+ * can call the functions ATSUGetIndFontVariation or
+ * ATSUGetFontInstance.
+ *
+ * oNameCode:
+ * On return, the value contains the name code for the font
+ * variation. See the SFNTTypes.h header file for a definition of
+ * the FontNameCode type and a list of possible values.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetFontVariationNameCode( iFontID: ATSUFontID; iAxis: ATSUFontVariationAxis; var oNameCode: FontNameCode ): OSStatus; external name '_ATSUGetFontVariationNameCode';
+
+
+{ ---------------------------------------------------------------------------- }
+{ Font Instances }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUCountFontInstances()
+ *
+ * Summary:
+ * Obtains the number of defined font instances in a font.
+ *
+ * Discussion:
+ * This function obtains the total number of font instances defined
+ * in a font. You can use an index value derived from this count to
+ * get information about a specific font instance by calling the
+ * function ATSUGetFontInstance.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * The font for which to obtain a count of defined instances.
+ *
+ * oInstances:
+ * On return, the value specifies the number of font instances
+ * defined for the font.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCountFontInstances( iFontID: ATSUFontID; var oInstances: ItemCount ): OSStatus; external name '_ATSUCountFontInstances';
+
+
+{
+ * ATSUGetFontInstance()
+ *
+ * Summary:
+ * Obtains the font variation axis values for a font instance.
+ *
+ * Discussion:
+ * with a minimum value of 0.0, a default of 0.5, and a maximum of
+ * 1.0. Additionally, the variation axis 'wdth' is also defined for
+ * the font, with a similar value range. The type designer can then
+ * choose to declare a font instance for a set of specific values
+ * within these axes, such as ÒDemiboldÓ for a value of 0.8 for the
+ * 'wght' axis and 0.5 for the 'wdth' axis. By calling the function
+ * ATSUGetFontInstance , you can obtain the variation axis values
+ * for a given index into an array of font instances. Typically you
+ * use the function ATSUGetFontInstance by calling it twice, as
+ * follows: (1) Pass the ID of the font to examine in the iFont
+ * parameter, a valid pointer to an ItemCount value in the
+ * oActualVariationCount parameter, NULL for the oAxes and oValues
+ * parameters, and 0 for the other parameters. ATSUGetFontInstance
+ * returns the size to use for the oAxes and oValues arrays in the
+ * oActualVariationCount parameter. (2) Allocate enough space for
+ * arrays of the returned size, then call the ATSUGetFontInstance
+ * again, passing pointers to the arrays in the oAxes and oValues
+ * parameters. On return, the arrays contain the font variation axes
+ * and their corresponding values, respectively, for the font
+ * instance.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * The font for which to obtain instance information.
+ *
+ * iFontInstanceIndex:
+ * An index into an array of instances for the font. This index
+ * identifies the font instance to examine. Because this index is
+ * zero-based, you must pass a value between 0 and one less than
+ * the value produced in the oInstances parameter of the function
+ * ATSUCountFontInstances.
+ *
+ * iMaximumVariations:
+ * The maximum number of font variation axes to obtain for the
+ * font instance. Typically, this is equivalent to the number of
+ * ATSUFontVariationAxis and ATSUFontVariationValue values for
+ * which you have allocated memory in the oAxes and oValues
+ * parameters, respectively. To determine this value, see the
+ * Discussion.
+ *
+ * oAxes:
+ * On return, the array contains tags identifying the font
+ * variation axes that constitute the font instance. If you are
+ * uncertain of how much memory to allocate for this array, see
+ * the Discussion. can be NULL
+ *
+ * oValues:
+ * On return, the array contains the defined values for the font
+ * variation axes produced in the oAxes array. If you are
+ * uncertain of how much memory to allocate for this array, see
+ * the Discussion. can be NULL
+ *
+ * oActualVariationCount:
+ * On return, the actual number of font variation axes that
+ * constitute the font instance. This may be greater than the
+ * value you passed in the iMaximumVariations 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetFontInstance( iFontID: ATSUFontID; iFontInstanceIndex: ItemCount; iMaximumVariations: ItemCount; oAxes: ATSUFontVariationAxisPtr; oValues: ATSUFontVariationValuePtr; var oActualVariationCount: ItemCount ): OSStatus; external name '_ATSUGetFontInstance';
+
+
+{
+ * ATSUGetFontInstanceNameCode()
+ *
+ * Summary:
+ * Obtains the name code for the font instance that matches an ASTUI
+ * font ID and font instance index value.
+ *
+ * Discussion:
+ * A font instance consists of a named set of values for each
+ * variation axis in a font. The ATSUGetFontInstanceNameCode
+ * function obtains the name code for the font instance that matches
+ * an ASTUI font ID and font instance index value. You can use the
+ * function ATSUFindFontName to obtain the localized name string for
+ * the name code produced by ATSUGetFontInstanceNameCode. You can
+ * obtain the font variation axis values for a font instance by
+ * calling the function ATSUGetFontInstance.
+ *
+ * Parameters:
+ *
+ * iFontID:
+ * The font for which to obtain a font instance name code.
+ *
+ * iInstanceIndex:
+ * An index to the font instance for which to obtain a name code.
+ * Because this index must be 0-based, you should pass a value
+ * between 0 and one less than the count produced by the function
+ * ATSUCountFontInstances.
+ *
+ * oNameCode:
+ * On return, the name code for the font instance. See the
+ * SFNTTypes.h header file for a definition of the FontNameCode
+ * type and a list of possible values.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetFontInstanceNameCode( iFontID: ATSUFontID; iInstanceIndex: ItemCount; var oNameCode: FontNameCode ): OSStatus; external name '_ATSUGetFontInstanceNameCode';
+
+{unit ATSUnicodeGlyphs}
+{
+ File: QD/ATSUnicodeGlyphs.h
+
+ Contains: ATSUI glyph handling functions.
+
+ Version: Quickdraw-150~1
+
+ Copyright: © 2003 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI glyph metrics }
+{ ---------------------------------------------------------------------------- }
+
+
+{
+ * ATSUGlyphGetIdealMetrics()
+ *
+ * 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
+ * line, including the left-side and right-side bearings. For
+ * vertical text, the advance height is the sum of the top-side
+ * bearing, the bounding-box height, and the bottom-side bearing.
+ * You can call the ATSUGlyphGetIdealMetrics function to obtain an
+ * array of ATSGlyphIdealMetrics structures containing values for
+ * the specified glyphs' advance and side bearings.
+ * ATSUGlyphGetIdealMetrics can analyze both horizontal and vertical
+ * text, automatically producing the appropriate bearing values
+ * (oriented for width or height, respectively) for each. You should
+ * call ATSUGlyphGetIdealMetrics to obtain resolution-independent
+ * 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
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGlyphGetIdealMetrics( iATSUStyle: ATSUStyle; iNumOfGlyphs: ItemCount; iGlyphIDs: GlyphIDPtr; iInputOffset: ByteOffset; oIdealMetrics: ATSGlyphIdealMetricsPtr ): OSStatus; external name '_ATSUGlyphGetIdealMetrics';
+
+
+{
+ * ATSUGlyphGetScreenMetrics()
+ *
+ * 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
+ * the specified glyphs' advance and side bearings, top left,
+ * height, and width. You should call ATSUGlyphGetScreenMetrics to
+ * 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
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGlyphGetScreenMetrics( iATSUStyle: ATSUStyle; iNumOfGlyphs: ItemCount; iGlyphIDs: GlyphIDPtr; iInputOffset: ByteOffset; iForcingAntiAlias: Boolean; iAntiAliasSwitch: Boolean; oScreenMetrics: ATSGlyphScreenMetricsPtr ): OSStatus; external name '_ATSUGlyphGetScreenMetrics';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI glyph curve access functions and callbacks }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUGetNativeCurveType()
+ *
+ * Summary:
+ * Returns the native curve format for a specific font.
+ *
+ * Discussion:
+ * Use this function to decide whether to call
+ * ATSUGlyphGetQuadraticPaths or ATSUGlyphGetCubicPaths. Both
+ * functions will return curves for all valid ATSUI fonts, but if
+ * the curve type you request is not the native curve type of the
+ * 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
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetNativeCurveType( iATSUStyle: ATSUStyle; var oCurveType: ATSCurveType ): OSStatus; external name '_ATSUGetNativeCurveType';
+
+
+{
+ * 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
+ * value. Note that any nonzero result from this callback will halt
+ * the curve drawing process.
+ }
+type ATSQuadraticNewPathProcPtr = function( callBackDataPtr: UnivPtr ): OSStatus;
+// Beats me what this translates to. If someone finds out they can tell me and we'll update it
+// typedef STACK_UPP_TYPE(ATSQuadraticNewPathProcPtr) ATSQuadraticNewPathUPP;
+type ATSQuadraticNewPathUPP = Ptr;
+
+{
+ * NewATSQuadraticNewPathUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function NewATSQuadraticNewPathUPP( userRoutine: ATSQuadraticNewPathProcPtr ): ATSQuadraticNewPathUPP; external name '_NewATSQuadraticNewPathUPP';
+
+{
+ * DisposeATSQuadraticNewPathUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+procedure DisposeATSQuadraticNewPathUPP( userUPP: ATSQuadraticNewPathUPP ); external name '_DisposeATSQuadraticNewPathUPP';
+
+{
+ * InvokeATSQuadraticNewPathUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function InvokeATSQuadraticNewPathUPP( callBackDataPtr: UnivPtr; userUPP: ATSQuadraticNewPathUPP ): OSStatus; external name '_InvokeATSQuadraticNewPathUPP';
+
+
+{
+ * 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
+ * value. Note that any nonzero result from this callback will halt
+ * the curve drawing process.
+ }
+type ATSQuadraticLineProcPtr = function( const (*var*) pt1, pt2: Float32Point; callBackDataPtr: UnivPtr ): OSStatus;
+// Beats me what this translates to. If someone finds out they can tell me and we'll update it
+// typedef STACK_UPP_TYPE(ATSQuadraticLineProcPtr) ATSQuadraticLineUPP;
+type ATSQuadraticLineUPP = Ptr;
+{
+ * NewATSQuadraticLineUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function NewATSQuadraticLineUPP( userRoutine: ATSQuadraticLineProcPtr ): ATSQuadraticLineUPP; external name '_NewATSQuadraticLineUPP';
+
+{
+ * DisposeATSQuadraticLineUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+procedure DisposeATSQuadraticLineUPP( userUPP: ATSQuadraticLineUPP ); external name '_DisposeATSQuadraticLineUPP';
+
+{
+ * InvokeATSQuadraticLineUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function InvokeATSQuadraticLineUPP( const (*var*) pt1, pt2: Float32Point; callBackDataPtr: UnivPtr; userUPP: ATSQuadraticLineUPP ): OSStatus; external name '_InvokeATSQuadraticLineUPP';
+
+
+{
+ * 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
+ * value. Note that any nonzero result from this callback will halt
+ * the curve drawing process.
+ }
+type ATSQuadraticCurveProcPtr = function( const (*var*) pt1, controlPt, pt2: Float32Point; callBackDataPtr: UnivPtr ): OSStatus;
+// Beats me what this translates to. If someone finds out they can tell me and we'll update it
+// typedef STACK_UPP_TYPE(ATSQuadraticCurveProcPtr) ATSQuadraticCurveUPP;
+type ATSQuadraticCurveUPP = Ptr;
+{
+ * NewATSQuadraticCurveUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function NewATSQuadraticCurveUPP( userRoutine: ATSQuadraticCurveProcPtr ): ATSQuadraticCurveUPP; external name '_NewATSQuadraticCurveUPP';
+
+{
+ * DisposeATSQuadraticCurveUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+procedure DisposeATSQuadraticCurveUPP( userUPP: ATSQuadraticCurveUPP ); external name '_DisposeATSQuadraticCurveUPP';
+
+{
+ * InvokeATSQuadraticCurveUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function InvokeATSQuadraticCurveUPP( const (*var*) pt1, controlPt, pt2: Float32Point; callBackDataPtr: UnivPtr; userUPP: ATSQuadraticCurveUPP ): OSStatus; external name '_InvokeATSQuadraticCurveUPP';
+
+
+{
+ * 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
+ * value. Note that any nonzero result from this callback will halt
+ * the curve drawing process.
+ }
+type ATSQuadraticClosePathProcPtr = function( callBackDataPtr: UnivPtr ): OSStatus;
+// Beats me what this translates to. If someone finds out they can tell me and we'll update it
+// typedef STACK_UPP_TYPE(ATSQuadraticClosePathProcPtr) ATSQuadraticClosePathUPP;
+type ATSQuadraticClosePathUPP = Ptr;
+{
+ * NewATSQuadraticClosePathUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function NewATSQuadraticClosePathUPP( userRoutine: ATSQuadraticClosePathProcPtr ): ATSQuadraticClosePathUPP; external name '_NewATSQuadraticClosePathUPP';
+
+{
+ * DisposeATSQuadraticClosePathUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+procedure DisposeATSQuadraticClosePathUPP( userUPP: ATSQuadraticClosePathUPP ); external name '_DisposeATSQuadraticClosePathUPP';
+
+{
+ * InvokeATSQuadraticClosePathUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function InvokeATSQuadraticClosePathUPP( callBackDataPtr: UnivPtr; userUPP: ATSQuadraticClosePathUPP ): OSStatus; external name '_InvokeATSQuadraticClosePathUPP';
+
+{
+ * ATSUGlyphGetQuadraticPaths()
+ *
+ * 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
+ * function will always return results for any valid ATSUI font, you
+ * should first use the function ATSUGetNativeCurveType to determine
+ * the native format of the glyph you are interested in. Then,
+ * either call ATSUGlyphGetQuadraticPaths or ATSUGlyphGetCubicPaths
+ * based on the result. Otherwise, you may end up with curves that
+ * are mathematically converted from cubic to quadratic (or vice
+ * versa), instead of getting native font data. See the definitions
+ * 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
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGlyphGetQuadraticPaths( iATSUStyle: ATSUStyle; iGlyphID: GlyphID; iNewPathProc: ATSQuadraticNewPathUPP; iLineProc: ATSQuadraticLineUPP; iCurveProc: ATSQuadraticCurveUPP; iClosePathProc: ATSQuadraticClosePathUPP; iCallbackDataPtr: UnivPtr; var oCallbackResult: OSStatus ): OSStatus; external name '_ATSUGlyphGetQuadraticPaths';
+
+
+{
+ * 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
+ * value. Note that any nonzero result from this callback will halt
+ * the curve drawing process.
+ }
+type ATSCubicMoveToProcPtr = function( const (*var*) pt: Float32Point; callBackDataPtr: UnivPtr ): OSStatus;
+// Beats me what this translates to. If someone finds out they can tell me and we'll update it
+// typedef STACK_UPP_TYPE(ATSCubicMoveToProcPtr) ATSCubicMoveToUPP;
+type ATSCubicMoveToUPP = Ptr;
+{
+ * NewATSCubicMoveToUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function NewATSCubicMoveToUPP( userRoutine: ATSCubicMoveToProcPtr ): ATSCubicMoveToUPP; external name '_NewATSCubicMoveToUPP';
+
+{
+ * DisposeATSCubicMoveToUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+procedure DisposeATSCubicMoveToUPP( userUPP: ATSCubicMoveToUPP ); external name '_DisposeATSCubicMoveToUPP';
+
+{
+ * InvokeATSCubicMoveToUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function InvokeATSCubicMoveToUPP( const (*var*) pt: Float32Point; callBackDataPtr: UnivPtr; userUPP: ATSCubicMoveToUPP ): OSStatus; external name '_InvokeATSCubicMoveToUPP';
+
+
+{
+ * 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
+ * value. Note that any nonzero result from this callback will halt
+ * the curve drawing process.
+ }
+type ATSCubicLineToProcPtr = function( const (*var*) pt: Float32Point; callBackDataPtr: UnivPtr ): OSStatus;
+// Beats me what this translates to. If someone finds out they can tell me and we'll update it
+// typedef STACK_UPP_TYPE(ATSCubicLineToProcPtr) ATSCubicLineToUPP;
+type ATSCubicLineToUPP = Ptr;
+{
+ * NewATSCubicLineToUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function NewATSCubicLineToUPP( userRoutine: ATSCubicLineToProcPtr ): ATSCubicLineToUPP; external name '_NewATSCubicLineToUPP';
+
+{
+ * DisposeATSCubicLineToUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+procedure DisposeATSCubicLineToUPP( userUPP: ATSCubicLineToUPP ); external name '_DisposeATSCubicLineToUPP';
+
+{
+ * InvokeATSCubicLineToUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function InvokeATSCubicLineToUPP( const (*var*) pt: Float32Point; callBackDataPtr: UnivPtr; userUPP: ATSCubicLineToUPP ): OSStatus; external name '_InvokeATSCubicLineToUPP';
+
+
+{
+ * 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
+ * value. Note that any nonzero result from this callback will halt
+ * the curve drawing process.
+ }
+type ATSCubicCurveToProcPtr = function( const (*var*) pt, pt2, pt3: Float32Point; callBackDataPtr: UnivPtr ): OSStatus;
+// Beats me what this translates to. If someone finds out they can tell me and we'll update it
+// typedef STACK_UPP_TYPE(ATSCubicCurveToProcPtr) ATSCubicCurveToUPP;
+type ATSCubicCurveToUPP = Ptr;
+{
+ * NewATSCubicCurveToUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function NewATSCubicCurveToUPP( userRoutine: ATSCubicCurveToProcPtr ): ATSCubicCurveToUPP; external name '_NewATSCubicCurveToUPP';
+
+{
+ * DisposeATSCubicCurveToUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+procedure DisposeATSCubicCurveToUPP( userUPP: ATSCubicCurveToUPP ); external name '_DisposeATSCubicCurveToUPP';
+
+{
+ * InvokeATSCubicCurveToUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function InvokeATSCubicCurveToUPP( const (*var*) pt, pt2, pt3: Float32Point; callBackDataPtr: UnivPtr; userUPP: ATSCubicCurveToUPP ): OSStatus; external name '_InvokeATSCubicCurveToUPP';
+
+
+{
+ * 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
+ * value. Note that any nonzero result from this callback will halt
+ * the curve drawing process.
+ }
+type ATSCubicClosePathProcPtr = function( callBackDataPtr: UnivPtr ): OSStatus;
+// Beats me what this translates to. If someone finds out they can tell me and we'll update it
+// typedef STACK_UPP_TYPE(ATSCubicClosePathProcPtr) ATSCubicClosePathUPP;
+type ATSCubicClosePathUPP = Ptr;
+{
+ * NewATSCubicClosePathUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function NewATSCubicClosePathUPP( userRoutine: ATSCubicClosePathProcPtr ): ATSCubicClosePathUPP; external name '_NewATSCubicClosePathUPP';
+
+{
+ * DisposeATSCubicClosePathUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+procedure DisposeATSCubicClosePathUPP( userUPP: ATSCubicClosePathUPP ); external name '_DisposeATSCubicClosePathUPP';
+
+{
+ * InvokeATSCubicClosePathUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function InvokeATSCubicClosePathUPP( callBackDataPtr: UnivPtr; userUPP: ATSCubicClosePathUPP ): OSStatus; external name '_InvokeATSCubicClosePathUPP';
+
+{
+ * ATSUGlyphGetCubicPaths()
+ *
+ * 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
+ * function will always return results for any valid ATSUI font, you
+ * should first use the function ATSUGetNativeCurveType to determine
+ * the native format of the glyph you are interested in. Then,
+ * either call ATSUGlyphGetQuadraticPaths or ATSUGlyphGetCubicPaths
+ * based on the result. Otherwise, you may end up with curves that
+ * are mathematically converted from quadratic to cubic (or vice
+ * versa), instead of getting native font data. See the definitions
+ * 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. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGlyphGetCubicPaths( iATSUStyle: ATSUStyle; iGlyphID: GlyphID; iMoveToProc: ATSCubicMoveToUPP; iLineToProc: ATSCubicLineToUPP; iCurveToProc: ATSCubicCurveToUPP; iClosePathProc: ATSCubicClosePathUPP; iCallbackDataPtr: UnivPtr; var oCallbackResult: OSStatus ): OSStatus; external name '_ATSUGlyphGetCubicPaths';
+
+
+{
+ * ATSUGlyphGetCurvePaths()
+ *
+ * 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
+ * parse the data structure yourself. ATSUGlyphGetCubicPaths and
+ * ATSUGlyphGetQuadraticPaths will parse the glyph data for you and
+ * use the callbacks you provide them to give you access to the
+ * individual points on the curves. Typically you use the function
+ * ATSUGlyphGetCurvePaths by calling it twice, as follows: (1) Pass
+ * a valid style and glyphID into the iATSUStyle and iGlyphID
+ * parameters, respectively, 0 for the ioBufferSize parameter, and
+ * NULL for the oPaths parameter. ATSUGlyphGetCurvePaths returns the
+ * size to use for the oPaths array in the ioBufferSize parameter.
+ * (2) Allocate enough space an array of the returned size, then
+ * 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. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGlyphGetCurvePaths( iATSUStyle: ATSUStyle; iGlyphID: GlyphID; ioBufferSize: ByteCountPtr; oPaths: ATSUCurvePathsPtr ): OSStatus; external name '_ATSUGlyphGetCurvePaths';
+
+
+{ Functions listed beyond this point are either deprecated or not recommended }
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI glyphInfo access (deprecated) }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUGetGlyphInfo()
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetGlyphInfo( iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset; iLineLength: UniCharCount; ioBufferSize: ByteCountPtr; oGlyphInfoPtr: ATSUGlyphInfoArrayPtr ): OSStatus; external name '_ATSUGetGlyphInfo';
+
+
+{
+ * ATSUDrawGlyphInfo()
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 9.1 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUDrawGlyphInfo( iGlyphInfoArray: ATSUGlyphInfoArrayPtr; iLocation: Float32Point ): OSStatus; external name '_ATSUDrawGlyphInfo';
+
+{unit ATSUnicodeObjects}
+{
+ File: QD/ATSUnicodeObjects.h
+
+ Contains: ATSUI object manipulation functions.
+
+ Version: Quickdraw-150~1
+
+ Copyright: © 2003 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN MAC68K}
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI basic style functions }
+{ ---------------------------------------------------------------------------- }
+
+{
+ * ATSUCreateStyle()
+ *
+ * Summary:
+ * Creates an ATSUStyle object with default settings.
+ *
+ * Discussion:
+ * ATSUStyle objects created by this function have a default set of
+ * values for all attributes. The attributes include settings such
+ * as font, point size, color and so on. You can change the
+ * attributes of a style object by calling the function
+ * ATSUSetAttributes. You can also change font features and
+ * variations set in an ATSUStyle by calling the functions
+ * ATSUSetFontFeatures and ATSUSetVariations, respectively.
+ * ATSUStyle objects are used by associating them with a run of
+ * characters in an ATSUTextLayout object. You can do this by
+ * calling functions such as ATSUSetRunStyle or
+ * ATSUCreateTextLayoutWithTextPtr. You are responsible for freeing
+ * memory assoicated with an ATSUStyle object by calling
+ * ATSUDisposeStyle.
+ *
+ * Parameters:
+ *
+ * oStyle:
+ * On return, a reference to an ATSUStyle object with default
+ * settings.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCreateStyle( var oStyle: ATSUStyle ): OSStatus; external name '_ATSUCreateStyle';
+
+
+{
+ * ATSUCreateAndCopyStyle()
+ *
+ * Summary:
+ * Creates a new ATSUStyle object with the same attributes, font
+ * features, and font variation settings as the input style.
+ *
+ * Discussion:
+ * All attributes, font features, and font variation settings of the
+ * input ATSUStyle object are copied over to a newly created
+ * ATSUStyle object. Note that reference constants are not copied.
+ * You are responsible for freeing memory assoicated with the
+ * returned ATSUStyle object by calling ATSUDisposeStyle.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * The ATSUStyle object you want to copy.
+ *
+ * oStyle:
+ * On return, a newly created ATSUStyle object. This will be an
+ * exact copy of iStyle, except for the reference constant (if
+ * set).
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCreateAndCopyStyle( iStyle: ATSUStyle; var oStyle: ATSUStyle ): OSStatus; external name '_ATSUCreateAndCopyStyle';
+
+
+{
+ * ATSUDisposeStyle()
+ *
+ * Summary:
+ * Disposes of the memory associated with a style object.
+ *
+ * Discussion:
+ * The ATSUDisposeStyle function frees the memory associated with
+ * the specified style object and its internal structures, including
+ * style run attributes. It does not dispose of the memory pointed
+ * to by application-defined style run attributes or reference
+ * constants. You are responsible for doing so. You should call this
+ * function after calling the function ATSUDisposeTextLayout to
+ * dispose of any text layout objects associated with the style
+ * object. For best performance, once you create a style object, you
+ * should keep it and use it as often as needed. You should dispose
+ * of the style object only when it is no longer needed in your
+ * application.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * The style you want to dispose of.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUDisposeStyle( iStyle: ATSUStyle ): OSStatus; external name '_ATSUDisposeStyle';
+
+
+{
+ * ATSUSetStyleRefCon()
+ *
+ * Summary:
+ * Sets a reference constant for an ATSUStyle object.
+ *
+ * Discussion:
+ * Reference constants are any 32-bit value you wish to associate
+ * with an object. It can be a pointer to application-specific data,
+ * a SInt16 value, or anything you like. If you copy or clear a
+ * style object that contains a reference constant, the reference
+ * constant is neither copied nor removed. To obtain the reference
+ * constant for a particular ATSUStyle object after it has been set,
+ * use the function ATSUGetStyleRefCon.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * An ATSUStyle object you want to set the reference constant for.
+ *
+ * iRefCon:
+ * Any arbitrary 32-bit value containing or referring to
+ * application-specific data.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUSetStyleRefCon( iStyle: ATSUStyle; iRefCon: UInt32 ): OSStatus; external name '_ATSUSetStyleRefCon';
+
+
+{
+ * ATSUGetStyleRefCon()
+ *
+ * Summary:
+ * Returns the reference constant for an ATSUStyle object.
+ *
+ * Discussion:
+ * Together with ATSUSetStyleRefCon, this function provides a
+ * mechanism for keeping application-specific data associated with
+ * ATSUStyle objects. Note that if an ATSUStyle object is copied or
+ * cleared, its associated reference constant, if any, is not copied
+ * or cleared.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * The style object for which to obtain application-specific data.
+ *
+ * oRefCon:
+ * On return, the reference constant for iStyle.
+ *
+ * Result:
+ * On success, noErr is returned. If no reference constant is set in
+ * iStyle, paramErr is returned. See MacErrors.h for other possible
+ * error codes.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetStyleRefCon( iStyle: ATSUStyle; var oRefCon: UInt32 ): OSStatus; external name '_ATSUGetStyleRefCon';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI style comparison }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUCompareStyles()
+ *
+ * Summary:
+ * Compares two ATSUStyleObjects.
+ *
+ * Discussion:
+ * The ATSUCompareStyles function compares the contents of two style
+ * objects, including their style attributes, font features, and
+ * font variations. It does not consider reference constants or
+ * application-defined style attributes in the comparison. Note that
+ * order is important, as the ATSUStyleComparison constants that can
+ * be returned indicate "contains" vs. "contained by" based on which
+ * style is considered first in the comparsion.
+ *
+ * Parameters:
+ *
+ * iFirstStyle:
+ * The first style to be compared.
+ *
+ * iSecondStyle:
+ * The second style to be compared.
+ *
+ * oComparison:
+ * On return, the value contains the results of the comparison and
+ * indicates whether the two style objects are the same,
+ * different, or if one is a subset of the other. See the
+ * definition of the ATSUStyleComparison type for more information
+ * on possible values returned 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCompareStyles( iFirstStyle: ATSUStyle; iSecondStyle: ATSUStyle; var oComparison: ATSUStyleComparison ): OSStatus; external name '_ATSUCompareStyles';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI style attribute manipulation }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUCopyAttributes()
+ *
+ * Summary:
+ * Copies attributes from one style to another.
+ *
+ * Discussion:
+ * There are three types of settings in a style: attributes, font
+ * features, and font variations. This function copies only the
+ * first. To copy all three types of settings, use the function
+ * ATSUCreateAndCopyStyle. Also note that this function does not
+ * copy reference constants.
+ *
+ * Parameters:
+ *
+ * iSourceStyle:
+ * The style whose attributes you are copying from.
+ *
+ * iDestinationStyle:
+ * The style whose attributes you are copying to.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCopyAttributes( iSourceStyle: ATSUStyle; iDestinationStyle: ATSUStyle ): OSStatus; external name '_ATSUCopyAttributes';
+
+
+{
+ * ATSUOverwriteAttributes()
+ *
+ * Summary:
+ * Copies to a destination style object the nondefault style
+ * attribute settings of a source style object.
+ *
+ * Discussion:
+ * The ATSUOverwriteAttributes function copies all nondefault style
+ * attribute values from a source style object to a destination
+ * style object. The source object's nondefault values are applied
+ * to the destination object whether or not the destination object
+ * also has nondefault values for the copied attributes. All other
+ * settings in the destination style object are left unchanged.
+ * ATSUOverwriteAttributes does not copy the contents of memory
+ * referenced by pointers within custom style attributes or within
+ * reference constants. You are responsible for ensuring that this
+ * memory remains valid until both the source and destination style
+ * objects are disposed of. To create a style object that contains
+ * all the contents of another style object, call the function
+ * ATSUCreateAndCopyStyle. To copy all the style attributes
+ * (including any default settings) of a style object into an
+ * existing style object, call the function ATSUCopyAttributes. To
+ * copy style attributes that are set in the source but not in the
+ * destination style object, call the function
+ * ATSUUnderwriteAttributes.
+ *
+ * Parameters:
+ *
+ * iSourceStyle:
+ * An ATSUStyle value specifying the style object from which to
+ * copy nondefault style attributes.
+ *
+ * iDestinationStyle:
+ * An ATSUStyle value specifying the style object containing the
+ * style attributes to be overwritten.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUOverwriteAttributes( iSourceStyle: ATSUStyle; iDestinationStyle: ATSUStyle ): OSStatus; external name '_ATSUOverwriteAttributes';
+
+
+{
+ * ATSUUnderwriteAttributes()
+ *
+ * Summary:
+ * Copies to a destination style object only those nondefault style
+ * attribute settings of a source style object that are at default
+ * settings in the destination object.
+ *
+ * Discussion:
+ * The ATSUUnderwriteAttributes function copies to a destination
+ * style object only those nondefault style attribute values of a
+ * source style object that are not currently set in a destination
+ * style object. Note that the corresponding value in the
+ * destination object must not be set in order for a copied value to
+ * be applied. All other quantities in the destination style object
+ * are left unchanged. ATSUUnderwriteAttributes does not copy the
+ * contents of memory referenced by pointers within custom style
+ * attributes or within reference constants. You are responsible for
+ * ensuring that this memory remains valid until both the source and
+ * destination style objects are disposed of. To create a style
+ * object that contains all the contents of another style object,
+ * call the function ATSUCreateAndCopyStyle. To copy all the style
+ * attributes (including any default settings) of a style object
+ * into an existing style object, call the function
+ * ATSUCopyAttributes. To copy style attributes that are set in the
+ * source whether or not they are set in the destination style
+ * object, call the function ATSUOverwriteAttributes.
+ *
+ * Parameters:
+ *
+ * iSourceStyle:
+ * An ATSUStyle value specifying the style object from which to
+ * copy nondefault style attributes.
+ *
+ * iDestinationStyle:
+ * An ATSUStyle value specifying the style object containing style
+ * attribute values to be set.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUUnderwriteAttributes( iSourceStyle: ATSUStyle; iDestinationStyle: ATSUStyle ): OSStatus; external name '_ATSUUnderwriteAttributes';
+
+
+{ ---------------------------------------------------------------------------- }
+{ Empty ATSUI styles }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUClearStyle()
+ *
+ * Summary:
+ * Restores default values to a style object.
+ *
+ * Discussion:
+ * Clears a style object of all style attributes (including any
+ * application-defined attributes), font features, and font
+ * variations and returns these values to their default settings. To
+ * clear attributes, font features, or font variations individually,
+ * use the functions ATSUClearAttributes, ATSUClearFontVariations,
+ * or ATSUClearFontFeatures, respectively. Note that ATSUClearStyle
+ * does not affect Reference constants.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * The style to be cleared.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUClearStyle( iStyle: ATSUStyle ): OSStatus; external name '_ATSUClearStyle';
+
+
+{
+ * ATSUStyleIsEmpty()
+ *
+ * Summary:
+ * Indicates whether a style object contains only default values.
+ *
+ * Discussion:
+ * You can call the ATSUStyleIsEmpty function to determine whether a
+ * style object contains only default values for style attributes,
+ * font features, and font variations. ATSUStyleIsEmpty does not
+ * consider reference constants in its evaluation.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * An ATSUStyle value specifying the style object to examine.
+ *
+ * oIsClear:
+ * On return, the value is set to true if the style object
+ * contains only default values for style attributes, font
+ * features, and font variations. If false , the style object
+ * contains one or more nondefault values for style attributes,
+ * font features, or font variations. Reference constants do not
+ * affect this result.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUStyleIsEmpty( iStyle: ATSUStyle; var oIsClear: Boolean ): OSStatus; external name '_ATSUStyleIsEmpty';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI style attribute getters and setters }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUCalculateBaselineDeltas()
+ *
+ * Summary:
+ * Obtains the optimal baseline positions for glyphs in a style run.
+ *
+ * Discussion:
+ * Depending on the writing system, a baseline may be above, below,
+ * or through the centers of glyphs. In general, a style run has a
+ * default baseline, to which all glyphs are visually aligned when
+ * the text is laid out. For example, in a run of Roman text, the
+ * default baseline is the Roman baseline, upon which glyphs sit
+ * (except for descenders, which extend below the baseline). You can
+ * call the ATSUCalculateBaselineDeltas function to obtain the
+ * distances from a specified baseline type to that of other
+ * baseline types for a given style object.
+ * ATSUCalculateBaselineDeltas takes into account font and text size
+ * when performing these calculations. ATSUI uses these distances to
+ * determine the cross-stream shifting to apply when aligning glyphs
+ * in a style run. You can use the resulting array to set or obtain
+ * the optimal baseline positions of glyphs in a style run. You can
+ * also set various baseline values to create special effects such
+ * as drop capitals. The functions ATSUSetLineControls and
+ * ATSUSetLayoutControls allow you to set baseline offset values at
+ * the line or layout level, respectively, using the
+ * kATSULineBaselineValuesTag control attribute tag.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * An ATSUStyle value specifying the style object to examine.
+ *
+ * iBaselineClass:
+ * A BslnBaselineClass constant identifying the primary baseline
+ * from which to measure other baselines. See SFNTLayoutTypes.h
+ * for an enumeration of possible values. Pass the constant
+ * kBSLNNoBaselineOverride to use the standard baseline value from
+ * the current font.
+ *
+ * oBaselineDeltas:
+ * On return, an array that contains baseline offsets, specifying
+ * distances measured in points, from the default baseline to each
+ * of the other baseline types in the style object. Positive
+ * values indicate baselines above the default baseline and
+ * negative values indicate baselines below it. See
+ * SFNTLayoutTypes.h for a description of the BslnBaselineRecord
+ * type.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCalculateBaselineDeltas( iStyle: ATSUStyle; iBaselineClass: BslnBaselineClass; oBaselineDeltas: BslnBaselineRecord ): OSStatus; external name '_ATSUCalculateBaselineDeltas';
+
+
+{
+ * ATSUSetAttributes()
+ *
+ * Summary:
+ * Sets style attribute values in a style object.
+ *
+ * Discussion:
+ * Style attributes are a collection of values and settings that
+ * specify information about a style such as font, point size, and
+ * color. To specify a style attribute, ATSUI uses a "triple"
+ * consisting of (1) an attribute tag, (2) a value for that tag, and
+ * (3) the size of the value. For a list of possible tags and their
+ * default values, see the ATSUI documentation, or the definition of
+ * ATSUAttributeTag elsewhere in this header file. When you call
+ * ATSUSetAttributes, any style attributes that you do not set
+ * retain their previous values. To set font features and font
+ * variations, call the functions ATSUSetFontFeatures and
+ * ATSUSetVariations, respectively.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * A style in which to set attributes.
+ *
+ * iAttributeCount:
+ * An ItemCount value specifying the number of attributes to set.
+ * This value should correspond to the number of elements in the
+ * iTag, iValueSize, and iValue arrays.
+ *
+ * iTag:
+ * An array of attribute tags. The number of elements in this
+ * array must not be less than iAttributeCount. Each element in
+ * the array must contain a valid style attribute tag (see the
+ * definition of ATSUAttributeTag for possible values).
+ *
+ * iValueSize:
+ * An array of ByteCount values. The number of elements in this
+ * array must not be less than iAttributeCount. Each ByteCount
+ * value corresoponds to the size of an element referred to by a
+ * pointer in the iValue array.
+ *
+ * iValue:
+ * An array of pointers of type ATSUAttributeValuePtr. Each
+ * pointer referrs to a value that corresponds to a tag specified
+ * by the iTag array. The size of the data referred to is
+ * determined by a corresponding element in the iValueSize array.
+ * The number of elements in this array must not be less than
+ * iAttributeCount.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUSetAttributes( iStyle: ATSUStyle; iAttributeCount: ItemCount; iTag: ATSUAttributeTagPtr; iValueSize: ByteCountPtr; iValue: ATSUAttributeValuePtrPtr ): OSStatus; external name '_ATSUSetAttributes';
+
+
+{
+ * ATSUGetAttribute()
+ *
+ * Summary:
+ * Obtains a single attribute value for a style object.
+ *
+ * Discussion:
+ * The ATSUGetAttribute function obtains the value of a specified
+ * style attribute for a given style object. Before calling
+ * ATSUGetAttribute, you should call the function
+ * ATSUGetAllAttributes to obtain an array of nondefault style
+ * attribute tags and value sizes for the style object. You can then
+ * pass ATSUGetAttribute the tag and value size for the attribute
+ * value to obtain. This function may return kATSUNotSetErr for some
+ * attributes that have not been set to a non-default via a call to
+ * ATSUSetAttributes.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * The style object you with to retrieve an attribute value from.
+ *
+ * iTag:
+ * The tag you wish to obtain the value of.
+ *
+ * iExpectedValueSize:
+ * The size of the buffer pointed to by oValue.
+ *
+ * oValue:
+ * On input, a buffer you have allocated to retain the value of
+ * the specified attribute. On return, the value of the requested
+ * attribute will be placed here. You may pass NULL for this
+ * parameter. can be NULL
+ *
+ * oActualValueSize:
+ * On return, the actual number of bytes written to oValue is
+ * placed here. You may pass NULL for this parameter. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetAttribute( iStyle: ATSUStyle; iTag: ATSUAttributeTag; iExpectedValueSize: ByteCount; oValue: ATSUAttributeValuePtr; oActualValueSize: ByteCountPtr ): OSStatus; external name '_ATSUGetAttribute';
+
+
+{
+ * ATSUGetAllAttributes()
+ *
+ * Summary:
+ * Obtains an array of style attribute tags and value sizes for a
+ * style object.
+ *
+ * Discussion:
+ * This function returns information as to which attributes have had
+ * non-default values set in a particular ATSUStyle object. It will
+ * also return the size in bytes of the values of these attributes.
+ * Using this information, you can then call ATSUGetAttribute to
+ * obtain the value of a given attribute. Typically you use the
+ * function ATSUGetAllAttributes by calling it twice, as follows:
+ * (1) Pass a reference to the style object to examine in the iStyle
+ * parameter, a valid pointer to an ItemCount value in the
+ * oTagValuePairCount parameter, NULL for the oAttributeInfoArray
+ * parameter, and 0 for the iTagValuePairArraySize parameter.
+ * ATSUGetAllAttributes returns the size of the tag and value-size
+ * arrays in the oTagValuePairCount parameter. (2) Allocate enough
+ * space for an array of the returned size, then call the
+ * ATSUGetAllAttributes function again, passing a valid pointer in
+ * the oAttributeInfoArray parameter. On return, the pointer refers
+ * to an array of the style attribute tag and value-size pairs
+ * contained in the style object.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * The style object you wish to retrieve a list of attribute tags
+ * from.
+ *
+ * oAttributeInfoArray:
+ * On return, an array of ATSUAttributeInfo structures. Each
+ * structure contains information about an attribute in iStyle
+ * that has a non-default value. You must allocate space for this
+ * array. If you are unsure how much space to allocate, you may
+ * pass NULL for this parameter and use the oTagValuePairCount
+ * parameter to determine how much space to allocate. can be NULL
+ *
+ * iTagValuePairArraySize:
+ * The size of the array you allocated and are passing in for the
+ * oAttributeInfoArray parameter.
+ *
+ * oTagValuePairCount:
+ * On return, the number of attributes whose information was
+ * stored in the oAttributeInfoArray parameter. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetAllAttributes( iStyle: ATSUStyle; oAttributeInfoArray: ATSUAttributeInfoPtr; iTagValuePairArraySize: ItemCount; oTagValuePairCount: ItemCountPtr ): OSStatus; external name '_ATSUGetAllAttributes';
+
+
+{
+ * ATSUClearAttributes()
+ *
+ * Summary:
+ * Restores default values to the specified style attributes of a
+ * style object.
+ *
+ * Discussion:
+ * Removes those style attribute values identified by the tag
+ * constants in the iTag array and replaces them with the default
+ * values. For a list of possible tags and their default values, see
+ * the ATSUI documentation, or the definition of ATSUAttributeTag
+ * elsewhere in this header file. If you specify that any currently
+ * unset attribute values be removed, ATSUClearAttributes does not
+ * return an error. Note this function only deals with attributes.
+ * To remove all previously set style attributes as well as font
+ * features and font variations from a style object, call the
+ * function ATSUClearStyle.
+ *
+ * Parameters:
+ *
+ * iStyle:
+ * A style whose attributes you want to clear.
+ *
+ * iTagCount:
+ * The number of tags you are passing in via the iTag parameter.
+ * Pass kATSUClearAll to clear all attributes.
+ *
+ * iTag:
+ * An array of ATSUAttributeTag indicating which attributes to
+ * clear. You may pass NULL for this parameter if you are passing
+ * kATSUClearAll for the iTagCount parameter. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUClearAttributes( iStyle: ATSUStyle; iTagCount: ItemCount; iTag: ATSUAttributeTagPtr ): OSStatus; external name '_ATSUClearAttributes';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI basic text layout functions }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUCreateTextLayout()
+ *
+ * Summary:
+ * Creates an opaque text layout object containing only default text
+ * layout attributes.
+ *
+ * Discussion:
+ * This function creates a empty text layout object that has no
+ * styles or text buffer associated with it. Most ATSUI functions
+ * that operate on text layout objects require that the objects be
+ * associated with style information and text. To associate style
+ * objects and text with an empty text layout object, you can call
+ * the functions ATSUSetRunStyle and ATSUSetTextPointerLocation .
+ * Or, to create a text layout object and associate style objects
+ * and text with it at the same time, you can call the function
+ * ATSUCreateTextLayoutWithTextPtr. To provide nondefault line or
+ * layout attributes for a text layout object, you can call the
+ * functions ATSUSetLineControls or ATSUSetLayoutControls . After
+ * setting text attributes, call ATSUDrawText to draw the text. Text
+ * layout objects are readily reusable and should be cached for
+ * later use, if possible. You can reuse a text layout object even
+ * if the text associated with it is altered. Call the functions
+ * ATSUSetTextPointerLocation, ATSUTextDeleted, or ATSUTextInserted
+ * to manage the altered text.
+ *
+ * Parameters:
+ *
+ * oTextLayout:
+ * On return, the value refers to an empty text layout object.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCreateTextLayout( var oTextLayout: ATSUTextLayout ): OSStatus; external name '_ATSUCreateTextLayout';
+
+
+{
+ * ATSUCreateAndCopyTextLayout()
+ *
+ * Summary:
+ * Creates a copy of a text layout object.
+ *
+ * Discussion:
+ * This function creates a copy of the source text layout object's
+ * style runs (including references to the associated text buffer
+ * and style objects), line attributes, layout attributes, and
+ * layout caches. ATSUCreateAndCopyTextLayout does not copy
+ * reference constants. To create a text layout object without
+ * copying a source object, you can the function
+ * ATSUCreateTextLayout or the function
+ * ATSUCreateTextLayoutWithTextPtr.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout to be copied.
+ *
+ * oTextLayout:
+ * On return, a reference to a layout object which is a copy of
+ * iTextLayout.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCreateAndCopyTextLayout( iTextLayout: ATSUTextLayout; var oTextLayout: ATSUTextLayout ): OSStatus; external name '_ATSUCreateAndCopyTextLayout';
+
+
+{
+ * ATSUCreateTextLayoutWithTextPtr()
+ *
+ * Summary:
+ * Creates an opaque text layout object containing default text
+ * layout attributes as well as associated text and text styles.
+ *
+ * Discussion:
+ * This function creates a text layout object and associates the
+ * specified text buffer and style runs with it. All layout
+ * attributes are set to their default values. To provide nondefault
+ * line or layout attributes for a text layout object, you can call
+ * the functions ATSUSetLineControls or ATSUSetLayoutControls. After
+ * setting text attributes, call ATSUDrawText to draw the text.
+ * Because the only way that ATSUI interacts with text is via the
+ * memory references you associate with a text layout object, you
+ * are responsible for keeping these references updated through use
+ * of the functions ATSUTextInserted, ATSUTextDeleted,
+ * ATSUTextMoved, and ATSUSetTextPointerLocation. Note that, because
+ * ATSUI objects retain state information, doing superfluous calling
+ * can degrade performance. For example, you could call
+ * ATSUSetTextPointerLocation rather than ATSUTextInserted when the
+ * user inserts text, but there would be a performance penalty, as
+ * all the layout caches are flushed when you call
+ * ATSUSetTextPointerLocation , rather than just the affected ones.
+ * Text layout objects are readily reusable and should themselves be
+ * cached for later use, if possible. Text objects are thread-safe
+ * starting with ATSUI version 2.4.
+ *
+ * Parameters:
+ *
+ * iText:
+ * A text buffer containing UTF-16Ðencoded text. ATSUI associates
+ * this buffer with the new text layout object and analyzes the
+ * complete text of the buffer when obtaining the layout context
+ * for the current text range. Thus, for paragraph-format text, if
+ * you specify a buffer containing less than a complete paragraph,
+ * some of ATSUI's layout results are not guaranteed to be
+ * accurate. For example, with a buffer of less than a full
+ * paragraph, ATSUI can neither reliably obtain the context for
+ * bidirectional processing nor reliably generate accent
+ * attachments and ligature formations for Roman text.
+ *
+ * iTextOffset:
+ * The offset from the beginning of the text buffer to the first
+ * character of the range to include in the layout. To indicate
+ * that the specified text range starts at the beginning of the
+ * text buffer, you can pass the constant kATSUFromTextBeginning.
+ * To specify the entire text buffer, pass kATSUFromTextBeginning
+ * in this parameter and kATSUToTextEnd in the iTextLength
+ * parameter. For best results, use one layout for each paragraph
+ * within the text buffer.
+ *
+ * iTextLength:
+ * The length of the text range. Note that the sum of iTextOffset
+ * and iTextLength must be less than or equal to the value of the
+ * iTextTotalLength parameter. If you want the range of text to
+ * extend to the end of the text buffer, you can pass the constant
+ * kATSUToTextEnd. For best results, use one layout for each
+ * paragraph within the text buffer.
+ *
+ * iTextTotalLength:
+ * The length of the entire text buffer referred to by iText. This
+ * value should be greater than or equal to the range of text
+ * defined by the iTextLength parameter.
+ *
+ * iNumberOfRuns:
+ * The number of text style runs you want to define within the
+ * overall text range. The number of style objects and style run
+ * lengths passed in the iStyles and iRunLengths parameters,
+ * respectively, should be equal to the number of runs specified
+ * here.
+ *
+ * iRunLengths:
+ * An array providing ATSUI with the lengths of each of the text's
+ * style runs. You can pass kATSUToTextEnd for the last style run
+ * length if you want the style run to extend to the end of the
+ * text range. If the sum of the style run lengths is less than
+ * the total length of the text range, the remaining characters
+ * are assigned to the last style run.
+ *
+ * iStyles:
+ * An array of styles, each corresponding to a style run defined
+ * in iRunLengths. The same ATSUStyle object may be referred to
+ * more than once in this array. The number of elements in this
+ * array must be equal to the value specified by the iNumberOfRuns
+ * parameter.
+ *
+ * oTextLayout:
+ * A valid pointer to an ATSUTextLayout value. On return, the
+ * value refers to the newly created text layout object.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCreateTextLayoutWithTextPtr( iText: ConstUniCharArrayPtr; iTextOffset: UniCharArrayOffset; iTextLength: UniCharCount; iTextTotalLength: UniCharCount; iNumberOfRuns: ItemCount; iRunLengths: UniCharCountPtr; iStyles: ATSUStylePtr; var oTextLayout: ATSUTextLayout ): OSStatus; external name '_ATSUCreateTextLayoutWithTextPtr';
+
+
+{
+ * ATSUClearLayoutCache()
+ *
+ * Summary:
+ * Clears the layout cache of a line or an entire text layout object.
+ *
+ * Discussion:
+ * The layout cache contains all the layout information ATSUI
+ * calculates and needs to draw a range of text in a text layout
+ * object. This includes caret positions, the memory locations of
+ * glyphs, and other information needed to lay out the glyphs. ATSUI
+ * uses information in the layout cache to avoid laying out the text
+ * again, thereby improving performance. When you clear the layout
+ * cache of a line or block of text, ATSUI takes longer to redraw a
+ * line, since it must perform the calculations that support glyph
+ * layout again. You should call the function ATSUClearLayoutCache
+ * when you need to decrease the amount of memory your application
+ * uses. This function reclaims memory at the cost of optimal
+ * performance. By default, the ATSUClearLayoutCache function
+ * removes the layout cache of a single line. To clear the layout
+ * cache for multiple lines, you should call ATSUClearLayoutCache
+ * for each line. To clear the layout cache of an entire text layout
+ * object, pass the constant kATSUFromTextBeginning in the
+ * iLineStart parameter. Note that ATSUClearLayoutCache does not
+ * produce a function error if lines do not have a layout cache. The
+ * ATSUClearLayoutCache function flushes the layout cache but does
+ * not alter previously set text layout attributes, soft line break
+ * positions, or the text memory location. If you do not want to
+ * retain these values, you should dispose of the text layout object
+ * by calling the ATSUDisposeTextLayout function.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout for which to clear the layout caches.
+ *
+ * iLineStart:
+ * The offset from the beginning of the text buffer to the
+ * beginning of the line for which to discard the layout cache. If
+ * the range of text spans multiple lines, you should call
+ * ATSUClearLayoutCache for each line, passing the offset
+ * corresponding to the beginning of the new line to draw with
+ * each call. To clear the layout cache of the entire text layout
+ * object, you can pass the constant kATSUFromTextBeginning.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUClearLayoutCache( iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset ): OSStatus; external name '_ATSUClearLayoutCache';
+
+
+{
+ * ATSUDisposeTextLayout()
+ *
+ * Summary:
+ * Disposes of the memory associated with a text layout object.
+ *
+ * Discussion:
+ * This function frees the memory associated with the specified text
+ * layout object and its internal structures, including line and
+ * layout control attributes, style runs, and soft line breaks.
+ * ATSUDisposeTextLayout does not dispose of any memory that may be
+ * allocated for the text buffer, style objects, or reference
+ * constants associated with the text layout object. You are
+ * responsible for doing so. For best performance, text layout
+ * objects are readily reusable and should be cached for later use,
+ * if possible. You can reuse a text layout object even if the text
+ * associated with it is altered. Call the functions
+ * ATSUSetTextPointerLocation, ATSUTextDeleted, or ATSUTextInserted
+ * to manage the altered text, rather than disposing of the text
+ * layout object and creating a new one.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout object to dispose of.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUDisposeTextLayout( iTextLayout: ATSUTextLayout ): OSStatus; external name '_ATSUDisposeTextLayout';
+
+
+{
+ * ATSUSetTextLayoutRefCon()
+ *
+ * Summary:
+ * Sets application-specific data for a text layout object.
+ *
+ * Discussion:
+ * This function associates a reference constant (that is,
+ * application-specific data) with a text layout object. You might
+ * typically use ATSUSetTextLayoutRefCon to track user preferences
+ * that can effect layout, for example. If you copy or clear a text
+ * layout object containing a reference constant, the reference
+ * constant is not copied or removed. When you dispose of a text
+ * layout object that contains a reference constant, you are
+ * responsible for freeing any memory allocated for the reference
+ * constant. Calling the function ATSUDisposeTextLayout does not do
+ * so.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * A layout for which you wish to set a reference constant.
+ *
+ * iRefCon:
+ * Any arbitrary 32-bit value you wish to store in association
+ * with iTextLayout.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUSetTextLayoutRefCon( iTextLayout: ATSUTextLayout; iRefCon: UInt32 ): OSStatus; external name '_ATSUSetTextLayoutRefCon';
+
+
+{
+ * ATSUGetTextLayoutRefCon()
+ *
+ * Summary:
+ * Obtains application-specific data for a text layout object.
+ *
+ * Discussion:
+ * This function obtains a reference constant (that is,
+ * application-specific data) associated with a text layout object.
+ * To associate a reference constant with a text layout object, call
+ * the function ATSUSetTextLayoutRefCon.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * A layout for which you wish to retreive the reference constant.
+ *
+ * oRefCon:
+ * On return, the reference constant associated with iTextLayout.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetTextLayoutRefCon( iTextLayout: ATSUTextLayout; var oRefCon: UInt32 ): OSStatus; external name '_ATSUGetTextLayoutRefCon';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI text buffer manipulation }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUSetTextPointerLocation()
+ *
+ * Summary:
+ * Associates a text buffer with a text layout object or updates
+ * previously associated text.
+ *
+ * Discussion:
+ * For ATSUI to render your text, you must associate the text with
+ * both a text layout object and style information. Some functions,
+ * such as ATSUCreateTextLayoutWithTextPtr, create a text layout
+ * object and associate text with it concurrently. However, if you
+ * use the function ATSUCreateTextLayout to create a text layout
+ * object, you must assign text to the object prior to attempting
+ * most ATSUI operations. You can use the function
+ * ATSUSetTextPointerLocation to associate text with a layout
+ * object. When you call this function, you are both assigning a
+ * text buffer to a text layout object and specifying the current
+ * text subrange within the buffer to include in the layout. If
+ * there is already text associated with a text layout object,
+ * calling ATSUSetTextPointerLocation overrides the previously
+ * associated text, as well as clearing the object's layout caches.
+ * You would typically only call this function for a text layout
+ * object with existing associated text if either (a) both the
+ * buffer itself is relocated and a subrange of the buffer's text is
+ * deleted or inserted or (b) when associating an entirely different
+ * buffer with a text layout object. Note that, because ATSUI
+ * objects retain state, doing superfluous calling can degrade
+ * performance. For example, you could call
+ * ATSUSetTextPointerLocation rather than ATSUTextInserted when the
+ * user simply inserts a subrange of text within a text buffer, but
+ * there would be a performance penalty, as all the layout caches
+ * are flushed by ATSUSetTextPointerLocation, rather than just the
+ * affected ones. Similarly, you should not call
+ * ATSUSetTextPointerLocation, when an entire text buffer associated
+ * with a text layout object is relocated, but no other changes have
+ * occurred that would affect the buffer's current subrange.
+ * Instead, you should call ATSUTextMoved, which is a more focused
+ * function and therefore more efficient. After associating text
+ * with a text layout object, use ATSUSetRunStyle to associate style
+ * information with the text. You can then call the function
+ * ATSUDrawText to display the text or a subrange of the text.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout object for which you wish to associate a text buffer.
+ *
+ * iText:
+ * A pointer to a buffer of Unicode text in UTF-16 format. This is
+ * the text that will be associated with iTextLayout.
+ *
+ * iTextOffset:
+ * The starting offset of the subrange of the text buffer you wish
+ * to associate with iTextLayout. To indicate that the specified
+ * text range starts at the beginning of the text buffer, you can
+ * pass the constant kATSUFromTextBeginning . To specify the
+ * entire text buffer, pass kATSUFromTextBeginning in this
+ * parameter and kATSUToTextEnd in the iTextLength parameter.
+ *
+ * iTextLength:
+ * The length of the subrage of the text buffer you wish to
+ * associate with iTextLayout. Note that the sum of iTextOffset
+ * and iTextLength must be less than or equal to the value of the
+ * iTextTotalLength parameter. If you want the range of text to
+ * extend to the end of the text buffer, you can pass the constant
+ * kATSUToTextEnd.
+ *
+ * iTextTotalLength:
+ * The length of the entire text buffer. This value should be
+ * greater than or equal to the range of text defined by the
+ * iTextLength 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUSetTextPointerLocation( iTextLayout: ATSUTextLayout; iText: ConstUniCharArrayPtr; iTextOffset: UniCharArrayOffset; iTextLength: UniCharCount; iTextTotalLength: UniCharCount ): OSStatus; external name '_ATSUSetTextPointerLocation';
+
+
+{
+ * ATSUGetTextLocation()
+ *
+ * Summary:
+ * Returns information about the Unicode text buffer associated with
+ * a layout.
+ *
+ * Discussion:
+ * For a given layout, ATSUGetTextLocation will return information
+ * about the Unicode text buffer associated with it, including its
+ * memory location, its size, and whether it is stored in a handle.
+ * Note that since a layout may refer to a subrange within a text
+ * buffer, parameters defining this subrange are included. oOffset
+ * and oTextLength give information about the subrange, while oText
+ * and oTextTotalLength give information about the entire text
+ * buffer. You may pass NULL for any parameters you are not
+ * interested in. Only iTextLayout is required.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * A text layout whose text buffer you want information regarding.
+ *
+ * oText:
+ * A pointer to data of any type. On return, the pointer is set to
+ * either a pointer or a handle that refers to the text buffer for
+ * the specified text layout object. can be NULL
+ *
+ * oTextIsStoredInHandle:
+ * On return, the value is set to true if the text buffer referred
+ * to by the oText parameter is accessed by a handle; if false, a
+ * pointer. can be NULL
+ *
+ * oOffset:
+ * On return, the offset from the beginning of the text buffer to
+ * the first character of the layout's current text range. can be NULL
+ *
+ * oTextLength:
+ * On return, the value specifies the length of the layout's
+ * current text range. can be NULL
+ *
+ * oTextTotalLength:
+ * On return, the total length of the text buffer. Note this is
+ * not necessarily the same as the length of the layout's current
+ * range. (A layout may refer to only a subrange within a text
+ * buffer.) can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetTextLocation( iTextLayout: ATSUTextLayout; oText: PtrPtr; oTextIsStoredInHandle: BooleanPtr; oOffset: UniCharArrayOffsetPtr; oTextLength: UniCharCountPtr; oTextTotalLength: UniCharCountPtr ): OSStatus; external name '_ATSUGetTextLocation';
+
+
+{
+ * ATSUTextDeleted()
+ *
+ * Summary:
+ * Informs ATSUI of the location and length of a text deletion.
+ *
+ * Discussion:
+ * When you call the ATSUTextDeleted function to inform ATSUI of a
+ * text deletion, it shortens the style run(s) containing the
+ * deleted text by the amount of the deletion. If a style run
+ * corresponds entirely to a range of deleted text, that style run
+ * is removed. If the deletion point is between two style runs, the
+ * first style run is shortened (or removed). The ATSUTextDeleted
+ * function also shortens the total length of the text buffer
+ * containing the deleted text by the amount of the deletion. That
+ * is, it shifts the memory location of the text following the
+ * deleted text by iDeletedRangeLength .ATSUTextDeleted also removes
+ * any soft line breaks that fall within the deleted text and
+ * updates affected drawing caches. The ATSUTextDeleted function
+ * does not change the actual memory location of the affected text.
+ * You are responsible for deleting the corresponding text is from
+ * the text buffer. You are also responsible for calling the
+ * function ATSUDisposeStyle to dispose of the memory associated
+ * with any style runs that have been removed. Note that calling the
+ * function ATSUTextDeleted automatically removes previously-set
+ * soft line breaks if the line breaks are within the range of text
+ * that is deleted.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The text layout containing the deleted text.
+ *
+ * iDeletedRangeStart:
+ * The starting location of the deleted text. To specify a
+ * deletion point at the beginning of the text buffer, you can
+ * pass the constant kATSUFromTextBeginning. To specify that the
+ * entire text buffer has been deleted, pass
+ * kATSUFromTextBeginning in this parameter and kATSUToTextEnd in
+ * the iDeletedRangeLength parameter.
+ *
+ * iDeletedRangeLength:
+ * The length of the deleted text. To specify a deletion length
+ * extending to the end of the text buffer, you can pass the
+ * constant kATSUToTextEnd.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUTextDeleted( iTextLayout: ATSUTextLayout; iDeletedRangeStart: UniCharArrayOffset; iDeletedRangeLength: UniCharCount ): OSStatus; external name '_ATSUTextDeleted';
+
+
+{
+ * ATSUTextInserted()
+ *
+ * Summary:
+ * Informs ATSUI of the location and length of a text insertion.
+ *
+ * Discussion:
+ * When you call the ATSUTextInserted function to inform ATSUI of a
+ * text insertion, it extends the style run containing the insertion
+ * point by the amount of the inserted text. If the insertion point
+ * is between two style runs, the first style run is extended to
+ * include the new text. The ATSUTextInserted function also extends
+ * the total length of the text buffer containing the inserted text
+ * by the amount of the inserted text. That is, it shifts the memory
+ * location of the text following the inserted text by
+ * iInsertionLength. ATSUTextInserted then updates drawing caches.
+ * Note that the ATSUTextInserted function does not change the
+ * actual memory location of the inserted text. You are responsible
+ * for placing the inserted text into the text buffer at the
+ * appropriate location. The ATSUTextInserted function does not
+ * insert style runs or line breaks; to do so, call the functions
+ * ATSUSetRunStyle and ATSUSetSoftLineBreak, respectively. Break
+ * line operations should be redone after you call ATSUTextInserted.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The text layout in which the text insertion is taking place.
+ *
+ * iInsertionLocation:
+ * The offset corresponding to the beginning of the inserted text.
+ *
+ * iInsertionLength:
+ * The length of the inserted text.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUTextInserted( iTextLayout: ATSUTextLayout; iInsertionLocation: UniCharArrayOffset; iInsertionLength: UniCharCount ): OSStatus; external name '_ATSUTextInserted';
+
+
+{
+ * ATSUTextMoved()
+ *
+ * Summary:
+ * Informs ATSUI of the new memory location of relocated text.
+ *
+ * Discussion:
+ * You should call the ATSUTextMoved function when a range of text
+ * consisting of less than an entire text buffer has been moved. The
+ * ATSUTextMoved function informs ATSUI of the new memory location
+ * of the text. You are responsible for moving the text. The text
+ * buffer should remain otherwise unchanged.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The text layout containing the moved text.
+ *
+ * iNewLocation:
+ * The new memory location of the moved text.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUTextMoved( iTextLayout: ATSUTextLayout; iNewLocation: ConstUniCharArrayPtr ): OSStatus; external name '_ATSUTextMoved';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI layout controls }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUCopyLayoutControls()
+ *
+ * Summary:
+ * Copies all layout control attribute settings from a source text
+ * layout object to a destination text layout object.
+ *
+ * Discussion:
+ * This function copies all layout control attribute values to a
+ * destination text layout object from a source text layout object,
+ * including any default (unset) values in the source object. For a
+ * list of tags and their default values, see the definition of
+ * ATSUAttributeTag. Reference constants and the contents of memory
+ * referenced by pointers within custom layout attributes are not
+ * copied. You are responsible for ensuring that this memory remains
+ * valid until both the source and destination text layout objects
+ * are disposed. To copy line control attribute values from one text
+ * layout object to another, call the function ATSUCopyLineControls.
+ *
+ * Parameters:
+ *
+ * iSourceTextLayout:
+ * The text layout to copy layout controls from.
+ *
+ * iDestTextLayout:
+ * The text layout to copy layout controls to.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCopyLayoutControls( iSourceTextLayout: ATSUTextLayout; iDestTextLayout: ATSUTextLayout ): OSStatus; external name '_ATSUCopyLayoutControls';
+
+
+{
+ * ATSUSetLayoutControls()
+ *
+ * Summary:
+ * Sets layout control attribute values in a text layout object.
+ *
+ * Discussion:
+ * When you use ATSUI to image your text, you can control the text's
+ * display and formatting at a number of different levels: layout,
+ * line, and run. The level affected by this function is the layout
+ * level, which is that of the entire text range associated with
+ * your text layout object. Attributes at this level affect the
+ * width of the text area from margin to margin, the alignment of
+ * the text, its justification, rotation, and direction, as well as
+ * other layout options. See ATSUSetLineControls for information
+ * about controling text and the line level. Similar to style
+ * attributes, you use a "triple" to specify a line or layout
+ * control attribute. That is, (1) an attribute tag, (2) the size
+ * (in bytes) of the attribute value, and (3) the value of the
+ * attribute it sets. Attribute tags are constants supplied by
+ * ATSUI. Attribute values may be a scalar, a structure, or a
+ * pointer. And as with style attributes, you can also create a
+ * custom attribute for a line or layout attribute for which ATSUI
+ * does not provide a tag. For a list of layout control tags defined
+ * by ATSUI and their default values, see the definition of
+ * ATSUAttributeTag.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The text layout in which to set layout-level controls.
+ *
+ * iAttributeCount:
+ * The number of attributes to set. This value should correspond
+ * to the number of elements in the iTag, iValueSize, and iValue
+ * arrays.
+ *
+ * iTag:
+ * An array of attribute tags to set. For a list of layout control
+ * tags defined by ATSUI and their default values, see the
+ * definition of ATSUAttributeTag.
+ *
+ * iValueSize:
+ * An array of values indicating the sizes of the values pointed
+ * to by the elements in the iValue array.
+ *
+ * iValue:
+ * An array of attribute value pointers. Each value in the array
+ * must correspond to a tag in the iTag array and be a legal value
+ * for that tag.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUSetLayoutControls( iTextLayout: ATSUTextLayout; iAttributeCount: ItemCount; iTag: ATSUAttributeTagPtr; iValueSize: ByteCountPtr; iValue: ATSUAttributeValuePtrPtr ): OSStatus; external name '_ATSUSetLayoutControls';
+
+
+{
+ * ATSUGetLayoutControl()
+ *
+ * Summary:
+ * Obtains a single layout control attribute value for a text layout
+ * object.
+ *
+ * Discussion:
+ * Before calling ATSUGetLayoutControl, you should call the function
+ * ATSUGetAllLayoutControls to obtain an array of nondefault layout
+ * control attribute tags and value sizes for the text layout
+ * object. You can then pass the tag and value size for the
+ * attribute value to obtain to ATSUGetLayoutControl. Typically you
+ * use the function ATSUGetLayoutControl by calling it twice, as
+ * follows: (1) Pass a reference to the text layout object to
+ * examine in the iTextLayout parameter, NULL for the oValue
+ * parameter, 0 for the iExpectedValueSize parameter.
+ * ATSUGetLayoutControl returns the actual size of the attribute
+ * value in the oActualValueSize parameter. (2) Allocate enough
+ * space for an array of the returned size, then call the
+ * ATSUGetLayoutControl function again, passing a valid pointer in
+ * the oValue parameter. On return, the pointer refers to the actual
+ * attribute value contained in the text layout object. For a list
+ * of layout control tags defined by ATSUI and their default values,
+ * see the definition of ATSUAttributeTag.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The text layout for which you wish to obtain a single layout
+ * control value.
+ *
+ * iTag:
+ * An attribute tag specifying the layout control value you wish
+ * to obtain. For a list of layout control tags defined by ATSUI
+ * and their default values, see the definition of
+ * ATSUAttributeTag.
+ *
+ * iExpectedValueSize:
+ * The size in bytes of the buffer you have allocated for the
+ * oValue parameter.
+ *
+ * oValue:
+ * On return, the value assocaited with the layout tag specified
+ * by the iTag parameter. can be NULL
+ *
+ * oActualValueSize:
+ * On return, the value contains the actual size (in bytes) of the
+ * attribute value. You should examine this parameter if you are
+ * unsure of the size of the attribute value being obtained, as in
+ * the case of custom layout control attributes. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetLayoutControl( iTextLayout: ATSUTextLayout; iTag: ATSUAttributeTag; iExpectedValueSize: ByteCount; oValue: ATSUAttributeValuePtr; oActualValueSize: ByteCountPtr ): OSStatus; external name '_ATSUGetLayoutControl';
+
+
+{
+ * ATSUGetAllLayoutControls()
+ *
+ * Summary:
+ * Obtains an array of non-default layout control attribute tags and
+ * value sizes for a text layout object.
+ *
+ * Discussion:
+ * This function function obtains all nondefault layout control
+ * attribute tags and their values sizes for a text layout object.
+ * You can pass a tag and value size pair obtained from
+ * ATSUGetAllLayoutControls to the function ATSUGetLayoutControl to
+ * determine the corresponding attribute value. Typically you use
+ * the function ATSUGetAllLayoutControls by calling it twice, as
+ * follows: (1) Pass a reference to the text layout object to
+ * examine in the iTextLayout parameter, NULL for the
+ * oAttributeInfoArray parameter, a pointer to an ItemCount value in
+ * the oTagValuePairCount parameter, and 0 for the
+ * iTagValuePairArraySize parameter. ATSUGetAllLayoutControls
+ * returns the size of the tag and value size arrays in the
+ * oTagValuePairCount parameter. (2) Allocate enough space for an
+ * array of the returned size, then call the
+ * ATSUGetAllLayoutControls function again, passing a valid pointer
+ * in the oAttributeInfoArray parameter. On return, the pointer
+ * refers to an array of the layout control attribute tag and value
+ * size pairs contained in the text layout object.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout for which you wish to obtain the set of non-default
+ * layout tags.
+ *
+ * oAttributeInfoArray:
+ * On return, this array contains pairs of tags and value sizes
+ * for the object's layout control attributes that are not at
+ * default values. If you are uncertain of how much memory to
+ * allocate for this parameter, see the Discussion.
+ *
+ * iTagValuePairArraySize:
+ * A value specifying the maximum number of tag and value size
+ * pairs to obtain for the text layout object. Typically, this is
+ * equivalent to the number of ATSUAttributeInfo structures for
+ * which you have allocated memory in the oAttributeInfoArray
+ * parameter. To determine this value, see the Discussion.
+ *
+ * oTagValuePairCount:
+ * On return, the value specifies the actual number of
+ * ATSUAttributeInfo structures in the text layout object. This
+ * may be greater than the value you specified in the
+ * iTagValuePairArraySize 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetAllLayoutControls( iTextLayout: ATSUTextLayout; oAttributeInfoArray: ATSUAttributeInfoPtr; iTagValuePairArraySize: ItemCount; var oTagValuePairCount: ItemCount ): OSStatus; external name '_ATSUGetAllLayoutControls';
+
+
+{
+ * ATSUClearLayoutControls()
+ *
+ * Summary:
+ * Restores default values to the specified layout control
+ * attributes of a text layout object.
+ *
+ * Discussion:
+ * This function removes those layout control attribute values
+ * identified by the tag constants in the iTag array and replaces
+ * them with the default values. If you specify that any currently
+ * unset attribute values be removed, the function does not return
+ * an error. For a list of layout control tags defined by ATSUI and
+ * their default values, see the definition of ATSUAttributeTag.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The text layout in which you wish to clear layout controls.
+ *
+ * iTagCount:
+ * The number of tags you wish to clear. This value should
+ * correspond to the nuumber of elements in the iTag array. Pass
+ * kATSUClearAll for this parameter if you wish to clear all
+ * layout controls.
+ *
+ * iTag:
+ * An array of layout control tags to be cleared. For a list of
+ * layout control tags defined by ATSUI and their default values,
+ * see the definition of ATSUAttributeTag. You may pass NULL for
+ * this parameter if you are passing kATSUClearAll for the
+ * iTagCount parameter. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUClearLayoutControls( iTextLayout: ATSUTextLayout; iTagCount: ItemCount; iTag: ATSUAttributeTagPtr ): OSStatus; external name '_ATSUClearLayoutControls';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI line controls }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUCopyLineControls()
+ *
+ * Summary:
+ * Copies line control attribute settings from a line in a source
+ * text layout object to a line in a destination text layout object.
+ *
+ * Discussion:
+ * This function copies all line control attribute values to a line
+ * in a destination text layout object from a line in a source text
+ * layout object, including any default (unset) values in the source
+ * line. Unset line control attributes are assigned the default
+ * values. ATSUCopyLineControls does not copy the contents of memory
+ * referenced by pointers within custom line attributes or within
+ * reference constants. You are responsible for ensuring that this
+ * memory remains valid until the source text layout object is
+ * disposed.
+ *
+ * Parameters:
+ *
+ * iSourceTextLayout:
+ * The text layout object from which to copy line control
+ * attributes.
+ *
+ * iSourceLineStart:
+ * The start of the line from which to copy line control
+ * attributes.
+ *
+ * iDestTextLayout:
+ * The text layout object for which to set line control
+ * attributes. This can be the same text layout object passed in
+ * the iSourceTextLayout parameter if you want to copy line
+ * control attributes from one line to another within a text
+ * layout object.
+ *
+ * iDestLineStart:
+ * The start of the line to which to copy line control attributes.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCopyLineControls( iSourceTextLayout: ATSUTextLayout; iSourceLineStart: UniCharArrayOffset; iDestTextLayout: ATSUTextLayout; iDestLineStart: UniCharArrayOffset ): OSStatus; external name '_ATSUCopyLineControls';
+
+
+{
+ * ATSUSetLineControls()
+ *
+ * Summary:
+ * Sets one or more line control values for a specified line in a
+ * text layout.
+ *
+ * Discussion:
+ * When you use ATSUI to image your text, you can control the text's
+ * display and formatting at a number of different levels: layout,
+ * line, and run. The level affected by this function is the line
+ * level. These attributes are similar to those that you can apply
+ * on a full-layout basis, but each affects only an individual text
+ * line. Note that setting line control attributes overrides the
+ * corresponding layout-level settings. Also, from a performance
+ * standpoint, it is preferable to work from the layout level and
+ * not specify such controls line by line unless necessary. Lines
+ * are determined by soft breaks that may be set in your layout. You
+ * can specify a line by giving a starting offset into the text
+ * buffer. Attributes at this level affect the width of the text
+ * area from margin to margin, the alignment of the text, its
+ * justification, rotation, and direction, as well as other layout
+ * options. Similar to style attributes, you use a "triple" to
+ * specify a line or layout control attribute. That is, (1) an
+ * attribute tag, (2) the size (in bytes) of the attribute value,
+ * and (3) the value of the attribute it sets. Attribute tags are
+ * constants supplied by ATSUI. Attribute values may be a scalar, a
+ * structure, or a pointer. And as with style attributes, you can
+ * also create a custom attribute for a line or layout attribute for
+ * which ATSUI does not provide a tag. For a list of line control
+ * tags defined by ATSUI and their default values, see the
+ * definition of ATSUAttributeTag.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout in which you wish to set line controls.
+ *
+ * iLineStart:
+ * The starting offset of the line for which you wish to set
+ * controls.
+ *
+ * iAttributeCount:
+ * The number of attributes to set. This value should correspond
+ * to the number of elements in the iTag, iValueSize, and iValue
+ * arrays.
+ *
+ * iTag:
+ * An array of attribute tags to set. For a list of line control
+ * tags defined by ATSUI and their default values, see the
+ * definition of ATSUAttributeTag.
+ *
+ * iValueSize:
+ * An array of values indicating the sizes of the values pointed
+ * to by the elements in the iValue array.
+ *
+ * iValue:
+ * An array of attribute value pointers. Each value in the array
+ * must correspond to a tag in the iTag array and be a legal value
+ * for that tag.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUSetLineControls( iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset; iAttributeCount: ItemCount; iTag: ATSUAttributeTagPtr; iValueSize: ByteCountPtr; iValue: ATSUAttributeValuePtrPtr ): OSStatus; external name '_ATSUSetLineControls';
+
+
+{
+ * ATSUGetLineControl()
+ *
+ * Summary:
+ * Obtains a single line control attribute value for a line in a
+ * text layout object.
+ *
+ * Discussion:
+ * Before calling ATSUGetLineControl, you should call the function
+ * ATSUGetAllLineControls to obtain an array of nondefault line
+ * control attribute tags and value sizes for the line. You can then
+ * pass the tag and value size for the attribute value to obtain to
+ * ATSUGetLineControl. Typically you use the function
+ * ATSUGetLineControl by calling it twice, as follows: (1) Pass a
+ * reference to the text layout object to examine in the iTextLayout
+ * parameter, NULL for the oValue parameter, 0 for the
+ * iExpectedValueSize parameter. ATSUGetLineControl returns the
+ * actual size of the attribute value in the oActualValueSize
+ * parameter. (2) Allocate enough space for an array of the returned
+ * size, then call the ATSUGetLineControl function again, passing a
+ * valid pointer in the oValue parameter. On return, the pointer
+ * refers to the actual attribute value contained for the line in
+ * the text layout object.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The text layout for which to obtain a line control value.
+ *
+ * iLineStart:
+ * The start of the line for which to obtain a line control value.
+ *
+ * iTag:
+ * A tag specifying the line control value to be obtained. For a
+ * list of line control tags defined by ATSUI and their default
+ * values, see the definition of ATSUAttributeTag.
+ *
+ * iExpectedValueSize:
+ * The expected size (in bytes) of the value to obtain.
+ *
+ * oValue:
+ * On return, the actual attribute value. If you are uncertain of
+ * how much memory to allocate, see the Discussion. can be NULL
+ *
+ * oActualValueSize:
+ * On return, the value contains the actual size (in bytes) of the
+ * attribute value. You should examine this parameter if you are
+ * unsure of the size of the attribute value being obtained, as in
+ * the case of custom line control attributes. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetLineControl( iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset; iTag: ATSUAttributeTag; iExpectedValueSize: ByteCount; oValue: ATSUAttributeValuePtr; oActualValueSize: ByteCountPtr ): OSStatus; external name '_ATSUGetLineControl';
+
+
+{
+ * ATSUGetAllLineControls()
+ *
+ * Summary:
+ * Obtains an array of line control attribute tags and value sizes
+ * for a line in a text layout object.
+ *
+ * Discussion:
+ * This function obtains all nondefault line control attribute tags
+ * and their values sizes for a line in a text layout object. You
+ * can pass a tag and value size pair obtained from
+ * ATSUGetAllLineControls to the function ATSUGetLineControl to
+ * determine the corresponding attribute value. Typically you use
+ * the function ATSUGetAllLineControls by calling it twice, as
+ * follows: (1) Pass a reference to the text layout object to
+ * examine in the iTextLayout parameter, the appropriate
+ * UniCharArrayOffset value in the iLineStart parameter, NULL for
+ * the oAttributeInfoArray parameter, a pointer to an ItemCount
+ * value in the oTagValuePairCount parameter, and 0 for the
+ * iTagValuePairArraySize parameter. ATSUGetAllLineControls returns
+ * the size of the tag and value size arrays in the
+ * oTagValuePairCount parameter. (2) Allocate enough space for an
+ * array of the returned size, then call the ATSUGetAllLineControls
+ * function again, passing a valid pointer in the
+ * oAttributeInfoArray parameter. On return, the pointer refers to
+ * an array of the line control attribute tag and value size pairs
+ * contained in the specified line. To obtain the nondefault layout
+ * control attribute tags and value sizes for a text layout object,
+ * call the function ATSUGetAllLayoutControls.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout for which you wish to obtain line control
+ * information.
+ *
+ * iLineStart:
+ * The beginning of the line for which you wish to obtain line
+ * control information.
+ *
+ * oAttributeInfoArray:
+ * On return, this array contains pairs of tags and value sizes
+ * for the object's line control attributes that are not at
+ * default values. If you are uncertain of how much memory to
+ * allocate for this array, see the Discussion. can be NULL
+ *
+ * iTagValuePairArraySize:
+ * The size of of the array you allocated for the
+ * oAttributeInfoArray parameter.
+ *
+ * oTagValuePairCount:
+ * On return, the value specifies the actual number of
+ * ATSUAttributeInfo structures in the line. This may be greater
+ * than the value you specified in the iTagValuePairArraySize
+ * parameter. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetAllLineControls( iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset; oAttributeInfoArray: ATSUAttributeInfoPtr; iTagValuePairArraySize: ItemCount; oTagValuePairCount: ItemCountPtr ): OSStatus; external name '_ATSUGetAllLineControls';
+
+
+{
+ * ATSUClearLineControls()
+ *
+ * Summary:
+ * Restores default values to the specified line control attributes
+ * of a text layout object.
+ *
+ * Discussion:
+ * This function removes those line control attribute values
+ * identified by the tag constants in the iTag array and replaces
+ * them with the default values. If you specify that any currently
+ * unset attribute values be removed, the function does not return
+ * an error. For a list of line control tags defined by ATSUI and
+ * their default values, see the definition of ATSUAttributeTag.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The text layout in which you wish to clear line controls.
+ *
+ * iLineStart:
+ * The start of the line in which to clear line controls.
+ *
+ * iTagCount:
+ * The number of tags you wish to clear. This value should
+ * correspond to the nuumber of elements in the iTag array. Pass
+ * kATSUClearAll to clear all line controls.
+ *
+ * iTag:
+ * An array of line control tags to be cleared. For a list of line
+ * control tags defined by ATSUI and their default values, see the
+ * definition of ATSUAttributeTag. You may pass NULL for this
+ * parameter if you are passing kATSUClearAll for the iTagCount
+ * parameter. can be NULL
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUClearLineControls( iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset; iTagCount: ItemCount; iTag: ATSUAttributeTagPtr ): OSStatus; external name '_ATSUClearLineControls';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI style run processing }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUSetRunStyle()
+ *
+ * Summary:
+ * Defines a style run by associating style information with a run
+ * of text.
+ *
+ * Discussion:
+ * A text run consists of one or more characters that are contiguous
+ * in memory. If you associate these characters with a distinct
+ * style, you define a style run. You can use the ATSUSetRunStyle
+ * function to define a style run, by associating a style object
+ * with a run of text in a text layout object. Each text run must be
+ * assigned a style object, which may or may not differ from other
+ * style objects assigned to other text runs in a given text layout
+ * object. After calling ATSUSetRunStyle, you can call the function
+ * ATSUDrawText to display the styled text. When you call
+ * ATSUDrawText, if you have not previously assigned styles to all
+ * the characters you request to be drawn, ATSUI automatically does
+ * so. Specifically, ATSUI extends the first style it locates
+ * immediately prior (in storage order) to the unstyled characters
+ * to include those unassigned characters. If the unstyled
+ * characters are at the beginning of the text stream, ATSUI finds
+ * the first style run in the stream and extends it backward to the
+ * first character. You should call ATSUSetRunStyle whenever you
+ * create a new text layout object without any associated styles, as
+ * by using the function ATSUCreateTextLayout. You should also call
+ * ATSUSetRunStyle to assign a style to a text run in response to a
+ * user action, such as when the user selects a run of text and
+ * changes the font. You do not need to call ATSUSetRunStyle when
+ * you change style attributes or text layout attributes. In such
+ * cases, ATSUI automatically updates the layout of the text as
+ * appropriate.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout in which you wish to set the style run.
+ *
+ * iStyle:
+ * The style to be assigned to the run of characters.
+ *
+ * iRunStart:
+ * The start of the run of characters. To specify the beginning of
+ * the text buffer, pass kATSUFromTextBeginning for this parameter.
+ *
+ * iRunLength:
+ * The end of the run of characters. To specify a run that
+ * continues to the end of the text buffer, pass kATSUToTextEnd
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUSetRunStyle( iTextLayout: ATSUTextLayout; iStyle: ATSUStyle; iRunStart: UniCharArrayOffset; iRunLength: UniCharCount ): OSStatus; external name '_ATSUSetRunStyle';
+
+
+{
+ * ATSUGetRunStyle()
+ *
+ * Summary:
+ * Obtains style run information for a character offset in a run of
+ * text.
+ *
+ * Discussion:
+ * You can use the ATSUGetRunStyle function to obtain the style
+ * object assigned to a given text offset. ATSUGetRunStyle also
+ * produces the encompassing text range that shares the style object
+ * with the offset. Note that the style object contains those
+ * previously set style attributes, font features, and font
+ * variations that are continuous for the range of text that
+ * includes the specified text offset. If you want to obtain all
+ * shared style information for a style run, including any unset
+ * attributes, call the function ATSUGetContinuousAttributes
+ * instead. If only one style run is set in the text layout object,
+ * and it does not cover the entire text layout object,
+ * ATSUGetRunStyle uses the style run information for the iOffset
+ * parameter to set the style run information for the remaining text.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout for which to obtain style run information.
+ *
+ * iOffset:
+ * The beginning character for which you want to obtain style run
+ * information.
+ *
+ * oStyle:
+ * On return, the style object assigned to the range of text
+ * containing the character at iOffset. Note that if you pass an
+ * offset in the iOffset parameter that is at a style run
+ * boundary, ATSUGetRunStyle produces style run information for
+ * the following, not preceding, style run.
+ *
+ * oRunStart:
+ * On return, the offset from the beginning of the text buffer to
+ * the first character of the style run containing the character
+ * at iOffset. Note that the entire style run does not necessarily
+ * share the same unset attribute values as the character at
+ * iOffset.
+ *
+ * oRunLength:
+ * On return, the length of the style run containing the character
+ * at iOffset.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetRunStyle( iTextLayout: ATSUTextLayout; iOffset: UniCharArrayOffset; var oStyle: ATSUStyle; var oRunStart: UniCharArrayOffset; var oRunLength: UniCharCount ): OSStatus; external name '_ATSUGetRunStyle';
+
+
+{
+ * ATSUGetContinuousAttributes()
+ *
+ * Summary:
+ * Obtains the style attribute values that are continuous over a
+ * given text range.
+ *
+ * Discussion:
+ * This function examines the specified text range to obtain the
+ * style attribute values (including those at default values) that
+ * remain consistent for the entire text range. You should call
+ * ATSUGetContinuousAttributes to determine the style information
+ * that remains constant over text that has been selected by the
+ * user.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout for which you wish to obtain style run information.
+ *
+ * iOffset:
+ * The starting character for which to examine style run
+ * attributes. To specify the beginning of the text buffer, pass
+ * kATSUFromTextBeginning for this parameter.
+ *
+ * iLength:
+ * The length of the range of characters to examine. To specify a
+ * range that continues to the end of the text buffer, pass
+ * kATSUToTextEnd for this parameter.
+ *
+ * oStyle:
+ * On return, a style object containing those attributes which are
+ * the same for the entire text range specified by the iOffset and
+ * iLength parameters.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetContinuousAttributes( iTextLayout: ATSUTextLayout; iOffset: UniCharArrayOffset; iLength: UniCharCount; oStyle: ATSUStyle ): OSStatus; external name '_ATSUGetContinuousAttributes';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI tab support }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUSetTabArray()
+ *
+ * Summary:
+ * Sets a tab ruler for a text layout object.
+ *
+ * Discussion:
+ * When a tab ruler is set for a text layout object, ATSUI
+ * automatically aligns text such that any tabs characters in the
+ * text are laid out to follow the tab ruler's specifications. If
+ * you want to use tabs in your text and you also want to use the
+ * function ATSUBatchBreakLines, then you must set tabs by calling
+ * the function ATSUSetTabArray. See the definition of ATSUTab for
+ * more information about setting up a tab ruler.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The layout in which to set the tab array.
+ *
+ * iTabs:
+ * An array of tabstops. See the definition of ATSUTab for more
+ * inforamation about specifying tabs.
+ *
+ * iTabCount:
+ * The number of tab stops in the iTabs array.
+ *
+ * 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
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function ATSUSetTabArray( iTextLayout: ATSUTextLayout; iTabs: ATSUTabPtr; iTabCount: ItemCount ): OSStatus; external name '_ATSUSetTabArray';
+
+
+{
+ * ATSUGetTabArray()
+ *
+ * Summary:
+ * Retrieves the tab ruler associated with a text layout object.
+ *
+ * Discussion:
+ * This function can be used to retrieve all the tabs that were
+ * previously set for a text layout object, using the function
+ * ATSUSetTabArray . All the returned tabs will be in order of
+ * position along the line.Typically you use the ATSUGetTabArray
+ * function by calling it twice, as follows: (1) Pass NULL for the
+ * oTabs parameter, 0 for the iMaxTabCount parameter, and valid
+ * values for the other parameters. The ATSUGetTabArray function
+ * returns the actual number of tabs in the oTabCount parameter. (2)
+ * Allocate enough space for a buffer of the returned size, then
+ * call the function again, passing a valid pointer to the buffer in
+ * the oTabs parameter. On return, the buffer contains the tab
+ * values in order of position along the line from left to right.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The text layout for which to retrieve the tab ruler.
+ *
+ * iMaxTabCount:
+ * The size of the array you have allocated for the oTabs
+ * parameter. If you are unsure what to pass for this parameter,
+ * see the Discussion.
+ *
+ * oTabs:
+ * On return, an array of ATSUTab structures specifying the
+ * currently set tab ruler for this layout. can be NULL
+ *
+ * oTabCount:
+ * On return, the number of tabs currently set in this layout.
+ * Note that this may be greater than the value you have passed
+ * for iMaxTabCount. can be 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
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER
+function ATSUGetTabArray( iTextLayout: ATSUTextLayout; iMaxTabCount: ItemCount; oTabs: ATSUTabPtr; oTabCount: ItemCountPtr ): OSStatus; external name '_ATSUGetTabArray';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI font fallback object functions }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUCreateFontFallbacks()
+ *
+ * Summary:
+ * Creates an opaque object that can be set to contain a font list
+ * and a font-search method.
+ *
+ * Discussion:
+ * After using this fucntion to create an ATSUFontFallbacks object,
+ * you can then use ATSUSetObjFontFallbacks to set the fallback
+ * method for this object, and then use the
+ * kATSULineFontFallbacksTag to apply the object to a layout. You
+ * may then either call ATSUMatchFontsToText to manually perform
+ * font substitution, or call ATSUSetTransientFontMatching to
+ * perform automatic font subtitution.
+ *
+ * Parameters:
+ *
+ * oFontFallback:
+ * On return, a reference to a newly created ATSUFontFallbacks
+ * object. You are responsible for freeing this object with
+ * ATSUDisposeFontFallbacks.
+ *
+ * Result:
+ * On success, noErr is returned. See MacErrors.h for possible error
+ * codes.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function ATSUCreateFontFallbacks( var oFontFallback: ATSUFontFallbacks ): OSStatus; external name '_ATSUCreateFontFallbacks';
+
+
+{
+ * ATSUDisposeFontFallbacks()
+ *
+ * Summary:
+ * Disposes of an ATSUDisposeFontFallbacks object.
+ *
+ * Discussion:
+ * This function will only dispose of the ATSUDisposeFontFallbacks
+ * itself. If you have allocated an array of ATSUFontIDs for use
+ * with this ATSUFontFallbacks object, you are responsible for
+ * freeing it separately.
+ *
+ * Parameters:
+ *
+ * iFontFallbacks:
+ * The ATSUFontFallbacks object to be disposed of.
+ *
+ * Result:
+ * On success, noErr is returned. See MacErrors.h for possible error
+ * codes.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function ATSUDisposeFontFallbacks( iFontFallbacks: ATSUFontFallbacks ): OSStatus; external name '_ATSUDisposeFontFallbacks';
+
+
+{
+ * ATSUSetObjFontFallbacks()
+ *
+ * Summary:
+ * Assigns a font-search method and a font list to a font fallback
+ * object.
+ *
+ * Discussion:
+ * This function allows you to define the settings for a font
+ * fallback object. These settings determine the method ATSUI uses
+ * to perform font fallbacks, as well as the font search list, if
+ * one is needed. Not all fallback methods require a search list.
+ * See the definition of ATSUFontFallbackMethod for more infomation
+ * about the different font fallback methods. Once you have called
+ * this function, you typically will want to associate the font
+ * fallback object with a text layout using ATSUSetLayoutControls
+ * and the kATSULineFontFallbacksTag attribute.
+ *
+ * Parameters:
+ *
+ * iFontFallbacks:
+ * The fallback object for which you wish to set or change
+ * settings.
+ *
+ * iFontFallbacksCount:
+ * The number of fonts contained in the iFonts array. Some font
+ * fallbacks methods do not require such a list. In such cases,
+ * you may pass zero for this paramter.
+ *
+ * iFonts:
+ * A list of fonts for ATSUI to search through when performing
+ * fallbacks. Some font fallbacks methods do not require such a
+ * list. In such cases, you may pass NULL for this parameter. can be NUL
+ *
+ * iFontFallbackMethod:
+ * The font fallback method for ATSUI to use. See the definition
+ * of ATSUFontFallbackMethod for a list of possible constants to
+ * pass in for this paramater. Note that some fallback modes
+ * require a list of fonts for ATSUI to search. In such cases, use
+ * the iFonts and iFontFallbacksCount parameters to specify this
+ * list.
+ *
+ * Result:
+ * On success, noErr is returned. See MacErrors.h for possible error
+ * codes.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function ATSUSetObjFontFallbacks( iFontFallbacks: ATSUFontFallbacks; iFontFallbacksCount: ItemCount; iFonts: ATSUFontIDPtr; iFontFallbackMethod: ATSUFontFallbackMethod ): OSStatus; external name '_ATSUSetObjFontFallbacks';
+
+
+{
+ * ATSUGetObjFontFallbacks()
+ *
+ * Summary:
+ * Returns information about the current settings in an
+ * ATSUFontFallbacks object.
+ *
+ * Discussion:
+ * Information returned includes the font-search method, and the
+ * font search list, if one is set. Note that some font fallback
+ * modes do not have a client-specified search list. You must
+ * allocate space for this list.
+ *
+ * Parameters:
+ *
+ * iFontFallbacks:
+ * The font fallback object you want to know the current settings
+ * of.
+ *
+ * iMaxFontFallbacksCount:
+ * For this parameter, pass in the size of the array you are
+ * passing in for the oFonts parameter.
+ *
+ * oFonts:
+ * On input, a buffer you have allocated for storing the font
+ * search list. On return, ATSUGetObjFontFallbacks will populate
+ * the list up to iMaxFontFallbacksCount items. can be NUL
+ *
+ * oFontFallbackMethod:
+ * On return, the font fallback method currently set for this
+ * object. See the definition of ATSUFontFallbackMethod for more
+ * information regarding the different font fallback modes.
+ *
+ * oActualFallbacksCount:
+ * On return, the size of the font search list. You can use this
+ * parameter to determine how much space to allocate for the
+ * oFonts parameter. can be NUL
+ *
+ * Result:
+ * On success, noErr is returned. See MacErrors.h for possible error
+ * codes.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER
+function ATSUGetObjFontFallbacks( iFontFallbacks: ATSUFontFallbacks; iMaxFontFallbacksCount: ItemCount; oFonts: ATSUFontIDPtr; var oFontFallbackMethod: ATSUFontFallbackMethod; oActualFallbacksCount: ItemCountPtr ): OSStatus; external name '_ATSUGetObjFontFallbacks';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI font matching }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUSetFontFallbacks()
+ *
+ * Summary:
+ * Sets font fallback behavior on a global basis.
+ *
+ * Discussion:
+ * Control of font fallback behavior on a global basis is no longer
+ * recommended. Object based font fallbacks are preferred. See the
+ * functions ATSUCreateFontFallbacks, ATSUDisposeFontFallbacks,
+ * ATSUSetObjFontFallbacks, and ATSUGetObjFontFallbacks, as well as
+ * the kATSULineFontFallbacksTag attribute for more information
+ * about object based font fallbacks.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUSetFontFallbacks( iFontFallbacksCount: ItemCount; iFontIDs: ATSUFontIDPtr; iFontFallbackMethod: ATSUFontFallbackMethod ): OSStatus; external name '_ATSUSetFontFallbacks';
+
+
+{
+ * ATSUGetFontFallbacks()
+ *
+ * Summary:
+ * Gets the current global font fallback behavior.
+ *
+ * Discussion:
+ * Control of font fallback behavior on a global basis is no longer
+ * recommended. Object based font fallbacks are preferred. See the
+ * functions ATSUCreateFontFallbacks, ATSUDisposeFontFallbacks,
+ * ATSUSetObjFontFallbacks, and ATSUGetObjFontFallbacks, as well as
+ * the kATSULineFontFallbacksTag attribute for more information
+ * about object based font fallbacks.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetFontFallbacks( iMaxFontFallbacksCount: ItemCount; oFontIDs: ATSUFontIDPtr; var oFontFallbackMethod: ATSUFontFallbackMethod; var oActualFallbacksCount: ItemCount ): OSStatus; external name '_ATSUGetFontFallbacks';
+
+
+{
+ * ATSUMatchFontsToText()
+ *
+ * Summary:
+ * Examines a text range for characters that cannot be drawn with
+ * the current font and suggests a substitute font, if necessary.
+ *
+ * Discussion:
+ * When you call the ATSUMatchFontsToText function, ATSUI scans the
+ * given range of text for characters that cannot be drawn with the
+ * currently assigned font. When ATSUI finds such a character, it
+ * identifies a substitute font for drawing the character. ATSUI
+ * then continues scanning the text range for subsequent characters
+ * that cannot be drawn, stopping when it finds a character that can
+ * be drawn with the currently assigned font, or finds a character
+ * that cannot be drawn with either the currently assigned font or
+ * the substitute font, or reaches the end of the text range you
+ * have specified. ATSUI's default behavior for finding a substitute
+ * font is to recommend the first valid font that it finds when
+ * scanning the fonts in the user's system. ATSUI first searches in
+ * the standard application fonts for various languages. If that
+ * fails, ATSUI searches through the remaining fonts on the system
+ * in the order in which the Font Manager returns the fonts. After
+ * ATSUI has searched all the fonts in the system, any unmatched
+ * text is drawn using the last-resort font. That is, missing glyphs
+ * are represented by and empty box to indicate to the user that a
+ * valid font for that character is not installed on their system.
+ * You can alter ATSUI's default search behavior by calling the
+ * function ATSUCreateFontFallbacks and defining your own font
+ * fallback settings for the text layout object. Because ATSUI does
+ * not necessarily completely scan the text range you specify with
+ * each call to ATSUMatchFontsToText, if ATSUI does find any
+ * characters that cannot be rendered with their current font, you
+ * should call ATSUMatchFontsToText again and update the input range
+ * to check that all the subsequent characters in the range can be
+ * drawn. For that reason, you should call ATSUMatchFontsToText from
+ * within a loop to assure that the entire range of text is checked.
+ * Note that calling ATSUMatchFontsToText does not cause the
+ * suggested font substitution to be performed. If you want ATSUI to
+ * perform font substitution automatically, you can call the
+ * function ATSUSetTransientFontMatching.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * The text layout object to examine.
+ *
+ * iTextStart:
+ * The first character of the range to examine. To start at the
+ * beginning of the text buffer, pass the constant
+ * kATSUFromTextBeginning.
+ *
+ * iTextLength:
+ * The length of the text range to examine. If you want the range
+ * of text to extend to the end of the text buffer, you can pass
+ * the constant kATSUToTextEnd.
+ *
+ * oFontID:
+ * On return, the value provides a font ID for the suggested
+ * substitute font or kATSUInvalidFontID, if no substitute font is
+ * available.
+ *
+ * oChangedOffset:
+ * On return, this value specifies the offset from the beginning
+ * of the text buffer to the first character that cannot be drawn
+ * with the current font.
+ *
+ * oChangedLength:
+ * On return, this value specifies the length of the text range
+ * that cannot be drawn with the current font.
+ *
+ * Result:
+ * The result code noErr indicates that all the characters in the
+ * given range can be rendered with their current font(s) and no
+ * font substitution is needed. If you receive either of the result
+ * codes kATSUFontsMatched or kATSUFontsNotMatched, you should
+ * update the input range and call ATSUMatchFontsToText again to
+ * ensure that all the characters in the range can be drawn. See
+ * MacErrors.h for other possible error codes.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUMatchFontsToText( iTextLayout: ATSUTextLayout; iTextStart: UniCharArrayOffset; iTextLength: UniCharCount; var oFontID: ATSUFontID; var oChangedOffset: UniCharArrayOffset; var oChangedLength: UniCharCount ): OSStatus; external name '_ATSUMatchFontsToText';
+
+
+{
+ * ATSUSetTransientFontMatching()
+ *
+ * Summary:
+ * Sets the current transient font matching state for a given layout.
+ *
+ * Discussion:
+ * Transient font matching allows ATSUI to automatically substitute
+ * glyphs from other fonts if the specified styles do not contain
+ * glyphs for all the characters in the text. You can change the
+ * behavior of this font substitution by calling the function
+ * ATSUCreateFontFallbacks and defining your own font fallback
+ * settings for the text layout object.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * A layout for which to set the current transient font matching
+ * state.
+ *
+ * iTransientFontMatching:
+ * A boolean value indicating if the current transient font
+ * matching state to set.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUSetTransientFontMatching( iTextLayout: ATSUTextLayout; iTransientFontMatching: Boolean ): OSStatus; external name '_ATSUSetTransientFontMatching';
+
+
+{
+ * ATSUGetTransientFontMatching()
+ *
+ * Summary:
+ * Obtains the current transient font matching state for a given
+ * layout.
+ *
+ * Discussion:
+ * Transient font matching allows ATSUI to automatically substitute
+ * glyphs from other fonts if the specified styles do not contain
+ * glyphs for all the characters in the text. You can change the
+ * behavior of this font substitution by calling the function
+ * ATSUCreateFontFallbacks and defining your own font fallback
+ * settings for the text layout object.
+ *
+ * Parameters:
+ *
+ * iTextLayout:
+ * A layout for which to obtain the current transient font
+ * matching state.
+ *
+ * oTransientFontMatching:
+ * On return, a boolean value indicating the current transient
+ * font matching state.
+ *
+ * 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
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUGetTransientFontMatching( iTextLayout: ATSUTextLayout; var oTransientFontMatching: Boolean ): OSStatus; external name '_ATSUGetTransientFontMatching';
+
+
+{ Functions listed beyond this point are either deprecated or not recommended }
+
+{ ---------------------------------------------------------------------------- }
+{ Handle-based functions }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUCreateTextLayoutWithTextHandle()
+ *
+ * Discussion:
+ * This function is no longer recommended. Please use
+ * ATSUCreateTextLayoutWithTextPtr instead.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUCreateTextLayoutWithTextHandle( iText: UniCharArrayHandle; iTextOffset: UniCharArrayOffset; iTextLength: UniCharCount; iTextTotalLength: UniCharCount; iNumberOfRuns: ItemCount; iRunLengths: UniCharCountPtr; iStyles: ATSUStylePtr; var oTextLayout: ATSUTextLayout ): OSStatus; external name '_ATSUCreateTextLayoutWithTextHandle';
+
+
+{
+ * ATSUSetTextHandleLocation()
+ *
+ * Discussion:
+ * This function is no longer recommended. Please use
+ * ATSUSetTextPointerLocation instead.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUSetTextHandleLocation( iTextLayout: ATSUTextLayout; iText: UniCharArrayHandle; iTextOffset: UniCharArrayOffset; iTextLength: UniCharCount; iTextTotalLength: UniCharCount ): OSStatus; external name '_ATSUSetTextHandleLocation';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI idle processing (deprecated) }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUIdle()
+ *
+ * Summary:
+ * Performs background processing.
+ *
+ * Discussion:
+ * Current versions of ATSUI do not implement background processing
+ * for text layout objects. In Mac OS X, the function ATSUIdle does
+ * nothing.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ATSUnicodeLib 8.5 and later
+ }
+// AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER
+function ATSUIdle( iTextLayout: ATSUTextLayout ): OSStatus; external name '_ATSUIdle';
+
+
+{ ---------------------------------------------------------------------------- }
+{ ATSUI Memory allocation specification functions (not in Carbon) }
+{ ---------------------------------------------------------------------------- }
+{
+ * ATSUCreateMemorySetting()
+ *
+ * Discussion:
+ * ATSUI memory setting functions are not necessary on Mac OS X.
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+
+
+{
+ * ATSUSetCurrentMemorySetting()
+ *
+ * Discussion:
+ * ATSUI memory setting functions are not necessary on Mac OS X.
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+
+
+{
+ * ATSUGetCurrentMemorySetting()
+ *
+ * Discussion:
+ * ATSUI memory setting functions are not necessary on Mac OS X.
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+
+
+{
+ * ATSUDisposeMemorySetting()
+ *
+ * Discussion:
+ * ATSUI memory setting functions are not necessary on Mac OS X.
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in ATSUnicodeLib 8.6 and later
+ }
+
+
+{unit Appearance}
+{
+ File: HIToolbox/Appearance.h
+
+ Contains: Appearance Manager Interfaces.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1994-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Appearance Manager constants, etc. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Appearance Manager Apple Events (1.1 and later) }
+
+
+{$ALIGN MAC68K}
+
+const
+ kAppearanceEventClass = $61707072 (* 'appr' *); { Event Class }
+ kAEAppearanceChanged = $74686D65 (* 'thme' *); { Appearance changed (e.g. platinum to hi-tech) }
+ kAESystemFontChanged = $73797366 (* 'sysf' *); { system font changed }
+ kAESmallSystemFontChanged = $7373666E (* 'ssfn' *); { small system font changed }
+ kAEViewsFontChanged = $76666E74 (* 'vfnt' *); { views font changed }
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Appearance Manager file types }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kThemeDataFileType = $74686D65 (* 'thme' *); { file type for theme files }
+ kThemePlatinumFileType = $706C746E (* 'pltn' *); { file type for platinum appearance }
+ kThemeCustomThemesFileType = $7363656E (* 'scen' *); { file type for user themes }
+ kThemeSoundTrackFileType = $74736E64 (* 'tsnd' *);
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Appearance Manager Supported Themes }
+{ Use CopyThemeIdentifier to get the current theme ID }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kThemeAppearancePlatinum CFSTRP('com.apple.theme.appearance.platinum')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kThemeAppearanceAqua CFSTRP('com.apple.theme.appearance.aqua')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kThemeAppearanceAquaBlue CFSTRP('com.apple.theme.appearance.aqua.blue')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kThemeAppearanceAquaGraphite CFSTRP('com.apple.theme.appearance.aqua.graphite')}
+{$endc}
+
+
+{
+ * AppearancePartCode
+ *
+ * Summary:
+ * These are part codes returned by a few of the hit testing
+ * Appearance APIs. Many of the Control Manager's ControlPartCodes
+ * are based on these part codes.
+ }
+type
+ AppearancePartCode = SInt16;
+const
+{
+ * This represents the lack of a part. It will be returned when the
+ * Appearance Manager's hit testing logic determines that the input
+ * point is not in any part of the widget.
+ }
+ kAppearancePartMetaNone = 0;
+
+ {
+ * This represents a widget which is not currently clickable because
+ * it is disabled.
+ }
+ kAppearancePartMetaDisabled = 254;
+
+ {
+ * This represents a widget which is inactive, presumably because it
+ * is in a window that is inactive.
+ }
+ kAppearancePartMetaInactive = 255;
+
+ {
+ * The part of a widget which indicates the widget's value. Scroll
+ * bar thumbs and slider thumbs are the two main examples.
+ }
+ kAppearancePartIndicator = 129;
+
+ {
+ * The part of a widget which moves its value visually upward. Scroll
+ * bar up arrows are the main example.
+ }
+ kAppearancePartUpButton = 20;
+
+ {
+ * The part of a widget which moves its value visually downward.
+ * Scroll bar down arrows are the main example.
+ }
+ kAppearancePartDownButton = 21;
+
+ {
+ * The part of a widget which moves its value visually leftward.
+ * Scroll bar left arrows are the main example.
+ }
+ kAppearancePartLeftButton = kAppearancePartUpButton;
+
+ {
+ * The part of a widget which moves its value visually rightward.
+ * Scroll bar right arrows are the main example.
+ }
+ kAppearancePartRightButton = kAppearancePartDownButton;
+
+ {
+ * The part of a widget which moves its value visually upward one
+ * whole page. Scroll bar page up areas are the main example.
+ }
+ kAppearancePartPageUpArea = 22;
+
+ {
+ * The part of a widget which moves its value visually downward one
+ * whole page. Scroll bar page down areas are the main example.
+ }
+ kAppearancePartPageDownArea = 23;
+
+ {
+ * The part of a widget which moves its value visually leftward one
+ * whole page. Scroll bar page left areas are the main example.
+ }
+ kAppearancePartPageLeftArea = kAppearancePartPageUpArea;
+
+ {
+ * The part of a widget which moves its value visually rightward one
+ * whole page. Scroll bar page right areas are the main example.
+ }
+ kAppearancePartPageRightArea = kAppearancePartPageDownArea;
+
+
+{
+ * AppearanceRegionCode
+ *
+ * Summary:
+ * These are region codes used by a few of window-related Appearance
+ * APIs. Many of the Window Manager's WindowRegionCodes are based on
+ * these region codes.
+ }
+type
+ AppearanceRegionCode = UInt16;
+const
+ kAppearanceRegionTitleBar = 0;
+ kAppearanceRegionTitleText = 1;
+ kAppearanceRegionCloseBox = 2;
+ kAppearanceRegionZoomBox = 3;
+ kAppearanceRegionDrag = 5;
+ kAppearanceRegionGrow = 6;
+ kAppearanceRegionCollapseBox = 7;
+ kAppearanceRegionTitleProxyIcon = 8; { Mac OS 8.5 forward}
+ kAppearanceRegionStructure = 32;
+ kAppearanceRegionContent = 33; { Content area of the window; empty when the window is collapsed}
+
+
+{
+ * Discussion:
+ * ThemeBrushes
+ }
+const
+{
+ * Use with kModalWindowClass.
+ }
+ kThemeBrushDialogBackgroundActive = 1;
+
+ {
+ * Use with kModalWindowClass.
+ }
+ kThemeBrushDialogBackgroundInactive = 2;
+
+ {
+ * Use with kAlertWindowClass and kMovableAlertWindowClass.
+ }
+ kThemeBrushAlertBackgroundActive = 3;
+
+ {
+ * Use with kAlertWindowClass and kMovableAlertWindowClass.
+ }
+ kThemeBrushAlertBackgroundInactive = 4;
+
+ {
+ * Use with kDocumentWindowClass.
+ }
+ kThemeBrushModelessDialogBackgroundActive = 5;
+
+ {
+ * Use with kDocumentWindowClass.
+ }
+ kThemeBrushModelessDialogBackgroundInactive = 6;
+
+ {
+ * Use with kFloatingWindowClass and kUtilityWindowClass.
+ }
+ kThemeBrushUtilityWindowBackgroundActive = 7;
+
+ {
+ * Use with kFloatingWindowClass and kUtilityWindowClass.
+ }
+ kThemeBrushUtilityWindowBackgroundInactive = 8;
+
+ {
+ * The background used for Finder list views.
+ }
+ kThemeBrushListViewSortColumnBackground = 9;
+ kThemeBrushListViewBackground = 10;
+ kThemeBrushIconLabelBackground = 11;
+ kThemeBrushListViewSeparator = 12;
+ kThemeBrushChasingArrows = 13;
+ kThemeBrushDragHilite = 14;
+
+ {
+ * Use with kDocumentWindowClass.
+ }
+ kThemeBrushDocumentWindowBackground = 15;
+ kThemeBrushFinderWindowBackground = 16;
+
+
+{
+ * Discussion:
+ * ThemeBrushes introduced in Appearance 1.1 (Mac OS 8.5) and later
+ }
+const
+ kThemeBrushScrollBarDelimiterActive = 17;
+ kThemeBrushScrollBarDelimiterInactive = 18;
+ kThemeBrushFocusHighlight = 19;
+ kThemeBrushPopupArrowActive = 20;
+ kThemeBrushPopupArrowPressed = 21;
+ kThemeBrushPopupArrowInactive = 22;
+ kThemeBrushAppleGuideCoachmark = 23;
+ kThemeBrushIconLabelBackgroundSelected = 24;
+ kThemeBrushStaticAreaFill = 25;
+ kThemeBrushActiveAreaFill = 26;
+ kThemeBrushButtonFrameActive = 27;
+ kThemeBrushButtonFrameInactive = 28;
+ kThemeBrushButtonFaceActive = 29;
+ kThemeBrushButtonFaceInactive = 30;
+ kThemeBrushButtonFacePressed = 31;
+ kThemeBrushButtonActiveDarkShadow = 32;
+ kThemeBrushButtonActiveDarkHighlight = 33;
+ kThemeBrushButtonActiveLightShadow = 34;
+ kThemeBrushButtonActiveLightHighlight = 35;
+ kThemeBrushButtonInactiveDarkShadow = 36;
+ kThemeBrushButtonInactiveDarkHighlight = 37;
+ kThemeBrushButtonInactiveLightShadow = 38;
+ kThemeBrushButtonInactiveLightHighlight = 39;
+ kThemeBrushButtonPressedDarkShadow = 40;
+ kThemeBrushButtonPressedDarkHighlight = 41;
+ kThemeBrushButtonPressedLightShadow = 42;
+ kThemeBrushButtonPressedLightHighlight = 43;
+ kThemeBrushBevelActiveLight = 44;
+ kThemeBrushBevelActiveDark = 45;
+ kThemeBrushBevelInactiveLight = 46;
+ kThemeBrushBevelInactiveDark = 47;
+
+
+{
+ * Discussion:
+ * ThemeBrushes introduced in Appearance 1.1.1 (Mac OS 9.0) and
+ * later.
+ }
+const
+ kThemeBrushNotificationWindowBackground = 48;
+
+
+{
+ * Discussion:
+ * ThemeBrushes introduced in Carbon. Available in Mac OS X, and
+ * Carbon Lib 1.3 and later.
+ }
+const
+{
+ * Use with kMovableModalWindowClass windows. Available in Mac OS X,
+ * and CarbonLib 1.3 and later.
+ }
+ kThemeBrushMovableModalBackground = 49;
+
+ {
+ * Use with kSheetWindowClass and kSheetAlertWindowClass. This is the
+ * backwardly compatible sheet background.
+ * kThemeBrushSheetBackgroundTransparent is preferred. Available in
+ * Mac OS X, and CarbonLib 1.3 and later.
+ }
+ kThemeBrushSheetBackgroundOpaque = 50;
+
+ {
+ * Use with kDrawerWindowClass. Available in Mac OS X, and CarbonLib
+ * 1.3 and later.
+ }
+ kThemeBrushDrawerBackground = 51;
+
+
+{
+ * Discussion:
+ * ThemeBrushes introduced in Carbon. Available in Mac OS X, and
+ * Carbon Lib 1.6 and later.
+ }
+const
+{
+ * Use with kToolbarWindowClass.
+ }
+ kThemeBrushToolbarBackground = 52;
+
+
+{
+ * Discussion:
+ * ThemeBrushes introduced in Mac OS X 10.1. Available in Mac OS X
+ * 10.1 and CarbonLib 1.6, and later.
+ }
+const
+{
+ * Use with kSheetWindowClass and kSheetAlertWindowClass. Not fully
+ * transparent -- this brush is the semi-transparent background seen
+ * with modern sheets. Available in Mac OS X 10.1 and CarbonLib 1.6,
+ * and later.
+ }
+ kThemeBrushSheetBackgroundTransparent = 53;
+
+ {
+ * Available in Mac OS X 10.1 and CarbonLib 1.6, and later.
+ }
+ kThemeBrushMenuBackground = 54;
+
+ {
+ * Available in Mac OS X 10.1 and CarbonLib 1.6, and later.
+ }
+ kThemeBrushMenuBackgroundSelected = 55;
+
+
+{
+ * Discussion:
+ * ThemeBrushes introduced in Mac OS X 10.3.
+ }
+const
+{
+ * For lists that use different colors as the background for odd and
+ * even rows (like iTunes), this brush is the background for the odd
+ * numbered rows. Available in Mac OS X 10.4 and later.
+ }
+ kThemeBrushListViewOddRowBackground = 56;
+
+ {
+ * For lists that use different colors as the background for odd and
+ * even rows (like iTunes), this brush is the background for the even
+ * numbered rows. Available in Mac OS X 10.4 and later.
+ }
+ kThemeBrushListViewEvenRowBackground = 57;
+
+ {
+ * The color for the divider lines drawn between columns in some list
+ * views. This brush may have an alpha value associated with it.
+ * Drawing this brush with QuickDraw or fetching it as an RGBColor
+ * will not necessarily yield satisfactory results.
+ }
+ kThemeBrushListViewColumnDivider = 58;
+
+
+{
+ * Discussion:
+ * ThemeBrush compatibility synonyms. The newer names are preferred.
+ }
+const
+ kThemeBrushSheetBackground = kThemeBrushSheetBackgroundOpaque;
+
+
+{
+ * Discussion:
+ * Theme meta-brushes. They are specific colors that do not change
+ * from theme to theme. Use them instead of using direct RGB values.
+ }
+const
+ kThemeBrushBlack = -1;
+ kThemeBrushWhite = -2;
+
+ {
+ * Available in Mac OS 10.1 and CarbonLib 1.6, and later.
+ }
+ kThemeBrushPrimaryHighlightColor = -3;
+
+ {
+ * Available in Mac OS 10.1 and CarbonLib 1.6, and later.
+ }
+ kThemeBrushSecondaryHighlightColor = -4;
+
+ {
+ * Available in Mac OS 10.1 and CarbonLib 1.6, and later.
+ }
+ kThemeBrushAlternatePrimaryHighlightColor = -5;
+
+type
+ ThemeBrush = SInt16;
+const
+ kThemeTextColorDialogActive = 1;
+ kThemeTextColorDialogInactive = 2;
+ kThemeTextColorAlertActive = 3;
+ kThemeTextColorAlertInactive = 4;
+ kThemeTextColorModelessDialogActive = 5;
+ kThemeTextColorModelessDialogInactive = 6;
+ kThemeTextColorWindowHeaderActive = 7;
+ kThemeTextColorWindowHeaderInactive = 8;
+ kThemeTextColorPlacardActive = 9;
+ kThemeTextColorPlacardInactive = 10;
+ kThemeTextColorPlacardPressed = 11;
+ kThemeTextColorPushButtonActive = 12;
+ kThemeTextColorPushButtonInactive = 13;
+ kThemeTextColorPushButtonPressed = 14;
+ kThemeTextColorBevelButtonActive = 15;
+ kThemeTextColorBevelButtonInactive = 16;
+ kThemeTextColorBevelButtonPressed = 17;
+ kThemeTextColorPopupButtonActive = 18;
+ kThemeTextColorPopupButtonInactive = 19;
+ kThemeTextColorPopupButtonPressed = 20;
+ kThemeTextColorIconLabel = 21;
+ kThemeTextColorListView = 22;
+
+{ Text Colors available in Appearance 1.0.1 or later }
+const
+ kThemeTextColorDocumentWindowTitleActive = 23;
+ kThemeTextColorDocumentWindowTitleInactive = 24;
+ kThemeTextColorMovableModalWindowTitleActive = 25;
+ kThemeTextColorMovableModalWindowTitleInactive = 26;
+ kThemeTextColorUtilityWindowTitleActive = 27;
+ kThemeTextColorUtilityWindowTitleInactive = 28;
+ kThemeTextColorPopupWindowTitleActive = 29;
+ kThemeTextColorPopupWindowTitleInactive = 30;
+ kThemeTextColorRootMenuActive = 31;
+ kThemeTextColorRootMenuSelected = 32;
+ kThemeTextColorRootMenuDisabled = 33;
+ kThemeTextColorMenuItemActive = 34;
+ kThemeTextColorMenuItemSelected = 35;
+ kThemeTextColorMenuItemDisabled = 36;
+ kThemeTextColorPopupLabelActive = 37;
+ kThemeTextColorPopupLabelInactive = 38;
+
+
+{ Text colors available in Appearance 1.1 or later }
+const
+ kThemeTextColorTabFrontActive = 39;
+ kThemeTextColorTabNonFrontActive = 40;
+ kThemeTextColorTabNonFrontPressed = 41;
+ kThemeTextColorTabFrontInactive = 42;
+ kThemeTextColorTabNonFrontInactive = 43;
+ kThemeTextColorIconLabelSelected = 44;
+ kThemeTextColorBevelButtonStickyActive = 45;
+ kThemeTextColorBevelButtonStickyInactive = 46;
+
+{ Text colors available in Appearance 1.1.1 or later }
+const
+ kThemeTextColorNotification = 47;
+
+
+{ Text colors only available later than OS X 10.1.3 }
+const
+ kThemeTextColorSystemDetail = 48;
+
+{ These values are specific colors that do not change from }
+{ theme to theme. You can use them instead of using direct RGB values. }
+const
+ kThemeTextColorBlack = -1;
+ kThemeTextColorWhite = -2;
+
+type
+ ThemeTextColor = SInt16;
+{ States to draw primitives: disabled, active, and pressed (hilited) }
+const
+ kThemeStateInactive = 0;
+ kThemeStateActive = 1;
+ kThemeStatePressed = 2;
+ kThemeStateRollover = 6;
+ kThemeStateUnavailable = 7;
+ kThemeStateUnavailableInactive = 8;
+
+{ obsolete name }
+const
+ kThemeStateDisabled = 0;
+
+const
+ kThemeStatePressedUp = 2; { draw with up pressed (increment/decrement buttons) }
+ kThemeStatePressedDown = 3; { draw with down pressed (increment/decrement buttons) }
+
+type
+ ThemeDrawState = UInt32;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Theme cursor selectors available in Appearance 1.1 or later }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+const
+ kThemeArrowCursor = 0;
+ kThemeCopyArrowCursor = 1;
+ kThemeAliasArrowCursor = 2;
+ kThemeContextualMenuArrowCursor = 3;
+ kThemeIBeamCursor = 4;
+ kThemeCrossCursor = 5;
+ kThemePlusCursor = 6;
+ kThemeWatchCursor = 7; { Can Animate }
+ kThemeClosedHandCursor = 8;
+ kThemeOpenHandCursor = 9;
+ kThemePointingHandCursor = 10;
+ kThemeCountingUpHandCursor = 11; { Can Animate }
+ kThemeCountingDownHandCursor = 12; { Can Animate }
+ kThemeCountingUpAndDownHandCursor = 13; { Can Animate }
+ kThemeSpinningCursor = 14; { Can Animate }
+ kThemeResizeLeftCursor = 15;
+ kThemeResizeRightCursor = 16;
+ kThemeResizeLeftRightCursor = 17;
+ kThemeNotAllowedCursor = 18; { available on Mac OS X 10.2 and later }
+
+ {
+ * Available in Mac OS X 10.3 or later.
+ }
+ kThemeResizeUpCursor = 19;
+
+ {
+ * Available in Mac OS X 10.3 or later.
+ }
+ kThemeResizeDownCursor = 20;
+
+ {
+ * Available in Mac OS X 10.3 or later.
+ }
+ kThemeResizeUpDownCursor = 21;
+
+ {
+ * A special cursor to indicate that letting up the mouse will cause
+ * a dragged item to go away. When the item goes away, a poof cloud
+ * animation should occur. This cursor should be updated dynamically
+ * dependeding on whether the mouse up action will remove the item.
+ * Available in Mac OS X 10.3 or later.
+ }
+ kThemePoofCursor = 22;
+
+type
+ ThemeCursor = UInt32;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Theme menu bar drawing states }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kThemeMenuBarNormal = 0;
+ kThemeMenuBarSelected = 1;
+
+type
+ ThemeMenuBarState = UInt16;
+{ attributes }
+const
+ kThemeMenuSquareMenuBar = 1 shl 0;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Theme menu drawing states }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kThemeMenuActive = 0;
+ kThemeMenuSelected = 1;
+ kThemeMenuDisabled = 3;
+
+type
+ ThemeMenuState = UInt16;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ MenuType: add kThemeMenuTypeInactive to menu type for DrawThemeMenuBackground if entire }
+{ menu is inactive }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kThemeMenuTypePullDown = 0;
+ kThemeMenuTypePopUp = 1;
+ kThemeMenuTypeHierarchical = 2;
+ kThemeMenuTypeInactive = $0100;
+
+type
+ ThemeMenuType = UInt16;
+const
+ kThemeMenuItemPlain = 0;
+ kThemeMenuItemHierarchical = 1; { item has hierarchical arrow}
+ kThemeMenuItemScrollUpArrow = 2; { for scrollable menus, indicates item is scroller}
+ kThemeMenuItemScrollDownArrow = 3;
+ kThemeMenuItemAtTop = $0100; { indicates item is being drawn at top of menu}
+ kThemeMenuItemAtBottom = $0200; { indicates item is being drawn at bottom of menu}
+ kThemeMenuItemHierBackground = $0400; { item is within a hierarchical menu}
+ kThemeMenuItemPopUpBackground = $0800; { item is within a popped up menu}
+ kThemeMenuItemHasIcon = $8000; { add into non-arrow type when icon present}
+ kThemeMenuItemNoBackground = $4000; { don't draw the menu background while drawing this item (Mac OS X only)}
+
+type
+ ThemeMenuItemType = UInt16;
+
+{
+ * Discussion:
+ * ThemeBackgroundKinds
+ }
+const
+{
+ * The theme background used to draw the fill of a tab pane.
+ }
+ kThemeBackgroundTabPane = 1;
+
+ {
+ * The theme background used to draw the fill of a window placard.
+ }
+ kThemeBackgroundPlacard = 2;
+
+ {
+ * The theme background used to draw the window header of a window of
+ * a window that does not contain content that has a hard-lined top
+ * edge. An example of this would be icon view in the non side panel
+ * Finder.
+ }
+ kThemeBackgroundWindowHeader = 3;
+
+ {
+ * The theme background used to draw the window header of a window of
+ * a window that does contain content that has a hard-lined top edge.
+ * An example of this would be list view in the non side panel Finder.
+ }
+ kThemeBackgroundListViewWindowHeader = 4;
+
+ {
+ * The theme background used to draw the fill of a secondary group
+ * box.
+ }
+ kThemeBackgroundSecondaryGroupBox = 5;
+
+ {
+ * A special theme brush for drawing metal backgrounds. Currently,
+ * this brush only works with HIThemeDrawBackground.
+ }
+ kThemeBackgroundMetal = 6;
+
+type
+ ThemeBackgroundKind = UInt32;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Theme Collection tags for Get/SetTheme }
+{ X ALERT: Please note that Get/SetTheme are severely neutered under Mac OS X at present. }
+{ The first group of tags below are available to get under both 9 and X. The }
+{ second group is 9 only. None of the tags can be used in SetTheme on X, as it }
+{ is completely inert on X, and will return unimpErr. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kThemeNameTag = $6E616D65 (* 'name' *); { Str255}
+ kThemeVariantNameTag = $7661726E (* 'varn' *); { Str255}
+ kThemeVariantBaseTintTag = $74696E74 (* 'tint' *); { RGBColor (10.1 and later)}
+ kThemeHighlightColorTag = $68636F6C (* 'hcol' *); { RGBColor}
+ kThemeScrollBarArrowStyleTag = $73626172 (* 'sbar' *); { ThemeScrollBarArrowStyle}
+ kThemeScrollBarThumbStyleTag = $73627468 (* 'sbth' *); { ThemeScrollBarThumbStyle}
+ kThemeSoundsEnabledTag = $736E6473 (* 'snds' *); { Boolean}
+ kThemeDblClickCollapseTag = $636F6C6C (* 'coll' *); { Boolean}
+
+const
+ kThemeAppearanceFileNameTag = $74686D65 (* 'thme' *); { Str255}
+ kThemeSystemFontTag = $6C677366 (* 'lgsf' *); { Str255}
+ kThemeSmallSystemFontTag = $736D7366 (* 'smsf' *); { Str255}
+ kThemeViewsFontTag = $76666E74 (* 'vfnt' *); { Str255}
+ kThemeViewsFontSizeTag = $7666737A (* 'vfsz' *); { SInt16}
+ kThemeDesktopPatternNameTag = $7061746E (* 'patn' *); { Str255}
+ kThemeDesktopPatternTag = $70617474 (* 'patt' *); { <variable-length data> (flattened pattern)}
+ kThemeDesktopPictureNameTag = $64706E6D (* 'dpnm' *); { Str255}
+ kThemeDesktopPictureAliasTag = $6470616C (* 'dpal' *); { <alias handle>}
+ kThemeDesktopPictureAlignmentTag = $6470616E (* 'dpan' *); { UInt32 (see the Picture Alignments below)}
+ kThemeHighlightColorNameTag = $68636E6D (* 'hcnm' *); { Str255}
+ kThemeExamplePictureIDTag = $65706963 (* 'epic' *); { SInt16}
+ kThemeSoundTrackNameTag = $736E6474 (* 'sndt' *); { Str255}
+ kThemeSoundMaskTag = $736D736B (* 'smsk' *); { UInt32}
+ kThemeUserDefinedTag = $75736572 (* 'user' *); { Boolean (this should _always_ be true if present - used by Control Panel).}
+ kThemeSmoothFontEnabledTag = $736D6F6F (* 'smoo' *); { Boolean}
+ kThemeSmoothFontMinSizeTag = $736D6F73 (* 'smos' *); { UInt16 (must be >= 12 and <= 24)}
+
+{ Picture Aligmnents that might be reported in the data for kThemeDesktopPictureAlignmentTag}
+const
+ kTiledOnScreen = 1; { draws picture repeatedly}
+ kCenterOnScreen = 2; { "actual size", shows pattern on sides or clips picture if necessary}
+ kFitToScreen = 3; { shrinks if necessary}
+ kFillScreen = 4; { messes up aspect ratio if necessary}
+ kUseBestGuess = 5; { heuristically determines the best way to display the picture based on picture and monitor sizes}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Theme Control Settings }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kThemeCheckBoxClassicX = 0; { check box with an 'X'}
+ kThemeCheckBoxCheckMark = 1; { check box with a real check mark}
+
+type
+ ThemeCheckBoxStyle = UInt16;
+const
+ kThemeScrollBarArrowsSingle = 0; { single arrow on each end}
+ kThemeScrollBarArrowsLowerRight = 1; { double arrows only on right or bottom}
+
+type
+ ThemeScrollBarArrowStyle = UInt16;
+const
+ kThemeScrollBarThumbNormal = 0; { normal, classic thumb size}
+ kThemeScrollBarThumbProportional = 1; { proportional thumbs}
+
+type
+ ThemeScrollBarThumbStyle = UInt16;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Font constants }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * Summary:
+ * A ThemeFontID value is a virtual font ID which can be passed to
+ * one of the Appearance Manager's text-related routines. Within
+ * those routines, the ThemeFontID is mapped into the appropriate
+ * real font (or fonts), size, and style based on the system
+ * appearance (Platinum on Mac OS 9, Aqua on Mac OS X), the string
+ * to be rendered (if any), the language/ script that the app is
+ * running in, and possibly other factors. The ThemeFontIDs allow
+ * you to get the correct text appearance for the platform your app
+ * is currently running on.
+ }
+const
+{
+ * The font used to draw most interface elements. If you can't find a
+ * more appropriate font from the list below, you should use this
+ * one. This font is suitable for drawing titles on most custom
+ * widgets/buttons, as well as most static text in dialogs and
+ * windows.
+ }
+ kThemeSystemFont = 0;
+
+ {
+ * The font used to draw interface elements when space is at a
+ * premium. It draws a slightly smaller font compared to
+ * kThemeSystemFont.
+ }
+ kThemeSmallSystemFont = 1;
+
+ {
+ * Identical to kThemeSmallSystemFont, except it draws bolded (or
+ * otherwise emphasized in some fashion appropriate to your
+ * application's language/script).
+ }
+ kThemeSmallEmphasizedSystemFont = 2;
+
+ {
+ * The font used to draw file and folder names in Finder windows or
+ * other browsable lists.
+ }
+ kThemeViewsFont = 3; { The following ID's are only available with MacOS X or CarbonLib 1.3 and later}
+
+ {
+ * Identical to kThemeSystemFont, except it draws bolded (or
+ * otherwise emphasized in some fashion appropriate to your
+ * application's language/script). Only available on Mac OS X or
+ * CarbonLib 1.3 or later.
+ }
+ kThemeEmphasizedSystemFont = 4;
+
+ {
+ * An analog to the Script Manager's notion of the Application Font.
+ * This font is a suitable default choice for your application's
+ * document-style text editing areas. Only available on Mac OS X or
+ * CarbonLib 1.3 or later.
+ }
+ kThemeApplicationFont = 5;
+
+ {
+ * Generally smaller than kThemeSmallSystemFont, this font is
+ * appropriate for drawing text labels next to image content that
+ * reinforces the text's meaning (such as on a bevel button). Only
+ * available on Mac OS X or CarbonLib 1.3 or later.
+ }
+ kThemeLabelFont = 6;
+
+ {
+ * The font used to draw menu titles in the menu bar. Only available
+ * on Mac OS X or CarbonLib 1.3 or later.
+ }
+ kThemeMenuTitleFont = 100;
+
+ {
+ * The font used to draw menu items in the menus. Only available on
+ * Mac OS X or CarbonLib 1.3 or later.
+ }
+ kThemeMenuItemFont = 101;
+
+ {
+ * The font used to draw menu item marks in the menus. Only available
+ * on Mac OS X or CarbonLib 1.3 or later.
+ }
+ kThemeMenuItemMarkFont = 102;
+
+ {
+ * The font used to draw menu item command key equivalents in the
+ * menus. Only available on Mac OS X or CarbonLib 1.3 or later.
+ }
+ kThemeMenuItemCmdKeyFont = 103;
+
+ {
+ * The font used to draw text in most window title bars. Only
+ * available on Mac OS X or CarbonLib 1.3 or later.
+ }
+ kThemeWindowTitleFont = 104;
+
+ {
+ * The font used to draw text labels on push buttons. Only available
+ * on Mac OS X or CarbonLib 1.3 or later.
+ }
+ kThemePushButtonFont = 105;
+
+ {
+ * The font used to draw text in utility window title bars. Only
+ * available on Mac OS X or CarbonLib 1.3 or later.
+ }
+ kThemeUtilityWindowTitleFont = 106;
+
+ {
+ * The font used to draw the first (and most important) message of an
+ * alert window. Only available on Mac OS X or CarbonLib 1.3 or later.
+ }
+ kThemeAlertHeaderFont = 107;
+ kThemeSystemFontDetail = 7;
+ kThemeSystemFontDetailEmphasized = 8;
+
+ {
+ * Unlike the other ThemeFontIDs, this one doesn't map to a font
+ * appropriate to your application's language or script. It maps
+ * directly to the font, size, and style of the current Quickdraw
+ * port. This allows you to get somewhat customized behavior out of
+ * the APIs which take ThemeFontIDs. Note, however, that
+ * kThemeCurrentPortFont does not (and will never) support all
+ * Quickdraw styles on all platforms; in particular, outline and
+ * shadow style are not supported on Mac OS X. Additionally,
+ * kThemeCurrentPortFont is not (and will never be) completely
+ * unicode savvy; use of kThemeCurrentPortFont may result in errors
+ * having to do with the current port's font not being appropriate
+ * for rendering or measuring all glyphs in a given unicode string.
+ * Because of overhead associated with gathering Quickdraw font
+ * information and converting it to the native font format on Mac OS
+ * X, use of kThemeCurrentPortFont may slow down your text drawing
+ * and measuring significantly compared to other ThemeFontIDs.
+ * Instead of using kThemeCurrentPortFont, your application will
+ * probably be better served by using one of the other ThemeFontIDs;
+ * use kThemeCurrentPortFont only as a last resort. Only available on
+ * Mac OS X or CarbonLib 1.3 or later.
+ }
+ kThemeCurrentPortFont = 200;
+
+ {
+ * The font used to draw the label of a toolbar item. Available in
+ * Mac OS X 10.2 or later.
+ }
+ kThemeToolbarFont = 108;
+
+ {
+ * The appropriate system font for mini-sized controls. Available in
+ * Mac OS X 10.3 or later.
+ }
+ kThemeMiniSystemFont = 109;
+
+{ This is the total of the PUBLIC ThemeFontIDs!}
+const
+ kPublicThemeFontCount = 20;
+
+type
+ ThemeFontID = UInt16;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Tab constants }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kThemeTabNonFront = 0;
+ kThemeTabNonFrontPressed = 1;
+ kThemeTabNonFrontInactive = 2;
+ kThemeTabFront = 3;
+ kThemeTabFrontInactive = 4;
+ kThemeTabNonFrontUnavailable = 5;
+ kThemeTabFrontUnavailable = 6;
+
+type
+ ThemeTabStyle = UInt16;
+const
+ kThemeTabNorth = 0;
+ kThemeTabSouth = 1;
+ kThemeTabEast = 2;
+ kThemeTabWest = 3;
+
+type
+ ThemeTabDirection = UInt16;
+
+{
+ * Summary:
+ * Deprecated tab height and overlap constants.
+ *
+ * Discussion:
+ * These constants have been deprecated in favor of theme metrics.
+ * Please do not use them anymore. These constants will be removed
+ * in the next major release of OS X.
+ }
+const
+{
+ * Deprecated. Use kThemeMetricSmallTabHeight.
+ }
+ kThemeSmallTabHeight = 16;
+
+ {
+ * Deprecated. Use kThemeMetricLargeTabHeight.
+ }
+ kThemeLargeTabHeight = 21;
+
+ {
+ * Deprecated. Use kThemeMetricTabFrameOverlap.
+ }
+ kThemeTabPaneOverlap = 3;
+
+ {
+ * Deprecated. Use kThemeMetricSmallTabHeight and
+ * kThemeMetricSmallTabFrameOverlap.
+ }
+ kThemeSmallTabHeightMax = 19;
+
+ {
+ * Deprecated. Use metric kThemeMetricLargeTabHeight and
+ * kThemeMetricTabFrameOverlap.
+ }
+ kThemeLargeTabHeightMax = 24;
+
+
+{
+ * Discussion:
+ * ThemeTrackKinds
+ }
+const
+{
+ * This is the primitive used to draw the normal variant of the
+ * scroll bar control.
+ }
+ kThemeScrollBarMedium = 0;
+
+ {
+ * This is the primitive used to draw the small variant of the scroll
+ * bar control.
+ }
+ kThemeScrollBarSmall = 1;
+
+ {
+ * This is the primitive used to draw the normal variant of the
+ * slider control.
+ }
+ kThemeSliderMedium = 2;
+
+ {
+ * This is the primitive used to draw the normal variant of the
+ * progress bar control.
+ }
+ kThemeProgressBarMedium = 3;
+
+ {
+ * This is the primitive used to draw the normal variant of the
+ * indeterminate progress bar control.
+ }
+ kThemeIndeterminateBarMedium = 4;
+
+ {
+ * This is the primitive used to draw the normal variant of the
+ * relevance bar control.
+ }
+ kThemeRelevanceBar = 5;
+
+ {
+ * This is the primitive used to draw the small variant of the slider
+ * control.
+ }
+ kThemeSliderSmall = 6;
+
+ {
+ * This is the primitive used to draw the large variant of the
+ * progress bar control.
+ }
+ kThemeProgressBarLarge = 7;
+
+ {
+ * This is the primitive used to draw the large variant of the
+ * indeterminate progress bar control.
+ }
+ kThemeIndeterminateBarLarge = 8;
+
+
+{
+ * Discussion:
+ * New ThemeTrackKinds on Mac OS X 10.3 and later. Not all of them
+ * are implemented.
+ }
+const
+{
+ * Not implemented. Will return paramErr if used.
+ }
+ kThemeScrollBarMini = 9;
+
+ {
+ * A miniature version of the slider.
+ }
+ kThemeSliderMini = 10;
+
+ {
+ * Not implemented. Will return paramErr if used.
+ }
+ kThemeProgressBarMini = 11;
+
+ {
+ * Not implemented. Will return paramErr if used.
+ }
+ kThemeIndeterminateBarMini = 12;
+
+
+{
+ * Discussion:
+ * These are legacy synonyms for previously defined ThemeTrackKinds.
+ * Please use the modern constant names.
+ }
+const
+ kThemeMediumScrollBar = kThemeScrollBarMedium;
+ kThemeSmallScrollBar = kThemeScrollBarSmall;
+ kThemeMediumSlider = kThemeSliderMedium;
+ kThemeMediumProgressBar = kThemeProgressBarMedium;
+ kThemeMediumIndeterminateBar = kThemeIndeterminateBarMedium;
+ kThemeSmallSlider = kThemeSliderSmall;
+ kThemeLargeProgressBar = kThemeProgressBarLarge;
+ kThemeLargeIndeterminateBar = kThemeIndeterminateBarLarge;
+ kThemeMiniScrollBar = kThemeScrollBarMini;
+ kThemeMiniSlider = kThemeSliderMini;
+ kThemeMiniProgressBar = kThemeProgressBarMini;
+ kThemeMiniIndeterminateBar = kThemeIndeterminateBarMini;
+
+type
+ ThemeTrackKind = UInt16;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Track enable states }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+{ track states }
+ kThemeTrackActive = 0;
+ kThemeTrackDisabled = 1;
+ kThemeTrackNothingToScroll = 2;
+ kThemeTrackInactive = 3;
+
+type
+ ThemeTrackEnableState = UInt8;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Track pressed states }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+{ press states (ignored unless track is active) }
+ kThemeLeftOutsideArrowPressed = $01;
+ kThemeLeftInsideArrowPressed = $02;
+ kThemeLeftTrackPressed = $04;
+ kThemeThumbPressed = $08;
+ kThemeRightTrackPressed = $10;
+ kThemeRightInsideArrowPressed = $20;
+ kThemeRightOutsideArrowPressed = $40;
+ kThemeTopOutsideArrowPressed = kThemeLeftOutsideArrowPressed;
+ kThemeTopInsideArrowPressed = kThemeLeftInsideArrowPressed;
+ kThemeTopTrackPressed = kThemeLeftTrackPressed;
+ kThemeBottomTrackPressed = kThemeRightTrackPressed;
+ kThemeBottomInsideArrowPressed = kThemeRightInsideArrowPressed;
+ kThemeBottomOutsideArrowPressed = kThemeRightOutsideArrowPressed;
+
+type
+ ThemeTrackPressState = UInt8;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Thumb directions }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+{ thumb direction }
+ kThemeThumbPlain = 0;
+ kThemeThumbUpward = 1;
+ kThemeThumbDownward = 2;
+
+type
+ ThemeThumbDirection = UInt8;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Track attributes }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * Discussion:
+ * Theme track attributes control the look of the track elements as
+ * drawn by the DrawThemeTrackFoo as well as the region returned by
+ * GetThemeTrackFoo.
+ }
+const
+{
+ * The track is drawn horizontally.
+ }
+ kThemeTrackHorizontal = 1 shl 0;
+
+ {
+ * The track progresses from right to left.
+ }
+ kThemeTrackRightToLeft = 1 shl 1;
+
+ {
+ * The track's thumb should be drawn.
+ }
+ kThemeTrackShowThumb = 1 shl 2;
+
+ {
+ * The provided thumbRgn should be drawn opaque, not as a ghost.
+ }
+ kThemeTrackThumbRgnIsNotGhost = 1 shl 3;
+
+ {
+ * The track scroll bar doesn't have arrows. This attribute
+ * currently has no effect
+ }
+ kThemeTrackNoScrollBarArrows = 1 shl 4;
+
+ {
+ * The thumb has focus. This attribute currently has effect only on
+ * sliders. Available only in Mac OS X after 10.1.
+ }
+ kThemeTrackHasFocus = 1 shl 5;
+
+type
+ ThemeTrackAttributes = UInt16;
+
+{
+ * ScrollBarTrackInfo
+ *
+ * Summary:
+ * Drawing parameters passed to scroll bar drawing and measuring
+ * theme APIs.
+ *
+ * Discussion:
+ * Used in both the old theme APIs and the newer HITheme APIs.
+ }
+type
+ ScrollBarTrackInfoPtr = ^ScrollBarTrackInfo;
+ ScrollBarTrackInfo = record
+{
+ * The current view range size.
+ }
+ viewsize: SInt32; { current view range size }
+
+ {
+ * ThemeTrackPressState bits that indicate the pressed parts state.
+ }
+ pressState: SInt8 {ThemeTrackPressState}; { pressed parts state }
+ pad: SInt8
+ end;
+
+{
+ * SliderTrackInfo
+ *
+ * Summary:
+ * Drawing parameters passed to slider drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * Used in both the old theme APIs and the newer HITheme APIs.
+ }
+type
+ SliderTrackInfoPtr = ^SliderTrackInfo;
+ SliderTrackInfo = record
+{
+ * A ThemeThumbDirection indicating the thumb direction.
+ }
+ thumbDir: SInt8 {ThemeThumbDirection}; { thumb direction }
+
+ {
+ * ThemeTrackPressState bits that indicate the pressed parts state.
+ }
+ pressState: SInt8 {ThemeTrackPressState}; { pressed parts state }
+ end;
+
+{
+ * ProgressTrackInfo
+ *
+ * Summary:
+ * Drawing parameters passed to (indeterminate) progress bar drawing
+ * and measuring theme APIs.
+ *
+ * Discussion:
+ * Used in both the old theme APIs and the newer HITheme APIs.
+ }
+type
+ ProgressTrackInfoPtr = ^ProgressTrackInfo;
+ ProgressTrackInfo = record
+{
+ * A UInt8 indicating the current phase of the track fill.
+ }
+ phase: SInt8; { phase for indeterminate progress }
+ pad: SInt8
+ end;
+
+{
+ * ThemeTrackDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to track drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * Use the newer HITheme APIs.
+ }
+type
+ ThemeTrackDrawInfoPtr = ^ThemeTrackDrawInfo;
+ ThemeTrackDrawInfo = record
+{
+ * The ThemeTrackKind of the track being drawn or measured.
+ }
+ kind: ThemeTrackKind;
+
+ {
+ * The bounds of the track is being drawn or measured.
+ }
+ bounds: Rect;
+
+ {
+ * The minimum allowable value for the track being drawn or measured.
+ }
+ min: SInt32;
+
+ {
+ * The maximum allowable value for the track being drawn or measured.
+ }
+ max: SInt32;
+
+ {
+ * The value for the track being drawn or measured.
+ }
+ value: SInt32;
+
+ {
+ * Leave this reserved field set to 0.
+ }
+ reserved: UInt32;
+
+
+ {
+ * A set of ThemeTrackAttributes for the track to be drawn or
+ * measured.
+ }
+ attributes: ThemeTrackAttributes;
+
+ {
+ * A ThemeTrackEnableState describing the state of the track to be
+ * drawn or measured.
+ }
+ enableState: SInt8 {ThemeTrackEnableState};
+
+ {
+ * Leave this reserved field set to 0.
+ }
+ filler1: SInt8;
+ case SInt16 of
+ 0: (
+ scrollbar: ScrollBarTrackInfo;
+ );
+ 1: (
+ slider: SliderTrackInfo;
+ );
+ 2: (
+ progress: ProgressTrackInfo;
+ );
+ end;
+
+{
+ * Summary:
+ * ThemeWindowAttributes
+ *
+ * Discussion:
+ * Theme window attributes control the look of the window elements
+ * as drawn by the DrawThemeWindowFrame.
+ }
+const
+{
+ * This bit means that the size of the window can be changed by the
+ * user. The window is drawn with a grow box.
+ }
+ kThemeWindowHasGrow = 1 shl 0;
+
+ {
+ * This bit means that the window can be zoomed horizontally. The
+ * window is drawn with a zoom box.
+ }
+ kThemeWindowHasHorizontalZoom = 1 shl 3;
+
+ {
+ * This bit means that the window can be zoomed vertically. The
+ * window is drawn with a zoom box.
+ }
+ kThemeWindowHasVerticalZoom = 1 shl 4;
+
+ {
+ * This bit means that the window can be zoomed horizontally and
+ * vertically. The window is drawn with a zoom box.
+ }
+ kThemeWindowHasFullZoom = kThemeWindowHasHorizontalZoom + kThemeWindowHasVerticalZoom;
+
+ {
+ * This bit means that the window can be closed. The window is drawn
+ * with a close box.
+ }
+ kThemeWindowHasCloseBox = 1 shl 5;
+
+ {
+ * This bit means that the window can be collapsed. The window is
+ * drawn with a collapse box.
+ }
+ kThemeWindowHasCollapseBox = 1 shl 6;
+
+ {
+ * This bit means that the window has title text and/or a title icon.
+ }
+ kThemeWindowHasTitleText = 1 shl 7;
+
+ {
+ * This bit means that the window has been collapsed.
+ }
+ kThemeWindowIsCollapsed = 1 shl 8;
+
+ {
+ * This bit means that the window has dirty content. Get your mind
+ * out of the gutter. That means that the content of the window has
+ * changed and needs to be saved. If the window is drawing a close
+ * box, it will be drawn dirty.
+ }
+ kThemeWindowHasDirty = 1 shl 9;
+
+ {
+ * This bit means that the window has a toolbar toggling button.
+ }
+ kThemeWindowHasToolbarButton = 1 shl 11;
+
+
+type
+ ThemeWindowAttributes = UInt32;
+
+{
+ * Summary:
+ * ThemeWindowTypes
+ *
+ * Discussion:
+ * Window Types Supported by the Appearance Manager.
+ }
+const
+ kThemeDocumentWindow = 0;
+ kThemeDialogWindow = 1;
+ kThemeMovableDialogWindow = 2;
+ kThemeAlertWindow = 3;
+ kThemeMovableAlertWindow = 4;
+ kThemePlainDialogWindow = 5;
+ kThemeShadowDialogWindow = 6;
+ kThemePopupWindow = 7;
+ kThemeUtilityWindow = 8;
+ kThemeUtilitySideWindow = 9;
+ kThemeSheetWindow = 10;
+ kThemeDrawerWindow = 11;
+
+type
+ ThemeWindowType = UInt16;
+
+{
+ * Summary:
+ * ThemeTitleBarWidgets
+ *
+ * Discussion:
+ * Window Widgets Supported by the Appearance Manager.
+ }
+const
+ kThemeWidgetCloseBox = 0;
+ kThemeWidgetZoomBox = 1;
+ kThemeWidgetCollapseBox = 2;
+ kThemeWidgetDirtyCloseBox = 6;
+
+const
+{ Old/Obsolete name to be removed}
+ kThemeWidgetABox = 3;
+ kThemeWidgetBBox = 4;
+ kThemeWidgetBOffBox = 5;
+
+type
+ ThemeTitleBarWidget = UInt16;
+
+{
+ * Summary:
+ * ThemeArrowOrientation
+ *
+ * Discussion:
+ * Popup arrow orientations.
+ }
+const
+ kThemeArrowLeft = 0;
+ kThemeArrowDown = 1;
+ kThemeArrowRight = 2;
+ kThemeArrowUp = 3;
+
+type
+ ThemeArrowOrientation = UInt16;
+
+{
+ * Summary:
+ * ThemePopupArrowSizes
+ *
+ * Discussion:
+ * Popup arrow sizes.
+ }
+const
+ kThemeArrow3pt = 0;
+ kThemeArrow5pt = 1;
+ kThemeArrow7pt = 2;
+ kThemeArrow9pt = 3;
+
+type
+ ThemePopupArrowSize = UInt16;
+
+{
+ * Summary:
+ * ThemeGrowDirections
+ *
+ * Discussion:
+ * Grow box directions.
+ }
+const
+ kThemeGrowLeft = 1 shl 0; { can grow to the left }
+ kThemeGrowRight = 1 shl 1; { can grow to the right }
+ kThemeGrowUp = 1 shl 2; { can grow up }
+ kThemeGrowDown = 1 shl 3; { can grow down }
+
+type
+ ThemeGrowDirection = UInt16;
+
+{
+ * Discussion:
+ * ThemeButtonKinds
+ }
+const
+{
+ * Dynamically-sized push button kind. Prior to Mac OS X 10.3 all
+ * push button sizes could be determined dynamically: either they
+ * were smaller than normal size and therefore small or they were
+ * normal size. This constant will never describe a mini push button,
+ * regardless of associated bounds. Please use the explicitly-sized
+ * kThemePushButton(Normal,Small,Mini) constants.
+ }
+ kThemePushButton = 0;
+ kThemeCheckBox = 1;
+ kThemeRadioButton = 2;
+
+ {
+ * Bevel button (obsolete)
+ }
+ kThemeBevelButton = 3;
+
+ {
+ * Popup button without text (no label). See ThemeButtonAdornment for
+ * glyphs. The arrow button theme name is somewhat confusing. This is
+ * the primitive used to draw the control known as the disclosure
+ * button.
+ }
+ kThemeArrowButton = 4;
+
+ {
+ * Dynamically-sized popup button kind. Prior to Mac OS X 10.3 all
+ * popup button sizes could be determined dynamically: either they
+ * were smaller than normal size and therefore small or they were
+ * normal size. This constant will never describe a mini popup
+ * button, regardless of associated bounds. Please use the
+ * explicitly-sized kThemePopupButton(Normal,Small,Mini) constants.
+ }
+ kThemePopupButton = 5;
+
+ {
+ * This is a disclosure triangle with a label beside it. Used to be
+ * confusingly named kThemeDisclosureTriangle.
+ }
+ kThemeDisclosureTriangle = 6;
+
+ {
+ * Increment/decrement buttons (no label). This is the primitive used
+ * to draw the LittleArrows control.
+ }
+ kThemeIncDecButton = 7;
+
+ {
+ * Small-shadow bevel button
+ }
+ kThemeBevelButtonSmall = 8;
+
+ {
+ * Med-shadow bevel button
+ }
+ kThemeBevelButtonMedium = 3;
+
+ {
+ * Large-shadow bevel button
+ }
+ kThemeBevelButtonLarge = 9;
+
+ {
+ * Sort button for top of a list. This is the theme primitive used to
+ * draw the top of the columns in the data browser.
+ }
+ kThemeListHeaderButton = 10;
+
+ {
+ * This is the primitive used to draw the normal variant of the round
+ * button control.
+ }
+ kThemeRoundButton = 11;
+
+ {
+ * This is the primitive used to draw the large variant of the round
+ * button control.
+ }
+ kThemeRoundButtonLarge = 12;
+
+ {
+ * This is the primitive used to draw the small variant of the check
+ * box control.
+ }
+ kThemeCheckBoxSmall = 13;
+
+ {
+ * This is the primitive used to draw the small variant of the radio
+ * button control.
+ }
+ kThemeRadioButtonSmall = 14;
+
+ {
+ * This is the primitive used to draw the rounded-corner variant of
+ * the bevel button control.
+ }
+ kThemeRoundedBevelButton = 15;
+
+ {
+ * This is the primitive used to draw the normal variant of the combo
+ * box control.
+ }
+ kThemeComboBox = 16;
+
+ {
+ * This is the primitive used to draw the small variant of the combo
+ * box control.
+ }
+ kThemeComboBoxSmall = 17;
+
+
+{
+ * Discussion:
+ * New ThemeButtonKinds available on Mac OS X 10.3 and later.
+ }
+const
+{
+ * This is the primitive used to draw the mini variant of the combo
+ * box control.
+ }
+ kThemeComboBoxMini = 18;
+
+ {
+ * This is the primitive used to draw the mini variant of the check
+ * box control.
+ }
+ kThemeCheckBoxMini = 19;
+
+ {
+ * This is the primitive used to draw the mini variant of the radio
+ * button control.
+ }
+ kThemeRadioButtonMini = 20;
+
+ {
+ * This is the primitive used to draw the small variant of the
+ * LittleArrows control.
+ }
+ kThemeIncDecButtonSmall = 21;
+
+ {
+ * This is the primitive used to draw the mini variant of the
+ * LittleArrows control.
+ }
+ kThemeIncDecButtonMini = 22;
+
+ {
+ * The arrow button theme name is somewhat confusing. This is the
+ * primitive used to draw the small variant of the control known as
+ * the disclosure button.
+ }
+ kThemeArrowButtonSmall = 23;
+
+ {
+ * The arrow button theme name is somewhat confusing. This is the
+ * primitive used to draw the mini variant of the control known as
+ * the disclosure button.
+ }
+ kThemeArrowButtonMini = 24;
+
+ {
+ * Explicitly-sized normal push button kind. Prior to Mac OS X 10.3
+ * all push button sizes could be determined dynamically: either they
+ * were smaller than normal size and therefore small or they were
+ * normal size. Using this constant, an explicitly-sized normal push
+ * button can be specified.
+ }
+ kThemePushButtonNormal = 25;
+
+ {
+ * Explicitly-sized small push button kind. Prior to Mac OS X 10.3
+ * all push button sizes could be determined dynamically: either they
+ * were smaller than normal size and therefore small or they were
+ * normal size. Using this constant, an explicitly-sized small push
+ * button can be specified.
+ }
+ kThemePushButtonSmall = 26;
+
+ {
+ * Explicitly-sized mini push button kind. Prior to Mac OS X 10.3 all
+ * push button sizes could be determined dynamically: either they
+ * were smaller than normal size and therefore small or they were
+ * normal size. Since a mini variant was introduced in Mac OS X 10.3,
+ * smaller than normal size is can also mean mini. To avoid confusion
+ * with existing code, the mini variant will never be implicitly
+ * determined and must be explicity requested with the
+ * kThemePushButtonMini constant.
+ }
+ kThemePushButtonMini = 27;
+
+ {
+ * Explicitly-sized normal popup button kind. Prior to Mac OS X 10.3
+ * all popup button sizes could be determined dynamically: either
+ * they were smaller than normal size and therefore small or they
+ * were normal size. Using this constant, an explicitly-sized normal
+ * popup button can be specified.
+ }
+ kThemePopupButtonNormal = 28;
+
+ {
+ * Explicitly-sized small popup button kind. Prior to Mac OS X 10.3
+ * all popup button sizes could be determined dynamically: either
+ * they were smaller than normal size and therefore small or they
+ * were normal size. Using this constant, an explicitly-sized small
+ * popup button can be specified.
+ }
+ kThemePopupButtonSmall = 29;
+
+ {
+ * Explicitly-sized mini popup button kind. Prior to Mac OS X 10.3
+ * all popup button sizes could be determined dynamically: either
+ * they were smaller than normal size and therefore small or they
+ * were normal size. Since a mini variant was introduced in Mac OS X
+ * 10.3, smaller than normal size is can also mean mini. To avoid
+ * confusion with existing code, the mini variant will never be
+ * implicitly determined and must be explicity requested with the
+ * kThemePopupButtonMini constant.
+ }
+ kThemePopupButtonMini = 30;
+
+
+{
+ * Discussion:
+ * New ThemeButtonKinds available on Mac OS X 10.4 and later.
+ }
+const
+{
+ * This is the primitive used to draw the inset variant of the bevel
+ * button control.
+ }
+ kThemeBevelButtonInset = 31;
+
+ {
+ * This is the primitive used to draw the inset variant of the push
+ * button. Similar to kThemePushButtonNormal, but inset.
+ }
+ kThemePushButtonInset = 32;
+
+ {
+ * This is the primitive used to draw the small, inset variant of the
+ * push button. Similar to kThemePushButtonSmall, but inset.
+ }
+ kThemePushButtonInsetSmall = 33;
+
+ {
+ * This is the primitive used to draw the help variant of the round
+ * button.
+ }
+ kThemeRoundButtonHelp = 34;
+
+
+{
+ * Discussion:
+ * These are legacy synonyms for previously defined
+ * ThemeButtonKinds. Please use the modern constant names.
+ }
+const
+ kThemeNormalCheckBox = kThemeCheckBox;
+ kThemeNormalRadioButton = kThemeRadioButton;
+ kThemeLargeBevelButton = kThemeBevelButtonLarge;
+ kThemeMediumBevelButton = kThemeBevelButtonMedium;
+ kThemeMiniCheckBox = kThemeCheckBoxMini;
+ kThemeMiniRadioButton = kThemeRadioButtonMini;
+ kThemeSmallBevelButton = kThemeBevelButtonSmall;
+ kThemeSmallCheckBox = kThemeCheckBoxSmall;
+ kThemeSmallRadioButton = kThemeRadioButtonSmall;
+ kThemeLargeRoundButton = kThemeRoundButtonLarge;
+ kThemeDisclosureButton = kThemeDisclosureTriangle;
+
+type
+ ThemeButtonKind = UInt16;
+
+{
+ * Summary:
+ * ThemeButtonValues
+ *
+ * Discussion:
+ * Common button values
+ }
+const
+ kThemeButtonOff = 0;
+ kThemeButtonOn = 1;
+ kThemeButtonMixed = 2;
+ kThemeDisclosureRight = 0;
+ kThemeDisclosureDown = 1;
+ kThemeDisclosureLeft = 2;
+
+type
+ ThemeButtonValue = UInt16;
+
+
+{
+ * Summary:
+ * ThemeButtonAdornments
+ *
+ * Discussion:
+ * Use these adornments when drawing buttons using the theme
+ * primitive. Note that the bits starting at (1 << 6) are recycled
+ * and have different meanings depending on ThemeButtonKind.
+ }
+const
+{
+ * No adornments.
+ }
+ kThemeAdornmentNone = 0;
+
+ {
+ * Draw default ornamentation (for push button and generic well).
+ }
+ kThemeAdornmentDefault = 1 shl 0;
+
+ {
+ * Draw focus.
+ }
+ kThemeAdornmentFocus = 1 shl 2;
+
+ {
+ * Draw right to left label.
+ }
+ kThemeAdornmentRightToLeft = 1 shl 4;
+
+ {
+ * Don't draw or erase label (radio, check, disclosure).
+ }
+ kThemeAdornmentDrawIndicatorOnly = 1 shl 5;
+
+ {
+ * Draw the left border of the button as selected (list header button
+ * only).
+ }
+ kThemeAdornmentHeaderButtonLeftNeighborSelected = 1 shl 6;
+
+ {
+ * Draw the right border of the button (list header button only).
+ }
+ kThemeAdornmentHeaderButtonRightNeighborSelected = 1 shl 7;
+
+ {
+ * Draw the sort indicator pointing upward (list header button only).
+ }
+ kThemeAdornmentHeaderButtonSortUp = 1 shl 8;
+
+ {
+ * Draw as a header menu button (list header button only).
+ }
+ kThemeAdornmentHeaderMenuButton = 1 shl 9;
+
+ {
+ * Draw the non-shadow area of the button (list header button only).
+ }
+ kThemeAdornmentHeaderButtonNoShadow = 1 shl 10;
+
+ {
+ * Draw the only the shadow area of the button (list header button
+ * only).
+ }
+ kThemeAdornmentHeaderButtonShadowOnly = 1 shl 11;
+
+ {
+ * When drawn selected, do not draw the sort direction arrow (list
+ * header button only). Mac OS X 10.4 and later.
+ }
+ kThemeAdornmentHeaderButtonNoSortArrow = 1 shl 12;
+
+ {
+ * Draw a left arrow on the arrow button or draw left disclosure
+ * triangle. Can be combined with kThemeAdornmentArrowDownArrow to
+ * draw an intermediate disclosure triangle.
+ }
+ kThemeAdornmentArrowLeftArrow = 1 shl 6;
+
+ {
+ * Draw a down arrow on the arrow button or draw right disclosure
+ * triangle. Can be combined with kThemeAdornmentArrowLeftArrow to
+ * draw an intermediate disclosure triangle.
+ }
+ kThemeAdornmentArrowDownArrow = 1 shl 7;
+
+ {
+ * Draw a double arrow on the arrow button.
+ }
+ kThemeAdornmentArrowDoubleArrow = 1 shl 8;
+
+ {
+ * Draw a up arrow on the arrow button.
+ }
+ kThemeAdornmentArrowUpArrow = 1 shl 9;
+
+
+{
+ * Discussion:
+ * These are legacy synonyms for previously defined
+ * ThemeButtonAdornments. Please use the modern constant names.
+ }
+const
+ kThemeAdornmentNoShadow = kThemeAdornmentHeaderButtonNoShadow;
+ kThemeAdornmentShadowOnly = kThemeAdornmentHeaderButtonShadowOnly;
+
+type
+ ThemeButtonAdornment = UInt16;
+
+{
+ * ThemeButtonDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to button drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * Use the newer HITheme APIs.
+ }
+type
+ ThemeButtonDrawInfo = record
+{
+ * The ThemeDrawState of the button being drawn or measured.
+ }
+ state: ThemeDrawState;
+
+ {
+ * The ThemeButtonValue of the button being drawn or measured.
+ }
+ value: ThemeButtonValue;
+
+ {
+ * The ThemeButtonAdornment(s) with which the button is being drawn
+ * or measured.
+ }
+ adornment: ThemeButtonAdornment;
+ end;
+ ThemeButtonDrawInfoPtr = ^ThemeButtonDrawInfo;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Sound Support }
+{ X ALERT: Please note that none of the theme sound APIs currently function on X. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Sound classes }
+{ You can use the constants below to set what sounds are active using the SetTheme API. }
+{ Use these with the kThemeSoundMask tag. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kThemeNoSounds = 0;
+ kThemeWindowSoundsMask = 1 shl 0;
+ kThemeMenuSoundsMask = 1 shl 1;
+ kThemeControlSoundsMask = 1 shl 2;
+ kThemeFinderSoundsMask = 1 shl 3;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Drag Sounds }
+{ Drag sounds are looped for the duration of the drag. }
+{ Call BeginThemeDragSound at the start of the drag. }
+{ Call EndThemeDragSound when the drag has finished. }
+{ Note that in order to maintain a consistent user experience, only one drag sound may }
+{ occur at a time. The sound should be attached to a mouse action, start after the }
+{ mouse goes down and stop when the mouse is released. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kThemeDragSoundNone = 0;
+ kThemeDragSoundMoveWindow = $776D6F76 (* 'wmov' *);
+ kThemeDragSoundGrowWindow = $7767726F (* 'wgro' *);
+ kThemeDragSoundMoveUtilWindow = $756D6F76 (* 'umov' *);
+ kThemeDragSoundGrowUtilWindow = $7567726F (* 'ugro' *);
+ kThemeDragSoundMoveDialog = $646D6F76 (* 'dmov' *);
+ kThemeDragSoundMoveAlert = $616D6F76 (* 'amov' *);
+ kThemeDragSoundMoveIcon = $696D6F76 (* 'imov' *);
+ kThemeDragSoundSliderThumb = $736C7468 (* 'slth' *);
+ kThemeDragSoundSliderGhost = $736C6768 (* 'slgh' *);
+ kThemeDragSoundScrollBarThumb = $73627468 (* 'sbth' *);
+ kThemeDragSoundScrollBarGhost = $73626768 (* 'sbgh' *);
+ kThemeDragSoundScrollBarArrowDecreasing = $73626164 (* 'sbad' *);
+ kThemeDragSoundScrollBarArrowIncreasing = $73626169 (* 'sbai' *);
+ kThemeDragSoundDragging = $64726167 (* 'drag' *);
+
+type
+ ThemeDragSoundKind = OSType;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ State-change sounds }
+{ State-change sounds are played asynchonously as a one-shot. }
+{ Call PlayThemeSound to play the sound. The sound will play }
+{ asynchronously until complete, then stop automatically. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kThemeSoundNone = 0;
+ kThemeSoundMenuOpen = $6D6E756F (* 'mnuo' *); { menu sounds }
+ kThemeSoundMenuClose = $6D6E7563 (* 'mnuc' *);
+ kThemeSoundMenuItemHilite = $6D6E7569 (* 'mnui' *);
+ kThemeSoundMenuItemRelease = $6D6E7573 (* 'mnus' *);
+ kThemeSoundWindowClosePress = $77636C70 (* 'wclp' *); { window sounds }
+ kThemeSoundWindowCloseEnter = $77636C65 (* 'wcle' *);
+ kThemeSoundWindowCloseExit = $77636C78 (* 'wclx' *);
+ kThemeSoundWindowCloseRelease = $77636C72 (* 'wclr' *);
+ kThemeSoundWindowZoomPress = $777A6D70 (* 'wzmp' *);
+ kThemeSoundWindowZoomEnter = $777A6D65 (* 'wzme' *);
+ kThemeSoundWindowZoomExit = $777A6D78 (* 'wzmx' *);
+ kThemeSoundWindowZoomRelease = $777A6D72 (* 'wzmr' *);
+ kThemeSoundWindowCollapsePress = $77636F70 (* 'wcop' *);
+ kThemeSoundWindowCollapseEnter = $77636F65 (* 'wcoe' *);
+ kThemeSoundWindowCollapseExit = $77636F78 (* 'wcox' *);
+ kThemeSoundWindowCollapseRelease = $77636F72 (* 'wcor' *);
+ kThemeSoundWindowDragBoundary = $77646264 (* 'wdbd' *);
+ kThemeSoundUtilWinClosePress = $75636C70 (* 'uclp' *); { utility window sounds }
+ kThemeSoundUtilWinCloseEnter = $75636C65 (* 'ucle' *);
+ kThemeSoundUtilWinCloseExit = $75636C78 (* 'uclx' *);
+ kThemeSoundUtilWinCloseRelease = $75636C72 (* 'uclr' *);
+ kThemeSoundUtilWinZoomPress = $757A6D70 (* 'uzmp' *);
+ kThemeSoundUtilWinZoomEnter = $757A6D65 (* 'uzme' *);
+ kThemeSoundUtilWinZoomExit = $757A6D78 (* 'uzmx' *);
+ kThemeSoundUtilWinZoomRelease = $757A6D72 (* 'uzmr' *);
+ kThemeSoundUtilWinCollapsePress = $75636F70 (* 'ucop' *);
+ kThemeSoundUtilWinCollapseEnter = $75636F65 (* 'ucoe' *);
+ kThemeSoundUtilWinCollapseExit = $75636F78 (* 'ucox' *);
+ kThemeSoundUtilWinCollapseRelease = $75636F72 (* 'ucor' *);
+ kThemeSoundUtilWinDragBoundary = $75646264 (* 'udbd' *);
+ kThemeSoundWindowOpen = $776F706E (* 'wopn' *); { window close and zoom action }
+ kThemeSoundWindowClose = $77636C73 (* 'wcls' *);
+ kThemeSoundWindowZoomIn = $777A6D69 (* 'wzmi' *);
+ kThemeSoundWindowZoomOut = $777A6D6F (* 'wzmo' *);
+ kThemeSoundWindowCollapseUp = $77636F6C (* 'wcol' *);
+ kThemeSoundWindowCollapseDown = $77657870 (* 'wexp' *);
+ kThemeSoundWindowActivate = $77616374 (* 'wact' *);
+ kThemeSoundUtilWindowOpen = $756F706E (* 'uopn' *);
+ kThemeSoundUtilWindowClose = $75636C73 (* 'ucls' *);
+ kThemeSoundUtilWindowZoomIn = $757A6D69 (* 'uzmi' *);
+ kThemeSoundUtilWindowZoomOut = $757A6D6F (* 'uzmo' *);
+ kThemeSoundUtilWindowCollapseUp = $75636F6C (* 'ucol' *);
+ kThemeSoundUtilWindowCollapseDown = $75657870 (* 'uexp' *);
+ kThemeSoundUtilWindowActivate = $75616374 (* 'uact' *);
+ kThemeSoundDialogOpen = $646F706E (* 'dopn' *);
+ kThemeSoundDialogClose = $646C6763 (* 'dlgc' *);
+ kThemeSoundAlertOpen = $616F706E (* 'aopn' *);
+ kThemeSoundAlertClose = $616C7463 (* 'altc' *);
+ kThemeSoundPopupWindowOpen = $70776F70 (* 'pwop' *);
+ kThemeSoundPopupWindowClose = $7077636C (* 'pwcl' *);
+ kThemeSoundButtonPress = $62746E70 (* 'btnp' *); { button }
+ kThemeSoundButtonEnter = $62746E65 (* 'btne' *);
+ kThemeSoundButtonExit = $62746E78 (* 'btnx' *);
+ kThemeSoundButtonRelease = $62746E72 (* 'btnr' *);
+ kThemeSoundDefaultButtonPress = $64627470 (* 'dbtp' *); { default button }
+ kThemeSoundDefaultButtonEnter = $64627465 (* 'dbte' *);
+ kThemeSoundDefaultButtonExit = $64627478 (* 'dbtx' *);
+ kThemeSoundDefaultButtonRelease = $64627472 (* 'dbtr' *);
+ kThemeSoundCancelButtonPress = $63627470 (* 'cbtp' *); { cancel button }
+ kThemeSoundCancelButtonEnter = $63627465 (* 'cbte' *);
+ kThemeSoundCancelButtonExit = $63627478 (* 'cbtx' *);
+ kThemeSoundCancelButtonRelease = $63627472 (* 'cbtr' *);
+ kThemeSoundCheckboxPress = $63686B70 (* 'chkp' *); { checkboxes }
+ kThemeSoundCheckboxEnter = $63686B65 (* 'chke' *);
+ kThemeSoundCheckboxExit = $63686B78 (* 'chkx' *);
+ kThemeSoundCheckboxRelease = $63686B72 (* 'chkr' *);
+ kThemeSoundRadioPress = $72616470 (* 'radp' *); { radio buttons }
+ kThemeSoundRadioEnter = $72616465 (* 'rade' *);
+ kThemeSoundRadioExit = $72616478 (* 'radx' *);
+ kThemeSoundRadioRelease = $72616472 (* 'radr' *);
+ kThemeSoundScrollArrowPress = $73626170 (* 'sbap' *); { scroll bars }
+ kThemeSoundScrollArrowEnter = $73626165 (* 'sbae' *);
+ kThemeSoundScrollArrowExit = $73626178 (* 'sbax' *);
+ kThemeSoundScrollArrowRelease = $73626172 (* 'sbar' *);
+ kThemeSoundScrollEndOfTrack = $73627465 (* 'sbte' *);
+ kThemeSoundScrollTrackPress = $73627470 (* 'sbtp' *);
+ kThemeSoundSliderEndOfTrack = $736C7465 (* 'slte' *); { sliders }
+ kThemeSoundSliderTrackPress = $736C7470 (* 'sltp' *);
+ kThemeSoundBalloonOpen = $626C6E6F (* 'blno' *); { help balloons }
+ kThemeSoundBalloonClose = $626C6E63 (* 'blnc' *);
+ kThemeSoundBevelPress = $62657670 (* 'bevp' *); { Bevel buttons }
+ kThemeSoundBevelEnter = $62657665 (* 'beve' *);
+ kThemeSoundBevelExit = $62657678 (* 'bevx' *);
+ kThemeSoundBevelRelease = $62657672 (* 'bevr' *);
+ kThemeSoundLittleArrowUpPress = $6C617570 (* 'laup' *); { Little Arrows }
+ kThemeSoundLittleArrowDnPress = $6C616470 (* 'ladp' *);
+ kThemeSoundLittleArrowEnter = $6C617265 (* 'lare' *);
+ kThemeSoundLittleArrowExit = $6C617278 (* 'larx' *);
+ kThemeSoundLittleArrowUpRelease = $6C617572 (* 'laur' *);
+ kThemeSoundLittleArrowDnRelease = $6C616472 (* 'ladr' *);
+ kThemeSoundPopupPress = $706F7070 (* 'popp' *); { Popup Buttons }
+ kThemeSoundPopupEnter = $706F7065 (* 'pope' *);
+ kThemeSoundPopupExit = $706F7078 (* 'popx' *);
+ kThemeSoundPopupRelease = $706F7072 (* 'popr' *);
+ kThemeSoundDisclosurePress = $64736370 (* 'dscp' *); { Disclosure Buttons }
+ kThemeSoundDisclosureEnter = $64736365 (* 'dsce' *);
+ kThemeSoundDisclosureExit = $64736378 (* 'dscx' *);
+ kThemeSoundDisclosureRelease = $64736372 (* 'dscr' *);
+ kThemeSoundTabPressed = $74616270 (* 'tabp' *); { Tabs }
+ kThemeSoundTabEnter = $74616265 (* 'tabe' *);
+ kThemeSoundTabExit = $74616278 (* 'tabx' *);
+ kThemeSoundTabRelease = $74616272 (* 'tabr' *);
+ kThemeSoundDragTargetHilite = $64746869 (* 'dthi' *); { drag manager }
+ kThemeSoundDragTargetUnhilite = $64747568 (* 'dtuh' *);
+ kThemeSoundDragTargetDrop = $64746472 (* 'dtdr' *);
+ kThemeSoundEmptyTrash = $66747273 (* 'ftrs' *); { finder }
+ kThemeSoundSelectItem = $6673656C (* 'fsel' *);
+ kThemeSoundNewItem = $666E6577 (* 'fnew' *);
+ kThemeSoundReceiveDrop = $66647270 (* 'fdrp' *);
+ kThemeSoundCopyDone = $66637064 (* 'fcpd' *);
+ kThemeSoundResolveAlias = $6672616C (* 'fral' *);
+ kThemeSoundLaunchApp = $666C6170 (* 'flap' *);
+ kThemeSoundDiskInsert = $64736B69 (* 'dski' *);
+ kThemeSoundDiskEject = $64736B65 (* 'dske' *);
+ kThemeSoundFinderDragOnIcon = $66646F6E (* 'fdon' *);
+ kThemeSoundFinderDragOffIcon = $66646F66 (* 'fdof' *);
+
+type
+ ThemeSoundKind = OSType;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Window Metrics }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Window metrics are used by the Appearance manager to fill in the blanks necessary to }
+{ draw windows. If a value is not appropriate for the type of window, be sure to fill in }
+{ the slot in the structure with zero. For the popupTabOffset parameter, you can pass a}
+{ real value based on the left edge of the window. This value might be interpreted in a }
+{ different manner when depending on the value of the popupTabPosition field. The values }
+{ you can pass into popupTabPosition are: }
+{ kThemePopupTabNormalPosition }
+{ Starts the tab left edge at the position indicated by the popupTabOffset field. }
+{ kThemePopupTabCenterOnWindow }
+{ tells us to ignore the offset field and instead simply center the width of the }
+{ handle on the window. }
+{ kThemePopupTabCenterOnOffset }
+{ tells us to center the width of the handle around the value passed in offset. }
+{ The Appearance Manager will try its best to accomodate the requested placement, but may }
+{ move the handle slightly to make it fit correctly. }
+const
+ kThemePopupTabNormalPosition = 0;
+ kThemePopupTabCenterOnWindow = 1;
+ kThemePopupTabCenterOnOffset = 2;
+
+type
+ ThemeWindowMetrics = record
+ metricSize: UInt16; { should be always be sizeof( ThemeWindowMetrics )}
+ titleHeight: SInt16;
+ titleWidth: SInt16;
+ popupTabOffset: SInt16;
+ popupTabWidth: SInt16;
+ popupTabPosition: UInt16;
+ end;
+type
+ ThemeWindowMetricsPtr = ^ThemeWindowMetrics;
+
+{
+ * Summary:
+ * Theme metrics allow you to find out sizes of things in the
+ * current environment, such as how wide a scroll bar is, etc.
+ *
+ * Discussion:
+ * ThemeMetrics
+ }
+const
+{
+ * The width (or height if horizontal) of a scroll bar.
+ }
+ kThemeMetricScrollBarWidth = 0;
+
+ {
+ * The width (or height if horizontal) of a small scroll bar.
+ }
+ kThemeMetricSmallScrollBarWidth = 1;
+
+ {
+ * The height of the non-label part of a check box control.
+ }
+ kThemeMetricCheckBoxHeight = 2;
+
+ {
+ * The height of the non-label part of a radio button control.
+ }
+ kThemeMetricRadioButtonHeight = 3;
+
+ {
+ * The amount of white space surrounding the text Rect of the text
+ * inside of an Edit Text control. If you select all of the text in
+ * an Edit Text control, you can see the white space. The metric is
+ * the number of pixels, per side, that the text Rect is outset to
+ * create the whitespace Rect.
+ }
+ kThemeMetricEditTextWhitespace = 4;
+
+ {
+ * The thickness of the Edit Text frame that surrounds the whitespace
+ * Rect (that is surrounding the text Rect). The metric is the number
+ * of pixels, per side, that the frame Rect is outset from the
+ * whitespace Rect.
+ }
+ kThemeMetricEditTextFrameOutset = 5;
+
+ {
+ * The number of pixels that the list box frame is outset from the
+ * content of the list box.
+ }
+ kThemeMetricListBoxFrameOutset = 6;
+
+ {
+ * This is a deprecated metric. Don't use it. It used to describe
+ * how far the focus rect used to draw from a control, but control
+ * focus drawing no longer uses this information to draw its focus.
+ }
+ kThemeMetricFocusRectOutset = 7;
+
+ {
+ * The thickness of the frame drawn by DrawThemeGenericWell.
+ }
+ kThemeMetricImageWellThickness = 8;
+
+ {
+ * The number of pixels a scrollbar should overlap (actually
+ * underlap) any bounding box which surrounds it and scrollable
+ * content. This also includes the window frame when a scrolbar is
+ * along an edge of the window.
+ }
+ kThemeMetricScrollBarOverlap = 9;
+
+ {
+ * The height of the large tab of a tab control.
+ }
+ kThemeMetricLargeTabHeight = 10;
+
+ {
+ * The width of the caps (end pieces) of the large tabs of a tab
+ * control.
+ }
+ kThemeMetricLargeTabCapsWidth = 11;
+
+ {
+ * The amount to add to the tab height (kThemeMetricLargeTabHeight)
+ * to find out the rectangle height to use with the various Tab
+ * drawing primitives. This amount is also the amount that each tab
+ * overlaps the tab pane.
+ }
+ kThemeMetricTabFrameOverlap = 12;
+
+ {
+ * If less than zero, this indicates that the text should be centered
+ * on each tab. If greater than zero, the text should be justified
+ * (according to the system script direction) and the amount is the
+ * offset from the appropriate edge at which the text should start
+ * drawing.
+ }
+ kThemeMetricTabIndentOrStyle = 13;
+
+ {
+ * The amount of space that every tab's drawing rectangle overlaps
+ * the one on either side of it.
+ }
+ kThemeMetricTabOverlap = 14;
+
+ {
+ * The height of the small tab of a tab control. This includes the
+ * pixels that overlap the tab pane and/or tab pane bar.
+ }
+ kThemeMetricSmallTabHeight = 15;
+
+ {
+ * The width of the caps (end pieces) of the small tabs of a tab
+ * control.
+ }
+ kThemeMetricSmallTabCapsWidth = 16;
+
+ {
+ * The height and the width of the push button control.
+ }
+ kThemeMetricPushButtonHeight = 19;
+
+ {
+ * The height of the list header field of the data browser control.
+ }
+ kThemeMetricListHeaderHeight = 20;
+
+ {
+ * The height of a disclosure triangle control. This triangle is the
+ * not the center of the disclosure button, but its own control.
+ }
+ kThemeMetricDisclosureTriangleHeight = 25;
+
+ {
+ * The width of a disclosure triangle control.
+ }
+ kThemeMetricDisclosureTriangleWidth = 26;
+
+ {
+ * The height of a little arrows control.
+ }
+ kThemeMetricLittleArrowsHeight = 27;
+
+ {
+ * The width of a little arrows control.
+ }
+ kThemeMetricLittleArrowsWidth = 28;
+
+ {
+ * The height of a popup button control.
+ }
+ kThemeMetricPopupButtonHeight = 30;
+
+ {
+ * The height of a small popup button control.
+ }
+ kThemeMetricSmallPopupButtonHeight = 31;
+
+ {
+ * The height of the large progress bar, not including its shadow.
+ }
+ kThemeMetricLargeProgressBarThickness = 32;
+
+ {
+ * This metric is not used.
+ }
+ kThemeMetricPullDownHeight = 33;
+
+ {
+ * This metric is not used.
+ }
+ kThemeMetricSmallPullDownHeight = 34;
+
+ {
+ * The height of the window grow box control.
+ }
+ kThemeMetricResizeControlHeight = 38;
+
+ {
+ * The width of the window grow box control.
+ }
+ kThemeMetricSmallResizeControlHeight = 39;
+
+ {
+ * The height of the horizontal slider control.
+ }
+ kThemeMetricHSliderHeight = 41;
+
+ {
+ * The height of the tick marks for a horizontal slider control.
+ }
+ kThemeMetricHSliderTickHeight = 42;
+
+ {
+ * The width of the vertical slider control.
+ }
+ kThemeMetricVSliderWidth = 45;
+
+ {
+ * The width of the tick marks for a vertical slider control.
+ }
+ kThemeMetricVSliderTickWidth = 46;
+
+ {
+ * The height of the title bar widgets (grow, close, and zoom boxes)
+ * for a document window.
+ }
+ kThemeMetricTitleBarControlsHeight = 49;
+
+ {
+ * The width of the non-label part of a check box control.
+ }
+ kThemeMetricCheckBoxWidth = 50;
+
+ {
+ * The width of the non-label part of a radio button control.
+ }
+ kThemeMetricRadioButtonWidth = 52;
+
+ {
+ * The height of the normal bar, not including its shadow.
+ }
+ kThemeMetricNormalProgressBarThickness = 58;
+
+ {
+ * The number of pixels of shadow depth drawn below the progress bar.
+ }
+ kThemeMetricProgressBarShadowOutset = 59;
+
+ {
+ * The number of pixels of shadow depth drawn below the small
+ * progress bar.
+ }
+ kThemeMetricSmallProgressBarShadowOutset = 60;
+
+ {
+ * The number of pixels that the content of a primary group box is
+ * from the bounds of the control.
+ }
+ kThemeMetricPrimaryGroupBoxContentInset = 61;
+
+ {
+ * The number of pixels that the content of a secondary group box is
+ * from the bounds of the control.
+ }
+ kThemeMetricSecondaryGroupBoxContentInset = 62;
+
+ {
+ * Width allocated to draw the mark character in a menu.
+ }
+ kThemeMetricMenuMarkColumnWidth = 63;
+
+ {
+ * Width allocated for the mark character in a menu item when the
+ * menu has kMenuAttrExcludesMarkColumn.
+ }
+ kThemeMetricMenuExcludedMarkColumnWidth = 64;
+
+ {
+ * Indent into the interior of the mark column at which the mark
+ * character is drawn.
+ }
+ kThemeMetricMenuMarkIndent = 65;
+
+ {
+ * Whitespace at the leading edge of menu item text.
+ }
+ kThemeMetricMenuTextLeadingEdgeMargin = 66;
+
+ {
+ * Whitespace at the trailing edge of menu item text.
+ }
+ kThemeMetricMenuTextTrailingEdgeMargin = 67;
+
+ {
+ * Width per indent level (set by SetMenuItemIndent) of a menu item.
+ }
+ kThemeMetricMenuIndentWidth = 68;
+
+ {
+ * Whitespace at the trailing edge of a menu icon (if the item also
+ * has text).
+ }
+ kThemeMetricMenuIconTrailingEdgeMargin = 69;
+
+
+{
+ * Discussion:
+ * The following metrics are only available in OS X.
+ }
+const
+{
+ * The height of a disclosure button.
+ }
+ kThemeMetricDisclosureButtonHeight = 17;
+
+ {
+ * The height and the width of the round button control.
+ }
+ kThemeMetricRoundButtonSize = 18;
+
+ {
+ * The height of the non-label part of a small check box control.
+ }
+ kThemeMetricSmallCheckBoxHeight = 21;
+
+ {
+ * The width of a disclosure button.
+ }
+ kThemeMetricDisclosureButtonWidth = 22;
+
+ {
+ * The height of a small disclosure button.
+ }
+ kThemeMetricSmallDisclosureButtonHeight = 23;
+
+ {
+ * The width of a small disclosure button.
+ }
+ kThemeMetricSmallDisclosureButtonWidth = 24;
+
+ {
+ * The height (or width if vertical) of a pane splitter.
+ }
+ kThemeMetricPaneSplitterHeight = 29;
+
+ {
+ * The height of the small push button control.
+ }
+ kThemeMetricSmallPushButtonHeight = 35;
+
+ {
+ * The height of the non-label part of a small radio button control.
+ }
+ kThemeMetricSmallRadioButtonHeight = 36;
+
+ {
+ * The height of the relevance indicator control.
+ }
+ kThemeMetricRelevanceIndicatorHeight = 37;
+
+ {
+ * The height and the width of the large round button control.
+ }
+ kThemeMetricLargeRoundButtonSize = 40;
+
+ {
+ * The height of the small, horizontal slider control.
+ }
+ kThemeMetricSmallHSliderHeight = 43;
+
+ {
+ * The height of the tick marks for a small, horizontal slider
+ * control.
+ }
+ kThemeMetricSmallHSliderTickHeight = 44;
+
+ {
+ * The width of the small, vertical slider control.
+ }
+ kThemeMetricSmallVSliderWidth = 47;
+
+ {
+ * The width of the tick marks for a small, vertical slider control.
+ }
+ kThemeMetricSmallVSliderTickWidth = 48;
+
+ {
+ * The width of the non-label part of a small check box control.
+ }
+ kThemeMetricSmallCheckBoxWidth = 51;
+
+ {
+ * The width of the non-label part of a small radio button control.
+ }
+ kThemeMetricSmallRadioButtonWidth = 53;
+
+ {
+ * The minimum width of the thumb of a small, horizontal slider
+ * control.
+ }
+ kThemeMetricSmallHSliderMinThumbWidth = 54;
+
+ {
+ * The minimum width of the thumb of a small, vertical slider control.
+ }
+ kThemeMetricSmallVSliderMinThumbHeight = 55;
+
+ {
+ * The offset of the tick marks from the appropriate side of a small
+ * horizontal slider control.
+ }
+ kThemeMetricSmallHSliderTickOffset = 56;
+
+ {
+ * The offset of the tick marks from the appropriate side of a small
+ * vertical slider control.
+ }
+ kThemeMetricSmallVSliderTickOffset = 57;
+
+
+{
+ * Discussion:
+ * The following metrics are only available in Mac OS X 10.3 and
+ * later.
+ }
+const
+ kThemeMetricComboBoxLargeBottomShadowOffset = 70;
+ kThemeMetricComboBoxLargeRightShadowOffset = 71;
+ kThemeMetricComboBoxSmallBottomShadowOffset = 72;
+ kThemeMetricComboBoxSmallRightShadowOffset = 73;
+ kThemeMetricComboBoxLargeDisclosureWidth = 74;
+ kThemeMetricComboBoxSmallDisclosureWidth = 75;
+ kThemeMetricRoundTextFieldContentInsetLeft = 76;
+ kThemeMetricRoundTextFieldContentInsetRight = 77;
+ kThemeMetricRoundTextFieldContentInsetBottom = 78;
+ kThemeMetricRoundTextFieldContentInsetTop = 79;
+ kThemeMetricRoundTextFieldContentHeight = 80;
+ kThemeMetricComboBoxMiniBottomShadowOffset = 81;
+ kThemeMetricComboBoxMiniDisclosureWidth = 82;
+ kThemeMetricComboBoxMiniRightShadowOffset = 83;
+ kThemeMetricLittleArrowsMiniHeight = 84;
+ kThemeMetricLittleArrowsMiniWidth = 85;
+ kThemeMetricLittleArrowsSmallHeight = 86;
+ kThemeMetricLittleArrowsSmallWidth = 87;
+ kThemeMetricMiniCheckBoxHeight = 88;
+ kThemeMetricMiniCheckBoxWidth = 89;
+ kThemeMetricMiniDisclosureButtonHeight = 90;
+ kThemeMetricMiniDisclosureButtonWidth = 91;
+ kThemeMetricMiniHSliderHeight = 92;
+ kThemeMetricMiniHSliderMinThumbWidth = 93;
+ kThemeMetricMiniHSliderTickHeight = 94;
+ kThemeMetricMiniHSliderTickOffset = 95;
+ kThemeMetricMiniPopupButtonHeight = 96;
+ kThemeMetricMiniPullDownHeight = 97;
+ kThemeMetricMiniPushButtonHeight = 98;
+ kThemeMetricMiniRadioButtonHeight = 99;
+ kThemeMetricMiniRadioButtonWidth = 100;
+ kThemeMetricMiniTabCapsWidth = 101;
+ kThemeMetricMiniTabFrameOverlap = 102;
+ kThemeMetricMiniTabHeight = 103;
+ kThemeMetricMiniTabOverlap = 104;
+ kThemeMetricMiniVSliderMinThumbHeight = 105;
+ kThemeMetricMiniVSliderTickOffset = 106;
+ kThemeMetricMiniVSliderTickWidth = 107;
+ kThemeMetricMiniVSliderWidth = 108;
+ kThemeMetricRoundTextFieldContentInsetWithIconLeft = 109;
+ kThemeMetricRoundTextFieldContentInsetWithIconRight = 110;
+ kThemeMetricRoundTextFieldMiniContentHeight = 111;
+ kThemeMetricRoundTextFieldMiniContentInsetBottom = 112;
+ kThemeMetricRoundTextFieldMiniContentInsetLeft = 113;
+ kThemeMetricRoundTextFieldMiniContentInsetRight = 114;
+ kThemeMetricRoundTextFieldMiniContentInsetTop = 115;
+ kThemeMetricRoundTextFieldMiniContentInsetWithIconLeft = 116;
+ kThemeMetricRoundTextFieldMiniContentInsetWithIconRight = 117;
+ kThemeMetricRoundTextFieldSmallContentHeight = 118;
+ kThemeMetricRoundTextFieldSmallContentInsetBottom = 119;
+ kThemeMetricRoundTextFieldSmallContentInsetLeft = 120;
+ kThemeMetricRoundTextFieldSmallContentInsetRight = 121;
+ kThemeMetricRoundTextFieldSmallContentInsetTop = 122;
+ kThemeMetricRoundTextFieldSmallContentInsetWithIconLeft = 123;
+ kThemeMetricRoundTextFieldSmallContentInsetWithIconRight = 124;
+ kThemeMetricSmallTabFrameOverlap = 125;
+ kThemeMetricSmallTabOverlap = 126;
+
+ {
+ * The height of a small pane splitter. Should only be used in a
+ * window with thick borders, like a metal window.
+ }
+ kThemeMetricSmallPaneSplitterHeight = 127;
+
+
+{
+ * Discussion:
+ * The following metrics are only available in Mac OS X 10.4 and
+ * later.
+ }
+const
+{
+ * The horizontal start offset for the first tick mark on a
+ * horizontal slider.
+ }
+ kThemeMetricHSliderTickOffset = 128;
+
+ {
+ * The vertical start offset for the first tick mark on a vertical
+ * slider.
+ }
+ kThemeMetricVSliderTickOffset = 129;
+
+ {
+ * The minimum thumb height for a thumb on a slider.
+ }
+ kThemeMetricSliderMinThumbHeight = 130;
+ kThemeMetricSliderMinThumbWidth = 131;
+
+ {
+ * The minimum thumb height for a thumb on a scroll bar.
+ }
+ kThemeMetricScrollBarMinThumbHeight = 132;
+
+ {
+ * The minimum thumb width for a thumb on a scroll bar.
+ }
+ kThemeMetricScrollBarMinThumbWidth = 133;
+
+ {
+ * The minimum thumb height for a thumb on a small scroll bar.
+ }
+ kThemeMetricSmallScrollBarMinThumbHeight = 134;
+
+ {
+ * The minimum thumb width for a thumb on a small scroll bar.
+ }
+ kThemeMetricSmallScrollBarMinThumbWidth = 135;
+
+
+type
+ ThemeMetric = UInt32;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Drawing State }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ThemeDrawingState = ^SInt32; { an opaque 32-bit type }
+ ThemeDrawingStatePtr = ^ThemeDrawingState; { when a var xx:ThemeDrawingState parameter can be nil, it is changed to xx: ThemeDrawingStatePtr }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Callback procs }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ThemeTabTitleDrawProcPtr = procedure( const (*var*) bounds: Rect; style: ThemeTabStyle; direction: ThemeTabDirection; depth: SInt16; isColorDev: Boolean; userData: UInt32 );
+type
+ ThemeEraseProcPtr = procedure( const (*var*) bounds: Rect; eraseData: UInt32; depth: SInt16; isColorDev: Boolean );
+type
+ ThemeButtonDrawProcPtr = procedure( const (*var*) bounds: Rect; kind: ThemeButtonKind; const (*var*) info: ThemeButtonDrawInfo; userData: UInt32; depth: SInt16; isColorDev: Boolean );
+type
+ WindowTitleDrawingProcPtr = procedure( const (*var*) bounds: Rect; depth: SInt16; colorDevice: Boolean; userData: UInt32 );
+type
+ ThemeIteratorProcPtr = function( const (*var*) inFileName: Str255; resID: SInt16; inThemeSettings: Collection; inUserData: UnivPtr ): Boolean;
+type
+ ThemeTabTitleDrawUPP = ThemeTabTitleDrawProcPtr;
+type
+ ThemeEraseUPP = ThemeEraseProcPtr;
+type
+ ThemeButtonDrawUPP = ThemeButtonDrawProcPtr;
+type
+ WindowTitleDrawingUPP = WindowTitleDrawingProcPtr;
+type
+ ThemeIteratorUPP = ThemeIteratorProcPtr;
+{
+ * NewThemeTabTitleDrawUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewThemeTabTitleDrawUPP( userRoutine: ThemeTabTitleDrawProcPtr ): ThemeTabTitleDrawUPP; external name '_NewThemeTabTitleDrawUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewThemeEraseUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewThemeEraseUPP( userRoutine: ThemeEraseProcPtr ): ThemeEraseUPP; external name '_NewThemeEraseUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewThemeButtonDrawUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewThemeButtonDrawUPP( userRoutine: ThemeButtonDrawProcPtr ): ThemeButtonDrawUPP; external name '_NewThemeButtonDrawUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewWindowTitleDrawingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewWindowTitleDrawingUPP( userRoutine: WindowTitleDrawingProcPtr ): WindowTitleDrawingUPP; external name '_NewWindowTitleDrawingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewThemeIteratorUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewThemeIteratorUPP( userRoutine: ThemeIteratorProcPtr ): ThemeIteratorUPP; external name '_NewThemeIteratorUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeThemeTabTitleDrawUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeThemeTabTitleDrawUPP( userUPP: ThemeTabTitleDrawUPP ); external name '_DisposeThemeTabTitleDrawUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeThemeEraseUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeThemeEraseUPP( userUPP: ThemeEraseUPP ); external name '_DisposeThemeEraseUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeThemeButtonDrawUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeThemeButtonDrawUPP( userUPP: ThemeButtonDrawUPP ); external name '_DisposeThemeButtonDrawUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeWindowTitleDrawingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeWindowTitleDrawingUPP( userUPP: WindowTitleDrawingUPP ); external name '_DisposeWindowTitleDrawingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeThemeIteratorUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeThemeIteratorUPP( userUPP: ThemeIteratorUPP ); external name '_DisposeThemeIteratorUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeThemeTabTitleDrawUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeThemeTabTitleDrawUPP( const (*var*) bounds: Rect; style: ThemeTabStyle; direction: ThemeTabDirection; depth: SInt16; isColorDev: Boolean; userData: UInt32; userUPP: ThemeTabTitleDrawUPP ); external name '_InvokeThemeTabTitleDrawUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeThemeEraseUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeThemeEraseUPP( const (*var*) bounds: Rect; eraseData: UInt32; depth: SInt16; isColorDev: Boolean; userUPP: ThemeEraseUPP ); external name '_InvokeThemeEraseUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeThemeButtonDrawUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeThemeButtonDrawUPP( const (*var*) bounds: Rect; kind: ThemeButtonKind; const (*var*) info: ThemeButtonDrawInfo; userData: UInt32; depth: SInt16; isColorDev: Boolean; userUPP: ThemeButtonDrawUPP ); external name '_InvokeThemeButtonDrawUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeWindowTitleDrawingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeWindowTitleDrawingUPP( const (*var*) bounds: Rect; depth: SInt16; colorDevice: Boolean; userData: UInt32; userUPP: WindowTitleDrawingUPP ); external name '_InvokeWindowTitleDrawingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeThemeIteratorUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeThemeIteratorUPP( const (*var*) inFileName: Str255; resID: SInt16; inThemeSettings: Collection; inUserData: UnivPtr; userUPP: ThemeIteratorUPP ): Boolean; external name '_InvokeThemeIteratorUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Menu Drawing callbacks }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ MenuTitleDrawingProcPtr = procedure( const (*var*) inBounds: Rect; inDepth: SInt16; inIsColorDevice: Boolean; inUserData: SInt32 );
+type
+ MenuItemDrawingProcPtr = procedure( const (*var*) inBounds: Rect; inDepth: SInt16; inIsColorDevice: Boolean; inUserData: SInt32 );
+type
+ MenuTitleDrawingUPP = MenuTitleDrawingProcPtr;
+type
+ MenuItemDrawingUPP = MenuItemDrawingProcPtr;
+{
+ * NewMenuTitleDrawingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewMenuTitleDrawingUPP( userRoutine: MenuTitleDrawingProcPtr ): MenuTitleDrawingUPP; external name '_NewMenuTitleDrawingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewMenuItemDrawingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewMenuItemDrawingUPP( userRoutine: MenuItemDrawingProcPtr ): MenuItemDrawingUPP; external name '_NewMenuItemDrawingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeMenuTitleDrawingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeMenuTitleDrawingUPP( userUPP: MenuTitleDrawingUPP ); external name '_DisposeMenuTitleDrawingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeMenuItemDrawingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeMenuItemDrawingUPP( userUPP: MenuItemDrawingUPP ); external name '_DisposeMenuItemDrawingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeMenuTitleDrawingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeMenuTitleDrawingUPP( const (*var*) inBounds: Rect; inDepth: SInt16; inIsColorDevice: Boolean; inUserData: SInt32; userUPP: MenuTitleDrawingUPP ); external name '_InvokeMenuTitleDrawingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeMenuItemDrawingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeMenuItemDrawingUPP( const (*var*) inBounds: Rect; inDepth: SInt16; inIsColorDevice: Boolean; inUserData: SInt32; userUPP: MenuItemDrawingUPP ); external name '_InvokeMenuItemDrawingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Appearance Manager APIs }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Registering Appearance-Savvy Applications }
+{
+ * RegisterAppearanceClient()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function RegisterAppearanceClient: OSStatus; external name '_RegisterAppearanceClient';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * UnregisterAppearanceClient()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function UnregisterAppearanceClient: OSStatus; external name '_UnregisterAppearanceClient';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsAppearanceClient()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function IsAppearanceClient( const (*var*) process: ProcessSerialNumber ): Boolean; external name '_IsAppearanceClient';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{****************************************************************************
+ NOTES ON THEME BRUSHES
+ Theme brushes can be either colors or patterns, depending on the theme.
+ Because of this, you should be prepared to handle the case where a brush
+ is a pattern and save and restore the pnPixPat and bkPixPat fields of
+ your GrafPorts when saving the fore and back colors. Also, since patterns
+ in bkPixPat override the background color of the window, you should use
+ BackPat to set your background pattern to a normal white pattern. This
+ will ensure that you can use RGBBackColor to set your back color to white,
+ call EraseRect and get the expected results.
+****************************************************************************}
+
+{
+ * SetThemePen()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetThemePen( inBrush: ThemeBrush; inDepth: SInt16; inIsColorDevice: Boolean ): OSStatus; external name '_SetThemePen';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetThemeBackground()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetThemeBackground( inBrush: ThemeBrush; inDepth: SInt16; inIsColorDevice: Boolean ): OSStatus; external name '_SetThemeBackground';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetThemeTextColor()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetThemeTextColor( inColor: ThemeTextColor; inDepth: SInt16; inIsColorDevice: Boolean ): OSStatus; external name '_SetThemeTextColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetThemeWindowBackground() has moved to MacWindows.h
+ }
+{ Window Placards, Headers and Frames }
+{
+ * DrawThemeWindowHeader()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemeWindowHeader( const (*var*) inRect: Rect; inState: ThemeDrawState ): OSStatus; external name '_DrawThemeWindowHeader';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeWindowListViewHeader()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemeWindowListViewHeader( const (*var*) inRect: Rect; inState: ThemeDrawState ): OSStatus; external name '_DrawThemeWindowListViewHeader';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemePlacard()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemePlacard( const (*var*) inRect: Rect; inState: ThemeDrawState ): OSStatus; external name '_DrawThemePlacard';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeEditTextFrame()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemeEditTextFrame( const (*var*) inRect: Rect; inState: ThemeDrawState ): OSStatus; external name '_DrawThemeEditTextFrame';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeListBoxFrame()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemeListBoxFrame( const (*var*) inRect: Rect; inState: ThemeDrawState ): OSStatus; external name '_DrawThemeListBoxFrame';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Keyboard Focus Drawing }
+{
+ * DrawThemeFocusRect()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemeFocusRect( const (*var*) inRect: Rect; inHasFocus: Boolean ): OSStatus; external name '_DrawThemeFocusRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Dialog Group Boxes and Separators }
+{
+ * DrawThemePrimaryGroup()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemePrimaryGroup( const (*var*) inRect: Rect; inState: ThemeDrawState ): OSStatus; external name '_DrawThemePrimaryGroup';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeSecondaryGroup()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemeSecondaryGroup( const (*var*) inRect: Rect; inState: ThemeDrawState ): OSStatus; external name '_DrawThemeSecondaryGroup';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeSeparator()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemeSeparator( const (*var*) inRect: Rect; inState: ThemeDrawState ): OSStatus; external name '_DrawThemeSeparator';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ BEGIN APPEARANCE 1.0.1 ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ The following Appearance Manager APIs are only available }
+{ in Appearance 1.0.1 or later }
+{
+ * DrawThemeModelessDialogFrame()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemeModelessDialogFrame( const (*var*) inRect: Rect; inState: ThemeDrawState ): OSStatus; external name '_DrawThemeModelessDialogFrame';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeGenericWell()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemeGenericWell( const (*var*) inRect: Rect; inState: ThemeDrawState; inFillCenter: Boolean ): OSStatus; external name '_DrawThemeGenericWell';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeFocusRegion()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemeFocusRegion( inRegion: RgnHandle; inHasFocus: Boolean ): OSStatus; external name '_DrawThemeFocusRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsThemeInColor()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function IsThemeInColor( inDepth: SInt16; inIsColorDevice: Boolean ): Boolean; external name '_IsThemeInColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ IMPORTANT: GetThemeAccentColors will only work in the platinum theme. Any other theme will }
+{ most likely return an error }
+{
+ * GetThemeAccentColors()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetThemeAccentColors( var outColors: CTabHandle ): OSStatus; external name '_GetThemeAccentColors';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeMenuBarBackground()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemeMenuBarBackground( const (*var*) inBounds: Rect; inState: ThemeMenuBarState; inAttributes: UInt32 ): OSStatus; external name '_DrawThemeMenuBarBackground';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeMenuTitle()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemeMenuTitle( const (*var*) inMenuBarRect: Rect; const (*var*) inTitleRect: Rect; inState: ThemeMenuState; inAttributes: UInt32; inTitleProc: MenuTitleDrawingUPP { can be NULL }; inTitleData: UInt32 ): OSStatus; external name '_DrawThemeMenuTitle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeMenuBarHeight()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetThemeMenuBarHeight( var outHeight: SInt16 ): OSStatus; external name '_GetThemeMenuBarHeight';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeMenuBackground()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemeMenuBackground( const (*var*) inMenuRect: Rect; inMenuType: ThemeMenuType ): OSStatus; external name '_DrawThemeMenuBackground';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeMenuBackgroundRegion()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetThemeMenuBackgroundRegion( const (*var*) inMenuRect: Rect; menuType: ThemeMenuType; region: RgnHandle ): OSStatus; external name '_GetThemeMenuBackgroundRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeMenuItem()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemeMenuItem( const (*var*) inMenuRect: Rect; const (*var*) inItemRect: Rect; inVirtualMenuTop: SInt16; inVirtualMenuBottom: SInt16; inState: ThemeMenuState; inItemType: ThemeMenuItemType; inDrawProc: MenuItemDrawingUPP { can be NULL }; inUserData: UInt32 ): OSStatus; external name '_DrawThemeMenuItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeMenuSeparator()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DrawThemeMenuSeparator( const (*var*) inItemRect: Rect ): OSStatus; external name '_DrawThemeMenuSeparator';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeMenuSeparatorHeight()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetThemeMenuSeparatorHeight( var outHeight: SInt16 ): OSStatus; external name '_GetThemeMenuSeparatorHeight';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeMenuItemExtra()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetThemeMenuItemExtra( inItemType: ThemeMenuItemType; var outHeight: SInt16; var outWidth: SInt16 ): OSStatus; external name '_GetThemeMenuItemExtra';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeMenuTitleExtra()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetThemeMenuTitleExtra( var outWidth: SInt16; inIsSquished: Boolean ): OSStatus; external name '_GetThemeMenuTitleExtra';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ BEGIN APPEARANCE 1.1 ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ THEME SWITCHING ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ X ALERT: Please note that Get/SetTheme are severely neutered under Mac OS X at present. }
+{ See the note above regarding what collection tags are supported under X. }
+
+{
+ * GetTheme()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetTheme( ioCollection: Collection ): OSStatus; external name '_GetTheme';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetTheme()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function SetTheme( ioCollection: Collection ): OSStatus; external name '_SetTheme';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IterateThemes()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function IterateThemes( inProc: ThemeIteratorUPP; inUserData: UnivPtr { can be NULL } ): OSStatus; external name '_IterateThemes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ TABS ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * DrawThemeTabPane()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function DrawThemeTabPane( const (*var*) inRect: Rect; inState: ThemeDrawState ): OSStatus; external name '_DrawThemeTabPane';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeTab()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function DrawThemeTab( const (*var*) inRect: Rect; inStyle: ThemeTabStyle; inDirection: ThemeTabDirection; labelProc: ThemeTabTitleDrawUPP { can be NULL }; userData: UInt32 ): OSStatus; external name '_DrawThemeTab';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeTabRegion()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeTabRegion( const (*var*) inRect: Rect; inStyle: ThemeTabStyle; inDirection: ThemeTabDirection; ioRgn: RgnHandle ): OSStatus; external name '_GetThemeTabRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ CURSORS ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * SetThemeCursor()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function SetThemeCursor( inCursor: ThemeCursor ): OSStatus; external name '_SetThemeCursor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetAnimatedThemeCursor()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function SetAnimatedThemeCursor( inCursor: ThemeCursor; inAnimationStep: UInt32 ): OSStatus; external name '_SetAnimatedThemeCursor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ CONTROL STYLE SETTINGS ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * GetThemeScrollBarThumbStyle()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeScrollBarThumbStyle( var outStyle: ThemeScrollBarThumbStyle ): OSStatus; external name '_GetThemeScrollBarThumbStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeScrollBarArrowStyle()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeScrollBarArrowStyle( var outStyle: ThemeScrollBarArrowStyle ): OSStatus; external name '_GetThemeScrollBarArrowStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeCheckBoxStyle()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeCheckBoxStyle( var outStyle: ThemeCheckBoxStyle ): OSStatus; external name '_GetThemeCheckBoxStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ FONTS/TEXT ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * UseThemeFont()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function UseThemeFont( inFontID: ThemeFontID; inScript: ScriptCode ): OSStatus; external name '_UseThemeFont';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeFont()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeFont( inFontID: ThemeFontID; inScript: ScriptCode; outFontName: StringPtr { can be NULL }; var outFontSize: SInt16; var outStyle: Style ): OSStatus; external name '_GetThemeFont';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeTextBox()
+ *
+ * Summary:
+ * Draws text into the area you specify.
+ *
+ * Discussion:
+ * DrawThemeTextBox allows you to draw theme-savvy (ie. Aqua-savvy
+ * on Mac OS X) text. It is unicode savvy (although only partially
+ * so under CarbonLib), and allows you to customize certain text
+ * rendering characteristics such as the font, wrapping behavior,
+ * and justification. The text is drawn into the CGContextRef you
+ * provide, or into the current Quickdraw port if no CGContextRef is
+ * provided. None of DrawThemeTextBox's parameters imply a color, so
+ * you must set up the desired text color separately before calling
+ * DrawThemeTextBox. If you provide a CGContextRef, its fill color
+ * will be used to draw the text. If you do not provide a
+ * CGContextRef, a color based on the current Quickdraw port's
+ * foreground color and the grayishTextOr mode (if set) will be used
+ * to draw the text.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inString:
+ * A CFStringRef containing the unicode characters you wish to
+ * render. You MUST NOT pass in a CFStringRef that was allocated
+ * with any of the "NoCopy" CFString creation APIs; a string
+ * created with a "NoCopy" API has transient storage which is
+ * incompatible with DrawThemeTextBox's caches.
+ *
+ * inFontID:
+ * The ThemeFontID describing the font you'd like to render the
+ * text with. See the discussion of ThemeFontIDs elsewhere in this
+ * header.
+ *
+ * inState:
+ * The ThemeDrawState describing the the state of the interface
+ * element you are drawing the text for. If, for example, you are
+ * drawing text for an inactive window, you would pass
+ * kThemeStateInactive. The ThemeDrawState is generally only used
+ * to determine the shadow characteristics for the text on Mac OS
+ * X. Note that the ThemeDrawState does NOT imply a color. It is
+ * NOT used as a mechanism for graying the text. If you wish to
+ * draw grayed text, you must set up the desired gray color and
+ * apply it to either the current Quickdraw port or the
+ * CGContextRef as appropriate.
+ *
+ * inWrapToWidth:
+ * A Boolean indicating whether you want to draw multiple lines of
+ * text wrapped to a bounding box. False indicates that only one
+ * line of text should be drawn without any sort of wrapping.
+ *
+ * inBoundingBox:
+ * The rectangle (in coordinates relative to the current Quickdraw
+ * port) describing the area to draw the text within. The first
+ * line of text will be top-justified to this rectangle. Wrapping
+ * (if desired) will happen at the horizontal extent of this
+ * rectangle. Regardless of the amount of text in your
+ * CFStringRef, all drawn text will be clipped to this rectangle.
+ *
+ * inJust:
+ * The horizontal justification you would like for your text. You
+ * can use one of the standard justification constants from
+ * TextEdit.h.
+ *
+ * inContext:
+ * The CGContextRef into which you would like to draw the text. On
+ * Mac OS X, all text drawing happens in CGContextRefs; if you
+ * pass NULL, a transient CGContextRef will be allocated and
+ * deallocated for use within the single API call. Relying on the
+ * system behavior if transiently creating CGContextRefs may
+ * result in performance problems. On Mac OS 9, the CGContextRef
+ * parameter is ignored.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function DrawThemeTextBox( inString: CFStringRef; inFontID: ThemeFontID; inState: ThemeDrawState; inWrapToWidth: Boolean; const (*var*) inBoundingBox: Rect; inJust: SInt16; inContext: UnivPtr ): OSStatus; external name '_DrawThemeTextBox';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TruncateThemeText()
+ *
+ * Summary:
+ * Truncates text to fit within the width you specify.
+ *
+ * Discussion:
+ * TruncateThemeText alters a unicode string to fit within a width
+ * that you specify. It is unicode savvy (although only partially so
+ * under CarbonLib), and makes its calculations (and any subsequent
+ * string alteration) based on the font and state you specify. If
+ * the string needs to be truncated, it will be reduced to the
+ * maximum number of characters which (with the addition of an
+ * ellipsis character) fits within the specified width.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inString:
+ * A CFMutableStringRef containing the unicode characters you wish
+ * to truncate. On output, inString may have been altered to fit
+ * within the specified width. You MUST NOT pass in a CFStringRef
+ * that was allocated with any of the "NoCopy" CFString creation
+ * APIs (see note in DrawThemeTextBox above).
+ *
+ * inFontID:
+ * The ThemeFontID to use for text measurements. See the
+ * discussion of ThemeFontIDs elsewhere in this header.
+ *
+ * inState:
+ * The ThemeDrawState which matches the state you will ultimately
+ * render the string width. This may affect text measurement
+ * during truncation, so you should be sure the value you pass to
+ * TruncateThemeText matches the value you will eventually use for
+ * drawing.
+ *
+ * inPixelWidthLimit:
+ * The maximum width (in pixels) that the resulting truncated
+ * string may have.
+ *
+ * inTruncWhere:
+ * A TruncCode indicating where you would like truncation to occur.
+ *
+ * outTruncated:
+ * On output, this Boolean value indicates whether the string was
+ * truncated. True means the string was truncated. False means the
+ * string was not (and did not need to be) truncated.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TruncateThemeText( inString: CFMutableStringRef; inFontID: ThemeFontID; inState: ThemeDrawState; inPixelWidthLimit: SInt16; inTruncWhere: TruncCode; outTruncated: BooleanPtr { can be NULL } ): OSStatus; external name '_TruncateThemeText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeTextDimensions()
+ *
+ * Summary:
+ * Tells you the height, width, and baseline for a string.
+ *
+ * Discussion:
+ * GetThemeTextDimensions measures the given string using a font and
+ * state you specify. It always reports the actual height and
+ * baseline. It sometimes reports the actual width (see below). It
+ * can measure a string that wraps. It is unicode savvy (although
+ * only partially so under CarbonLib).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inString:
+ * A CFStringRef containing the unicode characters you wish to
+ * measure. You MUST NOT pass in a CFStringRef that was allocated
+ * with any of the "NoCopy" CFString creation APIs (see note in
+ * DrawThemeTextBox above).
+ *
+ * inFontID:
+ * The ThemeFontID describing the font you'd like to measure the
+ * text with. See the discussion of ThemeFontIDs elsewhere in this
+ * header.
+ *
+ * inState:
+ * The ThemeDrawState which matches the state you will ultimately
+ * render the string width. This may affect text measurement, so
+ * you should be sure the value you pass to TruncateThemeText
+ * matches the value you will eventually use for drawing.
+ *
+ * inWrapToWidth:
+ * A Boolean indicating whether you want the measurements based on
+ * wrapping the text to a specific width. If you pass true, you
+ * must specify the desired width in ioBounds->h.
+ *
+ * ioBounds:
+ * On output, ioBounds->v contains the height of the text. If you
+ * pass false to inWrapToWidth, ioBounds->h will contain the width
+ * of the text on output. If you pass true to inWrapToWidth,
+ * ioBounds->h must (on input) contain the desired width for
+ * wrapping; on output, ioBounds->h contains the same value you
+ * specified on input.
+ *
+ * outBaseline:
+ * On output, outBaseline contains the offset (in Quickdraw space)
+ * from the bottom edge of the last line of text to the baseline
+ * of the first line of text. outBaseline will generally be a
+ * negative value. On Mac OS X 10.2 and later, you may pass NULL
+ * if you don't want this information.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function GetThemeTextDimensions( inString: CFStringRef; inFontID: ThemeFontID; inState: ThemeDrawState; inWrapToWidth: Boolean; var ioBounds: Point; outBaseline: SInt16Ptr { can be NULL } ): OSStatus; external name '_GetThemeTextDimensions';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeTextShadowOutset()
+ *
+ * Summary:
+ * Tells you the amount of space taken up by the shadow for a given
+ * font/state combination.
+ *
+ * Discussion:
+ * GetThemeTextShadowOutset passes back the maximum amount of space
+ * the shadow will take up for text drawn in the specified font and
+ * state. While GetThemeTextDimensions tells you how much space is
+ * taken up by the character glyphs themselves, it does not
+ * incorporate the font/state shadow into its calculations. If you
+ * need to know how much total space including the shadow will be
+ * taken up, call GetThemeTextDimensions followed by
+ * GetThemeTextShadowOutset.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inFontID:
+ * The ThemeFontID describing the font you'd like the shadow
+ * characteristics of. Font and state both determine the amount of
+ * shadow that will be used on rendered text. See the discussion
+ * of ThemeFontIDs elsewhere in this header.
+ *
+ * inState:
+ * The ThemeDrawState which matches the state you'd like the
+ * shadow characteristics of. Font and state both determine the
+ * amount of shadow that will be used on rendered text.
+ *
+ * outOutset:
+ * On output, outOutset contains the amount of space the shadow
+ * will take up beyond each edge of the text bounding rectangle
+ * returned by GetThemeTextDimensions. The fields of outOutset
+ * will either be positive values or zero.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function GetThemeTextShadowOutset( inFontID: ThemeFontID; inState: ThemeDrawState; var outOutset: Rect ): OSStatus; external name '_GetThemeTextShadowOutset';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ TRACKS ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * DrawThemeTrack()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function DrawThemeTrack( const (*var*) drawInfo: ThemeTrackDrawInfo; rgnGhost: RgnHandle { can be NULL }; eraseProc: ThemeEraseUPP { can be NULL }; eraseData: UInt32 ): OSStatus; external name '_DrawThemeTrack';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HitTestThemeTrack()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function HitTestThemeTrack( const (*var*) drawInfo: ThemeTrackDrawInfo; mousePoint: Point; var partHit: AppearancePartCode ): Boolean; external name '_HitTestThemeTrack';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeTrackBounds()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeTrackBounds( const (*var*) drawInfo: ThemeTrackDrawInfo; var bounds: Rect ): OSStatus; external name '_GetThemeTrackBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeTrackThumbRgn()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeTrackThumbRgn( const (*var*) drawInfo: ThemeTrackDrawInfo; thumbRgn: RgnHandle ): OSStatus; external name '_GetThemeTrackThumbRgn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeTrackDragRect()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeTrackDragRect( const (*var*) drawInfo: ThemeTrackDrawInfo; var dragRect: Rect ): OSStatus; external name '_GetThemeTrackDragRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeTrackTickMarks()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function DrawThemeTrackTickMarks( const (*var*) drawInfo: ThemeTrackDrawInfo; numTicks: ItemCount; eraseProc: ThemeEraseUPP { can be NULL }; eraseData: UInt32 ): OSStatus; external name '_DrawThemeTrackTickMarks';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeTrackThumbPositionFromOffset()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeTrackThumbPositionFromOffset( const (*var*) drawInfo: ThemeTrackDrawInfo; thumbOffset: Point; var relativePosition: SInt32 ): OSStatus; external name '_GetThemeTrackThumbPositionFromOffset';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeTrackThumbPositionFromRegion()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeTrackThumbPositionFromRegion( const (*var*) drawInfo: ThemeTrackDrawInfo; thumbRgn: RgnHandle; var relativePosition: SInt32 ): OSStatus; external name '_GetThemeTrackThumbPositionFromRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeTrackLiveValue()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeTrackLiveValue( const (*var*) drawInfo: ThemeTrackDrawInfo; relativePosition: SInt32; var value: SInt32 ): OSStatus; external name '_GetThemeTrackLiveValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ SCROLLBAR ARROWS ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * DrawThemeScrollBarArrows()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function DrawThemeScrollBarArrows( const (*var*) bounds: Rect; enableState: ThemeTrackEnableState; pressState: ThemeTrackPressState; isHoriz: Boolean; var trackBounds: Rect ): OSStatus; external name '_DrawThemeScrollBarArrows';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeScrollBarTrackRect()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeScrollBarTrackRect( const (*var*) bounds: Rect; enableState: ThemeTrackEnableState; pressState: ThemeTrackPressState; isHoriz: Boolean; var trackBounds: Rect ): OSStatus; external name '_GetThemeScrollBarTrackRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HitTestThemeScrollBarArrows()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function HitTestThemeScrollBarArrows( const (*var*) scrollBarBounds: Rect; enableState: ThemeTrackEnableState; pressState: ThemeTrackPressState; isHoriz: Boolean; ptHit: Point; var trackBounds: Rect; var partcode: AppearancePartCode ): Boolean; external name '_HitTestThemeScrollBarArrows';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ WINDOWS ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * GetThemeWindowRegion()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeWindowRegion( flavor: ThemeWindowType; const (*var*) contRect: Rect; state: ThemeDrawState; const (*var*) metrics: ThemeWindowMetrics; attributes: ThemeWindowAttributes; winRegion: AppearanceRegionCode; rgn: RgnHandle ): OSStatus; external name '_GetThemeWindowRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeWindowFrame()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function DrawThemeWindowFrame( flavor: ThemeWindowType; const (*var*) contRect: Rect; state: ThemeDrawState; const (*var*) metrics: ThemeWindowMetrics; attributes: ThemeWindowAttributes; titleProc: WindowTitleDrawingUPP { can be NULL }; titleData: UInt32 ): OSStatus; external name '_DrawThemeWindowFrame';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeTitleBarWidget()
+ *
+ * Summary:
+ * Draws the requested theme title bar widget.
+ *
+ * Discussion:
+ * DrawThemeTitleBarWidget renders the requested theme title bar
+ * widget in the proper location of a window. A common
+ * misconception when using this API is that the client must specify
+ * the exact location of the widget in the window. The widget will
+ * locate itself in the window based relative to the content rect
+ * passed in content rectangle -- the contRect parameter. Another
+ * common problem is to ignore the window's attributes. The
+ * attributes must be set up properly to describe the window for
+ * which the widget is to be drawn.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * flavor:
+ * A valid ThemeWindowtype describing the type of theme window for
+ * which you would like to draw a widget.
+ *
+ * contRect:
+ * A rectangle describing the window's content area. The widget
+ * is drawn relative to the content rectangle of the window, so
+ * this parameter does not describe the actual widget bounds, it
+ * describes the window's content rectangle.
+ *
+ * state:
+ * A valid ThemeDrawState which describes the state of the window
+ * for which the widget is to be drawn.
+ *
+ * metrics:
+ * A pointer to a set of valid ThemeWindowMetrics. At this time,
+ * none of the fields of the metrics are pertinent to the widgets,
+ * so the only important field is the metricSize field to mark the
+ * structure as valid.
+ *
+ * attributes:
+ * A valid ThemeWindowAttributes set which describes the window
+ * for which the widget is to be drawn.
+ *
+ * widget:
+ * A valid ThemeTitleBarWidget set which describes which widget to
+ * draw.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function DrawThemeTitleBarWidget( flavor: ThemeWindowType; const (*var*) contRect: Rect; state: ThemeDrawState; const (*var*) metrics: ThemeWindowMetrics; attributes: ThemeWindowAttributes; widget: ThemeTitleBarWidget ): OSStatus; external name '_DrawThemeTitleBarWidget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeWindowRegionHit()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeWindowRegionHit( flavor: ThemeWindowType; const (*var*) inContRect: Rect; state: ThemeDrawState; const (*var*) metrics: ThemeWindowMetrics; inAttributes: ThemeWindowAttributes; inPoint: Point; var outRegionHit: AppearanceRegionCode ): Boolean; external name '_GetThemeWindowRegionHit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeScrollBarDelimiters()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function DrawThemeScrollBarDelimiters( flavor: ThemeWindowType; const (*var*) inContRect: Rect; state: ThemeDrawState; attributes: ThemeWindowAttributes ): OSStatus; external name '_DrawThemeScrollBarDelimiters';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ BUTTONS ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * DrawThemeButton()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function DrawThemeButton( const (*var*) inBounds: Rect; inKind: ThemeButtonKind; const (*var*) inNewInfo: ThemeButtonDrawInfo; {const} inPrevInfo: ThemeButtonDrawInfoPtr { can be NULL }; inEraseProc: ThemeEraseUPP { can be NULL }; inLabelProc: ThemeButtonDrawUPP { can be NULL }; inUserData: UInt32 ): OSStatus; external name '_DrawThemeButton';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeButtonRegion()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeButtonRegion( const (*var*) inBounds: Rect; inKind: ThemeButtonKind; const (*var*) inNewInfo: ThemeButtonDrawInfo; outRegion: RgnHandle ): OSStatus; external name '_GetThemeButtonRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeButtonContentBounds()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeButtonContentBounds( const (*var*) inBounds: Rect; inKind: ThemeButtonKind; const (*var*) inDrawInfo: ThemeButtonDrawInfo; var outBounds: Rect ): OSStatus; external name '_GetThemeButtonContentBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeButtonBackgroundBounds()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeButtonBackgroundBounds( const (*var*) inBounds: Rect; inKind: ThemeButtonKind; const (*var*) inDrawInfo: ThemeButtonDrawInfo; var outBounds: Rect ): OSStatus; external name '_GetThemeButtonBackgroundBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ INTERFACE SOUNDS ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ X ALERT: Please note that the sound APIs do not work on Mac OS X at present. }
+{
+ * PlayThemeSound()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function PlayThemeSound( kind: ThemeSoundKind ): OSStatus; external name '_PlayThemeSound';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * BeginThemeDragSound()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function BeginThemeDragSound( kind: ThemeDragSoundKind ): OSStatus; external name '_BeginThemeDragSound';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * EndThemeDragSound()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function EndThemeDragSound: OSStatus; external name '_EndThemeDragSound';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ PRIMITIVES ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * DrawThemeTickMark()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function DrawThemeTickMark( const (*var*) bounds: Rect; state: ThemeDrawState ): OSStatus; external name '_DrawThemeTickMark';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeChasingArrows()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function DrawThemeChasingArrows( const (*var*) bounds: Rect; index: UInt32; state: ThemeDrawState; eraseProc: ThemeEraseUPP { can be NULL }; eraseData: UInt32 ): OSStatus; external name '_DrawThemeChasingArrows';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemePopupArrow()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function DrawThemePopupArrow( const (*var*) bounds: Rect; orientation: ThemeArrowOrientation; size: ThemePopupArrowSize; state: ThemeDrawState; eraseProc: ThemeEraseUPP { can be NULL }; eraseData: UInt32 ): OSStatus; external name '_DrawThemePopupArrow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeStandaloneGrowBox()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function DrawThemeStandaloneGrowBox( origin: Point; growDirection: ThemeGrowDirection; isSmall: Boolean; state: ThemeDrawState ): OSStatus; external name '_DrawThemeStandaloneGrowBox';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawThemeStandaloneNoGrowBox()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function DrawThemeStandaloneNoGrowBox( origin: Point; growDirection: ThemeGrowDirection; isSmall: Boolean; state: ThemeDrawState ): OSStatus; external name '_DrawThemeStandaloneNoGrowBox';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeStandaloneGrowBoxBounds()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeStandaloneGrowBoxBounds( origin: Point; growDirection: ThemeGrowDirection; isSmall: Boolean; var bounds: Rect ): OSStatus; external name '_GetThemeStandaloneGrowBoxBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ DRAWING STATE ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ The following routines help you save and restore the drawing state in a theme-savvy manner. With }
+{ these weapons in your arsenal, there is no grafport you cannot tame. Use ThemeGetDrawingState to }
+{ get the current drawing settings for the current port. It will return an opaque object for you }
+{ to pass into SetThemeDrawingState later on. When you are finished with the state, call the }
+{ DisposeThemeDrawingState routine. You can alternatively pass true into the inDisposeNow }
+{ parameter of the SetThemeDrawingState routine. You can use this routine to copy the drawing }
+{ state from one port to another as well. }
+{ As of this writing (Mac OS 9.1 and Mac OS X), Get/SetThemeDrawingState will save and restore }
+{ this data in the port: }
+{ pen size }
+{ pen location }
+{ pen mode }
+{ pen Pattern and PixPat }
+{ background Pattern and PixPat }
+{ RGB foreground and background colors }
+{ text mode }
+{ pattern origin }
+{ Get/SetThemeDrawingState may save and restore additional port state in the future, but you can }
+{ rely on them to always save at least this port state. }
+{
+ * NormalizeThemeDrawingState()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function NormalizeThemeDrawingState: OSStatus; external name '_NormalizeThemeDrawingState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeDrawingState()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeDrawingState( var outState: ThemeDrawingState ): OSStatus; external name '_GetThemeDrawingState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetThemeDrawingState()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function SetThemeDrawingState( inState: ThemeDrawingState; inDisposeNow: Boolean ): OSStatus; external name '_SetThemeDrawingState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DisposeThemeDrawingState()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function DisposeThemeDrawingState( inState: ThemeDrawingState ): OSStatus; external name '_DisposeThemeDrawingState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ MISCELLANEOUS ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ApplyThemeBackground is used to set up the background for embedded controls }
+{ It is normally called by controls that are embedders. The standard controls }
+{ call this API to ensure a correct background for the current theme. You pass }
+{ in the same rectangle you would if you were calling the drawing primitive. }
+{
+ * ApplyThemeBackground()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function ApplyThemeBackground( inKind: ThemeBackgroundKind; const (*var*) bounds: Rect; inState: ThemeDrawState; inDepth: SInt16; inColorDev: Boolean ): OSStatus; external name '_ApplyThemeBackground';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetThemeTextColorForWindow() has moved to MacWindows.h
+ }
+{
+ * IsValidAppearanceFileType()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function IsValidAppearanceFileType( fileType: OSType ): Boolean; external name '_IsValidAppearanceFileType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeBrushAsColor()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeBrushAsColor( inBrush: ThemeBrush; inDepth: SInt16; inColorDev: Boolean; var outColor: RGBColor ): OSStatus; external name '_GetThemeBrushAsColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetThemeTextColor()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function GetThemeTextColor( inColor: ThemeTextColor; inDepth: SInt16; inColorDev: Boolean; var outColor: RGBColor ): OSStatus; external name '_GetThemeTextColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ BEGIN CARBON ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * GetThemeMetric()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetThemeMetric( inMetric: ThemeMetric; var outMetric: SInt32 ): OSStatus; external name '_GetThemeMetric';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CopyThemeIdentifier()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function CopyThemeIdentifier( var outIdentifier: CFStringRef ): OSStatus; external name '_CopyThemeIdentifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Obsolete symbolic names }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Obsolete error codes - use the new ones, s'il vous plait / kudasai }
+const
+ appearanceBadBrushIndexErr = themeInvalidBrushErr; { pattern index invalid }
+ appearanceProcessRegisteredErr = themeProcessRegisteredErr;
+ appearanceProcessNotRegisteredErr = themeProcessNotRegisteredErr;
+ appearanceBadTextColorIndexErr = themeBadTextColorErr;
+ appearanceThemeHasNoAccents = themeHasNoAccentsErr;
+ appearanceBadCursorIndexErr = themeBadCursorIndexErr;
+
+const
+ kThemeActiveDialogBackgroundBrush = kThemeBrushDialogBackgroundActive;
+ kThemeInactiveDialogBackgroundBrush = kThemeBrushDialogBackgroundInactive;
+ kThemeActiveAlertBackgroundBrush = kThemeBrushAlertBackgroundActive;
+ kThemeInactiveAlertBackgroundBrush = kThemeBrushAlertBackgroundInactive;
+ kThemeActiveModelessDialogBackgroundBrush = kThemeBrushModelessDialogBackgroundActive;
+ kThemeInactiveModelessDialogBackgroundBrush = kThemeBrushModelessDialogBackgroundInactive;
+ kThemeActiveUtilityWindowBackgroundBrush = kThemeBrushUtilityWindowBackgroundActive;
+ kThemeInactiveUtilityWindowBackgroundBrush = kThemeBrushUtilityWindowBackgroundInactive;
+ kThemeListViewSortColumnBackgroundBrush = kThemeBrushListViewSortColumnBackground;
+ kThemeListViewBackgroundBrush = kThemeBrushListViewBackground;
+ kThemeIconLabelBackgroundBrush = kThemeBrushIconLabelBackground;
+ kThemeListViewSeparatorBrush = kThemeBrushListViewSeparator;
+ kThemeChasingArrowsBrush = kThemeBrushChasingArrows;
+ kThemeDragHiliteBrush = kThemeBrushDragHilite;
+ kThemeDocumentWindowBackgroundBrush = kThemeBrushDocumentWindowBackground;
+ kThemeFinderWindowBackgroundBrush = kThemeBrushFinderWindowBackground;
+
+const
+ kThemeActiveScrollBarDelimiterBrush = kThemeBrushScrollBarDelimiterActive;
+ kThemeInactiveScrollBarDelimiterBrush = kThemeBrushScrollBarDelimiterInactive;
+ kThemeFocusHighlightBrush = kThemeBrushFocusHighlight;
+ kThemeActivePopupArrowBrush = kThemeBrushPopupArrowActive;
+ kThemePressedPopupArrowBrush = kThemeBrushPopupArrowPressed;
+ kThemeInactivePopupArrowBrush = kThemeBrushPopupArrowInactive;
+ kThemeAppleGuideCoachmarkBrush = kThemeBrushAppleGuideCoachmark;
+
+const
+ kThemeActiveDialogTextColor = kThemeTextColorDialogActive;
+ kThemeInactiveDialogTextColor = kThemeTextColorDialogInactive;
+ kThemeActiveAlertTextColor = kThemeTextColorAlertActive;
+ kThemeInactiveAlertTextColor = kThemeTextColorAlertInactive;
+ kThemeActiveModelessDialogTextColor = kThemeTextColorModelessDialogActive;
+ kThemeInactiveModelessDialogTextColor = kThemeTextColorModelessDialogInactive;
+ kThemeActiveWindowHeaderTextColor = kThemeTextColorWindowHeaderActive;
+ kThemeInactiveWindowHeaderTextColor = kThemeTextColorWindowHeaderInactive;
+ kThemeActivePlacardTextColor = kThemeTextColorPlacardActive;
+ kThemeInactivePlacardTextColor = kThemeTextColorPlacardInactive;
+ kThemePressedPlacardTextColor = kThemeTextColorPlacardPressed;
+ kThemeActivePushButtonTextColor = kThemeTextColorPushButtonActive;
+ kThemeInactivePushButtonTextColor = kThemeTextColorPushButtonInactive;
+ kThemePressedPushButtonTextColor = kThemeTextColorPushButtonPressed;
+ kThemeActiveBevelButtonTextColor = kThemeTextColorBevelButtonActive;
+ kThemeInactiveBevelButtonTextColor = kThemeTextColorBevelButtonInactive;
+ kThemePressedBevelButtonTextColor = kThemeTextColorBevelButtonPressed;
+ kThemeActivePopupButtonTextColor = kThemeTextColorPopupButtonActive;
+ kThemeInactivePopupButtonTextColor = kThemeTextColorPopupButtonInactive;
+ kThemePressedPopupButtonTextColor = kThemeTextColorPopupButtonPressed;
+ kThemeIconLabelTextColor = kThemeTextColorIconLabel;
+ kThemeListViewTextColor = kThemeTextColorListView;
+
+const
+ kThemeActiveDocumentWindowTitleTextColor = kThemeTextColorDocumentWindowTitleActive;
+ kThemeInactiveDocumentWindowTitleTextColor = kThemeTextColorDocumentWindowTitleInactive;
+ kThemeActiveMovableModalWindowTitleTextColor = kThemeTextColorMovableModalWindowTitleActive;
+ kThemeInactiveMovableModalWindowTitleTextColor = kThemeTextColorMovableModalWindowTitleInactive;
+ kThemeActiveUtilityWindowTitleTextColor = kThemeTextColorUtilityWindowTitleActive;
+ kThemeInactiveUtilityWindowTitleTextColor = kThemeTextColorUtilityWindowTitleInactive;
+ kThemeActivePopupWindowTitleColor = kThemeTextColorPopupWindowTitleActive;
+ kThemeInactivePopupWindowTitleColor = kThemeTextColorPopupWindowTitleInactive;
+ kThemeActiveRootMenuTextColor = kThemeTextColorRootMenuActive;
+ kThemeSelectedRootMenuTextColor = kThemeTextColorRootMenuSelected;
+ kThemeDisabledRootMenuTextColor = kThemeTextColorRootMenuDisabled;
+ kThemeActiveMenuItemTextColor = kThemeTextColorMenuItemActive;
+ kThemeSelectedMenuItemTextColor = kThemeTextColorMenuItemSelected;
+ kThemeDisabledMenuItemTextColor = kThemeTextColorMenuItemDisabled;
+ kThemeActivePopupLabelTextColor = kThemeTextColorPopupLabelActive;
+ kThemeInactivePopupLabelTextColor = kThemeTextColorPopupLabelInactive;
+
+const
+ kAEThemeSwitch = kAEAppearanceChanged; { Event ID's: Theme Switched }
+
+const
+ kThemeNoAdornment = kThemeAdornmentNone;
+ kThemeDefaultAdornment = kThemeAdornmentDefault;
+ kThemeFocusAdornment = kThemeAdornmentFocus;
+ kThemeRightToLeftAdornment = kThemeAdornmentRightToLeft;
+ kThemeDrawIndicatorOnly = kThemeAdornmentDrawIndicatorOnly;
+
+const
+ kThemeBrushPassiveAreaFill = kThemeBrushStaticAreaFill;
+
+const
+ kThemeMetricCheckBoxGlyphHeight = kThemeMetricCheckBoxHeight;
+ kThemeMetricRadioButtonGlyphHeight = kThemeMetricRadioButtonHeight;
+ kThemeMetricDisclosureButtonSize = kThemeMetricDisclosureButtonHeight;
+ kThemeMetricBestListHeaderHeight = kThemeMetricListHeaderHeight;
+ kThemeMetricSmallProgressBarThickness = kThemeMetricNormalProgressBarThickness; { obsolete }
+ kThemeMetricProgressBarThickness = kThemeMetricLargeProgressBarThickness; { obsolete }
+
+const
+ kThemeScrollBar = kThemeMediumScrollBar;
+ kThemeSlider = kThemeMediumSlider;
+ kThemeProgressBar = kThemeMediumProgressBar;
+ kThemeIndeterminateBar = kThemeMediumIndeterminateBar;
+
+
+
+
+{unit Controls}
+{
+ File: HIToolbox/Controls.h
+
+ Contains: Control Manager interfaces
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1985-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Resource Types }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kControlDefProcType = $43444546 (* 'CDEF' *);
+ kControlTemplateResourceType = $434E544C (* 'CNTL' *);
+ kControlColorTableResourceType = $63637462 (* 'cctb' *);
+ kControlDefProcResourceType = $43444546 (* 'CDEF' *);
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Format of a ÔCNTLÕ resource }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlTemplate = record
+ controlRect: Rect;
+ controlValue: SInt16;
+ controlVisible: Boolean;
+ fill: SInt8;
+ controlMaximum: SInt16;
+ controlMinimum: SInt16;
+ controlDefProcID: SInt16;
+ controlReference: SInt32;
+ controlTitle: Str255;
+ end;
+ ControlTemplatePtr = ^ControlTemplate;
+type
+ ControlTemplateHandle = ^ControlTemplatePtr;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ ControlRef }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlRef = ^SInt32; { an opaque 32-bit type }
+ ControlRefPtr = ^ControlRef; { when a var xx:ControlRef parameter can be nil, it is changed to xx: ControlRefPtr }
+
+{ ControlHandle is obsolete. Use ControlRef.}
+type
+ ControlHandle = ControlRef;
+type
+ ControlPartCode = SInt16;
+ ControlPartCodePtr = ^ControlPartCode; { when a var xx:ControlPartCode parameter can be nil, it is changed to xx: ControlPartCodePtr }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control ActionProcPtr }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlActionProcPtr = procedure( theControl: ControlRef; partCode: ControlPartCode );
+type
+ ControlActionUPP = ControlActionProcPtr;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control ActionProcPtr : Epilogue }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * NewControlActionUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewControlActionUPP( userRoutine: ControlActionProcPtr ): ControlActionUPP; external name '_NewControlActionUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeControlActionUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeControlActionUPP( userUPP: ControlActionUPP ); external name '_DisposeControlActionUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeControlActionUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeControlActionUPP( theControl: ControlRef; partCode: ControlPartCode; userUPP: ControlActionUPP ); external name '_InvokeControlActionUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Color Table }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ cFrameColor = 0;
+ cBodyColor = 1;
+ cTextColor = 2;
+ cThumbColor = 3;
+ kNumberCtlCTabEntries = 4;
+
+type
+ CtlCTabPtr = ^CtlCTab;
+ CtlCTab = record
+ ccSeed: SInt32;
+ ccRider: SInt16;
+ ctSize: SInt16;
+ ctTable: array [0..3] of ColorSpec;
+ end;
+type
+ CCTabPtr = CtlCTabPtr;
+type
+ CCTabHandle = ^CCTabPtr;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Variants }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlVariant = SInt16;
+const
+ kControlNoVariant = 0; { No variant}
+ kControlUsesOwningWindowsFontVariant = 1 shl 3; { Control uses owning windows font to display text}
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Part Codes }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Basic part codes }
+const
+ kControlNoPart = kAppearancePartMetaNone;
+ kControlIndicatorPart = kAppearancePartIndicator;
+ kControlDisabledPart = kAppearancePartMetaDisabled;
+ kControlInactivePart = kAppearancePartMetaInactive;
+
+{ Use this constant in Get/SetControlData when the data referred to is not }
+{ specific to a part, but rather the entire control, e.g. the list handle of a }
+{ list box control. }
+const
+ kControlEntireControl = kControlNoPart;
+
+{ Meta-Parts }
+{ If you haven't guessed from looking at other toolbox headers. We like the word }
+{ 'meta'. It's cool. So here's one more for you. A meta-part is a part used in a call }
+{ to the GetControlRegion API. These parts are parts that might be defined by a }
+{ control, but should not be returned from calls like TestControl, et al. They define }
+{ a region of a control, presently the structure and the content region. The content }
+{ region is only defined by controls that can embed other controls. It is the area }
+{ that embedded content can live. }
+{ Along with these parts, you can also pass in normal part codes to get the regions }
+{ of the parts. Not all controls fully support this at the time this was written. }
+const
+ kControlStructureMetaPart = -1;
+ kControlContentMetaPart = -2;
+ kControlOpaqueMetaPart = -3; { Jaguar or later}
+ kControlClickableMetaPart = -4; { Panther or later, only used for async window dragging. Default is structure region.}
+
+{ focusing part codes }
+const
+ kControlFocusNoPart = kControlNoPart; { tells control to clear its focus}
+ kControlFocusNextPart = -1; { tells control to focus on the next part}
+ kControlFocusPrevPart = -2; { tells control to focus on the previous part}
+
+type
+ ControlFocusPart = ControlPartCode;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Collection Tags }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ These are standard tags that you will find in the initial data Collection that is passed in the }
+{ 'param' parameter to the initCntl message, and in the kEventParamInitCollection parameter to the }
+{ kEventControlInitialize event (Carbon only). }
+{ All tags at ID zero in a control's Collection are reserved for Control Manager use. }
+{ Custom control definitions should use other IDs. }
+{ Most of these tags are interpreted when you call CreateCustomControl; the Control Manager will put }
+{ the value in the right place before calling the control definition with the initialization message. }
+
+
+{
+ * Discussion:
+ * Control Collection Tags
+ }
+const
+{
+ * Rect - the bounding rectangle.
+ }
+ kControlCollectionTagBounds = $626F756E (* 'boun' *);
+
+ {
+ * SInt32 - the value
+ }
+ kControlCollectionTagValue = $76616C75 (* 'valu' *);
+
+ {
+ * SInt32 - the minimum
+ }
+ kControlCollectionTagMinimum = $6D696E20 (* 'min ' *);
+
+ {
+ * SInt32 - the maximum
+ }
+ kControlCollectionTagMaximum = $6D617820 (* 'max ' *);
+
+ {
+ * SInt32 - the view size
+ }
+ kControlCollectionTagViewSize = $76696577 (* 'view' *);
+
+ {
+ * Boolean - the visible state. Only interpreted on CarbonLib
+ * versions up through 1.5.x and Mac OS X versions 10.0.x. Not
+ * interpreted on CarbonLib 1.6 and later. Not interpreted on Mac OS
+ * 10.1 and later. We recommend you do not use this tag at all.
+ }
+ kControlCollectionTagVisibility = $76697369 (* 'visi' *);
+
+ {
+ * SInt32 - the refCon
+ }
+ kControlCollectionTagRefCon = $72656663 (* 'refc' *);
+
+ {
+ * arbitrarily sized character array - the title
+ }
+ kControlCollectionTagTitle = $7469746C (* 'titl' *);
+
+ {
+ * bytes as received via CFStringCreateExternalRepresentation
+ }
+ kControlCollectionTagUnicodeTitle = $7574746C (* 'uttl' *);
+
+ {
+ * OSType - the ControlID signature
+ }
+ kControlCollectionTagIDSignature = $69647369 (* 'idsi' *);
+
+ {
+ * SInt32 - the ControlID id
+ }
+ kControlCollectionTagIDID = $69646964 (* 'idid' *);
+
+ {
+ * UInt32 - the command
+ }
+ kControlCollectionTagCommand = $636D6420 (* 'cmd ' *);
+
+ {
+ * SInt16 - the variant
+ }
+ kControlCollectionTagVarCode = $76617263 (* 'varc' *);
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Image Content }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kControlContentTextOnly = 0;
+ kControlNoContent = 0;
+ kControlContentIconSuiteRes = 1;
+ kControlContentCIconRes = 2;
+ kControlContentPictRes = 3;
+ kControlContentICONRes = 4;
+ kControlContentIconSuiteHandle = 129;
+ kControlContentCIconHandle = 130;
+ kControlContentPictHandle = 131;
+ kControlContentIconRef = 132;
+ kControlContentICON = 133;
+ kControlContentCGImageRef = 134;
+
+type
+ ControlContentType = SInt16;
+type
+ ControlButtonContentInfo = record
+ contentType: ControlContentType;
+ case SInt16 of
+ 0: (
+ resID: SInt16;
+ );
+ 1: (
+ cIconHandle: CIconHandle_fix;
+ );
+ 2: (
+ iconSuite: Handle;
+ );
+ 3: (
+ iconRef: IconRef_fix;
+ );
+ 4: (
+ picture: PicHandle;
+ );
+ 5: (
+ ICONHandle: Handle;
+ );
+ 6: (
+ imageRef: CGImageRef;
+ );
+ end;
+ ControlButtonContentInfoPtr = ^ControlButtonContentInfo;
+type
+ ControlImageContentInfo = ControlButtonContentInfo;
+type
+ ControlImageContentInfoPtr = ControlButtonContentInfoPtr;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Key Script Behavior }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kControlKeyScriptBehaviorAllowAnyScript = $616E7920 (* 'any ' *); { leaves the current keyboard alone and allows user to change the keyboard.}
+ kControlKeyScriptBehaviorPrefersRoman = $70726D6E (* 'prmn' *); { switches the keyboard to roman, but allows them to change it as desired.}
+ kControlKeyScriptBehaviorRequiresRoman = $72726D6E (* 'rrmn' *); { switches the keyboard to roman and prevents the user from changing it.}
+
+type
+ ControlKeyScriptBehavior = UInt32;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Font Style }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ SPECIAL FONT USAGE NOTES: You can specify the font to use for many control types.
+ The constants below are meta-font numbers which you can use to set a particular
+ control's font usage. There are essentially two modes you can use: 1) default,
+ which is essentially the same as it always has been, i.e. it uses the system font, unless
+ directed to use the window font via a control variant. 2) you can specify to use
+ the big or small system font in a generic manner. The Big system font is the font
+ used in menus, etc. Chicago has filled that role for some time now. Small system
+ font is currently Geneva 10. The meta-font number implies the size and style.
+
+ NOTE: Not all font attributes are used by all controls. Most, in fact, ignore
+ the fore and back color (Static Text is the only one that does, for
+ backwards compatibility). Also size, face, and addFontSize are ignored
+ when using the meta-font numbering.
+}
+{ Meta-font numbering - see note above }
+const
+ kControlFontBigSystemFont = -1; { force to big system font}
+ kControlFontSmallSystemFont = -2; { force to small system font}
+ kControlFontSmallBoldSystemFont = -3; { force to small bold system font}
+ kControlFontViewSystemFont = -4; { force to views system font (DataBrowser control only)}
+ kControlFontMiniSystemFont = -5; { force to mini system font}
+
+{ Add these masks together to set the flags field of a ControlFontStyleRec }
+{ They specify which fields to apply to the text. It is important to make }
+{ sure that you specify only the fields that you wish to set. }
+const
+ kControlUseFontMask = $0001;
+ kControlUseFaceMask = $0002;
+ kControlUseSizeMask = $0004;
+ kControlUseForeColorMask = $0008;
+ kControlUseBackColorMask = $0010;
+ kControlUseModeMask = $0020;
+ kControlUseJustMask = $0040;
+ kControlUseAllMask = $00FF;
+ kControlAddFontSizeMask = $0100;
+
+{ AddToMetaFont indicates that we want to start with a standard system }
+{ font, but then we'd like to add the other attributes. Normally, the meta }
+{ font ignores all other flags }
+const
+ kControlAddToMetaFontMask = $0200; { Available in Appearance 1.1 or later}
+
+{ UseThemeFontID indicates that the font field of the ControlFontStyleRec }
+{ should be interpreted as a ThemeFontID (see Appearance.h). In all other }
+{ ways, specifying a ThemeFontID is just like using one of the control }
+{ meta-fonts IDs. kControlUseThemeFontIDMask and kControlUseFontMask are }
+{ mutually exclusive; you can only specify one of them. If you specify }
+{ both of them, the behavior is undefined. }
+const
+ kControlUseThemeFontIDMask = $0080; { Available in Mac OS X or later}
+
+type
+ ControlFontStyleRecPtr = ^ControlFontStyleRec;
+ ControlFontStyleRec = record
+ flags: SInt16;
+ font: SInt16;
+ size: SInt16;
+ style: SInt16;
+ mode: SInt16;
+ just: SInt16;
+ foreColor: RGBColor;
+ backColor: RGBColor;
+ end;
+ ControlFontStylePtr = ^ControlFontStyleRec;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Click Activation Results }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ These are for use with GetControlClickActivation. The enumerated values should be pretty }
+{ self-explanatory, but just in case: }
+{ ¥ Activate/DoNotActivate indicates whether or not to change the owning window's z-ordering before }
+{ processing the click. If activation is requested, you may also want to immediately redraw the }
+{ newly exposed portion of the window. }
+{ ¥ Ignore/Handle Click indicates whether or not to call an appropriate click handling API (like }
+{ HandleControlClick) in respose to the event. }
+const
+ kDoNotActivateAndIgnoreClick = 0; { probably never used. here for completeness.}
+ kDoNotActivateAndHandleClick = 1; { let the control handle the click while the window is still in the background.}
+ kActivateAndIgnoreClick = 2; { control doesn't want to respond directly to the click, but window should still be brought forward.}
+ kActivateAndHandleClick = 3; { control wants to respond to the click, but only after the window has been activated.}
+
+type
+ ClickActivationResult = UInt32;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Common data tags for Get/SetControlData }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * Discussion:
+ * Get/SetControlData Common Tags
+ }
+const
+ kControlFontStyleTag = $666F6E74 (* 'font' *);
+ kControlKeyFilterTag = $666C7472 (* 'fltr' *);
+
+ {
+ * Sent with a pointer to a ControlKind record to be filled in. Only
+ * valid for GetControlData.
+ }
+ kControlKindTag = $6B696E64 (* 'kind' *);
+
+ {
+ * Sent with a pointer to a ControlSize. Only valid with explicitly
+ * sizeable controls. Currently supported by the check box, combo
+ * box, progress bar, indeterminate progress bar, radio button, round
+ * button, scroll bar, slider and the tab. Check your return value!
+ * As of 10.2.5, the push button and data browser accept this tag.
+ * The data browser only changes the size of its scrollbars. As of
+ * Mac OS X 10.3, chasing arrows, disclosure button, popup button,
+ * scroll view, search field and little arrows control also accept
+ * this tag. As of Mac OS X 10.4, if the font of the editable text
+ * has not been overridden, the font size of the combo box and search
+ * field will adjust to respect the size of the control. Still check
+ * your return values!
+ }
+ kControlSizeTag = $73697A65 (* 'size' *);
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Feature Bits }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * Discussion:
+ * Control Feature Bits - Returned by GetControlFeatures
+ }
+const
+ kControlSupportsGhosting = 1 shl 0;
+ kControlSupportsEmbedding = 1 shl 1;
+ kControlSupportsFocus = 1 shl 2;
+ kControlWantsIdle = 1 shl 3;
+ kControlWantsActivate = 1 shl 4;
+ kControlHandlesTracking = 1 shl 5;
+ kControlSupportsDataAccess = 1 shl 6;
+ kControlHasSpecialBackground = 1 shl 7;
+ kControlGetsFocusOnClick = 1 shl 8;
+ kControlSupportsCalcBestRect = 1 shl 9;
+ kControlSupportsLiveFeedback = 1 shl 10;
+ kControlHasRadioBehavior = 1 shl 11; { Available in Appearance 1.0.1 or later}
+ kControlSupportsDragAndDrop = 1 shl 12; { Available in Carbon}
+ kControlAutoToggles = 1 shl 14; { Available in Appearance 1.1 or later}
+ kControlSupportsGetRegion = 1 shl 17; { Available in Appearance 1.1 or later}
+ kControlSupportsFlattening = 1 shl 19; { Available in Carbon}
+ kControlSupportsSetCursor = 1 shl 20; { Available in Carbon}
+ kControlSupportsContextualMenus = 1 shl 21; { Available in Carbon}
+ kControlSupportsClickActivation = 1 shl 22; { Available in Carbon}
+ kControlIdlesWithTimer = 1 shl 23; { Available in Carbon - this bit indicates that the control animates automatically}
+
+ {
+ * Reported by controls that expect clients to use an action proc
+ * that increments its value when the up button is pressed and
+ * decrement its value when the down button is pressed. (Most
+ * controls, such as scroll bars and sliders, expect the opposite).
+ * This allows the Control Manager to calculate the proper amount of
+ * sleep time during a tracking loop. This is only respected in Mac
+ * OS X 10.3 and later.
+ }
+ kControlInvertsUpDownValueMeaning = 1 shl 24;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Messages }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ drawCntl = 0;
+ testCntl = 1;
+ calcCRgns = 2;
+ initCntl = 3; { Param is Collection, result is OSStatus}
+ dispCntl = 4;
+ posCntl = 5;
+ thumbCntl = 6;
+ dragCntl = 7;
+ autoTrack = 8;
+ calcCntlRgn = 10;
+ calcThumbRgn = 11;
+ drawThumbOutline = 12;
+ kControlMsgDrawGhost = 13;
+ kControlMsgCalcBestRect = 14; { Calculate best fitting rectangle for control}
+ kControlMsgHandleTracking = 15;
+ kControlMsgFocus = 16; { param indicates action.}
+ kControlMsgKeyDown = 17;
+ kControlMsgIdle = 18;
+ kControlMsgGetFeatures = 19;
+ kControlMsgSetData = 20;
+ kControlMsgGetData = 21;
+ kControlMsgActivate = 22;
+ kControlMsgSetUpBackground = 23;
+ kControlMsgCalcValueFromPos = 26;
+ kControlMsgTestNewMsgSupport = 27; { See if this control supports new messaging}
+ kControlMsgSubValueChanged = 25; { Available in Appearance 1.0.1 or later}
+ kControlMsgSubControlAdded = 28; { Available in Appearance 1.0.1 or later}
+ kControlMsgSubControlRemoved = 29; { Available in Appearance 1.0.1 or later}
+ kControlMsgApplyTextColor = 30; { Available in Appearance 1.1 or later}
+ kControlMsgGetRegion = 31; { Available in Appearance 1.1 or later}
+ kControlMsgFlatten = 32; { Available in Carbon. Param is Collection.}
+ kControlMsgSetCursor = 33; { Available in Carbon. Param is ControlSetCursorRec}
+ kControlMsgDragEnter = 38; { Available in Carbon. Param is DragRef, result is boolean indicating acceptibility of drag.}
+ kControlMsgDragLeave = 39; { Available in Carbon. As above.}
+ kControlMsgDragWithin = 40; { Available in Carbon. As above.}
+ kControlMsgDragReceive = 41; { Available in Carbon. Param is DragRef, result is OSStatus indicating success/failure.}
+ kControlMsgDisplayDebugInfo = 46; { Available in Carbon on X.}
+ kControlMsgContextualMenuClick = 47; { Available in Carbon. Param is ControlContextualMenuClickRec}
+ kControlMsgGetClickActivation = 48; { Available in Carbon. Param is ControlClickActivationRec}
+
+type
+ ControlDefProcMessage = SInt16;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Sizes }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * Discussion:
+ * ControlSize values to be used in conjunction with SetControlData
+ * and the kControlSizeTag.
+ }
+const
+{
+ * Use the control's default drawing variant. This does not apply to
+ * Scroll Bars, for which Normal is Large.
+ }
+ kControlSizeNormal = 0;
+
+ {
+ * Use the control's small drawing variant. Currently supported by
+ * the Check Box, Combo Box, Radio Button, Scroll Bar, Slider and Tab
+ * controls.
+ }
+ kControlSizeSmall = 1;
+
+ {
+ * Use the control's large drawing variant. Currently supported by
+ * the Indeterminate Progress Bar, Progress Bar and Round Button
+ * controls.
+ }
+ kControlSizeLarge = 2;
+
+ {
+ * Use the control's miniature drawing variant. This does not apply
+ * to many of the controls, since this is a brand new control size.
+ }
+ kControlSizeMini = 3;
+
+ {
+ * Control drawing variant determined by the control's bounds. This
+ * ControlSize is currently only available with Scroll Bars and Popup
+ * Buttons to support their legacy behavior of drawing differently
+ * within different bounds. It is preferred to explicitly use one of
+ * the available control sizes.
+ }
+ kControlSizeAuto = $FFFF;
+
+type
+ ControlSize = UInt16;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Constants for drawCntl message (passed in param) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kDrawControlEntireControl = 0;
+ kDrawControlIndicatorOnly = 129;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Constants for dragCntl message (passed in param) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kDragControlEntireControl = 0;
+ kDragControlIndicator = 1;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Drag Constraint Structure for thumbCntl message (passed in param) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ IndicatorDragConstraint = record
+ limitRect: Rect;
+ slopRect: Rect;
+ axis: DragConstraint;
+ end;
+ IndicatorDragConstraintPtr = ^IndicatorDragConstraint;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ CDEF should return as result of kControlMsgTestNewMsgSupport }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kControlSupportsNewMessages = $206F6B20 (* ' ok ' *);
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This structure is passed into a CDEF when called with the kControlMsgHandleTracking }
+{ message }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlTrackingRecPtr = ^ControlTrackingRec;
+ ControlTrackingRec = record
+ startPt: Point;
+ modifiers: EventModifiers;
+ action: ControlActionUPP;
+ end;
+type
+ ControlTrackingPtr = ControlTrackingRecPtr;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This structure is passed into a CDEF when called with the kControlMsgKeyDown message }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlKeyDownRecPtr = ^ControlKeyDownRec;
+ ControlKeyDownRec = record
+ modifiers: EventModifiers;
+ keyCode: SInt16;
+ charCode: SInt16;
+ end;
+type
+ ControlKeyDownPtr = ControlKeyDownRecPtr;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This structure is passed into a CDEF when called with the kControlMsgGetData or }
+{ kControlMsgSetData message }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlDataAccessRecPtr = ^ControlDataAccessRec;
+ ControlDataAccessRec = record
+ tag: ResType;
+ part: ResType;
+ size: Size_fix;
+ dataPtr: Ptr;
+ end;
+type
+ ControlDataAccessPtr = ControlDataAccessRecPtr;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This structure is passed into a CDEF when called with the kControlCalcBestRect msg }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlCalcSizeRecPtr = ^ControlCalcSizeRec;
+ ControlCalcSizeRec = record
+ height: SInt16;
+ width: SInt16;
+ baseLine: SInt16;
+ end;
+type
+ ControlCalcSizePtr = ControlCalcSizeRecPtr;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This structure is passed into a CDEF when called with the kControlMsgSetUpBackground }
+{ message is sent }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlBackgroundRecPtr = ^ControlBackgroundRec;
+ ControlBackgroundRec = record
+ depth: SInt16;
+ colorDevice: Boolean;
+ end;
+type
+ ControlBackgroundPtr = ControlBackgroundRecPtr;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This structure is passed into a CDEF when called with the kControlMsgApplyTextColor }
+{ message is sent }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlApplyTextColorRecPtr = ^ControlApplyTextColorRec;
+ ControlApplyTextColorRec = record
+ depth: SInt16;
+ colorDevice: Boolean;
+ active: Boolean;
+ end;
+type
+ ControlApplyTextColorPtr = ControlApplyTextColorRecPtr;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This structure is passed into a CDEF when called with the kControlMsgGetRegion }
+{ message is sent }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlGetRegionRecPtr = ^ControlGetRegionRec;
+ ControlGetRegionRec = record
+ region: RgnHandle;
+ part: ControlPartCode;
+ end;
+type
+ ControlGetRegionPtr = ControlGetRegionRecPtr;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This structure is passed into a CDEF when the kControlMsgSetCursor message is sent }
+{ Only sent on Carbon }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlSetCursorRecPtr = ^ControlSetCursorRec;
+ ControlSetCursorRec = record
+ localPoint: Point;
+ modifiers: EventModifiers;
+ cursorWasSet: Boolean; { your CDEF must set this to true if you set the cursor, or false otherwise}
+ end;
+type
+ ControlSetCursorPtr = ControlSetCursorRecPtr;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This structure is passed into a CDEF when the kControlMsgContextualMenuClick message }
+{ is sent }
+{ Only sent on Carbon }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlContextualMenuClickRecPtr = ^ControlContextualMenuClickRec;
+ ControlContextualMenuClickRec = record
+ localPoint: Point;
+ menuDisplayed: Boolean; { your CDEF must set this to true if you displayed a menu, or false otherwise}
+ end;
+type
+ ControlContextualMenuClickPtr = ControlContextualMenuClickRecPtr;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This structure is passed into a CDEF when the kControlMsgGetClickActivation message }
+{ is sent }
+{ Only sent on Carbon }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlClickActivationRecPtr = ^ControlClickActivationRec;
+ ControlClickActivationRec = record
+ localPoint: Point;
+ modifiers: EventModifiers;
+ result: ClickActivationResult; { your CDEF must pass the desired result back}
+ end;
+type
+ ControlClickActivationPtr = ControlClickActivationRecPtr;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ ÔCDEFÕ entrypoint }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlDefProcPtr = function( varCode: SInt16; theControl: ControlRef; message: ControlDefProcMessage; param: SInt32 ): SInt32;
+type
+ ControlDefUPP = ControlDefProcPtr;
+{
+ * NewControlDefUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewControlDefUPP( userRoutine: ControlDefProcPtr ): ControlDefUPP; external name '_NewControlDefUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeControlDefUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeControlDefUPP( userUPP: ControlDefUPP ); external name '_DisposeControlDefUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeControlDefUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeControlDefUPP( varCode: SInt16; theControl: ControlRef; message: ControlDefProcMessage; param: SInt32; userUPP: ControlDefUPP ): SInt32; external name '_InvokeControlDefUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Control Key Filter }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Certain controls can have a keyfilter attached to them. }
+{ Definition of a key filter for intercepting and possibly changing keystrokes }
+{ which are destined for a control. }
+{ IMPORTANT! Because this filter provides WorldScript-encoded text in its parameters, }
+{ it provides no meaningful information for key events generated when a Unicode }
+{ keyboard layout or input method is active; these layouts and input methods generate }
+{ Unicode text that often cannot be translated into any WorldScript encoding. On }
+{ Mac OS X, you should avoid using this filter, or at most, use the filter as an }
+{ indication that the text is changing but do not depend on the charCode parameter to }
+{ the filter. Use a kEventTextInputUnicodeForKeyEvent Carbon event handler as a }
+{ replacement for the ControlKeyFilter callback; on Mac OS X 10.4 and later, you can }
+{ also use a kEventTextShouldChangeInRange or kEventTextDidChange event handler. }
+{ Key Filter Result Codes }
+{ The filter proc should return one of the two constants below. If }
+{ kKeyFilterBlockKey is returned, the key is blocked and never makes it to the }
+{ control. If kKeyFilterPassKey is returned, the control receives the keystroke. }
+const
+ kControlKeyFilterBlockKey = 0;
+ kControlKeyFilterPassKey = 1;
+
+type
+ ControlKeyFilterResult = SInt16;
+type
+ ControlKeyFilterProcPtr = function( theControl: ControlRef; var keyCode: SInt16; var charCode: SInt16; var modifiers: EventModifiers ): ControlKeyFilterResult;
+type
+ ControlKeyFilterUPP = ControlKeyFilterProcPtr;
+{
+ * NewControlKeyFilterUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewControlKeyFilterUPP( userRoutine: ControlKeyFilterProcPtr ): ControlKeyFilterUPP; external name '_NewControlKeyFilterUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeControlKeyFilterUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeControlKeyFilterUPP( userUPP: ControlKeyFilterUPP ); external name '_DisposeControlKeyFilterUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeControlKeyFilterUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeControlKeyFilterUPP( theControl: ControlRef; var keyCode: SInt16; var charCode: SInt16; var modifiers: EventModifiers; userUPP: ControlKeyFilterUPP ): ControlKeyFilterResult; external name '_InvokeControlKeyFilterUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ DragGrayRgn Constatns }
+{ For DragGrayRgnUPP used in TrackControl() }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ noConstraint = kNoConstraint;
+ hAxisOnly = 1;
+ vAxisOnly = 2;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Creation/Deletion/Persistence }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ CreateCustomControl is only available as part of Carbon }
+const
+ kControlDefProcPtr = 0; { raw proc-ptr based access}
+ kControlDefObjectClass = 1; { event-based definition (Mac OS X only)}
+
+type
+ ControlDefType = UInt32;
+type
+ ControlDefSpecPtr = ^ControlDefSpec;
+ ControlDefSpec = record
+ defType: ControlDefType;
+ case SInt16 of
+ 0: (
+ defProc: ControlDefUPP;
+ );
+ 1: (
+ classRef: Ptr;
+ );
+ end;
+{
+ * CreateCustomControl()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function CreateCustomControl( owningWindow: WindowRef; const (*var*) contBounds: Rect; const (*var*) def: ControlDefSpec; initData: Collection; var outControl: ControlRef ): OSStatus; external name '_CreateCustomControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * NewControl()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function NewControl( owningWindow: WindowRef; const (*var*) boundsRect: Rect; const (*var*) controlTitle: Str255; initiallyVisible: Boolean; initialValue: SInt16; minimumValue: SInt16; maximumValue: SInt16; procID: SInt16; controlReference: SInt32 ): ControlRef; external name '_NewControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetNewControl()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetNewControl( resourceID: SInt16; owningWindow: WindowRef ): ControlRef; external name '_GetNewControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DisposeControl()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DisposeControl( theControl: ControlRef ); external name '_DisposeControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * KillControls()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure KillControls( theWindow: WindowRef ); external name '_KillControls';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * FlattenControl()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * UnflattenControl()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Definition Registration }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlCNTLToCollectionProcPtr = function( const (*var*) bounds: Rect; value: SInt16; visible: Boolean; max: SInt16; min: SInt16; procID: SInt16; refCon: SInt32; const (*var*) title: Str255; collection_: Collection ): OSStatus;
+type
+ ControlCNTLToCollectionUPP = ControlCNTLToCollectionProcPtr;
+{
+ * NewControlCNTLToCollectionUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewControlCNTLToCollectionUPP( userRoutine: ControlCNTLToCollectionProcPtr ): ControlCNTLToCollectionUPP; external name '_NewControlCNTLToCollectionUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeControlCNTLToCollectionUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeControlCNTLToCollectionUPP( userUPP: ControlCNTLToCollectionUPP ); external name '_DisposeControlCNTLToCollectionUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeControlCNTLToCollectionUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeControlCNTLToCollectionUPP( const (*var*) bounds: Rect; value: SInt16; visible: Boolean; max: SInt16; min: SInt16; procID: SInt16; refCon: SInt32; const (*var*) title: Str255; collection_: Collection; userUPP: ControlCNTLToCollectionUPP ): OSStatus; external name '_InvokeControlCNTLToCollectionUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * RegisterControlDefinition()
+ *
+ * Summary:
+ * Associates or dissociates a control definition with a virtual
+ * CDEF resource ID.
+ *
+ * Discussion:
+ * In GetNewControl or NewControl on Carbon, the Control Manager
+ * needs to know how to map the procID to a ControlDefSpec. With
+ * RegisterControlDefinition, your application can inform the
+ * Control Manager which ControlDefSpec to call when it sees a
+ * request to use a 'CDEF' of a particular resource ID. Since custom
+ * control definitions receive their initialization data in a
+ * Collection passed in the 'param' parameter, you must also provide
+ * a procedure to convert the bounds, min, max, and other parameters
+ * to NewControl into a Collection. If you don't provide a
+ * conversion proc, your control will receive an empty collection
+ * when it is sent the initialization message. If you want the
+ * value, min, visibility, etc. to be given to the control, you must
+ * add the appropriate tagged data to the collection. See the
+ * Control Collection Tags above. If you want to unregister a
+ * ControlDefSpec that you have already registered, call
+ * RegisterControlDefinition with the same CDEF resource ID, but
+ * pass NULL for the inControlDef parameter. In this situation,
+ * inConversionProc is effectively ignored.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inCDEFResID:
+ * The virtual CDEF resource ID to which you'd like to associate
+ * or dissociate the control definition.
+ *
+ * inControlDef:
+ * A pointer to a ControlDefSpec which represents the control
+ * definition you want to register, or NULL if you are attempting
+ * to unregister a control definition.
+ *
+ * inConversionProc:
+ * The conversion proc which will translate the NewControl
+ * parameters into a Collection.
+ *
+ * Result:
+ * An OSStatus code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function RegisterControlDefinition( inCDEFResID: SInt16; const (*var*) inControlDef: ControlDefSpec; inConversionProc: ControlCNTLToCollectionUPP ): OSStatus; external name '_RegisterControlDefinition';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Visible State }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * HiliteControl()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure HiliteControl( theControl: ControlRef; hiliteState: ControlPartCode ); external name '_HiliteControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ShowControl()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure ShowControl( theControl: ControlRef ); external name '_ShowControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HideControl()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure HideControl( theControl: ControlRef ); external name '_HideControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ following state routines available only with Appearance 1.0 and later}
+{
+ * IsControlActive()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function IsControlActive( inControl: ControlRef ): Boolean; external name '_IsControlActive';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsControlVisible()
+ *
+ * Summary:
+ * Returns whether a control is visible.
+ *
+ * Discussion:
+ * Note that IsControlVisible returns a control's effective
+ * visibility, which is determined both by the control's own
+ * visibility and the visibility of its parent controls. If a parent
+ * control is invisible, then this control is considered to be
+ * invisible also.
+ *
+ * Latent visibility can be determined with HIViewIsLatentlyVisible.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The control whose visibility you wish to determine.
+ *
+ * Result:
+ * A boolean value indicating whether the control is visible (true)
+ * or hidden (false).
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function IsControlVisible( inControl: ControlRef ): Boolean; external name '_IsControlVisible';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ActivateControl()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function ActivateControl( inControl: ControlRef ): OSErr; external name '_ActivateControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DeactivateControl()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DeactivateControl( inControl: ControlRef ): OSErr; external name '_DeactivateControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControlVisibility()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetControlVisibility( inControl: ControlRef; inIsVisible: Boolean; inDoDraw: Boolean ): OSErr; external name '_SetControlVisibility';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ following state routines available only on Mac OS X and later}
+{
+ * IsControlEnabled()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function IsControlEnabled( inControl: ControlRef ): Boolean; external name '_IsControlEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * EnableControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function EnableControl( inControl: ControlRef ): OSStatus; external name '_EnableControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DisableControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function DisableControl( inControl: ControlRef ): OSStatus; external name '_DisableControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Imaging }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * DrawControls()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DrawControls( theWindow: WindowRef ); external name '_DrawControls';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * Draw1Control()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure Draw1Control( theControl: ControlRef ); external name '_Draw1Control';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+procedure DrawOneControl( theControl: ControlRef ); external name '_Draw1Control';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * UpdateControls()
+ *
+ * Summary:
+ * Redraws the controls that intersect a specified region in a
+ * window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose controls to redraw.
+ *
+ * inUpdateRegion:
+ * The region (in local coordinates) describing which controls to
+ * redraw. In Mac OS 10.1 and later, and in CarbonLib 1.5 and
+ * later, you may pass NULL for this parameter to redraw the
+ * controls intersecting the visible region of the window.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure UpdateControls( inWindow: WindowRef; inUpdateRegion: RgnHandle { can be NULL } ); external name '_UpdateControls';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ following imaging routines available only with Appearance 1.0 and later}
+{
+ * GetBestControlRect()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetBestControlRect( inControl: ControlRef; var outRect: Rect; var outBaseLineOffset: SInt16 ): OSErr; external name '_GetBestControlRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControlFontStyle()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetControlFontStyle( inControl: ControlRef; const (*var*) inStyle: ControlFontStyleRec ): OSErr; external name '_SetControlFontStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawControlInCurrentPort()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+procedure DrawControlInCurrentPort( inControl: ControlRef ); external name '_DrawControlInCurrentPort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetUpControlBackground()
+ *
+ * Summary:
+ * Applies the proper background color for the given control to the
+ * current port.
+ *
+ * Discussion:
+ * An embedding-savvy control which erases before drawing must
+ * ensure that its background color properly matches the body color
+ * of any parent controls on top of which it draws. This routine
+ * asks the Control Manager to determine and apply the proper
+ * background color to the current port. If a ControlColorProc has
+ * been provided for the given control, the proc will be called to
+ * set up the background color. If no proc exists, or if the proc
+ * returns a value other than noErr, the Control Manager ascends the
+ * parent chain for the given control looking for a control which
+ * has a special background (see the kControlHasSpecialBackground
+ * feature bit). The first such parent is asked to set up the
+ * background color (see the kControlMsgSetUpBackground message). If
+ * no such parent exists, the Control Manager applies any ThemeBrush
+ * which has been associated with the owning window (see
+ * SetThemeWindowBackground). Available in Appearance 1.0 (Mac OS
+ * 8), CarbonLib 1.0, Mac OS X, and later.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The ControlRef that wants to erase.
+ *
+ * inDepth:
+ * A short integer indicating the color depth of the device onto
+ * which drawing will take place.
+ *
+ * inIsColorDevice:
+ * A Boolean indicating whether the draw device is a color device.
+ *
+ * Result:
+ * An OSStatus code indicating success or failure. The most likely
+ * error is a controlHandleInvalidErr, resulting from a bad
+ * ControlRef. Any non-noErr result indicates that the color set up
+ * failed, and that the caller should probably give up its attempt
+ * to draw.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetUpControlBackground( inControl: ControlRef; inDepth: SInt16; inIsColorDevice: Boolean ): OSErr; external name '_SetUpControlBackground';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetUpControlTextColor()
+ *
+ * Summary:
+ * Applies the proper text color for the given control to the
+ * current port.
+ *
+ * Discussion:
+ * An embedding-savvy control which draws text must ensure that its
+ * text color properly contrasts the background on which it draws.
+ * This routine asks the Control Manager to determine and apply the
+ * proper text color to the current port. If a ControlColorProc has
+ * been provided for the given control, the proc will be called to
+ * set up the text color. If no proc exists, or if the proc returns
+ * a value other than noErr, the Control Manager ascends the parent
+ * chain for the given control looking for a control which has a
+ * special background (see the kControlHasSpecialBackground feature
+ * bit). The first such parent is asked to set up the text color
+ * (see the kControlMsgApplyTextColor message). If no such parent
+ * exists, the Control Manager chooses a text color which contrasts
+ * any ThemeBrush which has been associated with the owning window
+ * (see SetThemeWindowBackground). Available in Appearance 1.1 (Mac
+ * OS 8.5), CarbonLib 1.0, Mac OS X, and later.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The ControlRef that wants to draw text.
+ *
+ * inDepth:
+ * A short integer indicating the color depth of the device onto
+ * which drawing will take place.
+ *
+ * inIsColorDevice:
+ * A Boolean indicating whether the draw device is a color device.
+ *
+ * Result:
+ * An OSStatus code indicating success or failure. The most likely
+ * error is a controlHandleInvalidErr, resulting from a bad
+ * ControlRef. Any non-noErr result indicates that the color set up
+ * failed, and that the caller should probably give up its attempt
+ * to draw.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+function SetUpControlTextColor( inControl: ControlRef; inDepth: SInt16; inIsColorDevice: Boolean ): OSErr; external name '_SetUpControlTextColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ControlColorProcPtr
+ *
+ * Discussion:
+ * Callback allowing clients to specify/override the background
+ * color and text color that a Control will use during drawing. Your
+ * procedure should make the color changes to the current port. See
+ * SetControlColorProc, SetUpControlBackground, and
+ * SetUpControlTextColor for more information. Available on Mac OS
+ * 8.5, CarbonLib 1.1, Mac OS X, and later.
+ *
+ * Parameters:
+ *
+ * inControl:
+ * A reference to the Control for whom your proc is setting up
+ * colors.
+ *
+ * inMessage:
+ * A ControlDefProcMessage indicating what sort of color your
+ * procedure should set up. It will be either
+ * kControlMsgApplyTextColor or kControlMsgSetUpBackground.
+ * kControlMsgApplyTextColor is a request to set up the
+ * appropriate text color (by setting the current port's
+ * foreground color, pen information, etc.).
+ * kControlMsgSetUpBackground is a request to set up the
+ * appropriate background color (the current port's background
+ * color, pattern, etc.).
+ *
+ * inDrawDepth:
+ * A short integer indicating the bit depth of the device into
+ * which the Control is drawing. The bit depth is typically passed
+ * in as a result of someone someone trying to draw properly
+ * across multiple monitors with different bit depths. If your
+ * procedure wants to handle proper color set up based on bit
+ * depth, it should use this parameter to help decide what color
+ * to apply.
+ *
+ * inDrawInColor:
+ * A Boolean indicating whether or not the device that the Control
+ * is drawing into is a color device. The value is typically
+ * passed in as a result of someone trying to draw properly across
+ * multiple monitors which may or may not be color devices. If
+ * your procedure wants to handle proper color set up for both
+ * color and grayscale devices, it should use this parameter to
+ * help decide what color to apply.
+ *
+ * Result:
+ * An OSStatus code indicating success or failure. Returning noErr
+ * is an indication that your proc completely handled the color set
+ * up. If you return any other value, the Control Manager will fall
+ * back to the normal color set up mechanism.
+ }
+type
+ ControlColorProcPtr = function( inControl: ControlRef; inMessage: SInt16; inDrawDepth: SInt16; inDrawInColor: Boolean ): OSStatus;
+type
+ ControlColorUPP = ControlColorProcPtr;
+{
+ * NewControlColorUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewControlColorUPP( userRoutine: ControlColorProcPtr ): ControlColorUPP; external name '_NewControlColorUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeControlColorUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeControlColorUPP( userUPP: ControlColorUPP ); external name '_DisposeControlColorUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeControlColorUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeControlColorUPP( inControl: ControlRef; inMessage: SInt16; inDrawDepth: SInt16; inDrawInColor: Boolean; userUPP: ControlColorUPP ): OSStatus; external name '_InvokeControlColorUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * SetControlColorProc()
+ *
+ * Summary:
+ * Associates a ControlColorUPP with a given Control, thereby
+ * allowing you to bypass the embedding hierarchy-based color setup
+ * of SetUpControlBackground/SetUpControlTextColor and replace it
+ * with your own.
+ *
+ * Discussion:
+ * Before an embedded Control can erase, it calls
+ * SetUpControlBackground to have its background color set up by any
+ * parent controls. Similarly, any Control which draws text calls
+ * SetUpControlTextColor to have the appropriate text color set up.
+ * This allows certain controls (such as Tabs and Placards) to offer
+ * special backgrounds and text colors for any child controls. By
+ * default, the SetUp routines only move up the Control Manager
+ * embedding hierarchy looking for a parent which has a special
+ * background. This is fine in a plain vanilla embedding case, but
+ * many application frameworks find it troublesome; if there are
+ * interesting views between two Controls in the embedding
+ * hierarchy, the framework needs to be in charge of the background
+ * and text colors, otherwise drawing defects will occur. You can
+ * only associate a single color proc with a given ControlRef.
+ * Available on Mac OS 8.5, CarbonLib 1.1, Mac OS X, and later.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The ControlRef with whom the color proc should be associated.
+ *
+ * inProc:
+ * The color proc to associate with the ControlRef. If you pass
+ * NULL, the ControlRef will be dissociated from any previously
+ * installed color proc.
+ *
+ * Result:
+ * An OSStatus code indicating success or failure. The most likely
+ * error is a controlHandleInvalidErr resulting from a bad
+ * ControlRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+function SetControlColorProc( inControl: ControlRef; inProc: ControlColorUPP ): OSStatus; external name '_SetControlColorProc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Mousing }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ NOTE ON CONTROL ACTION PROCS
+
+ When using the TrackControl() call when tracking an indicator, the actionProc parameter
+ (type ControlActionUPP) should be replaced by a parameter of type DragGrayRgnUPP
+ (see Quickdraw.h).
+
+ If, however, you are using the live feedback variants of scroll bars or sliders, you
+ must pass a ControlActionUPP in when tracking the indicator as well. This functionality
+ is available in Appearance 1.0 or later.
+}
+{
+ * TrackControl()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TrackControl( theControl: ControlRef; startPoint: Point; actionProc: ControlActionUPP { can be NULL } ): ControlPartCode; external name '_TrackControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DragControl()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DragControl( theControl: ControlRef; startPoint: Point; const (*var*) limitRect: Rect; const (*var*) slopRect: Rect; axis: DragConstraint ); external name '_DragControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TestControl()
+ *
+ * Summary:
+ * Determines the control part that is at a given point.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * theControl:
+ * The control to test.
+ *
+ * testPoint:
+ * The location to test. For a non-compositing control, this
+ * location should be in port-local coordinates; for a compositing
+ * control, this location should be in view-local coordinates.
+ *
+ * Result:
+ * The control part code that was at the specified location.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TestControl( theControl: ControlRef; testPoint: Point ): ControlPartCode; external name '_TestControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * FindControl()
+ *
+ * Summary:
+ * Finds the control in a window that is at a given point.
+ *
+ * Discussion:
+ * FindControl does not work properly in compositing windows prior
+ * to Mac OS X 10.4. In earlier releases of Mac OS X, it will return
+ * the correct control, but the part code parameter will be invalid
+ * (usually kControlNoPart).
+ *
+ * In Mac OS X 10.2 and later, we recommend using
+ * HIViewGetViewForMouseEvent or HIViewGetSubviewHit instead of
+ * FindControl.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * testPoint:
+ * The point to test. The point should be given in port-local
+ * coordinates for the specified window.
+ *
+ * theWindow:
+ * The window whose controls to test.
+ *
+ * theControl:
+ * On exit, contains the control that was at the specified
+ * location.
+ *
+ * Result:
+ * The control part code that was at the specified location.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function FindControl( testPoint: Point; theWindow: WindowRef; var theControl: ControlRef ): ControlPartCode; external name '_FindControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ The following mousing routines available only with Appearance 1.0 and later }
+{ HandleControlClick is preferable to TrackControl when running under }
+{ Appearance 1.0 as you can pass in modifiers, which some of the new controls }
+{ use, such as edit text and list boxes. }
+{ NOTE: Passing NULL for the outPart parameter of FindControlUnderMouse is only}
+{ supported in systems later than 10.1.x }
+{
+ * FindControlUnderMouse()
+ *
+ * Summary:
+ * Finds the control in a window that is at a given point.
+ *
+ * Discussion:
+ * FindControlUnderMouse does not work properly in compositing
+ * windows prior to Mac OS X 10.4. In earlier releases of Mac OS X,
+ * it will return the correct control, but the part code parameter
+ * will be invalid (usually kControlNoPart).
+ *
+ * In Mac OS X 10.2 and later, we recommend using
+ * HIViewGetViewForMouseEvent or HIViewGetSubviewHit instead of
+ * FindControlUnderMouse.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWhere:
+ * The point to test. The point should be given in port-local
+ * coordinates for the specified window.
+ *
+ * inWindow:
+ * The window whose controls to test.
+ *
+ * outPart:
+ * On exit, contains the control part code that was at the
+ * specified location. You may pass NULL for this parameter if you
+ * don't need this information.
+ *
+ * Result:
+ * The control that was at the specified location.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function FindControlUnderMouse( inWhere: Point; inWindow: WindowRef; outPart: ControlPartCodePtr { can be NULL } ): ControlRef; external name '_FindControlUnderMouse';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HandleControlClick()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function HandleControlClick( inControl: ControlRef; inWhere: Point; inModifiers: EventModifiers; inAction: ControlActionUPP { can be NULL } ): ControlPartCode; external name '_HandleControlClick';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Contextual Menu support in the Control Manager is only available on Carbon. }
+{ If the control didn't display a contextual menu (possibly because the point }
+{ was in a non-interesting part), the menuDisplayed output parameter will be }
+{ false. If the control did display a menu, menuDisplayed will be true. }
+{ This in on Carbon only }
+{
+ * HandleControlContextualMenuClick()
+ *
+ * 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
+ * Non-Carbon CFM: in ControlsLib 9.0 and later
+ }
+function HandleControlContextualMenuClick( inControl: ControlRef; inWhere: Point; var menuDisplayed: Boolean ): OSStatus; external name '_HandleControlContextualMenuClick';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Some complex controls (like Data Browser) require proper sequencing of }
+{ window activation and click processing. In some cases, the control might }
+{ want the window to be left inactive yet still handle the click, or vice- }
+{ versa. The GetControlClickActivation routine lets a control client ask the }
+{ control how it wishes to behave for a particular click. }
+{ This in on Carbon only. }
+{
+ * GetControlClickActivation()
+ *
+ * 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
+ * Non-Carbon CFM: in ControlsLib 9.0 and later
+ }
+function GetControlClickActivation( inControl: ControlRef; inWhere: Point; inModifiers: EventModifiers; var outResult: ClickActivationResult ): OSStatus; external name '_GetControlClickActivation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Events (available only with Appearance 1.0 and later) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * HandleControlKey()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function HandleControlKey( inControl: ControlRef; inKeyCode: SInt16; inCharCode: SInt16; inModifiers: EventModifiers ): ControlPartCode; external name '_HandleControlKey';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Mouse Tracking (available with Carbon) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ The HandleControlSetCursor routine requests that a given control set the cursor to }
+{ something appropriate based on the mouse location. }
+{ If the control didn't want to set the cursor (because the point was in a }
+{ non-interesting part), the cursorWasSet output parameter will be false. If the }
+{ control did set the cursor, cursorWasSet will be true. }
+{ Carbon only. }
+{
+ * HandleControlSetCursor()
+ *
+ * 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
+ * Non-Carbon CFM: in ControlsLib 9.0 and later
+ }
+function HandleControlSetCursor( control: ControlRef; localPoint: Point; modifiers: EventModifiers; var cursorWasSet: Boolean ): OSStatus; external name '_HandleControlSetCursor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Positioning }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * MoveControl()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure MoveControl( theControl: ControlRef; h: SInt16; v: SInt16 ); external name '_MoveControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SizeControl()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SizeControl( theControl: ControlRef; w: SInt16; h: SInt16 ); external name '_SizeControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Title }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * SetControlTitle()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetControlTitle( theControl: ControlRef; const (*var*) title: Str255 ); external name '_SetControlTitle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlTitle()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure GetControlTitle( theControl: ControlRef; var title: Str255 ); external name '_GetControlTitle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControlTitleWithCFString()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetControlTitleWithCFString( inControl: ControlRef; inString: CFStringRef ): OSStatus; external name '_SetControlTitleWithCFString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CopyControlTitleAsCFString()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CopyControlTitleAsCFString( inControl: ControlRef; var outString: CFStringRef ): OSStatus; external name '_CopyControlTitleAsCFString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Value }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * GetControlValue()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetControlValue( theControl: ControlRef ): SInt16; external name '_GetControlValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControlValue()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetControlValue( theControl: ControlRef; newValue: SInt16 ); external name '_SetControlValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlMinimum()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetControlMinimum( theControl: ControlRef ): SInt16; external name '_GetControlMinimum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControlMinimum()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetControlMinimum( theControl: ControlRef; newMinimum: SInt16 ); external name '_SetControlMinimum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlMaximum()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetControlMaximum( theControl: ControlRef ): SInt16; external name '_GetControlMaximum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControlMaximum()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetControlMaximum( theControl: ControlRef; newMaximum: SInt16 ); external name '_SetControlMaximum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ proportional scrolling/32-bit value support is new with Appearance 1.1}
+
+{
+ * GetControlViewSize()
+ *
+ * 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
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+function GetControlViewSize( theControl: ControlRef ): SInt32; external name '_GetControlViewSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControlViewSize()
+ *
+ * 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
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+procedure SetControlViewSize( theControl: ControlRef; newViewSize: SInt32 ); external name '_SetControlViewSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControl32BitValue()
+ *
+ * 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
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+function GetControl32BitValue( theControl: ControlRef ): SInt32; external name '_GetControl32BitValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControl32BitValue()
+ *
+ * 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
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+procedure SetControl32BitValue( theControl: ControlRef; newValue: SInt32 ); external name '_SetControl32BitValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControl32BitMaximum()
+ *
+ * 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
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+function GetControl32BitMaximum( theControl: ControlRef ): SInt32; external name '_GetControl32BitMaximum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControl32BitMaximum()
+ *
+ * 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
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+procedure SetControl32BitMaximum( theControl: ControlRef; newMaximum: SInt32 ); external name '_SetControl32BitMaximum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControl32BitMinimum()
+ *
+ * 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
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+function GetControl32BitMinimum( theControl: ControlRef ): SInt32; external name '_GetControl32BitMinimum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControl32BitMinimum()
+ *
+ * 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
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+procedure SetControl32BitMinimum( theControl: ControlRef; newMinimum: SInt32 ); external name '_SetControl32BitMinimum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ IsValidControlHandle will tell you if the handle you pass in belongs to a control
+ the Control Manager knows about. It does not sanity check the data in the control.
+}
+
+{
+ * IsValidControlHandle()
+ *
+ * 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
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+function IsValidControlHandle( theControl: ControlRef ): Boolean; external name '_IsValidControlHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control IDs }
+{ Carbon only. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * ControlID
+ *
+ * Summary:
+ * A unique identifier for a control in a window.
+ }
+type
+ ControlIDPtr = ^ControlID;
+ ControlID = record
+{
+ * A four-character signature. When assigning a control ID to your
+ * own controls, you should typically use your application signature
+ * here, or some other signature with an uppercase character. Apple
+ * reserves signatures that contain only lowercase characters.
+ }
+ signature: OSType;
+
+ {
+ * A integer identifying the control. This value should be unique for
+ * a given control across all controls in the same window with the
+ * same signature.
+ }
+ id: SInt32;
+ end;
+{
+ * SetControlID()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function SetControlID( inControl: ControlRef; const (*var*) inID: ControlID ): OSStatus; external name '_SetControlID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlID()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetControlID( inControl: ControlRef; var outID: ControlID ): OSStatus; external name '_GetControlID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlByID()
+ *
+ * Discussion:
+ * Find a control in a window by its unique ID.
+ *
+ * HIView Notes: This call is replaced as of Mac OS X 10.3 by
+ * HIViewFindByID. That call lets you start your search at any point
+ * in the hierarchy, as the first parameter is a view and not a
+ * window. Either will work, but the HIView API is preferred.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to search.
+ *
+ * inID:
+ * The ID to search for.
+ *
+ * outControl:
+ * The control that was found, or NULL if no control in the window
+ * had the ID specified.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetControlByID( inWindow: WindowRef; const (*var*) inID: ControlID; var outControl: ControlRef ): OSStatus; external name '_GetControlByID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Command IDs }
+{ Carbon only. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * SetControlCommandID()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetControlCommandID( inControl: ControlRef; inCommandID: UInt32 ): OSStatus; external name '_SetControlCommandID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlCommandID()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetControlCommandID( inControl: ControlRef; var outCommandID: UInt32 ): OSStatus; external name '_GetControlCommandID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Identification }
+{ Carbon only. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ControlKindPtr = ^ControlKind;
+ ControlKind = record
+ signature: OSType;
+ kind: OSType;
+ end;
+
+{
+ * Discussion:
+ * Control signature kind
+ }
+const
+{
+ * Signature of all system controls.
+ }
+ kControlKindSignatureApple = $6170706C (* 'appl' *);
+
+{
+ * GetControlKind()
+ *
+ * Summary:
+ * Returns the kind of the given control.
+ *
+ * Discussion:
+ * GetControlKind allows you to query the kind of any control. This
+ * function is only available in Mac OS X.
+ *
+ * HIView Note: With the advent of HIView, you can just as easily
+ * use HIObjectCopyClassID to determine what kind of control you are
+ * looking at. This is only truly deterministic for
+ * HIToolbox-supplied controls as of Mac OS X 10.3 or later due to
+ * the fact that the class IDs underwent naming changes before that
+ * release.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The ControlRef to find the kind of.
+ *
+ * outControlKind:
+ * On successful exit, this will contain the control signature and
+ * kind. See ControlDefinitions.h for the kinds of each system
+ * control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function GetControlKind( inControl: ControlRef; var outControlKind: ControlKind ): OSStatus; external name '_GetControlKind';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Properties }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kControlPropertyPersistent = $00000001; { whether this property gets saved when flattening the control}
+
+{
+ * GetControlProperty()
+ *
+ * Discussion:
+ * Obtains a piece of data that has been previously associated with
+ * a control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * control:
+ * A ControlRef to the control whose associated data you wish to
+ * obtain.
+ *
+ * propertyCreator:
+ * An OSType signature, usually the signature of your application.
+ * Do not use all lower case signatures, as these are reserved for
+ * use by Apple.
+ *
+ * propertyTag:
+ * An OSType signature, application-defined, identifying the
+ * property.
+ *
+ * bufferSize:
+ * A value specifying the size of the data to be retrieved. If the
+ * size of the data is unknown, use the function
+ * GetControlPropertySize to get the dataÕs size. If the size
+ * specified in the bufferSize parameter does not match the actual
+ * size of the property, GetControlProperty only retrieves data up
+ * to the size specified or up to the actual size of the property,
+ * whichever is smaller, and an error is returned.
+ *
+ * actualSize:
+ * On input, a pointer to an unsigned 32-bit integer. On return,
+ * this value is set to the actual size of the associated data.
+ * You may pass null for the actualSize parameter if you are not
+ * interested in this information.
+ *
+ * propertyBuffer:
+ * On input, a pointer to a buffer. This buffer must be big enough
+ * to fit bufferSize bytes of data. On return, this buffer
+ * contains a copy of the data that is associated with the
+ * specified control.
+ *
+ * Result:
+ * A result code indicating success or failure. Most common return
+ * values are: noErr, paramErr, controlHandleInvalidErr,
+ * controlPropertyInvalid and controlPropertyNotFoundErr.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+function GetControlProperty( control: ControlRef; propertyCreator: OSType; propertyTag: OSType; bufferSize: UInt32; actualSize: UInt32Ptr { can be NULL }; propertyBuffer: UnivPtr ): OSStatus; external name '_GetControlProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlPropertySize()
+ *
+ * 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
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+function GetControlPropertySize( control: ControlRef; propertyCreator: OSType; propertyTag: OSType; var size: UInt32 ): OSStatus; external name '_GetControlPropertySize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControlProperty()
+ *
+ * Discussion:
+ * Obtains a piece of data that has been previously associated with
+ * a control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * control:
+ * A ControlRef to the control whose associated data you wish to
+ * obtain.
+ *
+ * propertyCreator:
+ * An OSType signature, usually the signature of your application.
+ * Do not use all lower case signatures, as these are reserved for
+ * use by Apple.
+ *
+ * propertyTag:
+ * An OSType signature, application-defined, identifying the
+ * property.
+ *
+ * propertySize:
+ * A value specifying the size of the data.
+ *
+ * propertyData:
+ * On input, a pointer to data of any type. Pass a pointer to a
+ * buffer containing the data to be associated; this buffer should
+ * be at least as large as the value specified in the propertySize
+ * parameter.
+ *
+ * propertyBuffer:
+ * On input, a pointer to a buffer. This buffer must be big enough
+ * to fit bufferSize bytes of data. On return, this buffer
+ * contains a copy of the data that is associated with the
+ * specified control.
+ *
+ * Result:
+ * A result code indicating success or failure. Most common return
+ * values are: noErr, paramErr, controlHandleInvalidErr and
+ * controlPropertyInvalid
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+function SetControlProperty( control: ControlRef; propertyCreator: OSType; propertyTag: OSType; propertySize: UInt32; propertyData: {const} UnivPtr ): OSStatus; external name '_SetControlProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RemoveControlProperty()
+ *
+ * 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
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+function RemoveControlProperty( control: ControlRef; propertyCreator: OSType; propertyTag: OSType ): OSStatus; external name '_RemoveControlProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlPropertyAttributes()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetControlPropertyAttributes( control: ControlRef; propertyCreator: OSType; propertyTag: OSType; var attributes: UInt32 ): OSStatus; external name '_GetControlPropertyAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ChangeControlPropertyAttributes()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function ChangeControlPropertyAttributes( control: ControlRef; propertyCreator: OSType; propertyTag: OSType; attributesToSet: UInt32; attributesToClear: UInt32 ): OSStatus; external name '_ChangeControlPropertyAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Regions (Appearance 1.1 or later) }
+{ See the discussion on meta-parts in this header for more information }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * GetControlRegion()
+ *
+ * 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
+ * Non-Carbon CFM: in ControlsLib 8.5 and later
+ }
+function GetControlRegion( inControl: ControlRef; inPart: ControlPartCode; outRegion: RgnHandle ): OSStatus; external name '_GetControlRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Variant }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * GetControlVariant()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetControlVariant( theControl: ControlRef ): ControlVariant; external name '_GetControlVariant';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Action }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * SetControlAction()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetControlAction( theControl: ControlRef; actionProc: ControlActionUPP ); external name '_SetControlAction';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlAction()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetControlAction( theControl: ControlRef ): ControlActionUPP; external name '_GetControlAction';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Accessors }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * SetControlReference()
+ *
+ * Summary:
+ * This is somewhat of a legacy API. The Set/GetControlProperty API
+ * is a better mechanism to associate data with a control.
+ *
+ * Discussion:
+ * When you create a control, you specify an initial reference
+ * value, either in the control resource or in the refCon parameter
+ * of the function NewControl. You can use the function
+ * GetControlReference to obtain the current value. You can use this
+ * value for any purpose.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * theControl:
+ * A ControlRef to the control whose reference value you wish to
+ * change.
+ *
+ * data:
+ * The new reference value for the control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetControlReference( theControl: ControlRef; data: SInt32 ); external name '_SetControlReference';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlReference()
+ *
+ * Summary:
+ * This is somewhat of a legacy API. The Set/GetControlProperty API
+ * is a better mechanism to associate data with a control.
+ *
+ * Discussion:
+ * When you create a control, you specify an initial reference
+ * value, either in the control resource or in the refCon parameter
+ * of the function NewControl. You can use this reference value for
+ * any purpose, and you can use the function SetControlReference to
+ * change this value.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * theControl:
+ * A ControlRef to the control whose reference value you wish to
+ * retrieve.
+ *
+ * Result:
+ * The current reference value for the specified control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetControlReference( theControl: ControlRef ): SInt32; external name '_GetControlReference';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControlColor()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Hierarchy (Appearance 1.0 and later only) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * SendControlMessage()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SendControlMessage( inControl: ControlRef; inMessage: SInt16; inParam: UnivPtr ): SInt32; external name '_SendControlMessage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DumpControlHierarchy()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function DumpControlHierarchy( inWindow: WindowRef; const (*var*) inDumpFile: FSSpec ): OSErr; external name '_DumpControlHierarchy';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CreateRootControl()
+ *
+ * Discussion:
+ * Creates a new 'root control' for a window. This root is actually
+ * the content area of a window, and spans all of Quickdraw space.
+ *
+ *
+ * HIView Notes: In a composited window, this routine will return
+ * errRootAlreadyExists. Technically, you cannot create a root
+ * control in such a window. Instead you would embed views into the
+ * content view of the window. GetRootControl will return the
+ * content view in that situation as well.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window for which to create a root control.
+ *
+ * outControl:
+ * On exit, contains the window's root control. In Mac OS 10.1 and
+ * CarbonLib 1.5 and later, this parameter may be NULL if you
+ * don't need the ControlRef.
+ *
+ * Result:
+ * A result code indicating success or failure. errRootAlreadyExists
+ * is returned if the window already has a root control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function CreateRootControl( inWindow: WindowRef; outControl: ControlRefPtr { can be NULL } ): OSErr; external name '_CreateRootControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetRootControl()
+ *
+ * Discussion:
+ * Returns the 'root control' for a given window. If no root exists
+ * for the window, errNoRootControl is returned. This root control
+ * represents the content area of the window, and spans all of
+ * Quickdraw space.
+ *
+ * HIView Notes: With the advent of HIView, this API and concept are
+ * considered deprecated. The root of the window in a composited
+ * window is actually the structure view, and all views (window
+ * widgets, content view, etc.) are subviews of that top-level view.
+ * It can be fetched with HIViewGetRoot. In a composited window,
+ * calling GetRootControl will return the content view, not the true
+ * root to maintain compatibility with past usage of GetRootControl.
+ * We recommend using HIViewFindByID with the kHIViewWindowContentID
+ * control ID to fetch the content view instead of using this call.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to query.
+ *
+ * outControl:
+ * The root control, on output.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetRootControl( inWindow: WindowRef; var outControl: ControlRef ): OSErr; external name '_GetRootControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * EmbedControl()
+ *
+ * Discussion:
+ * Adds a subcontrol to the given parent.
+ *
+ * HIView Note: This is replaced by HIViewAddSubview in Mac OS X
+ * 10.2 and beyond. You can call either function in a composited or
+ * non-composited window, but the HIView variant is preferred.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The subcontrol being added.
+ *
+ * inContainer:
+ * The control which will receive the new subcontrol.
+ *
+ * Result:
+ * An operating system result code.
+ * errNeedsCompositedWindow will be returned when you try to embed
+ * into the content view in a non-compositing window; you can only
+ * embed into the content view in compositing windows.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function EmbedControl( inControl: ControlRef; inContainer: ControlRef ): OSErr; external name '_EmbedControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * AutoEmbedControl()
+ *
+ * Discussion:
+ * Based on the bounds of the given control, embed it in the window
+ * specified. It basically finds the deepest parent the control
+ * would fit into and embeds it there. This was invented primarily
+ * for the Dialog Manager so that hierarchies could be generated
+ * from the flattened DITL list.
+ *
+ * HIView Note: Do NOT call this API in a composited window, its
+ * results will be unpredictable as the coordinate systems are very
+ * different.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The subcontrol being added.
+ *
+ * inWindow:
+ * The window which will receive the new subcontrol.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function AutoEmbedControl( inControl: ControlRef; inWindow: WindowRef ): OSErr; external name '_AutoEmbedControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetSuperControl()
+ *
+ * Discussion:
+ * Returns the parent control of the given one.
+ *
+ * HIView Note: HIViewGetSuperview is the preferred API as of Mac OS
+ * X 10.2. Either call will work in a composited or non- composited
+ * window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The control to query.
+ *
+ * outParent:
+ * The parent control.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetSuperControl( inControl: ControlRef; var outParent: ControlRef ): OSErr; external name '_GetSuperControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CountSubControls()
+ *
+ * Discussion:
+ * Returns the number of children a given control has. This count
+ * can then be used for calls to GetIndexedSubControl.
+ *
+ *
+ * HIView Note: As of Mac OS X 10.2, the preferred way to walk the
+ * control hierarchy is to use HIViewGetFirstSubView followed by
+ * repeated calls to HIViewGetNextView until NULL is returned.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The control to query.
+ *
+ * outNumChildren:
+ * A pointer to a UInt16 to receive the number of children
+ * controls.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function CountSubControls( inControl: ControlRef; var outNumChildren: UInt16 ): OSErr; external name '_CountSubControls';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetIndexedSubControl()
+ *
+ * Discussion:
+ * Returns the child control at a given index in the list of
+ * subcontrols for the specified parent.
+ *
+ * HIView Note: As of Mac OS X 10.2, the preferred way to walk the
+ * control hierarchy is to use HIViewGetFirstSubView followed by
+ * repeated calls to HIViewGetNextView until NULL is returned.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The parent control to query.
+ *
+ * inIndex:
+ * The index of the subcontrol to fetch.
+ *
+ * outSubControl:
+ * A pointer to a control reference to receive the subcontrol. If
+ * the index is out of range, the contents of this parameter are
+ * undefined after the call.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetIndexedSubControl( inControl: ControlRef; inIndex: UInt16; var outSubControl: ControlRef ): OSErr; external name '_GetIndexedSubControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControlSupervisor()
+ *
+ * Discussion:
+ * Allow one view to intercept clicks for another. When something
+ * like FindControl or the like is called on the target, it will
+ * instead return the supervisor. This is largely deprecated these
+ * days.
+ *
+ * HIView Note: As of Mac OS X 10.2, you can intercept subview
+ * clicks by overriding the kEventControlInterceptSubviewClick event
+ * (see CarbonEvents.h).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The control to intercept clicks for.
+ *
+ * inBoss:
+ * The new supervisor control (can be NULL).
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetControlSupervisor( inControl: ControlRef; inBoss: ControlRef { can be NULL } ): OSErr; external name '_SetControlSupervisor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Keyboard Focus (available only with Appearance 1.0 and later) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * GetKeyboardFocus()
+ *
+ * Discussion:
+ * Passes back the currently focused control within the given window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to get the focus of.
+ *
+ * outControl:
+ * On output, this will contain the ControlRef that is currently
+ * focused in the given window. If there is no currently focused
+ * control, outControl will contain NULL.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetKeyboardFocus( inWindow: WindowRef; var outControl: ControlRef ): OSErr; external name '_GetKeyboardFocus';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetKeyboardFocus()
+ *
+ * Discussion:
+ * Focuses the given part of the given control in a particular
+ * window. If another control is currently focused in the window,
+ * focus will be removed from the other control before focus is
+ * given to the desired control. SetKeyboardFocus respects the full
+ * keyboard navigation mode.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window which contains the control you want to focus. If the
+ * window does not contain the control, an error will be returned.
+ *
+ * inControl:
+ * The control you want to focus.
+ *
+ * inPart:
+ * The part of the control you wish to focus. You may pass
+ * kControlFocusNoPart to clear the focus in the given control.
+ * You may pass kControlFocusNextPart or kControlFocusPrevPart to
+ * move the focus within the given control.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetKeyboardFocus( inWindow: WindowRef; inControl: ControlRef; inPart: ControlFocusPart ): OSErr; external name '_SetKeyboardFocus';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * AdvanceKeyboardFocus()
+ *
+ * Discussion:
+ * Advances the focus to the next most appropriate control. Unless
+ * overriden in some fashion (either by overriding certain carbon
+ * events or using the HIViewSetNextFocus API), the Toolbox will use
+ * a spacially determinant method of focusing, attempting to focus
+ * left to right, top to bottom in a window, taking groups of
+ * controls into account. AdvanceKeyboardFocus does not respect the
+ * full keyboard navigation mode. It will only advance the focus
+ * between traditionally focusable controls. If you want to advance
+ * the focus in a way that respects the full keyboard navigation
+ * mode, use the HIViewAdvanceFocus API. AdvanceKeyboardFocus does
+ * not work for windows in compositing mode. For compositing
+ * windows, you must call HIViewAdvanceFocus instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to advance the focus in.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function AdvanceKeyboardFocus( inWindow: WindowRef ): OSErr; external name '_AdvanceKeyboardFocus';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ReverseKeyboardFocus()
+ *
+ * Discussion:
+ * Reverses the focus to the next most appropriate control. Unless
+ * overriden in some fashion (either by overriding certain carbon
+ * events or using the HIViewSetNextFocus API), the Toolbox will use
+ * a spacially determinant method of focusing, attempting to focus
+ * left to right, top to bottom in a window, taking groups of
+ * controls into account. ReverseKeyboardFocus does not respect the
+ * full keyboard navigation mode. It will only reverse the focus
+ * between traditionally focusable controls. If you want to reverse
+ * the focus in a way that respects the full keyboard navigation
+ * mode, use the HIViewAdvanceFocus API. ReverseKeyboardFocus does
+ * not work for windows in compositing mode. For compositing
+ * windows, you must call HIViewAdvanceFocus instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to reverse the focus in.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function ReverseKeyboardFocus( inWindow: WindowRef ): OSErr; external name '_ReverseKeyboardFocus';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ClearKeyboardFocus()
+ *
+ * Discussion:
+ * Clears focus from the currently focused control in a given
+ * window. The window will be left such that no control is focused
+ * within it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window that you want to clear the focus in.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function ClearKeyboardFocus( inWindow: WindowRef ): OSErr; external name '_ClearKeyboardFocus';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Data (available only with Appearance 1.0 and later) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * GetControlFeatures()
+ *
+ * Discussion:
+ * Returns the set of behaviors, etc. the given view supports. This
+ * set of features is immutable before Mac OS X 10.3. As of that
+ * release, the features can be changed with HIViewChangeFeatures.
+ * That API is the recommended call on Mac OS X 10.3 and later.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The control to query.
+ *
+ * outFeatures:
+ * A pointer to a 32-bit feature bitfield.
+ *
+ * Result:
+ * An operating system error code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetControlFeatures( inControl: ControlRef; var outFeatures: UInt32 ): OSErr; external name '_GetControlFeatures';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControlData()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetControlData( inControl: ControlRef; inPart: ControlPartCode; inTagName: ResType; inSize: Size; inData: {const} UnivPtr ): OSErr; external name '_SetControlData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlData()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetControlData( inControl: ControlRef; inPart: ControlPartCode; inTagName: ResType; inBufferSize: Size; inBuffer: UnivPtr; outActualSize: SizePtr { can be NULL } ): OSErr; external name '_GetControlData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlDataSize()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetControlDataSize( inControl: ControlRef; inPart: ControlPartCode; inTagName: ResType; var outMaxSize: Size ): OSErr; external name '_GetControlDataSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Drag & Drop }
+{ Carbon only. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * Discussion:
+ * DragTrackingMessage values for use with
+ * HandleControlDragTracking. These are deprecated in favor of the
+ * drag Carbon Events introduced in Mac OS X 10.2 via HIView.
+ }
+const
+{
+ * The drag was previously outside the control and it just now
+ * entered the control.
+ }
+ kDragTrackingEnterControl = 2;
+
+ {
+ * The drag was previously inside the control and it is still inside
+ * the control.
+ }
+ kDragTrackingInControl = 3;
+
+ {
+ * The drag was previously inside the control and it just now left
+ * the control.
+ }
+ kDragTrackingLeaveControl = 4;
+
+
+{
+ * HandleControlDragTracking()
+ *
+ * Summary:
+ * Tells a control to respond visually to a drag.
+ *
+ * Discussion:
+ * Call HandleControlDragTracking when a drag is above a control in
+ * your window and you want to give that control a chance to draw
+ * appropriately in response to the drag. Note that in order for a
+ * control to have any chance of responding to this API, you must
+ * enable the control's drag and drop support with
+ * SetControlDragTrackingEnabled.
+ * <br>HIView Note: This should not be called in a composited window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The control the drag is over. Most controls won't track drags
+ * unless you enable drag tracking on it with
+ * SetControlDragTrackingEnabled.
+ *
+ * inMessage:
+ * A drag message indicating the state of the drag above the
+ * control. The meaning of the value you pass in must be relative
+ * to the control, not the whole window. For when the drag first
+ * enters the control, you should pass kDragTrackingEnterControl.
+ * While the drag stays within the control, pass
+ * kDragTrackingInControl. When the drag leaves the control, pass
+ * kDragTrackingLeaveControl.
+ *
+ * inDrag:
+ * The drag reference that is over the control.
+ *
+ * outLikesDrag:
+ * On output, this will be a boolean indicating whether the
+ * control "likes" the drag. A control "likes" the drag if the
+ * data in the drag ref can be accepted by the control. If the
+ * control does not like the drag, don't bother calling
+ * HandleControlDragReceive if the user drops the dragged object
+ * onto the control.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ControlsLib 9.0 and later
+ }
+function HandleControlDragTracking( inControl: ControlRef; inMessage: DragTrackingMessage; inDrag: DragReference; var outLikesDrag: Boolean ): OSStatus; external name '_HandleControlDragTracking';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HandleControlDragReceive()
+ *
+ * Summary:
+ * Tells a control to accept the data in drag reference.
+ *
+ * Discussion:
+ * Call HandleControlDragReceive when the user dropped a drag on a
+ * control in your window. This gives the control the opportunity to
+ * pull any interesting data out of the drag and insert the data
+ * into itself. Note that in order for a control to have any chance
+ * of responding to this API, you must enable the control's drag and
+ * drop support with SetControlDragTrackingEnabled.
+ * <br>HIView Note: This should not be called in a composited window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The control who should accept the data. Most controls won't
+ * accept drags unless you enable drag tracking on it with
+ * SetControlDragTrackingEnabled.
+ *
+ * inDrag:
+ * The drag reference that was dropped on the control.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ControlsLib 9.0 and later
+ }
+function HandleControlDragReceive( inControl: ControlRef; inDrag: DragReference ): OSStatus; external name '_HandleControlDragReceive';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControlDragTrackingEnabled()
+ *
+ * Summary:
+ * Tells a control that it should track and receive drags.
+ *
+ * Discussion:
+ * Call SetControlDragTrackingEnabled to turn enable a control's
+ * support for drag and drop. Controls won't track drags unless you
+ * first turn on drag and drop support with this API. Some controls
+ * don't support drag and drop at all; these controls won't track or
+ * receive drags even if you call this API with true.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The control whose drag tracking enabled state you'd like to set.
+ *
+ * inTracks:
+ * A Boolean indicating whether you want this control to track and
+ * receive drags.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ControlsLib 9.0 and later
+ }
+function SetControlDragTrackingEnabled( inControl: ControlRef; inTracks: Boolean ): OSStatus; external name '_SetControlDragTrackingEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsControlDragTrackingEnabled()
+ *
+ * Summary:
+ * Tells you whether a control's drag track and receive support is
+ * enabled.
+ *
+ * Discussion:
+ * Call IsControlDragTrackingEnabled to query a whether a control's
+ * drag and drop support is enabled. Some controls don't support
+ * drag and drop at all; these controls won't track or receive drags
+ * even if you call this API and see a true output value.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The control whose drag tracking enabled state you'd like to
+ * query.
+ *
+ * outTracks:
+ * On output, this will contain a Boolean value whether the
+ * control's drag and drop support is enabled.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ControlsLib 9.0 and later
+ }
+function IsControlDragTrackingEnabled( inControl: ControlRef; var outTracks: Boolean ): OSStatus; external name '_IsControlDragTrackingEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetAutomaticControlDragTrackingEnabledForWindow()
+ *
+ * Summary:
+ * Enables or disables the Control Manager's automatic drag tracking
+ * for a given window.
+ *
+ * Discussion:
+ * Call SetAutomaticControlDragTrackingEnabledForWindow to turn on
+ * or off the Control Manager's automatic drag tracking support for
+ * a given window. By default, your application code is responsible
+ * for installing drag tracking and receive handlers on a given
+ * window. The Control Manager, however, has support for
+ * automatically tracking and receiving drags over controls. The
+ * Control Manager will detect the control the drag is over and call
+ * HandleControlDragTracking and HandleControlDragReceive
+ * appropriately. By default, this automatic support is turned off.
+ * You can turn on this support by calling
+ * SetAutomaticControlDragTrackingEnabledForWindow with true. Note
+ * that earlier versions of system software incorrectly enable this
+ * support by default; do not rely on this buggy behavior. As of Mac
+ * OS 10.1.3, Mac OS 9.2, and CarbonLib 1.4, the buggy behavior is
+ * fixed, and you must call this routine with true to enable
+ * automatic drag tracking.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window for which you'd like to enable or disable the
+ * Control Manager's automatic drag tracking support.
+ *
+ * inTracks:
+ * A Boolean value indicating whether you want to enable the
+ * Control Manager's automatic drag tracking support.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ControlsLib 9.0 and later
+ }
+function SetAutomaticControlDragTrackingEnabledForWindow( inWindow: WindowRef; inTracks: Boolean ): OSStatus; external name '_SetAutomaticControlDragTrackingEnabledForWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsAutomaticControlDragTrackingEnabledForWindow()
+ *
+ * Summary:
+ * Tells you whether the Control Manager's automatic drag tracking
+ * is enabled for a given window.
+ *
+ * Discussion:
+ * Call IsAutomaticControlDragTrackingEnabledForWindow to query the
+ * enabled state of the Control Manager's automatic drag tracking
+ * support for a given window. See the information on
+ * SetAutomaticControlDragTrackingEnabledForWindow for more details.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose Control Manager automatic drag tracking enable
+ * state you'd like to query.
+ *
+ * outTracks:
+ * On output, this will contain a Boolean value whether the
+ * Control Manager's automatic drag tracking is enabled.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ControlsLib 9.0 and later
+ }
+function IsAutomaticControlDragTrackingEnabledForWindow( inWindow: WindowRef; var outTracks: Boolean ): OSStatus; external name '_IsAutomaticControlDragTrackingEnabledForWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ C Glue }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * dragcontrol()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * newcontrol()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * findcontrol()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * getcontroltitle()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * setcontroltitle()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * trackcontrol()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * testcontrol()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+
+(*
+#if OLDROUTINENAMES
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ OLDROUTINENAMES }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ useWFont = kControlUsesOwningWindowsFontVariant;
+
+const
+ inThumb = kControlIndicatorPart;
+ kNoHiliteControlPart = kControlNoPart;
+ kInIndicatorControlPart = kControlIndicatorPart;
+ kReservedControlPart = kControlDisabledPart;
+ kControlInactiveControlPart = kControlInactivePart;
+
+
+#define SetCTitle(theControl, title) SetControlTitle(theControl, title)
+#define GetCTitle(theControl, title) GetControlTitle(theControl, title)
+#define UpdtControl(theWindow, updateRgn) UpdateControls(theWindow, updateRgn)
+#define SetCtlValue(theControl, theValue) SetControlValue(theControl, theValue)
+#define GetCtlValue(theControl) GetControlValue(theControl)
+#define SetCtlMin(theControl, minValue) SetControlMinimum(theControl, minValue)
+#define GetCtlMin(theControl) GetControlMinimum(theControl)
+#define SetCtlMax(theControl, maxValue) SetControlMaximum(theControl, maxValue)
+#define GetCtlMax(theControl) GetControlMaximum(theControl)
+#define GetAuxCtl(theControl, acHndl) GetAuxiliaryControlRecord(theControl, acHndl)
+#define SetCRefCon(theControl, data) SetControlReference(theControl, data)
+#define GetCRefCon(theControl) GetControlReference(theControl)
+#define SetCtlAction(theControl, actionProc) SetControlAction(theControl, actionProc)
+#define GetCtlAction(theControl) GetControlAction(theControl)
+#define SetCtlColor(theControl, newColorTable) SetControlColor(theControl, newColorTable)
+#define GetCVariant(theControl) GetControlVariant(theControl)
+#define getctitle(theControl, title) getcontroltitle(theControl, title)
+#define setctitle(theControl, title) setcontroltitle(theControl, title)
+#endif { OLDROUTINENAMES }
+*)
+
+{ Getters }
+{
+ * GetControlBounds()
+ *
+ * Discussion:
+ * Returns the bounds of a control, assumed to be in port
+ * coordinates.
+ *
+ * HIView Notes: When called in a composited window, this routine
+ * returns the view's frame, i.e. it is equivalent to calling
+ * HIViewGetFrame.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * control:
+ * The control to query
+ *
+ * bounds:
+ * A pointer to a Quickdraw rectangle to be filled in by this call.
+ *
+ * Result:
+ * A pointer to the rectangle passed in bounds.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetControlBounds( control: ControlRef; var bounds: Rect ): RectPtr; external name '_GetControlBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsControlHilited()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function IsControlHilited( control: ControlRef ): Boolean; external name '_IsControlHilited';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlHilite()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetControlHilite( control: ControlRef ): UInt16; external name '_GetControlHilite';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlOwner()
+ *
+ * Discussion:
+ * Returns the window a control is bound to, or NULL if the control
+ * is not currently attached to any window.
+ *
+ * HIView replacement: HIViewGetWindow (Mac OS X 10.3 or later).
+ * Either call will work in a composited or non-composited view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * control:
+ * The control to query
+ *
+ * Result:
+ * A window reference, or NULL if the control is not attached to a
+ * window
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetControlOwner( control: ControlRef ): WindowRef; external name '_GetControlOwner';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlDataHandle()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetControlDataHandle( control: ControlRef ): Handle; external name '_GetControlDataHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlPopupMenuHandle()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetControlPopupMenuHandle( control: ControlRef ): MenuRef; external name '_GetControlPopupMenuHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+function GetControlPopupMenuRef( control: ControlRef ): MenuRef; external name '_GetControlPopupMenuHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+{
+ * GetControlPopupMenuID()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetControlPopupMenuID( control: ControlRef ): SInt16; external name '_GetControlPopupMenuID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Setters }
+{
+ * SetControlDataHandle()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetControlDataHandle( control: ControlRef; dataHandle: Handle ); external name '_SetControlDataHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControlBounds()
+ *
+ * Discussion:
+ * Sets the bounds of a control, assumed to be in port coordinates.
+ *
+ *
+ * HIView Notes: When called in a composited window, this routine
+ * sets the view's frame, i.e. it is equivalent to calling
+ * HIViewSetFrame. The view will be invalidated as necessary in a
+ * composited window. HIViewSetFrame is the recommended call in that
+ * environment.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * control:
+ * The control to query
+ *
+ * bounds:
+ * A pointer to a Quickdraw rectangle to be used by this call.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetControlBounds( control: ControlRef; const (*var*) bounds: Rect ); external name '_SetControlBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetControlPopupMenuHandle()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetControlPopupMenuHandle( control: ControlRef; popupMenu: MenuRef ); external name '_SetControlPopupMenuHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+procedure SetControlPopupMenuRef( control: ControlRef; popupMenu: MenuRef ); external name '_SetControlPopupMenuHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+{
+ * SetControlPopupMenuID()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetControlPopupMenuID( control: ControlRef; menuID: SInt16 ); external name '_SetControlPopupMenuID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{--------------------------------------------------------------------------------------}
+{ ¥ DEPRECATED }
+{ All functions below this point are either deprecated (they continue to function }
+{ but are not the most modern nor most efficient solution to a problem), or they are }
+{ completely unavailable on Mac OS X. }
+{--------------------------------------------------------------------------------------}
+
+{
+ * IdleControls() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Applications should remove calls to IdleControls. Custom control
+ * definitions should use Carbon event loop timers instead.
+ *
+ * Summary:
+ * Gives idle time to any controls that want the kControlMsgIdle
+ * message.
+ *
+ * Discussion:
+ * IdleControls gives idle processing time for controls that set the
+ * kControlWantsIdle feature bit. IdleControls is deprecated on Mac
+ * OS X. System-supplied controls do not respond to IdleControls
+ * being called on Mac OS X.
+ *
+ * Custom controls should use repeating Carbon event loop timers to
+ * perform tasks, such as animation, that previously used time given
+ * with IdleControls(). See InstallEventLoopTimer() in
+ * CarbonEventsCore.h for more information.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The WindowRef whose controls are offered idle time.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+procedure IdleControls( inWindow: WindowRef ); external name '_IdleControls';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+
+
+{unit Dictionary}
+{
+ File: Dictionary.p
+
+ Contains: Dictionary Manager Interfaces
+
+ Version: Technology: System 7
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1992-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN POWER}
+
+{
+=============================================================================================
+ Modern Dictionary Manager
+=============================================================================================
+}
+{
+ Dictionary information
+}
+
+const
+ kDictionaryFileType = $64696374 (* 'dict' *);
+ kDCMDictionaryHeaderSignature = $64696374 (* 'dict' *);
+ kDCMDictionaryHeaderVersion = 2;
+
+ kDCMAnyFieldTag = $2A2A2A2A (* '****' *);
+ kDCMAnyFieldType = $2A2A2A2A (* '****' *);
+
+ {
+ Contents of a Field Info Record (an AERecord)
+ }
+ keyDCMFieldTag = $66746167 (* 'ftag' *); { typeEnumeration }
+ keyDCMFieldType = $66747970 (* 'ftyp' *); { typeEnumeration }
+ keyDCMMaxRecordSize = $6D72737A (* 'mrsz' *); { typeMagnitude }
+ keyDCMFieldAttributes = $66617472 (* 'fatr' *);
+ keyDCMFieldDefaultData = $66646566 (* 'fdef' *);
+ keyDCMFieldName = $666E616D (* 'fnam' *); { typeChar }
+ keyDCMFieldFindMethods = $66666E64 (* 'ffnd' *); { typeAEList of typeDCMFindMethod }
+
+ {
+ Special types for fields of a Field Info Record
+ }
+ typeDCMFieldAttributes = $66617472 (* 'fatr' *);
+ typeDCMFindMethod = $666D7468 (* 'fmth' *);
+
+
+ {
+ Field attributes
+ }
+ kDCMIndexedFieldMask = $00000001;
+ kDCMRequiredFieldMask = $00000002;
+ kDCMIdentifyFieldMask = $00000004;
+ kDCMFixedSizeFieldMask = $00000008;
+ kDCMHiddenFieldMask = $80000000;
+
+
+type
+ DCMFieldAttributes = OptionBits;
+ {
+ Standard dictionary properties
+ }
+
+const
+ pDCMAccessMethod = $616D7464 (* 'amtd' *); { data type: typeChar ReadOnly }
+ pDCMPermission = $7065726D (* 'perm' *); { data type: typeUInt16 }
+ pDCMListing = $6C697374 (* 'list' *); { data type: typeUInt16 }
+ pDCMMaintenance = $6D746E63 (* 'mtnc' *); { data type: typeUInt16 }
+ pDCMLocale = $6C6F636C (* 'locl' *); { data type: typeUInt32. Optional; default = kLocaleIdentifierWildCard }
+ pDCMClass = $70636C73 (* 'pcls' *); { data type: typeUInt16 }
+ pDCMCopyright = $696E666F (* 'info' *); { data type: typeChar }
+
+ {
+ pDCMPermission property constants
+ }
+ kDCMReadOnlyDictionary = 0;
+ kDCMReadWriteDictionary = 1;
+
+ {
+ pDCMListing property constants
+ }
+ kDCMAllowListing = 0;
+ kDCMProhibitListing = 1;
+
+ {
+ pDCMClass property constants
+ }
+ kDCMUserDictionaryClass = 0;
+ kDCMSpecificDictionaryClass = 1;
+ kDCMBasicDictionaryClass = 2;
+
+ {
+ Standard search method
+ }
+ kDCMFindMethodExactMatch = $3D202020 (* '= ' *);
+ kDCMFindMethodBeginningMatch = $62677774 (* 'bgwt' *);
+ kDCMFindMethodContainsMatch = $636F6E74 (* 'cont' *);
+ kDCMFindMethodEndingMatch = $656E6473 (* 'ends' *);
+ kDCMFindMethodForwardTrie = $66747269 (* 'ftri' *); { used for morphological analysis }
+ kDCMFindMethodBackwardTrie = $62747269 (* 'btri' *); { used for morphological analysis }
+
+
+type
+ DCMFindMethod = OSType;
+ {
+ AccessMethod features
+ }
+
+const
+ kDCMCanUseFileDictionaryMask = $00000001;
+ kDCMCanUseMemoryDictionaryMask = $00000002;
+ kDCMCanStreamDictionaryMask = $00000004;
+ kDCMCanHaveMultipleIndexMask = $00000008;
+ kDCMCanModifyDictionaryMask = $00000010;
+ kDCMCanCreateDictionaryMask = $00000020;
+ kDCMCanAddDictionaryFieldMask = $00000040;
+ kDCMCanUseTransactionMask = $00000080;
+
+
+type
+ DCMAccessMethodFeature = OptionBits;
+ DCMUniqueID = UInt32;
+ DCMObjectID = ^SInt32; { an opaque 32-bit type }
+ DCMObjectIDPtr = ^DCMObjectID; { when a var xx:DCMObjectID parameter can be nil, it is changed to xx: DCMObjectIDPtr }
+ DCMAccessMethodID = DCMObjectID;
+ DCMDictionaryID = DCMObjectID;
+ DCMObjectRef = ^SInt32; { an opaque 32-bit type }
+ DCMObjectRefPtr = ^DCMObjectRef; { when a var xx:DCMObjectRef parameter can be nil, it is changed to xx: DCMObjectRefPtr }
+ DCMDictionaryRef = DCMObjectRef;
+ DCMDictionaryStreamRef = DCMObjectRef;
+ DCMObjectIterator = ^SInt32; { an opaque 32-bit type }
+ DCMObjectIteratorPtr = ^DCMObjectIterator; { when a var xx:DCMObjectIterator parameter can be nil, it is changed to xx: DCMObjectIteratorPtr }
+ DCMAccessMethodIterator = DCMObjectIterator;
+ DCMDictionaryIterator = DCMObjectIterator;
+ DCMFoundRecordIterator = ^SInt32; { an opaque 32-bit type }
+ DCMFoundRecordIteratorPtr = ^DCMFoundRecordIterator; { when a var xx:DCMFoundRecordIterator parameter can be nil, it is changed to xx: DCMFoundRecordIteratorPtr }
+ {
+ Field specification declarations
+ }
+ DCMFieldTag = DescType;
+ DCMFieldTagPtr = ^DCMFieldTag;
+ DCMFieldType = DescType;
+ {
+ Dictionary header information
+ }
+ DCMDictionaryHeaderPtr = ^DCMDictionaryHeader;
+ DCMDictionaryHeader = record
+ headerSignature: FourCharCode;
+ headerVersion: UInt32;
+ headerSize: ByteCount;
+ accessMethod: Str63;
+ end;
+
+ {
+ Callback routines
+ }
+{$ifc TYPED_FUNCTION_POINTERS}
+ DCMProgressFilterProcPtr = function(determinateProcess: boolean; percentageComplete: UInt16; callbackUD: UInt32): boolean;
+{$elsec}
+ DCMProgressFilterProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ DCMProgressFilterUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DCMProgressFilterUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppDCMProgressFilterProcInfo = $00000E50;
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * NewDCMProgressFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewDCMProgressFilterUPP(userRoutine: DCMProgressFilterProcPtr): DCMProgressFilterUPP; external name '_NewDCMProgressFilterUPP'; { old name was NewDCMProgressFilterProc }
+{
+ * DisposeDCMProgressFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposeDCMProgressFilterUPP(userUPP: DCMProgressFilterUPP); external name '_DisposeDCMProgressFilterUPP';
+{
+ * InvokeDCMProgressFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InvokeDCMProgressFilterUPP(determinateProcess: boolean; percentageComplete: UInt16; callbackUD: UInt32; userRoutine: DCMProgressFilterUPP): boolean; external name '_InvokeDCMProgressFilterUPP'; { old name was CallDCMProgressFilterProc }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ Library version
+}
+{
+ * DCMLibraryVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMLibraryVersion: UInt32; external name '_DCMLibraryVersion';
+
+{
+ Create/delete dictionary
+}
+{
+ * DCMNewDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMNewDictionary(accessMethodID: DCMAccessMethodID; const (*var*) newDictionaryFile: FSSpec; scriptTag: ScriptCode; const (*var*) listOfFieldInfoRecords: AEDesc; invisible: boolean; recordCapacity: ItemCount; var newDictionary: DCMDictionaryID): OSStatus; external name '_DCMNewDictionary';
+
+{
+ * DCMDeriveNewDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMDeriveNewDictionary(srcDictionary: DCMDictionaryID; const (*var*) newDictionaryFile: FSSpec; scriptTag: ScriptCode; invisible: boolean; recordCapacity: ItemCount; var newDictionary: DCMDictionaryID): OSStatus; external name '_DCMDeriveNewDictionary';
+
+{
+ * DCMDeleteDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMDeleteDictionary(dictionaryID: DCMDictionaryID): OSStatus; external name '_DCMDeleteDictionary';
+
+{
+ Register dictionary
+}
+{
+ * DCMRegisterDictionaryFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMRegisterDictionaryFile(const (*var*) dictionaryFile: FSSpec; var dictionaryID: DCMDictionaryID): OSStatus; external name '_DCMRegisterDictionaryFile';
+
+{
+ * DCMUnregisterDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMUnregisterDictionary(dictionaryID: DCMDictionaryID): OSStatus; external name '_DCMUnregisterDictionary';
+
+{
+ Open dictionary
+}
+{
+ * DCMOpenDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMOpenDictionary(dictionaryID: DCMDictionaryID; protectKeySize: ByteCount; protectKey: ConstLogicalAddress; var dictionaryRef: DCMDictionaryRef): OSStatus; external name '_DCMOpenDictionary';
+
+{
+ * DCMCloseDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMCloseDictionary(dictionaryRef: DCMDictionaryRef): OSStatus; external name '_DCMCloseDictionary';
+
+{
+ Change access privilege
+}
+{
+ * DCMGetDictionaryWriteAccess()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetDictionaryWriteAccess(dictionaryRef: DCMDictionaryRef; timeOutDuration: Duration): OSStatus; external name '_DCMGetDictionaryWriteAccess';
+
+{
+ * DCMReleaseDictionaryWriteAccess()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMReleaseDictionaryWriteAccess(dictionaryRef: DCMDictionaryRef; commitTransaction: boolean): OSStatus; external name '_DCMReleaseDictionaryWriteAccess';
+
+{
+ Find records
+}
+{
+ * DCMFindRecords()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMFindRecords(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; findMethod: DCMFindMethod; preFetchedDataNum: ItemCount; preFetchedData: DCMFieldTagPtr; skipCount: ItemCount; maxRecordCount: ItemCount; var recordIterator: DCMFoundRecordIterator): OSStatus; external name '_DCMFindRecords';
+
+{
+ * DCMCountRecordIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMCountRecordIterator(recordIterator: DCMFoundRecordIterator): ItemCount; external name '_DCMCountRecordIterator';
+
+{
+ * DCMIterateFoundRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMIterateFoundRecord(recordIterator: DCMFoundRecordIterator; maxKeySize: ByteCount; var actualKeySize: ByteCount; keyData: LogicalAddress; var uniqueID: DCMUniqueID; var dataList: AEDesc): OSStatus; external name '_DCMIterateFoundRecord';
+
+{
+ * DCMDisposeRecordIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMDisposeRecordIterator(recordIterator: DCMFoundRecordIterator): OSStatus; external name '_DCMDisposeRecordIterator';
+
+{
+ Dump dictionary
+}
+{
+ * DCMCountRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMCountRecord(dictionaryID: DCMDictionaryID; var count: ItemCount): OSStatus; external name '_DCMCountRecord';
+
+{
+ * DCMGetRecordSequenceNumber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetRecordSequenceNumber(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID; var sequenceNum: ItemCount): OSStatus; external name '_DCMGetRecordSequenceNumber';
+
+{
+ * DCMGetNthRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetNthRecord(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; serialNum: ItemCount; maxKeySize: ByteCount; var keySize: ByteCount; keyData: LogicalAddress; var uniqueID: DCMUniqueID): OSStatus; external name '_DCMGetNthRecord';
+
+{
+ * DCMGetNextRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetNextRecord(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID; maxKeySize: ByteCount; var nextKeySize: ByteCount; nextKeyData: LogicalAddress; var nextUniqueID: DCMUniqueID): OSStatus; external name '_DCMGetNextRecord';
+
+{
+ * DCMGetPrevRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetPrevRecord(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID; maxKeySize: ByteCount; var prevKeySize: ByteCount; prevKeyData: LogicalAddress; var prevUniqueID: DCMUniqueID): OSStatus; external name '_DCMGetPrevRecord';
+
+{
+ Get field data
+}
+{
+ * DCMGetFieldData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetFieldData(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID; numOfData: ItemCount; dataTag: DCMFieldTagPtr; var dataList: AEDesc): OSStatus; external name '_DCMGetFieldData';
+
+{
+ * DCMSetFieldData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMSetFieldData(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID; const (*var*) dataList: AEDesc): OSStatus; external name '_DCMSetFieldData';
+
+{
+ Add record
+}
+{
+ * DCMAddRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMAddRecord(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; checkOnly: boolean; const (*var*) dataList: AEDesc; var newUniqueID: DCMUniqueID): OSStatus; external name '_DCMAddRecord';
+
+{
+ * DCMDeleteRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMDeleteRecord(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID): OSStatus; external name '_DCMDeleteRecord';
+
+{
+ Reorganize/compact dictionary
+}
+{
+ * DCMReorganizeDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMReorganizeDictionary(dictionaryID: DCMDictionaryID; extraCapacity: ItemCount; progressProc: DCMProgressFilterUPP; userData: UInt32): OSStatus; external name '_DCMReorganizeDictionary';
+
+{
+ * DCMCompactDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMCompactDictionary(dictionaryID: DCMDictionaryID; progressProc: DCMProgressFilterUPP; userData: UInt32): OSStatus; external name '_DCMCompactDictionary';
+
+{
+ DictionaryID utilities
+}
+{
+ * DCMGetFileFromDictionaryID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetFileFromDictionaryID(dictionaryID: DCMDictionaryID; var fileRef: FSSpec): OSStatus; external name '_DCMGetFileFromDictionaryID';
+
+{
+ * DCMGetDictionaryIDFromFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetDictionaryIDFromFile(const (*var*) fileRef: FSSpec; var dictionaryID: DCMDictionaryID): OSStatus; external name '_DCMGetDictionaryIDFromFile';
+
+{
+ * DCMGetDictionaryIDFromRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetDictionaryIDFromRef(dictionaryRef: DCMDictionaryRef): DCMDictionaryID; external name '_DCMGetDictionaryIDFromRef';
+
+{
+ Field information and manipulation
+}
+{
+ * DCMGetDictionaryFieldInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetDictionaryFieldInfo(dictionaryID: DCMDictionaryID; fieldTag: DCMFieldTag; var fieldInfoRecord: AEDesc): OSStatus; external name '_DCMGetDictionaryFieldInfo';
+
+{
+ Dictionary property
+}
+{
+ * DCMGetDictionaryProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetDictionaryProperty(dictionaryID: DCMDictionaryID; propertyTag: DCMFieldTag; maxPropertySize: ByteCount; var actualSize: ByteCount; propertyValue: LogicalAddress): OSStatus; external name '_DCMGetDictionaryProperty';
+
+{
+ * DCMSetDictionaryProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMSetDictionaryProperty(dictionaryID: DCMDictionaryID; propertyTag: DCMFieldTag; propertySize: ByteCount; propertyValue: ConstLogicalAddress): OSStatus; external name '_DCMSetDictionaryProperty';
+
+{
+ * DCMGetDictionaryPropertyList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetDictionaryPropertyList(dictionaryID: DCMDictionaryID; maxPropertyNum: ItemCount; var numProperties: ItemCount; propertyTag: DCMFieldTagPtr): OSStatus; external name '_DCMGetDictionaryPropertyList';
+
+{
+ Seaarch dictionary
+}
+{
+ * DCMCreateDictionaryIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMCreateDictionaryIterator(var dictionaryIterator: DCMDictionaryIterator): OSStatus; external name '_DCMCreateDictionaryIterator';
+
+{
+ Search AccessMethod
+}
+{
+ * DCMCreateAccessMethodIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMCreateAccessMethodIterator(var accessMethodIterator: DCMAccessMethodIterator): OSStatus; external name '_DCMCreateAccessMethodIterator';
+
+{
+ Iterator Operation
+}
+{
+ * DCMCountObjectIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMCountObjectIterator(iterator: DCMObjectIterator): ItemCount; external name '_DCMCountObjectIterator';
+
+{
+ * DCMIterateObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMIterateObject(iterator: DCMObjectIterator; var objectID: DCMObjectID): OSStatus; external name '_DCMIterateObject';
+
+{
+ * DCMResetObjectIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMResetObjectIterator(iterator: DCMObjectIterator): OSStatus; external name '_DCMResetObjectIterator';
+
+{
+ * DCMDisposeObjectIterator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMDisposeObjectIterator(iterator: DCMObjectIterator): OSStatus; external name '_DCMDisposeObjectIterator';
+
+{
+ Get AccessMethod information
+}
+{
+ * DCMGetAccessMethodIDFromName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetAccessMethodIDFromName(const (*var*) accessMethodName: Str63; var accessMethodID: DCMAccessMethodID): OSStatus; external name '_DCMGetAccessMethodIDFromName';
+
+{
+ Field Info Record routines
+}
+{
+ * DCMCreateFieldInfoRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMCreateFieldInfoRecord(fieldTag: DescType; fieldType: DescType; maxRecordSize: ByteCount; fieldAttributes: DCMFieldAttributes; var fieldDefaultData: AEDesc; numberOfFindMethods: ItemCount; var findMethods: DCMFindMethod; var fieldInfoRecord: AEDesc): OSStatus; external name '_DCMCreateFieldInfoRecord';
+
+{
+ * DCMGetFieldTagAndType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetFieldTagAndType(const (*var*) fieldInfoRecord: AEDesc; var fieldTag: DCMFieldTag; var fieldType: DCMFieldType): OSStatus; external name '_DCMGetFieldTagAndType';
+
+{
+ * DCMGetFieldMaxRecordSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetFieldMaxRecordSize(const (*var*) fieldInfoRecord: AEDesc; var maxRecordSize: ByteCount): OSStatus; external name '_DCMGetFieldMaxRecordSize';
+
+{
+ * DCMGetFieldAttributes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetFieldAttributes(const (*var*) fieldInfoRecord: AEDesc; var attributes: DCMFieldAttributes): OSStatus; external name '_DCMGetFieldAttributes';
+
+{
+ * DCMGetFieldDefaultData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetFieldDefaultData(const (*var*) fieldInfoRecord: AEDesc; desiredType: DescType; var fieldDefaultData: AEDesc): OSStatus; external name '_DCMGetFieldDefaultData';
+
+{
+ * DCMGetFieldFindMethods()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DictionaryMgrLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DCMGetFieldFindMethods(const (*var*) fieldInfoRecord: AEDesc; findMethodsArrayMaxSize: ItemCount; var findMethods: DCMFindMethod; var actualNumberOfFindMethods: ItemCount): OSStatus; external name '_DCMGetFieldFindMethods';
+
+{
+ Check Dictionary Manager availability
+}
+{$ifc TARGET_RT_MAC_CFM}
+{
+ DCMDictionaryManagerAvailable() is a macro available only in C/C++.
+ To get the same functionality from pascal or assembly, you need
+ to test if Dictionary Manager functions are not NULL.
+ For instance:
+
+ IF @DCMLibraryVersion <> kUnresolvedCFragSymbolAddress THEN
+ gDictionaryManagerAvailable = TRUE;
+ ELSE
+ gDictionaryManagerAvailable = FALSE;
+ end
+
+}
+{$elsec}
+ {$ifc TARGET_RT_MAC_MACHO}
+{ Dictionary Manager is always available on OS X }
+ {$endc}
+{$endc}
+
+{
+=============================================================================================
+ Definitions for Japanese Analysis Module
+=============================================================================================
+}
+{
+ Default dictionary access method for Japanese analysis
+}
+{
+ Data length limitations of Apple Japanese dictionaries
+}
+
+const
+ kMaxYomiLengthInAppleJapaneseDictionary = 40;
+ kMaxKanjiLengthInAppleJapaneseDictionary = 64;
+
+ {
+ Defined field tags of Apple Japanese dictionary
+ }
+ kDCMJapaneseYomiTag = $796F6D69 (* 'yomi' *);
+ kDCMJapaneseHyokiTag = $68796F6B (* 'hyok' *);
+ kDCMJapaneseHinshiTag = $68696E73 (* 'hins' *);
+ kDCMJapaneseWeightTag = $68696E64 (* 'hind' *);
+ kDCMJapanesePhoneticTag = $68746F6E (* 'hton' *);
+ kDCMJapaneseAccentTag = $61636E74 (* 'acnt' *);
+ kDCMJapaneseOnKunReadingTag = $4F6E4B6E (* 'OnKn' *);
+ kDCMJapaneseFukugouInfoTag = $66756B75 (* 'fuku' *);
+
+ kDCMJapaneseYomiType = $75747874 (* 'utxt' *);
+ kDCMJapaneseHyokiType = $75747874 (* 'utxt' *);
+ kDCMJapaneseHinshiType = $68696E73 (* 'hins' *);
+ kDCMJapaneseWeightType = $73686F72 (* 'shor' *);
+ kDCMJapanesePhoneticType = $75747874 (* 'utxt' *);
+ kDCMJapaneseAccentType = $62797465 (* 'byte' *);
+ kDCMJapaneseOnKunReadingType = $75747874 (* 'utxt' *);
+ kDCMJapaneseFukugouInfoType = $66756B75 (* 'fuku' *);
+
+
+ {
+ =============================================================================================
+ System 7 Dictionary Manager
+ =============================================================================================
+ }
+{$ALIGN MAC68K}
+ { Dictionary data insertion modes }
+ kInsert = 0; { Only insert the input entry if there is nothing in the dictionary that matches the key. }
+ kReplace = 1; { Only replace the entries which match the key with the input entry. }
+ kInsertOrReplace = 2; { Insert the entry if there is nothing in the dictionary which matches the key, otherwise replaces the existing matched entries with the input entry. }
+
+ { This Was InsertMode }
+
+type
+ DictionaryDataInsertMode = SInt16;
+
+const
+ { Key attribute constants }
+ kIsCaseSensitive = $10; { case sensitive = 16 }
+ kIsNotDiacriticalSensitive = $20; { diac not sensitive = 32 }
+
+ { Registered attribute type constants. }
+ kNoun = -1;
+ kVerb = -2;
+ kAdjective = -3;
+ kAdverb = -4;
+
+ { This Was AttributeType }
+
+type
+ DictionaryEntryAttribute = SInt8;
+ { Dictionary information record }
+ DictionaryInformationPtr = ^DictionaryInformation;
+ DictionaryInformation = record
+ dictionaryFSSpec: FSSpec;
+ numberOfRecords: SInt32;
+ currentGarbageSize: SInt32;
+ script: ScriptCode;
+ maximumKeyLength: SInt16;
+ keyAttributes: SInt8;
+ end;
+
+ DictionaryAttributeTablePtr = ^DictionaryAttributeTable;
+ DictionaryAttributeTable = packed record
+ datSize: UInt8;
+ datTable: array [0..0] of DictionaryEntryAttribute;
+ end;
+
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * InitializeDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InitializeDictionary(const (*var*) theFsspecPtr: FSSpec; maximumKeyLength: SInt16; keyAttributes: SInt8; script: ScriptCode): OSErr; external name '_InitializeDictionary';
+{
+ * OpenDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function OpenDictionary(const (*var*) theFsspecPtr: FSSpec; accessPermission: SInt8; var dictionaryReference: SInt32): OSErr; external name '_OpenDictionary';
+{
+ * CloseDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CloseDictionary(dictionaryReference: SInt32): OSErr; external name '_CloseDictionary';
+{
+ * InsertRecordToDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InsertRecordToDictionary(dictionaryReference: SInt32; const (*var*) key: Str255; recordDataHandle: Handle; whichMode: DictionaryDataInsertMode): OSErr; external name '_InsertRecordToDictionary';
+{
+ * DeleteRecordFromDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DeleteRecordFromDictionary(dictionaryReference: SInt32; const (*var*) key: Str255): OSErr; external name '_DeleteRecordFromDictionary';
+{
+ * FindRecordInDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function FindRecordInDictionary(dictionaryReference: SInt32; const (*var*) key: Str255; requestedAttributeTablePointer: DictionaryAttributeTablePtr; recordDataHandle: Handle): OSErr; external name '_FindRecordInDictionary';
+{
+ * FindRecordByIndexInDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function FindRecordByIndexInDictionary(dictionaryReference: SInt32; recordIndex: SInt32; requestedAttributeTablePointer: DictionaryAttributeTablePtr; var recordKey: Str255; recordDataHandle: Handle): OSErr; external name '_FindRecordByIndexInDictionary';
+{
+ * GetDictionaryInformation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetDictionaryInformation(dictionaryReference: SInt32; var theDictionaryInformation: DictionaryInformation): OSErr; external name '_GetDictionaryInformation';
+{
+ * CompactDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CompactDictionary(dictionaryReference: SInt32): OSErr; external name '_CompactDictionary';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ALIGN MAC68K}
+
+
+{unit FontPanel}
+{
+ File: CommonPanels/FontPanel.h
+
+ Contains: Carbon Font Panel package Interfaces.
+
+ Version: CommonPanels-73~983
+
+ Copyright: © 2002-2005 by Apple Computer, Inc., all rights reserved
+
+}
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Font Panel-Related Events
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+
+{
+ * Discussion:
+ * Event classes
+ }
+const
+{
+ * Events related to font selection or handling.
+ }
+ kEventClassFont = $666F6E74 (* 'font' *);
+
+
+{
+ * Summary:
+ * Common command IDs
+ }
+const
+{
+ * The state of the Font Panel should be toggled, displaying it or
+ * hiding it as necessary. If the user closes the Font Panel directly
+ * from the window, the application will receive a
+ * kEventFontPanelClosed event.
+ }
+ kHICommandShowHideFontPanel = $73686670 (* 'shfp' *);
+
+{ Font Events }
+
+{
+ * Summary:
+ * Font events (kEventClassFont)
+ *
+ * Discussion:
+ * When the user closes the Font Panel, a kEventWindowClosed event
+ * will be detected by the Carbon event handler installed by the
+ * system. The system then notifies the application that the Font
+ * Panel has closed by posting a Carbon Event Manager event. This
+ * allows the application to update any menu items or other controls
+ * whose state may have to change because the Font Panel has closed.
+ * kEventWindowClosed has no parameters. When the user selects an
+ * item in the Font Panel, the system will send a
+ * kEventFontSelection event to the event target specified when the
+ * application called SetFontPanelInfo(). kEventFontSelection will
+ * contain parameters reflecting the current Font Panel selection in
+ * all supported formats. Font events are available after Mac OS X
+ * 10.2 in the Carbon framework.
+ }
+const
+{
+ * The Font Panel has been closed. The application should update its
+ * corresponding UI element (e.g., a menu item) accordingly.
+ }
+ kEventFontPanelClosed = 1;
+
+ {
+ * The user has specified font settings in the Font Panel. The
+ * application can obtain these settings from the event, in which
+ * they are stored as parameters. Not all parameters are guaranteed
+ * to be present; the application should check for all those which it
+ * recognizes and apply the ones found as appropriate to the target
+ * text.
+ }
+ kEventFontSelection = 2;
+
+{
+ Parameters for font events:
+
+ kEventFontPanelClosed
+ None.
+
+ kEventFontSelection
+ --> kEventParamATSUFontID typeATSUFontID
+ --> kEventParamATSUFontSize typeATSUSize
+ --> kEventParamFMFontFamily typeFMFontFamily
+ --> kEventParamFMFontSize typeFMFontSize
+ --> kEventParamFontColor typeFontColor
+ --> kEventParamDictionary typeCFDictionary
+}
+const
+ typeATSUFontID = typeUInt32; { ATSUI font ID.}
+ typeATSUSize = typeFixed; { ATSUI font size.}
+ typeFMFontFamily = typeSInt16; { Font family reference.}
+ typeFMFontStyle = typeSInt16; { Quickdraw font style}
+ typeFMFontSize = typeSInt16; { Integer font size.}
+ typeFontColor = typeRGBColor; { Font color spec (optional).}
+ kEventParamATSUFontID = $61756964 (* 'auid' *); { typeATSUFontID}
+ kEventParamATSUFontSize = $6175737A (* 'ausz' *); { typeATSUSize}
+ kEventParamFMFontFamily = $666D666D (* 'fmfm' *); { typeFMFontFamily}
+ kEventParamFMFontStyle = $666D7374 (* 'fmst' *); { typeFMFontStyle}
+ kEventParamFMFontSize = $666D737A (* 'fmsz' *); { typeFMFontSize}
+ kEventParamFontColor = $66636C72 (* 'fclr' *); { typeFontColor}
+ kEventParamDictionary = $64696374 (* 'dict' *); { typeCFDictionaryRef}
+
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Key constants to be used to access data inside the dictionary that may
+ be contained in the kEventFontSelection dictionary.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+{
+ * kFontPanelATSUFontIDKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kFontPanelATSUFontIDKey: CFStringRef; external name '_kFontPanelATSUFontIDKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{Value is a CFNumber containing the ATSU Font ID}
+{
+ * kFontPanelVariationAxesKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kFontPanelVariationAxesKey: CFStringRef; external name '_kFontPanelVariationAxesKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{ Value is a CFDataRef containing one or more ATSUI Variation Axes}
+{
+ * kFontPanelVariationValuesKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kFontPanelVariationValuesKey: CFStringRef; external name '_kFontPanelVariationValuesKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{Value is a CFDataRef containing one or more ATSU Variation values}
+{
+ * kFontPanelFeatureTypesKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kFontPanelFeatureTypesKey: CFStringRef; external name '_kFontPanelFeatureTypesKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{ Value is a CFDataRef containing one or more ATSUI feature types}
+{
+ * kFontPanelFeatureSelectorsKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kFontPanelFeatureSelectorsKey: CFStringRef; external name '_kFontPanelFeatureSelectorsKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{ Value is a CFDataRef containing one or more ATSUI feature selectors}
+{
+ * kFontPanelAttributesKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kFontPanelAttributesKey: CFStringRef; external name '_kFontPanelAttributesKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ const <CFString> string kFontPanelAttributesKey = "FontAttributes";
+ Value is a CFDictionaryRef containing three keyed values. Each value is
+ a CFDataRef. One CFDataRef contains one or more ATSUAttributeTags.
+ One CFDataRef contains one or more value sizes for each tag. And the last
+ CFDataRef contains the actual values. It is important to understand that
+ these are the actual values and not value ptrs. To pass these values to
+ ATSUI they must be converted into ptrs. The following code fragment demonstrates
+ one technique
+ CFDataRef values;
+ CFDataRef tags;
+ CFDataRef sizes;
+ if ( CFDictionaryGetValueIfPresent( attributesDict, kFontPanelAttributeValuesKey, &values ) &&
+ CFDictionaryGetValueIfPresent( attributesDict, kFontPanelAttributeTagsKey, &tags )
+ CFDictionaryGetValueIfPresent( attributesDict, kFontPanelAttributeSizesKey, &sizes ))
+ (
+ ItemCount count = CFDataGetLength( tags )/sizeof(ATSUAttributeTag);
+ CFIndex index;
+ ATSUAttributeValuePtr valuePtrs = malloc( count * sizeof(ATSUAttributeValuePtr) );
+ UInt32* sizePtr = (UInt32*)CFDataGetBytePtr(sizes);
+ UInt32* bytePtr = (UInt32*)CFDataGetBytePtr(values);
+ for ( index = 0; index < count; index++ )
+ (
+ valuePtrs[index] = bytePtr;
+ bytePtr = (UInt32*)( (UInt8*)bytePtr + sizePtr[index]);
+ )
+ verify_noerr( ATSUSetAttributes( someATSUStyle, count, (ATSUAttributeTag*)CFDataGetBytePtr(tags),sizePtr, valuePtrs ) );
+ free( valuePtrs );
+}
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Keys to access the CFDataRefs inside the attributes dictionary (see above)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+{
+ * kFontPanelAttributeTagsKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kFontPanelAttributeTagsKey: CFStringRef; external name '_kFontPanelAttributeTagsKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{Value is a CFDataRef containing one or more style attribute tags}
+{
+ * kFontPanelAttributeSizesKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kFontPanelAttributeSizesKey: CFStringRef; external name '_kFontPanelAttributeSizesKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{Value is a CFDataRef containing one or more style attribute sizes}
+{
+ * kFontPanelAttributeValuesKey
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kFontPanelAttributeValuesKey: CFStringRef; external name '_kFontPanelAttributeValuesKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{Value is a CFDataRef containing one or more style values}
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Other Font Panel Constants
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+{
+Error codes (Font Panel codes in range [-8880,-8899]).
+}
+const
+ fontPanelShowErr = -8880; { Can't display the Font Panel.}
+ fontPanelSelectionStyleErr = -8881; { Bad font selection style info.}
+ fontPanelFontSelectionQDStyleVersionErr = -8882; { Unsupported record version.}
+
+{
+Type of font information passed in SetFontPanelInfo(). If the client is
+sending ATSUI style data, it specifies kFontSelectionATSUIType; if it is
+sending Quickdraw style data, it specifies kFontSelectionQDType.
+}
+const
+ kFontSelectionATSUIType = $6173746C (* 'astl' *); { Use ATSUIStyle collection.}
+ kFontSelectionQDType = $7173746C (* 'qstl' *); { Use FontSelectionQDStyle record.}
+
+{
+Supported versions of the FontSelectionQDStyle record. Clients should always set
+the <version> field to one of these values.
+}
+const
+ kFontSelectionQDStyleVersionZero = 0;
+
+
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Font Panel Types
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+{
+Record specifying the font information to be specified in the Font
+Panel. This record is used if the client is sending Quickdraw style data
+(i.e., it specified kFontSelectionQDType in SetFontPanelInfo()).
+}
+type
+ FontSelectionQDStyle = record
+ version: UInt32; { Version number of struct.}
+ instance: FMFontFamilyInstance; { Font instance data.}
+ size: FMFontSize; { Size of font in points.}
+ hasColor: Boolean; { true if color info supplied.}
+ reserved: SInt8; { Filler byte.}
+ color: RGBColor; { Color specification for font.}
+ end;
+ FontSelectionQDStylePtr = ^FontSelectionQDStyle;
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Font Panel Functions
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+{
+ * FPIsFontPanelVisible()
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+function FPIsFontPanelVisible: Boolean; external name '_FPIsFontPanelVisible';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * FPShowHideFontPanel()
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+function FPShowHideFontPanel: OSStatus; external name '_FPShowHideFontPanel';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * SetFontInfoForSelection()
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+function SetFontInfoForSelection( iStyleType: OSType; iNumStyles: UInt32; iStyles: {variable-size-array} UnivPtr; iFPEventTarget: EventTargetRef ): OSStatus; external name '_SetFontInfoForSelection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Font Collection Functions
+
+ In 10.3 the ability to create and modify font collections is available. Font
+ collections are files containing font descriptions. Font descriptions are
+ encapsulated in the opaque object FCFontDescriptorRef. A FCFontDescriptroRef
+ is a CFType. To release one call CFRelease.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ Font Collection Types
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+type
+ FCFontDescriptorRef = ^SInt32; { an opaque 32-bit type }
+{
+ * FCCopyCollectionNames()
+ *
+ * Discussion:
+ * FCCopyCollectionNames returns a copy of the CFArrayRef containing
+ * the displayable names of every font collection available to the
+ * current user.
+ *
+ * Result:
+ * A CFArrayRef containing CFStringRefs where each CFStringRef
+ * contains a font collection's displayable name. Callers are
+ * responsible for releasing the returned CFArrayRef. If the
+ * operation is not successful NULL is returned.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function FCCopyCollectionNames: CFArrayRef; external name '_FCCopyCollectionNames';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * FCCopyFontDescriptorsInCollection()
+ *
+ * Discussion:
+ * FCCopyFontDescriptorsInCollection copies the fontDescriptors in a
+ * named collection into an array.
+ *
+ * Parameters:
+ *
+ * iCollection:
+ * The name of a collection that descriptors should be copied from.
+ *
+ * Result:
+ * A CFArrayRef containing copies of the FCFontDescriptorRefs
+ * contained in the name collection. Callers are responsible for
+ * releasing the returned CFArrayRef. The FCFontDescriptorRefs are
+ * retained when added to the array and released when the array is
+ * destroyed. You can access a font descriptor in the array in the
+ * following manner: fd =
+ * (FCFontDescriptorRef)CFArrayGetValueAtIndex(array, i);
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function FCCopyFontDescriptorsInCollection( iCollection: CFStringRef ): CFArrayRef; external name '_FCCopyFontDescriptorsInCollection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * FCAddCollection()
+ *
+ * Discussion:
+ * Add a collection to the font descriptor collections available to
+ * the current user. If the collection is successfully added noErr
+ * is returned. If the collection is not added an error code is
+ * returned.
+ *
+ * Parameters:
+ *
+ * iCollection:
+ * the name of the collection to add.
+ *
+ * iCollectionOptions:
+ * currently there are no options. Set to kNilOptions. This
+ * parameter is available for future expansion.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function FCAddCollection( iCollection: CFStringRef; iCollectionOptions: OptionBits ): OSStatus; external name '_FCAddCollection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * FCRemoveCollection()
+ *
+ * Discussion:
+ * Remove a named collection from the font descriptor collections
+ * available to the current user. Returns noErr if the collection
+ * was successfully removed. An appropriate error code is returned
+ * if the operation was not successful.
+ *
+ * Parameters:
+ *
+ * iCollection:
+ * the name of the collection to remove.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function FCRemoveCollection( iCollection: CFStringRef ): OSStatus; external name '_FCRemoveCollection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * FCAddFontDescriptorToCollection()
+ *
+ * Discussion:
+ * Add a font descriptor to the named collection. noErr is returned
+ * if the font descriptor is added. An error code describing the
+ * failure is returned if the descriptor is not added.
+ *
+ * Parameters:
+ *
+ * iDescriptor:
+ * the font descriptor that should be added. The
+ * FCFontDescriptorRef is retained when it is added to the
+ * collection. After calling this function the caller may release
+ * their copy.
+ *
+ * iCollection:
+ * the name of the collection to which the font descriptor should
+ * be added.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function FCAddFontDescriptorToCollection( iDescriptor: FCFontDescriptorRef; iCollection: CFStringRef ): OSStatus; external name '_FCAddFontDescriptorToCollection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * FCRemoveFontDescriptorFromCollection()
+ *
+ * Discussion:
+ * Remove a font descriptor from the named collection. An error is
+ * returned if the font descriptor can not be removed. noErr is
+ * returned if the descriptor is removed.
+ *
+ * Parameters:
+ *
+ * iDescriptor:
+ * the descriptor that should be removed.
+ *
+ * iCollection:
+ * the name of the collection that the descriptor should be
+ * removed from.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function FCRemoveFontDescriptorFromCollection( iDescriptor: FCFontDescriptorRef; iCollection: CFStringRef ): OSStatus; external name '_FCRemoveFontDescriptorFromCollection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Font Descriptor Attribute Keys
+
+ Font Descriptors contain font attributes that are set and accessed via a set of
+ keys. The keys are all constant CFStringRefs.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
+
+{
+ * kFCFontFamilyAttribute
+ *
+ * Discussion:
+ * The key for a CFStringRef that contains a font family name (e.g.
+ * Baskerville).
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kFCFontFamilyAttribute: CFStringRef; external name '_kFCFontFamilyAttribute'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ * kFCFontNameAttribute
+ *
+ * Discussion:
+ * The key for a CFStringRef containing a font name (e.g.
+ * Baskerville-Italic).
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kFCFontNameAttribute: CFStringRef; external name '_kFCFontNameAttribute'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ * kFCFontFaceAttribute
+ *
+ * Discussion:
+ * The key for a CFStringRef containing a face name (e.g. Italic).
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kFCFontFaceAttribute: CFStringRef; external name '_kFCFontFaceAttribute'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ * kFCFontSizeAttribute
+ *
+ * Discussion:
+ * The key for a CFNumber containg the font size (e.g. 12).
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kFCFontSizeAttribute: CFStringRef; external name '_kFCFontSizeAttribute'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ * kFCFontVisibleNameAttribute
+ *
+ * Discussion:
+ * The Key for a CFStringRef containing the name that should be used
+ * in a UI to describe the font.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kFCFontVisibleNameAttribute: CFStringRef; external name '_kFCFontVisibleNameAttribute'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ * kFCFontCGColorAttribute
+ *
+ * Discussion:
+ * The Key for a CGColorRef containing the fonts color.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kFCFontCGColorAttribute: CFStringRef; external name '_kFCFontCGColorAttribute'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+{
+ * FCFontDescriptorCreateWithFontAttributes()
+ *
+ * Discussion:
+ * Create a font descriptor using the attributes contained in the
+ * dictionary.
+ *
+ * Parameters:
+ *
+ * iAttributes:
+ * a dictionary containing one or more of the attributes described
+ * above.
+ *
+ * Result:
+ * A valid FCFontDescriptorRef. NULL if one cannot be created.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function FCFontDescriptorCreateWithFontAttributes( iAttributes: CFDictionaryRef ): FCFontDescriptorRef; external name '_FCFontDescriptorCreateWithFontAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * FCFontDescriptorCreateWithName()
+ *
+ * Discussion:
+ * Create a font descriptor using a fontname and font size.
+ *
+ * Parameters:
+ *
+ * iFontName:
+ * The name of the font (e.g. Baskerville-Italic).
+ *
+ * iSize:
+ * the size of the font. (e.g. 12.0).
+ *
+ * Result:
+ * A valid FCFontDescriptorRef. NULL if one cannot be created.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function FCFontDescriptorCreateWithName( iFontName: CFStringRef; iSize: Float32 ): FCFontDescriptorRef; external name '_FCFontDescriptorCreateWithName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+
+
+{unit HIToolbar}
+{
+ File: HIToolbox/HIToolbar.h
+
+ Contains: Toolbar and Toolbar Item API
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 2001-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ File: HIToolbar.p(.pas) }
+{ }
+{ Contains: CodeWarrior Pascal(GPC) translation of Apple's Mac OS X 10.2 introduced HIToolbar.h. }
+{ Translation compatible with make-gpc-interfaces.pl generated MWPInterfaces }
+{ is linkable with Mac OS X 10.2.x or higher CFM CarbonLib and the GPC translation is }
+{ linkable with Mac OS X 10.2.x or higher Mach-O Carbon.framework. For the 10.3 }
+{ available APIs, the CodeWarrior Pascal translation is only selectively linkable with }
+{ Mac OS X 10.3.x or higher CFM CarbonLib and the GPC translation is linkable with Mac }
+{ OS X 10.3.x or higher Mach-O Carbon.framework. }
+{ }
+{ Version: 1.1 }
+{ }
+{ Pascal Translation: Gale Paeper, <gpaeper@empirenet.com>, 2004 }
+{ }
+{ Copyright: Subject to the constraints of Apple's original rights, you're free to use this }
+{ translation as you deem fit. }
+{ }
+{ Bugs?: This is an AS IS translation with no express guarentees of any kind. }
+{ If you do find a bug, please help out the Macintosh Pascal programming community by }
+{ reporting your bug finding and possible fix to either personal e-mail to Gale Paeper }
+{ or a posting to the MacPascal mailing list. }
+{ }
+{
+ Change History (most recent first):
+
+ <4> 5/8/04 GRP Completed new additions from HIToolbar.h, version HIToolbox-145.33~1.
+ <3> ?/?/04 PNL Added most new additions from HIToolbar.h, version HIToolbox-145.33~1.
+ <2> 10/02/04 GRP Added support for GPC as well as CodeWarrior Pascal.
+ <1> 9/8/03 GRP First Pascal translation of HIToolbar.h, version HIToolbox-123.6~10.
+}
+
+{ Translation assisted by: }
+{This file was processed by Dan's Source Converter}
+{version 1.3 (this version modified by Ingemar Ragnemalm)}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+type
+ HIToolbarRef = HIObjectRef;
+type
+ HIToolbarItemRef = HIObjectRef;
+{----------------------------------------------------------------------------------}
+{ Config data keys used in HIToolbarSetItemsWithIdentifiers }
+{----------------------------------------------------------------------------------}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIToolbarIdentifierKey CFSTRP('identifier')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIToolbarDataKey CFSTRP('data')}
+{$endc}
+{----------------------------------------------------------------------------------}
+{ Standard Toolbox-provided item identifiers }
+{----------------------------------------------------------------------------------}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIToolbarSeparatorIdentifier CFSTRP('com.apple.hitoolbox.toolbar.separator')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIToolbarSpaceIdentifier CFSTRP('com.apple.hitoolbox.toolbar.space')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIToolbarFlexibleSpaceIdentifier CFSTRP('com.apple.hitoolbox.toolbar.flexiblespace')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIToolbarCustomizeIdentifier CFSTRP('com.apple.hitoolbox.toolbar.customize')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIToolbarPrintItemIdentifier CFSTRP('com.apple.hitoolbox.toolbar.print')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIToolbarFontsItemIdentifier CFSTRP('com.apple.hitoolbox.toolbar.fonts')}
+{$endc}
+
+
+{
+ * Summary:
+ * Toolbar Display Mode
+ }
+const
+{
+ * This indicates to use the default display mode. Currently, this is
+ * defined as being both icon and label, but could change in the
+ * future.
+ }
+ kHIToolbarDisplayModeDefault = 0;
+
+ {
+ * This indicates to display the image as well as the label of the
+ * toolbar items.
+ }
+ kHIToolbarDisplayModeIconAndLabel = 1;
+
+ {
+ * This indicates that only the image should be shown.
+ }
+ kHIToolbarDisplayModeIconOnly = 2;
+
+ {
+ * This indicates that only the label should be shown.
+ }
+ kHIToolbarDisplayModeLabelOnly = 3;
+
+type
+ HIToolbarDisplayMode = UInt32;
+
+{
+ * Summary:
+ * Toolbar Display Size
+ }
+const
+{
+ * This indicates to use the default display size. Currently, this is
+ * defined as using 32 x 32 icons ("normal" size).
+ }
+ kHIToolbarDisplaySizeDefault = 0;
+
+ {
+ * This size uses a larger text and icon size.
+ }
+ kHIToolbarDisplaySizeNormal = 1;
+
+ {
+ * This size uses a smaller text and icon size.
+ }
+ kHIToolbarDisplaySizeSmall = 2;
+
+type
+ HIToolbarDisplaySize = UInt32;
+
+{
+ * Summary:
+ * Toolbar Attributes
+ }
+const
+{
+ * Pass this to indicate no attributes at all.
+ }
+ kHIToolbarNoAttributes = 0;
+
+ {
+ * Pass this attribute to allow the toolbar to save its configuration
+ * automatically to your application's preferences. You must make
+ * sure to synchronize the prefs at some point to ensure it gets
+ * written to disk. The toolbar will also read its config from the
+ * prefs if this attribute is set.
+ }
+ kHIToolbarAutoSavesConfig = 1 shl 0;
+
+ {
+ * This attribute indicates that the toolbar is configurable, i.e.
+ * the user can drag items around and bring up the configuration
+ * palette, etc.
+ }
+ kHIToolbarIsConfigurable = 1 shl 1;
+ kHIToolbarValidAttrs = kHIToolbarAutoSavesConfig or kHIToolbarIsConfigurable;
+
+
+{
+ * Summary:
+ * Toolbar Commands
+ }
+const
+{
+ * Sending this to a window with a toolbar will cause the
+ * configuration sheet to appear. You can set a menu item's command
+ * to this command ID and it will be handled and updated
+ * automatically for you.
+ }
+ kHICommandCustomizeToolbar = $74636667 (* 'tcfg' *);
+
+ {
+ * This command causes a window's toolbar to be shown. You can set a
+ * menu item's command to this ID and it will be handled and updated
+ * automatically for you.
+ }
+ kHICommandShowToolbar = $74627368 (* 'tbsh' *);
+
+ {
+ * This command causes a window's toolbar to be hidden. You can set a
+ * menu item's command to this ID and it will be handled and updated
+ * automatically for you.
+ }
+ kHICommandHideToolbar = $74626864 (* 'tbhd' *);
+
+ {
+ * This command, when specified as a toolbar itemÕs command ID, will
+ * cause a kEventToolbarItemPerformAction event to be generated when
+ * the toolbar itemÕs menu item in the toolbar overflow menu is
+ * selected. If the item has any other command ID, a
+ * kEventCommandProcess event will be generated instead, containing
+ * the itemÕs command ID.
+ }
+ kHIToolbarCommandPressAction = $74627072 (* 'tbpr' *);
+
+
+{
+ kEventClassToolbar quick reference:
+
+ kEventToolbarGetDefaultIdentifiers = 1,
+ kEventToolbarGetAllowedIdentifiers = 2,
+ kEventToolbarCreateItemWithIdentifier = 3,
+ kEventToolbarCreateItemFromDrag = 4,
+ kEventToolbarItemAdded = 5,
+ kEventToolbarItemRemoved = 6,
+ kEventToolbarDisplayModeChanged = 7,
+ kEventToolbarDisplaySizeChanged = 8,
+ kEventToolbarLayoutChanged = 9,
+ kEventToolbarGetSelectableIdentifiers = 10,
+ kEventToolbarBeginMultiChange = 12,
+ kEventToolbarEndMultiChange = 13
+}
+{ Toolbar event parameters and types}
+const
+ kEventParamToolbar = $74626172 (* 'tbar' *); { typeHIToolbarRef}
+ kEventParamToolbarItem = $74626974 (* 'tbit' *); { typeHIToolbarItemRef}
+ kEventParamToolbarItemIdentifier = $74626969 (* 'tbii' *); { typeCFStringRef}
+ kEventParamToolbarItemConfigData = $74626964 (* 'tbid' *); { typeCFTypeRef}
+ typeHIToolbarRef = $74626172 (* 'tbar' *); { HIToolbarRef}
+ typeHIToolbarItemRef = $74626974 (* 'tbit' *); { HIToolbarItemRef}
+
+{
+ * kEventClassToolbar / kEventToolbarGetDefaultIdentifiers
+ *
+ * Summary:
+ * This event is sent to the delegate to get a list of all of the
+ * default item identifiers that should be created for a toolbar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamToolbar (in, typeHIToolbarRef)
+ * The toolbar for which to retrieve identifiers.
+ *
+ * --> kEventParamMutableArray (in, typeCFMutableArrayRef)
+ * A mutable array to fill in with the identifiers.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarGetDefaultIdentifiers = 1;
+
+{
+ * kEventClassToolbar / kEventToolbarGetAllowedIdentifiers
+ *
+ * Summary:
+ * This event is sent to the delegate to get a list of all the items
+ * which could possibly be added to the toolbar. This is sent out
+ * when the configuration sheet is about to be displayed. You are
+ * passed a mutable array to fill in with the identifiers.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamToolbar (in, typeHIToolbarRef)
+ * The toolbar for which to retrieve identifiers.
+ *
+ * --> kEventParamMutableArray (in, typeCFMutableArrayRef)
+ * A mutable array to fill in with the identifiers.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarGetAllowedIdentifiers = 2;
+
+{
+ * kEventClassToolbar / kEventToolbarGetSelectableIdentifiers
+ *
+ * Summary:
+ * This event is sent to the delegate to get a list of all the items
+ * which can acquire a selection highlight when clicked. This is
+ * sent out after a toolbar item is clicked by the user. You are
+ * passed a mutable array to fill in with the identifiers. If you
+ * pass back a non-empty array, and the clicked item's identifier
+ * matches one of the identifiers that is in the list, then the
+ * toolbar will automatically draw that item with a selected
+ * highlight, and unhighlight the previously selected item. Note
+ * that the selection will only change in the clicked window; it
+ * will not change in other windows that share the same toolbar. To
+ * share the selection across all windows that use the same toolbar,
+ * you will need to manually change the kHIToolbarItemSelected
+ * attribute for the clicked item using
+ * HIToolbarItemChangeAttributes; in this case, you should not
+ * handle the kEventToolbarGetSelectableIdentifiers event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamToolbar (in, typeHIToolbarRef)
+ * The toolbar for which to retrieve identifiers.
+ *
+ * --> kEventParamMutableArray (in, typeCFMutableArrayRef)
+ * A mutable array to fill in with the identifiers.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarGetSelectableIdentifiers = 10;
+
+{
+ * kEventClassToolbar / kEventToolbarCreateItemWithIdentifier
+ *
+ * Summary:
+ * This event is sent to the delegate when we need to create an item
+ * from an identifier.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamToolbar (in, typeHIToolbarRef)
+ * The toolbar for which to create an item.
+ *
+ * --> kEventParamToolbarItemIdentifier (in, typeCFStringRef)
+ * The toolbar item identifier.
+ *
+ * --> kEventParamToolbarItemConfigData (in, typeCFTypeRef)
+ * The toolbar item configuration data. This parameter is
+ * optional and may not be present in all instances of this
+ * event.
+ *
+ * <-- kEventParamToolbarItem (out, typeHIToolbarItemRef)
+ * On exit, contains the new toolbar item.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarCreateItemWithIdentifier = 3;
+
+{
+ * kEventClassToolbar / kEventToolbarCreateItemFromDrag
+ *
+ * Summary:
+ * This event is sent to the delegate to when we need to create an
+ * item from a drag.
+ *
+ * Discussion:
+ * This event allows you to be able to drag items into a toolbar
+ * that arenÕt normal toolbar items. You might use this to allow
+ * your toolbar to accept file system items, for example.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDragRef (in, typeDragRef)
+ * The DragRef with information about the drag.
+ *
+ * <-- kEventParamToolbarItem (out, typeHIToolbarItemRef)
+ * On exit, contains the new toolbar item.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarCreateItemFromDrag = 4;
+
+{
+ * kEventClassToolbar / kEventToolbarItemAdded
+ *
+ * Summary:
+ * Sent to interested parties when an item is added to the toolbar.
+ * The toolbar object sends this event to itself, so you'd need to
+ * install a handler on the toolbar to receive this event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamToolbarItem (in, typeHIToolbarItemRef)
+ * The item that was just added.
+ *
+ * --> kEventParamIndex (in, typeCFIndex)
+ * The index at which the item now exists.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemAdded = 5;
+
+{
+ * kEventClassToolbar / kEventToolbarItemRemoved
+ *
+ * Summary:
+ * Sent to interested parties when an item is removed from toolbar.
+ * It is called after the item has already been removed. The toolbar
+ * object sends this event to itself, so you'd need to install a
+ * handler on the toolbar to receive this event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamToolbarItem (in, typeHIToolbarItemRef)
+ * The item that was just removed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemRemoved = 6;
+
+{
+ * kEventClassToolbar / kEventToolbarDisplayModeChanged
+ *
+ * Summary:
+ * Sent to interested parties when an the display mode is changed
+ * for a toolbar. The toolbar object sends this event to itself, so
+ * you'd need to install a handler on the toolbar to receive this
+ * event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarDisplayModeChanged = 7;
+
+{
+ * kEventClassToolbar / kEventToolbarDisplaySizeChanged
+ *
+ * Summary:
+ * Sent to interested parties when an the display size is changed
+ * for a toolbar. The toolbar object sends this event to itself, so
+ * you'd need to install a handler on the toolbar to receive this
+ * event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarDisplaySizeChanged = 8;
+
+{
+ * kEventClassToolbar / kEventToolbarLayoutChanged
+ *
+ * Summary:
+ * Sent to interested parties when the layout of a toolbar changes
+ * (either an item has been moved, or the entire contents have been
+ * replaced). Basically it is sent for changes which would require a
+ * total resync with the current state of things. The toolbar object
+ * sends this event to itself, so you'd need to install a handler on
+ * the toolbar to receive this event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarLayoutChanged = 9;
+
+{
+ * kEventClassToolbar / kEventToolbarBeginMultiChange
+ *
+ * Summary:
+ * Sent to interested parties when multiple attributes are going to
+ * be changed at once. For example, it is possible for the display
+ * mode and size to change at the same time. When this happens,
+ * instead of reacting two times (one for display mode changed and
+ * one for display size changed), you can listen to see if we are
+ * going to change multiple attributes and hold off on doing any
+ * relayout, etc. until the EndMultiChange event comes in. The
+ * toolbar object sends this event to itself, so you'd need to
+ * install a handler on the toolbar to receive this event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarBeginMultiChange = 12;
+
+{
+ * kEventClassToolbar / kEventToolbarEndMultiChange
+ *
+ * Summary:
+ * Sent to interested parties when the toolbar is done adjusting
+ * multiple attributes. See kEventToolbarBeginMultiChange for more
+ * information. The toolbar object sends this event to itself, so
+ * you'd need to install a handler on the toolbar to receive this
+ * event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarEndMultiChange = 13;
+
+{
+ kEventClassToolbarItem quick reference:
+
+ kEventToolbarItemImageChanged = 1,
+ kEventToolbarItemLabelChanged = 2,
+ kEventToolbarItemHelpTextChanged = 3,
+ kEventToolbarItemCommandIDChanged = 4,
+ kEventToolbarItemGetPersistentData = 5,
+ kEventToolbarItemCreateCustomView = 6,
+ kEventToolbarItemEnabledStateChanged = 7,
+ kEventToolbarItemPerformAction = 8,
+ kEventToolbarItemWouldAcceptDrop = 10,
+ kEventToolbarItemAcceptDrop = 11,
+ kEventToolbarItemSelectedStateChanged = 12
+}
+{
+ * kEventClassToolbarItem / kEventToolbarItemImageChanged
+ *
+ * Summary:
+ * This event is sent to the item (itself) when the image changes.
+ * Any interested parties can install handlers on the toolbar item
+ * to receive notifications.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemImageChanged = 1;
+
+{
+ * kEventClassToolbarItem / kEventToolbarItemLabelChanged
+ *
+ * Summary:
+ * This event is sent to the item (itself) when the label changes.
+ * Any interested parties can install handlers on the toolbar item
+ * to receive notifications.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemLabelChanged = 2;
+
+{
+ * kEventClassToolbarItem / kEventToolbarItemHelpTextChanged
+ *
+ * Summary:
+ * This event is sent to the item (itself) when the help text
+ * changes. Any interested parties can install handlers on the
+ * toolbar item to receive notifications.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemHelpTextChanged = 3;
+
+{
+ * kEventClassToolbarItem / kEventToolbarItemCommandIDChanged
+ *
+ * Summary:
+ * This event is sent to the item (itself) when the command ID
+ * changes. Any interested parties can install handlers on the
+ * toolbar item to receive notifications.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemCommandIDChanged = 4;
+
+{
+ * kEventClassToolbarItem / kEventToolbarItemGetPersistentData
+ *
+ * Summary:
+ * This event is sent to the item (itself) when the toolbar is going
+ * to write out the configuration information for the item. Any
+ * custom items can listen for this event and add any extra
+ * information to what is written out into the config so that it can
+ * be reanimated later on from the same config data. Typically,
+ * you'd not need to handle this event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * <-- kEventParamToolbarItemConfigData (out, typeCFTypeRef)
+ * On exit, contains configuration information for the item.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemGetPersistentData = 5;
+
+{
+ * kEventClassToolbarItem / kEventToolbarItemCreateCustomView
+ *
+ * Summary:
+ * This event is sent to the toolbar item when it is time to create
+ * a view for it to display its contents. Implementors of custom
+ * toolbar items can install a handler for this event to create
+ * their own custom views for their items.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * <-- kEventParamControlRef (out, typeControlRef)
+ * On exit, contains the itemÕs custom view.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemCreateCustomView = 6;
+
+{
+ * kEventClassToolbarItem / kEventToolbarItemEnabledStateChanged
+ *
+ * Summary:
+ * This event is sent to the item (itself) when the enabled state
+ * changes. Any interested parties can install handlers on the
+ * toolbar item to receive notifications.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemEnabledStateChanged = 7;
+
+{
+ * kEventClassToolbarItem / kEventToolbarItemSelectedStateChanged
+ *
+ * Summary:
+ * This event is sent to the item (itself) when the selected state
+ * changes. Any interested parties can install handlers on the
+ * toolbar item to receive notifications.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window in which the item is changing state. This
+ * parameter is optional and may not be present in all
+ * instances of this event. If not present, the item is
+ * changing state across all windows that share the same
+ * toolbar.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemSelectedStateChanged = 12;
+
+{
+ * kEventClassToolbarItem / kEventToolbarItemPerformAction
+ *
+ * Summary:
+ * This event is sent when a toolbar item is clicked. Subclasses of
+ * toolbar items can choose to do special actions by overriding this
+ * event. If this event is unhandled, the default action of sending
+ * a command event will occur.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemPerformAction = 8;
+
+{
+ * kEventClassToolbarItem / kEventToolbarItemWouldAcceptDrop
+ *
+ * Summary:
+ * This event is sent when a drag enters a toolbar item. If the
+ * toolbar item wants to accept drags (like finder items can when
+ * they represent containers), simply respond to this event and
+ * return true in the kEventParamResult parameter. The toolbar item
+ * will hilite appropriately. If you are using a custom view, you do
+ * not need to respond to this, since you'll have full drag and drop
+ * capability via the view system. This is to support custom items
+ * which are using the standard view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDragRef (in, typeDragRef)
+ * The drag to test for tastiness of flavors.
+ *
+ * <-- kEventParamResult (out, typeBoolean)
+ * A boolean value representing whether the drag was something
+ * the item wants to accept (true) or not (false). If this
+ * parameter does not exist or is false, we do not consult any
+ * other parameters in this event.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemWouldAcceptDrop = 10;
+
+{
+ * kEventClassToolbarItem / kEventToolbarItemAcceptDrop
+ *
+ * Summary:
+ * If you responded to kEventToolbarItemLikesDrag and returned true
+ * in the kEventParamResult parameter, and the user drops the drag
+ * onto your item, you will be called with this event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDragRef (in, typeDragRef)
+ * The drag that was just dropped.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemAcceptDrop = 11;
+
+{
+ kEventClassToolbarItemView quick reference:
+
+ kEventToolbarItemViewConfigForMode = 3,
+ kEventToolbarItemViewConfigForSize = 4,
+ kEventToolbarItemViewEnterConfigMode = 5,
+ kEventToolbarItemViewExitConfigMode = 6
+}
+const
+ kEventParamToolbarDisplayMode = $7462646D (* 'tbdm' *); { typeHIToolbarDisplayMode}
+ kEventParamToolbarDisplaySize = $74626473 (* 'tbds' *); { typeHIToolbarDisplaySize}
+ typeHIToolbarDisplayMode = $7462646D (* 'tbdm' *); { HIToolbarDisplayMode}
+ typeHIToolbarDisplaySize = $74626473 (* 'tbds' *); { HIToolbarDisplaySize}
+
+{
+ * kEventClassToolbarItemView / kEventToolbarItemViewConfigForMode
+ *
+ * Summary:
+ * Notifies a toolbar item view that the toolbar's display mode has
+ * changed.
+ *
+ * Discussion:
+ * Notifies a toolbar item view that the toolbar's display mode has
+ * changed. A custom toolbar item view can respond to this in any
+ * way it sees fit. Most times, responding to this is not necessary
+ * Ñ when the toolbar goes from icon to text only, for example, the
+ * view is automatically hidden, so there is not much to do. It is
+ * here for informational purposes only.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamToolbarDisplayMode (in, typeHIToolbarDisplayMode)
+ * The toolbar item view's new display mode.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemViewConfigForMode = 3;
+
+{
+ * kEventClassToolbarItemView / kEventToolbarItemViewConfigForSize
+ *
+ * Summary:
+ * Notifies a toolbar item view that the toolbar's display size has
+ * changed.
+ *
+ * Discussion:
+ * Notifies a toolbar item view that the toolbar's display size has
+ * changed. A custom toolbar item view can respond to this in any
+ * way it sees fit. Most times, responding to this is not necessary.
+ * However, some custom views might need to flush metrics caches
+ * when the display size changes.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamToolbarDisplaySize (in, typeHIToolbarDisplaySize)
+ * The toolbar item view's new display size.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemViewConfigForSize = 4;
+
+{
+ * kEventClassToolbarItemView / kEventToolbarItemViewEnterConfigMode
+ *
+ * Summary:
+ * Notifies a toolbar item view that we've entered configure mode.
+ *
+ * Discussion:
+ * Notifies a toolbar item view that we've entered configure mode. A
+ * custom toolbar item view can respond to this in any way it sees
+ * fit. For example, the space and flexible space mark themselves to
+ * draw a rectangle and merely invalidate so they get redrawn so you
+ * can see them during configure.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemViewEnterConfigMode = 5;
+
+{
+ * kEventClassToolbarItemView / kEventToolbarItemViewExitConfigMode
+ *
+ * Summary:
+ * Notifies a toolbar item view that we've finished with configure
+ * mode.
+ *
+ * Discussion:
+ * Notifies a toolbar item view that we're now out of configure
+ * mode. A custom toolbar item view can respond to this in any way
+ * it sees fit.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventToolbarItemViewExitConfigMode = 6;
+
+
+{
+ * Summary:
+ * Toolbar Item Attributes
+ }
+const
+{
+ * Pass this to indicate no attributes at all.
+ }
+ kHIToolbarItemNoAttributes = 0;
+
+ {
+ * This indicates that an item can have more than one instance of
+ * itself in the toolbar. If this is not set, only one can be
+ * present. By default, the determining factor for what determines if
+ * two items are identical is the toolbar identifier. Subclasses of
+ * HIToolbarItem can specify more elaborate equality.
+ }
+ kHIToolbarItemAllowDuplicates = 1 shl 0;
+
+ {
+ * This item can be rearranged, but it cannot be removed from the
+ * Toolbar by the user.
+ }
+ kHIToolbarItemCantBeRemoved = 1 shl 1;
+
+ {
+ * This item cannot be moved at all by the user. It is anchored to
+ * the left of the toolbar. It is important that there not be any
+ * unanchored items to the left of this item, else dragging items
+ * around will be a bit wacky. It is up you you, the home viewer, to
+ * make sure that anchored items are all on the left. This allows you
+ * to do toolbars like the the one in the System Preferences app,
+ * where the first couple of items are stuck in place.
+ }
+ kHIToolbarItemAnchoredLeft = 1 shl 2;
+
+ {
+ * This indicates the item acts as a separator. This means two things
+ * at present. First, it means that it automatically shows up as a
+ * divider line in a menu representation of the toolbar, and second
+ * it means the view that represents this item can draw in the full
+ * top to bottom space that the toolbar item occupies in the toolbar.
+ }
+ kHIToolbarItemIsSeparator = 1 shl 3;
+
+ {
+ * If this attribute bit is set, the command that gets sent out will
+ * be directed at the user focus instead of at the window the toolbar
+ * is attached to.
+ }
+ kHIToolbarItemSendCmdToUserFocus = 1 shl 4;
+
+ {
+ * If this attribute bit is set, clicking on the label of an item
+ * does nothing. This attribute is ONLY considered when a custom view
+ * is present. What it really does is make the toolbar item view dead
+ * to clicks while still allowing clicks to be sent to the custom
+ * view. When the toolbar is in text-only mode and this attribute is
+ * set, it displays the label in a disabled (grayed) appearance. You
+ * might want to change this attribute when switching between display
+ * modes. For example, the view switcher in finder does not allow
+ * clicks on the label when in icon and text mode, but it does
+ * respond to clicks when in text only mode. To change this on the
+ * fly, you should listen for kEventToolbarItemViewConfigForMode in
+ * your custom view and adjust this attribute as you desire. This
+ * attribute is available in Mac OS X 10.3 and later.
+ }
+ kHIToolbarItemLabelDisabled = 1 shl 5;
+
+ {
+ * This item is disabled. Setting this attribute is the same as
+ * calling HIToolbarItemSetEnabled( item, false ). Available on Mac
+ * OS X 10.4 and later.
+ }
+ kHIToolbarItemDisabled = 1 shl 6;
+
+ {
+ * This item is drawn with a selected appearance. Available on Mac OS
+ * X 10.4 and later.
+ }
+ kHIToolbarItemSelected = 1 shl 7;
+
+ {
+ * The set of all valid toolbar item attributes.
+ }
+ kHIToolbarItemValidAttrs = kHIToolbarItemAllowDuplicates or kHIToolbarItemIsSeparator or kHIToolbarItemCantBeRemoved or kHIToolbarItemAnchoredLeft or kHIToolbarItemSendCmdToUserFocus or kHIToolbarItemLabelDisabled or kHIToolbarItemDisabled or kHIToolbarItemSelected;
+
+ {
+ * The set of toolbar item attributes that can be changed with
+ * HIToolbarItemChangeAttributes.
+ }
+ kHIToolbarItemMutableAttrs = kHIToolbarItemCantBeRemoved or kHIToolbarItemAnchoredLeft or kHIToolbarItemLabelDisabled or kHIToolbarItemDisabled or kHIToolbarItemSelected;
+
+{======================================================================================}
+{ FUNCTIONS }
+{======================================================================================}
+{
+ * HIToolbarCreate()
+ *
+ * Discussion:
+ * Creates a toolbar. After creating a toolbar, one would normally
+ * attach it to a window using SetWindowToolbar, described in
+ * MacWindows.h. Since the toolbar is merely the model (as opposed
+ * to the view), there are no routines to hide/show it here. Please
+ * look to MacWindows.h for the routines ShowHideWindowToolbar and
+ * IsWindowToolbarVisible there for more information.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inIdentifier:
+ * The identifier of the toolbar. If you specify that the toolbar
+ * auto-saves its configuration, this identifier is used to mark
+ * the config info in your application's preferences. You must
+ * specify an identifier.
+ *
+ * inAttributes:
+ * Any attributes you wish to specify.
+ *
+ * outToolbar:
+ * The toolbar reference to your shiny new toolbar.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarCreate( inIdentifier: CFStringRef; inAttributes: OptionBits; var outToolbar: HIToolbarRef ): OSStatus; external name '_HIToolbarCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarGetAttributes()
+ *
+ * Discussion:
+ * Returns the attributes for the given toolbar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar whose attributes you desire.
+ *
+ * outAttributes:
+ * The attributes.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarGetAttributes( inToolbar: HIToolbarRef; var outAttributes: OptionBits ): OSStatus; external name '_HIToolbarGetAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarChangeAttributes()
+ *
+ * Discussion:
+ * Changes the attributes of a toolbar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar whose attributes you want to change.
+ *
+ * inAttrsToSet:
+ * The attributes you wish to set/enable.
+ *
+ * inAttrsToClear:
+ * The attributes you wish to clear/disable.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarChangeAttributes( inToolbar: HIToolbarRef; inAttrsToSet: OptionBits; inAttrsToClear: OptionBits ): OSStatus; external name '_HIToolbarChangeAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarGetDisplayMode()
+ *
+ * Discussion:
+ * Returns the current display mode of a toolbar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar whose display mode you wish to receive.
+ *
+ * outDisplayMode:
+ * The display mode.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarGetDisplayMode( inToolbar: HIToolbarRef; var outDisplayMode: HIToolbarDisplayMode ): OSStatus; external name '_HIToolbarGetDisplayMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarSetDisplayMode()
+ *
+ * Discussion:
+ * Sets the current display mode of a toolbar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar whose display mode you wish to set.
+ *
+ * inDisplayMode:
+ * The display mode. If the toolbar is visible, it will be redrawn.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarSetDisplayMode( inToolbar: HIToolbarRef; inDisplayMode: HIToolbarDisplayMode ): OSStatus; external name '_HIToolbarSetDisplayMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarGetDisplaySize()
+ *
+ * Discussion:
+ * Gets the current display size of a toolbar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar whose display size you wish to get.
+ *
+ * outSize:
+ * The display size.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarGetDisplaySize( inToolbar: HIToolbarRef; var outSize: HIToolbarDisplaySize ): OSStatus; external name '_HIToolbarGetDisplaySize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarSetDisplaySize()
+ *
+ * Discussion:
+ * Sets the current display size of a toolbar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar whose display size you wish to set.
+ *
+ * inSize:
+ * The display size. If the toolbar is visible, it will be redrawn.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarSetDisplaySize( inToolbar: HIToolbarRef; inSize: HIToolbarDisplaySize ): OSStatus; external name '_HIToolbarSetDisplaySize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarCopyIdentifier()
+ *
+ * Discussion:
+ * Returns the identifier for a toolbar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar whose identifier you wish to get.
+ *
+ * outIdentifier:
+ * The identifier. You must release it when you are finished with
+ * it.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarCopyIdentifier( inToolbar: HIToolbarRef; var outIdentifier: CFStringRef ): OSStatus; external name '_HIToolbarCopyIdentifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarSetItemsWithIdentifiers()
+ *
+ * Discussion:
+ * Allows you to set a toolbar's items all at once. The array
+ * contains either CFStringRefs of item identifiers, or a small
+ * CFDictionaryRef containing the identifier string, and the config
+ * data (if the item requires it). The key for the identifier string
+ * is kHIToolbarIdentifierKey and the key for the config data string
+ * is kHIToolbarDataKey.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar whose items you wish to set.
+ *
+ * inArray:
+ * The array of toolbar items to create.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarSetItemsWithIdentifiers( inToolbar: HIToolbarRef; inArray: CFArrayRef ): OSStatus; external name '_HIToolbarSetItemsWithIdentifiers';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIToolbarCopyItems()
+ *
+ * Discussion:
+ * Returns the array of toolbar items for a toolbar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar whose items you wish to receive.
+ *
+ * outItems:
+ * The array of toolbar items owned by the toolbar. You must
+ * release the array when you are finished with it.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarCopyItems( inToolbar: HIToolbarRef; var outItems: CFArrayRef ): OSStatus; external name '_HIToolbarCopyItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarCreateItemWithIdentifier()
+ *
+ * Discussion:
+ * Creates an item specified by a particular identifier. Using this
+ * function allows you to create any item a delegate supports by
+ * naming its identifier. It also allows you to create standard
+ * items supplied by the Toolbox, such as the separator item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar you are adding to.
+ *
+ * inIdentifier:
+ * The identifier of the item you wish to add.
+ *
+ * inConfigData:
+ * Any config data required by the item to safely construct.
+ * Standard items do not require any extra data, so NULL can be
+ * passed.
+ *
+ * outItem:
+ * The newly created toolbar item.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarCreateItemWithIdentifier( inToolbar: HIToolbarRef; inIdentifier: CFStringRef; inConfigData: CFTypeRef { can be NULL }; var outItem: HIToolbarItemRef ): OSStatus; external name '_HIToolbarCreateItemWithIdentifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarInsertItemAtIndex()
+ *
+ * Discussion:
+ * Inserts a toolbar item at a given index into a toolbar.
+ * Generally, you should always add items via identifier, and not
+ * with this routine.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar to receive the new item.
+ *
+ * inItem:
+ * The item reference of the toolbar item you are adding.
+ *
+ * inIndex:
+ * The index you wish to add the item at. This index is zero-based.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarInsertItemAtIndex( inToolbar: HIToolbarRef; inItem: HIToolbarItemRef; inIndex: CFIndex ): OSStatus; external name '_HIToolbarInsertItemAtIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarAppendItem()
+ *
+ * Discussion:
+ * Appends an item to the end of a toolbar. Generally, you should
+ * always add items via identifier, and not with this routine.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar to receive the new item.
+ *
+ * inItem:
+ * The item reference of the toolbar item you are adding.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarAppendItem( inToolbar: HIToolbarRef; inItem: HIToolbarItemRef ): OSStatus; external name '_HIToolbarAppendItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarRemoveItemAtIndex()
+ *
+ * Discussion:
+ * Removes an item at a given index from a toolbar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar you are removing the item from.
+ *
+ * inIndex:
+ * The index of the item to remove. This index is zero-based.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarRemoveItemAtIndex( inToolbar: HIToolbarRef; inIndex: CFIndex ): OSStatus; external name '_HIToolbarRemoveItemAtIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarSetDelegate()
+ *
+ * Discussion:
+ * Sets the delegate event target for a toolbar. This is necessary
+ * for a toolbar to work properly if it wants items of its own. The
+ * delegate is who is asked to create toolbar items. If the delegate
+ * does not respond, the toolbar will attempt to create a toolbar
+ * item, but it can only create the standard items defined at the
+ * top of this header.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar whose delegate you want to set.
+ *
+ * inDelegate:
+ * The HIObjectRef to act as the delegate.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarSetDelegate( inToolbar: HIToolbarRef; inDelegate: HIObjectRef ): OSStatus; external name '_HIToolbarSetDelegate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarGetDelegate()
+ *
+ * Discussion:
+ * Returns the current delegate in use by a toolbar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar you want the delegate from.
+ *
+ * Result:
+ * An HIObjectRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarGetDelegate( inToolbar: HIToolbarRef ): HIObjectRef; external name '_HIToolbarGetDelegate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{==========================================================================}
+{ HITOOLBARITEM }
+{==========================================================================}
+{ The HIObject class ID for the ToolbarItem class. }
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIToolbarItemClassID CFSTRP('com.apple.hitoolbaritem')}
+{$endc}
+
+
+{ Required construction parameters }
+{ You must pass these parameters in the initialization event if you are }
+{ subclassing the toolbar item }
+{ kEventParamToolbarItemIdentifier typeCFStringRef }
+{ kEventParamAttibutes typeUInt32 }
+
+
+{
+ * HIToolbarItemCreate()
+ *
+ * Discussion:
+ * Creates a toolbar item for use in a toolbar. Typically, you would
+ * create toolbar items in your delegate. When a toolbar needs to
+ * create an item with a given identifier, your delegate is asked to
+ * create it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inIdentifier:
+ * The identifier of the item in question.
+ *
+ * inOptions:
+ * Any options for the item.
+ *
+ * outItem:
+ * The item you created.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemCreate( inIdentifier: CFStringRef; inOptions: OptionBits; var outItem: HIToolbarItemRef ): OSStatus; external name '_HIToolbarItemCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+// #define _HIToolbarItemCopyIdentifier HIToolbarItemCopyIdentifier
+{
+ * HIToolbarItemCopyIdentifier()
+ *
+ * Discussion:
+ * Returns the identifier of the given item. The toolbar uses this
+ * identifier when writing the config information to the preferences
+ * (if set up for auto-config).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * outIdentifier:
+ * The identifier of the item. You should release this string when
+ * you are finished with it.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemCopyIdentifier( inItem: HIToolbarItemRef; var outIdentifier: CFStringRef ): OSStatus; external name '_HIToolbarItemCopyIdentifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemGetAttributes()
+ *
+ * Discussion:
+ * Returns the attributes of the given item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * outAttributes:
+ * The attributes of the item.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemGetAttributes( inItem: HIToolbarItemRef; var outAttributes: OptionBits ): OSStatus; external name '_HIToolbarItemGetAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemChangeAttributes()
+ *
+ * Discussion:
+ * Changes the attributes of a toolbar item. Only those attributes
+ * defined by the kHIToolbarItemMutableAttrs can be passed into this
+ * API. All other options can only be specified at creation.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * inAttrsToSet:
+ * The attributes to set on the item. This value can be
+ * kHIToolbarItemNoAttributes if you are only clearing attributes.
+ *
+ * inAttrsToClear:
+ * The attributes to clear on the item. This value can be
+ * kHIToolbarItemNoAttributes if you are only setting attributes.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemChangeAttributes( inItem: HIToolbarItemRef; inAttrsToSet: OptionBits; inAttrsToClear: OptionBits ): OSStatus; external name '_HIToolbarItemChangeAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemGetAttributesInWindow()
+ *
+ * Summary:
+ * Returns the attributes of the given item in a given window, and
+ * information about which attributes are overridden for that window.
+ *
+ * Discussion:
+ * The HIToolbarItemGetAttributesInWindow returns the combined
+ * attributes that control a toolbar item view in a specific window.
+ * It also returns a bitmask of toolbar item attributes indicating
+ * which attributes are overridden for this particular window, and
+ * which are inherited from the non-window-specific toolbar item
+ * attributes.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * inWindow:
+ * The window containing the item. Passing NULL is equivalent to
+ * calling HIToolbarItemGetAttributes; it returns the
+ * non-window-specific attributes for the item with no per-window
+ * modifications.
+ *
+ * outOverriddenAttributes:
+ * On exit, contains a bitmask indicating which attributes are
+ * overridden for this particular window. May be NULL if you don't
+ * need this information.
+ *
+ * outCombinedAttributes:
+ * On exit, contains the effective attributes for this item in
+ * this window, produced by combining the item's
+ * non-window-specific attributes with the overridden attributes
+ * for this window. May be NULL if you don't need this information.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemGetAttributesInWindow( inItem: HIToolbarItemRef; inWindow: WindowRef { can be NULL }; outOverriddenAttributes: OptionBitsPtr { can be NULL }; outCombinedAttributes: OptionBitsPtr { can be NULL } ): OSStatus; external name '_HIToolbarItemGetAttributesInWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIToolbarItemChangeAttributesInWindow()
+ *
+ * Summary:
+ * Changes the attributes of a toolbar item in a specific window.
+ *
+ * Discussion:
+ * The HIToolbarItemChangeAttributesInWindow API allows the
+ * attributes of a toolbar item to be overridden on a per-window
+ * basis. The attributes used to draw a toolbar item view in a
+ * particular window are determined by combining the
+ * non-window-specific attributes for the item (set by
+ * HIToolbarItemChangeAttributes) with the window-specific
+ * attributes (set by HIToolbarItemChangeAttributesInWindow). For
+ * example, your application might have a toolbar that is shared
+ * across several windows, but in some windows a toolbar item might
+ * be enabled, and in other windows the same item might be disabled.
+ *
+ *
+ * Whenever HIToolbarChangeAttributesInWindow is used to set or
+ * clear attributes, the toolbar item adds the modified attributes
+ * to a bitmask of attributes recording which attributes are
+ * overridden for that particular window. Once an attribute is
+ * overridden for a window (whether it is set or cleared), the
+ * attribute remains overridden for that window until
+ * HIToolbarItemChangeAttributesInWindow is called with that
+ * attribute specified in the inAttrsToNoLongerOverride parameter.
+ * The attributes specified in that parameter will be removed from
+ * the override mask for the toolbar item in the specified window.
+ * The effective value of attributes removed from the override mask
+ * will then revert back to the non-window- specific value of the
+ * attributes for the toolbar item.
+ *
+ * Only those attributes defined by the kHIToolbarItemMutableAttrs
+ * can be passed into this API. All other options can only be
+ * specified at creation.
+ *
+ * The per-window attributes for an item are not saved in the
+ * toolbar preferences.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * inWindow:
+ * The window containing the item. Passing NULL is equivalent to
+ * calling HIToolbarItemChangeAttributes; the item's
+ * non-window-specific attributes will be changed, rather than its
+ * per-window attributes.
+ *
+ * inAttrsToSet:
+ * The attributes to set on the item. Pass
+ * kHIToolbarItemNoAttributes if you are only clearing attributes.
+ * These attributes will be added to the overridden attribute mask
+ * associated with this item in this window.
+ *
+ * inAttrsToClear:
+ * The attributes to clear on the item. Pass
+ * kHIToolbarItemNoAttributes if you are only setting attributes.
+ * These attributes will be added to the overridden attribute mask
+ * associated with this item in this window.
+ *
+ * inAttrsToNoLongerOverride:
+ * The attributes that should no longer be overridden at the
+ * per-window level for this toolbar item; pass
+ * kHIToolbarItemNoAttributes if all attributes should remain
+ * overridden. If an attribute is in both this parameter and
+ * either the inAttrsToSet or inAttrsToClear parameters, the
+ * attribute will no longer be overridden. If the inWindow
+ * parameter is NULL, this parameter must be
+ * kHIToolbarItemNoAttributes; if not, paramErr will be returned.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemChangeAttributesInWindow( inItem: HIToolbarItemRef; inWindow: WindowRef { can be NULL }; inAttrsToSet: OptionBits; inAttrsToClear: OptionBits; inAttrsToNoLongerOverride: OptionBits ): OSStatus; external name '_HIToolbarItemChangeAttributesInWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIToolbarGetSelectedItemInWindow()
+ *
+ * Summary:
+ * Returns the toolbar item that is selected in a given window.
+ *
+ * Discussion:
+ * Each window that shares a toolbar may have a different selected
+ * item. This API returns the selected item in a particular window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToolbar:
+ * The toolbar in question.
+ *
+ * inWindow:
+ * A window containing the toolbar.
+ *
+ * outItem:
+ * On exit, contains the toolbar item that is selected in the
+ * specified window, or NULL if there is no selected item.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarGetSelectedItemInWindow( inToolbar: HIToolbarRef; inWindow: WindowRef; var outItem: HIToolbarItemRef ): OSStatus; external name '_HIToolbarGetSelectedItemInWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIToolbarItemSetLabel()
+ *
+ * Discussion:
+ * Sets the label of a toolbar item. This is what the toolbar view
+ * will display underneath the image. It is also used in the
+ * configuration palette for configurable toolbars.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * inLabel:
+ * The label. The toolbox will copy the string passed in.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemSetLabel( inItem: HIToolbarItemRef; inLabel: CFStringRef ): OSStatus; external name '_HIToolbarItemSetLabel';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemCopyLabel()
+ *
+ * Discussion:
+ * Returns the label of a toolbar item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * outLabel:
+ * The label of the item. You should release this when you are
+ * finished with it.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemCopyLabel( inItem: HIToolbarItemRef; var outLabel: CFStringRef ): OSStatus; external name '_HIToolbarItemCopyLabel';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemSetHelpText()
+ *
+ * Discussion:
+ * Sets the text used for help tags for a toolbar item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * inShortText:
+ * The short help text. This is what is displayed normally by the
+ * help tag system when the user hovers over the toolbar item with
+ * the mouse.
+ *
+ * inLongText:
+ * The long help text. This is what is displayed by the help tag
+ * system when the user hovers over the toolbar item with the
+ * mouse and holds the command key down. This parameter is
+ * optional, you may pass NULL.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemSetHelpText( inItem: HIToolbarItemRef; inShortText: CFStringRef; inLongText: CFStringRef { can be NULL } ): OSStatus; external name '_HIToolbarItemSetHelpText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemCopyHelpText()
+ *
+ * Discussion:
+ * Returns the text used for help tags for a toolbar item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * outShortText:
+ * The short help text. This is what is displayed normally by the
+ * help tag system when the user hovers over the toolbar item with
+ * the mouse. You should release this string when you are finished
+ * with it. If you do not wish to receive the short help text,
+ * pass NULL for this parameter.
+ *
+ * outLongText:
+ * The long help text. This is what is displayed by the help tag
+ * system when the user hovers over the toolbar item with the
+ * mouse and holds the command key down. You should release this
+ * string when you are finished with it. If you do not wish to
+ * receive the long help text, pass NULL for this parameter.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemCopyHelpText( inItem: HIToolbarItemRef; outShortText: CFStringRefPtr { can be NULL }; outLongText: CFStringRefPtr { can be NULL } ): OSStatus; external name '_HIToolbarItemCopyHelpText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemSetCommandID()
+ *
+ * Discussion:
+ * Sets the command ID of a toolbar item. When an toolbar item is
+ * clicked, the default behavior is to send out the command assigned
+ * to the item. This API lets you set that command ID. The command
+ * is sent out via the ProcessHICommand API, so it uses Carbon
+ * Events.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * inCommandID:
+ * The command ID.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemSetCommandID( inItem: HIToolbarItemRef; inCommandID: MenuCommand ): OSStatus; external name '_HIToolbarItemSetCommandID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemGetCommandID()
+ *
+ * Discussion:
+ * Gets the command ID of a toolbar item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * outCommandID:
+ * The command ID.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemGetCommandID( inItem: HIToolbarItemRef; var outCommandID: MenuCommand ): OSStatus; external name '_HIToolbarItemGetCommandID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemSetIconRef()
+ *
+ * Discussion:
+ * Sets the icon for a toolbar item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * inIcon:
+ * The icon ref. The toolbar will create an appropriate CGImageRef
+ * for the icon passed in. The icon can be released after this API
+ * is called.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemSetIconRef( inItem: HIToolbarItemRef; inIcon: IconRef ): OSStatus; external name '_HIToolbarItemSetIconRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemSetImage()
+ *
+ * Discussion:
+ * Sets the image for a toolbar item. Currently, the image should be
+ * no higher than 32 pixels. This image is used both in the toolbar
+ * as well as the configuration sheet, if the toolbar is
+ * configurable.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * inImage:
+ * The image. This image is retained by the toolbar item. You may
+ * release it after calling this API.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemSetImage( inItem: HIToolbarItemRef; inImage: CGImageRef ): OSStatus; external name '_HIToolbarItemSetImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemCopyImage()
+ *
+ * Discussion:
+ * Returns the image for a toolbar item. This image is already
+ * retained by the time you receive it, so you can release it when
+ * you are done with it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * outImage:
+ * The retained image. You should release it when finished with it.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemCopyImage( inItem: HIToolbarItemRef; var outImage: CGImageRef ): OSStatus; external name '_HIToolbarItemCopyImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemSetMenu()
+ *
+ * Discussion:
+ * Sets the submenu for a toolbar item. Normally, items do not have
+ * a submenu. You can attach one with this API. The submenu will, by
+ * default, show up in the 'more items' indicator popup, as a
+ * submenu of the menu item corresponding to the toolbar item. It
+ * will also appear if the toolbar is in text only mode and the
+ * label is clicked. You should attach a Carbon Event handler to the
+ * menu to handle updating the menu items as appropriate before the
+ * menu is displayed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * inMenu:
+ * The menu. It is retained by the toolbar item, so you can safely
+ * release it after calling this API. On Mac OS X 10.3 and later,
+ * you can pass NULL for this parameter to remove and release any
+ * menu that might be attached.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemSetMenu( inItem: HIToolbarItemRef; inMenu: MenuRef { can be NULL } ): OSStatus; external name '_HIToolbarItemSetMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemCopyMenu()
+ *
+ * Discussion:
+ * Gets the submenu for a toolbar item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * outMenu:
+ * The retained menu. You should release it when you are finished
+ * with it.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemCopyMenu( inItem: HIToolbarItemRef; var outMenu: MenuRef ): OSStatus; external name '_HIToolbarItemCopyMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemGetToolbar()
+ *
+ * Discussion:
+ * Gets the toolbar a toolbar item is attached to.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * Result:
+ * The toolbar item reference of the toolbar this item is bound to,
+ * or NULL if this toolbar item is not attached to any toolbar.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemGetToolbar( inItem: HIToolbarItemRef ): HIToolbarRef; external name '_HIToolbarItemGetToolbar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemIsEnabled()
+ *
+ * Discussion:
+ * Used to determine if a toolbar item is enabled.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * Result:
+ * A boolean result.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemIsEnabled( inItem: HIToolbarItemRef ): Boolean; external name '_HIToolbarItemIsEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemSetEnabled()
+ *
+ * Discussion:
+ * Enables or disables a toolbar item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item in question.
+ *
+ * inEnabled:
+ * The new enabled state.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemSetEnabled( inItem: HIToolbarItemRef; inEnabled: Boolean ): OSStatus; external name '_HIToolbarItemSetEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIToolbarItemConfigDataChanged()
+ *
+ * Discussion:
+ * Informs the toolbar that the config data for a toolbar item has
+ * changed and should be written to the toolbar config prefs. This
+ * is used when a custom toolbar item has extra data (config data)
+ * that has changed (perhaps you've changed an alias that a toolbar
+ * item points to, for example). This function does nothing if the
+ * toolbar is not set to auto save its configuration.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inItem:
+ * The item whose information has changed.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIToolbarItemConfigDataChanged( inItem: HIToolbarItemRef ): OSStatus; external name '_HIToolbarItemConfigDataChanged';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{unit HTMLRendering}
+{
+ File: HTMLRendering.p
+
+ Contains: HTML Rendering Library Interfaces.
+
+ Version: Technology: 1.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1999-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+ HRReference = ^SInt32; { an opaque 32-bit type }
+ HRReferencePtr = ^HRReference; { when a var xx:HRReference parameter can be nil, it is changed to xx: HRReferencePtr }
+ {
+ * HRGetHTMLRenderingLibVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGetHTMLRenderingLibVersion(var returnVers: NumVersion): OSStatus; external name '_HRGetHTMLRenderingLibVersion';
+
+{$ifc TARGET_RT_MAC_CFM}
+{$elsec}
+ {$ifc TARGET_RT_MAC_MACHO}
+ {$endc}
+{$endc}
+
+
+const
+ kHRRendererHTML32Type = $68743332 (* 'ht32' *); { HTML 3.2 }
+
+
+ {
+ * HRNewReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRNewReference(var hrRef: HRReference; rendererType: OSType; grafPtr_: GrafPtr): OSStatus; external name '_HRNewReference';
+
+{
+ * HRNewReferenceInWindow()
+ *
+ * Discussion:
+ * Use this API from a Carbon App. All the contrrols created by the
+ * HTML renderer will be embedded in the root control of the window
+ * specified by the window ref.
+ *
+ * Parameters:
+ *
+ * hrRef:
+ * Pointer to the new reference created and returned by the
+ * renderer.
+ *
+ * rendererType:
+ * Type of the renderer e.g. kHRRendererHTML32Type. Only this type
+ * is supported for now.
+ *
+ * inWindowRef:
+ * Reference to the window for which rendering area will be
+ * specified.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRNewReferenceInWindow(var hrRef: HRReference; rendererType: OSType; inWindowRef: WindowRef): OSStatus; external name '_HRNewReferenceInWindow';
+
+{
+ * HRDisposeReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRDisposeReference(hrRef: HRReference): OSStatus; external name '_HRDisposeReference';
+
+
+{
+ * HRFreeMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRFreeMemory(inBytesNeeded: Size): SInt32; external name '_HRFreeMemory';
+
+
+{ System level notifications }
+{
+ * HRScreenConfigurationChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HRScreenConfigurationChanged; external name '_HRScreenConfigurationChanged';
+
+{
+ * HRIsHREvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRIsHREvent(const (*var*) eventRecord_: EventRecord): boolean; external name '_HRIsHREvent';
+
+
+{ Drawing }
+{
+ * HRSetGrafPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRSetGrafPtr(hrRef: HRReference; grafPtr_: GrafPtr): OSStatus; external name '_HRSetGrafPtr';
+
+{
+ * HRSetWindowRef()
+ *
+ * Discussion:
+ * Use this API from a Carbon App. All the contrrols created by the
+ * HTML renderer will be moved in the root control of the window
+ * specified by the window ref. All the drawing will now happen in
+ * the specified window.
+ *
+ * Parameters:
+ *
+ * hrRef:
+ * Reference to the renderer object.
+ *
+ * windowRef:
+ * new Reference to the window to be attached to the above hrRef.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRSetWindowRef(hrRef: HRReference; windowRef_: WindowRef): OSStatus; external name '_HRSetWindowRef';
+
+{
+ * HRSetEmbeddingControl()
+ *
+ * Discussion:
+ * Use this API to tell the HTML Renderer to embed all the controls
+ * it has created so far and the new controls it creates after this
+ * call to be embedded in the given control. Useful if you wish to
+ * have an HTML displayed with in your dialog. e.g. Software Update
+ * needs this.
+ *
+ * Parameters:
+ *
+ * hrRef:
+ * Reference to the renderer object.
+ *
+ * controlRef:
+ * all the future controls created by renderer are embeded in this
+ * controlRef.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRSetEmbeddingControl(hrRef: HRReference; controlRef_: ControlRef): OSStatus; external name '_HRSetEmbeddingControl';
+
+{
+ * HRActivate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRActivate(hrRef: HRReference): OSStatus; external name '_HRActivate';
+
+{
+ * HRDeactivate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRDeactivate(hrRef: HRReference): OSStatus; external name '_HRDeactivate';
+
+{
+ * HRDraw()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRDraw(hrRef: HRReference; updateRgnH: RgnHandle): OSStatus; external name '_HRDraw';
+
+{
+ * HRDrawInPort()
+ *
+ * Discussion:
+ * Use this API from a Carbon App. All the drawing will now happen
+ * in the specified port. This is the API you want to use to draw in
+ * an offscreen port, for example when printing. You could also use
+ * this API to draw in an on screen port.
+ *
+ * Parameters:
+ *
+ * hrRef:
+ * Reference to the renderer object.
+ *
+ * updateRgnH:
+ * Region to be updated.
+ *
+ * grafPtr:
+ * A graf pointer to render HTML into.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRDrawInPort(hrRef: HRReference; updateRgnH: RgnHandle; grafPtr: CGrafPtr): OSStatus; external name '_HRDrawInPort';
+
+{
+ * HRSetRenderingRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRSetRenderingRect(hrRef: HRReference; const (*var*) renderingRect: Rect): OSStatus; external name '_HRSetRenderingRect';
+
+{
+ * HRGetRenderedImageSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGetRenderedImageSize(hrRef: HRReference; var renderingSize: Point): OSStatus; external name '_HRGetRenderedImageSize';
+
+{
+ * HRGetRenderedImageSize32()
+ *
+ * Discussion:
+ * Use this API when the rendered image could have coordinates
+ * larger than what SInt16 can hold.
+ *
+ * Parameters:
+ *
+ * hrRef:
+ * Reference to the renderer object.
+ *
+ * height:
+ * Height of the image is returned in this parameter.
+ *
+ * width:
+ * Width of the image is returned in this parameter.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGetRenderedImageSize32(hrRef: HRReference; var height: UInt32; var width: UInt32): OSStatus; external name '_HRGetRenderedImageSize32';
+
+{
+ * HRScrollToLocation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRScrollToLocation(hrRef: HRReference; var location: Point): OSStatus; external name '_HRScrollToLocation';
+
+{
+ * HRScrollToImageLocation32()
+ *
+ * Discussion:
+ * Use this API when specifying location to scroll to. Location is
+ * specified in image space.
+ *
+ * Parameters:
+ *
+ * hrRef:
+ * Reference to the renderer object.
+ *
+ * h:
+ * Horizontal location.
+ *
+ * v:
+ * Vertical location.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRScrollToImageLocation32(hrRef: HRReference; h: SInt32; v: SInt32): OSStatus; external name '_HRScrollToImageLocation32';
+
+{
+ * HRForceQuickdraw()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRForceQuickdraw(hrRef: HRReference; forceQuickdraw: boolean): OSStatus; external name '_HRForceQuickdraw';
+
+
+type
+ HRScrollbarState = SInt16;
+const
+ eHRScrollbarOn = 0;
+ eHRScrollbarOff = 1;
+ eHRScrollbarAuto = 2;
+
+ {
+ * HRSetScrollbarState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRSetScrollbarState(hrRef: HRReference; hScrollbarState: HRScrollbarState; vScrollbarState: HRScrollbarState): OSStatus; external name '_HRSetScrollbarState';
+
+{
+ * HRSetDrawBorder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRSetDrawBorder(hrRef: HRReference; drawBorder: boolean): OSStatus; external name '_HRSetDrawBorder';
+
+{
+ * HRSetGrowboxCutout()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRSetGrowboxCutout(hrRef: HRReference; allowCutout: boolean): OSStatus; external name '_HRSetGrowboxCutout';
+
+{ Navigation }
+{
+ * HRGoToFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGoToFile(hrRef: HRReference; const (*var*) fsspec_: FSSpec; addToHistory: boolean; forceRefresh: boolean): OSStatus; external name '_HRGoToFile';
+
+{
+ * HRGoToURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGoToURL(hrRef: HRReference; url: ConstCStringPtr; addToHistory: boolean; forceRefresh: boolean): OSStatus; external name '_HRGoToURL';
+
+{
+ * HRGoToAnchor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGoToAnchor(hrRef: HRReference; anchorName: ConstCStringPtr): OSStatus; external name '_HRGoToAnchor';
+
+{
+ * HRGoToPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGoToPtr(hrRef: HRReference; buffer: CStringPtr; bufferSize: UInt32; addToHistory: boolean; forceRefresh: boolean): OSStatus; external name '_HRGoToPtr';
+
+{
+ * HRGoToFSRef()
+ *
+ * Discussion:
+ * Use these API from a Carbon App instead of using HRGoToFile,
+ * HRGoToURL, HRGoToAnchor and HRGoToPtr. These APIs are same in
+ * behavior with their old counter parts. The only difference is
+ * that they take FSRef, CFURLRef, CFString, and CFData as
+ * parameters.
+ *
+ * Parameters:
+ *
+ * hrRef:
+ * Reference to the renderer object.
+ *
+ * fref:
+ * Reference to HTML file that is be opened and rendered.
+ *
+ * addToHistory:
+ * true if this file URL should be added to history.
+ *
+ * forceRefresh:
+ * true if the rendering area should be refreshed.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGoToFSRef(hrRef: HRReference; const (*var*) fref: FSRef; addToHistory: boolean; forceRefresh: boolean): OSStatus; external name '_HRGoToFSRef';
+
+{
+ * HRGoToCFURL()
+ *
+ * Discussion:
+ * Use these API from a Carbon App instead of using HRGoToFile,
+ * HRGoToURL, HRGoToAnchor and HRGoToPtr. These APIs are same in
+ * behavior with their old counter parts. The only difference is
+ * that they take FSRef, CFURLRef, CFString, and CFData as
+ * parameters.
+ *
+ * Parameters:
+ *
+ * hrRef:
+ * Reference to the renderer object.
+ *
+ * url:
+ * Reference to url that is be rendered.
+ *
+ * addToHistory:
+ * true if this URL should be added to history.
+ *
+ * forceRefresh:
+ * true if the rendering area should be refreshed.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGoToCFURL(hrRef: HRReference; url: CFURLRef; addToHistory: boolean; forceRefresh: boolean): OSStatus; external name '_HRGoToCFURL';
+
+{
+ * HRGoToAnchorCFString()
+ *
+ * Discussion:
+ * Use these API from a Carbon App instead of using HRGoToFile,
+ * HRGoToURL, HRGoToAnchor and HRGoToPtr. These APIs are same in
+ * behavior with their old counter parts. The only difference is
+ * that they take FSRef, CFURLRef, CFString, and CFData as
+ * parameters.
+ *
+ * Parameters:
+ *
+ * hrRef:
+ * Reference to the renderer object.
+ *
+ * anchorName:
+ * Name of the anchor to be displayed.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGoToAnchorCFString(hrRef: HRReference; anchorName: CFStringRef): OSStatus; external name '_HRGoToAnchorCFString';
+
+{
+ * HRGoToData()
+ *
+ * Discussion:
+ * Use these API from a Carbon App instead of using HRGoToFile,
+ * HRGoToURL, HRGoToAnchor and HRGoToPtr. These APIs are same in
+ * behavior with their old counter parts. The only difference is
+ * that they take FSRef, CFURLRef, CFString, and CFData as
+ * parameters.
+ *
+ * Parameters:
+ *
+ * hrRef:
+ * Reference to the renderer object.
+ *
+ * data:
+ * Reference to data in the memory that is be rendered.
+ *
+ * addToHistory:
+ * true if this file URL should be added to history.
+ *
+ * forceRefresh:
+ * true if the rendering area should be refreshed.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGoToData(hrRef: HRReference; data: CFDataRef; addToHistory: boolean; forceRefresh: boolean): OSStatus; external name '_HRGoToData';
+
+{ Accessors }
+{ either file url or url of <base> tag }
+{
+ * HRGetRootURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGetRootURL(hrRef: HRReference; rootURLH: Handle): OSStatus; external name '_HRGetRootURL';
+
+{ url of <base> tag }
+{
+ * HRGetBaseURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGetBaseURL(hrRef: HRReference; baseURLH: Handle): OSStatus; external name '_HRGetBaseURL';
+
+{ file url }
+{
+ * HRGetHTMLURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGetHTMLURL(hrRef: HRReference; HTMLURLH: Handle): OSStatus; external name '_HRGetHTMLURL';
+
+{
+ * HRGetTitle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGetTitle(hrRef: HRReference; title: StringPtr): OSStatus; external name '_HRGetTitle';
+
+{
+ * HRGetHTMLFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGetHTMLFile(hrRef: HRReference; var fsspec_: FSSpec): OSStatus; external name '_HRGetHTMLFile';
+
+
+{
+ * HRGetRootURLAsCFString()
+ *
+ * Discussion:
+ * Use these API from a Carbon App instead of using HRGetRootURL,
+ * HRGetBaseURL, HRGetHTMLURL, HRGetTitle and HRGetHTMLFile. These
+ * APIs are same in behavior with their old counter parts. The only
+ * difference is that they take CFString, CFURLRef, and FSRef as
+ * parameters.
+ *
+ * Parameters:
+ *
+ * hrRef:
+ * Reference to the renderer object.
+ *
+ * rootString:
+ * Get CFString equivalent for the root url.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGetRootURLAsCFString(hrRef: HRReference; var rootString: CFStringRef): OSStatus; external name '_HRGetRootURLAsCFString';
+
+{
+ * HRGetBaseURLAsCFString()
+ *
+ * Discussion:
+ * Use these API from a Carbon App instead of using HRGetRootURL,
+ * HRGetBaseURL, HRGetHTMLURL, HRGetTitle and HRGetHTMLFile. These
+ * APIs are same in behavior with their old counter parts. The only
+ * difference is that they take CFString, CFURLRef, and FSRef as
+ * parameters.
+ *
+ * Parameters:
+ *
+ * hrRef:
+ * Reference to the renderer object.
+ *
+ * baseString:
+ * Get CFString equivalent for the base url.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGetBaseURLAsCFString(hrRef: HRReference; var baseString: CFStringRef): OSStatus; external name '_HRGetBaseURLAsCFString';
+
+{
+ * HRGetHTMLURLAsCFURL()
+ *
+ * Discussion:
+ * Use these API from a Carbon App instead of using HRGetRootURL,
+ * HRGetBaseURL, HRGetHTMLURL, HRGetTitle and HRGetHTMLFile. These
+ * APIs are same in behavior with their old counter parts. The only
+ * difference is that they take CFString, CFURLRef, and FSRef as
+ * parameters.
+ *
+ * Parameters:
+ *
+ * hrRef:
+ * Reference to the renderer object.
+ *
+ * theURL:
+ * Get currently displayed HTML as a CFURL.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGetHTMLURLAsCFURL(hrRef: HRReference; var theURL: CFURLRef): OSStatus; external name '_HRGetHTMLURLAsCFURL';
+
+{
+ * HRGetTitleAsCFString()
+ *
+ * Discussion:
+ * Use these API from a Carbon App instead of using HRGetRootURL,
+ * HRGetBaseURL, HRGetHTMLURL, HRGetTitle and HRGetHTMLFile. These
+ * APIs are same in behavior with their old counter parts. The only
+ * difference is that they take CFString, CFURLRef, and FSRef as
+ * parameters.
+ *
+ * Parameters:
+ *
+ * hrRef:
+ * Reference to the renderer object.
+ *
+ * title:
+ * Get title of the currently displayed HTML as a CFString.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGetTitleAsCFString(hrRef: HRReference; var title: CFStringRef): OSStatus; external name '_HRGetTitleAsCFString';
+
+{
+ * HRGetHTMLFileAsFSRef()
+ *
+ * Discussion:
+ * Use these API from a Carbon App instead of using HRGetRootURL,
+ * HRGetBaseURL, HRGetHTMLURL, HRGetTitle and HRGetHTMLFile. These
+ * APIs are same in behavior with their old counter parts. The only
+ * difference is that they take CFString, CFURLRef, and FSRef as
+ * parameters.
+ *
+ * Parameters:
+ *
+ * hrRef:
+ * Reference to the renderer object.
+ *
+ * fref:
+ * Get currently displayed HTML as a FSRef.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRGetHTMLFileAsFSRef(hrRef: HRReference; var fref: FSRef): OSStatus; external name '_HRGetHTMLFileAsFSRef';
+
+{ Utilities }
+{
+ * HRUtilCreateFullURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRUtilCreateFullURL(rootURL: ConstCStringPtr; linkURL: ConstCStringPtr; fullURLH: Handle): OSStatus; external name '_HRUtilCreateFullURL';
+
+{
+ * HRUtilGetFSSpecFromURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRUtilGetFSSpecFromURL(rootURL: ConstCStringPtr; linkURL: ConstCStringPtr; var destSpec: FSSpec): OSStatus; external name '_HRUtilGetFSSpecFromURL';
+
+{ urlHandle should be valid on input }
+{
+ * HRUtilGetURLFromFSSpec()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRUtilGetURLFromFSSpec(const (*var*) fsspec_: FSSpec; urlHandle: Handle): OSStatus; external name '_HRUtilGetURLFromFSSpec';
+
+
+{
+ * HRUtilCreateFullCFURL()
+ *
+ * Discussion:
+ * Use these API from a Carbon App instead of using
+ * HRUtilCreateFullURL, HRUtilGetFSSpecFromURL,
+ * HRUtilGetURLFromFSSpec. These APIs are same in behavior with
+ * their old counter parts. The only difference is that they take
+ * CFURLRef, and FSRef as parameters.
+ *
+ * Parameters:
+ *
+ * rootString:
+ * a CFString for the root.
+ *
+ * linkString:
+ * a CFString for a partial link.
+ *
+ * url:
+ * Fully qualified URL is returned after attaching a link string
+ * to the root.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRUtilCreateFullCFURL(rootString: CFStringRef; linkString: CFStringRef; var url: CFURLRef): OSStatus; external name '_HRUtilCreateFullCFURL';
+
+{
+ * HRUtilGetFSRefFromURL()
+ *
+ * Discussion:
+ * Use these API from a Carbon App instead of using
+ * HRUtilCreateFullURL, HRUtilGetFSSpecFromURL,
+ * HRUtilGetURLFromFSSpec. These APIs are same in behavior with
+ * their old counter parts. The only difference is that they take
+ * CFURLRef, and FSRef as parameters.
+ *
+ * Parameters:
+ *
+ * rootString:
+ * a CFString for the root.
+ *
+ * linkString:
+ * a CFString for a partial link.
+ *
+ * destRef:
+ * File reference is returned for the complete path created after
+ * attaching link string to the root. If File does not exist,
+ * fnfErr is returned as a function result.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRUtilGetFSRefFromURL(rootString: CFStringRef; linkString: CFStringRef; var destRef: FSRef): OSStatus; external name '_HRUtilGetFSRefFromURL';
+
+{
+ * HRUtilGetURLFromFSRef()
+ *
+ * Discussion:
+ * Use these API from a Carbon App instead of using
+ * HRUtilCreateFullURL, HRUtilGetFSSpecFromURL,
+ * HRUtilGetURLFromFSSpec. These APIs are same in behavior with
+ * their old counter parts. The only difference is that they take
+ * CFURLRef, and FSRef as parameters.
+ *
+ * Parameters:
+ *
+ * fileRef:
+ * Refernce to a file whose URL is desired.
+ *
+ * url:
+ * a fully qualified URL is returned in this parameter. The
+ * returned URL gives the path of the file specified in the above
+ * parameter.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function HRUtilGetURLFromFSRef(const (*var*) fileRef: FSRef; var url: CFURLRef): OSStatus; external name '_HRUtilGetURLFromFSRef';
+
+{
+ Visited links
+
+ If you register a function here, it will be called to determine
+ whether or not the given URL has been visited. It should return
+ true if the URL has been visited.
+
+ In addition to the URLs that the application may add to the list
+ of visited links, it should also add URLs that the user clicks
+ on. These URLs can be caught by the "add URL to history" callback
+ below.
+ }
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ HRWasURLVisitedProcPtr = function(url: ConstCStringPtr; refCon: UnivPtr): boolean;
+{$elsec}
+ HRWasURLVisitedProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ HRWasURLVisitedUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ HRWasURLVisitedUPP = UniversalProcPtr;
+{$endc}
+ {
+ * HRRegisterWasURLVisitedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HRRegisterWasURLVisitedUPP(inWasURLVisitedUPP: HRWasURLVisitedUPP; hrRef: HRReference; inRefCon: UnivPtr); external name '_HRRegisterWasURLVisitedUPP';
+
+{
+ * HRUnregisterWasURLVisitedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HRUnregisterWasURLVisitedUPP(hrRef: HRReference); external name '_HRUnregisterWasURLVisitedUPP';
+
+{
+ Use these API from a Carbon App instead of using HRRegisterWasURLVisitedUPP, HRUnregisterWasURLVisitedUPP.
+ These APIs are same in behavior with their old counter parts. The only difference is that they take
+ CFURLRef as parameters.
+
+}
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ HRWasCFURLVisitedProcPtr = function(url: CFURLRef; refCon: UnivPtr): boolean;
+{$elsec}
+ HRWasCFURLVisitedProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ HRWasCFURLVisitedUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ HRWasCFURLVisitedUPP = HRWasCFURLVisitedProcPtr;
+{$endc}
+ {
+ * HRRegisterWasCFURLVisitedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HRRegisterWasCFURLVisitedUPP(inWasCFURLVisitedUPP: HRWasCFURLVisitedUPP; hrRef: HRReference; inRefCon: UnivPtr); external name '_HRRegisterWasCFURLVisitedUPP';
+
+{
+ * HRUnregisterWasCFURLVisitedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HRUnregisterWasCFURLVisitedUPP(hrRef: HRReference); external name '_HRUnregisterWasCFURLVisitedUPP';
+
+
+{
+ New URL
+
+ If you register a function here, it will be called every time
+ the renderer is going to display a new URL. A few examples of how
+ you might use this include...
+
+ (a) maintaining a history of URLs
+ (b) maintainging a list of visited links
+ (c) setting a window title based on the new URL
+}
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ HRNewURLProcPtr = function(url: ConstCStringPtr; targetFrame: ConstCStringPtr; addToHistory: boolean; refCon: UnivPtr): OSStatus;
+{$elsec}
+ HRNewURLProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ HRNewURLUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ HRNewURLUPP = UniversalProcPtr;
+{$endc}
+ {
+ * HRRegisterNewURLUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HRRegisterNewURLUPP(inNewURLUPP: HRNewURLUPP; hrRef: HRReference; inRefCon: UnivPtr); external name '_HRRegisterNewURLUPP';
+
+{
+ * HRUnregisterNewURLUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HRUnregisterNewURLUPP(hrRef: HRReference); external name '_HRUnregisterNewURLUPP';
+
+
+{
+ Use these API from a Carbon App instead of using HRRegisterNewURLUPP, HRUnregisterNewURLUPP.
+ These APIs are same in behavior with their old counter parts. The only difference is that they take
+ CFURLRef as parameters.
+}
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ HRNewCFURLProcPtr = function(url: CFURLRef; targetString: CFStringRef; addToHistory: boolean; refCon: UnivPtr): OSStatus;
+{$elsec}
+ HRNewCFURLProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ HRNewCFURLUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ HRNewCFURLUPP = HRNewCFURLProcPtr;
+{$endc}
+ {
+ * HRRegisterNewCFURLUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HRRegisterNewCFURLUPP(inURLUPP: HRNewCFURLUPP; hrRef: HRReference; inRefCon: UnivPtr); external name '_HRRegisterNewCFURLUPP';
+
+{
+ * HRUnregisterNewCFURLUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HRUnregisterNewCFURLUPP(hrRef: HRReference); external name '_HRUnregisterNewCFURLUPP';
+
+
+{
+ URL to FSSpec function
+
+ If you register a function here, it will be called every time
+ the renderer is going to locate a file. The function will be
+ passed an enum indicating the type of file being asked for.
+ }
+
+type
+ URLSourceType = UInt16;
+const
+ kHRLookingForHTMLSource = 1;
+ kHRLookingForImage = 2;
+ kHRLookingForEmbedded = 3;
+ kHRLookingForImageMap = 4;
+ kHRLookingForFrame = 5;
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ HRURLToFSSpecProcPtr = function(rootURL: ConstCStringPtr; linkURL: ConstCStringPtr; var fsspec_: FSSpec; urlSourceType_: URLSourceType; refCon: UnivPtr): OSStatus;
+{$elsec}
+ HRURLToFSSpecProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ HRURLToFSSpecUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ HRURLToFSSpecUPP = UniversalProcPtr;
+{$endc}
+ {
+ * HRRegisterURLToFSSpecUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HRRegisterURLToFSSpecUPP(inURLToFSSpecUPP: HRURLToFSSpecUPP; hrRef: HRReference; inRefCon: UnivPtr); external name '_HRRegisterURLToFSSpecUPP';
+
+{
+ * HRUnregisterURLToFSSpecUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: in HTMLRenderingLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HRUnregisterURLToFSSpecUPP(hrRef: HRReference); external name '_HRUnregisterURLToFSSpecUPP';
+
+
+{
+ Use these API from a Carbon App instead of using HRRegisterURLToFSSpecUPP, HRUnregisterURLToFSSpecUPP.
+ These APIs are same in behavior with their old counter parts. The only difference is that they take
+ FSRef as parameters.
+}
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ HRURLToFSRefProcPtr = function(rootString: CFStringRef; linkString: CFStringRef; var fref: FSRef; urlSourceType_: URLSourceType; refCon: UnivPtr): OSStatus;
+{$elsec}
+ HRURLToFSRefProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ HRURLToFSRefUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ HRURLToFSRefUPP = HRURLToFSRefProcPtr;
+{$endc}
+ {
+ * HRRegisterURLToFSRefUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HRRegisterURLToFSRefUPP(inURLToFSRefUPP: HRURLToFSRefUPP; hrRef: HRReference; inRefCon: UnivPtr); external name '_HRRegisterURLToFSRefUPP';
+
+{
+ * HRUnregisterURLToFSRefUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure HRUnregisterURLToFSRefUPP(hrRef: HRReference); external name '_HRUnregisterURLToFSRefUPP';
+
+
+const
+ uppHRWasURLVisitedProcInfo = $000003D0;
+ uppHRWasCFURLVisitedProcInfo = $000003D0;
+ uppHRNewURLProcInfo = $000037F0;
+ uppHRNewCFURLProcInfo = $000037F0;
+ uppHRURLToFSSpecProcInfo = $0000EFF0;
+ uppHRURLToFSRefProcInfo = $0000EFF0;
+ {
+ * NewHRWasURLVisitedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewHRWasURLVisitedUPP(userRoutine: HRWasURLVisitedProcPtr): HRWasURLVisitedUPP; external name '_NewHRWasURLVisitedUPP'; { old name was NewHRWasURLVisitedProc }
+{
+ * NewHRWasCFURLVisitedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewHRWasCFURLVisitedUPP(userRoutine: HRWasCFURLVisitedProcPtr): HRWasCFURLVisitedUPP; external name '_NewHRWasCFURLVisitedUPP';
+{
+ * NewHRNewURLUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewHRNewURLUPP(userRoutine: HRNewURLProcPtr): HRNewURLUPP; external name '_NewHRNewURLUPP'; { old name was NewHRNewURLProc }
+{
+ * NewHRNewCFURLUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewHRNewCFURLUPP(userRoutine: HRNewCFURLProcPtr): HRNewCFURLUPP; external name '_NewHRNewCFURLUPP';
+{
+ * NewHRURLToFSSpecUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewHRURLToFSSpecUPP(userRoutine: HRURLToFSSpecProcPtr): HRURLToFSSpecUPP; external name '_NewHRURLToFSSpecUPP'; { old name was NewHRURLToFSSpecProc }
+{
+ * NewHRURLToFSRefUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewHRURLToFSRefUPP(userRoutine: HRURLToFSRefProcPtr): HRURLToFSRefUPP; external name '_NewHRURLToFSRefUPP';
+{
+ * DisposeHRWasURLVisitedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeHRWasURLVisitedUPP(userUPP: HRWasURLVisitedUPP); external name '_DisposeHRWasURLVisitedUPP';
+{
+ * DisposeHRWasCFURLVisitedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeHRWasCFURLVisitedUPP(userUPP: HRWasCFURLVisitedUPP); external name '_DisposeHRWasCFURLVisitedUPP';
+{
+ * DisposeHRNewURLUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeHRNewURLUPP(userUPP: HRNewURLUPP); external name '_DisposeHRNewURLUPP';
+{
+ * DisposeHRNewCFURLUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeHRNewCFURLUPP(userUPP: HRNewCFURLUPP); external name '_DisposeHRNewCFURLUPP';
+{
+ * DisposeHRURLToFSSpecUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeHRURLToFSSpecUPP(userUPP: HRURLToFSSpecUPP); external name '_DisposeHRURLToFSSpecUPP';
+{
+ * DisposeHRURLToFSRefUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeHRURLToFSRefUPP(userUPP: HRURLToFSRefUPP); external name '_DisposeHRURLToFSRefUPP';
+{
+ * InvokeHRWasURLVisitedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeHRWasURLVisitedUPP(url: ConstCStringPtr; refCon: UnivPtr; userRoutine: HRWasURLVisitedUPP): boolean; external name '_InvokeHRWasURLVisitedUPP'; { old name was CallHRWasURLVisitedProc }
+{
+ * InvokeHRWasCFURLVisitedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeHRWasCFURLVisitedUPP(url: CFURLRef; refCon: UnivPtr; userRoutine: HRWasCFURLVisitedUPP): boolean; external name '_InvokeHRWasCFURLVisitedUPP';
+{
+ * InvokeHRNewURLUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeHRNewURLUPP(url: ConstCStringPtr; targetFrame: ConstCStringPtr; addToHistory: boolean; refCon: UnivPtr; userRoutine: HRNewURLUPP): OSStatus; external name '_InvokeHRNewURLUPP'; { old name was CallHRNewURLProc }
+{
+ * InvokeHRNewCFURLUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeHRNewCFURLUPP(url: CFURLRef; targetString: CFStringRef; addToHistory: boolean; refCon: UnivPtr; userRoutine: HRNewCFURLUPP): OSStatus; external name '_InvokeHRNewCFURLUPP';
+{
+ * InvokeHRURLToFSSpecUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeHRURLToFSSpecUPP(rootURL: ConstCStringPtr; linkURL: ConstCStringPtr; var fsspec_: FSSpec; urlSourceType_: URLSourceType; refCon: UnivPtr; userRoutine: HRURLToFSSpecUPP): OSStatus; external name '_InvokeHRURLToFSSpecUPP'; { old name was CallHRURLToFSSpecProc }
+{
+ * InvokeHRURLToFSRefUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeHRURLToFSRefUPP(rootString: CFStringRef; linkString: CFStringRef; var fref: FSRef; urlSourceType_: URLSourceType; refCon: UnivPtr; userRoutine: HRURLToFSRefUPP): OSStatus; external name '_InvokeHRURLToFSRefUPP';
+{$ALIGN MAC68K}
+
+
+{unit LanguageAnalysis}
+{
+ File: LanguageAnalysis.p
+
+ Contains: Language Analysis Manager Interfaces
+
+ Version: Technology: Mac OS 8
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1996-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN POWER}
+
+
+type
+ LAEnvironmentRef = ^SInt32; { an opaque 32-bit type }
+ LAEnvironmentRefPtr = ^LAEnvironmentRef; { when a var xx:LAEnvironmentRef parameter can be nil, it is changed to xx: LAEnvironmentRefPtr }
+ LAContextRef = ^SInt32; { an opaque 32-bit type }
+ LAContextRefPtr = ^LAContextRef; { when a var xx:LAContextRef parameter can be nil, it is changed to xx: LAContextRefPtr }
+ LAPropertyKey = AEKeyword;
+ LAPropertyType = DescType;
+ {
+ Data structure for high level API
+ }
+ LAMorphemeRecPtr = ^LAMorphemeRec;
+ LAMorphemeRec = record
+ sourceTextLength: ByteCount;
+ sourceTextPtr: LogicalAddress;
+ morphemeTextLength: ByteCount;
+ morphemeTextPtr: LogicalAddress;
+ partOfSpeech: UInt32;
+ end;
+
+ LAMorphemesArrayPtr = ^LAMorphemesArray;
+ LAMorphemesArray = record
+ morphemesCount: ItemCount;
+ processedTextLength: ByteCount;
+ morphemesTextLength: ByteCount;
+ morphemes: array [0..0] of LAMorphemeRec;
+ end;
+
+
+const
+ kLAMorphemesArrayVersion = 0;
+
+ {
+ Definitions for result path/bundle structure
+ }
+
+type
+ LAMorphemeBundle = AERecord;
+ LAMorphemeBundlePtr = ^LAMorphemeBundle;
+ LAMorphemePath = AERecord;
+ LAMorphemePathPtr = ^LAMorphemePath;
+ LAMorpheme = AERecord;
+ LAMorphemePtr = ^LAMorpheme;
+ LAHomograph = AERecord;
+ LAHomographPtr = ^LAHomograph;
+
+const
+ keyAELAMorphemeBundle = $6C6D6662 (* 'lmfb' *);
+ keyAELAMorphemePath = $6C6D6670 (* 'lmfp' *);
+ keyAELAMorpheme = $6C6D666E (* 'lmfn' *);
+ keyAELAHomograph = $6C6D6668 (* 'lmfh' *);
+
+ typeLAMorphemeBundle = $7265636F (* 'reco' *);
+ typeLAMorphemePath = $7265636F (* 'reco' *);
+ typeLAMorpheme = $6C697374 (* 'list' *);
+ typeLAHomograph = $6C697374 (* 'list' *);
+
+ {
+ Definitions for morpheme/homograph information
+ }
+ keyAEMorphemePartOfSpeechCode = $6C616D63 (* 'lamc' *);
+ keyAEMorphemeTextRange = $6C616D74 (* 'lamt' *);
+
+ typeAEMorphemePartOfSpeechCode = $6C616D63 (* 'lamc' *);
+ typeAEMorphemeTextRange = $6C616D74 (* 'lamt' *);
+
+
+type
+ MorphemePartOfSpeech = UInt32;
+ MorphemeTextRangePtr = ^MorphemeTextRange;
+ MorphemeTextRange = record
+ sourceOffset: UInt32;
+ length: UInt32;
+ end;
+
+ {
+ Mask for High level API convert flags
+ }
+
+const
+ kLAEndOfSourceTextMask = $00000001;
+
+ {
+ Constants for leading/trailing path of analysis function
+ }
+ kLADefaultEdge = 0;
+ kLAFreeEdge = 1;
+ kLAIncompleteEdge = 2;
+
+ {
+ Constants for confirm and shift function
+ }
+ kLAAllMorphemes = 0;
+
+
+ {
+ Library version
+ }
+ {
+ * LALibraryVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LALibraryVersion: UInt32; external name '_LALibraryVersion';
+
+{
+ High level API
+}
+{
+ * LATextToMorphemes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LATextToMorphemes(context: LAContextRef; preferedEncoding: TextEncoding; textLength: ByteCount; sourceText: ConstLogicalAddress; bufferSize: ByteCount; convertFlags: OptionBits; structureVersion: UInt32; var acceptedLength: ByteCount; resultBuffer: LAMorphemesArrayPtr): OSStatus; external name '_LATextToMorphemes';
+
+{
+ Handling Context
+}
+{
+ * LAOpenAnalysisContext()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LAOpenAnalysisContext(environ: LAEnvironmentRef; var context: LAContextRef): OSStatus; external name '_LAOpenAnalysisContext';
+
+{
+ * LACloseAnalysisContext()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LACloseAnalysisContext(context: LAContextRef): OSStatus; external name '_LACloseAnalysisContext';
+
+{
+ Handling Environment
+}
+{
+ * LAGetEnvironmentList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LAGetEnvironmentList(maxCount: UInt32; var actualCount: UInt32; var environmentList: LAEnvironmentRef): OSStatus; external name '_LAGetEnvironmentList';
+
+{
+ * LAGetEnvironmentName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LAGetEnvironmentName(environment: LAEnvironmentRef; var environmentName: Str63): OSStatus; external name '_LAGetEnvironmentName';
+
+{
+ * LAGetEnvironmentRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LAGetEnvironmentRef(const (*var*) targetEnvironmentName: Str63; var environment: LAEnvironmentRef): OSStatus; external name '_LAGetEnvironmentRef';
+
+{
+ * LACreateCustomEnvironment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LACreateCustomEnvironment(baseEnvironment: LAEnvironmentRef; const (*var*) newEnvironmentName: Str63; persistent: boolean; var newEnvironment: LAEnvironmentRef): OSStatus; external name '_LACreateCustomEnvironment';
+
+{
+ * LADeleteCustomEnvironment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LADeleteCustomEnvironment(environment: LAEnvironmentRef): OSStatus; external name '_LADeleteCustomEnvironment';
+
+{
+ Handling dictionries
+}
+{
+ * LAOpenDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LAOpenDictionary(environ: LAEnvironmentRef; const (*var*) dictionary: FSSpec): OSStatus; external name '_LAOpenDictionary';
+
+{
+ * LACloseDictionary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LACloseDictionary(environ: LAEnvironmentRef; const (*var*) dictionary: FSSpec): OSStatus; external name '_LACloseDictionary';
+
+{
+ * LAListAvailableDictionaries()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LAListAvailableDictionaries(environ: LAEnvironmentRef; maxCount: ItemCount; var actualCount: ItemCount; var dictionaryList: FSSpec; var opened: boolean): OSStatus; external name '_LAListAvailableDictionaries';
+
+{
+ * LAAddNewWord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LAAddNewWord(environ: LAEnvironmentRef; const (*var*) dictionary: FSSpec; const (*var*) dataList: AEDesc): OSStatus; external name '_LAAddNewWord';
+
+{
+ Analyzing text
+}
+{
+ * LAMorphemeAnalysis()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LAMorphemeAnalysis(context: LAContextRef; text: ConstUniCharArrayPtr; textLength: UniCharCount; var leadingPath: LAMorphemePath; var trailingPath: LAMorphemePath; pathCount: ItemCount; var result: LAMorphemeBundle): OSStatus; external name '_LAMorphemeAnalysis';
+
+{
+ * LAContinuousMorphemeAnalysis()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LAContinuousMorphemeAnalysis(context: LAContextRef; text: ConstUniCharArrayPtr; textLength: UniCharCount; incrementalText: boolean; var leadingPath: LAMorphemePath; var trailingPath: LAMorphemePath; var modified: boolean): OSStatus; external name '_LAContinuousMorphemeAnalysis';
+
+{
+ * LAGetMorphemes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LAGetMorphemes(context: LAContextRef; var result: LAMorphemePath): OSStatus; external name '_LAGetMorphemes';
+
+{
+ * LAShiftMorphemes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LAShiftMorphemes(context: LAContextRef; morphemeCount: ItemCount; var path: LAMorphemePath; var shiftedLength: UniCharCount): OSStatus; external name '_LAShiftMorphemes';
+
+{
+ * LAResetAnalysis()
+ *
+ * Availability:
+ * Non-Carbon CFM: in LanguageAnalysisLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LAResetAnalysis(context: LAContextRef): OSStatus; external name '_LAResetAnalysis';
+
+{
+ Check Language Analysis Manager availability
+}
+{$ifc TARGET_RT_MAC_CFM}
+{
+ LALanguageAnalysisAvailable() is a macro available only in C/C++.
+ To get the same functionality from pascal or assembly, you need
+ to test if Language Analysis Manager functions are not NULL.
+ For instance:
+
+ IF @LALibraryVersion <> kUnresolvedCFragSymbolAddress THEN
+ gLanguageAnalysisAvailable = TRUE;
+ ELSE
+ gLanguageAnalysisAvailable = FALSE;
+ end
+
+}
+{$elsec}
+ {$ifc TARGET_RT_MAC_MACHO}
+{ Language Analysis Manager is always available on OS X }
+ {$endc}
+{$endc}
+
+{
+=============================================================================================
+ Definitions for Japanese Analysis Module
+=============================================================================================
+}
+{
+ Names for default environments for Japanese analysis
+}
+{
+ File cretor for dictionary of Apple Japanese access method
+}
+
+const
+ kAppleJapaneseDictionarySignature = $6A6C616E (* 'jlan' *);
+
+ {
+ Engine limitations
+ }
+ kMaxInputLengthOfAppleJapaneseEngine = 200;
+
+ {
+ Definitions of information in the path/bundle
+ }
+
+type
+ JapanesePartOfSpeech = MorphemePartOfSpeech;
+ HomographWeight = UInt16;
+ HomographAccent = UInt8;
+ {
+ AE keywords and type definitions for morpheme/homograph information
+ }
+
+const
+ keyAEHomographDicInfo = $6C616864 (* 'lahd' *);
+ keyAEHomographWeight = $6C616877 (* 'lahw' *);
+ keyAEHomographAccent = $6C616861 (* 'laha' *);
+
+ typeAEHomographDicInfo = $6C616864 (* 'lahd' *);
+ typeAEHomographWeight = $73686F72 (* 'shor' *);
+ typeAEHomographAccent = $6C616861 (* 'laha' *);
+
+ {
+ Structure for dictionary information of homograph
+ }
+
+type
+ HomographDicInfoRecPtr = ^HomographDicInfoRec;
+ HomographDicInfoRec = record
+ dictionaryID: DCMDictionaryID;
+ uniqueID: DCMUniqueID;
+ end;
+
+ {
+ =============================================================================================
+ Definitions for Japanese part of speeches
+ =============================================================================================
+ }
+ {
+ Masks for part of speeches
+ }
+
+const
+ kLASpeechRoughClassMask = $0000F000;
+ kLASpeechMediumClassMask = $0000FF00;
+ kLASpeechStrictClassMask = $0000FFF0;
+ kLASpeechKatsuyouMask = $0000000F;
+
+
+ {
+ Part of speeches
+ }
+ kLASpeechMeishi = $00000000; { noun }
+ kLASpeechFutsuuMeishi = $00000000; { general noun }
+ kLASpeechJinmei = $00000100; { person name }
+ kLASpeechJinmeiSei = $00000110; { family name }
+ kLASpeechJinmeiMei = $00000120; { first name }
+ kLASpeechChimei = $00000200; { place name }
+ kLASpeechSetsubiChimei = $00000210; { place name with suffix }
+ kLASpeechSoshikimei = $00000300; { organization name }
+ kLASpeechKoyuuMeishi = $00000400; { proper noun }
+ kLASpeechSahenMeishi = $00000500; { special noun }
+ kLASpeechKeidouMeishi = $00000600; { special noun }
+ kLASpeechRentaishi = $00001000;
+ kLASpeechFukushi = $00002000; { adverb }
+ kLASpeechSetsuzokushi = $00003000; { conjunction }
+ kLASpeechKandoushi = $00004000;
+ kLASpeechDoushi = $00005000; { verb }
+ kLASpeechGodanDoushi = $00005000;
+ kLASpeechKagyouGodan = $00005000;
+ kLASpeechSagyouGodan = $00005010;
+ kLASpeechTagyouGodan = $00005020;
+ kLASpeechNagyouGodan = $00005030;
+ kLASpeechMagyouGodan = $00005040;
+ kLASpeechRagyouGodan = $00005050;
+ kLASpeechWagyouGodan = $00005060;
+ kLASpeechGagyouGodan = $00005070;
+ kLASpeechBagyouGodan = $00005080;
+ kLASpeechIchidanDoushi = $00005100;
+ kLASpeechKahenDoushi = $00005200;
+ kLASpeechSahenDoushi = $00005300;
+ kLASpeechZahenDoushi = $00005400;
+ kLASpeechKeiyoushi = $00006000; { adjective }
+ kLASpeechKeiyoudoushi = $00007000;
+ kLASpeechSettougo = $00008000; { prefix }
+ kLASpeechSuujiSettougo = $00008100; { prefix for numbers }
+ kLASpeechSetsubigo = $00009000; { suffix }
+ kLASpeechJinmeiSetsubigo = $00009100; { suffix for person name }
+ kLASpeechChimeiSetsubigo = $00009200; { suffix for place name }
+ kLASpeechSoshikimeiSetsubigo = $00009300; { suffix for organization name }
+ kLASpeechSuujiSetsubigo = $00009400; { suffix for numbers }
+ kLASpeechMuhinshi = $0000A000; { no category }
+ kLASpeechTankanji = $0000A000; { character }
+ kLASpeechKigou = $0000A100; { symbol }
+ kLASpeechKuten = $0000A110;
+ kLASpeechTouten = $0000A120;
+ kLASpeechSuushi = $0000A200; { numbers }
+ kLASpeechDokuritsugo = $0000A300;
+ kLASpeechSeiku = $0000A400;
+ kLASpeechJodoushi = $0000B000; { auxiliary verb }
+ kLASpeechJoshi = $0000C000; { postpositional particle }
+
+
+ {
+ Conjugations
+ }
+ kLASpeechKatsuyouGokan = $00000001; { stem }
+ kLASpeechKatsuyouMizen = $00000002;
+ kLASpeechKatsuyouRenyou = $00000003;
+ kLASpeechKatsuyouSyuushi = $00000004;
+ kLASpeechKatsuyouRentai = $00000005;
+ kLASpeechKatsuyouKatei = $00000006;
+ kLASpeechKatsuyouMeirei = $00000007;
+
+
+{$ALIGN MAC68K}
+
+
+{unit Lists}
+{
+ File: HIToolbox/Lists.h
+
+ Contains: List Manager Interfaces.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1985-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+type
+ Cell = Point;
+ CellPtr = ^Cell;
+type
+ ListBounds = Rect;
+ ListBoundsPtr = ^ListBounds;
+ DataArray = packed array [0..32000] of char;
+type
+ DataPtr = ^DataArray;
+type
+ DataHandle = ^DataPtr;
+type
+ ListSearchProcPtr = function( aPtr: Ptr; bPtr: Ptr; aLen: SInt16; bLen: SInt16 ): SInt16;
+type
+ ListClickLoopProcPtr = function: Boolean;
+type
+ ListSearchUPP = ListSearchProcPtr;
+type
+ ListClickLoopUPP = ListClickLoopProcPtr;
+type
+ ListRecPtr = ^ListRec;
+ ListRec = record
+ rView: Rect; { in Carbon use Get/SetListViewBounds}
+ port: GrafPtr; { in Carbon use Get/SetListPort}
+ indent: Point; { in Carbon use Get/SetListCellIndent}
+ cellSize: Point; { in Carbon use Get/SetListCellSize}
+ visible: ListBounds; { in Carbon use GetListVisibleCells}
+ vScroll: ControlRef; { in Carbon use GetListVerticalScrollBar}
+ hScroll: ControlRef; { in Carbon use GetListHorizontalScrollBar}
+ selFlags: SInt8; { in Carbon use Get/SetListSelectionFlags}
+ lActive: Boolean; { in Carbon use LActivate, GetListActive}
+ lReserved: SInt8; { not supported in Carbon }
+ listFlags: SInt8; { in Carbon use Get/SetListFlags }
+ clikTime: SInt32; { in Carbon use Get/SetListClickTime}
+ clikLoc: Point; { in Carbon use GetListClickLocation}
+ mouseLoc: Point; { in Carbon use GetListMouseLocation}
+ lClickLoop: ListClickLoopUPP; { in Carbon use Get/SetListClickLoop}
+ lastClick: Cell; { in Carbon use SetListLastClick}
+ refCon: SInt32; { in Carbon use Get/SetListRefCon}
+ listDefProc: Handle; { not supported in Carbon }
+ userHandle: Handle; { in Carbon use Get/SetListUserHandle}
+ dataBounds: ListBounds; { in Carbon use GetListDataBounds}
+ cells: DataHandle; { in Carbon use LGet/SetCell}
+ maxIndex: SInt16; { in Carbon use LGet/SetCell}
+ cellArray: array [0..0] of SInt16; { in Carbon use LGet/SetCell}
+ end;
+type
+ ListPtr = ListRecPtr;
+type
+ ListHandle = ^ListPtr;
+{ ListRef is obsolete. Use ListHandle. }
+type
+ ListRef = ListHandle;
+
+
+const
+{ ListRec.listFlags bits}
+ lDrawingModeOffBit = 3;
+ lDoVAutoscrollBit = 1;
+ lDoHAutoscrollBit = 0;
+
+const
+{ ListRec.listFlags masks}
+ lDrawingModeOff = 8;
+ lDoVAutoscroll = 2;
+ lDoHAutoscroll = 1;
+
+
+const
+{ ListRec.selFlags bits}
+ lOnlyOneBit = 7;
+ lExtendDragBit = 6;
+ lNoDisjointBit = 5;
+ lNoExtendBit = 4;
+ lNoRectBit = 3;
+ lUseSenseBit = 2;
+ lNoNilHiliteBit = 1;
+
+
+const
+{ ListRec.selFlags masks}
+ lOnlyOne = $FFFFFF80; {-128}
+ lExtendDrag = 64;
+ lNoDisjoint = 32;
+ lNoExtend = 16;
+ lNoRect = 8;
+ lUseSense = 4;
+ lNoNilHilite = 2;
+
+
+const
+{ LDEF messages}
+ lInitMsg = 0;
+ lDrawMsg = 1;
+ lHiliteMsg = 2;
+ lCloseMsg = 3;
+
+{
+ StandardIconListCellDataRec is the cell data format for
+ use with the standard icon list (kListDefStandardIconType).
+}
+type
+ StandardIconListCellDataRec = record
+ iconHandle: Handle;
+ font: SInt16;
+ face: SInt16;
+ size: SInt16;
+ name: Str255;
+ end;
+ StandardIconListCellDataPtr = ^StandardIconListCellDataRec;
+
+
+type
+ ListDefProcPtr = procedure( lMessage: SInt16; lSelect: Boolean; var lRect: Rect; lCell: Cell; lDataOffset: SInt16; lDataLen: SInt16; lHandle: ListHandle );
+type
+ ListDefUPP = ListDefProcPtr;
+{
+ * NewListSearchUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewListSearchUPP( userRoutine: ListSearchProcPtr ): ListSearchUPP; external name '_NewListSearchUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewListClickLoopUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewListClickLoopUPP( userRoutine: ListClickLoopProcPtr ): ListClickLoopUPP; external name '_NewListClickLoopUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewListDefUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewListDefUPP( userRoutine: ListDefProcPtr ): ListDefUPP; external name '_NewListDefUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeListSearchUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeListSearchUPP( userUPP: ListSearchUPP ); external name '_DisposeListSearchUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeListClickLoopUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeListClickLoopUPP( userUPP: ListClickLoopUPP ); external name '_DisposeListClickLoopUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeListDefUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeListDefUPP( userUPP: ListDefUPP ); external name '_DisposeListDefUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeListSearchUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeListSearchUPP( aPtr: Ptr; bPtr: Ptr; aLen: SInt16; bLen: SInt16; userUPP: ListSearchUPP ): SInt16; external name '_InvokeListSearchUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeListClickLoopUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeListClickLoopUPP( userUPP: ListClickLoopUPP ): Boolean; external name '_InvokeListClickLoopUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeListDefUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeListDefUPP( lMessage: SInt16; lSelect: Boolean; var lRect: Rect; lCell: Cell; lDataOffset: SInt16; lDataLen: SInt16; lHandle: ListHandle; userUPP: ListDefUPP ); external name '_InvokeListDefUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+const
+ kListDefProcPtr = 0;
+ kListDefUserProcType = kListDefProcPtr;
+ kListDefStandardTextType = 1;
+ kListDefStandardIconType = 2;
+
+type
+ ListDefType = UInt32;
+ ListDefSpec = record
+ defType: ListDefType;
+ case SInt16 of
+ 0: (
+ userProc: ListDefUPP;
+ );
+ end;
+type
+ ListDefSpecPtr = ^ListDefSpec;
+{
+ * CreateCustomList()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function CreateCustomList( const (*var*) rView: Rect; const (*var*) dataBounds: ListBounds; cellSize: Point; const (*var*) theSpec: ListDefSpec; theWindow: WindowRef; drawIt: Boolean; hasGrow: Boolean; scrollHoriz: Boolean; scrollVert: Boolean; var outList: ListHandle ): OSStatus; external name '_CreateCustomList';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LNew()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LNew( const (*var*) rView: Rect; const (*var*) dataBounds: ListBounds; cSize: Point; theProc: SInt16; theWindow: WindowRef; drawIt: Boolean; hasGrow: Boolean; scrollHoriz: Boolean; scrollVert: Boolean ): ListHandle; external name '_LNew';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LDispose()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LDispose( lHandle: ListHandle ); external name '_LDispose';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LAddColumn()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LAddColumn( count: SInt16; colNum: SInt16; lHandle: ListHandle ): SInt16; external name '_LAddColumn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LAddRow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LAddRow( count: SInt16; rowNum: SInt16; lHandle: ListHandle ): SInt16; external name '_LAddRow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LDelColumn()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LDelColumn( count: SInt16; colNum: SInt16; lHandle: ListHandle ); external name '_LDelColumn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LDelRow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LDelRow( count: SInt16; rowNum: SInt16; lHandle: ListHandle ); external name '_LDelRow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LGetSelect()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LGetSelect( next: Boolean; var theCell: Cell; lHandle: ListHandle ): Boolean; external name '_LGetSelect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LLastClick()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LLastClick( lHandle: ListHandle ): Cell; external name '_LLastClick';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LNextCell()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LNextCell( hNext: Boolean; vNext: Boolean; var theCell: Cell; lHandle: ListHandle ): Boolean; external name '_LNextCell';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LSearch()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LSearch( dataPtr: {const} UnivPtr; dataLen: SInt16; searchProc: ListSearchUPP; var theCell: Cell; lHandle: ListHandle ): Boolean; external name '_LSearch';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LSize()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LSize( listWidth: SInt16; listHeight: SInt16; lHandle: ListHandle ); external name '_LSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LSetDrawingMode()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LSetDrawingMode( drawIt: Boolean; lHandle: ListHandle ); external name '_LSetDrawingMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LScroll()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LScroll( dCols: SInt16; dRows: SInt16; lHandle: ListHandle ); external name '_LScroll';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LAutoScroll()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LAutoScroll( lHandle: ListHandle ); external name '_LAutoScroll';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LUpdate()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LUpdate( theRgn: RgnHandle; lHandle: ListHandle ); external name '_LUpdate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LActivate()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LActivate( act: Boolean; lHandle: ListHandle ); external name '_LActivate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LCellSize()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LCellSize( cSize: Point; lHandle: ListHandle ); external name '_LCellSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LClick()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function LClick( pt: Point; modifiers: EventModifiers; lHandle: ListHandle ): Boolean; external name '_LClick';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LAddToCell()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LAddToCell( dataPtr: {const} UnivPtr; dataLen: SInt16; theCell: Cell; lHandle: ListHandle ); external name '_LAddToCell';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LClrCell()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LClrCell( theCell: Cell; lHandle: ListHandle ); external name '_LClrCell';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LGetCell()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LGetCell( dataPtr: UnivPtr; var dataLen: SInt16; theCell: Cell; lHandle: ListHandle ); external name '_LGetCell';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LRect()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LRect( var cellRect: Rect; theCell: Cell; lHandle: ListHandle ); external name '_LRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LSetCell()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LSetCell( dataPtr: {const} UnivPtr; dataLen: SInt16; theCell: Cell; lHandle: ListHandle ); external name '_LSetCell';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LSetSelect()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LSetSelect( setIt: Boolean; theCell: Cell; lHandle: ListHandle ); external name '_LSetSelect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LDraw()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LDraw( theCell: Cell; lHandle: ListHandle ); external name '_LDraw';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * LGetCellDataLocation()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure LGetCellDataLocation( var offset: SInt16; var len: SInt16; theCell: Cell; lHandle: ListHandle ); external name '_LGetCellDataLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Routines available in Carbon only}
+
+{
+ * RegisterListDefinition()
+ *
+ * Summary:
+ * Registers a binding between a resource ID and a list definition
+ * function.
+ *
+ * Discussion:
+ * In the Mac OS 8.x List Manager, a 'ldes' resource can contain an
+ * embedded LDEF procID that is used by the List Manager as the
+ * resource ID of an 'LDEF' resource to measure and draw the list.
+ * Since LDEFs can no longer be packaged as code resources on
+ * Carbon, the procID can no longer refer directly to an LDEF
+ * resource. However, using RegisterListDefinition you can instead
+ * specify a UniversalProcPtr pointing to code in your application
+ * code fragment.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inResID:
+ * An LDEF proc ID, as used in a 'ldes' resource.
+ *
+ * inDefSpec:
+ * Specifies the ListDefUPP that should be used for lists with the
+ * given LDEF procID.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function RegisterListDefinition( inResID: SInt16; inDefSpec: ListDefSpecPtr ): OSStatus; external name '_RegisterListDefinition';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+
+{
+ * laddtocell()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * lclrcell()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * lgetcelldatalocation()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * lgetcell()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * lnew()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * lrect()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * lsetcell()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * lsetselect()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * ldraw()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * lclick()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * lcellsize()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+
+{ Getters }
+{
+ * GetListViewBounds()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListViewBounds( list: ListHandle; var view: Rect ): RectPtr; external name '_GetListViewBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListPort()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListPort( list: ListHandle ): CGrafPtr; external name '_GetListPort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListCellIndent()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListCellIndent( list: ListHandle; var indent: Point ): PointPtr; external name '_GetListCellIndent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListCellSize()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListCellSize( list: ListHandle; var size: Point ): PointPtr; external name '_GetListCellSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListVisibleCells()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListVisibleCells( list: ListHandle; var visible: ListBounds ): ListBoundsPtr; external name '_GetListVisibleCells';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListVerticalScrollBar()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListVerticalScrollBar( list: ListHandle ): ControlRef; external name '_GetListVerticalScrollBar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListHorizontalScrollBar()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListHorizontalScrollBar( list: ListHandle ): ControlRef; external name '_GetListHorizontalScrollBar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListActive()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListActive( list: ListHandle ): Boolean; external name '_GetListActive';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListClickTime()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListClickTime( list: ListHandle ): SInt32; external name '_GetListClickTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListClickLocation()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListClickLocation( list: ListHandle; var click: Point ): PointPtr; external name '_GetListClickLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListMouseLocation()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListMouseLocation( list: ListHandle; var mouse: Point ): PointPtr; external name '_GetListMouseLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListClickLoop()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListClickLoop( list: ListHandle ): ListClickLoopUPP; external name '_GetListClickLoop';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListRefCon()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListRefCon( list: ListHandle ): SInt32; external name '_GetListRefCon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListDefinition()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListDefinition( list: ListHandle ): Handle; external name '_GetListDefinition';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListUserHandle()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListUserHandle( list: ListHandle ): Handle; external name '_GetListUserHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListDataBounds()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListDataBounds( list: ListHandle; var bounds: ListBounds ): ListBoundsPtr; external name '_GetListDataBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListDataHandle()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListDataHandle( list: ListHandle ): DataHandle; external name '_GetListDataHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListFlags()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListFlags( list: ListHandle ): OptionBits; external name '_GetListFlags';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetListSelectionFlags()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+function GetListSelectionFlags( list: ListHandle ): OptionBits; external name '_GetListSelectionFlags';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Setters }
+{
+ * SetListViewBounds()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetListViewBounds( list: ListHandle; const (*var*) view: Rect ); external name '_SetListViewBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetListPort()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetListPort( list: ListHandle; port: CGrafPtr ); external name '_SetListPort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetListCellIndent()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetListCellIndent( list: ListHandle; var indent: Point ); external name '_SetListCellIndent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetListClickTime()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetListClickTime( list: ListHandle; time: SInt32 ); external name '_SetListClickTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetListClickLoop()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetListClickLoop( list: ListHandle; clickLoop: ListClickLoopUPP ); external name '_SetListClickLoop';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetListLastClick()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetListLastClick( list: ListHandle; var lastClick: Cell ); external name '_SetListLastClick';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetListRefCon()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetListRefCon( list: ListHandle; refCon: SInt32 ); external name '_SetListRefCon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetListUserHandle()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetListUserHandle( list: ListHandle; userHandle: Handle ); external name '_SetListUserHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetListFlags()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetListFlags( list: ListHandle; listFlags: OptionBits ); external name '_SetListFlags';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetListSelectionFlags()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure SetListSelectionFlags( list: ListHandle; selectionFlags: OptionBits ); external name '_SetListSelectionFlags';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ WARNING: These may go away in a future build. Beware! }
+{
+ * SetListDefinition()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * SetListCellSize()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * SetListHorizontalScrollBar()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * SetListVerticalScrollBar()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * SetListVisibleCells()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+
+
+{unit MacApplication}
+{
+ File: HIToolbox/MacApplication.h
+
+ Contains: Application-level APIs
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 2000-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{
+ * kHIToolboxVersionNumber
+ *
+ * Discussion:
+ * The current build number of HIToolbox.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kHIToolboxVersionNumber: Float32; external name '_kHIToolboxVersionNumber'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+// the HIToolbox version number for various Mac OS X releases
+const
+ kHIToolboxVersionNumber10_3 = 145.0;
+const
+ kHIToolboxVersionNumber10_3_2 = 145.35;
+const
+ kHIToolboxVersionNumber10_3_3 = 145.38;
+const
+ kHIToolboxVersionNumber10_3_4 = 145.41;
+const
+ kHIToolboxVersionNumber10_3_5 = 145.43;
+
+
+{
+ * Summary:
+ * Controls the presentation of system-provided user interface
+ * elements.
+ *
+ * Discussion:
+ * Note that the system UI mode is a per-process state. Switching
+ * from a process that is suppressing system UI to another process
+ * that is not will cause system UI elements to become visible
+ * automatically. Switching back to the first process will suppress
+ * system UI elements again.
+ }
+const
+{
+ * In this mode, all standard system UI elements are visible.
+ }
+ kUIModeNormal = 0;
+
+ {
+ * In this mode, system UI elements which cover the "content area" of
+ * the screen (the area other than the menubar) are hidden. However,
+ * these elements may automatically show themselves in response to
+ * mouse movements or other user activity; specifically, the Dock
+ * will still show itself automatically when the mouse moves into the
+ * Dock's auto-show region.
+ }
+ kUIModeContentSuppressed = 1;
+
+ {
+ * In this mode, system UI elements which cover the "content area" of
+ * the screen (the area other than the menubar) are hidden. Unlike
+ * kUIModeContentSuppressed, most UI elements will not automatically
+ * show themselves in this mode.
+ }
+ kUIModeContentHidden = 2;
+
+ {
+ * In this mode, all system UI elements, including the menubar, are
+ * hidden. However, these elements may automatically show themselves
+ * in response to mouse movements or other user activity;
+ * specifically, the Dock and menubar will still show themselves
+ * automatically when the mouse moves into the Dock's auto-show
+ * region. Available in Mac OS X 10.3 and later.
+ }
+ kUIModeAllSuppressed = 4;
+
+ {
+ * In this mode, all system UI elements, including the menubar, are
+ * hidden. Most system UI elements will not automatically show
+ * themselves in this mode. The application may request that the
+ * menubar automatically show itself while in this mode by passing
+ * the kUIOptionAutoShowMenuBar flag to SetSystemUIMode.
+ }
+ kUIModeAllHidden = 3;
+
+type
+ SystemUIMode = UInt32;
+ SystemUIModePtr = ^SystemUIMode;
+
+{
+ * Summary:
+ * Controls optional behavior of system-provided user interface
+ * elements.
+ }
+const
+{
+ * Requests that the menubar automatically show itself when the user
+ * moves the mouse into the screen area that would ordinarily be
+ * occupied by the menubar. Only valid with kUIModeAllHidden.
+ }
+ kUIOptionAutoShowMenuBar = 1 shl 0;
+
+ {
+ * Disables all items in the Apple menu. Valid for all modes.
+ }
+ kUIOptionDisableAppleMenu = 1 shl 2;
+
+ {
+ * The active application may not be changed while this process is
+ * active. Currently disables the Command-Tab and Command-Shift-Tab
+ * key sequences to switch the active process, and the global window
+ * rotation key sequence selected by the user in the Keyboard
+ * preference pane. SetFrontProcess may still be used to explicitly
+ * switch the active process. Only valid with modes other than
+ * kUIModeNormal.
+ }
+ kUIOptionDisableProcessSwitch = 1 shl 3;
+
+ {
+ * The Force Quit window may not be displayed while this process is
+ * active. Currently disables the Command-Option-Escape key sequence
+ * to open the Force Quit window and the Force Quit menu item in the
+ * Apple menu. Only valid with modes other than kUIModeNormal.
+ }
+ kUIOptionDisableForceQuit = 1 shl 4;
+
+ {
+ * The current login session may not be terminated while this process
+ * is active. Currently disables the Power key and the Restart, Shut
+ * Down, and Log Out menu items in the Apple menu. Only valid with
+ * modes other than kUIModeNormal.
+ }
+ kUIOptionDisableSessionTerminate = 1 shl 5;
+
+ {
+ * The Hide menu item in the Application menu is disabled. Note that
+ * this option does not prevent this application from being hidden if
+ * Hide Others is selected in some other application. Available in
+ * Mac OS X 10.3 and later.
+ }
+ kUIOptionDisableHide = 1 shl 6;
+
+type
+ SystemUIOptions = OptionBits;
+ SystemUIOptionsPtr = ^SystemUIOptions;
+{
+ * SetSystemUIMode()
+ *
+ * Summary:
+ * Sets the presentation mode for system-provided user interface
+ * elements.
+ *
+ * Discussion:
+ * The presentation mode of an application determines which
+ * system-provided user interface elements are visible on thes
+ * screen. When the frontmost application changes its presentation
+ * mode, a kEventAppSystemUIModeChanged Carbon event is sent to all
+ * applications that have registered for the event. This event is
+ * also sent when an application is activated; it contains the newly
+ * active application's presentation mode.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMode:
+ * The new mode.
+ *
+ * inOptions:
+ * Options controlling how the new mode behaves.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function SetSystemUIMode( inMode: SystemUIMode; inOptions: SystemUIOptions ): OSStatus; external name '_SetSystemUIMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * GetSystemUIMode()
+ *
+ * Summary:
+ * Returns the current presentation mode of the application.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * outMode:
+ * On exit, contains the current mode. You may pass NULL if you
+ * don't need this information.
+ *
+ * outOptions:
+ * On exit, contains the current options for the mode. You may
+ * pass NULL if you don't need this information.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+procedure GetSystemUIMode( outMode: SystemUIModePtr { can be NULL }; outOptions: SystemUIOptionsPtr { can be NULL } ); external name '_GetSystemUIMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIApplicationGetCurrent()
+ *
+ * Discussion:
+ * Returns the HIObjectRef of the currently running application
+ * object. This HIObject's EventTargetRef is what will be returned
+ * from GetApplicationEventTarget.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * The HIObjectRef of the currently running application object.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIApplicationGetCurrent: HIObjectRef; external name '_HIApplicationGetCurrent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * SetApplicationDockTileImage()
+ *
+ * Discussion:
+ * Sets the image for the tile in the dock that represents your
+ * application while it is running. If you set the image, it will
+ * NOT revert back to its original image when your application
+ * terminates. You need to manually restore it before quitting.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inImage:
+ * The image you wish to have as your tile image.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function SetApplicationDockTileImage( inImage: CGImageRef ): OSStatus; external name '_SetApplicationDockTileImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * OverlayApplicationDockTileImage()
+ *
+ * Discussion:
+ * Takes the image passed in and composites it on top of the current
+ * image of your application's dock tile. You might do this to put a
+ * standard badge over your application's icon to indicate something
+ * to the user.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inImage:
+ * The image you wish to overlay onto your tile image.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function OverlayApplicationDockTileImage( inImage: CGImageRef ): OSStatus; external name '_OverlayApplicationDockTileImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RestoreApplicationDockTileImage()
+ *
+ * Discussion:
+ * Restores the tile for your appliation in the dock to its normal
+ * image (your application icon). You would use this if some overlay
+ * or change of the application icon needed to be removed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function RestoreApplicationDockTileImage: OSStatus; external name '_RestoreApplicationDockTileImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * BeginCGContextForApplicationDockTile()
+ *
+ * Discussion:
+ * Creates and returns a CGContextRef. You can use this context to
+ * draw into your application's dock tile with Quartz. You **MUST**
+ * call EndCGContextForApplicationDockTile and NOT CGEndContext when
+ * using this API, as it locks your application's tile in the dock.
+ * If you call CGEndContext, the dock will never know you are done
+ * with the tile.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * An Quartz (Core Graphics) context reference.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function BeginCGContextForApplicationDockTile: CGContextRef; external name '_BeginCGContextForApplicationDockTile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * EndCGContextForApplicationDockTile()
+ *
+ * Discussion:
+ * Ends the CG context for your application tile and frees the lock
+ * on the application dock tile. You **MUST** call this routine and
+ * NOT CGEndContext when using BeginCGContextForApplicationDockTile,
+ * as it locks your application's tile in the dock. If you call
+ * CGEndContext, the dock will never know you are done with the tile.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inContext:
+ * The context to end. The context is invalid after this call and
+ * should no longer be used.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure EndCGContextForApplicationDockTile( inContext: CGContextRef ); external name '_EndCGContextForApplicationDockTile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * BeginQDContextForApplicationDockTile()
+ *
+ * Discussion:
+ * Creates and returns a CGrafPtr for your application's tile in the
+ * dock. You can use this port to draw into your application's dock
+ * tile with Quickdraw. You **MUST** call
+ * EndQDContextForApplicationDockTile and NOT DisposePort when using
+ * this API, as it locks your application's tile in the dock. If you
+ * call DisposePort, the dock will never know you are done with the
+ * tile.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * A Quickdraw port reference.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function BeginQDContextForApplicationDockTile: CGrafPtr; external name '_BeginQDContextForApplicationDockTile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * EndQDContextForApplicationDockTile()
+ *
+ * Discussion:
+ * Disposes the Quickdraw port for your application tile and frees
+ * the lock on the application dock tile. You **MUST** call this
+ * routine and NOT DisposePort when using
+ * BeginQDContextForApplicationDockTile, else the dock will never
+ * know you are done with the tile.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inContext:
+ * The context to end. The context is invalid after this call and
+ * should no longer be used.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure EndQDContextForApplicationDockTile( inContext: CGrafPtr ); external name '_EndQDContextForApplicationDockTile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetApplicationDockTileMenu()
+ *
+ * Summary:
+ * Sets the menu that is displayed by the application's dock tile.
+ *
+ * Discussion:
+ * The Carbon Window Manager and the Dock will always automatically
+ * display a menu containing a list of the application's document
+ * windows. If the application wants to add other additional menu
+ * items, it can use the SetApplicationDockTileMenu API to provide
+ * those items. The items in the specified menu will be combined
+ * with the window title items. This API increments the refcount of
+ * the specified menu. Before the menu is actually displayed, it
+ * will receive kEventMenuPopulate, kEventMenuOpening, and
+ * kEventMenuEnableItems Carbon events, so any event handlers for
+ * these events may update the menu appropriately for the current
+ * state of the application. The application should set a command ID
+ * for each menu item in the dock tile menu, and when that item is
+ * chosen, a kEventCommandProcess Carbon event containing the item's
+ * command ID will be sent to the user focus target.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu to display, or NULL to remove the current dock tile
+ * menu.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetApplicationDockTileMenu( inMenu: MenuRef ): OSStatus; external name '_SetApplicationDockTileMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ * GetApplicationDockTileMenu()
+ *
+ * Summary:
+ * Returns the menu that is displayed by the application's dock tile.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * The application's dock tile menu, or NULL if none.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetApplicationDockTileMenu: MenuRef; external name '_GetApplicationDockTileMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ * CreateCGImageFromPixMaps()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateCGImageFromPixMaps( inImage: PixMapHandle; inMask: PixMapHandle; var outImage: CGImageRef ): OSStatus; external name '_CreateCGImageFromPixMaps';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetApplicationTextEncoding()
+ *
+ * Summary:
+ * Returns the application's primary text encoding.
+ *
+ * Discussion:
+ * The application text encoding is used when you create a
+ * CFStringRef from text stored in Resource Manager resources, which
+ * typically uses one of the Mac encodings such as MacRoman or
+ * MacJapanese. The encoding is determined by: (a) if your app is
+ * bundled, the encoding of the .lproj directory chosen by CFBundle,
+ * (b) else if your plist has a CFBundleDevelopmentRegionKey, the
+ * encoding specified by that key, (c) else if your app has a 'vers'
+ * resource, the encoding for the region field in the 'vers', (d)
+ * else the current localization of the operating system.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetApplicationTextEncoding: TextEncoding; external name '_GetApplicationTextEncoding';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetApplicationScript()
+ *
+ * Summary:
+ * Returns the application script.
+ *
+ * Discussion:
+ * The application script is used when you need a ScriptCode to pass
+ * to some other API, such as UseThemeFont.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function GetApplicationScript: ScriptCode; external name '_GetApplicationScript';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{------------------------------------------------------------------------------}
+{ HIAboutBox }
+{ The strings below are for use as keys in the inOptions parameter of the }
+{ HIAboutBox function, described below. }
+{------------------------------------------------------------------------------}
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIAboutBoxNameKey CFSTRP('HIAboutBoxName')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIAboutBoxVersionKey CFSTRP('HIAboutBoxVersion')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIAboutBoxCopyrightKey CFSTRP('HIAboutBoxCopyright')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIAboutBoxDescriptionKey CFSTRP('HIAboutBoxDescription')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIAboutBoxStringFileKey CFSTRP('HIAboutBoxStringFile')}
+{$endc}
+
+{
+ * HIAboutBox()
+ *
+ * Summary:
+ * Displays an HI-conformant about box.
+ *
+ * Discussion:
+ * This about box is a generic about box that automatically can
+ * display your application name, version string, and copyright
+ * string. It peeks into either the Info.plist (for the
+ * CFBundleName, CFBundleVersion, and CFBundleGetInfoString keys) or
+ * your bundle resource (not recommended) to get the information by
+ * default. You can customize what it displays by passing in various
+ * options in the input dictionary. Note that currently the
+ * description string can only be specified in the options
+ * dictionary; this function does not check your Info.plist for a
+ * descriptions string. <br>
+ * There are three basic ways to call this function. First, you can
+ * pass NULL for inOptions. As mentioned, default information will
+ * be displayed. Second, you can pass the actual values for the
+ * strings displayed by passing the strings in the inOptions
+ * dictionary using the keys provided, such as kHIAboutBoxNameKey.
+ * If a replacement string is not passed, the default behavior kicks
+ * in. For example, you could pass some variant of your application
+ * name in the dictionary, but not pass a replacement version or
+ * copyright strings. The Toolbox would display your replacement
+ * string, and fall back to looking in the Info.plist for the other
+ * strings. The third way to call this is to pass the name of a
+ * string file in the dictionary with the key
+ * kHIAboutBoxStringFileKey. We will automatically use that file to
+ * find the strings for the about box. The keys in the string file
+ * should be the same value as the keys you would use to pass into
+ * the inOptions dictionary. Again, if a string is not found in that
+ * file, we would fall back to looking for a string in the
+ * dictionary, and then finally the Info.plist.
+ *
+ * Certainly this is not the be-all-end-all of about boxes, but it
+ * does provide a simple no-work about box for your application. The
+ * standard Toolbox application handler now responds to the
+ * kHICommandAbout command ID by calling HIAboutBox for you. This
+ * means that any Carbon Event-based application will get this
+ * behavior for free right out of the box. If you wish for the
+ * window to respond to cmd-W in the menu bar, you should make sure
+ * that menu item has the kHICommandClose commandID.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inOptions:
+ * A dictionary of replacement strings, or the name of a string
+ * file to retrieve the strings from, or NULL. See the discussion
+ * for how this is used.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIAboutBox( inOptions: CFDictionaryRef ): OSStatus; external name '_HIAboutBox';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISearchWindowShow()
+ *
+ * Summary:
+ * Sends a message to the System UI server to put up Spotlight UI.
+ *
+ * Discussion:
+ * Brings up "search for string" Spotlight UI. The window is shown
+ * in the default configuration (Search scope and grouping rules)
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSearchString:
+ * A CFString to search for. You may pass NULL to open the search
+ * window with no initial query string.
+ *
+ * inFlags:
+ * Optional flags. Use kNilOptions for now.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HISearchWindowShow( inSearchString: CFStringRef { can be NULL }; inFlags: OptionBits ): OSStatus; external name '_HISearchWindowShow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit OSA}
+{
+ File: OSA.p
+
+ Contains: Open Scripting Architecture Client Interfaces.
+
+ Version: Technology: AppleScript 1.4
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1992-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{*************************************************************************
+ Types and Constants
+*************************************************************************}
+
+{ The componenent manager type code for components that
+ support the OSA interface defined here. }
+{ 0x6f736120 }
+
+const
+ kOSAComponentType = $6F736120 (* 'osa ' *);
+
+ { 0x73637074 }
+ kOSAGenericScriptingComponentSubtype = $73637074 (* 'scpt' *);
+
+ { Type of script document files. }
+ { 0x6f736173 }
+ kOSAFileType = $6F736173 (* 'osas' *);
+
+ {
+ Suite and event code of the RecordedText event.
+ (See OSAStartRecording, below.)
+ }
+ { 0x61736372 }
+ kOSASuite = $61736372 (* 'ascr' *);
+
+ { 0x72656364 }
+ kOSARecordedText = $72656364 (* 'recd' *);
+
+ { Selector returns boolean }
+ { 0x6d6f6469 }
+ kOSAScriptIsModified = $6D6F6469 (* 'modi' *);
+
+ { Selector returns boolean }
+ { 0x63736372 }
+ kOSAScriptIsTypeCompiledScript = $63736372 (* 'cscr' *);
+
+ { Selector returns boolean }
+ { 0x76616c75 }
+ kOSAScriptIsTypeScriptValue = $76616C75 (* 'valu' *);
+
+ { Selector returns boolean }
+ { 0x636e7478 }
+ kOSAScriptIsTypeScriptContext = $636E7478 (* 'cntx' *);
+
+ { Selector returns a DescType which may be passed to OSACoerceToDesc }
+ { 0x62657374 }
+ kOSAScriptBestType = $62657374 (* 'best' *);
+
+ {
+ This selector is used to determine whether a script has source
+ associated with it that when given to OSAGetSource, the call will not
+ fail. The selector returns a boolean.
+ }
+ { 0x67737263 }
+ kOSACanGetSource = $67737263 (* 'gsrc' *);
+
+
+ typeOSADialectInfo = $6469666F (* 'difo' *); { 0x6469666f }
+ keyOSADialectName = $646E616D (* 'dnam' *); { 0x646e616d }
+ keyOSADialectCode = $64636F64 (* 'dcod' *); { 0x64636f64 }
+ keyOSADialectLangCode = $646C6364 (* 'dlcd' *); { 0x646c6364 }
+ keyOSADialectScriptCode = $64736364 (* 'dscd' *); { 0x64736364 }
+
+
+type
+ OSAError = ComponentResult;
+ { Under the Open Scripting Architecture all error results are longs }
+ OSAID = UInt32;
+ {
+ OSAIDs allow transparent manipulation of scripts associated with
+ various scripting systems.
+ }
+
+const
+ kOSANullScript = 0;
+
+ { No -script constant. }
+ kOSANullMode = 0; { sounds better }
+ kOSAModeNull = 0; { tastes consistent }
+
+ {
+ Some routines take flags that control their execution. This constant
+ declares default mode settings are used.
+ }
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ OSACreateAppleEventProcPtr = function(theAEEventClass: AEEventClass; theAEEventID: AEEventID; const (*var*) target: AEAddressDesc; returnID: SInt16; transactionID: SInt32; var result: AppleEvent; refCon: SInt32): OSErr;
+{$elsec}
+ OSACreateAppleEventProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ OSASendProcPtr = function(const (*var*) theAppleEvent: AppleEvent; var reply: AppleEvent; sendMode: AESendMode; sendPriority: AESendPriority; timeOutInTicks: SInt32; idleProc: AEIdleUPP; filterProc: AEFilterUPP; refCon: SInt32): OSErr;
+{$elsec}
+ OSASendProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ OSACreateAppleEventUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ OSACreateAppleEventUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ OSASendUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ OSASendUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppOSACreateAppleEventProcInfo = $000FEFE0;
+ uppOSASendProcInfo = $003FEFE0;
+ {
+ * NewOSACreateAppleEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewOSACreateAppleEventUPP(userRoutine: OSACreateAppleEventProcPtr): OSACreateAppleEventUPP; external name '_NewOSACreateAppleEventUPP'; { old name was NewOSACreateAppleEventProc }
+{
+ * NewOSASendUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewOSASendUPP(userRoutine: OSASendProcPtr): OSASendUPP; external name '_NewOSASendUPP'; { old name was NewOSASendProc }
+{
+ * DisposeOSACreateAppleEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeOSACreateAppleEventUPP(userUPP: OSACreateAppleEventUPP); external name '_DisposeOSACreateAppleEventUPP';
+{
+ * DisposeOSASendUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeOSASendUPP(userUPP: OSASendUPP); external name '_DisposeOSASendUPP';
+{
+ * InvokeOSACreateAppleEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeOSACreateAppleEventUPP(theAEEventClass: AEEventClass; theAEEventID: AEEventID; const (*var*) target: AEAddressDesc; returnID: SInt16; transactionID: SInt32; var result: AppleEvent; refCon: SInt32; userRoutine: OSACreateAppleEventUPP): OSErr; external name '_InvokeOSACreateAppleEventUPP'; { old name was CallOSACreateAppleEventProc }
+{
+ * InvokeOSASendUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeOSASendUPP(const (*var*) theAppleEvent: AppleEvent; var reply: AppleEvent; sendMode: AESendMode; sendPriority: AESendPriority; timeOutInTicks: SInt32; idleProc: AEIdleUPP; filterProc: AEFilterUPP; refCon: SInt32; userRoutine: OSASendUPP): OSErr; external name '_InvokeOSASendUPP'; { old name was CallOSASendProc }
+{*************************************************************************
+ OSA Interface Descriptions
+**************************************************************************
+ The OSA Interface is broken down into a required interface, and several
+ optional interfaces to support additional functionality. A given scripting
+ component may choose to support only some of the optional interfaces in
+ addition to the basic interface. The OSA Component Flags may be used to
+ query the Component Manager to find a scripting component with a particular
+ capability, or determine if a particular scripting component supports a
+ particular capability.
+*************************************************************************}
+{ OSA Component Flags: }
+
+const
+ kOSASupportsCompiling = $0002;
+ kOSASupportsGetSource = $0004;
+ kOSASupportsAECoercion = $0008;
+ kOSASupportsAESending = $0010;
+ kOSASupportsRecording = $0020;
+ kOSASupportsConvenience = $0040;
+ kOSASupportsDialects = $0080;
+ kOSASupportsEventHandling = $0100;
+
+ { Component Selectors: }
+ kOSASelectLoad = $0001;
+ kOSASelectStore = $0002;
+ kOSASelectExecute = $0003;
+ kOSASelectDisplay = $0004;
+ kOSASelectScriptError = $0005;
+ kOSASelectDispose = $0006;
+ kOSASelectSetScriptInfo = $0007;
+ kOSASelectGetScriptInfo = $0008;
+ kOSASelectSetActiveProc = $0009;
+ kOSASelectGetActiveProc = $000A;
+
+ { Compiling: }
+ kOSASelectScriptingComponentName = $0102;
+ kOSASelectCompile = $0103;
+ kOSASelectCopyID = $0104;
+
+ kOSASelectCopyScript = $0105;
+
+ { GetSource: }
+ kOSASelectGetSource = $0201;
+
+ { AECoercion: }
+ kOSASelectCoerceFromDesc = $0301;
+ kOSASelectCoerceToDesc = $0302;
+
+ { AESending: }
+ kOSASelectSetSendProc = $0401;
+ kOSASelectGetSendProc = $0402;
+ kOSASelectSetCreateProc = $0403;
+ kOSASelectGetCreateProc = $0404;
+ kOSASelectSetDefaultTarget = $0405;
+
+ { Recording: }
+ kOSASelectStartRecording = $0501;
+ kOSASelectStopRecording = $0502;
+
+ { Convenience: }
+ kOSASelectLoadExecute = $0601;
+ kOSASelectCompileExecute = $0602;
+ kOSASelectDoScript = $0603;
+
+ { Dialects: }
+ kOSASelectSetCurrentDialect = $0701;
+ kOSASelectGetCurrentDialect = $0702;
+ kOSASelectAvailableDialects = $0703;
+ kOSASelectGetDialectInfo = $0704;
+ kOSASelectAvailableDialectCodeList = $0705;
+
+ { Event Handling: }
+ kOSASelectSetResumeDispatchProc = $0801;
+ kOSASelectGetResumeDispatchProc = $0802;
+ kOSASelectExecuteEvent = $0803;
+ kOSASelectDoEvent = $0804;
+ kOSASelectMakeContext = $0805;
+
+ { Debugging }
+ kOSADebuggerCreateSession = $0901;
+ kOSADebuggerGetSessionState = $0902;
+ kOSADebuggerSessionStep = $0903;
+ kOSADebuggerDisposeSession = $0904;
+ kOSADebuggerGetStatementRanges = $0905;
+ kOSADebuggerGetBreakpoint = $0910;
+ kOSADebuggerSetBreakpoint = $0911;
+ kOSADebuggerGetDefaultBreakpoint = $0912;
+ kOSADebuggerGetCurrentCallFrame = $0906;
+ kOSADebuggerGetCallFrameState = $0907;
+ kOSADebuggerGetVariable = $0908;
+ kOSADebuggerSetVariable = $0909;
+ kOSADebuggerGetPreviousCallFrame = $090A;
+ kOSADebuggerDisposeCallFrame = $090B;
+ kOSADebuggerCountVariables = $090C;
+
+ { scripting component specific selectors are added beginning with this value }
+ kOSASelectComponentSpecificStart = $1001;
+
+
+ { Mode Flags:
+
+ Warning: These should not conflict with the AESend mode flags in
+ AppleEvents.h, because we may want to use them as OSA mode flags too.
+ }
+
+ {
+ This mode flag may be passed to OSALoad, OSAStore or OSACompile to
+ instruct the scripting component to not retain the "source" of an
+ expression. This will cause the OSAGetSource call to return the error
+ errOSASourceNotAvailable if used. However, some scripting components
+ may not retain the source anyway. This is mainly used when either space
+ efficiency is desired, or a script is to be "locked" so that its
+ implementation may not be viewed.
+ }
+ kOSAModePreventGetSource = $00000001;
+
+ {
+ These mode flags may be passed to OSACompile, OSAExecute, OSALoadExecute
+ OSACompileExecute, OSADoScript, OSAExecuteEvent, or OSADoEvent to
+ indicate whether or not the script may interact with the user, switch
+ layer or reconnect if necessary. Any AppleEvents will be sent with the
+ corresponding AESend mode supplied.
+ }
+ kOSAModeNeverInteract = $00000010;
+ kOSAModeCanInteract = $00000020;
+ kOSAModeAlwaysInteract = $00000030;
+ kOSAModeDontReconnect = $00000080;
+
+ {
+ This mode flag may be passed to OSACompile, OSAExecute, OSALoadExecute
+ OSACompileExecute, OSADoScript, OSAExecuteEvent, or OSADoEvent to
+ indicate whether or not AppleEvents should be sent with the
+ kAECanSwitchLayer mode flag sent or not. NOTE: This flag is exactly the
+ opposite sense of the AppleEvent flag kAECanSwitchLayer. This is to
+ provide a more convenient default, i.e. not supplying any mode
+ (kOSAModeNull) means to send events with kAECanSwitchLayer. Supplying
+ the kOSAModeCantSwitchLayer mode flag will cause AESend to be called
+ without kAECanSwitchLayer.
+ }
+ kOSAModeCantSwitchLayer = $00000040;
+
+ {
+ This mode flag may be passed to OSACompile, OSAExecute, OSALoadExecute
+ OSACompileExecute, OSADoScript, OSAExecuteEvent, or OSADoEvent to
+ indicate whether or not AppleEvents should be sent with the kAEDontRecord
+ mode flag sent or not. NOTE: This flag is exactly the opposite sense of
+ the AppleEvent flag kAEDontRecord. This is to provide a more convenient
+ default, i.e. not supplying any mode (kOSAModeNull) means to send events
+ with kAEDontRecord. Supplying the kOSAModeDoRecord mode flag will
+ cause AESend to be called without kAEDontRecord.
+ }
+ kOSAModeDoRecord = $00001000;
+
+ {
+ This is a mode flag for OSACompile that indicates that a context should
+ be created as the result of compilation. All handler definitions are
+ inserted into the new context, and variables are initialized by
+ evaluating their initial values in a null context (i.e. they must be
+ constant expressions).
+ }
+ kOSAModeCompileIntoContext = $00000002;
+
+ {
+ This is a mode flag for OSACompile that indicates that the previous
+ script ID (input to OSACompile) should be augmented with any new
+ definitions in the sourceData rather than replaced with a new script.
+ This means that the previous script ID must designate a context.
+ The presence of this flag causes the kOSAModeCompileIntoContext flag
+ to be implicitly used, causing any new definitions to be initialized
+ in a null context.
+ }
+ kOSAModeAugmentContext = $00000004;
+
+ {
+ This mode flag may be passed to OSADisplay or OSADoScript to indicate
+ that output only need be human-readable, not re-compilable by OSACompile.
+ If used, output may be arbitrarily "beautified", e.g. quotes may be left
+ off of string values, long lists may have elipses, etc.
+ }
+ kOSAModeDisplayForHumans = $00000008;
+
+ {
+ This mode flag may be passed to OSAStore in the case where the scriptID
+ is a context. This causes the context to be saved, but not the context's
+ parent context. When the stored context is loaded back in, the parent
+ will be kOSANullScript.
+ }
+ kOSAModeDontStoreParent = $00010000;
+
+ {
+ This mode flag may be passed to OSAExecuteEvent to cause the event to
+ be dispatched to the direct object of the event. The direct object (or
+ subject attribute if the direct object is a non-object specifier) will
+ be resolved, and the resulting script object will be the recipient of
+ the message. The context argument to OSAExecuteEvent will serve as the
+ root of the lookup/resolution process.
+ }
+ kOSAModeDispatchToDirectObject = $00020000;
+
+ {
+ This mode flag may be passed to OSAExecuteEvent to indicate that
+ components do not have to get the data of object specifier arguments.
+ }
+ kOSAModeDontGetDataForArguments = $00040000;
+
+ { *************************************************************************
+ OSA Basic Scripting Interface
+ **************************************************************************
+ Scripting components must at least support the Basic Scripting interface.
+ ************************************************************************* }
+ { Loading and Storing Scripts:
+
+ These routines allow scripts to be loaded and stored in their internal
+ (possibly compiled, non-text) representation.
+ }
+
+ { Resource type for scripts }
+ kOSAScriptResourceType = $73637074 (* 'scpt' *);
+
+ {
+ Default type given to OSAStore which creates "generic" loadable script
+ data descriptors.
+ }
+ typeOSAGenericStorage = $73637074 (* 'scpt' *);
+
+ {
+ * OSALoad()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSALoad(scriptingComponent: ComponentInstance; const (*var*) scriptData: AEDesc; modeFlags: SInt32; var resultingScriptID: OSAID): OSAError; external name '_OSALoad';
+{
+ OSAComponentFunctionInline(kOSASelectLoad, 12);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSABadStorageType: scriptData not for this scripting component
+ errOSACorruptData: data seems to be corrupt
+ errOSADataFormatObsolete script data format is no longer supported
+ errOSADataFormatTooNew script data format is from a newer version
+
+ ModeFlags:
+ kOSAModePreventGetSource
+ }
+{
+ * OSAStore()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAStore(scriptingComponent: ComponentInstance; scriptID: OSAID; desiredType: DescType; modeFlags: SInt32; var resultingScriptData: AEDesc): OSAError; external name '_OSAStore';
+{
+ OSAComponentFunctionInline(kOSASelectStore, 16);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errOSABadStorageType: desiredType not for this scripting component
+
+ ModeFlags:
+ kOSAModePreventGetSource
+ kOSAModeDontStoreParent
+ }
+{ Executing Scripts: }
+{
+ * OSAExecute()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAExecute(scriptingComponent: ComponentInstance; compiledScriptID: OSAID; contextID: OSAID; modeFlags: SInt32; var resultingScriptValueID: OSAID): OSAError; external name '_OSAExecute';
+{
+ OSAComponentFunctionInline(kOSASelectExecute, 16);
+ This call runs a script. The contextID represents the environment
+ with which global variables in the script are resolved. The constant
+ kOSANullScript may be used for the contextID if the application wishes
+ to not deal with context directly (a default one is associated with each
+ scripting component instance). The resultingScriptValueID is the
+ result of evaluation, and contains a value which may be displayed using
+ the OSAGetSource call. The modeFlags convey scripting component
+ specific information.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errOSAScriptError: the executing script got an error
+
+ ModeFlags:
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ }
+{ Displaying results: }
+{
+ * OSADisplay()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADisplay(scriptingComponent: ComponentInstance; scriptValueID: OSAID; desiredType: DescType; modeFlags: SInt32; var resultingText: AEDesc): OSAError; external name '_OSADisplay';
+{
+ OSAComponentFunctionInline(kOSASelectDisplay, 16);
+ This call is used to convert results (script value IDs) into displayable
+ text. The desiredType should be at least typeChar, and modeFlags are
+ scripting system specific flags to control the formatting of the
+ resulting text. This call differs from OSAGetSource in that (1) it
+ always produces at least typeChar, (2) is only works on script values,
+ (3) it may display it's output in non-compilable form (e.g. without
+ string quotes, elipses inserted in long and/or circular lists, etc.) and
+ (4) it is required by the basic scripting interface.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errAECoercionFail: desiredType not supported by scripting component
+
+ ModeFlags:
+ kOSAModeDisplayForHumans
+ }
+{ Getting Error Information: }
+{
+ * OSAScriptError()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAScriptError(scriptingComponent: ComponentInstance; selector: OSType; desiredType: DescType; var resultingErrorDescription: AEDesc): OSAError; external name '_OSAScriptError';
+{
+ OSAComponentFunctionInline(kOSASelectScriptError, 12);
+ Whenever script execution returns errOSAExecutionError, this routine
+ may be used to get information about that error. The selector describes
+ the type of information desired about the error (various selectors are
+ listed below). The desiredType indicates the data type of the result
+ desired for that selector.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSABadSelector: selector not supported by scripting component
+ errAECoercionFail: desiredType not supported by scripting component
+ }
+{ OSAScriptError selectors: }
+{
+ This selector is used to determine the error number of a script error.
+ These error numbers may be either system error numbers, or error numbers
+ that are scripting component specific.
+ Required desiredTypes:
+ typeShortInteger
+ }
+
+const
+ kOSAErrorNumber = $6572726E (* 'errn' *);
+
+ {
+ This selector is used to determine the full error message associated
+ with the error number. It should include the name of the application
+ which caused the error, as well as the specific error that occurred.
+ This selector is sufficient for simple error reporting (but see
+ kOSAErrorBriefMessage, below).
+ Required desiredTypes:
+ typeChar error message string
+ }
+ kOSAErrorMessage = $65727273 (* 'errs' *);
+
+ {
+ This selector is used to determine a brief error message associated with
+ the error number. This message and should not mention the name of the
+ application which caused the error, any partial results or offending
+ object (see kOSAErrorApp, kOSAErrorPartialResult and
+ kOSAErrorOffendingObject, below).
+ Required desiredTypes:
+ typeChar brief error message string
+ }
+ { 0x65727262 }
+ kOSAErrorBriefMessage = $65727262 (* 'errb' *);
+
+ {
+ This selector is used to determine which application actually got the
+ error (if it was the result of an AESend), or the current application
+ if ....
+ Required desiredTypes:
+ typeProcessSerialNumber PSN of the errant application
+ typeChar name of the errant application
+ }
+ { 0x65726170 }
+ kOSAErrorApp = $65726170 (* 'erap' *);
+
+ {
+ This selector is used to determine any partial result returned by an
+ operation. If an AESend call failed, but a partial result was returned,
+ then the partial result may be returned as an AEDesc.
+ Required desiredTypes:
+ typeBest AEDesc of any partial result
+ }
+ { 0x70746c72 }
+ kOSAErrorPartialResult = $70746C72 (* 'ptlr' *);
+
+ {
+ This selector is used to determine any object which caused the error
+ that may have been indicated by an application. The result is an
+ AEDesc.
+ Required desiredTypes:
+ typeBest AEDesc of any offending object
+ }
+ { 0x65726f62 }
+ kOSAErrorOffendingObject = $65726F62 (* 'erob' *);
+
+ {
+ This selector is used to determine the type expected by a coercion
+ operation if a type error occurred.
+ }
+ { 0x65727274 }
+ kOSAErrorExpectedType = $65727274 (* 'errt' *);
+
+ {
+ This selector is used to determine the source text range (start and
+ end positions) of where the error occurred.
+ Required desiredTypes:
+ typeOSAErrorRange
+ }
+ { 0x65726e67 }
+ kOSAErrorRange = $65726E67 (* 'erng' *);
+
+ {
+ An AERecord type containing keyOSASourceStart and keyOSASourceEnd fields
+ of type short.
+ }
+ { 0x65726e67 }
+ typeOSAErrorRange = $65726E67 (* 'erng' *);
+
+ { Field of a typeOSAErrorRange record of typeShortInteger }
+ { 0x73726373 }
+ keyOSASourceStart = $73726373 (* 'srcs' *);
+
+ { Field of a typeOSAErrorRange record of typeShortInteger }
+ { 0x73726365 }
+ keyOSASourceEnd = $73726365 (* 'srce' *);
+
+ { Disposing Script IDs: }
+ {
+ * OSADispose()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADispose(scriptingComponent: ComponentInstance; scriptID: OSAID): OSAError; external name '_OSADispose';
+{
+ OSAComponentFunctionInline(kOSASelectDispose, 4);
+ Disposes a script or context.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ }
+{ Getting and Setting Script Information: }
+{
+ * OSASetScriptInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSASetScriptInfo(scriptingComponent: ComponentInstance; scriptID: OSAID; selector: OSType; value: SInt32): OSAError; external name '_OSASetScriptInfo';
+{
+ OSAComponentFunctionInline(kOSASelectSetScriptInfo, 12);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errOSABadSelector: selector not supported by scripting component
+ or selector not for this scriptID
+ }
+{
+ * OSAGetScriptInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetScriptInfo(scriptingComponent: ComponentInstance; scriptID: OSAID; selector: OSType; var result: SInt32): OSAError; external name '_OSAGetScriptInfo';
+{
+ OSAComponentFunctionInline(kOSASelectGetScriptInfo, 12);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errOSABadSelector: selector not supported by scripting component
+ or selector not for this scriptID
+ }
+{ Manipulating the ActiveProc:
+
+ Scripting systems will supply default values for these procedures if they
+ are not set by the client:
+}
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ OSAActiveProcPtr = function(refCon: SInt32): OSErr;
+{$elsec}
+ OSAActiveProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ OSAActiveUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ OSAActiveUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppOSAActiveProcInfo = $000000E0;
+ {
+ * NewOSAActiveUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewOSAActiveUPP(userRoutine: OSAActiveProcPtr): OSAActiveUPP; external name '_NewOSAActiveUPP'; { old name was NewOSAActiveProc }
+{
+ * DisposeOSAActiveUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeOSAActiveUPP(userUPP: OSAActiveUPP); external name '_DisposeOSAActiveUPP';
+{
+ * InvokeOSAActiveUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeOSAActiveUPP(refCon: SInt32; userRoutine: OSAActiveUPP): OSErr; external name '_InvokeOSAActiveUPP'; { old name was CallOSAActiveProc }
+{
+ * OSASetActiveProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSASetActiveProc(scriptingComponent: ComponentInstance; activeProc: OSAActiveUPP; refCon: SInt32): OSAError; external name '_OSASetActiveProc';
+{
+ OSAComponentFunctionInline(kOSASelectSetActiveProc, 8);
+ If activeProc is nil, the default activeProc is used.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ }
+{
+ * OSAGetActiveProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetActiveProc(scriptingComponent: ComponentInstance; var activeProc: OSAActiveUPP; var refCon: SInt32): OSAError; external name '_OSAGetActiveProc';
+{
+ OSAComponentFunctionInline(kOSASelectGetActiveProc, 8);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ }
+{*************************************************************************
+ OSA Optional Compiling Interface
+**************************************************************************
+ Scripting components that support the Compiling interface have the
+ kOSASupportsCompiling bit set in it's ComponentDescription.
+*************************************************************************}
+{
+ * OSAScriptingComponentName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAScriptingComponentName(scriptingComponent: ComponentInstance; var resultingScriptingComponentName: AEDesc): OSAError; external name '_OSAScriptingComponentName';
+{
+ OSAComponentFunctionInline(kOSASelectScriptingComponentName, 4);
+ Given a scripting component, this routine returns the name of that
+ scripting component in a type that is coercable to text (typeChar).
+ The generic scripting component returns the name of the default
+ scripting component. This name should be sufficient to convey to the
+ user the kind of script (syntax) he is expected to write.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ }
+{
+ * OSACompile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSACompile(scriptingComponent: ComponentInstance; const (*var*) sourceData: AEDesc; modeFlags: SInt32; var previousAndResultingScriptID: OSAID): OSAError; external name '_OSACompile';
+{
+ OSAComponentFunctionInline(kOSASelectCompile, 12);
+ Coerces input desc (possibly text) into a script's internal format.
+ Once compiled, the script is ready to run. The modeFlags convey
+ scripting component specific information. The previous script ID
+ (result parameter) is made to refer to the newly compiled script,
+ unless it was originally kOSANullScript. In this case a new script
+ ID is created and used.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errAECoercionFail: sourceData is not compilable
+ errOSAScriptError: sourceData was a bad script (syntax error)
+ errOSAInvalidID: previousAndResultingCompiledScriptID was not
+ valid on input
+
+ ModeFlags:
+ kOSAModePreventGetSource
+ kOSAModeCompileIntoContext
+ kOSAModeAugmentContext
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ }
+{
+ * OSACopyID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSACopyID(scriptingComponent: ComponentInstance; fromID: OSAID; var toID: OSAID): OSAError; external name '_OSACopyID';
+{
+ OSAComponentFunctionInline(kOSASelectCopyID, 8);
+ If toID is a reference to kOSANullScript then it is updated to have a
+ new scriptID value. This call can be used to perform undo or revert
+ operations on scripts.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * OSACopyScript()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function OSACopyScript(scriptingComponent: ComponentInstance; fromID: OSAID; var toID: OSAID): OSAError; external name '_OSACopyScript';
+{
+ OSAComponentFunctionInline(kOSASelectCopyScript, 8);
+ Creates a duplicate copy of the script with the given OSAID and returns
+ a new OSAID for it. Can be used by script editors or debuggers.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{*************************************************************************
+ OSA Optional GetSource Interface
+**************************************************************************
+ Scripting components that support the GetSource interface have the
+ kOSASupportsGetSource bit set in their ComponentDescription.
+*************************************************************************}
+{
+ * OSAGetSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetSource(scriptingComponent: ComponentInstance; scriptID: OSAID; desiredType: DescType; var resultingSourceData: AEDesc): OSAError; external name '_OSAGetSource';
+{
+ OSAComponentFunctionInline(kOSASelectGetSource, 12);
+ This routine causes a compiled script to be output in a form (possibly
+ text) such that it is suitable to be passed back to OSACompile.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errOSASourceNotAvailable can't get source for this scriptID
+ }
+{*************************************************************************
+ OSA Optional AECoercion Interface
+**************************************************************************
+ Scripting components that support the AECoercion interface have the
+ kOSASupportsAECoercion bit set in their ComponentDescription.
+*************************************************************************}
+{
+ * OSACoerceFromDesc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSACoerceFromDesc(scriptingComponent: ComponentInstance; const (*var*) scriptData: AEDesc; modeFlags: SInt32; var resultingScriptID: OSAID): OSAError; external name '_OSACoerceFromDesc';
+{
+ OSAComponentFunctionInline(kOSASelectCoerceFromDesc, 12);
+ This routine causes script data to be coerced into a script value.
+ If the scriptData is an AppleEvent, then the resultingScriptID is a
+ compiled script ID (mode flags for OSACompile may be used in this case).
+ Other scriptData descriptors create script value IDs.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+
+ ModeFlags:
+ kOSAModePreventGetSource
+ kOSAModeCompileIntoContext
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ }
+{
+ * OSACoerceToDesc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSACoerceToDesc(scriptingComponent: ComponentInstance; scriptID: OSAID; desiredType: DescType; modeFlags: SInt32; var result: AEDesc): OSAError; external name '_OSACoerceToDesc';
+{
+ OSAComponentFunctionInline(kOSASelectCoerceToDesc, 16);
+ This routine causes a script value to be coerced into any desired form.
+ If the scriptID denotes a compiled script, then it may be coerced to
+ typeAppleEvent.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ }
+{*************************************************************************
+ OSA Optional AESending Interface
+**************************************************************************
+ Scripting components that support the AESending interface have the
+ kOSASupportsAESending bit set in their ComponentDescription.
+*************************************************************************}
+{
+ Scripting systems will supply default values for these procedures if they
+ are not set by the client:
+}
+{
+ * OSASetSendProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSASetSendProc(scriptingComponent: ComponentInstance; sendProc: OSASendUPP; refCon: SInt32): OSAError; external name '_OSASetSendProc';
+{
+ OSAComponentFunctionInline(kOSASelectSetSendProc, 8);
+ If sendProc is nil, the default sendProc is used.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ }
+{
+ * OSAGetSendProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetSendProc(scriptingComponent: ComponentInstance; var sendProc: OSASendUPP; var refCon: SInt32): OSAError; external name '_OSAGetSendProc';
+{
+ OSAComponentFunctionInline(kOSASelectGetSendProc, 8);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ }
+{
+ * OSASetCreateProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSASetCreateProc(scriptingComponent: ComponentInstance; createProc: OSACreateAppleEventUPP; refCon: SInt32): OSAError; external name '_OSASetCreateProc';
+{
+ OSAComponentFunctionInline(kOSASelectSetCreateProc, 8);
+ If createProc is nil, the default createProc is used.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ }
+{
+ * OSAGetCreateProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetCreateProc(scriptingComponent: ComponentInstance; var createProc: OSACreateAppleEventUPP; var refCon: SInt32): OSAError; external name '_OSAGetCreateProc';
+{
+ OSAComponentFunctionInline(kOSASelectGetCreateProc, 8);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ }
+{
+ * OSASetDefaultTarget()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSASetDefaultTarget(scriptingComponent: ComponentInstance; const (*var*) target: AEAddressDesc): OSAError; external name '_OSASetDefaultTarget';
+{
+ OSAComponentFunctionInline(kOSASelectSetDefaultTarget, 4);
+ This routine sets the default target application for AE sending.
+ It also establishes the default target from which terminologies come.
+ It is effectively like having an AppleScript "tell" statement around
+ the entire program. If this routine is not called, or if the target
+ is a null AEDesc, then the current application is the default target.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ }
+{*************************************************************************
+ OSA Optional Recording Interface
+**************************************************************************
+ Scripting components that support the Recording interface have the
+ kOSASupportsRecording bit set in their ComponentDescription.
+*************************************************************************}
+{
+ * OSAStartRecording()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAStartRecording(scriptingComponent: ComponentInstance; var compiledScriptToModifyID: OSAID): OSAError; external name '_OSAStartRecording';
+{
+ OSAComponentFunctionInline(kOSASelectStartRecording, 4);
+ Starts recording. If compiledScriptToModifyID is kOSANullScript, a
+ new script ID is created and returned. If the current application has
+ a handler for the kOSARecordedText event, then kOSARecordedText events
+ are sent to the application containing the text of each AppleEvent
+ recorded.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errOSARecordingIsAlreadyOn
+ }
+{
+ * OSAStopRecording()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAStopRecording(scriptingComponent: ComponentInstance; compiledScriptID: OSAID): OSAError; external name '_OSAStopRecording';
+{
+ OSAComponentFunctionInline(kOSASelectStopRecording, 4);
+ If compiledScriptID is not being recorded into or recording is not
+ currently on, no error is returned.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ }
+{*************************************************************************
+ OSA Optional Convenience Interface
+**************************************************************************
+ Scripting components that support the Convenience interface have the
+ kOSASupportsConvenience bit set in their ComponentDescription.
+*************************************************************************}
+{
+ * OSALoadExecute()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSALoadExecute(scriptingComponent: ComponentInstance; const (*var*) scriptData: AEDesc; contextID: OSAID; modeFlags: SInt32; var resultingScriptValueID: OSAID): OSAError; external name '_OSALoadExecute';
+{
+ OSAComponentFunctionInline(kOSASelectLoadExecute, 16);
+ This routine is effectively equivalent to calling OSALoad followed by
+ OSAExecute. After execution, the compiled source is disposed. Only the
+ resulting value ID is retained.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSABadStorageType: scriptData not for this scripting component
+ errOSACorruptData: data seems to be corrupt
+ errOSADataFormatObsolete script data format is no longer supported
+ errOSADataFormatTooNew script data format is from a newer version
+ errOSAInvalidID
+ errOSAScriptError: the executing script got an error
+
+ ModeFlags:
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ }
+{
+ * OSACompileExecute()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSACompileExecute(scriptingComponent: ComponentInstance; const (*var*) sourceData: AEDesc; contextID: OSAID; modeFlags: SInt32; var resultingScriptValueID: OSAID): OSAError; external name '_OSACompileExecute';
+{
+ OSAComponentFunctionInline(kOSASelectCompileExecute, 16);
+ This routine is effectively equivalent to calling OSACompile followed by
+ OSAExecute. After execution, the compiled source is disposed. Only the
+ resulting value ID is retained.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errAECoercionFail: sourceData is not compilable
+ errOSAScriptError: sourceData was a bad script (syntax error)
+ errOSAInvalidID: previousAndResultingCompiledScriptID was not
+ valid on input
+ errOSAScriptError: the executing script got an error
+
+ ModeFlags:
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ }
+{
+ * OSADoScript()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADoScript(scriptingComponent: ComponentInstance; const (*var*) sourceData: AEDesc; contextID: OSAID; desiredType: DescType; modeFlags: SInt32; var resultingText: AEDesc): OSAError; external name '_OSADoScript';
+{
+ OSAComponentFunctionInline(kOSASelectDoScript, 20);
+ This routine is effectively equivalent to calling OSACompile followed by
+ OSAExecute and then OSADisplay. After execution, the compiled source
+ and the resulting value are is disposed. Only the resultingText
+ descriptor is retained. If a script error occur during processing, the
+ resultingText gets the error message of the error, and errOSAScriptError
+ is returned. OSAScriptError may still be used to extract more
+ information about the particular error.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errAECoercionFail: sourceData is not compilable or
+ desiredType not supported by scripting component
+ errOSAScriptError: sourceData was a bad script (syntax error)
+ errOSAInvalidID: previousAndResultingCompiledScriptID was not
+ valid on input
+ errOSAScriptError: the executing script got an error
+
+ ModeFlags:
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ kOSAModeDisplayForHumans
+ }
+{*************************************************************************
+ OSA Optional Dialects Interface
+**************************************************************************
+ Scripting components that support the Dialects interface have the
+ kOSASupportsDialects bit set in their ComponentDescription.
+*************************************************************************}
+{
+ These calls allows an scripting component that supports different dialects
+ to dynamically switch between those dialects. Although this interface is
+ specified, the particular dialect codes are scripting component dependent.
+}
+{
+ * OSASetCurrentDialect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSASetCurrentDialect(scriptingComponent: ComponentInstance; dialectCode: SInt16): OSAError; external name '_OSASetCurrentDialect';
+{
+ OSAComponentFunctionInline(kOSASelectSetCurrentDialect, 2);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSANoSuchDialect: invalid dialectCode
+ }
+{
+ * OSAGetCurrentDialect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetCurrentDialect(scriptingComponent: ComponentInstance; var resultingDialectCode: SInt16): OSAError; external name '_OSAGetCurrentDialect';
+{
+ OSAComponentFunctionInline(kOSASelectGetCurrentDialect, 4);
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ }
+{
+ * OSAAvailableDialects()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAAvailableDialects(scriptingComponent: ComponentInstance; var resultingDialectInfoList: AEDesc): OSAError; external name '_OSAAvailableDialects';
+{
+ OSAComponentFunctionInline(kOSASelectAvailableDialects, 4);
+ This call return an AEList containing information about each of the
+ currently available dialects of a scripting component. Each item
+ is an AERecord of typeOSADialectInfo that contains at least the fields
+ keyOSADialectName, keyOSADialectCode, KeyOSADialectLangCode and
+ keyOSADialectScriptCode.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ }
+{
+ * OSAGetDialectInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetDialectInfo(scriptingComponent: ComponentInstance; dialectCode: SInt16; selector: OSType; var resultingDialectInfo: AEDesc): OSAError; external name '_OSAGetDialectInfo';
+{
+ OSAComponentFunctionInline(kOSASelectGetDialectInfo, 10);
+ This call gives information about the specified dialect of a scripting
+ component. It returns an AEDesc whose type depends on the selector
+ specified. Available selectors are the same as the field keys for a
+ dialect info record. The type of AEDesc returned is the same as the
+ type of the field that has same key as the selector.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSABadSelector
+ errOSANoSuchDialect: invalid dialectCode
+ }
+{
+ * OSAAvailableDialectCodeList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAAvailableDialectCodeList(scriptingComponent: ComponentInstance; var resultingDialectCodeList: AEDesc): OSAError; external name '_OSAAvailableDialectCodeList';
+{
+ OSAComponentFunctionInline(kOSASelectAvailableDialectCodeList, 4);
+ This is alternative to OSAGetAvailableDialectCodeList. Use this call
+ and OSAGetDialectInfo to get information on dialects.
+ This call return an AEList containing dialect code for each of the
+ currently available dialects of a scripting component. Each dialect
+ code is a short SInt16 of type typeShortInteger.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+
+ Type of a dialect info record containing at least keyOSADialectName
+ and keyOSADialectCode fields.
+
+ keys for dialect info record, also used as selectors to OSAGetDialectInfo.
+
+ Field of a typeOSADialectInfo record of typeChar.
+ Field of a typeOSADialectInfo record of typeShortInteger.
+ Field of a typeOSADialectInfo record of typeShortInteger.
+ Field of a typeOSADialectInfo record of typeShortInteger.
+ }
+{*************************************************************************
+ OSA Optional Event Handling Interface
+**************************************************************************
+ Scripting components that support the Event Handling interface have the
+ kOSASupportsEventHandling bit set in their ComponentDescription.
+*************************************************************************}
+{
+ * OSASetResumeDispatchProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSASetResumeDispatchProc(scriptingComponent: ComponentInstance; resumeDispatchProc: AEEventHandlerUPP; refCon: SInt32): OSAError; external name '_OSASetResumeDispatchProc';
+{
+ OSAComponentFunctionInline(kOSASelectSetResumeDispatchProc, 8);
+ This function is used to set the ResumeDispatchProc that will be used
+ by OSAExecuteEvent and OSADoEvent if either no event handler can be
+ found in the context, or the context event hander "continues" control
+ onward. The two constants kOSAUseStandardDispatch and kOSANoDispatch
+ may also be passed to this routine indicating that the handler registered
+ in the application with AEInstallEventHandler should be used, or no
+ dispatch should occur, respectively.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ }
+
+const
+ kOSAUseStandardDispatch = $FFFFFFFF;
+
+ {
+ Special ResumeDispatchProc constant which may be passed to
+ OSASetResumeDispatchProc indicating that the handler registered
+ in the application with AEInstallEventHandler should be used.
+
+ NOTE: Had to remove the cast (AEEventHandlerUPP). The C compiler
+ doesn't allow pointer types to be assigned to an enum. All
+ constants must be assigned as enums to translate properly to
+ Pascal.
+ }
+ kOSANoDispatch = 0;
+
+ {
+ Special ResumeDispatchProc constant which may be passed to
+ OSASetResumeDispatchProc indicating that no dispatch should occur.
+
+ NOTE: Had to remove the cast (AEEventHandlerUPP). The C compiler
+ doesn't allow pointer types to be assigned to an enum. All
+ constants must be assigned as enums to translate properly to
+ Pascal.
+ }
+ kOSADontUsePhac = $0001;
+
+ {
+ Special refCon constant that may be given to OSASetResumeDispatchProc
+ only when kOSAUseStandardDispatch is used as the ResumeDispatchProc.
+ This causes the standard dispatch to be performed, except the phac
+ handler is not called. This is useful during tinkerability, when
+ the phac handler is used to lookup a context associated with an event's
+ direct parameter, and call OSAExecuteEvent or OSADoEvent. Failure to
+ bypass the phac handler would result in an infinite loop.
+ }
+ {
+ * OSAGetResumeDispatchProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetResumeDispatchProc(scriptingComponent: ComponentInstance; var resumeDispatchProc: AEEventHandlerUPP; var refCon: SInt32): OSAError; external name '_OSAGetResumeDispatchProc';
+{
+ OSAComponentFunctionInline(kOSASelectGetResumeDispatchProc, 8);
+ Returns the registered ResumeDispatchProc. If no ResumeDispatchProc has
+ been registered, then kOSAUseStandardDispatch (the default) is returned.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ }
+{
+ * OSAExecuteEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAExecuteEvent(scriptingComponent: ComponentInstance; const (*var*) theAppleEvent: AppleEvent; contextID: OSAID; modeFlags: SInt32; var resultingScriptValueID: OSAID): OSAError; external name '_OSAExecuteEvent';
+{
+ OSAComponentFunctionInline(kOSASelectExecuteEvent, 16);
+ This call is similar to OSAExecute except the initial command to
+ execute comes in the form of an AppleEvent. If the contextID
+ defines any event handlers for that event, they are used to process
+ the event. If no event handler can be found in the context
+ errAEEventNotHandled is returned. If an event handler is found and
+ the hander "continues" control onward, the ResumeDispatchProc
+ (registered with OSASetResumeDispatchProc, above) is called given the
+ AppleEvent. The result is returned as a scriptValueID.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errOSAScriptError: the executing script got an error
+ errAEEventNotHandled: no handler for event in contextID
+
+ ModeFlags:
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ }
+{
+ * OSADoEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADoEvent(scriptingComponent: ComponentInstance; const (*var*) theAppleEvent: AppleEvent; contextID: OSAID; modeFlags: SInt32; var reply: AppleEvent): OSAError; external name '_OSADoEvent';
+{
+ OSAComponentFunctionInline(kOSASelectDoEvent, 16);
+ This call is similar to OSADoScript except the initial command to
+ execute comes in the form of an AppleEvent, and the result is an
+ AppleEvent reply record. If the contextID defines any event handlers
+ for that event, they are used to process the event. If no event handler
+ can be found in the context errAEEventNotHandled is returned. If an
+ event handler is found and the hander "continues" control onward, the
+ ResumeDispatchProc (registered with OSASetResumeDispatchProc, above) is
+ called given the AppleEvent. The result is returned in the form of an
+ AppleEvent reply descriptor. If at any time the script gets an error, or
+ if the ResumeDispatchProc returns a reply event indicating an error,
+ then the OSADoEvent call itself returns an error reply (i.e. OSADoEvent
+ should never return errOSAScriptError). Any error result returned by
+ the ResumeDispatchProc will be returned by OSADoEvent.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errAEEventNotHandled: no handler for event in contextID
+
+ ModeFlags:
+ kOSAModeNeverInteract
+ kOSAModeCanInteract
+ kOSAModeAlwaysInteract
+ kOSAModeCantSwitchLayer
+ kOSAModeDontReconnect
+ kOSAModeDoRecord
+ }
+{
+ * OSAMakeContext()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAMakeContext(scriptingComponent: ComponentInstance; const (*var*) contextName: AEDesc; parentContext: OSAID; var resultingContextID: OSAID): OSAError; external name '_OSAMakeContext';
+{
+ OSAComponentFunctionInline(kOSASelectMakeContext, 12);
+ Makes a new empty context which may be passed to OSAExecute or
+ OSAExecuteEvent. If contextName is typeNull, an unnamed context is
+ created. If parentContext is kOSANullScript then the resulting context
+ does not inherit bindings from any other context.
+
+ Errors:
+ badComponentInstance invalid scripting component instance
+ errOSASystemError
+ errOSAInvalidID
+ errAECoercionFail: contextName is invalid
+ }
+{
+ * Debugging API
+ }
+{
+ * Types
+ }
+
+type
+ OSADebugSessionRef = OSAID;
+ OSADebugCallFrameRef = OSAID;
+ {
+ * Constants
+ }
+ OSAProgramState = UInt32;
+const
+ eNotStarted = 0;
+ eRunnable = 1;
+ eRunning = 2;
+ eStopped = 3;
+ eTerminated = 4;
+
+
+type
+ OSADebugStepKind = UInt32;
+const
+ eStepOver = 0;
+ eStepIn = 1;
+ eStepOut = 2;
+ eRun = 3;
+
+
+type
+ OSALocalOrGlobal = UInt32;
+const
+ eLocal = 0;
+ eGlobal = 1;
+ eProperties = 2;
+
+ {
+ * Session Information
+ }
+ keyProgramState = $64737073 (* 'dsps' *);
+
+ {
+ * Call Frame Information
+ }
+
+type
+ StatementRangePtr = ^StatementRange;
+ StatementRange = record
+ startPos: UInt32;
+ endPos: UInt32;
+ end;
+
+
+const
+ typeStatementRange = $73726E67 (* 'srng' *);
+
+ keyProcedureName = $64666E6D (* 'dfnm' *); { typeChar }
+ keyStatementRange = $64667372 (* 'dfsr' *); { typeStatementRange }
+ keyLocalsNames = $64666C6E (* 'dfln' *); { typeAEList of typeChar }
+ keyGlobalsNames = $6466676E (* 'dfgn' *); { typeAEList of typeChar }
+ keyParamsNames = $6466706E (* 'dfpn' *); { typeAEList of typeChar }
+
+ {
+ * Sessions
+ }
+ {
+ * OSADebuggerCreateSession()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADebuggerCreateSession(scriptingComponent: ComponentInstance; inScript: OSAID; inContext: OSAID; var outSession: OSADebugSessionRef): OSAError; external name '_OSADebuggerCreateSession';
+{
+ * OSADebuggerGetSessionState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADebuggerGetSessionState(scriptingComponent: ComponentInstance; inSession: OSADebugSessionRef; var outState: AERecord): OSAError; external name '_OSADebuggerGetSessionState';
+{
+ * OSADebuggerSessionStep()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADebuggerSessionStep(scriptingComponent: ComponentInstance; inSession: OSADebugSessionRef; inKind: OSADebugStepKind): OSAError; external name '_OSADebuggerSessionStep';
+{
+ * OSADebuggerDisposeSession()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADebuggerDisposeSession(scriptingComponent: ComponentInstance; inSession: OSADebugSessionRef): OSAError; external name '_OSADebuggerDisposeSession';
+{
+ * OSADebuggerGetStatementRanges()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADebuggerGetStatementRanges(scriptingComponent: ComponentInstance; inSession: OSADebugSessionRef; var outStatementRangeArray: AEDescList): OSAError; external name '_OSADebuggerGetStatementRanges';
+{ Returns an array of StatementRange objects. }
+{
+ * OSADebuggerGetBreakpoint()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADebuggerGetBreakpoint(scriptingComponent: ComponentInstance; inSession: OSADebugSessionRef; inSrcOffset: UInt32; var outBreakpoint: OSAID): OSAError; external name '_OSADebuggerGetBreakpoint';
+{
+ * OSADebuggerSetBreakpoint()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADebuggerSetBreakpoint(scriptingComponent: ComponentInstance; inSession: OSADebugSessionRef; inSrcOffset: UInt32; inBreakpoint: OSAID): OSAError; external name '_OSADebuggerSetBreakpoint';
+{
+ * OSADebuggerGetDefaultBreakpoint()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADebuggerGetDefaultBreakpoint(scriptingComponent: ComponentInstance; inSession: OSADebugSessionRef; var outBreakpoint: OSAID): OSAError; external name '_OSADebuggerGetDefaultBreakpoint';
+{
+ * Call Frames
+ }
+{
+ * OSADebuggerGetCurrentCallFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADebuggerGetCurrentCallFrame(scriptingComponent: ComponentInstance; inSession: OSADebugSessionRef; var outCallFrame: OSADebugCallFrameRef): OSAError; external name '_OSADebuggerGetCurrentCallFrame';
+{
+ * OSADebuggerGetCallFrameState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADebuggerGetCallFrameState(scriptingComponent: ComponentInstance; inCallFrame: OSADebugCallFrameRef; var outState: AERecord): OSAError; external name '_OSADebuggerGetCallFrameState';
+{
+ * OSADebuggerGetVariable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADebuggerGetVariable(scriptingComponent: ComponentInstance; inCallFrame: OSADebugCallFrameRef; const (*var*) inVariableName: AEDesc; var outVariable: OSAID): OSAError; external name '_OSADebuggerGetVariable';
+{
+ * OSADebuggerSetVariable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADebuggerSetVariable(scriptingComponent: ComponentInstance; inCallFrame: OSADebugCallFrameRef; const (*var*) inVariableName: AEDesc; inVariable: OSAID): OSAError; external name '_OSADebuggerSetVariable';
+{
+ * OSADebuggerGetPreviousCallFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADebuggerGetPreviousCallFrame(scriptingComponent: ComponentInstance; inCurrentFrame: OSADebugCallFrameRef; var outPrevFrame: OSADebugCallFrameRef): OSAError; external name '_OSADebuggerGetPreviousCallFrame';
+{
+ * OSADebuggerDisposeCallFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADebuggerDisposeCallFrame(scriptingComponent: ComponentInstance; inCallFrame: OSADebugCallFrameRef): OSAError; external name '_OSADebuggerDisposeCallFrame';
+{
+ * OSADebuggerCountVariables()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.5 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSADebuggerCountVariables(scriptingComponent: ComponentInstance; inSession: OSADebugSessionRef; inCallFrame: OSADebugCallFrameRef; inWhichSet: OSALocalOrGlobal; var outVariableCount: SInt32): OSAError; external name '_OSADebuggerCountVariables';
+{$ALIGN MAC68K}
+
+
+{unit OSAGeneric}
+{
+ File: OSAGeneric.p
+
+ Contains: AppleScript Generic Component Interfaces.
+
+ Version: Technology: AppleScript 1.1
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1992-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ NOTE: This interface defines a "generic scripting component."
+ The Generic Scripting Component allows automatic dispatch to a
+ specific scripting component that conforms to the OSA interface.
+ This component supports OSA, by calling AppleScript or some other
+ scripting component. Additionally it provides access to the default
+ and the user-prefered scripting component.
+}
+
+
+const
+ { Component version this header file describes }
+ kGenericComponentVersion = $0100;
+
+ kGSSSelectGetDefaultScriptingComponent = $1001;
+ kGSSSelectSetDefaultScriptingComponent = $1002;
+ kGSSSelectGetScriptingComponent = $1003;
+ kGSSSelectGetScriptingComponentFromStored = $1004;
+ kGSSSelectGenericToRealID = $1005;
+ kGSSSelectRealToGenericID = $1006;
+ kGSSSelectOutOfRange = $1007;
+
+
+type
+ ScriptingComponentSelector = OSType;
+ GenericID = OSAID;
+ { get and set the default scripting component }
+ {
+ * OSAGetDefaultScriptingComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetDefaultScriptingComponent(genericScriptingComponent: ComponentInstance; var scriptingSubType: ScriptingComponentSelector): OSAError; external name '_OSAGetDefaultScriptingComponent';
+{
+ * OSASetDefaultScriptingComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSASetDefaultScriptingComponent(genericScriptingComponent: ComponentInstance; scriptingSubType: ScriptingComponentSelector): OSAError; external name '_OSASetDefaultScriptingComponent';
+{ get a scripting component instance from its subtype code }
+{
+ * OSAGetScriptingComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetScriptingComponent(genericScriptingComponent: ComponentInstance; scriptingSubType: ScriptingComponentSelector; var scriptingInstance: ComponentInstance): OSAError; external name '_OSAGetScriptingComponent';
+{ get a scripting component selector (subType) from a stored script }
+{
+ * OSAGetScriptingComponentFromStored()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetScriptingComponentFromStored(genericScriptingComponent: ComponentInstance; const (*var*) scriptData: AEDesc; var scriptingSubType: ScriptingComponentSelector): OSAError; external name '_OSAGetScriptingComponentFromStored';
+{ get a real component instance and script id from a generic id }
+{
+ * OSAGenericToRealID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGenericToRealID(genericScriptingComponent: ComponentInstance; var theScriptID: OSAID; var theExactComponent: ComponentInstance): OSAError; external name '_OSAGenericToRealID';
+{ get a generic id from a real component instance and script id }
+{
+ * OSARealToGenericID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSARealToGenericID(genericScriptingComponent: ComponentInstance; var theScriptID: OSAID; theExactComponent: ComponentInstance): OSAError; external name '_OSARealToGenericID';
+{$ALIGN MAC68K}
+
+
+{unit AppleScript}
+{
+ File: AppleScript.p
+
+ Contains: AppleScript Specific Interfaces.
+
+ Version: Technology: AppleScript 1.1
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1992-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{*************************************************************************
+ Types and Constants
+*************************************************************************}
+{
+ The specific type for the AppleScript instance of the
+ Open Scripting Architecture type.
+}
+
+const
+ typeAppleScript = $61736372 (* 'ascr' *);
+ kAppleScriptSubtype = $61736372 (* 'ascr' *);
+ typeASStorage = $61736372 (* 'ascr' *);
+
+ { *************************************************************************
+ Component Selectors
+ ************************************************************************* }
+
+ kASSelectInit = $1001;
+ kASSelectSetSourceStyles = $1002;
+ kASSelectGetSourceStyles = $1003;
+ kASSelectGetSourceStyleNames = $1004;
+
+
+ { *************************************************************************
+ OSAGetScriptInfo Selectors
+ ************************************************************************* }
+ kASHasOpenHandler = $68736F64 (* 'hsod' *);
+
+ {
+ This selector is used to query a context as to whether it contains
+ a handler for the kAEOpenDocuments event. This allows "applets" to be
+ distinguished from "droplets." OSAGetScriptInfo returns false if
+ there is no kAEOpenDocuments handler, and returns the error value
+ errOSAInvalidAccess if the input is not a context.
+ }
+ { *************************************************************************
+ Initialization
+ ************************************************************************* }
+ {
+ * ASInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ASInit(scriptingComponent: ComponentInstance; modeFlags: SInt32; minStackSize: SInt32; preferredStackSize: SInt32; maxStackSize: SInt32; minHeapSize: SInt32; preferredHeapSize: SInt32; maxHeapSize: SInt32): OSAError; external name '_ASInit';
+{
+ ComponentCallNow(kASSelectInit, 28);
+ This call can be used to explicitly initialize AppleScript. If it is
+ not called, the a scripting size resource is looked for and used. If
+ there is no scripting size resource, then the constants listed below
+ are used. If at any stage (the init call, the size resource, the
+ defaults) any of these parameters are zero, then parameters from the
+ next stage are used. ModeFlags are not currently used.
+ Errors:
+ errOSASystemError initialization failed
+ }
+{
+ These values will be used if ASInit is not called explicitly, or if any
+ of ASInit's parameters are zero:
+}
+
+const
+ kASDefaultMinStackSize = 4096;
+ kASDefaultPreferredStackSize = 16384;
+ kASDefaultMaxStackSize = 16384;
+ kASDefaultMinHeapSize = 4096;
+ kASDefaultPreferredHeapSize = 16384;
+ kASDefaultMaxHeapSize = 33554432;
+
+ { *************************************************************************
+ Source Styles
+ ************************************************************************* }
+ {
+ * ASSetSourceStyles()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ASSetSourceStyles(scriptingComponent: ComponentInstance; sourceStyles: STHandle): OSAError; external name '_ASSetSourceStyles';
+{
+ ComponentCallNow(kASSelectSetSourceStyles, 4);
+ Errors:
+ errOSASystemError operation failed
+ }
+{
+ * ASGetSourceStyles()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ASGetSourceStyles(scriptingComponent: ComponentInstance; var resultingSourceStyles: STHandle): OSAError; external name '_ASGetSourceStyles';
+{
+ ComponentCallNow(kASSelectGetSourceStyles, 4);
+ Errors:
+ errOSASystemError operation failed
+ }
+{
+ * ASGetSourceStyleNames()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ASGetSourceStyleNames(scriptingComponent: ComponentInstance; modeFlags: SInt32; var resultingSourceStyleNamesList: AEDescList): OSAError; external name '_ASGetSourceStyleNames';
+{
+ ComponentCallNow(kASSelectGetSourceStyleNames, 8);
+ This call returns an AEList of styled text descriptors the names of the
+ source styles in the current dialect. The order of the names corresponds
+ to the order of the source style constants, below. The style of each
+ name is the same as the styles returned by ASGetSourceStyles.
+
+ Errors:
+ errOSASystemError operation failed
+ }
+{
+ Elements of STHandle correspond to following categories of tokens, and
+ accessed through following index constants:
+}
+
+const
+ kASSourceStyleUncompiledText = 0;
+ kASSourceStyleNormalText = 1;
+ kASSourceStyleLanguageKeyword = 2;
+ kASSourceStyleApplicationKeyword = 3;
+ kASSourceStyleComment = 4;
+ kASSourceStyleLiteral = 5;
+ kASSourceStyleUserSymbol = 6;
+ kASSourceStyleObjectSpecifier = 7;
+ kASNumberOfSourceStyles = 8;
+
+
+{$ALIGN MAC68K}
+
+
+{unit CarbonEvents}
+{
+ File: HIToolbox/CarbonEvents.h
+
+ Contains: Carbon Event Manager
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1999-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{--------------------------------------------------------------------------------------}
+{ Parameter names and types }
+{--------------------------------------------------------------------------------------}
+
+const
+{
+ * This event parameter may be added to any event that is posted to
+ * the main event queue. When the event is removed from the queue and
+ * sent to the event dispatcher, the dispatcher will retrieve the
+ * EventTargetRef contained in this parameter and send the event
+ * directly to that event target. If this parameter is not available
+ * in the event, the dispatcher will send the event to a suitable
+ * target, or to the application target if no more specific target is
+ * appropriate. Available in CarbonLib 1.3.1 and later, and Mac OS X.
+ }
+ kEventParamPostTarget = $70747267 (* 'ptrg' *); { typeEventTargetRef}
+
+ {
+ * Indicates an event parameter of type EventTargetRef.
+ }
+ typeEventTargetRef = $65747267 (* 'etrg' *); { EventTargetRef}
+
+{ Generic toolbox parameters and types}
+
+{
+ *** NOTE ON AUTOMATIC TYPE CONVERSIONS
+ Please keep in mind that some of these types can be automatically converted
+ to other types just by asking for them as different types. The following
+ type conversions are automatic:
+ typeQDRectangle <--> typeHIRect
+ typeQDPoint <--> typeHIPoint
+ In addition, if a CFBoolean type is added to an event, a request to receive
+ the data as typeBoolean (instead of typeCFType), will be automatically honored.
+}
+
+
+const
+ kEventParamWindowRef = $77696E64 (* 'wind' *); { typeWindowRef}
+ kEventParamGrafPort = $67726166 (* 'graf' *); { typeGrafPtr}
+ kEventParamMenuRef = $6D656E75 (* 'menu' *); { typeMenuRef}
+ kEventParamEventRef = $65766E74 (* 'evnt' *); { typeEventRef}
+ kEventParamControlRef = $6374726C (* 'ctrl' *); { typeControlRef}
+ kEventParamRgnHandle = $72676E68 (* 'rgnh' *); { typeQDRgnHandle}
+ kEventParamEnabled = $656E6162 (* 'enab' *); { typeBoolean}
+ kEventParamDimensions = $64696D73 (* 'dims' *); { typeQDPoint}
+ kEventParamBounds = $626F756E (* 'boun' *); { typeQDRectangle}
+ kEventParamAvailableBounds = $61766C62 (* 'avlb' *); { typeQDRectangle}
+ kEventParamAEEventID = keyAEEventID; { typeType}
+ kEventParamAEEventClass = keyAEEventClass; { typeType}
+ kEventParamCGContextRef = $636E7478 (* 'cntx' *); { typeCGContextRef}
+ kEventParamDeviceDepth = $64657664 (* 'devd' *); { typeShortInteger}
+ kEventParamDeviceColor = $64657663 (* 'devc' *); { typeBoolean}
+ kEventParamMutableArray = $6D617272 (* 'marr' *); { typeCFMutableArrayRef}
+ kEventParamResult = $616E7372 (* 'ansr' *); { any type - depends on event like direct object}
+ kEventParamMinimumSize = $6D6E737A (* 'mnsz' *); { typeHISize}
+ kEventParamMaximumSize = $6D78737A (* 'mxsz' *); { typeHISize}
+ kEventParamAttributes = $61747472 (* 'attr' *); { typeUInt32}
+ kEventParamReason = $7768793F (* 'why?' *); { typeUInt32}
+ kEventParamTransactionID = $74726E73 (* 'trns' *); { typeUInt32}
+ kEventParamGDevice = $67646576 (* 'gdev' *); { typeGDHandle}
+ kEventParamIndex = $696E6478 (* 'indx' *); { typeCFIndex}
+ kEventParamUserData = $75737264 (* 'usrd' *); { typeVoidPtr}
+ kEventParamShape = $73686170 (* 'shap' *); { typeHIShapeRef}
+ typeWindowRef = $77696E64 (* 'wind' *); { WindowRef}
+ typeGrafPtr = $67726166 (* 'graf' *); { CGrafPtr}
+ typeGWorldPtr = $67776C64 (* 'gwld' *); { GWorldPtr}
+ typeMenuRef = $6D656E75 (* 'menu' *); { MenuRef}
+ typeControlRef = $6374726C (* 'ctrl' *); { ControlRef}
+ typeCollection = $636C746E (* 'cltn' *); { Collection}
+ typeQDRgnHandle = $72676E68 (* 'rgnh' *); { RgnHandle}
+ typeOSStatus = $6F737374 (* 'osst' *); { OSStatus}
+ typeCFIndex = $63666978 (* 'cfix' *); { CFIndex}
+ typeCGContextRef = $636E7478 (* 'cntx' *); { CGContextRef}
+ typeHIPoint = $68697074 (* 'hipt' *); { HIPoint}
+ typeHISize = $6869737A (* 'hisz' *); { HISize}
+ typeHIRect = $68697263 (* 'hirc' *); { HIRect}
+ typeHIShapeRef = $73686170 (* 'shap' *); { HIShapeRef}
+ typeVoidPtr = $766F6964 (* 'void' *); { void * (used for HIObject fun)}
+ typeGDHandle = $67646576 (* 'gdev' *); { GDHandle}
+
+{ Mouse event parameters and types}
+
+const
+ kEventParamMouseLocation = $6D6C6F63 (* 'mloc' *); { typeHIPoint}
+ kEventParamWindowMouseLocation = $776D6F75 (* 'wmou' *); { typeHIPoint (Mac OS X 10.1 or later)}
+ kEventParamMouseButton = $6D62746E (* 'mbtn' *); { typeMouseButton}
+ kEventParamClickCount = $63636E74 (* 'ccnt' *); { typeUInt32}
+ kEventParamMouseWheelAxis = $6D776178 (* 'mwax' *); { typeMouseWheelAxis}
+ kEventParamMouseWheelDelta = $6D77646C (* 'mwdl' *); { typeSInt32}
+ kEventParamMouseDelta = $6D647461 (* 'mdta' *); { typeHIPoint (10.2 or later) or typeQDPoint}
+ kEventParamMouseChord = $63686F72 (* 'chor' *); { typeUInt32}
+ kEventParamTabletEventType = $74626C74 (* 'tblt' *); { typeUInt32}
+ kEventParamMouseTrackingRef = $6D747266 (* 'mtrf' *); { typeMouseTrackingRef}
+ typeMouseButton = $6D62746E (* 'mbtn' *); { EventMouseButton}
+ typeMouseWheelAxis = $6D776178 (* 'mwax' *); { EventMouseWheelAxis}
+ typeMouseTrackingRef = $6D747266 (* 'mtrf' *); { MouseTrackingRef}
+
+{ Keyboard event parameter and types}
+
+const
+ kEventParamKeyCode = $6B636F64 (* 'kcod' *); { typeUInt32}
+ kEventParamKeyMacCharCodes = $6B636872 (* 'kchr' *); { typeChar}
+ kEventParamKeyModifiers = $6B6D6F64 (* 'kmod' *); { typeUInt32}
+ kEventParamKeyUnicodes = $6B756E69 (* 'kuni' *); { typeUnicodeText}
+ kEventParamKeyboardType = $6B626474 (* 'kbdt' *); { typeUInt32}
+ typeEventHotKeyID = $686B6964 (* 'hkid' *); { EventHotKeyID}
+
+{ General TSM event parameters}
+
+const
+ kEventParamTSMSendRefCon = $74737263 (* 'tsrc' *); { typeLongInteger}
+ kEventParamTSMSendComponentInstance = $74736369 (* 'tsci' *); { typeComponentInstance}
+
+{ TextInput event parameters}
+
+const
+ kEventParamTextInputSendRefCon = kEventParamTSMSendRefCon; { typeLongInteger}
+ kEventParamTextInputSendComponentInstance = kEventParamTSMSendComponentInstance; { typeComponentInstance}
+ kEventParamTextInputSendSLRec = $7473736C (* 'tssl' *); { typeIntlWritingCode}
+ kEventParamTextInputReplySLRec = $7472736C (* 'trsl' *); { typeIntlWritingCode}
+ kEventParamTextInputSendText = $74737478 (* 'tstx' *); { typeUnicodeText (if TSMDocument is Unicode), otherwise typeChar}
+ kEventParamTextInputReplyText = $74727478 (* 'trtx' *); { typeUnicodeText (if TSMDocument is Unicode), otherwise typeChar}
+ kEventParamTextInputSendUpdateRng = $74737570 (* 'tsup' *); { typeTextRangeArray}
+ kEventParamTextInputSendHiliteRng = $74736869 (* 'tshi' *); { typeTextRangeArray}
+ kEventParamTextInputSendClauseRng = $7473636C (* 'tscl' *); { typeOffsetArray}
+ kEventParamTextInputSendPinRng = $7473706E (* 'tspn' *); { typeTextRange}
+ kEventParamTextInputSendFixLen = $74736678 (* 'tsfx' *); { typeLongInteger}
+ kEventParamTextInputSendLeadingEdge = $74736C65 (* 'tsle' *); { typeBoolean}
+ kEventParamTextInputReplyLeadingEdge = $74726C65 (* 'trle' *); { typeBoolean}
+ kEventParamTextInputSendTextOffset = $7473746F (* 'tsto' *); { typeLongInteger}
+ kEventParamTextInputReplyTextOffset = $7472746F (* 'trto' *); { typeLongInteger}
+ kEventParamTextInputReplyRegionClass = $74727267 (* 'trrg' *); { typeLongInteger}
+ kEventParamTextInputSendCurrentPoint = $74736370 (* 'tscp' *); { typeQDPoint}
+ kEventParamTextInputSendDraggingMode = $7473646D (* 'tsdm' *); { typeBoolean}
+ kEventParamTextInputReplyPoint = $74727074 (* 'trpt' *); { typeQDPoint}
+ kEventParamTextInputReplyFont = $74726674 (* 'trft' *); { typeLongInteger}
+ kEventParamTextInputReplyFMFont = $7472666D (* 'trfm' *); { typeUInt32}
+ kEventParamTextInputReplyPointSize = $7472707A (* 'trpz' *); { typeFixed}
+ kEventParamTextInputReplyLineHeight = $74726C68 (* 'trlh' *); { typeShortInteger}
+ kEventParamTextInputReplyLineAscent = $74726C61 (* 'trla' *); { typeShortInteger}
+ kEventParamTextInputReplyTextAngle = $74727461 (* 'trta' *); { typeFixed}
+ kEventParamTextInputSendShowHide = $74737368 (* 'tssh' *); { typeBoolean}
+ kEventParamTextInputReplyShowHide = $74727368 (* 'trsh' *); { typeBoolean}
+ kEventParamTextInputSendKeyboardEvent = $74736B65 (* 'tske' *); { typeEventRef}
+ kEventParamTextInputSendTextServiceEncoding = $74737365 (* 'tsse' *); { typeUInt32}
+ kEventParamTextInputSendTextServiceMacEncoding = $7473736D (* 'tssm' *); { typeUInt32}
+ kEventParamTextInputReplyMacEncoding = $74726D65 (* 'trme' *); { typeUInt32}
+ kEventParamTextInputGlyphInfoArray = $676C7068 (* 'glph' *); { typeGlyphInfoArray}
+ kEventParamTextInputSendGlyphInfoArray = kEventParamTextInputGlyphInfoArray;
+ kEventParamTextInputReplyGlyphInfoArray = $72677068 (* 'rgph' *); { typeGlyphInfoArray}
+ kEventParamTextInputSendReplaceRange = $74737270 (* 'tsrp' *); { typeCFRange}
+
+{ TSMDocumentAccess event parameters and types}
+
+const
+ kEventParamTSMDocAccessSendRefCon = kEventParamTSMSendRefCon; { typeLongInteger}
+ kEventParamTSMDocAccessSendComponentInstance = kEventParamTSMSendComponentInstance; { typeComponentInstance}
+ kEventParamTSMDocAccessCharacterCount = $74646374 (* 'tdct' *); { typeCFIndex}
+ kEventParamTSMDocAccessReplyCharacterRange = $74647272 (* 'tdrr' *); { typeCFRange}
+ kEventParamTSMDocAccessReplyCharactersPtr = $74647270 (* 'tdrp' *); { typePtr}
+ kEventParamTSMDocAccessSendCharacterIndex = $74647369 (* 'tdsi' *); { typeCFIndex}
+ kEventParamTSMDocAccessSendCharacterRange = $74647372 (* 'tdsr' *); { typeCFRange}
+ kEventParamTSMDocAccessSendCharactersPtr = $74647370 (* 'tdsp' *); { typePtr}
+ kEventParamTSMDocAccessRequestedCharacterAttributes = $74646361 (* 'tdca' *); { typeUInt32}
+ kEventParamTSMDocAccessReplyATSFont = $74646166 (* 'tdaf' *); { typeATSFontRef}
+ kEventParamTSMDocAccessReplyFontSize = $74647273 (* 'tdrs' *); { typeFloat}
+ kEventParamTSMDocAccessEffectiveRange = $74646572 (* 'tder' *); { typeRange}
+ kEventParamTSMDocAccessReplyATSUGlyphSelector = $74647267 (* 'tdrg' *); { typeGlyphSelector}
+ kEventParamTSMDocAccessLockCount = $74646C63 (* 'tdlc' *); { typeCFIndex}
+ kEventParamTSMDocAccessLineBounds = $74646C62 (* 'tdlb' *); { typeCFMutableArrayRef}
+ typeATSFontRef = $61747366 (* 'atsf' *); { ATSFontRef}
+ typeGlyphSelector = $676C6673 (* 'glfs' *); { ATSUGlyphSelector}
+
+{ Command event parameters and types}
+
+const
+ kEventParamHICommand = $68636D64 (* 'hcmd' *); { typeHICommand}
+ typeHICommand = $68636D64 (* 'hcmd' *); { HICommand}
+
+{ Window event parameters and types}
+
+const
+ kEventParamWindowFeatures = $77667472 (* 'wftr' *); { typeUInt32}
+ kEventParamWindowDefPart = $77647063 (* 'wdpc' *); { typeWindowDefPartCode}
+ kEventParamWindowPartCode = $77706172 (* 'wpar' *); { typeWindowPartCode}
+ kEventParamCurrentBounds = $63726374 (* 'crct' *); { typeQDRectangle}
+ kEventParamOriginalBounds = $6F726374 (* 'orct' *); { typeQDRectangle}
+ kEventParamPreviousBounds = $70726374 (* 'prct' *); { typeQDRectangle}
+ kEventParamClickActivation = $636C6163 (* 'clac' *); { typeClickActivationResult}
+ kEventParamWindowRegionCode = $77736870 (* 'wshp' *); { typeWindowRegionCode}
+ kEventParamWindowDragHiliteFlag = $77646866 (* 'wdhf' *); { typeBoolean}
+ kEventParamWindowModifiedFlag = $776D6666 (* 'wmff' *); { typeBoolean}
+ kEventParamWindowProxyGWorldPtr = $77706777 (* 'wpgw' *); { typeGWorldPtr}
+ kEventParamWindowProxyImageRgn = $77706972 (* 'wpir' *); { typeQDRgnHandle}
+ kEventParamWindowProxyOutlineRgn = $77706F72 (* 'wpor' *); { typeQDRgnHandle}
+ kEventParamWindowStateChangedFlags = $77736366 (* 'wscf' *); { typeUInt32 }
+ kEventParamWindowTitleFullWidth = $77746677 (* 'wtfw' *); { typeSInt16}
+ kEventParamWindowTitleTextWidth = $77747477 (* 'wttw' *); { typeSInt16}
+ kEventParamWindowGrowRect = $67726374 (* 'grct' *); { typeQDRectangle}
+ kEventParamPreviousDockRect = $70647263 (* 'pdrc' *); { typeHIRect}
+ kEventParamPreviousDockDevice = $70646764 (* 'pdgd' *); { typeGDHandle}
+ kEventParamCurrentDockRect = $63647263 (* 'cdrc' *); { typeHIRect}
+ kEventParamCurrentDockDevice = $63646764 (* 'cdgd' *); { typeGDHandle}
+ kEventParamWindowTransitionAction = $77746163 (* 'wtac' *); { typeWindowTransitionAction}
+ kEventParamWindowTransitionEffect = $77746566 (* 'wtef' *); { typeWindowTransitionEffect}
+ typeWindowRegionCode = $77736870 (* 'wshp' *); { WindowRegionCode}
+ typeWindowDefPartCode = $77647074 (* 'wdpt' *); { WindowDefPartCode}
+ typeWindowPartCode = $77706172 (* 'wpar' *); { WindowPartCode}
+ typeClickActivationResult = $636C6163 (* 'clac' *); { ClickActivationResult}
+ typeWindowTransitionAction = $77746163 (* 'wtac' *); { WindowTransitionAction}
+ typeWindowTransitionEffect = $77746566 (* 'wtef' *); { WindowTransitionEffect}
+
+{ Control event parameters and types}
+
+const
+ kEventParamControlPart = $63707274 (* 'cprt' *); { typeControlPartCode}
+ kEventParamInitCollection = $69636F6C (* 'icol' *); { typeCollection}
+ kEventParamControlMessage = $636D7367 (* 'cmsg' *); { typeShortInteger}
+ kEventParamControlParam = $6370726D (* 'cprm' *); { typeLongInteger}
+ kEventParamControlResult = $6372736C (* 'crsl' *); { typeLongInteger}
+ kEventParamControlRegion = $6372676E (* 'crgn' *); { typeQDRgnHandle}
+ kEventParamControlAction = $63617570 (* 'caup' *); { typeControlActionUPP}
+ kEventParamControlIndicatorDragConstraint = $63696463 (* 'cidc' *); { typeIndicatorDragConstraint}
+ kEventParamControlIndicatorRegion = $6369726E (* 'cirn' *); { typeQDRgnHandle}
+ kEventParamControlIsGhosting = $63677374 (* 'cgst' *); { typeBoolean}
+ kEventParamControlIndicatorOffset = $63696F66 (* 'ciof' *); { typeQDPoint}
+ kEventParamControlClickActivationResult = $63636172 (* 'ccar' *); { typeClickActivationResult}
+ kEventParamControlSubControl = $63737562 (* 'csub' *); { typeControlRef}
+ kEventParamControlOptimalBounds = $636F626E (* 'cobn' *); { typeQDRectangle}
+ kEventParamControlOptimalBaselineOffset = $636F626F (* 'cobo' *); { typeShortInteger}
+ kEventParamControlDataTag = $63647467 (* 'cdtg' *); { typeEnumeration}
+ kEventParamControlDataBuffer = $63646266 (* 'cdbf' *); { typePtr}
+ kEventParamControlDataBufferSize = $63646273 (* 'cdbs' *); { typeLongInteger}
+ kEventParamControlDrawDepth = $63646470 (* 'cddp' *); { typeShortInteger}
+ kEventParamControlDrawInColor = $63646963 (* 'cdic' *); { typeBoolean}
+ kEventParamControlFeatures = $63667472 (* 'cftr' *); { typeUInt32}
+ kEventParamControlPartBounds = $63706264 (* 'cpbd' *); { typeQDRectangle}
+ kEventParamControlOriginalOwningWindow = $636F6F77 (* 'coow' *); { typeWindowRef}
+ kEventParamControlCurrentOwningWindow = $63636F77 (* 'ccow' *); { typeWindowRef}
+ kEventParamControlFocusEverything = $63666576 (* 'cfev' *); { typeBoolean}
+ kEventParamNextControl = $636E7863 (* 'cnxc' *); { typeControlRef}
+ kEventParamStartControl = $63737463 (* 'cstc' *); { typeControlRef}
+ kEventParamControlSubview = $63737677 (* 'csvw' *); { typeControlRef}
+ kEventParamControlPreviousPart = $636F7063 (* 'copc' *); { typeControlPartCode}
+ kEventParamControlCurrentPart = $636E7063 (* 'cnpc' *); { typeControlPartCode}
+ kEventParamControlInvalRgn = $63697672 (* 'civr' *); { typeQDRgnHandle}
+ kEventParamControlValue = $6376616C (* 'cval' *); { typeLongInteger}
+ kEventParamControlHit = $63686974 (* 'chit' *); { typeBoolean}
+ kEventParamControlPartAutoRepeats = $63617572 (* 'caur' *); { typeBoolean}
+ kEventParamControlFrameMetrics = $63666D74 (* 'cfmt' *); { typeControlFrameMetrics}
+ kEventParamControlWouldAcceptDrop = $636C6467 (* 'cldg' *); { typeBoolean}
+ kEventParamControlPrefersShape = $63707368 (* 'cpsh' *); { typeBoolean}
+ typeControlActionUPP = $63617570 (* 'caup' *); { ControlActionUPP}
+ typeIndicatorDragConstraint = $63696463 (* 'cidc' *); { IndicatorDragConstraint}
+ typeControlPartCode = $63707274 (* 'cprt' *); { ControlPartCode}
+ typeControlFrameMetrics = $63696E73 (* 'cins' *); { HIViewFrameMetrics}
+
+{ Menu event parameters and types}
+
+const
+ kEventParamCurrentMenuTrackingMode = $636D746D (* 'cmtm' *); { typeMenuTrackingMode}
+ kEventParamNewMenuTrackingMode = $6E6D746D (* 'nmtm' *); { typeMenuTrackingMode}
+ kEventParamMenuFirstOpen = $3173746F (* '1sto' *); { typeBoolean}
+ kEventParamMenuItemIndex = $6974656D (* 'item' *); { typeMenuItemIndex}
+ kEventParamMenuCommand = $6D636D64 (* 'mcmd' *); { typeMenuCommand}
+ kEventParamEnableMenuForKeyEvent = $666F726B (* 'fork' *); { typeBoolean}
+ kEventParamMenuEventOptions = $6D656F70 (* 'meop' *); { typeMenuEventOptions}
+ kEventParamMenuContext = $6D637478 (* 'mctx' *); { typeUInt32}
+ kEventParamMenuDismissed = $6D646973 (* 'mdis' *); { typeUInt32}
+ kEventParamMenuItemBounds = $6D697462 (* 'mitb' *); { typeQDRectangle}
+ kEventParamMenuMarkBounds = $6D6D6B62 (* 'mmkb' *); { typeQDRectangle}
+ kEventParamMenuIconBounds = $6D696362 (* 'micb' *); { typeQDRectangle}
+ kEventParamMenuTextBounds = $6D747862 (* 'mtxb' *); { typeQDRectangle}
+ kEventParamMenuTextBaseline = $6D74626C (* 'mtbl' *); { typeShortInteger}
+ kEventParamMenuCommandKeyBounds = $6D636D62 (* 'mcmb' *); { typeQDRectangle}
+ kEventParamMenuVirtualTop = $6D767274 (* 'mvrt' *); { typeLongInteger}
+ kEventParamMenuVirtualBottom = $6D767262 (* 'mvrb' *); { typeLongInteger}
+ kEventParamMenuDrawState = $6D647273 (* 'mdrs' *); { typeThemeMenuState}
+ kEventParamMenuItemType = $6D697470 (* 'mitp' *); { typeThemeMenuItemType}
+ kEventParamMenuItemWidth = $6D697477 (* 'mitw' *); { typeShortInteger}
+ kEventParamMenuItemHeight = $6D697468 (* 'mith' *); { typeShortInteger}
+ kEventParamMenuFrameView = $6D667276 (* 'mfrv' *); { typeControlRef}
+ kEventParamMenuType = $6D747970 (* 'mtyp' *); { typeThemeMenuType}
+ kEventParamMenuIsPopup = $6D706F70 (* 'mpop' *); { typeBoolean}
+ kEventParamMenuDirection = $6D646972 (* 'mdir' *); { typeMenuDirection}
+ kEventParamParentMenu = $6D70726D (* 'mprm' *); { typeMenuRef}
+ kEventParamParentMenuItem = $6D707269 (* 'mpri' *); { typeMenuItemIndex}
+ kEventParamMenuPopupItem = $6D706974 (* 'mpit' *); { typeMenuItemIndex}
+ typeMenuItemIndex = $6D696478 (* 'midx' *); { MenuItemIndex}
+ typeMenuCommand = $6D636D64 (* 'mcmd' *); { MenuCommand}
+ typeMenuTrackingMode = $6D746D64 (* 'mtmd' *); { MenuTrackingMode}
+ typeMenuEventOptions = $6D656F70 (* 'meop' *); { MenuEventOptions}
+ typeThemeMenuState = $746D6E73 (* 'tmns' *); { ThemeMenuState}
+ typeThemeMenuItemType = $746D6974 (* 'tmit' *); { ThemeMenuItemType}
+ typeMenuDirection = $6D646972 (* 'mdir' *); { UInt32}
+ typeThemeMenuType = $746D7479 (* 'tmty' *); { ThemeMenuType}
+
+{ Application event parameters}
+
+const
+ kEventParamProcessID = $70736E20 (* 'psn ' *); { typeProcessSerialNumber}
+ kEventParamLaunchRefCon = $6C726566 (* 'lref' *); { typeUInt32}
+ kEventParamLaunchErr = $65727220 (* 'err ' *); { typeOSStatus}
+ kEventParamSystemUIMode = $75696D64 (* 'uimd' *); { typeUInt32}
+ kEventParamIsInInstantMouser = $696D6F75 (* 'imou' *); { typeBoolean}
+ kEventParamPreviousWindow = $70727677 (* 'prvw' *); { typeWindowRef}
+ kEventParamCurrentWindow = $63757277 (* 'curw' *); { typeWindowRef}
+
+{ Tablet event parameters and types}
+
+const
+ kEventParamTabletPointRec = $74627263 (* 'tbrc' *); { typeTabletPointRec}
+ kEventParamTabletProximityRec = $74627078 (* 'tbpx' *); { typeTabletProximityRec}
+ typeTabletPointRec = $74627263 (* 'tbrc' *); { kEventParamTabletPointRec}
+ typeTabletProximityRec = $74627078 (* 'tbpx' *); { kEventParamTabletProximityRec}
+
+{ Appearance event parameters}
+
+const
+ kEventParamNewScrollBarVariant = $6E736276 (* 'nsbv' *); { typeShortInteger}
+
+{ Service event parameters}
+
+const
+ kEventParamPasteboardRef = $70627264 (* 'pbrd' *); { typePasteboardRef}
+ kEventParamScrapRef = $73637270 (* 'scrp' *); { typeScrapRef}
+ kEventParamServiceCopyTypes = $73767364 (* 'svsd' *); { typeCFMutableArrayRef}
+ kEventParamServicePasteTypes = $73767074 (* 'svpt' *); { typeCFMutableArrayRef}
+ kEventParamServiceMessageName = $73766D67 (* 'svmg' *); { typeCFStringRef}
+ kEventParamServiceUserData = $73767564 (* 'svud' *); { typeCFStringRef}
+ typePasteboardRef = $70627264 (* 'pbrd' *); { PasteboardRef}
+ typeScrapRef = $73637270 (* 'scrp' *); { ScrapRef}
+
+{ Accessibility event parameters}
+
+const
+ kEventParamAccessibleObject = $616F626A (* 'aobj' *); { typeCFTypeRef with an AXUIElementRef}
+ kEventParamAccessibleChild = $6163686C (* 'achl' *); { typeCFTypeRef with an AXUIElementRef}
+ kEventParamAccessibleAttributeName = $61746E6D (* 'atnm' *); { typeCFStringRef}
+ kEventParamAccessibleAttributeNames = $61746E73 (* 'atns' *); { typeCFMutableArrayRef of CFStringRefs}
+ kEventParamAccessibleAttributeValue = $6174766C (* 'atvl' *); { variable}
+ kEventParamAccessibleAttributeSettable = $61747374 (* 'atst' *); { typeBoolean}
+ kEventParamAccessibleAttributeParameter = $61747061 (* 'atpa' *); { typeCFTypeRef}
+ kEventParamAccessibleActionName = $61636E6D (* 'acnm' *); { typeCFStringRef}
+ kEventParamAccessibleActionNames = $61636E73 (* 'acns' *); { typeCFMutableArrayRef of CFStringRefs}
+ kEventParamAccessibleActionDescription = $61636473 (* 'acds' *); { typeCFMutableStringRef}
+ kEventParamAccessibilityEventQueued = $61657175 (* 'aequ' *); { typeBoolean}
+
+{ Text field event type}
+
+const
+ typeCFRange = $6366726E (* 'cfrn' *); { CFRange}
+
+{--------------------------------------------------------------------------------------}
+{ ¥ Helpful utilities }
+{--------------------------------------------------------------------------------------}
+
+{
+ * Discussion:
+ * These are returned from calls to TrackMouseLocation and
+ * TrackMouseRegion. Those routines are designed as replacements to
+ * calls such as StillDown and WaitMouseUp. The advantage over those
+ * routines is that TrackMouseLocation and TrackMouseRegion will
+ * block if the user is not moving the mouse, whereas mouse tracking
+ * loops based on StillDown and WaitMouseUp will spin, chewing up
+ * valuable CPU time that could be better spent elsewhere. It is
+ * highly recommended that any tracking loops in your application
+ * stop using StillDown and WaitMouseUp and start using
+ * TrackMouseLocation/Region. See the notes on those routines for
+ * more information.
+ }
+const
+ kTrackMouseLocationOptionDontConsumeMouseUp = 1 shl 0;
+
+type
+ MouseTrackingResult = UInt16;
+const
+ kMouseTrackingMouseDown = 1;
+ kMouseTrackingMouseUp = 2;
+ kMouseTrackingMouseExited = 3;
+ kMouseTrackingMouseEntered = 4;
+ kMouseTrackingMouseDragged = 5;
+ kMouseTrackingKeyModifiersChanged = 6;
+ kMouseTrackingUserCancelled = 7;
+ kMouseTrackingTimedOut = 8;
+ kMouseTrackingMouseMoved = 9;
+
+{
+ * IsUserCancelEventRef()
+ *
+ * Discussion:
+ * Tests the event given to see whether the event represents a 'user
+ * cancel' event. Currently this is defined to be either the escape
+ * key being pressed, or command-period being pressed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * A boolean value indicating whether the event is a user cancel
+ * event.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function IsUserCancelEventRef( event: EventRef ): Boolean; external name '_IsUserCancelEventRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TrackMouseLocation()
+ *
+ * Discussion:
+ * Once entered, this routine waits for certain mouse events (move,
+ * mouse down, mouse up). When one of these events occurs, the
+ * function returns and tells the caller what happened and where the
+ * mouse is currently located. While there is no activity, the
+ * current event loop is run, effectively blocking the current
+ * thread (save for any timers that fire). This helps to minimize
+ * CPU usage when there is nothing going on.
+ *
+ * On Mac OS X 10.1 and earlier, and CarbonLib 1.5 and earlier,
+ * TrackMouseLocation, TrackMouseLocationWithOptions, and
+ * TrackMouseRegion only support mouse-tracking when a mouse button
+ * is pressed. They cannot be used for mouse-tracking when no mouse
+ * button is pressed; if called when no button is pressed, they will
+ * simply block until a button is pressed and will not return when
+ * the mouse is moved. On Mac OS X 10.2 and CarbonLib 1.6 and later,
+ * TrackMouseLocation, TrackMouseLocationWithOptions, and
+ * TrackMouseRegion support mouse-tracking without a pressed mouse
+ * button; TrackMouseLocation and TrackMouseLocationWithOptions
+ * return kMouseTrackingMouseMoved if the mouse is moved while no
+ * button is pressed, and TrackMouseRegion returns
+ * kMouseTrackingMouseEntered/Exited if the mouse moves into or out
+ * of the specified region while no button is pressed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPort:
+ * The grafport to consider for mouse coordinates. You can pass
+ * NULL for this parameter to indicate the current port. The mouse
+ * location is returned in terms of local coordinates of this
+ * port. You can pass -1 for this parameter to indicate that the
+ * mouse location should be returned in global coordinates instead
+ * of local coordinates.
+ *
+ * outPt:
+ * On exit, this parameter receives the mouse location from the
+ * last mouse event that caused this function to exit.
+ *
+ * outResult:
+ * On exit, this parameter receives a value representing what kind
+ * of event was received that cause the function to exit, such as
+ * kMouseTrackingMouseUp.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function TrackMouseLocation( inPort: GrafPtr { can be NULL }; var outPt: Point; var outResult: MouseTrackingResult ): OSStatus; external name '_TrackMouseLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TrackMouseLocationWithOptions()
+ *
+ * Discussion:
+ * This routine is largely identical to TrackMouseLocation. Please
+ * read the notes on that function as well.
+ * TrackMouseLocationWithOptions supports additional parameters for
+ * leaving mouse-up events in the event queue, specifying a timeout,
+ * and retrieving the current mouse position and keyboard modifiers.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPort:
+ * The grafport to consider for mouse coordinates. You can pass
+ * NULL for this parameter to indicate the current port. The mouse
+ * location is returned in terms of local coordinates of this
+ * port. You can pass -1 for this parameter to indicate that the
+ * mouse location should be returned in global coordinates instead
+ * of local coordinates.
+ *
+ * inOptions:
+ * The only option supported by this routine at present is
+ * kTrackMouseLocationOptionDontConsumeMouseUp, which indicates
+ * that the toolbox should leave mouse-up events in the queue. You
+ * may also pass zero for this parameter to get the default
+ * behavior, which is to remove mouse-up events from the queue
+ * before returning.
+ *
+ * inTimeout:
+ * The amount of time to wait for an event. If no events arrive
+ * within this time, kMouseTrackingTimedOut is returned in
+ * outResult.
+ *
+ * outPt:
+ * On exit, this parameter receives the mouse location from the
+ * last mouse event that caused this function to exit. If a
+ * timeout or key modifiers changed event caused this function to
+ * exit, the current mouse position at the time is returned.
+ *
+ * outModifiers:
+ * On exit, this parameter receives the most recent state of the
+ * keyboard modifiers. If a timeout caused this function to exit,
+ * the current keyboard modifiers at the time are returned.
+ *
+ * outResult:
+ * On exit, this parameter receives a value representing what kind
+ * of event was received that cause the function to exit, such as
+ * kMouseTrackingMouseUp.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TrackMouseLocationWithOptions( inPort: GrafPtr { can be NULL }; inOptions: OptionBits; inTimeout: EventTimeout; var outPt: Point; outModifiers: UInt32Ptr { can be NULL }; var outResult: MouseTrackingResult ): OSStatus; external name '_TrackMouseLocationWithOptions';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TrackMouseRegion()
+ *
+ * Discussion:
+ * This routine is largely identical to TrackMouseLocation. Please
+ * read the notes on that function as well. TrackMouseRegion differs
+ * from TrackMouseLocation by only returning when the mouse enters
+ * or exits a specified region that you pass in to the function, as
+ * opposed to whenever the mouse moves (it also returns for mouse
+ * up/down events). This is useful if you don't need to know
+ * intermediate mouse events, but rather just if the mouse enters or
+ * leaves an area.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inPort:
+ * The grafport to consider for mouse coordinates. You can pass
+ * NULL for this parameter to indicate the current port. You can
+ * pass -1 for this parameter to indicate that the mouse region
+ * should be interpreted in global coordinates instead of local
+ * coordinates.
+ *
+ * inRegion:
+ * The region to consider. This should be in the coordinates of
+ * the port you passed to inPort, or global coordinates if you
+ * passed -1 for the inPort parameter.
+ *
+ * ioWasInRgn:
+ * On entry, this parameter should be set to true if the mouse is
+ * currently inside the region passed in inRegion, or false if the
+ * mouse is currently outside the region. On exit, this parameter
+ * is updated to reflect the current reality; e.g. if the
+ * outResult parameter returns kMouseTrackingMouseExited,
+ * ioWasInRgn will be set to false when this function exits.
+ * Because it is updated from within, you should only need to set
+ * this yourself before the first call to this function in your
+ * tracking loop.
+ *
+ * outResult:
+ * On exit, this parameter receives a value representing what kind
+ * of event was received that cause the function to exit, such as
+ * kMouseTrackingMouseEntered.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function TrackMouseRegion( inPort: GrafPtr { can be NULL }; inRegion: RgnHandle; var ioWasInRgn: Boolean; var outResult: MouseTrackingResult ): OSStatus; external name '_TrackMouseRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * Summary:
+ * Mouse tracking info selectors for HIMouseTrackingGetParameters.
+ }
+const
+{
+ * Requests the time and distance for determining ÒstickyÓ mouse
+ * tracking. When the mouse is clicked on a menu title, the toolbox
+ * will enter a sticky mouse-tracking mode depending on the time and
+ * distance between the mouse-down event and the mouse-up event. In
+ * this mode, the menu is tracked even though the mouse has already
+ * been released.
+ }
+ kMouseParamsSticky = $73746963 (* 'stic' *);
+
+{
+ * HIMouseTrackingGetParameters()
+ *
+ * Summary:
+ * Returns information about how mouse tracking loops should behave.
+ *
+ * Discussion:
+ * Mouse tracking loops may use different timeouts and wander
+ * distances to determine their behavior. This API provides a
+ * generic service for requesting this information. Currently, the
+ * only supported selector is kMouseParamsSticky.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSelector:
+ * Indicates which type of information should be returned.
+ *
+ * outTime:
+ * If selector is kMouseParamsSticky, returns the maximum time
+ * between mouse-down and mouse-up. If the time between events is
+ * longer than this value, sticky mode should not be invoked. May
+ * be NULL if this information is not required.
+ *
+ * outDistance:
+ * If selector is kMouseParamsSticky, returns the maximum distance
+ * between mouse-down and mouse-up. If the distance between events
+ * is longer than this value, sticky mode should not be invoked.
+ * May be NULL if this information is not required.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+function HIMouseTrackingGetParameters( inSelector: OSType; outTime: EventTimePtr { can be NULL }; outDistance: HISizePtr { can be NULL } ): OSStatus; external name '_HIMouseTrackingGetParameters';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * ConvertEventRefToEventRecord()
+ *
+ * Discussion:
+ * This is a convenience routine to help you if there are places in
+ * your application where you need an EventRecord and all you have
+ * is an EventRef. If the event can be converted, outEvent is filled
+ * in and the function returns true. If not, false is returned and
+ * outEvent will contain a nullEvent.
+ *
+ * Currently, the following events can be converted:
+ *
+ * kEventClassMouse: kEventMouseDown, kEventMouseUp,
+ * kEventMouseMoved, kEventMouseDragged.
+ *
+ * kEventClassKeyboard: kEventRawKeyDown, kEventRawKeyUp,
+ * kEventRawKeyRepeat.
+ *
+ * kEventClassControl: kEventControlTrack (in Mac OS X 10.4 and
+ * later; converts to a mouseDown event).
+ *
+ * kEventClassWindow: kEventWindowUpdate, kEventWindowActivate,
+ * kEventWindowDeactivate, kEventWindowCursorChange.
+ *
+ * kEventClassApplication: kEventAppActivated, kEventAppDeactivated.
+ * <BR><BR> kEventClassAppleEvent: kEventAppleEvent.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The EventRef to convert into an EventRecord.
+ *
+ * outEvent:
+ * The EventRecord to fill out.
+ *
+ * Result:
+ * A boolean indicating if the conversion was successful (true) or
+ * not (false).
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function ConvertEventRefToEventRecord( inEvent: EventRef; var outEvent: EventRecord ): Boolean; external name '_ConvertEventRefToEventRecord';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsEventInMask()
+ *
+ * Discussion:
+ * This is a companion function for ConvertEventRefToEventRecord,
+ * and is provided as a convenience routine to help you if there are
+ * places in your application where you want to check an EventRef to
+ * see if it matches a classic EventMask bitfield. If the event
+ * matches, the function returns true.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inEvent:
+ * The EventRef to convert into an EventRecord.
+ *
+ * inMask:
+ * The mask to consider.
+ *
+ * Result:
+ * A boolean indicating if the event was considered to be in the
+ * mask provided.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function IsEventInMask( inEvent: EventRef; inMask: EventMask ): Boolean; external name '_IsEventInMask';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetLastUserEventTime()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetLastUserEventTime: EventTime; external name '_GetLastUserEventTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{--------------------------------------------------------------------------------------}
+{ ¥ Mouse Coalescing }
+{--------------------------------------------------------------------------------------}
+{
+ * IsMouseCoalescingEnabled()
+ *
+ * Discussion:
+ * Returns true if mouse coalescing is current enabled. When
+ * enabled, we coalesce mouse moved and mouse dragged events. By
+ * default, coalescing is on, but you can use
+ * SetMouseCoalescingEnabled to disable it if you want finer-grained
+ * mouse movement events, which is useful for drawing with tablets.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * A boolean indicating if coalescing is enabled.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+function IsMouseCoalescingEnabled: Boolean; external name '_IsMouseCoalescingEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ * SetMouseCoalescingEnabled()
+ *
+ * Discussion:
+ * Allows you to set mouse move/drag event coalescing on or off. By
+ * default, coalescing is on, but you can use this function to
+ * disable it if you want finer-grained mouse movement events, which
+ * is useful for drawing with tablets.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inNewState:
+ * A boolean indicating if coalescing should be enabled (true) or
+ * disabled (false).
+ *
+ * outOldState:
+ * A boolean which receives the prior state of mouse coalescing
+ * for restoration later. You can pass NULL for this parameter if
+ * you don't care.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetMouseCoalescingEnabled( inNewState: Boolean; outOldState: BooleanPtr { can be NULL } ): OSStatus; external name '_SetMouseCoalescingEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{======================================================================================}
+{ EVENT CLASSES }
+{======================================================================================}
+
+{
+ * Summary:
+ * Event classes
+ }
+const
+{
+ * Events related to the mouse (mouse down/up/moved).
+ }
+ kEventClassMouse = $6D6F7573 (* 'mous' *);
+
+ {
+ * Events related to the keyboard.
+ }
+ kEventClassKeyboard = $6B657962 (* 'keyb' *);
+
+ {
+ * Events related to text input (by keyboard, or by input method).
+ }
+ kEventClassTextInput = $74657874 (* 'text' *);
+
+ {
+ * Application-level events (launch, quit, etc.).
+ }
+ kEventClassApplication = $6170706C (* 'appl' *);
+
+ {
+ * Apple Events.
+ }
+ kEventClassAppleEvent = $65707063 (* 'eppc' *);
+
+ {
+ * Events related to menus.
+ }
+ kEventClassMenu = $6D656E75 (* 'menu' *);
+
+ {
+ * Events related to windows.
+ }
+ kEventClassWindow = $77696E64 (* 'wind' *);
+
+ {
+ * Events related to controls.
+ }
+ kEventClassControl = $636E746C (* 'cntl' *);
+
+ {
+ * Events related to commands generated by menu items or controls.
+ * These events contain HICommand structures.
+ }
+ kEventClassCommand = $636D6473 (* 'cmds' *);
+
+ {
+ * Events related to tablets.
+ }
+ kEventClassTablet = $74626C74 (* 'tblt' *);
+
+ {
+ * Events related to File Manager volumes.
+ }
+ kEventClassVolume = $766F6C20 (* 'vol ' *);
+
+ {
+ * Events related to the Appearance Manager.
+ }
+ kEventClassAppearance = $6170706D (* 'appm' *);
+
+ {
+ * Events related to the Services Manager.
+ }
+ kEventClassService = $73657276 (* 'serv' *);
+
+ {
+ * Events related to toolbars.
+ }
+ kEventClassToolbar = $74626172 (* 'tbar' *);
+
+ {
+ * Events related to toolbar items.
+ }
+ kEventClassToolbarItem = $74626974 (* 'tbit' *);
+
+ {
+ * Events related to toolbar item views.
+ }
+ kEventClassToolbarItemView = $74626976 (* 'tbiv' *);
+
+ {
+ * Events related to application accessibility.
+ }
+ kEventClassAccessibility = $61636365 (* 'acce' *);
+
+ {
+ * Events related to the system.
+ }
+ kEventClassSystem = $6D616373 (* 'macs' *);
+
+ {
+ * Events related to Ink.
+ }
+ kEventClassInk = $696E6B20 (* 'ink ' *);
+ kEventClassTSMDocumentAccess = $74646163 (* 'tdac' *);
+
+{--------------------------------------------------------------------------------------}
+{ Mouse Events }
+{--------------------------------------------------------------------------------------}
+{
+ kEventClassMouse quick reference:
+
+ kEventMouseDown = 1,
+ kEventMouseUp = 2,
+ kEventMouseMoved = 5,
+ kEventMouseDragged = 6,
+ kEventMouseEntered = 8,
+ kEventMouseExited = 9,
+ kEventMouseWheelMoved = 10
+
+ NOTE: As of Mac OS X 10.1, mouse events carry more information which allow you
+ to do less work and gain accuracy of hit testing. First, there is the
+ kEventParamWindowRef parameter. This parameter tells you over which window
+ the mouse click/move/etc occurred. In mouse dragged events, this is the
+ window the mouse went down in, NOT the window the mouse is currently over.
+ Next, there is the kEventParamWindowMouseLocation parameter. This is the
+ window-relative position of the mouse in the window given in the
+ kEventParamWindowRef parameter. 0,0 is at the top left of the structure
+ of the window.
+}
+
+{
+ * EventMouseButton
+ *
+ }
+type
+ EventMouseButton = UInt16;
+const
+{
+ * Only button for a one-button mouse (usually left button for
+ * multi-button mouse)
+ }
+ kEventMouseButtonPrimary = 1;
+
+ {
+ * Usually right button for a multi-button mouse
+ }
+ kEventMouseButtonSecondary = 2;
+
+ {
+ * Usually middle button for a three-button mouse
+ }
+ kEventMouseButtonTertiary = 3;
+
+
+{
+ * EventMouseWheelAxis
+ *
+ }
+type
+ EventMouseWheelAxis = UInt16;
+const
+{
+ * The X axis (left or right)
+ }
+ kEventMouseWheelAxisX = 0;
+
+ {
+ * The Y axis (up or down)
+ }
+ kEventMouseWheelAxisY = 1;
+
+{
+ * kEventClassMouse / kEventMouseDown
+ *
+ * Summary:
+ * A mouse button was pressed.
+ *
+ * Discussion:
+ * All windows have a default handler installed on the window target
+ * that handles this event by calling SetFrontProcess on the current
+ * process if the current process is not already the front process.
+ * It is very important that an event handler for this event always
+ * return eventNotHandledErr, so that the default handler can run
+ * and can activate the current process.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.1 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventMouseDown = 1;
+
+{
+ * kEventClassMouse / kEventMouseUp
+ *
+ * Summary:
+ * A mouse button was released.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window in which the mouse was original pressed.
+ * Available in Mac OS X 10.1 and later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was released.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventMouseUp = 2;
+
+{
+ * kEventClassMouse / kEventMouseMoved
+ *
+ * Summary:
+ * The mouse was moved.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.3 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.3 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseDelta (in, typeHIPoint)
+ * The change in mouse position, in absolute units, ignoring
+ * scaling. Available in Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventMouseMoved = 5;
+
+{
+ * kEventClassMouse / kEventMouseDragged
+ *
+ * Summary:
+ * The mouse was moved, and a button was down.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window in which the mouse was original pressed.
+ * Available in Mac OS X 10.1 and later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseDelta (in, typeHIPoint)
+ * The change in mouse position, in absolute units, ignoring
+ * scaling. Available in Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventMouseDragged = 6;
+
+{
+ * kEventClassMouse / kEventMouseEntered
+ *
+ * Summary:
+ * The mouse entered a tracking area.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamMouseTrackingRef (in, typeMouseTrackingRef)
+ * The MouseTrackingRef whose region the mouse has just
+ * entered.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventMouseEntered = 8;
+
+{
+ * kEventClassMouse / kEventMouseExited
+ *
+ * Summary:
+ * The mouse exited a tracking area.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamMouseTrackingRef (in, typeMouseTrackingRef)
+ * The MouseTrackingRef whose region the mouse has just exited.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventMouseExited = 9;
+
+{
+ * kEventClassMouse / kEventMouseWheelMoved
+ *
+ * Summary:
+ * The mouse wheel was moved.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.1 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseWheelAxis (in, typeMouseWheelAxis)
+ * The wheel axis which moved. Contains either
+ * kEventMouseWheelAxisX or kEventMouseWheelAxisY.
+ *
+ * --> kEventParamMouseWheelDelta (in, typeLongInteger)
+ * The amount of change in the wheel position. Generally, a
+ * positive change should be interpreted as an upward scroll
+ * (equivalent to a click in the up arrow of a scrollbar); a
+ * negative change should be interpreted as a downward scroll
+ * (equivalent to a click in the down arrow of a scrollbar).
+ * Applications should not scale the delta value provided in
+ * the event; the Mac OS X input device system provides
+ * pre-scaling according to the userÕs desired mouse wheel
+ * speed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventMouseWheelMoved = 10;
+
+{--------------------------------------------------------------------------------------}
+{ TSM Document Access Events }
+{--------------------------------------------------------------------------------------}
+{
+ kEventClassTSMDocumentAccess quick reference:
+
+ ** Text Access **
+ kEventTSMDocumentAccessGetLength = 1,
+ kEventTSMDocumentAccessGetSelectedRange = 2,
+ kEventTSMDocumentAccessGetCharactersPtr = 3,
+ kEventTSMDocumentAccessGetCharactersPtrForLargestBuffer = 4,
+ kEventTSMDocumentAccessGetCharacters = 5,
+
+ ** Text Attribute Access **
+ kEventTSMDocumentAccessGetFont = 6,
+ kEventTSMDocumentAccessGetGlyphInfo = 7,
+
+ ** Transaction control **
+ kEventTSMDocumentAccessLockDocument = 8,
+ kEventTSMDocumentAccessUnlockDocument = 9
+
+ These events allow access to a document's content. They are grouped in the following
+ categories: text access, text attribute, and transaction related events.
+
+ NOTE: TSM dispatches events of the TSMDocumentAccess class only as Carbon events. These
+ are not converted for TSM clients that still install AppleEvent handlers for TSM events.
+ NOTE: Text Services dispatch these Carbon events through TSM's SendTextInputEvent API.
+ Normally only used for TextInput class TSM events, but this SendTextInputEvent is a bit
+ of a misnomer. You should use it for TSMDocumentAccess class events as well.
+}
+{
+
+ ** Document Access Text events **
+
+ The following Text Access events are very similar in design to the CFString API.
+ The entire document can be conceived as a flattened Unicode string, and the
+ events in this interface can access any portion of it. The GetSelectedRange() method
+ allow a text service to obtain text near the insertion point (or selection), but access
+ is by no means restricted to this vicinity. Use the GetLength() method to obtain the
+ size of the document.
+
+ Supporting these events effectively provide hooks into the text engine, but it is
+ understood that access to a document in this way is to be strictly Read-Only. Where
+ direct access to a document's content cannot be provided through a pointer, the requested
+ text can be copied instead. Situations where a pointer may not be available from the
+ text engine include the following:
+
+ -A pointer would require conversion of text in Mac encodings to Unicode
+ -A pointer would require sparse Unicode text blocks to be flattened into a single
+ buffer.
+
+ The idea is to minimize copying and converting text encodings where possible. The text
+ service will typically begin by asking for a document pointer via
+ kEventTSMDocumentAccessGetCharactersPtr. If this fails, it will typically fallback to
+ kEventTSMDocumentAccessGetCharactersPtrForLargestBuffer, specifying a location of interest.
+ If this fails, it will fallback to kEventTSMDocumentAccessGetCharacters, specifying a range
+ of interest. Of course, when requesting small amounts of data such a few characters on either
+ side of the insertion point, there is no obligation to optimize in this way. It's valid to
+ simply use kEventTSMDocumentAccessGetCharacters.
+
+ The text engine is entirely free to deny a request for a text pointer for these or any other
+ implementation specific reason.
+}
+{
+ * kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetLength
+ *
+ * Summary:
+ * Returns the number of 16-bit Unicode characters in the document.
+ *
+ * Discussion:
+ * This event is equivalent to calling CFStringGetLength() on the
+ * app's document.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * <-- kEventParamTSMDocAccessCharacterCount (out, typeCFIndex)
+ * The size of the document in UniChar. Required reply
+ * parameter.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTSMDocumentAccessGetLength = 1;
+
+{
+ * kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetSelectedRange
+ *
+ * Summary:
+ * Returns the selection range in the document.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * <-- kEventParamTSMDocAccessReplyCharacterRange (out, typeCFRange)
+ * The selection range as a CFRange in UniChar. If the
+ * selection is empty, the range identifies the insertion
+ * point and the range will specify a length of 0. Required
+ * reply parameter.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTSMDocumentAccessGetSelectedRange = 2;
+
+{
+ * kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetCharactersPtr
+ *
+ * Summary:
+ * Returns a Unicode pointer to the entire document content.
+ *
+ * Discussion:
+ * This event is equivalent to calling CFStringGetCharactersPtr() on
+ * the app's document treated as a CFString. Some text engines may
+ * not support this event for reasons that are implementation
+ * dependent. For example, a text engine's backing store may consist
+ * of legacy encoding runs. It may also consist of unflattened
+ * Unicode, stored as a B-tree of text blocks. For such reasons, a
+ * text engine may reject a request for a pointer to a flattened
+ * Unicode buffer. It is also understood that text access through
+ * this pointer is to be strictly READ-ONLY. Any changes to the
+ * document should be made through TSM TextInput events, such as
+ * kEventTextInputUpdateActiveInputArea or
+ * kEventTextInputUnicodeText. NOTE: This pointer is valid only
+ * during a transaction surrounded by document lock/unlock events,
+ * or until an event causes the document to change, such as
+ * dispatching kEventTextInputUpdateActiveInputArea or
+ * kEventTextInputUnicodeText events, whichever occurs first.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * <-- kEventParamTSMDocAccessReplyCharactersPtr (out, typePtr)
+ * The UniChar pointer to the document. Required reply
+ * parameter, if the event is supported.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTSMDocumentAccessGetCharactersPtr = 3;
+
+{
+ * kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetCharactersPtrForLargestBuffer
+ *
+ * Summary:
+ * Returns a Unicode pointer to a portion of the document.
+ *
+ * Discussion:
+ * This event is similar to calling CFStringGetCharactersPtr() on a
+ * portion of the app's document treated as a CFString, except that
+ * the substring is determined by the text engine. Some text engines
+ * may keep text in unflattened Unicode, stored as a B-tree of text
+ * blocks, for example. In some cases, especially near locations
+ * such as the insertion point, the text engine may have cached a
+ * good chunk of text to which it can readily provide a pointer. A
+ * text engine may reject a request for such a pointer. It is also
+ * understood that text access through this pointer is to be
+ * strictly READ-ONLY. Any changes to the document should be made
+ * through TSM TextInput events, such as
+ * kEventTextInputUpdateActiveInputArea or
+ * kEventTextInputUnicodeText. NOTE: This pointer is valid only
+ * during a transaction surrounded by document lock/unlock, or until
+ * an event causes the document to change, such as dispatching
+ * kEventTextInputUpdateActiveInputArea or
+ * kEventTextInputUnicodeText events.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * --> kEventParamTSMDocAccessSendCharacterIndex (in, typeCFIndex)
+ * The location in the document for which the caller would
+ * like a pointer to a buffer of text that includes that
+ * location. This buffer could be available from a cache
+ * due to recent interaction near that location, such as the
+ * insertion point. Required parameter.
+ *
+ * <-- kEventParamTSMDocAccessReplyCharactersPtr (out, typePtr)
+ * The UniChar pointer to a portion of the document text.
+ * Required reply parameter, if the event is handled.
+ *
+ * <-- kEventParamTSMDocAccessReplyCharacterRange (out, typeCFRange)
+ * The document-relative range of text represented by the
+ * returned text pointer. Required reply parameter, if the
+ * event is handled.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTSMDocumentAccessGetCharactersPtrForLargestBuffer = 4;
+
+{
+ * kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetCharacters
+ *
+ * Summary:
+ * Fills caller provided buffer with Unicode characters in the
+ * specified range.
+ *
+ * Discussion:
+ * This event is equivalent to calling CFStringGetCharacters() on
+ * the app's document treated as a CFString.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * --> kEventParamTSMDocAccessSendCharacterRange (in, typeCFRange)
+ * The range of text that should be copied into the buffer
+ * provided by the caller. Required parameter.
+ *
+ * --> kEventParamTSMDocAccessSendCharactersPtr (in, typePtr)
+ * A buffer provided by the caller to contain the specified
+ * range of UniChars. This buffer is identical in usage to
+ * that of CFStringGetCharacters(). Required parameter.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTSMDocumentAccessGetCharacters = 5;
+
+{
+
+ ** Document Access Attribute events **
+
+ The following Text Attribute events define how a text service can obtain certain attributes
+ at text locations throughout an application's document.
+
+ Currently, the only attributes supported by these events are font (and font size)
+ via kEventTSMDocumentAccessGetFont and glyphID/CID info via kEventTSMDocumentAccessGetGlyphInfo.
+
+ Where these attributes span multiple characters, effective ranges (over which
+ the attribute is constant) are returned by the text engine.
+}
+
+{
+ * Summary:
+ * Values used TSMDocAccessAttributes bit field
+ *
+ * Discussion:
+ * The following bit assignments are used for TSMDocAccessAttributes
+ * parameters. This parameter is used to specify desired (optional)
+ * attributes in the kEventTSMDocumentAccessGetFont and
+ * kEventTSMDocumentAccessGetGlyphInfo events. They are specified in
+ * the kEventParamTSMDocAccessRequestedCharacterAttributes parameter.
+ }
+const
+{
+ * Font size information is desired. Used in
+ * kEventTSMDocumentAccessGetFont event.
+ }
+ kTSMDocAccessFontSizeAttributeBit = 0;
+
+ {
+ * Effective Range information is desired. Used in
+ * kEventTSMDocumentAccessGetFont and
+ * kEventTSMDocumentAccessGetGlyphInfo events.
+ }
+ kTSMDocAccessEffectiveRangeAttributeBit = 1;
+
+type
+ TSMDocAccessAttributes = UInt32;
+const
+ kTSMDocAccessFontSizeAttribute = 1 shl kTSMDocAccessFontSizeAttributeBit;
+ kTSMDocAccessEffectiveRangeAttribute = 1 shl kTSMDocAccessEffectiveRangeAttributeBit; { More attributes may be added in the future}
+
+
+{
+ * kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetFont
+ *
+ * Summary:
+ * Returns font, font size, and the range over which these
+ * attributes are constant.
+ *
+ * Discussion:
+ * Where the font/font size attributes span multiple characters, an
+ * effective range (over which requested attributes are constant) is
+ * returned by the text engine.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * --> kEventParamTSMDocAccessSendCharacterIndex (in, typeCFIndex)
+ * The location in the document for which the caller would
+ * like font information. Required parameter.
+ *
+ * --> kEventParamTSMDocAccessRequestedCharacterAttributes (in, typeUInt32)
+ * A TSMDocAccessAttributes bit field filled out with the
+ * attributes desired. Applicable values for this event are :
+ * kTSMDocAccessFontSizeAttribute which requests font size
+ * information through the
+ * kEventParamTSMDocAccessReplyFontSize parameter, and
+ * kTSMDocAccessEffectiveRangeAttribute which requests the
+ * text range over which font or font/size is constant.
+ * Required parameter.
+ *
+ * <-- kEventParamTSMDocAccessReplyATSFont (out, typeATSFontRef)
+ * The ATSFontRef for the location specified by the caller.
+ * Required reply parameter.
+ *
+ * <-- kEventParamTSMDocAccessReplyFontSize (out, typeFloat)
+ * The font size for the requested location. Optional reply
+ * parameter. Return this information if
+ * kTSMDocAccessFontSizeAttribute is specified in the bit
+ * field passed as the
+ * kEventParamTSMDocAccessRequestedCharacterAttributes
+ * parameter.
+ *
+ * --> kEventParamTSMDocAccessSendCharacterRange (in, typeCFRange)
+ * The maximum range of text the caller cares about. This is
+ * used to "clip" the area of interest to the caller so the
+ * text engine doesn't need to process a style run all the way
+ * back to, say, the beginning of a line or a document, in
+ * order to return an effective range. Required parameter.
+ *
+ * <-- kEventParamTSMDocAccessEffectiveRange (out, typeCFRange)
+ * The range of text over which both font and size are
+ * constant, within the bounds of the
+ * kEventParamTSMDocAccessSendCharacterRange parameter.
+ * Optional reply parameter. Return this information if
+ * kTSMDocAccessEffectiveRangeAttribute is specified in the
+ * bit field passed as the
+ * kEventParamTSMDocAccessRequestedCharacterAttributes
+ * parameter.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTSMDocumentAccessGetFont = 6;
+
+{
+ * kEventClassTSMDocumentAccess / kEventTSMDocumentAccessGetGlyphInfo
+ *
+ * Summary:
+ * Returns glyph info and the range covered by that glyph.
+ *
+ * Discussion:
+ * Where a glyph spans multiple characters, the effective range,
+ * represented by the glyph, is returned by the app.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * --> kEventParamTSMDocAccessSendCharacterIndex (in, typeCFIndex)
+ * The location in the document for which the caller would
+ * like glyph information. Required parameter.
+ *
+ * --> kEventParamTSMDocAccessRequestedCharacterAttributes (in, typeUInt32)
+ * A TSMDocAccessAttributes bit field filled out with the
+ * information desired. Applicable values for this event are :
+ * kTSMDocAccessEffectiveRangeAttribute which requests the
+ * text range represented by a glyph. Required parameter.
+ *
+ * <-- kEventParamTSMDocAccessReplyATSUGlyphSelector (out, typeGlyphSelector)
+ * The glyph used to display the range of text returned in the
+ * kEventParamTSMDocAccessEffectiveRange parameter. If the
+ * glyph used is the one that ATSUI would normally derive,
+ * this parameter can be omitted. Optional reply parameter.
+ *
+ * <-- kEventParamTSMDocAccessEffectiveRange (out, typeCFRange)
+ * The range of text displayed as a glyph ID or CID. Optional
+ * reply parameter. Return this information if
+ * kTSMDocAccessEffectiveRangeAttribute is specified in the
+ * bit field passed as the
+ * kEventParamTSMDocAccessRequestedCharacterAttributes
+ * parameter.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTSMDocumentAccessGetGlyphInfo = 7;
+
+{
+
+ ** Document Access Lock/Unlock events **
+
+}
+{
+ * kEventClassTSMDocumentAccess / kEventTSMDocumentAccessLockDocument
+ *
+ * Summary:
+ * Notifies the app that it should not change its document's text
+ * content (on its own) while a text service is involved in a
+ * transaction. The app should not allow changes, for example, by
+ * its secondary threads.
+ *
+ * Discussion:
+ * These events define how a text service can obtain access to a
+ * document in a way that ensures data integrity during its
+ * transaction. The primary motivation of these events is to
+ * prevent the application from letting its secondary threads modify
+ * the document while a text service is busy servicing an event,
+ * such as a key event, or some user interaction with text service
+ * provided UI such as a menu selection. Also, while the document is
+ * locked, a text service is free to request pointer access to the
+ * document's text content (if this is supported by the app's text
+ * engine.) These lock-related events should be implemented using a
+ * ref counting scheme. Most apps will not support this kind of
+ * threading, so implementation of these events in the text engine
+ * will be optional. In most text engines, the implementation of
+ * these events should be trivial, i.e. just maintain a simple
+ * semaphore. TSM itself will implicitly lock/unlock around normal
+ * entry points into a text service, such as when it delivers key
+ * events to an input method, but there may be times when document
+ * changes can be driven by an input method without TSM involvement,
+ * such as the Carbon events involved when the user interacts with
+ * some UI. In this case, the input method must manage locking, if
+ * the app supports it. However, the logic in an input method
+ * should not have to care whether TSM is in the call chain or
+ * not... and TSM should not have to care whether an input method
+ * will do the right thing. This is why the lock mechanism needs to
+ * be some kind of refcounting scheme instead of a simple on/off
+ * mechanism. This document lock support is completely optional on
+ * the part of the text engine (if it is not threaded). TSM will
+ * implicitly lock/unlock the document around delivery of events to
+ * input methods, if the app supports it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * <-- kEventParamTSMDocAccessLockCount (out, typeCFIndex)
+ * The resulting refCount of locks on the document. Required
+ * reply parameter, if the event is handled.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTSMDocumentAccessLockDocument = 8;
+
+
+{
+ * kEventClassTSMDocumentAccess / kEventTSMDocumentAccessUnlockDocument
+ *
+ * Summary:
+ * Unlock the document so the app's text engine is free to initiate
+ * changes again.
+ *
+ * Discussion:
+ * (see kEventTSMDocumentAccessLockDocument)
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTSMDocAccessSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTSMDocAccessSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * <-- kEventParamTSMDocAccessLockCount (out, typeCFIndex)
+ * The resulting refCount of locks on the document. Required
+ * reply parameter, if the event is handled.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTSMDocumentAccessUnlockDocument = 9;
+
+
+{--------------------------------------------------------------------------------------}
+{ Text Input Events }
+{--------------------------------------------------------------------------------------}
+{
+ kEventClassTextInput quick reference:
+
+ kEventTextInputUpdateActiveInputArea = 1,
+ kEventTextInputUnicodeForKeyEvent = 2,
+ kEventTextInputOffsetToPos = 3,
+ kEventTextInputPosToOffset = 4,
+ kEventTextInputShowHideBottomWindow = 5,
+ kEventTextInputGetSelectedText = 6,
+ kEventTextInputUnicodeText = 7,
+ kEventTextInputFilterText = 14
+
+ The following TextInput events (UpdateActiveInputArea thru GetSelectedText) reimplement
+ the AppleEvents defined in Inside Mac Text: Text Services Manager, and provide the benefits
+ of Carbon Event targeting, dispatching, and propagation to applications that have formerly
+ handled the TSM suite of AppleEvents.
+
+ TextInput handlers may be installed on controls, windows, or the application event target
+ (equivalent to AppleEvent-based handling). In all cases, if a given TextInput handler is
+ not installed, TSM will convert that TextInput to an AppleEvent and redispatch via AESend
+ to the current process, making adoption as gradual as is desired.
+}
+{
+ * kEventClassTextInput / kEventTextInputUpdateActiveInputArea
+ *
+ * Summary:
+ * Tells the application/text engine to initiate/terminate or manage
+ * the content of an inline input session.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTextInputSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * --> kEventParamTextInputSendSLRec (in, typeIntlWritingCode)
+ * The ScriptLanguageRecord associated with the contents of an
+ * inline input session. This parameter is normally provided
+ * by the input method originating the event. TSM's
+ * SendTextInputEvent will construct this parameter, when
+ * missing, based on the input method component description.
+ * (Required Parameter)
+ *
+ * --> kEventParamTextInputSendFixLen (in, typeLongInteger)
+ * This parameter indicates how much, if any, of the inline
+ * input session is being confirmed (or commited) to the
+ * application. A value of -1 indicates the entire inline
+ * session is being confirmed. A value of 0 indicates that
+ * none of the text is being confirmed (yet), although there
+ * may be some change to the contents of the inline input
+ * session. This parameter is provided by the input method
+ * originating the event. (Required Parameter)
+ *
+ * --> kEventParamTextInputSendText (in, typeUnicodeText)
+ * The text to be added to the inline input session. The data
+ * type of this parameter actually depends on the TSMDocument
+ * type created via NewTSMDocument: it will be typeChar for
+ * kTextService documents, or typeUnicodeText for
+ * kUnicodeDocument documents. (Required Parameter)
+ *
+ * --> kEventParamTextInputSendUpdateRng (in, typeTextRangeArray)
+ * An array of text-range records (see TextRangeArray) that
+ * indicates how to update (a subrange of) the active input
+ * area (aka. inline input session). The TextRange structures
+ * occur in pairs, the first of which identifies a subrange of
+ * the existing active input area (in the app's backing store,
+ * resulting from a previous UpdateActiveInputArea event) to
+ * be replaced by a new subrange of text, identified by the
+ * second TextRange in the pair. The new text subrange is
+ * obtained from the contents of the
+ * kEventParamTextInputSendText parameter. In general, the
+ * Nth array element, where N is even, specifies the range of
+ * old text to be updated and array element N+1 specifies the
+ * range of new text to replace the corresponding old text.
+ * The fHiliteStyle field of the TextRange records is ignored
+ * in this parameter. NOTE: There are some "loose ends" in
+ * the TSM event protocol that were never clearly defined, but
+ * which have been introduced over the years by input methods
+ * themselves, probably through some trial and error. The
+ * conventions regarding this optional parameter seem to be as
+ * follows: If the UpdateRng parameter is missing from the
+ * event, the input method is requesting that the entire
+ * contents of the existing inline input session (if there is
+ * one) is to be replaced "wholesale" by the new text
+ * contained in the kEventParamTextInputSendText parameter. If
+ * the UpdateRng parameter exists, but contains no ranges
+ * (i.e. fNumOfRanges == 0), this seems to be hint from the
+ * input method that no text in the active input area is
+ * changing. It may be that the existing active input area is
+ * being confirmed "as is", or that the input method is
+ * modifying its highlite attributes in some way, due to some
+ * user action, such as changing the selected clause or
+ * highlited subrange of text in the active input area, or
+ * that the input method is changing the caret position in the
+ * active input area (if it uses the kTSMHiliteCaretPosition
+ * hilite style). Depending on how your text engine draws
+ * hilite styles supported in the
+ * kEventParamTextInputSendHiliteRng parameter, you may or may
+ * not need to redraw the text itself, simply change the
+ * hilite. This parameter is optional and may not be present
+ * in all instances of this event.
+ *
+ * --> kEventParamTextInputSendHiliteRng (in, typeTextRangeArray)
+ * An array of text-range records (see TextRangeArray) that
+ * specifies how various subranges of the active input area
+ * are to be highlited, and possibly specifies caret position
+ * within the active input area. NOTE: The text offsets used
+ * in the HiliteRng parameter are relative to the beginning of
+ * the active input area AFTER all text has been updated (per
+ * the SendUpdateRng parameter) and any (subrange of) text has
+ * been confirmed. Specifically, if the entire text is being
+ * confirmed, it is clear that any contents of this parameter
+ * should be ignored, especially non-zero values
+ * kTSMHiliteCaretPosition. This parameter is optional and may
+ * not be present in all instances of this event.
+ *
+ * --> kEventParamTextInputSendClauseRng (in, typeOffsetArray)
+ * An array of offsets (see OffsetArray) used by an input
+ * method to specify word or clause boundaries in the
+ * resulting active input area. Offsets are relative to the
+ * start of the resulting active input area. This parameter is
+ * optional and may not be present in all instances of this
+ * event.
+ *
+ * --> kEventParamTextInputSendPinRng (in, typeTextRange)
+ * A TextRange record that specifies a start offset and an end
+ * offset that should be scrolled into view if the text
+ * specified by these offsets is not already in view. The
+ * fHiliteStyle field of the TextRange records is ignored in
+ * this parameter. This parameter is optional and may not be
+ * present in all instances of this event.
+ *
+ * --> kEventParamTextInputSendTextServiceEncoding (in, typeUInt32)
+ * The encoding associated with the text sent by an input
+ * method. On MacOS X, this parameter is not commonly used
+ * because all TSM input methods produce Unicode, but TSM will
+ * respect a Unicode encoding variant here, if specified. In
+ * CarbonLib, this parameter identifies the Mac encoding
+ * (usually an encoding variant) of the text produced by the
+ * input method on MacOS, where it is not a requirement that
+ * input methods be Unicode-savvy. On this platform, TSM
+ * needs the information to convert text to Unicode from a Mac
+ * encoding variant which cannot be derived from the
+ * ScriptLanguage record associated with the input method
+ * component. This parameter is optional and may not be
+ * present in all instances of this event.
+ *
+ * --> kEventParamTextInputSendTextServiceMacEncoding (in, typeUInt32)
+ * The Mac encoding (variant) associated with the text sent by
+ * an input method. On Mac OS X, this parameter is needed by
+ * TSM to convert input method produced Unicodes to a Mac
+ * encoding when the application that has focus is not
+ * Unicode-savvy in the TSM sense... i.e. the current
+ * TSMDocument is not of type kUnicodeDocument. This parameter
+ * can also be useful if a Unicode-savvy handler should need
+ * to convert from Unicode. This parameter is optional and may
+ * not be present in all instances of this event.
+ *
+ * --> kEventParamTextInputSendGlyphInfoArray (in, typeGlyphInfoArray)
+ * A TSMGlyphInfoArray structure in which an input method can
+ * associate unencoded glyphs IDs and/or fonts with
+ * (sub)ranges of text it produces. The array elements
+ * identify non-overlapping ranges of text and the glyph ID
+ * (character collection is 0) such as in an OpenType font, or
+ * the CID (collection is non-zero) such as in TrueType fonts.
+ * If the glyphID itself is 0, only the font specified is to
+ * be applied to the text range. This is useful for
+ * characters in Unicode private use area, such as Windings,
+ * but note that this capability should be used with care
+ * because changing the font of an input text stream can lead
+ * to a confusing user interface. An input method will only
+ * include this parameter if the text engine has indicated it
+ * supports this feature via the
+ * kTSMDocumentSupportGlyphInfoPropertyTag TSMDocumentProperty
+ * tag. For more information, see the Glyph Access protocol
+ * described in Technote TN2079. This parameter is optional
+ * and may not be present in all instances of this event.
+ *
+ * --> kEventParamTextInputSendReplaceRange (in, typeCFRange)
+ * The CFRange in the application's document that should be
+ * replaced by the contents of the inline input session
+ * defined by other parameters in this event. The text
+ * service will have obtained and calculated this range by
+ * accessing the document's text via events of the
+ * TSMDocumentAccess class. This CFRange parameter refers to
+ * text in flat Unicode space (UniChar) offsets, and its
+ * location is document relative, not relative to the
+ * insertion point or any inline session. A text service may
+ * include this parameter only if the text engine has
+ * indicated it supports this feature via the
+ * kTSMDocumentSupportDocumentAccessPropertyTag
+ * TSMDocumentProperty tag. This parameter is optional and may
+ * not be present in all instances of this event. NOTE: This
+ * parameter is supported by the TSM Carbon event only, not by
+ * TSM's kUpdateActiveInputArea AppleEvent. If a text engine
+ * developer wishes to support this parameter, it must
+ * implement a Carbon event handler for this event and set the
+ * kTSMDocumentSupportDocumentAccessPropertyTag property tag.
+ * NOTE: Care must be exercised by the app when there is an
+ * active inline input session. A text service that sends an a
+ * UpdateActiveInputArea event specifying this parameter
+ * should not be the same text service that owns the inline
+ * input session, since the text engine would need to call
+ * FixTSMDocument(). This, in turn, would cause recursion
+ * through that same text service via FixTextService().
+ * However, the app should be prepared for recursion
+ * regardless of which text service owns the inline input
+ * session because it will call FixTSMDocument() to confirm
+ * the inline input session, and "somebody" will likely send
+ * an UpdateActiveInputArea event as a result. Therefore,
+ * document state obtained before the call to FixTSMDocument()
+ * may not be valid after this call completes.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventTextInputUpdateActiveInputArea = 1;
+
+{
+ * kEventClassTextInput / kEventTextInputUnicodeForKeyEvent
+ *
+ * Summary:
+ * Provides Unicode text input resulting from either a key event
+ * (TSM originates the event in this case) or from a
+ * kEventTextInputUnicodeText event produced by an input method,
+ * such as a Character Palette class input method, or a HandWriting
+ * input method.
+ *
+ * Discussion:
+ * This is the primary event by which applications should receive
+ * text input on Mac OS X. Apple recommends that applications use
+ * this event rather than the kEventRawKeyDown event to handle text
+ * input.
+ *
+ * A client need not be fully TSM-aware to process or receive this
+ * event. You can also get Mac encoding characters from the raw
+ * keyboard event contained in this event. If no UnicodeForKeyEvent
+ * handler is installed, and no kUnicodeNotFromInputMethod
+ * AppleEvent handler is installed (or the application has not
+ * created a Unicode TSMDocument), the Mac encoding charCodes (if
+ * these can be converted from the Unicodes) are provided to
+ * WaitNextEvent.
+ *
+ * This event is generated automatically by TSM when a
+ * kEventRawKeyDown event is sent to the application event target.
+ * The typical keyboard event flow begins with a kEventRawKeyDown
+ * event posted to the event queue. This event is dequeued during
+ * WaitNextEvent or RunApplicationEventLoop, and sent to the event
+ * dispatcher target. If the keydown event reaches the application
+ * target, it is handled by TSM, which generates a
+ * kEventTextInputUnicodeForKeyEvent and sends it to the event
+ * dispatcher target. The event dispatcher will resend the event to
+ * the user focus target, which sends it to the focused control in
+ * the focused window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTextInputSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * --> kEventParamTextInputSendSLRec (in, typeIntlWritingCode)
+ * The ScriptLanguageRecord associated with the text contained
+ * in the event. This parameter is normally provided by the
+ * input method originating the event. TSM's
+ * SendTextInputEvent will construct this parameter from
+ * current script information as a result of a key event, or
+ * using input method provided information when TSM receives a
+ * kEventTextInputUnicodeText event. (Required Parameter)
+ *
+ * --> kEventParamTextInputSendText (in, typeUnicodeText)
+ * The Unicode characters that were entered by the user.
+ *
+ * --> kEventParamTextInputSendKeyboardEvent (in, typeEventRef)
+ * This parameter is the original raw keyboard event that
+ * produced the text. It enables access to
+ * kEventParamKeyModifiers and kEventParamKeyCode parameters.
+ * Note that when contents of TSMÕs bottom-line input window
+ * are confirmed (i.e., during typing of Chinese, Korean, or
+ * Japanese), the raw keyboard eventÕs keyCode and modifiers
+ * are set to default values.
+ *
+ * You can also extract from the RawKeyDown event either
+ * Unicodes or Mac encoding characters as follows:
+ *
+ * kEventParamKeyUnicodes typeUnicodeText
+ * kEventParamKeyMacCharCodes typeChar (if available)
+ *
+ * The kEventParamKeyUnicodes parameter of the raw keyboard
+ * event is identical to the TextInput eventÕs
+ * kEventParamTextInputSendText parameter.
+ *
+ * --> kEventParamTextInputSendGlyphInfoArray (in, typeGlyphInfoArray)
+ * A TSMGlyphInfoArray structure in which an input method can
+ * associate unencoded glyphs IDs and/or fonts with
+ * (sub)ranges of text it produces. The array elements
+ * identify non-overlapping ranges of text and the glyph ID
+ * (character collection is 0) such as in an OpenType font, or
+ * the CID (collection is non-zero) such as in TrueType fonts.
+ * If the glyphID itself is 0, only the font specified is to
+ * be applied to the text range. This is useful for
+ * characters in Unicode private use area, such as Windings,
+ * but note that this capability should be used with care
+ * because changing the font of an input text stream can lead
+ * to a confusing user interface. For more information, see
+ * the Glyph Access protocol described in Technote TN2079.
+ * This parameter is optional and may not be present in all
+ * instances of this event.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventTextInputUnicodeForKeyEvent = 2;
+
+{
+ * kEventClassTextInput / kEventTextInputOffsetToPos
+ *
+ * Summary:
+ * Requests conversion from inline session text offset to global QD
+ * coordinate.
+ *
+ * Discussion:
+ * This event is typically produced by an input method so that it
+ * can best position a palette near the text being edited by the
+ * user.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTextInputSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * --> kEventParamTextInputSendTextOffset (in, typeLongInteger)
+ * Specifies the text offset in an active input area for which
+ * the global position (in QD coordinates) is desired.
+ * Because an inline input session always begins at the
+ * insertion point, the offset is always considered relative
+ * to the insertion point, even when there is no active input
+ * area. (Required Parameter)
+ *
+ * If an offset is outside the bounds of the document text,
+ * errOffsetInvalid should be returned. Negative offsets are
+ * not valid when an inline input session exists, but are
+ * valid when none exists, to allow query of offsets before
+ * the insertion point.
+ *
+ * NOTE: Non-zero offsets in the absence of an active input
+ * area can only be specified when the originator of the event
+ * is certain that the character encoding used by the target
+ * (the current TSMDocument) is the same as its own encoding.
+ * When there is no active input area, TSM is unable to
+ * convert offsets between different encodings that might be
+ * used by the app and an input method (as it normally does)
+ * since TSM does not have access to the document text.
+ * Practically, this means that both the originator and event
+ * target must be Unicode-savvy, i.e. the current TSMDocument
+ * was created with kUnicodeDocumentInterfaceType.
+ *
+ * NOTE: Insertion point relative offsets when there is no
+ * active input area is contrary to the original definition of
+ * this parameter in IM-Text 7-74 which states that the offset
+ * is "relative to the start of the current text body" in this
+ * case. However, most applications and text engines have
+ * already implemented the case offset = 0 as being the
+ * insertion point. This allows an input method to display
+ * some UI near the the insertion point even before typing
+ * takes place.
+ *
+ * --> kEventParamTextInputSendSLRec (in, typeIntlWritingCode)
+ * Specifies which glyph on either side of the supplied text
+ * offset that should be used to compute the on-screen
+ * position returned. This value is similar to the
+ * leadingEdge parameter of the QuickDraw PixelToChar
+ * function. If this parameter is true, the location of the
+ * character (or characters if the glyph is represented by
+ * multiple characters) at the specified text offset is
+ * returned. If this parameter is false, the on-screen
+ * position returned should be the trailing edge of the glyph
+ * represented by the character (or characters) immediately
+ * preceding (in memory order) the supplied text offset. Note
+ * also that while the on-screen position for a given offset
+ * and leading/trailing edge value is affected by this
+ * parameter, it also affects what should be returned for the
+ * other optional parameters at style run boundaries, such as
+ * script and font information. This parameter is optional and
+ * may not be present in all instances of this event. The
+ * default value for this parameter is 'true'.
+ *
+ * --> kEventParamTextInputSendLeadingEdge (in, typeBoolean)
+ * The position on screen (in QD coordinates) of the requested
+ * text offset and leading/trailing edge value. (Required
+ * reply parameter)
+ *
+ * <-- kEventParamTextInputReplyPoint (out, typeQDPoint)
+ * The ScriptLanguageRecord associated with the text at the
+ * offset specified in the event, either the
+ * ScriptLanguageRecord of the active input area if one
+ * exists, or of the text at the specified offset and
+ * specified leading/ trailing edge value. At a script run
+ * boundary, such as where a Japanese text run ends, and a
+ * Roman begins, a leading edge value of 'true' should return
+ * the Roman script/language while a leading edge value of
+ * 'false' should return the Japanese script/language. This
+ * parameter is optional and may not be returned to the caller.
+ *
+ * <-- kEventParamTextInputReplySLRec (out, typeIntlWritingCode)
+ * The QD Font associated with the text at the offset
+ * specified in the event, either the QD Font of the active
+ * input area if one exists, or of the text at the specified
+ * offset and specified leading/ trailing edge value. At a
+ * font run boundary, such as where a Japanese text run ends,
+ * and a Roman begins, a leading edge value of 'true' should
+ * return the font of the Roman text run while a leading edge
+ * value of 'false' should return the Japanese font. This
+ * parameter is optional and may not be returned to the caller.
+ *
+ * <-- kEventParamTextInputReplyFont (out, typeLongInteger)
+ * The FMFont associated with the text at the offset specified
+ * in the event, either the FMFont of the active input area if
+ * one exists, or of the text at the specified offset and
+ * specified leading/ trailing edge value. At a font run
+ * boundary, such as where a Japanese text run ends, and a
+ * Roman begins, a leading edge value of 'true' should return
+ * the font of the Roman text run while a leading edge value
+ * of 'false' should return the Japanese font. This parameter
+ * allows the handler to return an FMFont when a FMFontFamily
+ * or FOND would be inconvenient to compute. This parameter is
+ * optional and may not be returned to the caller.
+ *
+ * <-- kEventParamTextInputReplyFMFont (out, typeUInt32)
+ * The point size associated with the text at the offset
+ * specified in the event, either the point size of the active
+ * input area if one exists, or of the text at the specified
+ * offset. At a style run boundary where point size changes,
+ * the leadingEdge parameter determines which point size
+ * should be returned. This parameter is optional and may not
+ * be returned to the caller.
+ *
+ * <-- kEventParamTextInputReplyPointSize (out, typeFixed)
+ * The line height associated with the text at the offset
+ * specified in the event, either the line height of the
+ * active input area if one exists, or of the text at the
+ * specified offset. At a style run boundary where point size
+ * changes, the leadingEdge parameter determines which line
+ * height should be returned. This parameter is optional and
+ * may not be returned to the caller.
+ *
+ * <-- kEventParamTextInputReplyLineHeight (out, typeShortInteger)
+ * The line ascent associated with the text at the offset
+ * specified in the event, either the line ascent of the
+ * active input area if one exists, or of the text at the
+ * specified offset. At a style run boundary where point size
+ * changes, the leadingEdge parameter determines which line
+ * ascent should be returned. This parameter is optional and
+ * may not be returned to the caller.
+ *
+ * <-- kEventParamTextInputReplyLineAscent (out, typeShortInteger)
+ * The orientation associated with the text at the offset
+ * specified in the event, either the orientation of the
+ * active input area if one exists, or of the text at the
+ * specified offset. At a style run boundary where
+ * orientation changes, the leadingEdge parameter determines
+ * which orientation should be returned. The value 90
+ * specifies a horizontal line direction and 180 specifies a
+ * vertical line direction. This parameter is optional and may
+ * not be returned to the caller.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventTextInputOffsetToPos = 3;
+
+{
+ * kEventClassTextInput / kEventTextInputPosToOffset
+ *
+ * Summary:
+ * Requests conversion from global QD coordinate to a byte offset in
+ * text.
+ *
+ * Discussion:
+ * This event is used for mouse tracking. An input method typically
+ * produces this event to perform proper cursor management as the
+ * cursor moves over various subranges, or clauses of text (or the
+ * boundaries between these) in an inline input session, or moves
+ * between an inline input session to the main text body, or even
+ * outside of the main text body.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTextInputSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * --> kEventParamTextInputSendCurrentPoint (in, typeQDPoint)
+ * The point whose text offset (and classification) the input
+ * method is requesting. This point is usually the current
+ * mouse position in global QD coordinates. Text offset
+ * classifications are defined by
+ * kEventParamTextInputReplyRegionClass. (Required Parameter)
+ *
+ * --> kEventParamTextInputSendDraggingMode (in, typeBoolean)
+ * A Boolean value that indicates whether the input method is
+ * currently tracking the mouse -- that is, whether the user
+ * is dragging the current selection. If it is TRUE, the
+ * application should pin the cursor to the limits of the
+ * active input area (to avoid highlighting beyond the limits
+ * of the active input area). This parameter is optional and
+ * may not be present in all instances of this event.
+ *
+ * <-- kEventParamTextInputReplyRegionClass (out, typeLongInteger)
+ * The text offset corresponding to the supplied QD point. If
+ * the click is within the limits of the active input area,
+ * the offset is relative to the start of the active input
+ * area. Otherwise, the offset is relative to the start of the
+ * application's text body. (Required reply parameter)
+ *
+ * <-- kEventParamTextInputReplyTextOffset (out, typeLongInteger)
+ * The classification of the offset parameter. The values
+ * kTSMOutsideOfBody and kTSMInsideOfBody means that the
+ * position is outside or inside of the text body,
+ * respectively. A value of kTSMInsideOfActiveInputArea means
+ * that the position is inside of the active input area.
+ * (Required reply parameter)
+ *
+ * <-- kEventParamTextInputReplyLeadingEdge (out, typeBoolean)
+ * Specifies whether the QD point supplied corresponds to the
+ * leading edge (true) or trailing edge (false) of a glyph.
+ * This value is similar to the leadingEdge parameter of the
+ * QuickDraw PixelToChar function. If the supplied point is on
+ * the leading edge of a glyph, this parameter contains the
+ * text offset of the character whose glyph is at the pixel
+ * location. (If the glyph represents multiple characters, it
+ * returns the text offset of the first of these characters in
+ * memory.) If the supplied point is on the trailing edge of
+ * a glyph, this parameter returns the text offset of the
+ * first character in memory following the character or
+ * characters represented by the glyph. This parameter is
+ * optional and may not be returned to the caller.
+ *
+ * <-- kEventParamTextInputReplySLRec (out, typeIntlWritingCode)
+ * The ScriptLanguageRecord of the script run containing the
+ * character at the returned text offset and leading/trailing
+ * edge value. This parameter is optional and may not be
+ * returned to the caller.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventTextInputPosToOffset = 4;
+
+{
+ * kEventClassTextInput / kEventTextInputShowHideBottomWindow
+ *
+ * Summary:
+ * Show or hide the bottom-line input window.
+ *
+ * Discussion:
+ * This event is produced by input methods to control the Text
+ * Services Manager bottom-line input window, and is not normally
+ * handled by an application.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTextInputSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * --> kEventParamTextInputSendShowHide (in, typeBoolean)
+ * If true, the bottomline input window should be shown; if
+ * false, it should be hidden. This parameter is not needed if
+ * the input method is simply inquiring about the state of the
+ * input window. This parameter is optional and may not be
+ * present in all instances of this event.
+ *
+ * <-- kEventParamTextInputReplyShowHide (out, typeBoolean)
+ * The current state of the input window: true if the window
+ * is shown; false if it is hidden. If the optional parameter
+ * kEventParamTextInputSendShowHide is included, this return
+ * parameter should show the state of the window before it was
+ * set to the state requested in the optional parameter. This
+ * parameter is optional and may not be returned to the caller.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventTextInputShowHideBottomWindow = 5;
+
+{
+ * kEventClassTextInput / kEventTextInputGetSelectedText
+ *
+ * Summary:
+ * Get the selected text (or the character before or after the
+ * insertion point, based on the leadingEdge parameter) from the
+ * applicationÕs text engine.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTextInputSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * --> kEventParamTextInputSendLeadingEdge (in, typeBoolean)
+ * If there is a non-empty selection, this parameter should be
+ * ignored. When the current selection is empty, i.e. an
+ * insertion point, and this parameter is NOT supplied, no
+ * text should be returned. If the current selection is empty
+ * and this parameter is supplied, return the character (or
+ * characters) representing the glyph on the side of the
+ * insertion point indicated by this leadingEdge parameter.
+ * This value is similar to the leadingEdge parameter of the
+ * QuickDraw PixelToChar function. If this parameter is true,
+ * the character (or characters) at the insertion point is
+ * returned. If this parameter is false, the character (or
+ * characters) immediately preceding (in memory order) the
+ * insertion point should be returned. This parameter is
+ * optional and may not be present in all instances of this
+ * event. This parameter has no default value and no text
+ * should be returned when this parameter is ommited and there
+ * is no selected text.
+ *
+ * --> kEventParamTextInputSendTextServiceEncoding (in, typeUInt32)
+ * The encoding associated with the text sent by an input
+ * method. On MacOS X, this parameter is not commonly used
+ * because all TSM input methods produce (and request)
+ * Unicode, but if specified, this may be a Unicode variant
+ * encoding. In CarbonLib on MacOS, this parameter identifies
+ * the Mac encoding (usually an encoding variant) of the text
+ * produced by the input method on MacOS, where it is not a
+ * requirement that input methods be Unicode-savvy. On this
+ * platform, TSM needs the information to convert text to
+ * Unicode from a Mac encoding variant which cannot be derived
+ * from the ScriptLanguage record associated with the input
+ * method component. This parameter is optional and may not be
+ * present in all instances of this event.
+ *
+ * <-- kEventParamTextInputReplyText (out, typeUnicodeText)
+ * The data type of this parameter actually depends on the
+ * TSMDocument type created via NewTSMDocument: it should be
+ * typeChar for kTextService documents, or typeUnicodeText for
+ * kUnicodeDocument documents. This parameter is optional and
+ * may not be returned to the caller.
+ *
+ * <-- kEventParamTextInputReplySLRec (out, typeIntlWritingCode)
+ * The ScriptLanguageRecord of the script run containing the
+ * text being returned to an input method. This parameter is
+ * optional and may not be returned to the caller.
+ *
+ * <-- kEventParamTextInputReplyMacEncoding (out, typeUInt32)
+ * The Mac encoding (variant) associated with the text
+ * returned to the input method. On Mac OS X, this parameter
+ * may needed by TSM to convert application produced text from
+ * a Mac encoding to Unicodes returned to the input method.
+ * This parameter is optional and may not be returned to the
+ * caller.
+ *
+ * <-- kEventParamTextInputGlyphInfoArray (out, typeGlyphInfoArray)
+ * A TSMGlyphInfoArray structure in which the event handler
+ * can associate unencoded glyphs IDs and/or fonts with
+ * (sub)ranges of text it returns. The array elements
+ * identify non-overlapping ranges of text and the glyph ID
+ * (character collection is 0) such as in an OpenType font, or
+ * the CID (collection is non-zero) such as in TrueType fonts.
+ * If the glyphID itself is 0, only the font specified is to
+ * be applied to the text range. This is useful for
+ * characters in Unicode private use area. For more
+ * information, see the Glyph Access protocol described in
+ * Technote TN2079. This parameter is optional and may not be
+ * returned to the caller. NOTE: This parameter should really
+ * have been kEventParamTextInputReplyGlyphInfoArray, which
+ * was introduced after glyphInfo support was added to this
+ * event, but we can't change it now without breaking binary
+ * compatibility.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventTextInputGetSelectedText = 6;
+
+{
+ * kEventClassTextInput / kEventTextInputUnicodeText
+ *
+ * Summary:
+ * Used by input methods to provide original input text to the Text
+ * Services Manager.
+ *
+ * Discussion:
+ * This Unicode text event is produced only by input methods or
+ * other text services, and is delivered to TSM via
+ * SendTextInputEvent(). TSM never dispatches this event to the user
+ * focus, so application handlers should NOT install handlers for
+ * this event. Instead, TSM chains this event into any active
+ * keyboard input method in order to prevent interference with
+ * existing inline input sessions. The keyboard input method can
+ * either insert the text into the inline session, or it may confirm
+ * its session and return the UnicodeText event to TSM unhandled, in
+ * which case TSM will convert the event into a UnicodeForKey event
+ * (converting the Unicodes to Mac charCodes and synthesizing
+ * information where needed) and finally dispatch the resulting
+ * event to the user focus as usual.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTextInputSendComponentInstance (in, typeComponentInstance)
+ * This parameter is provided by the input method originating
+ * the event. (Required parameter)
+ *
+ * --> kEventParamTextInputSendSLRec (in, typeIntlWritingCode)
+ * The ScriptLanguageRecord associated with the text contained
+ * in the event. This parameter is provided by the input
+ * method originating the event. This parameter is optional
+ * and may not be present in all instances of this event.
+ *
+ * --> kEventParamTextInputSendText (in, typeUnicodeText)
+ * The Unicode characters produced by an input method.
+ * (Required Parameter)
+ *
+ * --> kEventParamTextInputSendTextServiceEncoding (in, typeUInt32)
+ * The encoding associated with the text sent by an input
+ * method. On MacOS X, this parameter is not commonly used
+ * because all TSM input methods produce (and request)
+ * Unicode, but if specified, this may be a Unicode variant
+ * encoding. This parameter is optional and may not be present
+ * in all instances of this event.
+ *
+ * --> kEventParamTextInputSendTextServiceMacEncoding (in, typeUInt32)
+ * The Mac encoding (variant) associated with the text sent by
+ * an input method, should TSM or an event handler need to
+ * convert the Unicodes. This parameter is optional and may
+ * not be present in all instances of this event.
+ *
+ * --> kEventParamTextInputSendGlyphInfoArray (in, typeGlyphInfoArray)
+ * A TSMGlyphInfoArray structure in which an input method can
+ * associate unencoded glyphs IDs and/or fonts with
+ * (sub)ranges of text it produces. The array elements
+ * identify non-overlapping ranges of text and the glyph ID
+ * (character collection is 0) such as in an OpenType font, or
+ * the CID (collection is non-zero) such as in TrueType fonts.
+ * If the glyphID itself is 0, only the font specified is to
+ * be applied to the text range. This is useful for
+ * characters in Unicode private use area, such as Windings,
+ * but note that this capability should be used with care
+ * because changing the font of an input text stream can lead
+ * to a confusing user interface. For more information, see
+ * the Glyph Access protocol described in Technote TN2079.
+ * This parameter is optional and may not be present in all
+ * instances of this event.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTextInputUnicodeText = 7;
+
+
+{
+ * kEventClassTextInput / kEventTextInputFilterText
+ *
+ * Summary:
+ * Send text about to be inserted into the user focus to be filtered
+ * first.
+ *
+ * Discussion:
+ * Sent before any final-form text is sent to the user focus. Final
+ * form text includes text produced by a keyboard layout, Ink input
+ * method, Character palette or any other TSM text service, and any
+ * text being "confirmed" (or commited) from an inline input
+ * session. In the case of text confirmed from an inline input
+ * session, TSM will take the resulting text buffer filtered by the
+ * event handler and adjust all parameters in the
+ * UpdateActiveInputArea event produced by the input method. The
+ * text filtering action will thus be transparent to both the app's
+ * UpdateActiveInputArea handler and the input method confirming the
+ * text.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTextInputSendRefCon (in, typeLongInteger)
+ * TSM's SendTextInputEvent, called by an input method,
+ * inserts this parameter before dispatching the event to the
+ * user focus. (Required Parameter)
+ *
+ * --> kEventParamTextInputSendText (in, typeUnicodeText)
+ * The Unicode characters that are about to be sent to the
+ * user focus, and need to be filtered. (Required Parameter)
+ *
+ * <-- kEventParamTextInputReplyText (out, typeUnicodeText)
+ * The filtered Unicode characters... may be a zero-size
+ * parameter. (Required Parameter)
+ *
+ * Result:
+ * Return noErr to indicate that the text needing filtering has been
+ * changed, otherwise return eventNotHandledErr.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTextInputFilterText = 14;
+
+{--------------------------------------------------------------------------------------}
+{ Raw Keyboard Events }
+{--------------------------------------------------------------------------------------}
+{
+ kEventClassKeyboard quick reference:
+
+ kEventRawKeyDown = 1,
+ kEventRawKeyRepeat = 2,
+ kEventRawKeyUp = 3,
+ kEventRawKeyModifiersChanged = 4,
+ kEventHotKeyPressed = 5,
+ kEventHotKeyReleased = 6
+);
+
+|*!
+ @event kEventRawKeyDown
+ @abstract A key was pressed.
+
+ @discussion This is the lowest-level keyboard input event. When this event is sent, the keyboard
+ input has not yet been processed by the Text Services Manager or passed to input methods.
+ Usually, you should not handle this event, because doing so may interfere with input
+ methods; instead, you should handle the kEventTextInputUnicodeForKeyEvent event, which
+ is sent after input methods have handled the raw key event, and contains both Unicode
+ and the original keyboard event.
+
+ This event has a default handler on the application event target. The default handler
+ calls the Text Services Manager to pass the event through to input methods. The default
+ handler also implements certain standard keyboard equivalents, such as cmd-` for intra-
+ process window rotation and the universal keyboard access equivalents for interprocess
+ window rotation and document, floating, toolbar, and menubar keyboard focus.
+
+ @param kEventParamKeyMacCharCodes
+ The character generated by the key that was pressed. The characterÕs encoding
+ is determined by the current keyboard script.
+
+ @param kEventParamKeyCode
+ The virtual keycode of the key that was pressed.
+
+ @param kEventParamKeyModifiers
+ The keyboard modifiers that were down when the key was pressed.
+
+ @param kEventParamKeyboardType
+ The type of keyboard on which the key was pressed.
+}
+{
+ * kEventClassKeyboard / kEventRawKeyDown
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventRawKeyDown = 1;
+
+{
+ * kEventClassKeyboard / kEventRawKeyRepeat
+ *
+ * Summary:
+ * Sent periodically as a key is held down by the user.
+ *
+ * Discussion:
+ * Usually, you should not handle this event, because doing so may
+ * interfere with input methods; instead, you should handle the
+ * kEventTextInputUnicodeForKeyEvent event, which is sent after
+ * input methods have handled the raw key event, and contains both
+ * Unicode and the original keyboard event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamKeyMacCharCodes (in, typeChar)
+ * The character generated by the key that was pressed. The
+ * characterÕs encoding is determined by the current keyboard
+ * script.
+ *
+ * --> kEventParamKeyCode (in, typeUInt32)
+ * The virtual keycode of the key that was pressed.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were down when the key was
+ * pressed.
+ *
+ * --> kEventParamKeyboardType (in, typeUInt32)
+ * The type of keyboard on which the key was pressed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventRawKeyRepeat = 2;
+
+{
+ * kEventClassKeyboard / kEventRawKeyUp
+ *
+ * Summary:
+ * A key was released.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamKeyMacCharCodes (in, typeChar)
+ * The character generated by the key that was released. The
+ * characterÕs encoding is determined by the current keyboard
+ * script.
+ *
+ * --> kEventParamKeyCode (in, typeUInt32)
+ * The virtual keycode of the key that was released.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were down when the key was
+ * released.
+ *
+ * --> kEventParamKeyboardType (in, typeUInt32)
+ * The type of keyboard on which the key was released.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventRawKeyUp = 3;
+
+{
+ * kEventClassKeyboard / kEventRawKeyModifiersChanged
+ *
+ * Summary:
+ * The keyboard modifiers have changed.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that are now pressed. This is the
+ * current state of the modifiers, not a delta state; it
+ * includes modifiers that were pressed before the latest
+ * change to modifier state.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventRawKeyModifiersChanged = 4;
+
+{
+ * kEventClassKeyboard / kEventHotKeyPressed
+ *
+ * Summary:
+ * A registered hot key was pressed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeEventHotKeyID)
+ * The ID of the hot key that was pressed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ }
+const
+ kEventHotKeyPressed = 5;
+
+{
+ * kEventClassKeyboard / kEventHotKeyReleased
+ *
+ * Summary:
+ * A registered hot key was released.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeEventHotKeyID)
+ * The ID of the hot key that was released.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ }
+const
+ kEventHotKeyReleased = 6;
+
+
+{
+ * Summary:
+ * Key modifier change event bits and masks
+ *
+ * Discussion:
+ * From bit 8, cmdKeyBit, to bit 15, rightControlKeyBit, are
+ * compatible with Event Manager modifiers.
+ }
+const
+{
+ * The Num Lock state bit (Mac OS X only).
+ }
+ kEventKeyModifierNumLockBit = 16; { Num Lock is on? (Mac OS X only)}
+
+ {
+ * The Fn key state bit (Mac OS X only).
+ }
+ kEventKeyModifierFnBit = 17; { Fn key is down? (Mac OS X only)}
+
+const
+ kEventKeyModifierNumLockMask = 1 shl kEventKeyModifierNumLockBit;
+ kEventKeyModifierFnMask = 1 shl kEventKeyModifierFnBit;
+
+
+{--------------------------------------------------------------------------------------}
+{ Application Events }
+{--------------------------------------------------------------------------------------}
+
+{
+ kEventClassApplication quick reference:
+
+ kEventAppActivated = 1,
+ kEventAppDeactivated = 2,
+ kEventAppQuit = 3,
+ kEventAppLaunchNotification = 4,
+ kEventAppLaunched = 5,
+ kEventAppTerminated = 6,
+ kEventAppFrontSwitched = 7,
+
+ kEventAppFocusMenuBar = 8,
+ kEventAppFocusNextDocumentWindow = 9,
+ kEventAppFocusNextFloatingWindow = 10,
+ kEventAppFocusToolbar = 11,
+ kEventAppFocusDrawer = 12,
+
+ kEventAppGetDockTileMenu = 20,
+
+ kEventAppIsEventInInstantMouser = 104,
+
+ kEventAppHidden = 107,
+ kEventAppShown = 108,
+ kEventAppSystemUIModeChanged = 109,
+ kEventAppAvailableWindowBoundsChanged = 110,
+ kEventAppActiveWindowChanged = 111
+}
+
+{
+ * kEventClassApplication / kEventAppActivated
+ *
+ * Summary:
+ * This application has been activated.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * This parameter is present if a click on an application
+ * window was the cause of the app activation; it contains the
+ * window that was clicked. This parameter is not provided if
+ * the application was activated for some other reason.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventAppActivated = 1;
+
+{
+ * kEventClassApplication / kEventAppDeactivated
+ *
+ * Summary:
+ * This application has been deactivated.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventAppDeactivated = 2;
+
+{
+ * kEventClassApplication / kEventAppQuit
+ *
+ * Summary:
+ * A request to quit. Sent by QuitApplicationEventLoop to the
+ * application target.
+ *
+ * Discussion:
+ * The RunApplicationEventLoop API installs a default handler on the
+ * application target for this event while the event loop is
+ * running. The handler is removed before RunApplicationEventLoop
+ * returns.
+ *
+ * The event handler installed by RunApplicationEventLoop will cause
+ * RunApplicationEventLoop to exit. Most applications will not need
+ * to handle this event; instead, an application should install an
+ * AppleEvent handler for the kAEQuitApplication event handler if it
+ * needs to check for unsaved documents or do other cleanup before
+ * quitting.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventAppQuit = 3;
+
+{
+ * kEventClassApplication / kEventAppLaunchNotification
+ *
+ * Summary:
+ * Notification that an asynchronous process launch has completed.
+ *
+ * Discussion:
+ * This event is received when you use LaunchServices to launch a
+ * process asynchronously. Your application only receives this event
+ * for processes that you launch; it is not sent for process
+ * launches from other applications (such as the Finder).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamProcessID (in, typeProcessSerialNumber)
+ * The ProcessSerialNumber of the process that was launched.
+ *
+ * --> kEventParamLaunchRefCon (in, typeUInt32)
+ * Contains the value in the asyncRefCon field of the LSLaunch
+ * structure that was used to launch the process.
+ *
+ * --> kEventParamLaunchErr (in, typeOSStatus)
+ * A result code indicating success or failure of the launch.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAppLaunchNotification = 4;
+
+{
+ * kEventClassApplication / kEventAppLaunched
+ *
+ * Summary:
+ * Another app was launched.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamProcessID (in, typeProcessSerialNumber)
+ * The ProcessSerialNumber of the process that was launched.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3.1 and later
+ }
+const
+ kEventAppLaunched = 5;
+
+{
+ * kEventClassApplication / kEventAppTerminated
+ *
+ * Summary:
+ * Another app terminated.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamProcessID (in, typeProcessSerialNumber)
+ * The ProcessSerialNumber of the process that terminated.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3.1 and later
+ }
+const
+ kEventAppTerminated = 6;
+
+{
+ * kEventClassApplication / kEventAppFrontSwitched
+ *
+ * Summary:
+ * The front (active) application has changed.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamProcessID (in, typeProcessSerialNumber)
+ * The ProcessSerialNumber of the process that became
+ * frontmost.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3.1 and later
+ }
+const
+ kEventAppFrontSwitched = 7;
+
+{
+ * kEventClassApplication / kEventAppHidden
+ *
+ * Summary:
+ * The current application has been hidden.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAppHidden = 107;
+
+{
+ * kEventClassApplication / kEventAppShown
+ *
+ * Summary:
+ * The current application has been shown.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAppShown = 108;
+
+{
+ * kEventClassApplication / kEventAppSystemUIModeChanged
+ *
+ * Summary:
+ * The system UI mode of the frontmost application has changed.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamSystemUIMode (in, typeUInt32)
+ * The new system UI mode. Contains a kUIMode constant from
+ * MacApplication.h.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAppSystemUIModeChanged = 109;
+
+
+const
+{
+ * Indicates that a deviceÕs available window positioning bounds have
+ * changed because of a change in Dock position or size.
+ }
+ kAvailBoundsChangedForDock = 1 shl 0;
+
+ {
+ * Indicates that a deviceÕs available window positioning bounds have
+ * changed because of a change in display configuration.
+ }
+ kAvailBoundsChangedForDisplay = 1 shl 1;
+
+{
+ * kEventClassApplication / kEventAppAvailableWindowBoundsChanged
+ *
+ * Summary:
+ * The available window positioning bounds have changed.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * This event is currently sent in two circumstances: when the Dock
+ * has changed position or size, and when the display configuration
+ * has changed. A separate copy of this event is sent to each
+ * affected GDevice.
+ *
+ * All applications have a default handler installed on the
+ * application target that responds to this event by sending
+ * kEventWindowConstrain events to each window on the specified
+ * device. It is not possible to prevent this handler from running,
+ * since this event is sent to all registered handlers. However,
+ * applications that would like to do their own window layout may
+ * install a handler for this event, and also set the
+ * kWindowNoConstrainAttribute on their windows, which will cause
+ * the basic window handler to ignore kEventWindowConstrain. An
+ * application may also install its own kEventWindowConstrain
+ * handler and selectively return a value other than
+ * eventNotHandledErr, which will prevent the event from being sent
+ * to the basic window handler.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamGDevice (in, typeGDHandle)
+ * The device whose available positioning bounds have changed.
+ *
+ * --> kEventParamReason (in, typeUInt32)
+ * The reasons why the available positioning bounds have
+ * changed. This parameter contains one or more of the
+ * kAvailBoundsChangedFor constants.
+ *
+ * --> kEventParamTransactionID (in, typeUInt32)
+ * An integer which is the same for all instances of this
+ * event that are produced by the same configuration change.
+ * For example, if multiple displays are attached, then this
+ * event is sent once for each display after a display
+ * configuration change; however, the transaction ID parameter
+ * will the same for each event, so a handler for this event
+ * can choose to ignore all but the first event by correlating
+ * the the transaction IDs.
+ *
+ * --> kEventParamPreviousDockRect (in, typeHIRect)
+ * The DockÕs previous bounds, in global coordinates. This
+ * parameter is optional and may not be present in all
+ * instances of this event. It is present in events with a
+ * kEventParamReason parameter containing
+ * kAvailBoundsChangedForDock.
+ *
+ * --> kEventParamPreviousDockDevice (in, typeGDHandle)
+ * The GDevice on which the Dock was previously positioned.
+ * This parameter is optional and may not be present in all
+ * instances of this event. It is present in events with a
+ * kEventParamReason parameter containing
+ * kAvailBoundsChangedForDock.
+ *
+ * --> kEventParamCurrentDockRect (in, typeHIRect)
+ * The DockÕs current bounds, in global coordinates. This
+ * parameter is optional and may not be present in all
+ * instances of this event. It is present in events with a
+ * kEventParamReason parameter containing
+ * kAvailBoundsChangedForDock.
+ *
+ * --> kEventParamCurrentDockDevice (in, typeGDHandle)
+ * The GDevice on which the Dock is currently positioned. This
+ * parameter is optional and may not be present in all
+ * instances of this event. It is present in events with a
+ * kEventParamReason parameter containing
+ * kAvailBoundsChangedForDock.
+ *
+ * --> kEventParamRgnHandle (in, typeQDRgnHandle)
+ * The GrayRgn before the configuration change. This parameter
+ * is optional and may not be present in all instances of this
+ * event. It is present in events with a kEventParamReason
+ * parameter containing kAvailBoundsChangedForDisplay. To get
+ * the GrayRgn after the configuration change, just call the
+ * GetGrayRgn API.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAppAvailableWindowBoundsChanged = 110;
+
+{
+ * kEventClassApplication / kEventAppActiveWindowChanged
+ *
+ * Summary:
+ * Notification that the active window in the current process has
+ * changed.
+ *
+ * Discussion:
+ * The Window Manager internally tracks the active window, which is
+ * the window that is returned by ActiveNonFloatingWindow. When
+ * SelectWindow is called on a window, that window is made the new
+ * active window. At that time, the Window Manager also posts a
+ * kEventAppActiveWindowChanged event to the main event
+ * queue.
+ *
+ * The ActivateWindow API also causes this event to be
+ * posted.
+ *
+ * If more than one window is activated sequentially before the
+ * event loop is run, only a single kEventAppActiveWindowChanged
+ * event will be left in the event queue, its PreviousActiveWindow
+ * parameter will be the window that was originally active, and its
+ * CurrentActiveWindow parameter will be the window that was finally
+ * active.
+ *
+ * This event only reports changes to the current process. It does
+ * not report activation changes in other processes.
+ * <BR> This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamPreviousWindow (in, typeWindowRef)
+ * The window that was previously active.
+ *
+ * --> kEventParamCurrentWindow (in, typeWindowRef)
+ * The window that is now active.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAppActiveWindowChanged = 111;
+
+{
+ * kEventClassApplication / kEventAppGetDockTileMenu
+ *
+ * Summary:
+ * A request for a menu to be displayed by the applicationÕs dock
+ * tile.
+ *
+ * Discussion:
+ * This event has a default handler on the application target. The
+ * default handler will return the menu, if any, that was provided
+ * by the SetApplicationDockTileMenu API. The sender of this event
+ * will release the menu after the Dock has displayed it, so if you
+ * return a permanently allocated MenuRef, you should call
+ * RetainMenu on it before returning from your event handler. For
+ * most applications, it will be easier to use the
+ * SetApplicationDockTileMenu API directly rather than installing a
+ * handler for this event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * <-- kEventParamMenuRef (out, typeMenuRef)
+ * A MenuRef to be displayed in the Dock is returned by the
+ * handler in this parameter.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAppGetDockTileMenu = 20;
+
+{
+ * kEventClassApplication / kEventAppFocusMenuBar
+ *
+ * Summary:
+ * The user has requested keyboard focus on the menubar.
+ *
+ * Discussion:
+ * This event is handled automatically by the default application
+ * event handler. A handler for this event should switch the
+ * keyboard focus to the menubar. Applications may install handlers
+ * for this event to track keyboard focus, but should not prevent
+ * the event from being handled by the default application handler.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the user
+ * requested a focus switch.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAppFocusMenuBar = 8;
+
+{
+ * kEventClassApplication / kEventAppFocusNextDocumentWindow
+ *
+ * Summary:
+ * The user has requested keyboard focus on a document window.
+ *
+ * Discussion:
+ * This event is handled automatically by the default application
+ * event handler. A handler for this event should cycle to the next
+ * (or previous, if the shift key is down) document window, or if
+ * there are no more windows to activate in the applicationÕs window
+ * list, to the next or previous document window in the next or
+ * previous process. User focus (see SetUserFocusWindow) should be
+ * applied to the new front document window. If something other than
+ * a document window has the focus at the time you receive this
+ * event, the frontmost document window should be given the user
+ * focus instead, and no z-order change should be made.
+ * Additionally, the keyboard focus should be moved to the main
+ * control in the newly focused window if no keyboard focus exists
+ * within the window.
+ *
+ * A handler for this event should never override it entirely; if
+ * necessary, it should only check if the user focus is somewhere
+ * other than a document window, and if so, set the focus on the
+ * active document window. If the focus is already on a document
+ * window, a handler for this event should always return
+ * eventNotHandledErr so that the default handler can rotate to the
+ * next window across all processes.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the user
+ * requested a focus switch.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAppFocusNextDocumentWindow = 9;
+
+{
+ * kEventClassApplication / kEventAppFocusNextFloatingWindow
+ *
+ * Summary:
+ * The user has requested keyboard focus on a floating window.
+ *
+ * Discussion:
+ * This event is handled automatically by the default application
+ * event handler. A handler for this event should cycle to the next
+ * (or previous, if the shift key is down) floating window in the
+ * application. User focus (see SetUserFocusWindow) should be
+ * applied to the new front floating window. If something other than
+ * a floating window has the focus at the time you receive this
+ * event, the frontmost floating window should be given the user
+ * focus instead, and no z-order change should be made.
+ * Additionally, the keyboard focus should be moved to the main
+ * control in the newly focused window if no keyboard focus exists
+ * within the window. The default handler sends a
+ * kEventCommandProcess event containing
+ * kHICommandRotateFloatingWindowsForward/Backward when it detects
+ * that floating windows should be cycled.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the user
+ * requested a focus switch.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAppFocusNextFloatingWindow = 10;
+
+{
+ * kEventClassApplication / kEventAppFocusToolbar
+ *
+ * Summary:
+ * The user has requested keyboard focus on the toolbar in the
+ * focused window.
+ *
+ * Discussion:
+ * For windows that use the standard HIToolbar control, this event
+ * is handled automatically by the default application event
+ * handler. A handler for this event should put focus on the first
+ * control in the toolbar in the focused window, if a toolbar is
+ * present.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the user
+ * requested a focus switch.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAppFocusToolbar = 11;
+
+{
+ * kEventClassApplication / kEventAppFocusDrawer
+ *
+ * Summary:
+ * The user has requested keyboard focus on the drawer in the
+ * focused window.
+ *
+ * Discussion:
+ * This event is handled automatically by the default application
+ * event handler. A handler for this event should put focus on the
+ * first control in the drawer in the focused window, if a drawer is
+ * present. If multiple drawers are present, focus is moved in
+ * clockwise order from one drawer to the next, starting with the
+ * top drawer, if any. If the modifiers parameter contains the shift
+ * key, then focus should be moved in reverse (counterclockwise)
+ * order.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the user
+ * requested a focus switch.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAppFocusDrawer = 12;
+
+{
+ * kEventClassApplication / kEventAppIsEventInInstantMouser
+ *
+ * Summary:
+ * Sent when the system needs to determine if the given event's
+ * global mouse location is over an "instant mousing" area. An
+ * instant mousing area is an area where a mouse down should not
+ * generate ink, but should only be interpreted as a click.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamEventRef (in, typeEventRef)
+ * The Event to check.
+ *
+ * <-- kEventParamIsInInstantMouser (out, typeBoolean)
+ * True if event was in an "instant mousing" area, false
+ * otherwise.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAppIsEventInInstantMouser = 104;
+
+
+{--------------------------------------------------------------------------------------}
+{ Apple Events }
+{--------------------------------------------------------------------------------------}
+{
+ kEventClassAppleEvent quick reference:
+
+ kEventAppleEvent = 1
+}
+{
+ * kEventClassAppleEvent / kEventAppleEvent
+ *
+ * Summary:
+ * Sent when a high-level event is received.
+ *
+ * Discussion:
+ * The RunApplicationEventLoop API installs a default handler on the
+ * application target for this event while the event loop is
+ * running. The handler is removed before RunApplicationEventLoop
+ * returns.
+ *
+ * The handler installed by RunApplicationEventLoop will call
+ * AEProcessAppleEvent.
+ *
+ * It is not possible to get the AppleEvent itself from this Carbon
+ * event; only its event class and kind are available. To inspect
+ * the AppleEvent parameters, the event must actually be dispatched
+ * using AEProcessAppleEvent.
+ *
+ * If you need to handle this Carbon event yourself, the necessary
+ * steps are: (1) remove the Carbon event from the queue. The
+ * AppleEvent requires some special preparation before it can be
+ * processed, and this preparation only occurs when the event is
+ * dequeued. (2) Use ConvertEventRefToEventRecord to get an
+ * EventRecord from the Carbon event. (3) Call AEProcessAppleEvent
+ * on the EventRecord.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamAEEventClass (in, typeType)
+ * The event class of the Apple event.
+ *
+ * --> kEventParamAEEventID (in, typeType)
+ * The event ID of the Apple event.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventAppleEvent = 1;
+
+{--------------------------------------------------------------------------------------}
+{ Window Events }
+{--------------------------------------------------------------------------------------}
+{
+ kEventClassWindow quick reference:
+
+ -- window refresh events --
+
+ kEventWindowUpdate = 1,
+ kEventWindowDrawContent = 2,
+
+ -- window activation events --
+
+ kEventWindowActivated = 5,
+ kEventWindowDeactivated = 6,
+ kEventWindowHandleActivate = 91,
+ kEventWindowHandleDeactivate = 92,
+ kEventWindowGetClickActivation = 7,
+ kEventWindowGetClickModality = 8,
+
+ -- window state change events --
+
+ kEventWindowShowing = 22,
+ kEventWindowHiding = 23,
+ kEventWindowShown = 24,
+ kEventWindowHidden = 25,
+ kEventWindowCollapsing = 86,
+ kEventWindowCollapsed = 67,
+ kEventWindowExpanding = 87,
+ kEventWindowExpanded = 70,
+ kEventWindowZoomed = 76,
+ kEventWindowBoundsChanging = 26,
+ kEventWindowBoundsChanged = 27,
+ kEventWindowResizeStarted = 28,
+ kEventWindowResizeCompleted = 29,
+ kEventWindowDragStarted = 30,
+ kEventWindowDragCompleted = 31,
+ kEventWindowClosed = 73,
+ kEventWindowTransitionStarted = 88,
+ kEventWindowTransitionCompleted = 89,
+
+ -- window click events --
+
+ kEventWindowClickDragRgn = 32,
+ kEventWindowClickResizeRgn = 33,
+ kEventWindowClickCollapseRgn = 34,
+ kEventWindowClickCloseRgn = 35,
+ kEventWindowClickZoomRgn = 36,
+ kEventWindowClickContentRgn = 37,
+ kEventWindowClickProxyIconRgn = 38,
+ kEventWindowClickToolbarButtonRgn = 41,
+ kEventWindowClickStructureRgn = 42,
+
+ -- window cursor change events --
+
+ kEventWindowCursorChange = 40,
+
+ -- window action events --
+
+ kEventWindowCollapse = 66,
+%% kEventWindowCollapsed = 67,
+ kEventWindowCollapseAll = 68,
+ kEventWindowExpand = 69,
+%% kEventWindowExpanded = 70,
+ kEventWindowExpandAll = 71,
+ kEventWindowClose = 72,
+%% kEventWindowClosed = 73,
+ kEventWindowCloseAll = 74,
+ kEventWindowZoom = 75,
+%% kEventWindowZoomed = 76,
+ kEventWindowZoomAll = 77,
+ kEventWindowContextualMenuSelect = 78,
+ kEventWindowPathSelect = 79,
+ kEventWindowGetIdealSize = 80,
+ kEventWindowGetMinimumSize = 81,
+ kEventWindowGetMaximumSize = 82,
+ kEventWindowConstrain = 83,
+ kEventWindowHandleContentClick = 85,
+%% kEventWindowCollapsing = 86,
+%% kEventWindowExpanding = 87,
+%% kEventWindowTransitionStarted = 88,
+%% kEventWindowTransitionCompleted = 89,
+ kEventWindowGetDockTileMenu = 90,
+%% kEventWindowHandleActivate = 91,
+%% kEventWindowHandleDeactivate = 92,
+ kEventWindowProxyBeginDrag = 128,
+ kEventWindowProxyEndDrag = 129,
+ kEventWindowToolbarSwitchMode = 150,
+
+ -- window focus events --
+
+ kEventWindowFocusAcquired = 200,
+ kEventWindowFocusRelinquish = 201,
+ kEventWindowFocusContent = 202,
+ kEventWindowFocusToolbar = 203,
+ kEventWindowFocusDrawer = 204,
+
+ -- sheet events --
+
+ kEventWindowSheetOpening, = 210,
+ kEventWindowSheetOpened = 211,
+ kEventWindowSheetClosing = 212,
+ kEventWindowSheetClosed = 213,
+
+ -- drawer events --
+
+ kEventWindowDrawerOpening = 220,
+ kEventWindowDrawerOpened = 221,
+ kEventWindowDrawerClosing = 222,
+ kEventWindowDrawerClosed = 223,
+
+ -- window definition events --
+
+ kEventWindowDrawFrame = 1000,
+ kEventWindowDrawPart = 1001,
+ kEventWindowGetRegion = 1002,
+ kEventWindowHitTest = 1003,
+ kEventWindowInit = 1004,
+ kEventWindowDispose = 1005,
+ kEventWindowDragHilite = 1006,
+ kEventWindowModified = 1007,
+ kEventWindowSetupProxyDragImage = 1008,
+ kEventWindowStateChanged = 1009,
+ kEventWindowMeasureTitle = 1010,
+ kEventWindowDrawGrowBox = 1011,
+ kEventWindowGetGrowImageRegion = 1012,
+ kEventWindowPaint = 1013
+
+ On window handlers:
+
+ All windows have a handler installed called the Òbasic window handler.Ó This handler provides certain
+ basic services for all windows; for example, it handles clicks in the collapse and toolbar buttons,
+ since these buttons were handled automatically for WaitNextEvent-based applications in the classic
+ Mac OS toolbox, and so are still be handled automatically in Carbon by the basic window handler. The
+ basic window handler also implements the HICommands that are sent by the standard window menu to minimize,
+ maximize, or zoom a window (kHICommandMinimize/Maximize/ZoomWindow), and the window-class events that are
+ generated by those commands (kEventWindowCollapse/Expand/Zoom).
+
+ When the window is created with, or has added, the kWindowStandardHandlerAttribute, the window also has
+ installed the Òstandard window handler.Ó The standard handler provides much more advanced behavior than
+ the basic window handler; a window using the standard handler generally requires no other extra handlers
+ to move, resize, redraw, or track user clicks in controls. Applications will generally add extra handlers
+ to respond to command events generated by controls in the window.
+}
+{
+ * kEventClassWindow / kEventWindowUpdate
+ *
+ * Summary:
+ * The lowest-level window update event.
+ *
+ * Discussion:
+ * Posted to the event queue for any window that needs updating
+ * regardless of whether the window has the standard handler
+ * installed. The standard window handler responds to this event by
+ * calling BeginUpdate and SetPort, sending a
+ * kEventWindowDrawContent event, and calling EndUpdate. An
+ * application handler for this event that does not call through to
+ * the standard handler must itself call BeginUpdate and
+ * EndUpdate.
+ *
+ * If all handlers for this event return eventNotHandledErr, and the
+ * application is calling WaitNextEvent or GetNextEvent, then a
+ * kEventWindowUpdate event will be returned as a classic updateEvt.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that requires updating.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowUpdate = 1;
+
+{
+ * kEventClassWindow / kEventWindowDrawContent
+ *
+ * Summary:
+ * A request to update a windowÕs content.
+ *
+ * Discussion:
+ * This event is sent by the standard window handler when it
+ * receives a kEventWindowUpdate event. BeginUpdate, SetPort, and
+ * EndUpdate are called by the standard handler inside its
+ * kEventWindowUpdate handler; your handler for the
+ * kEventWindowDrawContent event only needs to draw into the current
+ * port.
+ *
+ * The standard window handler responds to this event by calling
+ * UpdateControls.
+ *
+ * Regardless of whether the window uses the standard window event
+ * handler, you will also receive this event right before a window
+ * is made visible, to allow you to draw the windowÕs initial
+ * contents; you can implement this event to avoid flicker when the
+ * window is first shown.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that requires updating.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowDrawContent = 2;
+
+{
+ * kEventClassWindow / kEventWindowActivated
+ *
+ * Summary:
+ * Notification that a window has been activated.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. It is sent
+ * to any window that is activated, regardless of whether the window
+ * has the standard handler installed. On Mac OS X 10.3 and later,
+ * the standard window event handler responds to this event by
+ * sending a kEventWindowHandleActivate event to the window; on
+ * CarbonLib and earlier releases of Mac OS X, the standard window
+ * handler calls ActivateControl on the windowÕs root
+ * control.
+ *
+ * If all handlers for this event return eventNotHandledErr, then
+ * the Window Manager posts the event to the event queue, where it
+ * will later be returned from WaitNextEvent as a classic
+ * activateEvt. If any handler returns an error code other than
+ * eventNotHandledErr, then the event will not be posted to the
+ * event queue.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that is now active.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowActivated = 5;
+
+{
+ * kEventClassWindow / kEventWindowDeactivated
+ *
+ * Summary:
+ * Notification that a window has been deactivated.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. It is sent
+ * to any window that is deactivated, regardless of whether the
+ * window has the standard handler installed. On Mac OS X 10.3 and
+ * later, the standard window event handler responds to this event
+ * by sending a kEventWindowHandleDeactivate event to the window; on
+ * CarbonLib and earlier releases of Mac OS X, the standard window
+ * handler calls DeactivateControl on the windowÕs root
+ * control.
+ *
+ * If all handlers for this event return eventNotHandledErr, then
+ * the Window Manager posts the event to the event queue, where it
+ * will later be returned from WaitNextEvent as a classic
+ * activateEvt. If any handler returns an error code other than
+ * eventNotHandledErr, then the event will not be posted to the
+ * event queue.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that is now inactive.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowDeactivated = 6;
+
+{
+ * kEventClassWindow / kEventWindowHandleActivate
+ *
+ * Summary:
+ * The window has received a kEventWindowActivated event, and its
+ * contents should become active.
+ *
+ * Discussion:
+ * This event is generated by the standard window handler in
+ * response to a kEventWindowActivated event. An application may
+ * handle this event by activating its content appropriately. The
+ * standard window handler responds to this event by calling
+ * ActivateControl on the window's root control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was activated.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowHandleActivate = 91;
+
+{
+ * kEventClassWindow / kEventWindowHandleDeactivate
+ *
+ * Summary:
+ * The window has received a kEventWindowDeactivated event, and its
+ * contents should become inactive.
+ *
+ * Discussion:
+ * This event is generated by the standard window handler in
+ * response to a kEventWindowDeactivated event. An application may
+ * handle this event by deactivating its content appropriately. The
+ * standard window handler responds to this event by calling
+ * DeactivateControl on the window's root control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was deactivated.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowHandleDeactivate = 92;
+
+{
+ * kEventClassWindow / kEventWindowGetClickActivation
+ *
+ * Summary:
+ * Sent when a click occurs in a window. Allows the window to
+ * determine whether the window should be activated and whether the
+ * click should be handled.
+ *
+ * Discussion:
+ * This event is sent in two situations:
+ * - for all windows, it is sent to a clicked window when the
+ * window's process is inactive
+ * - for windows that use the standard window event handler, this
+ * event is also sent to clicked windows when the window's process
+ * is active. Prior to Mac OS X 10.4, this event is only sent when
+ * the clicked window is not the frontmost window in its window
+ * group. In Mac OS X 10.4 and later, this event is sent in response
+ * to all clicks in a window, regardless of whether the window is
+ * frontmost, so that command-clicks may properly avoid z-ordering
+ * the window in front of other windows from other processes.
+ *
+ *
+ * A handler for this event can determine whether the window is
+ * activated and whether the click is handled or ignored by setting
+ * the kEventParamClickActivation parameter to one of the
+ * ClickActivationResult constants in Controls.h.
+ *
+ * The default behavior varies according to the window state and the
+ * click location:
+ * - if the window's process is active, and the window is frontmost
+ * in its group, then the standard window event handler returns
+ * kActivateAndHandleClick.
+ * - if the window's process is inactive, or the window is not
+ * frontmost in its group, then the standard window event handler
+ * returns kActivateAndIgnoreClick.
+ * - if the click falls on the window widgets in the window
+ * structure, then the default window event handler usually returns
+ * kDoNotActivateAndHandleClick.
+ * You have the option of overriding the behavior to support
+ * click-through or select-and-click.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was clicked.
+ *
+ * --> kEventParamMouseLocation (in, typeQDPoint)
+ * The location of the click, in global coordinates.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the mouse was
+ * clicked.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The window part that was clicked. Available in Mac OS X
+ * 10.3 and later.
+ *
+ * --> kEventParamWindowDefPart (in, typeWindowDefPartCode)
+ * The window part that was clicked. This is really a window
+ * part code, not a window def part code, despite the
+ * parameter name; this parameter is available in all versions
+ * of Mac OS X and CarbonLib 1.1 and later, but use
+ * kEventParamWindowPartCode when available instead for
+ * clarity.
+ *
+ * --> kEventParamControlRef (in, typeControlRef)
+ * The control that was clicked. Only present if the click was
+ * on a control.
+ *
+ * <-- kEventParamClickActivation (out, typeClickActivationResult)
+ * On exit, indicates how the click should be handled. Should
+ * be set a ClickActivationResult constant from Controls.h.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowGetClickActivation = 7;
+
+
+{
+ * Summary:
+ * Responses to the kEventWindowGetClickModality event.
+ }
+const
+{
+ * Indicates whether a modal window prevents the mouse event from
+ * being passed to the clicked window. If this bit is set, the
+ * kEventParamModalWindow and kEventParamWindowModality parameters
+ * should be set before the event handler returns. If this bit is
+ * clear, normal event handling will occur; the clicked window will
+ * typically be z-ordered to the top of its window group, activated,
+ * become the user focus window, and receive the mouse event for
+ * further processing.
+ }
+ kHIModalClickIsModal = 1 shl 0;
+
+ {
+ * If kHIModalClickIsModal is set, this flag indicates whether the
+ * click event should be allowed to pass to the clicked window. If
+ * kHIModalClickIsModal is not set, this flag is ignored.
+ }
+ kHIModalClickAllowEvent = 1 shl 1;
+
+ {
+ * If kHIModalClickIsModal is set and kHIModalClickAllowEvent is not
+ * set, this flag indicates whether the caller should announce that
+ * the click has been blocked by a modal window using appropriate UI
+ * (typically, by calling SysBeep). If kHIModalClickIsModal is not
+ * set, or if kHIModalClickAllowEvent is set, this flag is ignored.
+ }
+ kHIModalClickAnnounce = 1 shl 2;
+
+ {
+ * If both kHIModalClickIsModal and kHIModalClickAllowEvent are set,
+ * this flag indicates whether the clicked window should be z-ordered
+ * to the top of its window group. The window will not, however, be
+ * activated or become the user focus window. If either of
+ * kHIModalClickIsModal or kHIModalClickAllowEvent is not set, this
+ * flag is ignored.
+ }
+ kHIModalClickRaiseWindow = 1 shl 3;
+
+type
+ HIModalClickResult = UInt32;
+const
+ typeModalClickResult = $776D6372 (* 'wmcr' *); { HIModalClickResult}
+ typeWindowModality = $776D6F64 (* 'wmod' *); { WindowModality}
+ kEventParamModalClickResult = typeModalClickResult; { typeModalClickResult}
+ kEventParamModalWindow = $6D77696E (* 'mwin' *); { typeWindowRef}
+ kEventParamWindowModality = typeWindowModality; { typeWindowModality}
+
+{
+ * kEventClassWindow / kEventWindowGetClickModality
+ *
+ * Summary:
+ * Determines whether a mouse-down or mouse-up event is blocked by a
+ * modal window.
+ *
+ * Discussion:
+ * This event is sent to a window by the event dispatcher target
+ * prior to dispatching a mouse-down or mouse-up event to the
+ * clicked window. A handler for this event may examine application
+ * state to determine whether this click should be allowed.
+ *
+ * This event may also be sent in other circumstances besides a
+ * mouse event. The toolbox currently sends this event in the
+ * following other cases:
+ *
+ * - in SelectWindow
+ * - when handling the cmd-~ key sequence
+ * - when restoring a collapsed window from the Dock
+ * - when handling the kHICommandSelectWindow command
+ * - during application activation, when activating a clicked
+ * window
+ *
+ * In each case, the result of this event is used to determine
+ * whether z-ordering, activation, and hiliting of the window should
+ * be allowed.
+ *
+ * This event contains an optional EventRef parameter that is the
+ * original mouse event. This parameter is not always present; if
+ * not present, the handler should generally assume that the click
+ * was a single click.
+ *
+ * There is a default handler for this event installed on the
+ * application target. The default behavior is to determine whether
+ * this is a modal click by examining the modality of the visible,
+ * uncollapsed windows in front of the clicked window, the location
+ * of the click, and the keyboard modifiers. A custom handler may,
+ * of course, entirely ignore window z-order or modality, and
+ * determine modality in any way it deems necessary.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was clicked.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The window part that was clicked.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the mouse
+ * button was pressed.
+ *
+ * --> kEventParamEventRef (in, typeEventRef)
+ * The original mouse event. This parameter is optional and
+ * may not be present in all instances of this event. If this
+ * parameter is not present, the handler should assume that
+ * the click was a single click, with the window part and
+ * keyboard modifiers specified by the other parameters in the
+ * kEventWindowGetClickModality event.
+ *
+ * <-- kEventParamModalClickResult (out, typeModalClickResult)
+ * On exit, this parameter should contain an
+ * HIModalClickResult value indicating how the click should be
+ * handled.
+ *
+ * <-- kEventParamModalWindow (out, typeWindowRef)
+ * On exit, this parameter should contain the modal window
+ * that caused the click to be blocked, if any. The sender of
+ * this event uses this information to determine which window
+ * should be activated if the application is inactive.
+ *
+ *
+ * This parameter is only required if the
+ * kEventParamModalClickResult parameter contains
+ * kHIModalClickIsModal. If an event handler wants to report
+ * that a click has been blocked by modality, but cannot
+ * determine which window blocked the click, it is acceptable
+ * to either not add this parameter to the event, or to set
+ * the parameter to a NULL WindowRef.
+ *
+ * <-- kEventParamWindowModality (out, typeWindowModality)
+ * On exit, this parameter should contain the modality of the
+ * modal window that is in front of the clicked window, if
+ * any. This parameter is only required if the
+ * kEventParamModalClickResult parameter contains
+ * kHIModalClickIsModal.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowGetClickModality = 8;
+
+
+{
+ * Summary:
+ * Window bounds change event attributes
+ *
+ * Discussion:
+ * When the toolbox sends out a kEventWindowBoundsChanging or
+ * kEventWindowBoundsChanged event, it also sends along a parameter
+ * containing attributes of the event. These attributes can be used
+ * to determine what aspect of the window changed (origin, size, or
+ * both), and whether or not some user action is driving the change
+ * (drag or resize).
+ }
+const
+{
+ * The bounds is changing because the user is dragging the window
+ * around.
+ }
+ kWindowBoundsChangeUserDrag = 1 shl 0;
+
+ {
+ * The bounds is changing because the user is resizing the window.
+ }
+ kWindowBoundsChangeUserResize = 1 shl 1;
+
+ {
+ * The dimensions (width and height) of the window content area are
+ * changing.
+ }
+ kWindowBoundsChangeSizeChanged = 1 shl 2;
+
+ {
+ * The top left corner (origin) of the window content is changing.
+ }
+ kWindowBoundsChangeOriginChanged = 1 shl 3;
+
+ {
+ * The bounds is changing because ZoomWindow or ZoomWindowIdeal was
+ * called. Note that this flag does not imply any user interaction;
+ * if the application calls ZoomWindow itself without user request,
+ * this flag will still be set. Available in Mac OS X 10.2 and
+ * CarbonLib 1.6, and later.
+ }
+ kWindowBoundsChangeZoom = 1 shl 4;
+
+{
+ * kEventClassWindow / kEventWindowShowing
+ *
+ * Summary:
+ * Notification that a window is being shown.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window being shown.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowShowing = 22;
+
+{
+ * kEventClassWindow / kEventWindowHiding
+ *
+ * Summary:
+ * Notification that a window is being hidden.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window being hidden.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowHiding = 23;
+
+{
+ * kEventClassWindow / kEventWindowShown
+ *
+ * Summary:
+ * Notification that a window has been shown.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was shown.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowShown = 24;
+
+{
+ * kEventClassWindow / kEventWindowHidden
+ *
+ * Summary:
+ * Notification that a window has been hidden.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. Prior to
+ * Mac OS X 10.2 and CarbonLib 1.6, kEventWindowClosed and
+ * kEventWindowHidden were sent in that order by the Window Manager
+ * to a window being destroyed. This was problematic if you had a
+ * Hidden handler which used data that was destroyed by the Closed
+ * handler. The Window Manager in Mac OS X 10.2 and CarbonLib 1.6
+ * and later now sends these events in the reverse order:
+ * kEventWindowHidden first, followed by kEventWindowClosed. The
+ * last event sent to a window remains kEventWindowDispose.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was hidden.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowHidden = 25;
+
+{
+ * kEventClassWindow / kEventWindowCollapsing
+ *
+ * Summary:
+ * Notification that a window is about to collapse.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window being collapsed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.6 and later
+ }
+const
+ kEventWindowCollapsing = 86;
+
+{
+ * kEventClassWindow / kEventWindowCollapsed
+ *
+ * Summary:
+ * Notification that a window has successfully collapsed.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was collapsed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowCollapsed = 67;
+
+{
+ * kEventClassWindow / kEventWindowExpanding
+ *
+ * Summary:
+ * Notification that a window is about to expand.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window being expanded.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.6 and later
+ }
+const
+ kEventWindowExpanding = 87;
+
+{
+ * kEventClassWindow / kEventWindowExpanded
+ *
+ * Summary:
+ * Notification that a window has successfully expanded.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was expanded.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowExpanded = 70;
+
+{
+ * kEventClassWindow / kEventWindowZoomed
+ *
+ * Summary:
+ * Notification that a window has been successfully zoomed.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. In
+ * CarbonLib 1.1 through CarbonLib 1.4, and Mac OS X 10.0 and 10.1,
+ * this event is only sent by the standard window event handler
+ * after handling kEventWindowZoom; starting with CarbonLib 1.5 and
+ * Mac OS X 10.2, this event is sent by ZoomWindow and
+ * ZoomWindowIdeal.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was zoomed.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code (inZoomIn or inZoomOut) that was passed to
+ * ZoomWindow or ZoomWindowIdeal. This parameter is available
+ * in Mac OS X 10.4 and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowZoomed = 76;
+
+{
+ * kEventClassWindow / kEventWindowBoundsChanging
+ *
+ * Summary:
+ * Notification that a windowÕs bounds are about to be changed.
+ *
+ * Discussion:
+ * Sent during DragWindow or ResizeWindow, before the window is
+ * actually moved or resized, and also during programmatic
+ * bounds-changing APIs such as SetWindowBounds and ZoomWindow. An
+ * event handler may alter the kEventParamCurrentBounds parameter in
+ * the event to change the eventual location of the window. You may
+ * change the size, origin, or both of the windowÕs bounds. Do not,
+ * however, call SizeWindow or SetWindowBounds yourself from inside
+ * a handler for this event.
+ *
+ * In Mac OS X 10.1 and later, kEventWindowBoundsChanging is sent
+ * before all changes to a windowÕs bounds, regardless of whether
+ * the change is initiated by the user or by a direct call to a
+ * Window Manager API. Applications may intercept the event and
+ * modify the bounds. When the event is sent because of a direct
+ * call to the Window Manager, the
+ * kWindowBoundsChangeUserDrag/Resize attribute bits will not be set.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window being shown.
+ *
+ * --> kEventParamAttributes (in, typeUInt32)
+ * The bounds-changing attributes indicating whether the
+ * window is being resized, moved, or both.
+ *
+ * --> kEventParamOriginalBounds (in, typeQDRectangle)
+ * The windowÕs original content bounds before the window
+ * resize or drag began.
+ *
+ * --> kEventParamPreviousBounds (in, typeQDRectangle)
+ * The windowÕs content bounds before the current bounds
+ * change.
+ *
+ * <-> kEventParamCurrentBounds (in/out, typeQDRectangle)
+ * On entry, the windowÕs proposed new content bounds; on
+ * exit, the content bounds that are desired by the event
+ * handler.
+ *
+ * Result:
+ * Return noErr to indicate that the Window Manager should use the
+ * kEventParamCurrentBounds parameter as the windowÕs new content
+ * bounds.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowBoundsChanging = 26;
+
+{
+ * kEventClassWindow / kEventWindowBoundsChanged
+ *
+ * Summary:
+ * Notification that a windowÕs bounds have been changed.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. Do not call
+ * SizeWindow or SetWindowBounds from inside a handler for this
+ * event; if you need to enforce a certain window bounds, install a
+ * kEventWindowBoundsChanging handler instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose bounds were changed.
+ *
+ * --> kEventParamAttributes (in, typeUInt32)
+ * The bounds-changing attributes indicating whether the
+ * window was resized, moved, or both.
+ *
+ * --> kEventParamOriginalBounds (in, typeQDRectangle)
+ * The windowÕs original content bounds before the window
+ * resize or drag began.
+ *
+ * --> kEventParamPreviousBounds (in, typeQDRectangle)
+ * The windowÕs content bounds before the current bounds
+ * change.
+ *
+ * --> kEventParamCurrentBounds (in, typeQDRectangle)
+ * The windowÕs new content bounds.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowBoundsChanged = 27;
+
+{
+ * kEventClassWindow / kEventWindowResizeStarted
+ *
+ * Summary:
+ * Notification that the user has just started to resize a window.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window being resized.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowResizeStarted = 28;
+
+{
+ * kEventClassWindow / kEventWindowResizeCompleted
+ *
+ * Summary:
+ * Notification that the user has just finished resizing a window.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was resized.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowResizeCompleted = 29;
+
+{
+ * kEventClassWindow / kEventWindowDragStarted
+ *
+ * Summary:
+ * Notification that the user has just started to drag a window.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window being dragged.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowDragStarted = 30;
+
+{
+ * kEventClassWindow / kEventWindowDragCompleted
+ *
+ * Summary:
+ * Notification that the user has just finished dragging a window.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was dragged.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowDragCompleted = 31;
+
+{
+ * kEventClassWindow / kEventWindowClosed
+ *
+ * Summary:
+ * Notification that a window is being destroyed.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. Prior to
+ * Mac OS X 10.2 and CarbonLib 1.6, kEventWindowClosed and
+ * kEventWindowHidden were sent in that order by the Window Manager
+ * to a window being destroyed. This was problematic if you had a
+ * Hidden handler which used data that was destroyed by the Closed
+ * handler. The Window Manager in Mac OS X 10.2 and CarbonLib 1.6
+ * and later now sends these events in the reverse order:
+ * kEventWindowHidden first, followed by kEventWindowClosed. The
+ * last event sent to a window remains kEventWindowDispose.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window being destroyed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowClosed = 73;
+
+{
+ * kEventClassWindow / kEventWindowTransitionStarted
+ *
+ * Summary:
+ * Notification that a window transition has started.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. It is sent
+ * by the TransitionWindow, TransitionWindowAndParent, and
+ * TransitionWindowWithOptions APIs just before the first frame of
+ * the transition animation.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that will be transitioning.
+ *
+ * --> kEventParamUserData (in, typeVoidPtr)
+ * The user data that was specified in the
+ * TransitionWindowOptions.userData field. If no user data was
+ * specified, this parameter will still be present, but its
+ * value will be NULL.
+ *
+ * --> kEventParamWindowTransitionAction (in, typeWindowTransitionAction)
+ * The transition action that is starting.
+ *
+ * --> kEventParamWindowTransitionEffect (in, typeWindowTransitionEffect)
+ * The transition effect that is starting.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowTransitionStarted = 88;
+
+{
+ * kEventClassWindow / kEventWindowTransitionCompleted
+ *
+ * Summary:
+ * Notification that a window transition has completed.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. It is sent
+ * by the TransitionWindow, TransitionWindowAndParent, and
+ * TransitionWindowWithOptions APIs just after the last frame of the
+ * transition animation.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was transitioning.
+ *
+ * --> kEventParamUserData (in, typeVoidPtr)
+ * The user data that was specified in the
+ * TransitionWindowOptions.userData field. If no user data was
+ * specified, this parameter will still be present, but its
+ * value will be NULL.
+ *
+ * --> kEventParamWindowTransitionAction (in, typeWindowTransitionAction)
+ * The transition action that has completed.
+ *
+ * --> kEventParamWindowTransitionEffect (in, typeWindowTransitionEffect)
+ * The transition effect that has completed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowTransitionCompleted = 89;
+
+{
+ * kEventClassWindow / kEventWindowClickDragRgn
+ *
+ * Summary:
+ * Sent when the mouse is clicked in the drag region.
+ *
+ * Discussion:
+ * The standard window handler responds to this event by checking if
+ * the click is a window path-select click; if so, it sends
+ * kEventWindowPathSelect to allow customization of the path-select
+ * menu, and then calls WindowPathSelect. If the click is not a
+ * path-select click, the standard window handler calls DragWindow.
+ * Note that this event is not sent for composited windows; the
+ * window frame view handles the mouse-down event directly. To
+ * intercept a drag region click in a composited window, install a
+ * kEventControlClick handler on the windowÕs root view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was clicked.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.1 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowClickDragRgn = 32;
+
+{
+ * kEventClassWindow / kEventWindowClickResizeRgn
+ *
+ * Summary:
+ * Sent when the mouse is clicked in the resize area.
+ *
+ * Discussion:
+ * The standard window handler responds to this event by calling
+ * ResizeWindow. Note that this event is not sent for composited
+ * windows; the window resize view handles the mouse-down event
+ * directly. To intercept a resize region click in a composited
+ * window, install a kEventControlClick handler on the windowÕs
+ * resize view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was clicked.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.1 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowClickResizeRgn = 33;
+
+{
+ * kEventClassWindow / kEventWindowClickCollapseRgn
+ *
+ * Summary:
+ * Sent when the mouse is clicked in the collapse button.
+ *
+ * Discussion:
+ * For all windows, the basic window handler responds to this event
+ * by tracking the click in the collapse button. If the mouse is
+ * released while still in the button, the basic window handler
+ * generates one of the kEventWindowCollapse,
+ * kEventWindowCollapseAll, kEventWindowExpand, or
+ * kEventWindowExpandAll events, depending on the windowÕs original
+ * collapse state and whether the option key was pressed. Note that
+ * this event is not sent for composited windows; the window
+ * collapse button view handles the mouse-down event directly. To
+ * intercept a collapse region click in a composited window, install
+ * a kEventControlClick handler on the windowÕs collapse button view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was clicked.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.1 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowClickCollapseRgn = 34;
+
+{
+ * kEventClassWindow / kEventWindowClickCloseRgn
+ *
+ * Summary:
+ * Sent when the mouse is clicked in the close button.
+ *
+ * Discussion:
+ * The standard window handler responds to this event by tracking
+ * the click in the close button. If the mouse is released while
+ * still in the button, the standard window handler generates one of
+ * the kEventWindowClose or kEventWindowCloseAll events, depending
+ * on whether the option key was pressed. Note that this event is
+ * not sent for composited windows; the window close button view
+ * handles the mouse-down event directly. To intercept a close
+ * region click in a composited window, install a kEventControlClick
+ * handler on the windowÕs close button view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was clicked.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.1 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowClickCloseRgn = 35;
+
+{
+ * kEventClassWindow / kEventWindowClickZoomRgn
+ *
+ * Summary:
+ * Sent when the mouse is clicked in the zoom button.
+ *
+ * Discussion:
+ * The standard window handler responds to this event by tracking
+ * the click in the zoom button. If the mouse is released while
+ * still in the button, the standard window handler generates one of
+ * the kEventWindowZoom or kEventWindowZoomAll events, depending on
+ * whether the option key was pressed. Note that this event is not
+ * sent for composited windows; the window zoom button view handles
+ * the mouse-down event directly. To intercept a zoom region click
+ * in a composited window, install a kEventControlClick handler on
+ * the windowÕs zoom region view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was clicked.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.1 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowClickZoomRgn = 36;
+
+{
+ * kEventClassWindow / kEventWindowClickContentRgn
+ *
+ * Summary:
+ * Sent when the mouse is clicked in the content region.
+ *
+ * Discussion:
+ * The standard window handler responds to this event by checking if
+ * the click should display a contextual menu; if so, and if the
+ * click was in an enabled control, it calls
+ * HandleControlContextualMenuSelect. If the click was not in a
+ * control, or if the control does not display a contextual menu,
+ * the standard window handler sends a
+ * kEventWindowContextualMenuSelect event to the window.
+ *
+ * If the click was not a contextual menu click, then the standard
+ * window handler uses HIViewGetViewForMouseEvent to determine the
+ * HIView containing the click. If a view is found, the standard
+ * window handler calls HIViewClick, which will generate a
+ * kEventControlClick event.
+ *
+ * If no view is found that contains the click, or if the containing
+ * view does not handle the click, then the standard window handler
+ * sends a kEventWindowHandleContentClick event.
+ *
+ * Note that this event is not sent for composited windows; all
+ * mouse-downs in a composited window are handled by a view, and
+ * there is no Ócontent regionÓ in a composited window. To intercept
+ * a content region click in a composited window, install a
+ * kEventControlClick handler on the windowÕs content view, or
+ * provide your own HIView subclass.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was clicked.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.1 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowClickContentRgn = 37;
+
+{
+ * kEventClassWindow / kEventWindowClickProxyIconRgn
+ *
+ * Summary:
+ * Sent when the mouse is clicked in the proxy icon.
+ *
+ * Discussion:
+ * The standard window handler responds to this event by handling
+ * proxy icon dragging. It first sends a kEventWindowProxyBeginDrag
+ * event to allow customization of the DragRef, and then calls
+ * TrackWindowProxyFromExistingDrag. Finally, the standard window
+ * handler sends a kEventWindowProxyEndDrag event. Note that this
+ * event is not sent for composited windows; the window title view
+ * handles the mouse-down event directly. To intercept a proxy icon
+ * region click in a composited window, install a kEventControlClick
+ * handler on the windowÕs title view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was clicked.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.1 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowClickProxyIconRgn = 38;
+
+{
+ * kEventClassWindow / kEventWindowClickToolbarButtonRgn
+ *
+ * Summary:
+ * Sent when the mouse is clicked in the toolbar button.
+ *
+ * Discussion:
+ * For all windows, the basic window handler responds to this event
+ * by tracking the click in the toolbar button. If the mouse is
+ * released while still in the button, the basic window handler
+ * sends a kEventWindowToolbarSwitchMode event. Note that this event
+ * is not sent for composited windows; the window toolbar button
+ * view handles the mouse-down event directly. To intercept a
+ * toolbar button region click in a composited window, install a
+ * kEventControlClick handler on the windowÕs toolbar button view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was clicked.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.1 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowClickToolbarButtonRgn = 41;
+
+{
+ * kEventClassWindow / kEventWindowClickStructureRgn
+ *
+ * Summary:
+ * Sent when the mouse is clicked in some part of the window
+ * structure other than the window widgets, drag region, or resize
+ * region.
+ *
+ * Discussion:
+ * The standard window handler responds to this event by calling
+ * HIViewGetViewForMouseEvent to determine the HIView containing the
+ * click. If a view is found, the standard window handler calls
+ * HIViewClick, which will generate a kEventControlClick event. Note
+ * that this event is not sent for composited windows; all parts of
+ * the window frame are built from views, and the mouse will never
+ * land outside of a view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was clicked.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.1 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowClickStructureRgn = 42;
+
+
+{
+ * kEventClassWindow / kEventWindowCursorChange
+ *
+ * Summary:
+ * Sent when the mouse is moving over the content region of a window.
+ *
+ * Discussion:
+ * This event is used to manage ownership of the cursor. You should
+ * only change the cursor if you receive this event; otherwise,
+ * someone else needed to adjust the cursor and handled the event
+ * (e.g., a TSM Input Method when the mouse is over an inline input
+ * region). This event is only sent to the window itself; it is not
+ * propagated to controls in the window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window under the mouse.
+ *
+ * --> kEventParamMouseLocation (in, typeQDPoint)
+ * The mouse location in global coordinates.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The current keyboard modifiers.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ }
+const
+ kEventWindowCursorChange = 40;
+
+{
+ * kEventClassWindow / kEventWindowCollapse
+ *
+ * Summary:
+ * A request to collapse a window.
+ *
+ * Discussion:
+ * For all windows, the basic window handler responds to this event
+ * by calling CollapseWindow, passing true for the collapse
+ * parameter, which sends kEventWindowCollapsing and
+ * kEventWindowCollapsed events. This event is generated by the
+ * standard window handler in response to a click in a windowÕs
+ * collapse button. It is also generated by the basic window handler
+ * when Minimize or Collapse is selected from the standard window
+ * menu.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that should collapse.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowCollapse = 66;
+
+{
+ * kEventClassWindow / kEventWindowCollapseAll
+ *
+ * Summary:
+ * A request to collapse all windows.
+ *
+ * Discussion:
+ * For all windows, the basic window handler responds to this event
+ * by calling CollapseAllWindows, passing true for the collapse
+ * parameter. CollapseAllWindows simply calls CollapseWindow on each
+ * window; it does not send a kEventWindowCollapse to each window.
+ * This event is generated by the standard window handler in
+ * response to an option-click in a windowÕs collapse button. It is
+ * also generated by the basic window handler when Minimize All or
+ * Collapse All is selected from the standard window menu.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose collapse button was clicked.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowCollapseAll = 68;
+
+{
+ * kEventClassWindow / kEventWindowExpand
+ *
+ * Summary:
+ * A request to expand a window.
+ *
+ * Discussion:
+ * For all windows, the basic window handler responds to this event
+ * by calling CollapseWindow, passing false for the collapse
+ * parameter, which sends kEventWindowExpanding and
+ * kEventWindowExpanded events. This event is generated by the
+ * standard window handler in responds to a click in a collapsed
+ * windowÕs collapse button. It is also generated by the basic
+ * window handler when Uncollapse is selected from from the standard
+ * window menu provided by CarbonLib.
+ *
+ * Note that you will not receive this event on Mac OS X before a
+ * window is expanded from the Dock, since minimized windows in the
+ * dock donÕt uses collapse buttons to unminimize. However, you will
+ * still receive kEventWindowExpanding and kEventWindowExpanded in
+ * that case. You will receive this event on Mac OS 8 and 9 using
+ * CarbonLib since collapsed windows do have a collapse button there.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that should expand.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowExpand = 69;
+
+{
+ * kEventClassWindow / kEventWindowExpandAll
+ *
+ * Summary:
+ * A request to expand all windows.
+ *
+ * Discussion:
+ * For all windows, the basic window handler responds to this event
+ * by calling CollapseAllWindows, passing false for the collapse
+ * parameter. On Mac OS X 10.3 and later, CollapseAllWindows sends a
+ * kEventWindowExpand event to each window; on earlier version of
+ * Mac OS X, and in CarbonLib, it simply calls CollapseWindow on
+ * each window. This event is generated by the standard window
+ * handler in response to an option-click in a windowÕs collapse
+ * button. It is also generated by the basic window handler when
+ * Uncollapse All is selected from the standard window menu provided
+ * by CarbonLib.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose collapse button was clicked.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowExpandAll = 71;
+
+{
+ * kEventClassWindow / kEventWindowClose
+ *
+ * Summary:
+ * A request to close a window.
+ *
+ * Discussion:
+ * The standard window handler responds to this event by calling
+ * DisposeWindow. This event is generated by the standard window
+ * handler in response to a click in a windowÕs close button. On Mac
+ * OS X 10.3 and later, it is also generated when the Close menu
+ * item is selected from the Dock menu of a minimized window.
+ *
+ *
+ * Your application would typically intercept this event to check if
+ * the windowÕs document is dirty, and display a Save Changes alert
+ * if so.
+ *
+ * In order to support closing minimized windows from the Dock, your
+ * application must provide an event hander for this event,
+ * installed on the windowÕs event target, even if your application
+ * does not use the standard window handler or otherwise use Carbon
+ * events.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that should close.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowClose = 72;
+
+{
+ * kEventClassWindow / kEventWindowCloseAll
+ *
+ * Summary:
+ * A request to close all windows.
+ *
+ * Discussion:
+ * The standard window handler responds to this event by sending a
+ * kEventWindowClose event to all visible windows of the same window
+ * class as the target window. This event is generated by the
+ * standard window handler in response to an option-click in a
+ * windowÕs close button.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose close button was clicked.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowCloseAll = 74;
+
+{
+ * kEventClassWindow / kEventWindowZoom
+ *
+ * Summary:
+ * A request to zoom a window.
+ *
+ * Discussion:
+ * For all windows, the basic window handler responds to this event
+ * by sending a kEventWindowIdealSize event to get the windowÕs
+ * ideal size, and then calling ZoomWindowIdeal. This event is
+ * generated by the standard window handler in response to a click
+ * in the windowÕs zoom button. It is also generated by the basic
+ * window handler when Zoom is selected from the standard window
+ * menu.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that should zoom.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code (inZoomIn or inZoomOut) that should be passed
+ * to ZoomWindow or ZoomWindowIdeal. This parameter is
+ * optional and may not be present in all instances of this
+ * event. If present, the event handler should determine if
+ * the window is already in the requested state (i.e., if the
+ * part code is inZoomOut and the window is already in the
+ * standard state), and if so, the event handler should not
+ * zoom the window at all. If this parameter is not present,
+ * the event handler should zoom the window based on its
+ * current state. This parameter is available in Mac OS X 10.3
+ * and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowZoom = 75;
+
+{
+ * kEventClassWindow / kEventWindowZoomAll
+ *
+ * Summary:
+ * A request to zoom all windows.
+ *
+ * Discussion:
+ * The standard window handler responds to this event by zooming all
+ * visible windows of the same window class as the target window. On
+ * Mac OS X 10.3 and later, it causes each window to zoom by sending
+ * a kEventWindowZoom event to the window; on earlier versions of
+ * Mac OS X, and in CarbonLib, it simply calls ZoomWindowIdeal on
+ * each window. This event is generated by the standard window
+ * handler in response to an option-click on a windowÕs zoom button.
+ *
+ *
+ * After zooming all of the windows, if the windows are being zoomed
+ * out and the window class of the target window is
+ * kDocumentWindowClass, the windows are cascaded by sending a
+ * kEventCommandProcess event with the kHICommandArrangeInFront
+ * command to the target window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose zoom button was clicked.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowZoomAll = 77;
+
+{
+ * kEventClassWindow / kEventWindowContextualMenuSelect
+ *
+ * Summary:
+ * A request to display a contextual menu.
+ *
+ * Discussion:
+ * This event is generated by the standard window handler in
+ * response to a contextual menu click in the content area of a
+ * window. In response to such an event, the standard window handler
+ * first checks if the click is on a control, and if so, calls
+ * HandleControlContextualMenuClick. If the click was not on a
+ * control, or if HandleControlContextualMenuClick returned that it
+ * did not handle the click, then the standard window handler sends
+ * kEventWindowContextualMenuSelect to allow the application to
+ * provide its own customized contextual menu. The standard window
+ * handler does not respond to this event itself.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that should collapse.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.1 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowContextualMenuSelect = 78;
+
+{
+ * kEventClassWindow / kEventWindowPathSelect
+ *
+ * Summary:
+ * Allows customization of the path-selection popup menu displayed
+ * over a windowÕs title.
+ *
+ * Discussion:
+ * This event is generated by the standard window handler in
+ * response to a click in a windowÕs drag region. In response to
+ * such an event, the standard window handler first calls
+ * IsWindowPathSelectEvent to determine if the click should cause a
+ * path-selection popup menu to be displayed. If so, and if the
+ * window is also hilited and has a proxy icon, the standard window
+ * handler sends a kEventWindowPathSelect event to the window.
+ *
+ *
+ * A handler for this event should put a MenuRef into the event and
+ * return noErr to cause the menu to be displayed as the path
+ * selection popup menu. The menu will not be released by the
+ * standard window handler; however, in Mac OS X 10.4 and later, it
+ * will be retained by the EventRef when added to the event, and
+ * released when the event is destroyed, so a handler for this event
+ * may, on Mac OS X 10.4 and later, release the menu after adding it
+ * to the menu.
+ *
+ * Note! The standard window handler's use of this event was broken
+ * in all releases of CarbonLib and Mac OS X before Mac OS X 10.4;
+ * the MenuRef added to this event was not used to display the path
+ * selection menu. Therefore, this event is effectively useless
+ * before Mac OS X 10.4.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that will display the path-selection popup menu.
+ *
+ * <-- kEventParamMenuRef (out, typeMenuRef)
+ * On exit, contains the menu that should be displayed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowPathSelect = 79;
+
+{
+ * kEventClassWindow / kEventWindowGetIdealSize
+ *
+ * Summary:
+ * A request for the ideal size of a windowÕs content region, for
+ * use during window zooming.
+ *
+ * Discussion:
+ * This event is generated by the basic window handler in response
+ * to kEventWindowZoom. The basic window handler sends this event to
+ * the window to get the windowÕs ideal size, and passes the
+ * resulting size to ZoomWindowIdeal.
+ *
+ * This event is not handled by either the basic or standard window
+ * handlers. If no handler responds to this event, the basic window
+ * handler uses an ideal size based on the size of the monitor on
+ * which the window is located.
+ *
+ * Prior to Mac OS X Mac OS X 10.4, the ZoomWindowIdeal API
+ * malfunctioned if passed an idealSize that was large enough to
+ * cause 16-bit integer overflow when added to the window's current
+ * position. Therefore, when providing an ideal size in response to
+ * this event, you should generally not return values that are close
+ * to 32767. It is better to limit your ideal size to, say, 16K.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window being zoomed.
+ *
+ * <-- kEventParamDimensions (out, typeQDPoint)
+ * On exit, contains the windowÕs ideal size.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowGetIdealSize = 80;
+
+{
+ * kEventClassWindow / kEventWindowGetMinimumSize
+ *
+ * Summary:
+ * A request for the minimum size of a windowÕs content region, for
+ * use during window resizing.
+ *
+ * Discussion:
+ * This event is generated by the standard window handler before
+ * resizing a window. On Mac OS X 10.2 and later, the basic window
+ * handler responds to this event by calling GetWindowResizeLimits
+ * and returning the minimum size in the event; on earlier versions
+ * of Mac OS X and CarbonLib, this event is not handled by the basic
+ * or standard window handlers.
+ *
+ * On Mac OS X 10.2 and CarbonLib 1.6 and later, this event is also
+ * generated by ResizeWindow and GrowWindow if the sizeConstraints
+ * parameter is NULL.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window being resized.
+ *
+ * <-- kEventParamDimensions (out, typeQDPoint)
+ * On exit, contains the windowÕs minimum size.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowGetMinimumSize = 81;
+
+{
+ * kEventClassWindow / kEventWindowGetMaximumSize
+ *
+ * Summary:
+ * A request for the maximum size of a windowÕs content region, for
+ * use during window resizing.
+ *
+ * Discussion:
+ * This event is generated by the standard window handler before
+ * resizing a window. On Mac OS X 10.2 and later, the basic window
+ * handler responds to this event by calling GetWindowResizeLimits
+ * and returning the maximum size in the event; on earlier versions
+ * of Mac OS X and CarbonLib, this event is not handled by the basic
+ * or standard window handlers.
+ *
+ * On Mac OS X 10.2 and CarbonLib 1.6 and later, this event is also
+ * generated by ResizeWindow and GrowWindow if the sizeConstraints
+ * parameter is NULL.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window being resized.
+ *
+ * <-- kEventParamDimensions (out, typeQDPoint)
+ * On exit, contains the windowÕs minimum size.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowGetMaximumSize = 82;
+
+{
+ * kEventClassWindow / kEventWindowConstrain
+ *
+ * Summary:
+ * Requests that a windowÕs position be constrained to the available
+ * window positioning bounds.
+ *
+ * Discussion:
+ * The basic window handler responds to this event by calling
+ * ConstrainWindowToScreen. This event is generated in two
+ * situations: changes in graphics device configuration, and changes
+ * to Dock size. In either case, a window which was previously
+ * visible onscreen may become obscured or be totally offscreen, and
+ * should be repositioned back inside the available window
+ * positioning bounds.
+ *
+ * The behavior of the basic window handler may be customized by
+ * modifying the parameters to the event and then allowing the event
+ * to pass through to the basic handler, or an application may
+ * choose to override the event entirely and perform its own window
+ * constraining.
+ *
+ * Applications may also use the
+ * kEventAppAvailableWindowBoundsChanged event to be notified of
+ * changes to a deviceÕs available bounds.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window being constrained.
+ *
+ * --> kEventParamAvailableBounds (in, typeQDRectangle)
+ * The reasons why the window is being constrained. This
+ * parameter contains one or more of the
+ * kAvailBoundsChangedFor constants. This parameter is
+ * available only on Mac OS X 10.3 and later.
+ *
+ * --> kEventParamAttributes (in, typeUInt32)
+ * An integer which is the same for all instances of this
+ * event that are produced by the same configuration change.
+ * For example, if multiple displays are attached, then this
+ * event is sent once for each window on each affected display
+ * after a display configuration change; however, the
+ * transaction ID parameter will the same for each event, so a
+ * handler for this event can correlate events by observing
+ * the transaction ID. This parameter is available only on Mac
+ * OS X 10.3 and later.
+ *
+ * --> kEventParamWindowRegionCode (in, typeWindowRegionCode)
+ * The available window positioning bounds in which the window
+ * should be positioned. Event handlers may change the value
+ * in this parameter and then return eventNotHandledErr to
+ * allow the basic window handler to constrain the window to
+ * the new bounding rect.
+ *
+ * This parameter is used by the basic window handler on Mac
+ * OS X 10.1 and later; on earlier versions of Mac OS X, the
+ * basic window handler always constrains the window to the
+ * rect returned by GetAvailableWindowPositioningBounds for
+ * the windowÕs device.
+ *
+ * --> kEventParamRgnHandle (in, typeQDRgnHandle)
+ * Window constraint options that should be passed to
+ * ConstrainWindowToScreen. This parameter is optional and may
+ * not be present in all instances of this event. If present,
+ * this parameter should be formed from constants in the
+ * WindowConstrainOptions enumeration.
+ *
+ * This parameter is used by the basic window handler on Mac
+ * OS X 10.2 and later; on earlier versions of Mac OS X, or if
+ * this parameter is missing, the basic window handler passes
+ * kWindowConstrainMoveRegardlessOfFit to
+ * ConstrainWindowToScreen in Mac OS X 10.0, and
+ * kWindowConstrainMoveRegardlessOfFit |
+ * kWindowConstrainAllowPartial in Mac OS 10.1 and later.
+ *
+ * --> kEventParamPreviousDockRect (in, typeHIRect)
+ * A WindowRegionCode that should be passed to
+ * ConstrainWindowToScreen. This parameter is optional and may
+ * not be present in all instances of this event.
+ *
+ * This parameter is used by the basic window handler on Mac
+ * OS X 10.2 and later. On earlier versions of Mac OS X, or if
+ * this parameter is missing, the basic window handler passes
+ * kWindowDragRgn to ConstrainWindowToScreen.
+ *
+ * --> kEventParamPreviousDockDevice (in, typeGDHandle)
+ * The GrayRgn before a graphics device configuration change.
+ * This parameter is optional and may not be present in all
+ * instances of this event. It is present in events generated
+ * on Mac OS X 10.2 and later.
+ *
+ * An event handler may compare this region with the current
+ * GrayRgn to more intelligently determine whether the window
+ * should be constrained to the current GrayRgn. The basic
+ * window handler in Mac OS X 10.2 will not constrain windows
+ * that were not onscreen before the device configuration
+ * change.
+ *
+ * --> kEventParamCurrentDockRect (in, typeHIRect)
+ * The Dock bounding rect before a Dock size change. This
+ * parameter is optional and may not be present in all
+ * instances of this event. It is present in events in events
+ * generated on Mac OS X 10.2 and later.
+ *
+ * --> kEventParamCurrentDockDevice (in, typeGDHandle)
+ * The GDevice on which the Dock was previously positioned.
+ * This parameter is optional and may not be present in all
+ * instances of this event. It is present in events generated
+ * on Mac OS X 10.3 and later.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The Dock bounding rect after a Dock size change. This
+ * parameter is optional and may not be present in all
+ * instances of this event. It is present in events in events
+ * generated on Mac OS X 10.2 and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * The GDevice on which the Dock is currently positioned. This
+ * parameter is optional and may not be present in all
+ * instances of this event. It is present in events generated
+ * on Mac OS X 10.3 and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ }
+const
+ kEventWindowConstrain = 83;
+
+{
+ * kEventClassWindow / kEventWindowProxyBeginDrag
+ *
+ * Summary:
+ * Notification that a proxy icon drag is beginning.
+ *
+ * Discussion:
+ * This event includes the DragRef that will be used for the proxy
+ * icon drag. An application handler may attach its own data to the
+ * DragRef as appropriate for the document content.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose proxy icon is being dragged.
+ *
+ * --> kEventParamDragRef (in, typeDragRef)
+ * The DragRef that will be used for the proxy icon drag.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowProxyBeginDrag = 128;
+
+{
+ * kEventClassWindow / kEventWindowProxyEndDrag
+ *
+ * Summary:
+ * Notification that a proxy icon drag has ended.
+ *
+ * Discussion:
+ * This event is sent regardless of whether the drag completed
+ * successfully, or was canceled by the user.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose proxy icon is being dragged.
+ *
+ * --> kEventParamDragRef (in, typeDragRef)
+ * The DragRef that was used for the proxy icon drag.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowProxyEndDrag = 129;
+
+{
+ * kEventClassWindow / kEventWindowHandleContentClick
+ *
+ * Summary:
+ * The mouse has been clicked in the content region of a window, but
+ * the click is not a contextual menu invocation or a click on a
+ * control.
+ *
+ * Discussion:
+ * This event is generated by the standard window handler in
+ * response to a kEventWindowClickContentRgn event. An application
+ * may handle this event by checking if the mouse click was on a
+ * portion of its own user interface, and responding appropriately
+ * if so.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was clicked.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.1 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3.1 and later
+ }
+const
+ kEventWindowHandleContentClick = 85;
+
+{
+ * kEventClassWindow / kEventWindowGetDockTileMenu
+ *
+ * Summary:
+ * A request for a menu to be displayed by a windowÕs dock tile.
+ *
+ * Discussion:
+ * The basic window handler responds to this event by returning the
+ * menu, if any, that was provided by the SetWindowDockTileMenu API.
+ * For most applications, it will be easier to use the
+ * SetWindowDockTileMenu API directly rather than installing a
+ * handler for this event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that should collapse.
+ *
+ * <-- kEventParamMenuRef (out, typeMenuRef)
+ * On exit, contains the menu that should be displayed for the
+ * windowÕs Dock tile. The sender of this event will release
+ * the menu after the Dock has displayed it, so if you return
+ * a permanently allocated MenuRef, you should call RetainMenu
+ * on it before returning from your event handler.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowGetDockTileMenu = 90;
+
+{
+ * kEventClassWindow / kEventWindowToolbarSwitchMode
+ *
+ * Summary:
+ * A request that the windowÕs toolbar change its display mode.
+ *
+ * Discussion:
+ * For all windows, the basic window handler responds to this event
+ * by changing the display mode of the windowÕs HIToolbar, if any.
+ * If the application uses its own custom toolbar implementation, it
+ * should handle this event itself and respond appropriately. This
+ * event is generated by the basic window handler in response to a
+ * click in the windowÕs toolbar button.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose toolbar button was clicked.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.1 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.1 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.1 and CarbonLib 1.5, and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available on Mac OS X 10.1 and CarbonLib
+ * 1.5, and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available on Mac OS X 10.1 and
+ * CarbonLib 1.5, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowToolbarSwitchMode = 150;
+
+{
+ * kEventClassWindow / kEventWindowFocusAcquired
+ *
+ * Summary:
+ * Notification that the user (or some other action) has caused the
+ * focus to shift to your window.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * The basic window handler responds to this event by forwarding the
+ * event to the focused control in the specified window. This allows
+ * the focused control to invalidate or redraw itself as necessary;
+ * for example, the standard edit-text control responds to this
+ * event by enabling its blinking insertion point. An application
+ * handler may choose to set the focus to custom application content
+ * instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that is gaining focus.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowFocusAcquired = 200;
+
+{
+ * kEventClassWindow / kEventWindowFocusRelinquish
+ *
+ * Summary:
+ * Notification that a window has lost user focus.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * The basic window handler responds to this event by forwarding the
+ * event to the focused control in the specified window. This allows
+ * the focused control to invalidate or redraw itself as necessary;
+ * for example, the standard edit-text control responds to this
+ * event by disabling its blinking insertion point. An application
+ * handler should remove the focus from custom application content
+ * and ensure that the content is redrawn without the focus
+ * highlight.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that is losing focus.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowFocusRelinquish = 201;
+
+{
+ * kEventClassWindow / kEventWindowFocusContent
+ *
+ * Summary:
+ * A request to set the focus to the content area of a window.
+ *
+ * Discussion:
+ * If the content area of your window is not already focused, you
+ * should set the focus to the main part/control/view of the window.
+ * If the content area of your window is already focused, do
+ * nothing. The standard window handler responds to this event by
+ * calling HIViewAdvanceFocus on the windowÕs root control, if the
+ * focus is not already contained within the content root.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose content should be focused.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowFocusContent = 202;
+
+{
+ * kEventClassWindow / kEventWindowFocusToolbar
+ *
+ * Summary:
+ * A request to set the focus to the toolbar of a window.
+ *
+ * Discussion:
+ * If your windowÕs toolbar is not already focused, you should set
+ * the focus to the first item in the toolbar. If your windowÕs
+ * toolbar is already focused, do nothing. The basic window handler
+ * responds to this event by calling HIViewAdvanceFocus on the
+ * toolbar control, if the focus is not already contained within the
+ * toolbar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose toolbar should be focused.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowFocusToolbar = 203;
+
+{
+ * kEventClassWindow / kEventWindowFocusDrawer
+ *
+ * Summary:
+ * A request to set the focus to the drawer of a window.
+ *
+ * Discussion:
+ * If your windowÕs drawer is not already focused, you should set
+ * the focus to the first item in the drawer. If your windowÕs
+ * drawer is already focused, you should move the focus to the next
+ * or previous drawer, if any, depending on whether the modifiers
+ * parameter contains the shift key modifier. The basic window
+ * handler responds to this event by calling SetUserFocusWindow on,
+ * and sending a kEventWindowFocusContent event to, the appropriate
+ * drawer, if the focus is not already contained within the drawer.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose drawer should be focused.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the user
+ * requested a focus switch.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowFocusDrawer = 204;
+
+{
+ * kEventClassWindow / kEventWindowSheetOpening
+ *
+ * Summary:
+ * Notification that a sheet is opening.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. This event
+ * is sent to the sheet, its parent window, and the application
+ * target before the sheet begins opening.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The sheet that is opening.
+ *
+ * Result:
+ * An event handler for this event may return userCanceledErr if the
+ * sheet should not open. Any other return value is ignored and will
+ * still allow the sheet to open.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowSheetOpening = 210;
+
+{
+ * kEventClassWindow / kEventWindowSheetOpened
+ *
+ * Summary:
+ * Notification that a sheet is open.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. This event
+ * is sent to the sheet, its parent window, and the application
+ * target after the sheet is fully open.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The sheet that opened.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowSheetOpened = 211;
+
+{
+ * kEventClassWindow / kEventWindowSheetClosing
+ *
+ * Summary:
+ * Notification that a sheet is closing.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. This event
+ * is sent to the sheet, its parent window, and the application
+ * target before the sheet begins closing.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The sheet that is opening.
+ *
+ * Result:
+ * An event handler for this event may return userCanceledErr if the
+ * sheet should not close. Any other return value is ignored and
+ * will still allow the sheet to close.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowSheetClosing = 212;
+
+{
+ * kEventClassWindow / kEventWindowSheetClosed
+ *
+ * Summary:
+ * Notification that a sheet is closed.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. This event
+ * is sent to the sheet, its parent window, and the application
+ * target after the sheet is fully closed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The sheet that closed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowSheetClosed = 213;
+
+{
+ * kEventClassWindow / kEventWindowDrawerOpening
+ *
+ * Summary:
+ * Notification that a drawer is opening.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. This event
+ * is sent to the drawer, its parent window, and the application
+ * target before the drawer begins opening.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The drawer that is opening.
+ *
+ * Result:
+ * An event handler for this event may return userCanceledErr if the
+ * drawer should not open. Any other return value is ignored and
+ * will still allow the drawer to open.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowDrawerOpening = 220;
+
+{
+ * kEventClassWindow / kEventWindowDrawerOpened
+ *
+ * Summary:
+ * Notification that a drawer is open.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. This event
+ * is sent to the drawer, its parent window, and the application
+ * target after the drawer is fully open.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The drawer that opened.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowDrawerOpened = 221;
+
+{
+ * kEventClassWindow / kEventWindowDrawerClosing
+ *
+ * Summary:
+ * Notification that a drawer is closing.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. This event
+ * is sent to the drawer, its parent window, and the application
+ * target before the drawer begins closing.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The drawer that is opening.
+ *
+ * Result:
+ * An event handler for this event may return userCanceledErr if the
+ * drawer should not close. Any other return value is ignored and
+ * will still allow the drawer to close.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowDrawerClosing = 222;
+
+{
+ * kEventClassWindow / kEventWindowDrawerClosed
+ *
+ * Summary:
+ * Notification that a drawer is closed.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. This event
+ * is sent to the drawer, its parent window, and the application
+ * target after the drawer is fully closed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The drawer that closed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowDrawerClosed = 223;
+
+{
+ * kEventClassWindow / kEventWindowDrawFrame
+ *
+ * Summary:
+ * Sent by the Window Manager when itÕs time to draw a windowÕs
+ * structure.
+ *
+ * Discussion:
+ * This is the replacement to the old wDraw defProc message (though
+ * it is a special case of the 0 part code indicating to draw the
+ * entire window frame).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window to draw.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowDrawFrame = 1000;
+
+{
+ * kEventClassWindow / kEventWindowDrawPart
+ *
+ * Summary:
+ * Sent by the Window Manager when itÕs time to draw a specific part
+ * of a windowÕs structure, such as the close button.
+ *
+ * Discussion:
+ * This is typically sent during window widget tracking.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window to draw.
+ *
+ * --> kEventParamWindowDefPart (in, typeWindowDefPartCode)
+ * The part to draw.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowDrawPart = 1001;
+
+{
+ * kEventClassWindow / kEventWindowGetRegion
+ *
+ * Summary:
+ * Sent by the Window Manager when it needs to get a specific region
+ * from a window, or when the GetWindowRegion API is called.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose region to return.
+ *
+ * --> kEventParamWindowRegionCode (in, typeWindowRegionCode)
+ * The region to return.
+ *
+ * --> kEventParamRgnHandle (in, typeQDRgnHandle)
+ * On entry, contains a valid but empty RgnHandle; you should
+ * place the window region in this RgnHandle.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowGetRegion = 1002;
+
+{
+ * kEventClassWindow / kEventWindowHitTest
+ *
+ * Summary:
+ * Sent when the Window Manager needs to determine what part of a
+ * window would be 'hit' with a given mouse location in global
+ * coordinates.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window to hit-test.
+ *
+ * --> kEventParamMouseLocation (in, typeQDPoint)
+ * The mouse location.
+ *
+ * <-- kEventParamWindowDefPart (out, typeWindowDefPartCode)
+ * On exit, contains the window part that was hit.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowHitTest = 1003;
+
+{
+ * kEventClassWindow / kEventWindowInit
+ *
+ * Summary:
+ * Sent by the Window Manager when the window is being created. This
+ * is a hook to allow your window definition to do any
+ * initialization you might need to do.
+ *
+ * Discussion:
+ * This event can be sent more than once to a window if the window
+ * definition function for the window is changed; see the note under
+ * kEventWindowDispose.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window being created.
+ *
+ * <-- kEventParamWindowFeatures (out, typeUInt32)
+ * On exit, your event handler should store the window
+ * features in this parameter.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowInit = 1004;
+
+{
+ * kEventClassWindow / kEventWindowDispose
+ *
+ * Summary:
+ * Sent by the Window Manager to notify the window definition that
+ * it should dispose of any private data structures attached to the
+ * window.
+ *
+ * Discussion:
+ * Note that this event does not directly correspond with
+ * destruction of the window; the Window Manager occasionally needs
+ * to change the window definition of a window (for example, when
+ * ChangeWindowAttributes is used to change the visual appearance of
+ * a window), and in that case, the window will receive a
+ * kEventWindowDispose followed by a kEventWindowInit so that the
+ * old and new window definitions can disconnect and connect to the
+ * window. If you need to know when a window is really being
+ * destroyed, install a handler for kEventWindowClosed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window being destroyed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowDispose = 1005;
+
+{
+ * kEventClassWindow / kEventWindowDragHilite
+ *
+ * Summary:
+ * Sent by the Window Manager when it is time to draw/erase any drag
+ * hilite in the window structure.
+ *
+ * Discussion:
+ * This is typically sent from within HiliteWindowFrameForDrag.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window being hilited.
+ *
+ * --> kEventParamWindowDragHiliteFlag (in, typeBoolean)
+ * Whether to draw (true) or erase (false) the hilite.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowDragHilite = 1006;
+
+{
+ * kEventClassWindow / kEventWindowModified
+ *
+ * Summary:
+ * Sent by the Window Manager when it is time to redraw window
+ * structure to account for a change in the document modified state.
+ *
+ * Discussion:
+ * This is typically sent from within SetWindowModified.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window that was modified.
+ *
+ * --> kEventParamWindowModifiedFlag (in, typeBoolean)
+ * The new modified state.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowModified = 1007;
+
+{
+ * kEventClassWindow / kEventWindowSetupProxyDragImage
+ *
+ * Summary:
+ * Sent by the Window Manager when it is time to generate a drag
+ * image for the window proxy.
+ *
+ * Discussion:
+ * This is typically sent from within BeginWindowProxyDrag.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose proxy is being dragged.
+ *
+ * <-- kEventParamWindowProxyGWorldPtr (out, typeGWorldPtr)
+ * On exit, contains a GWorld you allocate which contains the
+ * drag image.
+ *
+ * --> kEventParamWindowProxyImageRgn (in, typeQDRgnHandle)
+ * The region you modify to contain the clip region for the
+ * GWorld.
+ *
+ * --> kEventParamWindowProxyOutlineRgn (in, typeQDRgnHandle)
+ * The region you modify to contain the drag outline used when
+ * the GWorld cannot be used.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowSetupProxyDragImage = 1008;
+
+{
+ * kEventClassWindow / kEventWindowStateChanged
+ *
+ * Summary:
+ * Sent by the Window Manager when a particular window state changes.
+ *
+ * Discussion:
+ * See the state-change flags in MacWindows.h.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose state was changed.
+ *
+ * --> kEventParamWindowStateChangedFlags (in, typeUInt32)
+ * The state change flags
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowStateChanged = 1009;
+
+{
+ * kEventClassWindow / kEventWindowMeasureTitle
+ *
+ * Summary:
+ * Sent when the Window Manager needs to know how much space the
+ * windowÕs title area takes up.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose title to measure.
+ *
+ * <-- kEventParamWindowTitleFullWidth (out, typeSInt16)
+ * On exit, contains the length of the whole title area.
+ *
+ * <-- kEventParamWindowTitleTextWidth (out, typeSInt16)
+ * On exit, contains the length just the title text.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowMeasureTitle = 1010;
+
+{
+ * kEventClassWindow / kEventWindowDrawGrowBox
+ *
+ * Summary:
+ * When the DrawGrowIcon API is called, this event is sent to the
+ * window to tell it to draw the grow box.
+ *
+ * Discussion:
+ * This is a compatibility event harkening back to the old days
+ * before Mac OS 8. Not very useful these days. This is only really
+ * needed for windows that do not have the grow box integrated into
+ * the window frame. Scroll bar delimiter lines are also drawn.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose grow box to draw.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowDrawGrowBox = 1011;
+
+{
+ * kEventClassWindow / kEventWindowGetGrowImageRegion
+ *
+ * Summary:
+ * This is a special way for a window to override the standard
+ * resize outline for windows that do not do live resizing.
+ *
+ * Discussion:
+ * As the user resizes the window, this event is sent with the
+ * current size the user has chosen expressed as a rectangle. You
+ * should calculate your window outline and modify the
+ * kEventParamRgnHandle parameter to reflect your desired outline.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window whose grow image to return.
+ *
+ * --> kEventParamWindowGrowRect (in, typeQDRectangle)
+ * The windowÕs global port bounds.
+ *
+ * --> kEventParamRgnHandle (in, typeQDRgnHandle)
+ * The region to modify.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventWindowGetGrowImageRegion = 1012;
+
+{
+ * kEventClassWindow / kEventWindowPaint
+ *
+ * Summary:
+ * When the Window Manager needs to paint a window (e.g, when a
+ * window is first displayed), the kEventWindowPaint event is sent
+ * to allow the window to control all aspect of painting, including
+ * the window frame.
+ *
+ * Discussion:
+ * If a window does not respond to this event, the Window Manager
+ * ends up sending kEventWindowDrawFrame and then erasing the window
+ * to the window content color as usual. This is mostly used for
+ * specialty windows, such as help tags or appliance apps might have.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeWindowRef)
+ * The window to paint.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventWindowPaint = 1013;
+
+{--------------------------------------------------------------------------------------}
+{ Menu Events }
+{--------------------------------------------------------------------------------------}
+{
+ kEventClassMenu quick reference:
+
+ kEventMenuBeginTracking = 1,
+ kEventMenuEndTracking = 2,
+ kEventMenuChangeTrackingMode = 3,
+ kEventMenuOpening = 4,
+ kEventMenuClosed = 5,
+ kEventMenuTargetItem = 6,
+ kEventMenuMatchKey = 7,
+ kEventMenuEnableItems = 8,
+ kEventMenuPopulate = 9,
+
+ kEventMenuMeasureItemWidth = 100,
+ kEventMenuMeasureItemHeight = 101,
+ kEventMenuDrawItem = 102,
+ kEventMenuDrawItemContent = 103,
+
+ kEventMenuDispose = 1001,
+ kEventMenuCalculateSize = 1004,
+
+ -- menu content view events --
+
+ kEventMenuCreateFrameView = 1005,
+ kEventMenuGetFrameBounds = 1006,
+ kEventMenuBecomeScrollable = 1007,
+ kEventMenuCeaseToBeScrollable = 1008,
+
+ -- menu bar visibility events --
+
+ kEventMenuBarShown = 2000,
+ kEventMenuBarHidden = 2001
+}
+
+{
+ * Discussion:
+ * Menu context flags indicate the context or usage of a
+ * menu-related Carbon event.
+ }
+const
+{ menu location}
+
+ {
+ * Indicates that this menu is inserted in the menubar, or is a
+ * (directly or indirectly) a submenu of a menu that is inserted in
+ * the menubar.
+ }
+ kMenuContextMenuBar = 1 shl 0; { menu type}
+
+ {
+ * Indicates that this menu is a pull-down menu inserted in the
+ * menubar.
+ }
+ kMenuContextPullDown = 1 shl 8;
+
+ {
+ * Indicates that this menu is a popup menu being displayed by
+ * PopUpMenuSelect.
+ }
+ kMenuContextPopUp = 1 shl 9;
+
+ {
+ * Indicates that this menu is a submenu of some other pull-down or
+ * popup menu.
+ }
+ kMenuContextSubmenu = 1 shl 10; { menu usage}
+
+ {
+ * Indicates that this Carbon event has been sent during a menubar
+ * tracking session.
+ }
+ kMenuContextMenuBarTracking = 1 shl 16;
+
+ {
+ * Indicates that this Carbon event has been sent during a popup menu
+ * tracking session.
+ }
+ kMenuContextPopUpTracking = 1 shl 17;
+
+ {
+ * Indicates that this Carbon event has been sent during command key
+ * matching.
+ }
+ kMenuContextKeyMatching = 1 shl 18;
+
+ {
+ * Indicates that this Carbon event has been sent at idle time to
+ * update the enabled state of the menus. Available on Mac OS X 10.1
+ * and later, and in CarbonLib 1.5 and later; on earlier releases,
+ * the kMenuContextKeyMatching flag is set when an event is sent
+ * during menu enabling.
+ }
+ kMenuContextMenuEnabling = 1 shl 19;
+
+ {
+ * Indicates that this Carbon event has been sent during during a
+ * search for a menu item command ID by the
+ * CountMenuItemsWithCommandID or GetIndMenuItemWithCommandID APIs.
+ * Available on Mac OS X 10.2 and CarbonLib 1.6.
+ }
+ kMenuContextCommandIDSearch = 1 shl 20;
+
+
+{
+ * Summary:
+ * Menu direction
+ }
+const
+{
+ * Indicates that the menu should be placed to the right of its
+ * parent.
+ }
+ kHIMenuRightDirection = 0;
+
+ {
+ * Indicates that the menu should be placed to the left of its parent.
+ }
+ kHIMenuLeftDirection = 1;
+
+ {
+ * Indicates that the menu should be centered on its parent.
+ }
+ kHIMenuCenterDirection = 2;
+
+{
+ * kEventClassMenu / kEventMenuBeginTracking
+ *
+ * Summary:
+ * The user has begun tracking the menubar or a pop-up menu.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. It is sent
+ * first to the menu specified in the direct object parameter, if
+ * any, and then to the user focus target.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeMenuRef)
+ * The root of the menu hierarchy being tracked. If tracking a
+ * popup menu, this parameter is the popup; if tracking the
+ * menubar, this parameter is the root menu on Mac OS X, but
+ * is NULL in CarbonLib.
+ *
+ * --> kEventParamCurrentMenuTrackingMode (in, typeMenuTrackingMode)
+ * Indicates whether the user is tracking the menus using the
+ * mouse or the keyboard. Contains either
+ * kMenuTrackingModeMouse or kMenuTrackingModeKeyboard.
+ *
+ * --> kEventParamMenuContext (in, typeUInt32)
+ * Menu context flags indicating what type of menu is being
+ * tracked. This parameter is available on Mac OS X 10.1 and
+ * later, and CarbonLib 1.5 and later.
+ *
+ * Result:
+ * The handler may return userCanceledErr to stop menu tracking.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventMenuBeginTracking = 1;
+
+{
+ * kEventClassMenu / kEventMenuEndTracking
+ *
+ * Summary:
+ * The user has finished tracking the menubar or a popup menu
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. It is sent
+ * first to the menu specified in the direct object parameter, if
+ * any, and then to the user focus target.
+ *
+ * In Mac OS X 10.3 and later, when a menu tracking session ends,
+ * the Menu Manager now sends kEventMenuEndTracking to every menu
+ * that was opened during the session, in addition to the root menu.
+ * This is done to allow menus with dynamic content to remove that
+ * content at the end of menu tracking; for example, a menu
+ * containing many IconRefs might wish to load the IconRefs
+ * dynamically in response to a kEventMenuPopulate, and remove them
+ * in response to kEventMenuEndTracking, to avoid the memory
+ * overhead of keeping the IconRef data in memory while the menu is
+ * not being displayed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeMenuRef)
+ * The root of the menu hierarchy being tracked. If tracking a
+ * popup menu, this parameter is the popup; if tracking the
+ * menubar, this parameter is the root menu on Mac OS X, but
+ * is NULL in CarbonLib.
+ *
+ * --> kEventParamMenuContext (in, typeUInt32)
+ * Menu context flags indicating what type of menu was being
+ * tracked. This parameter is available on Mac OS X 10.1 and
+ * later, and CarbonLib 1.5 and later.
+ *
+ * --> kEventParamMenuDismissed (in, typeUInt32)
+ * Contains an indication of why menu tracking ended; this
+ * will be one of the kHIMenuDismissedBy constants in Menus.h.
+ * This parameter is available on Mac OS X 10.3 and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventMenuEndTracking = 2;
+
+{
+ * kEventClassMenu / kEventMenuChangeTrackingMode
+ *
+ * Summary:
+ * The user has switched from selecting a menu with the mouse to
+ * selecting with the keyboard, or from selecting with the keyboard
+ * to selecting with the mouse.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. It is sent
+ * first to the menu specified in the direct object parameter, and
+ * then to the user focus target.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeMenuRef)
+ * The root of the menu hierarchy being tracked. If tracking a
+ * popup menu, this parameter is the popup; if tracking the
+ * menubar, this parameter is the root menu.
+ *
+ * --> kEventParamCurrentMenuTrackingMode (in, typeMenuTrackingMode)
+ * Indicates whether the user was previously tracking the
+ * menus using the mouse or the keyboard. Contains either
+ * kMenuTrackingModeMouse or kMenuTrackingModeKeyboard.
+ *
+ * --> kEventParamNewMenuTrackingMode (in, typeMenuTrackingMode)
+ * Indicates whether the user is now tracking the menus using
+ * the mouse or the keyboard. Contains either
+ * kMenuTrackingModeMouse or kMenuTrackingModeKeyboard.
+ *
+ * --> kEventParamMenuContext (in, typeUInt32)
+ * Menu context flags indicating what type of menu is being
+ * tracked.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventMenuChangeTrackingMode = 3;
+
+{
+ * kEventClassMenu / kEventMenuOpening
+ *
+ * Summary:
+ * A menu is opening.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. It is sent
+ * each time that the menu is opened (i.e., more than once during a
+ * given tracking session if the user opens the menu multiple
+ * times). It is sent before the menu is actually drawn, so you can
+ * update the menu contents (including making changes that will
+ * alter the menu size) and the new contents will be drawn correctly.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeMenuRef)
+ * The menu being opened.
+ *
+ * --> kEventParamMenuFirstOpen (in, typeBoolean)
+ * Whether this is the first time this menu has been opened
+ * during this menu tracking session.
+ *
+ * --> kEventParamMenuContext (in, typeUInt32)
+ * The context in which this menu is opening. Available on Mac
+ * OS X and CarbonLib 1.5 and later.
+ *
+ * Result:
+ * On Mac OS X, the handler may return userCanceledErr to prevent
+ * this menu from opening
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventMenuOpening = 4;
+
+{
+ * kEventClassMenu / kEventMenuClosed
+ *
+ * Summary:
+ * A menu has been closed.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. It is sent
+ * after the menu is hidden.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeMenuRef)
+ * The menu being closed.
+ *
+ * --> kEventParamMenuContext (in, typeUInt32)
+ * The context in which this menu is closing. Available on Mac
+ * OS X 10.1 and later, and CarbonLib 1.5 and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventMenuClosed = 5;
+
+{
+ * kEventClassMenu / kEventMenuTargetItem
+ *
+ * Summary:
+ * The mouse is moving over a particular menu item.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. It is sent
+ * for both enabled and disabled items.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeMenuRef)
+ * The menu being tracked.
+ *
+ * --> kEventParamMenuItemIndex (in, typeMenuItemIndex)
+ * The menu item under the mouse.
+ *
+ * --> kEventParamMenuCommand (in, typeMenuCommand)
+ * The command ID associated with this menu item.
+ *
+ * --> kEventParamMenuContext (in, typeUInt32)
+ * The context in which this menu being tracked. Available on
+ * Mac OS X 10.1 and later, and CarbonLib 1.5 and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventMenuTargetItem = 6;
+
+
+{
+ * kEventClassMenu / kEventMenuMatchKey
+ *
+ * Summary:
+ * A menu is about to be examined for items that match a command key
+ * event.
+ *
+ * Discussion:
+ * A handler for this event may perform its own command key matching
+ * and override the Menu ManagerÕs default matching algorithms.
+ * Returning noErr from your handler indicates that you have found a
+ * match. The handler for this event should not examine submenus of
+ * this menu for a match; a separate event will be sent for each
+ * submenu.
+ *
+ * Handlers for this event must be installed directly on the menu
+ * containing the item to be matched. To improve performance of
+ * command key matching, the Menu Manager only sends this event if
+ * the menu itself has a handler; if a handler for this event is
+ * installed on any other event target, it will not receive the
+ * event.
+ *
+ * In CarbonLib and Mac OS X through version 10.3, the Menu Manager
+ * sends a kEventMenuEnableItems event to the menu before sending
+ * kEventMenuMatchKey. In Mac OS X 10.4 and later, the Menu Manager
+ * no longer sends kEventMenuEnableItems (or the resulting
+ * kEventCommandUpdateStatus events) to the menu; a handler for
+ * kEventMenuMatchKey is expected to determine on its own whether a
+ * matching menu item is enabled.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeMenuRef)
+ * The menu being searched for a command key match.
+ *
+ * --> kEventParamEventRef (in, typeEventRef)
+ * The keyboard input event that should be checked for a
+ * match. Currently this event is always kEventRawKeyDown, but
+ * in the future it may be kEventTextInputUnicodeForKeyEvent.
+ * When called from IsMenuKeyEvent, this parameter contains
+ * the EventRef that was passed to IsMenuKeyEvent; when called
+ * from MenuKey or MenuEvent, this parameter contains an event
+ * created from the information passed to MenuKey or
+ * MenuEvent. Note that in the MenuKey case, no virtual
+ * keycode (kEventParamKeyCode) or key modifiers
+ * (kEventParamKeyModifiers) will be available.
+ *
+ * --> kEventParamMenuEventOptions (in, typeMenuEventOptions)
+ * Options from the MenuEventOptions enum that control how the
+ * menu should be searched for a command key. This parameter
+ * contains the options that were passed to IsMenuKeyEvent, or
+ * 0 if called from MenuKey or MenuEvent. The only option that
+ * your handler will need to obey is
+ * kMenuEventIncludeDisabledItems; other options are
+ * irrelevant for an event handler.
+ *
+ * --> kEventParamMenuContext (in, typeUInt32)
+ * The context in which this menu is being searched for a
+ * command key. Available on Mac OS X 10.1 and later, and
+ * CarbonLib 1.5 and later.
+ *
+ * <-- kEventParamMenuItemIndex (out, typeMenuItemIndex)
+ * On exit, contains the menu item index that matched the
+ * event.
+ *
+ * Result:
+ * If your handler finds a match, it should set the
+ * kEventParamMenuItemIndex parameter to contain the item index of
+ * the matching item, and return noErr. If it does not find a match,
+ * it should return menuItemNotFoundErr. Any other return value will
+ * cause the Menu Manager to use its default command key matching
+ * algorithm for this menu.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventMenuMatchKey = 7;
+
+
+{
+ * kEventClassMenu / kEventMenuEnableItems
+ *
+ * Summary:
+ * A request that the items in the menu be properly enabled or
+ * disabled according to the current state of the application.
+ *
+ * Discussion:
+ * This event is sent from inside MenuKey, MenuEvent, and
+ * IsMenuKeyEvent before those APIs examine the menu for an item
+ * that matches a keyboard event. It is also sent during menu
+ * tracking before a menu is first made visible; it is sent
+ * immediately after kEventMenuOpening, once per menu per menu
+ * tracking session. It is also sent to the top-level menus in the
+ * menubar when the application is idle after user input has
+ * occurred, to allow the menu titles to be enabled or disabled
+ * appropriately according to the current user focus. You can
+ * distinquish between all these cases by examining the contents of
+ * the kEventParamMenuContext parameter.
+ *
+ * If you install an event handler for kEventCommandProcess, you
+ * should also install a handler for either kEventMenuEnableItems or
+ * kEventCommandUpdateStatus. This is necessary because the Carbon
+ * event system will attempt to match command keys against the
+ * available menus before returning the keyboard event to your
+ * application via WaitNextEvent. If you have menu command event
+ * handlers installed for your menu items, your handlers will be
+ * called without your ever receiving the keyboard event or calling
+ * MenuKey/MenuEvent/IsMenuKeyEvent yourself. Therefore, you have no
+ * opportunity to enable your menu items properly other than from a
+ * kEventMenuEnableItems or kEventCommandUpdateStatus handler.
+ *
+ *
+ * It is not necessary to handle this event if you do not install
+ * kEventCommandProcess handlers for your menu items; in that case,
+ * the command key event will be returned from WaitNextEvent or
+ * ReceiveNextEvent as normal, and you can set up your menus before
+ * calling MenuKey/MenuEvent/ IsMenuKeyEvent.
+ *
+ * This event is sent first to the target menu, and then to the user
+ * focus target.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeMenuRef)
+ * The menu being enabled.
+ *
+ * --> kEventParamEnableMenuForKeyEvent (in, typeBoolean)
+ * Indicates whether this menu should be enabled for key event
+ * matching (true) or because the menu itself is about to
+ * become visible (false). If true, only the item enable
+ * state, command key, command key modifiers, and (optionally)
+ * the command key glyph need to be correct. If false, the
+ * entire menu item contents must be correct. This may be
+ * useful if you have custom menu content that is expensive to
+ * prepare.
+ *
+ * --> kEventParamMenuContext (in, typeUInt32)
+ * The context in which this menu is being enabled. Available
+ * on Mac OS X and CarbonLib 1.3.1 and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventMenuEnableItems = 8;
+
+
+{
+ * kEventClassMenu / kEventMenuPopulate
+ *
+ * Summary:
+ * kEventMenuPopulate is intended to be handled by applications that
+ * dynamically create their menu contents just-in-time before the
+ * menu is displayed. A handler for this event can add items to tbe
+ * menu that will be displayed or searched for a command key.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. Previously,
+ * kEventMenuOpening was recommended for the purpose of dynamically
+ * updating menu content. kEventMenuPopulate is now recommended
+ * because it will be sent by the Menu Manager before it searches a
+ * menu for a matching command key, to allow a handler to
+ * dynamically add menu items that may have command key equivalents
+ * to the menu; kEventMenuOpening is only sent before the menu is
+ * displayed. kEventMenuPopulate is also sent just before
+ * kEventMenuOpening as a menu is being displayed. Finally,
+ * kEventMenuPopulate is only sent once per menu tracking session
+ * for a given menu, even if that menu is closed and opened multiple
+ * times by the user; kEventMenuOpening is sent each time that the
+ * menu is displayed.
+ *
+ * You can distinguish the command-key case from the
+ * menu-being-displayed case by examining the contents of the
+ * kEventParamMenuContext parameter; the kMenuContextKeyMatching
+ * flag will be set if the event is sent during command key
+ * matching, and either the kMenuContextMenuBarTracking or
+ * kMenuContextPopUpTracking flags will be sent if the event is sent
+ * before actual display of the menu.
+ *
+ * In Mac OS X 10.2 and CarbonLib 1.6, kEventMenuPopulate is also
+ * sent to menus before the menu is searched for a command ID by the
+ * CountMenuItemsWithCommandID and GetIndMenuItemWithCommandID APIs.
+ * You can distinguish this case by checking for the
+ * kMenuContextCommandIDSearch flag in the kEventParamMenuContext
+ * parameter. In this case, the event also includes a
+ * kEventParamMenuCommand parameter with the command ID being
+ * searched for as the event parameter data.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeMenuRef)
+ * The menu to be populated.
+ *
+ * --> kEventParamMenuContext (in, typeUInt32)
+ * The context in which this menu is being populated.
+ *
+ * --> kEventParamMenuCommand (in, typeMenuCommand)
+ * If this event is sent by CountMenuItemsWithCommandID or
+ * GetIndMenuItemWithCommandID, this parameter contains the
+ * command ID for which the API is searching. Available on Mac
+ * OS X 10.2 and CarbonLib 1.6.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ }
+const
+ kEventMenuPopulate = 9;
+
+
+{
+ * kEventClassMenu / kEventMenuDispose
+ *
+ * Summary:
+ * Sent when a menu definition should disconnect itself from a menu.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeMenuRef)
+ * The menu being destroyed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventMenuDispose = 1001;
+
+{
+ * kEventClassMenu / kEventMenuMeasureItemWidth
+ *
+ * Summary:
+ * Requests measurement of the width of a menu item.
+ *
+ * Discussion:
+ * Sent by the standard menu definition when a menu item has the
+ * kMenuItemAttrCustomDraw attribute. Handlers for this event should
+ * be installed directly on the menu. A handler for this event may
+ * respond by providing a customized width for the menu item. If no
+ * handler is installed, the standard menu definition provides a
+ * default handler that will return the standard width for the item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeMenuRef)
+ * The menu that is being measured.
+ *
+ * --> kEventParamMenuItemIndex (in, typeMenuItemIndex)
+ * The menu item that is being measured.
+ *
+ * <-- kEventParamMenuItemWidth (out, typeShortInteger)
+ * On exit, contains the menu item width.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ }
+const
+ kEventMenuMeasureItemWidth = 100;
+
+
+{
+ * kEventClassMenu / kEventMenuMeasureItemHeight
+ *
+ * Summary:
+ * Requests measurement of the height of a menu item.
+ *
+ * Discussion:
+ * Sent by the standard menu definition when a menu item has the
+ * kMenuItemAttrCustomDraw attribute. Handlers for this event should
+ * be installed directly on the menu. A handler for this event may
+ * respond by providing a customized height for the menu item. If no
+ * handler is installed, the standard menu definition provides a
+ * default handler that will return the standard height for the item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeMenuRef)
+ * The menu that is being measured.
+ *
+ * --> kEventParamMenuItemIndex (in, typeMenuItemIndex)
+ * The menu item that is being measured.
+ *
+ * <-- kEventParamMenuItemHeight (out, typeShortInteger)
+ * On exit, contains the menu item height.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ }
+const
+ kEventMenuMeasureItemHeight = 101;
+
+
+{
+ * kEventClassMenu / kEventMenuDrawItem
+ *
+ * Summary:
+ * Requests drawing of an entire menu item, including its background.
+ *
+ * Discussion:
+ * Sent by the standard menu definition when a menu item has the
+ * kMenuItemAttrCustomDraw attribute. Handlers for this event should
+ * be installed directly on the menu. A handler for this event may
+ * respond by completely overriding the drawing of the menu item.
+ * The item should be drawn into the current port if using
+ * QuickDraw, or into the provided CGContextRef if using
+ * CoreGraphics. If no handler is installed, the standard menu
+ * definition provides a default handler that calls
+ * DrawThemeMenuItem to draw the menu item background and content.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeMenuRef)
+ * The menu being drawn.
+ *
+ * --> kEventParamCurrentBounds (in, typeQDRectangle)
+ * The bounds of the menu, in global coordinates
+ *
+ * --> kEventParamMenuItemIndex (in, typeMenuItemIndex)
+ * The menu item being drawn.
+ *
+ * --> kEventParamMenuItemBounds (in, typeQDRectangle)
+ * The bounds of the menu item, in local coordinates of the
+ * current port.
+ *
+ * --> kEventParamMenuVirtualTop (in, typeLongInteger)
+ * The virtual top coordinate of the menu, in global
+ * coordinates.
+ *
+ * --> kEventParamMenuVirtualBottom (in, typeLongInteger)
+ * The virtual bottom coordinate of the menu, in global
+ * coordinates.
+ *
+ * --> kEventParamMenuDrawState (in, typeThemeMenuState)
+ * The ThemeMenuState of the menu.
+ *
+ * --> kEventParamMenuItemType (in, typeThemeMenuItemType)
+ * The type of menu item.
+ *
+ * --> kEventParamCGContextRef (in, typeCGContextRef)
+ * The CG context in which the menu item should be drawn. Note
+ * that this context has Cartesian coordinates, with (0,0) at
+ * the bottom left, while the item bounds passed in the event
+ * has QuickDraw coordinates, with (0,0) at the top left. To
+ * align the context coordinates with the item bounds, use the
+ * height of the current port to flip the context with
+ * CGContextTranslateCTM( context, 0, height ) and
+ * CGContextScaleCTM( context, 1, -1 ).
+ *
+ * <-- kEventParamMenuMarkBounds (out, typeQDRectangle)
+ * On exit, contains the bounds of the menu item mark
+ * character. Not present if the item has no mark. Added to
+ * the event by the standard menu definitionÕs handler, if the
+ * event is allowed to pass through.
+ *
+ * <-- kEventParamMenuIconBounds (out, typeQDRectangle)
+ * On exit, contains the bounds of the menu item icon. Not
+ * present if the item has no icon. Added to the event by the
+ * standard menu definitionÕs handler, if the event is allowed
+ * to pass through.
+ *
+ * <-- kEventParamMenuTextBounds (out, typeQDRectangle)
+ * On exit, contains the bounds of the menu itemÕs text. Added
+ * to the event by the standard menu definitionÕs handler, if
+ * the event is allowed to pass through.
+ *
+ * <-- kEventParamMenuTextBaseline (out, typeShortInteger)
+ * On exit, contains the baseline of the menu itemÕs text.
+ * Added to the event by the standard menu definitionÕs
+ * handler, if the event is allowed to pass through.
+ *
+ * <-- kEventParamMenuCommandKeyBounds (out, typeQDRectangle)
+ * On exit, contains the bounds of the menu item command key.
+ * Not present if the item has no command key. Added to the
+ * event by the standard menu definitionÕs handler, if the
+ * event is allowed to pass through.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ }
+const
+ kEventMenuDrawItem = 102;
+
+
+{
+ * kEventClassMenu / kEventMenuDrawItemContent
+ *
+ * Summary:
+ * Requests drawing of a menu itemÕs content: its text, command key,
+ * icon, etc.
+ *
+ * Discussion:
+ * Sent by the standard menu definition when a menu item has the
+ * kMenuItemAttrCustomDraw attribute. Handlers for this event should
+ * be installed directly on the menu. A handler for this event may
+ * respond by overriding the drawing of the menu item content: the
+ * mark character, icon, text, and command key information. At the
+ * time when this event is sent, the background of the menu item has
+ * already been drawn using the standard system appearance, and if
+ * the item is selected, the background is drawn with a hilite. The
+ * item should be drawn into the current port if using QuickDraw, or
+ * into the provided CGContextRef if using CoreGraphics. If no
+ * handler is installed, the standard menu definition provides a
+ * default handler that draws the standard menu item content. The
+ * standard handler also adds event parameters to the event
+ * indicating the bounding boxes of the different portions of the
+ * menu item content (mark, icon, text, and command keys), and an
+ * event parameter with the baseline of the menu item text; this
+ * allows handlers to use CallNextEventHandler to call through to
+ * the standard system handler, and then modify the system
+ * appearance by drawing on top of the standard content.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeMenuRef)
+ * The menu being drawn.
+ *
+ * --> kEventParamMenuItemIndex (in, typeMenuItemIndex)
+ * The menu item being drawn.
+ *
+ * --> kEventParamMenuItemBounds (in, typeQDRectangle)
+ * The bounds of the menu item, in local coordinates of the
+ * current port.
+ *
+ * --> kEventParamDeviceDepth (in, typeShortInteger)
+ * The bit depth of the GDevice on which the menu is being
+ * drawn.
+ *
+ * --> kEventParamDeviceColor (in, typeBoolean)
+ * Whether the GDevice on which the menu is being drawn is in
+ * black&white or color mode.
+ *
+ * --> kEventParamCGContextRef (in, typeCGContextRef)
+ * The CG context in which the menu item should be drawn. Note
+ * that this context has Cartesian coordinates, with (0,0) at
+ * the bottom left, while the item bounds passed in the event
+ * has QuickDraw coordinates, with (0,0) at the top left. To
+ * align the context coordinates with the item bounds, use the
+ * height of the current port to flip the context with
+ * CGContextTranslateCTM( context, 0, height ) and
+ * CGContextScaleCTM( context, 1, -1 ).
+ *
+ * <-- kEventParamMenuMarkBounds (out, typeQDRectangle)
+ * On exit, contains the bounds of the menu item mark
+ * character. Not present if the item has no mark. Added to
+ * the event by the standard menu definitionÕs handler, if the
+ * event is allowed to pass through.
+ *
+ * <-- kEventParamMenuIconBounds (out, typeQDRectangle)
+ * On exit, contains the bounds of the menu item icon. Not
+ * present if the item has no icon. Added to the event by the
+ * standard menu definitionÕs handler, if the event is allowed
+ * to pass through.
+ *
+ * <-- kEventParamMenuTextBounds (out, typeQDRectangle)
+ * On exit, contains the bounds of the menu itemÕs text. Added
+ * to the event by the standard menu definitionÕs handler, if
+ * the event is allowed to pass through.
+ *
+ * <-- kEventParamMenuTextBaseline (out, typeShortInteger)
+ * On exit, contains the baseline of the menu itemÕs text.
+ * Added to the event by the standard menu definitionÕs
+ * handler, if the event is allowed to pass through.
+ *
+ * <-- kEventParamMenuCommandKeyBounds (out, typeQDRectangle)
+ * On exit, contains the bounds of the menu item command key.
+ * Not present if the item has no command key. Added to the
+ * event by the standard menu definitionÕs handler, if the
+ * event is allowed to pass through.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ }
+const
+ kEventMenuDrawItemContent = 103;
+
+{
+ * kEventClassMenu / kEventMenuCalculateSize
+ *
+ * Summary:
+ * Requests that a menu calculate its total size.
+ *
+ * Discussion:
+ * Sent by CalcMenuSize to request that the menu calculate its size.
+ * The Menu Manager provides a default handler for all menus that
+ * calls the menu's MDEF or menu content view to determine the menu
+ * size. Applications will typically not need to handle this event;
+ * a custom menu definition or menu content view should use
+ * kMenuSizeMsg or kEventControlGetOptimalBounds to calculate its
+ * size.
+ *
+ * Note that if the menu uses an MDEF, the MDEF will set the menu's
+ * width and height in response to kMenuSizeMsg. The default handler
+ * for this event saves the old width and height before calling the
+ * MDEF and restores them afterwards. CalcMenuSize will set the
+ * final menu width and height based on the dimensions returned from
+ * this event; applications may override this event to customize the
+ * width or height of a menu by modifying the kEventParamDimensions
+ * parameter.
+ *
+ * This event is sent only to the menu, and is not propagated past
+ * it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeMenuRef)
+ * The menu being measured.
+ *
+ * --> kEventParamControlRef (in, typeControlRef)
+ * If the menu uses a content view, this parameter contains
+ * the HIViewRef that should calculate the menu's size. This
+ * parameter will not be present if the menu uses an MDEF.
+ *
+ * --> kEventParamGDevice (in, typeGDHandle)
+ * If the menu uses an MDEF, this parameter contains the
+ * GDevice on which the menu will be displayed. This parameter
+ * will not be present if the menu uses a content view.
+ *
+ * --> kEventParamAvailableBounds (in, typeQDRectangle)
+ * If the menu uses an MDEF, this parameter contains a
+ * bounding rect in global coordinates inside of which the
+ * menu should be displayed. This parameter is optional and
+ * may not be present in all instances of this event; if not
+ * present, the GDevice's bounds should be used instead. This
+ * parameter will not be present if the menu uses a content
+ * view.
+ *
+ * <-- kEventParamDimensions (out, typeHISize)
+ * On exit, contains the menu's size.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventMenuCalculateSize = 1004;
+
+{
+ * kEventClassMenu / kEventMenuCreateFrameView
+ *
+ * Summary:
+ * Requests that a menu content view create the HIView that will
+ * used to draw the menu window frame.
+ *
+ * Discussion:
+ * The HIMenuView class provides a default handler for this event
+ * that creates an instance of the standard menu window frame view.
+ *
+ *
+ * This event is sent only to the menu content view, and is not
+ * propagated past the view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamEventRef (in, typeEventRef)
+ * The initialization event that should be used to create the
+ * view. A handler for this event may add its own parameters
+ * to this event.
+ *
+ * --> kEventParamMenuType (in, typeThemeMenuType)
+ * The type of menu frame (pull-down, popup, or hierarchical)
+ * that is needed.
+ *
+ * <-- kEventParamMenuFrameView (out, typeControlRef)
+ * On exit, contains the newly created menu frame view.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventMenuCreateFrameView = 1005;
+
+{
+ * kEventClassMenu / kEventMenuGetFrameBounds
+ *
+ * Summary:
+ * Requests that a menu content view calculate the bounding rect, in
+ * global coordinates, of the menu window frame that should contain
+ * the menu.
+ *
+ * Discussion:
+ * This event is sent by the Menu Manager before displaying
+ * pull-down, popup, and hierarchical menus. It provides an
+ * opportunity for the menu content view to determine the position
+ * of the menu frame based on the position of the menu title, parent
+ * menu item, or popup menu location.
+ *
+ * The HIMenuView class provides a default handler for this event
+ * that calculates an appropriate location based on the bounds of
+ * the menu, the available screen space, and the frame metrics of
+ * the menu window content view.
+ *
+ * This event is sent only to the menu content view, and is not
+ * propagated past the view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamMenuType (in, typeThemeMenuType)
+ * The type of menu (pull-down, popup, or hierarchical) that
+ * is being displayed.
+ *
+ * --> kEventParamMenuIsPopup (in, typeBoolean)
+ * Whether this menu originated from a popup menu. Primarily
+ * useful to distinguish between hierarchical menus that are
+ * submenus of pull-down menus, and hierarchical menus that
+ * are submenus of popup menus.
+ *
+ * --> kEventParamMenuFrameView (in, typeControlRef)
+ * The menu window frame view.
+ *
+ * --> kEventParamMenuDirection (in, typeMenuDirection)
+ * The suggested direction (left or right) which the view
+ * should attempt to use when positioning the menu window. For
+ * pull-down menus, this will typically be
+ * kHIMenuRightDirection; for hierarchical menus, it will be
+ * the same direction as the parent menu.
+ *
+ * --> kEventParamMenuItemBounds (in, typeHIRect)
+ * The bounds, in global coordinates, of the parent menu title
+ * (for pull-down menus), the parent menu item (for
+ * hierarchical menus), or the popup location (for popup
+ * menus).
+ *
+ * --> kEventParamGDevice (in, typeGDHandle)
+ * The GDevice on which the menu should be displayed.
+ *
+ * --> kEventParamAvailableBounds (in, typeHIRect)
+ * The available bounds, in global coordinates, inside which
+ * the menu should be displayed. The menu should not extend
+ * outside of these bounds.
+ *
+ * --> kEventParamParentMenu (in, typeMenuRef)
+ * Only available when kEventParamMenuType is
+ * kThemeMenuTypeHierarchical. The parent menu of this menu.
+ *
+ * --> kEventParamParentMenuItem (in, typeMenuItemIndex)
+ * Only available when kEventParamMenuType is
+ * kThemeMenuTypeHierarchical. The parent menu item of this
+ * menu.
+ *
+ * --> kEventParamMenuPopupItem (in, typeMenuItemIndex)
+ * Only available when kEventParamMenuType is
+ * kThemeMenuTypePopUp. The item in the menu that should be
+ * positioned at the popup location, or zero if no item should
+ * be positioned there.
+ *
+ * <-- kEventParamBounds (out, typeHIRect)
+ * On exit, contains the bounding rect, in global coordinates,
+ * of the menu window. The handler should add this parameter
+ * to the event.
+ *
+ * <-- kEventParamOrigin (out, typeHIPoint)
+ * On exit, contains the origin to which the menu content view
+ * should be scrolled before the menu is displayed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventMenuGetFrameBounds = 1006;
+
+{
+ * kEventClassMenu / kEventMenuBecomeScrollable
+ *
+ * Summary:
+ * Requests that a menu content view prepare to be scrollable, by
+ * installing the appropriate event handlers, timers, etc.
+ *
+ * Discussion:
+ * This event is sent by the Menu Manager when a menu becomes the
+ * most recently opened menu in the menu hierarchy. It is an
+ * indication that this menu content view is now a candidate for
+ * scrolling.
+ *
+ * The Menu Manager provides a default handler for this event that
+ * installs event handlers to provide automatic scrolling behavior
+ * for HIView-based menus.
+ *
+ * If a menu content view does not wish to use the Menu Manager's
+ * default scrolling support, it can override this event and return
+ * noErr to prevent the event from being propagated to the Menu
+ * Manager's default handler.
+ *
+ * This event is sent only to the menu content view, and is not
+ * propagated past the view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventMenuBecomeScrollable = 1007;
+
+{
+ * kEventClassMenu / kEventMenuCeaseToBeScrollable
+ *
+ * Summary:
+ * Requests that a menu content view cease to be scrollable.
+ *
+ * Discussion:
+ * This event is sent by the Menu Manager when a menu ceases to be
+ * the most recently opened menu. This occurs when the menu is
+ * closed, or when a submenu of the most recently opened menu is
+ * opened. It is an indication that this menu content view is no
+ * longer a candidate for scrolling.
+ *
+ * The Menu Manager provides a default handler for this event that
+ * removes event handlers installed in response to
+ * kEventMenuBecomeScrollable.
+ *
+ * This event is sent only to the menu content view, and is not
+ * propagated past the view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventMenuCeaseToBeScrollable = 1008;
+
+{
+ * kEventClassMenu / kEventMenuBarShown
+ *
+ * Summary:
+ * Notification that the menubar in the frontmost process has been
+ * shown.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. This event
+ * will be sent to registered handlers in all processes when the
+ * front process shows its menubar. This event is sent only to the
+ * application target.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventMenuBarShown = 2000;
+
+{
+ * kEventClassMenu / kEventMenuBarHidden
+ *
+ * Summary:
+ * Notification that the menubar in the frontmost process has been
+ * hidden.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. This event
+ * will be sent to registered handlers in all processes when the
+ * front process hides its menubar. This event is sent only to the
+ * application target.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventMenuBarHidden = 2001;
+
+{--------------------------------------------------------------------------------------}
+{ Command Events }
+{--------------------------------------------------------------------------------------}
+{
+ kEventClassCommand quick reference:
+
+ kEventCommandProcess = 1,
+ kEventCommandUpdateStatus = 2
+}
+{
+ * kEventClassCommand / kEventCommandProcess
+ *
+ * Summary:
+ * A command has been invoked and the application should handle it.
+ *
+ * Discussion:
+ * This event is sent when the user chooses a menu item or clicks a
+ * control. Any menu item selection, from either the menubar, a
+ * popup or contextual menu, or a popup or bevel button control,
+ * will cause this event to be sent; if the menu item does not have
+ * a command ID, the commandID field of the HICommand parameter will
+ * be zero, but the event will still contain a valid MenuRef and
+ * MenuItemIndex. Controls will send this event only if the control
+ * has a non-zero command ID set with SetControlCommandID.
+ *
+ * Some senders of this event will also include the modifier keys
+ * that were pressed by the user when the command was invoked, but
+ * this parameter is optional and may not be present in all
+ * instances of this event.
+ *
+ * When a command event is sent from a menu, a MenuContext parameter
+ * will be included on Mac OS X 10.2 and CarbonLib 1.6, indicating
+ * whether the command was sent from a menu in the menubar
+ * (kMenuContextMenuBar will be set) or from a popup menu
+ * (kMenuContextMenuBar will not be set). The MenuContext parameter
+ * also indicates whether the event was sent by a selection of a
+ * menu item with the mouse (kMenuContextMenuBarTracking or
+ * kMenuContextPopUpTracking will be set), or by a command key press
+ * (kMenuContextKeyMatching will be set). If you need to determine
+ * the source of a command event on a Carbon release prior to Mac OS
+ * X 10.2 or CarbonLib 1.6, we recommend installing a
+ * kEventMenuEnableItems handler on each menu and caching the
+ * MenuContext parameter in the EnableItems event in a menu
+ * property; when you receive the CommandProcess event, look up the
+ * cached MenuContext.
+ *
+ * It is essential that your event handler for this event return
+ * eventNotHandledErr for any command events that you do not handle,
+ * especially for commands that are sent from menus attached to
+ * popup or bevel button controls; if, for example, you return noErr
+ * for command events sent in response to a menu selection from a
+ * popup button, the Menu Manager will return zero from
+ * PopUpMenuSelect, and the popup button control will not know that
+ * an item was selected from the popup menu and will not redraw with
+ * the new selection.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeHICommand)
+ * The command to be handled.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the command
+ * was invoked by the user. This parameter is optional and may
+ * not be present in all instances of this event.
+ *
+ * --> kEventParamMenuContext (in, typeUInt32)
+ * If the command was contained in a menu, information about
+ * the menu. This parameter is optional and may not be present
+ * in all instances of this event. Available in Mac OS X 10.2
+ * and CarbonLib 1.6, and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventCommandProcess = 1;
+
+{
+ * kEventClassCommand / kEventCommandUpdateStatus
+ *
+ * Summary:
+ * A command-generating user interface element requires updating.
+ *
+ * Discussion:
+ * When you receive this event, you should update the necessary UI
+ * elements in your application to reflect the current status of the
+ * command. For example, if the command has the kHICommandFromMenu
+ * bit set, you should update the menu item state, menu item text,
+ * and so on, to reflect the current reality in your application. If
+ * the menu item is the "Undo" item, and the last editing change to
+ * the document was a Cut operation, then you might set the text to
+ * "Undo Cut" and enable the menu item.
+ *
+ * Currently, this event is only sent for menu items; it is not used
+ * to update the status of controls.
+ *
+ * Note that when responding to this event, you should only update
+ * the status of the single user interface element (a menu item, for
+ * example) described by the HICommand structure; you should not
+ * update the status of the entire menu or of all menus in the
+ * menubar. You will receive a separate UpdateStatus event for each
+ * menu item in a menu, and each item should be updated
+ * individually. When updating a menu item, you should generally not
+ * use Enable/DisableMenuCommand; these APIs search the entire menu
+ * hierarchy for the command ID. Instead, just call
+ * Enable/DisableMenuItem directly, passing the menu and menu item
+ * index that are provided to you in the HICommand structure.
+ *
+ *
+ * You may wish to optimize your handling of the UpdateStatus event
+ * by examining the MenuContext parameter to the event. This
+ * parameter indicates the context in which the command requires
+ * updating. For example, if the menu context parameter has the
+ * kMenuContextKeyMatching bit set, you know that the update request
+ * is being sent in while search for a menu item that matches a
+ * command key. This knowledge can help you avoid unnecessary work;
+ * if your menu item for this command has no command key, for
+ * example, you can ignore this event when the KeyMatching bit is
+ * set because your menu item will never match a command key
+ * anyways, regardless of whether it is enabled or disabled.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeHICommand)
+ * The command to be updated.
+ *
+ * --> kEventParamMenuContext (in, typeUInt32)
+ * If the command was contained in a menu, information about
+ * the menu and the context of the command updating request.
+ * This parameter is optional and may not be present in all
+ * instances of this event.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventCommandUpdateStatus = 2;
+
+{ HI Commands }
+
+{
+ * Summary:
+ * Common command IDs
+ }
+const
+{
+ * The OK button in a dialog or alert.
+ }
+ kHICommandOK = $6F6B2020 (* 'ok ' *);
+
+ {
+ * The Cancel button in a dialog or alert.
+ }
+ kHICommandCancel = $6E6F7421 (* 'not!' *);
+
+ {
+ * The application should quit.
+ }
+ kHICommandQuit = $71756974 (* 'quit' *);
+
+ {
+ * The last editing operation should be undone.
+ }
+ kHICommandUndo = $756E646F (* 'undo' *);
+
+ {
+ * The last editing operation should be redone.
+ }
+ kHICommandRedo = $7265646F (* 'redo' *);
+
+ {
+ * The selected items should be cut.
+ }
+ kHICommandCut = $63757420 (* 'cut ' *);
+
+ {
+ * The selected items should be copied.
+ }
+ kHICommandCopy = $636F7079 (* 'copy' *);
+
+ {
+ * The contents of the clipboard should be pasted.
+ }
+ kHICommandPaste = $70617374 (* 'past' *);
+
+ {
+ * The selected items should be deleted.
+ }
+ kHICommandClear = $636C6561 (* 'clea' *);
+
+ {
+ * All items in the active window should be selected.
+ }
+ kHICommandSelectAll = $73616C6C (* 'sall' *);
+
+ {
+ * The application should be hidden. The Menu Manager will respond to
+ * this command automatically; your application does not need to
+ * handle it.
+ }
+ kHICommandHide = $68696465 (* 'hide' *);
+
+ {
+ * Other applications should be hidden. The Menu Manager will respond
+ * to this command automatically; your application does not need to
+ * handle it.
+ }
+ kHICommandHideOthers = $6869646F (* 'hido' *);
+
+ {
+ * All applications should become visible. The Menu Manager will
+ * respond to this command automatically; your application does not
+ * need to handle it.
+ }
+ kHICommandShowAll = $7368616C (* 'shal' *);
+
+ {
+ * The Preferences menu item has been selected.
+ }
+ kHICommandPreferences = $70726566 (* 'pref' *);
+
+ {
+ * The active window should be zoomed in or out. The default
+ * application handler will respond to this event automatically; your
+ * application does not need to handle it, but you may want to
+ * install a Carbon event handler for kEventWindowGetIdealSize to
+ * return the ideal size for your document windows.
+ }
+ kHICommandZoomWindow = $7A6F6F6D (* 'zoom' *);
+
+ {
+ * The active window should be minimized. The default application
+ * handler will respond to this event automatically; your application
+ * does not need to handle it.
+ }
+ kHICommandMinimizeWindow = $6D696E69 (* 'mini' *);
+
+ {
+ * All collapsable windows should be minimized. The default
+ * application handler will respond to this event automatically; your
+ * application does not need to handle it.
+ }
+ kHICommandMinimizeAll = $6D696E61 (* 'mina' *);
+
+ {
+ * The active window should be maximized. Only sent on Mac OS 9. The
+ * default application handler will respond to this event
+ * automatically; your application does not need to handle it.
+ }
+ kHICommandMaximizeWindow = $6D617869 (* 'maxi' *);
+
+ {
+ * All collapsable windows should be maximized. This command is not
+ * sent or handled on Mac OS X.
+ }
+ kHICommandMaximizeAll = $6D617861 (* 'maxa' *);
+
+ {
+ * All document-class windows should be arranged in a stack. The
+ * default application handler will respond to this event
+ * automatically; your application does not need to handle it.
+ }
+ kHICommandArrangeInFront = $66726E74 (* 'frnt' *);
+
+ {
+ * All windows of this application should be brought in front of
+ * windows from other applications. Only sent on Mac OS X. The
+ * default application handler will respond to this event
+ * automatically; your application does not need to handle it.
+ }
+ kHICommandBringAllToFront = $62667274 (* 'bfrt' *);
+
+ {
+ * This command ID is used as a placeholder to mark the separator
+ * item dividing the Zoom/Minimize/Maximize/Arrange menu items in the
+ * standard Window menu from the menu items listing the visible
+ * windows. If you need to add your own menu items to the standard
+ * Window menu before the window list section, you can look for the
+ * menu item with this command ID using GetIndMenuItemWithCommandID,
+ * and insert your menu items before the item with this ID.
+ }
+ kHICommandWindowListSeparator = $776C6476 (* 'wldv' *);
+
+ {
+ * This command ID is used as a placeholder to mark the end of the
+ * window list section of the standard Window menu. If you need to
+ * add your own menu items to the standard Window menu after the
+ * window list section, you can look for the menu item with this
+ * command ID using GetIndMenuItemWithCommandID, and insert your
+ * items after the item with this ID.
+ }
+ kHICommandWindowListTerminator = $776C7374 (* 'wlst' *);
+
+ {
+ * A window in the standard Window menu has been selected and should
+ * be activated. In Mac OS X 10.3, this command is also sent by the
+ * toolbox whenever it needs to activate a window in your
+ * application; for example, it is used when a window is selected
+ * from the application's Dock menu, and when a window that uses the
+ * standard window event handler is clicked. The default application
+ * handler will respond to this event automatically; your application
+ * does not need to handle it.
+ }
+ kHICommandSelectWindow = $7377696E (* 'swin' *);
+
+ {
+ * The Rotate Windows hotkey (cmd-~ by default) has been pressed, and
+ * non-floating windows should be rotated so that the window after
+ * the active window is activated. The default application handler
+ * will respond to this event automatically; your application does
+ * not need to handle it.
+ }
+ kHICommandRotateWindowsForward = $726F7477 (* 'rotw' *);
+
+ {
+ * The Rotate Windows hotkey (cmd-~ by default) has been pressed, and
+ * non-floating windows should be rotated so that the window before
+ * the active window is activated. The default application handler
+ * will respond to this event automatically; your application does
+ * not need to handle it.
+ }
+ kHICommandRotateWindowsBackward = $726F7462 (* 'rotb' *);
+
+ {
+ * The floating window focus hotkey (ctl-F6 by default) has been
+ * pressed, and floating windows should be rotated so that the window
+ * after the focused window is activated. The default application
+ * handler will respond to this event automatically; your application
+ * does not need to handle it.
+ }
+ kHICommandRotateFloatingWindowsForward = $72746677 (* 'rtfw' *);
+
+ {
+ * The floating window focus hotkey (ctl-F6 by default) has been
+ * pressed, and floating windows should be rotated so that the window
+ * before the focused window is activated. The default application
+ * handler will respond to this event automatically; your application
+ * does not need to handle it.
+ }
+ kHICommandRotateFloatingWindowsBackward = $72746662 (* 'rtfb' *);
+
+ {
+ * The About menu item has been selected. In Mac OS X 10.3 and later,
+ * RunApplicationEventLoop installs a handler for this command ID on
+ * the application target, and will handle this event automatically
+ * by calling HIAboutBox. Your application may install its own
+ * handler if it wishes to display a customized about box.
+ }
+ kHICommandAbout = $61626F75 (* 'abou' *);
+
+ {
+ * A new document or item should be created.
+ }
+ kHICommandNew = $6E657720 (* 'new ' *);
+
+ {
+ * The user wants to open an existing document.
+ }
+ kHICommandOpen = $6F70656E (* 'open' *);
+
+ {
+ * The active window should be closed. This command would typically
+ * be generated by a Close menu item. On Mac OS X 10.3 and later, the
+ * default application handler responds to this command by sending a
+ * kEventWindowClose event; on earlier systems, only the standard
+ * window event handler responded to this event.
+ }
+ kHICommandClose = $636C6F73 (* 'clos' *);
+
+ {
+ * The active document should be saved.
+ }
+ kHICommandSave = $73617665 (* 'save' *);
+
+ {
+ * The user wants to save the active document under a new name.
+ }
+ kHICommandSaveAs = $73766173 (* 'svas' *);
+
+ {
+ * The contents of the active document should be reverted to the last
+ * saved version.
+ }
+ kHICommandRevert = $72767274 (* 'rvrt' *);
+
+ {
+ * The active window should be printed.
+ }
+ kHICommandPrint = $70726E74 (* 'prnt' *);
+
+ {
+ * The user wants to configure the current page margins, formatting,
+ * and print options.
+ }
+ kHICommandPageSetup = $70616765 (* 'page' *);
+
+ {
+ * The applicationÕs help book should be displayed. Used by the Help
+ * Manager when it adds the "<AppName> Help" menu item to the Help
+ * menu. The Help Manager installs a handler for this command ID on
+ * the Help menu returned by HMGetHelpMenu, and will respond to this
+ * event automatically; your application does not need to handle it.
+ }
+ kHICommandAppHelp = $61686C70 (* 'ahlp' *);
+
+ {
+ * The character palette needs to be shown. Events with this command
+ * ID are only generated in Mac OS X 10.3 and later. The toolbox will
+ * respond to this event automatically; your application does not
+ * need to handle it.
+ }
+ kHICommandShowCharacterPalette = $63687270 (* 'chrp' *);
+
+ {
+ * Display the spelling panel if it is not already visible. Events
+ * with this command ID are only generated in Mac OS X 10.4 and
+ * later. If spell checking has been enabled in MLTE or an
+ * HITextView then this command is handled automatically.
+ }
+ kHICommandShowSpellingPanel = $73687370 (* 'shsp' *);
+
+ {
+ * Spell check the document now. Events with this command ID are
+ * only generated in Mac OS X 10.4 and later. If spell checking has
+ * been enabled in MLTE or an HITextView then this command is handled
+ * automatically.
+ }
+ kHICommandCheckSpelling = $636B7370 (* 'cksp' *);
+ kHICommandChangeSpelling = $63687370 (* 'chsp' *);
+
+ {
+ * Begin interactive spell checking. Events with this command ID are
+ * only generated in Mac OS X 10.4 and later. If spell checking has
+ * been enabled in MLTE or an HITextView then this command is handled
+ * automatically.
+ }
+ kHICommandCheckSpellingAsYouType = $61737063 (* 'aspc' *);
+
+ {
+ * Ignore this word while spell checking this text view. Events with
+ * this command ID are only generated in Mac OS X 10.4 and later. If
+ * spell checking has been enabled in MLTE or an HITextView then this
+ * command is handled automatically.
+ }
+ kHICommandIgnoreSpelling = $69677370 (* 'igsp' *);
+
+ {
+ * Learn this spelling for all documents. Events with this command
+ * ID are only generated in Mac OS X 10.4 and later. If spell
+ * checking has been enabled in MLTE or an HITextView then this
+ * command is handled automatically.
+ }
+ kHICommandLearnWord = $6C727764 (* 'lrwd' *);
+
+
+{
+ * Summary:
+ * Values for the attributes field of the HICommand and
+ * HICommandExtended structures.
+ *
+ * Discussion:
+ * These bit masks are mutually exclusive; only one should be set at
+ * any given time. Some HICommand and HICommandExtended structures
+ * will have an attributes value of zero; in this case, there is no
+ * information available about the source of the command.
+ }
+const
+{
+ * Indicates that the command originates from a menu item. The
+ * HICommand.menu and HICommandExtended.source.menu fields are valid.
+ }
+ kHICommandFromMenu = 1 shl 0;
+
+ {
+ * Indicates that the command originates from a control. The
+ * HICommandExtended.source.control field is valid.
+ }
+ kHICommandFromControl = 1 shl 1;
+
+ {
+ * Indicates that the command originates from a window. The
+ * HICommandExtended.source.window field is valid.
+ }
+ kHICommandFromWindow = 1 shl 2;
+
+type
+ HICommand = record
+ attributes: UInt32;
+ commandID: UInt32;
+ menuRef: MenuRef_fix;
+ menuItemIndex: MenuItemIndex_fix;
+ end;
+ HICommandPtr = ^HICommand;
+type
+ HICommandExtended = record
+ attributes: UInt32;
+ commandID: UInt32;
+ case SInt16 of
+ 0: (
+ control: ControlRef;
+ );
+ 1: (
+ window: WindowRef;
+ );
+ 2: (
+ menuRef: MenuRef_fix;
+ menuItemIndex: MenuItemIndex_fix;
+ );
+ end;
+ HICommandExtendedPtr = ^HICommandExtended;
+{--------------------------------------------------------------------------------------}
+{ Control Events }
+{--------------------------------------------------------------------------------------}
+
+{
+ kEventClassControl quick reference:
+
+ // lifespan
+ kEventControlInitialize = 1000,
+ kEventControlDispose = 1001,
+ kEventControlGetOptimalBounds = 1003,
+ kEventControlDefInitialize = kEventControlInitialize,
+ kEventControlDefDispose = kEventControlDispose,
+
+ // event handling
+ kEventControlHit = 1,
+ kEventControlSimulateHit = 2,
+ kEventControlHitTest = 3,
+ kEventControlDraw = 4,
+ kEventControlApplyBackground = 5,
+ kEventControlApplyTextColor = 6,
+ kEventControlSetFocusPart = 7,
+ kEventControlGetFocusPart = 8,
+ kEventControlActivate = 9,
+ kEventControlDeactivate = 10,
+ kEventControlSetCursor = 11,
+ kEventControlContextualMenuClick = 12,
+ kEventControlClick = 13,
+ kEventControlGetNextFocusCandidate = 14,
+ kEventControlGetAutoToggleValue = 15,
+ kEventControlInterceptSubviewClick = 16,
+ kEventControlGetClickActivation = 17,
+ kEventControlDragEnter = 18,
+ kEventControlDragWithin = 19,
+ kEventControlDragLeave = 20,
+ kEventControlDragReceive = 21,
+ kEventControlInvalidateForSizeChange = 22,
+ kEventControlTrackingAreaEntered = 23, // in HIView.h
+ kEventControlTrackingAreaExited = 24, // in HIView.h
+
+ // tracking
+ kEventControlTrack = 51,
+ kEventControlGetScrollToHereStartPoint = 52,
+ kEventControlGetIndicatorDragConstraint = 53,
+ kEventControlIndicatorMoved = 54,
+ kEventControlGhostingFinished = 55,
+ kEventControlGetActionProcPart = 56,
+
+ // accessors
+ kEventControlGetPartRegion = 101,
+ kEventControlGetPartBounds = 102,
+ kEventControlSetData = 103,
+ kEventControlGetData = 104,
+ kEventControlGetSizeConstraints = 105,
+ kEventControlGetFrameMetrics = 106,
+
+ // notification
+ kEventControlValueFieldChanged = 151,
+ kEventControlAddedSubControl = 152,
+ kEventControlRemovingSubControl = 153,
+ kEventControlBoundsChanged = 154,
+ kEventControlVisibilityChanged = 157,
+ kEventControlTitleChanged = 158,
+ kEventControlOwningWindowChanged = 159,
+ kEventControlHiliteChanged = 160,
+ kEventControlEnabledStateChanged = 161,
+ kEventControlLayoutInfoChanged = 162,
+
+ // miscellaneous
+ kEventControlArbitraryMessage = 201
+}
+
+{
+ * kEventClassControl / kEventControlClick
+ *
+ * Summary:
+ * A mouse down event occurred over a control.
+ *
+ * Discussion:
+ * This event is sent when a non-contextual-menu click occurs over a
+ * control; a contextual menu click generates
+ * kEventControlContextualMenuClick instead.
+ *
+ * The handler of this event is responsible for two things: first,
+ * the handler must set the keyboard focus to the control if the
+ * control takes focus on clicks; look for the
+ * kControlGetsFocusOnClick feature bit and call an API such as
+ * SetKeyboardFocus. Second, the handler must call one of the
+ * control tracking APIs: HIViewClick, HandleControlClick, or
+ * TrackControl. The standard window handler does both of these
+ * things.
+ *
+ * Warning: Beware of handling kEventControlClick events! This is
+ * usually NOT the event you really want to handle.
+ * kEventControlClick is a request to "please click this control,"
+ * not "allow a control definition to track the mouse." If you are
+ * implementing or overriding a control definitionÕs or HIViewÕs
+ * support for tracking the mouse, you should handle
+ * kEventControlTrack instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that was clicked.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3.1 and later
+ }
+const
+ kEventControlClick = 13;
+
+{
+ * kEventClassControl / kEventControlHit
+ *
+ * Summary:
+ * Sent by TrackControl and HandleControlClick after handling a
+ * click in a control.
+ *
+ * Discussion:
+ * This event indicates that a control has been manipulated by the
+ * user and that the user released the mouse button over some part
+ * of the control. It is sent automatically by the Control Manager
+ * when the control tracking code returns a non-zero part
+ * code.
+ *
+ * You might want to handle this event in a custom control
+ * definition if your control definition has special behavior after
+ * the control has been tracked. You can also handle this event in
+ * application code, to be notified after a control has been
+ * tracked; however, from the application level, it is generally
+ * preferred to provide a command ID for the control and handle
+ * kEventCommandProcess instead of kEventControlHit. Handling
+ * kEventCommandProcess is more generic and allows the same code to
+ * handle events from both controls and menu items.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that was tracked.
+ *
+ * --> kEventParamControlPart (in, typeControlPartCode)
+ * The control part that the mouse was over when it was
+ * released.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the mouse was
+ * released.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ }
+const
+ kEventControlHit = 1;
+
+{
+ * kEventClassControl / kEventControlInitialize
+ *
+ * Summary:
+ * Allows the control to initialize private data.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that is being created.
+ *
+ * --> kEventParamInitCollection (in, typeCollection)
+ * Initialization data supplied to CreateCustomControl.
+ *
+ * <-- kEventParamControlFeatures (out, typeUInt32)
+ * On exit, your event handler should supply the control
+ * features flags. NOTE: On Mac OS X 10.3 and later, this is
+ * deprecated in favor of using the HIViewChangeFeatures API.
+ * Instead of supplying this parameter, just call
+ * HIViewChangeFeatures. Also, this parameter can only be used
+ * to supply features for the original kControlFoo features,
+ * not the new kHIViewFoo features.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlInitialize = 1000;
+
+{
+ * kEventClassControl / kEventControlDispose
+ *
+ * Summary:
+ * Allows the control to dispose of private data.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that is being destroyed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlDispose = 1001;
+
+{
+ * kEventClassControl / kEventControlGetOptimalBounds
+ *
+ * Summary:
+ * Allows the control to report its best size and its text baseline
+ * based on its current settings.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control whose optimal bounds to return.
+ *
+ * <-- kEventParamControlOptimalBounds (out, typeHIRect)
+ * On exit, contains the controlÕs optimal bounds.
+ *
+ * <-- kEventParamControlOptimalBaselineOffset (out, typeShortInteger)
+ * On exit, contains the controlÕs optimal baseline offset:
+ * the distance from the top of the controlÕs optimal bounds
+ * to the baseline of the control text, if any. This parameter
+ * is optional and does not need to be provided if it doesnÕt
+ * apply for your control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlGetOptimalBounds = 1003;
+
+{
+ * kEventClassControl / kEventControlSimulateHit
+ *
+ * Summary:
+ * Sent when your control should simulate a click in response to
+ * some other action, such as a return key for a default button.
+ *
+ * Discussion:
+ * Note that this event is solely meant to provide visual feedback
+ * that a control was clicked. For example, the push button control
+ * hilites itself briefly in response to this event. This event does
+ * not cause other events (such as kEventControlHit or
+ * kEventCommandProcess) to be sent. To fully simulate the results
+ * of clicking on a control, you can use the HIViewSimulateClick
+ * API, which sends a kEventControlSimulateHit event and also sends
+ * the kEventControlHit and kEventCommandProcess events that would
+ * normally result from a click on a control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control for which a hit should be simulated.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that should be used for the
+ * simulated hit.
+ *
+ * <-> kEventParamControlPart (in/out, typeControlPartCode)
+ * On entry, contains the part code for which the control
+ * should simulate a hit. On exit, the control may modify this
+ * parameter to reflect the same sort of part code that it
+ * would pass back while handling kEventControlTrack.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlSimulateHit = 2;
+
+{
+ * kEventClassControl / kEventControlHitTest
+ *
+ * Summary:
+ * Sent when someone wants to find out what part of your control is
+ * at a given point in local coordinates.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control to hit-test.
+ *
+ * --> kEventParamMouseLocation (in, typeQDPoint)
+ * The point to hit-test. For controls in non-compositing
+ * windows, this coordinate is in local coordinates of the
+ * owning window; for controls in compositing windows, this
+ * coordinate is in view-local coordinates.
+ *
+ * <-- kEventParamControlPart (out, typeControlPartCode)
+ * On exit, contains the part code of the control part that
+ * was hit, or kControlNoPart if no part was hit.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlHitTest = 3;
+
+{
+ * kEventClassControl / kEventControlDraw
+ *
+ * Summary:
+ * Sent when your control should draw itself. The event can
+ * optionally contain a port in which to draw and a part to
+ * constrain drawing to.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control to be drawn.
+ *
+ * --> kEventParamControlPart (in, typeControlPartCode)
+ * The control part code to draw. This parameter is optional
+ * and may not be present in all instances of this event. Draw
+ * the entire control if the parameter is not present.
+ *
+ * --> kEventParamGrafPort (in, typeGrafPtr)
+ * The GrafPort into which to draw the control. This parameter
+ * is optional and may not be present in all instances of this
+ * event. Draw into the current port if the parameter is not
+ * present.
+ *
+ * --> kEventParamRgnHandle (in, typeQDRgnHandle)
+ * A region describing the area that needs to be redrawn; you
+ * may constrain your drawing to this region. This parameter
+ * is only provided on Mac OS X 10.2 and later, and only in
+ * certain situations in compositing mode (when the view is
+ * visible, etc). Draw the entire control if the parameter is
+ * not present.
+ *
+ * --> kEventParamShape (in, typeHIShapeRef)
+ * An HIShapeRef describing the area that needs to be redrawn;
+ * you may constrain your drawing to this area. This parameter
+ * is only provided on Mac OS X 10.4 and later, and only in
+ * certain situations in compositing mode (when the view is
+ * visible, etc). Draw the entire control if the parameter is
+ * not present.
+ *
+ * --> kEventParamCGContextRef (in, typeCGContextRef)
+ * The CGContext into which to draw the control. This
+ * parameter is only provided on Mac OS X 10.2 and later, and
+ * only when the owning window uses compositing mode. The
+ * context is already transformed and clipped appropriately
+ * for view-local drawing. If this parameter is present, you
+ * should always use it; this will be extremely important to
+ * allow printing of controls. If this parameter is not
+ * present (prior to Mac OS X 10.2, or in a non-compositing
+ * window), and you want to draw with CoreGraphics, you can
+ * create your own CGContext with QDBeginCGContext.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlDraw = 4;
+
+{
+ * kEventClassControl / kEventControlApplyBackground
+ *
+ * Summary:
+ * Sent when your control should apply its background color or
+ * pattern to the specified port so that subcontrols of this control
+ * can properly erase.
+ *
+ * Discussion:
+ * This event is used for non-composited control drawing. When an
+ * embedded control in a non-composited window draws, it first
+ * erases its bounding rect. Before calling EraseRect or EraseRgn,
+ * the control calls SetUpControlBackground, which sends this event
+ * to parent controls of the embedded control that have the
+ * kControlHasSpecialBackground feature flag. An embedding control
+ * may respond to this event by setting the background color or
+ * pattern of the specified GrafPort; this color or pattern will
+ * then be used by the embedded control when it erases its
+ * bounds.
+ *
+ * Note that an embedding control should not actually draw its
+ * background in response to this event; doing so would not have any
+ * effect, because the embedded control will erase any drawing
+ * shortly anyways.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control which should apply a background color or
+ * pattern.
+ *
+ * --> kEventParamControlSubControl (in, typeControlRef)
+ * The subcontrol that is about to draw.
+ *
+ * --> kEventParamControlDrawDepth (in, typeShortInteger)
+ * The bit depth of the GDevice on which the subcontrol will
+ * be drawn.
+ *
+ * --> kEventParamControlDrawInColor (in, typeBoolean)
+ * Whether the GDevice on which the subcontrol will be drawn
+ * is in color or black & white.
+ *
+ * --> kEventParamGrafPort (in, typeGrafPtr)
+ * The port to which the background color or pattern should be
+ * applied. This parameter is optional and may not be present
+ * in all instances of this event. Apply the background to the
+ * current port if this parameter is not present.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlApplyBackground = 5;
+
+{
+ * kEventClassControl / kEventControlApplyTextColor
+ *
+ * Summary:
+ * Sent when your control should apply a color or pattern to the
+ * specified port and context so a subcontrol can draw text which
+ * looks appropriate for your controlÕs background.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control which should apply a text color.
+ *
+ * --> kEventParamControlSubControl (in, typeControlRef)
+ * The subcontrol that is about to draw.
+ *
+ * --> kEventParamControlDrawDepth (in, typeShortInteger)
+ * The bit depth of the GDevice on which the subcontrol will
+ * be drawn.
+ *
+ * --> kEventParamControlDrawInColor (in, typeBoolean)
+ * Whether the GDevice on which the subcontrol will be drawn
+ * is in color or black & white.
+ *
+ * --> kEventParamCGContextRef (in, typeCGContextRef)
+ * The CGContext to which the text color should be applied.
+ * This parameter is optional and may not be present in all
+ * instances of this event.
+ *
+ * --> kEventParamGrafPort (in, typeGrafPtr)
+ * The GrafPort to which the text color should be applied.
+ * This parameter is optional and may not be present in all
+ * instances of this event. Apply to the current port if this
+ * parameter is not present.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlApplyTextColor = 6;
+
+{
+ * kEventClassControl / kEventControlGetNextFocusCandidate
+ *
+ * Summary:
+ * Sent so that a given control can customize the focus order of its
+ * subcontrols.
+ *
+ * Discussion:
+ * The recipient will receive a start subcontrol in the
+ * kEventParamStartControl parameter and a focusing direction in the
+ * kEventParamControlPart parameter. You must only pass back
+ * subcontrols of yourself (or NULL) when receiving this event; if
+ * you do otherwise, the Control ManagerÕs behavior is undefined.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control which should customize the focus order.
+ *
+ * --> kEventParamControlPart (in, typeControlPartCode)
+ * A focusing meta-part code, either kControlFocusNextPart or
+ * kControlFocusPrevPart.
+ *
+ * --> kEventParamStartControl (in, typeControlRef)
+ * On exit, should contain the next or previous subcontrol; if
+ * there is no next subcontrol in the given focusing
+ * direction, the recipient must either exclude the
+ * kEventParamNextControl parameter or set it to NULL
+ *
+ * <-- kEventParamNextControl (out, typeControlRef)
+ * The starting point from which to search for the next or
+ * previous control. This parameter is optional and may not be
+ * present in all instances of this event. Find the first
+ * subcontrol in the appropriate focusing direction if this
+ * parameter is not present or if it contains NULL.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlGetNextFocusCandidate = 14;
+
+{
+ * kEventClassControl / kEventControlGetAutoToggleValue
+ *
+ * Summary:
+ * This event is sent when the Control Manager is about to
+ * autotoggle a control. You can specify the toggled value to use
+ * based on the current value of your control.
+ *
+ * Discussion:
+ * The Control Manager provides default behavior for this event. If
+ * the event is not handled by a control, the default handler
+ * automatically provides this mapping: if the controlÕs value is 1,
+ * the toggled value is 0. If the controlÕs value is any other
+ * value, the toggled value is 1.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that is being toggled.
+ *
+ * --> kEventParamControlPart (in, typeControlPartCode)
+ * The control part that is being toggled.
+ *
+ * <-- kEventParamControlValue (out, typeLongInteger)
+ * On exit, contains the new control value.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlGetAutoToggleValue = 15;
+
+{
+ * kEventClassControl / kEventControlInterceptSubviewClick
+ *
+ * Summary:
+ * This is sent when the HIViewGetViewForMouseEvent API is called,
+ * to allow embedding controls to intercept clicks in the their
+ * embedded controls.
+ *
+ * Discussion:
+ * The Control Manager sends this event before descending into any
+ * subviews. Controls can override this to intercept clicks which
+ * would normally be destined for their children. For example, the
+ * HIToolbar control intercepts cmd-clicks to handle dragging its
+ * children. To accomplish this, it overrides this event, looking
+ * for the command key modifier. When the command key is pressed,
+ * the view just returns noErr as the result from its event handler.
+ * This tells the Control Manager to stop descending and return the
+ * view that it called as the mouse event destination.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The mouse-down event to intercept.
+ *
+ * Result:
+ * An operating system result code. Return noErr to indicate that
+ * this view intercepted the click, or eventNotHandledErr to allow
+ * subviews of this view to take the click.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlInterceptSubviewClick = 16;
+
+{
+ * kEventClassControl / kEventControlGetClickActivation
+ *
+ * Summary:
+ * Sent when a click occurs in a window. Allows the control to
+ * determine whether the window should be activated and whether the
+ * click should be handled.
+ *
+ * Discussion:
+ * This is very much like the window class version of this event.
+ * The difference is that the mouse location is view- or
+ * port-relative. This event is actually a copy of the mouse down
+ * event, and so it has all the parameters that such an event would
+ * have (modifiers, button number, etc.).
+ *
+ * When handling a click, this event is sent first, and is sent only
+ * to the control that was clicked; it is not propagated to the
+ * embedder of the clicked control. If the event is not handled,
+ * then a kEventWindowGetClickActivation event is sent to the window
+ * that was clicked.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that was clicked.
+ *
+ * <-- kEventParamClickActivation (out, typeClickActivationResult)
+ * On exit, indicates how the click should be handled. Should
+ * be set a ClickActivationResult constant from Controls.h.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The mouse location, in view-local coordinates if the
+ * controlÕs owning window is composited, or port-local
+ * coordinates if not.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available on Mac OS X only.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlGetClickActivation = 17;
+
+{
+ * kEventClassControl / kEventControlDragEnter
+ *
+ * Summary:
+ * A drag has entered your control.
+ *
+ * Discussion:
+ * If you at all wish to handle the drag, you must return true in
+ * the kEventParamControlWouldAcceptDrop parameter from your event
+ * handler in response to this event. If you return
+ * eventNotHandledErr, do not supply a
+ * kEventParamControlWouldAcceptDrop parameter, or set its value to
+ * false, you will not receive 'within' or 'leave' messages, nor
+ * will you be eligible to receive the drop. This is done to try to
+ * be as efficient as possible when sending events during the drag
+ * operation.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that is the drag target.
+ *
+ * --> kEventParamDragRef (in, typeDragRef)
+ * The DragRef for the drag.
+ *
+ * <-- kEventParamControlWouldAcceptDrop (out, typeBoolean)
+ * The control would accept the drop. Return true in this
+ * parameter if your view wants to track and possibly receive
+ * this drag.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlDragEnter = 18;
+
+{
+ * kEventClassControl / kEventControlDragWithin
+ *
+ * Summary:
+ * A drag has moved with your airspace (but not on any subcontrol).
+ *
+ * Discussion:
+ * Your control will typically respond to this event by drawing its
+ * drag highlight. If the user moves into a subcontrol, it becomes
+ * the target of the drag and your control will not receive 'within'
+ * messages any longer.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that is the drag target.
+ *
+ * --> kEventParamDragRef (in, typeDragRef)
+ * The DragRef for the drag.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlDragWithin = 19;
+
+{
+ * kEventClassControl / kEventControlDragLeave
+ *
+ * Summary:
+ * A drag is leaving your view.
+ *
+ * Discussion:
+ * Your control will typically respond to this event by removing its
+ * drag highlight.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that is the drag target.
+ *
+ * --> kEventParamDragRef (in, typeDragRef)
+ * The DragRef for the drag.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlDragLeave = 20;
+
+{
+ * kEventClassControl / kEventControlDragReceive
+ *
+ * Summary:
+ * Congratulations, you are the lucky recipient of a drag. Enjoy it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that is the drag target.
+ *
+ * --> kEventParamDragRef (in, typeDragRef)
+ * The DragRef for the drag.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlDragReceive = 21;
+
+{
+ * kEventClassControl / kEventControlSetFocusPart
+ *
+ * Summary:
+ * Sent when your control is gaining, losing, or changing the focus.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that is gaining, losing, or changing focus.
+ *
+ * --> kEventParamControlFocusEverything (in, typeBoolean)
+ * Indicates whether to allowing focusing on a part that
+ * doesnÕt accept general keyboard input, such as a push
+ * button, or if only traditionally focusable parts such as
+ * edit fields and list boxes should be allowed to gain focus.
+ * This parameter is optional and may not be present in all
+ * instances of this event. Restrict focus to traditionally
+ * focusable parts if this parameter is not present.
+ *
+ * <-> kEventParamControlPart (in/out, typeControlPartCode)
+ * On entry, a part code that may be either an actual control
+ * part or a control focus meta-part. This parameter may be
+ * one of kControlFocusNoPart (if the control is losing
+ * focus), kControlFocusNextPart (if the next part in the
+ * control should be focused), kControlFocusPrevPart (if the
+ * previous part in the control should be focused), or an
+ * actual control part (if that specific part should be
+ * focused). On exit, your event handler should store the
+ * actual part code that was focused into this parameter. Your
+ * control must always allow the focus to be removed (when
+ * this parameter is kControlFocusNoPart on entry).
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlSetFocusPart = 7;
+
+{
+ * kEventClassControl / kEventControlGetFocusPart
+ *
+ * Summary:
+ * Sent when your the Control Manager wants to know what part of
+ * your control is currently focused. Set the kEventParamControlPart
+ * param to your currently focused part.
+ *
+ * Discussion:
+ * The Control Manager provides default behavior for this event. If
+ * the event is not handled by a control, the default handler
+ * returns the part of the control that was most recently focused.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control for which to get the current focus.
+ *
+ * <-- kEventParamControlPart (out, typeControlPartCode)
+ * On exit, contains the current focus for this control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlGetFocusPart = 8;
+
+{
+ * kEventClassControl / kEventControlActivate
+ *
+ * Summary:
+ * Sent when your control becomes active as a result of a call to
+ * ActivateControl.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that was activated.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlActivate = 9;
+
+{
+ * kEventClassControl / kEventControlDeactivate
+ *
+ * Summary:
+ * Sent when your control becomes inactive as a result of a call to
+ * DeactivateControl.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that was deactivated.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlDeactivate = 10;
+
+{
+ * kEventClassControl / kEventControlSetCursor
+ *
+ * Summary:
+ * Sent when your control is asked to change the cursor as a result
+ * of a call to HandleControlSetCursor.
+ *
+ * Discussion:
+ * Note that the standard window event handler does not call
+ * HandleControlSetCursor, and therefore, your control will not
+ * ordinarily receive this event. Your host application must call
+ * HandleControlSetCursor itself in order for your control to
+ * receive this event. On Mac OS X 10.2 and later, we recommend
+ * using mouse tracking regions in your control to be notified when
+ * to change the cursor, rather than using this event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that should set the cursor.
+ *
+ * --> kEventParamMouseLocation (in, typeQDPoint)
+ * The mouse location, in view-local coordinates if the
+ * controlÕs owning window is composited, or port-local
+ * coordinates if not.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The current keyboard modifiers.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlSetCursor = 11;
+
+{
+ * kEventClassControl / kEventControlContextualMenuClick
+ *
+ * Summary:
+ * Sent when your control is asked to display a contextual menu as a
+ * result of a call to HandleControlContextualMenuClick.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that was clicked.
+ *
+ * --> kEventParamMouseLocation (in, typeQDPoint)
+ * The mouse location, in view-local coordinates if the
+ * controlÕs owning window is composited, or port-local
+ * coordinates if not. In Mac OS X 10.2 and earlier, however,
+ * this parameter was incorrectly in global coordinates.
+ *
+ * --> kEventParamWindowRef (in, typeWindowRef)
+ * The window under the mouse. Available in Mac OS X 10.3 and
+ * later.
+ *
+ * --> kEventParamWindowMouseLocation (in, typeHIPoint)
+ * The window-relative position of the mouse in the window
+ * given in the kEventParamWindowRef parameter. 0,0 is at the
+ * top left of the structure of the window. Available in Mac
+ * OS X 10.3 and later.
+ *
+ * --> kEventParamWindowPartCode (in, typeWindowPartCode)
+ * The part code that the mouse location hit in the window.
+ * This parameter only exists if the WindowRef parameter
+ * exists. This saves you the trouble of calling FindWindow,
+ * which is expensive on Mac OS X as it needs to call the
+ * Window Server. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were pressed when the event was
+ * generated. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamMouseButton (in, typeMouseButton)
+ * Which mouse button was pressed. Available in Mac OS X 10.3
+ * and later.
+ *
+ * --> kEventParamClickCount (in, typeUInt32)
+ * Whether this is a single click, double click, etc.
+ * Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamMouseChord (in, typeUInt32)
+ * Which other mouse buttons were pressed when the event was
+ * generated. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamTabletEventType (in, typeUInt32)
+ * The type of tablet event which generated this mouse event;
+ * contains either kEventTabletPoint or kEventTabletProximity.
+ * Only present if the event was generated from a tablet.
+ * Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletPoint. Available in Mac OS X 10.3 and later.
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Further information about the tablet event which generated
+ * this mouse event. Present if the the
+ * kEventParamTabletEventType parameter contains
+ * kEventTabletProximity. Available in Mac OS X 10.3 and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlContextualMenuClick = 12;
+
+{
+ * kEventClassControl / kEventControlTrack
+ *
+ * Summary:
+ * Sent to allow a control definition to track the mouse in response
+ * to a call to HIViewClick, HandleControlClick, etc.
+ *
+ * Discussion:
+ * In fact, this event is actually sent from within HIViewClick and
+ * HandleControlClick. The default handling of this event is the
+ * Control ManagerÕs normal tracking logic; this is good enough for
+ * simple controls (such as push buttons) and controls with simple
+ * indicators (such as scroll bars and sliders). You should only
+ * need to handle or override this event if you are trying to do
+ * more complex tracking, such as displaying a menu in the middle of
+ * tracking.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control to track.
+ *
+ * --> kEventParamMouseLocation (in, typeQDPoint)
+ * The mouse location, in view-local coordinates if the
+ * controlÕs owning window is composited, or port-local
+ * coordinates if not.
+ *
+ * <-> kEventParamKeyModifiers (in/out, typeUInt32)
+ * The current keyboard modifiers. On exit, the event handler
+ * may update this parameter with the modifiers that were
+ * pressed when tracking ended; these modifiers will be
+ * included in the kEventCommandProcess event that is sent by
+ * the Control Manager.
+ *
+ * --> kEventParamControlAction (in, typeControlActionUPP)
+ * The control action proc that should be called by the
+ * control during tracking.
+ *
+ * <-- kEventParamControlPart (out, typeControlPartCode)
+ * On exit, contains the part code of the control part that
+ * was selected when tracking ended, or kControlNoPart if no
+ * part was selected. If the part code is non-zero, the
+ * Control Manager will automatically send kEventControlHit
+ * and kEventCommandProcess events.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlTrack = 51;
+
+{
+ * kEventClassControl / kEventControlGetScrollToHereStartPoint
+ *
+ * Summary:
+ * Sent so your control can support Scroll To Here behavior during
+ * tracking.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control for which to retrieve the Scroll To Here point.
+ *
+ * <-> kEventParamMouseLocation (in/out, typeQDPoint)
+ * On entry, a point in view-local coordinates if the
+ * controlÕs owning window is composited, or port-local
+ * coordinates if not, which provides the location at which
+ * the user clicked to request Scroll To Here behavior. On
+ * exit, this parameter should contain the mouse location in
+ * view-local or port-local coordinates where a click would
+ * have needed to be to cause your indicator to be dragged to
+ * the incoming mouse location.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The current keyboard modifiers.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlGetScrollToHereStartPoint = 52;
+
+{
+ * kEventClassControl / kEventControlGetIndicatorDragConstraint
+ *
+ * Summary:
+ * Sent so your control can constrain the movement of its indicator
+ * during tracking.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that is being tracked.
+ *
+ * --> kEventParamMouseLocation (in, typeQDPoint)
+ * The mouse location, in view-local coordinates if the
+ * controlÕs owning window is composited, or port-local
+ * coordinates if not.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The current keyboard modifiers.
+ *
+ * <-- kEventParamControlIndicatorDragConstraint (out, typeIndicatorDragConstraint)
+ * On exit, contains an IndicatorDragConstraint structure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlGetIndicatorDragConstraint = 53;
+
+{
+ * kEventClassControl / kEventControlIndicatorMoved
+ *
+ * Summary:
+ * Sent during live-tracking of the indicator so your control can
+ * update its value based on the new indicator position. During
+ * non-live tracking, this event lets you redraw the indicator ghost
+ * at the appropriate place.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that is being tracked.
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The new indicator region.
+ *
+ * --> kEventParamControlIndicatorRegion (in, typeQDRgnHandle)
+ * Indicates whether the control is using non-live-tracking
+ * (true) or live tracking (false).
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlIndicatorMoved = 54;
+
+{
+ * kEventClassControl / kEventControlGhostingFinished
+ *
+ * Summary:
+ * Sent at the end of non-live indicator tracking so your control
+ * can update its value based on the final ghost location.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that was being tracked.
+ *
+ * --> kEventParamControlIndicatorOffset (in, typeQDPoint)
+ * The final offset of the indicator.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlGhostingFinished = 55;
+
+{
+ * kEventClassControl / kEventControlGetActionProcPart
+ *
+ * Summary:
+ * Sent during tracking so your control can alter the part that is
+ * passed to its action proc based on modifier keys, etc.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control being tracked.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The current keyboard modifiers.
+ *
+ * <-> kEventParamControlPart (in/out, typeControlPartCode)
+ * On entry, the proposed control part that will be sent to
+ * the action proc. Your handler may modify this parameter
+ * based on its own criteria (which modifier keys are pressed,
+ * for example).
+ *
+ * <-- kEventParamControlPartAutoRepeats (out, typeBoolean)
+ * On output, a flag to the standard control tracking loop in
+ * the Control Manager indicating whether to autorepeat when
+ * the user presses and holds on certain parts of your custom
+ * control. The autorepeat timing curve is the same as that
+ * used for the buttons/page areas of scroll bars. This
+ * parameter is observed by the Control Manager in Mac OS X
+ * 10.2 and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlGetActionProcPart = 56;
+
+{
+ * kEventClassControl / kEventControlGetPartRegion
+ *
+ * Summary:
+ * Sent by the GetControlRegion, HIViewCopyPartShape, and similar
+ * APIs when a client wants to get a particular region or shape of
+ * your control.
+ *
+ * Discussion:
+ * This event is sent to your handler in order to fetch both regions
+ * and shapes from your view. Shapes will only be requested on Mac
+ * OS X 10.4 and later. There are two strategies for handling this
+ * event: the non-shape savvy way and the shape savvy way. The shape
+ * savvy way avoids costly conversions between regions and shapes
+ * which can slow your view's performance.
+ *
+ * Non-shape savvy way: Get the region out of the
+ * kEventParamControlRegion parameter and modify it appropriately to
+ * reflect the desired part. Before the advent of shapes, this was
+ * the only method for handling this event. If you always handle the
+ * event this way on Mac OS X 10.4 and later, you may force the
+ * Control Manager to convert the region to a shape, which adversely
+ * affects performance.
+ *
+ * Shape savvy way: Get the value of the
+ * kEventParamControlPrefersShape parameter. If the parameter
+ * doesn't exist or if its value is false, handle this event in the
+ * non-shape savvy way as described above. If the parameter exists
+ * and has a value of true, allocate an immutable shape that
+ * represents the given part of your view and use SetEventParameter
+ * to add the shape to the event in the kEventParamShape parameter.
+ * You may now release the shape, since it was retained by
+ * SetEventParameter. If for some reason you are unwilling or unable
+ * to provide a shape for the given part, you may still fall back to
+ * the non-shape savvy method.
+ *
+ * NOTE: If your handler attempts to pre- or post-process some other
+ * handler's processing of this event by calling
+ * CallNextEventHandler, you MUST NOT rely on the value of the
+ * kEventParamControlPrefersShape parameter being preserved across
+ * the call to CallNextEventHandler. This event may dynamically
+ * modify itself depending on how any given handler acts upon it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control whose region/shape to return.
+ *
+ * --> kEventParamControlPart (in, typeControlPartCode)
+ * The control part code whose region/shape to return.
+ *
+ * --> kEventParamControlPrefersShape (in, typeBoolean)
+ * A Boolean indicating whether your view may respond to this
+ * event by adding a kEventParamShape parameter to it instead
+ * of modifying the region in the kEventParamControlRegion
+ * parameter. If the parameter is false, you must respond to
+ * the event by modifying the region in the
+ * kEventParamControlRegion parameter; you may not add a
+ * kEventParamShape parameter. If the parameter is true, you
+ * may Ñ but are not required to Ñ respond to the event by
+ * adding the kEventParamShape parameter; if you choose not
+ * to, you must respond to the event by modifying the region
+ * in the kEventParamControlRegion parameter. This parameter
+ * will only be present on Mac OS X 10.4 and later. In fact,
+ * even on Mac OS X 10.4 it is an optional parameter and will
+ * not always be present. If this parameter is not present,
+ * you should act as though its value were false.
+ *
+ * --> kEventParamControlRegion (in, typeQDRgnHandle)
+ * A pre-allocated RgnHandle. Unless your handler is allowed
+ * to and chooses to add a kEventParamShape parameter (see the
+ * discussion of kEventParamControlPrefersShape above), your
+ * handler should get the RgnHandle from the event and set the
+ * region contents appropriately. If your handler adds a
+ * kEventParamShape parameter to the event, it must neither
+ * get nor modify this parameter.
+ *
+ * <-- kEventParamShape (out, typeHIShapeRef)
+ * If your handler is allowed to and chooses to provide a
+ * shape (see the discussion of kEventParamControlPrefersShape
+ * above), your handler should create a new, immutable shape
+ * and return it in this parameter. After you call
+ * SetEventParameter, you may release the shape, as it will be
+ * retained by SetEventParameter and released when the event
+ * is destroyed. If your handler gets or modifies the
+ * kEventParamControlRegion parameter, it must not set this
+ * parameter.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlGetPartRegion = 101;
+
+{
+ * kEventClassControl / kEventControlGetPartBounds
+ *
+ * Summary:
+ * Sent when a client wants to get a particular rectangle of your
+ * control when it may be more efficient than asking for a region.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control whose bounds to return.
+ *
+ * --> kEventParamControlPart (in, typeControlPartCode)
+ * The control part whose bounds to return.
+ *
+ * <-- kEventParamControlPartBounds (out, typeHIRect)
+ * On exit, contains the bounds of the specified part.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlGetPartBounds = 102;
+
+{
+ * kEventClassControl / kEventControlSetData
+ *
+ * Summary:
+ * Sent by the SetControlData API when a client wants to change an
+ * arbitrary setting of your control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control for which to set data.
+ *
+ * --> kEventParamControlPart (in, typeControlPartCode)
+ * The control part for which to set data.
+ *
+ * --> kEventParamControlDataTag (in, typeEnumeration)
+ * The type of data to set.
+ *
+ * --> kEventParamControlDataBuffer (in, typePtr)
+ * A pointer to the data.
+ *
+ * --> kEventParamControlDataBufferSize (in, typeLongInteger)
+ * The size of the data.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlSetData = 103;
+
+{
+ * kEventClassControl / kEventControlGetData
+ *
+ * Summary:
+ * Sent by the GetControlData API when a client wants to get an
+ * arbitrary setting of your control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control from which to get data.
+ *
+ * --> kEventParamControlPart (in, typeControlPartCode)
+ * The control part for which to get data.
+ *
+ * --> kEventParamControlDataTag (in, typeEnumeration)
+ * The type of data to get.
+ *
+ * --> kEventParamControlDataBuffer (in, typePtr)
+ * A buffer in which to write the data.
+ *
+ * <-> kEventParamControlDataBufferSize (in/out, typeLongInteger)
+ * On entry, the size of the data buffer. On exit, the amount
+ * of data that was available.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlGetData = 104;
+
+{
+ * kEventClassControl / kEventControlGetSizeConstraints
+ *
+ * Summary:
+ * Sent by the HIViewGetSizeConstraints API to allow your custom
+ * control/view to specify its minimum and maximum size.
+ *
+ * Discussion:
+ * This is different from the optimal size event above. The optimal
+ * size might be larger than a viewÕs minimum size. A parent view
+ * can use this information to help it lay out subviews. The toolbar
+ * control uses this information to help lay out toolbar items, for
+ * example.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control for which to get size constraints.
+ *
+ * <-- kEventParamMinimumSize (out, typeHISize)
+ * On exit, contains the controlÕs minimum size.
+ *
+ * <-- kEventParamMaximumSize (out, typeHISize)
+ * On exit, contains the controlÕs maximum size.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlGetSizeConstraints = 105;
+
+{
+ * kEventClassControl / kEventControlGetFrameMetrics
+ *
+ * Summary:
+ * Sent when a control client needs to determine the width of the
+ * controlÕs structure region.
+ *
+ * Discussion:
+ * This event is not sent automatically by the Control Manager at
+ * any time, but may be sent by control clients during various
+ * layout operations. For example, the Window Manager will send this
+ * event to a window frame HIView to determine the window structure
+ * widths, and the Menu Manager will send this event to a menu
+ * content view to determine the content structure widths.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control for which to get frame metrics.
+ *
+ * <-- kEventParamControlFrameMetrics (out, typeControlFrameMetrics)
+ * On exit, contains the controlÕs frame metrics.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlGetFrameMetrics = 106;
+
+{
+ * kEventClassControl / kEventControlValueFieldChanged
+ *
+ * Summary:
+ * Sent when your controlÕs value, min, max, or view size has
+ * changed. Useful so other entities can watch for changes to your
+ * controlÕs value.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control whose value, min, max, or view size has changed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlValueFieldChanged = 151;
+
+{
+ * kEventClassControl / kEventControlAddedSubControl
+ *
+ * Summary:
+ * Sent when a control was embedded within your control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that gained a new subcontrol.
+ *
+ * --> kEventParamControlSubControl (in, typeControlRef)
+ * The subcontrol that was added.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlAddedSubControl = 152;
+
+{
+ * kEventClassControl / kEventControlRemovingSubControl
+ *
+ * Summary:
+ * Sent when one of your child controls will be removed from your
+ * control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that will be losing a subcontrol.
+ *
+ * --> kEventParamControlSubControl (in, typeControlRef)
+ * The subcontrol that will be removed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlRemovingSubControl = 153;
+
+{
+ * kEventClassControl / kEventControlBoundsChanged
+ *
+ * Summary:
+ * Sent when your controlÕs bounding rectangle has changed.
+ *
+ * Discussion:
+ * If you want to generate an efficient invalid region in response
+ * to a size change, you need to handle
+ * kEventControlInvalidateForSizeChange.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control whose bounds have changed.
+ *
+ * --> kEventParamAttributes (in, typeUInt32)
+ * Flags indicating how the bounds changed, including
+ * kControlBoundsChangeSizeChanged and
+ * kControlBoundsChangePositionChanged.
+ *
+ * --> kEventParamOriginalBounds (in, typeQDRectangle)
+ * The controlÕs bounds before the change. This is the
+ * controlÕs frame bounds; for a compositing view, this
+ * bounding rect is in the parent viewÕs coordinate system,
+ * and for a non-compositing view, it is in local GrafPort
+ * coordinates.
+ *
+ * --> kEventParamPreviousBounds (in, typeQDRectangle)
+ * The controlÕs bounds before the change. This parameter
+ * always has the same value as the kEventParamOriginalBounds
+ * parameter.
+ *
+ * --> kEventParamCurrentBounds (in, typeQDRectangle)
+ * The controlÕs new bounds. This is the controlÕs frame
+ * bounds; for a compositing view, this bounding rect is in
+ * the parent viewÕs coordinate system, and for a
+ * non-compositing view, it is in local GrafPort coordinates.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlBoundsChanged = 154;
+
+{
+ * kEventClassControl / kEventControlInvalidateForSizeChange
+ *
+ * Summary:
+ * Sent when a control's size changes so it can invalidate the area
+ * of itself that needs to be redrawn.
+ *
+ * Discussion:
+ * Handle this event by calling HIViewSetNeedsDisplayInRegion with a
+ * region that properly reflects the area of your control that needs
+ * to be redrawn after a size change. The default handler for this
+ * event will invalidate the entire control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control whose size has changed.
+ *
+ * --> kEventParamOriginalBounds (in, typeQDRectangle)
+ * The controlÕs bounds before the change.
+ *
+ * --> kEventParamCurrentBounds (in, typeQDRectangle)
+ * The controlÕs new bounds.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlInvalidateForSizeChange = 22;
+
+{
+ * kEventClassControl / kEventControlVisibilityChanged
+ *
+ * Summary:
+ * Sent when a control is hidden or shown. This is here to support
+ * custom views/controls which need to update information when the
+ * visibility changes.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control whose visibility has changed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlVisibilityChanged = 157;
+
+{
+ * kEventClassControl / kEventControlOwningWindowChanged
+ *
+ * Summary:
+ * Sent when your controlÕs owning window has changed. Useful to
+ * udpate any dependencies that your control has on its owning
+ * window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control whose owning window has changed.
+ *
+ * --> kEventParamAttributes (in, typeUInt32)
+ * Currently unused.
+ *
+ * --> kEventParamControlOriginalOwningWindow (in, typeWindowRef)
+ * The controlÕs original owning window.
+ *
+ * --> kEventParamControlCurrentOwningWindow (in, typeWindowRef)
+ * The controlÕs new owning window.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlOwningWindowChanged = 159;
+
+{
+ * kEventClassControl / kEventControlTitleChanged
+ *
+ * Summary:
+ * Sent when the title of your control changes.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control whose title has changed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlTitleChanged = 158;
+
+{
+ * kEventClassControl / kEventControlHiliteChanged
+ *
+ * Summary:
+ * Sent when the hilite state changes in a control. This is here to
+ * support custom views/controls which need to update information
+ * when the hilite state changes.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control whose hilite has changed.
+ *
+ * --> kEventParamControlPreviousPart (in, typeControlPartCode)
+ * The previously hilited part.
+ *
+ * --> kEventParamControlCurrentPart (in, typeControlPartCode)
+ * The newly hilited part.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlHiliteChanged = 160;
+
+{
+ * kEventClassControl / kEventControlEnabledStateChanged
+ *
+ * Summary:
+ * Sent when the enabled state changes in a control. This is here to
+ * support custom views/controls which need to update information
+ * when the enabled state changes.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control whose enabled state has changed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlEnabledStateChanged = 161;
+
+{
+ * kEventClassControl / kEventControlLayoutInfoChanged
+ *
+ * Summary:
+ * Sent when the layout info changes in a control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control whose enabled state has changed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlLayoutInfoChanged = 162;
+
+{
+ * kEventClassControl / kEventControlArbitraryMessage
+ *
+ * Summary:
+ * Sent by the SendControlMessage API when someone is trying to send
+ * an old-style CDEF message to your control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The control that is receiving the message.
+ *
+ * --> kEventParamControlMessage (in, typeShortInteger)
+ * The message.
+ *
+ * --> kEventParamControlParam (in, typeLongInteger)
+ * The inParam parameter from SendControlMessage.
+ *
+ * <-- kEventParamControlResult (out, typeLongInteger)
+ * On exit, contains the result that should be returned from
+ * SendControlMessage.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlArbitraryMessage = 201;
+
+
+{
+ * Summary:
+ * Control bounds change event attributes
+ *
+ * Discussion:
+ * When the toolbox sends out a kEventControlBoundsChanged event, it
+ * also sends along a parameter containing attributes of the event.
+ * These attributes can be used to determine what aspect of the
+ * control changed (position, size, or both).
+ }
+const
+{
+ * The dimensions of the control (width and height) changed.
+ }
+ kControlBoundsChangeSizeChanged = 1 shl 2;
+
+ {
+ * The top left corner (position) changed.
+ }
+ kControlBoundsChangePositionChanged = 1 shl 3;
+
+{--------------------------------------------------------------------------------------}
+{ Tablet Events (and tablet data in mouse events) }
+{--------------------------------------------------------------------------------------}
+{
+ kEventClassTablet quick reference:
+
+ kEventTabletPoint = 1,
+ kEventTabletProximity = 2,
+}
+{
+ * kEventClassTablet / kEventTabletPoint
+ *
+ * Summary:
+ * Indicates that the pen has moved on or near a tablet.
+ *
+ * Discussion:
+ * Same as deprecated kEventTabletPointer.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTabletPointRec (in, typeTabletPointRec)
+ * Tablet information for the event.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTabletPoint = 1;
+
+{
+ * kEventClassTablet / kEventTabletProximity
+ *
+ * Summary:
+ * Indicates that the pen has entered or exited proximity of a
+ * tablet.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTabletProximityRec (in, typeTabletProximityRec)
+ * Tablet information for the event.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTabletProximity = 2;
+
+type
+ TabletPointRecPtr = ^TabletPointRec;
+ TabletPointRec = record
+ absX: SInt32; { absolute x coordinate in tablet space at full tablet resolution }
+ absY: SInt32; { absolute y coordinate in tablet space at full tablet resolution }
+ absZ: SInt32; { absolute z coordinate in tablet space at full tablet resolution }
+ buttons: UInt16; { one bit per button - bit 0 is first button - 1 = closed }
+ pressure: UInt16; { scaled pressure value; MAXPRESSURE=(2^16)-1, MINPRESSURE=0 }
+ tiltX: SInt16; { scaled tilt x value; range is -((2^15)-1) to (2^15)-1 (-32767 to 32767) }
+ tiltY: SInt16; { scaled tilt y value; range is -((2^15)-1) to (2^15)-1 (-32767 to 32767) }
+ rotation: UInt16; { Fixed-point representation of device rotation in a 10.6 format }
+ tangentialPressure: SInt16; { tangential pressure on the device; range same as tilt }
+ deviceID: UInt16; { system-assigned unique device ID - matches to deviceID field in proximity event }
+ vendor1: SInt16; { vendor-defined signed 16-bit integer }
+ vendor2: SInt16; { vendor-defined signed 16-bit integer }
+ vendor3: SInt16; { vendor-defined signed 16-bit integer }
+ end;
+type
+ TabletPointerRec = TabletPointRec;
+ TabletPointerRecPtr = ^TabletPointerRec;
+ TabletProximityRecPtr = ^TabletProximityRec;
+ TabletProximityRec = record
+ vendorID: UInt16; { vendor-defined ID - typically will be USB vendor ID }
+ tabletID: UInt16; { vendor-defined tablet ID - typically will be USB product ID for the tablet }
+ pointerID: UInt16; { vendor-defined ID of the specific pointing device }
+ deviceID: UInt16; { system-assigned unique device ID - matches to deviceID field in tablet event }
+ systemTabletID: UInt16; { system-assigned unique tablet ID }
+ vendorPointerType: UInt16; { vendor-defined pointer type }
+ pointerSerialNumber: UInt32; { vendor-defined serial number of the specific pointing device }
+ uniqueID: UInt64; { vendor-defined unique ID for this pointer }
+ capabilityMask: UInt32; { mask representing the capabilities of the device. }
+ { capability bits are defined in the tablet capability }
+ { masks section of <IOKit/hidsystem/IOLLEvent.h> }
+ pointerType: SInt8; { type of pointing device - enum to be defined }
+ enterProximity: SInt8; { non-zero = entering; zero = leaving }
+ end;
+{--------------------------------------------------------------------------------------}
+{ Volume Events }
+{--------------------------------------------------------------------------------------}
+{
+ kEventClassVolume quick reference:
+
+ kEventVolumeMounted = 1, // new volume mounted
+ kEventVolumeUnmounted = 2 // volume has been ejected or unmounted
+}
+const
+ typeFSVolumeRefNum = $766F6C6E (* 'voln' *); { FSVolumeRefNum}
+
+{
+ * kEventClassVolume / kEventVolumeMounted
+ *
+ * Summary:
+ * A new volume has been mounted (or new media inserted).
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeFSVolumeRefNum)
+ * The volume refnum of the volume that was mounted.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3.1 and later
+ }
+const
+ kEventVolumeMounted = 1;
+
+{
+ * kEventClassVolume / kEventVolumeUnmounted
+ *
+ * Summary:
+ * An existing volume has been unmounted (or media ejected).
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeFSVolumeRefNum)
+ * The volume refnum of the volume that was unmounted. At the
+ * point when this event is sent, this is no longer a valid
+ * volume refnum, and cannot be passed to any File Manager
+ * API; it is useful only for comparison with cached volume
+ * refnums in your own data structures.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3.1 and later
+ }
+const
+ kEventVolumeUnmounted = 2;
+
+{--------------------------------------------------------------------------------------}
+{ Appearance Events }
+{--------------------------------------------------------------------------------------}
+{
+ kEventClassAppearance quick reference:
+
+ kEventAppearanceScrollBarVariantChanged = 1
+}
+{
+ * kEventClassAppearance / kEventAppearanceScrollBarVariantChanged
+ *
+ * Summary:
+ * The scroll bar variant has changed. Available on Mac OS X 10.1
+ * and later.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it on Mac OS X
+ * 10.3 and later.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamNewScrollBarVariant (in, typeShortInteger)
+ * The new scroll bar variant.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAppearanceScrollBarVariantChanged = 1;
+
+{--------------------------------------------------------------------------------------}
+{ Services Events }
+{--------------------------------------------------------------------------------------}
+{
+ kEventClassService quick reference:
+
+ Services are a feature by which applications can communicate with
+ one another to request and provide services. This communication
+ happens either through the Pasteboard or Scrap Manager. When an event is sent that
+ requires communication for processing or servicing a request,
+ you will need to use the pasteboard or scrap given in the kEventParamPasteboardRef and
+ kEventParamScrapRef parameters of the event in order to communicate.
+ When your app requests a service, it is usually acting on data that is
+ currently selected or in focus. Therefore all of the Services events
+ are sent to the UserFocus event target.
+ <BR><BR>
+ Service events are available on Mac OS X 10.1 and later.
+
+ kEventServiceCopy = 1,
+ kEventServicePaste = 2,
+ kEventServiceGetTypes = 3,
+ kEventServicePerform = 4
+}
+{
+ * kEventClassService / kEventServiceCopy
+ *
+ * Summary:
+ * The user has invoked a service that requires the application to
+ * update the given pasteboard or scrap in the
+ * kEventParamPasteboardRef and kEventParamScrapRef parameters with
+ * appropriate data from the focus.
+ *
+ * Discussion:
+ * On Mac OS X 10.3 and later, this event includes both a
+ * PasteboardRef and a ScrapRef. A handler for this event should
+ * provide its data using either Pasteboard or Scrap Manager APIs,
+ * and the corresponding pasteboard or scrap reference, depending on
+ * which is more convenient or appropriate. Data only needs to be
+ * placed on one of the pasteboard or scrap; it does not need to be
+ * placed on both. Data written to the pasteboard will also be
+ * available on the scrap, and vice versa.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamPasteboardRef (in, typePasteboardRef)
+ * Data from the current selection should be placed into this
+ * pasteboard. This parameter is provided on Mac OS X 10.3 and
+ * later.
+ *
+ * --> kEventParamScrapRef (in, typeScrapRef)
+ * Data from the current selection should be placed into this
+ * scrap.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventServiceCopy = 1;
+
+{
+ * kEventClassService / kEventServicePaste
+ *
+ * Summary:
+ * The user has invoked a service that requires the application to
+ * update the current focus with data from the pasteboard or scrap
+ * given in the kEventParamPasteboardRef and kEventParamScrapRef
+ * parameters.
+ *
+ * Discussion:
+ * On Mac OS X 10.3 and later, this event includes both a
+ * PasteboardRef and a ScrapRef. A handler for this event should
+ * retrieve its data using either Pasteboard or Scrap Manager APIs,
+ * and the corresponding pasteboard or scrap reference, depending on
+ * which is more convenient or appropriate. Data only needs to be
+ * read from one of the pasteboard or scrap; it does not need to be
+ * read from both. Data available on the pasteboard will also be
+ * available on the scrap, and vice versa.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamPasteboardRef (in, typePasteboardRef)
+ * The current selection should be replaced by data from this
+ * pasteboard. This parameter is provided on Mac OS X 10.3 and
+ * later.
+ *
+ * --> kEventParamScrapRef (in, typeScrapRef)
+ * The current selection should be replaced by data from this
+ * scrap.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventServicePaste = 2;
+
+{
+ * kEventClassService / kEventServiceGetTypes
+ *
+ * Summary:
+ * The Services Manager needs to know what types of data the
+ * application can copy and paste to and from the pasteboard or
+ * scrap in order to update the Services menu to enable items that
+ * the user can select.
+ *
+ * Discussion:
+ * This event sends two CFMutableArrayRefs for the application to
+ * add the types to: the kEventParamServiceCopyTypes and the
+ * kEventParamServicePasteTypes parameters. The types that are added
+ * are CFStringRefs. There is a convenience function,
+ * CreateTypeStringWithOSType, which takes an OSType and will create
+ * a CFStringRef that you can add to the array(s).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamServiceCopyTypes (in, typeCFMutableArrayRef)
+ * Add CFStringRefs to this array to report the types that can
+ * be copied from the current selection. These strings will be
+ * released automatically after the event is handled.
+ *
+ * --> kEventParamServicePasteTypes (in, typeCFMutableArrayRef)
+ * Add CFStringRefs to this array to report the types that can
+ * be pasted into the currently focused object. These strings
+ * will be released automatically after the event is handled.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventServiceGetTypes = 3;
+
+{
+ * kEventClassService / kEventServicePerform
+ *
+ * Summary:
+ * If the application is a service provider, this event will get
+ * sent when a service is requested of the app.
+ *
+ * Discussion:
+ * On Mac OS X 10.3 and later, this event includes both a
+ * PasteboardRef and a ScrapRef. A handler for this event may
+ * provide its data using either Pasteboard or Scrap Manager APIs,
+ * and the corresponding pasteboard or scrap reference, depending on
+ * which is more convenient or appropriate.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamPasteboardRef (in, typePasteboardRef)
+ * The pasteboard that should be used to send and receive data
+ * from the requester. This parameter is only provided on Mac
+ * OS X 10.3 and later.
+ *
+ * --> kEventParamScrapRef (in, typeScrapRef)
+ * The scrap that should be used to send and receive data from
+ * the requester.
+ *
+ * --> kEventParamServiceMessageName (in, typeCFStringRef)
+ * A string with the name of the advertised service that was
+ * invoked.
+ *
+ * --> kEventParamServiceUserData (in, typeCFStringRef)
+ * Extra data provided by the requestor.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventServicePerform = 4;
+
+{
+ * CreateTypeStringWithOSType()
+ *
+ * Discussion:
+ * This routine is used to convert an OSType to a CFStringRef that
+ * services will understand.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inType:
+ * The OSType that needs to be converted to a CFString.
+ *
+ * Result:
+ * A CFStringRef that contains the string that corresponds to the
+ * given OSType. This follows CoreFoundation semantics in that it
+ * will return NULL for failure, and because it is a "Create"
+ * function you will need to CFRelease this string when it is no
+ * longer needed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateTypeStringWithOSType( inType: OSType ): CFStringRef; external name '_CreateTypeStringWithOSType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ * kHIServicesMenuProviderName
+ *
+ * Discussion:
+ * A CFDictionaryRef key in a dictionary returned by
+ * CopyServicesMenuCommandKeys. The value for this key is the name
+ * of the service provider represented as a CFString.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIServicesMenuProviderName CFSTRP('kHIServicesMenuProviderName')}
+{$endc}
+
+{
+ * kHIServicesMenuItemName
+ *
+ * Discussion:
+ * A CFDictionaryRef key in a dictionary returned by
+ * CopyServicesMenuCommandKeys. The value for this key is the name
+ * of the menu item represented as a CFString.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIServicesMenuItemName CFSTRP('kHIServicesMenuItemName')}
+{$endc}
+
+{
+ * kHIServicesMenuCharCode
+ *
+ * Discussion:
+ * A CFDictionaryRef key in a dictionary returned by
+ * CopyServicesMenuCommandKeys. The value for this key is the
+ * character code of the menu item shortcut, represented as a
+ * CFString.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIServicesMenuCharCode CFSTRP('kHIServicesMenuCharCode')}
+{$endc}
+
+{
+ * kHIServicesMenuKeyModifiers
+ *
+ * Discussion:
+ * A CFDictionaryRef key in a dictionary returned by
+ * CopyServicesMenuCommandKeys. The value for this key is the
+ * keyboard modifiers of the menu item shortcut in Menu Manager
+ * modifiers format, represented as a CFNumber.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIServicesMenuKeyModifiers CFSTRP('kHIServicesMenuKeyModifiers')}
+{$endc}
+{
+ * CopyServicesMenuCommandKeys()
+ *
+ * Summary:
+ * Returns an array of CFDictionaryRefs containing information about
+ * the command-key short cuts for items in the application services
+ * menu.
+ *
+ * Discussion:
+ * Each array entry is a CFDictionaryRef, and each dictionary
+ * contains information about a single command key shortcut for
+ * items in the application's Services menu. Each dictionary
+ * contains the following keys: kHIServicesMenuProviderName,
+ * kHIServicesMenuItemName, kHIServicesMenuCharCode, and
+ * kHIServicesMenuKeyModifiers. The array must be released by the
+ * caller; the dictionaries do not need to be released (they will be
+ * auto-released when the array is released).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * outCommandKeyArray:
+ * On exit, contains an array of the values of the Services menu
+ * items that have command key shortcuts associated with them.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function CopyServicesMenuCommandKeys( var outCommandKeyArray: CFArrayRef ): OSStatus; external name '_CopyServicesMenuCommandKeys';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{--------------------------------------------------------------------------------------}
+{ Accessibility Events }
+{--------------------------------------------------------------------------------------}
+{
+ kEventClassAccessibility quick reference:
+
+ kEventAccessibleGetChildAtPoint = 1,
+ kEventAccessibleGetFocusedChild = 2,
+
+ kEventAccessibleGetAllAttributeNames = 21,
+ kEventAccessibleGetAllParameterizedAttributeNames = 25,
+ kEventAccessibleGetNamedAttribute = 22,
+ kEventAccessibleSetNamedAttribute = 23,
+ kEventAccessibleIsNamedAttributeSettable = 24,
+
+ kEventAccessibleGetAllActionNames = 41,
+ kEventAccessiblePerformNamedAction = 42,
+ kEventAccessibleGetNamedActionDescription = 44
+}
+{
+ * kEventClassAccessibility / kEventAccessibleGetChildAtPoint
+ *
+ * Summary:
+ * Finds the child of an accessible object at a given point.
+ *
+ * Discussion:
+ * The kEventParamMouseLocation parameter will contain a global
+ * point. Your handler for this event should find the child of
+ * yourself which is underneath that point and return it in the
+ * kEventParamAccessibleChild parameter.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamAccessibleObject (in, typeCFTypeRef)
+ * The accessible object, in the form of an AXUIElementRef.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The location in global coordinates.
+ *
+ * <-- kEventParamAccessibleChild (out, typeCFTypeRef)
+ * On exit, contains the child of the accessible object at the
+ * specified point, in the form of an AXUIElementRef. If there
+ * is no child at the given point, you should still return
+ * noErr, but leave the parameter empty (do not call
+ * SetEventParameter). Only return immediate children; do not
+ * return grandchildren of yourself.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAccessibleGetChildAtPoint = 1;
+
+{
+ * kEventClassAccessibility / kEventAccessibleGetFocusedChild
+ *
+ * Summary:
+ * Finds the focused child of an accessible object.
+ *
+ * Discussion:
+ * Your handler for this event should find the child of itself which
+ * is part of the focus chain and return it in the
+ * kEventParamAccessibleChild parameter.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamAccessibleObject (in, typeCFTypeRef)
+ * The accessible object, in the form of an AXUIElementRef.
+ *
+ * <-- kEventParamAccessibleChild (out, typeCFTypeRef)
+ * On exit, contains the focused child of the accessible
+ * object, in the form of an AXUIElementRef. If there is no
+ * child in the focus chain, you should still return noErr,
+ * but leave the parameter empty (do not call
+ * SetEventParameter). Only return immediate children; do not
+ * return grandchildren of yourself.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAccessibleGetFocusedChild = 2;
+
+{
+ * kEventClassAccessibility / kEventAccessibleGetAllAttributeNames
+ *
+ * Summary:
+ * Returns the attributes supported by an accessible object. You
+ * must only return the names of your regular (non-parameterized)
+ * attributes via this event. If you support parameterized
+ * attributes, you must return them via the new
+ * kEventAccessibleGetAllParameterizedAttributeNames event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamAccessibleObject (in, typeCFTypeRef)
+ * The accessible object, in the form of an AXUIElementRef.
+ *
+ * <-> kEventParamAccessibleAttributeNames (in/out, typeCFMutableArrayRef)
+ * Add each of the regular (non-parameterized) attribute names
+ * supported by the accessible object to this array, as
+ * CFStringRefs.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAccessibleGetAllAttributeNames = 21;
+
+{
+ * kEventClassAccessibility / kEventAccessibleGetAllParameterizedAttributeNames
+ *
+ * Summary:
+ * Returns the parameterized attributes supported by an accessible
+ * object. You must not return the names of your regular
+ * (non-parameterized) attributes via this event. If you support
+ * regular attributes, you must return them via the original
+ * kEventAccessibleGetAllAttributeNames event. Parameterized
+ * attributes are introduced in Mac OS X 10.3.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamAccessibleObject (in, typeCFTypeRef)
+ * The accessible object, in the form of an AXUIElementRef.
+ *
+ * <-> kEventParamAccessibleAttributeNames (in/out, typeCFMutableArrayRef)
+ * Add each of the parameterized attribute names supported by
+ * the accessible object to this array, as CFStringRefs.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAccessibleGetAllParameterizedAttributeNames = 25;
+
+{
+ * kEventClassAccessibility / kEventAccessibleGetNamedAttribute
+ *
+ * Summary:
+ * Returns the value of an attribute of an accessible object.
+ *
+ * Discussion:
+ * The kEventParamAccessibleAttributeName parameter will contain an
+ * attribute name in the form of a CFStringRef. If you support the
+ * named attribute, return the attributeÕs value in the
+ * kEventParamAccessibleAttributeValue parameter.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamAccessibleObject (in, typeCFTypeRef)
+ * The accessible object, in the form of an AXUIElementRef.
+ *
+ * --> kEventParamAccessibleAttributeName (in, typeCFStringRef)
+ * The name of the requested attribute.
+ *
+ * --> kEventParamAccessibleAttributeParameter (in, typeCFTypeRef)
+ * This parameter is optional and will only exist if your
+ * accessible object is being asked for the value of a
+ * parameterized attribute. When present, this event parameter
+ * will contain a CFTypeRef describing the parameters of the
+ * request. Parameterized attributes are introduced in Mac OS
+ * X 10.3.
+ *
+ * <-- kEventParamAccessibleAttributeValue (out, typeCFTypeRef)
+ * On exit, contains the attribute's value. The type of this
+ * parameter varies according to the attribute; it might
+ * typically be typeCFStringRef (for a textual attribute),
+ * typeBoolean (for a boolean attribute), or typeSInt32 (for
+ * an integer-valued attribute).
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAccessibleGetNamedAttribute = 22;
+
+{
+ * kEventClassAccessibility / kEventAccessibleSetNamedAttribute
+ *
+ * Summary:
+ * Sets the value of an attribute of an accessible object.
+ *
+ * Discussion:
+ * The kEventParamAccessibleAttributeName parameter will contain an
+ * attribute name in the form of a CFStringRef. The
+ * kEventParamAccessibleAttributeValue parameter will contain data
+ * in an arbitrary format. If you support the named attribute, set
+ * the named attributeÕs value to the data provided in the event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamAccessibleObject (in, typeCFTypeRef)
+ * The accessible object, in the form of an AXUIElementRef.
+ *
+ * --> kEventParamAccessibleAttributeName (in, typeCFStringRef)
+ * The name of the requested attribute.
+ *
+ * --> kEventParamAccessibleAttributeValue (in, typeCFTypeRef)
+ * The new value of the attribute. The type of this parameter
+ * varies according to the attribute; it might typically be
+ * typeCFStringRef (for a textual attribute), typeBoolean (for
+ * a boolean attribute), or typeSInt32 (for an integer-valued
+ * attribute).
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAccessibleSetNamedAttribute = 23;
+
+{
+ * kEventClassAccessibility / kEventAccessibleIsNamedAttributeSettable
+ *
+ * Summary:
+ * Determines whether an attribute of an accessible object can be
+ * modified.
+ *
+ * Discussion:
+ * The kEventParamAccessibleAttributeName parameter will contain an
+ * attribute name in the form of a CFStringRef. If you support the
+ * named attribute, set the kEventParamAccessibleAttributeSettable
+ * parameter to a Boolean indicating whether the named attribute can
+ * have its value changed via the kEventAccessibleSetNamedAttribute
+ * event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamAccessibleObject (in, typeCFTypeRef)
+ * The accessible object, in the form of an AXUIElementRef.
+ *
+ * --> kEventParamAccessibleAttributeName (in, typeCFStringRef)
+ * The name of the requested attribute.
+ *
+ * <-- kEventParamAccessibleAttributeSettable (out, typeBoolean)
+ * On exit, indicates whether the attribute may be modified.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAccessibleIsNamedAttributeSettable = 24;
+
+{
+ * kEventClassAccessibility / kEventAccessibleGetAllActionNames
+ *
+ * Summary:
+ * Returns the actions supported by an accessible object.
+ *
+ * Discussion:
+ * The kEventParamAccessibleActionNames parameter will contain a
+ * CFMutableArrayRef. Add each of the action names you support to
+ * this array in the form of a CFStringRef.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamAccessibleObject (in, typeCFTypeRef)
+ * The accessible object, in the form of an AXUIElementRef.
+ *
+ * <-> kEventParamAccessibleActionNames (in/out, typeCFMutableArrayRef)
+ * Add each of the actions supported by the accessible object
+ * to this array, as CFStringRefs.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAccessibleGetAllActionNames = 41;
+
+{
+ * kEventClassAccessibility / kEventAccessiblePerformNamedAction
+ *
+ * Summary:
+ * Requests that a specific action be performed by an accessible
+ * object.
+ *
+ * Discussion:
+ * The kEventParamAccessibleActionName parameter will contain an
+ * attribute name in the form of a CFStringRef. If you support the
+ * named action, perform the action. There are times, however, when
+ * performing an action causes an accessible object to call a
+ * routine which may not return immediately, such as StandardAlert
+ * or PopUpMenuSelect. You should only call such routines when you
+ * receive an action request that was queued; if you call such a
+ * routine when processing an event that was directly dispatched,
+ * you will probably cause the assistive app to receive a timeout
+ * error. On Mac OS X 10.3 and later, the
+ * kEventParamAccessibilityEventQueued parameter will indicate
+ * whether the event was queued. If so, process the request
+ * normally. If not, you can request that the event be posted to the
+ * queue and sent to you later by returning
+ * eventDeferAccessibilityEventErr from your handler. On Mac OS X
+ * 10.2, the parameter will not exist, the event will always be
+ * directly dispatched, and there is no way to request that it be
+ * posted to the queue; in this case, you should perform the action
+ * even if it will cause the assistive app to receive a timeout
+ * error.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamAccessibleObject (in, typeCFTypeRef)
+ * The accessible object, in the form of an AXUIElementRef.
+ *
+ * --> kEventParamAccessibleActionName (in, typeCFStringRef)
+ * The name of the requested action.
+ *
+ * --> kEventParamAccessibilityEventQueued (in, typeBoolean)
+ * An indication of whether this event was delivered to you
+ * via the main event queue. This parameter only exists on Mac
+ * OS X 10.3 and later. See the discussion for more details.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAccessiblePerformNamedAction = 42;
+
+{
+ * kEventClassAccessibility / kEventAccessibleGetNamedActionDescription
+ *
+ * Summary:
+ * Returns a human-language description of an action supported by an
+ * accessible object.
+ *
+ * Discussion:
+ * The kEventParamAccessibleActionName parameter will contain an
+ * attribute name in the form of a CFStringRef. The
+ * kEventParamAccessibleActionDescription parameter will contain a
+ * CFMutableStringRef. If you support the named action, alter the
+ * mutable string to contain a textual description of the actionÕs
+ * significance.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamAccessibleObject (in, typeCFTypeRef)
+ * The accessible object, in the form of an AXUIElementRef.
+ *
+ * --> kEventParamAccessibleActionName (in, typeCFStringRef)
+ * The name of the requested action.
+ *
+ * <-> kEventParamAccessibleActionDescription (in/out, typeCFMutableStringRef)
+ * If you support the action, extract this parameter from the
+ * event and set the contents of the mutable string to contain
+ * a description of the action. Do not set this event
+ * parameter to a CFStringRef of your own creation; you must
+ * modify the preexisting mutable string stored in the event
+ * parameter.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventAccessibleGetNamedActionDescription = 44;
+
+{
+ * AXUIElementCreateWithHIObjectAndIdentifier()
+ *
+ * Discussion:
+ * This routine creates an AXUIElementRef to represent an accessible
+ * object for a Carbon application. A Carbon accessible object is
+ * comprised of an HIObjectRef and a 64-bit identifier. The
+ * resulting AXUIElementRef is a CFTypeRef, and must be managed as
+ * such. You can create a new AXUIElementRef every time you need
+ * one. Even though the actual hex values of two AXUIElementRefs
+ * might be different, they may represent the same accessible
+ * object; because AXUIElementRefs are Core Foundation objects, you
+ * can use CFEqual to compare them.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inHIObject:
+ * The HIObjectRef of the accessible object.
+ *
+ * inIdentifier:
+ * The 64-bit identifier of the accessible object.
+ *
+ * Result:
+ * An AXUIElementRef that represents the Carbon accessible object
+ * identified by the given HIObjectRef and 64-bit identifier. This
+ * follows CoreFoundation semantics in that it will return NULL for
+ * failure, and because it is a "Create" function you will need to
+ * CFRelease() this AXUIElementRef when it is no longer needed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function AXUIElementCreateWithHIObjectAndIdentifier( inHIObject: HIObjectRef; inIdentifier: UInt64 ): AXUIElementRef; external name '_AXUIElementCreateWithHIObjectAndIdentifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * AXUIElementGetHIObject()
+ *
+ * Discussion:
+ * If the incoming AXUIElementRef is a Carbon accessible object,
+ * this routine will return the HIObjectRef of the accessible object.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inUIElement:
+ * The AXUIElementRef of whom you'd like to get the HIObjectRef.
+ *
+ * Result:
+ * The HIObjectRef of the AXUIElementRef. If the incoming
+ * AXUIElementRef is not a Carbon accessible object, this routine
+ * will return NULL.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function AXUIElementGetHIObject( inUIElement: AXUIElementRef ): HIObjectRef; external name '_AXUIElementGetHIObject';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * AXUIElementGetIdentifier()
+ *
+ * Discussion:
+ * If the incoming AXUIElementRef is a Carbon accessible object,
+ * this routine will pass back the 64-bit identifier of the
+ * accessible object.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inUIElement:
+ * The AXUIElementRef of whom you'd like to get the 64-bit
+ * identifier.
+ *
+ * outIdentifier:
+ * The 64-bit identifier of the AXUIElementRef. If the incoming
+ * AXUIElementRef is not a Carbon accessible object, this routine
+ * will pass back zero. Note that zero is often a legal value for
+ * Carbon accessible object, so do not assume that the accessible
+ * object is not a Carbon accessible object just because you get a
+ * result of zero.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+procedure AXUIElementGetIdentifier( inUIElement: AXUIElementRef; var outIdentifier: UInt64 ); external name '_AXUIElementGetIdentifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * AXNotificationHIObjectNotify()
+ *
+ * Discussion:
+ * Posts a notification for the given pseudo-AXUIElementRef. Though
+ * an actual AXUIElementRef is not actually passed in to this
+ * function, its component parts are. This saves the implementation
+ * the hassle of dismantling the AXUIElementRef into its component
+ * parts.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inNotification:
+ * The notification name string.
+ *
+ * inHIObject:
+ * The HIObjectRef component of the AXUIElementRef to whom the
+ * notification applies.
+ *
+ * inIdentifier:
+ * The 64-bit identifier component of the AXUIElementRef to whom
+ * the notification applies.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+procedure AXNotificationHIObjectNotify( inNotification: CFStringRef; inHIObject: HIObjectRef; inIdentifier: UInt64 ); external name '_AXNotificationHIObjectNotify';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HICopyAccessibilityRoleDescription()
+ *
+ * Summary:
+ * Returns the role description string for a standard role or a
+ * standard role-subrole pair.
+ *
+ * Discussion:
+ * This routine is useful if you are implementing an accessible
+ * object that has a standard role or role-subrole pair and you want
+ * to make sure your object provides the same role description
+ * string that the equivalent system-supplied object provides. In
+ * other words, if you are implementing an accessible object of role
+ * kAXButtonRole, you can use this routine to make sure it provides
+ * the same role description that the standard push button provides.
+ *
+ * This routine can provide role description strings for all roles
+ * and role-subrole pairs that are used in the standard/system
+ * accessible objects on Mac OS X 10.4 and later. Once this routine
+ * is able to provide a role description string for a role or
+ * role-subrole pair, it will continue to do so on subsequent system
+ * releases, even if the system no longer produces a standard
+ * accessible object with that role or role-subrole pair.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRole:
+ * The role CFStringRef for your accessible object. Callers
+ * typically pass one of the kAXFooRole constant strings from
+ * within the HIServices framework.
+ *
+ * inSubrole:
+ * The subrole CFStringRef for your accessible object. Callers
+ * typically pass one of the kAXFooSubrole constant strings from
+ * within the HIServices framework. Pass NULL if your accessible
+ * object does not have a subrole.
+ *
+ * Result:
+ * A CFStringRef with the standard role description for the role or
+ * role-subrole pair. You must release the role description when you
+ * are finished with it. If there is no standard role description
+ * for the role or role-subrole pair, this routine will return NULL.
+ * If you pass either an unknown role or an unknown subrole, this
+ * routine will return NULL.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HICopyAccessibilityRoleDescription( inRole: CFStringRef; inSubrole: CFStringRef { can be NULL } ): CFStringRef; external name '_HICopyAccessibilityRoleDescription';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HICopyAccessibilityActionDescription()
+ *
+ * Summary:
+ * Returns the action description string for a standard
+ * accessibility action.
+ *
+ * Discussion:
+ * This routine is useful if you are implementing an accessible
+ * object that implements a standard action and you want to make
+ * sure your object provides the same role action string that the a
+ * system-supplied object provides.
+ * This routine can provide action description strings for all
+ * actions that are used in the standard/system accessible objects
+ * on Mac OS X 10.4 and later. Once this routine is able to provide
+ * a description string for an action, it will continue to do so on
+ * subsequent system releases, even if the system no longer produces
+ * a standard accessible object that supports the action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inAction:
+ * The action CFStringRef for which you'd like to generate a
+ * description. Callers must pass one of the kAXFooAction constant
+ * strings from within the HIServices framework.
+ *
+ * Result:
+ * A CFStringRef with the standard description for the action. You
+ * must release the description when you are finished with it. If
+ * you pass an unsupported action to this routine, the behavior is
+ * undefined.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HICopyAccessibilityActionDescription( inAction: CFStringRef ): CFStringRef; external name '_HICopyAccessibilityActionDescription';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{--------------------------------------------------------------------------------------}
+{ System Events }
+{--------------------------------------------------------------------------------------}
+
+{
+ kEventClassSystem quick reference:
+
+ kEventSystemTimeDateChanged = 2,
+ kEventSystemUserSessionActivated = 10,
+ kEventSystemUserSessionDeactivated = 11
+}
+{
+ * kEventClassSystem / kEventSystemTimeDateChanged
+ *
+ * Summary:
+ * The system time and/or date has changed via the preferences panel.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it on the
+ * application event target.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventSystemTimeDateChanged = 2;
+
+{
+ * kEventClassSystem / kEventSystemUserSessionActivated
+ *
+ * Summary:
+ * The current user login session has been activated.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it on the
+ * application event target. It is sent when the Fast User Switching
+ * feature of Mac OS X 10.3 is used to activate the login session in
+ * which the current application is running.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventSystemUserSessionActivated = 10;
+
+{
+ * kEventClassSystem / kEventSystemUserSessionDeactivated
+ *
+ * Summary:
+ * The current user login session has been deactivated.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it on the
+ * application event target. It is sent when the Fast User Switching
+ * feature of Mac OS X 10.3 is used to switch to another user's
+ * login session.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventSystemUserSessionDeactivated = 11;
+
+{--------------------------------------------------------------------------------------}
+{ Installing Event Handlers }
+{--------------------------------------------------------------------------------------}
+{
+ * GetWindowEventTarget()
+ *
+ * Discussion:
+ * Returns the EventTargetRef for the specified window. Once you
+ * obtain this reference, you can send events to the target and
+ * install an event handler on it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to return the target for.
+ *
+ * Result:
+ * An EventTargetRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowEventTarget( inWindow: WindowRef ): EventTargetRef; external name '_GetWindowEventTarget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetControlEventTarget()
+ *
+ * Discussion:
+ * Returns the EventTargetRef for the specified control. Once you
+ * obtain this reference, you can send events to the target and
+ * install event handler on it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inControl:
+ * The control to return the target for.
+ *
+ * Result:
+ * An EventTargetRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetControlEventTarget( inControl: ControlRef ): EventTargetRef; external name '_GetControlEventTarget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetMenuEventTarget()
+ *
+ * Discussion:
+ * Returns the EventTargetRef for the specified menu. Once you
+ * obtain this reference, you can send events to the target and
+ * install event handler on it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu to return the target for.
+ *
+ * Result:
+ * An EventTargetRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMenuEventTarget( inMenu: MenuRef ): EventTargetRef; external name '_GetMenuEventTarget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetApplicationEventTarget()
+ *
+ * Discussion:
+ * Returns the EventTargetRef for the application. Once you obtain
+ * this reference, you can send events to the target and install
+ * event handler on it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * An EventTargetRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetApplicationEventTarget: EventTargetRef; external name '_GetApplicationEventTarget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetUserFocusEventTarget()
+ *
+ * Discussion:
+ * Returns the EventTargetRef for the current user focus at the time
+ * of the call. Keyboard events are always sent to this target.
+ * Events that are sent to this target are automatically propagated
+ * to the following other targets: first to the focused control in
+ * the focused window, then up the control hierarchy to the focused
+ * window itself, and then to the application target.
+ *
+ * Note that command key processing occurs before key events are
+ * sent to this target; to intercept key events before command key
+ * processing occurs, install a handler on the event dispatcher
+ * target instead of this target.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * An EventTargetRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetUserFocusEventTarget: EventTargetRef; external name '_GetUserFocusEventTarget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetEventDispatcherTarget()
+ *
+ * Discussion:
+ * Returns the EventTargetRef for the standard toolbox dispatcher.
+ * You typically would never need to use this, but there are some
+ * exotic apps that need to pick events off the event queue and call
+ * the dispatcher themselves. This allows you to do just that
+ * instead of calling RunApplicationEventLoop to handle it all.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * An EventTargetRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function GetEventDispatcherTarget: EventTargetRef; external name '_GetEventDispatcherTarget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetEventMonitorTarget()
+ *
+ * Summary:
+ * Returns the event monitor target.
+ *
+ * Discussion:
+ * The event monitor target is a special event target used to
+ * monitor user input events across all processes. When an event
+ * handler is installed on the event monitor target, the Carbon
+ * Event Manager examines the EventTypeSpec for user input event
+ * types, such as mouse-down, mouse-up, key-down, and so forth. It
+ * then requests that the WindowServer make copies of any of these
+ * events that are sent to any process, and deliver them to the
+ * current process also. These events are queued into the main
+ * threadÕs event queue, and during normal event dispatching are
+ * sent directly to the event handlers installed on the event
+ * monitor target. Monitored events are not sent through the normal
+ * event dispatching path for the current process; they will pass
+ * through the event dispatcher target, and will then be sent
+ * directly to the event monitor target.
+ *
+ * Handlers installed on the event monitor target will only receive
+ * events when the current application is inactive. When the current
+ * application is active, all event flow occurs through the event
+ * dispatcher target, and no events are sent to the event monitor
+ * target.
+ *
+ * Currently, the event monitor supports the following event kinds:
+ * kEventRawKeyDown, kEventRawKeyUp, kEventRawKeyRepeat,
+ * kEventRawKeyModifiersChanged, kEventMouseDown, kEventMouseUp,
+ * kEventMouseMoved, kEventMouseDragged, kEventMouseWheelMoved,
+ * kEventTabletPoint, and kEventTabletProximity.
+ *
+ * Note that both Carbon and Cocoa password edit text controls
+ * enable a secure input mode while the focus is on the control,
+ * which prevents keyboard events from being passed to other
+ * applications. This prevents the monitoring event target from
+ * being used to sniff password keystrokes.
+ *
+ * For added security, GetEventMonitorTarget requires that "Enable
+ * access for assistive devices" be checked in the Universal Access
+ * preference pane in order to monitor RawKeyDown, RawKeyUp, and
+ * RawKeyRepeat events. If this control is not checked, you can
+ * still install handlers for these events on the event monitor
+ * target, but no events of these types will be sent to your
+ * handler. Administrator privileges are required to enable this
+ * feature. You can determine whether this control is checked using
+ * the AXAPIEnabled API in AXUIElement.h.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * An EventTargetRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function GetEventMonitorTarget: EventTargetRef; external name '_GetEventMonitorTarget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+(*
+#define InstallApplicationEventHandler( handler, numTypes, list, userData, outHandlerRef ) \
+ InstallEventHandler( GetApplicationEventTarget(), (handler), (numTypes), (list), (userData), (outHandlerRef) )
+
+#define InstallHIObjectEventHandler( target, handler, numTypes, list, userData, outHandlerRef ) \
+ InstallEventHandler( HIObjectGetEventTarget( target ), (handler), (numTypes), (list), (userData), (outHandlerRef) )
+
+#define InstallWindowEventHandler( target, handler, numTypes, list, userData, outHandlerRef ) \
+ InstallEventHandler( GetWindowEventTarget( target ), (handler), (numTypes), (list), (userData), (outHandlerRef) )
+
+#define InstallControlEventHandler( target, handler, numTypes, list, userData, outHandlerRef ) \
+ InstallEventHandler( GetControlEventTarget( target ), (handler), (numTypes), (list), (userData), (outHandlerRef) )
+
+#define InstallMenuEventHandler( target, handler, numTypes, list, userData, outHandlerRef ) \
+ InstallEventHandler( GetMenuEventTarget( target ), (handler), (numTypes), (list), (userData), (outHandlerRef) )
+
+#define HIViewInstallEventHandler( target, handler, numTypes, list, userData, outHandlerRef ) \
+ InstallEventHandler( HIObjectGetEventTarget( (HIObjectRef) (target) ), (handler), (numTypes), (list), (userData), (outHandlerRef) )
+
+
+{
+ You can use the following macro in your code to allow you to set up an
+ event handler lazily. You pass the name of your event handler in. You should
+ use this with caution on Mac OS 9 systems since it could cause heap fragmentation.
+}
+#define DEFINE_ONE_SHOT_HANDLER_GETTER( x ) \
+EventHandlerUPP Get ## x ## UPP() \
+{ \
+ static EventHandlerUPP sHandler = NULL; \
+ \
+ if ( sHandler == NULL ) \
+ sHandler = NewEventHandlerUPP( x ); \
+ \
+ return sHandler; \
+}
+
+
+#define SendEventToApplication( e ) \
+ SendEventToEventTarget( (e), GetApplicationEventTarget() )
+
+#define SendEventToHIObject( e, t ) \
+ SendEventToEventTarget( (e), HIObjectGetEventTarget( t ) )
+
+#define SendEventToWindow( e, t ) \
+ SendEventToEventTarget( (e), GetWindowEventTarget( t ) )
+
+#define SendEventToControl( e, t ) \
+ SendEventToEventTarget( (e), GetControlEventTarget( t ) )
+
+#define SendEventToMenu( e, t ) \
+ SendEventToEventTarget( (e), GetMenuEventTarget( t ) )
+
+#define SendEventToUserFocus( e ) \
+ SendEventToEventTarget( (e), GetUserFocusEventTarget() )
+*)
+
+{======================================================================================}
+{ ¥ Command Routines }
+{======================================================================================}
+{
+ * ProcessHICommand()
+ *
+ * Summary:
+ * Sends a kEventCommandProcess event.
+ *
+ * Discussion:
+ * ProcessHICommand is a convenience function for dispatching
+ * kEventCommandProcesss events. Normally these events are created
+ * and dispatched automatically by the toolbox when a menu item or
+ * control is selected, but you may need to dispatch an event
+ * yourself at times. This API creates a CommandProcess event, adds
+ * the specified HICommand structure as an event parameter, and
+ * sends the event to the user focus target for handling.
+ *
+ * If you need to send a CommandProcess event to some other target,
+ * or you need to add other event parameters to the event besides
+ * the HICommand structure, it is correct and supported to simply
+ * create the event yourself and send it to the desired target,
+ * without using this API.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function ProcessHICommand( const (*var*) inCommand: HICommand ): OSStatus; external name '_ProcessHICommand';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{--------------------------------------------------------------------------------------}
+{ ¥ Event Loop Routines }
+{--------------------------------------------------------------------------------------}
+
+{
+ * RunApplicationEventLoop()
+ *
+ * Discussion:
+ * This routine is used as the main event loop for a Carbon
+ * Event-based application. Once entered, this function waits for
+ * events to arrive and dispatches them to your event handlers
+ * automatically.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure RunApplicationEventLoop; external name '_RunApplicationEventLoop';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * QuitApplicationEventLoop()
+ *
+ * Discussion:
+ * This routine is used to quit the RunApplicationEventLoop
+ * function. Typically, your application doesn't need to call this.
+ * If your application has the Quit menu item tagged with the
+ * kHICommandQuit Menu Command ID, the toolbox will automatically
+ * call this for your application, automatically terminating your
+ * event loop. If your application wants to do pre-processing before
+ * the event loop exits, it should intercept either the
+ * kHICommandQuit menu command, or the kEventApplicationQuit event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure QuitApplicationEventLoop; external name '_QuitApplicationEventLoop';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{--------------------------------------------------------------------------------------}
+{ ¥ Event Modality routines }
+{--------------------------------------------------------------------------------------}
+
+{
+ * RunAppModalLoopForWindow()
+ *
+ * Discussion:
+ * This routine is used as a replacement to ModalDialog to drive a
+ * Carbon Event-based modal dialog. Once called, this routine will
+ * not exit until QuitAppModalLoopForWindow is called. Calls to
+ * RunAppModalLoopForWindow can be nested, as long as each call is
+ * made on a different window. The window must be visible when
+ * calling RunAppModalLoopForWindow; otherwise, windowWrongStateErr
+ * is returned. In Mac OS X 10.0.x, RunAppModalLoopForWindow will
+ * fail to re-enable the menubar before exiting if you dispose of
+ * the window during the modal loop (for example, from a Carbon
+ * event handler). You can work around this bug by retaining the
+ * window before calling RunAppModalLoopForWindow, and releasing it
+ * afterwards.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window you wish to behave modally.
+ *
+ * Result:
+ * An operating system status code. windowWrongStateErr will be
+ * returned if the window is invisible.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function RunAppModalLoopForWindow( inWindow: WindowRef ): OSStatus; external name '_RunAppModalLoopForWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * QuitAppModalLoopForWindow()
+ *
+ * Discussion:
+ * This routine is used to quit a currently running call to
+ * RunAppModalLoopForWindow, i.e. it terminates a modal loop.
+ * Typically this would be called from a handler you have installed
+ * on the modal window in question when the user clicks the
+ * appropriate button, etc.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window for which to quit the modal state.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function QuitAppModalLoopForWindow( inWindow: WindowRef ): OSStatus; external name '_QuitAppModalLoopForWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * BeginAppModalStateForWindow()
+ *
+ * Discussion:
+ * This routine is a lower level routine than
+ * RunAppModalLoopForWindow. It can be used if you wish to enter an
+ * app modal state for a window, but need to control the event loop
+ * yourself for whatever reason. In most cases, you would use
+ * RunAppModalLoopForWindow. Once you begin your app modal state,
+ * the menu bar will disable and prepare for the modal situation.
+ * The window must be visible when calling
+ * BeginAppModalStateForWindow; otherwise, windowWrongStateErr is
+ * returned. Calls to BeginAppModalStateForWindow can be nested, as
+ * long as each call is made on a different window. In Mac OS 10.0.x
+ * and CarbonLib 1.3.1, BeginAppModalStateForWindow can only be
+ * called on a window once; future calls will return an error. This
+ * bug is fixed in Mac OS 10.1 and CarbonLib 1.4.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window you wish to behave modally.
+ *
+ * Result:
+ * An operating system status code. windowWrongStateErr will be
+ * returned if the window is invisible.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function BeginAppModalStateForWindow( inWindow: WindowRef ): OSStatus; external name '_BeginAppModalStateForWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * EndAppModalStateForWindow()
+ *
+ * Discussion:
+ * This routine ends an app modal state started with
+ * BeginAppModalStateForWindow.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window you wish to stop acting as app modal.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function EndAppModalStateForWindow( inWindow: WindowRef ): OSStatus; external name '_EndAppModalStateForWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{--------------------------------------------------------------------------------------}
+{ ¥ User Focus }
+{ The 'user focus' is where keyboard input goes. We also use the term 'key' applied }
+{ to windows to mean this. The user focus window is normally the active non-floating }
+{ window or dialog. It is possible to make a floater get the focus, however, by calling}
+{ SetUserFocusWindow. After that call, the event model will automatically route key }
+{ input to the active keyboard focus of that window, if any. Passing kUserFocusAuto }
+{ into the window parameter tells the toolbox to pick what it considers to be the best }
+{ candidate for focus. You should call this to restore focus, rather than getting the }
+{ focus, setting it to a special window, and then restoring to the saved focus. There }
+{ are cases, however, when you might want to restore to an explicit window, but the }
+{ typical usage should just be to restore to the kUserFocusAuto focus. }
+{ Keep in mind that setting the focus will only last until you restore focus, or the }
+{ user starts clicking in other windows. When that happens, the toolbox will auto- }
+{ redirect the user focus to a newly selected window. }
+{--------------------------------------------------------------------------------------}
+{ pick the most appropriate window for focus}
+const
+ kUserFocusAuto = WindowRef(-1);
+{
+ * SetUserFocusWindow()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetUserFocusWindow( inWindow: WindowRef ): OSStatus; external name '_SetUserFocusWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetUserFocusWindow()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetUserFocusWindow: WindowRef; external name '_GetUserFocusWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{--------------------------------------------------------------------------------------}
+{ ¥ Default/Cancel buttons }
+{ In our quest to eliminate the need for dialogs when using the new event model, we }
+{ have added the following routines which add dialog-like button control to normal }
+{ windows. With these routines, you can set the default and cancel buttons for a }
+{ window; these work just like the corresponding concepts in dialogs, and when }
+{ present, the standard toolbox handlers will handle keyboard input mapping to these }
+{ buttons. This means that pressing return or enter will 'press' the default button }
+{ and escape or command-period will 'press' the cancel button. }
+{--------------------------------------------------------------------------------------}
+
+{
+ * SetWindowDefaultButton()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowDefaultButton( inWindow: WindowRef; inControl: ControlRef { can be NULL } ): OSStatus; external name '_SetWindowDefaultButton';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowCancelButton()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowCancelButton( inWindow: WindowRef; inControl: ControlRef { can be NULL } ): OSStatus; external name '_SetWindowCancelButton';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowDefaultButton()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowDefaultButton( inWindow: WindowRef; var outControl: ControlRef ): OSStatus; external name '_GetWindowDefaultButton';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowCancelButton()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowCancelButton( inWindow: WindowRef; var outControl: ControlRef ): OSStatus; external name '_GetWindowCancelButton';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{--------------------------------------------------------------------------------------}
+{ ¥ Global HotKey API }
+{--------------------------------------------------------------------------------------}
+type
+ EventHotKeyIDPtr = ^EventHotKeyID;
+ EventHotKeyID = record
+ signature: OSType;
+ id: UInt32;
+ end;
+type
+ EventHotKeyRef = ^SInt32; { an opaque 32-bit type }
+{
+ * RegisterEventHotKey()
+ *
+ * Discussion:
+ * Registers a global hot key based on the virtual key code and
+ * modifiers you pass in. Only one such combination can exist for
+ * the current application, i.e. multiple entities in the same
+ * application cannot register for the same hot key combination. The
+ * same hot key can, however, be registered by multiple
+ * applications. This means that multiple applications can
+ * potentially be notified when a particular hot key is requested.
+ * This might not necessarily be desirable, but it is how it works
+ * at present.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inHotKeyCode:
+ * The virtual key code of the key to watch
+ *
+ * inHotKeyModifiers:
+ * The keyboard modifiers to look for. On Mac OS X 10.2 or
+ * earlier, this parameter must be non-zero, i.e. there must be a
+ * modifier specified. On Mac OS X 10.3 or later, you may pass
+ * zero.
+ *
+ * inHotKeyID:
+ * The application-specified hot key ID. You will receive this in
+ * the kEventHotKeyPressed event as the direct object parameter.
+ *
+ * inTarget:
+ * The target to notify when the hot key is pressed.
+ *
+ * inOptions:
+ * Currently unused. Pass 0 or face the consequences.
+ *
+ * outRef:
+ * The EventHotKeyRef that represents your new, shiny hot key. You
+ * need this if you later wish to unregister it.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function RegisterEventHotKey( inHotKeyCode: UInt32; inHotKeyModifiers: UInt32; inHotKeyID: EventHotKeyID; inTarget: EventTargetRef; inOptions: OptionBits; var outRef: EventHotKeyRef ): OSStatus; external name '_RegisterEventHotKey';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * UnregisterEventHotKey()
+ *
+ * Discussion:
+ * Unregisters a global hot key that was previously registered with
+ * the RegisterEventHotKey API. You do not need to unregister a hot
+ * key when your application terminates, the system will take care
+ * of that for you. This would be used if the user changes a hot key
+ * for something in your application - you would unregister the
+ * previous key and register your new key.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inHotKey:
+ * The EventHotKeyRef to unregister.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function UnregisterEventHotKey( inHotKey: EventHotKeyRef ): OSStatus; external name '_UnregisterEventHotKey';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * kHISymbolicHotKeyCode
+ *
+ * Discussion:
+ * A CFDictionaryRef key in a dictionary returned by
+ * CopySymbolicHotKeys. The value for this key is the virtual
+ * keycode of the hotkey, represented as a CFNumber.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHISymbolicHotKeyCode CFSTRP('kHISymbolicHotKeyCode')}
+{$endc}
+
+{
+ * kHISymbolicHotKeyModifiers
+ *
+ * Discussion:
+ * A CFDictionaryRef key in a dictionary returned by
+ * CopySymbolicHotKeys. The value for this key is the keyboard
+ * modifiers of the hotkey, represented as a CFNumber.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHISymbolicHotKeyModifiers CFSTRP('kHISymbolicHotKeyModifiers')}
+{$endc}
+
+{
+ * kHISymbolicHotKeyEnabled
+ *
+ * Discussion:
+ * A CFDictionaryRef key in a dictionary returned by
+ * CopySymbolicHotKeys. The value for this key is the enable state
+ * of the hotkey, represented as a CFBoolean.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHISymbolicHotKeyEnabled CFSTRP('kHISymbolicHotKeyEnabled')}
+{$endc}
+{
+ * CopySymbolicHotKeys()
+ *
+ * Summary:
+ * Returns an array of CFDictionaryRefs containing information about
+ * the system-wide symbolic hotkeys that are defined in the Keyboard
+ * preferences pane.
+ *
+ * Discussion:
+ * The hotkey info returned by this API describes the system-wide
+ * hotkeys such as the Screen Capture, Universal Access, and
+ * Keyboard Navigation keys. It does not include customized
+ * application-specific command keys.
+ *
+ * Each array entry is a CFDictionaryRef, and each dictionary
+ * contains information about a single hotkey. There is currently no
+ * way to determine which hotkey in the Keyboards preference pane
+ * corresponds to a specific dictionary. Each dictionary contains
+ * the following keys: kHISymbolicHotKeyCode,
+ * kHISymbolicHotKeyModifiers, and kHISymbolicHotKeyEnabled. The
+ * array must be released by the caller; the dictionaries do not
+ * need to be released (they will be auto-released when the array is
+ * released).
+ *
+ * Note that this API will require O(number of hotkeys) to run, and
+ * the number of hotkeys will increase in the future, so do not call
+ * this API unnecessarily or in highly performance-sensitive code.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * outHotKeyArray:
+ * On exit, contains an array of the values of all symbolic hot
+ * keys.
+ *
+ * Result:
+ * An operating system result code; currently, noErr and memFullErr
+ * may be returned.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function CopySymbolicHotKeys( var outHotKeyArray: CFArrayRef ): OSStatus; external name '_CopySymbolicHotKeys';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * Summary:
+ * Parameters to the PushSymbolicHotKeyMode SPI.
+ }
+const
+{
+ * All hotkeys are enabled.
+ }
+ kHIHotKeyModeAllEnabled = 0;
+
+ {
+ * All hotkeys are disabled.
+ }
+ kHIHotKeyModeAllDisabled = 1 shl 0;
+
+ {
+ * All hotkeys are disabled except for the Universal Access hotkeys
+ * (zooming, white-on-black, and enhanced contrast).
+ }
+ kHIHotKeyModeAllDisabledExceptUniversalAccess = 1 shl 1;
+
+{
+ * PushSymbolicHotKeyMode()
+ *
+ * Summary:
+ * Sets a new mode for enabling or disabling symbolic hotkeys.
+ *
+ * Discussion:
+ * The Event Manager keeps a stack of hotkey modes that have been
+ * requested using the PushSymbolicHotKeyMode API. The most recently
+ * pushed mode is the mode that is currently in use.
+ *
+ * Because disabling hotkeys can significantly affect the usability
+ * of Mac OS X, applications are only allowed to disable hotkeys if
+ * the "Enable access for assistive devices" checkbox is checked in
+ * the Universal Access preference pane. If this feature is not
+ * enabled, PushSymbolicHotKeyMode will still push the mode request
+ * onto the mode stack and return a valid token, but the actual
+ * hotkey mode will not change.
+ *
+ * If an application that pushes a new hotkey mode is frontmost,
+ * then the new mode (if it disables any hotkeys) will only be
+ * active while the application remains frontmost. If the
+ * application is deactivated or exits without reenabling hotkeys,
+ * the hotkey mode will automatically revert to the previous mode.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inOptions:
+ * The symbolic hotkey mode that is requested.
+ *
+ * Result:
+ * A token that should be passed to PopSymbolicHotKeyMode to remove
+ * this mode request from the stack.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function PushSymbolicHotKeyMode( inOptions: OptionBits ): UnivPtr; external name '_PushSymbolicHotKeyMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * PopSymbolicHotKeyMode()
+ *
+ * Summary:
+ * Removes a hotkey mode request from the hotkey mode stack.
+ *
+ * Discussion:
+ * This API removes a mode request from the mode stack. If this
+ * request was the topmost request in the stack, the actual hotkey
+ * mode will change to the next request in the stack; if there are
+ * other mode requests on top of this one on the stack, the actual
+ * mode will not change.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inToken:
+ * A hotkey mode token that was returned by PushSymbolicHotKeyMode.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+procedure PopSymbolicHotKeyMode( inToken: UnivPtr ); external name '_PopSymbolicHotKeyMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * GetSymbolicHotKeyMode()
+ *
+ * Summary:
+ * Returns the current hotkey mode in use.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * The mode request at the top of the hotkey mode stack. If there
+ * are no requests on the stack, it returns zero, indicating that
+ * hotkeys are currently enabled.
+ *
+ * Note that even if hotkeys are enabled in the current process,
+ * hotkeys can still be disabled for the current user session if
+ * they are disabled by some other process.
+ *
+ * Note that if "Enable access for assistive devices" is not checked
+ * in the Universal Access preference pane, then even if this API
+ * returns a non-zero value, the actual hotkey mode will still be
+ * that all hotkeys are enabled.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function GetSymbolicHotKeyMode: OptionBits; external name '_GetSymbolicHotKeyMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{--------------------------------------------------------------------------------------}
+{ Ink Events }
+{--------------------------------------------------------------------------------------}
+const
+ kEventParamInkTextRef = $69777264 (* 'iwrd' *); { typePtr }
+ kEventParamInkKeyboardShortcut = $696B6264 (* 'ikbd' *); { typeBoolean }
+ kEventParamInkGestureKind = $676B6E64 (* 'gknd' *); { typeUInt32 }
+ kEventParamInkGestureBounds = $67626E64 (* 'gbnd' *); { typeHIRect }
+ kEventParamInkGestureHotspot = $67686F74 (* 'ghot' *); { typeHIPoint }
+
+
+{
+ * kEventClassInk / kEventInkPoint
+ *
+ * Summary:
+ * A mouse event will be handled as an Ink point and used for
+ * recognition.
+ *
+ * Discussion:
+ * The Ink manager has determined that the mouse event in
+ * kEventParamEventRef should be used for recognition. If the
+ * application handles the event and returns noErr, then the Ink
+ * Manager does nothing further with the mouse event. If the
+ * application returns any other value (including
+ * eventNotHandledErr), the point will be processed normally by the
+ * Ink Manager.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamEventRef (in, typeEventRef)
+ * The mouse event being handled.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventInkPoint = 10;
+
+
+{
+ * kEventClassInk / kEventInkGesture
+ *
+ * Summary:
+ * An Ink gesture has been generated.
+ *
+ * Discussion:
+ * This Ink event is sent when the Ink Manager has recognized the
+ * current ink phrase as one of the known system gestures.
+ * Applications can install a handler for these events, to provide
+ * targeted gestures and support for context-dependent (tentative)
+ * gestures. Applications should return noErr if they handled the
+ * gesture. If the gesture was context-dependent and does not apply
+ * to the current situation, then return eventNotHandledErr.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamInkGestureKind (in, typeUInt32)
+ * Kind of gesture.
+ *
+ * --> kEventParamInkGestureBounds (in, typeHIRect)
+ * Bounds of the gesture in global coordinates.
+ *
+ * --> kEventParamInkGestureHotspot (in, typeHIPoint)
+ * Hotspot for the gesture in global coordinates.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventInkGesture = 11;
+
+
+{
+ * kEventClassInk / kEventInkText
+ *
+ * Summary:
+ * A recognized word from the Ink Manager.
+ *
+ * Discussion:
+ * The Ink Manager has recognized a word. kEventParamInkTextRef
+ * contains the InkTextRef with all of the information about the
+ * word. See Ink.h for more information.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamInkTextRef (in, typePtr)
+ * The InkTextRef containing the data for the recognized word.
+ *
+ * --> kEventParamInkKeyboardShortcut (in, typeBoolean)
+ * Is this likely a keyboard shortcut? (Command or Control key
+ * is held down and the top-choice alternate text is a single
+ * character.)
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventInkText = 12;
+
+
+{--------------------------------------------------------------------------------------}
+{ ¥ DEPRECATED }
+{ All functions below this point are either deprecated (they continue to function }
+{ but are not the most modern nor most efficient solution to a problem), or they are }
+{ completely unavailable on Mac OS X. }
+{--------------------------------------------------------------------------------------}
+
+{--------------------------------------------------------------------------------------}
+{ ¥ MouseTrackingRegions }
+{--------------------------------------------------------------------------------------}
+
+{
+ * MouseTrackingRef
+ *
+ * Discussion:
+ * MouseTrackingRef *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Applications should use HIViewTrackingAreas, described in
+ * HIView.h, instead of MouseTrackingRegions and their associated
+ * settings.
+ *
+ * A MouseTrackingRef is an object that controls the generation of
+ * mouse-enter and mouse-exit events. When the user moves the mouse
+ * into a tracking region, a kEventClassMouse/kEventMouseEntered
+ * event is sent to the app. When the user moves the mouse out of a
+ * tracking region, an event of type
+ * kEventClassMouse/kEventMouseExited is sent.
+ *
+ * Mouse tracking regions are uniquely identified within the scope
+ * of a window by a MouseTrackingRegionID which is a client
+ * signature/id pair. The client signature should be any unique
+ * four-character constant that does not have entirely lowercase
+ * characters; a good choice is the usual DTS-registered creator
+ * OSType, but you can use any constant that you like.
+ *
+ * Mouse tracking regions can overlap, but are not exclusive. Mouse
+ * motion events are generated for each of the tracking areas
+ * intersected by the mouse.
+ *
+ * Mouse tracking regions are initially enabled. You can explicitly
+ * disable a mouse tracking area to prevent mouse-enter/exit events
+ * from being generated.
+ *
+ * Unlike global mouse-moved events, mouse-enter and mouse-exit
+ * events are generated while your app is in the background. If this
+ * is not considered desirable, disable the tracking areas while the
+ * application is in the background.
+ *
+ * MouseTrackingRefs become invalid when the window that they are
+ * bound to is disposed.
+ }
+type
+ MouseTrackingRef = ^SInt32; { an opaque 32-bit type }
+
+
+{
+ * MouseTrackingOptions
+ *
+ * Discussion:
+ * MouseTrackingOptions *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Applications should use HIViewTrackingAreas, described in
+ * HIView.h, instead of MouseTrackingRegions and their associated
+ * settings.
+ *
+ * These values define how the userÕs region is handled by the Mouse
+ * Tracking Region API. They define the behavior throughout the life
+ * of the Mouse Tracking Region. For example, if a region is created
+ * with the option of kMouseTrackingOptionsGlobalClip then all
+ * operations on this region will be interpreted in global
+ * coordinates and will be clipped to the owning windowÕs structure.
+ }
+type
+ MouseTrackingOptions = UInt32;
+const
+{
+ * The region is expected in local coordinates and mouse movement
+ * tracking is clipped to the owning windowÕs content region.
+ }
+ kMouseTrackingOptionsLocalClip = 0;
+
+ {
+ * The region is expected in global coordinates and mouse movement
+ * tracking is clipped to the owning windowÕs structure region.
+ }
+ kMouseTrackingOptionsGlobalClip = 1;
+
+ {
+ * Standard options. The region will be handled in local coordinates
+ * and remain clipped against the windows content region.
+ }
+ kMouseTrackingOptionsStandard = kMouseTrackingOptionsLocalClip;
+
+type
+ MouseTrackingRegionID = record
+ signature: OSType;
+ id: SInt32;
+ end;
+{ Creation}
+
+{
+ * CreateMouseTrackingRegion() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use HIView-based tracking areas instead of MouseTrackingRegions.
+ * In this case, use HIViewNewTrackingArea(), defined in HIView.h,
+ * instead of CreateMouseTrackingRegion().
+ *
+ * Discussion:
+ * Creates a mouse tracking region and installs it into the window
+ * system.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window that will contain the created region.
+ *
+ * inRegion:
+ * The region for which you will receive entered/exit events.
+ *
+ * inClip:
+ * A region to clip inRegion against (can be NULL).
+ *
+ * inOptions:
+ * The options which define whether inRegion is given in global or
+ * local coordinates. If local coordinates are used, inRegion will
+ * be clipped against the window's current content region; if
+ * global coordinates are used, inRegion will be clipped against
+ * the window's current structure region. All clipping occurs
+ * against the regions as they are at the moment when the tracking
+ * region is created; changes to the window content or structure
+ * regions after the tracking region is created will not affect
+ * the tracking region.
+ *
+ * inID:
+ * The signature/id pair which uniquely defines this region. Note
+ * that if you are creating both LocalClip and GlobalClip tracking
+ * regions for a given window, the global regions must use a
+ * different inID.signature value from the local regions.
+ *
+ * inRefCon:
+ * Any user defined value. This value can be retrieved later by
+ * calling GetMouseTrackingRegionRefCon on the MouseTrackingRef.
+ *
+ * inTargetToNotify:
+ * The event target that should receive kEventMouseEntered/Exited
+ * events for this tracking region. If NULL, the windowÕs event
+ * target receives these events.
+ *
+ * outTrackingRef:
+ * A reference to the newly created mouse tracking region. This
+ * reference will also be provided in the
+ * kEventMouseEntered/Exited events sent to your event target.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateMouseTrackingRegion( inWindow: WindowRef; inRegion: RgnHandle; inClip: RgnHandle { can be NULL }; inOptions: MouseTrackingOptions; inID: MouseTrackingRegionID; inRefCon: UnivPtr; inTargetToNotify: EventTargetRef { can be NULL }; var outTrackingRef: MouseTrackingRef ): OSStatus; external name '_CreateMouseTrackingRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * RetainMouseTrackingRegion() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use HIView-based tracking areas, described in HIView.h, instead
+ * of MouseTrackingRegions.
+ *
+ * Discussion:
+ * Retains the MouseTrackingRef.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMouseRef:
+ * A valid MouseTrackingRef to retain.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function RetainMouseTrackingRegion( inMouseRef: MouseTrackingRef ): OSStatus; external name '_RetainMouseTrackingRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * ReleaseMouseTrackingRegion() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use HIView-based tracking areas instead of MouseTrackingRegions.
+ * In this case, use HIViewDisposeTrackingArea(), defined in
+ * HIView.h, instead of ReleaseMouseTrackingRegion().
+ *
+ * Discussion:
+ * Releases the MouseTrackingRef. Since mouse tracking regions are
+ * bound to a window, they are automatically released when the
+ * window is disposed of.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMouseRef:
+ * A valid MouseTrackingRef to release.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function ReleaseMouseTrackingRegion( inMouseRef: MouseTrackingRef ): OSStatus; external name '_ReleaseMouseTrackingRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * ChangeMouseTrackingRegion() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use HIView-based tracking areas instead of MouseTrackingRegions.
+ * In this case, use HIViewChangeTrackingArea(), defined in
+ * HIView.h, instead of ChangeMouseTrackingRegion().
+ *
+ * Discussion:
+ * Changes the MouseTrackingRefs region and optionally, its clip.
+ * This will not change the enabled state or options of the region.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMouseRef:
+ * A valid MouseTrackingRef to modify.
+ *
+ * inRegion:
+ * The region to set as the mouse tracking region.
+ *
+ * inClip:
+ * An optional clip to clip inRegion against (may be NULL).
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function ChangeMouseTrackingRegion( inMouseRef: MouseTrackingRef; inRegion: RgnHandle; inClip: RgnHandle { can be NULL } ): OSStatus; external name '_ChangeMouseTrackingRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * ClipMouseTrackingRegion() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use HIView-based tracking areas, described in HIView.h, instead
+ * of MouseTrackingRegions.
+ *
+ * Discussion:
+ * Adjust the region to clip the MouseTrackingRef against. This can
+ * be used in the case where a window is resized or when a
+ * previously obscured region becomes exposed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMouseRef:
+ * A valid MouseTrackingRef to adjust.
+ *
+ * inRegion:
+ * A new region to clip inMouseRef against (can be NULL). If NULL,
+ * standard clipping will be provided.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function ClipMouseTrackingRegion( inMouseRef: MouseTrackingRef; inRegion: RgnHandle ): OSStatus; external name '_ClipMouseTrackingRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Accessors}
+
+{
+ * GetMouseTrackingRegionID() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use HIView-based tracking areas instead of MouseTrackingRegions.
+ * In this case, use HIViewGetTrackingAreaID(), defined in HIView.h,
+ * instead of GetMouseTrackingRegionID().
+ *
+ * Discussion:
+ * Retrieves the MouseTrackingRegionID of the given
+ * MouseTrackingRef. Can be used to determine if the region belongs
+ * to your app, and if so, which region it is.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMouseRef:
+ * A valid MouseTrackingRef from which to obtain the
+ * MouseTrackingRegionID.
+ *
+ * outID:
+ * Receives the MouseTrackingRegionID.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMouseTrackingRegionID( inMouseRef: MouseTrackingRef; var outID: MouseTrackingRegionID ): OSStatus; external name '_GetMouseTrackingRegionID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * GetMouseTrackingRegionRefCon() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use HIView-based tracking areas, described in HIView.h, instead
+ * of MouseTrackingRegions.
+ *
+ * Discussion:
+ * Retrieves the RefCon from the given mouse tracking region.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMouseRef:
+ * A valid MouseTrackingRef from which to obtain the refcon.
+ *
+ * outRefCon:
+ * Receives the refcon that was provided to
+ * CreateMouseTrackingRegion.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetMouseTrackingRegionRefCon( inMouseRef: MouseTrackingRef; var outRefCon: UnivPtr ): OSStatus; external name '_GetMouseTrackingRegionRefCon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Geometry}
+
+{
+ * MoveMouseTrackingRegion() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use HIView-based tracking areas, described in HIView.h, instead
+ * of MouseTrackingRegions.
+ *
+ * Discussion:
+ * Moves the given mouse tracking region by the specified delta. It
+ * can also optionally reclip the region, such as if the region is
+ * scrolled within a pane.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMouseRef:
+ * A valid MouseTrackingRef to move.
+ *
+ * deltaH:
+ * The horizontal delta to move the MouseTrackingRef.
+ *
+ * deltaV:
+ * The vertical delta to move the MouseTrackingRef.
+ *
+ * inClip:
+ * A region to optionally clip against (can be NULL).
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function MoveMouseTrackingRegion( inMouseRef: MouseTrackingRef; deltaH: SInt16; deltaV: SInt16; inClip: RgnHandle { can be NULL } ): OSStatus; external name '_MoveMouseTrackingRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Enable/disable}
+
+{
+ * SetMouseTrackingRegionEnabled() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use HIView-based tracking areas, described in HIView.h, instead
+ * of MouseTrackingRegions.
+ *
+ * Discussion:
+ * Set the enabled state of the mouse tracking region
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMouseRef:
+ * A valid MouseTrackingRef to modify.
+ *
+ * inEnabled:
+ * Indicate whether this region should be enabled (true) or
+ * disabled (false).
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function SetMouseTrackingRegionEnabled( inMouseRef: MouseTrackingRef; inEnabled: Boolean ): OSStatus; external name '_SetMouseTrackingRegionEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+
+ Namespace operators
+}
+
+{
+ * ClipWindowMouseTrackingRegions() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use HIView-based tracking areas, described in HIView.h, instead
+ * of MouseTrackingRegions.
+ *
+ * Discussion:
+ * Bulk clip operation to modify the region that all mouse tracking
+ * regions with the given signature will be clipped against.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window that contains the regions with the given signature
+ * that you are interested in updating.
+ *
+ * inSignature:
+ * The signature of the mouse tracking regions that will be
+ * reclipped.
+ *
+ * inClip:
+ * The region to clip all of the regions against (can be NULL). If
+ * NULL, standard clipping will be provided.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function ClipWindowMouseTrackingRegions( inWindow: WindowRef; inSignature: OSType; inClip: RgnHandle { can be NULL } ): OSStatus; external name '_ClipWindowMouseTrackingRegions';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * MoveWindowMouseTrackingRegions() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use HIView-based tracking areas, described in HIView.h, instead
+ * of MouseTrackingRegions.
+ *
+ * Discussion:
+ * Bulk move operation to move all regions with the given signature
+ * the specified delta. An optional clip can be provided to reclip
+ * the regions against, such as in the case of the regions are being
+ * scrolled within a pane.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window that contains the regions with the given signature
+ * that you are interested in moving.
+ *
+ * inSignature:
+ * The signature of the mouse tracking regions that will be moved.
+ *
+ * deltaH:
+ * The horizontal delta to move all of the regions.
+ *
+ * deltaV:
+ * The vertical delta to move all of the regions.
+ *
+ * inClip:
+ * An optional clipping region to clip against (can be NULL). If
+ * NULL, standard clipping will be provided.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function MoveWindowMouseTrackingRegions( inWindow: WindowRef; inSignature: OSType; deltaH: SInt16; deltaV: SInt16; inClip: RgnHandle { can be NULL } ): OSStatus; external name '_MoveWindowMouseTrackingRegions';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * SetWindowMouseTrackingRegionsEnabled() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use HIView-based tracking areas, described in HIView.h, instead
+ * of MouseTrackingRegions.
+ *
+ * Discussion:
+ * Bulk set the enabled state of the mouse tracking regions of the
+ * given signature belonging to the given window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window which contains the mouse tracking regions that you
+ * are interested in modifying.
+ *
+ * inSignature:
+ * The signature of the mouse tracking regions whose enabled state
+ * you wish to modify.
+ *
+ * inEnabled:
+ * Indicates whether the regions should be enabled (true) or
+ * disabled (false).
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowMouseTrackingRegionsEnabled( inWindow: WindowRef; inSignature: OSType; inEnabled: Boolean ): OSStatus; external name '_SetWindowMouseTrackingRegionsEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * ReleaseWindowMouseTrackingRegions() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use HIView-based tracking areas, described in HIView.h, instead
+ * of MouseTrackingRegions.
+ *
+ * Discussion:
+ * Bulk release the mouse tracking regions with the given signature.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to which the regions to be released belong.
+ *
+ * inSignature:
+ * The signature of the regions to be released.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function ReleaseWindowMouseTrackingRegions( inWindow: WindowRef; inSignature: OSType ): OSStatus; external name '_ReleaseWindowMouseTrackingRegions';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{======================================================================================}
+{ EVENT-BASED OBJECT CLASSES }
+{ *** DEPRECATED *** }
+{ Here it is - the replacement for classic defprocs. This is also a convenient way }
+{ to create toolbox objects (windows, etc.) that have a specific behavior without }
+{ installing handlers on each instance of the object. With a toolbox object class, }
+{ you register your class, then use special creation routines to create objects of }
+{ that class. The event handlers are automatically installed and ready to go. }
+{ Note that on Mac OS X 10.2 and later, we recommend using the HIObject API }
+{ HIObjectRegisterSubclass rather than RegisterToolboxObjectClass. This API is }
+{ considered deprecated on Mac OS X 10.2 and later. }
+{======================================================================================}
+type
+ ToolboxObjectClassRef = ^SInt32; { an opaque 32-bit type }
+{
+ * RegisterToolboxObjectClass()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function RegisterToolboxObjectClass( inClassID: CFStringRef; inBaseClass: ToolboxObjectClassRef { can be NULL }; inNumEvents: UInt32; {const} inEventList: {variable-size-array} EventTypeSpecPtr; inEventHandler: EventHandlerUPP; inEventHandlerData: UnivPtr; var outClassRef: ToolboxObjectClassRef ): OSStatus; external name '_RegisterToolboxObjectClass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * UnregisterToolboxObjectClass()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function UnregisterToolboxObjectClass( inClassRef: ToolboxObjectClassRef ): OSStatus; external name '_UnregisterToolboxObjectClass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{--------------------------------------------------------------------------------------}
+{ Obsolete constant names - use the new ones. }
+{--------------------------------------------------------------------------------------}
+const
+ kEventParamTabletPointerRec = $74627263 (* 'tbrc' *); { typeTabletPointerRec -- deprecated, for compatibility only}
+ typeTabletPointerRec = $74627263 (* 'tbrc' *); { kEventParamTabletPointerRec -- deprecated, for compatibility only}
+
+const
+ kEventWindowDefDrawFrame = kEventWindowDrawFrame;
+ kEventWindowDefDrawPart = kEventWindowDrawPart;
+ kEventWindowDefGetRegion = kEventWindowGetRegion;
+ kEventWindowDefHitTest = kEventWindowHitTest;
+ kEventWindowDefInit = kEventWindowInit;
+ kEventWindowDefDispose = kEventWindowDispose;
+ kEventWindowDefDragHilite = kEventWindowDragHilite;
+ kEventWindowDefModified = kEventWindowModified;
+ kEventWindowDefSetupProxyDragImage = kEventWindowSetupProxyDragImage;
+ kEventWindowDefStateChanged = kEventWindowStateChanged;
+ kEventWindowDefMeasureTitle = kEventWindowMeasureTitle;
+ kEventWindowDefDrawGrowBox = kEventWindowDrawGrowBox;
+ kEventWindowDefGetGrowImageRegion = kEventWindowGetGrowImageRegion;
+
+
+const
+ kEventClassEPPC = kEventClassAppleEvent;
+ kEventHighLevelEvent = kEventAppleEvent;
+
+const
+ kEventUpdateActiveInputArea = kEventTextInputUpdateActiveInputArea;
+ kEventUnicodeForKeyEvent = kEventTextInputUnicodeForKeyEvent;
+ kEventOffsetToPos = kEventTextInputOffsetToPos;
+ kEventPosToOffset = kEventTextInputPosToOffset;
+ kEventShowHideBottomWindow = kEventTextInputShowHideBottomWindow;
+ kEventGetSelectedText = kEventTextInputGetSelectedText;
+
+const
+ kEventProcessCommand = kEventCommandProcess;
+ kEventTabletPointer = kEventTabletPoint;
+
+{--------------------------------------------------------------------------------------}
+{ Obsolete typedefs. }
+{--------------------------------------------------------------------------------------}
+
+type
+ EventClassID = UInt32;
+type
+ EventClass = UInt32;
+type
+ EventType = UInt32;
+{ OBSOLETE CONSTANTS}
+const
+ kMouseTrackingMousePressed = kMouseTrackingMouseDown;
+ kMouseTrackingMouseReleased = kMouseTrackingMouseUp;
+
+const
+ kEventControlGetSubviewForMouseEvent = kEventControlInterceptSubviewClick;
+
+
+
+
+{unit FinderRegistry}
+{
+ File: FinderRegistry.p
+
+ Contains: Data types for Finder AppleEvents
+
+ Version: Technology: Mac OS 8
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+{
+ //////////////////////////////////////
+ Finder Suite
+ //////////////////////////////////////
+}
+
+{
+ The old Finder Event suite was 'FNDR'
+ The new suite is 'fndr'
+}
+
+const
+ kAEFinderSuite = $666E6472 (* 'fndr' *);
+
+ {
+ //////////////////////////////////////
+ Finder Events
+ //////////////////////////////////////
+ }
+ kAECleanUp = $66636C75 (* 'fclu' *);
+ kAEEject = $656A6374 (* 'ejct' *);
+ kAEEmpty = $656D7074 (* 'empt' *);
+ kAEErase = $66657261 (* 'fera' *);
+ kAEGestalt = $6773746C (* 'gstl' *);
+ kAEPutAway = $70747779 (* 'ptwy' *);
+ kAERebuildDesktopDB = $72646462 (* 'rddb' *);
+ kAESync = $66757064 (* 'fupd' *);
+ kAEInterceptOpen = $666F706E (* 'fopn' *);
+
+ { "Sort" from the database suite: }
+ kAEDatabaseSuite = $44415441 (* 'DATA' *);
+ kAESort = $534F5254 (* 'SORT' *);
+
+ {
+ ////////////////////////////////////////////////////////////////////////
+ Classes
+ Note: all classes are defined up front so that the property definitions
+ can reference classes.
+ ////////////////////////////////////////////////////////////////////////
+ }
+
+ cInternalFinderObject = $6F626A20 (* 'obj ' *); { cReference - used to distinguish objects used inside the Finder only }
+
+ {
+ Main Finder class definitions
+ Indentation implies object model hierarchy
+ }
+ { We do not use class cItem from AERegistry.r. Instead our class Item is a cObject }
+ { cItem = 'citm', // defined in AERegistry.r }
+ { cFile = 'file', // defined in AERegistry.r }
+ cAliasFile = $616C6961 (* 'alia' *);
+ cApplicationFile = $61707066 (* 'appf' *);
+ cControlPanelFile = $63636476 (* 'ccdv' *);
+ cDeskAccessoryFile = $64616669 (* 'dafi' *);
+ cDocumentFile = $646F6366 (* 'docf' *);
+ cFontFile = $666E7466 (* 'fntf' *);
+ cSoundFile = $736E6466 (* 'sndf' *);
+ cClippingFile = $636C7066 (* 'clpf' *);
+ cContainer = $63746E72 (* 'ctnr' *);
+ cDesktop = $6364736B (* 'cdsk' *);
+ cSharableContainer = $73637472 (* 'sctr' *);
+ cDisk = $63646973 (* 'cdis' *);
+ cFolder = $63666F6C (* 'cfol' *);
+ cSuitcase = $73746373 (* 'stcs' *);
+ cAccessorySuitcase = $64737574 (* 'dsut' *);
+ cFontSuitcase = $66737574 (* 'fsut' *);
+ cTrash = $63747273 (* 'ctrs' *);
+ cDesktopPrinter = $64736B70 (* 'dskp' *);
+ cPackage = $7061636B (* 'pack' *);
+ cContentSpace = $64776E64 (* 'dwnd' *); { cWindow = 'cwin', // defined in AERegistry.r }
+ cContainerWindow = $63776E64 (* 'cwnd' *);
+ cInfoWindow = $69776E64 (* 'iwnd' *);
+ cSharingWindow = $73776E64 (* 'swnd' *);
+ cStatusWindow = $71776E64 (* 'qwnd' *);
+ cClippingWindow = $6C776E64 (* 'lwnd' *);
+ cPreferencesWindow = $70776E64 (* 'pwnd' *);
+ cDTPWindow = $64747077 (* 'dtpw' *);
+ cProcess = $70726373 (* 'prcs' *);
+ cAccessoryProcess = $70636461 (* 'pcda' *);
+ cApplicationProcess = $70636170 (* 'pcap' *);
+ cGroup = $73677270 (* 'sgrp' *);
+ cUser = $63757365 (* 'cuse' *); { cApplication = 'capp', // defined in AERegistry.r }
+ cSharingPrivileges = $70726976 (* 'priv' *);
+ cPreferences = $63707266 (* 'cprf' *);
+ cLabel = $636C626C (* 'clbl' *);
+ cSound = $736E6420 (* 'snd ' *);
+ cAliasList = $616C7374 (* 'alst' *);
+ cSpecialFolders = $7370666C (* 'spfl' *); { For use by viewer search engines: }
+ cOnlineDisk = $636F6473 (* 'cods' *);
+ cOnlineLocalDisk = $636C6473 (* 'clds' *);
+ cOnlineRemoteDisk = $63726473 (* 'crds' *); { Miscellaneous class definitions }
+ cEntireContents = $65637473 (* 'ects' *);
+ cIconFamily = $6966616D (* 'ifam' *);
+
+
+ {
+ //////////////////////////////////////
+ Properties
+ //////////////////////////////////////
+ }
+
+ { Properties of class cItem (really cObject) }
+ { pBounds = 'pbnd', // defined in AERegistry.r }
+ pComment = $636F6D74 (* 'comt' *);
+ pContainer = $63746E72 (* 'ctnr' *);
+ pContentSpace = $64776E64 (* 'dwnd' *);
+ pCreationDateOld = $63727464 (* 'crtd' *); { to support pre-Finder 8 scripts }
+ pCreationDate = $61736364 (* 'ascd' *); { from File Commands OSAX }
+ pDescription = $64736372 (* 'dscr' *);
+ pDisk = $63646973 (* 'cdis' *);
+ pFolderOld = $63666F6C (* 'cfol' *); { to support pre-Finder 8 scripts }
+ pFolder = $61736472 (* 'asdr' *); { from File Commands OSAX }
+ pIconBitmap = $69696D67 (* 'iimg' *); { pID = 'ID ', // defined in AERegistry.r }
+ pInfoWindow = $69776E64 (* 'iwnd' *);
+ pKind = $6B696E64 (* 'kind' *);
+ pLabelIndex = $6C616269 (* 'labi' *);
+ pModificationDateOld = $6D6F6464 (* 'modd' *); { to support pre-Finder 8 scripts }
+ pModificationDate = $61736D6F (* 'asmo' *); { from File Commands OSAX }
+ { pName = 'pnam', // defined in AERegistry.r }
+ pPhysicalSize = $70687973 (* 'phys' *);
+ pPosition = $706F736E (* 'posn' *);
+ pIsSelected = $6973736C (* 'issl' *);
+ pSize = $7074737A (* 'ptsz' *); { pPointSize defined in AERegistry.r }
+ pWindow = $6377696E (* 'cwin' *);
+ pPreferencesWindow = $70776E64 (* 'pwnd' *);
+
+
+ { Properties of class cFile (subclass of cItem) }
+ pFileCreator = $66637274 (* 'fcrt' *);
+ pFileType = $61737479 (* 'asty' *); { from File Commands OSAX }
+ pFileTypeOld = $66697470 (* 'fitp' *); { to support pre-Finder 8 scripts }
+ pIsLocked = $61736C6B (* 'aslk' *); { from File Commands OSAX }
+ pIsLockedOld = $69736C6B (* 'islk' *); { to support pre-Finder 8 scripts }
+ { pIsStationeryPad = 'pspd', // defined in AERegistry.r }
+ { pVersion = 'vers', // defined in AERegistry.r }
+ pProductVersion = $76657232 (* 'ver2' *);
+
+
+ { Properties of class cAliasFile (subclass of cFile) }
+ pOriginalItem = $6F726967 (* 'orig' *);
+
+ { Properties of class cApplicationFile (subclass of cFile) }
+ pMinAppPartition = $6D707274 (* 'mprt' *);
+ pAppPartition = $61707074 (* 'appt' *);
+ pSuggestedAppPartition = $73707274 (* 'sprt' *);
+ pIsScriptable = $69736162 (* 'isab' *);
+
+ { Properties of class cURLFile (subclass of cFile) }
+ pInternetLocation = $696C6F63 (* 'iloc' *);
+
+ { Properties of class cSoundFile (subclass of cFile) }
+ pSound = $736E6420 (* 'snd ' *);
+
+
+ {
+ Properties of class cControlPanel (Views CP only) (subclass of cFile)
+ Note: the other view-like preference settings are not available in the Views
+ control panel. These properties are only offered here for backward compatability.
+ To set the full range of Finder Preferences, use the Preferences object.
+ }
+ pShowFolderSize = $7366737A (* 'sfsz' *); { Moved to a per-folder basis in Finder 8.0 HIS }
+ pShowComment = $73636F6D (* 'scom' *); { Moved to a per-folder basis in Finder 8.0 HIS }
+ pShowDate = $73646174 (* 'sdat' *); { Moved to a per-folder basis in Finder 8.0 HIS }
+ pShowCreationDate = $73636461 (* 'scda' *); { Moved to a per-folder basis in Finder 8.0 HIS }
+ pShowKind = $736B6E64 (* 'sknd' *); { Moved to a per-folder basis in Finder 8.0 HIS }
+ pShowLabel = $736C626C (* 'slbl' *); { Moved to a per-folder basis in Finder 8.0 HIS }
+ pShowSize = $7373697A (* 'ssiz' *); { Moved to a per-folder basis in Finder 8.0 HIS }
+ pShowVersion = $73767273 (* 'svrs' *); { Moved to a per-folder basis in Finder 8.0 HIS }
+ pSortDirection = $736F7264 (* 'sord' *);
+ pShowDiskInfo = $7364696E (* 'sdin' *); { Always on in Finder 8.0 HIS }
+ pListViewIconSize = $6C766973 (* 'lvis' *); { Moved to a per-folder basis in Finder 8.0 HIS }
+ pGridIcons = $66677264 (* 'fgrd' *); { Moved to a per-folder basis in Finder 8.0 HIS }
+ pStaggerIcons = $66737467 (* 'fstg' *); { No longer part of the Finder 8.0 HIS }
+ pViewFont = $76666E74 (* 'vfnt' *);
+ pViewFontSize = $7666737A (* 'vfsz' *);
+
+ { Properties of class cContainer (subclass of cItem) }
+ pCompletelyExpanded = $70657863 (* 'pexc' *);
+ pContainerWindow = $63776E64 (* 'cwnd' *);
+ pEntireContents = $65637473 (* 'ects' *);
+ pExpandable = $70657861 (* 'pexa' *);
+ pExpanded = $70657870 (* 'pexp' *);
+ pPreviousView = $73766577 (* 'svew' *); { pSelection = 'sele', // defined in AERegistry.r }
+ pView = $70766577 (* 'pvew' *);
+ pIconSize = $6C766973 (* 'lvis' *); { defined above }
+ pKeepArranged = $61727267 (* 'arrg' *); { OBSOLETE in Finder 9 or later }
+ pKeepArrangedBy = $61726279 (* 'arby' *); { OBSOLETE in Finder 9 or later }
+
+ { Properties of class cDesktop (subclass of cContainer) }
+ pStartupDisk = $7364736B (* 'sdsk' *);
+ pTrash = $74727368 (* 'trsh' *);
+
+ { Properties of class cSharableContainer (subclass of cContainer) }
+ pOwner = $736F776E (* 'sown' *);
+ pOwnerPrivileges = $6F776E72 (* 'ownr' *);
+ pGroup = $73677270 (* 'sgrp' *);
+ pGroupPrivileges = $67707072 (* 'gppr' *);
+ pGuestPrivileges = $67737470 (* 'gstp' *);
+ pArePrivilegesInherited = $69707276 (* 'iprv' *);
+ pExported = $73657870 (* 'sexp' *);
+ pMounted = $736D6F75 (* 'smou' *);
+ pSharingProtection = $7370726F (* 'spro' *);
+ pSharing = $73686172 (* 'shar' *);
+ pSharingWindow = $73776E64 (* 'swnd' *);
+
+ { Properties of class cDisk (subclass of cSharableContainer) }
+ pCapacity = $63617061 (* 'capa' *);
+ pEjectable = $6973656A (* 'isej' *);
+ pFreeSpace = $66727370 (* 'frsp' *);
+ pLocal = $69737276 (* 'isrv' *);
+ pIsStartup = $69737464 (* 'istd' *);
+
+ { Properties of class cTrash (subclass of cSharableContainer) }
+ pWarnOnEmpty = $7761726E (* 'warn' *);
+
+ { Properties of class cWindow (subclass of cContentSpace) }
+ { pBounds = 'pbnd', // defined in AERegistry.r }
+ { pHasCloseBox = 'hclb', // defined in AERegistry.r }
+ { pIsFloating = 'isfl', // defined in AERegistry.r }
+ { pIndex = 'pidx', // defined in AERegistry.r }
+ { pIsModal = 'pmod', // defined in AERegistry.r }
+ { pPosition = 'posn', // defined above }
+ { pIsResizable = 'prsz', // defined in AERegistry.r }
+ { pHasTitleBar = 'ptit', // defined in AERegistry.r }
+ { pVisible = 'pvis', // defined in AERegistry.r }
+ { pIsZoomable = 'iszm', // defined in AERegistry.r }
+ { pIsZoomed = 'pzum', // defined in AERegistry.r }
+ pIsZoomedFull = $7A756D66 (* 'zumf' *);
+ pIsPopup = $64727772 (* 'drwr' *);
+ pIsPulledOpen = $70756C6C (* 'pull' *); { only applies to popup windows }
+ pIsCollapsed = $77736864 (* 'wshd' *); { only applies to normal windows }
+
+ { Properties of class cContainerWindow (subclass of cWindow) }
+ pObject = $636F626A (* 'cobj' *);
+
+ { Properties of class cSharingWindow (subclass of cWindow) }
+ pSharableContainer = $73637472 (* 'sctr' *);
+
+ { Properties of class cInfoWindow (subclass of cWindow) }
+ pInfoPanel = $70616E6C (* 'panl' *);
+
+
+ { Properties of networking support }
+ pFileShareOn = $66736872 (* 'fshr' *);
+ pFileShareStartingUp = $66737570 (* 'fsup' *);
+ pProgramLinkingOn = $69616320 (* 'iac ' *);
+
+ { Properties of class cPreferencesWindow (subclass of cWindow) }
+ { pShowFolderSize = 'sfsz', // defined above for Views CP }
+ { pShowComment = 'scom', // defined above for Views CP }
+ pShowModificationDate = $73646174 (* 'sdat' *); { pShowDate defined above for Views CP }
+ { pShowKind = 'sknd', // defined above for Views CP }
+ { pShowLabel = 'slbl', // defined above for Views CP }
+ { pShowSize = 'ssiz', // defined above for Views CP }
+ { pShowVersion = 'svrs', // defined above for Views CP }
+ { pShowCreationDate = 'scda', // Removed from Finder 8.0 HIS }
+ { pShowFileType = 'sfty', // Removed from Finder 8.0 HIS }
+ { pShowFileCreator = 'sfcr', // Removed from Finder 8.0 HIS }
+ { pListViewIconSize = 'lvis', // defined above for Views CP }
+ { pGridIcons = 'fgrd', // defined above for Views CP }
+ { pStaggerIcons = 'fstg', // defined above for Views CP }
+ { pViewFont = 'vfnt', // defined above for Views CP }
+ { pViewFontSize = 'vfsz', // defined above for Views CP }
+ pUseRelativeDate = $75726474 (* 'urdt' *); { Moved to a per-folder basis in Finder 8.0 HIS }
+ pDelayBeforeSpringing = $64656C61 (* 'dela' *);
+ pSpringOpenFolders = $73707267 (* 'sprg' *);
+ pUseShortMenus = $75736D65 (* 'usme' *);
+ pUseWideGrid = $75737767 (* 'uswg' *);
+ pLabel1 = $6C626C31 (* 'lbl1' *);
+ pLabel2 = $6C626C32 (* 'lbl2' *);
+ pLabel3 = $6C626C33 (* 'lbl3' *);
+ pLabel4 = $6C626C34 (* 'lbl4' *);
+ pLabel5 = $6C626C35 (* 'lbl5' *);
+ pLabel6 = $6C626C36 (* 'lbl6' *);
+ pLabel7 = $6C626C37 (* 'lbl7' *);
+ pDefaultIconViewIconSize = $6969737A (* 'iisz' *);
+ pDefaultButtonViewIconSize = $6269737A (* 'bisz' *);
+ pDefaultListViewIconSize = $6C69737A (* 'lisz' *); { old use of this name is now pIconSize }
+ pIconViewArrangement = $69617272 (* 'iarr' *);
+ pButtonViewArrangement = $62617272 (* 'barr' *);
+
+ {
+ The next bunch are the various arrangements that make up
+ enumArrangement
+ }
+ pNoArrangement = $6E617272 (* 'narr' *);
+ pSnapToGridArrangement = $67726461 (* 'grda' *);
+ pByNameArrangement = $6E616D61 (* 'nama' *);
+ pByModificationDateArrangement = $6D647461 (* 'mdta' *);
+ pByCreationDateArrangement = $63647461 (* 'cdta' *);
+ pBySizeArrangement = $73697A61 (* 'siza' *);
+ pByKindArrangement = $6B696E61 (* 'kina' *);
+ pByLabelArrangement = $6C616261 (* 'laba' *);
+
+ { #define pObject cObject // defined above }
+
+ { Properties of class cProcess (subclass of cObject) }
+ { pName = 'pnam', // defined in AERegistry.r }
+ pFile = $66696C65 (* 'file' *); { pCreatorType = 'fcrt', // defined above }
+ { pFileType = 'asty', // defined above }
+ { pIsFrontProcess = 'pisf', // defined in AERegistry.r }
+ { pAppPartition = 'appt', // defined above }
+ pPartitionSpaceUsed = $70757364 (* 'pusd' *); { pIsScriptable = 'isab', // defined in AERegistry.r }
+ { pVisible = 'pvis' // defined in AERegistry.r }
+ pLocalAndRemoteEvents = $72657674 (* 'revt' *);
+ pHasScriptingTerminology = $68736372 (* 'hscr' *);
+
+ { Properties of class cAccessoryProcess (subclass of cProcess) }
+ pDeskAccessoryFile = $64616669 (* 'dafi' *);
+
+ { Properties of class cApplicationProcess (subclass of cProcess) }
+ pApplicationFile = $61707066 (* 'appf' *);
+
+ {
+ Properties of class cGroup (subclass of cObject)
+ enum (
+ pBounds
+ pIconBitmap
+ pLabelIndex
+ pName
+ pPosition
+ pWindow = cWindow // defined above
+ );
+ }
+
+ { Properties of class cUser (subclass of cObject) }
+ { pBounds }
+ { pIconBitmap }
+ { pLabelIndex }
+ { pName }
+ { pPosition }
+ { pWindow = cWindow, // defined above }
+ pCanConnect = $63636F6E (* 'ccon' *);
+ pCanChangePassword = $63637077 (* 'ccpw' *);
+ pCanDoProgramLinking = $63696163 (* 'ciac' *);
+ pIsOwner = $69736F77 (* 'isow' *);
+ pARADialIn = $61726164 (* 'arad' *);
+ pShouldCallBack = $63616C62 (* 'calb' *);
+ pCallBackNumber = $63626E6D (* 'cbnm' *);
+
+ {
+ Properties of class cApplication (subclass of cObject)
+ NOTE: properties for the special folders must match their respective kXXXFolderType constants
+ }
+ pAboutMacintosh = $61626278 (* 'abbx' *);
+ pAppleMenuItemsFolder = $616D6E75 (* 'amnu' *); { kAppleMenuFolderType }
+ { pClipboard = 'pcli', // defined in AERegistry.r }
+ pControlPanelsFolder = $6374726C (* 'ctrl' *); { kControlPanelFolderType }
+ pDesktop = $6465736B (* 'desk' *); { kDesktopFolderType }
+ pExtensionsFolder = $6578746E (* 'extn' *); { kExtensionFolderType }
+ { pFileShareOn = 'fshr', // defined above }
+ pFinderPreferences = $70667270 (* 'pfrp' *);
+ pFontsFolder = $666F6E74 (* 'font' *);
+ pFontsFolderPreAllegro = $66666E74 (* 'ffnt' *); { DO NOT USE THIS - FOR BACKWARDS COMPAT ONLY }
+ { pIsFrontProcess = 'pisf', // defined in AERegistry.r }
+ { pInsertionLoc = 'pins', // defined in AERegistry.r }
+ pLargestFreeBlock = $6D667265 (* 'mfre' *);
+ pPreferencesFolder = $70726566 (* 'pref' *); { kPreferencesFolderType }
+ { pProductVersion = 'ver2', // defined above }
+ { pUserSelection = 'pusl', // defined in AERegistry.r }
+ { pFileShareStartingUp = 'fsup', // defined above }
+ pShortCuts = $73637574 (* 'scut' *);
+ pShutdownFolder = $73686466 (* 'shdf' *);
+ pStartupItemsFolder = $73747274 (* 'strt' *); { kStartupFolderType }
+ pSystemFolder = $6D616373 (* 'macs' *); { kSystemFolderType }
+ pTemporaryFolder = $74656D70 (* 'temp' *); { kTemporaryFolderType }
+ { pVersion = 'vers', // defined in AERegistry.r }
+ pViewPreferences = $70767770 (* 'pvwp' *); { pVisible = 'pvis', // defined in AERegistry.r }
+ pStartingUp = $6177616B (* 'awak' *); { private property to tell whether the Finder is fully up and running }
+
+ { Properties of class cSharingPrivileges (subclass of cObject) }
+ pSeeFiles = $70727672 (* 'prvr' *);
+ pSeeFolders = $70727673 (* 'prvs' *);
+ pMakeChanges = $70727677 (* 'prvw' *);
+
+ {
+ Properties of class cPreferences (subclass of cObject)
+ enum (
+ pShowFolderSize = 'sfsz', // defined above for Views CP
+ pShowComment = 'scom', // defined above for Views CP
+ pShowModificationDate = pShowDate, // pShowDate defined above for Views CP
+ pShowKind = 'sknd', // defined above for Views CP
+ pShowLabel = 'slbl', // defined above for Views CP
+ pShowSize = 'ssiz', // defined above for Views CP
+ pShowVersion = 'svrs', // defined above for Views CP
+ pShowCreationDate = 'scda', // defined in cPreferencesWindow
+ pShowFileType = 'sfty', // defined in cPreferencesWindow
+ pShowFileCreator = 'sfcr', // defined in cPreferencesWindow
+ pListViewIconSize = 'lvis', // defined above for Views CP
+ pGridIcons = 'fgrd', // defined above for Views CP
+ pStaggerIcons = 'fstg', // defined above for Views CP
+ pViewFont = 'vfnt', // defined above for Views CP
+ pViewFontSize = 'vfsz', // defined above for Views CP
+ pUseRelativeDate = 'urdt', // defined in cPreferencesWindow
+ pDelayBeforeSpringing = 'dela', // defined in cPreferencesWindow
+ pShowMacOSFolder = 'sosf', // defined in cPreferencesWindow
+ pUseShortMenus = 'usme', // defined in cPreferencesWindow
+ pUseCustomNewMenu = 'ucnm', // defined in cPreferencesWindow
+ pShowDesktopInBackground = 'sdtb', // defined in cPreferencesWindow
+ pActivateDesktopOnClick = 'adtc', // defined in cPreferencesWindow
+ pLabel1 = 'lbl1', // defined in cPreferencesWindow
+ pLabel2 = 'lbl2', // defined in cPreferencesWindow
+ pLabel3 = 'lbl3', // defined in cPreferencesWindow
+ pLabel4 = 'lbl4', // defined in cPreferencesWindow
+ pLabel5 = 'lbl5', // defined in cPreferencesWindow
+ pLabel6 = 'lbl6', // defined in cPreferencesWindow
+ pLabel7 = 'lbl7', // defined in cPreferencesWindow
+ pWindow = cWindow // defined above
+ );
+ }
+
+ {
+ Properties of class cLabel (subclass of cObject)
+ enum (
+ pName = 'pnam', // defined in AERegistry.r
+ pColor = 'colr', // defined in AERegistry.r
+ );
+ }
+
+ { Misc Properties }
+ pSmallIcon = $736D6963 (* 'smic' *);
+ pSmallButton = $736D6275 (* 'smbu' *);
+ pLargeButton = $6C676275 (* 'lgbu' *);
+ pGrid = $67726964 (* 'grid' *);
+
+ {
+ //////////////////////////////////////
+ Enumerations defined by the Finder
+ //////////////////////////////////////
+ }
+
+ enumViewBy = $76776279 (* 'vwby' *);
+ enumGestalt = $6773656E (* 'gsen' *);
+ enumConflicts = $63666C63 (* 'cflc' *);
+ enumExistingItems = $65787369 (* 'exsi' *);
+ enumOlderItems = $6F6C6472 (* 'oldr' *);
+
+ enumDate = $656E6461 (* 'enda' *);
+ enumAnyDate = $616E7964 (* 'anyd' *);
+ enumToday = $74646179 (* 'tday' *);
+ enumYesterday = $79646179 (* 'yday' *);
+ enumThisWeek = $7477656B (* 'twek' *);
+ enumLastWeek = $6C77656B (* 'lwek' *);
+ enumThisMonth = $746D6F6E (* 'tmon' *);
+ enumLastMonth = $6C6D6F6E (* 'lmon' *);
+ enumThisYear = $74796572 (* 'tyer' *);
+ enumLastYear = $6C796572 (* 'lyer' *);
+ enumBeforeDate = $62666474 (* 'bfdt' *);
+ enumAfterDate = $61666474 (* 'afdt' *);
+ enumBetweenDate = $62746474 (* 'btdt' *);
+ enumOnDate = $6F6E6474 (* 'ondt' *);
+
+ enumAllDocuments = $616C6C64 (* 'alld' *);
+ enumFolders = $666F6C64 (* 'fold' *);
+ enumAliases = $616C6961 (* 'alia' *);
+ enumStationery = $73746174 (* 'stat' *);
+
+ enumWhere = $77686572 (* 'wher' *);
+ enumAllLocalDisks = $616C646B (* 'aldk' *);
+ enumAllRemoteDisks = $6172646B (* 'ardk' *);
+ enumAllDisks = $616C6C64 (* 'alld' *);
+ enumAllOpenFolders = $616F666F (* 'aofo' *);
+
+
+ enumIconSize = $6973697A (* 'isiz' *);
+ enumSmallIconSize = $736D6963 (* 'smic' *);
+ enumMiniIconSize = $6D696963 (* 'miic' *);
+ enumLargeIconSize = $6C676963 (* 'lgic' *);
+
+ enumSortDirection = $736F6472 (* 'sodr' *);
+ enumSortDirectionNormal = $736E726D (* 'snrm' *);
+ enumSortDirectionReverse = $73727673 (* 'srvs' *);
+
+ enumArrangement = $65617272 (* 'earr' *);
+
+ { Get Info Window panel enumeration }
+ enumInfoWindowPanel = $69706E6C (* 'ipnl' *);
+ enumGeneralPanel = $67706E6C (* 'gpnl' *);
+ enumSharingPanel = $73706E6C (* 'spnl' *);
+ enumStatusNConfigPanel = $73636E6C (* 'scnl' *);
+ enumFontsPanel = $66706E6C (* 'fpnl' *);
+ enumMemoryPanel = $6D706E6C (* 'mpnl' *);
+
+
+ { Preferences panel enumeration }
+ enumPrefsWindowPanel = $70706C65 (* 'pple' *);
+ enumPrefsGeneralPanel = $70676E70 (* 'pgnp' *);
+ enumPrefsLabelPanel = $706C6270 (* 'plbp' *);
+ enumPrefsIconViewPanel = $70697670 (* 'pivp' *);
+ enumPrefsButtonViewPanel = $70627670 (* 'pbvp' *);
+ enumPrefsListViewPanel = $706C7670 (* 'plvp' *);
+
+ {
+ //////////////////////////////////////
+ Types defined by the Finder
+ //////////////////////////////////////
+ }
+
+ typeIconFamily = $6966616D (* 'ifam' *); { An AEList of typeIconAndMask, type8BitIcon, & c. }
+ typeIconAndMask = $49434E23 (* 'ICN#' *);
+ type8BitMask = $6C386D6B (* 'l8mk' *);
+ type32BitIcon = $696C3332 (* 'il32' *);
+ type8BitIcon = $69636C38 (* 'icl8' *);
+ type4BitIcon = $69636C34 (* 'icl4' *);
+ typeSmallIconAndMask = $69637323 (* 'ics#' *);
+ typeSmall8BitMask = $73386D6B (* 's8mk' *);
+ typeSmall32BitIcon = $69733332 (* 'is32' *);
+ typeSmall8BitIcon = $69637338 (* 'ics8' *);
+ typeSmall4BitIcon = $69637334 (* 'ics4' *);
+ typeRelativeTime = $7274696D (* 'rtim' *);
+ typeConceptualTime = $74696D63 (* 'timc' *);
+
+ {
+ //////////////////////////////////////
+ Keywords defined by the Finder
+ //////////////////////////////////////
+ }
+
+ keyIconAndMask = $49434E23 (* 'ICN#' *);
+ key32BitIcon = $696C3332 (* 'il32' *);
+ key8BitIcon = $69636C38 (* 'icl8' *);
+ key4BitIcon = $69636C34 (* 'icl4' *);
+ key8BitMask = $6C386D6B (* 'l8mk' *);
+ keySmallIconAndMask = $69637323 (* 'ics#' *);
+ keySmall8BitIcon = $69637338 (* 'ics8' *);
+ keySmall4BitIcon = $69637334 (* 'ics4' *);
+ keySmall32BitIcon = $69733332 (* 'is32' *);
+ keySmall8BitMask = $73386D6B (* 's8mk' *);
+ keyMini1BitMask = $69636D23 (* 'icm#' *);
+ keyMini4BitIcon = $69636D34 (* 'icm4' *);
+ keyMini8BitIcon = $69636D38 (* 'icm8' *);
+ keyAEUsing = $7573696E (* 'usin' *);
+ keyAEReplacing = $616C7270 (* 'alrp' *);
+ keyAENoAutoRouting = $726F7574 (* 'rout' *);
+ keyLocalPositionList = $6D76706C (* 'mvpl' *);
+ keyGlobalPositionList = $6D767067 (* 'mvpg' *);
+ keyRedirectedDocumentList = $6670646C (* 'fpdl' *);
+
+ {
+ //////////////////////////////////////
+ New prepositions used by the Finder
+ //////////////////////////////////////
+ }
+
+ keyASPrepositionHas = $68617320 (* 'has ' *);
+ keyAll = $6B79616C (* 'kyal' *);
+ keyOldFinderItems = $6673656C (* 'fsel' *);
+
+ {
+ //////////////////////////////////////
+ New key forms used by the Finder
+ //////////////////////////////////////
+ }
+
+ formAlias = $616C6973 (* 'alis' *);
+ formCreator = $66637274 (* 'fcrt' *);
+
+
+ {
+ //////////////////////////////////////
+ Finder error codes
+ //////////////////////////////////////
+ }
+
+ errFinderIsBusy = -15260;
+ errFinderWindowNotOpen = -15261;
+ errFinderCannotPutAway = -15262;
+ errFinderWindowMustBeIconView = -15263; { RequireWindowInIconView }
+ errFinderWindowMustBeListView = -15264; { RequireWindowInListView }
+ errFinderCantMoveToDestination = -15265;
+ errFinderCantMoveSource = -15266;
+ errFinderCantOverwrite = -15267;
+ errFinderIncestuousMove = -15268; { Could just use errFinderCantMoveSource }
+ errFinderCantMoveToAncestor = -15269; { Could also use errFinderCantMoveSource }
+ errFinderCantUseTrashedItems = -15270;
+ errFinderItemAlreadyInDest = -15271; { Move from folder A to folder A }
+ errFinderUnknownUser = -15272; { Includes unknown group }
+ errFinderSharePointsCantInherit = -15273;
+ errFinderWindowWrongType = -15274;
+ errFinderPropertyNowWindowBased = -15275;
+ errFinderAppFolderProtected = -15276; { used by General controls when folder protection is on }
+ errFinderSysFolderProtected = -15277; { used by General controls when folder protection is on }
+ errFinderBoundsWrong = -15278;
+ errAEValueOutOfRange = -15279;
+ errFinderPropertyDoesNotApply = -15280;
+ errFinderFileSharingMustBeOn = -15281;
+ errFinderMustBeActive = -15282;
+ errFinderVolumeNotFound = -15283; { more descriptive than what we get with nsvErr }
+ errFinderLockedItemsInTrash = -15284; { there are some locked items in the trash }
+ errFinderOnlyLockedItemsInTrash = -15285; { all the items (except folders) in the trash are locked }
+ errFinderProgramLinkingMustBeOn = -15286;
+ errFinderWindowMustBeButtonView = -15287;
+ errFinderBadPackageContents = -15288; { something is wrong within the package }
+ errFinderUnsupportedInsidePackages = -15289; { operation cannot be used on items within a package }
+ errFinderCorruptOpenFolderList = -15290; { was -15276 in Finder 8.6 and earlier, but that conflicted with General Controls }
+ errFinderNoInvisibleFiles = -15291; { was -15277 in Finder 8.6 and earlier, but that conflicted with General Controls }
+ errFinderCantDeleteImmediately = -15292; { cannot delete immediately via scripting }
+ errFinderLastReserved = -15379;
+
+{$ALIGN MAC68K}
+
+
+{unit HIObject}
+{
+ File: HIToolbox/HIObject.h
+
+ Contains: Base object for HIToolbox
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 2001-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{
+ Change History (most recent first):
+
+ <4> 5/8/04 GRP Updated comments to match changes in HIObject.h, version HIToolbox-145.33~1.
+ <3> 4/8/04 PNL Moved HIObjectxxxx type declarations to HIObjectCore to fix cyclic dependency problem.
+ <2> 10/02/04 GRP Added support for GPC as well as CodeWarrior Pascal.
+ <1> 9/8/03 GRP First Pascal translation of HIObject.h, version HIToolbox-123.6~10.
+}
+{This file was processed by Dan's Source Converter}
+{version 1.3 (this version modified by Ingemar Ragnemalm)}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN POWER}
+
+
+{
+ * HIObject
+ *
+ * Discussion:
+ * HIObject is the HIToolbox's base class for various objects. Over
+ * time, all of our common objects (controls, windows, menus, etc.)
+ * will be derived from HIObject. Code which is external to
+ * HIToolbox can also create its own subclasses of our objects using
+ * the routines contained in this file. There are also polymorphic
+ * functions one can use on any HIObject for getting the class ID,
+ * etc.
+ *
+ * HIObjects are actually CF types under the hood. This means that
+ * they can be put into CF collections and retain/release can be
+ * called on them.
+ *
+ * An HIObject is essentially a very basic building-block object
+ * which contains an event target. You can create these objects to
+ * use as your own Carbon Event receptors in your application, or
+ * you can subclass existing Toolbox object to suit your needs.
+ *
+ *
+ * You register your subclasses with HIObjectRegisterSubclass,
+ * passing your class ID, the parent class, and an event handler.
+ * You also pass a list of events the handler is interested in.
+ *
+ *
+ * To create an object of your subclass, you call HIObjectCreate,
+ * passing the class ref you registered, as well as an
+ * initialization event.
+ *
+ * Construction is two-phase: first the basic construction of the
+ * object is done, then initialization is performed. The toolbox
+ * sends construction events bottom-up, as you would expect in C++
+ * or the like. Here is the list of what goes on to create an
+ * object:
+ *
+ * 1) The Toolbox creates the base HIObject
+ *
+ * 2) It then installs the event handler you specified when you
+ * registered your subclass. Your handler must listen for
+ * kEventHIObjectConstruct and kEventHIObjectDestruct events. If it
+ * does not, the class cannot be registered (you will get a
+ * paramErr).
+ *
+ * 3) Next, the Toolbox _directly_ calls your handler with an
+ * kEventHIObjectConstruct event. When called like this, you are not
+ * really being called in the context of a handler stack, so you
+ * cannot do things like CallNextEventHandler. The userData
+ * parameter is what you specified when you registered the class.
+ * Typically, during construction you will allocate memory yourself
+ * to store your own instance data; this allocation might be as
+ * simple as calling malloc or NewPtr, or it might involve creating
+ * your own C++ object. In the construct event, you are passed the
+ * base HIObjectRef of the object being created. Typically you would
+ * store this HIObjectRef in your own instance data for later use.
+ * When handling this construct event, you should be sure to use
+ * SetEventParameter to set the kEventParamHIObjectInstance
+ * parameter in the construction event with your own instance data.
+ * You must use typeVoidPtr as the type.
+ *
+ * 4) The Toolbox looks for your instance of typeVoidPtr after you
+ * handle the construct event. It then takes that data and stores it
+ * off with the object and also sets the user data of the event
+ * handler it installed to be this instance data. This means that
+ * following the construct event, all calls to your event handler
+ * will have the instance data you returned to us.
+ *
+ * 5) Once construction has completed successfully, we will send
+ * your object the initialize event passed into HIObjectCreate. At
+ * this point, all events are now sent to your object using standard
+ * Carbon Events mechanisms (it is only the construct event which is
+ * special). When we send the initialization event to your subclass,
+ * you should pass the event to your superclass before proceeding.
+ * You do this with CallNextEventHandler. Once back from that call,
+ * you should verify that the result is noErr, indicating that the
+ * superclass did in fact initialize properly. If it did not, your
+ * should return the error that CallNextEventHandler returned from
+ * your handler as well. The object will be destroyed by the
+ * Toolbox. Your object should be able to be destroyed in a
+ * partially initialized state such as this. This stage is optional,
+ * i.e. an object does not need to respond to the initialize event
+ * unless it is expecting certain parameters to be passed to it at
+ * creation time. This is where those parameters can be fetched.
+ *
+ *
+ * 6) Once initialization is successful, the HIObjectRef is
+ * returned to the caller of HIObjectCreate. From there, you can
+ * have all sorts of cool fun.
+ *
+ * When someone has called CFRelease enough such that the refcount
+ * of the object drops to zero, the object is destroyed. The Toolbox
+ * will send a kEventHIObjectDestruct event to your object. DO NOT
+ * CALL CALLNEXTEVENTHANDLER. You will be setting yourself up for
+ * some hurt. Just clean up and return from your handler.
+ }
+{
+ The declarations for HIObjectClassRef, HIObjectClassRefPtr, and HIObjectRef
+ have been moved to HIObjectCore. See HIObjectCore.p[.pas] for reason.
+}
+{
+ * Discussion:
+ * HIObject errors
+ }
+const
+{
+ * You are trying to register a class ID that already exists.
+ }
+ hiObjectClassExistsErr = -22080;
+
+ {
+ * You are trying to unregister a class which has instances which
+ * still exist. You must destroy them first, before they destroy you!
+ }
+ hiObjectClassHasInstancesErr = -22081;
+ hiObjectClassHasSubclassesErr = -22082;
+
+ {
+ * You are trying to create an HIObject class that is defined as
+ * being abstract. You must subclass it instead. Oh yes. Don't make
+ * us say it twice!
+ }
+ hiObjectClassIsAbstractErr = -22083;
+
+
+const
+{
+ * The event class for HIObject events.
+ }
+ kEventClassHIObject = $68696F62 (* 'hiob' *);
+
+const
+ kEventParamHIObjectInstance = $68696F69 (* 'hioi' *);
+ kEventParamHIArchive = $68696163 (* 'hiac' *); { typeCFTypeRef }
+ typeHIObjectRef = $68696F62 (* 'hiob' *);
+
+{
+ kEventClassHIObject quick reference:
+
+ These are the events for base class functionality of HIObjects. You should only need to be
+ aware of these if you are implementing a subclass of HIObject.
+
+ kEventHIObjectConstruct = 1,
+ kEventHIObjectInitialize = 2,
+ kEventHIObjectDestruct = 3,
+ kEventHIObjectIsEqual = 4,
+ kEventHIObjectPrintDebugInfo = 5,
+ kEventHIObjectEncode = 6
+}
+{
+ * kEventClassHIObject / kEventHIObjectConstruct
+ *
+ * Summary:
+ * Your object is being constructed. You should allocate instance
+ * data for your object.
+ *
+ * Discussion:
+ * When your event handler is called with this event, it is being
+ * called directly and not through the normal event dispatching
+ * mechanism. This means that the EventHandlerCallRef passed to your
+ * handler will be NULL and CallNextEventHandler will not work. You
+ * are passed the actual HIObjectRef of your base class for you to
+ * record in your instance data.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * <-> kEventParamHIObjectInstance (in/out, typeHIObjectRef)
+ * On entry, this parameter is typeHIObjectRef, and is the
+ * HIObjectRef of your instanceÕs base class. Typically you
+ * will read this parameter from the event and store it in
+ * your instance data so that when your instance needs to call
+ * HIObject APIs, it can use this HIObjectRef.
+ *
+ * On exit, this parameter is typeVoidPtr, and should be a
+ * pointer to your instance data that you have written into
+ * the event with SetEventParameter. After your event handler
+ * returns, the toolbox reads your instance data pointer from
+ * the event, installs the event handlers that were passed to
+ * HIObjectRegisterSubclass on the new object, and uses the
+ * instance data pointer as the refcon for those event
+ * handlers. This allows your event handlers to retrieve your
+ * instance data pointer from the refcon.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventHIObjectConstruct = 1;
+
+{
+ * kEventClassHIObject / kEventHIObjectInitialize
+ *
+ * Summary:
+ * Your object is being initialized. You should read initialization
+ * data from the event and store it into your instance data.
+ *
+ * Discussion:
+ * Your handler should pass this event on to the superclass first
+ * before handling this event. This is done by calling
+ * CallNextEventHandler with the event. When that function returns,
+ * you should make sure the result is noErr. If not, you should NOT
+ * continue to initialize your class.
+ *
+ * Assuming that CallNextEventHandler returned noErr, you may then
+ * proceed to read initialization data from the event parameters, if
+ * any. For example, you might be create an object that includes a
+ * string as part of its instance data. The caller of HIObjectCreate
+ * would create an EventRef and add a string to the event using a
+ * parameter name and type defined by your object. In your objectÕs
+ * kEventHIObjectInitialize event handler, you would read the string
+ * from the event parameter and store it into your instance
+ * data.
+ *
+ * The parameters of this event, therefore, contain the union of all
+ * parameters needed by all base classes of this object to properly
+ * construct themselves.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamHIArchive (in, typeCFTypeRef)
+ * The HIArchive reference from which the HIObject should be
+ * decoded. This parameter will only exist when the HIObject
+ * is requested to initialize itself from a decoded archive.
+ * Otherwise, the HIObject should initialize itself normally.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventHIObjectInitialize = 2;
+
+{
+ * kEventClassHIObject / kEventHIObjectDestruct
+ *
+ * Summary:
+ * Your object is being destroyed. This is your chance to dispose of
+ * anything you might have allocated for your objectÕs instance data.
+ *
+ * Discussion:
+ * Do NOT call through with CallNextEventHandler, as you will
+ * disrupt the fabric of space-time. An HIObject is destroyed in
+ * most-derived to least-derived order, and if you call through,
+ * your base class can be destroyed before you destroy your own
+ * data, which can cause undefined results.
+ *
+ * Note that the refcon of your event handler for this event will be
+ * the instance data pointer allocated and returned by your
+ * kEventHIObjectConstruct handler in the
+ * kEventParamHIObjectInstance parameter.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventHIObjectDestruct = 3;
+
+{
+ * kEventClassHIObject / kEventHIObjectIsEqual
+ *
+ * Summary:
+ * HIObjectIsEqual has been called, and you are being asked to
+ * determine if your object is equivalent to the one being passed to
+ * your handler.
+ *
+ * Discussion:
+ * The base HIObject class handles this event by comparing the
+ * HIObjectRef values for pointer equality. Your subclass may choose
+ * to also compare the contents of the HIObject instance data.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeHIObjectRef)
+ * The object to which your object should be compared.
+ *
+ * <-- kEventParamResult (out, typeBoolean)
+ * If your object is equivalent to the direct object, you
+ * should return true in this parameter; otherwise, return
+ * false.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventHIObjectIsEqual = 4;
+
+{
+ * kEventClassHIObject / kEventHIObjectPrintDebugInfo
+ *
+ * Summary:
+ * HIObjectPrintDebugInfo has been called, and you are being asked
+ * to print your information to stdout.
+ *
+ * Discussion:
+ * This event is sent to all handlers registered for it. You should
+ * NOT call CallNextEventHandler.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventHIObjectPrintDebugInfo = 5;
+
+{
+ * kEventClassHIObject / kEventHIObjectEncode
+ *
+ * Summary:
+ * Your object is being requested to encode itself into an archive.
+ *
+ * Discussion:
+ * Your handler should pass this event on to the superclass first
+ * before handling this event. This is done by calling
+ * CallNextEventHandler with the event. When that function returns,
+ * you should make sure the result is noErr. If not, you should NOT
+ * continue to initialize your class.
+ *
+ * HIArchiveEncodeHIObject has been called on your HIObject. At this
+ * point all relevant long term data should be encoded to the
+ * HIArchive provided.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamHIArchive (in, typeCFTypeRef)
+ * The HIArchive reference into which the HIObject should be
+ * compiled.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventHIObjectEncode = 6;
+
+{
+ * HIObjectRegisterSubclass()
+ *
+ * Discussion:
+ * Registers a class with the Toolbox for creation later.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inClassID:
+ * The class ID of your class. It should be unique. We recommend
+ * using Java-style com.company.foo naming conventions to avoid
+ * collisions.
+ *
+ * inBaseClassID:
+ * The class ID of the class you derive from. Passing NULL
+ * indicates you wish to subclass HIObject (the base class)
+ * directly.
+ *
+ * inOptions:
+ * Any special options for your class. Currently you must pass 0
+ * for this parameter.
+ *
+ * inConstructProc:
+ * The construction proc for this subclass. You pass the address
+ * of an event handler into this parameter. This handler is called
+ * directly, rather than through the normal event dispatching
+ * mechanism. This means that the EventHandlerCallRef passed in
+ * will be NULL, and you cannot use it for calls like
+ * CallNextEventHandler. Other than that, you should return a
+ * result as usual. After your object is constructed, this proc
+ * will be installed as the event handler for the remaining events
+ * specified in the inEventList parameter. On Mac OS X 10.4 and
+ * later, you may pass NULL to create an "abstract class" that
+ * cannot be instantiated, but can still be used as a base class
+ * for subclasses; if you pass NULL, HIObjectCreate on the class
+ * ID will return hiObjectClassIsAbstractErr.
+ *
+ * inNumEvents:
+ * The number of events you are installing.
+ *
+ * inEventList:
+ * The events your handler wishes to receive. If you are not
+ * creating an abstract class, then you must handle the
+ * kEventHIObjectConstruct and kEventHIObjectDestruct event. If
+ * these events are not specified, an error is returned. An
+ * abstract class may pass 0 for the inNumEvents parameter and
+ * NULL for the inEventList parameter.
+ *
+ * inConstructData:
+ * Pass any info you want passed into your event handler here. For
+ * a C++ hierarchy based on HIObjects, you might actually pass a
+ * static method to construct your object here, and the base class
+ * event handler to do construction as your event handler.
+ *
+ * outClassRef:
+ * The newly created class reference. Pass NULL if you don't care.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectRegisterSubclass( inClassID: CFStringRef; inBaseClassID: CFStringRef; inOptions: OptionBits; inConstructProc: EventHandlerUPP { can be NULL }; inNumEvents: UInt32; {const} inEventList: {variable-size-array} EventTypeSpecPtr; inConstructData: UnivPtr; outClassRef: HIObjectClassRefPtr { can be NULL } ): OSStatus; external name '_HIObjectRegisterSubclass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIObjectUnregisterClass()
+ *
+ * Discussion:
+ * Unregisters a previously registered subclass of HIObject. You
+ * will receive an error if there are subclasses of your class or
+ * instances of it which still exist. All instances and subclasses
+ * must be disposed of and unregistered first.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inClassRef:
+ * The class ref of the class of object you wish to unregister.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectUnregisterClass( inClassRef: HIObjectClassRef ): OSStatus; external name '_HIObjectUnregisterClass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIObjectCreate()
+ *
+ * Discussion:
+ * Creates an object derived from HIObject.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inClassID:
+ * The class ID of the class of object you wish to instantiate.
+ *
+ * inConstructData:
+ * If your class (or any class you derive from) accepts creation
+ * parameters, you need to pass an event into this parameter. The
+ * class must be kEventClassHIObject, and the kind should be
+ * kEventHIObjectInitialize. Any other parameters should be added
+ * as necessary. Specific subclasses of HIObject which require
+ * initialization parameters will specify those parameters in the
+ * appropriate headers.
+ *
+ * outObject:
+ * The instance of the object you create.
+ *
+ * Result:
+ * An operating system result code. A return value of
+ * hiObjectClassIsAbstractErr indicates that the inConstructProc
+ * parameter to HIObjectRegisterSubclass was NULL; instances of such
+ * a class may not be created, only subclassed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectCreate( inClassID: CFStringRef; inConstructData: EventRef; var outObject: HIObjectRef ): OSStatus; external name '_HIObjectCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIObjectGetEventTarget()
+ *
+ * Discussion:
+ * Returns the event target of an HIObjectRef.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inObject:
+ * The object whose target you want.
+ *
+ * Result:
+ * An EventTargetRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectGetEventTarget( inObject: HIObjectRef ): EventTargetRef; external name '_HIObjectGetEventTarget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIObjectPrintDebugInfo()
+ *
+ * Discussion:
+ * Prints the internal information of an HIObject for debugging
+ * purposes. It outputs the info to stdout.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inObject:
+ * The object to inspect.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+procedure HIObjectPrintDebugInfo( inObject: HIObjectRef ); external name '_HIObjectPrintDebugInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIObjectCopyClassID()
+ *
+ * Discussion:
+ * Returns the class ID of a given HIObject.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inObject:
+ * The object whose class ID you are interested in.
+ *
+ * Result:
+ * A CFStringRef containing the object's class ID.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectCopyClassID( inObject: HIObjectRef ): CFStringRef; external name '_HIObjectCopyClassID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIObjectIsOfClass()
+ *
+ * Discussion:
+ * Returns whether or not an object is of a certain class. You can
+ * us this to see whether or not an object you have derives from an
+ * expected superclass.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inObject:
+ * The object whose class ID you wish to check.
+ *
+ * inObjectClassID:
+ * The class ID in question.
+ *
+ * Result:
+ * A Boolean result indicating whether or not the object is of the
+ * class specified.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectIsOfClass( inObject: HIObjectRef; inObjectClassID: CFStringRef ): Boolean; external name '_HIObjectIsOfClass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIObjectDynamicCast()
+ *
+ * Discussion:
+ * Returns the instance data for a specific class of an HIObject.
+ * The instance data returned is the same instance data the class's
+ * construction event handler returns in the instance data
+ * parameter. This is stored off with the class reference so that it
+ * can be fetched later for use by this function. It allows your
+ * subclass to easily get at the data it created, if your subclass
+ * needs that data outside of an event handler. (Inside an event
+ * handler, your subclass can get at its instance data via the
+ * userData parameter to the event handler.)
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inObject:
+ * The object whose class ID you wish to check.
+ *
+ * inClassID:
+ * The class ID to get the instance data for.
+ *
+ * Result:
+ * A void * result which contains the instance data for the object,
+ * or NULL if the object is not an instance of the class.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectDynamicCast( inObject: HIObjectRef; inClassID: CFStringRef ): UnivPtr; external name '_HIObjectDynamicCast';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIObjectCreateFromBundle()
+ *
+ * Discussion:
+ * Returns the HIObject for the given bundle. A bundle can be
+ * designed to communicate with an app through an HIObject. The
+ * bundle must be designed to create an HIObject and have a defined
+ * suite of CarbonEvents that clients can use to communicate with
+ * the bundle's HIObject. Given a CFBundleRef, this API will tell
+ * the bundle to create the HIObject and return it to the caller.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBundle:
+ * The bundle that you wish to communicate with.
+ *
+ * outObject:
+ * The HIObject associated with the bundle.
+ *
+ * Result:
+ * An operating system result code. If the bundle's HIObject
+ * creation function cannot be found, cfragNoSymbolErr will be
+ * returned.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectCreateFromBundle( inBundle: CFBundleRef; var outObject: HIObjectRef ): OSStatus; external name '_HIObjectCreateFromBundle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIObjectIsAccessibilityIgnored()
+ *
+ * Discussion:
+ * Reports whether or not the given HIObject is marked as ignored
+ * for accessibility.
+ *
+ * See the discussion of HIObjectSetAccessibilityIgnored for details
+ * on what it means to be accessibility ignored.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inObject:
+ * The object whose accessibility ignored state you wish to query.
+ *
+ * Result:
+ * A Boolean value indicating whether or not the HIObject is ignored
+ * for accessibility.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectIsAccessibilityIgnored( inObject: HIObjectRef ): Boolean; external name '_HIObjectIsAccessibilityIgnored';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIObjectSetAccessibilityIgnored()
+ *
+ * Discussion:
+ * Marks an HIObject as ignored (or not) for the purposes of the
+ * accessibility APIs.
+ *
+ * An HIObject that is ignored for accessibility will never be shown
+ * to an assistive application that uses the accessibility APIs to
+ * examine an interface. Your application's accessibility
+ * implementation can (and should) still report an ignored HIObject
+ * as usual. Carbon's accessibility engine will automatically prune
+ * any ignored HIObjects out of the data that is shown to an
+ * assistive application.
+ * <BR>By default, an HIObject is *not* accessibility ignored.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inObject:
+ * The object whose accessibility ignored state you wish to change.
+ *
+ * inIgnored:
+ * A Boolean value indicating whether or not to ignore the object.
+ *
+ * Result:
+ * An OSStatus signifying success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectSetAccessibilityIgnored( inObject: HIObjectRef; inIgnored: Boolean ): OSStatus; external name '_HIObjectSetAccessibilityIgnored';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIObjectSetAuxiliaryAccessibilityAttribute()
+ *
+ * Summary:
+ * Associates an additional accessibility attribute with a UIElement
+ * that is used to represent a given HIObject or a part thereof.
+ *
+ * Discussion:
+ * This routine lets your application provide the name of and data
+ * for an accessibility attribute that you want to add to the
+ * UIElement used to represent a given HIObject-identifier pair.
+ * Normally, accessibility attributes can only be supplied
+ * dynamically via Carbon Events, but this routine allows you to
+ * supply them statically.
+ *
+ * When an accessibility attribute Carbon Event is handled by the
+ * HIObject with a given identifier, the toolbox automatically
+ * supplies the names and/or values of any auxiliary attributes
+ * associated with that HIObject- identifier pair.
+ *
+ * This routine is particularly useful for supplying values for the
+ * kAXDescriptionAttribute, kAXTitleUIElementAttribute,
+ * kAXServesAsTitleUIElementAttribute, kAXLinkedUIElementsAttribute
+ * and other attributes whose value is specific to the layout and
+ * usage of your application.
+ *
+ * This routine only allows you to associate attributes whose values
+ * never change. If you need to supply attributes whose values are
+ * determined dynamically or whose values are settable, you must
+ * install the normal accessibility Carbon Event handlers.
+ *
+ * The auxiliary attribute store is consulted during the HIObject's
+ * default handling of the accessibility attribute Carbon Events.
+ * This means that any programmatic handling of a given
+ * accessibility attribute will have a chance to override or block
+ * the consultation of the store. The general rule is that if the
+ * toolbox or a Carbon Event handler can provide the attribute value
+ * some other way, the store will not be consulted.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inHIObject:
+ * The HIObjectRef part of the object-identifier pair to which the
+ * attribute data is associated.
+ *
+ * inIdentifier:
+ * The 64-bit identifier part of the object-identifier pair to
+ * which the attribute data is associated. When you want to
+ * associate the attribute data to the HIObject as a whole -- such
+ * as when you want to give a description attribute to a push
+ * button -- you should pass zero in this parameter.
+ *
+ * inAttributeName:
+ * A CFStringRef of the name of the attribute you wish to
+ * associate with the object-identifier pair. This string will be
+ * retained before adding it to the auxiliary attribute store.
+ *
+ * inAttributeData:
+ * A CFTypeRef with the data to be supplied as the attribute's
+ * value. This data will be retained before adding it to the
+ * auxiliary attribute store; you may release inAttributeData
+ * after you have called this routine. The inAttributeData
+ * parameter may also be NULL, which indicates that the named
+ * auxiliary attribute should no longer be associated with the
+ * object-identifier pair; any named attribute data previously
+ * associated with the object-identifier pair will be released.
+ *
+ * Result:
+ * An OSStatus result code. The function will return noErr if it was
+ * able to associate the attribute data with the HIObjectRef. If the
+ * HIObjectRef is invalid, paramErr will be returned. Other results
+ * may be returned in other situations.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectSetAuxiliaryAccessibilityAttribute( inHIObject: HIObjectRef; inIdentifier: UInt64; inAttributeName: CFStringRef; inAttributeData: CFTypeRef { can be NULL } ): OSStatus; external name '_HIObjectSetAuxiliaryAccessibilityAttribute';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIObjectOverrideAccessibilityContainment()
+ *
+ * Summary:
+ * Allows you to override the AXUIElementRefs that an HIObject would
+ * normally supply as the values of its AXParent, AXWindow, and
+ * AXTopLevelUIElement attributes.
+ *
+ * Discussion:
+ * This routine allows you to change the parent that an HIObject
+ * would normally supply in the accessibility hierarchy. For
+ * instance, a popup control could call this routine on its menu so
+ * that the menu returned the popup control as the menu's parent;
+ * normally the menu would return the application as its parent.
+ * Optionally, this routine also allows you to change the window and
+ * top-level element that an HIObject would normally supply.
+ *
+ * If the input HIObject is a standard toolbox construct like an
+ * HIView or a Menu, the input HIObject will not be added as an
+ * accessibility child of its normal parent. In all other cases, it
+ * is the client's responsibility to ensure that the input HIObject
+ * is not added as an accessibility child of its normal parent.
+ *
+ * If the desired AXUIElementRef parent represents an HIView, a
+ * Menu, or a Window, the input HIObject will be automatically added
+ * as an accessibility child of the specified parent. In all other
+ * cases, it is the client's responsibility to manually add the
+ * input HIObject as a child of the specified parent. To represent
+ * an HIView, a Menu, or a Window, an AXUIElementRef must contain
+ * the appropriate HIObjectRef as well as an identifier value of
+ * zero.
+ *
+ * Similar rules don't have to apply for the handling of the window
+ * and top-level element attributes because those attributes don't
+ * represent two-way relationships.
+ *
+ * A containment override is not necessarily supported by every type
+ * of HIObject. Currently, it is supported by HIViews, Menus, and
+ * Windows.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inHIObject:
+ * The HIObjectRef whose parent attribute you want to override.
+ *
+ * inDesiredParent:
+ * The AXUIElementRef that you wish the HIObject to return as the
+ * value of its AXParent attribute. This routine makes a copy of
+ * the AXUIElementRef; you must release inDesiredParent after you
+ * have called this routine. Passing NULL indicates that you want
+ * the HIObject to revert to its normal, un-overridden behavior.
+ *
+ * inDesiredWindow:
+ * The AXUIElementRef that you wish the HIObject to return as the
+ * value of its AXWindow attribute. This routine makes a copy of
+ * the AXUIElementRef; you must release inDesiredWindow after you
+ * have called this routine. Passing NULL indicates that you want
+ * the HIObject to report its normal window, if any.
+ *
+ * inDesiredTopLevelUIElement:
+ * The AXUIElementRef that you wish the HIObject to return as the
+ * value of its AXTopLevelUIElement attribute. This routine makes
+ * a copy of the AXUIElementRef; you must release
+ * inDesiredTopLevelUIElement after you have called this routine.
+ * Passing NULL indicates that you want the HIObject to report its
+ * normal top-level element, if any.
+ *
+ * Result:
+ * An OSStatus result code. If the HIObjectRef is invalid, this
+ * routine will return paramErr.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectOverrideAccessibilityContainment( inHIObject: HIObjectRef; inDesiredParent: AXUIElementRef; inDesiredWindow: AXUIElementRef; inDesiredTopLevelUIElement: AXUIElementRef ): OSStatus; external name '_HIObjectOverrideAccessibilityContainment';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIObjectIsArchivingIgnored()
+ *
+ * Discussion:
+ * Reports whether or not the given HIObject is marked as ignored
+ * for archiving.
+ * See the discussion of HIObjectSetArchivingIgnored for details on
+ * what it means to be archiving ignored.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inObject:
+ * The object whose archiving ignored state you wish to query.
+ *
+ * Result:
+ * A Boolean value indicating whether or not the HIObject is ignored
+ * for archiving.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectIsArchivingIgnored( inObject: HIObjectRef ): Boolean; external name '_HIObjectIsArchivingIgnored';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIObjectSetArchivingIgnored()
+ *
+ * Discussion:
+ * Marks an HIObject as ignored (or not) for the purposes of the
+ * archiving APIs.
+ * An HIObject that is ignored for archiving will never be requested
+ * to encode itself into an archive. This is a statement that the
+ * HIObject does not handle the archiving protocol.
+ * By default, an HIObject *is* archiving ignored.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inObject:
+ * The object whose archiving ignored state you wish to change.
+ *
+ * inIgnored:
+ * A Boolean value indicating whether or not to ignore the object.
+ *
+ * Result:
+ * An OSStatus signifying success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectSetArchivingIgnored( inObject: HIObjectRef; inIgnored: Boolean ): OSStatus; external name '_HIObjectSetArchivingIgnored';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ Standard custom archive data dictionary keys describing custom initialize event parameters.
+ Each keyed value is an array of OSTypes represented by CFStrings. Use UTCreateStringForOSType
+ and UTGetOSTypeFromString in UTType.h for CFStringRef <-> OSType conversion.
+}
+{
+ * kHIObjectCustomDataParameterNamesKey
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kHIObjectCustomDataParameterNamesKey: CFStringRef; external name '_kHIObjectCustomDataParameterNamesKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kHIObjectCustomDataParameterTypesKey
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kHIObjectCustomDataParameterTypesKey: CFStringRef; external name '_kHIObjectCustomDataParameterTypesKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kHIObjectCustomDataParameterValuesKey
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kHIObjectCustomDataParameterValuesKey: CFStringRef; external name '_kHIObjectCustomDataParameterValuesKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ Standard custom archive data dictionary keys defining a class and superclass for clients who do
+ not implement the object's true class. Each keyed value is a CFStringRef based HIObject class ID.
+}
+{
+ * kHIObjectCustomDataClassIDKey
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kHIObjectCustomDataClassIDKey: CFStringRef; external name '_kHIObjectCustomDataClassIDKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kHIObjectCustomDataSuperClassIDKey
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kHIObjectCustomDataSuperClassIDKey: CFStringRef; external name '_kHIObjectCustomDataSuperClassIDKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ Standard custom archive data dictionary key for ProcPointer based CDEFs. The key value is a
+ CFString based SInt16. Use CFStringGetIntValue in CFString.h for CFStringRef <-> SInt16 conversion.
+}
+{
+ * kHIObjectCustomDataCDEFProcIDKey
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kHIObjectCustomDataCDEFProcIDKey: CFStringRef; external name '_kHIObjectCustomDataCDEFProcIDKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * HIObjectCopyCustomArchiveData()
+ *
+ * Discussion:
+ * Copies the custom archive data associated with an HIObject that
+ * has been read from or will be written to an archive. Useful for
+ * an archive editor that has read a custom object from an archive
+ * and would like to edit its custom data.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inObject:
+ * The object whose custom archive data you wish to retrieve.
+ *
+ * outCustomData:
+ * On return, a CFDictionaryRef containing the custom data. The
+ * client is responsible for releasing the dictionary. NULL will
+ * be returned if there is no custom archive data available.
+ *
+ * Result:
+ * An OSStatus signifying success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectCopyCustomArchiveData( inObject: HIObjectRef; var outCustomData: CFDictionaryRef ): OSStatus; external name '_HIObjectCopyCustomArchiveData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIObjectSetCustomArchiveData()
+ *
+ * Discussion:
+ * Retrieves the custom archive data associated with an HIObject
+ * that has been read from or will be written to an archive. Useful
+ * for an archive editor that has edited a custom object's custom
+ * data and would like it to be written to an archive with the
+ * object.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inObject:
+ * The object whose custom archive data you wish to change.
+ *
+ * inCustomData:
+ * A CFDictionaryRef containing the custom archive data you would
+ * like to associate with the object. Setting custom data will
+ * replace any existing custom data. Passing NULL will clear the
+ * custom archive data. The dictionary's keys and values must use
+ * CFType callbacks for archiving purposes.
+ *
+ * Result:
+ * An OSStatus signifying success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIObjectSetCustomArchiveData( inObject: HIObjectRef; inCustomData: CFDictionaryRef { can be NULL } ): OSStatus; external name '_HIObjectSetCustomArchiveData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit HIShape}
+{
+ File: HIToolbox/HIShape.h
+
+ Contains: Generic Abstract Shape API
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 2001-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ File: HIShape.p(.pas) }
+{ }
+{ Contains: CodeWarrior Pascal(GPC) translation of Apple's Mac OS X 10.2 introduced HIShape.h. }
+{ Translation compatible with make-gpc-interfaces.pl generated MWPInterfaces }
+{ (GPCPInterfaces) and Mac OS X 10.2.x or higher. The CodeWarrior Pascal translation }
+{ is linkable with Mac OS X 10.2.x or higher CFM CarbonLib. The GPC translation is }
+{ linkable with Mac OS X 10.2.x or higher Mach-O Carbon.framework. }
+{ }
+{ Version: 1.0 }
+{ }
+{ Pascal Translation: Gale Paeper, <gpaeper@empirenet.com>, 2004 }
+{ }
+{ Copyright: Subject to the constraints of Apple's original rights, you're free to use this }
+{ translation as you deem fit. }
+{ }
+{ Bugs?: This is an AS IS translation with no express guarentees of any kind. }
+{ If you do find a bug, please help out the Macintosh Pascal programming community by }
+{ reporting your bug finding and possible fix to either personal e-mail to Gale Paeper }
+{ or a posting to the MacPascal mailing list. }
+{ }
+{ Translation assisted by: }
+{This file was processed by Dan's Source Converter}
+{version 1.3 (this version modified by Ingemar Ragnemalm)}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{
+ * HIShape
+ *
+ * Discussion:
+ * HIShape is an abstract shape object for use with some of the
+ * HIToolbox APIs. It is designed as a replacement for RgnHandles
+ * (though it is currently implemented in terms of them at the time
+ * of this writing). This abstraction will allow us to avoid using
+ * QD types in our APIs, particularly in HIView.
+ *
+ * One of the biggest benefits of HIShape is that we have mutable
+ * and immutable variants. This means that immutable shapes can be
+ * created and passed around and 'copied' very quickly, since they
+ * are actually refcounted when copied. This avoids needing to do
+ * the handle-to-handle copies that occur right now with
+ * RgnHandle-based APIs.
+ }
+type
+ HIShapeRef = ^SInt32; { an opaque 32-bit type }
+type
+ HIMutableShapeRef = ^SInt32; { an opaque 32-bit type }
+
+
+{
+ * HIShapeGetTypeID()
+ *
+ * Discussion:
+ * Returns the CF type ID for the HIShape class.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * A CF type ID.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeGetTypeID: CFTypeID; external name '_HIShapeGetTypeID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{======================================================================================}
+{ IMMUTABLE FUNCTIONS }
+{======================================================================================}
+{
+ * HIShapeCreateEmpty()
+ *
+ * Discussion:
+ * Creates an immutable empty shape. Useful at times.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * An immutable, empty HIShape reference.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeCreateEmpty: HIShapeRef; external name '_HIShapeCreateEmpty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIShapeCreateWithQDRgn()
+ *
+ * Discussion:
+ * Creates an immutable shape based on an existing Quickdraw region
+ * handle.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRgn:
+ * The Quickdraw region from which to create the HIShape.
+ *
+ * Result:
+ * An immutable HIShape reference.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeCreateWithQDRgn( inRgn: RgnHandle ): HIShapeRef; external name '_HIShapeCreateWithQDRgn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeCreateWithRect()
+ *
+ * Discussion:
+ * Creates an immutable, rectangular shape based on a given
+ * rectangle.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * The HIRect from which to create the resulting shape.
+ *
+ * Result:
+ * An immutable HIShape reference.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeCreateWithRect( const (*var*) inRect: HIRect ): HIShapeRef; external name '_HIShapeCreateWithRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeCreateCopy()
+ *
+ * Discussion:
+ * Creates an immutable copy of a mutable or immutable HIShape.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape:
+ * The existing HIShapeRef you wish to copy.
+ *
+ * Result:
+ * An immutable HIShape reference.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeCreateCopy( inShape: HIShapeRef ): HIShapeRef; external name '_HIShapeCreateCopy';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeCreateIntersection()
+ *
+ * Discussion:
+ * Creates a new immutable shape which is the intersection of two
+ * others.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape1:
+ * An existing HIShapeRef.
+ *
+ * inShape2:
+ * An existing HIShapeRef.
+ *
+ * Result:
+ * A new immutable HIShapeRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeCreateIntersection( inShape1: HIShapeRef; inShape2: HIShapeRef ): HIShapeRef; external name '_HIShapeCreateIntersection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeCreateDifference()
+ *
+ * Discussion:
+ * Creates a new immutable shape which is the difference of two
+ * others. The second shape is subtracted from the first.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape1:
+ * An existing HIShapeRef.
+ *
+ * inShape2:
+ * An existing HIShapeRef.
+ *
+ * Result:
+ * A new immutable HIShapeRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeCreateDifference( inShape1: HIShapeRef; inShape2: HIShapeRef ): HIShapeRef; external name '_HIShapeCreateDifference';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeCreateUnion()
+ *
+ * Discussion:
+ * Creates a new immutable shape which is the union of two others.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape1:
+ * An existing HIShapeRef.
+ *
+ * inShape2:
+ * An existing HIShapeRef.
+ *
+ * Result:
+ * A new immutable HIShapeRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeCreateUnion( inShape1: HIShapeRef; inShape2: HIShapeRef ): HIShapeRef; external name '_HIShapeCreateUnion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeIsEmpty()
+ *
+ * Discussion:
+ * Returns true if the given HIShapeRef is empty, i.e. its area is
+ * empty.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape:
+ * The existing HIShapeRef you wish to test.
+ *
+ * Result:
+ * A boolean result.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeIsEmpty( inShape: HIShapeRef ): Boolean; external name '_HIShapeIsEmpty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeIsRectangular()
+ *
+ * Discussion:
+ * Returns true if the given HIShapeRef is rectangular.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape:
+ * The existing HIShapeRef you wish to test.
+ *
+ * Result:
+ * A boolean result.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeIsRectangular( inShape: HIShapeRef ): Boolean; external name '_HIShapeIsRectangular';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeContainsPoint()
+ *
+ * Discussion:
+ * Returns true if the given HIShapeRef contains the point passed in.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape:
+ * An existing HIShapeRef.
+ *
+ * inPoint:
+ * The point to check.
+ *
+ * Result:
+ * A boolean result.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeContainsPoint( inShape: HIShapeRef; const (*var*) inPoint: HIPoint ): Boolean; external name '_HIShapeContainsPoint';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeIntersectsRect()
+ *
+ * Discussion:
+ * Returns true if the given HIShapeRef intersects the rect passed
+ * in.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape:
+ * An existing HIShapeRef.
+ *
+ * inRect:
+ * The rectangle to check.
+ *
+ * Result:
+ * A boolean result.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeIntersectsRect( inShape: HIShapeRef; const (*var*) inRect: HIRect ): Boolean; external name '_HIShapeIntersectsRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIShapeGetBounds()
+ *
+ * Discussion:
+ * Returns the bounding rectangle of a given HIShapeRef.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape:
+ * An existing HIShapeRef.
+ *
+ * outRect:
+ * Receives the bounding rectangle.
+ *
+ * Result:
+ * A pointer to the rectangle you passed in, for convenience.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeGetBounds( inShape: HIShapeRef; var outRect: HIRect ): HIRectPtr; external name '_HIShapeGetBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeGetAsQDRgn()
+ *
+ * Discussion:
+ * Changes a given Quickdraw region handle to have the same shape as
+ * a given HIShapeRef. Essentially you are converting an HIShapeRef
+ * into a RgnHandle. This conversion may lose fidelity depending on
+ * how the shape was created originally.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape:
+ * An existing HIShapeRef.
+ *
+ * outRgn:
+ * An existing region to change.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeGetAsQDRgn( inShape: HIShapeRef; outRgn: RgnHandle ): OSStatus; external name '_HIShapeGetAsQDRgn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeReplacePathInCGContext()
+ *
+ * Discussion:
+ * Given an HIShapeRef and a CGContextRef, make the current path in
+ * the context represent the shape. You might use this to clip to a
+ * shape, for example. You could call this function and then
+ * immediately call CGContextClip.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape:
+ * An existing HIShapeRef.
+ *
+ * inContext:
+ * The context to apply the shape to.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeReplacePathInCGContext( inShape: HIShapeRef; inContext: CGContextRef ): OSStatus; external name '_HIShapeReplacePathInCGContext';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeSetQDClip()
+ *
+ * Discussion:
+ * Given an HIShapeRef and a Quickdraw port, set the current clip in
+ * the port to the shape.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape:
+ * An existing HIShapeRef.
+ *
+ * inPort:
+ * The port to set the clip for.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeSetQDClip( inShape: HIShapeRef; inPort: CGrafPtr ): OSStatus; external name '_HIShapeSetQDClip';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{======================================================================================}
+{ MUTABLE FUNCTIONS }
+{======================================================================================}
+{
+ * HIShapeCreateMutable()
+ *
+ * Discussion:
+ * Creates a new, mutable, empty shape.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * A mutable shape reference.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeCreateMutable: HIMutableShapeRef; external name '_HIShapeCreateMutable';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeCreateMutableCopy()
+ *
+ * Discussion:
+ * Given an existing HIShapeRef, creates a new mutable copy.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inOrig:
+ * The shape to copy.
+ *
+ * Result:
+ * A mutable shape reference.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeCreateMutableCopy( inOrig: HIShapeRef ): HIMutableShapeRef; external name '_HIShapeCreateMutableCopy';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeSetEmpty()
+ *
+ * Discussion:
+ * Sets a mutable shape to be an empty shape.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape:
+ * The shape to empty.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeSetEmpty( inShape: HIMutableShapeRef ): OSStatus; external name '_HIShapeSetEmpty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeIntersect()
+ *
+ * Discussion:
+ * Takes two shapes and sets a third to be their intersection.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape1:
+ * The first shape.
+ *
+ * inShape2:
+ * The second shape.
+ *
+ * outResult:
+ * The shape to receive the result of the intersection. This can
+ * be one of the source shapes.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeIntersect( inShape1: HIShapeRef; inShape2: HIShapeRef; outResult: HIMutableShapeRef ): OSStatus; external name '_HIShapeIntersect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeDifference()
+ *
+ * Discussion:
+ * Takes two shapes and sets a third to be their difference. The
+ * second shape is subtracted from the first.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape1:
+ * The first shape.
+ *
+ * inShape2:
+ * The second shape.
+ *
+ * outResult:
+ * The shape to receive the result of the intersection. This can
+ * be one of the source shapes.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeDifference( inShape1: HIShapeRef; inShape2: HIShapeRef; outResult: HIMutableShapeRef ): OSStatus; external name '_HIShapeDifference';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeUnion()
+ *
+ * Discussion:
+ * Takes two shapes and sets a third to be their union.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape1:
+ * The first shape.
+ *
+ * inShape2:
+ * The second shape.
+ *
+ * outResult:
+ * The shape to receive the result of the union. This can be one
+ * of the source shapes.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeUnion( inShape1: HIShapeRef; inShape2: HIShapeRef; outResult: HIMutableShapeRef ): OSStatus; external name '_HIShapeUnion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIShapeOffset()
+ *
+ * Discussion:
+ * Offsets a shape by some delta.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inShape:
+ * The shape to offset.
+ *
+ * inDX:
+ * The delta to move the shape on the X axis.
+ *
+ * inDY:
+ * The delta to move the shape on the Y axis.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIShapeOffset( inShape: HIMutableShapeRef; inDX: Float32; inDY: Float32 ): OSStatus; external name '_HIShapeOffset';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{unit HIView}
+{
+ File: HIToolbox/HIView.h
+
+ Contains: HIView routines
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 2001-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ File: HIView.p(.pas) }
+{ }
+{ Contains: CodeWarrior Pascal( GPC) translation of Apple's Mac OS X 10.3 HIView.h }
+{ Translation compatible with make-gpc-interfaces.pl generated MWPInterfaces }
+{ (GPCPInterfaces). For the 10.2 available APIs, the CodeWarrior Pascal translation }
+{ is linkable with Mac OS X 10.2.x or higher CFM CarbonLib and the GPC translation is }
+{ linkable with Mac OS X 10.2.x or higher Mach-O Carbon.framework. For the 10.3 }
+{ available APIs, the CodeWarrior Pascal translation is only selectively linkable with }
+{ Mac OS X 10.3.x or higher CFM CarbonLib and the GPC translation is linkable with Mac }
+{ OS X 10.3.x or higher Mach-O Carbon.framework. }
+{ }
+{ Version: 1.1 }
+{ }
+{ Pascal Translation: Gale Paeper, <gpaeper@empirenet.com>, 2004 }
+{ }
+{ Copyright: Subject to the constraints of Apple's original rights, you're free to use this }
+{ translation as you deem fit. }
+{ }
+{ Bugs?: This is an AS IS translation with no express guarentees of any kind. }
+{ If you do find a bug, please help out the Macintosh Pascal programming community by }
+{ reporting your bug finding and possible fix to either personal e-mail to Gale Paeper }
+{ or a posting to the MacPascal mailing list. }
+{
+ Change History (most recent first ):
+
+ <4> 4/8/04 GRP Completed new additions from HIView.h, version HIToolbox-145.33~1.
+ <3> ?/?/04 PNL Added most new additions from HIView.h, version HIToolbox-145.33~1.
+ <2> 10/02/04 GRP Added support for GPC as well as CodeWarrior Pascal.
+ <1> 9/8/03 GRP First Pascal translation of HIView.h, version HIToolbox-123.6~10.
+}
+{ Translation assisted by: }
+{This file was processed by Dan's Source Converter}
+{version 1.3 (this version modified by Ingemar Ragnemalm)}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+type
+ HIViewRef = ControlRef;
+type
+ HIViewID = ControlID;
+{
+ * kHIViewWindowContentID
+ *
+ * Discussion:
+ * The standard view ID for the content view of a window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+{GRP translation note: kHIViewWindowContentID is really a C language external constant exported from
+ CarbonLib (Carbon.framework). Treating it as an externally declared variable works as long as it
+ used as a READ ONLY variable. CodeWarrior Pascal has no capability for enforcing READ ONLY usage
+ so it is up to the programmer to obey the READ ONLY rule. GPC does enforce READ ONLY usage with the
+ attribute (const).}
+
+{WARNING: The CFM CarbonLib export for kHIViewWindowContentID is broken. For CFM CodeWarrior Pascal,
+ some workarounds are:
+
+ 1. Use CFBundle loading and CFBundleGetDataPointerForName to obtain the correct data.
+
+ 2. For composting windows, the correct data can be obtained with code similar to:
+
+ ignoreResult := GetRootControl( theWind, theContentRoot );
+ ignoreResult := GetControlID( theContentRoot, theContentControlID );
+
+ The correct data for kHIViewWindowContentID is in theContentControlID.
+ }
+var kHIViewWindowContentID: HIViewID; external name '_kHIViewWindowContentID'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+{
+ * kHIViewWindowGrowBoxID
+ *
+ * Discussion:
+ * The standard view ID for the grow box view of a window. Not all
+ * windows have grow boxes, so be aware that you might not find this
+ * view if you look for it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+{GRP translation note: kHIViewWindowGrowBoxID is really a C language external constant exported from
+ CarbonLib (Carbon.framework). Treating it as an externally declared variable works as long as it
+ used as a READ ONLY variable. CodeWarrior Pascal has no capability for enforcing READ ONLY usage
+ so it is up to the programmer to obey the READ ONLY rule. GPC does enforce READ ONLY usage with the
+ attribute (const).}
+var kHIViewWindowGrowBoxID: HIViewID; external name '_kHIViewWindowGrowBoxID'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+{
+ * Discussion:
+ * HIViewZOrderOp
+ }
+const
+{
+ * Indicates we wish to order a view above another view.
+ }
+ kHIViewZOrderAbove = 1;
+
+ {
+ * Indicates we wish to order a view below another view.
+ }
+ kHIViewZOrderBelow = 2;
+
+type
+ HIViewZOrderOp = UInt32;
+
+{
+ * HIViewFrameMetrics
+ *
+ * Summary:
+ * Describes the offsets from the structure to the content area of a
+ * view; for example, the top metric is the difference between the
+ * vertical coordinate of the top edge of the viewÕs structure
+ * region and the vertical coordinate of the top edge of the viewÕs
+ * content region. This structure is returned by a view in response
+ * to a kEventControlGetFrameMetrics event.
+ }
+type
+ HIViewFrameMetrics = record
+{
+ * Height of the top of the structure area.
+ }
+ top: Float32;
+
+ {
+ * Width of the left of the structure area.
+ }
+ left: Float32;
+
+ {
+ * Height of the bottom of the structure area.
+ }
+ bottom: Float32;
+
+ {
+ * Width of the right of the structure area.
+ }
+ right: Float32;
+ end;
+{==============================================================================}
+{ ATTRIBUTES }
+{==============================================================================}
+
+{
+ * Summary:
+ * View attributes are generally determined by clients of the view;
+ * the view itself should observe the attributes and behave
+ * accordingly.
+ *
+ * Discussion:
+ * View Attributes
+ }
+const
+{
+ * When set, the control will send the command it generates to the
+ * user focus and propagate as it would naturally from there. The
+ * default is to send the command to itself and then to its parent
+ * and so forth.
+ }
+ kHIViewAttributeSendCommandToUserFocus = 1 shl 0;
+
+ {
+ * Indicates that a text editing control should behave appropriately
+ * for editing fields in a dialog; specifically, the control should
+ * ignore the Return, Enter, Escape, and Tab keys, and allow them to
+ * be processed by other participants in the event flow. Available on
+ * Mac OS X 10.3 and later.
+ }
+ kHIViewAttributeIsFieldEditor = 1 shl 1;
+
+ {
+ * Legacy synonym for kHIViewAttributeSendCommandToUserFocus. Please
+ * use it instead.
+ }
+ kHIViewSendCommandToUserFocus = kHIViewAttributeSendCommandToUserFocus;
+
+
+{
+ * HIView features
+ *
+ * Summary:
+ * View feature flags are generally determined by the view itself,
+ * and are not typically changed by clients of the view.
+ }
+const
+{
+ * This view supports using the ghosting protocol when live tracking
+ * is not enabled.
+ }
+ kHIViewFeatureSupportsGhosting = 1 shl 0;
+
+ {
+ * This view allows subviews to be embedded within it.
+ }
+ kHIViewFeatureAllowsSubviews = 1 shl 1;
+
+ {
+ * If this view is clicked, the keyboard focus should be set to this
+ * view automatically. This is primarily used for edit text controls.
+ }
+ kHIViewFeatureGetsFocusOnClick = 1 shl 8;
+
+ {
+ * This view supports the live feedback protocol. Necessary to
+ * implement live scroll bar tracking. Clients of a view should never
+ * disable this.
+ }
+ kHIViewFeatureSupportsLiveFeedback = 1 shl 10;
+
+ {
+ * This view can be put into a radio group. Radio buttons and bevel
+ * buttons report this behavior.
+ }
+ kHIViewFeatureSupportsRadioBehavior = 1 shl 11;
+
+ {
+ * This view supports the auto-toggle protocol and should at the very
+ * least auto- toggle from off to on and back. The view can support a
+ * carbon event for more advanced auto-toggling of its value. The tab
+ * view supports this, for example, so that when a tab is clicked its
+ * value changes automatically.
+ }
+ kHIViewFeatureAutoToggles = 1 shl 14;
+
+ {
+ * This is merely informational. Turning it off would not necessarily
+ * disable any timer a view might be using, but it could obey this
+ * bit if it so desired.
+ }
+ kHIViewFeatureIdlesWithTimer = 1 shl 23;
+
+ {
+ * This tells the control manager that the up button part increases
+ * the value of the control instead of decreasing it. For example,
+ * the Little Arrows (Spinner) control increase its value when the up
+ * button is pressed. Scroll bars, on the other hand, decrease the
+ * value when their up buttons are pressed.
+ }
+ kHIViewFeatureInvertsUpDownValueMeaning = 1 shl 24;
+
+ {
+ * This is an optimization for determining a view's opaque region.
+ * When set, the view system just uses the view's structure region,
+ * and can usually avoid having to call the view at all.
+ }
+ kHIViewFeatureIsOpaque = 1 shl 25;
+
+ {
+ * This is an optimization for determining what gets invalidated when
+ * views are dirtied. For example, on a metal window, the content
+ * view is actually fully transparent, so invalidating it doesn't
+ * really help things. By telling the control manager that the view
+ * is transparent and does not do any drawing, we can avoid trying to
+ * invalidate it and instead invalidate views behind it.
+ }
+ kHIViewFeatureDoesNotDraw = 1 shl 27;
+
+ {
+ * Indicates to the Control Manager that this view doesn't use the
+ * special part codes for indicator, inactive, and disabled.
+ * Available in Mac OS X 10.3 and later.
+ }
+ kHIViewFeatureDoesNotUseSpecialParts = 1 shl 28;
+
+ {
+ * This is an optimization for determining the clickable region of a
+ * window (used for metal windows, for example, when doing async
+ * window dragging). The presence of this bit tells us not to bother
+ * asking the control for the clickable region. A view like the
+ * visual separator would set this bit. It's typically used in
+ * conjunction with the kHIViewFeatureDoesNotDraw bit.
+ }
+ kHIViewFeatureIgnoresClicks = 1 shl 29;
+
+
+{
+ * HIView valid feature sets
+ *
+ * Summary:
+ * These are sets of features that are available on the version of
+ * Mac OS X corresponding to that named in the constant.
+ }
+const
+ kHIViewValidFeaturesForPanther = $3B804D03;
+
+
+{
+ * HIView feature synonyms
+ *
+ * Summary:
+ * Legacy synonyms for HIView feature bit names. Please use the
+ * newer names.
+ }
+const
+ kHIViewSupportsGhosting = kHIViewFeatureSupportsGhosting;
+ kHIViewAllowsSubviews = kHIViewFeatureAllowsSubviews;
+ kHIViewGetsFocusOnClick = kHIViewFeatureGetsFocusOnClick;
+ kHIViewSupportsLiveFeedback = kHIViewFeatureSupportsLiveFeedback;
+ kHIViewSupportsRadioBehavior = kHIViewFeatureSupportsRadioBehavior;
+ kHIViewAutoToggles = kHIViewFeatureAutoToggles;
+ kHIViewIdlesWithTimer = kHIViewFeatureIdlesWithTimer;
+ kHIViewInvertsUpDownValueMeaning = kHIViewFeatureInvertsUpDownValueMeaning;
+ kHIViewIsOpaque = kHIViewFeatureIsOpaque;
+ kHIViewDoesNotDraw = kHIViewFeatureDoesNotDraw;
+ kHIViewDoesNotUseSpecialParts = kHIViewFeatureDoesNotUseSpecialParts;
+ kHIViewIgnoresClicks = kHIViewFeatureIgnoresClicks;
+
+
+type
+ HIViewFeatures = UInt64;
+{==============================================================================}
+{ VIEW PART CODES }
+{==============================================================================}
+type
+ HIViewPartCode = ControlPartCode;
+ HIViewPartCodePtr = ^HIViewPartCode;
+
+{
+ * HIViewPartCodes
+ *
+ }
+const
+ kHIViewNoPart = 0;
+ kHIViewIndicatorPart = 129;
+ kHIViewDisabledPart = 254;
+ kHIViewInactivePart = 255;
+
+ {
+ * Use this constant when not referring to a specific part, but
+ * rather the entire view.
+ }
+ kHIViewEntireView = kHIViewNoPart;
+
+
+{
+ * HIView Meta-Parts
+ *
+ * Summary:
+ * A meta-part is a part used in a call to the HIViewCopyShape API.
+ * These parts are parts that might be defined by a view. They
+ * define a region of a view. Along with these parts, you can also
+ * pass in normal part codes to get the regions of those parts. Not
+ * all views fully support this feature.
+ }
+const
+{
+ * The structure region is the total area over which the view draws.
+ }
+ kHIViewStructureMetaPart = -1;
+
+ {
+ * The content region is only defined by views that can embed other
+ * views. It is the area that embedded content can live.
+ }
+ kHIViewContentMetaPart = -2;
+
+ {
+ * Mac OS X 10.2 or later
+ }
+ kHIViewOpaqueMetaPart = -3;
+
+ {
+ * Mac OS X 10.3 or later, only used for async window dragging.
+ * Default is structure region.
+ }
+ kHIViewClickableMetaPart = -4;
+
+
+{
+ * HIView Focus Parts
+ *
+ }
+const
+{
+ * Tells view to clear its focus
+ }
+ kHIViewFocusNoPart = kHIViewNoPart;
+
+ {
+ * Tells view to focus on the next part
+ }
+ kHIViewFocusNextPart = -1;
+
+ {
+ * Tells view to focus on the previous part
+ }
+ kHIViewFocusPrevPart = -2;
+
+{==============================================================================}
+{ CONTENT }
+{==============================================================================}
+type
+ HIViewImageContentType = ControlContentType;
+type
+ HIViewImageContentInfo = ControlImageContentInfo;
+type
+ HIViewContentType = SInt16;
+
+{
+ * HIViewContentTypes
+ *
+ }
+const
+{
+ * The view has no content besides text.
+ }
+ kHIViewContentTextOnly = 0;
+
+ {
+ * The view has no content.
+ }
+ kHIViewContentNone = 0;
+
+ {
+ * The view's content is an IconSuiteRef.
+ }
+ kHIViewContentIconSuiteRef = 129;
+
+ {
+ * The view's content is an IconRef.
+ }
+ kHIViewContentIconRef = 132;
+
+ {
+ * The view's content is a CGImageRef.
+ }
+ kHIViewContentCGImageRef = 134;
+
+
+{
+ * HIViewContentInfo
+ }
+type
+ HIViewContentInfo = record
+{
+ * The type of content referenced in the content union.
+ }
+ contentType: HIViewContentType;
+ case SInt16 of
+ 0: (
+ iconSuite: IconSuiteRef;
+ );
+ 1: (
+ iconRef: IconRef_fix;
+ );
+ 2: (
+ imageRef: CGImageRef;
+ );
+ end;
+type
+ HIViewContentInfoPtr = ^HIViewContentInfo;
+{==============================================================================}
+{ ERROR CODES }
+{==============================================================================}
+
+{
+ * Discussion:
+ * View/Control Error Codes
+ }
+const
+{
+ * This value will be returned from an HIView API or a Control
+ * Manager API when an action that is only supported on a compositing
+ * window is attempted on a non-compositing window. This doesn't
+ * necessarily mean that the API is only callable for compositing
+ * windows; sometimes the legality of the action is based on other
+ * parameters of the API. See HIViewAddSubview for one particular use
+ * of this error code.
+ }
+ errNeedsCompositedWindow = -30598;
+
+{==============================================================================}
+{ HIOBJECT SUPPORT }
+{ Setting Initial Bounds }
+{ When creating a view using HIObjectCreate, you can set the initial bounds }
+{ automatically by passing in an initialization event into HIObjectCreate }
+{ with a kEventParamBounds parameter as typeHIRect or typeQDRectangle. }
+{==============================================================================}
+{ The HIObject class ID for the HIView class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIViewClassID CFSTRP('com.apple.hiview')}
+{$endc}
+{==============================================================================}
+{ EMBEDDING }
+{==============================================================================}
+{
+ * HIViewGetRoot()
+ *
+ * Discussion:
+ * Returns the root view for a window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to get the root for.
+ *
+ * Result:
+ * The root view for the window, or NULL if an invalid window is
+ * passed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetRoot( inWindow: WindowRef ): HIViewRef; external name '_HIViewGetRoot';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewAddSubview()
+ *
+ * Discussion:
+ * Adds a subview to the given parent. The new subview is added to
+ * the front of the list of subviews (i.e., it is made topmost).
+ *
+ * The subview being added is not retained by the new parent view.
+ * Do not release the view after adding it, or it will cease to
+ * exist. All views in a window will be released automatically when
+ * the window is destroyed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inParent:
+ * The view which will receive the new subview.
+ *
+ * inNewChild:
+ * The subview being added.
+ *
+ * Result:
+ * An operating system result code.
+ * errNeedsCompositedWindow will be returned when you try to embed
+ * into the content view in a non-compositing window; you can only
+ * embed into the content view in compositing windows.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewAddSubview( inParent: HIViewRef; inNewChild: HIViewRef ): OSStatus; external name '_HIViewAddSubview';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewRemoveFromSuperview()
+ *
+ * Discussion:
+ * Removes a view from its parent.
+ * The subview being removed from the parent is not released and
+ * still exists.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to remove.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewRemoveFromSuperview( inView: HIViewRef ): OSStatus; external name '_HIViewRemoveFromSuperview';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewGetSuperview()
+ *
+ * Discussion:
+ * Returns a view's parent view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose parent you are interested in getting.
+ *
+ * Result:
+ * An HIView reference, or NULL if this view has no parent or is
+ * invalid.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetSuperview( inView: HIViewRef ): HIViewRef; external name '_HIViewGetSuperview';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewGetFirstSubview()
+ *
+ * Discussion:
+ * Returns the first subview of a container. The first subview is
+ * the topmost subview in z-order.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose subview you are fetching.
+ *
+ * Result:
+ * An HIView reference, or NULL if this view has no subviews or is
+ * invalid.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetFirstSubview( inView: HIViewRef ): HIViewRef; external name '_HIViewGetFirstSubview';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewGetLastSubview()
+ *
+ * Discussion:
+ * Returns the last subview of a container. The last subview is the
+ * bottommost subview in z-order.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose subview you are fetching.
+ *
+ * Result:
+ * An HIView reference, or NULL if this view has no subviews or is
+ * invalid.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetLastSubview( inView: HIViewRef ): HIViewRef; external name '_HIViewGetLastSubview';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewGetNextView()
+ *
+ * Discussion:
+ * Returns the next view after the one given, in z-order.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to use as reference.
+ *
+ * Result:
+ * An HIView reference, or NULL if this view has no view behind it
+ * or is invalid.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetNextView( inView: HIViewRef ): HIViewRef; external name '_HIViewGetNextView';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewGetPreviousView()
+ *
+ * Discussion:
+ * Returns the previous view before the one given, in z-order.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to use as reference.
+ *
+ * Result:
+ * An HIView reference, or NULL if this view has no view in front of
+ * it or is invalid.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetPreviousView( inView: HIViewRef ): HIViewRef; external name '_HIViewGetPreviousView';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewCountSubviews()
+ *
+ * Summary:
+ * Counts the number of subviews embedded in a view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view for which to count subviews.
+ *
+ * outSubviewCount:
+ *
+ * Result:
+ * The number of subviews of the specified view.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewCountSubviews( inView: HIViewRef ): CFIndex; external name '_HIViewCountSubviews';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewGetIndexedSubview()
+ *
+ * Summary:
+ * Get the Nth subview of a view.
+ *
+ * Discussion:
+ * Instead of calling HIViewGetIndexedSubview repeatedly, it may be
+ * more efficient to iterate through the subviews of a view with
+ * calls HIViewGetFirstSubview and HIViewGetNextView.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose indexed sub-view is being requested.
+ *
+ * inSubviewIndex:
+ * The index of the subview to get.
+ *
+ * outSubview:
+ * An HIViewRef to be filled with the indexed subview.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetIndexedSubview( inView: HIViewRef; inSubviewIndex: CFIndex; var outSubview: HIViewRef ): OSStatus; external name '_HIViewGetIndexedSubview';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewSetZOrder()
+ *
+ * Discussion:
+ * Allows you to change the front-to-back ordering of sibling views.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose Z-order you wish to change.
+ *
+ * inOp:
+ * Indicates to order inView above or below inOther.
+ *
+ * inOther:
+ * Another optional view to use as a reference. You can pass NULL
+ * to mean an absolute position. For example, passing
+ * kHIViewZOrderAbove and NULL will move a view to the front of
+ * all of its siblings. Likewise, passing kHIViewZOrderBelow and
+ * NULL will move it to the back.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetZOrder( inView: HIViewRef; inOp: HIViewZOrderOp; inOther: HIViewRef { can be NULL } ): OSStatus; external name '_HIViewSetZOrder';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{==============================================================================}
+{ STATE and VALUES }
+{==============================================================================}
+
+{
+ * HIViewKind
+ }
+type
+ HIViewKind = record
+{
+ * The signature of the view. Apple reserves all signatures made up
+ * of only lowercase characters.
+ }
+ signature: OSType;
+
+ {
+ * The kind of the view. Apple reserves all kinds made up of only
+ * lowercase characters.
+ }
+ kind: OSType;
+ end;
+
+{
+ * View signature kind
+ *
+ }
+const
+{
+ * The signature of all HIToolbox views.
+ }
+ kHIViewKindSignatureApple = $6170706C (* 'appl' *);
+
+{
+ * HIViewSetVisible()
+ *
+ * Discussion:
+ * Hides or shows a view. Marks the area the view will occupy or
+ * used to occupy as needing to be redrawn later.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to hide or show.
+ *
+ * inVisible:
+ * A boolean value which indicates whether you wish to hide the
+ * view (false) or show the view (true).
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetVisible( inView: HIViewRef; inVisible: Boolean ): OSStatus; external name '_HIViewSetVisible';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewIsVisible()
+ *
+ * Summary:
+ * Returns whether a view is visible.
+ *
+ * Discussion:
+ * Note that HIViewIsVisible returns a view's effective visibility,
+ * which is determined both by the view's own visibility and the
+ * visibility of its parent views. If a parent view is invisible,
+ * then this view is considered to be invisible also.
+ *
+ * Latent visibility can be determined with HIViewIsLatentlyVisible.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose visibility you wish to determine.
+ *
+ * Result:
+ * A boolean value indicating whether the view is visible (true) or
+ * hidden (false).
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewIsVisible( inView: HIViewRef ): Boolean; external name '_HIViewIsVisible';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewIsLatentlyVisible()
+ *
+ * Summary:
+ * Returns whether or not a view is latently visible.
+ *
+ * Discussion:
+ * The view's visibility is also affected by the visibility of its
+ * parents; if any parent view is invisible, this view is considered
+ * invisible as well. HIViewIsLatentlyVisible returns whether a view
+ * is latently visible, even if its parents are invisible.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose latent visibility is to be checked.
+ *
+ * Result:
+ * True if the view is latently visible, otherwise false.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewIsLatentlyVisible( inView: HIViewRef ): Boolean; external name '_HIViewIsLatentlyVisible';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewSetHilite()
+ *
+ * Summary:
+ * Changes the highlighting of a view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view on which to set the highlight.
+ *
+ * inHilitePart:
+ * An HIViewPartCode indicating the part of the view to highlight.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetHilite( inView: HIViewRef; inHilitePart: HIViewPartCode ): OSStatus; external name '_HIViewSetHilite';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewIsActive()
+ *
+ * Summary:
+ * Returns whether or not a view is active.
+ *
+ * Discussion:
+ * The view's active state is also affected by the active state of
+ * its parents; if any parent view is inactive, this view is
+ * considered inactive as well. HIViewIsActive can optionally check
+ * to see if a view is latently active, even if its parents are
+ * inactive.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose active state is to be checked.
+ *
+ * outIsLatentActive:
+ * A pointer to a Boolean to be filled in with the latent active
+ * state of the view. The Boolean is set to true if the view is
+ * latently active, otherwise false. Can be NULL.
+ *
+ * Result:
+ * True if the view is active, otherwise false.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewIsActive( inView: HIViewRef; outIsLatentActive: BooleanPtr { can be NULL } ): Boolean; external name '_HIViewIsActive';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewSetActivated()
+ *
+ * Summary:
+ * Sets whether or not a view is active or inactive. If any children
+ * of the view have a latent active state, they will be adjusted
+ * accordingly.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to activate or deactivate.
+ *
+ * inSetActivated:
+ * True if setting the view to active, false if setting the view
+ * to inactive.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetActivated( inView: HIViewRef; inSetActivated: Boolean ): OSStatus; external name '_HIViewSetActivated';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewIsEnabled()
+ *
+ * Summary:
+ * Tests whether or not a view is enabled.
+ *
+ * Discussion:
+ * The view's enabled state is also affected by the enabled state of
+ * its parents; if any parent view is disabled, this view is
+ * considered disabled as well. HIViewIsEnabled can optionally check
+ * to see if a view is latently enabled, even if its parents are
+ * disabled.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to test.
+ *
+ * outIsLatentEnabled:
+ * A pointer to a Boolean to be filled in with the latent enabled
+ * state of the view. The Boolean is set to true if the view is
+ * latently enabled, otherwise false. Can be NULL.
+ *
+ * Result:
+ * True if the view is enabled, otherwise false.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewIsEnabled( inView: HIViewRef; outIsLatentEnabled: BooleanPtr { can be NULL } ): Boolean; external name '_HIViewIsEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewSetEnabled()
+ *
+ * Summary:
+ * Sets whether or not a view (and any subviews) are enabled or
+ * disabled.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to enable or disable.
+ *
+ * inSetEnabled:
+ * True if setting the view to enabled, false if setting the view
+ * to disabled.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetEnabled( inView: HIViewRef; inSetEnabled: Boolean ): OSStatus; external name '_HIViewSetEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewIsCompositingEnabled()
+ *
+ * Summary:
+ * Returns whether a view is being used in a compositing hierarchy.
+ *
+ * Discussion:
+ * A view that supports both compositing mode and non-compositing
+ * mode can use this routine to determine which mode it is currently
+ * running in. Looking for a window's kWindowCompositingAttribute is
+ * not sufficient, since some windows with that attribute have some
+ * of its views in non-compositing mode and vice-versa.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose compositing state you wish to determine.
+ *
+ * Result:
+ * A boolean value indicating whether the view is in compositing
+ * mode (true) or non-compositing mode (false).
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewIsCompositingEnabled( inView: HIViewRef ): Boolean; external name '_HIViewIsCompositingEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewSetText()
+ *
+ * Summary:
+ * Sets the text of a view to the specified string.
+ *
+ * Discussion:
+ * The "text" of the view is the text that will be displayed when
+ * drawing the view. This API first attempts to set the view's text
+ * (generally successful on views that handle the
+ * kControlEditTextCFStringTag SetControlData tag). If the attempt
+ * is unsuccessful, the view's title is set instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose text is being set.
+ *
+ * inText:
+ * The text to set for the view. The string is copied by the view,
+ * and may be released by the caller afterwards.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetText( inView: HIViewRef; inText: CFStringRef ): OSStatus; external name '_HIViewSetText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewCopyText()
+ *
+ * Summary:
+ * Makes a copy of the view's text as a CFString.
+ *
+ * Discussion:
+ * The "text" of the view is the text that will be displayed when
+ * drawing the view. This API first attempts to get the view's text
+ * (generally successful on views that handle the
+ * kControlEditTextCFStringTag GetControlData tag). If the attempt
+ * is unsuccessful, the view's title is copied instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view for which to get the text.
+ *
+ * Result:
+ * A CFStringRef containing a copy of the view's text. The caller of
+ * HIViewCopyText is responsible for releasing the returned text.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewCopyText( inView: HIViewRef ): CFStringRef; external name '_HIViewCopyText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewGetValue()
+ *
+ * Summary:
+ * Gets a view's value.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view for which to get the value.
+ *
+ * Result:
+ * The view's value.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetValue( inView: HIViewRef ): SInt32; external name '_HIViewGetValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewSetValue()
+ *
+ * Summary:
+ * Sets a view's value.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose value is to be set.
+ *
+ * inValue:
+ * The new value.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetValue( inView: HIViewRef; inValue: SInt32 ): OSStatus; external name '_HIViewSetValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewGetMinimum()
+ *
+ * Summary:
+ * Gets a view's minimum value.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view for which to get the minimum value.
+ *
+ * Result:
+ * The view's minimum value.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetMinimum( inView: HIViewRef ): SInt32; external name '_HIViewGetMinimum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewSetMinimum()
+ *
+ * Summary:
+ * Sets a view's minimum value.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose minimum value is to be set.
+ *
+ * inMinimum:
+ * The new minimum value.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetMinimum( inView: HIViewRef; inMinimum: SInt32 ): OSStatus; external name '_HIViewSetMinimum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewGetMaximum()
+ *
+ * Summary:
+ * Gets a view's maximum value.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view for which to get the maximum value.
+ *
+ * Result:
+ * The view's maximum value.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetMaximum( inView: HIViewRef ): SInt32; external name '_HIViewGetMaximum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewSetMaximum()
+ *
+ * Summary:
+ * Sets a view's maximum value.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose maximum value is to be set.
+ *
+ * inMaximum:
+ * The new maximum value.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetMaximum( inView: HIViewRef; inMaximum: SInt32 ): OSStatus; external name '_HIViewSetMaximum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewGetViewSize()
+ *
+ * Summary:
+ * Gets a view's view size.
+ *
+ * Discussion:
+ * The view size is the size of the content to which a view's
+ * display is proportioned. Most commonly used to set the
+ * proportional size of a scroll bar's thumb indicator.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view for which to get the view size.
+ *
+ * Result:
+ * The view size.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetViewSize( inView: HIViewRef ): SInt32; external name '_HIViewGetViewSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewSetViewSize()
+ *
+ * Summary:
+ * Sets a view's view size.
+ *
+ * Discussion:
+ * The view size is the size of the content to which a view's
+ * display is proportioned. Most commonly used to set the
+ * proportional size of a scroll bar's thumb indicator.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose view size is to be set.
+ *
+ * inViewSize:
+ * The new view size.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetViewSize( inView: HIViewRef; inViewSize: SInt32 ): OSStatus; external name '_HIViewSetViewSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewIsValid()
+ *
+ * Summary:
+ * HIViewIsValid tests to see if the passed in view is a view that
+ * HIToolbox knows about. It does not sanity check the data in the
+ * view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to test for validity.
+ *
+ * Result:
+ * True if the view is a valid view, otherwise, false.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewIsValid( inView: HIViewRef ): Boolean; external name '_HIViewIsValid';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewSetID()
+ *
+ * Summary:
+ * Sets the HIViewID of a view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view for which to set the ID.
+ *
+ * inID:
+ * The ID to set on the view.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetID( inView: HIViewRef; inID: HIViewID ): OSStatus; external name '_HIViewSetID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewGetID()
+ *
+ * Summary:
+ * Gets the HIViewID of a view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view for which to get the ID.
+ *
+ * outID:
+ * A pointer to an HIViewID to be filled with the view's ID.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetID( inView: HIViewRef; var outID: HIViewID ): OSStatus; external name '_HIViewGetID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewSetCommandID()
+ *
+ * Summary:
+ * Sets the command ID of a view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view for which to set the command ID.
+ *
+ * inCommandID:
+ * The command ID to set on the view.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetCommandID( inView: HIViewRef; inCommandID: UInt32 ): OSStatus; external name '_HIViewSetCommandID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewGetCommandID()
+ *
+ * Summary:
+ * Gets the command ID of a view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view for which to get the command ID.
+ *
+ * outCommandID:
+ * A pointer to a UInt32 to fill with the view's command id.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetCommandID( inView: HIViewRef; var outCommandID: UInt32 ): OSStatus; external name '_HIViewGetCommandID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewGetKind()
+ *
+ * Summary:
+ * Returns the kind of the given view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose kind to get.
+ *
+ * outViewKind:
+ * On successful exit, this will contain the view signature and
+ * kind. See ControlDefinitions.h or HIView.h for the kinds of
+ * each system view.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetKind( inView: HIViewRef; var outViewKind: HIViewKind ): OSStatus; external name '_HIViewGetKind';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{==============================================================================}
+{ POSITIONING }
+{==============================================================================}
+{
+ * HIViewGetBounds()
+ *
+ * Discussion:
+ * Returns the local bounds of a view. The local bounds are the
+ * coordinate system that is completely view-relative. A view's top
+ * left coordinate starts out at 0, 0. Most operations are done in
+ * these local coordinates. Moving a view is done via the frame
+ * instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose bounds you wish to determine.
+ *
+ * outRect:
+ * The local bounds of the view.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetBounds( inView: HIViewRef; var outRect: HIRect ): OSStatus; external name '_HIViewGetBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewGetFrame()
+ *
+ * Discussion:
+ * Returns the frame of a view. The frame is the bounds of a view
+ * relative to its parent's local coordinate system.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose frame you wish to determine.
+ *
+ * outRect:
+ * The frame of the view.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetFrame( inView: HIViewRef; var outRect: HIRect ): OSStatus; external name '_HIViewGetFrame';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewSetFrame()
+ *
+ * Discussion:
+ * Sets the frame of a view. This effectively moves the view within
+ * its parent. It also marks the view (and anything that was exposed
+ * behind it) to be redrawn.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose frame you wish to change.
+ *
+ * inRect:
+ * The new frame of the view.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetFrame( inView: HIViewRef; const (*var*) inRect: HIRect ): OSStatus; external name '_HIViewSetFrame';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewMoveBy()
+ *
+ * Discussion:
+ * Moves a view by a certain distance, relative to its current
+ * location. This affects a view's frame, but not its bounds.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view you wish to move.
+ *
+ * inDX:
+ * The horizontal distance to move the view. Negative values move
+ * the view to the left, positive values to the right.
+ *
+ * inDY:
+ * The vertical distance to move the view. Negative values move
+ * the view upward, positive values downward.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewMoveBy( inView: HIViewRef; inDX: Float32; inDY: Float32 ): OSStatus; external name '_HIViewMoveBy';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewPlaceInSuperviewAt()
+ *
+ * Discussion:
+ * Places a view at an absolute location within its parent. This
+ * affects the view's frame, but not its bounds.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view you wish to position.
+ *
+ * inX:
+ * The absolute horizontal coordinate at which to position the
+ * view.
+ *
+ * inY:
+ * The absolute vertical coordinate at which to position the view.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewPlaceInSuperviewAt( inView: HIViewRef; inX: Float32; inY: Float32 ): OSStatus; external name '_HIViewPlaceInSuperviewAt';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewReshapeStructure()
+ *
+ * Discussion:
+ * This is for use by custom views. If a view decides that its
+ * structure will change shape, it should call this. This tells the
+ * Toolbox to recalc things and invalidate as appropriate. You might
+ * use this when gaining/losing a focus ring, for example.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to reshape and invalidate.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewReshapeStructure( inView: HIViewRef ): OSStatus; external name '_HIViewReshapeStructure';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewRegionChanged()
+ *
+ * Discussion:
+ * Allows a view to tell the view system that a region of itself has
+ * changed. The view system might choose to react in some way. For
+ * example, if a view's clickable region has changed, this can be
+ * called to tell the Toolbox to resync the region it uses for async
+ * window dragging, if enabled. Likewise, if a view's opaque region
+ * changes, we can adjust the window's opaque shape as well. When
+ * views are moved, resizes, this stuff is taken care of for you. So
+ * this only need be called when there's a change in your view that
+ * occurs outside of those times.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to deal with.
+ *
+ * inRegionCode:
+ * The region that was changed. This can only be the structure
+ * opaque, and clickable regions at present.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewRegionChanged( inView: HIViewRef; inRegionCode: HIViewPartCode ): OSStatus; external name '_HIViewRegionChanged';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIViewCopyShape()
+ *
+ * Summary:
+ * Copies the shape of a part of a view. See the discussion on
+ * meta-parts in this header for more information
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view for which to copy the shape.
+ *
+ * inPart:
+ * The part of the view whose shape is to be copied.
+ *
+ * outShape:
+ * On exit, contains a newly created shape. The caller of
+ * HIViewCopyShape is responsible for releasing the copied shape.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewCopyShape( inView: HIViewRef; inPart: HIViewPartCode; var outShape: HIShapeRef ): OSStatus; external name '_HIViewCopyShape';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewGetOptimalBounds()
+ *
+ * Summary:
+ * Obtain a view's optimal size and/or text placement.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to examine.
+ *
+ * outBounds:
+ * A pointer to an HIRect to be filled with the view's optimal
+ * bounds. Can be NULL.
+ *
+ * outBaseLineOffset:
+ * A pointer to a float to be filled with the view's optimal text
+ * placement. Can be NULL.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetOptimalBounds( inView: HIViewRef; outBounds: HIRectPtr { can be NULL }; outBaseLineOffset: Float32Ptr { can be NULL } ): OSStatus; external name '_HIViewGetOptimalBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{==============================================================================}
+{ HIT TESTING/EVENT HANDLING }
+{==============================================================================}
+{
+ * HIViewGetViewForMouseEvent()
+ *
+ * Discussion:
+ * Returns the appropriate view to handle a mouse event. This is a
+ * little higher-level than HIViewGetSubviewHit. This routine will
+ * find the deepest view that should handle the mouse event, but
+ * along the way, it sends Carbon Events to each view asking it to
+ * return the appropriate subview. This allows parent views to catch
+ * clicks on their subviews. This is the recommended function to use
+ * before processing mouse events. Using one of the more primitive
+ * functions may result in an undefined behavior. In general we
+ * recommend the use of the Standard Window Handler instead of
+ * calling this function yourself.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to start from. You should pass the window's root view.
+ *
+ * inEvent:
+ * The mouse event in question.
+ *
+ * outView:
+ * The view that the mouse event should be sent to.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetViewForMouseEvent( inView: HIViewRef; inEvent: EventRef; var outView: HIViewRef ): OSStatus; external name '_HIViewGetViewForMouseEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewClick()
+ *
+ * Discussion:
+ * After a successful call to HIViewGetViewForMouseEvent for a mouse
+ * down event, you should call this function to have the view handle
+ * the click. In general we recommend the use of the Standard Window
+ * Handler instead of calling this function yourself.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to handle the event.
+ *
+ * inEvent:
+ * The mouse event to handle.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewClick( inView: HIViewRef; inEvent: EventRef ): OSStatus; external name '_HIViewClick';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewSimulateClick()
+ *
+ * Discussion:
+ * This function is used to simulate a mouse click on a given view.
+ * It sends a kEventControlSimulateHit event to the specified view,
+ * and also sends kEventControlHit and (if the Hit event is not
+ * handled) kEventCommandProcess events.
+ *
+ * Note that not all windows will respond to the events that are
+ * sent by this API. A fully Carbon-event-based window most likely
+ * will respond exactly as if the user had really clicked in the
+ * view. A window that is handled using classic EventRecord-based
+ * APIs (WaitNextEvent or ModalDialog) will typically not respond at
+ * all; to simulate a click in such a window, you may need to post a
+ * mouse-down/mouse-up pair, or use a Dialog Manager event filter
+ * proc to simulate a hit in a dialog item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to test the part hit.
+ *
+ * inPartToClick:
+ * The part the view should consider to be clicked.
+ *
+ * inModifiers:
+ * The modifiers the view can consider for its click action.
+ *
+ * outPartClicked:
+ * The part that was hit, can be kControlNoPart if no action
+ * occurred. May be NULL if you don't need the part code returned.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSimulateClick( inView: HIViewRef; inPartToClick: HIViewPartCode; inModifiers: UInt32; outPartClicked: HIViewPartCodePtr { can be NULL } ): OSStatus; external name '_HIViewSimulateClick';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewGetPartHit()
+ *
+ * Discussion:
+ * Given a view, and a view-relative point, this function returns
+ * the part code hit as determined by the view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to test the part hit.
+ *
+ * inPoint:
+ * The view-relative point to use.
+ *
+ * outPart:
+ * The part hit by inPoint.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetPartHit( inView: HIViewRef; const (*var*) inPoint: HIPoint; var outPart: HIViewPartCode ): OSStatus; external name '_HIViewGetPartHit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewGetSubviewHit()
+ *
+ * Discussion:
+ * Returns the child of the given view hit by the point passed in.
+ * This is more primitive than using HIViewGetViewForMouseEvent, and
+ * should be used only in non-event-handling cases.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view you wish to start from.
+ *
+ * inPoint:
+ * The mouse coordinate to use. This is passed in the local
+ * coordinate system of inView.
+ *
+ * inDeep:
+ * Pass true to find the deepest child hit, false to go only one
+ * level deep (just check direct children of inView).
+ *
+ * outView:
+ * The view hit by inPoint, or NULL if no subview was hit.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetSubviewHit( inView: HIViewRef; const (*var*) inPoint: HIPoint; inDeep: Boolean; var outView: HIViewRef ): OSStatus; external name '_HIViewGetSubviewHit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{==============================================================================}
+{ HIView-based tracking areas }
+{==============================================================================}
+type
+ HIViewTrackingAreaRef = ^SInt32; { an opaque 32-bit type }
+const
+ kEventParamHIViewTrackingArea = $63747261 (* 'ctra' *); { typeHIViewTrackingAreaRef}
+ typeHIViewTrackingAreaRef = $63747261 (* 'ctra' *);
+
+{
+ * kEventClassControl / kEventControlTrackingAreaEntered
+ *
+ * Summary:
+ * The mouse has entered a tracking area owned by your control.
+ *
+ * Discussion:
+ * If you have installed a mouse tracking area in your view, you
+ * will receive this event when the mouse enters that area. The
+ * tracking area reference is sent with the event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamHIViewTrackingArea (in, typeHIViewTrackingAreaRef)
+ * The tracking area that was entered.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were in effect when the mouse
+ * entered.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The location of the mouse in view coordinates.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlTrackingAreaEntered = 23;
+
+{
+ * kEventClassControl / kEventControlTrackingAreaExited
+ *
+ * Summary:
+ * The mouse has exited a tracking area owned by your control.
+ *
+ * Discussion:
+ * If you have installed a mouse tracking area in your view, you
+ * will receive this event when the mouse leaves that area. The
+ * tracking area reference is sent with the event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamHIViewTrackingArea (in, typeHIViewTrackingAreaRef)
+ * The tracking area that was entered.
+ *
+ * --> kEventParamKeyModifiers (in, typeUInt32)
+ * The keyboard modifiers that were in effect when the mouse
+ * left.
+ *
+ * --> kEventParamMouseLocation (in, typeHIPoint)
+ * The location of the mouse in view coordinates. This point
+ * may or may not lie on the boundary of the mouse region. It
+ * is merely where the mouse was relative to the view when the
+ * exit event was generated.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventControlTrackingAreaExited = 24;
+
+
+type
+ HIViewTrackingAreaID = UInt64;
+{
+ * HIViewNewTrackingArea()
+ *
+ * Summary:
+ * Creates a new tracking area for a view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to create a tracking area for.
+ *
+ * inShape:
+ * The shape to use. Pass NULL to indicate the entire structure
+ * region of the view is to be used.
+ *
+ * inID:
+ * An identifier for this tracking area. This value is completely
+ * up to the view to define. Pass zero if you don't care.
+ *
+ * outRef:
+ * A reference to the newly created tracking area. This references
+ * is NOT refcounted.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewNewTrackingArea( inView: HIViewRef; inShape: HIShapeRef { can be NULL }; inID: HIViewTrackingAreaID; var outRef: HIViewTrackingAreaRef ): OSStatus; external name '_HIViewNewTrackingArea';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewChangeTrackingArea()
+ *
+ * Summary:
+ * Alters the shape of an existing tracking area.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inArea:
+ * The area to change.
+ *
+ * inShape:
+ * The shape to use. Pass NULL to indicate the entire structure
+ * region of the view is to be used.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewChangeTrackingArea( inArea: HIViewTrackingAreaRef; inShape: HIShapeRef ): OSStatus; external name '_HIViewChangeTrackingArea';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewGetTrackingAreaID()
+ *
+ * Summary:
+ * Retrieves the HIViewTrackingAreaID of an existing tracking area.
+ * This value was set upon creation of the HIViewTrackingArea.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inArea:
+ * The area whose HIViewTrackingAreaID to retrieve.
+ *
+ * outID:
+ * The HIViewTrackingAreaID for this tracking area.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetTrackingAreaID( inArea: HIViewTrackingAreaRef; var outID: HIViewTrackingAreaID ): OSStatus; external name '_HIViewGetTrackingAreaID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewDisposeTrackingArea()
+ *
+ * Summary:
+ * Disposes an existing tracking area. The reference is considered
+ * to be invalid after calling this function.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inArea:
+ * The area to dispose.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewDisposeTrackingArea( inArea: HIViewTrackingAreaRef ): OSStatus; external name '_HIViewDisposeTrackingArea';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{==============================================================================}
+{ DISPLAY }
+{==============================================================================}
+{
+ * HIViewGetNeedsDisplay()
+ *
+ * Discussion:
+ * Returns true if the view passed in or any subview of it requires
+ * redrawing (i.e. part of it has been invalidated).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to inspect.
+ *
+ * Result:
+ * A boolean result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetNeedsDisplay( inView: HIViewRef ): Boolean; external name '_HIViewGetNeedsDisplay';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewSetNeedsDisplay()
+ *
+ * Discussion:
+ * Marks a view as needing to be completely redrawn, or completely
+ * valid. If the view is not visible, or is obscured completely by
+ * other views, no action is taken.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to mark dirty.
+ *
+ * inNeedsDisplay:
+ * A boolean which indicates whether inView needs to be redrawn or
+ * not.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetNeedsDisplay( inView: HIViewRef; inNeedsDisplay: Boolean ): OSStatus; external name '_HIViewSetNeedsDisplay';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewSetNeedsDisplayInRect()
+ *
+ * Discussion:
+ * Marks a portion of a view as needing to be redrawn, or valid. If
+ * the view is not visible, or is obscured completely by other
+ * views, no action is taken. The rectangle passed is effectively
+ * intersected with the view's visible region. It should be in
+ * view-relative coordinates.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to mark dirty.
+ *
+ * inRect:
+ * The rectangle encompassing the area to mark dirty or clean.
+ *
+ * inNeedsDisplay:
+ * A boolean which indicates whether or not inRect should be added
+ * to the invalid region or removed from it.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetNeedsDisplayInRect( inView: HIViewRef; const (*var*) inRect: HIRect; inNeedsDisplay: Boolean ): OSStatus; external name '_HIViewSetNeedsDisplayInRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewSetNeedsDisplayInShape()
+ *
+ * Discussion:
+ * Marks a portion of a view as needing to be redrawn, or valid. If
+ * the view is not visible, or is obscured completely by other
+ * views, no action is taken. The shape passed is effectively
+ * intersected with the view's visible region. It should be in
+ * view-relative coordinates.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to mark dirty.
+ *
+ * inArea:
+ * The area to mark dirty or clean.
+ *
+ * inNeedsDisplay:
+ * A boolean which indicates whether or not inArea should be added
+ * to the invalid region or removed from it.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetNeedsDisplayInShape( inView: HIViewRef; inArea: HIShapeRef; inNeedsDisplay: Boolean ): OSStatus; external name '_HIViewSetNeedsDisplayInShape';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewSetNeedsDisplayInRegion()
+ *
+ * Discussion:
+ * Marks a portion of a view as needing to be redrawn, or valid. If
+ * the view is not visible, or is obscured completely by other
+ * views, no action is taken. The region passed is effectively
+ * intersected with the view's visible region. It should be in
+ * view-relative coordinates.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to mark dirty.
+ *
+ * inRgn:
+ * The region to mark dirty or clean.
+ *
+ * inNeedsDisplay:
+ * A boolean which indicates whether or not inRgn should be added
+ * to the invalid region or removed from it.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetNeedsDisplayInRegion( inView: HIViewRef; inRgn: RgnHandle; inNeedsDisplay: Boolean ): OSStatus; external name '_HIViewSetNeedsDisplayInRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewRender()
+ *
+ * Discussion:
+ * Renders the invalid portions of a view (as marked with
+ * HIViewSetNeedsDisplay[InRegion]) immediately. Normally, these
+ * areas are redrawn at event loop time, but there might be
+ * situations where you need an immediate draw. Use this sparingly,
+ * as it does cause a fully composited draw for the area of the
+ * view; that is, all other views that intersect the area of the
+ * specified view will also be drawn. Calling this for several views
+ * at a particular level of a hierarchy can be costly. We highly
+ * recommend that you only pass the root view of a window to this
+ * API. The behavior of this API when passed a non-root view was
+ * poorly defined in Mac OS X 10.3 and has changed in Mac OS X 10.4.
+ * In 10.3, calling this API on a non-root view would entirely
+ * validate all of the views in the window that intersect the
+ * specified view, including portions that did not intersect the
+ * specified view and so were not actually drawn. In 10.4, calling
+ * this API on a non-root view will only validate those portions of
+ * each view that intersect the specified view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to draw.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewRender( inView: HIViewRef ): OSStatus; external name '_HIViewRender';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIViewFlashDirtyArea()
+ *
+ * Discussion:
+ * Debugging aid. Flashes the region which would be redrawn at the
+ * next draw time for an entire window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to flash the dirty region for.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewFlashDirtyArea( inWindow: WindowRef ): OSStatus; external name '_HIViewFlashDirtyArea';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewGetSizeConstraints()
+ *
+ * Discussion:
+ * Return the minimum and maximum size for a control. A control must
+ * respond to this protocol to get meaningful results. These sizes
+ * can be used to help autoposition subviews, for example.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to inspect.
+ *
+ * outMinSize:
+ * The minimum size the view can be. May be NULL if you don't need
+ * this information.
+ *
+ * outMaxSize:
+ * The maximum size the view can be. May be NULL if you don't need
+ * this information.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetSizeConstraints( inView: HIViewRef; outMinSize: HISizePtr { can be NULL }; outMaxSize: HISizePtr { can be NULL } ): OSStatus; external name '_HIViewGetSizeConstraints';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{==============================================================================}
+{ COORDINATE SYSTEM CONVERSION }
+{==============================================================================}
+{
+ * HIViewConvertPoint()
+ *
+ * Discussion:
+ * Converts a point from one view to another. Both views must have a
+ * common ancestor, i.e. they must both be in the same window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * ioPoint:
+ * The point to convert.
+ *
+ * inSourceView:
+ * The view whose coordinate system ioPoint is starting out in.
+ * You can pass NULL to indicate that ioPoint is a window-relative
+ * point.
+ *
+ * inDestView:
+ * The view whose coordinate system ioPoint should end up in. You
+ * can pass NULL to indicate that ioPoint is a window-relative
+ * point.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewConvertPoint( var ioPoint: HIPoint; inSourceView: HIViewRef; inDestView: HIViewRef ): OSStatus; external name '_HIViewConvertPoint';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewConvertRect()
+ *
+ * Discussion:
+ * Converts a rectangle from one view to another. Both views must
+ * have a common ancestor, i.e. they must both be in the same window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * ioRect:
+ * The rectangle to convert.
+ *
+ * inSourceView:
+ * The view whose coordinate system ioRect is starting out in. You
+ * can pass NULL to indicate that ioRect is a window-relative
+ * rectangle.
+ *
+ * inDestView:
+ * The view whose coordinate system ioRect should end up in. You
+ * can pass NULL to indicate that ioRect is a window-relative
+ * rectangle.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewConvertRect( var ioRect: HIRect; inSourceView: HIViewRef; inDestView: HIViewRef ): OSStatus; external name '_HIViewConvertRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewConvertRegion()
+ *
+ * Discussion:
+ * Converts a region from one view to another. Both views must have
+ * a common ancestor, i.e. they must both be in the same window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * ioRgn:
+ * The region to convert.
+ *
+ * inSourceView:
+ * The view whose coordinate system ioRgn is starting out in. You
+ * can pass NULL to indicate that ioRgn is a window-relative
+ * region.
+ *
+ * inDestView:
+ * The view whose coordinate system ioRgn should end up in. You
+ * can pass NULL to indicate that ioRgn is a window-relative
+ * region.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewConvertRegion( ioRgn: RgnHandle; inSourceView: HIViewRef; inDestView: HIViewRef ): OSStatus; external name '_HIViewConvertRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewSetDrawingEnabled()
+ *
+ * Discussion:
+ * Turns control drawing on or off. You can use this to ensure that
+ * no drawing events are sent to the control. Even Draw1Control will
+ * not draw! HIViewSetNeedsDisplay is also rendered useless when
+ * drawing is off.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to enable or disable drawing for.
+ *
+ * inEnabled:
+ * A boolean value indicating whether drawing should be on (true)
+ * or off (false).
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetDrawingEnabled( inView: HIViewRef; inEnabled: Boolean ): OSStatus; external name '_HIViewSetDrawingEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewIsDrawingEnabled()
+ *
+ * Discussion:
+ * Determines if drawing is currently enabled for a control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to get the drawing state for.
+ *
+ * Result:
+ * A boolean value indicating whether drawing is on (true) or off
+ * (false).
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewIsDrawingEnabled( inView: HIViewRef ): Boolean; external name '_HIViewIsDrawingEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewScrollRect()
+ *
+ * Discussion:
+ * Scrolls a view's contents, or a portion thereof. A view's
+ * contents are the pixels that it or any of its descendent views
+ * has drawn into. This will actually blit the contents of the view
+ * as appropriate to scroll, and then invalidate those portions
+ * which need to be redrawn. Be warned that this is a raw bit
+ * scroll. Anything that might overlap the target view will get
+ * thrashed as well.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to scroll. The bits drawn by the view's descendent
+ * views will also be scrolled.
+ *
+ * inRect:
+ * The rect to scroll. Pass NULL to mean the entire view. The rect
+ * passed cannot be bigger than the view's bounds. It must be in
+ * the local coordinate system of the view.
+ *
+ * inDX:
+ * The horizontal distance to scroll. Positive values shift to the
+ * right, negative values shift to the left.
+ *
+ * inDY:
+ * The vertical distance to scroll. Positive values shift
+ * downward, negative values shift upward.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewScrollRect( inView: HIViewRef; {const} inRect: HIRectPtr { can be NULL }; inDX: Float32; inDY: Float32 ): OSStatus; external name '_HIViewScrollRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewSetBoundsOrigin()
+ *
+ * Discussion:
+ * This API sets the origin of the view. This effectively also moves
+ * all subcontrols of a view as well. This call will NOT invalidate
+ * the view. This is because you might want to move the contents
+ * with HIViewScrollRect instead of redrawing the complete content.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose origin you wish to adjust.
+ *
+ * inX:
+ * The X coordinate.
+ *
+ * inY:
+ * The Y coordinate.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetBoundsOrigin( inView: HIViewRef; inX: Float32; inY: Float32 ): OSStatus; external name '_HIViewSetBoundsOrigin';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{==============================================================================}
+{ KEYBOARD FOCUS }
+{==============================================================================}
+{
+ * HIViewAdvanceFocus()
+ *
+ * Discussion:
+ * Advances the focus to the next most appropriate view. Unless
+ * overriden in some fashion (either by overriding certain carbon
+ * events or using the HIViewSetNextFocus API), the Toolbox will use
+ * a spacially determinant method of focusing, attempting to focus
+ * left to right, top to bottom in a window, taking groups of
+ * controls into account.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRootForFocus:
+ * The subtree to manipulate. The focus will never leave
+ * inRootToFocus. Typically you would pass the content of the
+ * window, or the root. If focused on the toolbar, for example,
+ * the focus is limited to the toolbar only. In this case, the
+ * Toolbox passes the toolbar view in as the focus root for
+ * example.
+ *
+ * inModifiers:
+ * The EventModifiers of the keyboard event that ultimately caused
+ * the call to HIViewAdvanceFocus. These modifiers are used to
+ * determine the focus direction as well as other alternate
+ * focusing behaviors.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewAdvanceFocus( inRootForFocus: HIViewRef; inModifiers: EventModifiers ): OSStatus; external name '_HIViewAdvanceFocus';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewGetFocusPart()
+ *
+ * Discussion:
+ * Returns the currently focused part of the given view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to inquire about.
+ *
+ * outFocusPart:
+ * The part currently focused.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetFocusPart( inView: HIViewRef; var outFocusPart: HIViewPartCode ): OSStatus; external name '_HIViewGetFocusPart';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewSubtreeContainsFocus()
+ *
+ * Discussion:
+ * Given a view, this function checks to see if it or any of its
+ * children currently are the keyboard focus. If so, true is
+ * returned as the function result.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSubtreeStart:
+ * The view to start searching at.
+ *
+ * Result:
+ * A boolean result.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSubtreeContainsFocus( inSubtreeStart: HIViewRef ): Boolean; external name '_HIViewSubtreeContainsFocus';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewSetNextFocus()
+ *
+ * Discussion:
+ * This function hard-wires the next sibling view to shift focus to
+ * whenever the keyboard focus is advanced.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to set the next focus view for. This parameter and the
+ * inNextFocus parameter must both have the same parent view.
+ *
+ * inNextFocus:
+ * The view to set focus to next. This parameter and the inView
+ * parameter must both have the same parent view. Pass NULL to
+ * tell the view system to use the default rules.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetNextFocus( inView: HIViewRef; inNextFocus: HIViewRef { can be NULL } ): OSStatus; external name '_HIViewSetNextFocus';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewSetFirstSubViewFocus()
+ *
+ * Discussion:
+ * This function hard-wires the first subview to shift focus to
+ * whenever the keyboard focus is advanced and the container view is
+ * entered.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inParent:
+ * The parent view.
+ *
+ * inSubView:
+ * The first child which should receive focus. Pass NULL to tell
+ * the view system to use the default rules.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetFirstSubViewFocus( inParent: HIViewRef; inSubView: HIViewRef { can be NULL } ): OSStatus; external name '_HIViewSetFirstSubViewFocus';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{==============================================================================}
+{ LAYOUT }
+{ Mac OS X 10.3 provides a layout engine for HIViews that allows applications }
+{ to specify the layout relationships between multiple views. The layout }
+{ engine will automatically reposition and resize views that have layout }
+{ information when necessary. }
+{==============================================================================}
+
+{
+ * Summary:
+ * Since horizontal and vertical bindings are very similar in
+ * application, except along different axes, the binding kinds have
+ * been abstracted to minimum and maximum. Synonyms have been
+ * provided for convenience. You are encouraged to use them.
+ *
+ * Discussion:
+ * HIBindingKind constants.
+ }
+const
+{
+ * No binding is to occur.
+ }
+ kHILayoutBindNone = 0;
+
+ {
+ * Bind to the minimum of the axis.
+ }
+ kHILayoutBindMin = 1;
+
+ {
+ * Bind to the maximum of the axis.
+ }
+ kHILayoutBindMax = 2;
+ kHILayoutBindLeft = kHILayoutBindMin;
+ kHILayoutBindRight = kHILayoutBindMax;
+
+ {
+ * Synonyms for convenience and clarity.
+ }
+ kHILayoutBindTop = kHILayoutBindMin;
+ kHILayoutBindBottom = kHILayoutBindMax;
+
+type
+ HIBindingKind = UInt16;
+
+{
+ * HISideBinding
+ *
+ * Summary:
+ * A binding for a side of an HIView.
+ *
+ * Discussion:
+ * A side binding is entirely related to the change of the parent's
+ * position or size (but only as the size affects the maximum edge
+ * position). A side binding doesn't mean "move to where my
+ * relative's side is" but rather "move as my relative's side has
+ * moved".
+ }
+type
+ HISideBinding = record
+{
+ * An HIViewRef to the view to which this side is bound. Can be NULL,
+ * indicating that the the side is bound to its parent view.
+ }
+ toView: HIViewRef; { NULL means parent}
+
+ {
+ * An HIBindingKind indicating the bind kind.
+ }
+ kind: HIBindingKind;
+
+ {
+ * Not currently used. Must be set to 0.
+ }
+ offset: Float32;
+ end;
+{
+ const HISideBinding kHISideNoBinding = ( NULL, kHILayoutBindNone );
+}
+
+{
+ * HIBinding
+ *
+ * Summary:
+ * A set of Top, Left, Bottom, and Right bindings for an HIView.
+ }
+type
+ HIBinding = record
+{
+ * The top side bindings.
+ }
+ top: HISideBinding;
+
+ {
+ * The left side bindings.
+ }
+ left: HISideBinding;
+
+ {
+ * The bottom side bindings.
+ }
+ bottom: HISideBinding;
+
+ {
+ * The right side bindings.
+ }
+ right: HISideBinding;
+ end;
+{
+ const HIBinding kHINoBinding = ( kHISideNoBinding, kHISideNoBinding, kHISideNoBinding, kHISideNoBinding );
+}
+
+{
+ * Discussion:
+ * HIScaleKind constants.
+ }
+const
+{
+ * The scale is determined from the axis size.
+ }
+ kHILayoutScaleAbsolute = 0;
+
+
+type
+ HIScaleKind = UInt16;
+
+{
+ * HIAxisScale
+ *
+ * Summary:
+ * A scale description for an axis of an HIView.
+ }
+type
+ HIAxisScale = record
+{
+ * An HIViewRef to the view to which this axis is scaled. Can be
+ * NULL, indicating that the the axis is scaled relative to its
+ * parent view.
+ }
+ toView: HIViewRef; { NULL means parent}
+
+ {
+ * An HIScaleKind describing the type of scaling to be applied.
+ * Currently, this field can't be anything other than
+ * kScalingAbsolute.
+ }
+ kind: HIScaleKind;
+
+ {
+ * A float indicating how much to scale the HIView. 0 indicates no
+ * scaling. A value of 1 indicates that the view is to always have
+ * the same axial size.
+ }
+ ratio: Float32;
+ end;
+
+{
+ * HIScaling
+ *
+ * Summary:
+ * A set of scaling descriptions for the axes of an HIView.
+ }
+type
+ HIScaling = record
+{
+ * An HIAxisScale describing the horizontal scaling for an HIView.
+ }
+ x: HIAxisScale;
+ y: HIAxisScale;
+ end;
+
+{
+ * Summary:
+ * Since horizontal and vertical positions are very similar in
+ * application, except along different axes, the position kinds have
+ * been abstracted to minimum and maximum. Synonyms have been
+ * provided for convenience. You are encouraged to use them.
+ *
+ * Discussion:
+ * HIPositionKind constants.
+ }
+const
+{
+ * No positioning is to occur.
+ }
+ kHILayoutPositionNone = 0;
+
+ {
+ * Centered positioning will occur. The view will be centered
+ * relative to the specified view.
+ }
+ kHILayoutPositionCenter = 1;
+
+ {
+ * Minimum positioning will occur. The view will be left or top
+ * aligned relative to the specified view.
+ }
+ kHILayoutPositionMin = 2;
+
+ {
+ * Maximum positioning will occur. The view will be right or bottom
+ * aligned relative to the specified view.
+ }
+ kHILayoutPositionMax = 3;
+
+ {
+ * Synonyms for convenience and clarity.
+ }
+ kHILayoutPositionLeft = kHILayoutPositionMin;
+ kHILayoutPositionRight = kHILayoutPositionMax;
+ kHILayoutPositionTop = kHILayoutPositionMin;
+ kHILayoutPositionBottom = kHILayoutPositionMax;
+
+
+type
+ HIPositionKind = UInt16;
+
+{
+ * HIAxisPosition
+ *
+ * Summary:
+ * An axial position description for an HIView.
+ }
+type
+ HIAxisPosition = record
+{
+ * An HIViewRef to the view relative to which a view will be
+ * positioned. Can be NULL, indicating that the the view is
+ * positioned relative to its parent view.
+ }
+ toView: HIViewRef; { NULL means parent}
+
+ {
+ * An HIPositionKind indicating the kind of positioning to apply.
+ }
+ kind: HIPositionKind;
+
+ {
+ * After the position kind has been applied, the origin component
+ * that corresponds to the positioning axis is offet by this value.
+ * (ex: Left aligned + 10 ).
+ }
+ offset: Float32;
+ end;
+
+{
+ * HIPositioning
+ *
+ * Summary:
+ * A positioning description for an HIView.
+ }
+type
+ HIPositioning = record
+{
+ * An HIAxisPosition describing the horizontal positioning for an
+ * HIView.
+ }
+ x: HIAxisPosition;
+ y: HIAxisPosition;
+ end;
+
+{
+ * HILayoutInfo
+ *
+ * Summary:
+ * A layout description for an HIView.
+ *
+ * Discussion:
+ * The different layout transformations are applied sequentially to
+ * the HIView. First, the bindings are applied. Note that the
+ * bindings are applied recursively to a container's HIViews. This
+ * requires care on your part, especially when applying
+ * inter-relational bindings. Then the scaling (which could
+ * potentially override some of the previously applied bindings).
+ * Then the positioning (which could potentially override some of
+ * the previously applied bindings).
+ }
+type
+ HILayoutInfo = record
+{
+ * The version of the structure. The current version is
+ * kHILayoutInfoVersionZero.
+ }
+ version: UInt32;
+
+ {
+ * An HIBinding structure describing the kinds of bindings to apply
+ * to the sides of an HIView.
+ }
+ binding: HIBinding;
+
+ {
+ * An HIScaling structure describing the axial scaling to apply to an
+ * HIView.
+ }
+ scale: HIScaling;
+
+ {
+ * An HIPositioning structure positioning to apply to an HIView.
+ }
+ position: HIPositioning;
+ end;
+const
+ kHILayoutInfoVersionZero = 0;
+
+{
+
+const HILayoutInfo kHILayoutInfoNone = (
+ kHILayoutInfoVersionZero,
+ kHINoBinding,
+ ( ( NULL, 0.0 ), ( NULL, 0.0 ) ),
+ ( ( NULL, kHILayoutPositionNone ), ( NULL, kHILayoutPositionNone ) ) );
+
+}
+{
+ * HIViewGetLayoutInfo()
+ *
+ * Summary:
+ * Get the layout info of an HIView.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The HIView whose layout info is to be retreived.
+ *
+ * outLayoutInfo:
+ * A pointer to an HILayoutInfo record into which to copy the
+ * layout info of the HIView. The version field of this record
+ * must be valid or the call will fail.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetLayoutInfo( inView: HIViewRef; var outLayoutInfo: HILayoutInfo ): OSStatus; external name '_HIViewGetLayoutInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIViewSetLayoutInfo()
+ *
+ * Summary:
+ * Set the layout info of an HIView.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The HIView whose layout info is to be retreived.
+ *
+ * inLayoutInfo:
+ * A pointer to an HILayoutInfo record from which to copy the
+ * layout info for the HIView.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSetLayoutInfo( inView: HIViewRef; const (*var*) inLayoutInfo: HILayoutInfo ): OSStatus; external name '_HIViewSetLayoutInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIViewSuspendLayout()
+ *
+ * Summary:
+ * Suspends all layout handling for this layout and its children.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The HIView whose layout handling is to be suspended.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewSuspendLayout( inView: HIViewRef ): OSStatus; external name '_HIViewSuspendLayout';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIViewResumeLayout()
+ *
+ * Summary:
+ * Resumes all layout handling for this layout and its children.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The HIView whose layout handling is to be resumed.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewResumeLayout( inView: HIViewRef ): OSStatus; external name '_HIViewResumeLayout';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIViewIsLayoutActive()
+ *
+ * Summary:
+ * Tests the view to determine if layout is active or suspended.
+ * Note that this test does not determine whether or not the view
+ * has a valid layout, only whether or not the layout engine is
+ * active for the view.
+ *
+ * Discussion:
+ * The view's layout active state is also affected by the layout
+ * active state of its parents; if any parent view has inactive
+ * layout, this view is considered to have inactive layout as well.
+ * See HIViewIsLayoutLatentlyActive if latent layout active state is
+ * required.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The HIView whose layout handling is to be tested.
+ *
+ * Result:
+ * True if the view would respond to any linked relative's changes,
+ * otherwise false.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewIsLayoutActive( inView: HIViewRef ): Boolean; external name '_HIViewIsLayoutActive';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIViewIsLayoutLatentlyActive()
+ *
+ * Summary:
+ * The view's layout active state is also affected by the layout
+ * active state of its parents; if any parent view has inactive
+ * layout, this view is considered to have inactive layout as well.
+ * HIViewIsLayoutLatentlyActive returns whether a view's layout is
+ * latently active, even if one of its parent's layouts is not.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The HIView whose latent layout handling is to be tested.
+ *
+ * Result:
+ * True if the view would latently respond to any linked relative's
+ * changes, otherwise false.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewIsLayoutLatentlyActive( inView: HIViewRef ): Boolean; external name '_HIViewIsLayoutLatentlyActive';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewApplyLayout()
+ *
+ * Summary:
+ * Applies the current layout into to the specified view. Side
+ * bindings have no effect, but positioning and scaling will occur,
+ * in that order.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The HIView whose layout info is to be applied.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewApplyLayout( inView: HIViewRef ): OSStatus; external name '_HIViewApplyLayout';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{==============================================================================}
+{ MISCELLANEOUS }
+{==============================================================================}
+{
+ * HIViewGetWindow()
+ *
+ * Discussion:
+ * Returns a reference to the window a given view is bound to. If
+ * the view reference passed is invalid, or the view is not embedded
+ * into any window, NULL is returned.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to query.
+ *
+ * Result:
+ * A window reference.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetWindow( inView: HIViewRef ): WindowRef; external name '_HIViewGetWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIViewFindByID()
+ *
+ * Discussion:
+ * Allows you to find a particular view by its ID. Currently, this
+ * call uses the ControlID type as its IDs.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inStartView:
+ * The view to start searching at.
+ *
+ * inID:
+ * The ID of the view you are looking for.
+ *
+ * outControl:
+ * Receives the control if found.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewFindByID( inStartView: HIViewRef; inID: HIViewID; var outControl: HIViewRef ): OSStatus; external name '_HIViewFindByID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewGetAttributes()
+ *
+ * Discussion:
+ * Allows you to get the attributes of a view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to inspect.
+ *
+ * outAttrs:
+ * The attributes of the view.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetAttributes( inView: HIViewRef; var outAttrs: OptionBits ): OSStatus; external name '_HIViewGetAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewChangeAttributes()
+ *
+ * Discussion:
+ * Allows you to change the attributes of a view. You can
+ * simultaneously set and clear attributes.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to muck with.
+ *
+ * inAttrsToSet:
+ * The attributes you wish to set.
+ *
+ * inAttrsToClear:
+ * The attributes you wish to clear.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewChangeAttributes( inView: HIViewRef; inAttrsToSet: OptionBits; inAttrsToClear: OptionBits ): OSStatus; external name '_HIViewChangeAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewCreateOffscreenImage()
+ *
+ * Discussion:
+ * Creates an CGImageRef for the view passed in. The view and any
+ * children it has are rendered in the resultant image.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view you wish to create an image of.
+ *
+ * inOptions:
+ * Options. Currently you must pass 0.
+ *
+ * outFrame:
+ * The frame of the view within the resultant image. It is in the
+ * coordinate system of the image, where 0,0 is the top left
+ * corner of the image. This is so you can know exactly where the
+ * control lives in the image when the control draws outside its
+ * bounds for things such as shadows.
+ *
+ * outImage:
+ * The image of the view, including anything that would be drawn
+ * outside the view's frame.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewCreateOffscreenImage( inView: HIViewRef; inOptions: OptionBits; outFrame: HIRectPtr { can be NULL }; var outImage: CGImageRef ): OSStatus; external name '_HIViewCreateOffscreenImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewDrawCGImage()
+ *
+ * Discussion:
+ * Draws an image in the right direction for an HIView. This is
+ * functionally the same as CGContextDrawImage, but it flips the
+ * context appropriately so that the image is drawn correctly.
+ * Because HIViews have their origin at the top, left, you are
+ * really drawing upside-down, so if you were to use the CG image
+ * drawing, you'd see what I mean! This call attempts to insulate
+ * you from that fact.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inContext:
+ * The context to draw in.
+ *
+ * inBounds:
+ * The bounds to draw the image into.
+ *
+ * inImage:
+ * The image to draw.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewDrawCGImage( inContext: CGContextRef; const (*var*) inBounds: HIRect; inImage: CGImageRef ): OSStatus; external name '_HIViewDrawCGImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIViewGetFeatures()
+ *
+ * Discussion:
+ * Returns the features for the current view. This only returns
+ * feature bits for the HIView space. Older Control Manager features
+ * such as kControlSupportsDataAccess are not returned.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to query
+ *
+ * outFeatures:
+ * On output, the features for the view.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetFeatures( inView: HIViewRef; var outFeatures: HIViewFeatures ): OSStatus; external name '_HIViewGetFeatures';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIViewChangeFeatures()
+ *
+ * Discussion:
+ * Allows you to change a view's features on the fly. Typically,
+ * this is up to the view itself to control. For example, it might
+ * decide that under some situations it is opaque and other others
+ * it is transparent. In general entities outside of the view itself
+ * should not call this function. The only exception might be UI
+ * building tools, where it would want to make sure a view always
+ * responds to clicks, for example, so it could override mouse
+ * tracking to drag items around.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to change
+ *
+ * inFeaturesToSet:
+ * The features to enable
+ *
+ * inFeaturesToClear:
+ * The features to disable
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewChangeFeatures( inView: HIViewRef; inFeaturesToSet: HIViewFeatures; inFeaturesToClear: HIViewFeatures ): OSStatus; external name '_HIViewChangeFeatures';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * Summary:
+ * Constants for use with the HICreateTransformedCGImage API.
+ }
+const
+{
+ * No visual transform should be applied.
+ }
+ kHITransformNone = $00;
+
+ {
+ * The image should be transformed to use a disabled appearance. This
+ * transform should not be combined with any other transform.
+ }
+ kHITransformDisabled = $01;
+
+ {
+ * The image should be transformed to use a selected appearance. This
+ * transform should not be combined with any other transform.
+ }
+ kHITransformSelected = $4000;
+
+{
+ * HICreateTransformedCGImage()
+ *
+ * Summary:
+ * Creates a new CGImage with a standard selected or disabled
+ * appearance.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inImage:
+ * The original image.
+ *
+ * inTransform:
+ * The transform to apply to the image.
+ *
+ * outImage:
+ * The new image. This image should be released by the caller.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HICreateTransformedCGImage( inImage: CGImageRef; inTransform: OptionBits; var outImage: CGImageRef ): OSStatus; external name '_HICreateTransformedCGImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIViewGetEventTarget()
+ *
+ * Discussion:
+ * Returns the EventTargetRef for the specified view. Once you
+ * obtain this reference, you can send events to the target and
+ * install event handler on it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to return the target for.
+ *
+ * Result:
+ * An EventTargetRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIViewGetEventTarget( inView: HIViewRef ): EventTargetRef; external name '_HIViewGetEventTarget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{==============================================================================}
+{ HIGrowBoxView }
+{ The grow box view is a new view starting in Mac OS 10.2. It can be used in }
+{ both the new compositing mode, as well as the traditional control manager }
+{ mode. Like all new HIFoo views, this view is created invisibly. You must }
+{ show the view after creation if you want to, like, see it and stuff. }
+{==============================================================================}
+{ The HIObject class ID for the HIGrowBoxView class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIGrowBoxViewClassID CFSTRP('com.apple.higrowboxview')}
+{$endc}
+{ Control Kind}
+const
+ kControlKindHIGrowBoxView = $67726F77 (* 'grow' *);
+
+{ Currently there is no direct creation API for the grow box, so you must use }
+{ HIObjectCreate if you wish to create one directly. Normally, a window will }
+{ create one for you, so you should generally never need to do this. }
+{
+ * HIGrowBoxViewSetTransparent()
+ *
+ * Discussion:
+ * Sets a grow box view as transparent, meaning it will draw the
+ * grow box lines over any content below it. When not transparent,
+ * it's an opaque white square with the grow lines.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGrowBoxView:
+ * The grow box view reference.
+ *
+ * inTransparent:
+ * Pass true to make the grow view use its transparent look, false
+ * to give it the opaque look.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIGrowBoxViewSetTransparent( inGrowBoxView: HIViewRef; inTransparent: Boolean ): OSStatus; external name '_HIGrowBoxViewSetTransparent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIGrowBoxViewIsTransparent()
+ *
+ * Discussion:
+ * Returns true if a grow box view is set to be transparent.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGrowBoxView:
+ * The grow box view reference.
+ *
+ * Result:
+ * A boolean result.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIGrowBoxViewIsTransparent( inGrowBoxView: HIViewRef ): Boolean; external name '_HIGrowBoxViewIsTransparent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{==============================================================================}
+{ HIScrollView }
+{ The scroll view is a new view starting in Mac OS 10.2. It can be used in }
+{ the new compositing mode ONLY due to the nature of how it works. Like all }
+{ new HIFoo views, this view is created invisibly. You must show the view }
+{ after creation if you want to, like, see it and stuff. }
+{ The HIScrollView will set the frame of the contained view when its bounds }
+{ change, so it is not necessary to set up the layout of the embedded view. }
+{ Using an HIScrollView requires a few steps: }
+{ 1. Install your scrollable content view into the HIScrollView instance using }
+{ HIViewAddSubview. }
+{ 2. If the scrollable content view doesn't already handle the }
+{ kEventScrollableGetInfo and kEventScrollableScrollTo events, you must }
+{ install handlers on your scrollable content view and handle those events }
+{ manually. More details on those events can be found below. }
+{ 3. If the scrollable content view doesn't already send out the }
+{ kEventScrollableInfoChanged event to its parent view, you must send this }
+{ event to the HIScrollView instance whenever your scrollable content }
+{ view's size or origin changes. More details on this even can be found }
+{ below. }
+{==============================================================================}
+{ The HIObject class ID for the HIScrollView class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIScrollViewClassID CFSTRP('com.apple.HIScrollView')}
+{$endc}
+{ Control Kind}
+const
+ kControlKindHIScrollView = $7363726C (* 'scrl' *);
+
+{
+ kEventClassScrollable quick reference:
+
+ kEventScrollableGetInfo = 1,
+ kEventScrollableInfoChanged = 2,
+%% kEventScrollableEmbedded = 3,
+%% kEventScrollableRemoved = 4,
+ kEventScrollableScrollTo = 10
+}
+const
+ kEventClassScrollable = $7363726C (* 'scrl' *);
+
+const
+ kEventParamImageSize = $696D737A (* 'imsz' *); { typeHISize}
+ kEventParamViewSize = $7677737A (* 'vwsz' *); { typeHISize}
+ kEventParamLineSize = $6C6E737A (* 'lnsz' *); { typeHISize}
+ kEventParamOrigin = $6F72676E (* 'orgn' *); { typeHIPoint}
+
+{
+ * kEventClassScrollable / kEventScrollableGetInfo
+ *
+ * Summary:
+ * Requests information from an HIScrollViewÕs scrollable view about
+ * its size and origin.
+ *
+ * Discussion:
+ * This event is sent by an HIScrollView to its scrollable view to
+ * determine the current size and origin of the scrollable view. A
+ * scrollable view must implement this event in order to scroll
+ * properly inside an HIScrollView.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * <-- kEventParamImageSize (out, typeHISize)
+ * On exit, contains the size of the entire scrollable view.
+ *
+ * <-- kEventParamViewSize (out, typeHISize)
+ * On exit, contains the amount of the scrollable view that is
+ * visible.
+ *
+ * <-- kEventParamLineSize (out, typeHISize)
+ * On exit, contains the amount that should be scrolled in
+ * response to a single click on a scrollbar arrow.
+ *
+ * <-- kEventParamOrigin (out, typeHIPoint)
+ * On exit, contains the scrollable viewÕs current origin (the
+ * view-relative coordinate that is drawn at the top left
+ * corner of its frame). These coordinates should always be
+ * greater than or equal to zero. They should be less than or
+ * equal to the viewÕs image size minus its view size.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventScrollableGetInfo = 1;
+
+{
+ * kEventClassScrollable / kEventScrollableInfoChanged
+ *
+ * Summary:
+ * Notification that the size or origin of an HIScrollViewÕs
+ * scrollable view has changed.
+ *
+ * Discussion:
+ * This event is not sent by HIScrollView itself; rather, it may be
+ * sent to an instance of HIScrollView to notify the scroll view
+ * that the size or origin of its scrollable view have changed. The
+ * HIScrollView responds to this event by sending a
+ * kEventScrollableGetInfo to its scrollable view. It then updates
+ * the scroll bars appropriately to reflect the new reality of the
+ * scrollable view. It does NOT move the origin of the scrollable
+ * view at all. It is just a notification to allow the scroll view
+ * to sync up with its scrollable view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventScrollableInfoChanged = 2;
+
+{
+ * kEventClassScrollable / kEventScrollableScrollTo
+ *
+ * Summary:
+ * Requests that an HIScrollViewÕs scrollable view should scroll to
+ * a particular origin.
+ *
+ * Discussion:
+ * This event is sent by an HIScrollView to its scrollable view to
+ * request that the scrollable view update its current origin and
+ * redraw. Typically, a scrollable view will record its current
+ * origin in its own instance data; it should update the origin in
+ * response to this event. A scrollable view should also use either
+ * HIViewScrollRect to scroll its content, or HIViewSetNeedsDisplay
+ * to cause itself to redraw using the new origin point. A
+ * scrollable view must implement this event in order to scroll
+ * properly inside an HIScrollView.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamOrigin (in, typeHIPoint)
+ * The new origin for the scrollable view. The origin
+ * coordinates will vary from (0,0) to scrollable viewÕs image
+ * size minus its view size.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventScrollableScrollTo = 10;
+
+
+{
+ * Summary:
+ * HIScrollView options
+ }
+const
+{
+ * This indicates that a vertical scroll bar is desired.
+ }
+ kHIScrollViewOptionsVertScroll = 1 shl 0;
+
+ {
+ * This indicates that a horizontal scroll bar is desired.
+ }
+ kHIScrollViewOptionsHorizScroll = 1 shl 1;
+
+ {
+ * This indicates that space for a grow box should be taken into
+ * account when laying out scroll bars. On Mac OS X 10.3 and earlier,
+ * if both the horizontal and vertical scroll bars are requested,
+ * this attribute is assumed. On Mac OS X 10.4 and later, this
+ * attribute is *NOT* assumed; this allows the scroll view to support
+ * auto-hiding of the two scroll bars independently on Mac OS X 10.4
+ * and later. If you want to preserve space for the grow box on all
+ * systems, specify this option bit.
+ }
+ kHIScrollViewOptionsAllowGrow = 1 shl 2;
+ kHIScrollViewValidOptions = kHIScrollViewOptionsVertScroll or kHIScrollViewOptionsHorizScroll or kHIScrollViewOptionsAllowGrow;
+
+
+{
+ * HIScrollViewAction
+ *
+ * Summary:
+ * HIScrollView navigation actions. See HIScrollViewNavigate for
+ * more information.
+ }
+type
+ HIScrollViewAction = UInt32;
+const
+{
+ * The scroll view should move to the top of the content.
+ }
+ kHIScrollViewScrollToTop = 1 shl 0;
+
+ {
+ * The scroll view should move to the bottom of the content.
+ }
+ kHIScrollViewScrollToBottom = 1 shl 1;
+
+ {
+ * The scroll view should move to the left of the content.
+ }
+ kHIScrollViewScrollToLeft = 1 shl 2;
+
+ {
+ * The scroll view should move to the right of the content.
+ }
+ kHIScrollViewScrollToRight = 1 shl 3;
+
+ {
+ * The scroll view should page up.
+ }
+ kHIScrollViewPageUp = 1 shl 4;
+
+ {
+ * The scroll view should page down.
+ }
+ kHIScrollViewPageDown = 1 shl 5;
+
+ {
+ * The scroll view should page left.
+ }
+ kHIScrollViewPageLeft = 1 shl 6;
+
+ {
+ * The scroll view should page right.
+ }
+ kHIScrollViewPageRight = 1 shl 7;
+
+{
+ * HIScrollViewCreate()
+ *
+ * Discussion:
+ * Creates a scroll view. This view has 3 parts, essentially. It can
+ * have one or two scroll bars (horizontal/vertical), and a view to
+ * be scrolled. The view to be scrolled is merely added via
+ * HIViewAddSubview. The scroll view will automatically connect it
+ * up appropriately. **** THIS MAY CHANGE
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inOptions:
+ * Options for our scroll view. You must specify either a
+ * horizontal or a vertical scroll bar. If neither is passed, an
+ * error is returned.
+ *
+ * outView:
+ * The new scroll view.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIScrollViewCreate( inOptions: OptionBits; var outView: HIViewRef ): OSStatus; external name '_HIScrollViewCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIScrollViewSetScrollBarAutoHide()
+ *
+ * Discussion:
+ * Sets a scroll view's scroll bars to auto-hide when the entire
+ * scrollable view it is managing can be fully displayed in its
+ * bounds. This is similar to the behavior you see in the Preview
+ * application.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to affect.
+ *
+ * inAutoHide:
+ * The new auto-hide setting (true == auto-hide).
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIScrollViewSetScrollBarAutoHide( inView: HIViewRef; inAutoHide: Boolean ): OSStatus; external name '_HIScrollViewSetScrollBarAutoHide';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIScrollViewGetScrollBarAutoHide()
+ *
+ * Discussion:
+ * Gets a scroll view's current scroll bar auto-hide setting.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to examine.
+ *
+ * Result:
+ * A boolean result.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIScrollViewGetScrollBarAutoHide( inView: HIViewRef ): Boolean; external name '_HIScrollViewGetScrollBarAutoHide';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIScrollViewNavigate()
+ *
+ * Discussion:
+ * Allows you to programmatically change what portion of a scroll
+ * view's target you are seeing. For example, you can move to the
+ * beginning or end of a document. You can also page up, down, left
+ * and right. In general, you should not call this from embedded
+ * content (i.e. the scrollable view inside the scroll view). For
+ * those cases, you should instead position yourself appropriately
+ * and tell the scroll view you changed via the
+ * kEventScrollableInfoChanged carbon event. This routine merely is
+ * a programmatic way to scroll as one would by hand using the
+ * scroll bars.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The scroll view to affect.
+ *
+ * inAction:
+ * The action to take.
+ *
+ * Result:
+ * A operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIScrollViewNavigate( inView: HIViewRef; inAction: HIScrollViewAction ): OSStatus; external name '_HIScrollViewNavigate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIScrollViewCanNavigate()
+ *
+ * Discussion:
+ * Allows you to tell whether it is currently possible to navigate
+ * somehow in a scroll view. For example, if a scroll view is
+ * already at the top of the scrollable content, it is not possible
+ * to navigate upward, so home and page up actions would not be
+ * possible. You might use this function to help you update the
+ * state of menu items or the like.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view to examine.
+ *
+ * inAction:
+ * The action to test.
+ *
+ * Result:
+ * A boolean result.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIScrollViewCanNavigate( inView: HIViewRef; inAction: HIScrollViewAction ): Boolean; external name '_HIScrollViewCanNavigate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{==============================================================================}
+{ HIImageView }
+{ The image view is a new view starting in Mac OS 10.2. It can only be used }
+{ in a compositing window. Like all new HIFoo views, this view is initially }
+{ invisible. You must show the view after creation. }
+{==============================================================================}
+{ The HIObject class ID for the HIImageView class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIImageViewClassID CFSTRP('com.apple.HIImageView')}
+{$endc}
+{ ControlKind}
+const
+ kControlKindHIImageView = $696D6167 (* 'imag' *);
+
+{
+ * HIImageViewCreate()
+ *
+ * Discussion:
+ * Creates an image view. The view responds to the scrollable
+ * interface and can be used in a scrolling view. You can pass an
+ * image initially, or set one later.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inImage:
+ * An initial image, or NULL. You can set the image later via
+ * SetControlData.
+ *
+ * outControl:
+ * The new image view.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIImageViewCreate( inImage: CGImageRef { can be NULL }; var outControl: ControlRef ): OSStatus; external name '_HIImageViewCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+const
+ kHIImageViewImageTag = $696D6167 (* 'imag' *); { CGImageRef (THIS TAG IS GOING AWAY!!! USE THE APIS BELOW!)}
+
+{
+ * HIImageViewSetOpaque()
+ *
+ * Discussion:
+ * Allows you to set whether an image view should be treated as
+ * opaque. If this is set to true, the image view can make certain
+ * optimizations for compositing and scrolling. The alpha-related
+ * image view APIs are rendered useless if opacity it set to true.
+ * An image view, when created, is transparent by default.
+ *
+ * NOTE: In Mac OS X 10.2, this control was documented as being
+ * opaque by default, but the implementation did not enforce that.
+ * So in Mac OS X 10.3 and beyond, the control is transparent by
+ * default, and you can make it opaque by calling
+ * HIImageViewSetOpaque.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The image view to affect.
+ *
+ * inOpaque:
+ * The new opacity setting. Pass true to indicate you want the
+ * image to be treated as opaque.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIImageViewSetOpaque( inView: HIViewRef; inOpaque: Boolean ): OSStatus; external name '_HIImageViewSetOpaque';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIImageViewIsOpaque()
+ *
+ * Discussion:
+ * Allows you to determine whether an image view is opaque or not.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The image view to query.
+ *
+ * Result:
+ * A boolean result, where true indicates the image view is opaque.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIImageViewIsOpaque( inView: HIViewRef ): Boolean; external name '_HIImageViewIsOpaque';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIImageViewSetAlpha()
+ *
+ * Discussion:
+ * Allows you to set the alpha for an image, making it more or less
+ * transparent. An alpha of 1.0 is fully opaque, and 0.0 is fully
+ * transparent. The default alpha for an image is 1.0.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The image view to affect.
+ *
+ * inAlpha:
+ * The new alpha value.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIImageViewSetAlpha( inView: HIViewRef; inAlpha: Float32 ): OSStatus; external name '_HIImageViewSetAlpha';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIImageViewGetAlpha()
+ *
+ * Discussion:
+ * Allows you to get the alpha for an image. An alpha of 1.0 is
+ * fully opaque, and 0.0 is fully transparent.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The image view to query.
+ *
+ * Result:
+ * A floating point number representing the alpha from 0.0 through
+ * 1.0.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIImageViewGetAlpha( inView: HIViewRef ): Float32; external name '_HIImageViewGetAlpha';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIImageViewSetScaleToFit()
+ *
+ * Discussion:
+ * Normally an image view will clip to the view's bounds. Using this
+ * API, you can instead tell the image view to size the image to fit
+ * into the view bounds specified.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The image view to affect.
+ *
+ * inScaleToFit:
+ * A boolean indicating whether the image should be scaled to fit
+ * the view bounds (true) or merely clip to the view bounds
+ * (false).
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIImageViewSetScaleToFit( inView: HIViewRef; inScaleToFit: Boolean ): OSStatus; external name '_HIImageViewSetScaleToFit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIImageViewGetScaleToFit()
+ *
+ * Discussion:
+ * Returns whether or not an image view will scale the image it
+ * displays to the view bounds or merely clip to the view bounds. A
+ * true result means it scales.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The image view to query.
+ *
+ * Result:
+ * A boolean result.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIImageViewGetScaleToFit( inView: HIViewRef ): Boolean; external name '_HIImageViewGetScaleToFit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIImageViewSetImage()
+ *
+ * Discussion:
+ * Sets the image to display in an image view. The image passed in
+ * is retained by the view, so you may release the image after
+ * calling this API if you no longer need to reference it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The image view to affect.
+ *
+ * inImage:
+ * The image to set.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIImageViewSetImage( inView: HIViewRef; inImage: CGImageRef { can be NULL } ): OSStatus; external name '_HIImageViewSetImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIImageViewCopyImage()
+ *
+ * Discussion:
+ * Gets the image for an image view. If there is no image set on the
+ * view, or the view ref is invalid, NULL is returned. The image is
+ * retained, so you should take care to release it when you are
+ * finished with it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The image view to query.
+ *
+ * Result:
+ * A CoreGraphics (Quartz) image ref.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIImageViewCopyImage( inView: HIViewRef ): CGImageRef; external name '_HIImageViewCopyImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{==============================================================================}
+{ HIComboBox }
+{ The combo box is a new view starting in Mac OS 10.2. It can be used in }
+{ both the new compositing mode, as well as the traditional control manager }
+{ mode. Like all new HIFoo views, this view is created invisible. You must }
+{ show the view after creation if you want to, like, see it and stuff. }
+{==============================================================================}
+{ The HIObject class ID for the HIComboBox class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIComboBoxClassID CFSTRP('com.apple.HIComboBox')}
+{$endc}
+{
+ kEventClassHIComboBox quick reference:
+
+ kEventComboBoxListItemSelected = 1
+}
+const
+ kEventClassHIComboBox = $68696362 (* 'hicb' *);
+
+const
+ kEventParamComboBoxListSelectedItemIndex = $63626C69 (* 'cbli' *);
+
+{
+ * kEventClassHIComboBox / kEventComboBoxListItemSelected
+ *
+ * Summary:
+ * Notification that an item in the ComboBox disclosure list has
+ * been selected.
+ *
+ * Discussion:
+ * This event is sent as a notification when an item in the ComboBox
+ * disclosure list has been selected. This event is sent to all
+ * handlers installed on the control. This does not imply that the
+ * selection has been accepted; for that you will need to register
+ * for the kEventClassTextField/kEventTextAccepted event; you can
+ * register for that event in order to make live selections however.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The ComboBox view that has sent the notification.
+ *
+ * --> kEventParamComboBoxListSelectedItemIndex (in, typeCFIndex)
+ * The index of the combo box list item that has been selected.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventComboBoxListItemSelected = 1;
+
+
+{
+ * Summary:
+ * ComboBox attributes
+ }
+const
+{
+ * A constant with value zero; the lack of any attributes.
+ }
+ kHIComboBoxNoAttributes = 0;
+
+ {
+ * The control will attempt to auto complete the text the user is
+ * typing with an item in the ComboBox list that is the closest
+ * appropriate match.
+ }
+ kHIComboBoxAutoCompletionAttribute = 1 shl 0;
+
+ {
+ * The control will disclose the ComboBox list after the user enters
+ * text.
+ }
+ kHIComboBoxAutoDisclosureAttribute = 1 shl 1;
+
+ {
+ * The items in the ComboBox list will be automatically sorted in
+ * alphabetical order.
+ }
+ kHIComboBoxAutoSortAttribute = 1 shl 2;
+
+ {
+ * The ComboBox list will be automatically sized to fit the Human
+ * Interface Guidelines.
+ }
+ kHIComboBoxAutoSizeListAttribute = 1 shl 3;
+
+ {
+ * The minimum set of ComboBox attributes commonly used.
+ }
+ kHIComboBoxStandardAttributes = kHIComboBoxAutoCompletionAttribute or kHIComboBoxAutoDisclosureAttribute or kHIComboBoxAutoSizeListAttribute;
+
+{ ControlKind}
+const
+ kControlKindHIComboBox = $63626278 (* 'cbbx' *);
+
+{ ComboBox Part codes}
+const
+ kHIComboBoxEditTextPart = 5;
+ kHIComboBoxDisclosurePart = 28;
+
+{
+ The ComboBox view supports these tags previously defined for the EditUnicodeText control.
+ These tags are available through Get/SetControlData with a ControlPartCode of kHIComboBoxEditTextPart:
+
+ kControlFontStyleTag
+ kControlEditTextFixedTextTag
+ kControlEditTextTextTag
+ kControlEditTextKeyFilterTag
+ kControlEditTextValidationProcTag
+ kControlEditUnicodeTextPostUpdateProcTag
+ kControlEditTextSelectionTag
+ kControlEditTextKeyScriptBehaviorTag
+ kControlEditTextCharCount
+ kControlEditTextCFStringTag
+}
+
+{
+ * Discussion:
+ * ComboBox ControlData tags available with Mac OS X 10.2 and later.
+ }
+const
+{
+ * Extract the contents of the ComboBox list as a CFArray. The
+ * CFArray will be retained: if you get the array, you own it and
+ * will be required to release it; if you set it the toolbox makes a
+ * copy of it and you are free to release your reference.
+ }
+ kHIComboBoxListTag = $63626C73 (* 'cbls' *); { CFArrayRef; bumps the refCount on get/retains on set}
+
+ {
+ * The width of the ComboBox list. This can be customized. This
+ * disables the autosize attribute.
+ }
+ kHIComboBoxListPixelWidthTag = $63626C77 (* 'cblw' *); { UInt32 }
+
+ {
+ * The height of the ComboBox list. This can be customized. This
+ * disables the autosize attribute.
+ }
+ kHIComboBoxListPixelHeightTag = $63626C68 (* 'cblh' *); { UInt32}
+
+ {
+ * The number of visible items in the list. This can be customized.
+ * This disables the autosize attribute.
+ }
+ kHIComboBoxNumVisibleItemsTag = $63626E69 (* 'cbni' *); { UInt32}
+
+{
+ * HIComboBoxCreate()
+ *
+ * Summary:
+ * Creates a combo box control. The new control is initially
+ * invisible.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * boundsRect:
+ * The bounding box of the control.
+ *
+ * text:
+ * The default text in the editable portion of the control. Can be
+ * NULL.
+ *
+ * style:
+ * The font style of the both editable text and the text in the
+ * disclosure list. Can be NULL.
+ *
+ * list:
+ * The default values available in the disclosure list. Can be
+ * NULL.
+ *
+ * inAttributes:
+ * The default attributes of the combo box.
+ *
+ * outComboBox:
+ * On exit, contains the new control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIComboBoxCreate( const (*var*) boundsRect: HIRect; text: CFStringRef { can be NULL }; {const} style: ControlFontStyleRecPtr { can be NULL }; list: CFArrayRef { can be NULL }; inAttributes: OptionBits; var outComboBox: HIViewRef ): OSStatus; external name '_HIComboBoxCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIComboBoxGetItemCount()
+ *
+ * Summary:
+ * Get the number of items in the combo box disclosure list.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inComboBox:
+ * The combo box.
+ *
+ * Result:
+ * The number of items in the combo box disclosure list.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIComboBoxGetItemCount( inComboBox: HIViewRef ): ItemCount; external name '_HIComboBoxGetItemCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIComboBoxInsertTextItemAtIndex()
+ *
+ * Summary:
+ * Inserts a CFString in the disclosure list
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inComboBox:
+ * The combo box whose disclosure list the text will be inserted
+ * in.
+ *
+ * inIndex:
+ * The index that the text should be inserted in. If the index
+ * does not fall within the number of items in the combo box list,
+ * it will be appended to the end of the list.
+ *
+ * inText:
+ * The text item to be inserted in the combo box disclosure list.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIComboBoxInsertTextItemAtIndex( inComboBox: HIViewRef; inIndex: CFIndex; inText: CFStringRef ): OSStatus; external name '_HIComboBoxInsertTextItemAtIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIComboBoxAppendTextItem()
+ *
+ * Summary:
+ * Appends a text item to the combo box disclosure list.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inComboBox:
+ * The combo box whose disclosure list the text will be appended
+ * to.
+ *
+ * inText:
+ * The text item to be appended to the combo box disclosure list.
+ *
+ * outIndex:
+ * On exit, the index of the new item. Can be NULL if the caller
+ * does not require this information.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIComboBoxAppendTextItem( inComboBox: HIViewRef; inText: CFStringRef; outIndex: CFIndexPtr { can be NULL } ): OSStatus; external name '_HIComboBoxAppendTextItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIComboBoxCopyTextItemAtIndex()
+ *
+ * Summary:
+ * Copy the text from the combo box disclosure list
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inComboBox:
+ * The combo box that contains the text item you would like to
+ * copy.
+ *
+ * inIndex:
+ * The index of the text item. Will return paramErr if the index
+ * is out of bounds of the combo box list.
+ *
+ * outString:
+ * A copy of the string at the given index. Remember this is now
+ * your copy that you will need to release.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIComboBoxCopyTextItemAtIndex( inComboBox: HIViewRef; inIndex: CFIndex; var outString: CFStringRef ): OSStatus; external name '_HIComboBoxCopyTextItemAtIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIComboBoxRemoveItemAtIndex()
+ *
+ * Summary:
+ * Remove an item from a combo box disclosure list.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inComboBox:
+ * The combo box that contains the disclosure list that you would
+ * like to remove an item from.
+ *
+ * inIndex:
+ * The index of the item to remove.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIComboBoxRemoveItemAtIndex( inComboBox: HIViewRef; inIndex: CFIndex ): OSStatus; external name '_HIComboBoxRemoveItemAtIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIComboBoxChangeAttributes()
+ *
+ * Summary:
+ * Change the attributes of a combo box
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inComboBox:
+ * The combo box whose attributes you would like to change.
+ *
+ * inAttributesToSet:
+ * The attributes to set.
+ *
+ * inAttributesToClear:
+ * The attributes to clear.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIComboBoxChangeAttributes( inComboBox: HIViewRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HIComboBoxChangeAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIComboBoxGetAttributes()
+ *
+ * Summary:
+ * Get the attributes of a combo box.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inComboBox:
+ * The combo box whose attributes you would like to obtain.
+ *
+ * outAttributes:
+ * The attributes of the combo box.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HIComboBoxGetAttributes( inComboBox: HIViewRef; var outAttributes: OptionBits ): OSStatus; external name '_HIComboBoxGetAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * HIComboBoxIsListVisible()
+ *
+ * Summary:
+ * Returns whether the combo box list is currently disclosed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inComboBox:
+ * The combo box whose list visibility you would like to obtain.
+ *
+ * Result:
+ * A boolean value indicating whether the combo box list is
+ * disclosed (true) or hidden (false).
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIComboBoxIsListVisible( inComboBox: HIViewRef ): Boolean; external name '_HIComboBoxIsListVisible';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIComboBoxSetListVisible()
+ *
+ * Summary:
+ * Hides or shows the combo box list.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inComboBox:
+ * The combo box whose list will be hidden or shown.
+ *
+ * inVisible:
+ * A boolean value indicating whether you wish to hide the list
+ * (false) or show the list (true).
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIComboBoxSetListVisible( inComboBox: HIViewRef; inVisible: Boolean ): OSStatus; external name '_HIComboBoxSetListVisible';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{==============================================================================}
+{ HISearchField }
+{ HISearchField is a new view available in Mac OS X 10.3. }
+{ This view is designed to be used for applications that provide searching }
+{ functionality. Visually, it is a standard text field optionally adorned }
+{ with a search icon on the left and/or a cancel image on the right. }
+{ When the user has accepted the text by pressing the return or enter key }
+{ a Carbon Event of kEventClassTextField / kEventTextAccepted will be sent }
+{ to the control. This will be the indication that the search should begin. }
+{ This control will also respond to all the standard control tags that are }
+{ used by the EditUnicodeText control. }
+{==============================================================================}
+{ The HIObject class ID for the HISearchField class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHISearchFieldClassID CFSTRP('com.apple.HISearchField')}
+{$endc}
+{ ControlKind}
+const
+ kControlKindHISearchField = $73726664 (* 'srfd' *);
+
+{ HISearchField part codes}
+const
+ kControlSearchFieldCancelPart = 30;
+ kControlSearchFieldMenuPart = 31;
+
+{
+ The SearchField view supports those tags previously defined for the EditUnicodeText control.
+ These tags are available through Get/SetControlData with ControlPartCode of kControlEditTextPart:
+
+ kControlFontStyleTag
+ kControlEditTextFixedTextTag
+ kControlEditTextTextTag
+ kControlEditTextKeyFilterTag
+ kControlEditTextValidationProcTag
+ kControlEditUnicodeTextPostUpdateProcTag
+ kControlEditTextSelectionTag
+ kControlEditTextKeyScriptBehaviorTag
+ kControlEditTextCharCount
+ kControlEditTextCFStringTag
+}
+
+{
+ * Summary:
+ * HISearchField attributes
+ }
+const
+{
+ * A constant with value zero; the lack of any attributes.
+ }
+ kHISearchFieldNoAttributes = 0;
+
+ {
+ * This view contains the cancel icon in the text field.
+ }
+ kHISearchFieldAttributesCancel = 1 shl 0;
+
+ {
+ * This view contains the search icon in the text field. If a menu is
+ * associated with the search field, this attribute is implicitly set
+ * and the search icon will display with a menu disclosure badge.
+ * Available in Mac OS X 10.4 and later.
+ }
+ kHISearchFieldAttributesSearchIcon = 1 shl 1;
+
+{ Event Classes}
+const
+ kEventClassSearchField = $73726664 (* 'srfd' *);
+
+{
+ * kEventClassSearchField / kEventSearchFieldCancelClicked
+ *
+ * Summary:
+ * Notification that the cancel icon has been depressed.
+ *
+ * Discussion:
+ * This event is sent by the HISearchField view if the cancel icon
+ * is enabled (attribute of kHISearchFieldAtttributesCancel), and
+ * the cancel has been clicked.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The HISearchField that has sent the notification.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventSearchFieldCancelClicked = 1;
+
+{
+ * kEventClassSearchField / kEventSearchFieldSearchClicked
+ *
+ * Summary:
+ * Notification that the search icon has been depressed.
+ *
+ * Discussion:
+ * This event is sent by the HISearchField view if the search icon
+ * is enabled (attribute of kHISearchFieldAttributesSearchIcon or a
+ * menu is associated with the search field), and the search icon
+ * has been clicked. If a menu is associated with the search field,
+ * the search field will handle the display and tracking of the menu
+ * by default. This event is sent to the search field only, it will
+ * not propagate.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The HISearchField that has sent the notification.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventSearchFieldSearchClicked = 2;
+
+{
+ * HISearchFieldCreate()
+ *
+ * Summary:
+ * Creates a search field control. The new control is initially
+ * invisible.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBounds:
+ * The initial bounds of the view. If this parameter is NULL, the
+ * view defaults to have empty bounds ( 0, 0, 0, 0 ).
+ *
+ * inAttributes:
+ * The initial attributes of the search field. Indicates whether
+ * the field should contain the cancel icon.
+ *
+ * inSearchMenu:
+ * The menu to be associated with this search field. If
+ * inSearchMenu is non-NULL, it will be retained by the search
+ * field and the search icon will be enabled in the left side of
+ * the text field. If this parameter is NULL, the view will not
+ * display the search icon in the left portion of the text field.
+ * You are expected to install handlers on this menu to handle the
+ * visual appearance of the menu (for example, to draw check marks
+ * or enable items when the menu receives the
+ * kEventMenuEnableItems Carbon Event), and to keep track of what
+ * action should be performed by associating HICommands with each
+ * menu item and installing a handler for the (
+ * kEventClassCommand, kEventCommandProcess ) Carbon Event.
+ *
+ * inDescriptiveText:
+ * The text to be displayed in the text field when the field does
+ * not have focus and contains no user entered text. This is meant
+ * to be an indication of what the search criteria is. For
+ * example, you may wish to identify to the user that the search
+ * will cover the "Subject" or "Contents" of a selected range of
+ * items. If inDescriptiveText is non-NULL it will be retained by
+ * the search field.
+ *
+ * outRef:
+ * On exit, contains the new view.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISearchFieldCreate( {const} inBounds: HIRectPtr { can be NULL }; inAttributes: OptionBits; inSearchMenu: MenuRef { can be NULL }; inDescriptiveText: CFStringRef { can be NULL }; var outRef: HIViewRef ): OSStatus; external name '_HISearchFieldCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISearchFieldSetSearchMenu()
+ *
+ * Summary:
+ * Set the search menu associated with the view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSearchField:
+ * The search field to associate the search menu with.
+ *
+ * inSearchMenu:
+ * The menu to associate with the search field. If there is
+ * already a menu associated with the search field, that menu will
+ * be released. If inSearchMenu is non-NULL, it will be retained
+ * by the search field and the search icon will be enabled in the
+ * left side of the text field. You are expected to install
+ * handlers on this menu to handle the visual appearance of the
+ * menu (for example, to draw check marks or enable items when the
+ * menu receives the kEventMenuEnableItems Carbon Event), and to
+ * keep track of what action should be performed by associating
+ * HICommands with each menu item and installing a handler for the
+ * ( kEventClassCommand, kEventCommandProcess ) Carbon Event. If
+ * inSearchMenu is NULL, the search icon will be removed from the
+ * left side of the text field and no menu will be associated with
+ * this field.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISearchFieldSetSearchMenu( inSearchField: HIViewRef; inSearchMenu: MenuRef { can be NULL } ): OSStatus; external name '_HISearchFieldSetSearchMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISearchFieldGetSearchMenu()
+ *
+ * Summary:
+ * Get the menu that is associated with the search field
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSearchField:
+ * The search field you wish to retrieve the search menu from.
+ *
+ * outSearchMenu:
+ * On exit, will contain the menu that is associated with search
+ * field. The menu will _not_ be retained on output and this
+ * parameter cannot be NULL.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISearchFieldGetSearchMenu( inSearchField: HIViewRef; var outSearchMenu: MenuRef ): OSStatus; external name '_HISearchFieldGetSearchMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISearchFieldChangeAttributes()
+ *
+ * Summary:
+ * Set the attributes for the given search field.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSearchField:
+ * The search field to change the attributes of.
+ *
+ * inAttributesToSet:
+ * The attributes to set.
+ *
+ * inAttributesToClear:
+ * The attributes to clear.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISearchFieldChangeAttributes( inSearchField: HIViewRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HISearchFieldChangeAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISearchFieldGetAttributes()
+ *
+ * Summary:
+ * Returns the attributes of the search field.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSearchField:
+ * The search field to get the attributes of.
+ *
+ * outAttributes:
+ * On exit, will contain the attributes of the search field. This
+ * parameter cannot be NULL.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISearchFieldGetAttributes( inSearchField: HIViewRef; var outAttributes: OptionBits ): OSStatus; external name '_HISearchFieldGetAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISearchFieldSetDescriptiveText()
+ *
+ * Summary:
+ * Set the description of the search action of the search field.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSearchField:
+ * The search field to change the description of.
+ *
+ * inDescription:
+ * The new description for the search field. If the search field
+ * contains a description, it will be released. If inDescription
+ * is non-NULL, it will be retained by the search field. If it is
+ * NULL, no description will be associated with the search field.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISearchFieldSetDescriptiveText( inSearchField: HIViewRef; inDescription: CFStringRef { can be NULL } ): OSStatus; external name '_HISearchFieldSetDescriptiveText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISearchFieldCopyDescriptiveText()
+ *
+ * Summary:
+ * Get the description that is associated with the search field.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSearchField:
+ * The search field you wish to retrieve the description from.
+ *
+ * outDescription:
+ * On exit, will contain the description that is associated with
+ * the search field. This parameter cannot be NULL. If there is no
+ * description associated with the search field, outDescription
+ * will be set to NULL. If there is a description, a CFStringRef
+ * will be created that contains the contents of the description.
+ * You posess ownership of this string and will need to release it
+ * when you no longer need it.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISearchFieldCopyDescriptiveText( inSearchField: HIViewRef; var outDescription: CFStringRef ): OSStatus; external name '_HISearchFieldCopyDescriptiveText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{==============================================================================}
+{ Text field events }
+{ A text field is the part of some controls that you can enter text into. }
+{ A text field is common to the EditText, EditUnicodeText, ComboBox, }
+{ HISearchField, and HITextView views. The kEventClassTextField event allows }
+{ you to receive notifications when the text has been accepted by the user. }
+{ For example, you can install a handler for a }
+{ kEventClassTextField / kEventTextAccepted event on a HISearchField view to }
+{ receive a notification that the user has initiated a search by hitting the }
+{ return or enter key. You can also filter the text that will replace a }
+{ selection before the change has been made to either accept or reject the }
+{ replacement. }
+{==============================================================================}
+{
+ kEventClassTextField quick reference:
+
+ kEventTextAccepted = 1,
+ kEventTextShouldChangeInRange = 2,
+ kEventTextDidChange = 3
+}
+const
+ kEventClassTextField = $74786664 (* 'txfd' *);
+
+const
+ kEventParamTextSelection = $7478736C (* 'txsl' *); { typeCFRange}
+ kEventParamCandidateText = $74737478 (* 'tstx' *); { typeCFStringRef}
+ kEventParamReplacementText = $74727478 (* 'trtx' *); { typeCFStringRef}
+ kEventParamUnconfirmedRange = $74756E72 (* 'tunr' *); { typeCFRange}
+ kEventParamUnconfirmedText = $7478756E (* 'txun' *); { typeCFStringRef}
+
+{
+ * kEventClassTextField / kEventTextAccepted
+ *
+ * Summary:
+ * Notification that the text in a control's editable text field has
+ * been accepted.
+ *
+ * Discussion:
+ * This event is sent as a notification when the text contained in a
+ * control's editable text field has been accepted by the user. Text
+ * is accepted when the user presses return or enter on the keyboard
+ * for the EditUnicodeText, HIComboBox, and HISearchField controls,
+ * or when the text has changed in the field and the field loses
+ * focus for the EditUnicodeText, HIComboBox, HISearchField and
+ * HITextView controls.
+ *
+ * This event is sent to the control containing the text field only,
+ * it will not propagate. It is sent to all handlers installed on
+ * the control containing the text field.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The editable text field that has sent the notification.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTextAccepted = 1;
+
+{
+ * kEventClassTextField / kEventTextShouldChangeInRange
+ *
+ * Summary:
+ * Returns whether the text should be changed in editable text
+ * fields.
+ *
+ * Discussion:
+ * There are several editable text field views, such as the
+ * HIComboBox, HISearchField, HITextView, and EditUnicodeText
+ * controls. There are times when you may require fine-grained
+ * control over what text is inserted into the text field and either
+ * accept the changes, reject them or modify what is to be entered.
+ * This event is sent whenever the text is about to be modified in a
+ * text field, either by user input or in other scenarios such as a
+ * paste from the clipboard, spell-checking word correction, or Mac
+ * OS X Service operation. You can change what text is inserted by
+ * providing a replacement string as a parameter to this event. This
+ * event is only sent for Unicode text controls; it is not sent for
+ * the classic non-Unicode EditText control.
+ *
+ * This event is not sent prior to programmatic modification of the
+ * text field contents using SetControlData.
+ *
+ * This event is not sent while an active inline editing session is
+ * in progress. Once the inline text has been confirmed, this event
+ * will be sent prior to the confirmed text being inserted into the
+ * text field. If you need control over keystrokes during an inline
+ * editing session, you can use the kEventTextInputFilterText event.
+ *
+ *
+ * This event is sent to the control containing the text field only;
+ * it will not propagate.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamTextSelection (in, typeCFRange)
+ * The range of the selection that is about to be changed. The
+ * units of the selection are in the same units that are
+ * returned in a EditTextSelectionRec, when called with
+ * GetControlData using kControlEditTextSelectionTag.
+ *
+ * --> kEventParamCandidateText (in, typeCFStringRef)
+ * The text that is going to replace the selection. Note that
+ * this string was originally created with
+ * CFStringCreateWithCharactersNoCopy, and the original text
+ * has a limited lifespan. If for some reason you need to
+ * retain the text past the end of your event handler, you
+ * should extract the characters from the string with
+ * CFStringGetCharacters, and then store those characters or
+ * create a new CFString from them.
+ *
+ * <-- kEventParamReplacementText (out, typeCFStringRef)
+ * On output, can contain optional replacement text.
+ *
+ * Result:
+ * If noErr is returned from your handler and the
+ * kEventParamReplacementText parameter is added to the event, then
+ * the contents of that parameter, rather than the candidate text,
+ * will be added to the text field.
+ *
+ * If noErr is returned from your handler and the
+ * kEventParamReplacementText parameter is _not_ added to the event,
+ * then the candidate text will be filtered out and no text will be
+ * entered in the text field. The current selection will be deleted,
+ * however.
+ *
+ * If userCanceledErr is returned from your handler, then no text
+ * will be entered in the text field and the current selection will
+ * remain unchanged. Effectively, the editing operation will be
+ * ignored.
+ *
+ * If eventNotHandledErr is returned from your handler, the contents
+ * of the kEventParamReplacementText parameter are ignored, and the
+ * candidate text will replace the selection.
+ *
+ * Any other return value will result in the default behavior, as if
+ * eventNotHandledErr had been returned.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTextShouldChangeInRange = 2;
+
+{
+ * kEventClassTextField / kEventTextDidChange
+ *
+ * Summary:
+ * Indicates that the contents of an editable text field have
+ * changed.
+ *
+ * Discussion:
+ * This event is sent by all of the Unicode-based editable text
+ * views: HIComboBox, HISearchField, HITextView and EditUnicodeText.
+ * This event is not sent for the classic non-Unicode EditText
+ * control.
+ *
+ * Note that this event is sent after inline editing operations,
+ * such as pressing a dead key, or using a input method that creates
+ * an inline editing hole. Most clients of this event should ignore
+ * the event during inline editing, and only respond to changes to
+ * the text after inline editing completes. A client can check for
+ * the presence of the kEventParamUnconfirmedRange parameter to
+ * determine whether inline editing is currently active; if this
+ * parameter is present, the client may wish to ignore the event.
+ *
+ *
+ * This event is not sent after programmatic modification of the
+ * text field contents using SetControlData.
+ *
+ * This event is sent only to the control containing the text field;
+ * it will not propagate. It is sent to all handlers registered for
+ * it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamUnconfirmedRange (in, typeCFRange)
+ * If the text field currently has an open inline hole, this
+ * parameter contains the range of text inside the hole. This
+ * parameter is optional and is only present during inline
+ * editing.
+ *
+ * --> kEventParamUnconfirmedText (in, typeCFStringRef)
+ * If the text field currently has an open inline hole, this
+ * parameter contains the non-confirmed text currently being
+ * edited inside the hole. This parameter is optional and is
+ * only present during inline editing. Note that this string
+ * was originally created with
+ * CFStringCreateWithCharactersNoCopy, and the original text
+ * has a limited lifespan. If for some reason you need to
+ * retain the text past the end of your event handler, you
+ * should extract the characters from the string with
+ * CFStringGetCharacters, and then store those characters or
+ * create a new CFString from them.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventTextDidChange = 3;
+
+{==============================================================================}
+{ HIMenuView }
+{ HIMenuView and HIStandardMenuView are new views available in Mac OS X 10.3. }
+{ HIMenuView is intended for use as a base class for custom menu item views; }
+{ it does not draw or handle events itself, but provides useful functionality }
+{ that all menu views need to implement. HIStandardMenuView is the standard }
+{ HIView used by the Menu Manager to draw menu item content, beginning with }
+{ Mac OS X 10.3. It can also be subclassed by custom menu item views. }
+{ Both of these views are meant to be used only in compositing windows. }
+{ Because HIMenuView and HIStandardMenuView are not typically created }
+{ directly by applications, no API is provided to create instances of these }
+{ views. If you need to create an instance of either view, you can use }
+{ HIObjectCreate. }
+{==============================================================================}
+{ the HIObject class ID for the HIMenuView class}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIMenuViewClassID CFSTRP('com.apple.HIMenuView')}
+{$endc}
+{ the HIObject class ID for the standard menu HIView class}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIStandardMenuViewClassID CFSTRP('com.apple.HIStandardMenuView')}
+{$endc}
+{ Control Kinds (only used in Mac OS X 10.4 and later)}
+const
+ kControlKindHIMenuView = $6D656E75 (* 'menu' *);
+ kControlKindHIStandardMenuView = $736D6E75 (* 'smnu' *);
+
+{
+ The kEventHIObjectInitialize event for HIMenuView and HIStandardMenuView is expected to contain
+ the following parameters. Be sure to include these parameters in the init event if you create an
+ instance of these views with HIObjectCreate.
+
+ --> kEventParamMenuRef (in, typeMenuRef)
+ The menu that the view should draw.
+}
+{
+ * kHIViewMenuContentID
+ *
+ * Summary:
+ * The HIViewID for the menu content view. The Menu Manager assigns
+ * this view ID to all menu content views.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+var kHIViewMenuContentID: HIViewID; external name '_kHIViewMenuContentID'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * HIMenuViewGetMenu()
+ *
+ * Summary:
+ * Returns the MenuRef that is associated with an HIView that is a
+ * subclass of HIMenuView.
+ *
+ * Discussion:
+ * An HIMenuView subclass might use this API to determine the menu
+ * that it should draw.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inView:
+ * The view whose menu to return.
+ *
+ * Result:
+ * The MenuRef associated with the HIView, or NULL if an HIView is
+ * passed that is not a subclass of HIMenuView.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIMenuViewGetMenu( inView: HIViewRef ): MenuRef; external name '_HIMenuViewGetMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIMenuGetContentView()
+ *
+ * Summary:
+ * Returns the HIViewRef that will be used to draw menu content for
+ * this menu, if any.
+ *
+ * Discussion:
+ * If the content view has not yet been created, the Menu Manager
+ * will create the content view using the view class ID and
+ * initialization event associated with the menu. Note that the menu
+ * content view is not the same as the window content view; the menu
+ * content view is embedded inside the window content view. If the
+ * menu uses an MDEF instead of an HIView to draw its content, noErr
+ * is returned but the output HIViewRef is set to NULL.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenu:
+ * The menu.
+ *
+ * inMenuType:
+ * The type of menu for which the menu content view should be
+ * returned. The same MenuRef may have multiple content views,
+ * depending on the menu type being displayed.
+ *
+ * outView:
+ * On exit, contains the view. May be set to NULL if the menu does
+ * not use an HIView to draw its content. The caller should not
+ * release this view.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIMenuGetContentView( inMenu: MenuRef; inMenuType: ThemeMenuType; var outView: HIViewRef ): OSStatus; external name '_HIMenuGetContentView';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{==============================================================================}
+{ HISegmentedView }
+{ HISegmentedView is a new view available in Mac OS X 10.3. }
+{ Examples of the segmented view are the Finder's icon/column/list view }
+{ switcher, and the back/forward buttons in Open panels. }
+{ The segmented view operates as a group of buttons, each of which can be }
+{ configured with different behaviors and content. }
+{ Accessibility Notes: Those of you who wish to customize the accessibility }
+{ information provided for individual segments of the segmented view -- by }
+{ handling various kEventClassAccessibility Carbon Events, by calling }
+{ HIObjectSetAuxiliaryAccessibilityAttribute, etc. -- need to know how to }
+{ interpret and/or build AXUIElementRefs that represent individual segments. }
+{ The AXUIElement representing an individual segment will/must be constructed }
+{ using the segmented view's HIViewRef and the UInt64 identifier of the }
+{ one-based index of the segment the element refers to. As usual, a UInt64 }
+{ identifier of zero represents the segmented view as a whole. You must }
+{ neither interpret nor create segmented view elements whose identifiers are }
+{ greater than the count of segments in the segmented view. }
+{==============================================================================}
+{ The HIObject class ID for the HISegmentedView class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHISegmentedViewClassID CFSTRP('com.apple.HISegmentedView')}
+{$endc}
+{ Control Kind}
+const
+ kHISegmentedViewKind = $73676D74 (* 'sgmt' *);
+
+{
+ * HISegmentedViewCreate()
+ *
+ * Summary:
+ * Creates a segmented view. This is the type of view you would use
+ * to implement the icon/column/list view switcher as seen in the
+ * Finder. After creating a segmented view, you need to set the
+ * number of segments via HISegmentedViewSetSegmentCount. Each
+ * segment can be configured independently with via the other
+ * HISegmentedView APIs. Changing the number of segments and
+ * configuring each segment will change the appearance of the
+ * segmented view. After you configure the view, you may want to
+ * call GetBestControlRect on the view and resize it so the content
+ * will fit optimally. The value of the whole segmented view
+ * corresponds to the index of the currently selected segment with
+ * the radio behavior. If you set the value of the whole segmented
+ * view to n via SetControl32BitValue, every radio-behavior segment
+ * will have its value set to zero except for the segment at index
+ * n; if segment n also has the radio behavior, it will have its
+ * value set to one. When a radio-behavior segment is clicked, the
+ * value of the whole segmented view will be set to the segment's
+ * index. The segmented view works in both compositing and
+ * non-compositing modes.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBounds:
+ * The bounds of the view to be created. Can be NULL, in which
+ * case the view is created with CGRectZero bounds.
+ *
+ * outRef:
+ * A valid pointer to an HIViewRef. On successful completion of
+ * this routine, the destination HIViewRef will be filled with the
+ * HIViewRef of the newly created view.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewCreate( {const} inBounds: HIRectPtr { can be NULL }; var outRef: HIViewRef ): OSStatus; external name '_HISegmentedViewCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewSetSegmentCount()
+ *
+ * Summary:
+ * Sets the number of segments for the segmented view. Any previous
+ * segments beyond the new count will have their content released.
+ * All new segments beyond the previous count be initialized with
+ * the most basic settings possible: Momentary, no attributes, zero
+ * value, enabled, no command, no label, no content, and
+ * auto-calculated content width. You should configure any new
+ * segments to match your needs.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view for which the content is to be set.
+ *
+ * inSegmentCount:
+ * A positive integer indicating how many segments the view is to
+ * have.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewSetSegmentCount( inSegmentedView: HIViewRef; inSegmentCount: UInt32 ): OSStatus; external name '_HISegmentedViewSetSegmentCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewGetSegmentCount()
+ *
+ * Summary:
+ * Get the number of segments in the segmented view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view for which the content is to be set.
+ *
+ * Result:
+ * A UInt32 indicating the number of segments in the segmented view.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewGetSegmentCount( inSegmentedView: HIViewRef ): UInt32; external name '_HISegmentedViewGetSegmentCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * Summary:
+ * HISegmentBehavior constants
+ }
+const
+{
+ * Pops back up after being pressed, just like a push button.
+ }
+ kHISegmentBehaviorMomentary = 1;
+
+ {
+ * Stays pressed until another segment with the radio behavior is
+ * pressed. This makes the segment behave like a radio button. After
+ * this segment is clicked, the segmented view's value will be
+ * changed to this segment's one-based index.
+ }
+ kHISegmentBehaviorRadio = 2;
+
+ {
+ * Like a check box. When clicked, it toggles back and forth between
+ * checked and unchecked states.
+ }
+ kHISegmentBehaviorToggles = 3;
+
+ {
+ * After being pressed, this type of segment stays pressed until you
+ * programatically unpress it.
+ }
+ kHISegmentBehaviorSticky = 4;
+
+
+type
+ HISegmentBehavior = UInt32;
+{
+ * HISegmentedViewSetSegmentBehavior()
+ *
+ * Summary:
+ * Changes the behavior of an individual segment of a segmented
+ * view. By default, a segment has the kHISegmentBehaviorMomentary
+ * behavior.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment whose behavior you
+ * want to change.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment whose behavior you want to
+ * change. This must be a non-zero value that is no higher than
+ * the segmented view's current segment count.
+ *
+ * inBehavior:
+ * A HISegmentBehavior describing the behavior you wish the
+ * segment to have.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewSetSegmentBehavior( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inBehavior: HISegmentBehavior ): OSStatus; external name '_HISegmentedViewSetSegmentBehavior';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewGetSegmentBehavior()
+ *
+ * Summary:
+ * Returns the behavior of an individual segment of a segmented view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment being queried.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment whose behavior you desire.
+ * This must be a non-zero value that is no higher than the
+ * segmented view's current segment count.
+ *
+ * Result:
+ * A HISegmentBehavior describing the behavior of the given segment.
+ * If you pass an illegal segment index, the result is undefined.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewGetSegmentBehavior( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): HISegmentBehavior; external name '_HISegmentedViewGetSegmentBehavior';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * Summary:
+ * HISegmentedView segment attributes
+ *
+ * Discussion:
+ * These attribute bits are for use with
+ * HISegmentedViewChangeSegmentAttributes and
+ * HISegmentedViewGetSegmentAttributes.
+ }
+const
+{
+ * Pass this to indicate no attributes at all.
+ }
+ kHISegmentNoAttributes = 0;
+
+ {
+ * If this attribute bit is set, the command that gets sent out when
+ * the segment is clicked will be directed at the user focus instead
+ * of up the segmented view's containment hierarchy.
+ }
+ kHISegmentSendCmdToUserFocus = 1 shl 0;
+
+{
+ * HISegmentedViewChangeSegmentAttributes()
+ *
+ * Summary:
+ * Changes the attributes of an individual segment of a segmented
+ * view. By default, a segment has no attribute bits set.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment whose attributes you
+ * want to change.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment whose attributes you want to
+ * change. This must be a non-zero value that is no higher than
+ * the segmented view's current segment count.
+ *
+ * inAttributesToSet:
+ * The attribute bits you wish to set/enable for the segment.
+ *
+ * inAttributesToClear:
+ * The attribute bits you wish to clear/disable for the segment.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewChangeSegmentAttributes( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HISegmentedViewChangeSegmentAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewGetSegmentAttributes()
+ *
+ * Summary:
+ * Returns the attributes of an individual segment of a segmented
+ * view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment being queried.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment whose attributes you desire.
+ * This must be a non-zero value that is no higher than the
+ * segmented view's current segment count.
+ *
+ * Result:
+ * The attribute bits that are set/enabled for the given segment. If
+ * you pass an illegal segment index, the result is undefined.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewGetSegmentAttributes( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): OptionBits; external name '_HISegmentedViewGetSegmentAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewSetSegmentValue()
+ *
+ * Summary:
+ * Change the value of an individual segment of a segmented view.
+ * This is only meaningful for segments with the sticky, toggles, or
+ * radio behaviors. If you set the value of momentary segments to
+ * something other than zero, the behavior is undefined.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment whose value you want
+ * to change.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment whose value you want to
+ * change. This must be a non-zero value that is no higher than
+ * the segmented view's current segment count.
+ *
+ * inValue:
+ * The value you wish the segment to have. Zero means
+ * unpressed/unselected and one means pressed/selected. Other
+ * values will result in undefined behavior.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewSetSegmentValue( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inValue: SInt32 ): OSStatus; external name '_HISegmentedViewSetSegmentValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewGetSegmentValue()
+ *
+ * Summary:
+ * Determine the value of an individual segment of a segmented view.
+ * This is only meaningful for segments with the sticky, toggles, or
+ * radio behaviors. The value of a momentary segment is undefined.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment being queried.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment whose value you desire. This
+ * must be a non-zero value that is no higher than the segmented
+ * view's current segment count.
+ *
+ * Result:
+ * A SInt32 indicating the value of the given segment. If you pass
+ * an illegal segment index, the result is undefined.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewGetSegmentValue( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): SInt32; external name '_HISegmentedViewGetSegmentValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewSetSegmentEnabled()
+ *
+ * Summary:
+ * Enable or disable an individual segment of a segmented view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment to enable or disable.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment to disable or enable. This
+ * must be a non-zero value that is no higher than the segmented
+ * view's current segment count.
+ *
+ * inEnabled:
+ * A Boolean indicating whether the segment is to become enabled
+ * or disabled.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewSetSegmentEnabled( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inEnabled: Boolean ): OSStatus; external name '_HISegmentedViewSetSegmentEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewIsSegmentEnabled()
+ *
+ * Summary:
+ * Test an individual segment of a segmented view to see if it is
+ * enabled or disabled.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment being queried.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment to test. This must be a
+ * non-zero value that is no higher than the segmented view's
+ * current segment count.
+ *
+ * Result:
+ * True if the segment is enabled or false if the segment is
+ * disabled. If you pass an illegal segment index, the result is
+ * undefined.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewIsSegmentEnabled( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): Boolean; external name '_HISegmentedViewIsSegmentEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewSetSegmentCommand()
+ *
+ * Summary:
+ * Set the command ID for the given segment. By default, the command
+ * is zero. If you set any non-zero command ID, the segmented view
+ * will send an HICommand whenever the segment is clicked. By
+ * default, the command is sent to the segmented view and up the
+ * containment hierarchy. You can request that the command start at
+ * the user focus instead by turning on the
+ * kHISegmentSendCmdToUserFocus attribute for the segment.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment whose command you
+ * wish to set.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment whose command you wish to
+ * set. This must be a non-zero value that is no higher than the
+ * segmented view's current segment count.
+ *
+ * inCommand:
+ * The command ID you wish to associate with the segment. A value
+ * of zero signifies "no command".
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewSetSegmentCommand( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inCommand: UInt32 ): OSStatus; external name '_HISegmentedViewSetSegmentCommand';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewGetSegmentCommand()
+ *
+ * Summary:
+ * Get the command ID associated with the given segment.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment being queried.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment to query. This must be a
+ * non-zero value that is no higher than the segmented view's
+ * current segment count.
+ *
+ * Result:
+ * Returns the command ID associated with the segment. If you pass
+ * an illegal segment index, the result is undefined.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewGetSegmentCommand( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): UInt32; external name '_HISegmentedViewGetSegmentCommand';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewSetSegmentLabel()
+ *
+ * Summary:
+ * Set the label string for the given segment. By default, a segment
+ * has no label string.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment whose label you wish
+ * to set.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment whose label you wish to set.
+ * This must be a non-zero value that is no higher than the
+ * segmented view's current segment count.
+ *
+ * inLabel:
+ * A CFStringRef with the text of the label. The segmented view
+ * will copy the string passed in. You may pass NULL or an empty
+ * CFStringRef if you wish to eliminate the label from the segment.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewSetSegmentLabel( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inLabel: CFStringRef ): OSStatus; external name '_HISegmentedViewSetSegmentLabel';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewCopySegmentLabel()
+ *
+ * Summary:
+ * Get the label associated with the given segment.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment being queried.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment to query. This must be a
+ * non-zero value that is no higher than the segmented view's
+ * current segment count.
+ *
+ * outLabel:
+ * On exit, outLabel will be a copy of the label associated with
+ * the segment; you must release this string. If there is no label
+ * associated with the segment, outLabel will be set to NULL.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewCopySegmentLabel( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; var outLabel: CFStringRef ): OSStatus; external name '_HISegmentedViewCopySegmentLabel';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewSetSegmentContentWidth()
+ *
+ * Summary:
+ * Sets whether you want the segment to automatically calculate its
+ * own width or whether you want to determine the segment's width
+ * manually. The content width is the horizontal area taken up by a
+ * segment's label and/or image.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment whose content width
+ * you wish to set.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment whose content width you wish
+ * to set. This must be a non-zero value that is no higher than
+ * the segmented view's current segment count.
+ *
+ * inAutoCalculateWidth:
+ * A Boolean indicating whether you want the segment to calculate
+ * its own width. If you pass true, the inWidth parameter is
+ * ignored.
+ *
+ * inWidth:
+ * If you passed false in inAutoCalculateWidth, this parameter
+ * specifies the width you want to manually associate with the
+ * segment. If you pass a negative width, the behavior is
+ * undefined.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewSetSegmentContentWidth( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inAutoCalculateWidth: Boolean; inWidth: Float32 ): OSStatus; external name '_HISegmentedViewSetSegmentContentWidth';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewGetSegmentContentWidth()
+ *
+ * Summary:
+ * Get the content width of the given segment. This also optionall
+ * passes back a Boolean indicating whether the width was
+ * automatically calculated. The content width is the horizontal
+ * area taken up by a segment's label and/or image.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment being queried.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment to query. This must be a
+ * non-zero value that is no higher than the segmented view's
+ * current segment count.
+ *
+ * outAutoCalculated:
+ * On exit, this is a Boolean indicating whether the width was
+ * automatically calculated. You may pass NULL if you don't need
+ * this information.
+ *
+ * Result:
+ * Returns the width of the content for the given segment. If you
+ * pass an illegal segment index, the result is undefined.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewGetSegmentContentWidth( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; outAutoCalculated: BooleanPtr { can be NULL } ): Float32; external name '_HISegmentedViewGetSegmentContentWidth';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewSetSegmentImage()
+ *
+ * Summary:
+ * Sets or clears the image associated with a given segment.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment whose image you wish
+ * to set.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment whose image you wish to set.
+ * This must be a non-zero value that is no higher than the
+ * segmented view's current segment count.
+ *
+ * inImage:
+ * An HIViewImageContentInfo structure with the image information
+ * for the given segment. Segments only support three types of
+ * image content: kControlNoContent (no image),
+ * kControlContentIconRef, and kControlContentCGImageRef.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewSetSegmentImage( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; const (*var*) inImage: HIViewImageContentInfo ): OSStatus; external name '_HISegmentedViewSetSegmentImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewGetSegmentImageContentType()
+ *
+ * Summary:
+ * Get the type of image content drawn by the given segment. You
+ * will need to call this before calling
+ * HISegmentedViewCopySegmentImage so you know what type of image
+ * content to request from the latter API.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment being queried.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment to query. This must be a
+ * non-zero value that is no higher than the segmented view's
+ * current segment count.
+ *
+ * Result:
+ * Returns the image content type of the image drawn by the given
+ * segment. If you pass an illegal segment index, the result is
+ * undefined.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewGetSegmentImageContentType( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): HIViewImageContentType; external name '_HISegmentedViewGetSegmentImageContentType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HISegmentedViewCopySegmentImage()
+ *
+ * Summary:
+ * Gives you a copy of the image (if any) drawn by the given
+ * segment. You are responsible for releasing any image passed back
+ * by this function. You request the image by asking for a
+ * particular type of image. If the segment isn't using the
+ * requested type of image, an error will be returned. If you wish
+ * to know the actual type of image displayed by the segment, you
+ * can call HISegmentedViewGetSegmentImageContentType.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSegmentedView:
+ * The segmented view which owns the segment being queried.
+ *
+ * inSegmentIndexOneBased:
+ * The one-based index of the segment to query. This must be a
+ * non-zero value that is no higher than the segmented view's
+ * current segment count.
+ *
+ * ioImage:
+ * On entry, you must fill out the contentType field of this
+ * structure with the type of image you desire. On exit, if that
+ * type of image is used by the segment, the appropriate field of
+ * the union will be filled in with a copy of the image. You are
+ * responsible for releasing the image.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HISegmentedViewCopySegmentImage( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; var ioImage: HIViewImageContentInfo ): OSStatus; external name '_HISegmentedViewCopySegmentImage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{==============================================================================}
+{ Clock view events }
+{==============================================================================}
+const
+ kEventClassClockView = $636C6F63 (* 'cloc' *);
+
+{
+ * kEventClassClockView / kEventClockDateOrTimeChanged
+ *
+ * Summary:
+ * Allows clients to determine when the user has changed the date or
+ * time in the clock control.
+ *
+ * Discussion:
+ * This event is sent by the clock control when the user has changed
+ * the date or time. Clients could register for this notification in
+ * order to update some state based on the date or time in the
+ * clock, for instance. This event is sent to the view only, it will
+ * not propagate. It is sent to all handlers installed on the
+ * control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The view whose date has changed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available
+ }
+const
+ kEventClockDateOrTimeChanged = 1;
+
+
+
+
+{unit MacWindows}
+{
+ File: HIToolbox/MacWindows.h
+
+ Contains: Window Manager Interfaces
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1997-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ Current documentation for the Mac OS Window Manager is available on the web: }
+{ <http://developer.apple.com/techpubs/macos8/HumanInterfaceToolbox/WindowManager/windowmanager.html> }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ HIWindowRef }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ HIWindowRef = WindowRef;
+ HIWindowRefPtr = ^HIWindowRef;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Property Types }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ PropertyCreator = OSType;
+type
+ PropertyTag = OSType;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Classes }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * WindowClass
+ *
+ * Summary:
+ * The types of windows provided by the Window Manager.
+ *
+ * Discussion:
+ * The class of a window determines several aspects of the window:
+ * its appearance, its initial window attributes, its initial window
+ * group, and its initial modality. All of these except for the
+ * window's appearance may be changed later using other Window
+ * Manager APIs.
+ }
+type
+ WindowClass = UInt32;
+ WindowClass_fix = WindowClass; { used as field type when a record declaration contains a WindowClass field identifier }
+const
+{
+ * An alert window is used when the application needs the user's
+ * attention immediately. On Mac OS 9 and earlier, a visible alert
+ * window will prevent the user from switching to any other
+ * application. Use kThemeBrushAlertBackgroundActive to draw the
+ * background of alert windows. Alert windows are initially placed in
+ * the modal window group, given a modality of
+ * kWindowModalityAppModal, and given an activation scope of
+ * kWindowActivationScopeAll. Available in Mac OS 8.5 and later.
+ }
+ kAlertWindowClass = 1;
+
+ {
+ * Similar to kAlertWindowClass, but provides a window that is
+ * movable and that allows switching to other applications. Generally
+ * you should use this window class rather than kAlertWindowClass.
+ * Use kThemeBrushAlertBackgroundActive to draw the background of
+ * movable alert windows. Movable alert windows are initially placed
+ * in the modal window group, given a modality of
+ * kWindowModalityAppModal, and given an activation scope of
+ * kWindowActivationScopeAll. Available in Mac OS 8.5 and later.
+ }
+ kMovableAlertWindowClass = 2;
+
+ {
+ * A modal window is used to display a dialog (but not an alert; use
+ * kAlertWindowClass for alerts). On Mac OS 9 and earlier, a visible
+ * modal window will prevent the user from switching to any other
+ * application. Use kThemeBrushDialogBackgroundActive to draw the
+ * background of modal windows. Modal windows are initially placed in
+ * the modal window group, given a modality of
+ * kWindowModalityAppModal, and given an activation scope of
+ * kWindowActivationScopeAll. Available in Mac OS 8.5 and later.
+ }
+ kModalWindowClass = 3;
+
+ {
+ * Similar to kModalWindowClass, but provides a window that is
+ * movable and that allows switching to other applications. Generally
+ * you should use this window class rather than kModalWindowClass. If
+ * you are using CarbonLib 1.3 or later, or Mac OS X, use
+ * kThemeBrushMovableModalBackground to draw the background of
+ * movable modal windows; on earlier versions of CarbonLib, or for
+ * non-Carbon programming, use kThemeBrushDialogBackgroundActive.
+ * Movable modal windows are initially placed in the modal window
+ * group, given a modality of kWindowModalityAppModal, and given an
+ * activation scope of kWindowActivationScopeAll. Available in Mac OS
+ * 8.5 and later.
+ }
+ kMovableModalWindowClass = 4;
+
+ {
+ * A floating window is layered above all application windows except
+ * for alert and modal windows. It is commonly used for palette
+ * windows, inspectors, and other accessory (non-document) windows.
+ * Use kThemeBrushUtilityWindowBackgroundActive or
+ * kThemeBrushDocumentWindowBackground to draw the background of
+ * floating windows. Floating windows are initially placed in the
+ * floating window group, given a modality of kWindowModalityNone,
+ * and given an activation scope of
+ * kWindowActivationScopeIndependent. Available in Mac OS 8.6 and
+ * later.
+ }
+ kFloatingWindowClass = 5;
+
+ {
+ * A document window is used for normal application document windows.
+ * Use kThemeBrushDocumentWindowBackground or your own custom drawing
+ * to draw the background of a document window. Document windows are
+ * initially placed in the document window group, given a modality of
+ * kWindowModalityNone, and given an activation scope of
+ * kWindowActivationScopeAll. Available in Mac OS 8.5 and later.
+ }
+ kDocumentWindowClass = 6;
+
+ {
+ * A utility window is similar to a floating window, but it floats
+ * above the windows of all applications rather than just above the
+ * windows of the application that creates it. Use
+ * kThemeBrushUtilityWindowBackgroundActive or
+ * kThemeBrushDocumentWindowBackground to draw the background of
+ * utility windows. Utility windows are initially placed in the
+ * utility window group, given a modality of kWindowModalityNone, and
+ * given an activation scope of kWindowActivationScopeIndependent.
+ * Available in CarbonLib 1.1 and later, and in Mac OS X.
+ }
+ kUtilityWindowClass = 8;
+
+ {
+ * A help window is used to display help tags. It has no window
+ * frame. Typically you should use the Help Manager to display help
+ * tags, rather than creating a help tag window yourself. Help
+ * windows are initially placed in the help window group, given a
+ * modality of kWindowModalityNone, and given an activation scope of
+ * kWindowActivationScopeNone. Available in CarbonLib 1.1 and later,
+ * and in Mac OS X.
+ }
+ kHelpWindowClass = 10;
+
+ {
+ * A sheet window is used to display a dialog that is attached
+ * directly to its parent window, rather than being a independent
+ * window. A sheet dialog only prevents interaction with its parent
+ * window; the user may still interact with other windows in the same
+ * application. Use kThemeBrushSheetBackgroundOpaque to draw an
+ * opaque background for sheet windows, or
+ * kThemeBrushSheetBackgroundTransparent to draw a transparent
+ * background (the transparent brush is only available in Mac OS X
+ * 10.1 and later). Sheet windows are initially placed in the
+ * document window group, given a modality of kWindowModalityNone,
+ * and given an activation scope of kWindowActivationScopeAll.
+ * Available in CarbonLib 1.3 and later, and in Mac OS X; in
+ * CarbonLib, a sheet window is actually a movable-modal window,
+ * which blocks user interaction with all windows of the application.
+ }
+ kSheetWindowClass = 11;
+
+ {
+ * A toolbar window is used to display a palette of controls. It is
+ * similar to a floating window, and like a floating window is
+ * layered above all application windows except for alert and modal
+ * windows, but is layered beneath floating windows. Use
+ * kThemeBrushToolbarBackground to draw the background of a toolbar
+ * window in Mac OS X or later; CarbonLib does not currently support
+ * kThemeBrushToolbarBackground. Toolbar windows are initially placed
+ * in the toolbar window group, given a modality of
+ * kWindowModalityNone, and given an activation scope of
+ * kWindowActivationScopeNone. Available in CarbonLib 1.1 and later,
+ * and Mac OS X.
+ }
+ kToolbarWindowClass = 12;
+
+ {
+ * A plain window has a single-pixel window frame.
+ * kThemeBrushDocumentWindowBackground,
+ * kThemeBrushDialogBackgroundActive, and application-specific custom
+ * drawing are all commonly used to draw the background of a plain
+ * window. Plain windows are initially placed in the document window
+ * group, given a modality of kWindowModalityNone, and given an
+ * activation scope of kWindowActivationScopeAll. Available in
+ * CarbonLib 1.2.5 and later, and Mac OS X.
+ }
+ kPlainWindowClass = 13;
+
+ {
+ * An overlay window is a completely transparent window positioned
+ * above all other windows. Overlay windows are intended as a
+ * replacement for the pre-Carbon practice of drawing directly into
+ * the window manager port; by creating a full-screen overlay window
+ * and drawing into it, you can draw over any window in any
+ * application without disturbing the contents of the windows
+ * underneath your drawing. Overlay windows have a default handler
+ * for kEventWindowPaint that uses CGContextClearRect to clear the
+ * overlay window's alpha channel to zero. This ensures the initial
+ * transparency of the window. You can install your own
+ * kEventWindowPaint handler to do your own drawing; typically, you
+ * would call through to the default handler with
+ * CallNextEventHandler first, and then use QDBeginCGContext to
+ * create your own context for drawing. You can use either QuickDraw
+ * or CoreGraphics to draw into an overlay window, but you must use
+ * CoreGraphics to draw if you need any of your drawing to be
+ * non-opaque, since QuickDraw always sets the alpha channel of any
+ * pixels that it touches to 1.0. You can also use the standard
+ * window event handler together with regular controls in an overlay
+ * window. When using the standard window event handler, you will
+ * probably want your kEventWindowPaint handler to return
+ * eventNotHandledErr (after calling the default handler with
+ * CallNextEventHandler first) so that after the Paint handler
+ * returns, the Window Manager will send a kEventWindowDrawContent
+ * event which the standard window event handler can respond to by
+ * drawing the controls in the window. Overlay windows are initially
+ * placed in the overlay window group, given a modality of
+ * kWindowModalityNone, and given an activation scope of
+ * kWindowActivationScopeNone. Available in Mac OS X.
+ }
+ kOverlayWindowClass = 14;
+
+ {
+ * A sheet alert window is similar to a sheet window, but is intended
+ * to display an alert rather than a dialog. On Mac OS X, the
+ * appearance of a sheet window and a sheet alert window is currently
+ * identical, but in CarbonLib a sheet alert window has a different
+ * appearance from a sheet window. Use
+ * kThemeBrushSheetBackgroundOpaque to draw an opaque background for
+ * sheet alert windows, or kThemeBrushSheetBackgroundTransparent to
+ * draw a transparent background (the transparent brush is only
+ * available in Mac OS X 10.1 and later). Sheet alert windows are
+ * initially placed in the document window group, given a modality of
+ * kWindowModalityNone, and given an activation scope of
+ * kWindowActivationScopeAll. Available in CarbonLib 1.3 and later,
+ * and in Mac OS X 10.1 and later; in CarbonLib, a sheet alert window
+ * is actually a movable alert window, which blocks user interaction
+ * with all windows of the application.
+ }
+ kSheetAlertWindowClass = 15;
+
+ {
+ * A alternate plain window is similar to a plain window but has a
+ * solid black shadow on its right and bottom sides. It is rarely
+ * used in modern Mac OS applications.
+ * kThemeBrushDocumentWindowBackground,
+ * kThemeBrushDialogBackgroundActive, and application-specific custom
+ * drawing are all commonly used to draw the background of an
+ * alternate plain window. Alternate plain windows are initially
+ * placed in the document window group, given a modality of
+ * kWindowModalityNone, and given an activation scope of
+ * kWindowActivationScopeAll. Available in CarbonLib 1.3 and later,
+ * and Mac OS X 10.1 and later.
+ }
+ kAltPlainWindowClass = 16;
+
+ {
+ * A simple window is the simplest possible window; it has no window
+ * frame and its entire content is drawn by the application. Use any
+ * theme brush or your own custom drawing to draw the background of a
+ * simple window. Simple windows are initially placed in the document
+ * window group, given a modality of kWindowModalityNone, and given
+ * an activation scope of kWindowActivationScopeAll. Available in
+ * CarbonLib 1.5 and later, and Mac OS X 10.1 and later.
+ }
+ kSimpleWindowClass = 18;
+
+ {
+ * A drawer window is used when implementing a drawer user interface,
+ * in which the drawer window slides out from underneath a document
+ * window. Use kThemeBrushDrawerBackground or
+ * kThemeBrushDocumentWindowBackground to draw the background of
+ * drawer windows. Drawer windows are initially placed in the
+ * document window group, given a modality of kWindowModalityNone,
+ * and given an activation scope of kWindowActivationScopeAll. Drawer
+ * windows should always be created using the Compositing window
+ * attribute. Available in Mac OS X 10.2 or later.
+ }
+ kDrawerWindowClass = 20;
+
+ {
+ * Not an actual window class, but a meta-constant that is used with
+ * GetFrontWindowOfClass, FindWindowOfClass, and GetNextWindowOfClass
+ * to indicate that there should be no restriction on the class of
+ * the returned window. Also used with GetWindowGroupOfClass to get
+ * the root window group.
+ }
+ kAllWindowClasses = $FFFFFFFF;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Attributes }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+type
+ WindowAttributes = UInt32;
+ WindowAttributes_fix = WindowAttributes; { used as field type when a record declaration contains a WindowAttributes field identifier }
+
+{
+ * Summary:
+ * Window attributes
+ }
+const
+{
+ * A constant with value zero; the lack of any attributes.
+ }
+ kWindowNoAttributes = 0;
+
+ {
+ * This window has a close box. Available for windows of
+ * kDocumentWindowClass, kFloatingWindowClass, and
+ * kUtilityWindowClass.
+ }
+ kWindowCloseBoxAttribute = 1 shl 0;
+
+ {
+ * This window changes width when zooming. Available for windows of
+ * kDocumentWindowClass, kFloatingWindowClass, and
+ * kUtilityWindowClass.
+ }
+ kWindowHorizontalZoomAttribute = 1 shl 1;
+
+ {
+ * This window changes height when zooming. Available for windows of
+ * kDocumentWindowClass, kFloatingWindowClass, and
+ * kUtilityWindowClass.
+ }
+ kWindowVerticalZoomAttribute = 1 shl 2;
+
+ {
+ * This window changes both width and height when zooming. Available
+ * for windows of kDocumentWindowClass, kFloatingWindowClass, and
+ * kUtilityWindowClass.
+ }
+ kWindowFullZoomAttribute = kWindowVerticalZoomAttribute or kWindowHorizontalZoomAttribute;
+
+ {
+ * This window has a collapse box. Available for windows of
+ * kDocumentWindowClass and, on Mac OS 9, kFloatingWindowClass and
+ * kUtilityWindowClass; not available for windows of
+ * kFloatingWindowClass or kUtilityWindowClass on Mac OS X.
+ }
+ kWindowCollapseBoxAttribute = 1 shl 3;
+
+ {
+ * This window can be resized. Available for windows of
+ * kDocumentWindowClass, kMovableModalWindowClass,
+ * kFloatingWindowClass, kUtilityWindowClass, and kSheetWindowClass.
+ }
+ kWindowResizableAttribute = 1 shl 4;
+
+ {
+ * This window has a vertical titlebar on the side of the window.
+ * Available for windows of kFloatingWindowClass and
+ * kUtilityWindowClass.
+ }
+ kWindowSideTitlebarAttribute = 1 shl 5;
+
+ {
+ * This window has a toolbar button. Available for windows of
+ * kDocumentWindowClass on Mac OS X.
+ }
+ kWindowToolbarButtonAttribute = 1 shl 6;
+
+ {
+ * This window uses the Metal appearance. Available for document
+ * windows on Mac OS X 10.2 and later, and for floating windows on
+ * Mac OS X 10.3 and later. Drawers can also be metal, but
+ * dynamically adjust their appearance based on their parent window's
+ * appearance; it is not necessary to specify this attribute for a
+ * metal drawer.
+ }
+ kWindowMetalAttribute = 1 shl 8;
+
+ {
+ * For Document, Floating, and Utility windows, this attribute allows
+ * you to hide the title bar of a window. For Mac OS X 10.4 or later.
+ }
+ kWindowNoTitleBarAttribute = 1 shl 9;
+
+ {
+ * Indicates that no border should be drawn between the toolbar and
+ * window content. Relevant only in metal windows. Ignored in
+ * non-metal windows. Available in Mac OS X 10.4 and later for
+ * window classes that support metal.
+ }
+ kWindowMetalNoContentSeparatorAttribute = 1 shl 11;
+
+ {
+ * This window does not participate in window cycling invoked by
+ * cmd-~ or the "Focus on Window" hotkey defined in the Keyboards
+ * preference pane. Available for all windows on Mac OS X 10.2 and
+ * later.
+ }
+ kWindowDoesNotCycleAttribute = 1 shl 15;
+
+ {
+ * This window receives no update events. Available for all windows.
+ }
+ kWindowNoUpdatesAttribute = 1 shl 16;
+
+ {
+ * This window receives no activate events. Available for all windows.
+ }
+ kWindowNoActivatesAttribute = 1 shl 17;
+
+ {
+ * This window receives mouse events even for areas of the window
+ * that are transparent (have an alpha channel component of zero).
+ * Available for windows of kOverlayWindowClass on Mac OS X 10.0 and
+ * 10.1, and available for all windows on Mac OS X 10.2 and later.
+ }
+ kWindowOpaqueForEventsAttribute = 1 shl 18;
+
+ {
+ * This window uses composited drawing. This means that the entire
+ * window is comprised of HIViews, and can be treated thusly. This
+ * attribute must be specified at window creation, and cannot be
+ * changed later with ChangeWindowAttributes. Available on Mac OS X
+ * 10.2 and later.
+ }
+ kWindowCompositingAttribute = 1 shl 19;
+
+ {
+ * This window has no shadow. Available for all windows on Mac OS X.
+ * This attribute is automatically given to windows of
+ * kOverlayWindowClass.
+ }
+ kWindowNoShadowAttribute = 1 shl 21;
+
+ {
+ * This window is automatically hidden on suspend and shown on
+ * resume. Available for all windows. This attribute is automatically
+ * given to windows of kFloatingWindowClass, kHelpWindowClass, and
+ * kToolbarWindowClass.
+ }
+ kWindowHideOnSuspendAttribute = 1 shl 24;
+
+ {
+ * This window is marked so that the window server will drag the
+ * window automatically. Your application should not call DragWindow
+ * for this window, else it would confuse the heck out of the drag
+ * (it would fight with the window server for control). This
+ * attribute is ignored (async drag is not used) if your window is
+ * grouped with other windows in a window group that has the
+ * kWindowGroupAttrMoveTogether attribute. Available for all windows
+ * on Mac OS X 10.3 and later.
+ }
+ kWindowAsyncDragAttribute = 1 shl 23;
+
+ {
+ * This window has the standard Carbon window event handler
+ * installed. Available for all windows.
+ }
+ kWindowStandardHandlerAttribute = 1 shl 25;
+
+ {
+ * This window is automatically hidden during fullscreen mode (when
+ * the menubar is invisible) and shown afterwards. Available for all
+ * windows. This attribute is automatically given to windows of
+ * kUtilityWindowClass.
+ }
+ kWindowHideOnFullScreenAttribute = 1 shl 26;
+
+ {
+ * This window is added to the standard Window menu. Available for
+ * windows of kDocumentWindowClass. This attribute is automatically
+ * given to windows of kDocumentWindowClass.
+ }
+ kWindowInWindowMenuAttribute = 1 shl 27;
+
+ {
+ * This window supports live resizing. Available for all windows on
+ * Mac OS X.
+ }
+ kWindowLiveResizeAttribute = 1 shl 28;
+
+ {
+ * This window never receives mouse events, even in areas that are
+ * opaque. Instead, clicks on the window will be passed through to
+ * windows beneath it. Available for all windows on Mac OS X 10.2 and
+ * later.
+ }
+ kWindowIgnoreClicksAttribute = 1 shl 29;
+
+ {
+ * This window will not be repositioned by the default
+ * kEventWindowConstrain handler in response to changes in monitor
+ * size, Dock position, and so on. Available for all windows on Mac
+ * OS X 10.1 and later, and CarbonLib 1.6 and later.
+ }
+ kWindowNoConstrainAttribute = 1 shl 31;
+
+ {
+ * This window's context should be scaled to match the display scale
+ * factor. This attribute can only be used when
+ * kWindowCompositingAttribute is also enabled. When this attribute
+ * is enabled, you may not draw with QuickDraw in the window. If this
+ * attribute is enabled and if the scale factor is something other
+ * than 1.0, the window's scale mode will be
+ * kHIWindowScaleModeFrameworkScaled. It is illegal to specify both
+ * this attribute and kWindowApplicationScaledAttribute. You may only
+ * specify this attribute at window creation time. Available for all
+ * windows in Mac OS X 10.4 and later.
+ }
+ kWindowFrameworkScaledAttribute = 1 shl 20;
+
+ {
+ * This attribute indicates that the details of
+ * resolution-independent scaling will be taken care of primarily by
+ * the application. This is valid for both compositing and
+ * non-compositing windows. Resolution-independent windows that draw
+ * with QuickDraw must use this attribute bit. If this attribute is
+ * enabled and if the scale factor is something other than 1.0, the
+ * window's scale mode will be kHIWindowScaleModeApplicationScaled.
+ * It is illegal to specify both this attribute and
+ * kWindowFrameworkScaledAttribute. You may only specify this
+ * attribute at window creation time. Available for all windows in
+ * Mac OS X 10.4 and later.
+ }
+ kWindowApplicationScaledAttribute = 1 shl 30;
+
+ {
+ * The minimum set of window attributes commonly used by document
+ * windows.
+ }
+ kWindowStandardDocumentAttributes = kWindowCloseBoxAttribute or kWindowFullZoomAttribute or kWindowCollapseBoxAttribute or kWindowResizableAttribute;
+
+ {
+ * The minimum set of window attributes commonly used by floating
+ * windows.
+ }
+ kWindowStandardFloatingAttributes = kWindowCloseBoxAttribute or kWindowCollapseBoxAttribute;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Definition Type }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kWindowDefProcType = $57444546 (* 'WDEF' *);
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Mac OS 7.5 Window Definition Resource IDs }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kStandardWindowDefinition = 0; { for document windows and dialogs}
+ kRoundWindowDefinition = 1; { old da-style window}
+ kFloatingWindowDefinition = 124; { for floating windows}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Variant Codes }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+{ for use with kStandardWindowDefinition }
+ kDocumentWindowVariantCode = 0;
+ kModalDialogVariantCode = 1;
+ kPlainDialogVariantCode = 2;
+ kShadowDialogVariantCode = 3;
+ kMovableModalDialogVariantCode = 5;
+ kAlertVariantCode = 7;
+ kMovableAlertVariantCode = 9; { for use with kFloatingWindowDefinition }
+ kSideFloaterVariantCode = 8;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ DefProc IDs }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+{ classic ids }
+ documentProc = 0;
+ dBoxProc = 1;
+ plainDBox = 2;
+ altDBoxProc = 3;
+ noGrowDocProc = 4;
+ movableDBoxProc = 5;
+ zoomDocProc = 8;
+ zoomNoGrow = 12; { floating window defproc ids }
+ floatProc = 1985;
+ floatGrowProc = 1987;
+ floatZoomProc = 1989;
+ floatZoomGrowProc = 1991;
+ floatSideProc = 1993;
+ floatSideGrowProc = 1995;
+ floatSideZoomProc = 1997;
+ floatSideZoomGrowProc = 1999;
+
+const
+{ Resource IDs for theme-savvy window defprocs }
+ kWindowDocumentDefProcResID = 64;
+ kWindowDialogDefProcResID = 65;
+ kWindowUtilityDefProcResID = 66;
+ kWindowUtilitySideTitleDefProcResID = 67;
+ kWindowSheetDefProcResID = 68;
+ kWindowSimpleDefProcResID = 69;
+ kWindowSheetAlertDefProcResID = 70;
+
+const
+{ Proc IDs for theme-savvy windows }
+ kWindowDocumentProc = 1024;
+ kWindowGrowDocumentProc = 1025;
+ kWindowVertZoomDocumentProc = 1026;
+ kWindowVertZoomGrowDocumentProc = 1027;
+ kWindowHorizZoomDocumentProc = 1028;
+ kWindowHorizZoomGrowDocumentProc = 1029;
+ kWindowFullZoomDocumentProc = 1030;
+ kWindowFullZoomGrowDocumentProc = 1031;
+
+
+const
+{ Proc IDs for theme-savvy dialogs }
+ kWindowPlainDialogProc = 1040;
+ kWindowShadowDialogProc = 1041;
+ kWindowModalDialogProc = 1042;
+ kWindowMovableModalDialogProc = 1043;
+ kWindowAlertProc = 1044;
+ kWindowMovableAlertProc = 1045;
+
+
+const
+{ procIDs available from Mac OS 8.1 (Appearance 1.0.1) forward }
+ kWindowMovableModalGrowProc = 1046;
+
+
+const
+{ Proc IDs for top title bar theme-savvy floating windows }
+ kWindowFloatProc = 1057;
+ kWindowFloatGrowProc = 1059;
+ kWindowFloatVertZoomProc = 1061;
+ kWindowFloatVertZoomGrowProc = 1063;
+ kWindowFloatHorizZoomProc = 1065;
+ kWindowFloatHorizZoomGrowProc = 1067;
+ kWindowFloatFullZoomProc = 1069;
+ kWindowFloatFullZoomGrowProc = 1071;
+
+
+const
+{ Proc IDs for side title bar theme-savvy floating windows }
+ kWindowFloatSideProc = 1073;
+ kWindowFloatSideGrowProc = 1075;
+ kWindowFloatSideVertZoomProc = 1077;
+ kWindowFloatSideVertZoomGrowProc = 1079;
+ kWindowFloatSideHorizZoomProc = 1081;
+ kWindowFloatSideHorizZoomGrowProc = 1083;
+ kWindowFloatSideFullZoomProc = 1085;
+ kWindowFloatSideFullZoomGrowProc = 1087;
+
+
+const
+{ Proc IDs for sheet windows }
+ kWindowSheetProc = 1088; { available in Mac OS X and CarbonLib 1.3 }
+ kWindowSheetAlertProc = 1120; { available in Mac OS X 10.1 and CarbonLib 1.3 }
+
+
+{
+ * Discussion:
+ * Window defproc IDs for simple windows
+ }
+const
+{ Proc IDs for simple windows }
+
+ {
+ * A window that has no structure region; the content covers the
+ * entire window.
+ }
+ kWindowSimpleProc = 1104;
+
+ {
+ * A window that has a 1-pixel black frame as its structure.
+ }
+ kWindowSimpleFrameProc = 1105;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ System 7 Window Positioning Constants }
+{ Passed into StandardAlert and used in ÔWINDÕ, ÔDLOGÕ, and ÔALRTÕ templates }
+{ StandardAlert uses zero to specify the default position. Other calls use zero to }
+{ specify Òno positionÓ. Do not pass these constants to RepositionWindow. Do not }
+{ store these constants in the BasicWindowDescription of a ÔwindÕ resource. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+const
+ kWindowNoPosition = $0000;
+ kWindowDefaultPosition = $0000; { used by StandardAlert}
+ kWindowCenterMainScreen = $280A;
+ kWindowAlertPositionMainScreen = $300A;
+ kWindowStaggerMainScreen = $380A;
+ kWindowCenterParentWindow = $A80A;
+ kWindowAlertPositionParentWindow = $B00A;
+ kWindowStaggerParentWindow = $B80A;
+ kWindowCenterParentWindowScreen = $680A;
+ kWindowAlertPositionParentWindowScreen = $700A;
+ kWindowStaggerParentWindowScreen = $780A;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Positioning Methods }
+{ Positioning methods passed to RepositionWindow. }
+{ Do not use them in WIND, ALRT, DLOG templates. }
+{ Do not confuse these constants with the constants above }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * WindowPositionMethod
+ *
+ * Summary:
+ * Positioning methods usable with RepositionWindow.
+ *
+ * Discussion:
+ * These constants are for use solely with the RepositionWindow API.
+ * They should not be used in 'WIND', 'ALRT', or 'DLOG' resources.
+ }
+type
+ WindowPositionMethod = UInt32;
+ WindowPositionMethod_fix = WindowPositionMethod; { used as field type when a record declaration contains a WindowPositionMethod field identifier }
+const
+{
+ * Centers the window on the main screen.
+ }
+ kWindowCenterOnMainScreen = 1;
+
+ {
+ * Centers the window on its parent window. The parent window must be
+ * different from the positioned window.
+ }
+ kWindowCenterOnParentWindow = 2;
+
+ {
+ * Centers the window on the screen containing the largest portion of
+ * its parent window. On Mac OS X 10.3 and later, the parent window
+ * may be the same as the positioned window. On CarbonLib and earlier
+ * versions of Mac OS X, the parent window must be different from the
+ * positioned window.
+ }
+ kWindowCenterOnParentWindowScreen = 3;
+
+ {
+ * Cascades the window on the main screen.
+ }
+ kWindowCascadeOnMainScreen = 4;
+
+ {
+ * Cascades the window on its parent window. The parent window must
+ * be different from the positioned window.
+ }
+ kWindowCascadeOnParentWindow = 5;
+
+ {
+ * Cascades the window on the screen containing the largest portion
+ * of its parent window. On Mac OS X 10.3 and later, the parent
+ * window may be the same as the positioned window. On CarbonLib and
+ * earlier versions of Mac OS X, the parent window must be different
+ * from the positioned window.
+ }
+ kWindowCascadeOnParentWindowScreen = 6;
+
+ {
+ * Cascades the window on the screen containing the largest portion
+ * of its parent window, starting below and to the right of its
+ * parent window. The parent window must be different from the
+ * positioned window. Available in Mac OS X 10.2 and CarbonLib 1.6
+ * and later.
+ }
+ kWindowCascadeStartAtParentWindowScreen = 10;
+
+ {
+ * Puts the window into the alert position on the main screen.
+ }
+ kWindowAlertPositionOnMainScreen = 7;
+
+ {
+ * Puts the window into the alert position on its parent window. The
+ * parent window must be different from the positioned window.
+ }
+ kWindowAlertPositionOnParentWindow = 8;
+
+ {
+ * Puts the window into the alert position on the screen containing
+ * the largest portion of its parent window. On Mac OS X 10.3 and
+ * later, the parent window may be the same as the positioned window.
+ * On CarbonLib and earlier versions of Mac OS X, the parent window
+ * must be different from the positioned window.
+ }
+ kWindowAlertPositionOnParentWindowScreen = 9;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ GetWindowRegion Types }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ WindowRegionCode = UInt16;
+const
+{ Region values to pass into GetWindowRegion & GetWindowBounds. All regions are reported in global coordinates. }
+ kWindowTitleBarRgn = 0;
+ kWindowTitleTextRgn = 1;
+ kWindowCloseBoxRgn = 2;
+ kWindowZoomBoxRgn = 3;
+ kWindowDragRgn = 5;
+ kWindowGrowRgn = 6;
+ kWindowCollapseBoxRgn = 7;
+ kWindowTitleProxyIconRgn = 8; { Mac OS 8.5 forward}
+ kWindowStructureRgn = 32;
+ kWindowContentRgn = 33; { Content area of the window; empty when the window is collapsed}
+ kWindowUpdateRgn = 34; { Carbon forward}
+ kWindowOpaqueRgn = 35; { Mac OS X: Area of window considered to be opaque. Only valid for windows with alpha channels.}
+ kWindowGlobalPortRgn = 40; { Carbon forward - bounds of the windowÕs port in global coordinates; not affected by CollapseWindow}
+ kWindowToolbarButtonRgn = 41; { Mac OS X Tiger: the toolbar button area}
+
+{ GetWindowRegionRec - a pointer to this is passed in WDEF param for kWindowMsgGetRegion}
+type
+ GetWindowRegionRec = record
+ winRgn: RgnHandle;
+ regionCode: WindowRegionCode;
+ end;
+ GetWindowRegionPtr = ^GetWindowRegionRec;
+ GetWindowRegionRecPtr = GetWindowRegionPtr;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ WDEF Message Types }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ SetupWindowProxyDragImageRec - setup the proxy icon drag image
+ Both regions are allocated and disposed by the Window Manager.
+ The GWorld is disposed of by the Window Manager, but the WDEF must allocate
+ it. See Technote on Drag Manager 1.1 additions for more information and sample code for
+ setting up drag images.
+}
+
+type
+ SetupWindowProxyDragImageRec = record
+ imageGWorld: GWorldPtr; { locked GWorld containing the drag image - output - can be NULL}
+ imageRgn: RgnHandle; { image clip region, contains the portion of the image which gets blitted to screen - preallocated output - if imageGWorld is NULL, this is ignored}
+ outlineRgn: RgnHandle; { the outline region used on shallow monitors - preallocated output - must always be non-empty}
+ end;
+{ MeasureWindowTitleRec - a pointer to this is passed in WDEF param for kWindowMsgMeasureTitle}
+type
+ MeasureWindowTitleRec = record
+{ output parameters (filled in by the WDEF)}
+ fullTitleWidth: SInt16; { text + proxy icon width}
+ titleTextWidth: SInt16; { text width}
+
+ { input parameters}
+ isUnicodeTitle: Boolean;
+ unused: Boolean; { future use}
+ end;
+ MeasureWindowTitleRecPtr = ^MeasureWindowTitleRec;
+{
+ GetGrowImageRegionRec - generate a region to be xored during GrowWindow and ResizeWindow.
+ This is passed along with a kWindowMsgGetGrowImageRegion message. On input, the growRect
+ parameter is the window's new bounds in global coordinates. The growImageRegion parameter
+ will be allocated and disposed automatically; the window definition should alter the
+ region appropriately.
+}
+type
+ GetGrowImageRegionRecPtr = ^GetGrowImageRegionRec;
+ GetGrowImageRegionRec = record
+ growRect: Rect;
+ growImageRegion: RgnHandle;
+ end;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Standard Window Kinds }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ dialogKind = 2;
+ userKind = 8;
+ kDialogWindowKind = 2;
+ kApplicationWindowKind = 8;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ FindWindow Result Codes }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ WindowPartCode = SInt16;
+ WindowPartCodePtr = ^WindowPartCode; { when a VAR xx: WindowPartCode parameter can be nil, it is changed to xx: WindowPartCodePtr }
+const
+ inDesk = 0;
+ inNoWindow = 0;
+ inMenuBar = 1;
+ inSysWindow = 2;
+ inContent = 3;
+ inDrag = 4;
+ inGrow = 5;
+ inGoAway = 6;
+ inZoomIn = 7;
+ inZoomOut = 8;
+ inCollapseBox = 11; { Mac OS 8.0 forward}
+ inProxyIcon = 12; { Mac OS 8.5 forward}
+ inToolbarButton = 13; { Mac OS X forward}
+ inStructure = 15; { Mac OS X 10.1 forward}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Definition Hit Test Result Codes }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ WindowDefPartCode = SInt16;
+const
+ wNoHit = 0;
+ wInContent = 1;
+ wInDrag = 2;
+ wInGrow = 3;
+ wInGoAway = 4;
+ wInZoomIn = 5;
+ wInZoomOut = 6;
+ wInCollapseBox = 9; { Mac OS 8.0 forward}
+ wInProxyIcon = 10; { Mac OS 8.5 forward}
+ wInToolbarButton = 11; { Mac OS X forward}
+ wInStructure = 13; { Mac OS X 10.1 forward}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Definition Messages }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+const
+ kWindowMsgDraw = 0;
+ kWindowMsgHitTest = 1;
+ kWindowMsgCalculateShape = 2;
+ kWindowMsgInitialize = 3;
+ kWindowMsgCleanUp = 4;
+ kWindowMsgDrawGrowOutline = 5;
+ kWindowMsgDrawGrowBox = 6;
+
+{ Messages available from Mac OS 8.0 forward}
+const
+ kWindowMsgGetFeatures = 7;
+ kWindowMsgGetRegion = 8;
+
+{ Messages available from Mac OS 8.5 forward}
+const
+ kWindowMsgDragHilite = 9; { parameter boolean indicating on or off}
+ kWindowMsgModified = 10; { parameter boolean indicating saved (false) or modified (true)}
+ kWindowMsgDrawInCurrentPort = 11; { same as kWindowMsgDraw, but must draw in current port}
+ kWindowMsgSetupProxyDragImage = 12; { parameter pointer to SetupWindowProxyDragImageRec}
+ kWindowMsgStateChanged = 13; { something about the window's state has changed}
+ kWindowMsgMeasureTitle = 14; { measure and return the ideal title width}
+
+{ Messages only available in Carbon}
+const
+ kWindowMsgGetGrowImageRegion = 19; { get region to xor during grow/resize. parameter pointer to GetGrowImageRegionRec.}
+
+{ old names}
+const
+ wDraw = 0;
+ wHit = 1;
+ wCalcRgns = 2;
+ wNew = 3;
+ wDispose = 4;
+ wGrow = 5;
+ wDrawGIcon = 6;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ State-changed Flags for kWindowMsgStateChanged }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kWindowStateTitleChanged = 1 shl 0;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Feature Bits }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * Summary:
+ * Window feature bits
+ *
+ * Discussion:
+ * These feature bits are supplied by window definition functions in
+ * response to the kWindowMsgGetFeatures message or the
+ * kEventWindowInit Carbon event. A window's feature bits can also
+ * be modified dynamically using the HIWindowChangeFeatures API;
+ * typically, feature bits are only modified by a window definition
+ * or window frame view.
+ }
+const
+{
+ * Indicates whether the window is resizable. Available on Mac OS 8.0
+ * and later. Not supported on Mac OS X; replaced by
+ * kWindowResizableAttribute.
+ }
+ kWindowCanGrow = 1 shl 0;
+
+ {
+ * Indicates whether the window can zoom. Available on Mac OS 8.0 and
+ * later. Not supported on Mac OS X; replaced by
+ * kWindowHorizontal/Vertical/FullZoomAttribute.
+ }
+ kWindowCanZoom = 1 shl 1;
+
+ {
+ * Indicates whether the window can be minimized. Available on Mac OS
+ * 8.0 and later. Not supported on Mac OS X; replaced by
+ * kWindowCollapseBoxAttribute.
+ }
+ kWindowCanCollapse = 1 shl 2;
+
+ {
+ * Indicates whether the window is application-modal. Available on
+ * Mac OS 8.0 and later.
+ }
+ kWindowIsModal = 1 shl 3;
+
+ {
+ * Indicates that the window definition supports the
+ * kWindowMsgGetRegion message. Available on Mac OS 8.0 and later.
+ * Not supported on Mac OS X. All window definitions that implement
+ * the kWindowMsgGetFeatures message automatically get this feature
+ * bit on Mac OS X.
+ }
+ kWindowCanGetWindowRegion = 1 shl 4;
+
+ {
+ * Indicates whether the window is an alert. Available on Mac OS 8.0
+ * and later.
+ }
+ kWindowIsAlert = 1 shl 5;
+
+ {
+ * Indicates whether the window has a title bar. Available on Mac OS
+ * 8.0 and later. This feature is required for async dragging to be
+ * enabled for a window.
+ }
+ kWindowHasTitleBar = 1 shl 6;
+
+ {
+ * Indicates that the window definition supports the
+ * kWindowMsgDragHilite message. Available on Mac OS 8.5 and later.
+ }
+ kWindowSupportsDragHilite = 1 shl 7;
+
+ {
+ * Indicates that the window definition supports the
+ * kWindowMsgModified message. Available on Mac OS 8.5 and later.
+ }
+ kWindowSupportsModifiedBit = 1 shl 8;
+
+ {
+ * Indicates that the window definition supports the
+ * kWindowMsgDrawInCurrentPort message. Available on Mac OS 8.5 and
+ * later. Not supported on Mac OS X.
+ }
+ kWindowCanDrawInCurrentPort = 1 shl 9;
+
+ {
+ * Indicates that the window definition supports the
+ * kWindowMsgSetupProxyDragImage message. Available on Mac OS 8.5 and
+ * later.
+ }
+ kWindowCanSetupProxyDragImage = 1 shl 10;
+
+ {
+ * Indicates that the window definition supports the
+ * kWindowMsgMeasureTitle message. Available on Mac OS 8.5 and later.
+ }
+ kWindowCanMeasureTitle = 1 shl 11;
+
+ {
+ * Indicates that the window definition wants to receive a
+ * kWindowMsgCleanUp message for each existing window when a process
+ * is terminated. Available on Mac OS 8.5 and later. Not supported on
+ * Mac OS X.
+ }
+ kWindowWantsDisposeAtProcessDeath = 1 shl 12;
+
+ {
+ * Indicates that the window definition supports the
+ * kWindowMsgGetGrowImageRegion message. Available on Mac OS X 10.0
+ * and later.
+ }
+ kWindowSupportsGetGrowImageRegion = 1 shl 13;
+
+ {
+ * Indicates that the window is entirely opaque. If this feature bit
+ * is set, the window will use less memory because no alpha channel
+ * information will be stored for the window's pixels. If this
+ * feature bit is not set, the Window Manager will send a
+ * kEventWindowGetRegion Carbon event to the window with the
+ * kWindowOpaqueRgn constant to get a region that describes the
+ * opaque area of the window. Available on Mac OS X 10.1 and later.
+ }
+ kWindowIsOpaque = 1 shl 14;
+
+ {
+ * Indicates that the window definition does not require that the
+ * current port be the classic Window Manager port. Not supported on
+ * Mac OS X.
+ }
+ kWindowDefSupportsColorGrafPort = $40000002;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Desktop Pattern Resource ID }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ deskPatID = 16;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Color Part Codes }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ wContentColor = 0;
+ wFrameColor = 1;
+ wTextColor = 2;
+ wHiliteColor = 3;
+ wTitleBarColor = 4;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Region Dragging Constants }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+const
+ kMouseUpOutOfSlop = $80008000;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Color Table }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ WinCTabPtr = ^WinCTab;
+ WinCTab = record
+ wCSeed: SInt32; { reserved }
+ wCReserved: SInt16; { reserved }
+ ctSize: SInt16; { usually 4 for windows }
+ ctTable: array [0..4] of ColorSpec;
+ end;
+type
+ WCTabPtr = WinCTabPtr;
+type
+ WCTabHandle = ^WCTabPtr;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ BasicWindowDescription }
+{ Contains statically-sized basic attributes of the window, for storage in a }
+{ collection item. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ constants for the version field}
+const
+ kWindowDefinitionVersionOne = 1;
+ kWindowDefinitionVersionTwo = 2;
+
+{ constants for the stateflags bit field }
+const
+ kWindowIsCollapsedState = 1 shl 0;
+
+type
+ BasicWindowDescriptionPtr = ^BasicWindowDescription;
+ BasicWindowDescription = record
+ descriptionSize: UInt32; { sizeof(BasicWindowDescription)}
+
+ windowContentRect: Rect; { location on screen}
+ windowZoomRect: Rect; { location on screen when zoomed out}
+ windowRefCon: UInt32; { the refcon - __avoid saving stale pointers here__ }
+ windowStateFlags: UInt32; { window state bit flags}
+ windowPositionMethod: WindowPositionMethod_fix; { method last used by RepositionWindow to position the window (if any)}
+
+ windowDefinitionVersion: UInt32;
+ case SInt16 of
+ 0: (
+ windowDefProc: SInt16; { defProc and variant }
+ windowHasCloseBox: Boolean;
+ );
+ 1: (
+ windowClass: WindowClass_fix; { the class }
+ windowAttributes: WindowAttributes_fix; { the attributes }
+ );
+ end;
+{ the window manager stores the default collection items using these IDs}
+const
+ kStoredWindowSystemTag = $6170706C (* 'appl' *); { Only Apple collection items will be of this tag}
+ kStoredBasicWindowDescriptionID = $73626173 (* 'sbas' *); { BasicWindowDescription}
+ kStoredWindowPascalTitleID = $73323535 (* 's255' *); { pascal title string}
+ kStoredWindowTitleCFStringID = $63667374 (* 'cfst' *); { CFString title string}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Class Ordering }
+{ Special cases for the ÒbehindÓ parameter in window creation calls. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+ kFirstWindowOfClass = WindowRef(-1);
+ kLastWindowOfClass = WindowRef(0);
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Zoom Information Handle }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ WStateData = record
+ userState: Rect; {user zoom state}
+ stdState: Rect; {standard zoom state}
+ end;
+type
+ WStateDataPtr = ^WStateData;
+type
+ WStateDataHandle = ^WStateDataPtr;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ MixedMode & ProcPtrs }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ WindowDefProcPtr = function( varCode: SInt16; window: WindowRef; message: SInt16; param: SInt32 ): SInt32;
+type
+ DeskHookProcPtr = procedure( mouseClick: Boolean; var theEvent: EventRecord );
+type
+ WindowPaintProcPtr = function( device: GDHandle; qdContext: GrafPtr; window: WindowRef; inClientPaintRgn: RgnHandle; outSystemPaintRgn: RgnHandle; refCon: UnivPtr ): OSStatus;
+type
+ WindowDefUPP = WindowDefProcPtr;
+type
+ DeskHookUPP = DeskHookProcPtr;
+type
+ WindowPaintUPP = WindowPaintProcPtr;
+{
+ * NewWindowDefUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewWindowDefUPP( userRoutine: WindowDefProcPtr ): WindowDefUPP; external name '_NewWindowDefUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDeskHookUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * NewWindowPaintUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewWindowPaintUPP( userRoutine: WindowPaintProcPtr ): WindowPaintUPP; external name '_NewWindowPaintUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeWindowDefUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeWindowDefUPP( userUPP: WindowDefUPP ); external name '_DisposeWindowDefUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDeskHookUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * DisposeWindowPaintUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeWindowPaintUPP( userUPP: WindowPaintUPP ); external name '_DisposeWindowPaintUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeWindowDefUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeWindowDefUPP( varCode: SInt16; window: WindowRef; message: SInt16; param: SInt32; userUPP: WindowDefUPP ): SInt32; external name '_InvokeWindowDefUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDeskHookUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * InvokeWindowPaintUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeWindowPaintUPP( device: GDHandle; qdContext: GrafPtr; window: WindowRef; inClientPaintRgn: RgnHandle; outSystemPaintRgn: RgnHandle; refCon: UnivPtr; userUPP: WindowPaintUPP ): OSStatus; external name '_InvokeWindowPaintUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Definition Spec. Used in Carbon to specify the code that defines a window. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kWindowDefProcPtr = 0; { raw proc-ptr based access}
+ kWindowDefObjectClass = 1; { event-based definition (Carbon 1.1 or later)}
+ kWindowDefProcID = 2; { explicit proc ID; overrides the window class default proc ID}
+ kWindowDefHIView = 3; { this window uses a view as its frame, not a WDEF}
+
+type
+ WindowDefType = UInt32;
+type
+ WindowDefSpecPtr = ^WindowDefSpec;
+ WindowDefSpec = record
+ defType: WindowDefType;
+ case SInt16 of
+ 0: (
+ defProc: WindowDefUPP;
+ );
+ 1: (
+ classRef: UnivPtr;
+ );
+ 2: (
+ procID: SInt16;
+ );
+ 3: (
+ rootView: UnivPtr;
+ );
+ end;
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Creation & Persistence }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * GetNewCWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetNewCWindow( windowID: SInt16; wStorage: UnivPtr; behind: WindowRef ): WindowRef; external name '_GetNewCWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * NewWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function NewWindow( wStorage: UnivPtr; const (*var*) boundsRect: Rect; const (*var*) title: Str255; visible: Boolean; theProc: SInt16; behind: WindowRef; goAwayFlag: Boolean; refCon: SInt32 ): WindowRef; external name '_NewWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetNewWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetNewWindow( windowID: SInt16; wStorage: UnivPtr; behind: WindowRef ): WindowRef; external name '_GetNewWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * NewCWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function NewCWindow( wStorage: UnivPtr; const (*var*) boundsRect: Rect; const (*var*) title: Str255; visible: Boolean; procID: SInt16; behind: WindowRef; goAwayFlag: Boolean; refCon: SInt32 ): WindowRef; external name '_NewCWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DisposeWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DisposeWindow( window: WindowRef ); external name '_DisposeWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * [Mac]CloseWindow()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ Routines available from Mac OS 8.5 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
+}
+
+{
+ * CreateNewWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function CreateNewWindow( windowClass_: WindowClass; attributes: WindowAttributes; const (*var*) contentBounds: Rect; var outWindow: WindowRef ): OSStatus; external name '_CreateNewWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Routines available from Mac OS 8.5 forward}
+
+{ Create a window from a ÔwindÕ resource}
+{
+ * CreateWindowFromResource()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function CreateWindowFromResource( resID: SInt16; var outWindow: WindowRef ): OSStatus; external name '_CreateWindowFromResource';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ window persistence}
+{
+ * StoreWindowIntoCollection()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function StoreWindowIntoCollection( window: WindowRef; collection_: Collection ): OSStatus; external name '_StoreWindowIntoCollection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CreateWindowFromCollection()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function CreateWindowFromCollection( collection_: Collection; var outWindow: WindowRef ): OSStatus; external name '_CreateWindowFromCollection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ window refcounting}
+{
+ * GetWindowOwnerCount()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function GetWindowOwnerCount( window: WindowRef; var outCount: UInt32 ): OSStatus; external name '_GetWindowOwnerCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CloneWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function CloneWindow( window: WindowRef ): OSStatus; external name '_CloneWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowRetainCount()
+ *
+ * Summary:
+ * Returns the retain count of a window.
+ *
+ * Discussion:
+ * This API is equivalent to GetWindowOwnerCount. For consistency
+ * with CoreFoundation and Carbon Events, it is preferred over
+ * GetWindowOwnerCount. Both APIs will continue to be supported.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose retain count to retrieve.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowRetainCount( inWindow: WindowRef ): ItemCount; external name '_GetWindowRetainCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RetainWindow()
+ *
+ * Summary:
+ * Increments the retain count of a window.
+ *
+ * Discussion:
+ * This API is equivalent to CloneWindow. For consistency with
+ * CoreFoundation and Carbon Events, it is preferred over
+ * CloneWindow. Both APIs will continue to be supported.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose retain count to increment.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function RetainWindow( inWindow: WindowRef ): OSStatus; external name '_RetainWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ReleaseWindow()
+ *
+ * Summary:
+ * Decrements the retain count of a window, and destroys the window
+ * if the retain count falls to zero.
+ *
+ * Discussion:
+ * This API is equivalent to DisposeWindow. For consistency with
+ * CoreFoundation and Carbon Events, it is preferred over
+ * DisposeWindow. Both APIs will continue to be supported.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose retain count to decrement.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function ReleaseWindow( inWindow: WindowRef ): OSStatus; external name '_ReleaseWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Custom Windows }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
+
+{
+ * CreateCustomWindow()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function CreateCustomWindow( const (*var*) def: WindowDefSpec; windowClass_: WindowClass; attributes: WindowAttributes; const (*var*) contentBounds: Rect; var outWindow: WindowRef ): OSStatus; external name '_CreateCustomWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ReshapeCustomWindow()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function ReshapeCustomWindow( window: WindowRef ): OSStatus; external name '_ReshapeCustomWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RegisterWindowDefinition()
+ *
+ * Summary:
+ * Registers or unregisters a binding between a resource ID and a
+ * window definition function.
+ *
+ * Discussion:
+ * In the Mac OS 8.x Window Manager, a 'WIND' resource can contain
+ * an embedded WDEF procID that is used by the Window Manager as the
+ * resource ID of an 'WDEF' resource to lay out and draw the window.
+ * The 'WDEF' resource is loaded by the Window Manager when you load
+ * the menu with GetNewWindow. Since WDEFs can no longer be packaged
+ * as code resources on Carbon, the procID can no longer refer
+ * directly to a WDEF resource. However, using
+ * RegisterWindowDefinition you can instead specify a
+ * UniversalProcPtr pointing to code in your application code
+ * fragment. RegisterWindowDefinition is available when linking to
+ * CarbonLib 1.1 forward.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inResID:
+ * A WDEF proc ID, as used in a 'WIND' resource.
+ *
+ * inDefSpec:
+ * Specifies the WindowDefUPP that should be used for windows with
+ * the given WDEF proc ID. Passing NULL allows you to unregister
+ * the window definition that had been associated with the given
+ * WDEF proc ID.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function RegisterWindowDefinition( inResID: SInt16; const (*var*) inDefSpec: WindowDefSpec ): OSStatus; external name '_RegisterWindowDefinition';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window part tracking }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ Routines available from Mac OS 8.5 forward
+ (or from Mac OS 8.6 forward when linking to CarbonLib 1.1 forward)
+}
+
+
+{
+ * GetWindowWidgetHilite()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function GetWindowWidgetHilite( inWindow: WindowRef; var outHilite: WindowDefPartCode ): OSStatus; external name '_GetWindowWidgetHilite';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Metainformation Accessors }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * IsValidWindowClass()
+ *
+ * Summary:
+ * Indicates whether a window class is supported by the Window
+ * Manager.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inClass:
+ * The window class.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function IsValidWindowClass( inClass: WindowClass ): Boolean; external name '_IsValidWindowClass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ * GetAvailableWindowAttributes()
+ *
+ * Summary:
+ * Returns the window attributes that are valid for a window class.
+ *
+ * Discussion:
+ * This API is useful because some window classes support different
+ * attributes on different platforms (for example, floating windows
+ * can have collapse boxes on 9, but not on X), and the Window
+ * Manager will return an error if you attempt to create a window
+ * with attributes that aren't supported for the requested window
+ * class. You can use this API to remove attributes that are not
+ * supported by the current platform before calling CreateNewWindow.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inClass:
+ * The window class.
+ *
+ * Result:
+ * The window attributes that are supported for the specified window
+ * class.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function GetAvailableWindowAttributes( inClass: WindowClass ): WindowAttributes; external name '_GetAvailableWindowAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ Routines available from Mac OS 8.5 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
+}
+{
+ * GetWindowClass()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function GetWindowClass( window: WindowRef; var outClass: WindowClass ): OSStatus; external name '_GetWindowClass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowAttributes()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function GetWindowAttributes( window: WindowRef; var outAttributes: WindowAttributes ): OSStatus; external name '_GetWindowAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ Routines available from Mac OS 9.0 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
+}
+{
+ * ChangeWindowAttributes()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function ChangeWindowAttributes( window: WindowRef; setTheseAttributes: WindowAttributes; clearTheseAttributes: WindowAttributes ): OSStatus; external name '_ChangeWindowAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+ WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+
+ SetWindowClass will disappear at some point in the future. Instead of SetWindowClass,
+ you should use SetWindowGroup to move a window into the group of the desired
+ class. This API is very dangerous in that is actually does change the class
+ of the window, but class was meant to be an immutable property of the window.
+ At the very least, this API will be modified to only change the layer of the
+ window to match the layer that the specified class normally lives in. Consider
+ yourself warned!
+
+ WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+ WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+}
+{
+ * SetWindowClass()
+ *
+ * Summary:
+ * Changes the window class of a window.
+ *
+ * Discussion:
+ * SetWindowClass changes the class of a window. It also changes the
+ * window's z-order so that it is grouped with other windows of the
+ * same class. It does not change the visual appearance of the
+ * window. In CarbonLib, SetWindowClass may not be used to change a
+ * non-utility window to have utility window class, or to make a
+ * utility window have non-utility class. SetWindowClass is
+ * available from CarbonLib 1.1 forward.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose class to change.
+ *
+ * inWindowClass:
+ * The new window class.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowClass( inWindow: WindowRef; inWindowClass: WindowClass ): OSStatus; external name '_SetWindowClass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HIWindowChangeClass()
+ *
+ * Summary:
+ * Changes the window look and feel of an existing window on the fly.
+ *
+ * Discussion:
+ * HIWindowChangeClass changes the class of a window. Unlike
+ * SetWindowClass, this call effectively changes the look and
+ * behavior of the window all at once. Because SetWindowClass
+ * already existed and had certain behaviour, we could not change it
+ * to behave the way HIWindowChangeClass does.
+ *
+ * This function can convert a window between kDocumentWindowClass,
+ * kFloatingWindowClass, kUtilityWindowClass, and
+ * kMovableModalWindowClass only. It cannot change a document window
+ * into a plain window, for example.
+ *
+ * The attributes of the window are adjusted to contain only those
+ * that are allowed for the new class. It is the callerÕs
+ * responsibility to adjust them further after HIWindowChangeClass
+ * returns, if necessary.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose class to change.
+ *
+ * inWindowClass:
+ * The new window class.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIWindowChangeClass( inWindow: HIWindowRef; inWindowClass: WindowClass ): OSStatus; external name '_HIWindowChangeClass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Flushing }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * HIWindowFlush()
+ *
+ * Summary:
+ * Flushes any dirty areas a window might have.
+ *
+ * Discussion:
+ * This routine allows you to manually flush dirty areas of a window
+ * to the screen. In the past, one would use QDFlushPortBuffer, but
+ * as we move away from grafports, that type of stuff doesn't make
+ * much sense these days. This is the preferred routine to flush
+ * window buffers in Mac OS X 10.3 and beyond.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to flush.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIWindowFlush( inWindow: HIWindowRef ): OSStatus; external name '_HIWindowFlush';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Modality }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * WindowModality
+ *
+ }
+type
+ WindowModality = UInt32;
+const
+{
+ * A window does not prevent interaction with any other window in the
+ * system.
+ }
+ kWindowModalityNone = 0;
+
+ {
+ * A window prevents interaction with all other windows in the
+ * system. Only available in CarbonLib. Mapped to
+ * kWindowModalityAppModal in Mac OS X.
+ }
+ kWindowModalitySystemModal = 1;
+
+ {
+ * A window prevents interaction with other windows in the same
+ * process.
+ }
+ kWindowModalityAppModal = 2;
+
+ {
+ * A window prevents interaction with a single other window.
+ }
+ kWindowModalityWindowModal = 3;
+
+
+{
+ * SetWindowModality()
+ *
+ * Summary:
+ * Sets the modality of a window.
+ *
+ * Discussion:
+ * The modality of a window is used by the Carbon event manager to
+ * automatically determine appropriate event handling.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose modality to set.
+ *
+ * inModalKind:
+ * The new modality for the window.
+ *
+ * inUnavailableWindow:
+ * If the window is becoming window-modal, this parameter
+ * specifies the window to which the inWindow parameter is modal.
+ * The unavailableWindow will not be available while inWindow is
+ * in window-modal state.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowModality( inWindow: WindowRef; inModalKind: WindowModality; inUnavailableWindow: WindowRef ): OSStatus; external name '_SetWindowModality';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowModality()
+ *
+ * Summary:
+ * Retrieves the modality of a window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose modality to retrieve.
+ *
+ * outModalKind:
+ * On exit, contains the modality of the window.
+ *
+ * outUnavailableWindow:
+ * On exit, ifÊthe window is window-modal, contains the target
+ * window of the specified window's modality.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowModality( inWindow: WindowRef; var outModalKind: WindowModality; outUnavailableWindow: WindowRefPtr { can be NULL } ): OSStatus; external name '_GetWindowModality';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HIWindowIsDocumentModalTarget()
+ *
+ * Summary:
+ * Determines if a window is currently the target window of another
+ * document modal window, such as a sheet.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window in question.
+ *
+ * outOwner:
+ * If inWindow is the target of a document modal window, outOwner
+ * is set to the document modal window on exit. If this function
+ * does not return true, outOwner is undefined. You may pass NULL
+ * if you don't want the owner's window ref.
+ *
+ * Result:
+ * A boolean result. A true result indicates that inWindow is
+ * currently the target of a document modal window.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIWindowIsDocumentModalTarget( inWindow: HIWindowRef; outOwner: HIWindowRefPtr { can be NULL } ): Boolean; external name '_HIWindowIsDocumentModalTarget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Floating Windows }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ Routines available from Mac OS 8.6 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
+}
+
+{
+ * ShowFloatingWindows()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function ShowFloatingWindows: OSStatus; external name '_ShowFloatingWindows';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HideFloatingWindows()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function HideFloatingWindows: OSStatus; external name '_HideFloatingWindows';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * AreFloatingWindowsVisible()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function AreFloatingWindowsVisible: Boolean; external name '_AreFloatingWindowsVisible';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Groups }
+{ The Window Group API allows the creation and management of groups of windows, }
+{ allowing control of the z-order, activation, and positioning of the windows. }
+{ Internally to the Window Manager, each of the standard window tiers (document, }
+{ toolbar, floating, modal, utility, help, and overlay) is implemented as a window }
+{ group; you can access the window group for a class with GetWindowGroupOfClass. }
+{ You can create your own window groups, if you would like your windows to float, }
+{ for example, above the floating window layer but below the modal layer. It is }
+{ also possible to create more complex hierarchical arrangements of window groups. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ WindowGroupRef = ^SInt32; { an opaque 32-bit type }
+ WindowGroupRefPtr = ^WindowGroupRef; { when a var xx:WindowGroupRef parameter can be nil, it is changed to xx: WindowGroupRefPtr }
+{ may be passed as the "behindWindow" parameter to NewCWindow and SendBehind}
+const
+{ may be passed as the "behindWindow" parameter to NewCWindow and SendBehind}
+ kFirstWindowOfGroup = WindowRef(-1);
+ kLastWindowOfGroup = nil;
+{ may be passed as the "behindGroup" parameter to SendWindowGroupBehind}
+ kFirstWindowGroup = WindowGroupRef(-1);
+ kLastWindowGroup = nil;
+
+{
+ * WindowGroupAttributes
+ *
+ * Summary:
+ * These are attributes that may be applied to a window group.
+ }
+type
+ WindowGroupAttributes = UInt32;
+const
+{
+ * Makes the group behave somewhat as a layer of windows that move
+ * together. When any window in the group is brought to the front of
+ * the group, the entire group will also be brought to the front of
+ * the containing group's child hierarchy.
+ }
+ kWindowGroupAttrSelectAsLayer = 1 shl 0;
+
+ {
+ * The positions of the contents of this group with respect to each
+ * other cannot be changed. When one item moves, all other items are
+ * moved simultaneously.
+ }
+ kWindowGroupAttrMoveTogether = 1 shl 1;
+
+ {
+ * The z-order of the contents of this group with respect to each
+ * other cannot be changed. When one item changes z-order, all other
+ * items are moved simultaneously. For purposes of z-ordering, the
+ * group and all its subgroups are effectively treated as if they
+ * were a single window in the parent group of this group.
+ }
+ kWindowGroupAttrLayerTogether = 1 shl 2;
+
+ {
+ * The active state of the windows in this group is shared. The
+ * windows in the group are activated or deactivated according to the
+ * activation scope of the group, but when any window in the group
+ * changes activation, all other windows change to match.
+ }
+ kWindowGroupAttrSharedActivation = 1 shl 3;
+
+ {
+ * When any window in this group is collapsed, all other windows in
+ * this group are hidden. All subgroups of this group are also
+ * examined for the HideOnCollapse attribute, and any windows of any
+ * subgroup with this attribute are also hidden. All windows will be
+ * shown again when the collapsed window is expanded.
+ }
+ kWindowGroupAttrHideOnCollapse = 1 shl 4;
+
+ {
+ * This window group's window level should be left unchanged. If this
+ * attribute is not specified, this window group's window level will
+ * be promoted to a value equal to the level of the next FixedLevel
+ * window group beneath it in the window group hierarchy.
+ }
+ kWindowGroupAttrFixedLevel = 1 shl 5;
+
+
+{
+ * WindowActivationScope
+ *
+ * Discussion:
+ * Every window has a WindowActivationScope. It defines how windows
+ * are activated by the Window Manager with respect to other windows
+ * in the windowÕs group and in the current process.
+ }
+type
+ WindowActivationScope = UInt32;
+const
+{
+ * Windows with this scope are never activated by the Window Manager.
+ * This should be used when the windowÕs visual state does not change
+ * based on activation (for example, tooltip windows), or when the
+ * client wishes to manually control all activation. The window owner
+ * is free to explicitly activate windows using the ActivateWindow
+ * and DeactivateWindow APIs.
+ }
+ kWindowActivationScopeNone = 0;
+
+ {
+ * Windows with this scope are always active if visible. Windows with
+ * this scope are unaffected by the activation state of other
+ * windows. This activation scope is automatically used by floating
+ * windows.
+ }
+ kWindowActivationScopeIndependent = 1;
+
+ {
+ * Windows with this scope are activated relative to other windows
+ * with the same scope in the current process. Only one window with
+ * this scope can be active in the entire process. This activation
+ * scope is automatically used by document and dialog windows.
+ }
+ kWindowActivationScopeAll = 2;
+
+
+{
+ * Summary:
+ * These are constants that can be used for the inNextGroup
+ * parameter to GetWindowGroupSibling.
+ }
+const
+{
+ * Indicates that GetWindowGroupSibling should return the next deeper
+ * sibling group in the z-order.
+ }
+ kNextWindowGroup = true;
+
+ {
+ * Indicates that GetWindowGroupSibling should return the next higher
+ * sibling group in the z-order.
+ }
+ kPreviousWindowGroup = false;
+
+
+{
+ * WindowGroupContentOptions
+ *
+ * Discussion:
+ * Window group contents options are used to control what group
+ * content is counted or returned by the CountWindowGroupContents
+ * and GetWindowGroupContents APIs.
+ }
+type
+ WindowGroupContentOptions = UInt32;
+const
+{
+ * Indicates that Count/GetWindowGroupContents should return the
+ * windows in a group. If this option is not set, these APIs return
+ * the groups in a group.
+ }
+ kWindowGroupContentsReturnWindows = 1 shl 0;
+
+ {
+ * Indicates that Count/GetWindowGroupContents should include the
+ * contents of groups contained by the specified group. If this
+ * option is not set, these APIs only return information about the
+ * specified groupÕs contents.
+ }
+ kWindowGroupContentsRecurse = 1 shl 1;
+
+ {
+ * Indicates that Count/GetWindowGroupContents should only include
+ * visible windows. Only valid when kWindowGroupContentsReturnWindows
+ * is specified.
+ }
+ kWindowGroupContentsVisible = 1 shl 2;
+
+
+{----------------------------------------------------------------------------------}
+{ ¥ Group creation, destruction, and refcounting }
+{----------------------------------------------------------------------------------}
+{
+ * CreateWindowGroup()
+ *
+ * Summary:
+ * Creates a new window group.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inAttributes:
+ * Attributes for the new window group.
+ *
+ * outGroup:
+ * On exit, contains the new window group.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateWindowGroup( inAttributes: WindowGroupAttributes; var outGroup: WindowGroupRef ): OSStatus; external name '_CreateWindowGroup';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RetainWindowGroup()
+ *
+ * Summary:
+ * Increments the refcount of a window group.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose refcount to increment.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function RetainWindowGroup( inGroup: WindowGroupRef ): OSStatus; external name '_RetainWindowGroup';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ReleaseWindowGroup()
+ *
+ * Summary:
+ * Releases a refcount on a window group. If the refcount goes to
+ * zero, the group is destroyed, and a refcount is released from all
+ * contained objects.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose refcount to decrement.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function ReleaseWindowGroup( inGroup: WindowGroupRef ): OSStatus; external name '_ReleaseWindowGroup';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowGroupRetainCount()
+ *
+ * Summary:
+ * Returns the refcount of a window group.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose refcount to return.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowGroupRetainCount( inGroup: WindowGroupRef ): ItemCount; external name '_GetWindowGroupRetainCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ * GetWindowGroupOfClass()
+ *
+ * Summary:
+ * Gets the window group in which windows of a given class are
+ * placed.
+ *
+ * Discussion:
+ * The Window Manager uses window groups internally to manage the
+ * ordering of windows of different classes. In some cases, multiple
+ * classes are placed within the same group; for example, windows
+ * from all of the modal and alert window classes are placed into
+ * the same modal window group. The refcount of the group returned
+ * by this API is not incremented, and the caller does not need to
+ * release the reference.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * windowClass:
+ * The class whose window group to retrieve. You may pass
+ * kAllWindowClasses to retrieve the root window group.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowGroupOfClass( windowClass_: WindowClass ): WindowGroupRef; external name '_GetWindowGroupOfClass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{----------------------------------------------------------------------------------}
+{ ¥ÊGroup name, attributes, and level }
+{----------------------------------------------------------------------------------}
+{
+ * SetWindowGroupName()
+ *
+ * Summary:
+ * Sets the name of a window group.
+ *
+ * Discussion:
+ * The name of a window group is never displayed to the user.
+ * However, it is displayed by debugging functions such as
+ * DebugPrintWindowGroup. This can be very useful when debugging the
+ * structure of your window groups.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose name to set.
+ *
+ * inName:
+ * The name of the group.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowGroupName( inGroup: WindowGroupRef; inName: CFStringRef ): OSStatus; external name '_SetWindowGroupName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CopyWindowGroupName()
+ *
+ * Summary:
+ * Returns a copy of the name of a window group.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose name to retrieve.
+ *
+ * outName:
+ * On exit, contains the name of the group. It is the caller's
+ * responsibility to release the name.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CopyWindowGroupName( inGroup: WindowGroupRef; var outName: CFStringRef ): OSStatus; external name '_CopyWindowGroupName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowGroupAttributes()
+ *
+ * Summary:
+ * Retrieves the attributes of a window group.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose attributes to retrieve.
+ *
+ * outAttributes:
+ * On exit, the groupÕs attributes.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowGroupAttributes( inGroup: WindowGroupRef; var outAttributes: WindowGroupAttributes ): OSStatus; external name '_GetWindowGroupAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ChangeWindowGroupAttributes()
+ *
+ * Summary:
+ * Changes the attributes of a window group.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose attributes to change.
+ *
+ * setTheseAttributes:
+ * The attributes to set.
+ *
+ * clearTheseAttributes:
+ * The attributes to clear.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function ChangeWindowGroupAttributes( inGroup: WindowGroupRef; setTheseAttributes: WindowGroupAttributes; clearTheseAttributes: WindowGroupAttributes ): OSStatus; external name '_ChangeWindowGroupAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowGroupLevel()
+ *
+ * Summary:
+ * Sets the CoreGraphics window group level of windows in a group.
+ *
+ * Discussion:
+ * CoreGraphics windows (used to implement all windows in Carbon and
+ * Cocoa applications on Mac OS X) are divided into layers specified
+ * by a window level. Standard window levels are listed in
+ * <CoreGraphics/CGWindowLevel.h>. By default, a new window group
+ * has a window level of kCGNormalWindowLevel.
+ *
+ * When a window is placed into a window group, its window level is
+ * determined by the window level of its "base group". This is the
+ * containing group that is a child of the root group. For example,
+ * if group A is a child of the root group, and group B is a child
+ * of group A, and window C is in group B, then window C's base
+ * group is group A, and group A's window level determines the level
+ * of window C.
+ *
+ * SetWindowGroupLevel only allows changing the window level of
+ * groups that are children of the root group. It returns paramErr
+ * for other groups, since a group that is not a child of the root
+ * group is not a base group and changing its level has no effect.
+ *
+ *
+ * Changing the level of a group also changes the level of all
+ * windows currently contained by the group.
+ *
+ * In Mac OS X 10.4 and later, SetWindowGroupLevel will set all
+ * three window levels associated with a window group: the Active,
+ * Inactive, and Promoted levels. It will then immediately determine
+ * if the Active level needs to be promoted to a larger value, and
+ * if so, set the Promoted level to that value.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The window group whose level to change.
+ *
+ * inLevel:
+ * The new level for the windows in this group.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowGroupLevel( inGroup: WindowGroupRef; inLevel: SInt32 ): OSStatus; external name '_SetWindowGroupLevel';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowGroupLevel()
+ *
+ * Summary:
+ * Gets the CoreGraphics window group level of windows in a group.
+ *
+ * Discussion:
+ * In Mac OS X 10.4 and later, GetWindowGroupLevel will return
+ * either the Promoted window level or the Inactive window level,
+ * depending on whether the application is active or inactive.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The window group whose level to return.
+ *
+ * outLevel:
+ * On exit, contains the window level of the windows in this group.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowGroupLevel( inGroup: WindowGroupRef; var outLevel: SInt32 ): OSStatus; external name '_GetWindowGroupLevel';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * Summary:
+ * Parameters to GetWindowGroupLevelOfType and
+ * SetWindowGroupLevelOfType
+ }
+const
+{
+ * The window level that is nominally used for windows in the group
+ * when the application is active. However, if a group with a higher
+ * window level is positioned below group in the window group
+ * hierarchy, this group's active level will be promoted to match the
+ * level of the group in front of it. You can determine the actual
+ * window level in use for a group using the
+ * kWindowGroupLevelPromoted constant.
+ }
+ kWindowGroupLevelActive = 1;
+
+ {
+ * The window level that is used for windows in the group when the
+ * application is inactive.
+ }
+ kWindowGroupLevelInactive = 2;
+
+ {
+ * The window level that is actually used for windows in the group
+ * when the application is active. This level will either be the same
+ * as the Active window level, or will be a larger value to match the
+ * level of a group below this group.
+ *
+ * We do not recommend setting the Promoted window level explicitly,
+ * because the promoted level is reset by the Window Manager whenever
+ * the window group hierarchy structure changes, and therefore any
+ * changes that you may make to the promoted level can be
+ * overwritten. In general you should only use this API to set the
+ * Active and Inactive window levels.
+ }
+ kWindowGroupLevelPromoted = 3;
+
+{
+ * SetWindowGroupLevelOfType()
+ *
+ * Summary:
+ * Sets a CoreGraphics window group level of a window group.
+ *
+ * Discussion:
+ * See the SetWindowGroupLevel API for a general discussion of
+ * window levels and window groups.
+ *
+ * In Mac OS X 10.4 and later, a window group may have multiple
+ * window levels associated with it; one level for when the
+ * application is active, and another for when the application is
+ * inactive. The Window Manager automatically switches each group's
+ * level as the application becomes active or inactive. This API can
+ * be used to set each level associated with a group.
+ *
+ * This API can also be used to set the promoted window level that
+ * is actually used for windows in the group; however, we do not
+ * recommend this usage, because the promoted window level is reset
+ * by the Window Manager whenever the window group hierarchy
+ * structure changes, and therefore any changes that you may make to
+ * the promoted level can be overwritten. In general you should only
+ * use this API to set the Active and Inactive window levels.
+ *
+ *
+ * When setting the Active level of a group with the FixedLevel
+ * window group attribute, this API will automatically also set the
+ * Promoted level to the same value, and also update the Promoted
+ * level of any non-FixedLevel groups above the group being modified.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The window group whose level to change.
+ *
+ * inLevelType:
+ * The level type to change (one of kWindowGroupLevelActive,
+ * kWindowGroupLevelInactive, or kWindowGroupLevelPromoted).
+ *
+ * inLevel:
+ * The new level for the windows in this group.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowGroupLevelOfType( inGroup: WindowGroupRef; inLevelType: UInt32; inLevel: CGWindowLevel ): OSStatus; external name '_SetWindowGroupLevelOfType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * GetWindowGroupLevelOfType()
+ *
+ * Summary:
+ * Gets a CoreGraphics window level of a window group.
+ *
+ * Discussion:
+ * See the SetWindowGroupLevel API for a general discussion of
+ * window levels and window groups.
+ *
+ * In Mac OS X 10.4 and later, a window group may have multiple
+ * window levels associated with it; one level for when the
+ * application is active, and another for when the application is
+ * inactive. The Window Manager automatically switches each group's
+ * level as the application becomes active or inactive. The
+ * GetWindowGroupLevelOfType API can be used to get each level
+ * associated with a group, including the promoted window level that
+ * is actually in use for windows in the group while the application
+ * is active.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The window group whose level to retrieve.
+ *
+ * inLevelType:
+ * The level type to retrieve (one of kWindowGroupLevelActive,
+ * kWindowGroupLevelInactive, or kWindowGroupLevelPromoted).
+ *
+ * outLevel:
+ * On exit, the level for the windows in this group.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowGroupLevelOfType( inGroup: WindowGroupRef; inLevelType: UInt32; var outLevel: CGWindowLevel ): OSStatus; external name '_GetWindowGroupLevelOfType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{----------------------------------------------------------------------------------}
+{ ¥ÊGroup z-ordering }
+{----------------------------------------------------------------------------------}
+{
+ * SendWindowGroupBehind()
+ *
+ * Summary:
+ * Changes the z-order of a group, if the group does not have the
+ * kWindowGroupAttributeLayerTogether attribute set.
+ *
+ * Discussion:
+ * SendWindowGroupBehind currently requires that the group being
+ * moved and the behindGroup have the same parent group.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose z-order to change.
+ *
+ * behindGroup:
+ * The group behind which to position the specified group.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function SendWindowGroupBehind( inGroup: WindowGroupRef; behindGroup: WindowGroupRef ): OSStatus; external name '_SendWindowGroupBehind';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{----------------------------------------------------------------------------------}
+{ ¥ÊGroup containment hierarchy manipulation }
+{----------------------------------------------------------------------------------}
+{
+ * GetWindowGroup()
+ *
+ * Summary:
+ * Gets the window group that contains a window.
+ *
+ * Discussion:
+ * The refcount of the group returned by this API is not
+ * incremented, and the caller does not need to release the
+ * reference.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose containing group to retrieve.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowGroup( inWindow: WindowRef ): WindowGroupRef; external name '_GetWindowGroup';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowGroup()
+ *
+ * Summary:
+ * Sets the window group that contains a window.
+ *
+ * Discussion:
+ * The windowÕs z-order relative to windows in the current process
+ * may also be changed by this API. If the new window group is
+ * z-ordered above the windowÕs current group, the window will be
+ * placed at the end of the new group. If the new window group is
+ * z-ordered below the windowÕs current group, the window will be
+ * placed at the top of the new group. You may not place a window
+ * directly into the root group.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose group to change.
+ *
+ * inNewGroup:
+ * The new containing group.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowGroup( inWindow: WindowRef; inNewGroup: WindowGroupRef ): OSStatus; external name '_SetWindowGroup';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsWindowContainedInGroup()
+ *
+ * Summary:
+ * Indicates whether a window is contained within a group or any of
+ * its subgroups.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose containment to examine.
+ *
+ * inGroup:
+ * The group that might contain the window.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function IsWindowContainedInGroup( inWindow: WindowRef; inGroup: WindowGroupRef ): Boolean; external name '_IsWindowContainedInGroup';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowGroupParent()
+ *
+ * Summary:
+ * Gets the window group that contains a group.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose containing group to retrieve.
+ *
+ * outGroup:
+ * On exit, the containing window group of the group. The groupÕs
+ * refcount is not incremented by this API, and the caller does
+ * not need to release the reference.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowGroupParent( inGroup: WindowGroupRef ): WindowGroupRef; external name '_GetWindowGroupParent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowGroupParent()
+ *
+ * Summary:
+ * Sets the window group that contains a group.
+ *
+ * Discussion:
+ * SetWindowGroupParent currently requires that the group have no
+ * windows in it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose containing group to change.
+ *
+ * inNewGroup:
+ * The new containing group.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowGroupParent( inGroup: WindowGroupRef; inNewGroup: WindowGroupRef ): OSStatus; external name '_SetWindowGroupParent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowGroupSibling()
+ *
+ * Summary:
+ * Returns the next or previous group of a window group.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose sibling to return.
+ *
+ * inNextGroup:
+ * True to return the next sibling, false to return the previous
+ * sibling.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowGroupSibling( inGroup: WindowGroupRef; inNextGroup: Boolean ): WindowGroupRef; external name '_GetWindowGroupSibling';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowGroupOwner()
+ *
+ * Summary:
+ * Returns the window that owns a window group, or NULL if none.
+ *
+ * Discussion:
+ * A window may own one or more window groups. The windows in an
+ * owned window group will always be z-ordered above the owner
+ * window. Whenever the owner window changes z-order, the windows in
+ * the groups owned by the window will be moved also.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose owner to retrieve.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowGroupOwner( inGroup: WindowGroupRef ): WindowRef; external name '_GetWindowGroupOwner';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowGroupOwner()
+ *
+ * Summary:
+ * Sets the window that owns a window group.
+ *
+ * Discussion:
+ * The group and the window must have the same parent group.
+ * SetWindowGroupOwner currently requires that the group have no
+ * windows in it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose owner to set.
+ *
+ * inWindow:
+ * The group's new owner.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowGroupOwner( inGroup: WindowGroupRef; inWindow: WindowRef ): OSStatus; external name '_SetWindowGroupOwner';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{----------------------------------------------------------------------------------}
+{ ¥ Inspection of group contents }
+{----------------------------------------------------------------------------------}
+
+{
+ * CountWindowGroupContents()
+ *
+ * Summary:
+ * Counts the windows or groups contained in a group.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose contents to count.
+ *
+ * inOptions:
+ * Specifies how to count the groupÕs contents.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function CountWindowGroupContents( inGroup: WindowGroupRef; inOptions: WindowGroupContentOptions ): ItemCount; external name '_CountWindowGroupContents';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowGroupContents()
+ *
+ * Summary:
+ * Retrieves the windows or groups contained in a group.
+ *
+ * Discussion:
+ * The windows or groups returned by this API will be placed into
+ * the output buffer in z-order, from highest to lowest.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose contents to retrieve.
+ *
+ * inOptions:
+ * Specifies which content to retrieve.
+ *
+ * inAllowedItems:
+ * The number of items that will fit in the output buffer.
+ *
+ * outNumItems:
+ * On exit, the number of items that were returned. May be NULL.
+ *
+ * outItems:
+ * On entry, points to enough memory to hold inAllowedSize
+ * WindowRefs or WindowGroupRefs. On exit, contains *outNumItems
+ * WindowRefs or WindowGroupRefs.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowGroupContents( inGroup: WindowGroupRef; inOptions: WindowGroupContentOptions; inAllowedItems: ItemCount; outNumItems: ItemCountPtr { can be NULL }; var outItems: UnivPtr ): OSStatus; external name '_GetWindowGroupContents';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetIndexedWindow()
+ *
+ * Summary:
+ * Retrieves a specified window from a group.
+ *
+ * Discussion:
+ * GetIndexedWindow is provided as an easier way to get a particular
+ * window from a group than using GetWindowGroupContents. If you
+ * only need to retrieve, say, the last window in a group, it is
+ * easier and more efficient to use GetIndexedWindow. If you need to
+ * retrieve all the windows in a group, it is more efficient to use
+ * GetWindowGroupContents.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group containing the window to retrieve.
+ *
+ * inIndex:
+ * The index of the window. This parameter may range from 1 to
+ * CountWindowGroupContents( inGroup,
+ * kWindowGroupContentsReturnWindows | inOptions );
+ *
+ * inOptions:
+ * Indicates how to locate the specified window.
+ * kWindowGroupContentsReturnWindows is implied by this API and
+ * does not need to be explicitly specified.
+ *
+ * outWindow:
+ * On exit, the window at the specified index.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function GetIndexedWindow( inGroup: WindowGroupRef; inIndex: UInt32; inOptions: WindowGroupContentOptions; var outWindow: WindowRef ): OSStatus; external name '_GetIndexedWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowIndex()
+ *
+ * Summary:
+ * Retrieves the z-order index of a window inside a group.
+ *
+ * Discussion:
+ * The z-order index of a window is its relative position in z-order
+ * inside a group. The index ranges from 1 to the number of windows
+ * in the group.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose z-order index to retrieve.
+ *
+ * inStartGroup:
+ * The group on which to base the z-order index. This should be
+ * either the containing group of the window, or NULL. If NULL,
+ * this API returns the z-order index of the window across the
+ * entire process.
+ *
+ * inOptions:
+ * Indicates how to enumerate the specified window.
+ * kWindowGroupContentsReturnWindows is implied by this API and
+ * does not need to be explicitly specified.
+ *
+ * outIndex:
+ * On exit, contains the windowÕs z-order index.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowIndex( inWindow: WindowRef; inStartGroup: WindowGroupRef; inOptions: WindowGroupContentOptions; var outIndex: UInt32 ): OSStatus; external name '_GetWindowIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{----------------------------------------------------------------------------------}
+{ ¥ÊWindow activation }
+{----------------------------------------------------------------------------------}
+{
+ * ActiveNonFloatingWindow()
+ *
+ * Summary:
+ * Returns the window, among all windows with activation scope of
+ * kWindowActivationScopeAll, that is considered active.
+ *
+ * Discussion:
+ * The Mac OS 8.5 Window Manager introduced the
+ * FrontNonFloatingWindow API, which was designed to return the
+ * window that should be considered active by the application. With
+ * the advent of window groups, it is now possible to have a window
+ * that looks active (is highlighted, and accepts keyboard input)
+ * but to have other non-floating windows grouped above the active
+ * window. The ActiveNonFloatingWindow API returns the active window
+ * regardless of where it is positioned in the z-order. Most code
+ * that currently uses FrontNonFloatingWindow or
+ * GetFrontWindowOfClass(kDocumentWindowClass) to get the active
+ * window should use ActiveNonFloatingWindow instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function ActiveNonFloatingWindow: WindowRef; external name '_ActiveNonFloatingWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsWindowActive()
+ *
+ * Summary:
+ * Indicates whether a window is active.
+ *
+ * Discussion:
+ * The active state of a window is simply determined by whether its
+ * window frame is drawn using an active appearance. This does not
+ * indicate whether the window has keyboard focus. To get the window
+ * with keyboard focus, use GetUserFocusWindow().
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose active state to retrieve.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function IsWindowActive( inWindow: WindowRef ): Boolean; external name '_IsWindowActive';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ActivateWindow()
+ *
+ * Summary:
+ * Activates or deactivates a window.
+ *
+ * Discussion:
+ * Window activation consists of two steps: hiliting the window
+ * frame and sending an activate event to the window. ActivateWindow
+ * handles both of these steps and also updates internal Window
+ * Manager state. If you just need to hilite the window frame, you
+ * may use HiliteWindow. If you need to send an activate event, you
+ * should always use ActivateWindow rather than creating and sending
+ * the event yourself.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to activate or deactivate.
+ *
+ * inActivate:
+ * Whether to activate or deactivate the window.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function ActivateWindow( inWindow: WindowRef; inActivate: Boolean ): OSStatus; external name '_ActivateWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowActivationScope()
+ *
+ * Summary:
+ * Retrieves a windowÕs activation scope.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose activation scope to retrieve.
+ *
+ * outScope:
+ * On exit, the windowÕs activation scope.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowActivationScope( inWindow: WindowRef; var outScope: WindowActivationScope ): OSStatus; external name '_GetWindowActivationScope';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowActivationScope()
+ *
+ * Summary:
+ * Sets a windowÕs activation scope.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose activation scope to set.
+ *
+ * inScope:
+ * The new activation scope.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowActivationScope( inWindow: WindowRef; inScope: WindowActivationScope ): OSStatus; external name '_SetWindowActivationScope';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{----------------------------------------------------------------------------------}
+{ ¥ÊDebugging Utilities }
+{----------------------------------------------------------------------------------}
+{
+ * DebugPrintWindowGroup()
+ *
+ * Summary:
+ * Prints the contents of a window group to stdout.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inGroup:
+ * The group whose contents to print.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DebugPrintWindowGroup( inGroup: WindowGroupRef ); external name '_DebugPrintWindowGroup';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DebugPrintAllWindowGroups()
+ *
+ * Summary:
+ * Prints the full window group hierarchy, starting at the root
+ * group.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DebugPrintAllWindowGroups; external name '_DebugPrintAllWindowGroups';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{----------------------------------------------------------------------------------}
+{ ¥ÊThemeBrush and ThemeTextColor support }
+{----------------------------------------------------------------------------------}
+{
+ * SetThemeWindowBackground()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetThemeWindowBackground( inWindow: WindowRef; inBrush: ThemeBrush; inUpdate: Boolean ): OSStatus; external name '_SetThemeWindowBackground';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetThemeTextColorForWindow()
+ *
+ * Summary:
+ * Sets a text color which contrasts with a theme brush.
+ *
+ * Discussion:
+ * SetThemeTextColorForWindow sets a text color in the specified
+ * window's port which contrasts with the specified brush and also
+ * matches the inActive parameter. Only a subset of the theme
+ * brushes have theme text colors: currently (as of Mac OS 9 and Mac
+ * OS X 10.1), the Alert, Dialog, ModelessDialog, and Notification
+ * brushes have corresponding text colors. For any other brush,
+ * SetThemeTextColorForWindow returns themeNoAppropriateBrushErr and
+ * does not modify the text color.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose text color to change.
+ *
+ * inActive:
+ * Whether the text color should indicate an active or inactive
+ * state.
+ *
+ * inDepth:
+ * The bit depth of the window's port.
+ *
+ * inColorDev:
+ * Whether the window's port is color or black&white.
+ *
+ * Result:
+ * An operating system result code, including
+ * themeNoAppropriateBrushErr if the specified theme brush does not
+ * have a corresponding theme text color.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in AppearanceLib 1.1 and later
+ }
+function SetThemeTextColorForWindow( inWindow: WindowRef; inActive: Boolean; inDepth: SInt16; inColorDev: Boolean ): OSStatus; external name '_SetThemeTextColorForWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Background Image }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ SetWinColor is not available in Carbon.}
+{
+ * SetWinColor()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{ SetDeskCPat is not available in Carbon.}
+{
+ * SetDeskCPat()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ Routines available from Mac OS 8.5 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
+}
+{
+ * SetWindowContentColor()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function SetWindowContentColor( window: WindowRef; const (*var*) color: RGBColor ): OSStatus; external name '_SetWindowContentColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowContentColor()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function GetWindowContentColor( window: WindowRef; var color: RGBColor ): OSStatus; external name '_GetWindowContentColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Routines available from Mac OS 8.5 forward}
+{
+ * GetWindowContentPattern()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function GetWindowContentPattern( window: WindowRef; outPixPat: PixPatHandle ): OSStatus; external name '_GetWindowContentPattern';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowContentPattern()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function SetWindowContentPattern( window: WindowRef; pixPat: PixPatHandle ): OSStatus; external name '_SetWindowContentPattern';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Routines available from Mac OS 9.0 forward}
+type
+ WindowPaintProcOptions = OptionBits;
+const
+ kWindowPaintProcOptionsNone = 0;
+
+{
+ * InstallWindowContentPaintProc()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 9.0 and later
+ }
+function InstallWindowContentPaintProc( window: WindowRef; paintProc: WindowPaintUPP; options: WindowPaintProcOptions; refCon: UnivPtr { can be NULL } ): OSStatus; external name '_InstallWindowContentPaintProc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Scrolling Routines }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ ScrollWindowOptions = UInt32;
+const
+ kScrollWindowNoOptions = 0;
+ kScrollWindowInvalidate = 1 shl 0; { add the exposed area to the windowÕs update region}
+ kScrollWindowEraseToPortBackground = 1 shl 1; { erase the exposed area using the background color/pattern of the windowÕs grafport}
+
+
+{ Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
+
+{
+ * ScrollWindowRect()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function ScrollWindowRect( inWindow: WindowRef; const (*var*) inScrollRect: Rect; inHPixels: SInt16; inVPixels: SInt16; inOptions: ScrollWindowOptions; outExposedRgn: RgnHandle { can be NULL } ): OSStatus; external name '_ScrollWindowRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ScrollWindowRegion()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function ScrollWindowRegion( inWindow: WindowRef; inScrollRgn: RgnHandle; inHPixels: SInt16; inVPixels: SInt16; inOptions: ScrollWindowOptions; outExposedRgn: RgnHandle { can be NULL } ): OSStatus; external name '_ScrollWindowRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Low-Level Region & Painting Routines }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * ClipAbove()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure ClipAbove( window: WindowRef ); external name '_ClipAbove';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ SaveOld/DrawNew are not available in Carbon. Use ReshapeCustomWindow instead.}
+{
+ * SaveOld()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * DrawNew()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * PaintOne()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure PaintOne( window: WindowRef { can be NULL }; clobberedRgn: RgnHandle ); external name '_PaintOne';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * PaintBehind()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure PaintBehind( startWindow: WindowRef { can be NULL }; clobberedRgn: RgnHandle ); external name '_PaintBehind';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CalcVis()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure CalcVis( window: WindowRef ); external name '_CalcVis';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CalcVisBehind()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure CalcVisBehind( startWindow: WindowRef { can be NULL }; clobberedRgn: RgnHandle ); external name '_CalcVisBehind';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CheckUpdate()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function CheckUpdate( var theEvent: EventRecord ): Boolean; external name '_CheckUpdate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window List }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * [Mac]FindWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function FindWindow( thePoint: Point; var window: WindowRef ): WindowPartCode; external name '_FindWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+function MacFindWindow( thePoint: Point; var window: WindowRef ): WindowPartCode; external name '_FindWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * FrontWindow()
+ *
+ * Summary:
+ * Returns the frontmost visible window in the window list.
+ *
+ * Discussion:
+ * The frontmost visible window is not necessarily a document or
+ * dialog window, or even a window created by your application. For
+ * example, it may be a menu window, a Text Services Manager
+ * bottom-line input window, a help tag, or a floating window. If
+ * your code needs the frontmost document or dialog window, use the
+ * ActiveNonFloatingWindow or FrontNonFloatingWindow APIs instead of
+ * FrontWindow. For compatibility with existing applications,
+ * FrontWindow ignores all windows of class kMenuBarWindowClass and
+ * instead returns the frontmost visible window behind the menubar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * The frontmost visible window, or NULL if no windows are visible.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function FrontWindow: WindowRef; external name '_FrontWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * BringToFront()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure BringToFront( window: WindowRef ); external name '_BringToFront';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SendBehind()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SendBehind( window: WindowRef; behindWindow: WindowRef ); external name '_SendBehind';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SelectWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SelectWindow( window: WindowRef ); external name '_SelectWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ Routines available from Mac OS 8.6 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
+}
+
+{
+ * FrontNonFloatingWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function FrontNonFloatingWindow: WindowRef; external name '_FrontNonFloatingWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
+
+{
+ * GetNextWindowOfClass()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetNextWindowOfClass( inWindow: WindowRef; inWindowClass: WindowClass; mustBeVisible: Boolean ): WindowRef; external name '_GetNextWindowOfClass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetFrontWindowOfClass()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetFrontWindowOfClass( inWindowClass: WindowClass; mustBeVisible: Boolean ): WindowRef; external name '_GetFrontWindowOfClass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * FindWindowOfClass()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function FindWindowOfClass( const (*var*) where: Point; inWindowClass: WindowClass; var outWindow: WindowRef; outWindowPart: WindowPartCodePtr { can be NULL } ): OSStatus; external name '_FindWindowOfClass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * Summary:
+ * Options for the CreateStandardWindowMenu API.
+ }
+const
+{
+ * Requests the standard window menu include a Rotate Windows menu
+ * item. Available in Mac OS X 10.2.
+ }
+ kWindowMenuIncludeRotate = 1 shl 0;
+
+{
+ * CreateStandardWindowMenu()
+ *
+ * Discussion:
+ * Creates a standard Window menu for your application. You can call
+ * this to create a window menu for your application. Once you have
+ * the menu, you need to insert it in your menu bar (typically at
+ * the end of your menu list) with a call to InsertMenu. To register
+ * a window to be tracked by this menu, you either create your
+ * window with CreateNewWindow, passing the
+ * kWindowInWindowMenuAttribute, or you can use
+ * ChangeWindowAttributes after the window is created. The Toolbox
+ * takes care of acting on the standard items such as zoom and
+ * minimize, as well as bringing selected windows to the front. All
+ * you need to do is install it and register your windows and the
+ * Toolbox does the rest.
+ *
+ * You may also add your own menu items to the standard window menu.
+ * To do this, we recommend that you use the
+ * GetIndMenuItemWithCommandID API to locate one of the standard
+ * menu items in the menu which is immediately above or below the
+ * location where you wish to insert your items. Then insert your
+ * items relative to the position of the standard menu item. Do not
+ * attempt to search the menu items yourself without calling
+ * GetIndMenuItemWithCommandID; in Mac OS X 10.2,
+ * CreateStandardWindowMenu returns an initially empty menu which is
+ * populated later when the menu is displayed or when
+ * GetIndMenuItemWithCommandID is called, so you will find no items
+ * in the menu unless you first call GetIndMenuItemWithCommandID.
+ *
+ * There is a known bug in all versions of CarbonLib which causes
+ * the Zoom, Collapse, and Uncollapse menu items in the standard
+ * window menu to be non-functional for windows created by the
+ * Dialog Manager. To work around this bug, you can install your own
+ * event handlers on the dialog window for kEventWindowZoom,
+ * kEventWindowCollapse, and kEventWindowExpand, and handle the
+ * event by calling the appropriate Window Manager API.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inOptions:
+ * Requests optional behavior of the standard window menu. Mac OS
+ * X 10.2 supports the kWindowMenuIncludeRotate option; in earlier
+ * versions of Mac OS X, and in CarbonLib, you must pass zero for
+ * this parameter.
+ *
+ * outMenu:
+ * Receives a new menu reference which contains the standard
+ * window menu items and commands.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateStandardWindowMenu( inOptions: OptionBits; var outMenu: MenuRef ): OSStatus; external name '_CreateStandardWindowMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowAlternateTitle()
+ *
+ * Discussion:
+ * This API sets an alternate title for a window. The alternate
+ * title overrides what is displayed in the Window menu. If you do
+ * not set an alternate title, the normal window title is used. You
+ * would normally use this if the window title was not expressive
+ * enough to be used in the Window menu (or similar text-only
+ * situation).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to set the alternate title.
+ *
+ * inTitle:
+ * The alternate title for the window. Passing NULL for this
+ * parameter will remove any alternate title that might be present.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowAlternateTitle( inWindow: WindowRef; inTitle: CFStringRef ): OSStatus; external name '_SetWindowAlternateTitle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CopyWindowAlternateTitle()
+ *
+ * Discussion:
+ * This API gets the alternate title for a window. See the
+ * discussion of SetWindowAlternateTitle for more info.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to get the alternate title from.
+ *
+ * outTitle:
+ * Receives the alternate title for the window. If the window does
+ * not have an alternate title, NULL will be returned in outTitle.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CopyWindowAlternateTitle( inWindow: WindowRef; var outTitle: CFStringRef ): OSStatus; external name '_CopyWindowAlternateTitle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Misc Low-Level stuff }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * InitWindows()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{ The window manager port does not exist in Carbon. }
+{ We are investigating replacement technologies. }
+{
+ * GetWMgrPort()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * GetCWMgrPort()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ Routines available from Mac OS 8.5 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
+}
+{
+ * IsValidWindowPtr()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function IsValidWindowPtr( possibleWindow: WindowRef ): Boolean; external name '_IsValidWindowPtr';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+function IsValidWindowRef__NAME__IsValidWindowPtr( possibleWindow: WindowRef ): Boolean; external name '_IsValidWindowRef__NAME__IsValidWindowPtr';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ Routines available from Mac OS 8.6 forward
+ InitFloatingWindows is not available in Carbon;
+ window ordering is always active for Carbon clients
+}
+{
+ * InitFloatingWindows()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Various & Sundry Window Accessors }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * HiliteWindow()
+ *
+ * Summary:
+ * Hilites or unhilites a window's frame.
+ *
+ * Discussion:
+ * Hiliting a window's frame is not the same as activating the
+ * window. A window's hilited state determines whether the window
+ * draws its titlebar and associated widgets as if they were the
+ * frontmost window of its window group, whereas a window's active
+ * state determines whether the window really is the frontmost
+ * window of its window group. Activating or deactivating a window
+ * automatically adjusts a window's hilited state to match.
+ *
+ * In general, only very old compatibility code would ever need or
+ * want to manually modify a window's hilited state via the
+ * HiliteWindow API. Modern clients can typically avoid this API
+ * entirely.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose frame you wish to hilite/unhilite.
+ *
+ * fHilite:
+ * Whether to hilite or unhilite the window's frame.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure HiliteWindow( window: WindowRef; fHilite: Boolean ); external name '_HiliteWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWRefCon()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetWRefCon( window: WindowRef; data: SInt32 ); external name '_SetWRefCon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWRefCon()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetWRefCon( window: WindowRef ): SInt32; external name '_GetWRefCon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowPic()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetWindowPic( window: WindowRef; pic: PicHandle ); external name '_SetWindowPic';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowPic()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetWindowPic( window: WindowRef ): PicHandle; external name '_GetWindowPic';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWVariant()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetWVariant( window: WindowRef ): SInt16; external name '_GetWVariant';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Routines available from Mac OS 8.0 (Appearance 1.0) forward}
+{
+ * GetWindowFeatures()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetWindowFeatures( window: WindowRef; var outFeatures: UInt32 ): OSStatus; external name '_GetWindowFeatures';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowRegion()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetWindowRegion( window: WindowRef; inRegionCode: WindowRegionCode; ioWinRgn: RgnHandle ): OSStatus; external name '_GetWindowRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowStructureWidths()
+ *
+ * Summary:
+ * Returns the width of the structure region on each edge of a
+ * window.
+ *
+ * Discussion:
+ * The structure widths are the difference between the content
+ * region and the structure region on each edge of a window. For
+ * example, if the left edge of the structure region is at x=100,
+ * and the left edge of the content region is at x=110, then the
+ * structure width for the left side of the window is 10 pixels.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window for which to get structure widths.
+ *
+ * outRect:
+ * On exit, contains the width of the structure region on each
+ * side of the window; the left field of the rectangle contains
+ * the structure width on the left side of the window, the top
+ * field contains the width on the top side, and so on.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function GetWindowStructureWidths( inWindow: WindowRef; var outRect: Rect ): OSStatus; external name '_GetWindowStructureWidths';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HIWindowChangeFeatures()
+ *
+ * Summary:
+ * Changes the window features on the fly.
+ *
+ * Discussion:
+ * HIWindowChangeFeatures changes the features of a window. This
+ * should only be used by custom window definitions or window frame
+ * views.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to modify.
+ *
+ * inSetThese:
+ * The feature bits to set.
+ *
+ * inClearThese:
+ * The feature bits to clear.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIWindowChangeFeatures( inWindow: WindowRef; inSetThese: UInt64; inClearThese: UInt64 ): OSStatus; external name '_HIWindowChangeFeatures';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Update Events }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ These aren't present in Carbon. Please use the InvalWindowRect, etc. routines
+ below instead.
+}
+{
+ * InvalRect()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * InvalRgn()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * ValidRect()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * ValidRgn()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * BeginUpdate()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure BeginUpdate( window: WindowRef ); external name '_BeginUpdate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * EndUpdate()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure EndUpdate( window: WindowRef ); external name '_EndUpdate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ Routines available from Mac OS 8.5 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
+}
+
+{
+ * InvalWindowRgn()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function InvalWindowRgn( window: WindowRef; region: RgnHandle ): OSStatus; external name '_InvalWindowRgn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * InvalWindowRect()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function InvalWindowRect( window: WindowRef; const (*var*) bounds: Rect ): OSStatus; external name '_InvalWindowRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ValidWindowRgn()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function ValidWindowRgn( window: WindowRef; region: RgnHandle ): OSStatus; external name '_ValidWindowRgn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ValidWindowRect()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function ValidWindowRect( window: WindowRef; const (*var*) bounds: Rect ): OSStatus; external name '_ValidWindowRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ DrawGrowIcon }
+{ DrawGrowIcon is deprecated from Mac OS 8.0 forward. Theme-savvy window defprocs }
+{ include the grow box in the window frame. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * DrawGrowIcon()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DrawGrowIcon( window: WindowRef ); external name '_DrawGrowIcon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Titles }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * SetWTitle()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetWTitle( window: WindowRef; const (*var*) title: Str255 ); external name '_SetWTitle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWTitle()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure GetWTitle( window: WindowRef; var title: Str255 ); external name '_GetWTitle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowTitleWithCFString()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowTitleWithCFString( inWindow: WindowRef; inString: CFStringRef ): OSStatus; external name '_SetWindowTitleWithCFString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CopyWindowTitleAsCFString()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CopyWindowTitleAsCFString( inWindow: WindowRef; var outString: CFStringRef ): OSStatus; external name '_CopyWindowTitleAsCFString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Proxies }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * SetWindowProxyFSSpec()
+ *
+ * Summary:
+ * Set the proxy icon for a window using an FSSpec to an existing
+ * file system object (volume, folder, or file).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose proxy icon to set.
+ *
+ * inFile:
+ * The file system object that the window represents. The windowÕs
+ * proxy icon is determined by asking Icon Services for the icon
+ * of this object.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function SetWindowProxyFSSpec( window: WindowRef; const (*var*) inFile: FSSpec ): OSStatus; external name '_SetWindowProxyFSSpec';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowProxyFSSpec()
+ *
+ * Summary:
+ * Returns the FSSpec used to determine the proxy icon for a window.
+ *
+ * Discussion:
+ * This API will return noErr and a valid FSSpec if the windowÕs
+ * proxy icon has been specified using the SetWindowProxyFSSpec or
+ * SetWindowProxyAlias APIs. If the window has no proxy icon, or if
+ * the icon was specified with another SetWindowProxy API, then an
+ * error will be returned.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose proxy icon FSSpec to return.
+ *
+ * outFile:
+ * On exit, contains the windowÕs proxy icon FSSpec.
+ *
+ * Result:
+ * noErr if the windowÕs proxy icon FSSpec has been returned;
+ * errWindowDoesNotHaveProxy if the window does not have a proxy
+ * icon, or if the proxy icon was specified by IconRef or
+ * type/creator rather than by FSSpec or alias. Other operating
+ * system error codes may also be returned.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function GetWindowProxyFSSpec( window: WindowRef; var outFile: FSSpec ): OSStatus; external name '_GetWindowProxyFSSpec';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HIWindowSetProxyFSRef()
+ *
+ * Summary:
+ * Set the proxy icon for a window using an FSRef to an existing
+ * file system object (volume, folder, or file).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose proxy icon to set.
+ *
+ * inRef:
+ * The file system object that the window represents. The window's
+ * proxy icon is determined by asking Icon Services for the icon
+ * of this object.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIWindowSetProxyFSRef( window: WindowRef; const (*var*) inRef: FSRef ): OSStatus; external name '_HIWindowSetProxyFSRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIWindowGetProxyFSRef()
+ *
+ * Summary:
+ * Returns the FSRef used to determine the proxy icon for a window.
+ *
+ * Discussion:
+ * This API will return noErr and a valid FSRef if the window's
+ * proxy icon has been specified using the FSRef, FSSpec or alias
+ * SetWindowProxy APIs. If the window has no proxy icon, or if the
+ * icon was specified with SetWindowProxyCreatorAndType or
+ * SetWindowProxyIcon, then an error will be returned.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window containing the proxy icon to return.
+ *
+ * outRef:
+ * On exit, contains the FSRef to the window's proxy icon.
+ *
+ * Result:
+ * noErr if the window's proxy icon FSRef has been returned;
+ * errWindowDoesNotHaveProxy if the window does not have a proxy
+ * icon, or if the proxy icon was specified by
+ * SetWindowProxyCreatorAndType or SetWindowProxyIcon. Other
+ * operating system error codes may also be returned.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIWindowGetProxyFSRef( window: WindowRef; var outRef: FSRef ): OSStatus; external name '_HIWindowGetProxyFSRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * SetWindowProxyAlias()
+ *
+ * Summary:
+ * Sets the proxy icon for a window using an AliasHandle to an
+ * existing file system object (volume, folder, or file).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose proxy icon to set.
+ *
+ * inAlias:
+ * The file system object that the window represents. The windowÕs
+ * proxy icon is determined by asking Icon Services for the icon
+ * of this object. The Window Manager copies the alias data; the
+ * caller may dispose of the alias after SetWindowProxyAlias
+ * returns.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function SetWindowProxyAlias( inWindow: WindowRef; inAlias: AliasHandle ): OSStatus; external name '_SetWindowProxyAlias';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowProxyAlias()
+ *
+ * Summary:
+ * Returns the alias used to determine the proxy icon for a window.
+ *
+ * Discussion:
+ * This API will return noErr and a valid alias if the windowÕs
+ * proxy icon has been specified using the SetWindowProxyFSSpec or
+ * SetWindowProxyAlias APIs. If the window has no proxy icon, or if
+ * the icon was specified with another SetWindowProxy API, then an
+ * error will be returned.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose proxy icon alias to return.
+ *
+ * alias:
+ * On exit, contains the windowÕs proxy icon alias.
+ *
+ * Result:
+ * noErr if the windowÕs proxy icon alias has been returned;
+ * errWindowDoesNotHaveProxy if the window does not have a proxy
+ * icon, or if the proxy icon was specified by IconRef or
+ * type/creator rather than by FSSpec or alias. Other operating
+ * system error codes may also be returned.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function GetWindowProxyAlias( window: WindowRef; var alias: AliasHandle ): OSStatus; external name '_GetWindowProxyAlias';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowProxyCreatorAndType()
+ *
+ * Summary:
+ * Sets the proxy icon for a window using a file type and creator.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose proxy icon to set.
+ *
+ * fileCreator:
+ * The creator code for the file system object that the window
+ * represents. The windowÕs proxy icon is determined by asking
+ * Icon Services for the icon corresponding to the specified
+ * creator code and file type, on the specified volume.
+ *
+ * fileType:
+ * The file type for the file system object that the window
+ * represents.
+ *
+ * vRefNum:
+ * The volume reference number for the volume containing the file
+ * system object that the window represents. You may pass
+ * kOnSystemDisk for this parameter if you don't know which volume
+ * will hold the file system object.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function SetWindowProxyCreatorAndType( window: WindowRef; fileCreator: OSType; fileType: OSType; vRefNum: SInt16 ): OSStatus; external name '_SetWindowProxyCreatorAndType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowProxyIcon()
+ *
+ * Summary:
+ * Returns the proxy icon of a window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose proxy icon to return.
+ *
+ * outIcon:
+ * On exit, contains the windowÕs proxy icon.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function GetWindowProxyIcon( window: WindowRef; var outIcon: IconRef ): OSStatus; external name '_GetWindowProxyIcon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowProxyIcon()
+ *
+ * Summary:
+ * Sets a windowÕs proxy icon.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose proxy icon to set.
+ *
+ * icon:
+ * The proxy icon. The Window Manager retains the IconRef; the
+ * caller may release the IconRef after SetWindowProxyIcon returns.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function SetWindowProxyIcon( window: WindowRef; icon: IconRef ): OSStatus; external name '_SetWindowProxyIcon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RemoveWindowProxy()
+ *
+ * Summary:
+ * Removes a windowÕs proxy icon.
+ *
+ * Discussion:
+ * When removing the proxy icon, the Window Manager also releases
+ * the alias or IconRef, if any, that was used to specify the proxy
+ * icon.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose proxy icon to remove.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function RemoveWindowProxy( window: WindowRef ): OSStatus; external name '_RemoveWindowProxy';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * BeginWindowProxyDrag()
+ *
+ * Summary:
+ * Creates a new drag reference that can be used to drag a windowÕs
+ * proxy icon.
+ *
+ * Discussion:
+ * This API is used by applications that need to add their own drag
+ * flavors to the drag reference used for a proxy icon drag. Such an
+ * application would call BeginWindowProxyDrag to create the drag
+ * reference, add its own flavors, call
+ * TrackWindowProxyFromExistingDrag to track the proxy icon drag,
+ * and then EndWindowProxyDrag to release the drag
+ * reference.
+ *
+ * An application which does not need to add its own drag flavors to
+ * the drag reference can simply call TrackWindowProxyDrag.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose proxy icon to drag.
+ *
+ * outNewDrag:
+ * On exit, contains the drag reference for the proxy icon.
+ *
+ * outDragOutlineRgn:
+ * On entry, should be a valid RgnHandle; on exit, the region has
+ * been updated with an outline of the proxy icon drag image. This
+ * region should be passed to TrackWindowProxyFromExistingDrag;
+ * the application may modify it first.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function BeginWindowProxyDrag( window: WindowRef; var outNewDrag: DragReference; outDragOutlineRgn: RgnHandle ): OSStatus; external name '_BeginWindowProxyDrag';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * EndWindowProxyDrag()
+ *
+ * Summary:
+ * Releases a drag reference created by BeginWindowProxyDrag.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose proxy icon drag reference to release.
+ *
+ * theDrag:
+ * The drag reference to release.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function EndWindowProxyDrag( window: WindowRef; theDrag: DragReference ): OSStatus; external name '_EndWindowProxyDrag';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TrackWindowProxyFromExistingDrag()
+ *
+ * Summary:
+ * Tracks the drag of a window proxy icon.
+ *
+ * Discussion:
+ * This API is used by applications that need to add their own drag
+ * flavors to the drag reference used for a proxy icon drag. Such an
+ * application would call BeginWindowProxyDrag to create the drag
+ * reference, add its own flavors, call
+ * TrackWindowProxyFromExistingDrag to track the proxy icon drag,
+ * and then EndWindowProxyDrag to release the drag
+ * reference.
+ *
+ * An application which does not need to add its own drag flavors to
+ * the drag reference can simply call TrackWindowProxyDrag.
+ *
+ * A proxy icon may only be dragged if the window represented by the
+ * proxy icon is not modifed (as indicated by the IsWindowModified
+ * API). This restriction is imposed because a proxy icon is a
+ * representation of a physical file system object, and dragging the
+ * proxy icon may result in the Finder making a copy of the file
+ * system object. If the window is modified, then it contains user
+ * data that has not yet been saved to disk; making a copy of the
+ * file system object would result in a stale copy that did not
+ * contain the userÕs current data.
+ *
+ * By default, all newly created windows are considered to be dirty.
+ * The application must call SetWindowModified( window, false )
+ * before the proxy icon will be draggable.
+ *
+ * In Mac OS X 10.3 and later, the proxy icon is also draggable in
+ * dirty windows if the proxy icon was provided using the
+ * SetWindowProxyIcon or SetWindowProxyCreatorAndType APIs. Dragging
+ * is allowed in this case because the window does not represent an
+ * actual file system object, and therefore there is no risk of user
+ * data loss.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose proxy icon to drag.
+ *
+ * startPt:
+ * The point in global coordinates where the drag originated. This
+ * is generally the location of the mouse click in the proxy icon.
+ *
+ * drag:
+ * The proxy icon drag reference.
+ *
+ * inDragOutlineRgn:
+ * The outline of the proxy icon drag image, as returned by
+ * BeginWindowProxyDrag.
+ *
+ * Result:
+ * errUserWantsToDragWindow if the userÕs mouse movements indicated
+ * that the user actually wants to drag the window instead of the
+ * proxy icon (in this case the application should call DragWindow);
+ * windowWrongStateErr if the window was modified and therefore the
+ * proxy icon could not be dragged; noErr if the drag succeeded;
+ * userCanceledErr if the user canceled the drag. Other operating
+ * system result codes may also be returned.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function TrackWindowProxyFromExistingDrag( window: WindowRef; startPt: Point; drag: DragReference; inDragOutlineRgn: RgnHandle ): OSStatus; external name '_TrackWindowProxyFromExistingDrag';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TrackWindowProxyDrag()
+ *
+ * Summary:
+ * Tracks the drag of a window proxy icon.
+ *
+ * Discussion:
+ * A proxy icon may only be dragged if the window represented by the
+ * proxy icon is not modifed (as indicated by the IsWindowModified
+ * API). This restriction is imposed because a proxy icon is a
+ * representation of a physical file system object, and dragging the
+ * proxy icon may result in the Finder making a copy of the file
+ * system object. If the window is modified, then it contains user
+ * data that has not yet been saved to disk; making a copy of the
+ * file system object would result in a stale copy that did not
+ * contain the userÕs current data.
+ *
+ * By default, all newly created windows are considered to be
+ * modified. The application must call SetWindowModified( window,
+ * false ) before the proxy icon will be draggable.
+ *
+ * In Mac OS X 10.3 and later, the proxy icon is also draggable in
+ * dirty windows if the proxy icon was provided using the
+ * SetWindowProxyIcon or SetWindowProxyCreatorAndType APIs. Dragging
+ * is allowed in this case because the window does not represent an
+ * actual file system object, and therefore there is no risk of user
+ * data loss.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose proxy icon to drag.
+ *
+ * startPt:
+ * The point in global coordinates where the drag originated. This
+ * is generally the location of the mouse click in the proxy icon.
+ *
+ * Result:
+ * errUserWantsToDragWindow if the userÕs mouse movements indicated
+ * that the user actually wants to drag the window instead of the
+ * proxy icon (in this case the application should call DragWindow);
+ * windowWrongStateErr if the window was modified and therefore the
+ * proxy icon could not be dragged; noErr if the drag succeeded;
+ * userCanceledErr if the user canceled the drag. Other operating
+ * system result codes may also be returned.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function TrackWindowProxyDrag( window: WindowRef; startPt: Point ): OSStatus; external name '_TrackWindowProxyDrag';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsWindowModified()
+ *
+ * Summary:
+ * Returns whether the window is considered to have unsaved content.
+ *
+ * Discussion:
+ * By default, all newly created windows are considered to be
+ * modified. The application must call SetWindowModified( window,
+ * false ) to mark the window as unmodified. Until the window is
+ * marked as unmodified, the proxy icon will not be draggable.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose modified state to return.
+ *
+ * Result:
+ * true if the window has unsaved changes, or false if not.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function IsWindowModified( window: WindowRef ): Boolean; external name '_IsWindowModified';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowModified()
+ *
+ * Summary:
+ * Sets whether the window is considered to have unsaved content.
+ *
+ * Discussion:
+ * By default, all newly created windows are considered to be
+ * modified. The application must call SetWindowModified( window,
+ * false ) to mark the window as unmodified. Until the window is
+ * marked as unmodified, the proxy icon will not be draggable.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose modified state to return.
+ *
+ * modified:
+ * Whether the window has unsaved changes.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function SetWindowModified( window: WindowRef; modified: Boolean ): OSStatus; external name '_SetWindowModified';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsWindowPathSelectClick()
+ *
+ * Summary:
+ * Indicates whether an EventRecord describing a click on a windowÕs
+ * title should cause a path selection menu to be displayed.
+ *
+ * Discussion:
+ * Windows that have a proxy icon provided using an FSSpec or alias
+ * can support a path selection menu, which displays the file system
+ * path to the object, one menu item per directory. Making a
+ * selection from this item will automatically open the
+ * corresponding object in the Finder.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window on which the click occurred.
+ *
+ * event:
+ * The event. IsWindowPathSelectClick will only return true for
+ * mouseDown events.
+ *
+ * Result:
+ * true if the click should cause a path selection menu to be
+ * displayed, or false if not. If this API returns true, the
+ * application should call the WindowPathSelect API.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function IsWindowPathSelectClick( window: WindowRef; const (*var*) event: EventRecord ): Boolean; external name '_IsWindowPathSelectClick';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsWindowPathSelectEvent()
+ *
+ * Summary:
+ * Indicates whether a Carbon event describing a click on a windowÕs
+ * title should cause a path selection menu to be displayed.
+ *
+ * Discussion:
+ * Windows that have a proxy icon provided using an FSSpec or alias
+ * can support a path selection menu, which displays the file system
+ * path to the object, one menu item per directory. Making a
+ * selection from this item will automatically open the
+ * corresponding object in the Finder.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window on which the click occurred.
+ *
+ * inEvent:
+ * The event. In CarbonLib and in Mac OS X 10.2 and earlier,
+ * IsWindowPathSelectEvent only returned true for
+ * kEventClassMouse/ kEventMouseDown events. In Mac OS X 10.3 and
+ * later, IsWindowPathSelectEvent returns true for any event that
+ * has suitable kEventParamMouseLocation and
+ * kEventParamKeyModifiers parameters.
+ *
+ * Result:
+ * true if the click should cause a path selection menu to be
+ * displayed, or false if not. If this API returns true, the
+ * application should call the WindowPathSelect API.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function IsWindowPathSelectEvent( window: WindowRef; inEvent: EventRef ): Boolean; external name '_IsWindowPathSelectEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * WindowPathSelect()
+ *
+ * Summary:
+ * Displays a path selection menu for a window that has a proxy icon.
+ *
+ * Discussion:
+ * If the application passes NULL for the menu parameter, and the
+ * user selects an item from the path selection menu, the Window
+ * Manager will automatically request the Finder to display that
+ * item, and in CarbonLib 1.3.1 and later and Mac OS X, will also
+ * make the Finder be the active application.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window for which to display the path selection menu.
+ *
+ * menu:
+ * The menu to display. If you pass NULL, the Window Manager
+ * automatically creates a suitable menu based on the windowÕs
+ * proxy icon.
+ *
+ * outMenuResult:
+ * On exit, the menu ID and menu item index of the selected item;
+ * the menu ID is in the high 16 bits of the result, and the menu
+ * item index is in the low 16 bits.
+ *
+ * Result:
+ * noErr if the user selected an item from the menu; userCanceledErr
+ * if the user closed the menu without making a selection. Other
+ * operating system result codes may be returned.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function WindowPathSelect( window: WindowRef; menu: MenuRef { can be NULL }; var outMenuResult: SInt32 ): OSStatus; external name '_WindowPathSelect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ HiliteWindowFrameForDrag }
+{ If you call ShowDragHilite and HideDragHilite, you donÕt need to use this routine. }
+{ If you implement custom drag hiliting, you should call HiliteWindowFrameForDrag }
+{ when the drag is tracking inside a window with drag-hilited content. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Routines available from Mac OS 8.5 forward}
+
+{
+ * HiliteWindowFrameForDrag()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function HiliteWindowFrameForDrag( window: WindowRef; hilited: Boolean ): OSStatus; external name '_HiliteWindowFrameForDrag';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Transitions }
+{ TransitionWindow displays a window with accompanying animation and sound. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * WindowTransitionEffect
+ *
+ * Summary:
+ * Visual effects that are provided by TransitionWindow
+ }
+type
+ WindowTransitionEffect = UInt32;
+const
+{
+ * Finder-like zoom rectangles. Use with TransitionWindow and Show or
+ * Hide transition actions
+ }
+ kWindowZoomTransitionEffect = 1;
+
+ {
+ * Zoom in/out from parent. Use with TransitionWindowAndParent and
+ * Show or Hide transition actions. Available in Mac OS X, and in
+ * CarbonLib 1.5 and later.
+ }
+ kWindowSheetTransitionEffect = 2;
+
+ {
+ * Slide the window into its new position. Use with TransitionWindow
+ * and Move or Resize transition actions. Available in Mac OS X, and
+ * in CarbonLib 1.5 and later.
+ }
+ kWindowSlideTransitionEffect = 3;
+
+ {
+ * Fade the window into or out of visibility. Use with the Show or
+ * Hide transition actions. Available in Mac OS X 10.3 and later.
+ }
+ kWindowFadeTransitionEffect = 4;
+
+ {
+ * Use the Genie effect that the Dock uses to minimize or maximize a
+ * window to show or hide the window. Use with the Show or Hide
+ * transition actions. Available in Mac OS X 10.3 and later.
+ }
+ kWindowGenieTransitionEffect = 5;
+
+
+{
+ * WindowTransitionAction
+ *
+ * Summary:
+ * Modifications to window state that are provided by
+ * TransitionWindow
+ }
+type
+ WindowTransitionAction = UInt32;
+const
+{
+ * Shows the window. Use with the Zoom, Sheet, Fade, or Genie
+ * transition effects. For the Zoom, Sheet, and Genie effects, the
+ * inRect parameter is the global coordinates from which to start the
+ * animation; inRect may be NULL for the Zoom and Sheet effects, and
+ * in that case, the animation begins at the center of the window.
+ * The Genie effect requires a non-NULL inRect parameter. The Fade
+ * effect does not use the inRect parameter.
+ }
+ kWindowShowTransitionAction = 1;
+
+ {
+ * Hides the window. Use with the Zoom, Sheet, Fade, or Genie
+ * transition effects. For the Zoom, Sheet, and Genie effects, the
+ * inRect parameter is the global coordinates at which to end the
+ * animation; inRect may be NULL for the Zoom and Sheet effects, and
+ * in that case, the animation ends at the center of the window. The
+ * Genie effect requires a non-NULL inRect parameter. The Fade effect
+ * does not use the inRect parameter.
+ }
+ kWindowHideTransitionAction = 2;
+
+ {
+ * Moves the window. Use with the Slide transition effect. The inRect
+ * parameter is the global coordinates of the window's new structure
+ * bounds; inRect must be non-NULL. Available in Mac OS X, and in
+ * CarbonLib 1.5 and later.
+ }
+ kWindowMoveTransitionAction = 3;
+
+ {
+ * Resizes the window. Use with the Slide transition effect. The
+ * inRect parameter is the global coordinates of the window's new
+ * structure bounds; inRect must be non-NULL. Available in Mac OS X,
+ * and in CarbonLib 1.5 and later.
+ }
+ kWindowResizeTransitionAction = 4;
+
+{
+ * TransitionWindow()
+ *
+ * Summary:
+ * Shows, hides, moves, or resizes a window with appropriate
+ * animation and sound.
+ *
+ * Discussion:
+ * In Mac OS X 10.3 and later, this API sends
+ * kEventWindowTransitionStarted and kEventWindowTransitionCompleted
+ * Carbon events to the transitioning window at the start and end of
+ * the transition.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window on which to act.
+ *
+ * inEffect:
+ * The type of visual effect to use. TransitionWindow supports the
+ * Zoom and Slide transition effects. The Slide effect is
+ * supported on Mac OS X and in CarbonLib 1.5 and later.
+ *
+ * inAction:
+ * The action to take on the window. TransitionWindow supports the
+ * Show, Hide, Move, and Resize actions. The Move and Resize
+ * actions are supported on Mac OS X and in CarbonLib 1.5 and
+ * later.
+ *
+ * inRect:
+ * A screen rect in global coordinates. The interpretation of the
+ * rect is dependent on the transition action; see the
+ * documentation for each action for details. May be NULL for some
+ * transition actions.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function TransitionWindow( inWindow: WindowRef; inEffect: WindowTransitionEffect; inAction: WindowTransitionAction; {const} inRect: RectPtr { can be NULL } ): OSStatus; external name '_TransitionWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TransitionWindowAndParent()
+ *
+ * Summary:
+ * Shows or hides a window, potentially also moving a second window,
+ * with appropriate animation and sound.
+ *
+ * Discussion:
+ * In Mac OS X 10.3 and later, this API sends
+ * kEventWindowTransitionStarted and kEventWindowTransitionCompleted
+ * Carbon events to the transitioning window at the start and end of
+ * the transition.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window on which to act.
+ *
+ * inParentWindow:
+ * The window to which the primary window is related.
+ *
+ * inEffect:
+ * The type of visual effect to use. TransitionWindowAndParent
+ * supports the Sheet transition effect.
+ *
+ * inAction:
+ * The action to take on the window. TransitionWindowAndParent
+ * supports the Show and Hide actions.
+ *
+ * inRect:
+ * A screen rect in global coordinates. The interpretation of the
+ * rect is dependent on the transition action; see the
+ * documentation for each action for details. May be NULL for some
+ * transition actions.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function TransitionWindowAndParent( inWindow: WindowRef; inParentWindow: WindowRef; inEffect: WindowTransitionEffect; inAction: WindowTransitionAction; {const} inRect: RectPtr { can be NULL } ): OSStatus; external name '_TransitionWindowAndParent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TransitionWindowOptions
+ *
+ * Summary:
+ * Extensible parameter block for the TransitionWindowWithOptions
+ * API.
+ }
+type
+ TransitionWindowOptions = record
+{
+ * The structure version. You must put 0 in this field.
+ }
+ version: UInt32;
+
+ {
+ * The duration of the fade, in seconds. For use with the Sheet,
+ * Slide, Fade, and Genie transition effects; ignored for other
+ * effects. You may pass 0 to use the default duration. The effect is
+ * not guaranteed to last precisely this long, but should be a close
+ * approximation.
+ }
+ duration: EventTime;
+
+ {
+ * For use with kWindowSheetTransitionEffect. This is the parent
+ * window of the sheet.
+ }
+ window: WindowRef;
+
+ {
+ * This value will be sent as the kEventParamUserData parameter for
+ * the kEventWindowTransitionStarted and
+ * kEventWindowTransitionCompleted events.
+ }
+ userData: UnivPtr;
+ end;
+ TransitionWindowOptionsPtr = ^TransitionWindowOptions;
+{
+ * TransitionWindowWithOptions()
+ *
+ * Summary:
+ * Transitions a window from one state to another with appropriate
+ * animation and sound.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window that should be transitioned.
+ *
+ * inEffect:
+ * The type of visual effect to use.
+ *
+ * inAction:
+ * The action to take on the window.
+ *
+ * inBounds:
+ * A screen rect in global coordinates. The interpretation of the
+ * rect is dependent on the transition action; see the
+ * documentation for each action for details. May be NULL for some
+ * transition actions.
+ *
+ * inAsync:
+ * Whether the transition should run synchronously or
+ * asynchronously. If inAsync is true, TransitionWindow will
+ * return immediately, and the transition will run using an event
+ * loop timer. You must run your event loop for the transition to
+ * occur. If inAsync is false, TransitionWindow will block until
+ * the transition is completed. In either case, the
+ * kEventWindowTransitionStarted and
+ * kEventWindowTransitionCompleted Carbon events will be sent to
+ * the transitioning window at the start and end of the transition.
+ *
+ * inOptions:
+ * Extra options that are required for some transitions. This
+ * parameter may be NULL if the specific transition effect does
+ * not require extra information.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TransitionWindowWithOptions( inWindow: WindowRef; inEffect: WindowTransitionEffect; inAction: WindowTransitionAction; {const} inBounds: HIRectPtr { can be NULL }; inAsync: Boolean; inOptions: TransitionWindowOptionsPtr { can be NULL } ): OSStatus; external name '_TransitionWindowWithOptions';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Positioning }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * [Mac]MoveWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure MoveWindow( window: WindowRef; hGlobal: SInt16; vGlobal: SInt16; front: Boolean ); external name '_MoveWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+procedure MacMoveWindow( window: WindowRef; hGlobal: SInt16; vGlobal: SInt16; front: Boolean ); external name '_MoveWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SizeWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SizeWindow( window: WindowRef; w: SInt16; h: SInt16; fUpdate: Boolean ); external name '_SizeWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Note: bBox can only be NULL when linking to CarbonLib 1.0 forward }
+{
+ * GrowWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GrowWindow( window: WindowRef; startPt: Point; {const} bBox: RectPtr { can be NULL } ): SInt32; external name '_GrowWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DragWindow()
+ *
+ * Summary:
+ * Allows the user to drag a window to a different position.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window to drag.
+ *
+ * startPt:
+ * The point in global coordinates where the mouse was clicked on
+ * the window.
+ *
+ * boundsRect:
+ * A rect in global coordinates outside of which the window cannot
+ * move. May be NULL in CarbonLib and Mac OS X, to indicate that
+ * there are no restrictions on window movement. This parameter is
+ * ignored by CarbonLib and Mac OS X 10.0 through 10.2; it is
+ * obeyed in Mac OS X 10.3 and later.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DragWindow( window: WindowRef; startPt: Point; {const} boundsRect: RectPtr { can be NULL } ); external name '_DragWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ZoomWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure ZoomWindow( window: WindowRef; partCode: WindowPartCode; front: Boolean ); external name '_ZoomWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Collapsing/Expanding }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Routines available from Mac OS 8.0 (Appearance 1.0) forward}
+{
+ * IsWindowCollapsable()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function IsWindowCollapsable( window: WindowRef ): Boolean; external name '_IsWindowCollapsable';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsWindowCollapsed()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function IsWindowCollapsed( window: WindowRef ): Boolean; external name '_IsWindowCollapsed';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CollapseWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function CollapseWindow( window: WindowRef; collapse: Boolean ): OSStatus; external name '_CollapseWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CollapseAllWindows()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function CollapseAllWindows( collapse: Boolean ): OSStatus; external name '_CollapseAllWindows';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Routines available on Mac OS X}
+
+{
+ * CreateQDContextForCollapsedWindowDockTile()
+ *
+ * Discussion:
+ * Creates and returns a CGrafPtr for a collapsed window's tile in
+ * the dock. You can use this port to draw into your window's dock
+ * tile with Quickdraw. You **MUST** call
+ * ReleaseQDContextForCollapsedWindowDockTile and NOT DisposePort
+ * when using this API, as it maintains more state than just the
+ * port. If you call DisposePort, you may leak system resources.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to create the dock tile port for. If this window is
+ * not collapsed, an error is returned.
+ *
+ * outContext:
+ * The Quickdraw port for you to use to draw into. If you wish to
+ * use CoreGraphics (Quartz) drawing, call CreateCGContextForPort
+ * with this port to obtain a CGContext.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateQDContextForCollapsedWindowDockTile( inWindow: WindowRef; var outContext: CGrafPtr ): OSStatus; external name '_CreateQDContextForCollapsedWindowDockTile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ReleaseQDContextForCollapsedWindowDockTile()
+ *
+ * Discussion:
+ * Releases a port and other state created by the
+ * CreateQDContextForCollapsedWindowDockTile API. You MUST call this
+ * instead of DisposePort directly, or you may leak system resources.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window you created the port for. If this window is not
+ * collapsed, an error is returned.
+ *
+ * inContext:
+ * The Quickdraw context to dispose.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function ReleaseQDContextForCollapsedWindowDockTile( inWindow: WindowRef; inContext: CGrafPtr ): OSStatus; external name '_ReleaseQDContextForCollapsedWindowDockTile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * UpdateCollapsedWindowDockTile()
+ *
+ * Discussion:
+ * Automatically updates the image of a particular window in the
+ * dock to the current contents of the window. Use this for periodic
+ * updates, etc. Do not use this for animation purposes, if you want
+ * animation, use the above create/release drawing context APIs.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to update the dock tile for. If this window is not
+ * collapsed, an error is returned.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function UpdateCollapsedWindowDockTile( inWindow: WindowRef ): OSStatus; external name '_UpdateCollapsedWindowDockTile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowDockTileMenu()
+ *
+ * Summary:
+ * Sets the menu that is displayed by a window's dock tile.
+ *
+ * Discussion:
+ * When a window's dock tile menu is right-clicked or
+ * control-clicked, the Dock will always automatically display a
+ * menu containing a Close menu item that closes the window. If the
+ * application wants to add other additional menu items, it can use
+ * the SetWindowDockTileMenu API to provide those items. The items
+ * in the specified menu will be combined with the standard items
+ * provided by the Dock.
+ *
+ * Before the menu is actually displayed, it will receive
+ * kEventMenuPopulate, kEventMenuOpening, and kEventMenuEnableItems
+ * Carbon events, so any event handlers for these events may update
+ * the menu appropriately for the current state of the
+ * application.
+ *
+ * The application should set a command ID for each menu item in the
+ * dock tile menu, and when that item is chosen, a
+ * kEventCommandProcess Carbon event containing the item's command
+ * ID will be sent to the window's event target (and from there to
+ * the application, if the window does not handle the
+ * event).
+ *
+ * This API increments the refcount of the specified menu.
+ *
+ * The toolbox provides a default handler for the
+ * kEventWindowGetDockTileMenu event that returns the menu specified
+ * by the SetWindowDockTileMenu API.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window for which to set the dock tile menu.
+ *
+ * inMenu:
+ * The menu to display, or NULL to remove the current dock tile
+ * menu.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowDockTileMenu( inWindow: WindowRef; inMenu: MenuRef { can be NULL } ): OSStatus; external name '_SetWindowDockTileMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * GetWindowDockTileMenu()
+ *
+ * Summary:
+ * Returns the menu that is displayed by a window's dock tile.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * The application's dock tile menu, or NULL if none.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowDockTileMenu( inWindow: WindowRef ): MenuRef; external name '_GetWindowDockTileMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ Routines available from Mac OS 8.5 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
+}
+
+{
+ * GetWindowBounds()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function GetWindowBounds( window: WindowRef; regionCode: WindowRegionCode; var globalBounds: Rect ): OSStatus; external name '_GetWindowBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowResizeLimits()
+ *
+ * Summary:
+ * Sets the minimum and maximum content sizes for a window.
+ *
+ * Discussion:
+ * The minimum and maximum sizes are obeyed by ResizeWindow and
+ * GrowWindow. The default Carbon event handler installed for all
+ * windows will return these sizes in response to
+ * kEventWindowGetMinimumSize and kEventWindowGetMaximumSize events.
+ * When a window is first created, its minimum and maximum sizes are
+ * set to reasonable values (which may change from one system
+ * release to the next).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose minimum and maximum sizes to set.
+ *
+ * inMinLimits:
+ * The new minimum size for the content region of the window. Pass
+ * NULL if you don't want to set a minimum size.
+ *
+ * inMaxLimits:
+ * The new maximum size for the content region of the window. Pass
+ * NULL if you don't want to set a maximum size.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowResizeLimits( inWindow: WindowRef; {const} inMinLimits: HISizePtr { can be NULL }; {const} inMaxLimits: HISizePtr { can be NULL } ): OSStatus; external name '_SetWindowResizeLimits';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * GetWindowResizeLimits()
+ *
+ * Summary:
+ * Returns the minimum and maximum content sizes for a window.
+ *
+ * Discussion:
+ * GetWindowResizeLimits returns the minimum and maximum sizes that
+ * were set by SetWindowResizeLimits. Note that it does not send
+ * kEventWindowGetMinimumSize or kEventWindowGetMaximumSize Carbon
+ * events to get these sizes; it simply retrieves the sizes from the
+ * WindowRef. It is entirely possible (and quite likely) that a
+ * given window will have event handlers for the
+ * kEventWindowGetMinimum/MaximumSize events that will modify or
+ * override the sizes in the WindowRef; therefore, to accurately
+ * determine the desired minimum and maximum sizes, you should send
+ * kEventWindowGetMinimum/MaximumSize Carbon events rather than
+ * using this API.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose minimum and maximum sizes to retrieve.
+ *
+ * outMinLimits:
+ * On exit, contains the minimum size of the window's content
+ * region. Pass NULL if you don't want this information.
+ *
+ * outMaxLimits:
+ * On exit, contains the maximum size of the window's content
+ * region. Pass NULL if you don't want this information.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowResizeLimits( inWindow: WindowRef; outMinLimits: HISizePtr { can be NULL }; outMaxLimits: HISizePtr { can be NULL } ): OSStatus; external name '_GetWindowResizeLimits';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * ResizeWindow()
+ *
+ * Summary:
+ * Handles all user interaction while a window is being resized.
+ *
+ * Discussion:
+ * The ResizeWindow function moves either an outline of the window's
+ * edges (on Mac OS 9.x and earlier) or the actual window (on Mac OS
+ * X) around the screen, following the userÕs cursor movements, and
+ * handles all user interaction until the mouse button is released.
+ * Unlike the GrowWindow API, there is no need to follow this call
+ * with a call to the function SizeWindow, because once the mouse
+ * button is released, ResizeWindow resizes the window if the user
+ * has changed the window size. Once the resizing is complete,
+ * ResizeWindow draws the window in the new size. Your application
+ * should call the ResizeWindow function instead of the earlier
+ * Window Manager APIs SizeWindow and GrowWindow. Some windows may
+ * allow themselves to be resized from any corner or edge, not just
+ * the bottom right, and as a result, when the user resizes the
+ * window, the window may move on the screen and not merely change
+ * size. ResizeWindow informs your application of the new window
+ * bounds, so that your application can respond to any changes in
+ * the windowÕs position.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to be resized.
+ *
+ * inStartPoint:
+ * The point, in global coordinates, at which the original
+ * mouse-down occurred.
+ *
+ * inSizeConstraints:
+ * The limits on the vertical and horizontal measurements of the
+ * content rectangle, in pixels. Although this parameter is typed
+ * as a Rect, the four numbers in the structure represent limits,
+ * not screen coordinates. The top, left, bottom, and right fields
+ * of the structure specify the minimum vertical measurement
+ * (top), the minimum horizontal measurement (left), the maximum
+ * vertical measurement (bottom), and the maximum horizontal
+ * measurement (right). The minimum dimensions should be large
+ * enough to allow a manageable rectangle; 64 pixels on a side is
+ * typical. The maximum dimensions can be no greater than 32,767.
+ * You can pass NULL to allow the user to resize the window to any
+ * size that is contained onscreen.
+ *
+ * outNewContentRect:
+ * On exit, the structure contains the new dimensions of the
+ * windowÕs content region, in global coordinates. On Mac OS 9.x
+ * and earlier, you must pass a non-NULL value in this parameter;
+ * in Carbon, you may pass NULL if you do not need the windowÕs
+ * new dimensions.
+ *
+ * Result:
+ * Returns true if the window changed size, or false if not.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function ResizeWindow( inWindow: WindowRef; inStartPoint: Point; {const} inSizeConstraints: RectPtr { can be NULL }; outNewContentRect: RectPtr { can be NULL } ): Boolean; external name '_ResizeWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ Routines available from Mac OS 8.5 forward,
+ or from Mac OS 8.1 forward when linking to CarbonLib 1.0.2 forward
+}
+
+{
+ * SetWindowBounds()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function SetWindowBounds( window: WindowRef; regionCode: WindowRegionCode; const (*var*) globalBounds: Rect ): OSStatus; external name '_SetWindowBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RepositionWindow()
+ *
+ * Summary:
+ * Positions a window according in one of the standard window
+ * locations.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window to position.
+ *
+ * parentWindow:
+ * For some positioning methods, the new location for the
+ * positioned window will be calculated based on the parent
+ * windowÕs position. On Mac OS X 10.3 and later, some positioning
+ * methods allow this parameter to be the same as the window
+ * parameter; CarbonLib and earlier versions of Mac OS X require
+ * that it be different from the window parameter. See the
+ * WindowPositionMethod documentation for details on which methods
+ * allow the parent to be the same as the positioned window.
+ *
+ * method:
+ * The window positioning method. This should be one of the
+ * WindowPositionMethod constants.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function RepositionWindow( window: WindowRef; parentWindow: WindowRef; method: WindowPositionMethod ): OSStatus; external name '_RepositionWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * MoveWindowStructure()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function MoveWindowStructure( window: WindowRef; hGlobal: SInt16; vGlobal: SInt16 ): OSStatus; external name '_MoveWindowStructure';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ Routines available from Mac OS 8.5 forward,
+ or from Mac OS 8.6 forward when linking to CarbonLib 1.1 forward
+}
+
+{ Routines available from Mac OS 8.5 forward}
+
+{
+ * IsWindowInStandardState()
+ *
+ * Summary:
+ * Determines whether a window is currently zoomed in to the user
+ * state or zoomed out to the standard state.
+ *
+ * Discussion:
+ * IsWindowInStandardState compares the windowÕs current dimensions
+ * to those given by the inIdealSize parameter to determine if the
+ * window is currently in its standard (zoomed-out) state. Your
+ * application may use IsWindowInStandardState to decide whether a
+ * userÕs click of the zoom box is a request to zoom in to the user
+ * state or out to the standard state. Your application may also use
+ * IsWindowInStandardState to determine the size and position of the
+ * standard state that the Window Manager would calculate for a
+ * window, given a specified ideal size; this value is returned in
+ * the outIdealStandardState parameter.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window for which to determine the zoom state.
+ *
+ * inIdealSize:
+ * The ideal width and height of the windowÕs content region,
+ * regardless of the actual screen device dimensions. If you set
+ * idealSize to NULL, IsWindowInStandardState examines the
+ * dimensions stored in the stdState field of the WStateData
+ * structure attached to the window.
+ *
+ * outIdealStandardState:
+ * On exit, contains the global coordinates for the content region
+ * of the window in its standard state, based on the data supplied
+ * in the inIdealSize parameter. You may pass NULL if you do not
+ * need this information.
+ *
+ * Result:
+ * Returns true if the window is currently in its standard
+ * (zoomed-out) state, or false if the window is a non-zoomed-out
+ * state.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function IsWindowInStandardState( inWindow: WindowRef; {const} inIdealSize: PointPtr { can be NULL }; outIdealStandardState: RectPtr { can be NULL } ): Boolean; external name '_IsWindowInStandardState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ZoomWindowIdeal()
+ *
+ * Summary:
+ * Zooms a window in accordance with human interface guidelines.
+ *
+ * Discussion:
+ * Applications should use the ZoomWindowIdeal API instead of the
+ * older ZoomWindow API. When your application calls
+ * ZoomWindowIdeal, it automatically conforms to the human interface
+ * guidelines for determining a windowÕs standard state: the window
+ * is moved as little as possible when switching between user and
+ * standard states, the window is zoomed to the screen that contains
+ * the largest portion of the window, and the window is positioned
+ * in its zoomed-out size to avoid the Dock on Mac OS X.
+ *
+ * The ZoomWindowIdeal API calculates a windowÕs ideal standard
+ * state and updates a windowÕs ideal user state independently of
+ * the WStateData structure. Previously, the window definition
+ * function was responsible for updating the user state, but because
+ * it relies upon the WStateData structure, the window definition
+ * function is unaware of the ideal standard state and can no longer
+ * track the windowÕs zoom state reliably. The Window Manager
+ * provides the GetWindowIdealUserState and SetWindowIdealUserState
+ * APIs to access a window's current ideal user state, previously
+ * recorded by ZoomWindowIdeal.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to be zoomed.
+ *
+ * inPartCode:
+ * The direction of the zoom, either inZoomIn or inZoomOut. The
+ * value passed in this parameter should generally be determined
+ * by calling IsWindowInStandardState; if IsWindowInStandardState
+ * returns true, pass inZoomIn, otherwise pass inZoomOut.
+ *
+ * ioIdealSize:
+ * When you specify inZoomIn in the inPartCode parameter, this
+ * parameter is unused on entry; you pass a pointer to a Point
+ * structure, but do not fill the structure with data. On exit,
+ * the Point contains the new height and width of the windowÕs
+ * content region, and ZoomWindowIdeal restores the previous ideal
+ * user state. When you specify inZoomOut in the inPartCode
+ * parameter, you pass the ideal height and width of the windowÕs
+ * content region in the Point structure. On return, the Point
+ * contains the new height and width of the windowÕs content
+ * region; ZoomWindowIdeal saves the current user state of the
+ * window and zooms the window to its ideal size for the standard
+ * state.
+ *
+ * Prior to Mac OS X Mac OS X 10.4, the ZoomWindowIdeal API
+ * malfunctioned if passed an idealSize that was large enough to
+ * cause 16-bit integer overflow when added to the window's
+ * current position. Therefore, when specifying the ideal size
+ * parameter, you should generally not use values that are close
+ * to 32767. It is better to limit your ideal size to, say, 16K.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function ZoomWindowIdeal( inWindow: WindowRef; inPartCode: WindowPartCode; var ioIdealSize: Point ): OSStatus; external name '_ZoomWindowIdeal';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowIdealUserState()
+ *
+ * Summary:
+ * Returns the bounds of a windowÕs content region in its user
+ * (zoomed-in) state.
+ *
+ * Discussion:
+ * Traditionally, the user (zoomed-in) state of a window has been
+ * stored in the WStateData structure attached to a window. This
+ * field is updated by the window definition when the user clicks on
+ * the zoom box and the window definition determines that the window
+ * is currently not zoomed out. When determining whether the window
+ * is zoomed out, however, the window definition can only look at
+ * the standard state stored in the WStateData field. With the
+ * introduction of the ZoomWindowIdeal API, there is a new basis for
+ * determining whether a window is zoomed out: the windowÕs ideal
+ * size. The window definition does not have access to the windowÕs
+ * ideal size, and therefore cannot accurately determine whether a
+ * window that is zoomed with ZoomWindowIdeal is in its user state
+ * or standard state; therefore, the user state that the window
+ * definition stores in the WStateData is also unreliable. The
+ * ZoomWindowIdeal API therefore stores the windowÕs user state
+ * before zooming out in a new location, which is accessed using the
+ * GetWindowIdealUserState API. The GetWindowIdealUserState API
+ * returns the windowÕs user state most recently recorded by
+ * ZoomWindowIdeal.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose ideal user state you wish to retrieve.
+ *
+ * outUserState:
+ * On exit, contains the global coordinates of the windowÕs
+ * content region when zoomed in. On Mac OS X 10.1 and earlier,
+ * and CarbonLib 1.5 and earlier, the windowÕs ideal user state is
+ * an empty rect with coordinates (0,0,0,0) if the window has
+ * never been zoomed out; you should check for an empty rect and
+ * use GetWindowBounds with the kWindowContentRgn selector to
+ * determine the windowÕs current content region. On later
+ * versions of Mac OS X and CarbonLib, GetWindowIdealUserState
+ * automatically returns the windowÕs current content bounds if
+ * the window has not yet been zoomed.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function GetWindowIdealUserState( inWindow: WindowRef; var outUserState: Rect ): OSStatus; external name '_GetWindowIdealUserState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowIdealUserState()
+ *
+ * Summary:
+ * Sets the bounds of a windowÕs content region in its user
+ * (zoomed-in) state.
+ *
+ * Discussion:
+ * The windowÕs ideal user state is used by the ZoomWindowIdeal API
+ * when zooming in. The ideal user state is ignored by the
+ * ZoomWindow API.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose ideal user state to set.
+ *
+ * inUserState:
+ * The global coordinates of the windowÕs content region in its
+ * ideal user state.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function SetWindowIdealUserState( inWindow: WindowRef; const (*var*) inUserState: Rect ): OSStatus; external name '_SetWindowIdealUserState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Routines available in CarbonLib 1.1 and later}
+
+{
+ * GetWindowGreatestAreaDevice()
+ *
+ * Summary:
+ * Returns the graphics device with the greatest area of
+ * intersection with a specified window region.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to compare against.
+ *
+ * inRegion:
+ * The window region to compare against.
+ *
+ * outGreatestDevice:
+ * On exit, the graphics device with the greatest intersection.
+ * May be NULL.
+ *
+ * outGreatestDeviceRect:
+ * On exit, the bounds of the graphics device with the greatest
+ * intersection. May be NULL. If the device with the greatest
+ * intersection also contains the menu bar, the device rect will
+ * exclude the menu bar area.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowGreatestAreaDevice( inWindow: WindowRef; inRegion: WindowRegionCode; outGreatestDevice: GDHandlePtr { can be NULL }; outGreatestDeviceRect: RectPtr { can be NULL } ): OSStatus; external name '_GetWindowGreatestAreaDevice';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * WindowConstrainOptions
+ *
+ }
+type
+ WindowConstrainOptions = UInt32;
+const
+{
+ * The window may be resized if necessary to make it fit onscreen.
+ }
+ kWindowConstrainMayResize = 1 shl 0;
+
+ {
+ * The window will be moved even if it doesn't fit entirely onscreen.
+ }
+ kWindowConstrainMoveRegardlessOfFit = 1 shl 1;
+
+ {
+ * Allow partial intersection of the specified window region with the
+ * screen, instead of requiring total intersection.
+ }
+ kWindowConstrainAllowPartial = 1 shl 2;
+
+ {
+ * Only calculate the new window bounds; don't actually move the
+ * window.
+ }
+ kWindowConstrainCalcOnly = 1 shl 3;
+
+ {
+ * Use TransitionWindow with kWindowSlideTransitionEffect to move
+ * windows onscreen. Available in Mac OS X 10.2.
+ }
+ kWindowConstrainUseTransitionWindow = 1 shl 4;
+
+ {
+ * The most common options: don't resize the window, move the window
+ * regardless of fit to the screen, require total intersection of the
+ * specified window region with the screen, and do actually move the
+ * window.
+ }
+ kWindowConstrainStandardOptions = kWindowConstrainMoveRegardlessOfFit;
+
+{
+ * ConstrainWindowToScreen()
+ *
+ * Summary:
+ * Moves and resizes a window so that it's contained entirely on a
+ * single screen.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindowRef:
+ * The window to constrain.
+ *
+ * inRegionCode:
+ * The window region to constrain.
+ *
+ * inOptions:
+ * Flags controlling how the window is constrained.
+ *
+ * inScreenRect:
+ * A rectangle, in global coordinates, in which to constrain the
+ * window. May be NULL. If NULL, the window is constrained to the
+ * screen with the greatest intersection with the specified window
+ * region.
+ *
+ * outStructure:
+ * On exit, contains the new structure bounds of the window, in
+ * global coordinates. May be NULL.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function ConstrainWindowToScreen( inWindowRef: WindowRef; inRegionCode: WindowRegionCode; inOptions: WindowConstrainOptions; {const} inScreenRect: RectPtr { can be NULL }; outStructure: RectPtr { can be NULL } ): OSStatus; external name '_ConstrainWindowToScreen';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetAvailableWindowPositioningBounds()
+ *
+ * Summary:
+ * Returns the available window positioning bounds on the given
+ * screen (i.e., the screen rect minus the MenuBar and Dock if
+ * located on that screen).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDevice:
+ * The device for which to find the available bounds.
+ *
+ * outAvailableRect:
+ * On exit, contains the available bounds for the given device.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function GetAvailableWindowPositioningBounds( inDevice: GDHandle; var outAvailableRect: Rect ): OSStatus; external name '_GetAvailableWindowPositioningBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetAvailableWindowPositioningRegion()
+ *
+ * Summary:
+ * Returns the available window positioning region on the given
+ * screen (i.e., the screen rect minus the MenuBar and Dock if
+ * located on that screen).
+ *
+ * Discussion:
+ * GetAvailableWindowPositionRegion differs from
+ * GetAvailableWindowPositioningBounds in that the Bounds API
+ * removes the entire area that may theoretically be covered by the
+ * Dock, even if the the Dock does not currently reach from edge to
+ * edge of the device on which it is positioned. The Region API
+ * includes the area at the sides of the Dock that is not covered by
+ * the Dock in the available region.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDevice:
+ * The device for which to find the available bounds.
+ *
+ * ioRgn:
+ * On entry, contains a preallocated RgnHandle. On exit, the
+ * RgnHandle has been modified to contain the available region for
+ * the given device.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetAvailableWindowPositioningRegion( inDevice: GDHandle; ioRgn: RgnHandle ): OSStatus; external name '_GetAvailableWindowPositioningRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Visibility }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * HideWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure HideWindow( window: WindowRef ); external name '_HideWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * [Mac]ShowWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure ShowWindow( window: WindowRef ); external name '_ShowWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+function MacShowWindow__NAME__ShowWindow( possibleWindow: WindowRef ): Boolean; external name '_MacShowWindow__NAME__ShowWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+{
+ * ShowHide()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure ShowHide( window: WindowRef; showFlag: Boolean ); external name '_ShowHide';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * [Mac]IsWindowVisible()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function IsWindowVisible( window: WindowRef ): Boolean; external name '_IsWindowVisible';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+function MacIsWindowVisible__NAME__IsWindowVisible( window: WindowRef ): Boolean; external name '_MacIsWindowVisible__NAME__IsWindowVisible';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ ¥ÊLatent window visibility
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+
+
+{
+ * WindowLatentVisibility
+ *
+ * Summary:
+ * Reasons why a window is currently invisible when ordinarily it
+ * would be visible.
+ }
+type
+ WindowLatentVisibility = UInt32;
+ WindowLatentVisibilityPtr = ^WindowLatentVisibility;
+const
+{
+ * Window is a floater and floating windows are hidden
+ }
+ kWindowLatentVisibleFloater = 1 shl 0;
+
+ {
+ * Window has HideOnSuspend and we are suspended
+ }
+ kWindowLatentVisibleSuspend = 1 shl 1;
+
+ {
+ * Window has HideOnFullScreen and we are full-screen
+ }
+ kWindowLatentVisibleFullScreen = 1 shl 2;
+
+ {
+ * Window's process is hidden
+ }
+ kWindowLatentVisibleAppHidden = 1 shl 3;
+
+ {
+ * Window is in an owned group and the owner was collapsed
+ }
+ kWindowLatentVisibleCollapsedOwner = 1 shl 4;
+
+ {
+ * Window is in a HideOnCollapse group and another window in the
+ * group was collapsed
+ }
+ kWindowLatentVisibleCollapsedGroup = 1 shl 5;
+
+{
+ * IsWindowLatentVisible()
+ *
+ * Summary:
+ * Indicates whether a window is visible onscreen and also whether
+ * it is latently visible but not currently onscreen.
+ *
+ * Discussion:
+ * All windows are either onscreen or offscreen. A window that is
+ * offscreen may still be latently visible; this occurs, for
+ * example, when a floating window is hidden as an application is
+ * suspended. The floating window is not visible onscreen, but it is
+ * latently visible and is only hidden due to the suspended state of
+ * the application; when the application becomes active again, the
+ * floating window will be placed back onscreen.
+ * IsWindowLatentVisible may be used to determine both the window's
+ * onscreen/offscreen status and its latent visibility (if the
+ * window is offscreen).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose visibility to return.
+ *
+ * outLatentVisible:
+ * If the window is onscreen, the latent visibility is zero. If
+ * the window is offscreen, this parameter is used to return the
+ * latent visibility flags of the window. If any of the flags are
+ * set, then the window is latently visible.
+ *
+ * Result:
+ * Indicates whether the window is currently onscreen.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function IsWindowLatentVisible( inWindow: WindowRef; outLatentVisible: WindowLatentVisibilityPtr { can be NULL } ): Boolean; external name '_IsWindowLatentVisible';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ ¥ÊWindow Availability for ExposŽ
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+
+
+{
+ * Summary:
+ * Window availability options for ExposŽ.
+ *
+ * Discussion:
+ * These options are used with the HIWindowGet/ChangeAvailability
+ * APIs to override the default behavior of the Window Manager in
+ * determining whether a window is visible during ExposŽ. Most
+ * applications should not override the default behavior; these
+ * options should only be used in special cases. By default, newly
+ * created windows of class kDocumentWindowClass are given an
+ * availability of zero (meaning that they are available during
+ * ExposŽ), and windows from all other window classes are given an
+ * availability of kHIWindowExposeHidden.
+ }
+const
+{
+ * This window is hidden during ExposŽÕs ÒAll windowsÓ and
+ * ÒApplication windowsÓ modes. If this bit is not set, the window is
+ * visible during these modes.
+ }
+ kHIWindowExposeHidden = 1 shl 0;
+
+
+type
+ HIWindowAvailability = OptionBits;
+{
+ * HIWindowGetAvailability()
+ *
+ * Summary:
+ * Returns the availability of a window during ExposŽ.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose availability to return.
+ *
+ * outAvailability:
+ * On exit, contains the window availability.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIWindowGetAvailability( inWindow: HIWindowRef; var outAvailability: HIWindowAvailability ): OSStatus; external name '_HIWindowGetAvailability';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIWindowChangeAvailability()
+ *
+ * Summary:
+ * Alters the availability of a window during ExposŽ.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose availability to change.
+ *
+ * inSetAvailability:
+ * The availability bits to set.
+ *
+ * inClearAvailability:
+ * The availability bits to clear.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIWindowChangeAvailability( inWindow: HIWindowRef; inSetAvailability: HIWindowAvailability; inClearAvailability: HIWindowAvailability ): OSStatus; external name '_HIWindowChangeAvailability';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ ¥ Sheets
+
+ Sheets are a new user interface object in Mac OS X. A sheet is a modal alert or dialog,
+ but unlike a traditional alert or dialog window (which is visually separate from the
+ frontmost document window), a sheet appears to be attached to its parent window; it
+ moves and z-orders simultaneously with its parent. Furthermore, sheets on Mac OS X
+ use a new type of modality called window modality. A traditional alert or dialog is
+ app-modal; it prevents user interaction with all other windows in the current application.
+ A sheet is window-modal; it only prevents user interaction with its parent window, and
+ events continue to flow to other windows in the application.
+
+ ¥ Sheet Event Handling
+
+ Implementing a sheet window in your application generally requires some modifications
+ to your event-handling code. A traditional app-modal window is implemented using a modal
+ event loop; your application starts a new event loop (either by processing events itself,
+ or by calling ModalDialog), which does not return back to your application's main event
+ loop until the app-modal window has closed.
+
+ Starting a new event loop doesn't work with sheets, because typically the modal event loop
+ will only handle events destined for the sheet, and not events for other windows, but
+ a sheet only blocks events for its parent window, and your application must still handle
+ events for the rest of its windows as normal. Therefore, you will usually not use a modal
+ event loop to handle events in a sheet. Rather, you will show the sheet window, and then
+ return directly back to your main event loop. The Carbon Event Manager automatically
+ prevents events from reaching the sheet's parent window; events in your application's
+ other windows are still returned to you via WaitNextEvent or your application's Carbon
+ event handlers, where you can process them as normal.
+
+ You have several choices for handling events in the sheet itself. A sheet is, at the most
+ basic level, simply another window in your application, and you can use any of the standard
+ event-handling APIs to receive events in the sheet. For example, you can:
+
+ - receive events in the sheet via WaitNextEvent, and handle them directly in your
+ main event loop
+
+ - create the sheet using Dialog Manager APIs, and use IsDialogEvent and DialogSelect
+ to handle events in the sheet
+
+ - install Carbon event handlers on the sheet, and respond to events in your handlers
+
+ Which approach you choose is up to you.
+
+ ¥ Sheets in CarbonLib
+
+ The sheet window class, sheet WDEF procIDs, and ShowSheetWindow, HideSheetWindow, and
+ GetSheetWindowParent APIs are implemented in CarbonLib starting with version 1.3. However,
+ since Mac OS 8 and 9 do not traditionally support a window-modal user interface, sheet
+ windows are displayed as app-modal windows by CarbonLib. From your application's perspective,
+ event handling for a sheet in CarbonLib is the same as event handling for a sheet on X;
+ ShowSheetWindow still returns immediately, and your application should still return back
+ to its main event loop and be prepared to handle events in other windows. On CarbonLib,
+ your application will simply never receive any user input in any of your other windows;
+ since the sheet has application modality, the Carbon Event Manager will discard events
+ in any windows other than the sheet.
+
+ ¥ÊCreating a Sheet
+
+ A sheet is just a normal window with a special window class: kSheetWindowClass or
+ kSheetAlertWindowClass. As such, it can be created in any of the ways you might create
+ a window: NewWindow, NewCWindow, CreateNewWindow, GetNewWindow, GetNewCWindow,
+ CreateWindowFromCollection, CreateWindowFromResource, CreateWindowFromNib, NewDialog,
+ NewColorDialog, NewFeaturesDialog, or GetNewDialog.
+
+ The Window Manager defines two window classes and two WDEF procIDs for sheets:
+
+ - kSheetWindowClass and kSheetAlertWindowClass
+ - kWindowSheetProc and kWindowSheetAlertProc
+
+ The window classes may be used with CreateNewWindow, CreateWindowFromCollection, and
+ CreateWindowFromResource; the WDEF procIDs may be used with NewWindow, NewCWindow, NewDialog,
+ NewColorDialog, NewFeaturesDialog, and in 'WDEF' and 'DLOG' resources.
+
+ Mac OS X 10.0 only supports kSheetWindowClass and kWindowSheetProc;
+ it does not support kSheetAlertWindowClass or kWindowSheetAlertProc. The latter window
+ class and procID were added in CarbonLib 1.3 and Mac OS X 10.1. A new window class and
+ procID were necessary for CarbonLib support because
+ sheets can be used for both alerts ("Do you want to save changes before closing this
+ window?") and dialogs (a Navigation Services PutFile dialog). On Mac OS X, sheet windows
+ have the same appearance when used for either an alert or a dialog, but on Mac OS 8 and 9,
+ alert windows have a different appearance from dialog windows. Two separate window classes
+ are necessary for CarbonLib to know whether to display a sheet using a movable alert or a
+ movable dialog window. Therefore, it is recommended that you use kSheetAlertWindowClass when
+ creating a sheet window that will be used to display an alert, although this is not required.
+
+ ¥ Displaying a Sheet
+
+ A sheet is made visible by calling the ShowSheetWindow API. This API shows the sheet,
+ using whatever visual effects are appropriate for the platform, and then returns immediately.
+ On Mac OS X, it creates a window group and places the sheet and its parent window into the
+ group; it also marks the sheet as window-modal. On CarbonLib, it marks the sheet as app-modal
+ but does not create a window group.
+
+ On Mac OS X, before the sheet window is actually made visible, ShowSheetWindow sends a
+ kEventWindowDrawContent event to the sheet window, asking it to draw its content into the
+ window's offscreen buffer. The sheet must handle this event, or its content area will be
+ blank after the sheet becomes visible.
+
+ In some cases, this handler is automatically provided for you:
+
+ - If you create your sheet window using the Dialog Manager, the Dialog Manager
+ automatically installs a handler for this event that calls DrawDialog, so you
+ don't need to install the handler yourself.
+
+ - If you install the standard Carbon window event handler on your sheet window
+ (using kWindowStandardHandlerAttribute or InstallStandardEventHandler), the
+ standard handler automatically handles this event and calls DrawControls.
+
+ Typically, your event handling code (whether it uses WaitNextEvent, the Dialog Manager,
+ or Carbon event handlers) will receive and respond to events in the sheet until the
+ user does something that should cause the sheet to close. This might be clicking in an
+ OK or Cancel button, for example. At that time, your event handling code must call either
+ HideSheetWindow or DetachSheetWindow. The sheet window will hide, but will not be destroyed,
+ so you can use it again later if you want.
+
+ ¥ÊClosing a sheet
+
+ A sheet is normally hidden by calling the HideSheetWindow API. HideSheetWindow provides the
+ visual effects of zooming the sheet back into the parent window's title bar and moving the
+ parent window back to its original position. In Mac OS X 10.3 and later, the DetachSheetWindow
+ API is also available. DetachSheetWindow ungroups the sheet from its parent, releases the
+ retain count acquired by ShowSheetWindow on the parent window, and removes all event handlers
+ installed by ShowSheetWindow, but does not hide the sheet window; an application would typically
+ call DetachSheetWindow and then HideWindow to hide the sheet window without the sheet closing
+ animation. This may be useful if, for example, the sheet were being used to ask if changes to
+ a modified document should be saved; if the user chooses "DonÕt Save", then the application
+ could use DetachSheetWindow and then hide both the sheet and the document immediately, so that
+ the document closes as quickly as possible without taking time for the closing animation.
+ The Navigation Services Save Changes dialog does this automatically.
+
+ You _must_ call either HideSheetWindow or DetachSheetWindow before destroying a sheet that has
+ been shown with ShowSheetWindow. You may not simply dispose of a sheet window without first using
+ Hide or DetachSheetWindow; doing so will leave an extra refcount on the parent window, and will
+ leave the parent window still embedded in the sheet window group.
+
+ ¥ Sheet Transparency
+
+ Sheets should be transparent so that the user can see some of the document content behind
+ the sheet and remember the context in which the sheet was displayed. In Mac OS X 10.1,
+ a sheet is made transparent by using the kThemeBrushSheetBackgroundTransparent constant for
+ the sheet windowÕs theme background brush. In Mac OS X 10.2 and later, sheets are only
+ transparent if this brush is used and if the sheet window uses compositing mode (enabled by
+ setting the kWindowCompositingAttribute window attribute when the sheet window is created).
+}
+{
+ * ShowSheetWindow()
+ *
+ * Summary:
+ * Shows a sheet window using appropriate visual effects.
+ *
+ * Discussion:
+ * ShowSheetWindow is implemented in both CarbonLib 1.3 and Mac OS
+ * X. Since Mac OS 9 does not use a window-modal user interface for
+ * alerts and dialogs, ShowSheetWindow in CarbonLib does not bind
+ * the sheet to the parent window in the same way that it does on
+ * Mac OS X; instead, it shows the sheet like a standard
+ * movable-modal dialog window. Sheet windows must use the window
+ * classes kSheetWindowClass or kSheetAlertWindowClass to get the
+ * right appearance on both platforms.
+ *
+ * Note that ShowSheetWindow will increment the retain count of the
+ * parent window. The retain count is decremented by HideSheetWindow
+ * and DetachSheetWindow. You must call one of those APIs before
+ * destroying the sheet window.
+ *
+ * On Mac OS X, ShowSheetWindow sets the modality of the sheet
+ * window to kWindowModalityWindowModal.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSheet:
+ * The sheet window to show.
+ *
+ * inParentWindow:
+ * The sheet's parent window.
+ *
+ * Result:
+ * An operating system result code. ShowSheetWindow checks for the
+ * following error conditions, and returns paramErr if any occur:
+ * the sheet window must have a window class of kSheetWindowClass or
+ * kSheetAlertWindowClass; the sheet and parent windows must not be
+ * the same window; the sheet must not have a parent window already;
+ * and the parent window must not already be the target of a sheet.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function ShowSheetWindow( inSheet: WindowRef; inParentWindow: WindowRef ): OSStatus; external name '_ShowSheetWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HideSheetWindow()
+ *
+ * Summary:
+ * Hides a sheet window using appropriate visual effects.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSheet:
+ * The sheet window to hide.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HideSheetWindow( inSheet: WindowRef ): OSStatus; external name '_HideSheetWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DetachSheetWindow()
+ *
+ * Summary:
+ * Detaches a sheet window from its parent window without affecting
+ * the visibility or position of the sheet or its parent.
+ *
+ * Discussion:
+ * This API may be useful if you want to hide a sheet window without
+ * an animation effect. To do that, use DetachSheetWindow to detach
+ * the sheet from the parent, and then use HideWindow to hide the
+ * sheet, or DisposeWindow to destroy the sheet.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSheet:
+ * The sheet to detach.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function DetachSheetWindow( inSheet: WindowRef ): OSStatus; external name '_DetachSheetWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * GetSheetWindowParent()
+ *
+ * Summary:
+ * Returns the parent window of a sheet.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSheet:
+ * The sheet window whose parent to retrieve.
+ *
+ * outParentWindow:
+ * On exit, contains the parent window of the sheet.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function GetSheetWindowParent( inSheet: WindowRef; var outParentWindow: WindowRef ): OSStatus; external name '_GetSheetWindowParent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ ¥ Drawers
+
+ Drawers are supported in Carbon by Mac OS X 10.2 and later. To create and use a drawer:
+
+ - Create a window using kDrawerWindowClass. You must also use compositing mode with
+ drawers; this mode is enabled by passing kWindowCompositingAttribute to CreateNewWindow.
+
+ - Either install the standard window event handler on the drawer window, or use
+ your own Carbon event or WaitNextEvent code to handle user interaction with the
+ drawer. If you do not use the standard window event handler, you should call
+ ResizeWindow in response to clicks on the grow region of the drawer if you want
+ the drawer to be resizable.
+
+ - Set the drawer's parent window with the SetDrawerParent function. The parent is
+ the window on which the drawer will open.
+
+ - Optionally, install a Carbon event handler on the drawer or the drawer's parent
+ window for the kEventWindowDrawerOpening/Opened/Closing/Closed events, to be notified
+ when the drawer has started or finished opening or closing.
+
+ - Optionally, set the drawer's preferred edge on the parent window with the
+ SetDrawerPreferredEdge function. If you do not set a preferred edge, the drawer
+ opens on the parent's left side on a left-to-right system, or on the parent's right
+ side on a right-to-left system.
+
+ - Optionally, set the drawer's offsets with the SetDrawerOffsets function. The offsets
+ control the amount of inset between the edge of the parent's content area and the edge
+ of the drawer's structure. If you do not set any offsets, the drawer's edges are flush
+ with the edges of the parent's content.
+
+ - Optionally, set the drawer's minimum and maximum sizes with the SetWindowResizeLimits
+ function. Or, install a Carbon event handler on the drawer to handle the kEventWindow-
+ GetMinimumSize and kEventWindowGetMaximumSize events. The drawer's minimum and maximum
+ sizes control how small or large it will resize together with the parent. If you do not
+ set resize limits, the drawer will be capable of resizing to default small and large
+ limits.
+
+ - Call ToggleDrawer to open or close the drawer, or use OpenDrawer or CloseDrawer if
+ you require more control over how the drawer opens or closes.
+}
+
+{
+ * Summary:
+ * Indicates the parent window edge on which a drawer will be shown.
+ }
+const
+{
+ * This constant is typically used with the OpenDrawer API; it
+ * indicates that the drawer should be opened on whatever edge of the
+ * parent window has previously been set as the drawer's preferred
+ * edge.
+ }
+ kWindowEdgeDefault = 0;
+
+ {
+ * The drawer should open on the top edge of the parent window.
+ }
+ kWindowEdgeTop = 1 shl 0;
+
+ {
+ * The drawer should open on the left edge of the parent window.
+ }
+ kWindowEdgeLeft = 1 shl 1;
+
+ {
+ * The drawer should open on the bottom edge of the parent window.
+ }
+ kWindowEdgeBottom = 1 shl 2;
+
+ {
+ * The drawer should open on the right edge of the parent window.
+ }
+ kWindowEdgeRight = 1 shl 3;
+
+
+{
+ * Summary:
+ * Indicates the current state of a drawer window.
+ }
+const
+{
+ * The drawer is opening, but is not yet fully open.
+ }
+ kWindowDrawerOpening = 1;
+
+ {
+ * The drawer is fully open.
+ }
+ kWindowDrawerOpen = 2;
+
+ {
+ * The drawer is closing, but is not yet fully closed.
+ }
+ kWindowDrawerClosing = 3;
+
+ {
+ * The drawer is fully closed.
+ }
+ kWindowDrawerClosed = 4;
+
+type
+ WindowDrawerState = UInt32;
+
+{
+ * GetDrawerPreferredEdge()
+ *
+ * Summary:
+ * Returns the preferred parent window edge of a drawer.
+ *
+ * Discussion:
+ * Drawers start out with a preferred parent window edge of
+ * kWindowEdgeDefault. On left-to-right systems, the default edge is
+ * the left edge of the parent window; on right-to-left systems, the
+ * default edge is the right edge. You can set the preferred edge
+ * with SetDrawerPreferredEdge. If there's not enough room on the
+ * preferred edge, the drawer will automatically switch to the
+ * opposite edge.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawerWindow:
+ * The drawer window whose preferred edge to retrieve.
+ *
+ * Result:
+ * The preferred edge of the drawer window.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDrawerPreferredEdge( inDrawerWindow: WindowRef ): OptionBits; external name '_GetDrawerPreferredEdge';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * SetDrawerPreferredEdge()
+ *
+ * Summary:
+ * Sets the preferred parent window edge of a drawer.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawerWindow:
+ * The drawer window whose preferred edge to set.
+ *
+ * inEdge:
+ * The preferred edge of the drawer window. Note that although the
+ * WindowEdge enumeration has values appropriate for a bitfield,
+ * the current implementation does not support receiving more than
+ * one edge bit in this parameter. You can also pass
+ * kWindowEdgeDefault to allow the Window Manager to pick an edge.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDrawerPreferredEdge( inDrawerWindow: WindowRef; inEdge: OptionBits ): OSStatus; external name '_SetDrawerPreferredEdge';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * GetDrawerCurrentEdge()
+ *
+ * Summary:
+ * Returns the current parent window edge on which a drawer is
+ * displayed.
+ *
+ * Discussion:
+ * If the drawer window is currently visible, this API returns the
+ * parent window edge on which the drawer is displayed. If the
+ * drawer is not visible, this API determines on which edge of the
+ * parent window the drawer should be displayed, given the current
+ * size of the drawer, position of the parent, and preferred edge
+ * for the drawer.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawerWindow:
+ * The drawer window whose current edge to retrieve.
+ *
+ * Result:
+ * The current edge of the drawer window.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDrawerCurrentEdge( inDrawerWindow: WindowRef ): OptionBits; external name '_GetDrawerCurrentEdge';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * GetDrawerState()
+ *
+ * Summary:
+ * Returns the current state of a drawer: opening, open, closing, or
+ * closed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawerWindow:
+ * The drawer window whose state to retrieve.
+ *
+ * Result:
+ * The current state of the drawer window.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDrawerState( inDrawerWindow: WindowRef ): WindowDrawerState; external name '_GetDrawerState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * GetDrawerParent()
+ *
+ * Summary:
+ * Returns the parent window of a drawer.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawerWindow:
+ * The drawer window whose parent window to retrieve.
+ *
+ * Result:
+ * The drawer's parent window, or NULL if the drawer has no assigned
+ * parent.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDrawerParent( inDrawerWindow: WindowRef ): WindowRef; external name '_GetDrawerParent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * SetDrawerParent()
+ *
+ * Summary:
+ * Sets the parent window of a drawer.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawerWindow:
+ * The drawer window whose parent window to set.
+ *
+ * inParent:
+ * The drawer's new parent window, or NULL if the drawer should
+ * have no parent.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDrawerParent( inDrawerWindow: WindowRef; inParent: WindowRef ): OSStatus; external name '_SetDrawerParent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * kWindowOffsetUnchanged
+ *
+ * Discussion:
+ * Pass this value to SetDrawerOffsets to indicate that an existing
+ * offset should not be changed.
+ }
+const
+ kWindowOffsetUnchanged = -1.0;
+{
+ * SetDrawerOffsets()
+ *
+ * Summary:
+ * Sets the offsets from the beginning and end of the parent window
+ * to the beginning and end of the drawer window.
+ *
+ * Discussion:
+ * The drawer offsets control the positioning of the drawer relative
+ * to its parent window. When a drawer is first created, its offsets
+ * are zero. When a drawer is positioned, it is initially given a
+ * height or width equal to the height or width of the content area
+ * of the parent to which it is attached. If a drawer is opening on
+ * the left side of its parent, for example, the drawer's height
+ * will be the height of the parent's content area. In this case,
+ * the top side of the drawer window is called the leading edge of
+ * the drawer, and the bottom side of the drawer window is called
+ * the trailing edge of the drawer. The drawer's size is then
+ * adjusted by the leading and trailing offsets. The leading edge of
+ * the drawer is moved inward by an amount equal to the leading
+ * offset, and the trailing edge is moved inward by an amount equal
+ * to the trailing offset. For example, if the leading and trailing
+ * offsets are five and fifteen, then the top edge of a left-opening
+ * drawer will be five pixels inside the top edge of the parent
+ * window's content area, and the bottom edge of the drawer will be
+ * fifteen pixels inside the bottom edge of the parent's content
+ * area.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawerWindow:
+ * The drawer window whose offsets to change.
+ *
+ * inLeadingOffset:
+ * The new leading offset, in pixels. Pass kWindowOffsetUnchanged
+ * if you don't want to change the leading offset.
+ *
+ * inTrailingOffset:
+ * The new trailing offset, in pixels. Pass kWindowOffsetUnchanged
+ * if you don't want to change the trailing offset.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDrawerOffsets( inDrawerWindow: WindowRef; inLeadingOffset: Float32; inTrailingOffset: Float32 ): OSStatus; external name '_SetDrawerOffsets';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * GetDrawerOffsets()
+ *
+ * Summary:
+ * Returns the offsets from the beginning and end of the parent
+ * window to the beginning and end of the drawer window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawerWindow:
+ * The drawer window whose offsets to retrieve.
+ *
+ * outLeadingOffset:
+ * On exit, contains the drawer's leading offset. Pass NULL if you
+ * don't need this information returned.
+ *
+ * outTrailingOffset:
+ * On exit, contains the drawer's trailing offset. Pass NULL if
+ * you don't need this information returned.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDrawerOffsets( inDrawerWindow: WindowRef; outLeadingOffset: Float32Ptr { can be NULL }; outTrailingOffset: Float32Ptr { can be NULL } ): OSStatus; external name '_GetDrawerOffsets';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * ToggleDrawer()
+ *
+ * Summary:
+ * Toggles a drawer from open to closed, or vice versa.
+ *
+ * Discussion:
+ * ToggleDrawer opens the drawer if it is closed, opening, or
+ * closing. If the drawer is open, it closes the drawer.
+ *
+ * ToggleDrawer attempts to open the drawer on its preferred edge,
+ * but if there is not enough room on that edge, it will try the
+ * opposite edge instead. If there is insufficient room on either
+ * edge, the drawer will open on the preferred edge but may extend
+ * offscreen, under the Dock, or under the menubar.
+ *
+ * The opening or closing of the drawer is performed asynchronously;
+ * ToggleDrawer installs an event loop timer that opens or closes
+ * the drawer after ToggleDrawer returns to the caller. Therefore,
+ * the caller must be running its event loop for the drawer to open
+ * or close. To open or close the drawer synchronously, use the
+ * OpenDrawer or CloseDrawer APIs.
+ *
+ * ToggleDrawer retains the drawer window while the drawer is
+ * opening or closing, and releases it when the drawer is fully
+ * opened or closed.
+ *
+ * ToggleDrawer sends the kEventWindowDrawerOpening,
+ * kEventWindowDrawerOpened, kEventWindowDrawerClosing, and
+ * kEventWindowDrawerClosed events as the drawer opens or closes.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawerWindow:
+ * The drawer window to open or close.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function ToggleDrawer( inDrawerWindow: WindowRef ): OSStatus; external name '_ToggleDrawer';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * OpenDrawer()
+ *
+ * Summary:
+ * Opens a drawer on a specified parent window edge.
+ *
+ * Discussion:
+ * OpenDrawer may open the drawer either synchronously or
+ * asynchronously, depending on the value of the inAsync parameter.
+ * If inAsync is true, OpenDrawer installs an event loop timer that
+ * opens the drawer after OpenDrawer returns to the caller;
+ * therefore, the caller must be running its event loop for the
+ * drawer to open. If inAsync is false, OpenDrawer opens the drawer
+ * completely before returning to the caller.
+ *
+ * OpenDrawer retains the drawer window while the drawer is opening,
+ * and releases it when the drawer is fully open.
+ *
+ * OpenDrawer sends the kEventWindowDrawerOpening event to the
+ * drawer, the drawer's parent, and the application before opening
+ * the drawer. If an event handler for this event returns
+ * userCanceledErr, OpenDrawer will return immediately without
+ * opening the drawer. OpenDrawer sends the kEventWindowDrawerOpened
+ * event to the drawer, the drawer's parent, and the application
+ * after the drawer has finished opening.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawerWindow:
+ * The drawer window to open.
+ *
+ * inEdge:
+ * The parent window edge on which to open the drawer. Pass
+ * kWindowEdgeDefault to use the drawer's preferred edge. If there
+ * is not enough room on the preferred edge, OpenDrawer will try
+ * the opposite edge instead. If there is insufficient room on
+ * either edge, the drawer will open on the preferred edge but may
+ * extend offscreen, under the Dock, or under the menubar.
+ *
+ * inAsync:
+ * Whether to open the drawer synchronously (the drawer is
+ * entirely opened before the function call returns) or
+ * asynchronously (the drawer opens using an event loop timer
+ * after the function call returns).
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function OpenDrawer( inDrawerWindow: WindowRef; inEdge: OptionBits; inAsync: Boolean ): OSStatus; external name '_OpenDrawer';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * CloseDrawer()
+ *
+ * Summary:
+ * Closes a drawer.
+ *
+ * Discussion:
+ * CloseDrawer may close the drawer either synchronously or
+ * asynchronously, depending on the value of the inAsync parameter.
+ * If inAsync is true, CloseDrawer installs an event loop timer that
+ * closes the drawer after CloseDrawer returns to the caller;
+ * therefore, the caller must be running its event loop for the
+ * drawer to close. If inAsync is false, CloseDrawer closes the
+ * drawer completely before returning to the caller.
+ *
+ * CloseDrawer retains the drawer window while the drawer is
+ * closing, and releases it when the drawer is fully closed.
+ *
+ * CloseDrawer sends the kEventWindowDrawerClosing event to the
+ * drawer, the drawer's parent, and the application before closing
+ * the drawer. If an event handler for this event returns
+ * userCanceledErr, CloseDrawer will return immediately without
+ * closing the drawer. CloseDrawer sends the
+ * kEventWindowDrawerClosed event to the drawer, the drawer's
+ * parent, and the application after the drawer has finished closing.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawerWindow:
+ * The drawer window to close.
+ *
+ * inAsync:
+ * Whether to close the drawer synchronously (the drawer is
+ * entirely closed before the function call returns) or
+ * asynchronously (the drawer closes using an event loop timer
+ * after the function call returns).
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function CloseDrawer( inDrawerWindow: WindowRef; inAsync: Boolean ): OSStatus; external name '_CloseDrawer';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Disabling Screen Redraw }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ disable and enable screen updates for changes to the current applicationÕs windows
+ (OS X only)
+}
+
+{
+ * DisableScreenUpdates()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function DisableScreenUpdates: OSStatus; external name '_DisableScreenUpdates';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * EnableScreenUpdates()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function EnableScreenUpdates: OSStatus; external name '_EnableScreenUpdates';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Toolbars }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+// #define _SetWindowToolbar SetWindowToolbar
+{
+ * SetWindowToolbar()
+ *
+ * Discussion:
+ * Sets the toolbar for a window. If any other toolbar is currently
+ * bound to the window, it is released. This API does NOT add the
+ * toolbar button to the window, your application must set the
+ * attribute itself.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to add the toolbar to.
+ *
+ * inToolbar:
+ * The toolbar to add.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowToolbar( inWindow: WindowRef; inToolbar: HIToolbarRef ): OSStatus; external name '_SetWindowToolbar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+// #define _GetWindowToolbar GetWindowToolbar
+{
+ * GetWindowToolbar()
+ *
+ * Discussion:
+ * Gets the toolbar of a window, if any.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to add the toolbar to.
+ *
+ * outToolbar:
+ * The toolbar. You do not own the toolbar reference returned by
+ * this function. Do not release it! It is possible for the
+ * toolbar returned to be NULL, indicating there is no toolbar
+ * associated with this window. ¥¥¥ NOTE: May need to change the
+ * release strategy here.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowToolbar( inWindow: WindowRef; var outToolbar: HIToolbarRef ): OSStatus; external name '_GetWindowToolbar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+// #define _ShowHideWindowToolbar ShowHideWindowToolbar
+{
+ * ShowHideWindowToolbar()
+ *
+ * Discussion:
+ * Shows or hides a window's toolbar. Optionally, you can ask for
+ * the transition to be animated or not. Typically, you would not
+ * need to call this other than to set up your window accordingly.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window to show or hide the toolbar for.
+ *
+ * inShow:
+ * Pass true to show the toolbar, false to hide it.
+ *
+ * inAnimate:
+ * Pass true to animate the transition, false to do it quickly and
+ * without fanfare.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function ShowHideWindowToolbar( inWindow: WindowRef; inShow: Boolean; inAnimate: Boolean ): OSStatus; external name '_ShowHideWindowToolbar';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+// #define _IsWindowToolbarVisible IsWindowToolbarVisible
+{
+ * IsWindowToolbarVisible()
+ *
+ * Discussion:
+ * Returns whether the toolbar (if any) attached to a window is
+ * visible. If the window has no toolbar, false is returned.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window test the toolbar visiblity for.
+ *
+ * Result:
+ * A boolean result indicating whether the toolbar is visible (true)
+ * or not (false).
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function IsWindowToolbarVisible( inWindow: WindowRef ): Boolean; external name '_IsWindowToolbarVisible';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Transparency }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * SetWindowAlpha()
+ *
+ * Discussion:
+ * Alters the overall alpha of a window, making the entire window
+ * (including window frame) either more or less transparent. The
+ * alpha is expressed as a floating point value from 0.0 (completely
+ * transparent) to 1.0 (completely opaque).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose alpha to modify.
+ *
+ * inAlpha:
+ * The new alpha value.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function SetWindowAlpha( inWindow: WindowRef; inAlpha: Float32 ): OSStatus; external name '_SetWindowAlpha';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowAlpha()
+ *
+ * Discussion:
+ * Returns the current overall alpha value for a window. The alpha
+ * is expressed as a floating point value from 0.0 (completely
+ * transparent) to 1.0 (completely opaque).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window whose alpha to return.
+ *
+ * outAlpha:
+ * On exit, contains the window's current alpha value.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowAlpha( inWindow: WindowRef; var outAlpha: Float32 ): OSStatus; external name '_GetWindowAlpha';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Shadows }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * HIWindowInvalidateShadow()
+ *
+ * Summary:
+ * This API causes a window's shadow to be recalculated.
+ *
+ * Discussion:
+ * HIWindowInvalidateShadow is not typically used by applications.
+ * However, it may be useful for applications with customized window
+ * frames that change shape dynamically; in this case, after the
+ * application has drawn the new window shape, the window shadow
+ * must be recalculated to follow the new window shape.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIWindowInvalidateShadow( inWindow: HIWindowRef ): OSStatus; external name '_HIWindowInvalidateShadow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Scaling for Resolution Independence }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * HIWindowScaleMode
+ *
+ * Discussion:
+ * A window's scale mode indicates in which resolution-independent
+ * scale mode it is operating.
+ }
+type
+ HIWindowScaleMode = UInt32;
+const
+{
+ * The window is not scaled at all because the display scale factor
+ * is 1.0.
+ }
+ kHIWindowScaleModeUnscaled = 0;
+
+ {
+ * The window's backing store is being magnified by the window server
+ * because the display scale factor != 1.0, and because the window
+ * was created with neither the kWindowFrameworkScaledAttribute nor
+ * the kWindowApplicationScaledAttribute.
+ }
+ kHIWindowScaleModeMagnified = 1;
+
+ {
+ * The window's context has been scaled to match the display scale
+ * factor because the display scale factor != 1.0 and because the
+ * window was created with the kWindowFrameworkScaledAttribute.
+ }
+ kHIWindowScaleModeFrameworkScaled = 2;
+
+ {
+ * This window's contents are being scaled manually by the
+ * application because the display scale factor != 1.0 and because
+ * the window was created with the kWindowApplicationScaledAttribute.
+ }
+ kHIWindowScaleModeApplicationScaled = 3;
+
+{
+ * HIWindowGetScaleMode()
+ *
+ * Summary:
+ * Provides the window's scale mode and the application's display
+ * scale factor.
+ *
+ * Discussion:
+ * HIWindowGetScaleMode returns the HIWindowScaleMode for the
+ * window, which is determined based on the application's display
+ * scale factor and any resolution-independence attributes specified
+ * at window creation time. Applications and the views within the
+ * window can use the scale mode and display scale factor to help
+ * draw or layout properly for a particular scale mode.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The WindowRef whose scale mode to provide.
+ *
+ * outMode:
+ * On exit, an HIWindowScaleMode indicating the window's scale
+ * mode.
+ *
+ * outScaleFactor:
+ * On exit, a float indicating the display scale factor for the
+ * application. You may pass NULL if you are not interested in
+ * acquiring the scale factor; it is provided only as a
+ * convenience.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIWindowGetScaleMode( inWindow: HIWindowRef; var outMode: HIWindowScaleMode; outScaleFactor: Float32Ptr { can be NULL } ): OSStatus; external name '_HIWindowGetScaleMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Properties }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ Routines available from Mac OS 8.5 forward
+ or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
+}
+
+{
+ * GetWindowProperty()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function GetWindowProperty( window: WindowRef; propertyCreator_: PropertyCreator; propertyTag_: PropertyTag; bufferSize: UInt32; actualSize: UInt32Ptr { can be NULL }; propertyBuffer: UnivPtr ): OSStatus; external name '_GetWindowProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowPropertySize()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function GetWindowPropertySize( window: WindowRef; creator: PropertyCreator; tag: PropertyTag; var size: UInt32 ): OSStatus; external name '_GetWindowPropertySize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowProperty()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function SetWindowProperty( window: WindowRef; propertyCreator_: PropertyCreator; propertyTag_: PropertyTag; propertySize: UInt32; propertyBuffer: {const} UnivPtr ): OSStatus; external name '_SetWindowProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RemoveWindowProperty()
+ *
+ * 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
+ * Non-Carbon CFM: in WindowsLib 8.5 and later
+ }
+function RemoveWindowProperty( window: WindowRef; propertyCreator_: PropertyCreator; propertyTag_: PropertyTag ): OSStatus; external name '_RemoveWindowProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
+
+const
+ kWindowPropertyPersistent = $00000001; { whether this property gets saved when flattening the window }
+
+{
+ * GetWindowPropertyAttributes()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetWindowPropertyAttributes( window: WindowRef; propertyCreator: OSType; propertyTag: OSType; var attributes: UInt32 ): OSStatus; external name '_GetWindowPropertyAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ChangeWindowPropertyAttributes()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function ChangeWindowPropertyAttributes( window: WindowRef; propertyCreator: OSType; propertyTag: OSType; attributesToSet: UInt32; attributesToClear: UInt32 ): OSStatus; external name '_ChangeWindowPropertyAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Utilities }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * PinRect()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function PinRect( const (*var*) theRect: Rect; thePt: Point ): SInt32; external name '_PinRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetGrayRgn()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetGrayRgn: RgnHandle; external name '_GetGrayRgn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Part Tracking }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * TrackBox()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TrackBox( window: WindowRef; thePt: Point; partCode: WindowPartCode ): Boolean; external name '_TrackBox';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TrackGoAway()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TrackGoAway( window: WindowRef; thePt: Point ): Boolean; external name '_TrackGoAway';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Region Dragging }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * DragGrayRgn()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function DragGrayRgn( theRgn: RgnHandle; startPt: Point; const (*var*) limitRect: Rect; const (*var*) slopRect: Rect; axis: SInt16; actionProc: DragGrayRgnUPP ): SInt32; external name '_DragGrayRgn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DragTheRgn()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function DragTheRgn( theRgn: RgnHandle; startPt: Point; const (*var*) limitRect: Rect; const (*var*) slopRect: Rect; axis: SInt16; actionProc: DragGrayRgnUPP ): SInt32; external name '_DragTheRgn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ GetAuxWin }
+{ GetAuxWin is not available in Carbon }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * GetAuxWin()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ C Glue }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * setwtitle()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * trackgoaway()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * findwindow()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * getwtitle()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * growwindow()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * newwindow()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * newcwindow()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * pinrect()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * trackbox()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * draggrayrgn()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * dragwindow()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Window Accessors }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * GetWindowGoAwayFlag()
+ *
+ * Discussion:
+ * use GetWindowAttributes in Carbon
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+
+
+{
+ * GetWindowSpareFlag()
+ *
+ * Discussion:
+ * use GetWindowAttributes in Carbon
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+
+
+{
+ * GetWindowList()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
+ }
+function GetWindowList: WindowRef; external name '_GetWindowList';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowPort()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function GetWindowPort( window: WindowRef ): CGrafPtr; external name '_GetWindowPort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowStructurePort()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function GetWindowStructurePort( inWindow: WindowRef ): CGrafPtr; external name '_GetWindowStructurePort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ * GetWindowKind()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function GetWindowKind( window: WindowRef ): SInt16; external name '_GetWindowKind';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsWindowHilited()
+ *
+ * Summary:
+ * Indicates whether a window's frame is hilited.
+ *
+ * Discussion:
+ * See HiliteWindow for a disucssion on the meaning of a window's
+ * hilited state.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window whose hilited state you wish to retrieve.
+ *
+ * Result:
+ * A Boolean indicating whether the window's frame is hilited.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function IsWindowHilited( window: WindowRef ): Boolean; external name '_IsWindowHilited';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsWindowUpdatePending()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function IsWindowUpdatePending( window: WindowRef ): Boolean; external name '_IsWindowUpdatePending';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * [Mac]GetNextWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later or as macro/inline
+ }
+function GetNextWindow( window: WindowRef ): WindowRef; external name '_GetNextWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+function MacGetNextWindow__NAME__GetNextWindow( window: WindowRef ): WindowRef; external name '_MacGetNextWindow__NAME__GetNextWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetPreviousWindow()
+ *
+ * Summary:
+ * Returns the window above a given window in the window list.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The window above this window is returned.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Non-Carbon CFM: not available
+ }
+function GetPreviousWindow( inWindow: WindowRef ): WindowRef; external name '_GetPreviousWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * GetWindowStandardState()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function GetWindowStandardState( window: WindowRef; var rect_: Rect ): RectPtr; external name '_GetWindowStandardState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowUserState()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function GetWindowUserState( window: WindowRef; var rect_: Rect ): RectPtr; external name '_GetWindowUserState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowKind()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+procedure SetWindowKind( window: WindowRef; kind: SInt16 ); external name '_SetWindowKind';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowStandardState()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+procedure SetWindowStandardState( window: WindowRef; const (*var*) rect_: Rect ); external name '_SetWindowStandardState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetWindowUserState()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+procedure SetWindowUserState( window: WindowRef; const (*var*) rect_: Rect ); external name '_SetWindowUserState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetPortWindowPort()
+ *
+ * Discussion:
+ * set the current QuickDraw port to the port associated with the
+ * window
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+procedure SetPortWindowPort( window: WindowRef ); external name '_SetPortWindowPort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowPortBounds()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function GetWindowPortBounds( window: WindowRef; var bounds: Rect ): RectPtr; external name '_GetWindowPortBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetWindowFromPort()
+ *
+ * Discussion:
+ * Needed to Ôcast upÕ to a WindowRef from a GrafPtr
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function GetWindowFromPort( port: CGrafPtr ): WindowRef; external name '_GetWindowFromPort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ old accessors}
+
+{
+ * GetWindowDataHandle()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+
+{
+ * SetWindowDataHandle()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+
+{
+ * GetWindowZoomFlag()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+
+{
+ * GetWindowStructureRgn()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+
+{
+ * GetWindowContentRgn()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+
+{
+ * GetWindowUpdateRgn()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+
+{
+ * GetWindowTitleWidth()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Obsolete symbolic names }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kWindowGroupAttrSelectable = kWindowGroupAttrSelectAsLayer;
+ kWindowGroupAttrPositionFixed = kWindowGroupAttrMoveTogether;
+ kWindowGroupAttrZOrderFixed = kWindowGroupAttrLayerTogether;
+
+
+
+
+{unit Navigation}
+{
+ File: Navigation.p
+
+ Contains: Navigation Services Interfaces
+
+ Version: Technology: Navigation 3.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1996-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{#I+}
+
+
+{$ALIGN MAC68K}
+
+
+type
+ NavAskSaveChangesAction = UInt32;
+const
+ { input action codes for NavAskSaveChanges() }
+ kNavSaveChangesClosingDocument = 1;
+ kNavSaveChangesQuittingApplication = 2;
+ kNavSaveChangesOther = 0;
+
+
+type
+ NavAskSaveChangesResult = UInt32;
+const
+ { result codes for NavAskSaveChanges() }
+ kNavAskSaveChangesSave = 1;
+ kNavAskSaveChangesCancel = 2;
+ kNavAskSaveChangesDontSave = 3;
+
+
+type
+ NavAskDiscardChangesResult = UInt32;
+const
+ { result codes for NavAskDiscardChanges() }
+ kNavAskDiscardChanges = 1;
+ kNavAskDiscardChangesCancel = 2;
+
+
+type
+ NavFilterModes = SInt16;
+const
+ { which elements are being filtered for objects: }
+ kNavFilteringBrowserList = 0;
+ kNavFilteringFavorites = 1;
+ kNavFilteringRecents = 2;
+ kNavFilteringShortCutVolumes = 3;
+ kNavFilteringLocationPopup = 4; { for v1.1 or greater }
+
+
+ kNavFileOrFolderVersion = 1;
+
+
+type
+ NavFileOrFolderInfoPtr = ^NavFileOrFolderInfo;
+ NavFileOrFolderInfo = record
+ version: UInt16;
+ isFolder: boolean;
+ visible: boolean;
+ creationDate: UInt32;
+ modificationDate: UInt32;
+ case SInt16 of
+ 0: (
+ locked: boolean; { file is locked }
+ resourceOpen: boolean; { resource fork is opened }
+ dataOpen: boolean; { data fork is opened }
+ reserved1: boolean;
+ dataSize: UInt32; { size of the data fork }
+ resourceSize: UInt32; { size of the resource fork }
+ finderInfo: FInfo; { more file info: }
+ finderXInfo: FXInfo;
+ );
+ 1: (
+ shareable: boolean;
+ sharePoint: boolean;
+ mounted: boolean;
+ readable: boolean;
+ writeable: boolean;
+ reserved2: boolean;
+ numberOfFiles: UInt32;
+ finderDInfo: DInfo;
+ finderDXInfo: DXInfo;
+ folderType: OSType; { package type, For struct version >= 1 }
+ folderCreator: OSType; { package creator, For struct version >= 1 }
+ reserved3: packed array [0..205] of char;
+ );
+ end;
+
+ NavEventDataInfoPtr = ^NavEventDataInfo;
+ NavEventDataInfo = record
+ case SInt16 of
+ 0: (
+ event: EventRecordPtr; { for event processing }
+ );
+ 1: (
+ param: Ptr; { points to event specific data }
+ );
+ end;
+
+ NavEventDataPtr = ^NavEventData;
+ NavEventData = record
+ eventDataParms: NavEventDataInfo; { the event data }
+ itemHit: SInt16; { the dialog item number, for v1.1 or greater }
+ end;
+
+
+ {
+ * NavDialogRef
+ *
+ * Summary:
+ * Opaque Navigation Services dialog identifier
+ *
+ * Discussion:
+ * A NavDialogRef is an opaque reference to an instance of a
+ * Navigation Services dialog. A new NavDialogRef is returned from
+ * any of the NavCreate*Dialog functions and is later disposed with
+ * the NavDialogDispose function. NavDialogRef is the new name for
+ * the NavContext type, and thus when a client's event proc is
+ * called, the value of the NavCBRec.context field is the same as
+ * the NavDialogRef returned from the corresponding
+ * NavCreate*Dialog. A NavDialogRef is distinct from, and is not
+ * interchangable with, a Dialog Manager DialogRef.
+ }
+ NavDialogRef = ^SInt32; { an opaque 32-bit type }
+ NavDialogRefPtr = ^NavDialogRef; { when a var xx:NavDialogRef parameter can be nil, it is changed to xx: NavDialogRefPtr }
+{$ifc CALL_NOT_IN_CARBON}
+ { NavContext is the old name for NavDialogRef }
+ NavContext = NavDialogRef;
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+ {
+ * NavUserAction
+ *
+ * Summary:
+ * Indicates an action taken by the user
+ *
+ * Discussion:
+ * When the user clicks a button at the bottom of a Nav Services
+ * dialog (or makes an equivalent mouse or key gesture), a
+ * kNavCBUserAction event is sent to the client's event proc
+ * indicating which action was taken. Often, the action also
+ * dismisses the dialog. User action events are only generated when
+ * using dialogs created from a NavCreate*Dialog function. In the
+ * special case of a modeless GetFile dialog (supported only on Mac
+ * OS X), the user can option-click on the open button to keep the
+ * dialog from being dismissed, but the kNavCBUserAction event is
+ * sent so the client can get the reply record and open the selected
+ * files.
+ }
+ NavUserAction = UInt32;
+const
+ kNavUserActionNone = 0;
+ kNavUserActionCancel = 1;
+ kNavUserActionOpen = 2;
+ kNavUserActionSaveAs = 3;
+ kNavUserActionChoose = 4;
+ kNavUserActionNewFolder = 5;
+ kNavUserActionSaveChanges = 6;
+ kNavUserActionDontSaveChanges = 7;
+ kNavUserActionDiscardChanges = 8;
+ kNavUserActionReviewDocuments = 9;
+ kNavUserActionDiscardDocuments = 10;
+
+
+ kNavCBRecVersion = 1;
+
+
+ {
+ * NavCBRec
+ *
+ * Summary:
+ * A structure passed to event and preview callbacks
+ *
+ * Discussion:
+ * The NavCBRec structure is passed to the client's event proc or
+ * custom preview proc. It provides information that is specific to
+ * each event type. New for Carbon: the userAction field.
+ }
+
+type
+ NavCBRecPtr = ^NavCBRec;
+ NavCBRec = record
+ version: UInt16;
+ context: NavDialogRef;
+ window: WindowRef;
+ customRect: Rect;
+ previewRect: Rect;
+ eventData: NavEventData;
+ userAction: NavUserAction;
+ reserved: packed array [0..217] of char;
+ end;
+
+
+ {
+ * NavEventCallbackMessage
+ *
+ * Summary:
+ * Identifies the message type being sent to the client's event proc
+ }
+ NavEventCallbackMessage = SInt32;
+const
+ kNavCBEvent = 0;
+ kNavCBCustomize = 1;
+ kNavCBStart = 2;
+ kNavCBTerminate = 3;
+ kNavCBAdjustRect = 4;
+ kNavCBNewLocation = 5;
+ kNavCBShowDesktop = 6;
+ kNavCBSelectEntry = 7;
+ kNavCBPopupMenuSelect = 8;
+ kNavCBAccept = 9;
+ kNavCBCancel = 10;
+ kNavCBAdjustPreview = 11;
+ kNavCBUserAction = 12;
+ kNavCBOpenSelection = $80000000;
+
+
+type
+ NavCallBackUserData = Ptr;
+ { for events and customization: }
+{$ifc TYPED_FUNCTION_POINTERS}
+ NavEventProcPtr = procedure(callBackSelector: NavEventCallbackMessage; callBackParms: NavCBRecPtr; callBackUD: UnivPtr);
+{$elsec}
+ NavEventProcPtr = ProcPtr;
+{$endc}
+
+ { for preview support: }
+{$ifc TYPED_FUNCTION_POINTERS}
+ NavPreviewProcPtr = function(callBackParms: NavCBRecPtr; callBackUD: UnivPtr): boolean;
+{$elsec}
+ NavPreviewProcPtr = ProcPtr;
+{$endc}
+
+ { filtering callback information: }
+{$ifc TYPED_FUNCTION_POINTERS}
+ NavObjectFilterProcPtr = function(var theItem: AEDesc; info: NavFileOrFolderInfoPtr; callBackUD: UnivPtr; filterMode: NavFilterModes): boolean;
+{$elsec}
+ NavObjectFilterProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ NavEventUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ NavEventUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ NavPreviewUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ NavPreviewUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ NavObjectFilterUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ NavObjectFilterUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppNavEventProcInfo = $00000FC0;
+ uppNavPreviewProcInfo = $000003D0;
+ uppNavObjectFilterProcInfo = $00002FD0;
+ {
+ * NewNavEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewNavEventUPP(userRoutine: NavEventProcPtr): NavEventUPP; external name '_NewNavEventUPP'; { old name was NewNavEventProc }
+{
+ * NewNavPreviewUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewNavPreviewUPP(userRoutine: NavPreviewProcPtr): NavPreviewUPP; external name '_NewNavPreviewUPP'; { old name was NewNavPreviewProc }
+{
+ * NewNavObjectFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewNavObjectFilterUPP(userRoutine: NavObjectFilterProcPtr): NavObjectFilterUPP; external name '_NewNavObjectFilterUPP'; { old name was NewNavObjectFilterProc }
+{
+ * DisposeNavEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeNavEventUPP(userUPP: NavEventUPP); external name '_DisposeNavEventUPP';
+{
+ * DisposeNavPreviewUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeNavPreviewUPP(userUPP: NavPreviewUPP); external name '_DisposeNavPreviewUPP';
+{
+ * DisposeNavObjectFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeNavObjectFilterUPP(userUPP: NavObjectFilterUPP); external name '_DisposeNavObjectFilterUPP';
+{
+ * InvokeNavEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeNavEventUPP(callBackSelector: NavEventCallbackMessage; callBackParms: NavCBRecPtr; callBackUD: UnivPtr; userRoutine: NavEventUPP); external name '_InvokeNavEventUPP'; { old name was CallNavEventProc }
+{
+ * InvokeNavPreviewUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeNavPreviewUPP(callBackParms: NavCBRecPtr; callBackUD: UnivPtr; userRoutine: NavPreviewUPP): boolean; external name '_InvokeNavPreviewUPP'; { old name was CallNavPreviewProc }
+{
+ * InvokeNavObjectFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeNavObjectFilterUPP(var theItem: AEDesc; info: UnivPtr; callBackUD: UnivPtr; filterMode: NavFilterModes; userRoutine: NavObjectFilterUPP): boolean; external name '_InvokeNavObjectFilterUPP'; { old name was CallNavObjectFilterProc }
+type
+ NavCustomControlMessage = SInt32;
+const
+ kNavCtlShowDesktop = 0; { show desktop, parms = nil }
+ kNavCtlSortBy = 1; { sort key field, parms->NavSortKeyField }
+ kNavCtlSortOrder = 2; { sort order, parms->NavSortOrder }
+ kNavCtlScrollHome = 3; { scroll list home, parms = nil }
+ kNavCtlScrollEnd = 4; { scroll list end, parms = nil }
+ kNavCtlPageUp = 5; { page list up, parms = nil }
+ kNavCtlPageDown = 6; { page list down, parms = nil }
+ kNavCtlGetLocation = 7; { get current location, parms<-AEDesc* }
+ kNavCtlSetLocation = 8; { set current location, parms->AEDesc* }
+ kNavCtlGetSelection = 9; { get current selection, parms<-AEDescList* }
+ kNavCtlSetSelection = 10; { set current selection, parms->AEDescList* }
+ kNavCtlShowSelection = 11; { make selection visible, parms = nil }
+ kNavCtlOpenSelection = 12; { open view of selection, parms = nil }
+ kNavCtlEjectVolume = 13; { eject volume, parms->vRefNum }
+ kNavCtlNewFolder = 14; { create a new folder, parms->StringPtr }
+ kNavCtlCancel = 15; { cancel dialog, parms = nil }
+ kNavCtlAccept = 16; { accept dialog default, parms = nil }
+ kNavCtlIsPreviewShowing = 17; { query preview status, parms<-Boolean }
+ kNavCtlAddControl = 18; { add one control to dialog, parms->ControlHandle }
+ kNavCtlAddControlList = 19; { add control list to dialog, parms->Handle (DITL rsrc) }
+ kNavCtlGetFirstControlID = 20; { get 1st control ID, parms<-UInt16 }
+ kNavCtlSelectCustomType = 21; { select a custom menu item parms->NavMenuItemSpec* }
+ kNavCtlSelectAllType = 22; { select an "All" menu item parms->SInt16 }
+ kNavCtlGetEditFileName = 23; { get save dlog's file name parms<-StringPtr }
+ kNavCtlSetEditFileName = 24; { set save dlog's file name parms->StringPtr }
+ kNavCtlSelectEditFileName = 25; { select save dlog file name parms->ControlEditTextSelectionRec*, v1.1 or greater }
+ kNavCtlBrowserSelectAll = 26; { re-scan the browser list parms = nil, v2.0 or greater }
+ kNavCtlGotoParent = 27; { navigate to parent parms = nil, v2.0 or greater }
+ kNavCtlSetActionState = 28; { restrict navigation parms->NavActionState (flags), v2.0 or greater }
+ kNavCtlBrowserRedraw = 29; { rescan browser list parms = nil, v2.0 or greater }
+ kNavCtlTerminate = 30; { terminate/dismiss dialog parms = nil, v2.0 or greater }
+
+
+type
+ NavActionState = UInt32;
+const
+ kNavNormalState = $00000000; { normal/default state }
+ kNavDontOpenState = $00000001; { disallow opening files/folders }
+ kNavDontSaveState = $00000002; { disallow saving files }
+ kNavDontChooseState = $00000004; { disallow choosing objects }
+ kNavDontNewFolderState = $00000010; { disallow creating new folders }
+
+
+type
+ NavPopupMenuItem = UInt16;
+const
+ kNavAllKnownFiles = 0;
+ kNavAllReadableFiles = 1;
+ kNavAllFiles = 2;
+
+
+type
+ NavSortKeyField = UInt16;
+const
+ kNavSortNameField = 0;
+ kNavSortDateField = 1;
+
+
+type
+ NavSortOrder = UInt16;
+const
+ kNavSortAscending = 0;
+ kNavSortDescending = 1;
+
+
+type
+ NavDialogOptionFlags = UInt32;
+const
+ kNavDefaultNavDlogOptions = $000000E4; { use defaults for all the options }
+ kNavNoTypePopup = $00000001; { don't show file type/extension popup on Open/Save }
+ kNavDontAutoTranslate = $00000002; { don't automatically translate on Open }
+ kNavDontAddTranslateItems = $00000004; { don't add translation choices on Open/Save }
+ kNavAllFilesInPopup = $00000010; { "All Files" menu item in the type popup on Open }
+ kNavAllowStationery = $00000020; { allow saving of stationery files }
+ kNavAllowPreviews = $00000040; { allow preview to show }
+ kNavAllowMultipleFiles = $00000080; { allow multiple items to be selected }
+ kNavAllowInvisibleFiles = $00000100; { allow invisible items to be shown }
+ kNavDontResolveAliases = $00000200; { don't resolve aliases }
+ kNavSelectDefaultLocation = $00000400; { make the default location the browser selection }
+ kNavSelectAllReadableItem = $00000800; { make the dialog select "All Readable Documents" on open }
+ kNavSupportPackages = $00001000; { recognize file system packages, v2.0 or greater }
+ kNavAllowOpenPackages = $00002000; { allow opening of packages, v2.0 or greater }
+ kNavDontAddRecents = $00004000; { don't add chosen objects to the recents list, v2.0 or greater }
+ kNavDontUseCustomFrame = $00008000; { don't draw the custom area bevel frame, v2.0 or greater }
+ kNavDontConfirmReplacement = $00010000; { don't show the "Replace File?" alert on save conflict, v3.0 or greater }
+ kNavPreserveSaveFileExtension = $00020000; { extension in default file name is preserved and initially hidden, v3.1 or greater }
+
+
+type
+ NavTranslationOptions = UInt32;
+const
+ kNavTranslateInPlace = 0; { translate in place, replacing translation source file (default for Save) }
+ kNavTranslateCopy = 1; { translate to a copy of the source file (default for Open) }
+
+
+ kNavMenuItemSpecVersion = 0;
+
+
+type
+ NavMenuItemSpecPtr = ^NavMenuItemSpec;
+ NavMenuItemSpec = record
+ version: UInt16;
+ menuCreator: OSType;
+ menuType: OSType;
+ menuItemName: Str255;
+ reserved: packed array [0..244] of char;
+ end;
+
+ NavMenuItemSpecArray = array [0..0] of NavMenuItemSpec;
+ NavMenuItemSpecArrayPtr = ^NavMenuItemSpecArray;
+ NavMenuItemSpecArrayHandle = ^NavMenuItemSpecArrayPtr;
+ NavMenuItemSpecHandle = NavMenuItemSpecArrayHandle;
+
+const
+ kNavGenericSignature = $2A2A2A2A (* '****' *);
+
+
+type
+ NavTypeListPtr = ^NavTypeList;
+ NavTypeList = record
+ componentSignature: OSType_fix;
+ reserved: SInt16;
+ osTypeCount: SInt16;
+ osType: array [0..0] of OSType_fix;
+ end;
+
+ NavTypeListHandle = ^NavTypeListPtr;
+
+const
+ kNavDialogOptionsVersion = 0;
+
+
+type
+ NavDialogOptionsPtr = ^NavDialogOptions;
+ NavDialogOptions = record
+ version: UInt16;
+ dialogOptionFlags: NavDialogOptionFlags; { option flags for affecting the dialog's behavior }
+ location: Point; { top-left location of the dialog, or (-1,-1) for default position }
+ clientName: Str255;
+ windowTitle: Str255;
+ actionButtonLabel: Str255; { label of the default button (or null string for default) }
+ cancelButtonLabel: Str255; { label of the cancel button (or null string for default) }
+ savedFileName: Str255; { default name for text box in NavPutFile (or null string for default) }
+ message: Str255; { custom message prompt (or null string for default) }
+ preferenceKey: UInt32; { a key for to managing preferences for using multiple utility dialogs }
+ popupExtension: NavMenuItemSpecArrayHandle; { extended popup menu items, an array of NavMenuItemSpecs }
+ reserved: packed array [0..493] of char;
+ end;
+
+
+const
+ kNavReplyRecordVersion = 2;
+
+
+ {
+ * NavReplyRecord
+ *
+ * Summary:
+ * A structure describing the results of a Nav Services dialog
+ *
+ * Discussion:
+ * A reply record is the result of a Nav Services file dialog. Using
+ * the older API, which is always modal, the client passes the
+ * address of a reply record when invoking the dialog. In the Carbon
+ * API, dialogs may also be window modal or modeless, so the client
+ * requests the reply record by calling NavDialogGetReply when a
+ * kNavCBUserAction event is received. Either way, a reply record
+ * should be disposed of using NavDisposeReply.
+ }
+
+type
+ NavReplyRecordPtr = ^NavReplyRecord;
+ NavReplyRecord = record
+ version: UInt16;
+ validRecord: boolean;
+ replacing: boolean;
+ isStationery: boolean;
+ translationNeeded: boolean;
+ selection: AEDescList;
+ keyScript: ScriptCode;
+ fileTranslation: FileTranslationSpecArrayHandle;
+ reserved1: UInt32;
+ saveFileName: CFStringRef;
+ saveFileExtensionHidden: boolean;
+ reserved2: SInt8;
+ reserved: packed array [0..224] of char;
+ end;
+
+ {
+ * NavLoad()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function NavLoad: OSErr; external name '_NavLoad';
+
+{
+ * NavUnload()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function NavUnload: OSErr; external name '_NavUnload';
+
+{
+ * NavLibraryVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavLibraryVersion: UInt32; external name '_NavLibraryVersion';
+
+{
+ * NavGetDefaultDialogOptions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavGetDefaultDialogOptions(var dialogOptions: NavDialogOptions): OSErr; external name '_NavGetDefaultDialogOptions';
+
+
+{
+ * NavGetFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavGetFile(defaultLocation: AEDescPtr; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr; eventProc: NavEventUPP; previewProc: NavPreviewUPP; filterProc: NavObjectFilterUPP; typeList: NavTypeListHandle; callBackUD: UnivPtr): OSErr; external name '_NavGetFile';
+
+{
+ * NavPutFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavPutFile(defaultLocation: AEDescPtr; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr; eventProc: NavEventUPP; fileType: OSType; fileCreator: OSType; callBackUD: UnivPtr): OSErr; external name '_NavPutFile';
+
+{
+ * NavAskSaveChanges()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavAskSaveChanges(var dialogOptions: NavDialogOptions; action: NavAskSaveChangesAction; var reply: NavAskSaveChangesResult; eventProc: NavEventUPP; callBackUD: UnivPtr): OSErr; external name '_NavAskSaveChanges';
+
+{
+ * NavCustomAskSaveChanges()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavCustomAskSaveChanges(var dialogOptions: NavDialogOptions; var reply: NavAskSaveChangesResult; eventProc: NavEventUPP; callBackUD: UnivPtr): OSErr; external name '_NavCustomAskSaveChanges';
+
+{
+ * NavAskDiscardChanges()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavAskDiscardChanges(var dialogOptions: NavDialogOptions; var reply: NavAskDiscardChangesResult; eventProc: NavEventUPP; callBackUD: UnivPtr): OSErr; external name '_NavAskDiscardChanges';
+
+{
+ * NavChooseFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavChooseFile(defaultLocation: AEDescPtr; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr; eventProc: NavEventUPP; previewProc: NavPreviewUPP; filterProc: NavObjectFilterUPP; typeList: NavTypeListHandle; callBackUD: UnivPtr): OSErr; external name '_NavChooseFile';
+
+{
+ * NavChooseFolder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavChooseFolder(defaultLocation: AEDescPtr; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr; eventProc: NavEventUPP; filterProc: NavObjectFilterUPP; callBackUD: UnivPtr): OSErr; external name '_NavChooseFolder';
+
+{
+ * NavChooseVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavChooseVolume(defaultSelection: AEDescPtr; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr; eventProc: NavEventUPP; filterProc: NavObjectFilterUPP; callBackUD: UnivPtr): OSErr; external name '_NavChooseVolume';
+
+{
+ * NavChooseObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavChooseObject(defaultLocation: AEDescPtr; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr; eventProc: NavEventUPP; filterProc: NavObjectFilterUPP; callBackUD: UnivPtr): OSErr; external name '_NavChooseObject';
+
+{
+ * NavNewFolder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavNewFolder(defaultLocation: AEDescPtr; var reply: NavReplyRecord; dialogOptions: NavDialogOptionsPtr; eventProc: NavEventUPP; callBackUD: UnivPtr): OSErr; external name '_NavNewFolder';
+
+{
+ * NavTranslateFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavTranslateFile(var reply: NavReplyRecord; howToTranslate: NavTranslationOptions): OSErr; external name '_NavTranslateFile';
+
+{
+ * NavCompleteSave()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavCompleteSave(var reply: NavReplyRecord; howToTranslate: NavTranslationOptions): OSErr; external name '_NavCompleteSave';
+
+{
+ * NavCustomControl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavCustomControl(dialog: NavDialogRef; selector: NavCustomControlMessage; parms: UnivPtr): OSErr; external name '_NavCustomControl';
+
+{
+ * NavCreatePreview()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavCreatePreview(var theObject: AEDesc; previewDataType: OSType; previewData: UnivPtr; previewDataSize: Size): OSErr; external name '_NavCreatePreview';
+
+{
+ * NavDisposeReply()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavDisposeReply(var reply: NavReplyRecord): OSErr; external name '_NavDisposeReply';
+
+{
+ * NavServicesCanRun()
+ *
+ * Availability:
+ * Non-Carbon CFM: in NavigationLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function NavServicesCanRun: boolean; external name '_NavServicesCanRun';
+
+
+{$ifc TARGET_RT_MAC_CFM}
+{
+ NavServicesAvailable() is a macro available only in C/C++.
+ To get the same functionality from pascal or assembly, you need
+ to test if NavigationLib functions are not NULL and call NavServicesCanRun()
+ which will test if NavServices is properly installed. For instance:
+
+ gNavServicesAvailable = FALSE;
+ IF @NavLibraryVersion <> kUnresolvedCFragSymbolAddress THEN
+ gNavServicesAvailable = NavServicesCanRun;
+ end
+
+}
+{$elsec}
+ {$ifc TARGET_RT_MAC_MACHO}
+{ Navigation is always available on OS X }
+ {$elsec}
+{ NavServicesAvailable() is implemented in Navigation.o for classic 68K clients }
+ {$ifc CALL_NOT_IN_CARBON}
+{
+ * NavServicesAvailable()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NavServicesAvailable: boolean; external name '_NavServicesAvailable';
+
+ {$endc} {CALL_NOT_IN_CARBON}
+ {$endc}
+{$endc}
+
+{ Carbon API }
+{ Includes support for Unicode and long file names (where available). }
+
+
+const
+ kNavDialogCreationOptionsVersion = 0;
+
+
+ {
+ * NavDialogCreationOptions
+ *
+ * Summary:
+ * Options used to control the appearance and operation of a Nav
+ * Services dialog
+ *
+ * Discussion:
+ * NavDialogCreationOptions is a preferred replacement for
+ * NavDialogOptions. The new structure uses CFStrings in place of
+ * Pascal strings, and adds fields for setting the dialog modality
+ * and the parent window (for sheet dialogs). A
+ * NavDialogCreationOptions structure can be initialized using
+ * NavDialogGetDefaultCreationOptions. Each of the NavCreate*Dialog
+ * functions accepts a pointer to the client's
+ * NavDialogCreationOptions structure.
+ }
+
+type
+ NavDialogCreationOptionsPtr = ^NavDialogCreationOptions;
+ NavDialogCreationOptions = record
+ version: UInt16;
+ optionFlags: NavDialogOptionFlags;
+ location: Point;
+ clientName: CFStringRef;
+ windowTitle: CFStringRef;
+ actionButtonLabel: CFStringRef;
+ cancelButtonLabel: CFStringRef;
+ saveFileName: CFStringRef;
+ message: CFStringRef;
+ preferenceKey: UInt32;
+ popupExtension: CFArrayRef;
+ modality: WindowModality;
+ parentWindow: WindowRef;
+ reserved: packed array [0..15] of char;
+ end;
+
+ {
+ * NavGetDefaultDialogCreationOptions()
+ *
+ * Summary:
+ * Initialize the input structure to default values
+ *
+ * Discussion:
+ * Provided as a convenience to obtain the preferred default options
+ * for use in creating any Nav Services dialog.
+ *
+ * Parameters:
+ *
+ * outOptions:
+ * A pointer to the client-allocated options structure to
+ * initialize
+ *
+ * Result:
+ * A status code
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavGetDefaultDialogCreationOptions(var outOptions: NavDialogCreationOptions): OSStatus; external name '_NavGetDefaultDialogCreationOptions';
+
+
+{
+ * NavCreateGetFileDialog()
+ *
+ * Summary:
+ * Create a GetFile dialog
+ *
+ * Discussion:
+ * Use this function to create a dialog designed for opening
+ * document files. This function replaces NavGetFile, allowing new
+ * window modalities, and adding Unicode support. Upon successful
+ * creation, the dialog is not visible. Present and run the dialog
+ * with NavDialogRun. After the dialog is complete, dispose of it
+ * with NavDialogDispose.
+ *
+ * Parameters:
+ *
+ * inOptions:
+ * Options controlling the appearance and behavior of the dialog
+ *
+ * inTypeList:
+ * A creator signature and list of file types to show in the
+ * dialog file browser. If NULL, show all files.
+ *
+ * inEventProc:
+ * The UPP for the client's event callack, or NULL for no event
+ * callback
+ *
+ * inPreviewProc:
+ * The UPP for the client's custom file preview callback, or NULL
+ * for standard previews
+ *
+ * inFilterProc:
+ * The UPP for the client's custom filter callback, or NULL for no
+ * custom file filtering
+ *
+ * inClientData:
+ * A client-defined context value passed to all callback functions
+ *
+ * outDialog:
+ * Upon successful completion, a reference to the created dialog
+ *
+ * Result:
+ * A status code
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavCreateGetFileDialog(inOptions: {Const}NavDialogCreationOptionsPtr; inTypeList: NavTypeListHandle; inEventProc: NavEventUPP; inPreviewProc: NavPreviewUPP; inFilterProc: NavObjectFilterUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateGetFileDialog';
+
+
+{
+ * NavCreatePutFileDialog()
+ *
+ * Summary:
+ * Create a PutFile dialog
+ *
+ * Discussion:
+ * Use this function to create a dialog designed for setting the
+ * name and location of a document file prior to saving. This
+ * function replaces NavPutFile, allowing new window modalities, and
+ * adding Unicode support. Upon successful creation, the dialog is
+ * not visible. Present and run the dialog with NavDialogRun. After
+ * the dialog is complete, dispose of it with NavDialogDispose.
+ *
+ * Parameters:
+ *
+ * inOptions:
+ * Options controlling the appearance and behavior of the dialog
+ *
+ * inFileType:
+ * The type of the file to be saved. This parameter is used in
+ * conjunction with the inFileCreator parameter to look up the
+ * kind string for the Format popup menu, and to drive the
+ * identification of translation options.
+ *
+ * inFileCreator:
+ * The creator signature of the file to be saved (see inFileType
+ * parameter)
+ *
+ * inEventProc:
+ * The UPP for the client's event callack, or NULL for no event
+ * callback
+ *
+ * inClientData:
+ * A client-defined context value passed to all callback functions
+ *
+ * outDialog:
+ * Upon successful completion, a reference to the created dialog
+ *
+ * Result:
+ * A status code
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavCreatePutFileDialog(inOptions: {Const}NavDialogCreationOptionsPtr; inFileType: OSType; inFileCreator: OSType; inEventProc: NavEventUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreatePutFileDialog';
+
+
+{
+ * NavCreateAskReviewDocumentsDialog()
+ *
+ * Summary:
+ * Create an AskReviewDocumentsDialog dialog
+ *
+ * Discussion:
+ * Use this function to create a dialog which tells the user how
+ * many unsaved documents there are, and asks the user to start
+ * reviewing the documents, don't save any documents, or cancel.
+ * This dialog is appropriate to use when an application is quitting
+ * and there is more than one unsaved document. It is supported only
+ * on Mac OS X because the HI guidelines for earlier versions of Mac
+ * OS do not include this dialog as part of the application quit
+ * sequence. Upon successful creation, the dialog is not visible.
+ * Present and run the dialog with NavDialogRun. After the dialog is
+ * complete, dispose of it with NavDialogDispose. Upon dismissal of
+ * the dialog, this dialog's user action will be set to one of the
+ * following: kNavUserActionReviewDocuments,
+ * kNavUserActionDiscardDocuments, or kNavUserActionCancel.
+ *
+ * Parameters:
+ *
+ * inOptions:
+ * Options controlling the appearance and behavior of the dialog
+ *
+ * inDocumentCount:
+ * Indicates the number of documents needing review. This number
+ * appears in the text presented to the user. If for any reason
+ * the total number of unsaved documents is unknown, specify 0,
+ * and an ambiguous message will appear. Do not specifiy 1, since
+ * the HI guidelines call for this alert only when there is more
+ * than one document to be reviewed.
+ *
+ * inEventProc:
+ * The UPP for the client's event callack, or NULL for no event
+ * callback
+ *
+ * inClientData:
+ * A client-defined context value passed to all callback functions
+ *
+ * outDialog:
+ * Upon successful completion, a reference to the created dialog
+ *
+ * Result:
+ * A status code
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function NavCreateAskReviewDocumentsDialog(const (*var*) inOptions: NavDialogCreationOptions; inDocumentCount: UInt32; inEventProc: NavEventUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateAskReviewDocumentsDialog';
+
+
+{
+ * NavCreateAskSaveChangesDialog()
+ *
+ * Summary:
+ * Create an AskSaveChanges dialog
+ *
+ * Discussion:
+ * Use this function to create a dialog which asks the user to save,
+ * don't save or cancel closing a document with unsaved changes.
+ * This function replaces NavAskSaveChanges and
+ * NavCustomAskSaveChanges, allowing new window modalities, and
+ * adding Unicode support. Upon successful creation, the dialog is
+ * not visible. Present and run the dialog with NavDialogRun. After
+ * the dialog is complete, dispose of it with NavDialogDispose. To
+ * provide a customized message for the alert, specify an non-NULL
+ * message value in the options structure.
+ *
+ * Parameters:
+ *
+ * inOptions:
+ * Options controlling the appearance and behavior of the dialog
+ *
+ * inAction:
+ * Indicates this usage context for this dialog: closing a
+ * document or quitting an application. This setting affects the
+ * message text displayed to the user.
+ *
+ * inEventProc:
+ * The UPP for the client's event callack, or NULL for no event
+ * callback
+ *
+ * inClientData:
+ * A client-defined context value passed to all callback functions
+ *
+ * outDialog:
+ * Upon successful completion, a reference to the created dialog
+ *
+ * Result:
+ * A status code
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavCreateAskSaveChangesDialog(const (*var*) inOptions: NavDialogCreationOptions; inAction: NavAskSaveChangesAction; inEventProc: NavEventUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateAskSaveChangesDialog';
+
+
+{
+ * NavCreateAskDiscardChangesDialog()
+ *
+ * Summary:
+ * Create an AskDiscardChanges dialog
+ *
+ * Discussion:
+ * Use this function to create a dialog which asks the user to
+ * discard changes to a document or cancel. This is most often use
+ * when the user wants to revert a a document to the last saved
+ * revision. This function replaces NavAskDiscardChanges, allowing
+ * new window modalities, and adding Unicode support. Upon
+ * successful creation, the dialog is not visible. Present and run
+ * the dialog with NavDialogRun. After the dialog is complete,
+ * dispose of it with NavDialogDispose.
+ *
+ * Parameters:
+ *
+ * inOptions:
+ * Options controlling the appearance and behavior of the dialog
+ *
+ * inEventProc:
+ * The UPP for the client's event callack, or NULL for no event
+ * callback
+ *
+ * inClientData:
+ * A client-defined context value passed to all callback functions
+ *
+ * outDialog:
+ * Upon successful completion, a reference to the created dialog
+ *
+ * Result:
+ * A status code
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavCreateAskDiscardChangesDialog(const (*var*) inOptions: NavDialogCreationOptions; inEventProc: NavEventUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateAskDiscardChangesDialog';
+
+
+{
+ * NavCreateChooseFileDialog()
+ *
+ * Summary:
+ * Create a ChooseFile dialog
+ *
+ * Discussion:
+ * Use this function to create a dialog designed for selecting one
+ * file as the target of an operation. A ChooseFile dialog is a
+ * simple version a GetFile dialog. This function replaces
+ * NavChooseFile, allowing new window modalities, and adding Unicode
+ * support. Upon successful creation, the dialog is not visible.
+ * Present and run the dialog with NavDialogRun. After the dialog is
+ * complete, dispose of it with NavDialogDispose.
+ *
+ * Parameters:
+ *
+ * inOptions:
+ * Options controlling the appearance and behavior of the dialog
+ *
+ * inTypeList:
+ * A creator signature and list of file types to show in the
+ * dialog file browser. If NULL, show all files.
+ *
+ * inEventProc:
+ * The UPP for the client's event callack, or NULL for no event
+ * callback
+ *
+ * inPreviewProc:
+ * The UPP for the client's custom file preview callback, or NULL
+ * for standard previews
+ *
+ * inFilterProc:
+ * The UPP for the client's custom filter callback, or NULL for no
+ * custom file filtering
+ *
+ * inClientData:
+ * A client-defined context value passed to all callback functions
+ *
+ * outDialog:
+ * Upon successful completion, a reference to the created dialog
+ *
+ * Result:
+ * A status code
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavCreateChooseFileDialog(inOptions: {Const}NavDialogCreationOptionsPtr; inTypeList: NavTypeListHandle; inEventProc: NavEventUPP; inPreviewProc: NavPreviewUPP; inFilterProc: NavObjectFilterUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateChooseFileDialog';
+
+
+{
+ * NavCreateChooseFolderDialog()
+ *
+ * Summary:
+ * Create a ChooseFolder dialog
+ *
+ * Discussion:
+ * Use this function to create a dialog designed for selecting a
+ * folder as the target of an operation. This function replaces
+ * NavChooseFolder, allowing new window modalities, and adding
+ * Unicode support. Upon successful creation, the dialog is not
+ * visible. Present and run the dialog with NavDialogRun. After the
+ * dialog is complete, dispose of it with NavDialogDispose.
+ *
+ * Parameters:
+ *
+ * inOptions:
+ * Options controlling the appearance and behavior of the dialog
+ *
+ * inEventProc:
+ * The UPP for the client's event callack, or NULL for no event
+ * callback
+ *
+ * inFilterProc:
+ * The UPP for the client's custom filter callback, or NULL for no
+ * custom file filtering
+ *
+ * inClientData:
+ * A client-defined context value passed to all callback functions
+ *
+ * outDialog:
+ * Upon successful completion, a reference to the created dialog
+ *
+ * Result:
+ * A status code
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavCreateChooseFolderDialog(inOptions: {Const}NavDialogCreationOptionsPtr; inEventProc: NavEventUPP; inFilterProc: NavObjectFilterUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateChooseFolderDialog';
+
+
+{
+ * NavCreateChooseVolumeDialog()
+ *
+ * Summary:
+ * Create a ChooseVolume dialog
+ *
+ * Discussion:
+ * Use this function to create a dialog designed for selecting a
+ * volume as the target of an operation. This function replaces
+ * NavChooseVolume, allowing new window modalities, and adding
+ * Unicode support. Upon successful creation, the dialog is not
+ * visible. Present and run the dialog with NavDialogRun. After the
+ * dialog is complete, dispose of it with NavDialogDispose.
+ *
+ * Parameters:
+ *
+ * inOptions:
+ * Options controlling the appearance and behavior of the dialog
+ *
+ * inEventProc:
+ * The UPP for the client's event callack, or NULL for no event
+ * callback
+ *
+ * inFilterProc:
+ * The UPP for the client's custom filter callback, or NULL for no
+ * custom file filtering
+ *
+ * inClientData:
+ * A client-defined context value passed to all callback functions
+ *
+ * outDialog:
+ * Upon successful completion, a reference to the created dialog
+ *
+ * Result:
+ * A status code
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavCreateChooseVolumeDialog(inOptions: {Const}NavDialogCreationOptionsPtr; inEventProc: NavEventUPP; inFilterProc: NavObjectFilterUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateChooseVolumeDialog';
+
+
+{
+ * NavCreateChooseObjectDialog()
+ *
+ * Summary:
+ * Create a ChooseObject dialog
+ *
+ * Discussion:
+ * Use this function to create a dialog designed for selecting a
+ * file, folder, or volume as the target of an operation. This
+ * function replaces NavChooseObject, allowing new window
+ * modalities, and adding Unicode support. Upon successful creation,
+ * the dialog is not visible. Present and run the dialog with
+ * NavDialogRun. After the dialog is complete, dispose of it with
+ * NavDialogDispose.
+ *
+ * Parameters:
+ *
+ * inOptions:
+ * Options controlling the appearance and behavior of the dialog
+ *
+ * inEventProc:
+ * The UPP for the client's event callack, or NULL for no event
+ * callback
+ *
+ * inPreviewProc:
+ * The UPP for the client's custom file preview callback, or NULL
+ * for standard previews
+ *
+ * inFilterProc:
+ * The UPP for the client's custom filter callback, or NULL for no
+ * custom file filtering
+ *
+ * inClientData:
+ * A client-defined context value passed to all callback functions
+ *
+ * outDialog:
+ * Upon successful completion, a reference to the created dialog
+ *
+ * Result:
+ * A status code
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavCreateChooseObjectDialog(inOptions: {Const}NavDialogCreationOptionsPtr; inEventProc: NavEventUPP; inPreviewProc: NavPreviewUPP; inFilterProc: NavObjectFilterUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateChooseObjectDialog';
+
+
+{
+ * NavCreateNewFolderDialog()
+ *
+ * Summary:
+ * Create a NewFolder dialog
+ *
+ * Discussion:
+ * Use this function to create a dialog designed for creating a new
+ * folder. Nav Services creates the folder as specified by the user
+ * and returns a reference to the folder in the selection field of
+ * the reply record. This function replaces NavNewFolder, allowing
+ * new window modalities, and adding Unicode support. Upon
+ * successful creation, the dialog is not visible. Present and run
+ * the dialog with NavDialogRun. After the dialog is complete,
+ * dispose of it with NavDialogDispose.
+ *
+ * Parameters:
+ *
+ * inOptions:
+ * Options controlling the appearance and behavior of the dialog
+ *
+ * inEventProc:
+ * The UPP for the client's event callack, or NULL for no event
+ * callback
+ *
+ * inClientData:
+ * A client-defined context value passed to all callback functions
+ *
+ * outDialog:
+ * Upon successful completion, a reference to the created dialog
+ *
+ * Result:
+ * A status code
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavCreateNewFolderDialog(inOptions: {Const}NavDialogCreationOptionsPtr; inEventProc: NavEventUPP; inClientData: UnivPtr; var outDialog: NavDialogRef): OSStatus; external name '_NavCreateNewFolderDialog';
+
+
+{
+ * NavDialogRun()
+ *
+ * Summary:
+ * Show and run a Nav Services dialog
+ *
+ * Discussion:
+ * After a dialog is created with a NavCreate*Dialog function, the
+ * client can modify the dialog target folder or save file name
+ * using NavCustomControl with the appropriate selectors. The dialog
+ * is presented to the user by calling NavDialogRun. If the dialog
+ * is system modal or application modal (kWindowModalitySystemModal,
+ * kWindowModalityAppModal), NavDialogRun does not return until the
+ * dialog has been dismissed. If the dialog is modeless or window
+ * modal (kWindowModalityNone, kWindowModalityWindowModal),
+ * NavDialogRun shows the dialog and returns immediately. In order
+ * to know when the dialog has been dismissed, the client must watch
+ * for the kNavCBUserAction event sent to the client event proc.
+ * Note that on Mac OS 9 and earlier, all dialogs are modal, even if
+ * a modeless or window modal dialog is requested. However, the
+ * kNavCBUserAction event is still sent to the event proc, so it's
+ * possible to use a single programming model on OS 9 and OS X
+ * provided the client assumes NavDialogRun returns immediately
+ * after showing the dialog.
+ *
+ * Parameters:
+ *
+ * inDialog:
+ * The dialog to run
+ *
+ * Result:
+ * A status code
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavDialogRun(inDialog: NavDialogRef): OSStatus; external name '_NavDialogRun';
+
+
+{
+ * NavDialogDispose()
+ *
+ * Summary:
+ * Dispose of a Nav Services dialog
+ *
+ * Discussion:
+ * Call this function when completely finished with a Nav Services
+ * dialog. After calling NavDialogDispose, the dialog reference is
+ * no longer valid. NavDialogDispose is safe to call from within a
+ * callback to the client's Nav Services event proc.
+ *
+ * Parameters:
+ *
+ * inDialog:
+ * The dialog to dispose
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure NavDialogDispose(inDialog: NavDialogRef); external name '_NavDialogDispose';
+
+
+{
+ * NavDialogGetWindow()
+ *
+ * Summary:
+ * Return the window in which a Nav Services dialog appears
+ *
+ * Discussion:
+ * Note that a valid NavDialogRef may not have a window until
+ * NavDialogRun has been called. If no window exists for the dialog,
+ * NavDialogGetWindow returns NULL.
+ *
+ * Parameters:
+ *
+ * inDialog:
+ * Which dialog
+ *
+ * Result:
+ * The window reference
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavDialogGetWindow(inDialog: NavDialogRef): WindowRef; external name '_NavDialogGetWindow';
+
+
+{
+ * NavDialogGetUserAction()
+ *
+ * Summary:
+ * Return the current user action taken by the user
+ *
+ * Discussion:
+ * A user action occurs when the user dismisses the dialog or
+ * otherwise does something generating a reply record that the
+ * client needs to act upon. If the user has not taken such an
+ * action, NavDialogGetUserAction returns kNavUserActionNone. If the
+ * dialog is terminated using the NavCustomControl selector
+ * kNavCtlTerminate, the final user action is kNavUserActionNone.
+ * For file dialogs, if the final user action is not
+ * kNavUserActionCancel, then there is a valid reply record which
+ * can be obtained with NavDialogGetReply. Although the user action
+ * is sent to the client event proc as a kNavCBUserAction event,
+ * this function is provided as a convenience for clients of modal
+ * dialogs who may find it easier to get the user action immediately
+ * after NavDialogRun returns.
+ *
+ * Parameters:
+ *
+ * inDialog:
+ * Which dialog
+ *
+ * Result:
+ * The user action
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavDialogGetUserAction(inDialog: NavDialogRef): NavUserAction; external name '_NavDialogGetUserAction';
+
+
+{
+ * NavDialogGetReply()
+ *
+ * Summary:
+ * Fill in the provided reply record with the results of a user
+ * action such as kNavUserActionOpen, kNavUserActionSaveAs, or
+ * kNavUserActionChoose.
+ *
+ * Discussion:
+ * Call this function when a file dialog receives a user action
+ * other that implies an item or items to open, save, etc. Upon
+ * successful completion, the reply record describes the item(s)
+ * that the client needs to act upon. The reply record should later
+ * be disposed of with NavDisposeReply.
+ *
+ * Parameters:
+ *
+ * inDialog:
+ * Which dialog
+ *
+ * outReply:
+ * A pointer to the client-allocated reply record to be filled in
+ *
+ * Result:
+ * A status code
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavDialogGetReply(inDialog: NavDialogRef; var outReply: NavReplyRecord): OSStatus; external name '_NavDialogGetReply';
+
+
+{
+ * NavDialogGetSaveFileName()
+ *
+ * Summary:
+ * Return the current value of the file name to be saved in a
+ * PutFile dialog
+ *
+ * Discussion:
+ * This function can be called at any time on a valid PutFile dialog
+ * to obtain the current value of the save file name. This function
+ * is a Unicode-based replacement for the kNavCtlGetEditFileName
+ * NavCustomControl selector. On Mac OS X, the full file name is
+ * returned, including any extenison that may be hidden from the
+ * user.
+ *
+ * Parameters:
+ *
+ * inPutFileDialog:
+ * Which dialog
+ *
+ * Result:
+ * The save file name as a CFStringRef. The string is immutable. The
+ * client should retain the string if the reference is to be held
+ * beyond the life of the dialog (standard CF retain/release
+ * semantics).
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavDialogGetSaveFileName(inPutFileDialog: NavDialogRef): CFStringRef; external name '_NavDialogGetSaveFileName';
+
+
+{
+ * NavDialogSetSaveFileName()
+ *
+ * Summary:
+ * Set the current value of the file name to be saved in a PutFile
+ * dialog
+ *
+ * Discussion:
+ * This function can be called at any time to set the current save
+ * file name. Use it to set an initial name before calling
+ * NavDialogRun or to change the file name dynamically while a
+ * dialog is running. This function is a Unicode-based replacement
+ * for the kNavCtlSetEditFileName NavCustomControl selector.
+ *
+ * Parameters:
+ *
+ * inPutFileDialog:
+ * Which PutFile dialog
+ *
+ * inFileName:
+ * The file name to use
+ *
+ * Result:
+ * A status code
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NavDialogSetSaveFileName(inPutFileDialog: NavDialogRef; inFileName: CFStringRef): OSStatus; external name '_NavDialogSetSaveFileName';
+
+
+{
+ * NavDialogGetSaveFileExtensionHidden()
+ *
+ * Summary:
+ * Get the current state of the extension hiding in a PutFile dialog
+ *
+ * Discussion:
+ * This function can be called at any time to determine if a PutFile
+ * dialog is hiding the file extesion (if any) of the file to be
+ * saved.
+ *
+ * Parameters:
+ *
+ * inPutFileDialog:
+ * Which PutFile dialog
+ *
+ * Result:
+ * True if the extension is hidden, false if the extension is
+ * visible or there is no extension.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function NavDialogGetSaveFileExtensionHidden(inPutFileDialog: NavDialogRef): boolean; external name '_NavDialogGetSaveFileExtensionHidden';
+
+
+{
+ * NavDialogSetSaveFileExtensionHidden()
+ *
+ * Summary:
+ * Set the current state of the extension hiding in a PutFile dialog
+ *
+ * Discussion:
+ * This function can be called at any time to hide or show the
+ * extension of the file to be saved in a PutFile dialog. If the
+ * current file name has no extension, then hiding the extension has
+ * no effect.
+ *
+ * Parameters:
+ *
+ * inPutFileDialog:
+ * Which PutFile dialog
+ *
+ * inHidden:
+ * The new value for the hidden extension state
+ *
+ * Result:
+ * A status code
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function NavDialogSetSaveFileExtensionHidden(inPutFileDialog: NavDialogRef; inHidden: boolean): OSStatus; external name '_NavDialogSetSaveFileExtensionHidden';
+
+{$ALIGN MAC68K}
+
+
+{unit QTML}
+{
+ File: QTML.p
+
+ Contains: QuickTime Cross-platform specific interfaces
+
+ Version: Technology: QuickTime 5.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1997-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * QTMLYieldCPU()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure QTMLYieldCPU; external name '_QTMLYieldCPU';
+
+{
+ * QTMLYieldCPUTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure QTMLYieldCPUTime(milliSeconds: SInt32; flags: UInt32); external name '_QTMLYieldCPUTime';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+type
+ QTMLMutex = ^SInt32; { an opaque 32-bit type }
+ QTMLMutexPtr = ^QTMLMutex; { when a var xx:QTMLMutex parameter can be nil, it is changed to xx: QTMLMutexPtr }
+{$ifc NOT (TARGET_OS_MAC AND TARGET_API_MAC_OS8)}
+ QTMLSyncVar = ^SInt32; { an opaque 32-bit type }
+ QTMLSyncVarPtr = ^QTMLSyncVar; { when a var xx:QTMLSyncVar parameter can be nil, it is changed to xx: QTMLSyncVarPtr }
+
+const
+ kInitializeQTMLNoSoundFlag = $00000001; { flag for requesting no sound when calling InitializeQTML }
+ kInitializeQTMLUseGDIFlag = $00000002; { flag for requesting GDI when calling InitializeQTML }
+ kInitializeQTMLDisableDirectSound = $00000004; { disables QTML's use of DirectSound }
+ kInitializeQTMLUseExclusiveFullScreenModeFlag = $00000008; { later than QTML 3.0: qtml starts up in exclusive full screen mode }
+ kInitializeQTMLDisableDDClippers = $00000010; { flag for requesting QTML not to use DirectDraw clipper objects; QTML 5.0 and later }
+
+ kQTMLHandlePortEvents = $00000001; { flag for requesting requesting QTML to handle events }
+ kQTMLNoIdleEvents = $00000002; { flag for requesting requesting QTML not to send Idle Events }
+
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * InitializeQTML()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function InitializeQTML(flag: SInt32): OSErr; external name '_InitializeQTML';
+
+{
+ * TerminateQTML()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure TerminateQTML; external name '_TerminateQTML';
+
+
+{
+ * CreatePortAssociation()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CreatePortAssociation(theWnd: UnivPtr; storage: Ptr; flags: SInt32): GrafPtr; external name '_CreatePortAssociation';
+
+{
+ * DestroyPortAssociation()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure DestroyPortAssociation(cgp: CGrafPtr); external name '_DestroyPortAssociation';
+
+
+{
+ * QTMLGrabMutex()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure QTMLGrabMutex(mu: QTMLMutex); external name '_QTMLGrabMutex';
+
+{
+ * QTMLTryGrabMutex()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function QTMLTryGrabMutex(mu: QTMLMutex): boolean; external name '_QTMLTryGrabMutex';
+
+{
+ * QTMLReturnMutex()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure QTMLReturnMutex(mu: QTMLMutex); external name '_QTMLReturnMutex';
+
+{
+ * QTMLCreateMutex()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTMLCreateMutex: QTMLMutex; external name '_QTMLCreateMutex';
+
+{
+ * QTMLDestroyMutex()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure QTMLDestroyMutex(mu: QTMLMutex); external name '_QTMLDestroyMutex';
+
+
+{
+ * QTMLCreateSyncVar()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTMLCreateSyncVar: QTMLSyncVarPtr; external name '_QTMLCreateSyncVar';
+
+{
+ * QTMLDestroySyncVar()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure QTMLDestroySyncVar(p: QTMLSyncVarPtr); external name '_QTMLDestroySyncVar';
+
+{
+ * QTMLTestAndSetSyncVar()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTMLTestAndSetSyncVar(sync: QTMLSyncVarPtr): SInt32; external name '_QTMLTestAndSetSyncVar';
+
+{
+ * QTMLWaitAndSetSyncVar()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure QTMLWaitAndSetSyncVar(sync: QTMLSyncVarPtr); external name '_QTMLWaitAndSetSyncVar';
+
+{
+ * QTMLResetSyncVar()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure QTMLResetSyncVar(sync: QTMLSyncVarPtr); external name '_QTMLResetSyncVar';
+
+
+{
+ * InitializeQHdr()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure InitializeQHdr(var qhdr_: QHdr); external name '_InitializeQHdr';
+
+{
+ * TerminateQHdr()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure TerminateQHdr(var qhdr_: QHdr); external name '_TerminateQHdr';
+
+
+{
+ * QTMLAcquireWindowList()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure QTMLAcquireWindowList; external name '_QTMLAcquireWindowList';
+
+{
+ * QTMLReleaseWindowList()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure QTMLReleaseWindowList; external name '_QTMLReleaseWindowList';
+
+{
+ These routines are here to support "interrupt level" code
+ These are dangerous routines, only use if you know what you are doing.
+}
+
+{
+ * QTMLRegisterInterruptSafeThread()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTMLRegisterInterruptSafeThread(threadID: UInt32; threadInfo: UnivPtr): SInt32; external name '_QTMLRegisterInterruptSafeThread';
+
+{
+ * QTMLUnregisterInterruptSafeThread()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTMLUnregisterInterruptSafeThread(threadID: UInt32): SInt32; external name '_QTMLUnregisterInterruptSafeThread';
+
+
+{
+ * NativeEventToMacEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NativeEventToMacEvent(nativeEvent: UnivPtr; var macEvent: EventRecord): SInt32; external name '_NativeEventToMacEvent';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$ifc TARGET_OS_WIN32}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * WinEventToMacEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function WinEventToMacEvent(winMsg: UnivPtr; var macEvent: EventRecord): SInt32; external name '_WinEventToMacEvent';
+
+{
+ * IsTaskBarVisible()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function IsTaskBarVisible: boolean; external name '_IsTaskBarVisible';
+
+{
+ * ShowHideTaskBar()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure ShowHideTaskBar(showIt: boolean); external name '_ShowHideTaskBar';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+const
+ kDDSurfaceLocked = $00000001;
+ kDDSurfaceStatic = $00000002;
+
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * QTGetDDObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTGetDDObject(var lpDDObject: UnivPtr): OSErr; external name '_QTGetDDObject';
+
+{
+ * QTSetDDObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTSetDDObject(lpNewDDObject: UnivPtr): OSErr; external name '_QTSetDDObject';
+
+{
+ * QTSetDDPrimarySurface()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTSetDDPrimarySurface(lpNewDDSurface: UnivPtr; flags: UInt32): OSErr; external name '_QTSetDDPrimarySurface';
+
+
+{
+ * QTMLGetVolumeRootPath()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTMLGetVolumeRootPath(fullPath: CStringPtr; volumeRootPath: CStringPtr; volumeRootLen: UInt32): OSErr; external name '_QTMLGetVolumeRootPath';
+
+
+{
+ * QTMLSetWindowWndProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure QTMLSetWindowWndProc(theWindow: WindowRef; windowProc: UnivPtr); external name '_QTMLSetWindowWndProc';
+
+{
+ * QTMLGetWindowWndProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTMLGetWindowWndProc(theWindow: WindowRef): Ptr; external name '_QTMLGetWindowWndProc';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {TARGET_OS_WIN32}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * QTMLGetCanonicalPathName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTMLGetCanonicalPathName(inName: CStringPtr; outName: CStringPtr; outLen: UInt32): OSErr; external name '_QTMLGetCanonicalPathName';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+const
+ kFullNativePath = 0;
+ kFileNameOnly = $01;
+ kDirectoryPathOnly = $02;
+ kUFSFullPathName = $04;
+ kTryVDIMask = $08; { Used in NativePathNameToFSSpec to specify to search VDI mountpoints }
+ kFullPathSpecifiedMask = $10; { the passed in name is a fully qualified full path }
+
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * FSSpecToNativePathName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function FSSpecToNativePathName(const (*var*) inFile: FSSpec; outName: CStringPtr; outLen: UInt32; flags: SInt32): OSErr; external name '_FSSpecToNativePathName';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+const
+ kErrorIfFileNotFound = $80000000;
+
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * NativePathNameToFSSpec()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NativePathNameToFSSpec(inName: CStringPtr; var outFile: FSSpec; flags: SInt32): OSErr; external name '_NativePathNameToFSSpec';
+
+{
+ * QTGetAliasInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function QTGetAliasInfo(alias: AliasHandle; index: AliasInfoType; outBuf: CStringPtr; bufLen: SInt32; var outLen: SInt32; flags: UInt32): OSErr; external name '_QTGetAliasInfo';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc}
+
+{$ALIGN MAC68K}
+
+
+{unit TextServices}
+{
+ File: HIToolbox/TextServices.h
+
+ Contains: Text Services Manager Interfaces.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1991-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+const
+ kTextService = $74737663 (* 'tsvc' *); { component type for the component description }
+
+const
+ kTSMVersion = $0150; { Version 1.5 of the Text Services Manager }
+ kTSM15Version = kTSMVersion;
+ kTSM20Version = $0200; { Version 2.0 as of MacOSX 10.0 }
+ kTSM22Version = $0220; { Version 2.2 as of MacOSX 10.3 }
+ kTSM23Version = $0230; { Version 2.3 as of MacOSX 10.4 }
+
+
+{ Interface types for NewTSMDocument}
+type
+ InterfaceTypeList = array[0..$7F000000 div SizeOf(OSType)-1] of OSType;
+ InterfaceTypeListPtr = ^InterfaceTypeList;
+type
+ TSMDocumentInterfaceType = OSType;
+
+{
+ * Summary:
+ * InterfaceTypeList - array of OSTypes passed to NewTSMDocument to
+ * specify capabilities of the new TSMDocument.
+ *
+ * Discussion:
+ * TSM's Interface types, as of 10.3, are also stored as TSMDocument
+ * properties, so once a TSMDocument is created, you can easily find
+ * out what were its InterfaceTypes at document creation.
+ }
+const
+{
+ * This is the traditional TSMDocument type. It does not support
+ * Unicode. TSM will convert all Unicode produced by input methods to
+ * the Mac encoding represented by the current keyboard script (or
+ * the Mac encoding specified by the input method producing text.)
+ * Full Unicode input sources may not be selectable when this
+ * TSMDocument is active.
+ }
+ kTextServiceDocumentInterfaceType = kTextService; { TSM Document type for traditional (non-Unicode) NewTSMDocument }
+
+ {
+ * TSMTE document type. This requests automatic management of inline
+ * input sessions by TextEdit (the text engine.) See Technote TE27 -
+ * Inline Input for TextEdit with TSMTE.
+ }
+ kTSMTEDocumentInterfaceType = $746D5445 (* 'tmTE' *); { TSM Document type for TSMTE document (see kTSMTEInterfaceType - TSMTE.h) }
+
+ {
+ * Unicode-savvy TSMDocument. TSM will pass thru all Unicode text
+ * unchanged. When this TSMDocument is active, the full range of
+ * input sources is available to the user, such as Unicode keyboard
+ * layouts.
+ }
+ kUnicodeDocumentInterfaceType = $75646F63 (* 'udoc' *); { TSM Document type for Unicode-savvy application }
+ { Older names, to be deprecated}
+ kUnicodeDocument = kUnicodeDocumentInterfaceType; { TSM Document type for Unicode-savvy application }
+
+{
+ TextServiceClass constants supported by TSM
+ Same as component subtype for the component description
+}
+type
+ TextServiceClass = OSType;
+
+{
+ * Summary:
+ * TextService classes
+ *
+ * Discussion:
+ * Text Service classes fall in two categories or behaviors. Text
+ * services that belong to some classes are exclusive of oneanother
+ * within a given Mac script code, such input methods of the
+ * keyboard class.
+ *
+ * Input Methods of other classes are additive in nature, regardless
+ * of the current keyboard script.
+ *
+ * Within a given class and script, exclusive input methods can only
+ * be activated one at a time. Input methods in additive classes
+ * are keyboard script agnostic and can be active in parallel with
+ * other text services in the same class, such as multiple character
+ * palettes.
+ }
+const
+{
+ * Text service class for keyboard input methods. Behavior is
+ * exclusive. Input Methods in this class are normally associated
+ * with a Mac ScriptCode or Unicode, although they can be associated
+ * with several scripts by adopting the Input Mode protocol.
+ * Keyboard input methods are always visible in the System UI.
+ }
+ kKeyboardInputMethodClass = $696E706D (* 'inpm' *);
+
+ {
+ * Text service class for Ink (Handwriting) input methods. Behavior
+ * is Additive. Text Services in the Ink class do not belong to any
+ * given script in the sense that those of the Keyboard class do.
+ * Once selected, this kind of text service will remain active
+ * regardless of the current keyboard script. Although text services
+ * in this class are keyboard script agnostic, like input methods of
+ * the keyboard class they can still profess to produce only those
+ * Unicodes that are encoded in the mac encoding specified in their
+ * component description record or their implementation of the
+ * GetScriptLanguageSupport component call.
+ *
+ * Unlike input methods in the keyboard class, multiple such text
+ * services can be activate in parallel.
+ *
+ * Dictionary Service input methods are visible in the system UI by
+ * default. Use the kComponentBundleInvisibleInSystemUIKey plist key
+ * to make them invisible if a developer-provided UI is to be used
+ * instead. Mac OS X only provides System UI for Apple's Ink input
+ * method.
+ }
+ kInkInputMethodClass = $696E6B20 (* 'ink ' *);
+
+ {
+ * Text service class for Character Palette input methods. Behavior
+ * is Additive. Text Services in the character palette class do not
+ * belong to any given script in the same sense that do those of the
+ * Keyboard class. Once selected, this kind of text service will
+ * remain active regardless of the current keyboard script. Although
+ * text services in this class are keyboard script agnostic, like
+ * input methods of the keyboard class they can still profess to
+ * produce only those Unicodes that are encoded in the mac encoding
+ * specified in their component description record or their
+ * implementation of the GetScriptLanguageSupport component
+ * call.
+ *
+ * Unlike input methods in the keyboard class, multiple such text
+ * services can be activate in parallel, and unlike input methods in
+ * the Ink class, Mac OS X provides System UI to allow the user to
+ * both enable and select multiple such input methods.
+ *
+ * Use the kComponentBundleInvisibleInSystemUIKey plist key to make
+ * Character Palette input methods invisible to the System UI.
+ }
+ kCharacterPaletteInputMethodClass = $63706C74 (* 'cplt' *);
+
+ {
+ * Text Service class for Speech input methods. Behavior is
+ * Additive.
+ *
+ * Similar to Character palette class. System UI for these has not
+ * yet been determined.
+ }
+ kSpeechInputMethodClass = $766F6963 (* 'voic' *);
+
+ {
+ * Text Service class for Optical Character Recognition input
+ * methods. Behavior is Additive.
+ *
+ * Similar to Character palette class. System UI for these has not
+ * yet been determined.
+ }
+ kOCRInputMethodClass = $6F637220 (* 'ocr ' *);
+
+{ New opaque definitions for types }
+type
+ TSMDocumentID = ^SInt32; { an opaque 32-bit type }
+{ TSMDocumentID Properties}
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ TSMDocumentID Properties }
+{ With the following property APIs, you can attach any piece of data you'd like to a }
+{ TSMDocument.}
+{ to attach the data to the menu itself, and not to any specific menu item. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+type
+ TSMDocumentPropertyTag = OSType;
+
+{
+ * Summary:
+ * TSMDocument Property Tags
+ *
+ * Discussion:
+ * With the following property APIs, you can attach any piece of
+ * data you'd like to a TSMDocument. The property tags pre-defined
+ * below by TSM fall in several categories. Read-only properties:
+ * these property tags are actually the interface type used to
+ * create a TSMDocument, such as kUnicodeDocumentInterfaceType.
+ * These properties are all property value-independent... see below.
+ * Value-independent properties: these property tags are value
+ * independent. Only the fact that the tag is or is not a property
+ * of a TSMDocument is important. These are used where the
+ * existence of the property is sufficient... Read-only TSMDocment
+ * properties are examples of value independent properties.
+ * SupportGlyphInfo is another. Pass a non-NULL actualSize parameter
+ * and a NULL propertyBuffer to check if the property exists (i.e.
+ * to obtain the size.) Value-dependent properties: these are
+ * properties for which the value is meaningful. Examples of this
+ * are the Refcon ProtocolVersion properties. NOTE:
+ * Value-independent properties can read by other clients, in
+ * particular input methods. For example, input methods may want to
+ * query the current TSMDocument to see if supports unrestricted
+ * Unicode input, or if it supports the GlyphInfo protocol.
+ }
+const
+ { Property values for value-independent property tags (i.e. only the existence of}
+ { the property is meaningful). To remove these properties, use TSMRemoveDocumentProperty.}
+ { To test these properties, it is sufficient to obtain the property's size, i.e. buffer = NULL}
+ { and test for error.}
+ { Read-only (value-independent) properties}
+ { Identical to Interface types passed to NewTSMDocument}
+
+ {
+ * Property is read-only, value-independent. The value is identical
+ * to the TextServiceDocument interface type, but is not needed.
+ * Simply test for existence of the property. Property available in
+ * TSM 2.2 and later
+ }
+ kTSMDocumentTextServicePropertyTag = kTextServiceDocumentInterfaceType;
+
+ {
+ * Property is read-only, value-independent. The value is identical
+ * to the UnicodeDocument interface type, but is not needed. Simply
+ * test for existence of the property. Property available in TSM 2.2
+ * and later
+ }
+ kTSMDocumentUnicodePropertyTag = kUnicodeDocumentInterfaceType;
+
+ {
+ * Property is read-only, value-independent. The value is identical
+ * to the TSMTEDocument interface type, but is not needed. Simply
+ * test for existence of the property. Property available in TSM 2.2
+ * and later
+ }
+ kTSMDocumentTSMTEPropertyTag = kTSMTEDocumentInterfaceType; { }
+ { Settable value-independent properties}
+
+ {
+ * Property is value-independent. The existence of this property in
+ * a TSMDocument indicates that the event handlers associated with
+ * the TSMDocument are aware of TSM's GlyhInfo data structure. This
+ * structure allows the input source producing text to apply Glyph
+ * IDs, CIDs, or Fonts to subranges of text produced. This is useful
+ * for characters in Unicode private use area, such as Windings. For
+ * more information, see the Glyph Access protocol described in
+ * TechNote TN20TT. By convention, this value can be a UInt32 with a
+ * value of 0, but this is really arbitrary. Simply test for
+ * existence of the property. Property available in TSM 1.5 from
+ * MacOSX 10.2 and later
+ }
+ kTSMDocumentSupportGlyphInfoPropertyTag = $64706769 (* 'dpgi' *); { property value is arbitrary}
+
+ {
+ * Property is value-independent. The presence of this property tag
+ * indicates that the TSMDocument should use TSM's floating input
+ * window to handle input from input methods. This form of input
+ * does not support Unicode input by default, unless the
+ * UnicodeInputWindow property is set. By convention, this value can
+ * be a UInt32 with a value of 0, but this is really arbitrary.
+ * Simply test for existence of the property. Property available in
+ * TSM 2.2 and later
+ }
+ kTSMDocumentUseFloatingWindowPropertyTag = $7573776D (* 'uswm' *); { use bottom-line input (floating TSM) window for text input}
+
+ {
+ * Property is value-independent. The presence of this property tag
+ * indicates that although the TSMDocument has been told to use TSM's
+ * floating input window to handle input from input methods, the
+ * floating window is to support Unicode input. This is useful when
+ * non input-related activity is to produce Unicode, such as keyboard
+ * navigation . By convention, this value can be a UInt32 with a
+ * value of 0, but this is really arbitrary. Simply test for
+ * existence of the property. Property available in TSM 2.2 and later
+ }
+ kTSMDocumentUnicodeInputWindowPropertyTag = $64707562 (* 'dpub' *); { Unicode support in bottom line input window}
+
+ {
+ * Property is value-independent. The presence of this property tag
+ * indicates that the event handlers associated with this TSMDocument
+ * support TSM's DocumentAccess event suite (see CarbonEvents.h) This
+ * property also indicates that the handler for TSM's
+ * kEventTextInputUpdateActiveInputArea event supports the
+ * 'replaceRange' parameter and that the handler is a Carbon event
+ * handler, not an AppleEvent handler. By convention, this value can
+ * be a UInt32 with a value of 0, but this is really arbitrary.
+ * Simply test for existence of the property. Property available in
+ * TSM 2.2 and later
+ }
+ kTSMDocumentSupportDocumentAccessPropertyTag = $64617079 (* 'dapy' *); { support TSM Document Access protocol}
+ { Older names, to be deprecated}
+ kTSMDocumentPropertySupportGlyphInfo = kTSMDocumentSupportGlyphInfoPropertyTag;
+ kTSMDocumentPropertyUnicodeInputWindow = kTSMDocumentUnicodeInputWindowPropertyTag; { }
+ { Settable value-dependent properties}
+ { Property values for the following property tags are meaningful}
+
+ {
+ * Property is value-dependent. The property value initially
+ * contains the Refcon value passed to NewTSMDocument. This property
+ * is useful for changing the refcon on-the-fly after the TSMDocument
+ * has been created. The refcon value is a long, the same as that
+ * passed to NewTSMDocument. Property available in TSM 2.2 and later
+ }
+ kTSMDocumentRefconPropertyTag = $72656663 (* 'refc' *); { refcon passed to TSMDocument (UInt32)}
+
+ {
+ * Property is value-dependent. The property value indicates which
+ * input mode should be used by the current keyboard-class input
+ * method. It is useful for temporarily restricting text input to a
+ * subset of characters normally produced by an input method in a
+ * given script, such as Katakana for Japanese input. See details in
+ * TextServiceProperty API below. Also note that this property tag
+ * and value are passed unchanged to the TextServiceProperty API, so
+ * it also serves as a TextServicePropertyTag. See
+ * kTextServiceInputModePropertyTag for discussion on the values
+ * associated with this property. Usage Note: Property value is a
+ * CFStringRef. With TSMGetTextServiceProperty, the behavior is that
+ * of a Copy function. The implementation of
+ * TSMSetTextServiceProperty (in the component) retains or copies the
+ * CFString... in either case the caller is responsible for releasing
+ * its reference. Property available in TSM 2.2 and later
+ }
+ kTSMDocumentInputModePropertyTag = $696D696D (* 'imim' *); { Input mode property for input methods (CFStringRef - see Input Modes below)}
+
+ {
+ * Property is value-dependent. The property value indicates the
+ * level of the window that will host inline input sessions for a
+ * given TSMDocument. Input Methods will query this property to
+ * determine the level above which its "candidate" (floating)
+ * window(s) should be positioned, typically by adding its window to
+ * a window group (see Carbon's WindowGroup API) and incrementing the
+ * level for the group. If no level is available, the input method
+ * is expected to use the default behavior, i.e. let the Window
+ * Manager manage the level for floating windows. Window levels are
+ * typed as CGWindowLevel. NSWindow levels are accessed through
+ * NSWindow's (int)level method. Property available in TSM 2.3 and
+ * later
+ }
+ kTSMDocumentWindowLevelPropertyTag = $74776C70 (* 'twlp' *); { document window level (CGWindowLevel)}
+
+
+{
+ * TSMSetDocumentProperty()
+ *
+ * Summary:
+ * Set a TSMDocument property
+ *
+ * Discussion:
+ * With the following property APIs, you can attach any piece of
+ * data you'd like to a TSMDocument. Other uses include setting a
+ * (value-independent) property for input methods to query in order
+ * to determine an application's compliance with various TSM
+ * protocols. NOTE: Property values are currently typed as SInt32,
+ * but should really be a void* since a variety of data types are
+ * used in practice. Note that the semantics for refcounted objects
+ * is ambiguous, so retain/release model is discussed for each
+ * TSM-defined property individually. (See notes for
+ * TSMDocumentPropertyTag) Error Codes (MacErrors.h):
+ * tsmComponentPropertyUnsupportedErr tsmInputModeChangeFailedErr
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function TSMSetDocumentProperty( docID: TSMDocumentID; propertyTag: TSMDocumentPropertyTag; propertySize: UInt32; propertyData: UnivPtr ): OSStatus; external name '_TSMSetDocumentProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * TSMGetDocumentProperty()
+ *
+ * Summary:
+ * Get a TSMDocument property
+ *
+ * Discussion:
+ * With the following property APIs, you can attach any piece of
+ * data you'd like to a TSMDocument. Other uses include setting a
+ * (value-independent) property for input methods to query in order
+ * to determine an application's compliance with various TSM
+ * protocols. NOTE: Property values are currently typed as SInt32,
+ * but should really be a void* since a variety of data types are
+ * used in practice. Note that the semantics for refcounted objects
+ * is ambiguous, so retain/release model is discussed for each
+ * TSM-defined property individually. (See notes for
+ * TSMDocumentPropertyTag) Error Codes (MacErrors.h)
+ * tsmDocPropertyNotFoundErr tsmDocPropertyBufferTooSmallErr
+ * tsmComponentPropertyNotFoundErr tsmComponentPropertyUnsupportedErr
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function TSMGetDocumentProperty( docID: TSMDocumentID; propertyTag: TSMDocumentPropertyTag; bufferSize: UInt32; var actualSize: UInt32; propertyBuffer: UnivPtr { can be NULL } ): OSStatus; external name '_TSMGetDocumentProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * TSMRemoveDocumentProperty()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function TSMRemoveDocumentProperty( docID: TSMDocumentID; propertyTag: TSMDocumentPropertyTag ): OSStatus; external name '_TSMRemoveDocumentProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{ Language and Script constants}
+const
+ kUnknownLanguage = $FFFF;
+ kUnknownScript = $FFFF;
+ kNeutralScript = $FFFF;
+
+
+const
+{ Component Flags in ComponentDescription }
+ bTakeActiveEvent = 15; { bit set if the component takes active event }
+ bHandleAERecording = 16; { bit set if the component takes care of recording Apple Events <new in vers2.0> }
+ bScriptMask = $00007F00; { bit 8 - 14 }
+ bLanguageMask = $000000FF; { bit 0 - 7 }
+ bScriptLanguageMask = bScriptMask + bLanguageMask; { bit 0 - 14 }
+
+
+const
+{ Low level routines which are dispatched directly to the Component Manager }
+ kCMGetScriptLangSupport = $0001; { Component Manager call selector 1 }
+ kCMInitiateTextService = $0002; { Component Manager call selector 2 }
+ kCMTerminateTextService = $0003; { Component Manager call selector 3 }
+ kCMActivateTextService = $0004; { Component Manager call selector 4 }
+ kCMDeactivateTextService = $0005; { Component Manager call selector 5 }
+ kCMTextServiceEvent = $0006; { Component Manager call selector 6 }
+ kCMTextServiceEventRef = kCMTextServiceEvent;
+ kCMGetTextServiceMenu = $0007; { Component Manager call selector 7 }
+ kCMTextServiceMenuSelect = $0008; { Component Manager call selector 8 }
+ kCMFixTextService = $0009; { Component Manager call selector 9 }
+ kCMSetTextServiceCursor = $000A; { Component Manager call selector 10 }
+ kCMHidePaletteWindows = $000B; { Component Manager call selector 11 }
+ kCMGetTextServiceProperty = $000C; { Component Manager call selector 12 }
+ kCMSetTextServiceProperty = $000D; { Component Manager call selector 13 }
+ kCMUCTextServiceEvent = $000E; { Component Manager call selector 14 }
+ kCMCopyTextServiceInputModeList = $000F; { Component Manager call selector 15 }
+ kCMInputModePaletteItemHit = $0010; { Component Manager call selector 16 }
+ kCMGetInputModePaletteMenu = $0011; { Component Manager call selector 17 }
+
+
+{ extract Script/Language code from Component flag ... }
+// #define mGetScriptCode(cdRec) ((ScriptCode) ((cdRec.componentFlags & bScriptMask) >> 8))
+// #define mGetLanguageCode(cdRec) ((LangCode) cdRec.componentFlags & bLanguageMask)
+
+{ Text Service Info List }
+type
+ TextServiceInfo = record
+ fComponent: Component;
+ fItemName: Str255;
+ end;
+ TextServiceInfoPtr = ^TextServiceInfo;
+type
+ TextServiceList = record
+ fTextServiceCount: SInt16; { number of entries in the 'fServices' array }
+ fServices: array [0..0] of TextServiceInfo; { Note: array of 'TextServiceInfo' records follows }
+ end;
+ TextServiceListPtr = ^TextServiceList;
+type
+ TextServiceListHandle = ^TextServiceListPtr;
+ ScriptLanguageRecord = record
+ fScript: ScriptCode;
+ fLanguage: LangCode;
+ end;
+ ScriptLanguageRecordPtr = ^ScriptLanguageRecord;
+type
+ ScriptLanguageSupport = record
+ fScriptLanguageCount: SInt16; { number of entries in the 'fScriptLanguageArray' array }
+ fScriptLanguageArray: array [0..0] of ScriptLanguageRecord; { Note: array of 'ScriptLanguageRecord' records follows }
+ end;
+ ScriptLanguageSupportPtr = ^ScriptLanguageSupport;
+type
+ ScriptLanguageSupportHandle = ^ScriptLanguageSupportPtr;
+ TSMGlyphInfo = record
+ range: CFRange; { two SInt32s}
+ fontRef: ATSFontRef;
+ collection: UInt16; { kGlyphCollectionXXX enum}
+ glyphID: UInt16; { GID (when collection==0) or CID}
+ end;
+type
+ TSMGlyphInfoArray = record
+ numGlyphInfo: ItemCount; { UInt32}
+ glyphInfo: array[0..$7F000000 div SizeOf(TSMGlyphInfo)-1] of TSMGlyphInfo;
+ end;
+
+{ High level TSM Doucment routines }
+{
+ * NewTSMDocument()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function NewTSMDocument( numOfInterface: SInt16; supportedInterfaceTypes: {variable-size-array} InterfaceTypeListPtr; var idocID: TSMDocumentID; refcon: SInt32 ): OSErr; external name '_NewTSMDocument';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DeleteTSMDocument()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function DeleteTSMDocument( idocID: TSMDocumentID ): OSErr; external name '_DeleteTSMDocument';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ActivateTSMDocument()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function ActivateTSMDocument( idocID: TSMDocumentID ): OSErr; external name '_ActivateTSMDocument';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DeactivateTSMDocument()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function DeactivateTSMDocument( idocID: TSMDocumentID ): OSErr; external name '_DeactivateTSMDocument';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * FixTSMDocument()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function FixTSMDocument( idocID: TSMDocumentID ): OSErr; external name '_FixTSMDocument';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetServiceList()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetServiceList( numOfInterface: SInt16; {const} supportedInterfaceTypes: {variable-size-array} InterfaceTypeListPtr; var serviceInfo: TextServiceListHandle; var seedValue: SInt32 ): OSErr; external name '_GetServiceList';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * OpenTextService()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function OpenTextService( idocID: TSMDocumentID; aComponent: Component; var aComponentInstance: ComponentInstance ): OSErr; external name '_OpenTextService';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CloseTextService()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function CloseTextService( idocID: TSMDocumentID; aComponentInstance: ComponentInstance ): OSErr; external name '_CloseTextService';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SendAEFromTSMComponent()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function SendAEFromTSMComponent( const (*var*) theAppleEvent: AppleEvent; var reply: AppleEvent; sendMode: AESendMode; sendPriority: AESendPriority; timeOutInTicks: SInt32; idleProc: AEIdleUPP; filterProc: AEFilterUPP ): OSErr; external name '_SendAEFromTSMComponent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SendTextInputEvent()
+ *
+ * Discussion:
+ * This API replaces SendAEFromTSMComponent on Mac OS X only. Input
+ * Methods on Mac OS X are Carbon Event based instead of AppleEvent
+ * based. The Carbon TextInput events which they generate are
+ * provided to TSM for dispatching via this API.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib N.e.v.e.r and later
+ * Non-Carbon CFM: not available
+ }
+function SendTextInputEvent( inEvent: EventRef ): OSStatus; external name '_SendTextInputEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDefaultInputMethod()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function SetDefaultInputMethod( ts: Component; var slRecordPtr: ScriptLanguageRecord ): OSErr; external name '_SetDefaultInputMethod';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDefaultInputMethod()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetDefaultInputMethod( var ts: Component; var slRecordPtr: ScriptLanguageRecord ): OSErr; external name '_GetDefaultInputMethod';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetTextServiceLanguage()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function SetTextServiceLanguage( var slRecordPtr: ScriptLanguageRecord ): OSErr; external name '_SetTextServiceLanguage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetTextServiceLanguage()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetTextServiceLanguage( var slRecordPtr: ScriptLanguageRecord ): OSErr; external name '_GetTextServiceLanguage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * UseInputWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function UseInputWindow( idocID: TSMDocumentID; useWindow: Boolean ): OSErr; external name '_UseInputWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TSMSetInlineInputRegion()
+ *
+ * Summary:
+ * Tell TSM what region and which window make up the inline input
+ * session.
+ *
+ * Discussion:
+ * Tell TSM about the region occupied by an inline input session. If
+ * the location of certain mouse events (clicks, mouse moved) occur
+ * within the specified inline input region, TSM will forward these
+ * events to the current Input Method so that it can interact with
+ * the user. Note: If you do not specify this information, TSM will
+ * need to intercept mouse events in the entire content region as
+ * the default, when an input method is active, in order to ensure
+ * that input methods can manage user interaction properly.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inTSMDocument:
+ * The document.
+ *
+ * inWindow:
+ * The window that contains the inline input session. You can pass
+ * NULL for this parameter to indicate the user focus window.
+ *
+ * inRegion:
+ * The region occupied by the current inline input region. This
+ * should be in the coordinates of the port associated with the
+ * window you passed to inPort. It will need to be recomputed when
+ * the text content of the inline input session content changes
+ * (i.e. due to Update Active Input Area events) and when the
+ * region moves for other reasons, such as window resized,
+ * scrolling, etc. If you pass a NULL region for this parameter,
+ * TSM will default to intercept mouse events in the focus
+ * window's content region.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function TSMSetInlineInputRegion( inTSMDocument: TSMDocumentID; inWindow: WindowRef; inRegion: RgnHandle ): OSStatus; external name '_TSMSetInlineInputRegion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Following calls from Classic event loops not needed for Carbon clients. }
+{
+ * TSMEvent()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * TSMMenuSelect()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * SetTSMCursor()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{ Following ServiceWindow API replaced by Window Manager API in Carbon. }
+{
+ * NewServiceWindow()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * CloseServiceWindow()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * GetFrontServiceWindow()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * FindServiceWindow()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * NewCServiceWindow()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ }
+
+
+{ Explicit initialization not needed for Carbon clients, since TSM is }
+{ instanciated per-context. }
+{
+ * InitTSMAwareApplication()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * CloseTSMAwareApplication()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{ Component Manager Interfaces to Input Methods }
+{
+ * GetScriptLanguageSupport()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetScriptLanguageSupport( ts: ComponentInstance; var scriptHdl: ScriptLanguageSupportHandle ): ComponentResult; external name '_GetScriptLanguageSupport';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * InitiateTextService()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function InitiateTextService( ts: ComponentInstance ): ComponentResult; external name '_InitiateTextService';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TerminateTextService()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function TerminateTextService( ts: ComponentInstance ): ComponentResult; external name '_TerminateTextService';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ActivateTextService()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function ActivateTextService( ts: ComponentInstance ): ComponentResult; external name '_ActivateTextService';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DeactivateTextService()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function DeactivateTextService( ts: ComponentInstance ): ComponentResult; external name '_DeactivateTextService';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetTextServiceMenu()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetTextServiceMenu( ts: ComponentInstance; var serviceMenu: MenuRef ): ComponentResult; external name '_GetTextServiceMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ New Text Service call in Carbon. }
+{ Note: Only Raw Key and Mouse-flavored events are passed to Text Services on MacOS X. }
+{
+ * TextServiceEventRef()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function TextServiceEventRef( ts: ComponentInstance; event: EventRef ): ComponentResult; external name '_TextServiceEventRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TextServiceEvent()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * UCTextServiceEvent()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ }
+
+
+{
+ * TextServiceMenuSelect()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * SetTextServiceCursor()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * FixTextService()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function FixTextService( ts: ComponentInstance ): ComponentResult; external name '_FixTextService';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HidePaletteWindows()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function HidePaletteWindows( ts: ComponentInstance ): ComponentResult; external name '_HidePaletteWindows';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ Text Service Properties and standard values
+ (used with GetTextServiceProperty/SetTextServiceProperty)
+}
+
+type
+ TextServicePropertyTag = OSType;
+
+{
+ * Summary:
+ * TextService Properties
+ *
+ * Discussion:
+ * Text Service properties are passed directly to a text service
+ * component via Component Mgr glue provided by TSM. Applications
+ * that have special knowledge of specific input methods can
+ * communicate private properties between each other. The 2
+ * following errors have been introduced (as of Mac OS X 10.3) to
+ * better support these API: tsmComponentPropertyUnsupportedErr //
+ * SetTextServiceProperty failed tsmComponentPropertyNotFoundErr
+ * // GetTextServiceProperty failed
+ }
+const
+{ Typing input mode property tag }
+
+ {
+ * The JaTypingMethod property is becoming obsolete. It was
+ * introduced as a way for the Setup Assistant to tell Apple's
+ * Kotoeri (Japanese) input method to switch to either Roman or
+ * Katakana input mode in certain text fields. The entire input mode
+ * mechanism is being superceded by kTextServiceInputModePropertyTag.
+ * Property available in TSM 1.5 on MacOSX 10.0 and later
+ }
+ kTextServiceJaTypingMethodPropertyTag = $6A747970 (* 'jtyp' *); { Japanese input method typing property}
+
+ {
+ * The InputMode property is a CFStringRef that uniquely identifies
+ * which input mode should be made current by a keyboard class input
+ * method, if possible. Input modes are either generic, i.e.
+ * pre-defined by TSM, or specific to an input method. An example of
+ * a generic input mode is Katakana input (Japanese) where input in a
+ * text field needs to be restricted to that character subset.
+ * Another is Roman input mode. This is useful to temporarily
+ * provide Roman input from an input method that normally allows text
+ * input in another script. The advantage to this over forcing the
+ * keyboard script to Roman is that the same input method's UI
+ * continues to be available to the user, even though the input
+ * script has changed. An example of a special input mode (input
+ * method specific) is Hanin input mode in Traditional Chinese input
+ * methods. To temporarily change the current input mode from
+ * whatever it is to a generic one, use GetTextServiceProperty to
+ * obtain the current input mode, then SetTextServiceProperty to
+ * switch to the generic mode, and when done restore the original
+ * input mode. Input Methods themselves make known what input modes
+ * they support via the CopyTextServiceInputModeList component call.
+ * If the input method does not support a specified inputMode,
+ * GetTextServiceProperty and SetTextServiceProperty will return
+ * tsmComponentPropertyUnsupportedErr. GetTextServiceProperty will
+ * return tsmComponentPropertyNotFoundErr. RemoveTextServiceProperty
+ * is not supported with this tag. NOTE: This property tag is
+ * identical to the kTSMDocumentInputModePropertyTag passed to the
+ * TSMDocumentProperty API. This allows the tag and value to be
+ * passed through without interpretation. NOTE: Input modes
+ * CFStringRef's are cast to SInt32 in these API. Property available
+ * in TSM 2.2 and later Error Codes (MacErrors.h)
+ * tsmComponentPropertyUnsupportedErr - SetTextServiceProperty does
+ * not support the specified inputMode. tsmInputModeChangeFailedErr -
+ * can be returned if an input method failed to succeed in switching
+ * to the requested input mode.
+ }
+ kTextServiceInputModePropertyTag = kTSMDocumentInputModePropertyTag; { input mode property for input methods}
+ { NOTE: This property is being deprecated. Use kTextServiceInputModePropertyTag instead. }
+ kIMJaTypingMethodProperty = kTextServiceJaTypingMethodPropertyTag; { Typing method property for Japanese input methods}
+ { Typing method property values for kTextServiceJaTypingMethodPropertyTag }
+ kIMJaTypingMethodRoman = $726F6D61 (* 'roma' *); { Roman typing}
+ kIMJaTypingMethodKana = $6B616E61 (* 'kana' *); { Kana typing}
+
+type
+ TextServicePropertyValue = SInt32;
+
+{
+ Generic, restricted, input modes
+ Used as values for kTextServiceInputModePropertyTag TextServiceProperty API.
+ These values require a cast from CFStringRef to SInt32.
+}
+
+{ Restrict output to Roman characters only}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModeRoman CFSTRP('com.apple.inputmethod.Roman')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModePassword CFSTRP('com.apple.inputmethod.Password')}
+{$endc}
+{ Restrict output to Hiragana characters only (no conversion to Kanji, i.e. yomi)}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModeJapaneseHiragana CFSTRP('com.apple.inputmethod.Japanese.Hiragana')}
+{$endc}
+{ Restrict output to Katakana characters only (no conversion to Kanji)}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModeJapaneseKatakana CFSTRP('com.apple.inputmethod.Japanese.Katakana')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModeJapaneseFullWidthRoman CFSTRP('com.apple.inputmethod.Japanese.FullWidthRoman')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModeJapaneseHalfWidthKana CFSTRP('com.apple.inputmethod.Japanese.HalfWidthKana')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModeJapanesePlaceName CFSTRP('com.apple.inputmethod.Japanese.PlaceName')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModeJapaneseFirstName CFSTRP('com.apple.inputmethod.Japanese.FirstName')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModeJapaneseLastName CFSTRP('com.apple.inputmethod.Japanese.LastName')}
+{$endc}
+{ Restrict output to Bopomofo characters only (no conversion to Han)}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModeBopomofo CFSTRP('com.apple.inputmethod.TradChinese.Bopomofo')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModeTradChinesePlaceName CFSTRP('com.apple.inputmethod.TradChinese.PlaceName')}
+{$endc}
+{ Restrict output to Hangul syllables only (no conversion to Hanja)}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModeHangul CFSTRP('com.apple.inputmethod.Korean.Hangul')}
+{$endc}
+{
+ Generic, unrestricted, Input Mode strings
+ Used as values for kTextServiceInputModePropertyTag in TextServiceProperty API.
+ Unrestricted Japanese output
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModeJapanese CFSTRP('com.apple.inputmethod.Japanese')}
+{$endc}
+{ Traditional Chinese generic (unrestricted) input mode}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModeTradChinese CFSTRP('com.apple.inputmethod.TradChinese')}
+{$endc}
+{ Simplified Chinese generic (unrestricted) input mode}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModeSimpChinese CFSTRP('com.apple.inputmethod.SimpChinese')}
+{$endc}
+{ Korean generic (unrestricted) output (i.e. Hanja possible)}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTextServiceInputModeKorean CFSTRP('com.apple.inputmethod.Korean')}
+{$endc}
+
+
+{
+ * GetTextServiceProperty()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function GetTextServiceProperty( ts: ComponentInstance; inPropertyTag: TextServicePropertyTag; var outPropertyValue: TextServicePropertyValue ): ComponentResult; external name '_GetTextServiceProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetTextServiceProperty()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function SetTextServiceProperty( ts: ComponentInstance; inPropertyTag: TextServicePropertyTag; inPropertyValue: TextServicePropertyValue ): ComponentResult; external name '_SetTextServiceProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CopyTextServiceInputModeList()
+ *
+ * Summary:
+ * Obtain a copy of the set of input modes supported by a
+ * keyboard-class input method.
+ *
+ * Discussion:
+ * This Component call is only intended to be supported by input
+ * methods that adopt the Input Mode protocol. If this component
+ * call is not supported by an input method, calls to the
+ * TextServiceProperty API with the kTextServiceInputModePropertyTag
+ * property will fail with tsmComponentPropertyUnsupportedErr. Below
+ * is the layout of the CFDictionary returned. <dict> <key>
+ * kTSInputModeListKey </key> <dict> <key> modeSignature : (internal
+ * ascii name) </key> <!-- This can be any of the generic input
+ * modes defined in this file, --> <!-- such as
+ * kTextServiceInputModeRoman, or can be a private input --> <!--
+ * mode such as CFSTR(
+ * "com.apple.MyInputmethod.Japanese.CoolInputMode" ) --> <dict>
+ * <key>menuIconFile</key> <string> (path for menu icon image file)
+ * </string> <key>alternateMenuIconFile</key> <string> (path for
+ * alternate menu icon image file -- when item is hilited) </string>
+ * <key>paletteIconFile</key> <string> (path for palette icon image
+ * file) </string> <key>defaultState</key> <boolean> (default on/off
+ * state) </boolean> <key>script</key> <string> (scriptCode string
+ * for this mode, i.e. "smRoman", "smJapanese", ...) </string>
+ * <key>primaryInScript</key> <boolean> (true if this is primary
+ * mode in this script) </boolean> <key>isVisible</key> <boolean>
+ * (true if this input mode should appear in System UI) </boolean>
+ * <key>keyEquivalentModifiers</key> <integer> (modifiers)
+ * </integer> <key>keyEquivalent</key> <string> (key equivalent
+ * character) </string> <key>JISKeyboardShortcut</key> <integer>
+ * (optional: 0=none,1=hiragana,2=katakana,3=eisu) </integer>
+ * </dict> </dict> <key> kTSVisibleInputModeOrderedArrayKey </key>
+ * <!-- This array defines the ordering (for UI purposes) of input
+ * modes that are --> <!-- both visible and enabled (either by
+ * default, i.e. by the System, or by --> <!-- the user, i.e. via
+ * System provided UI) --> <array> <value> modeSignature </value>
+ * </array> </dict> Available in TSM 2.2 and later Important: This
+ * dictionary must also be present in the component bundle's
+ * Info.plist, in addition to being available through this component
+ * call. This will allow retrival of input modes by the System
+ * without opening the component. The component call will be used
+ * whenever the System is notified of a change in the contents of
+ * the inputMode list, such as when the name or key-equivalents of
+ * individual input modes have changed. Note: If, when the
+ * input method is first activated in a login session, the settings
+ * of the individual input modes (names or key-equivalents) differ
+ * from the default settings as found in the component bundle's
+ * Info.plist, the System will need to be notified of the change.
+ * The input method does this by sending out a
+ * kEventTextInputInputMenuChanged Carbon event, just as it is when
+ * the change originally took place.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function CopyTextServiceInputModeList( ts: ComponentInstance; var outInputModes: CFDictionaryRef ): ComponentResult; external name '_CopyTextServiceInputModeList';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ Key for InputMode dictionary in Component bundle's Info.plist
+ Value is a dictionary describing the set of input modes implemented by the component.
+ The supported keys in this dictionary are:
+ kTSInputModeListKey
+ kTSVisibleInputModeOrderedArrayKey
+ See CopyTextServiceInputModeList() for more details.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kComponentBundleInputModeDictKey CFSTRP('ComponentInputModeDict')}
+{$endc}
+
+{
+ Key for dictionary of individual input modes
+ NOTE: This key is used both in the Component bundle's Info.plist dictionary and the dictionary
+ returned by the CopyTextServiceInputModeList() component call.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModeListKey CFSTRP('tsInputModeListKey')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModeMenuIconFileKey CFSTRP('tsInputModeMenuIconFileKey')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModeAlternateMenuIconFileKey CFSTRP('tsInputModeAlternateMenuIconFileKey')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModePaletteIconFileKey CFSTRP('tsInputModePaletteIconFileKey')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModeDefaultStateKey CFSTRP('tsInputModeDefaultStateKey')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModeScriptKey CFSTRP('tsInputModeScriptKey')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModePrimaryInScriptKey CFSTRP('tsInputModePrimaryInScriptKey')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModeIsVisibleKey CFSTRP('tsInputModeIsVisibleKey')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModeKeyEquivalentModifiersKey CFSTRP('tsInputModeKeyEquivalentModifiersKey')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModeKeyEquivalentKey CFSTRP('tsInputModeKeyEquivalentKey')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModeJISKeyboardShortcutKey CFSTRP('tsInputModeJISKeyboardShortcutKey')}
+{$endc}
+{
+ Key for array of visible input modes to determine UI ordering
+ NOTE: This key is intended to be used both in the Component bundle's Info.plist dictionary and in
+ in the dictionary returned by the CopyTextServiceInputModeList() component call. In the latter
+ case, the array should contain only the set of visible input modes that are also enabled.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSVisibleInputModeOrderedArrayKey CFSTRP('tsVisibleInputModeOrderedArrayKey')}
+{$endc}
+
+{
+ Key for Component bundle's Info.plist, controls visibility in System UI.
+ Value is a CFBoolean.
+ NOTE: Keyboard input methods are always visible in System UI.
+}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kComponentBundleInvisibleInSystemUIKey CFSTRP('ComponentInvisibleInSystemUI')}
+{$endc}
+
+{
+ * TSMCopyInputMethodEnabledInputModes()
+ *
+ * Summary:
+ * Obtain the array of a component's enabled (and visible) input
+ * modes.
+ *
+ * Discussion:
+ * The intended use of this API is to allow an input method to query
+ * the System for the subset of its own input modes that are
+ * enabled, so that the component's own UI can ommit input modes
+ * disabled by the user or the System. This API is only meaningful
+ * for input methods that adopt the Input Mode protocol. If the
+ * component passed is not inputMode-savvy, the returned array will
+ * be NULL. The enabled input modes returned in the array are always
+ * visible ones, i.e. those input modes for which
+ * kTSInputModeIsVisibleKey is true because non-visible input modes
+ * are not tracked by the System. It is the responsibility of the
+ * caller to release the returned array. <array> <value>
+ * modeSignature : (internal ascii name) </value> </array> Available
+ * in TSM 2.2 and later
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TSMCopyInputMethodEnabledInputModes( inComponent: Component; var outInputModeArray: CFArrayRef ): Boolean; external name '_TSMCopyInputMethodEnabledInputModes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * TSMSelectInputMode()
+ *
+ * Summary:
+ * Make the specified input method input mode the current input
+ * source.
+ *
+ * Discussion:
+ * The intended use of this API is to allow an input method to
+ * select one of its own input modes as the current input source and
+ * update the TextInput menu icon in the menubar. This API is only
+ * meaningful for input methods that adopt TSM's Input Mode
+ * protocol. Available in TSM 2.2 and later
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TSMSelectInputMode( inComponent: Component; inInputMode: CFStringRef ): OSStatus; external name '_TSMSelectInputMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ Get the active TSMDocument in the current application context. }
+{ If TSM has enabled bottom line input mode because no TSMDocument }
+{ is active, NULL will be returned. }
+{
+ * TSMGetActiveDocument()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TSMGetActiveDocument: TSMDocumentID; external name '_TSMGetActiveDocument';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDefaultInputMethodOfClass()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDefaultInputMethodOfClass( var aComp: Component; var slRecPtr: ScriptLanguageRecord; tsClass: TextServiceClass ): OSStatus; external name '_GetDefaultInputMethodOfClass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * SetDefaultInputMethodOfClass()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDefaultInputMethodOfClass( aComp: Component; var slRecPtr: ScriptLanguageRecord; tsClass: TextServiceClass ): OSStatus; external name '_SetDefaultInputMethodOfClass';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * SelectTextService()
+ *
+ * Summary:
+ * Select a text service component
+ *
+ * Discussion:
+ * This API is currently only intended for use by input methods in
+ * text service classes which are "additive" in nature, that is
+ * where the input method can operate in parallel to other input
+ * methods in the same class and other additive text service
+ * classes. An example of such a class is the Character Palette
+ * class. It is not for use by traditional input methods, such as
+ * those that belong to the keyboard input method class.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function SelectTextService( aComp: Component ): OSStatus; external name '_SelectTextService';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * DeselectTextService()
+ *
+ * Summary:
+ * Deselect a text service component
+ *
+ * Discussion:
+ * See SelectTextService.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: not available
+ }
+function DeselectTextService( aComp: Component ): OSStatus; external name '_DeselectTextService';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * IsTextServiceSelected()
+ *
+ * Summary:
+ * Checks if a text service component is selected
+ *
+ * Discussion:
+ * See SelectTextService.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function IsTextServiceSelected( aComp: Component ): Boolean; external name '_IsTextServiceSelected';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{$ifc OLDROUTINENAMES}
+const
+ kInputMethodService = kKeyboardInputMethodClass;
+
+const
+ kUnicodeTextService = $75747376 (* 'utsv' *); { Component type for Unicode Text Service }
+
+{$endc} { OLDROUTINENAMES }
+
+
+{-------------------------------------------}
+{ Input Mode Palette configuration routines }
+{-------------------------------------------}
+
+{
+ * TSMInputModePaletteLoadButtons()
+ *
+ * Discussion:
+ * Notifies the Input Mode Palette of changes in an input method's
+ * controls. Replaces the current controls with the new control
+ * array.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * paletteButtonsArray:
+ * CFArray containing descriptions of the controls. Each control
+ * is described using a CFDictionary, using the keys described
+ * below.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+procedure TSMInputModePaletteLoadButtons( paletteButtonsArray: CFArrayRef ); external name '_TSMInputModePaletteLoadButtons';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * TSMInputModePaletteUpdateButtons()
+ *
+ * Discussion:
+ * Notifies the Input Mode Palette of updates in an input method's
+ * controls. Will update controls based on the control tag ID.
+ * Does not replace/remove existing controls.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * paletteButtonsArray:
+ * CFArray containing descriptions of the controls. Each control
+ * is described using a CFDictionary, using the keys described
+ * below.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+procedure TSMInputModePaletteUpdateButtons( paletteButtonsArray: CFArrayRef ); external name '_TSMInputModePaletteUpdateButtons';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{----------------------------------------------------------------------------}
+{ CFDictionary keys used to build the control description passed }
+{ to TSMInputModePaletteLoadButtons() and TSMInputModePaletteUpdateButtons() }
+{----------------------------------------------------------------------------}
+
+
+{******************************************************
+
+Example of palette controls CFArray passed to TSMInputModePaletteLoadButtons():
+
+ Buttons consist of a CFDictionary containing:
+ - itemType
+ - icon
+ - alternate icon
+ - ID
+ - enabled
+ - state
+
+ Pulldown menus consist of a CFDictionary containing:
+ - itemType
+ - icon
+ - alternate icon
+ - ID
+
+ <array>
+ <dict>
+ <!-- item 1 - a push button -->
+ <key>tsInputModePaletteItemTypeKey</key>
+ <integer>0</integer>
+ <key>tsInputModePaletteItemIconKey</key>
+ <string>modeButton1.tif</string>
+ <key>tsInputModePaletteItemAltIconKey</key>
+ <string>modeButton1Alt.tif</string>
+ <key>tsInputModePaletteItemIDKey</key>
+ <integer>1</integer>
+ <key>tsInputModePaletteItemEnabledKey</key>
+ <true/>
+ <key>tsInputModePaletteItemStateKey</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <!-- item 2 - a pulldown menu -->
+ <key>tsInputModePaletteItemTypeKey</key>
+ <integer>2</integer>
+ <key>tsInputModePaletteItemIconKey</key>
+ <string>modeMenu1.tif</string>
+ <key>tsInputModePaletteItemAltIconKey</key>
+ <string>modeMenu1Alt.tif</string>
+ <key>tsInputModePaletteItemIDKey</key>
+ <integer>2</integer>
+ </dict>
+ </array>
+
+******************************************************}
+
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModePaletteItemTypeKey CFSTRP('tsInputModePaletteItemTypeKey')}
+{$endc}
+{ CFNumber - the type of control (0: push button, 1: toggle button, 2: pulldown menu) }
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModePaletteItemIconKey CFSTRP('tsInputModePaletteItemIconKey')}
+{$endc}
+{ CFString - icon file name (File located in IM bundle's resource directory, so this is just the file name, not full path) }
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModePaletteItemAltIconKey CFSTRP('tsInputModePaletteItemAltIconKey')}
+{$endc}
+{ CFString - alternate icon file name (File located in IM bundle's resource directory, so this is just the file name, not full path) }
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModePaletteItemStateKey CFSTRP('tsInputModePaletteItemStateKey')}
+{$endc}
+{ CFNumber - state of the control (0: clear/unpressed, 1: checked/pressed, 2: mixed) }
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModePaletteItemEnabledKey CFSTRP('tsInputModePaletteItemEnabledKey')}
+{$endc}
+{ CFBoolean - enabled state of the control }
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModePaletteItemIDKey CFSTRP('tsInputModePaletteItemIDKey')}
+{$endc}
+{ CFNumber - UInt32 tag ID for control }
+
+
+{
+ * InputModePaletteItemHit()
+ *
+ * Discussion:
+ * Component Manager call to tell an Input Method that a function
+ * button on the Input Mode Palette was pressed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inInstance:
+ * The component instance.
+ *
+ * inItemID:
+ * The item ID of the function button pressed on the palette.
+ *
+ * inItemState:
+ * The new state of the button.
+ *
+ * Result:
+ * Return non-null on successful handling of call.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function InputModePaletteItemHit( inInstance: ComponentInstance; inItemID: UInt32; inItemState: UInt32 ): ComponentResult; external name '_InputModePaletteItemHit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * GetInputModePaletteMenu()
+ *
+ * Discussion:
+ * Component Manager call to ask an Input Method for the menu to
+ * display for a pull-down menu on the Input Mode Palette.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inInstance:
+ * The component instance.
+ *
+ * inItemID:
+ * The item ID of the pull-down menu button.
+ *
+ * outMenuItemsArray:
+ * The menu array to return to the Input Mode Palette.
+ *
+ * Result:
+ * Return non-null on successful handling of call.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function GetInputModePaletteMenu( inInstance: ComponentInstance; inItemID: UInt32; var outMenuItemsArray: CFArrayRef ): ComponentResult; external name '_GetInputModePaletteMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{----------------------------------------------------------}
+{ CFDictionary keys for menu definition returned }
+{ for kCMGetInputModePaletteMenu/GetInputModePaletteMenu() }
+{----------------------------------------------------------}
+{******************************************************
+
+Example of menu CFArray returned to GetInputModePaletteMenu():
+
+ Pull-down menus consist of an array of CFDictionary's containing:
+ - title
+ - ID
+ - state
+ - enabled
+ - key equivalent (optional)
+ - key equivalent modifiers (optional)
+
+ <array>
+ <dict>
+ <!-- menu item w/ modifiers -->
+ <key>tsInputModePaletteItemTitleKey</key>
+ <string>menu item 1</string>
+ <key>tsInputModePaletteItemIDKey</key>
+ <integer>10</integer>
+ <key>tsInputModePaletteItemEnabledKey</key>
+ <true/>
+ <key>tsInputModePaletteItemStateKey</key>
+ <integer>0</integer>
+ <key>tsInputModePaletteItemKeyEquivalentKey</key>
+ <string>j</string>
+ <key>tsInputModePaletteItemKeyEquivalentModifiersKey</key>
+ <integer>2048</integer>
+ </dict>
+ <dict>
+ <!-- divider -->
+ <key>tsInputModePaletteItemTypeKey</key>
+ <string>-</string>
+ </dict>
+ <!-- menu item w/o modifiers -->
+ <key>tsInputModePaletteItemTitleKey</key>
+ <string>menu item 2</string>
+ <key>tsInputModePaletteItemIDKey</key>
+ <integer>11</integer>
+ <key>tsInputModePaletteItemEnabledKey</key>
+ <true/>
+ <key>tsInputModePaletteItemStateKey</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+
+******************************************************}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModePaletteItemTitleKey CFSTRP('tsInputModePaletteItemTitleKey')}
+{$endc}
+{ CFString - menu item title (use '-' for a separator) }
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModePaletteItemKeyEquivalentKey CFSTRP('tsInputModePaletteItemKeyEquivalentKey')}
+{$endc}
+{ CFString - menu item keyboard shortcut (example: 'j') }
+
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTSInputModePaletteItemKeyEquivalentModifiersKey CFSTRP('tsInputModePaletteItemKeyEquivalentModifiersKey')}
+{$endc}
+{ CFNumber - menu item keyboard shortcut modifiers (from Events.h) }
+
+
+
+
+{unit ASDebugging}
+{
+ File: ASDebugging.p
+
+ Contains: AppleScript Debugging Interfaces.
+
+ Version: Technology: AppleScript 1.1
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1992-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{*************************************************************************
+ Mode Flags
+*************************************************************************}
+{ This mode flag can be passed to OSASetProperty or OSASetHandler
+ and will prevent properties or handlers from being defined in a context
+ that doesn't already have bindings for them. An error is returned if
+ a current binding doesn't already exist.
+}
+
+const
+ kOSAModeDontDefine = $0001;
+
+ { *************************************************************************
+ Component Selectors
+ ************************************************************************* }
+ kASSelectSetPropertyObsolete = $1101;
+ kASSelectGetPropertyObsolete = $1102;
+ kASSelectSetHandlerObsolete = $1103;
+ kASSelectGetHandlerObsolete = $1104;
+ kASSelectGetAppTerminologyObsolete = $1105;
+ kASSelectSetProperty = $1106;
+ kASSelectGetProperty = $1107;
+ kASSelectSetHandler = $1108;
+ kASSelectGetHandler = $1109;
+ kASSelectGetAppTerminology = $110A;
+ kASSelectGetSysTerminology = $110B;
+ kASSelectGetPropertyNames = $110C;
+ kASSelectGetHandlerNames = $110D;
+
+ { *************************************************************************
+ Context Accessors
+ ************************************************************************* }
+ {
+ * OSASetProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSASetProperty(scriptingComponent: ComponentInstance; modeFlags: SInt32; contextID: OSAID; const (*var*) variableName: AEDesc; scriptValueID: OSAID): OSAError; external name '_OSASetProperty';
+{
+ * OSAGetProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetProperty(scriptingComponent: ComponentInstance; modeFlags: SInt32; contextID: OSAID; const (*var*) variableName: AEDesc; var resultingScriptValueID: OSAID): OSAError; external name '_OSAGetProperty';
+{
+ * OSAGetPropertyNames()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetPropertyNames(scriptingComponent: ComponentInstance; modeFlags: SInt32; contextID: OSAID; var resultingPropertyNames: AEDescList): OSAError; external name '_OSAGetPropertyNames';
+{
+ * OSASetHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSASetHandler(scriptingComponent: ComponentInstance; modeFlags: SInt32; contextID: OSAID; const (*var*) handlerName: AEDesc; compiledScriptID: OSAID): OSAError; external name '_OSASetHandler';
+{
+ * OSAGetHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetHandler(scriptingComponent: ComponentInstance; modeFlags: SInt32; contextID: OSAID; const (*var*) handlerName: AEDesc; var resultingCompiledScriptID: OSAID): OSAError; external name '_OSAGetHandler';
+{
+ * OSAGetHandlerNames()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetHandlerNames(scriptingComponent: ComponentInstance; modeFlags: SInt32; contextID: OSAID; var resultingHandlerNames: AEDescList): OSAError; external name '_OSAGetHandlerNames';
+{
+ * OSAGetAppTerminology()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetAppTerminology(scriptingComponent: ComponentInstance; modeFlags: SInt32; var fileSpec: FSSpec; terminologyID: SInt16; var didLaunch: boolean; var terminologyList: AEDesc): OSAError; external name '_OSAGetAppTerminology';
+{ Errors:
+ errOSASystemError operation failed
+ }
+{
+ * OSAGetSysTerminology()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OSAGetSysTerminology(scriptingComponent: ComponentInstance; modeFlags: SInt32; terminologyID: SInt16; var terminologyList: AEDesc): OSAError; external name '_OSAGetSysTerminology';
+{ Errors:
+ errOSASystemError operation failed
+ }
+{ Notes on terminology ID
+
+ A terminology ID is derived from script code and language code
+ as follows;
+
+ terminologyID = ((scriptCode & 0x7F) << 8) | (langCode & 0xFF)
+}
+{*************************************************************************
+ Obsolete versions provided for backward compatibility:
+}
+{
+ * ASSetProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ASSetProperty(scriptingComponent: ComponentInstance; contextID: OSAID; const (*var*) variableName: AEDesc; scriptValueID: OSAID): OSAError; external name '_ASSetProperty';
+{
+ * ASGetProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ASGetProperty(scriptingComponent: ComponentInstance; contextID: OSAID; const (*var*) variableName: AEDesc; var resultingScriptValueID: OSAID): OSAError; external name '_ASGetProperty';
+{
+ * ASSetHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ASSetHandler(scriptingComponent: ComponentInstance; contextID: OSAID; const (*var*) handlerName: AEDesc; compiledScriptID: OSAID): OSAError; external name '_ASSetHandler';
+{
+ * ASGetHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ASGetHandler(scriptingComponent: ComponentInstance; contextID: OSAID; const (*var*) handlerName: AEDesc; var resultingCompiledScriptID: OSAID): OSAError; external name '_ASGetHandler';
+{
+ * ASGetAppTerminology()
+ *
+ * Availability:
+ * Non-Carbon CFM: in AppleScriptLib 1.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ASGetAppTerminology(scriptingComponent: ComponentInstance; var fileSpec: FSSpec; terminologID: SInt16; var didLaunch: boolean; var terminologyList: AEDesc): OSAError; external name '_ASGetAppTerminology';
+{ Errors:
+ errOSASystemError operation failed
+ }
+{************************************************************************}
+
+
+{$ALIGN MAC68K}
+
+
+{unit Dialogs}
+{
+ File: HIToolbox/Dialogs.h
+
+ Contains: Dialog Manager interfaces.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1985-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+const
+{ new, more standard names for dialog item types}
+ kControlDialogItem = 4;
+ kButtonDialogItem = kControlDialogItem or 0;
+ kCheckBoxDialogItem = kControlDialogItem or 1;
+ kRadioButtonDialogItem = kControlDialogItem or 2;
+ kResourceControlDialogItem = kControlDialogItem or 3;
+ kStaticTextDialogItem = 8;
+ kEditTextDialogItem = 16;
+ kIconDialogItem = 32;
+ kPictureDialogItem = 64;
+ kUserDialogItem = 0;
+ kHelpDialogItem = 1;
+ kItemDisableBit = 128;
+
+const
+{ old names for dialog item types}
+ ctrlItem = 4;
+ btnCtrl = 0;
+ chkCtrl = 1;
+ radCtrl = 2;
+ resCtrl = 3;
+ statText = 8;
+ editText = 16;
+ iconItem = 32;
+ picItem = 64;
+ userItem = 0;
+ itemDisable = 128;
+
+const
+{ standard dialog item numbers}
+ kStdOkItemIndex = 1;
+ kStdCancelItemIndex = 2; { old names}
+ ok = kStdOkItemIndex;
+ cancel = kStdCancelItemIndex;
+
+const
+{ standard icon resource id's }
+ kStopIcon = 0;
+ kNoteIcon = 1;
+ kCautionIcon = 2; { old names}
+ stopIcon = kStopIcon;
+ noteIcon = kNoteIcon;
+ cautionIcon = kCautionIcon;
+
+
+
+{ Dialog Item List Manipulation Constants }
+type
+ DITLMethod = SInt16;
+const
+ overlayDITL = 0;
+ appendDITLRight = 1;
+ appendDITLBottom = 2;
+
+type
+ StageList = SInt16;
+{ DialogPtr is obsolete. Use DialogRef instead.}
+type
+ DialogRef = DialogPtr;
+
+type
+ DialogTemplatePtr = ^DialogTemplate;
+ DialogTemplate = record
+ boundsRect: Rect;
+ procID: SInt16;
+ visible: Boolean;
+ filler1: Boolean;
+ goAwayFlag: Boolean;
+ filler2: Boolean;
+ refCon: SInt32;
+ itemsID: SInt16;
+ title: Str255;
+ end;
+type
+ DialogTPtr = DialogTemplatePtr;
+type
+ DialogTHndl = ^DialogTPtr;
+type
+ AlertTemplatePtr = ^AlertTemplate;
+ AlertTemplate = record
+ boundsRect: Rect;
+ itemsID: SInt16;
+ stages: StageList;
+ end;
+type
+ AlertTPtr = AlertTemplatePtr;
+type
+ AlertTHndl = ^AlertTPtr;
+{ new type abstractions for the dialog manager }
+type
+ DialogItemIndexZeroBased = SInt16;
+type
+ DialogItemIndex = SInt16;
+type
+ DialogItemType = SInt16;
+{ dialog manager callbacks }
+type
+ SoundProcPtr = procedure( soundNumber: SInt16 );
+type
+ ModalFilterProcPtr = function( theDialog: DialogRef; var theEvent: EventRecord; var itemHit: DialogItemIndex ): Boolean;
+{ ModalFilterYDProcPtr was previously in StandardFile.h }
+type
+ ModalFilterYDProcPtr = function( theDialog: DialogRef; var theEvent: EventRecord; var itemHit: SInt16; yourDataPtr: UnivPtr ): Boolean;
+type
+ UserItemProcPtr = procedure( theDialog: DialogRef; itemNo: DialogItemIndex );
+type
+ SoundUPP = SoundProcPtr;
+type
+ ModalFilterUPP = ModalFilterProcPtr;
+type
+ ModalFilterYDUPP = ModalFilterYDProcPtr;
+type
+ UserItemUPP = UserItemProcPtr;
+{
+ * NewSoundUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * NewModalFilterUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewModalFilterUPP( userRoutine: ModalFilterProcPtr ): ModalFilterUPP; external name '_NewModalFilterUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewModalFilterYDUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewModalFilterYDUPP( userRoutine: ModalFilterYDProcPtr ): ModalFilterYDUPP; external name '_NewModalFilterYDUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewUserItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewUserItemUPP( userRoutine: UserItemProcPtr ): UserItemUPP; external name '_NewUserItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeSoundUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * DisposeModalFilterUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeModalFilterUPP( userUPP: ModalFilterUPP ); external name '_DisposeModalFilterUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeModalFilterYDUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeModalFilterYDUPP( userUPP: ModalFilterYDUPP ); external name '_DisposeModalFilterYDUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeUserItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeUserItemUPP( userUPP: UserItemUPP ); external name '_DisposeUserItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeSoundUPP()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: available as macro/inline
+ }
+
+{
+ * InvokeModalFilterUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeModalFilterUPP( theDialog: DialogRef; var theEvent: EventRecord; var itemHit: DialogItemIndex; userUPP: ModalFilterUPP ): Boolean; external name '_InvokeModalFilterUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeModalFilterYDUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeModalFilterYDUPP( theDialog: DialogRef; var theEvent: EventRecord; var itemHit: SInt16; yourDataPtr: UnivPtr; userUPP: ModalFilterYDUPP ): Boolean; external name '_InvokeModalFilterYDUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeUserItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeUserItemUPP( theDialog: DialogRef; itemNo: DialogItemIndex; userUPP: UserItemUPP ); external name '_InvokeUserItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ ¥ Following types are valid with Appearance 1.0 and later
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+const
+{ Alert types to pass into StandardAlert }
+ kAlertStopAlert = 0;
+ kAlertNoteAlert = 1;
+ kAlertCautionAlert = 2;
+ kAlertPlainAlert = 3;
+
+type
+ AlertType = SInt16;
+const
+ kAlertDefaultOKText = -1; { "OK"}
+ kAlertDefaultCancelText = -1; { "Cancel"}
+ kAlertDefaultOtherText = -1; { "Don't Save"}
+
+{ StandardAlert alert button numbers }
+const
+ kAlertStdAlertOKButton = 1;
+ kAlertStdAlertCancelButton = 2;
+ kAlertStdAlertOtherButton = 3;
+ kAlertStdAlertHelpButton = 4;
+
+const
+{ Dialog Flags for use in NewFeaturesDialog or dlgx resource }
+ kDialogFlagsUseThemeBackground = 1 shl 0;
+ kDialogFlagsUseControlHierarchy = 1 shl 1;
+ kDialogFlagsHandleMovableModal = 1 shl 2;
+ kDialogFlagsUseThemeControls = 1 shl 3;
+
+const
+{ Alert Flags for use in alrx resource }
+ kAlertFlagsUseThemeBackground = 1 shl 0;
+ kAlertFlagsUseControlHierarchy = 1 shl 1;
+ kAlertFlagsAlertIsMovable = 1 shl 2;
+ kAlertFlagsUseThemeControls = 1 shl 3;
+
+{ For dftb resource }
+const
+ kDialogFontNoFontStyle = 0;
+ kDialogFontUseFontMask = $0001;
+ kDialogFontUseFaceMask = $0002;
+ kDialogFontUseSizeMask = $0004;
+ kDialogFontUseForeColorMask = $0008;
+ kDialogFontUseBackColorMask = $0010;
+ kDialogFontUseModeMask = $0020;
+ kDialogFontUseJustMask = $0040;
+ kDialogFontUseAllMask = $00FF;
+ kDialogFontAddFontSizeMask = $0100;
+ kDialogFontUseFontNameMask = $0200;
+ kDialogFontAddToMetaFontMask = $0400;
+
+{ Also for dftb resource. This one is available in Mac OS X or later. }
+{ It corresponds directly to kControlUseThemeFontIDMask from Controls.h. }
+const
+ kDialogFontUseThemeFontIDMask = $0080;
+
+type
+ AlertStdAlertParamRecPtr = ^AlertStdAlertParamRec;
+ AlertStdAlertParamRec = record
+ movable: Boolean; { Make alert movable modal }
+ helpButton: Boolean; { Is there a help button? }
+ filterProc: ModalFilterUPP; { Event filter }
+ defaultText: ConstStringPtr; { Text for button in OK position }
+ cancelText: ConstStringPtr; { Text for button in cancel position }
+ otherText: ConstStringPtr; { Text for button in left position }
+ defaultButton: SInt16; { Which button behaves as the default }
+ cancelButton: SInt16; { Which one behaves as cancel (can be 0) }
+ position: UInt16; { Position (kWindowDefaultPosition in this case }
+ { equals kWindowAlertPositionParentWindowScreen) }
+ end;
+type
+ AlertStdAlertParamPtr = AlertStdAlertParamRecPtr;
+const
+ kHICommandOther = $6F746872 (* 'othr' *); { sent by standard sheet dialogs when the "other" button is pressed }
+
+const
+ kStdCFStringAlertVersionOne = 1; { current version of AlertStdCFStringAlertParamRec }
+
+
+{
+ * Summary:
+ * Flags to CreateStandardAlert that are specified in the
+ * AlertStdCFStringAlertParamRec.flags field.
+ }
+const
+{
+ * Applies to StandardSheet only. Do not dispose of the sheet window
+ * after closing it; allows the sheet to be re-used again in a later
+ * call to ShowSheetWindow.
+ }
+ kStdAlertDoNotDisposeSheet = 1 shl 0;
+
+ {
+ * Applies to StandardSheet only. Causes the sheet window to be
+ * hidden immediately without animation effects when the default
+ * button is chosen by the user.
+ }
+ kStdAlertDoNotAnimateOnDefault = 1 shl 1;
+
+ {
+ * Applies to StandardSheet only. Causes the sheet window to be
+ * hidden immediately without animation effects when the cancel
+ * button is chosen by the user.
+ }
+ kStdAlertDoNotAnimateOnCancel = 1 shl 2;
+
+ {
+ * Applies to StandardSheet only. Causes the sheet window to be
+ * hidden immediately without animation effects when the other button
+ * is chosen by the user.
+ }
+ kStdAlertDoNotAnimateOnOther = 1 shl 3;
+
+ {
+ * Allows dialog to stay up even after clicking the Help button.
+ * Normally, it would close immediately. It is not necessary to set
+ * this option for sheets, as they merely send the HICommandHelp
+ * command to the target provided. RunStandardAlert will return with
+ * the help button item in the itemHit parameter, but the window will
+ * remain up. You can then perform whatever help function you wish
+ * and then call RunStandardAlert again. This option is available in
+ * Mac OS X 10.4 or later.
+ }
+ kStdAlertDoNotCloseOnHelp = 1 shl 4;
+
+type
+ AlertStdCFStringAlertParamRec = record
+ version: UInt32; { kStdCFStringAlertVersionOne }
+ movable: Boolean; { Make alert movable modal }
+ helpButton: Boolean; { Is there a help button? }
+ defaultText: CFStringRef; { Text for button in OK position }
+ cancelText: CFStringRef; { Text for button in cancel position }
+ otherText: CFStringRef; { Text for button in left position }
+ defaultButton: SInt16; { Which button behaves as the default }
+ cancelButton: SInt16; { Which one behaves as cancel (can be 0) }
+ position: UInt16; { Position (kWindowDefaultPosition in this case }
+ { equals kWindowAlertPositionParentWindowScreen) }
+ flags: OptionBits; { Options for the behavior of the alert or sheet }
+ end;
+type
+ AlertStdCFStringAlertParamPtr = ^AlertStdCFStringAlertParamRec;
+{ ÑÑÑ end Appearance 1.0 or later stuff}
+
+
+{
+ NOTE: Code running under MultiFinder or System 7.0 or newer
+ should always pass NULL to InitDialogs.
+}
+{
+ * InitDialogs()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * ErrorSound()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * NewDialog()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function NewDialog( dStorage: UnivPtr; const (*var*) boundsRect: Rect; const (*var*) title: Str255; visible: Boolean; procID: SInt16; behind: WindowRef; goAwayFlag: Boolean; refCon: SInt32; items: Handle ): DialogRef; external name '_NewDialog';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetNewDialog()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetNewDialog( dialogID: SInt16; dStorage: UnivPtr; behind: WindowRef ): DialogRef; external name '_GetNewDialog';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * NewColorDialog()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function NewColorDialog( dStorage: UnivPtr; const (*var*) boundsRect: Rect; const (*var*) title: Str255; visible: Boolean; procID: SInt16; behind: WindowRef; goAwayFlag: Boolean; refCon: SInt32; items: Handle ): DialogRef; external name '_NewColorDialog';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CloseDialog()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * DisposeDialog()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DisposeDialog( theDialog: DialogRef ); external name '_DisposeDialog';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ModalDialog()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure ModalDialog( modalFilter: ModalFilterUPP; var itemHit: DialogItemIndex ); external name '_ModalDialog';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * IsDialogEvent()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function IsDialogEvent( const (*var*) theEvent: EventRecord ): Boolean; external name '_IsDialogEvent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DialogSelect()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function DialogSelect( const (*var*) theEvent: EventRecord; var theDialog: DialogRef; var itemHit: DialogItemIndex ): Boolean; external name '_DialogSelect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DrawDialog()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DrawDialog( theDialog: DialogRef ); external name '_DrawDialog';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * UpdateDialog()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure UpdateDialog( theDialog: DialogRef; updateRgn: RgnHandle ); external name '_UpdateDialog';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HideDialogItem()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure HideDialogItem( theDialog: DialogRef; itemNo: DialogItemIndex ); external name '_HideDialogItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ShowDialogItem()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure ShowDialogItem( theDialog: DialogRef; itemNo: DialogItemIndex ); external name '_ShowDialogItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * FindDialogItem()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function FindDialogItem( theDialog: DialogRef; thePt: Point ): DialogItemIndexZeroBased; external name '_FindDialogItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DialogCut()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DialogCut( theDialog: DialogRef ); external name '_DialogCut';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DialogPaste()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DialogPaste( theDialog: DialogRef ); external name '_DialogPaste';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DialogCopy()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DialogCopy( theDialog: DialogRef ); external name '_DialogCopy';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DialogDelete()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure DialogDelete( theDialog: DialogRef ); external name '_DialogDelete';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * Alert()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function Alert( alertID: SInt16; modalFilter: ModalFilterUPP ): DialogItemIndex; external name '_Alert';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * StopAlert()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function StopAlert( alertID: SInt16; modalFilter: ModalFilterUPP ): DialogItemIndex; external name '_StopAlert';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * NoteAlert()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function NoteAlert( alertID: SInt16; modalFilter: ModalFilterUPP ): DialogItemIndex; external name '_NoteAlert';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CautionAlert()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function CautionAlert( alertID: SInt16; modalFilter: ModalFilterUPP ): DialogItemIndex; external name '_CautionAlert';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDialogItem()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure GetDialogItem( theDialog: DialogRef; itemNo: DialogItemIndex; var itemType: DialogItemType; var item: Handle; var box: Rect ); external name '_GetDialogItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDialogItem()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetDialogItem( theDialog: DialogRef; itemNo: DialogItemIndex; itemType: DialogItemType; item: Handle; const (*var*) box: Rect ); external name '_SetDialogItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ParamText()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure ParamText( const (*var*) param0: Str255; const (*var*) param1: Str255; const (*var*) param2: Str255; const (*var*) param3: Str255 ); external name '_ParamText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SelectDialogItemText()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SelectDialogItemText( theDialog: DialogRef; itemNo: DialogItemIndex; strtSel: SInt16; endSel: SInt16 ); external name '_SelectDialogItemText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDialogItemText()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure GetDialogItemText( item: Handle; var text: Str255 ); external name '_GetDialogItemText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDialogItemText()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetDialogItemText( item: Handle; const (*var*) text: Str255 ); external name '_SetDialogItemText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetAlertStage()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetAlertStage: SInt16; external name '_GetAlertStage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDialogFont()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure SetDialogFont( fontNum: SInt16 ); external name '_SetDialogFont';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ResetAlertStage()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure ResetAlertStage; external name '_ResetAlertStage';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ APIs in Carbon}
+{
+ * GetParamText()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later
+ }
+procedure GetParamText( param0: StringPtr; param1: StringPtr; param2: StringPtr; param3: StringPtr ); external name '_GetParamText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * newdialog()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * newcolordialog()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * paramtext()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * getdialogitemtext()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * setdialogitemtext()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * finddialogitem()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+
+
+{
+ * AppendDITL()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure AppendDITL( theDialog: DialogRef; theHandle: Handle; method: DITLMethod ); external name '_AppendDITL';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CountDITL()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function CountDITL( theDialog: DialogRef ): DialogItemIndex; external name '_CountDITL';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ShortenDITL()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+procedure ShortenDITL( theDialog: DialogRef; numberItems: DialogItemIndex ); external name '_ShortenDITL';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * InsertDialogItem()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function InsertDialogItem( theDialog: DialogRef; afterItem: DialogItemIndex; itemType: DialogItemType; itemHandle: Handle; const (*var*) box: Rect ): OSStatus; external name '_InsertDialogItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RemoveDialogItems()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function RemoveDialogItems( theDialog: DialogRef; itemNo: DialogItemIndex; amountToRemove: DialogItemIndex; disposeItemData: Boolean ): OSStatus; external name '_RemoveDialogItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * StdFilterProc()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function StdFilterProc( theDialog: DialogRef; var event: EventRecord; var itemHit: DialogItemIndex ): Boolean; external name '_StdFilterProc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetStdFilterProc()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function GetStdFilterProc( var theProc: ModalFilterUPP ): OSErr; external name '_GetStdFilterProc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDialogDefaultItem()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function SetDialogDefaultItem( theDialog: DialogRef; newItem: DialogItemIndex ): OSErr; external name '_SetDialogDefaultItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDialogCancelItem()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function SetDialogCancelItem( theDialog: DialogRef; newItem: DialogItemIndex ): OSErr; external name '_SetDialogCancelItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDialogTracksCursor()
+ *
+ * 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
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ }
+function SetDialogTracksCursor( theDialog: DialogRef; tracks: Boolean ): OSErr; external name '_SetDialogTracksCursor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ ¥ Appearance Dialog Routines (available only with Appearance 1.0 and later)
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+
+{
+ * NewFeaturesDialog()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function NewFeaturesDialog( inStorage: UnivPtr; const (*var*) inBoundsRect: Rect; const (*var*) inTitle: Str255; inIsVisible: Boolean; inProcID: SInt16; inBehind: WindowRef; inGoAwayFlag: Boolean; inRefCon: SInt32; inItemListHandle: Handle; inFlags: UInt32 ): DialogRef; external name '_NewFeaturesDialog';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * AutoSizeDialog()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function AutoSizeDialog( inDialog: DialogRef ): OSErr; external name '_AutoSizeDialog';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ Regarding StandardAlert and constness:
+ Even though the inAlertParam parameter is marked const here, there was
+ a chance Dialog Manager would modify it on versions of Mac OS prior to 9.
+}
+{
+ * StandardAlert()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function StandardAlert( inAlertType: AlertType; const (*var*) inError: Str255; const (*var*) inExplanation: Str255; {const} inAlertParam: AlertStdAlertParamRecPtr { can be NULL }; var outItemHit: SInt16 ): OSErr; external name '_StandardAlert';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ CFString-based StandardAlert and StandardSheet APIs are only available on Mac OS X and later}
+
+{
+ * GetStandardAlertDefaultParams()
+ *
+ * Summary:
+ * Fills out an AlertStdCFStringAlertParamRec with default values: -
+ * not movable - no help button - default button with title
+ * kAlertDefaultOKText, meaning "OK" - no cancel or other buttons
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * param:
+ * The parameter block to initialize.
+ *
+ * version:
+ * The parameter block version; pass kStdCFStringAlertVersionOne.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function GetStandardAlertDefaultParams( param: AlertStdCFStringAlertParamPtr; version: UInt32 ): OSStatus; external name '_GetStandardAlertDefaultParams';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CreateStandardAlert()
+ *
+ * Summary:
+ * Creates an alert containing standard elements and using standard
+ * formatting rules.
+ *
+ * Discussion:
+ * CreateStandardAlert should be used in conjunction with
+ * RunStandardAlert. After CreateStandardAlert returns, the alert is
+ * still invisible. RunStandardAlert will show the alert and run a
+ * modal dialog loop to process events in the alert.
+ *
+ * The strings passed to this API in the error, explanation, and
+ * AlertStdCFStringAlertParamRec button title parameters will all be
+ * retained during the creation of the alert, and released when the
+ * alert is disposed by RunStandardAlert. There is no net change to
+ * the refcount of these strings across CreateStandardAlert and
+ * RunStandardAlert.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * alertType:
+ * The type of alert to create.
+ *
+ * error:
+ * The error string to display. CreateStandardAlert increments the
+ * refcount on this string, so you may release it after
+ * CreateStandardAlert returns if you don't need it later.
+ *
+ * explanation:
+ * The explanation string to display. May be NULL or empty to
+ * display no explanation. CreateStandardAlert increments the
+ * refcount on this string, so you may release it after
+ * CreateStandardAlert returns if you don't need it later.
+ *
+ * param:
+ * The parameter block describing how to create the alert. May be
+ * NULL. CreateStandardAlert increments the refcount on the button
+ * title strings in the parameter block, so you may release them
+ * after CreateStandardAlert returns if you don't need them later.
+ *
+ * outAlert:
+ * On exit, contains the new alert.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateStandardAlert( alertType_: AlertType; error: CFStringRef; explanation: CFStringRef { can be NULL }; {const} param: AlertStdCFStringAlertParamPtr { can be NULL }; var outAlert: DialogRef ): OSStatus; external name '_CreateStandardAlert';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RunStandardAlert()
+ *
+ * Summary:
+ * Shows, runs, and destroys a standard alert using a modal dialog
+ * loop.
+ *
+ * Discussion:
+ * RunStandardAlert displays and runs an alert created by
+ * CreateStandardAlert. It handles all user interaction with the
+ * alert. After the user has dismissed the alert, RunStandardAlert
+ * destroys the alert dialog; the DialogRef will be invalid after
+ * RunStandardAlert returns. DO NOT call DisposeDialog.
+ *
+ * NOTE: DO NOT call this function for a dialog that was not created
+ * with CreateStandardAlert! You will sorely regret it, I promise
+ * you.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inAlert:
+ * The alert to display.
+ *
+ * filterProc:
+ * An event filter function for handling events that do not apply
+ * to the alert. May be NULL.
+ *
+ * outItemHit:
+ * On exit, contains the item index of the button that was pressed
+ * to close the alert.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function RunStandardAlert( inAlert: DialogRef; filterProc: ModalFilterUPP { can be NULL }; var outItemHit: DialogItemIndex ): OSStatus; external name '_RunStandardAlert';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CreateStandardSheet()
+ *
+ * Summary:
+ * Creates an alert containing standard elements and using standard
+ * formatting rules, and prepares it to be displayed as a sheet.
+ *
+ * Discussion:
+ * CreateStandardSheet should be used in conjunction with
+ * ShowSheetWindow. After CreateStandardSheet returns, the alert is
+ * still invisible. ShowSheetWindow will show the alert and then
+ * return. Events in the sheet are handled asynchronously; the
+ * application should be prepared for the sheet window to be part of
+ * its windowlist while running its own event loop. When a button in
+ * the sheet is pressed, the EventTargetRef passed to
+ * CreateStandardSheet will receive a command event with one of the
+ * command IDs kHICommandOK, kHICommandCancel, or kHICommandOther.
+ * The sheet is hidden and the sheet dialog destroyed before the
+ * command is sent; the caller does not have to call HideSheetWindow
+ * or DisposeDialog.
+ *
+ * If the caller needs to destroy the sheet before showing it, then
+ * it is sufficient to call DisposeDialog on the sheet. This is the
+ * only case in which the caller would need to destroy the sheet
+ * explicitly.
+ *
+ * The strings passed to this API in the error, explanation, and
+ * AlertStdCFStringAlertParamRec button title parameters will all be
+ * retained during the creation of the sheet, and released when the
+ * sheet is disposed. There is no net change to the refcount of
+ * these strings across CreateStandardSheet and sheet destruction.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * alertType:
+ * The type of alert to create.
+ *
+ * error:
+ * The error string to display. CreateStandardSheet increments the
+ * refcount on this string, so you may release it after
+ * CreateStandardSheet returns if you don't need it later.
+ *
+ * explanation:
+ * The explanation string to display. May be NULL or empty to
+ * display no explanation. CreateStandardSheet increments the
+ * refcount on this string, so you may release it after
+ * CreateStandardSheet returns if you don't need it later.
+ *
+ * param:
+ * The parameter block describing how to create the alert. May be
+ * NULL. CreateStandardSheet increments the refcount on the button
+ * title strings in the parameter block, so you may release them
+ * after CreateStandardSheet returns if you don't need them later.
+ *
+ * notifyTarget:
+ * The event target to be notified when the sheet is closed. The
+ * caller should install an event handler on this target for the
+ * [kEventClassCommand, kEventProcessCommand] event. May be NULL
+ * if the caller does not need the command event to be sent to any
+ * target.
+ *
+ * Typically, this will be the event target for the parent window
+ * of the sheet; a standard practice is to install a handler on
+ * the parent window just before showing the sheet window, and to
+ * remove the handler from the parent window after the sheet has
+ * been closed. It is also possible to install a handler on the
+ * sheet window itself, in which case you would pass NULL for this
+ * parameter, since the command event is automatically sent to the
+ * sheet window already. If you install a handler on the sheet
+ * itself, make sure to return eventNotHandledErr from your
+ * handler, because CreateStandardSheet installs its own handler
+ * on the sheet and that handler must be allowed to run to close
+ * the sheet window and release the DialogRef.
+ *
+ * outSheet:
+ * On exit, contains the new alert.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateStandardSheet( alertType_: AlertType; error: CFStringRef; explanation: CFStringRef { can be NULL }; {const} param: AlertStdCFStringAlertParamPtr { can be NULL }; notifyTarget: EventTargetRef { can be NULL }; var outSheet: DialogRef ): OSStatus; external name '_CreateStandardSheet';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CloseStandardSheet()
+ *
+ * Summary:
+ * Closes a standard sheet dialog and releases the dialog data
+ * structures.
+ *
+ * Discussion:
+ * CloseStandardSheet is meant to be used when you need to remove a
+ * sheet because of a higher-priority request to close the sheet's
+ * document window. For example, you might have a Save Changes sheet
+ * open on a document window. Meanwhile, the user drags the document
+ * into the trash. When your application sees that the document has
+ * been moved to the trash, it knows that it should close the
+ * document window, but first it needs to close the sheet.
+ *
+ * CloseStandardSheet should not be used by your Carbon event
+ * handler in response to a click in one of the sheet buttons; the
+ * Dialog Manager will close the sheet automatically in that case.
+ *
+ *
+ * If kStdAlertDoNotDisposeSheet was specified when the sheet was
+ * created, the sheet dialog will be hidden but not released, and
+ * you can reuse the sheet later.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inSheet:
+ * The sheet to close.
+ *
+ * inResultCommand:
+ * This command, if not zero, will be sent to the EventTarget
+ * specified when the sheet was created.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CloseStandardSheet( inSheet: DialogRef; inResultCommand: UInt32 ): OSStatus; external name '_CloseStandardSheet';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDialogItemAsControl()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetDialogItemAsControl( inDialog: DialogRef; inItemNo: SInt16; var outControl: ControlRef ): OSErr; external name '_GetDialogItemAsControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * MoveDialogItem()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function MoveDialogItem( inDialog: DialogRef; inItemNo: SInt16; inHoriz: SInt16; inVert: SInt16 ): OSErr; external name '_MoveDialogItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SizeDialogItem()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SizeDialogItem( inDialog: DialogRef; inItemNo: SInt16; inWidth: SInt16; inHeight: SInt16 ): OSErr; external name '_SizeDialogItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * AppendDialogItemList()
+ *
+ * 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
+ * Non-Carbon CFM: in DialogsLib 8.5 and later
+ }
+function AppendDialogItemList( dialog: DialogRef; ditlID: SInt16; method: DITLMethod ): OSErr; external name '_AppendDialogItemList';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ ¥ Dialog Routines available only with Appearance 1.1 (Mac OS 8.5) and later
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+
+{
+ * SetDialogTimeout()
+ *
+ * Summary:
+ * Sets the timeout for a modal dialog.
+ *
+ * Discussion:
+ * SetDialogTimeout sets the delay after which a dialog will be
+ * automatically dismissed. When SetDialogTimeout is called, the
+ * Dialog Manager takes the current time, adds the timeout to it,
+ * and stores the result as the time to dismiss the dialog. If the
+ * dismissal time is reached, the dialog is automatically closed and
+ * the specified dialog item index is returned from ModalDialog in
+ * the itemHit parameter. If the user moves the mouse or presses a
+ * key, the dismissal time is reset by adding the original timeout
+ * to the time of the event. Only the ModalDialog API observes the
+ * timeout value; if you are handling events in a modeless dialog or
+ * sheet using IsDialogEvent and DialogSelect, the timeout will be
+ * ignored.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDialog:
+ * The dialog on which to set a timeout.
+ *
+ * inButtonToPress:
+ * The dialog item index that should be returned from ModalDialog
+ * when the timeout expires.
+ *
+ * inSecondsToWait:
+ * The time to wait before dismissing the dialog, in seconds.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in DialogsLib 8.5 and later
+ }
+function SetDialogTimeout( inDialog: DialogRef; inButtonToPress: SInt16; inSecondsToWait: UInt32 ): OSStatus; external name '_SetDialogTimeout';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDialogTimeout()
+ *
+ * Summary:
+ * Retrieves the timeout for a modal dialog.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDialog:
+ * The dialog from which to retrieve the timeout.
+ *
+ * outButtonToPress:
+ * On exit, contains the dialog item index that should be returned
+ * from ModalDialog when the dialog is dismissed. May be NULL if
+ * you do not need this information.
+ *
+ * outSecondsToWait:
+ * On exit, contains the time to wait before dismissing the
+ * dialog, in seconds. May be NULL if you do not need this
+ * information.
+ *
+ * outSecondsRemaining:
+ * On exit, contains the time until the dialog is dismissed, in
+ * seconds. May be NULL if you do not need this information.
+ *
+ * Result:
+ * An operating system result code. Returns dialogNoTimeoutErr if no
+ * timeout has been set for this dialog.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in DialogsLib 8.5 and later
+ }
+function GetDialogTimeout( inDialog: DialogRef; outButtonToPress: SInt16Ptr { can be NULL }; outSecondsToWait: UInt32Ptr { can be NULL }; outSecondsRemaining: UInt32Ptr { can be NULL } ): OSStatus; external name '_GetDialogTimeout';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetModalDialogEventMask()
+ *
+ * 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
+ * Non-Carbon CFM: in DialogsLib 8.5 and later
+ }
+function SetModalDialogEventMask( inDialog: DialogRef; inMask: EventMask ): OSStatus; external name '_SetModalDialogEventMask';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetModalDialogEventMask()
+ *
+ * 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
+ * Non-Carbon CFM: in DialogsLib 8.5 and later
+ }
+function GetModalDialogEventMask( inDialog: DialogRef; var outMask: EventMask ): OSStatus; external name '_GetModalDialogEventMask';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ ¥ Accessor functions
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+
+
+{
+ * GetDialogWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function GetDialogWindow( dialog: DialogRef ): WindowRef; external name '_GetDialogWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDialogTextEditHandle()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function GetDialogTextEditHandle( dialog: DialogRef ): TEHandle; external name '_GetDialogTextEditHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDialogDefaultItem()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function GetDialogDefaultItem( dialog: DialogRef ): SInt16; external name '_GetDialogDefaultItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDialogCancelItem()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function GetDialogCancelItem( dialog: DialogRef ): SInt16; external name '_GetDialogCancelItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDialogKeyboardFocusItem()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function GetDialogKeyboardFocusItem( dialog: DialogRef ): SInt16; external name '_GetDialogKeyboardFocusItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetPortDialogPort()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+procedure SetPortDialogPort( dialog: DialogRef ); external name '_SetPortDialogPort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDialogPort()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function GetDialogPort( dialog: DialogRef ): CGrafPtr; external name '_GetDialogPort';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDialogFromWindow()
+ *
+ * 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
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
+ }
+function GetDialogFromWindow( window: WindowRef ): DialogRef; external name '_GetDialogFromWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CouldDialog()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * FreeDialog()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * CouldAlert()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+
+{
+ * FreeAlert()
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+
+(*
+#if OLDROUTINENAMES
+#define DisposDialog(theDialog) DisposeDialog(theDialog)
+#define UpdtDialog(theDialog, updateRgn) UpdateDialog(theDialog, updateRgn)
+#define GetDItem(theDialog, itemNo, itemType, item, box) GetDialogItem(theDialog, itemNo, itemType, item, box)
+#define SetDItem(theDialog, itemNo, itemType, item, box) SetDialogItem(theDialog, itemNo, itemType, item, box)
+#define HideDItem(theDialog, itemNo) HideDialogItem(theDialog, itemNo)
+#define ShowDItem(theDialog, itemNo) ShowDialogItem(theDialog, itemNo)
+#define SelIText(theDialog, itemNo, strtSel, endSel) SelectDialogItemText(theDialog, itemNo, strtSel, endSel)
+#define GetIText(item, text) GetDialogItemText(item, text)
+#define SetIText(item, text) SetDialogItemText(item, text)
+#define FindDItem(theDialog, thePt) FindDialogItem(theDialog, thePt)
+#define NewCDialog(dStorage, boundsRect, title, visible, procID, behind, goAwayFlag, refCon, items) \
+NewColorDialog(dStorage, boundsRect, title, visible, procID, behind, goAwayFlag, refCon, items)
+#define GetAlrtStage() GetAlertStage()
+#define ResetAlrtStage() ResetAlertStage()
+#define DlgCut(theDialog) DialogCut(theDialog)
+#define DlgPaste(theDialog) DialogPaste(theDialog)
+#define DlgCopy(theDialog) DialogCopy(theDialog)
+#define DlgDelete(theDialog) DialogDelete(theDialog)
+#define SetDAFont(fontNum) SetDialogFont(fontNum)
+#define SetGrafPortOfDialog(dialog) SetPortDialogPort(dialog)
+#endif { OLDROUTINENAMES }
+*)
+
+
+
+{unit HIArchive}
+{
+ File: HIToolbox/HIArchive.h
+
+ Contains: HIArchive Interfaces.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 2004-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{
+ * HIArchive
+ *
+ * Discussion:
+ * HIArchive provides a standard, extensible mechanism to flatten
+ * objects for storage in memory or on disk for later retrieval or
+ * transfer to another application. The archive is encoded using the
+ * binary property list format. The binary plist can be converted to
+ * text XML with /usr/bin/plutil for develoment purposes. Details on
+ * how to create an object that supports the HIArchive protocol are
+ * provided in HIToolbox/HIObject.h.
+ *
+ * When writing data out to an archive, the client must first use
+ * HIArchiveCreateForEncoding to generate the archive into which the
+ * data will be encoded. From there, data may be added to the
+ * archive by calling HIArchiveEncodeBoolean, HIArchiveEncodeNumber,
+ * and HIArchiveEncodeCFType. If HIArchiveEncodeCFType is being
+ * called on one of your custom HIObjects, HIToolbox will send it
+ * the kEventHIObjectEncode (HIOBject.h) event. In order to receive
+ * this event your HIObject must first have set its archiving
+ * ignored value to false via HIObjectSetArchivingIgnored. This lets
+ * HIToolbox know your object supports archiving. The
+ * kEventParamHIArchive parameter contains the HIArchiveRef into
+ * which it should encode all of its relevant state information. All
+ * information added to the archive is written with a key. This key
+ * is used later during the unarchiving process to pull the encoded
+ * data from the archive. System supplied HIObjects namespace their
+ * keys with an HI prefix. Subclasses of system supplied HIObjects
+ * should only use this namespace if explicitly overriding a value
+ * written to the archive by the superclass. Take care to mantain
+ * the same preference format when overriding the default to avoid
+ * incompatibilities. When your archiving process is complete,
+ * HIArchiveCopyEncodedData will compress the data into the archive
+ * return it in a CFDataRef. This CFDataRef can be sent to another
+ * application or written out to disk for later retrieval. Once the
+ * encoded data is compressed, no more data may be added to the
+ * archive. At this point, the HIArchiveRef must be released via
+ * CFRelease.
+ *
+ * When retrieving data from an archive, the client must first use
+ * HIArchiveCreateForDecoding to create an archive reference capable
+ * of decoding the data from the provided CFDataRef. Given the
+ * HIArchiveRef, data may be pulled from the archive via
+ * HIArchiveDecodeBoolean, HIArchiveDecodeNumber,
+ * HIArchiveCopyDecodedCFType and HIArchiveCopyDecodedHIObject. If
+ * HIArchiveCopyDecodedHIObject is called on one of you custom
+ * HIObjects, HIToolbox will send it the kEventHIObjectInitialize
+ * (HIOBject.h) event. The kEventParamHIArchive parameter contains
+ * the HIArchiveRef from which it should decode all of its relevant
+ * state information. Because these data values were written by key,
+ * they can be read in any order regardless of how they were
+ * written. This also means new keyed values can be added without
+ * breaking existing decoding routines. Once all data has been read
+ * from the archive, it may simply be released via CFRelease.
+ *
+ *
+ * For those clients who wish to provide HIArchive editing features
+ * there are a few tricks necessary to achieve the desired behavior.
+ * A generic HIArchive editor will likely be used by clients to edit
+ * objects for which it has no direct knowledge (or which have not
+ * yet been designed). For instance, it may provide users with the
+ * ability to edit custom HIViews including generic functionality to
+ * set the view's class identifier, title, frame, etc. In this case,
+ * it is necessary to instantiate the superclass
+ * ("com.apple.hiview") of the custom view object because it doesn't
+ * exist and hasn't been registered within the editor.
+ *
+ * After the user has completed editing the object and desires to
+ * write out the archive, the editor must set the custom archive
+ * data to the object with HIObjectSetCustomArchiveData as a
+ * CFDictionary. Standard keys for initialization parameter types,
+ * names and values, class and superclass identifiers and CDEF
+ * procID are provided in HIToolbox/HIObject.h. Of particular
+ * importance are the object's class and superclass identifier.
+ * HIArchive uses these values to instantiate the proper object when
+ * loading the archive within the client's application. The
+ * parameter types, names and values are then automatically passed
+ * to the client object through its initialization event.
+ *
+ * At this point, the object can simply be written into the archive
+ * with HIArchiveCreateForEncoding and HIArchiveEncodeCFType.
+ * HIArchive will handle writing the appropriate classID based on
+ * the custom data that was assigned earlier.
+ *
+ * Generic HIArchive editing applications will also need to handle
+ * loading client archives. In this case, the archive is decoded in
+ * editing mode by passing the
+ * kHIArchiveDecodeSuperclassForUnregisteredObjects proxy bit in
+ * HIArchiveCreateForDecoding. When objects not registered in the
+ * current application are decoded, HIArchive will notice this and
+ * look into the custom data for the object's superclass identifier,
+ * instantiate an object of that type instead and attach the custom
+ * data to the newly created object. The editor can then look at the
+ * attached custom data with HIObjectCopyCustomArchiveData and
+ * provide it in the UI for the user to edit.
+ }
+type
+ HIArchiveRef = ^SInt32; { an opaque 32-bit type }
+
+{
+ * Discussion:
+ * HIArchive errors
+ }
+const
+{
+ * The archive was created specifically for encoding or decoding but
+ * passed into a non-corresponding routine.
+ }
+ hiArchiveTypeMismatchErr = -6780;
+
+ {
+ * The keyed value requested does not exist in the archive.
+ }
+ hiArchiveKeyNotAvailableErr = -6781;
+
+ {
+ * HIArchiveCopyEncodedData has been called and no more data may be
+ * encoded.
+ }
+ hiArchiveEncodingCompleteErr = -6782;
+
+ {
+ * The HIObject does not support the archiving protocol.
+ }
+ hiArchiveHIObjectIgnoresArchivingErr = -6783;
+
+
+{
+ * Discussion:
+ * HIArchiveCreateForDecoding options
+ }
+const
+{
+ * kDecodeSuperclassForUnregisteredObjects is passed to
+ * HIArchiveCreateForDecoding indicating that if an HIObject's class
+ * has not been registered before it is pulled from the archive,
+ * HIArchiveCopyDecodedCFType will automatically instantiate the
+ * unarchived object as its superclass if it exists. For instance, a
+ * custom HIView of class "com.myco.customview" being unarchived will
+ * be instantiated as class "com.apple.hiview" if your app has not
+ * yet registered "com.myco.customview". This is useful for archive
+ * editors that do not implement all objects contained in a client
+ * archive. Note that only data written to the archive by the
+ * superclass will be decoded. All data unique to the unregistered
+ * subclass will be ignored. This option also signals the HIObject to
+ * load its custom archive data so it can be accessed via
+ * HIObjectCopyCustomArchiveData. HIArchive is unable to instantiate
+ * unregistered objects whose superclasses are also unregistered.
+ }
+ kHIArchiveDecodeSuperclassForUnregisteredObjects = 1 shl 0;
+
+{
+ * HIArchiveGetTypeID()
+ *
+ * Summary:
+ * Returns the CFType identifier for an HIArchive object.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * A CFTypeID unique to HIArchive instances.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIArchiveGetTypeID: CFTypeID; external name '_HIArchiveGetTypeID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIArchiveCreateForEncoding()
+ *
+ * Summary:
+ * Creates an HIArchive for use in encoding object information.
+ *
+ * Discussion:
+ * The created HIArchiveRef is a CFType and must be released via
+ * CFRelease.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * outEncoder:
+ * An HIArchive reference which receives the created HIArchive on
+ * return.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIArchiveCreateForEncoding( var outEncoder: HIArchiveRef ): OSStatus; external name '_HIArchiveCreateForEncoding';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIArchiveEncodeBoolean()
+ *
+ * Summary:
+ * Adds a keyed boolean value to the provided archive.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inEncoder:
+ * An HIArchiveRef to which the boolean value is added.
+ *
+ * inKey:
+ * The key associated with the boolean value used for later
+ * decoding.
+ *
+ * inBoolean:
+ * The boolean value to be encoded.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIArchiveEncodeBoolean( inEncoder: HIArchiveRef; inKey: CFStringRef; inBoolean: Boolean ): OSStatus; external name '_HIArchiveEncodeBoolean';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIArchiveEncodeNumber()
+ *
+ * Summary:
+ * Adds a keyed number value to the provided archive.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inEncoder:
+ * An HIArchiveRef to which the number value is added.
+ *
+ * inKey:
+ * The key associated with the number value used for later
+ * decoding.
+ *
+ * inNumberType:
+ * A CFNumberType describing the type of number value being
+ * encoded.
+ *
+ * inNumberValue:
+ * The number value to be encoded.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIArchiveEncodeNumber( inEncoder: HIArchiveRef; inKey: CFStringRef; inNumberType: CFNumberType; inNumberValue: {const} UnivPtr ): OSStatus; external name '_HIArchiveEncodeNumber';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIArchiveEncodeCFType()
+ *
+ * Summary:
+ * Adds a keyed CFType to the provided archive.
+ *
+ * Discussion:
+ * Encodes basic and property list based CFTypes including HIObjects
+ * supporting the archiving protocol. If the HIObject supports the
+ * archiving protocol, it will receive the kEventHIObjectEncode
+ * event during which it should encode all relevant state
+ * information. The kEventParamHIArchive parameter contains the
+ * archive into which data should be added.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inEncoder:
+ * An HIArchiveRef to which the CFType is added.
+ *
+ * inKey:
+ * The key associated with the CFType used for later decoding.
+ *
+ * inCFType:
+ * The CFType to be encoded.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIArchiveEncodeCFType( inEncoder: HIArchiveRef; inKey: CFStringRef; inCFType: CFTypeRef ): OSStatus; external name '_HIArchiveEncodeCFType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIArchiveCopyEncodedData()
+ *
+ * Summary:
+ * Returns the encoded archive as a CFDataRef.
+ *
+ * Discussion:
+ * Compresses the archived data for storage and returns it as a
+ * CFDataRef. After the archived data is compressed, no further
+ * information may be encoded. Do not call this routine until the
+ * encoding process is complete.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inEncoder:
+ * An HIArchiveRef into which the archived data was compiled.
+ *
+ * outData:
+ * A CFData reference which receives the compressed archive data
+ * on return.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIArchiveCopyEncodedData( inEncoder: HIArchiveRef; var outData: CFDataRef ): OSStatus; external name '_HIArchiveCopyEncodedData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIArchiveCreateForDecoding()
+ *
+ * Summary:
+ * Creates an HIArchive for use in decoding the object information
+ * contained in the provided CFData reference.
+ *
+ * Discussion:
+ * The created HIArchiveRef is a CFType and must be released via
+ * CFRelease.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inData:
+ * A CFDataRef containing a previously encoded archive.
+ *
+ * inOptions:
+ * The only option supported by this routine at present is
+ * kHIArchiveDecodeSuperclassForUnregisteredObjects. You may also
+ * pass zero for this parameter to get the default behavior.
+ *
+ * outDecoder:
+ * An HIArchive reference which receives the created HIArchive on
+ * return.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIArchiveCreateForDecoding( inData: CFDataRef; inOptions: OptionBits; var outDecoder: HIArchiveRef ): OSStatus; external name '_HIArchiveCreateForDecoding';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIArchiveDecodeBoolean()
+ *
+ * Summary:
+ * Pulls a keyed boolean value from the provided archive.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDecoder:
+ * An HIArchiveRef from which the boolean value is pulled.
+ *
+ * inKey:
+ * The key associated with the boolean value used while encoding.
+ *
+ * outBoolean:
+ * The boolean value to be decoded.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIArchiveDecodeBoolean( inDecoder: HIArchiveRef; inKey: CFStringRef; var outBoolean: Boolean ): OSStatus; external name '_HIArchiveDecodeBoolean';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIArchiveDecodeNumber()
+ *
+ * Summary:
+ * Pulls a keyed number value from the provided archive.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDecoder:
+ * An HIArchiveRef from which the number value is pulled.
+ *
+ * inKey:
+ * The key associated with the number value used while encoding.
+ *
+ * inNumberType:
+ * A CFNumberType describing the type of number value being
+ * encoded.
+ *
+ * outNumberValue:
+ * The number value to be decoded.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIArchiveDecodeNumber( inDecoder: HIArchiveRef; inKey: CFStringRef; inNumberType: CFNumberType; outNumberValue: UnivPtr ): OSStatus; external name '_HIArchiveDecodeNumber';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIArchiveCopyDecodedCFType()
+ *
+ * Summary:
+ * Pulls a keyed CFType from the provided archive.
+ *
+ * Discussion:
+ * Decodes basic and property list based CFTypes and HIObjects. If
+ * the CFType is an HIObject, it will be constructed and receive the
+ * kEventHIObjectInitialize event. The kEventParamHIArchive
+ * parameter contains the archive from which data should be
+ * retrieved.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDecoder:
+ * An HIArchiveRef from which the CFType value is pulled.
+ *
+ * inKey:
+ * The key associated with the CFType used while encoding.
+ *
+ * outCFType:
+ * The CFType to be decoded.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIArchiveCopyDecodedCFType( inDecoder: HIArchiveRef; inKey: CFStringRef; var outCFType: CFTypeRef ): OSStatus; external name '_HIArchiveCopyDecodedCFType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit HITheme}
+{
+ File: HIToolbox/HITheme.h
+
+ Contains: HIToolbox HITheme interfaces.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1994-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, 2004 }
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ -------------------------------------------------------------------------- }
+{ HIThemeOrientation information }
+{ -------------------------------------------------------------------------- }
+
+const
+{
+ * The passed context has an origin at the top left. This is the
+ * default of a context passed to you by HIToolbox.
+ }
+ kHIThemeOrientationNormal = 0;
+
+ {
+ * The passed context has an origin at the bottom left. This is the
+ * default for a context you create.
+ }
+ kHIThemeOrientationInverted = 1;
+
+type
+ HIThemeOrientation = UInt32;
+{ -------------------------------------------------------------------------- }
+{ Splitter types }
+{ -------------------------------------------------------------------------- }
+
+const
+{
+ * Draw the splitter with its normal appearance.
+ }
+ kHIThemeSplitterAdornmentNone = 0;
+
+ {
+ * Draw the splitter with its metal appearance.
+ }
+ kHIThemeSplitterAdornmentMetal = 1;
+
+type
+ HIThemeSplitterAdornment = UInt32;
+{ -------------------------------------------------------------------------- }
+{ Window Grow Box }
+{ -------------------------------------------------------------------------- }
+
+const
+{
+ * The grow box corner for a window that has no scroll bars.
+ }
+ kHIThemeGrowBoxKindNormal = 0;
+
+ {
+ * The grow box corner for a window that has no grow box. This sounds
+ * paradoxical, but this type of grow box, formerly known as the
+ * "NoGrowBox" is used to fill in the corner left blank by the
+ * intersection of a horizontal and a vertical scroll bar.
+ }
+ kHIThemeGrowBoxKindNone = 1;
+
+type
+ HIThemeGrowBoxKind = UInt32;
+
+const
+{
+ * Draw the grow box for normal windows.
+ }
+ kHIThemeGrowBoxSizeNormal = 0;
+
+ {
+ * Draw the smaller grow box for utility or floating windows.
+ }
+ kHIThemeGrowBoxSizeSmall = 1;
+
+type
+ HIThemeGrowBoxSize = UInt32;
+
+const
+{
+ * The group box is drawn with the primary variant.
+ }
+ kHIThemeGroupBoxKindPrimary = 0;
+
+ {
+ * The group box is drawn with the secondary variant.
+ }
+ kHIThemeGroupBoxKindSecondary = 1;
+
+ {
+ * The group box is drawn with the primary variant. This group box
+ * draws opaque. This does not match the Mac OS X 10.3 appearance
+ * 100%, as the boxes should be transparent, but draws this way for
+ * the sake of compatibility. Please update to use the newer
+ * transparent variant.
+ }
+ kHIThemeGroupBoxKindPrimaryOpaque = 3;
+
+ {
+ * The group box is drawn with the secondary variant. This group box
+ * draws opaque. This does not match the Mac OS X 10.3 appearance
+ * 100%, as the boxes should be transparent, but draws this way for
+ * the sake of compatibility. Please update to use the newer
+ * transparent variant.
+ }
+ kHIThemeGroupBoxKindSecondaryOpaque = 4;
+
+type
+ HIThemeGroupBoxKind = UInt32;
+
+const
+{
+ * A header drawn above window content that has no top border of its
+ * own. (i.e. the same as the status bar in an icon view Finder
+ * window).
+ }
+ kHIThemeHeaderKindWindow = 0;
+
+ {
+ * A header drawn above window content that has a top border of its
+ * own. (i.e. the same as the status bar in an list view Finder
+ * window).
+ }
+ kHIThemeHeaderKindList = 1;
+
+type
+ HIThemeHeaderKind = UInt32;
+
+const
+{
+ * The default sized square text field (like Edit Text).
+ }
+ kHIThemeFrameTextFieldSquare = 0;
+ kHIThemeFrameListBox = 1;
+
+type
+ HIThemeFrameKind = UInt32;
+
+const
+{
+ * Indicates that a menu title should be drawn in a condensed
+ * appearance. This constant is used in the
+ * HIThemeMenuTitleDrawInfo.attributes field.
+ }
+ kHIThemeMenuTitleDrawCondensed = 1 shl 0;
+
+{ -------------------------------------------------------------------------- }
+{ DrawInfo }
+{ -------------------------------------------------------------------------- }
+
+{
+ * HIScrollBarTrackInfo
+ *
+ * Summary:
+ * Drawing parameters passed to scroll bar drawing and measuring
+ * theme APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIScrollBarTrackInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeTrackEnableState for the scroll bar to be drawn.
+ }
+ enableState: SInt8 {ThemeTrackEnableState};
+
+ {
+ * The ThemeTrackPressState for the scroll bar to be drawn.
+ }
+ pressState: SInt8 {ThemeTrackPressState};
+
+ {
+ * The view range size.
+ }
+ viewsize: Float32;
+ end;
+ HIScrollBarTrackInfoPtr = ^HIScrollBarTrackInfo;
+
+{
+ * HIThemeTrackDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to track drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3, but based on legacy TrackDrawInfo.
+ }
+type
+ HIThemeTrackDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32; { current version is 0 }
+
+ {
+ * The ThemeTrackKind of the track being drawn or measured.
+ }
+ kind: ThemeTrackKind; { what kind of track this info is for }
+
+ {
+ * An HIRect describing the bounds of the track being drawn or
+ * measured.
+ }
+ bounds: HIRect; { track basis rectangle }
+
+ {
+ * The minimum allowable value for the track being drawn or measured.
+ }
+ min: SInt32; { min track value }
+
+ {
+ * The maximum allowable value for the track being drawn or measured.
+ }
+ max: SInt32; { max track value }
+
+ {
+ * The value for the track being drawn or measured.
+ }
+ value: SInt32; { current thumb value }
+
+ {
+ * Leave this reserved field set to 0.
+ }
+ reserved: UInt32;
+
+
+ {
+ * A set of ThemeTrackAttributes for the track to be drawn or
+ * measured.
+ }
+ attributes: ThemeTrackAttributes; { various track attributes }
+
+ {
+ * A ThemeTrackEnableState describing the state of the track to be
+ * drawn or measured.
+ }
+ enableState: SInt8 {ThemeTrackEnableState}; { enable state }
+
+ {
+ * Leave this reserved field set to 0.
+ }
+ filler1: SInt8;
+
+ case SInt16 of
+ 0: (
+ scrollbar: ScrollBarTrackInfo;
+ );
+ 1: (
+ slider: SliderTrackInfo;
+ );
+ 2: (
+ progress: ProgressTrackInfo;
+ );
+ end;
+ HIThemeTrackDrawInfoPtr = ^HIThemeTrackDrawInfo;
+
+{
+ * HIThemeAnimationTimeInfo
+ *
+ * Summary:
+ * Time parameters passed to button drawing and measuring theme APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeAnimationTimeInfo = record
+{
+ * The CFAbsoluteTime of the beginning of the animation of the
+ * button. This only applies to buttons that animate -- currently
+ * only kThemePushButton. All other buttons will ignore this field.
+ * If there is to be no animation, set this field to 0.
+ }
+ start: CFAbsoluteTime;
+
+ {
+ * The CFAbsoluteTime of the current animation frame of the button.
+ * This only applies to buttons that animate -- currently only
+ * kThemePushButton. All other buttons will ignore this field. If
+ * there is to be no animation, set this field to 0.
+ }
+ current: CFAbsoluteTime;
+ end;
+ HIThemeAnimationTimeInfoPtr = ^HIThemeAnimationTimeInfo;
+
+{
+ * HIThemeAnimationFrameInfo
+ *
+ * Summary:
+ * Frame parameters passed to button drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeAnimationFrameInfo = record
+{
+ * The index of the frame of the animation to draw. If the index is
+ * greater that the maximum number of animation frames, it will be
+ * modded to calculate which frame to draw.
+ }
+ index: UInt32;
+ end;
+ HIThemeAnimationFrameInfoPtr = ^HIThemeAnimationFrameInfo;
+
+{
+ * HIThemeButtonDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to button drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeButtonDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeDrawState of the button being drawn or measured.
+ }
+ state: ThemeDrawState;
+
+ {
+ * A ThemeButtonKind indicating the type of button to be drawn.
+ }
+ kind: ThemeButtonKind;
+
+ {
+ * The ThemeButtonValue of the button being drawn or measured.
+ }
+ value: ThemeButtonValue;
+
+ {
+ * The ThemeButtonAdornment(s) with which the button is being drawn
+ * or measured.
+ }
+ adornment: ThemeButtonAdornment;
+ case SInt16 of
+ 0: (
+ time: HIThemeAnimationTimeInfo;
+ );
+ 1: (
+ frame: HIThemeAnimationFrameInfo;
+ );
+ end;
+ HIThemeButtonDrawInfoPtr = ^HIThemeButtonDrawInfo;
+
+{
+ * HIThemeSplitterDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to splitter drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeSplitterDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeDrawState of the splitter being drawn or measured.
+ }
+ state: ThemeDrawState;
+
+ {
+ * The HIThemeSplitterAdornments of the splitter being drawn or
+ * measured.
+ }
+ adornment: HIThemeSplitterAdornment;
+ end;
+ HIThemeSplitterDrawInfoPtr = ^HIThemeSplitterDrawInfo;
+
+const
+{
+ * No tab adornments are to be drawn.
+ }
+ kHIThemeTabAdornmentNone = 0;
+
+ {
+ * A focus ring is to be drawn around the tab.
+ }
+ kHIThemeTabAdornmentFocus = 1 shl 2; { to match button focus adornment }
+
+ {
+ * If available, a leading separator is to be drawn on the tab,
+ * either to the left or above, depending on orientation. Note that
+ * tabs overlap and if the separators are drawn over top each other,
+ * the shadows multiply undesirably. New in Mac OS X 10.4.
+ }
+ kHIThemeTabAdornmentLeadingSeparator = 1 shl 3;
+
+ {
+ * If available, a right separator is to be drawn on the tab, either
+ * to the right or below, depending on the orientation. Note that
+ * tabs overlap and if the separators are drawn over top each other,
+ * the shadows multiply undesirably. New in Mac OS X 10.4.
+ }
+ kHIThemeTabAdornmentTrailingSeparator = 1 shl 4;
+
+type
+ HIThemeTabAdornment = UInt32;
+
+{
+ * Summary:
+ * These values are similar to kControlSize constants for
+ * convenience.
+ }
+const
+{
+ * The tabs are normal (large) sized.
+ }
+ kHIThemeTabSizeNormal = 0;
+
+ {
+ * The tabs are drawn as the small variant.
+ }
+ kHIThemeTabSizeSmall = 1;
+
+ {
+ * The tabs are drawn as the mini variant.
+ }
+ kHIThemeTabSizeMini = 3;
+
+type
+ HIThemeTabSize = UInt32;
+
+{
+ * Summary:
+ * Available values for HIThemeTabPosition. These are positions of
+ * the tabs within the tab control. New in Mac OS X 10.4.
+ }
+const
+{
+ * The first position of a tab control. Left or top tab.
+ }
+ kHIThemeTabPositionFirst = 0;
+
+ {
+ * A middle tab.
+ }
+ kHIThemeTabPositionMiddle = 1;
+
+ {
+ * The last position of a tab control. Right or bottom tab.
+ }
+ kHIThemeTabPositionLast = 2;
+
+ {
+ * The only position of a tab control. It is simultaneously first and
+ * last. You know, only. There is only one tab. It looks pretty much
+ * like a button. Please don't use this if you can avoid it. It's
+ * ugly.
+ }
+ kHIThemeTabPositionOnly = 3;
+
+type
+ HIThemeTabPosition = UInt32;
+
+{
+ * Summary:
+ * Available values for HIThemeTabKind.
+ }
+const
+ kHIThemeTabKindNormal = 0;
+
+type
+ HIThemeTabKind = UInt32;
+
+{
+ * HIThemeTabDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to tab drawing and measuring theme APIs.
+ *
+ * Discussion:
+ * In Mac OS X 10.4, added kind and position fields.
+ }
+type
+ HIThemeTabDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 1.
+ }
+ version: UInt32;
+
+ {
+ * A ThemeTabStyle describing the style of the tab to be drawn.
+ }
+ style: ThemeTabStyle;
+
+ {
+ * A ThemeTabDirection describing the side on which the tab is being
+ * drawn.
+ }
+ direction: ThemeTabDirection;
+
+ {
+ * An HIThemeTabSize indicating what size of tab to draw.
+ }
+ size: HIThemeTabSize;
+
+ {
+ * An HIThemeTabAdornment describing any additional adornments that
+ * are to be drawn on the tab.
+ }
+ adornment: HIThemeTabAdornment; { various tab attributes }
+
+ {
+ * An HIThemeTabKind indicating what kind of tab to draw.
+ }
+ kind: HIThemeTabKind;
+
+ {
+ * The HIThemeTabPositions of the tab to be drawn or measured.
+ }
+ position: HIThemeTabPosition;
+ end;
+ HIThemeTabDrawInfoPtr = ^HIThemeTabDrawInfo;
+
+{
+ * HIThemeTabDrawInfoVersionZero
+ *
+ * Summary:
+ * This structure is left here as a reference to the previous
+ * version of the tab drawing parameters. Please use the current
+ * version.
+ *
+ * Discussion:
+ * Shipped with Mac OS X 10.3.
+ }
+type
+ HIThemeTabDrawInfoVersionZero = record
+ version: UInt32;
+ style: ThemeTabStyle;
+ direction: ThemeTabDirection;
+ size: HIThemeTabSize;
+ adornment: HIThemeTabAdornment; { various tab attributes }
+ end;
+
+{
+ * Summary:
+ * Values for HIThemeTabPaneAdornment.
+ }
+const
+ kHIThemeTabPaneAdornmentNormal = 0;
+
+
+type
+ HIThemeTabPaneAdornment = UInt32;
+
+{
+ * HIThemeTabPaneDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to tab pane drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * In Mac OS X 10.4, added kind and adornment fields.
+ }
+type
+ HIThemeTabPaneDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeDrawState for the tab pane to be drawn.
+ }
+ state: ThemeDrawState;
+
+ {
+ * A ThemeTabDirection describing on which side of the pane the tabs
+ * will be drawn.
+ }
+ direction: ThemeTabDirection;
+
+ {
+ * An HIThemeTabSize indicating what size of tab pane to draw.
+ }
+ size: HIThemeTabSize;
+
+ {
+ * An HIThemeTabKind indicating what kind of tab to draw this pane
+ * for.
+ }
+ kind: HIThemeTabKind;
+
+ {
+ * An HIThemeTabPaneAdornment describing any additional adornments
+ * that are to be drawn on the tab pane.
+ }
+ adornment: HIThemeTabPaneAdornment;
+ end;
+
+{
+ * HIThemeTabPaneDrawInfoVersionZero
+ *
+ * Summary:
+ * This structure is left here as a reference to the previous
+ * version of the tab pane drawing parameters. Please use the
+ * current version.
+ *
+ * Discussion:
+ * Shipped with Mac OS X 10.3.
+ }
+type
+ HIThemeTabPaneDrawInfoVersionZero = record
+ version: UInt32;
+ state: ThemeDrawState;
+ direction: ThemeTabDirection;
+ size: HIThemeTabSize;
+ end;
+
+{
+ * HIThemeMenuDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to menu drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeMenuDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * A ThemeMenuType indicating which type of menu is to be drawn.
+ }
+ menuType: ThemeMenuType;
+ end;
+ HIThemeMenuDrawInfoPtr = ^HIThemeMenuDrawInfo;
+
+{
+ * HIThemeMenuItemDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to menu item drawing and measuring
+ * theme APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeMenuItemDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * A ThemeMenuItemType indicating what type of menu item is to be
+ * drawn.
+ }
+ itemType: ThemeMenuItemType;
+
+ {
+ * The ThemeMenuState of the menu item to be drawn.
+ }
+ state: ThemeMenuState;
+ end;
+ HIThemeMenuItemDrawInfoPtr = ^HIThemeMenuItemDrawInfo;
+
+{
+ * HIThemeFrameDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to frame drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeFrameDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The HIThemeFrameKind of the frame to be drawn.
+ }
+ kind: HIThemeFrameKind;
+
+ {
+ * The ThemeDrawState of the frame to be drawn.
+ }
+ state: ThemeDrawState;
+
+ {
+ * A Boolean indicating whether the frame is to be drawn with focus
+ * or without.
+ }
+ isFocused: Boolean;
+ end;
+ HIThemeFrameDrawInfoPtr = ^HIThemeFrameDrawInfo;
+
+{
+ * HIThemeGroupBoxDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to group box drawing and measuring
+ * theme APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeGroupBoxDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeDrawState for the group box to be drawn.
+ }
+ state: ThemeDrawState;
+
+ {
+ * An HIThemeGroupBoxKind indicating which type of group box is to be
+ * drawn.
+ }
+ kind: HIThemeGroupBoxKind;
+ end;
+ HIThemeGroupBoxDrawInfoPtr = ^HIThemeGroupBoxDrawInfo;
+
+{
+ * HIThemeGrabberDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to grabber drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeGrabberDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeDrawState for the grabber to be drawn.
+ }
+ state: ThemeDrawState;
+ end;
+ HIThemeGrabberDrawInfoPtr = ^HIThemeGrabberDrawInfo;
+
+{
+ * HIThemePlacardDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to placard drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemePlacardDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeDrawState for the placard to be drawn.
+ }
+ state: ThemeDrawState;
+ end;
+ HIThemePlacardDrawInfoPtr = ^HIThemePlacardDrawInfo;
+
+{
+ * HIThemeHeaderDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to header drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeHeaderDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeDrawState for the header to be drawn.
+ }
+ state: ThemeDrawState;
+
+ {
+ * The HIThemeHeaderKind for the header to be drawn.
+ }
+ kind: HIThemeHeaderKind;
+ end;
+ HIThemeHeaderDrawInfoPtr = ^HIThemeHeaderDrawInfo;
+
+{
+ * HIThemeMenuBarDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to HIThemeDrawMenuBarBackground.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeMenuBarDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeMenuBarState for the menu bar to be drawn.
+ }
+ state: ThemeMenuBarState;
+
+ {
+ * The attributes of the menu bar to be drawn.
+ }
+ attributes: UInt32;
+ end;
+ HIThemeMenuBarDrawInfoPtr = ^HIThemeMenuBarDrawInfo;
+
+{
+ * HIThemeMenuTitleDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to HIThemeDrawMenuTitle.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeMenuTitleDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeMenuState for the menu title to be drawn.
+ }
+ state: ThemeMenuState;
+
+ {
+ * The attributes of the menu title to be drawn. Must be either 0 or
+ * kHIThemeMenuTitleDrawCondensed.
+ }
+ attributes: UInt32;
+
+ {
+ * The border space between the menu title rect and the menu title
+ * text when the menu title spacing is being condensed. This field is
+ * only observed by the Appearance Manager when the attributes field
+ * contains kHIThemeMenuTitleDrawCondensed. The valid values for this
+ * field range from the value returned by GetThemeMenuTitleExtra(
+ * &extra, false ) to the value returned by GetThemeMenuTitleExtra(
+ * &extra, true ). You may pass 0 in this field to use the minimum
+ * condensed title extra.
+ }
+ condensedTitleExtra: Float32;
+ end;
+ HIThemeMenuTitleDrawInfoPtr = ^HIThemeMenuTitleDrawInfo;
+
+{
+ * HIThemeTickMarkDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to tick mark drawing and measuring
+ * theme APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeTickMarkDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeDrawState for the tick mark to be drawn.
+ }
+ state: ThemeDrawState;
+ end;
+ HIThemeTickMarkDrawInfoPtr = ^HIThemeTickMarkDrawInfo;
+
+{
+ * HIThemeWindowDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to window drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3, but based on legacy ThemeWindowMetrics.
+ }
+type
+ HIThemeWindowDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * A ThemeDrawState which describes the state of the window to be
+ * drawn.
+ }
+ state: ThemeDrawState;
+
+ {
+ * A ThemeWindowType specifying the type of window to be drawn.
+ }
+ windowType: ThemeWindowType;
+
+ {
+ * The ThemeWindowAttributes describing the window to be drawn.
+ }
+ attributes: ThemeWindowAttributes;
+
+ {
+ * The height of the title of the window.
+ }
+ titleHeight: Float32;
+
+ {
+ * The width of the title of the window.
+ }
+ titleWidth: Float32;
+ end;
+ HIThemeWindowDrawInfoPtr = ^HIThemeWindowDrawInfo;
+
+{
+ * HIThemeWindowWidgetDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to window widget drawing and measuring
+ * theme APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3, but based on legacy ThemeWindowMetrics.
+ }
+type
+ HIThemeWindowWidgetDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * A ThemeDrawState which describes the state of the widget to be
+ * drawn.
+ }
+ widgetState: ThemeDrawState;
+
+ {
+ * A ThemeTitleBarWidget specifying the type of window widget to be
+ * drawn.
+ }
+ widgetType: ThemeTitleBarWidget;
+
+ {
+ * A ThemeDrawState which describes the state of the window for which
+ * the widget is to be drawn.
+ }
+ windowState: ThemeDrawState;
+
+ {
+ * A ThemeWindowType specifying the type of window to be drawn.
+ }
+ windowType: ThemeWindowType;
+
+ {
+ * The ThemeWindowAttributes describing the window to be drawn.
+ }
+ attributes: ThemeWindowAttributes;
+
+ {
+ * The height of the title of the window.
+ }
+ titleHeight: Float32;
+
+ {
+ * The width of the title of the window.
+ }
+ titleWidth: Float32;
+ end;
+ HIThemeWindowWidgetDrawInfoPtr = ^HIThemeWindowWidgetDrawInfo;
+
+{
+ * HIThemeSeparatorDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to separator drawing and measuring
+ * theme APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeSeparatorDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeDrawState for the separator to be drawn.
+ }
+ state: ThemeDrawState;
+ end;
+ HIThemeSeparatorDrawInfoPtr = ^HIThemeSeparatorDrawInfo;
+
+{
+ * HIThemeScrollBarDelimitersDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to separator drawing and measuring
+ * theme APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeScrollBarDelimitersDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeDrawState for the separator to be drawn.
+ }
+ state: ThemeDrawState;
+
+ {
+ * A ThemeWindowType specifying the type of window for which to draw
+ * the delimiters.
+ }
+ windowType: ThemeWindowType;
+
+ {
+ * The ThemeWindowAttributes of the window for which the scroll bar
+ * delimters are to be drawn.
+ }
+ attributes: ThemeWindowAttributes;
+ end;
+ HIThemeScrollBarDelimitersDrawInfoPtr = ^HIThemeScrollBarDelimitersDrawInfo;
+
+{
+ * HIThemeChasingArrowsDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to chasing arrows drawing and measuring
+ * theme APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeChasingArrowsDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeDrawState for the chasing arrows to be drawn.
+ }
+ state: ThemeDrawState;
+
+ {
+ * A UInt32 used to calculate which frame of the chasing arrow
+ * animation is to be drawn.
+ }
+ index: UInt32;
+ end;
+ HIThemeChasingArrowsDrawInfoPtr = ^HIThemeChasingArrowsDrawInfo;
+
+{
+ * HIThemePopupArrowDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to popup arrow drawing and measuring
+ * theme APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemePopupArrowDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeDrawState for the popup arrow to be drawn.
+ }
+ state: ThemeDrawState;
+
+ {
+ * A ThemeArrowOrientation for the orientation of the popup arrow to
+ * be drawn.
+ }
+ orientation: ThemeArrowOrientation;
+
+ {
+ * A ThemePopupArrowSize for the size of the popup arrow to be drawn.
+ }
+ size: ThemePopupArrowSize;
+ end;
+ HIThemePopupArrowDrawInfoPtr = ^HIThemePopupArrowDrawInfo;
+
+{
+ * HIThemeGrowBoxDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to grow box drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3.
+ }
+type
+ HIThemeGrowBoxDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeDrawState for the grow box to be drawn.
+ }
+ state: ThemeDrawState;
+
+ {
+ * A ThemeGrowBoxKind indicating in which kind of grow box to draw.
+ }
+ kind: HIThemeGrowBoxKind;
+
+ {
+ * A ThemeGrowDirection indicating in which direction the window will
+ * grow.
+ }
+ direction: ThemeGrowDirection;
+
+ {
+ * An HIThemeGrowBoxSize describing the size of the grow box to draw.
+ }
+ size: HIThemeGrowBoxSize;
+ end;
+ HIThemeGrowBoxDrawInfoPtr = ^HIThemeGrowBoxDrawInfo;
+
+{
+ * HIThemeBackgroundDrawInfo
+ *
+ * Discussion:
+ * New in Mac OS X 10.3, but based on legacy TrackDrawInfo.
+ }
+type
+ HIThemeBackgroundDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeDrawState of the background to be drawn. Currently,
+ * HIThemeDrawBackground backgrounds do not have state, so this field
+ * has no meaning. Set it to kThemeStateActive.
+ }
+ state: ThemeDrawState;
+
+ {
+ * The ThemeBackgroundKind with which to fill the background.
+ }
+ kind: ThemeBackgroundKind;
+ end;
+ HIThemeBackgroundDrawInfoPtr = ^HIThemeBackgroundDrawInfo;
+{ -------------------------------------------------------------------------- }
+{ Buttons }
+{ -------------------------------------------------------------------------- }
+{
+ * HIThemeDrawButton()
+ *
+ * Summary:
+ * Draw a themed button.
+ *
+ * Discussion:
+ * This generic button drawing theme primitive draws not just a push
+ * button, but all of the kinds of buttons described by
+ * ThemeButtonKind.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBounds:
+ * The HIRect in which to draw. Note that this API may draw
+ * outside of its bounds.
+ *
+ * inDrawInfo:
+ * An HIThemeButtonDrawInfo describing the button that will be
+ * drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * outLabelRect:
+ * A pointer to an HIRect into which to put the bounds of the
+ * label rect.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawButton( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeButtonDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation; outLabelRect: HIRectPtr { can be NULL } ): OSStatus; external name '_HIThemeDrawButton';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetButtonShape()
+ *
+ * Summary:
+ * Get a shape of a themed button.
+ *
+ * Discussion:
+ * This API was mistakenly named as a "Get" API. It behaves as
+ * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
+ * SHAPE.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBounds:
+ * The HIRect in which to draw.
+ *
+ * inDrawInfo:
+ * An HIThemeButtonDrawInfo describing the button that will be
+ * drawn.
+ *
+ * outShape:
+ * A pointer to an HIShapeRef which will be set to the shape of
+ * the button. Needs to be released by caller.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetButtonShape( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeButtonDrawInfo; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetButtonShape';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetButtonContentBounds()
+ *
+ * Summary:
+ * Get the bounds of a themed button's content.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBounds:
+ * An HIRect indicating where the button is to be drawn.
+ *
+ * inDrawInfo:
+ * An HIThemeButtonDrawInfo describing the button that will be
+ * drawn.
+ *
+ * outBounds:
+ * A pointer to an HIRect in which will be returned the rectangle
+ * of the button content bounds.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetButtonContentBounds( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeButtonDrawInfo; var outBounds: HIRect ): OSStatus; external name '_HIThemeGetButtonContentBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetButtonBackgroundBounds()
+ *
+ * Summary:
+ * Get the bounds of the background of a themed button.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBounds:
+ * An HIRect indicating where the button is to be drawn.
+ *
+ * inDrawInfo:
+ * An HIThemeButtonDrawInfo describing the button that will be
+ * drawn.
+ *
+ * outBounds:
+ * A pointer to an HIRect in which will be returned the rectangle
+ * of the button background bounds.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetButtonBackgroundBounds( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeButtonDrawInfo; var outBounds: HIRect ): OSStatus; external name '_HIThemeGetButtonBackgroundBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawChasingArrows()
+ *
+ * Summary:
+ * Draw themed chasing arrows.
+ *
+ * Discussion:
+ * Draw a frame from the chasing arrows animation. The animation
+ * frame is based on a modulo value calculated from the index.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBounds:
+ * An HIRect indicating where the chasing arrows are to be drawn.
+ *
+ * inDrawInfo:
+ * An HIThemeChasingArrowsDrawInfo describing the chasing arrows
+ * to be drawn or measured.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawChasingArrows( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeChasingArrowsDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawChasingArrows';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawPopupArrow()
+ *
+ * Summary:
+ * Draws a themed popup arrow.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBounds:
+ * The HIRect in which to draw.
+ *
+ * inDrawInfo:
+ * An HIThemePopupArrowDrawInfo describing the popup arrow to be
+ * drawn or measured.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawPopupArrow( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemePopupArrowDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawPopupArrow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ -------------------------------------------------------------------------- }
+{ Menus }
+{ -------------------------------------------------------------------------- }
+{
+ * HIThemeDrawMenuBarBackground()
+ *
+ * Summary:
+ * Draws the menu bar background for a given area.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBounds:
+ * The HIRect in which to draw.
+ *
+ * inDrawInfo:
+ * The HIThemeMenuBarDrawInfo of the menu bar to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawMenuBarBackground( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeMenuBarDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawMenuBarBackground';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawMenuTitle()
+ *
+ * Summary:
+ * Draws the menu title background for a menu.
+ *
+ * Discussion:
+ * This API draws the background of a menu title. It does not draw
+ * the menu title text; it is the caller's responsibility to draw
+ * the text after this API has returned. The text should be drawn
+ * into the bounds returned in the outLabelRect parameter; the
+ * caller should ensure that the text is not drawn outside of those
+ * bounds, either by truncating or clipping the text.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenuBarRect:
+ * An HIRect indicating the bounds of the whole menu bar for which
+ * the menu title is to be drawn.
+ *
+ * inTitleRect:
+ * An HIRect for the bounds of the menu title to be drawn.
+ *
+ * inDrawInfo:
+ * The HIThemeMenuTitleDrawInfo of the menu title to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * outLabelRect:
+ * On exit, contains the bounds in which the menu title text
+ * should be drawn. May be NULL if you don't need this information.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawMenuTitle( const (*var*) inMenuBarRect: HIRect; const (*var*) inTitleRect: HIRect; const (*var*) inDrawInfo: HIThemeMenuTitleDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation; outLabelRect: HIRectPtr { can be NULL } ): OSStatus; external name '_HIThemeDrawMenuTitle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawMenuBackground()
+ *
+ * Summary:
+ * Draws the theme menu background in a rectangle. This API may
+ * draw outside of the specified rectangle.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenuRect:
+ * An HIRect indicating the bounds of the whole menu for which the
+ * background is to be drawn.
+ *
+ * inMenuDrawInfo:
+ * An HIThemeMenuDrawInfo describing the menu to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawMenuBackground( const (*var*) inMenuRect: HIRect; const (*var*) inMenuDrawInfo: HIThemeMenuDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawMenuBackground';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawMenuItem()
+ *
+ * Summary:
+ * Draws a themed menu item.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenuRect:
+ * An HIRect indicating the bounds of the whole menu for which the
+ * menu item is to be drawn.
+ *
+ * inItemRect:
+ * An HIRect for the bounds of the menu item to be drawn.
+ *
+ * inItemDrawInfo:
+ * An HIThemeMenuItemDrawInfo describing the drawing
+ * characteristics of the menu item to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * outContentRect:
+ * An HIRect that will be filled with the rectangle describing
+ * where the menu item content is to be drawn.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawMenuItem( const (*var*) inMenuRect: HIRect; const (*var*) inItemRect: HIRect; const (*var*) inItemDrawInfo: HIThemeMenuItemDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation; var outContentRect: HIRect ): OSStatus; external name '_HIThemeDrawMenuItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawMenuSeparator()
+ *
+ * Summary:
+ * Draws a themed menu separator.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenuRect:
+ * An HIRect indicating the bounds of the whole menu for which the
+ * menu separator is to be drawn.
+ *
+ * inItemRect:
+ * An HIRect for the bounds of the menu separator to be drawn.
+ *
+ * inItemDrawInfo:
+ * An HIThemeMenuItemDrawInfo describing the drawing
+ * characteristics of the menu item to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawMenuSeparator( const (*var*) inMenuRect: HIRect; const (*var*) inItemRect: HIRect; const (*var*) inItemDrawInfo: HIThemeMenuItemDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawMenuSeparator';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetMenuBackgroundShape()
+ *
+ * Summary:
+ * Gets the shape of the background for a themed menu.
+ *
+ * Discussion:
+ * This shape can extend outside of the bounds of the specified
+ * rectangle.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inMenuRect:
+ * An HIRect indicating the bounds of the menu for which the menu
+ * background is to be drawn.
+ *
+ * inMenuDrawInfo:
+ * An HIThemeMenuDrawInfo describing the menu to be measured.
+ *
+ * outShape:
+ * A valid HIShape that will be cleared and filled with the shape
+ * of the menu background.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetMenuBackgroundShape( const (*var*) inMenuRect: HIRect; const (*var*) inMenuDrawInfo: HIThemeMenuDrawInfo; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetMenuBackgroundShape';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ -------------------------------------------------------------------------- }
+{ Segments }
+{ -------------------------------------------------------------------------- }
+
+{
+ * Summary:
+ * Available values for HIThemeSegmentPosition. These are positions
+ * of the segments within the segmented view.
+ }
+const
+{
+ * The first position of a segmented view.
+ }
+ kHIThemeSegmentPositionFirst = 0;
+
+ {
+ * A middle segment.
+ }
+ kHIThemeSegmentPositionMiddle = 1;
+
+ {
+ * The last position of a segmented view.
+ }
+ kHIThemeSegmentPositionLast = 2;
+
+ {
+ * The only position of a segmented view. It is simultaneously first
+ * and last. You know, only. There is only one segment. It looks
+ * pretty much like a button. Please don't use this if you can avoid
+ * it. It's ugly.
+ }
+ kHIThemeSegmentPositionOnly = 3;
+
+type
+ HIThemeSegmentPosition = UInt32;
+
+{
+ * Summary:
+ * Available values for HIThemeSegmentKind.
+ }
+const
+{
+ * The outset looking segment. Do not use on metal or metal-like
+ * windows.
+ }
+ kHIThemeSegmentKindNormal = 0;
+
+ {
+ * The inset segment. Use on metal or metal-like windows.
+ }
+ kHIThemeSegmentKindInset = 1;
+
+type
+ HIThemeSegmentKind = UInt32;
+
+{
+ * Summary:
+ * Available values for HIThemeSegmentSize.
+ }
+const
+{
+ * The normally sized segment.
+ }
+ kHIThemeSegmentSizeNormal = 0;
+
+ {
+ * The small segment. Not available with as inset.
+ }
+ kHIThemeSegmentSizeSmall = 1;
+
+ {
+ * The mini segment. Not available with as inset.
+ }
+ kHIThemeSegmentSizeMini = 3;
+
+type
+ HIThemeSegmentSize = UInt32;
+
+const
+{
+ * No segment adornments are to be drawn.
+ }
+ kHIThemeSegmentAdornmentNone = 0;
+
+ {
+ * A focus ring is to be drawn around the segment.
+ }
+ kHIThemeSegmentAdornmentFocus = 1 shl 2; { to match button focus adornment }
+
+ {
+ * If available, a leading separator is to be drawn on the segment.
+ * Note that segments overlap and if the separators are drawn over
+ * top each other, the shadows multiply undesirably.
+ }
+ kHIThemeSegmentAdornmentLeadingSeparator = 1 shl 3;
+
+ {
+ * If available, a trailing separator is to be drawn on the segment.
+ * Note that segments overlap and if the separators are drawn over
+ * top each other, the shadows multiply undesirably.
+ }
+ kHIThemeSegmentAdornmentTrailingSeparator = 1 shl 4;
+
+type
+ HIThemeSegmentAdornment = UInt32;
+
+{
+ * HIThemeSegmentDrawInfo
+ *
+ * Summary:
+ * Drawing parameters passed to segment drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.4.
+ }
+type
+ HIThemeSegmentDrawInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32;
+
+ {
+ * The ThemeDrawState for the segment to be drawn or measured.
+ }
+ state: ThemeDrawState;
+
+ {
+ * The ThemeButtonValue of the segment to be drawn or measured.
+ }
+ value: ThemeButtonValue;
+ size: HIThemeSegmentSize;
+
+ {
+ * The HIThemeSegmentKind of the segment to be drawn or measured.
+ }
+ kind: HIThemeSegmentKind;
+
+ {
+ * The HIThemeSegmentPositions of the segment to be drawn or measured.
+ }
+ position: HIThemeSegmentPosition;
+
+ {
+ * The HIThemeSegmentAdornment of the segment to be drawn or measured.
+ }
+ adornment: HIThemeSegmentAdornment;
+ end;
+ HIThemeSegmentDrawInfoPtr = ^HIThemeSegmentDrawInfo;
+{
+ * HIThemeDrawSegment()
+ *
+ * Summary:
+ * Draw a piece of a segmented view.
+ *
+ * Discussion:
+ * New in Mac OS X 10.4. Please note that segments can draw a
+ * separator outside of the specified bounds and the adornments of
+ * the individual segments must coordinate their drawing of
+ * separators (with the adornment field of the passed in
+ * HIThemeSegmentDrawInfo) to avoid overdrawing.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBounds:
+ * The bounds of the segment to be drawn.
+ *
+ * inDrawInfo:
+ * A HIThemeSegmentDrawInfo describing the segment to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawSegment( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeSegmentDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawSegment';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ -------------------------------------------------------------------------- }
+{ Tabs }
+{ -------------------------------------------------------------------------- }
+{
+ * HIThemeDrawTabPane()
+ *
+ * Summary:
+ * Draws a themed tab pane.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * The HIRect in which to draw the pane.
+ *
+ * inDrawInfo:
+ * The HIThemeTabPaneDrawInfo of the tab pane to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawTabPane( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeTabPaneDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTabPane';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawTab()
+ *
+ * Summary:
+ * Draw a themed tab.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * The HIRect in which to draw.
+ *
+ * inDrawInfo:
+ * An HIThemeTabDrawInfo describing the tab to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * outLabelRect:
+ * An HIRect into which to put the bounds of the label rect.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawTab( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeTabDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation; outLabelRect: HIRectPtr { can be NULL } ): OSStatus; external name '_HIThemeDrawTab';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetTabPaneDrawShape()
+ *
+ * Summary:
+ * Gets the shape of the draw area relative to the full bounds of
+ * the tab+pane.
+ *
+ * Discussion:
+ * This API was mistakenly named as a "Get" API. It behaves as
+ * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
+ * SHAPE.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * The HIRect for which to get the shape.
+ *
+ * inDirection:
+ * A ThemeTabDirection describing on which side of the pane the
+ * tabs will be drawn.
+ *
+ * inTabSize:
+ * An HIThemeTabSize indicating what size of tab pane to draw.
+ *
+ * outShape:
+ * A pointer to an HIShapeRef which will be set to the shape of
+ * the draw area. Needs to be released by caller.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetTabPaneDrawShape( const (*var*) inRect: HIRect; inDirection: ThemeTabDirection; inTabSize: HIThemeTabSize; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetTabPaneDrawShape';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetTabPaneContentShape()
+ *
+ * Summary:
+ * Gets the shape of the content area relative to the full bounds of
+ * the tab+pane.
+ *
+ * Discussion:
+ * This API was mistakenly named as a "Get" API. It behaves as
+ * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
+ * SHAPE.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * The HIRect for which to get the shape.
+ *
+ * inDirection:
+ * A ThemeTabDirection describing on which side of the pane the
+ * tabs will be drawn.
+ *
+ * inTabSize:
+ * An HIThemeTabSize indicating what size of tab pane to draw.
+ *
+ * outShape:
+ * A pointer to an HIShapeRef which will be set to the shape of
+ * the draw content. Needs to be released by caller.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetTabPaneContentShape( const (*var*) inRect: HIRect; inDirection: ThemeTabDirection; inTabSize: HIThemeTabSize; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetTabPaneContentShape';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetTabDrawShape()
+ *
+ * Summary:
+ * Gets the shape of the tab drawing area relative to the full
+ * bounds of the tab+pane.
+ *
+ * Discussion:
+ * This API was mistakenly named as a "Get" API. It behaves as
+ * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
+ * SHAPE.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * The HIRect for which to get the shape.
+ *
+ * inDrawInfo:
+ * An HIThemeTabDrawInfo describing the tab that will be drawn.
+ *
+ * outShape:
+ * A pointer to an HIShapeRef which will be set to the shape of
+ * the tab drawing area. Needs to be released by caller.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetTabDrawShape( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeTabDrawInfo; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetTabDrawShape';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetTabShape()
+ *
+ * Summary:
+ * Gets the shape for a themed tab.
+ *
+ * Discussion:
+ * This API was mistakenly named as a "Get" API. It behaves as
+ * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
+ * SHAPE.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * An HIRect indicating the entire tabs area for which the tab
+ * shape is to be retrieved.
+ *
+ * inDrawInfo:
+ * An HIThemeTabDrawInfo describing the tab that will be drawn.
+ *
+ * outShape:
+ * A pointer to an HIShapeRef which will be set to the shape of
+ * the tab. Needs to be released by caller.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetTabShape( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeTabDrawInfo; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetTabShape';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ -------------------------------------------------------------------------- }
+{ Text }
+{ -------------------------------------------------------------------------- }
+
+const
+{
+ * Don't truncate the measured or drawn text.
+ }
+ kHIThemeTextTruncationNone = 0;
+
+ {
+ * During measure or draw, if the text will not fit within the
+ * available bounds, truncate the text in the middle of the last
+ * visible line.
+ }
+ kHIThemeTextTruncationMiddle = 1;
+
+ {
+ * During measure or draw, if the text will not fit within the
+ * available bounds, truncate the text at the end of the last visible
+ * line.
+ }
+ kHIThemeTextTruncationEnd = 2;
+
+type
+ HIThemeTextTruncation = UInt32;
+
+const
+{
+ * The text will be drawn flush with the left side of the bounding
+ * box.
+ }
+ kHIThemeTextHorizontalFlushLeft = 0;
+
+ {
+ * The text will be centered within the bounding box.
+ }
+ kHIThemeTextHorizontalFlushCenter = 1;
+
+ {
+ * The text will be drawn flush with the right side of the bounding
+ * box.
+ }
+ kHIThemeTextHorizontalFlushRight = 2;
+
+type
+ HIThemeTextHorizontalFlush = UInt32;
+
+const
+{
+ * Draw the text vertically flush with the top of the box
+ }
+ kHIThemeTextVerticalFlushTop = 0;
+
+ {
+ * Vertically center the text
+ }
+ kHIThemeTextVerticalFlushCenter = 1;
+
+ {
+ * Draw the text vertically flush with the bottom of the box
+ }
+ kHIThemeTextVerticalFlushBottom = 2;
+
+type
+ HIThemeTextVerticalFlush = UInt32;
+
+const
+ kHIThemeTextBoxOptionNone = 0;
+ kHIThemeTextBoxOptionStronglyVertical = 1 shl 1;
+
+type
+ HIThemeTextBoxOptions = OptionBits;
+const
+ kHIThemeTextInfoVersionZero = 0;
+
+
+{
+ * HIThemeTextInfo
+ *
+ * Summary:
+ * Drawing parameters passed to text drawing and measuring theme
+ * APIs.
+ *
+ * Discussion:
+ * New in Mac OS X 10.3, this structure is used for measuring and
+ * drawing text with the HIThemeGetTextDimensions and
+ * HIThemeDrawTextBox APIs. If truncationPosition is
+ * kHIThemeTextTruncationNone, the other fields with the truncation
+ * prefix are ignored.
+ }
+type
+ HIThemeTextInfo = record
+{
+ * The version of this data structure. Currently, it is always 0.
+ }
+ version: UInt32; { current version is 0 }
+
+ {
+ * The theme draw state in which to draw the string.
+ }
+ state: ThemeDrawState;
+
+ {
+ * The font in which to draw the string.
+ }
+ fontID: ThemeFontID;
+
+ {
+ * The horizontal flushness of the text. One of the
+ * kHIThemeTextHorizontalFlush[Left/Center/Right] constants. When
+ * this structure is used for HIThemeGetTextDimensions, this field
+ * has no effect on the returned dimensions. However, providing the
+ * same flushness that will be used with a subsequent draw will
+ * trigger a performance optimization.
+ }
+ horizontalFlushness: HIThemeTextHorizontalFlush; { kHIThemeTextHorizontalFlush[Left/Center/Right] }
+
+ {
+ * The vertical flushness of the text. One of the
+ * kHIThemeTextVerticalFlush[Top/Center/Bottom] constants. When this
+ * paramblock is used for HIThemeGetTextDimensions, this field has no
+ * effect on the returned dimensions. However, providing the same
+ * flushness that will be used with a subsequent draw will trigger a
+ * performance optimization.
+ }
+ verticalFlushness: HIThemeTextVerticalFlush; { kHIThemeTextVerticalFlush[Top/Center/Bottom] }
+
+ {
+ * Currently, the only option available is for strongly vertical text
+ * with the kThemeTextBoxOptionStronglyVertical option bit.
+ }
+ options: HIThemeTextBoxOptions; { includes kHIThemeTextBoxOptionStronglyVertical }
+
+ {
+ * Specifies where truncation should occur. If this field is
+ * kHIThemeTruncationNone, no truncation will occur, and all fields
+ * with the truncation prefix will be ignored.
+ }
+ truncationPosition: HIThemeTextTruncation; { kHIThemeTextTruncation[None/Middle/End], If none the following field is ignored }
+
+ {
+ * The maximum number of lines to measure or draw before truncation
+ * occurs. Ignored if truncationPosition is kHIThemeTruncationNone.
+ }
+ truncationMaxLines: UInt32; { the maximum number of lines before truncation occurs }
+
+ {
+ * On output, if the text has been truncated, this is set to true. If
+ * the text fit completely within the parameters specified and the
+ * text was not truncated, this is set to false.
+ }
+ truncationHappened: Boolean; { on output, whether truncation needed to happen }
+ end;
+ HIThemeTextInfoPtr = ^HIThemeTextInfo;
+{
+ * HIThemeGetTextDimensions()
+ *
+ * Summary:
+ * Get text dimensions of a string
+ *
+ * Discussion:
+ * This allows you to get various dimension characteristics of a
+ * string bound to certain criteria that you specify. It allows you
+ * to get the absolute bounds of a string laid out in a single line,
+ * or the bounds of a string constrained to a given width.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inString:
+ * A CFStringRef containing the unicode characters you wish to
+ * measure. You MUST NOT pass in a CFStringRef that was allocated
+ * with any of the "NoCopy" CFString creation APIs; a string
+ * created with a "NoCopy" API has transient storage which is
+ * incompatible with HIThemeGetTextDimensions's caches.
+ *
+ * inWidth:
+ * The width to constrain the text before wrapping. If inWidth is
+ * 0, the text will not wrap and will be laid out as a single
+ * line, unless it contains embedded carriage return or linefeed
+ * characters; CR/LF will cause the text to wrap and the resulting
+ * measurements will include space for multiple lines of text. If
+ * inWidth is not 0, the text will wrap at the given width and the
+ * measurements will be returned from the multi-line layout.
+ *
+ *
+ * To force single-line layout even in the presence of embedded
+ * CR/LF characters, pass FLT_MAX for inWidth,
+ * kHIThemeTextTruncationEnd for inTextInfo.truncationPosition,
+ * and 1 for inTextInfo.truncationMaxLines.
+ *
+ * inTextInfo:
+ * The HIThemeTextInfo parameter block specifying additional
+ * options for flushness and truncation. The truncationHappened
+ * field is the only field that will be written to by this API
+ * (and the reason for inTextInfo not being const).
+ *
+ * outWidth:
+ * On output, will contain the width of the string. This width may
+ * be smaller than the constrain inWidth parameter if the text has
+ * wrapped. It will return the true bounding width of the layout.
+ * Can be NULL.
+ *
+ * outHeight:
+ * On output, will contain the height of the string. Can be NULL.
+ *
+ * outBaseline:
+ * On output, will contain the baseline of the string. This is the
+ * delta from the top of the text to the baseline of the first
+ * line. Can be NULL.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetTextDimensions( inString: CFStringRef; inWidth: Float32; var inTextInfo: HIThemeTextInfo; outWidth: Float32Ptr { can be NULL }; outHeight: Float32Ptr { can be NULL }; outBaseline: Float32Ptr { can be NULL } ): OSStatus; external name '_HIThemeGetTextDimensions';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawTextBox()
+ *
+ * Summary:
+ * Draw the string into the given bounding box
+ *
+ * Discussion:
+ * Draw the string into the bounding box given. You can specify
+ * options such as truncation and justification as well as
+ * determining whether the text was truncated when it was drawn.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inString:
+ * A CFStringRef containing the unicode characters you wish to
+ * render. You MUST NOT pass in a CFStringRef that was allocated
+ * with any of the "NoCopy" CFString creation APIs; a string
+ * created with a "NoCopy" API has transient storage which is
+ * incompatible with HIThemeDrawTextBox's caches.
+ *
+ * inBounds:
+ * The HIRect that bounds where the text is to be drawn
+ *
+ * inTextInfo:
+ * The HIThemeTextInfo parameter block specifying additional
+ * options for truncation and flushness. You can control the
+ * number of lines drawn by specifying a truncation of
+ * kHIThemeTextTruncationMiddle or kHIThemeTextTruncationEnd for
+ * the truncationPosition field and then specifying a maximum
+ * number of lines to draw before truncation occurs in the
+ * truncationMaxLines field. The truncationHappened field is the
+ * only field that will be written to by this API (and the reason
+ * for inTextInfo not being const).
+ *
+ * inContext:
+ * The CGContextRef into which to draw the text.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawTextBox( inString: CFStringRef; const (*var*) inBounds: HIRect; var inTextInfo: HIThemeTextInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTextBox';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ -------------------------------------------------------------------------- }
+{ Tracks }
+{ -------------------------------------------------------------------------- }
+{
+ * HIThemeDrawTrack()
+ *
+ * Summary:
+ * Draw a themed track item.
+ *
+ * Discussion:
+ * Used to draw any tracked element including sliders and scroll
+ * bars.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawInfo:
+ * An HIThemeTrackDrawInfo describing the track that will be drawn.
+ *
+ * inGhostRect:
+ * An HIRect describing the location of the ghost indicator to be
+ * drawn. Generally, this should be NULL and the control using
+ * this primitive should support live feeback.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawTrack( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; {const} inGhostRect: HIRectPtr { can be NULL }; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTrack';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawTrackTickMarks()
+ *
+ * Summary:
+ * Draws the tick marks for a slider track.
+ *
+ * Discussion:
+ * This primitive only draws evenly distributed tick marks.
+ * Internally, it calls HIThemeDrawTickMark to do the actual tick
+ * mark drawing, and any custom (non-even distribution) drawing of
+ * tick marks should be done with HIThemeDrawTickMark.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawInfo:
+ * An HIThemeTrackDrawInfo describing the track tick marks that
+ * will be drawn.
+ *
+ * inNumTicks:
+ * A value indicating the number of tick marks to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawTrackTickMarks( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; inNumTicks: ItemCount; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTrackTickMarks';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawTickMark()
+ *
+ * Summary:
+ * Draws a single tick mark.
+ *
+ * Discussion:
+ * This primitive draws a single tick mark and can be used to draw
+ * custom tick marks that are not easily drawn by
+ * HIThemeDrawTrackTickMarks, which only draws evenly distributed
+ * tick marks.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBounds:
+ * The HIRect in which to draw.
+ *
+ * inDrawInfo:
+ * The HIThemeTickMarkDrawInfo of the tick mark to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawTickMark( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeTickMarkDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTickMark';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetTrackThumbShape()
+ *
+ * Summary:
+ * Get the thumb shape of a themed track.
+ *
+ * Discussion:
+ * This API was mistakenly named as a "Get" API. It behaves as
+ * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
+ * SHAPE.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawInfo:
+ * An HIThemeTrackDrawInfo describing the track to be measured.
+ *
+ * outThumbShape:
+ * A pointer to an HIShapeRef which will be set to the shape of
+ * the themed track's thumb. Needs to be released by caller.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetTrackThumbShape( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; var outThumbShape: HIShapeRef ): OSStatus; external name '_HIThemeGetTrackThumbShape';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeHitTestTrack()
+ *
+ * Summary:
+ * Hit test the themed track.
+ *
+ * Discussion:
+ * Returns true if the track was hit and fills in outPartHit.
+ * Otherwise, returns false.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawInfo:
+ * An HIThemeTabDrawInfo describing the tab that will be drawn.
+ *
+ * inMousePoint:
+ * An HIPoint which will be location basis for the test.
+ *
+ * outPartHit:
+ * A pointer to a ControlPartCode that will be filled with the
+ * part hit by the incoming point.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeHitTestTrack( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; const (*var*) inMousePoint: HIPoint; var outPartHit: ControlPartCode ): Boolean; external name '_HIThemeHitTestTrack';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetTrackBounds()
+ *
+ * Summary:
+ * Gets the track bounds of a themed track.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawInfo:
+ * An HIThemeTrackDrawInfo describing the track that will be drawn.
+ *
+ * outBounds:
+ * A pointer to an HIRect in which will be returned the rectangle
+ * of the track bounds.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetTrackBounds( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; var outBounds: HIRect ): OSStatus; external name '_HIThemeGetTrackBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetTrackPartBounds()
+ *
+ * Summary:
+ * Returns measurements for the bounds of the a track part,
+ * according to the specifics of that track as specified in the
+ * incoming draw info record.
+ *
+ * Discussion:
+ * HIThemeGetTrackPartBounds allows you to get the boundaries of
+ * individual pieces of a track's theme layout.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawInfo:
+ * An HIThemeTrackDrawInfo describing the track to be measured.
+ *
+ * inPartCode:
+ * A ControlPartCode describing which part to measure. A list of
+ * available ControlPartCodes can be retrieved using
+ * HIThemeGetTrackParts.
+ *
+ * outPartBounds:
+ * The bounds of the specified part relative to the start
+ * rectangle specified in inDrawInfo.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetTrackPartBounds( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; inPartCode: ControlPartCode; var outPartBounds: HIRect ): OSStatus; external name '_HIThemeGetTrackPartBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetTrackParts()
+ *
+ * Summary:
+ * Counts the number of parts that make up a track. Optionally
+ * returns an array of ControlPartCodes that describe each of the
+ * counted parts.
+ *
+ * Discussion:
+ * HIThemeGetTrackParts allows you to count the number of parts that
+ * make up a track. This is useful if you need to iterate through
+ * the parts of a track and get information about them, i.e. using
+ * HIThemeGetTrackPartBounds.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawInfo:
+ * An HIThemeTrackDrawInfo describing the track to be measured.
+ *
+ * outNumberOfParts:
+ * A pointer to a UInt32 in which to return the number of counted
+ * parts.
+ *
+ * inMaxParts:
+ * The maximum number of ControlPartCodes that can be copied into
+ * the supplied ioPartsBuffer. This value is ignored if
+ * ioPartsBuffer is NULL.
+ *
+ * ioPartsBuffer:
+ * An pointer to an array into which HIThemeGetTrackPartBounds
+ * will copy ControlPartCodes that describe each of the counted
+ * parts. This pointer can be NULL if you are just counting parts.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetTrackParts( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; var outNumberOfParts: UInt32; inMaxParts: UInt32; ioPartsBuffer: ControlPartCodePtr { can be NULL } ): OSStatus; external name '_HIThemeGetTrackParts';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetTrackDragRect()
+ *
+ * Summary:
+ * Get the rectangle of the drag area of a themed track.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawInfo:
+ * An HIThemeTrackDrawInfo describing the track to be measured.
+ *
+ * outDragRect:
+ * A pointer to an HIRect in which will be returned the rectangle
+ * of the drag area of the track.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetTrackDragRect( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; var outDragRect: HIRect ): OSStatus; external name '_HIThemeGetTrackDragRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetTrackThumbPositionFromOffset()
+ *
+ * Summary:
+ * Get the track's relative thumb position based on the offset.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawInfo:
+ * An HIThemeTrackDrawInfo describing the track to be measured.
+ *
+ * inThumbOffset:
+ * An HIPoint describing the position of the thumb as an offset
+ * from the track bounds.
+ *
+ * outRelativePosition:
+ * On output, the track-relative position calculated from the
+ * thumb offset.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetTrackThumbPositionFromOffset( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; const (*var*) inThumbOffset: HIPoint; var outRelativePosition: Float32 ): OSStatus; external name '_HIThemeGetTrackThumbPositionFromOffset';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetTrackThumbPositionFromBounds()
+ *
+ * Summary:
+ * Get the themed track thumb position from its bounds.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawInfo:
+ * A pointer to an HIThemeTrackDrawInfo describing the track to be
+ * measured.
+ *
+ * inThumbBounds:
+ * The bounds of the thumb from which the postion is to be
+ * calculated.
+ *
+ * outRelativePosition:
+ * On output, the track-relative position calculated from the
+ * thumb location.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetTrackThumbPositionFromBounds( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; const (*var*) inThumbBounds: HIRect; var outRelativePosition: Float32 ): OSStatus; external name '_HIThemeGetTrackThumbPositionFromBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetTrackLiveValue()
+ *
+ * Summary:
+ * Get the themed track live value.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDrawInfo:
+ * An HIThemeTrackDrawInfo describing the track to be measured.
+ *
+ * inRelativePosition:
+ * An HIPoint describing the position of the thumb as an offset
+ * from the track bounds.
+ *
+ * outValue:
+ * On output, the track value as calculated from the relative
+ * postion of the thumb.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetTrackLiveValue( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; inRelativePosition: Float32; var outValue: SInt32 ): OSStatus; external name '_HIThemeGetTrackLiveValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetScrollBarTrackRect()
+ *
+ * Summary:
+ * Gets the rectangle of the tracking area of a themed scroll bar.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBounds:
+ * An HIRect indicating the area in which the scroll bar will be
+ * drawn.
+ *
+ * inTrackInfo:
+ * An HIScrollBarTrackInfo for the scroll bar to be drawn.
+ * Currently, only the pressState and enableState fields are used.
+ *
+ * inIsHoriz:
+ * A Boolean where true means that the scroll bar is to be
+ * horizontal and false means that the scroll bar is to be
+ * vertical.
+ *
+ * outTrackBounds:
+ * A pointer to an HIRect in which will be returned the rectangle
+ * of the track area of the scroll bar.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetScrollBarTrackRect( const (*var*) inBounds: HIRect; const (*var*) inTrackInfo: HIScrollBarTrackInfo; inIsHoriz: Boolean; var outTrackBounds: HIRect ): OSStatus; external name '_HIThemeGetScrollBarTrackRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeHitTestScrollBarArrows()
+ *
+ * Summary:
+ * Hit test the theme scroll bar arrows to determine where the hit
+ * occurred.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inScrollBarBounds:
+ * An HIRect indicating the bounds of the scroll bar that will be
+ * hit tested.
+ *
+ * inTrackInfo:
+ * An HIScrollBarTrackInfo for the scroll bar to be drawn.
+ * Currently, only the version, pressState and enableState fields
+ * are used.
+ *
+ * inIsHoriz:
+ * A Boolean where true means that the scroll bar is to be
+ * horizontal and false means that the scroll bar is to be
+ * vertical.
+ *
+ * inPtHit:
+ * An HIPoint indicating where the control was hit and which will
+ * be used for hit testing.
+ *
+ * outTrackBounds:
+ * A pointer to an HIRect in which will be returned the rectangle
+ * of the track area of the scroll bar. Can be NULL.
+ *
+ * outPartCode:
+ * A pointer to a ControlPartCode in which the part code of the
+ * hit part will be returned.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeHitTestScrollBarArrows( const (*var*) inScrollBarBounds: HIRect; const (*var*) inTrackInfo: HIScrollBarTrackInfo; inIsHoriz: Boolean; const (*var*) inPtHit: HIPoint; outTrackBounds: HIRectPtr { can be NULL }; var outPartCode: ControlPartCode ): Boolean; external name '_HIThemeHitTestScrollBarArrows';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawScrollBarDelimiters()
+ *
+ * Summary:
+ * Draw themed scroll bar delimiters.
+ *
+ * Discussion:
+ * Draws the grow lines delimiting the scroll bar areas. Does not
+ * draw the size box.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inContRect:
+ * An HIRect indicating the rectangle of the content area of the
+ * window to be drawn.
+ *
+ * inDrawInfo:
+ * The HIThemeScrollBarDelimitersDrawInfo of the delimiters to be
+ * drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawScrollBarDelimiters( const (*var*) inContRect: HIRect; const (*var*) inDrawInfo: HIThemeScrollBarDelimitersDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawScrollBarDelimiters';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ -------------------------------------------------------------------------- }
+{ Windows }
+{ -------------------------------------------------------------------------- }
+{
+ * HIThemeDrawWindowFrame()
+ *
+ * Summary:
+ * Draws a themed window frame.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inContRect:
+ * An HIRect indicating the rectangle of the content area of the
+ * window to be drawn.
+ *
+ * inDrawInfo:
+ * The HIThemeWindowDrawInfo of the window frame to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * outTitleRect:
+ * A pointer to an HIRect into which to put the bounds of the
+ * title rect.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawWindowFrame( const (*var*) inContRect: HIRect; const (*var*) inDrawInfo: HIThemeWindowDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation; outTitleRect: HIRectPtr { can be NULL } ): OSStatus; external name '_HIThemeDrawWindowFrame';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawTitleBarWidget()
+ *
+ * Summary:
+ * Draws the requested theme title bar widget.
+ *
+ * Discussion:
+ * HIThemeDrawTitleBarWidget renders the requested theme title bar
+ * widget in the proper location of a window. A common
+ * misconception when using this API is that the client must specify
+ * the exact location of the widget in the window. The widget will
+ * locate itself in the window based relative to the content rect
+ * passed in content rectangle -- the contRect parameter. Another
+ * common problem is to ignore the window's attributes. The
+ * attributes must be set up properly to describe the window for
+ * which the widget is to be drawn.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inContRect:
+ * A rectangle describing the window's content area. The widget
+ * is drawn relative to the content rectangle of the window, so
+ * this parameter does not describe the actual widget bounds, it
+ * describes the window's content rectangle.
+ *
+ * inDrawInfo:
+ * The HIThemeWindowWidgetDrawInfo of the window widget to be
+ * drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawTitleBarWidget( const (*var*) inContRect: HIRect; const (*var*) inDrawInfo: HIThemeWindowWidgetDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTitleBarWidget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawGrowBox()
+ *
+ * Summary:
+ * Draws a theme grow box.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inOrigin:
+ * The origin from which to draw the grow box.
+ *
+ * inDrawInfo:
+ * An HIThemeGrowBoxDrawInfo describing the grow box to be drawn
+ * or measured.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawGrowBox( const (*var*) inOrigin: HIPoint; const (*var*) inDrawInfo: HIThemeGrowBoxDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawGrowBox';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetGrowBoxBounds()
+ *
+ * Summary:
+ * Gets the bounds for a grow box.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inOrigin:
+ * The origin from which to draw the grow box.
+ *
+ * inDrawInfo:
+ * An HIThemeGrowBoxDrawInfo describing the grow box to be drawn
+ * or measured. The state field is ignored.
+ *
+ * outBounds:
+ * A pointer to an HIRect in which will be returned the rectangle
+ * of the standalone grow box bounds.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetGrowBoxBounds( const (*var*) inOrigin: HIPoint; const (*var*) inDrawInfo: HIThemeGrowBoxDrawInfo; var outBounds: HIRect ): OSStatus; external name '_HIThemeGetGrowBoxBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetWindowShape()
+ *
+ * Summary:
+ * Obtains the specified window shape.
+ *
+ * Discussion:
+ * This API was mistakenly named as a "Get" API. It behaves as
+ * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
+ * SHAPE.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inContRect:
+ * An HIRect indicating the rectangle of the content area of the
+ * window to be drawn.
+ *
+ * inDrawInfo:
+ * The HIThemeWindowDrawInfo of the window frame to be measured.
+ *
+ * inWinRegion:
+ * A WindowRegionCode indicating the desired region for which to
+ * return the shape.
+ *
+ * outShape:
+ * A pointer to an HIShapeRef which will be set to the shape of
+ * the requested window region. Needs to be released by caller.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetWindowShape( const (*var*) inContRect: HIRect; const (*var*) inDrawInfo: HIThemeWindowDrawInfo; inWinRegion: WindowRegionCode; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetWindowShape';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeGetWindowRegionHit()
+ *
+ * Summary:
+ * Get the window region hit in a themed window.
+ *
+ * Discussion:
+ * Not that this call does not return a region, but a region code.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inContRect:
+ * An HIRect indicating the rectangle of the content area of the
+ * window to be drawn.
+ *
+ * inDrawInfo:
+ * The HIThemeWindowDrawInfo of the window frame to be measured.
+ *
+ * inPoint:
+ * An HIPoint against which the test will occur.
+ *
+ * outRegionHit:
+ * The output WindowRegionCode of hit window region.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeGetWindowRegionHit( const (*var*) inContRect: HIRect; const (*var*) inDrawInfo: HIThemeWindowDrawInfo; const (*var*) inPoint: HIPoint; var outRegionHit: WindowRegionCode ): Boolean; external name '_HIThemeGetWindowRegionHit';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ -------------------------------------------------------------------------- }
+{ Miscellaneous }
+{ -------------------------------------------------------------------------- }
+{
+ * HIThemeDrawFrame()
+ *
+ * Summary:
+ * Draws a variety of frames frame.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * The HIRect in which to draw.
+ *
+ * inDrawInfo:
+ * An HIThemeFrameDrawInfo describing the frame to be drawn or
+ * measured.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawFrame( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeFrameDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawFrame';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawGroupBox()
+ *
+ * Summary:
+ * Draws a themed primary group box.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * The HIRect in which to draw.
+ *
+ * inDrawInfo:
+ * An HIThemeGroupBoxDrawInfo describing the group box to be drawn
+ * or measured.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawGroupBox( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeGroupBoxDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawGroupBox';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawGenericWell()
+ *
+ * Summary:
+ * Draws a themed generic well.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * The HIRect in which to draw.
+ *
+ * inDrawInfo:
+ * An HIThemeButtonDrawInfo that describes attributes of the well
+ * to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawGenericWell( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeButtonDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawGenericWell';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawPaneSplitter()
+ *
+ * Summary:
+ * Draws a themed pane splitter.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * The HIRect in which to draw.
+ *
+ * inDrawInfo:
+ * The HIThemeSplitterDrawInfo of the pane splitter to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawPaneSplitter( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeSplitterDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawPaneSplitter';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawGrabber()
+ *
+ * Summary:
+ * Draws a themed grabber.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * The HIRect in which to draw.
+ *
+ * inDrawInfo:
+ * The HIThemeGrabberDrawInfo of the grabber to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawGrabber( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeGrabberDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawGrabber';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawPlacard()
+ *
+ * Summary:
+ * Draws a themed placard.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * The HIRect in which to draw.
+ *
+ * inDrawInfo:
+ * The HIThemePlacardDrawInfo of the placard to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawPlacard( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemePlacardDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawPlacard';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawHeader()
+ *
+ * Summary:
+ * Draws a themed window header in the specified rectangle.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * The HIRect in which to draw.
+ *
+ * inDrawInfo:
+ * The HIThemeHeaderDrawInfo of the window frame to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawHeader( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeHeaderDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawHeader';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawFocusRect()
+ *
+ * Summary:
+ * Draws a themed focus rectangle in the specified rectangle.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * The HIRect in which to draw.
+ *
+ * inHasFocus:
+ * Pass in true to draw focus. Passing false effectively makes
+ * this API a no-op.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawFocusRect( const (*var*) inRect: HIRect; inHasFocus: Boolean; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawFocusRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawSeparator()
+ *
+ * Summary:
+ * Draw a themed separator element.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inRect:
+ * The HIRect in which to draw.
+ *
+ * inDrawInfo:
+ * The HIThemeSeparatorDrawInfo of the window frame to be drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawSeparator( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeSeparatorDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawSeparator';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeSetFill()
+ *
+ * Summary:
+ * Set the context fill color to that specified by the requested
+ * brush.
+ *
+ * Discussion:
+ * Note that this call does not actually draw anything. It sets the
+ * passed context's fill color to that of the specified theme brush.
+ * Subsequent fills in the context will be with the color specified
+ * by the theme brush.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBrush:
+ * The ThemeBrush describing the requested fill color.
+ *
+ * inInfo:
+ * Not used. Should always be NULL.
+ *
+ * inContext:
+ * The CG context for which the fill color is to be set.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeSetFill( inBrush: ThemeBrush; inInfo: UnivPtr; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeSetFill';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIThemeSetStroke()
+ *
+ * Summary:
+ * Set the context stroke color to that specified by the requested
+ * brush.
+ *
+ * Discussion:
+ * Note that this call does not actually draw anything. It sets the
+ * passed context's stroke color to that of the specified theme
+ * brush. Subsequent strokes in the context will be with the color
+ * specified by the theme brush.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBrush:
+ * The ThemeBrush describing the requested stroke color.
+ *
+ * inInfo:
+ * Not used. Should always be NULL.
+ *
+ * inContext:
+ * The CG context for which the stroke color is to be set.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeSetStroke( inBrush: ThemeBrush; inInfo: UnivPtr; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeSetStroke';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIThemeSetTextFill()
+ *
+ * Summary:
+ * Set the context text fill color to that specified by the
+ * requested brush.
+ *
+ * Discussion:
+ * Note that this call does not actually draw anything. It sets the
+ * passed context's text fill color to that of the specified
+ * ThemeTextColor. Subsequent text drawing in the context will be
+ * with the color specified by the ThemeTextColor.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inColor:
+ * A ThemeTextColor describing the requested text fill color.
+ *
+ * inInfo:
+ * Not used. Should always be NULL.
+ *
+ * inContext:
+ * The CG context for which the fill color is to be set.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeSetTextFill( inColor: ThemeTextColor; inInfo: UnivPtr; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeSetTextFill';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIThemeApplyBackground()
+ *
+ * Summary:
+ * Apply a themed background for a rectangle.
+ *
+ * Discussion:
+ * Note that this call does not actually draw anything. It sets the
+ * passed context's fill color to the requested theme background.
+ * Subsequent fills in the context will fill with the theme
+ * background.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBounds:
+ * An HIRect enclosing the whole background. This rectangle is
+ * used to calculate the pattern phase (if there is one) of the
+ * background as it is set up in the context.
+ *
+ * inDrawInfo:
+ * An HIThemeBackgroundDrawInfo describing the background.
+ *
+ * inContext:
+ * The CG context for which the background is to be set.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeApplyBackground( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeBackgroundDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeApplyBackground';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeDrawBackground()
+ *
+ * Summary:
+ * Draw a themed background for a rectangle.
+ *
+ * Discussion:
+ * Currently, this call only works with kThemeBackgroundMetal.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBounds:
+ * An HIRect indicating the bounds to fill with the background.
+ * For backgrounds that need pattern continuity, such as
+ * kThemeBackgroundMetal, this rectangle is the full bounds of the
+ * rectangle for which the filling is to occur. If drawing a
+ * sub-rectangle of that background, set the clip and draw the
+ * full rectangle. This routine has been optimized to not perform
+ * calculations on the non-clip part of the drawing bounds.
+ *
+ * inDrawInfo:
+ * An HIThemeBackgroundDrawInfo describing the background to be
+ * drawn.
+ *
+ * inContext:
+ * The CG context in which the drawing is to be done.
+ *
+ * inOrientation:
+ * An HIThemeOrientation that describes the orientation of the
+ * passed in context.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeDrawBackground( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeBackgroundDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawBackground';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HIThemeBrushCreateCGColor()
+ *
+ * Summary:
+ * Create a CGColor for a ThemeBrush.
+ *
+ * Discussion:
+ * Color is an ambiguous term. The color may be a pattern.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBrush:
+ * The ThemeBrush describing the requested color.
+ *
+ * outColor:
+ * A pointer to a CGColorRef that will be set to the newly created
+ * CGColor.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function HIThemeBrushCreateCGColor( inBrush: ThemeBrush; var outColor: CGColorRef ): OSStatus; external name '_HIThemeBrushCreateCGColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+
+
+{unit ImageCompression}
+{
+ File: ImageCompression.p
+
+ Contains: QuickTime Image Compression Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1990-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+ MatrixRecordPtr = ^MatrixRecord;
+ MatrixRecord = record
+ matrix: array [0..2,0..2] of Fixed;
+ end;
+
+
+const
+ kRawCodecType = $72617720 (* 'raw ' *);
+ kCinepakCodecType = $63766964 (* 'cvid' *);
+ kGraphicsCodecType = $736D6320 (* 'smc ' *);
+ kAnimationCodecType = $726C6520 (* 'rle ' *);
+ kVideoCodecType = $72707A61 (* 'rpza' *);
+ kComponentVideoCodecType = $79757632 (* 'yuv2' *);
+ kJPEGCodecType = $6A706567 (* 'jpeg' *);
+ kMotionJPEGACodecType = $6D6A7061 (* 'mjpa' *);
+ kMotionJPEGBCodecType = $6D6A7062 (* 'mjpb' *);
+ kSGICodecType = $2E534749 (* '.SGI' *);
+ kPlanarRGBCodecType = $38425053 (* '8BPS' *);
+ kMacPaintCodecType = $504E5447 (* 'PNTG' *);
+ kGIFCodecType = $67696620 (* 'gif ' *);
+ kPhotoCDCodecType = $6B706364 (* 'kpcd' *);
+ kQuickDrawGXCodecType = $71646778 (* 'qdgx' *);
+ kAVRJPEGCodecType = $61767220 (* 'avr ' *);
+ kOpenDMLJPEGCodecType = $646D6231 (* 'dmb1' *);
+ kBMPCodecType = $57524C45 (* 'WRLE' *);
+ kWindowsRawCodecType = $57524157 (* 'WRAW' *);
+ kVectorCodecType = $70617468 (* 'path' *);
+ kQuickDrawCodecType = $71647277 (* 'qdrw' *);
+ kWaterRippleCodecType = $7269706C (* 'ripl' *);
+ kFireCodecType = $66697265 (* 'fire' *);
+ kCloudCodecType = $636C6F75 (* 'clou' *);
+ kH261CodecType = $68323631 (* 'h261' *);
+ kH263CodecType = $68323633 (* 'h263' *);
+ kDVCNTSCCodecType = $64766320 (* 'dvc ' *); { DV - NTSC and DVCPRO NTSC (available in QuickTime 6.0 or later) }
+ { NOTE: kDVCProNTSCCodecType is deprecated. }
+ { Use kDVCNTSCCodecType instead -- as far as the codecs are concerned, }
+ { the two data formats are identical. }
+ kDVCPALCodecType = $64766370 (* 'dvcp' *);
+ kDVCProPALCodecType = $64767070 (* 'dvpp' *); { available in QuickTime 6.0 or later }
+ kBaseCodecType = $62617365 (* 'base' *);
+ kFLCCodecType = $666C6963 (* 'flic' *);
+ kTargaCodecType = $74676120 (* 'tga ' *);
+ kPNGCodecType = $706E6720 (* 'png ' *);
+ kTIFFCodecType = $74696666 (* 'tiff' *); { NOTE: despite what might seem obvious from the two constants }
+ { below and their names, they really are correct. 'yuvu' really }
+ { does mean signed, and 'yuvs' really does mean unsigned. Really. }
+ kComponentVideoSigned = $79757675 (* 'yuvu' *);
+ kComponentVideoUnsigned = $79757673 (* 'yuvs' *);
+ kCMYKCodecType = $636D796B (* 'cmyk' *);
+ kMicrosoftVideo1CodecType = $6D737663 (* 'msvc' *);
+ kSorensonCodecType = $53565131 (* 'SVQ1' *);
+ kSorenson3CodecType = $53565133 (* 'SVQ3' *); { available in QuickTime 5 and later }
+ kIndeo4CodecType = $49563431 (* 'IV41' *);
+ kMPEG4VisualCodecType = $6D703476 (* 'mp4v' *);
+ k64ARGBCodecType = $62363461 (* 'b64a' *);
+ k48RGBCodecType = $62343872 (* 'b48r' *);
+ k32AlphaGrayCodecType = $62333261 (* 'b32a' *);
+ k16GrayCodecType = $62313667 (* 'b16g' *);
+ kMpegYUV420CodecType = $6D797576 (* 'myuv' *);
+ kYUV420CodecType = $79343230 (* 'y420' *);
+ kSorensonYUV9CodecType = $73797639 (* 'syv9' *);
+ k422YpCbCr8CodecType = $32767579 (* '2vuy' *); { Component Y'CbCr 8-bit 4:2:2 }
+ k444YpCbCr8CodecType = $76333038 (* 'v308' *); { Component Y'CbCr 8-bit 4:4:4 }
+ k4444YpCbCrA8CodecType = $76343038 (* 'v408' *); { Component Y'CbCrA 8-bit 4:4:4:4 }
+ k422YpCbCr16CodecType = $76323136 (* 'v216' *); { Component Y'CbCr 10,12,14,16-bit 4:2:2 }
+ k422YpCbCr10CodecType = $76323130 (* 'v210' *); { Component Y'CbCr 10-bit 4:2:2 }
+ k444YpCbCr10CodecType = $76343130 (* 'v410' *); { Component Y'CbCr 10-bit 4:4:4 }
+ k4444YpCbCrA8RCodecType = $72343038 (* 'r408' *); { Component Y'CbCrA 8-bit 4:4:4:4, rendering format. full range alpha, zero biased yuv }
+
+
+ { one source effects }
+ kBlurImageFilterType = $626C7572 (* 'blur' *);
+ kSharpenImageFilterType = $73687270 (* 'shrp' *);
+ kEdgeDetectImageFilterType = $65646765 (* 'edge' *);
+ kEmbossImageFilterType = $656D6273 (* 'embs' *);
+ kConvolveImageFilterType = $67656E6B (* 'genk' *);
+ kAlphaGainImageFilterType = $6761696E (* 'gain' *);
+ kRGBColorBalanceImageFilterType = $72676262 (* 'rgbb' *);
+ kHSLColorBalanceImageFilterType = $68736C62 (* 'hslb' *);
+ kColorSyncImageFilterType = $73796E63 (* 'sync' *);
+ kFilmNoiseImageFilterType = $666D6E73 (* 'fmns' *);
+ kSolarizeImageFilterType = $736F6C72 (* 'solr' *);
+ kColorTintImageFilterType = $74696E74 (* 'tint' *);
+ kLensFlareImageFilterType = $6C656E73 (* 'lens' *);
+ kBrightnessContrastImageFilterType = $6272636F (* 'brco' *);
+
+ { two source effects }
+ kAlphaCompositorTransitionType = $626C6E64 (* 'blnd' *);
+ kCrossFadeTransitionType = $64736C76 (* 'dslv' *);
+ kChannelCompositeEffectType = $6368616E (* 'chan' *);
+ kChromaKeyTransitionType = $636B6579 (* 'ckey' *);
+ kImplodeTransitionType = $6D706C6F (* 'mplo' *);
+ kExplodeTransitionType = $78706C6F (* 'xplo' *);
+ kGradientTransitionType = $6D617474 (* 'matt' *);
+ kPushTransitionType = $70757368 (* 'push' *);
+ kSlideTransitionType = $736C6964 (* 'slid' *);
+ kWipeTransitionType = $736D7074 (* 'smpt' *);
+ kIrisTransitionType = $736D7032 (* 'smp2' *);
+ kRadialTransitionType = $736D7033 (* 'smp3' *);
+ kMatrixTransitionType = $736D7034 (* 'smp4' *);
+ kZoomTransitionType = $7A6F6F6D (* 'zoom' *);
+
+ { three source effects }
+ kTravellingMatteEffectType = $74726176 (* 'trav' *);
+
+
+ { Supported by QTNewGWorld in QuickTime 4.0 and later }
+ kCMYKPixelFormat = $636D796B (* 'cmyk' *); { CMYK, 8-bit }
+ k64ARGBPixelFormat = $62363461 (* 'b64a' *); { ARGB, 16-bit big-endian samples }
+ k48RGBPixelFormat = $62343872 (* 'b48r' *); { RGB, 16-bit big-endian samples }
+ k32AlphaGrayPixelFormat = $62333261 (* 'b32a' *); { AlphaGray, 16-bit big-endian samples }
+ k16GrayPixelFormat = $62313667 (* 'b16g' *); { Grayscale, 16-bit big-endian samples }
+ k422YpCbCr8PixelFormat = $32767579 (* '2vuy' *); { Component Y'CbCr 8-bit 4:2:2, ordered Cb Y'0 Cr Y'1 }
+
+ { Supported by QTNewGWorld in QuickTime 4.1.2 and later }
+ k4444YpCbCrA8PixelFormat = $76343038 (* 'v408' *); { Component Y'CbCrA 8-bit 4:4:4:4, ordered Cb Y' Cr A }
+ k4444YpCbCrA8RPixelFormat = $72343038 (* 'r408' *); { Component Y'CbCrA 8-bit 4:4:4:4, rendering format. full range alpha, zero biased yuv, ordered A Y' Cb Cr }
+
+ { Supported by QTNewGWorld in QuickTime 6.0 and later }
+ kYUV420PixelFormat = $79343230 (* 'y420' *); { Planar Component Y'CbCr 8-bit 4:2:0. PixMap baseAddr points to a big-endian PlanarPixmapInfoYUV420 struct; see ImageCodec.i. }
+
+
+ { These are the bits that are set in the Component flags, and also in the codecInfo struct. }
+ codecInfoDoes1 = $00000001; { codec can work with 1-bit pixels }
+ codecInfoDoes2 = $00000002; { codec can work with 2-bit pixels }
+ codecInfoDoes4 = $00000004; { codec can work with 4-bit pixels }
+ codecInfoDoes8 = $00000008; { codec can work with 8-bit pixels }
+ codecInfoDoes16 = $00000010; { codec can work with 16-bit pixels }
+ codecInfoDoes32 = $00000020; { codec can work with 32-bit pixels }
+ codecInfoDoesDither = $00000040; { codec can do ditherMode }
+ codecInfoDoesStretch = $00000080; { codec can stretch to arbitrary sizes }
+ codecInfoDoesShrink = $00000100; { codec can shrink to arbitrary sizes }
+ codecInfoDoesMask = $00000200; { codec can mask to clipping regions }
+ codecInfoDoesTemporal = $00000400; { codec can handle temporal redundancy }
+ codecInfoDoesDouble = $00000800; { codec can stretch to double size exactly }
+ codecInfoDoesQuad = $00001000; { codec can stretch to quadruple size exactly }
+ codecInfoDoesHalf = $00002000; { codec can shrink to half size }
+ codecInfoDoesQuarter = $00004000; { codec can shrink to quarter size }
+ codecInfoDoesRotate = $00008000; { codec can rotate on decompress }
+ codecInfoDoesHorizFlip = $00010000; { codec can flip horizontally on decompress }
+ codecInfoDoesVertFlip = $00020000; { codec can flip vertically on decompress }
+ codecInfoHasEffectParameterList = $00040000; { codec implements get effects parameter list call, once was codecInfoDoesSkew }
+ codecInfoDoesBlend = $00080000; { codec can blend on decompress }
+ codecInfoDoesWarp = $00100000; { codec can warp arbitrarily on decompress }
+ codecInfoDoesRecompress = $00200000; { codec can recompress image without accumulating errors }
+ codecInfoDoesSpool = $00400000; { codec can spool image data }
+ codecInfoDoesRateConstrain = $00800000; { codec can data rate constrain }
+
+
+ codecInfoDepth1 = $00000001; { compressed data at 1 bpp depth available }
+ codecInfoDepth2 = $00000002; { compressed data at 2 bpp depth available }
+ codecInfoDepth4 = $00000004; { compressed data at 4 bpp depth available }
+ codecInfoDepth8 = $00000008; { compressed data at 8 bpp depth available }
+ codecInfoDepth16 = $00000010; { compressed data at 16 bpp depth available }
+ codecInfoDepth32 = $00000020; { compressed data at 32 bpp depth available }
+ codecInfoDepth24 = $00000040; { compressed data at 24 bpp depth available }
+ codecInfoDepth33 = $00000080; { compressed data at 1 bpp monochrome depth available }
+ codecInfoDepth34 = $00000100; { compressed data at 2 bpp grayscale depth available }
+ codecInfoDepth36 = $00000200; { compressed data at 4 bpp grayscale depth available }
+ codecInfoDepth40 = $00000400; { compressed data at 8 bpp grayscale depth available }
+ codecInfoStoresClut = $00000800; { compressed data can have custom cluts }
+ codecInfoDoesLossless = $00001000; { compressed data can be stored in lossless format }
+ codecInfoSequenceSensitive = $00002000; { compressed data is sensitive to out of sequence decoding }
+
+
+ { input sequence flags }
+ codecFlagUseImageBuffer = $00000001; { decompress }
+ codecFlagUseScreenBuffer = $00000002; { decompress }
+ codecFlagUpdatePrevious = $00000004; { compress }
+ codecFlagNoScreenUpdate = $00000008; { decompress }
+ codecFlagWasCompressed = $00000010; { compress }
+ codecFlagDontOffscreen = $00000020; { decompress }
+ codecFlagUpdatePreviousComp = $00000040; { compress }
+ codecFlagForceKeyFrame = $00000080; { compress }
+ codecFlagOnlyScreenUpdate = $00000100; { decompress }
+ codecFlagLiveGrab = $00000200; { compress }
+ codecFlagDiffFrame = $00000200; { decompress }
+ codecFlagDontUseNewImageBuffer = $00000400; { decompress }
+ codecFlagInterlaceUpdate = $00000800; { decompress }
+ codecFlagCatchUpDiff = $00001000; { decompress }
+ codecFlagSupportDisable = $00002000; { decompress }
+ codecFlagReenable = $00004000; { decompress }
+
+
+ { output sequence flags }
+ codecFlagOutUpdateOnNextIdle = $00000200;
+ codecFlagOutUpdateOnDataSourceChange = $00000400;
+ codecFlagSequenceSensitive = $00000800;
+ codecFlagOutUpdateOnTimeChange = $00001000;
+ codecFlagImageBufferNotSourceImage = $00002000;
+ codecFlagUsedNewImageBuffer = $00004000;
+ codecFlagUsedImageBuffer = $00008000;
+
+
+ { The minimum data size for spooling in or out data }
+ codecMinimumDataSize = 32768;
+
+
+ compressorComponentType = $696D636F (* 'imco' *); { the type for "Components" which compress images }
+ decompressorComponentType = $696D6463 (* 'imdc' *); { the type for "Components" which decompress images }
+
+
+type
+ CompressorComponent = Component;
+ DecompressorComponent = Component;
+ CodecComponent = Component;
+
+const
+ anyCodec = 0; { take first working codec of given type }
+ bestSpeedCodec = -1; { take fastest codec of given type }
+ bestFidelityCodec = -2; { take codec which is most accurate }
+ bestCompressionCodec = -3; { take codec of given type that is most accurate }
+
+
+type
+ CodecType = OSType;
+ CodecType_fix = CodecType; { used as field type when a record declaration contains a CodecType field identifier }
+ CodecFlags = UInt16;
+ CodecQ = UInt32;
+
+const
+ codecLosslessQuality = $00000400;
+ codecMaxQuality = $000003FF;
+ codecMinQuality = $00000000;
+ codecLowQuality = $00000100;
+ codecNormalQuality = $00000200;
+ codecHighQuality = $00000300;
+
+ codecLockBitsShieldCursor = $01; { shield cursor }
+
+ codecCompletionSource = $01; { asynchronous codec is done with source data }
+ codecCompletionDest = $02; { asynchronous codec is done with destination data }
+ codecCompletionDontUnshield = $04; { on dest complete don't unshield cursor }
+ codecCompletionWentOffscreen = $08; { codec used offscreen buffer }
+ codecCompletionUnlockBits = $10; { on dest complete, call ICMSequenceUnlockBits }
+ codecCompletionForceChainFlush = $20; { ICM needs to flush the whole chain }
+ codecCompletionDropped = $40; { codec decided to drop this frame }
+
+ codecProgressOpen = 0;
+ codecProgressUpdatePercent = 1;
+ codecProgressClose = 2;
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ ICMDataProcPtr = function(var dataP: Ptr; bytesNeeded: SInt32; refcon: SInt32): OSErr;
+{$elsec}
+ ICMDataProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ ICMFlushProcPtr = function(data: Ptr; bytesAdded: SInt32; refcon: SInt32): OSErr;
+{$elsec}
+ ICMFlushProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ ICMCompletionProcPtr = procedure(result: OSErr; flags: SInt16; refcon: SInt32);
+{$elsec}
+ ICMCompletionProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ ICMProgressProcPtr = function(message: SInt16; completeness: Fixed; refcon: SInt32): OSErr;
+{$elsec}
+ ICMProgressProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ StdPixProcPtr = procedure(var src: PixMap; var srcRect: Rect; var matrix: MatrixRecord; mode: SInt16; mask: RgnHandle; var matte: PixMap; var matteRect: Rect; flags: SInt16);
+{$elsec}
+ StdPixProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QDPixProcPtr = procedure(var src: PixMap; var srcRect: Rect; var matrix: MatrixRecord; mode: SInt16; mask: RgnHandle; var matte: PixMap; var matteRect: Rect; flags: SInt16);
+{$elsec}
+ QDPixProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ ICMAlignmentProcPtr = procedure(var rp: Rect; refcon: SInt32);
+{$elsec}
+ ICMAlignmentProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ ICMCursorShieldedProcPtr = procedure(const (*var*) r: Rect; refcon: UnivPtr; flags: SInt32);
+{$elsec}
+ ICMCursorShieldedProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ ICMMemoryDisposedProcPtr = procedure(memoryBlock: Ptr; refcon: UnivPtr);
+{$elsec}
+ ICMMemoryDisposedProcPtr = ProcPtr;
+{$endc}
+
+ ICMCursorNotify = Ptr;
+{$ifc TYPED_FUNCTION_POINTERS}
+ ICMConvertDataFormatProcPtr = function(refCon: UnivPtr; flags: SInt32; desiredFormat: Handle; sourceDataFormat: Handle; srcData: UnivPtr; srcDataSize: SInt32; var dstData: UnivPtr; var dstDataSize: SInt32): OSErr;
+{$elsec}
+ ICMConvertDataFormatProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ ICMDataUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ICMDataUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ ICMFlushUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ICMFlushUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ ICMCompletionUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ICMCompletionUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ ICMProgressUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ICMProgressUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ StdPixUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ StdPixUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QDPixUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QDPixUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ ICMAlignmentUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ICMAlignmentUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ ICMCursorShieldedUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ICMCursorShieldedUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ ICMMemoryDisposedUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ICMMemoryDisposedUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ ICMConvertDataFormatUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ICMConvertDataFormatUPP = UniversalProcPtr;
+{$endc}
+ ImageSequence = SInt32;
+ ImageSequenceDataSource = SInt32;
+ ImageTranscodeSequence = SInt32;
+ ImageFieldSequence = SInt32;
+ ICMProgressProcRecordPtr = ^ICMProgressProcRecord;
+ ICMProgressProcRecord = record
+ progressProc: ICMProgressUPP;
+ progressRefCon: SInt32;
+ end;
+
+ ICMCompletionProcRecordPtr = ^ICMCompletionProcRecord;
+ ICMCompletionProcRecord = record
+ completionProc: ICMCompletionUPP;
+ completionRefCon: SInt32;
+ end;
+
+ ICMDataProcRecordPtr = ^ICMDataProcRecord;
+ ICMDataProcRecord = record
+ dataProc: ICMDataUPP;
+ dataRefCon: SInt32;
+ end;
+
+ ICMFlushProcRecordPtr = ^ICMFlushProcRecord;
+ ICMFlushProcRecord = record
+ flushProc: ICMFlushUPP;
+ flushRefCon: SInt32;
+ end;
+
+ ICMAlignmentProcRecordPtr = ^ICMAlignmentProcRecord;
+ ICMAlignmentProcRecord = record
+ alignmentProc: ICMAlignmentUPP;
+ alignmentRefCon: SInt32;
+ end;
+
+ DataRateParamsPtr = ^DataRateParams;
+ DataRateParams = record
+ dataRate: SInt32;
+ dataOverrun: SInt32;
+ frameDuration: SInt32;
+ keyFrameRate: SInt32;
+ minSpatialQuality: CodecQ;
+ minTemporalQuality: CodecQ;
+ end;
+
+ ImageDescriptionPtr = ^ImageDescription;
+ ImageDescription = packed record
+ idSize: SInt32; { total size of ImageDescription including extra data ( CLUTs and other per sequence data ) }
+ cType: CodecType; { what kind of codec compressed this data }
+ resvd1: SInt32; { reserved for Apple use }
+ resvd2: SInt16; { reserved for Apple use }
+ dataRefIndex: SInt16; { set to zero }
+ version: SInt16; { which version is this data }
+ revisionLevel: SInt16; { what version of that codec did this }
+ vendor: SInt32; { whose codec compressed this data }
+ temporalQuality: CodecQ; { what was the temporal quality factor }
+ spatialQuality: CodecQ; { what was the spatial quality factor }
+ width: SInt16; { how many pixels wide is this data }
+ height: SInt16; { how many pixels high is this data }
+ hRes: Fixed; { horizontal resolution }
+ vRes: Fixed; { vertical resolution }
+ dataSize: SInt32; { if known, the size of data for this image descriptor }
+ frameCount: SInt16; { number of frames this description applies to }
+ name: Str31; { name of codec ( in case not installed ) }
+ depth: SInt16; { what depth is this data (1-32) or ( 33-40 grayscale ) }
+ clutID: SInt16; { clut id or if 0 clut follows or -1 if no clut }
+ end;
+
+ ImageDescriptionHandle = ^ImageDescriptionPtr;
+ CodecInfoPtr = ^CodecInfo;
+ CodecInfo = packed record
+ typeName: Str31; { name of the codec type i.e.: 'Apple Image Compression' }
+ version: SInt16; { version of the codec data that this codec knows about }
+ revisionLevel: SInt16; { revision level of this codec i.e: 0x00010001 (1.0.1) }
+ vendor: SInt32; { Maker of this codec i.e: 'appl' }
+ decompressFlags: SInt32; { codecInfo flags for decompression capabilities }
+ compressFlags: SInt32; { codecInfo flags for compression capabilities }
+ formatFlags: SInt32; { codecInfo flags for compression format details }
+ compressionAccuracy: UInt8; { measure (1-255) of accuracy of this codec for compress (0 if unknown) }
+ decompressionAccuracy: UInt8; { measure (1-255) of accuracy of this codec for decompress (0 if unknown) }
+ compressionSpeed: UInt16; { ( millisecs for compressing 320x240 on base mac II) (0 if unknown) }
+ decompressionSpeed: UInt16; { ( millisecs for decompressing 320x240 on mac II)(0 if unknown) }
+ compressionLevel: UInt8; { measure (1-255) of compression level of this codec (0 if unknown) }
+ resvd: UInt8; { pad }
+ minimumHeight: SInt16; { minimum height of image (block size) }
+ minimumWidth: SInt16; { minimum width of image (block size) }
+ decompressPipelineLatency: SInt16; { in milliseconds ( for asynchronous codecs ) }
+ compressPipelineLatency: SInt16; { in milliseconds ( for asynchronous codecs ) }
+ privateData: SInt32;
+ end;
+
+ CodecNameSpecPtr = ^CodecNameSpec;
+ CodecNameSpec = record
+ codec: CodecComponent;
+ cType: CodecType;
+ typeName: Str31;
+ name: Handle;
+ end;
+
+ CodecNameSpecListPtr = ^CodecNameSpecList;
+ CodecNameSpecList = record
+ count: SInt16;
+ list: array [0..0] of CodecNameSpec;
+ end;
+
+
+const
+ defaultDither = 0;
+ forceDither = 1;
+ suppressDither = 2;
+ useColorMatching = 4;
+
+ callStdBits = 1;
+ callOldBits = 2;
+ noDefaultOpcodes = 4;
+
+ graphicsModeStraightAlpha = 256;
+ graphicsModePreWhiteAlpha = 257;
+ graphicsModePreBlackAlpha = 258;
+ graphicsModeComposition = 259;
+ graphicsModeStraightAlphaBlend = 260;
+ graphicsModePreMulColorAlpha = 261;
+
+ evenField1ToEvenFieldOut = $01;
+ evenField1ToOddFieldOut = $02;
+ oddField1ToEvenFieldOut = $04;
+ oddField1ToOddFieldOut = $08;
+ evenField2ToEvenFieldOut = $10;
+ evenField2ToOddFieldOut = $20;
+ oddField2ToEvenFieldOut = $40;
+ oddField2ToOddFieldOut = $80;
+
+ icmFrameTimeHasVirtualStartTimeAndDuration = $01;
+
+
+type
+ ICMFrameTimeRecordPtr = ^ICMFrameTimeRecord;
+ ICMFrameTimeRecord = record
+ value: wide; { frame time }
+ scale: SInt32; { timescale of value/duration fields }
+ base: Ptr; { timebase }
+ duration: SInt32; { duration frame is to be displayed (0 if unknown) }
+ rate: Fixed; { rate of timebase relative to wall-time }
+ recordSize: SInt32; { total number of bytes in ICMFrameTimeRecord }
+ frameNumber: SInt32; { number of frame, zero if not known }
+ flags: SInt32;
+ virtualStartTime: wide; { conceptual start time }
+ virtualDuration: SInt32; { conceptual duration }
+ end;
+
+ ICMFrameTimePtr = ^ICMFrameTimeRecord;
+{$ifc undefined __QTUUID__}
+{$setc __QTUUID__ := 1}
+ { QuickTime flavor of universally unique identifier (uuid) }
+ QTUUIDPtr = ^QTUUID;
+ QTUUID = record
+ data1: UInt32;
+ data2: UInt16;
+ data3: UInt16;
+ data4: packed array [0..7] of UInt8;
+ end;
+
+ QTMediaContextID = QTUUID;
+ QTMediaContextIDPtr = ^QTMediaContextID;
+{$endc}
+
+
+const
+ uppICMDataProcInfo = $00000FE0;
+ uppICMFlushProcInfo = $00000FE0;
+ uppICMCompletionProcInfo = $00000E80;
+ uppICMProgressProcInfo = $00000FA0;
+ uppStdPixProcInfo = $002FEFC0;
+ uppQDPixProcInfo = $002FEFC0;
+ uppICMAlignmentProcInfo = $000003C0;
+ uppICMCursorShieldedProcInfo = $00000FC0;
+ uppICMMemoryDisposedProcInfo = $000003C0;
+ uppICMConvertDataFormatProcInfo = $003FFFE0;
+ {
+ * NewICMDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewICMDataUPP(userRoutine: ICMDataProcPtr): ICMDataUPP; external name '_NewICMDataUPP'; { old name was NewICMDataProc }
+{
+ * NewICMFlushUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewICMFlushUPP(userRoutine: ICMFlushProcPtr): ICMFlushUPP; external name '_NewICMFlushUPP'; { old name was NewICMFlushProc }
+{
+ * NewICMCompletionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewICMCompletionUPP(userRoutine: ICMCompletionProcPtr): ICMCompletionUPP; external name '_NewICMCompletionUPP'; { old name was NewICMCompletionProc }
+{
+ * NewICMProgressUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewICMProgressUPP(userRoutine: ICMProgressProcPtr): ICMProgressUPP; external name '_NewICMProgressUPP'; { old name was NewICMProgressProc }
+{
+ * NewStdPixUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewStdPixUPP(userRoutine: StdPixProcPtr): StdPixUPP; external name '_NewStdPixUPP'; { old name was NewStdPixProc }
+{
+ * NewQDPixUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewQDPixUPP(userRoutine: QDPixProcPtr): QDPixUPP; external name '_NewQDPixUPP'; { old name was NewQDPixProc }
+{
+ * NewICMAlignmentUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewICMAlignmentUPP(userRoutine: ICMAlignmentProcPtr): ICMAlignmentUPP; external name '_NewICMAlignmentUPP'; { old name was NewICMAlignmentProc }
+{
+ * NewICMCursorShieldedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewICMCursorShieldedUPP(userRoutine: ICMCursorShieldedProcPtr): ICMCursorShieldedUPP; external name '_NewICMCursorShieldedUPP'; { old name was NewICMCursorShieldedProc }
+{
+ * NewICMMemoryDisposedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewICMMemoryDisposedUPP(userRoutine: ICMMemoryDisposedProcPtr): ICMMemoryDisposedUPP; external name '_NewICMMemoryDisposedUPP'; { old name was NewICMMemoryDisposedProc }
+{
+ * NewICMConvertDataFormatUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewICMConvertDataFormatUPP(userRoutine: ICMConvertDataFormatProcPtr): ICMConvertDataFormatUPP; external name '_NewICMConvertDataFormatUPP'; { old name was NewICMConvertDataFormatProc }
+{
+ * DisposeICMDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeICMDataUPP(userUPP: ICMDataUPP); external name '_DisposeICMDataUPP';
+{
+ * DisposeICMFlushUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeICMFlushUPP(userUPP: ICMFlushUPP); external name '_DisposeICMFlushUPP';
+{
+ * DisposeICMCompletionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeICMCompletionUPP(userUPP: ICMCompletionUPP); external name '_DisposeICMCompletionUPP';
+{
+ * DisposeICMProgressUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeICMProgressUPP(userUPP: ICMProgressUPP); external name '_DisposeICMProgressUPP';
+{
+ * DisposeStdPixUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeStdPixUPP(userUPP: StdPixUPP); external name '_DisposeStdPixUPP';
+{
+ * DisposeQDPixUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeQDPixUPP(userUPP: QDPixUPP); external name '_DisposeQDPixUPP';
+{
+ * DisposeICMAlignmentUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeICMAlignmentUPP(userUPP: ICMAlignmentUPP); external name '_DisposeICMAlignmentUPP';
+{
+ * DisposeICMCursorShieldedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeICMCursorShieldedUPP(userUPP: ICMCursorShieldedUPP); external name '_DisposeICMCursorShieldedUPP';
+{
+ * DisposeICMMemoryDisposedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeICMMemoryDisposedUPP(userUPP: ICMMemoryDisposedUPP); external name '_DisposeICMMemoryDisposedUPP';
+{
+ * DisposeICMConvertDataFormatUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeICMConvertDataFormatUPP(userUPP: ICMConvertDataFormatUPP); external name '_DisposeICMConvertDataFormatUPP';
+{
+ * InvokeICMDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeICMDataUPP(var dataP: Ptr; bytesNeeded: SInt32; refcon: SInt32; userRoutine: ICMDataUPP): OSErr; external name '_InvokeICMDataUPP'; { old name was CallICMDataProc }
+{
+ * InvokeICMFlushUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeICMFlushUPP(data: Ptr; bytesAdded: SInt32; refcon: SInt32; userRoutine: ICMFlushUPP): OSErr; external name '_InvokeICMFlushUPP'; { old name was CallICMFlushProc }
+{
+ * InvokeICMCompletionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeICMCompletionUPP(result: OSErr; flags: SInt16; refcon: SInt32; userRoutine: ICMCompletionUPP); external name '_InvokeICMCompletionUPP'; { old name was CallICMCompletionProc }
+{
+ * InvokeICMProgressUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeICMProgressUPP(message: SInt16; completeness: Fixed; refcon: SInt32; userRoutine: ICMProgressUPP): OSErr; external name '_InvokeICMProgressUPP'; { old name was CallICMProgressProc }
+{
+ * InvokeStdPixUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeStdPixUPP(var src: PixMap; var srcRect: Rect; var matrix: MatrixRecord; mode: SInt16; mask: RgnHandle; var matte: PixMap; var matteRect: Rect; flags: SInt16; userRoutine: StdPixUPP); external name '_InvokeStdPixUPP'; { old name was CallStdPixProc }
+{
+ * InvokeQDPixUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeQDPixUPP(var src: PixMap; var srcRect: Rect; var matrix: MatrixRecord; mode: SInt16; mask: RgnHandle; var matte: PixMap; var matteRect: Rect; flags: SInt16; userRoutine: QDPixUPP); external name '_InvokeQDPixUPP'; { old name was CallQDPixProc }
+{
+ * InvokeICMAlignmentUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeICMAlignmentUPP(var rp: Rect; refcon: SInt32; userRoutine: ICMAlignmentUPP); external name '_InvokeICMAlignmentUPP'; { old name was CallICMAlignmentProc }
+{
+ * InvokeICMCursorShieldedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeICMCursorShieldedUPP(const (*var*) r: Rect; refcon: UnivPtr; flags: SInt32; userRoutine: ICMCursorShieldedUPP); external name '_InvokeICMCursorShieldedUPP'; { old name was CallICMCursorShieldedProc }
+{
+ * InvokeICMMemoryDisposedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeICMMemoryDisposedUPP(memoryBlock: Ptr; refcon: UnivPtr; userRoutine: ICMMemoryDisposedUPP); external name '_InvokeICMMemoryDisposedUPP'; { old name was CallICMMemoryDisposedProc }
+{
+ * InvokeICMConvertDataFormatUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeICMConvertDataFormatUPP(refCon: UnivPtr; flags: SInt32; desiredFormat: Handle; sourceDataFormat: Handle; srcData: UnivPtr; srcDataSize: SInt32; var dstData: UnivPtr; var dstDataSize: SInt32; userRoutine: ICMConvertDataFormatUPP): OSErr; external name '_InvokeICMConvertDataFormatUPP'; { old name was CallICMConvertDataFormatProc }
+{
+ * CodecManagerVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CodecManagerVersion(var version: SInt32): OSErr; external name '_CodecManagerVersion';
+{
+ * GetCodecNameList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetCodecNameList(var list: CodecNameSpecListPtr; showAll: SInt16): OSErr; external name '_GetCodecNameList';
+{
+ * DisposeCodecNameList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DisposeCodecNameList(list: CodecNameSpecListPtr): OSErr; external name '_DisposeCodecNameList';
+{
+ * GetCodecInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetCodecInfo(var info: CodecInfo; cType: CodecType; codec: CodecComponent): OSErr; external name '_GetCodecInfo';
+{
+ * GetMaxCompressionSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMaxCompressionSize(src: PixMapHandle; const (*var*) srcRect: Rect; colorDepth: SInt16; quality: CodecQ; cType: CodecType; codec: CompressorComponent; var size: SInt32): OSErr; external name '_GetMaxCompressionSize';
+{
+ * GetCSequenceMaxCompressionSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetCSequenceMaxCompressionSize(seqID: ImageSequence; src: PixMapHandle; var size: SInt32): OSErr; external name '_GetCSequenceMaxCompressionSize';
+{
+ * GetCompressionTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetCompressionTime(src: PixMapHandle; const (*var*) srcRect: Rect; colorDepth: SInt16; cType: CodecType; codec: CompressorComponent; var spatialQuality: CodecQ; var temporalQuality: CodecQ; var compressTime: UInt32): OSErr; external name '_GetCompressionTime';
+{
+ * CompressImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CompressImage(src: PixMapHandle; const (*var*) srcRect: Rect; quality: CodecQ; cType: CodecType; desc: ImageDescriptionHandle; data: Ptr): OSErr; external name '_CompressImage';
+{
+ * FCompressImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function FCompressImage(src: PixMapHandle; const (*var*) srcRect: Rect; colorDepth: SInt16; quality: CodecQ; cType: CodecType; codec: CompressorComponent; ctable: CTabHandle; flags: CodecFlags; bufferSize: SInt32; flushProc: ICMFlushProcRecordPtr; progressProc: ICMProgressProcRecordPtr; desc: ImageDescriptionHandle; data: Ptr): OSErr; external name '_FCompressImage';
+{
+ * DecompressImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DecompressImage(data: Ptr; desc: ImageDescriptionHandle; dst: PixMapHandle; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect; mode: SInt16; mask: RgnHandle): OSErr; external name '_DecompressImage';
+{
+ * FDecompressImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function FDecompressImage(data: Ptr; desc: ImageDescriptionHandle; dst: PixMapHandle; const (*var*) srcRect: Rect; matrix: MatrixRecordPtr; mode: SInt16; mask: RgnHandle; matte: PixMapHandle; const (*var*) matteRect: Rect; accuracy: CodecQ; codec: DecompressorComponent; bufferSize: SInt32; dataProc: ICMDataProcRecordPtr; progressProc: ICMProgressProcRecordPtr): OSErr; external name '_FDecompressImage';
+{
+ * CompressSequenceBegin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CompressSequenceBegin(var seqID: ImageSequence; src: PixMapHandle; prev: PixMapHandle; const (*var*) srcRect: Rect; const (*var*) prevRect: Rect; colorDepth: SInt16; cType: CodecType; codec: CompressorComponent; spatialQuality: CodecQ; temporalQuality: CodecQ; keyFrameRate: SInt32; ctable: CTabHandle; flags: CodecFlags; desc: ImageDescriptionHandle): OSErr; external name '_CompressSequenceBegin';
+{
+ * CompressSequenceFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CompressSequenceFrame(seqID: ImageSequence; src: PixMapHandle; const (*var*) srcRect: Rect; flags: CodecFlags; data: Ptr; var dataSize: SInt32; var similarity: UInt8; asyncCompletionProc: ICMCompletionProcRecordPtr): OSErr; external name '_CompressSequenceFrame';
+{
+ * DecompressSequenceBegin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DecompressSequenceBegin(var seqID: ImageSequence; desc: ImageDescriptionHandle; port: CGrafPtr; gdh: GDHandle; const (*var*) srcRect: Rect; matrix: MatrixRecordPtr; mode: SInt16; mask: RgnHandle; flags: CodecFlags; accuracy: CodecQ; codec: DecompressorComponent): OSErr; external name '_DecompressSequenceBegin';
+{
+ * DecompressSequenceBeginS()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DecompressSequenceBeginS(var seqID: ImageSequence; desc: ImageDescriptionHandle; data: Ptr; dataSize: SInt32; port: CGrafPtr; gdh: GDHandle; const (*var*) srcRect: Rect; matrix: MatrixRecordPtr; mode: SInt16; mask: RgnHandle; flags: CodecFlags; accuracy: CodecQ; codec: DecompressorComponent): OSErr; external name '_DecompressSequenceBeginS';
+{
+ * DecompressSequenceFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DecompressSequenceFrame(seqID: ImageSequence; data: Ptr; inFlags: CodecFlags; var outFlags: CodecFlags; asyncCompletionProc: ICMCompletionProcRecordPtr): OSErr; external name '_DecompressSequenceFrame';
+{
+ * DecompressSequenceFrameS()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DecompressSequenceFrameS(seqID: ImageSequence; data: Ptr; dataSize: SInt32; inFlags: CodecFlags; var outFlags: CodecFlags; asyncCompletionProc: ICMCompletionProcRecordPtr): OSErr; external name '_DecompressSequenceFrameS';
+{
+ * DecompressSequenceFrameWhen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DecompressSequenceFrameWhen(seqID: ImageSequence; data: Ptr; dataSize: SInt32; inFlags: CodecFlags; var outFlags: CodecFlags; asyncCompletionProc: ICMCompletionProcRecordPtr; const (*var*) frameTime: ICMFrameTimeRecord): OSErr; external name '_DecompressSequenceFrameWhen';
+{
+ * CDSequenceFlush()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CDSequenceFlush(seqID: ImageSequence): OSErr; external name '_CDSequenceFlush';
+{
+ * SetDSequenceMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetDSequenceMatrix(seqID: ImageSequence; matrix: MatrixRecordPtr): OSErr; external name '_SetDSequenceMatrix';
+{
+ * GetDSequenceMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GetDSequenceMatrix(seqID: ImageSequence; matrix: MatrixRecordPtr): OSErr; external name '_GetDSequenceMatrix';
+{
+ * SetDSequenceMatte()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetDSequenceMatte(seqID: ImageSequence; matte: PixMapHandle; const (*var*) matteRect: Rect): OSErr; external name '_SetDSequenceMatte';
+{
+ * SetDSequenceMask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetDSequenceMask(seqID: ImageSequence; mask: RgnHandle): OSErr; external name '_SetDSequenceMask';
+{
+ * SetDSequenceTransferMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetDSequenceTransferMode(seqID: ImageSequence; mode: SInt16; const (*var*) opColor: RGBColor): OSErr; external name '_SetDSequenceTransferMode';
+{
+ * SetDSequenceDataProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetDSequenceDataProc(seqID: ImageSequence; dataProc: ICMDataProcRecordPtr; bufferSize: SInt32): OSErr; external name '_SetDSequenceDataProc';
+{
+ * SetDSequenceAccuracy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetDSequenceAccuracy(seqID: ImageSequence; accuracy: CodecQ): OSErr; external name '_SetDSequenceAccuracy';
+{
+ * SetDSequenceSrcRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetDSequenceSrcRect(seqID: ImageSequence; const (*var*) srcRect: Rect): OSErr; external name '_SetDSequenceSrcRect';
+{
+ * SetDSequenceFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function SetDSequenceFlags(seqID: ImageSequence; flags: SInt32; flagsMask: SInt32): OSErr; external name '_SetDSequenceFlags';
+const
+ codecDSequenceDisableOverlaySurface = $00000020;
+ codecDSequenceSingleField = $00000040;
+ codecDSequenceBidirectionalPrediction = $00000080;
+ codecDSequenceFlushInsteadOfDirtying = $00000100;
+ codecDSequenceEnableSubPixelPositioning = $00000200;
+
+
+type
+ CodecComponentPtr = ^CodecComponent;
+ CodecComponentHandle = ^CodecComponentPtr;
+ { selectors for ICMSequenceGet/SetInfo }
+
+const
+ kICMSequenceTaskWeight = $74776569 (* 'twei' *); { data is pointer to UInt32 }
+ kICMSequenceTaskName = $746E616D (* 'tnam' *); { data is pointer to OSType }
+ kICMSequenceUserPreferredCodecs = $70756E74 (* 'punt' *); { data is pointer to CodecComponentHandle }
+
+ {
+ * ICMSequenceGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function ICMSequenceGetInfo(seqID: ImageSequence; which: OSType; data: UnivPtr): OSErr; external name '_ICMSequenceGetInfo';
+{
+ * ICMSequenceSetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function ICMSequenceSetInfo(seqID: ImageSequence; which: OSType; data: UnivPtr; dataSize: Size): OSErr; external name '_ICMSequenceSetInfo';
+{
+ * GetDSequenceImageBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetDSequenceImageBuffer(seqID: ImageSequence; var gworld: GWorldPtr): OSErr; external name '_GetDSequenceImageBuffer';
+{
+ * GetDSequenceScreenBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetDSequenceScreenBuffer(seqID: ImageSequence; var gworld: GWorldPtr): OSErr; external name '_GetDSequenceScreenBuffer';
+{
+ * SetCSequenceQuality()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetCSequenceQuality(seqID: ImageSequence; spatialQuality: CodecQ; temporalQuality: CodecQ): OSErr; external name '_SetCSequenceQuality';
+{
+ * SetCSequencePrev()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetCSequencePrev(seqID: ImageSequence; prev: PixMapHandle; const (*var*) prevRect: Rect): OSErr; external name '_SetCSequencePrev';
+{
+ * SetCSequenceFlushProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetCSequenceFlushProc(seqID: ImageSequence; flushProc: ICMFlushProcRecordPtr; bufferSize: SInt32): OSErr; external name '_SetCSequenceFlushProc';
+{
+ * SetCSequenceKeyFrameRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetCSequenceKeyFrameRate(seqID: ImageSequence; keyFrameRate: SInt32): OSErr; external name '_SetCSequenceKeyFrameRate';
+{
+ * GetCSequenceKeyFrameRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetCSequenceKeyFrameRate(seqID: ImageSequence; var keyFrameRate: SInt32): OSErr; external name '_GetCSequenceKeyFrameRate';
+{
+ * GetCSequencePrevBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetCSequencePrevBuffer(seqID: ImageSequence; var gworld: GWorldPtr): OSErr; external name '_GetCSequencePrevBuffer';
+{
+ * CDSequenceBusy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CDSequenceBusy(seqID: ImageSequence): OSErr; external name '_CDSequenceBusy';
+{
+ * CDSequenceEnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CDSequenceEnd(seqID: ImageSequence): OSErr; external name '_CDSequenceEnd';
+{
+ * CDSequenceEquivalentImageDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CDSequenceEquivalentImageDescription(seqID: ImageSequence; newDesc: ImageDescriptionHandle; var equivalent: boolean): OSErr; external name '_CDSequenceEquivalentImageDescription';
+{
+ * CDSequenceEquivalentImageDescriptionS()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function CDSequenceEquivalentImageDescriptionS(seqID: ImageSequence; newDesc: ImageDescriptionHandle; var equivalent: boolean; var canSwitch: boolean): OSErr; external name '_CDSequenceEquivalentImageDescriptionS';
+{
+ * ReplaceDSequenceImageDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function ReplaceDSequenceImageDescription(seqID: ImageSequence; newDesc: ImageDescriptionHandle): OSErr; external name '_ReplaceDSequenceImageDescription';
+{
+ * GetCompressedImageSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetCompressedImageSize(desc: ImageDescriptionHandle; data: Ptr; bufferSize: SInt32; dataProc: ICMDataProcRecordPtr; var dataSize: SInt32): OSErr; external name '_GetCompressedImageSize';
+{
+ * GetSimilarity()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetSimilarity(src: PixMapHandle; const (*var*) srcRect: Rect; desc: ImageDescriptionHandle; data: Ptr; var similarity: Fixed): OSErr; external name '_GetSimilarity';
+const
+ kImageDescriptionSampleFormat = $6964666D (* 'idfm' *); { image description extension describing sample format }
+ kImageDescriptionClassicAtomFormat = $61746F6D (* 'atom' *); { sample contains classic atom structure (ie, GX codec and Curve codec) }
+ kImageDescriptionQTAtomFormat = $71746174 (* 'qtat' *); { sample contains QT atom structure }
+ kImageDescriptionEffectDataFormat = $66786174 (* 'fxat' *); { sample describes an effect (as QTAtoms) }
+ kImageDescriptionPrivateDataFormat = $70726976 (* 'priv' *); { sample is in a private codec specific format }
+ kImageDescriptionAlternateCodec = $73756273 (* 'subs' *); { image description extension containing the OSType of a substitute codec should the main codec not be available }
+ kImageDescriptionColorSpace = $63737063 (* 'cspc' *); { image description extension containing an OSType naming the native pixel format of an image (only used for pixel formats not supported by classic Color QuickDraw) }
+
+ {
+ * GetImageDescriptionCTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetImageDescriptionCTable(desc: ImageDescriptionHandle; var ctable: CTabHandle): OSErr; external name '_GetImageDescriptionCTable';
+{
+ * SetImageDescriptionCTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetImageDescriptionCTable(desc: ImageDescriptionHandle; ctable: CTabHandle): OSErr; external name '_SetImageDescriptionCTable';
+{
+ * GetImageDescriptionExtension()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetImageDescriptionExtension(desc: ImageDescriptionHandle; var extension: Handle; idType: SInt32; index: SInt32): OSErr; external name '_GetImageDescriptionExtension';
+{
+ * AddImageDescriptionExtension()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function AddImageDescriptionExtension(desc: ImageDescriptionHandle; extension: Handle; idType: SInt32): OSErr; external name '_AddImageDescriptionExtension';
+{
+ * RemoveImageDescriptionExtension()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function RemoveImageDescriptionExtension(desc: ImageDescriptionHandle; idType: SInt32; index: SInt32): OSErr; external name '_RemoveImageDescriptionExtension';
+{
+ * CountImageDescriptionExtensionType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CountImageDescriptionExtensionType(desc: ImageDescriptionHandle; idType: SInt32; var count: SInt32): OSErr; external name '_CountImageDescriptionExtensionType';
+{
+ * GetNextImageDescriptionExtensionType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetNextImageDescriptionExtensionType(desc: ImageDescriptionHandle; var idType: SInt32): OSErr; external name '_GetNextImageDescriptionExtensionType';
+{
+ * FindCodec()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function FindCodec(cType: CodecType; specCodec: CodecComponent; var compressor: CompressorComponent; var decompressor: DecompressorComponent): OSErr; external name '_FindCodec';
+{
+ * CompressPicture()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CompressPicture(srcPicture: PicHandle; dstPicture: PicHandle; quality: CodecQ; cType: CodecType): OSErr; external name '_CompressPicture';
+{
+ * FCompressPicture()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function FCompressPicture(srcPicture: PicHandle; dstPicture: PicHandle; colorDepth: SInt16; ctable: CTabHandle; quality: CodecQ; doDither: SInt16; compressAgain: SInt16; progressProc: ICMProgressProcRecordPtr; cType: CodecType; codec: CompressorComponent): OSErr; external name '_FCompressPicture';
+{
+ * CompressPictureFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CompressPictureFile(srcRefNum: SInt16; dstRefNum: SInt16; quality: CodecQ; cType: CodecType): OSErr; external name '_CompressPictureFile';
+{
+ * FCompressPictureFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function FCompressPictureFile(srcRefNum: SInt16; dstRefNum: SInt16; colorDepth: SInt16; ctable: CTabHandle; quality: CodecQ; doDither: SInt16; compressAgain: SInt16; progressProc: ICMProgressProcRecordPtr; cType: CodecType; codec: CompressorComponent): OSErr; external name '_FCompressPictureFile';
+{
+ * GetPictureFileHeader()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetPictureFileHeader(refNum: SInt16; var frame: Rect; var header: OpenCPicParams): OSErr; external name '_GetPictureFileHeader';
+{
+ * DrawPictureFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DrawPictureFile(refNum: SInt16; const (*var*) frame: Rect; progressProc: ICMProgressProcRecordPtr): OSErr; external name '_DrawPictureFile';
+{
+ * DrawTrimmedPicture()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DrawTrimmedPicture(srcPicture: PicHandle; const (*var*) frame: Rect; trimMask: RgnHandle; doDither: SInt16; progressProc: ICMProgressProcRecordPtr): OSErr; external name '_DrawTrimmedPicture';
+{
+ * DrawTrimmedPictureFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DrawTrimmedPictureFile(srcRefnum: SInt16; const (*var*) frame: Rect; trimMask: RgnHandle; doDither: SInt16; progressProc: ICMProgressProcRecordPtr): OSErr; external name '_DrawTrimmedPictureFile';
+{
+ * MakeThumbnailFromPicture()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MakeThumbnailFromPicture(picture: PicHandle; colorDepth: SInt16; thumbnail: PicHandle; progressProc: ICMProgressProcRecordPtr): OSErr; external name '_MakeThumbnailFromPicture';
+{
+ * MakeThumbnailFromPictureFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MakeThumbnailFromPictureFile(refNum: SInt16; colorDepth: SInt16; thumbnail: PicHandle; progressProc: ICMProgressProcRecordPtr): OSErr; external name '_MakeThumbnailFromPictureFile';
+{
+ * MakeThumbnailFromPixMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MakeThumbnailFromPixMap(src: PixMapHandle; const (*var*) srcRect: Rect; colorDepth: SInt16; thumbnail: PicHandle; progressProc: ICMProgressProcRecordPtr): OSErr; external name '_MakeThumbnailFromPixMap';
+{
+ * TrimImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TrimImage(desc: ImageDescriptionHandle; inData: Ptr; inBufferSize: SInt32; dataProc: ICMDataProcRecordPtr; outData: Ptr; outBufferSize: SInt32; flushProc: ICMFlushProcRecordPtr; var trimRect: Rect; progressProc: ICMProgressProcRecordPtr): OSErr; external name '_TrimImage';
+{
+ * ConvertImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ConvertImage(srcDD: ImageDescriptionHandle; srcData: Ptr; colorDepth: SInt16; ctable: CTabHandle; accuracy: CodecQ; quality: CodecQ; cType: CodecType; codec: CodecComponent; dstDD: ImageDescriptionHandle; dstData: Ptr): OSErr; external name '_ConvertImage';
+{
+ * GetCompressedPixMapInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetCompressedPixMapInfo(pix: PixMapPtr; var desc: ImageDescriptionHandle; var data: Ptr; var bufferSize: SInt32; var dataProc: ICMDataProcRecord; var progressProc: ICMProgressProcRecord): OSErr; external name '_GetCompressedPixMapInfo';
+{
+ * SetCompressedPixMapInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetCompressedPixMapInfo(pix: PixMapPtr; desc: ImageDescriptionHandle; data: Ptr; bufferSize: SInt32; dataProc: ICMDataProcRecordPtr; progressProc: ICMProgressProcRecordPtr): OSErr; external name '_SetCompressedPixMapInfo';
+{
+ * StdPix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure StdPix(src: PixMapPtr; const (*var*) srcRect: Rect; matrix: MatrixRecordPtr; mode: SInt16; mask: RgnHandle; matte: PixMapPtr; const (*var*) matteRect: Rect; flags: SInt16); external name '_StdPix';
+{
+ * TransformRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TransformRgn(matrix: MatrixRecordPtr; rgn: RgnHandle): OSErr; external name '_TransformRgn';
+{**********
+ preview stuff
+**********}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * SFGetFilePreview()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SFGetFilePreview(where: Point; const (*var*) prompt: Str255; fileFilter: FileFilterUPP; numTypes: SInt16; typeList: ConstSFTypeListPtr; dlgHook: DlgHookUPP; var reply: SFReply); external name '_SFGetFilePreview';
+{
+ * SFPGetFilePreview()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SFPGetFilePreview(where: Point; const (*var*) prompt: Str255; fileFilter: FileFilterUPP; numTypes: SInt16; typeList: ConstSFTypeListPtr; dlgHook: DlgHookUPP; var reply: SFReply; dlgID: SInt16; filterProc: ModalFilterUPP); external name '_SFPGetFilePreview';
+{
+ * StandardGetFilePreview()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure StandardGetFilePreview(fileFilter: FileFilterUPP; numTypes: SInt16; typeList: ConstSFTypeListPtr; var reply: StandardFileReply); external name '_StandardGetFilePreview';
+{
+ * CustomGetFilePreview()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure CustomGetFilePreview(fileFilter: FileFilterYDUPP; numTypes: SInt16; typeList: ConstSFTypeListPtr; var reply: StandardFileReply; dlgID: SInt16; where: Point; dlgHook: DlgHookYDUPP; filterProc: ModalFilterYDUPP; activeList: ActivationOrderListPtr; activateProc: ActivateYDUPP; yourDataPtr: UnivPtr); external name '_CustomGetFilePreview';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * MakeFilePreview()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MakeFilePreview(resRefNum: SInt16; progress: ICMProgressProcRecordPtr): OSErr; external name '_MakeFilePreview';
+{
+ * AddFilePreview()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function AddFilePreview(resRefNum: SInt16; previewType: OSType; previewData: Handle): OSErr; external name '_AddFilePreview';
+const
+ sfpItemPreviewAreaUser = 11;
+ sfpItemPreviewStaticText = 12;
+ sfpItemPreviewDividerUser = 13;
+ sfpItemCreatePreviewButton = 14;
+ sfpItemShowPreviewButton = 15;
+
+
+type
+ PreviewResourceRecordPtr = ^PreviewResourceRecord;
+ PreviewResourceRecord = record
+ modDate: UInt32;
+ version: SInt16;
+ resType: OSType;
+ resID: SInt16;
+ end;
+
+ PreviewResourcePtr = ^PreviewResourceRecord;
+ PreviewResource = ^PreviewResourcePtr;
+ {
+ * AlignScreenRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure AlignScreenRect(var rp: Rect; alignmentProc: ICMAlignmentProcRecordPtr); external name '_AlignScreenRect';
+{
+ * AlignWindow()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure AlignWindow(wp: WindowRef; front: boolean; const (*var*) alignmentRect: Rect; alignmentProc: ICMAlignmentProcRecordPtr); external name '_AlignWindow';
+{
+ * DragAlignedWindow()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure DragAlignedWindow(wp: WindowRef; startPt: Point; var boundsRect: Rect; var alignmentRect: Rect; alignmentProc: ICMAlignmentProcRecordPtr); external name '_DragAlignedWindow';
+{
+ * DragAlignedGrayRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DragAlignedGrayRgn(theRgn: RgnHandle; startPt: Point; var boundsRect: Rect; var slopRect: Rect; axis: SInt16; actionProc: UniversalProcPtr; var alignmentRect: Rect; alignmentProc: ICMAlignmentProcRecordPtr): SInt32; external name '_DragAlignedGrayRgn';
+{
+ * SetCSequenceDataRateParams()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetCSequenceDataRateParams(seqID: ImageSequence; params: DataRateParamsPtr): OSErr; external name '_SetCSequenceDataRateParams';
+{
+ * SetCSequenceFrameNumber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetCSequenceFrameNumber(seqID: ImageSequence; frameNumber: SInt32): OSErr; external name '_SetCSequenceFrameNumber';
+{
+ * SetCSequencePreferredPacketSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetCSequencePreferredPacketSize(seqID: ImageSequence; preferredPacketSizeInBytes: SInt32): OSErr; external name '_SetCSequencePreferredPacketSize';
+{
+ * NewImageGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewImageGWorld(var gworld: GWorldPtr; idh: ImageDescriptionHandle; flags: GWorldFlags): OSErr; external name '_NewImageGWorld';
+{
+ * GetCSequenceDataRateParams()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetCSequenceDataRateParams(seqID: ImageSequence; params: DataRateParamsPtr): OSErr; external name '_GetCSequenceDataRateParams';
+{
+ * GetCSequenceFrameNumber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetCSequenceFrameNumber(seqID: ImageSequence; var frameNumber: SInt32): OSErr; external name '_GetCSequenceFrameNumber';
+{
+ * GetBestDeviceRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetBestDeviceRect(var gdh: GDHandle; var rp: Rect): OSErr; external name '_GetBestDeviceRect';
+{
+ * SetSequenceProgressProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetSequenceProgressProc(seqID: ImageSequence; var progressProc: ICMProgressProcRecord): OSErr; external name '_SetSequenceProgressProc';
+{
+ * GDHasScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GDHasScale(gdh: GDHandle; depth: SInt16; var scale: Fixed): OSErr; external name '_GDHasScale';
+{
+ * GDGetScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GDGetScale(gdh: GDHandle; var scale: Fixed; var flags: SInt16): OSErr; external name '_GDGetScale';
+{
+ * GDSetScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GDSetScale(gdh: GDHandle; scale: Fixed; flags: SInt16): OSErr; external name '_GDSetScale';
+{
+ * ICMShieldSequenceCursor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ICMShieldSequenceCursor(seqID: ImageSequence): OSErr; external name '_ICMShieldSequenceCursor';
+{
+ * ICMDecompressComplete()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure ICMDecompressComplete(seqID: ImageSequence; err: OSErr; flag: SInt16; completionRtn: ICMCompletionProcRecordPtr); external name '_ICMDecompressComplete';
+{
+ * ICMDecompressCompleteS()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ICMDecompressCompleteS(seqID: ImageSequence; err: OSErr; flag: SInt16; completionRtn: ICMCompletionProcRecordPtr): OSErr; external name '_ICMDecompressCompleteS';
+{
+ * ICMSequenceLockBits()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ICMSequenceLockBits(seqID: ImageSequence; dst: PixMapPtr; flags: SInt32): OSErr; external name '_ICMSequenceLockBits';
+{
+ * ICMSequenceUnlockBits()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ICMSequenceUnlockBits(seqID: ImageSequence; flags: SInt32): OSErr; external name '_ICMSequenceUnlockBits';
+const
+ kICMPixelFormatIsPlanarMask = $0F; { these bits in formatFlags indicate how many planes there are; they're 0 if chunky }
+ kICMPixelFormatIsIndexed = $00000010;
+ kICMPixelFormatIsSupportedByQD = $00000020;
+ kICMPixelFormatIsMonochrome = $00000040;
+ kICMPixelFormatHasAlphaChannel = $00000080;
+
+
+type
+ ICMPixelFormatInfoPtr = ^ICMPixelFormatInfo;
+ ICMPixelFormatInfo = record
+ size: SInt32; { caller MUST fill this in with sizeof(ICMPixelFormatInfo) before calling ICMGet/SetPixelFormatInfo }
+ formatFlags: UInt32;
+ bitsPerPixel: array [0..13] of SInt16; { list each plane's bits per pixel separately if planar }
+ { new field for QuickTime 4.1 }
+ defaultGammaLevel: Fixed;
+ { new fields for QuickTime 6.0 }
+ horizontalSubsampling: array [0..13] of SInt16; { per plane; use 1 if plane is not subsampled }
+ verticalSubsampling: array [0..13] of SInt16; { per plane; use 1 if plane is not subsampled }
+ end;
+
+ { IMPORTANT: Fill in theInfo->size with sizeof(ICMPixelFormatInfo) before calling ICMGetPixelFormatInfo }
+ {
+ * ICMGetPixelFormatInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ICMGetPixelFormatInfo(PixelFormat: OSType; theInfo: ICMPixelFormatInfoPtr): OSErr; external name '_ICMGetPixelFormatInfo';
+{ IMPORTANT: Fill in theInfo->size with sizeof(ICMPixelFormatInfo) before calling ICMSetPixelFormatInfo }
+{
+ * ICMSetPixelFormatInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ICMSetPixelFormatInfo(PixelFormat: OSType; theInfo: ICMPixelFormatInfoPtr): OSErr; external name '_ICMSetPixelFormatInfo';
+const
+ kICMGetChainUltimateParent = 0;
+ kICMGetChainParent = 1;
+ kICMGetChainChild = 2;
+ kICMGetChainUltimateChild = 3;
+
+ {
+ * ICMSequenceGetChainMember()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ICMSequenceGetChainMember(seqID: ImageSequence; var retSeqID: ImageSequence; flags: SInt32): OSErr; external name '_ICMSequenceGetChainMember';
+{
+ * SetDSequenceTimeCode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetDSequenceTimeCode(seqID: ImageSequence; timeCodeFormat: UnivPtr; timeCodeTime: UnivPtr): OSErr; external name '_SetDSequenceTimeCode';
+{
+ * CDSequenceNewMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CDSequenceNewMemory(seqID: ImageSequence; var data: Ptr; dataSize: Size; dataUse: SInt32; memoryGoneProc: ICMMemoryDisposedUPP; refCon: UnivPtr): OSErr; external name '_CDSequenceNewMemory';
+{
+ * CDSequenceDisposeMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CDSequenceDisposeMemory(seqID: ImageSequence; data: Ptr): OSErr; external name '_CDSequenceDisposeMemory';
+{
+ * CDSequenceNewDataSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CDSequenceNewDataSource(seqID: ImageSequence; var sourceID: ImageSequenceDataSource; sourceType: OSType; sourceInputNumber: SInt32; dataDescription: Handle; transferProc: ICMConvertDataFormatUPP; refCon: UnivPtr): OSErr; external name '_CDSequenceNewDataSource';
+{
+ * CDSequenceDisposeDataSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CDSequenceDisposeDataSource(sourceID: ImageSequenceDataSource): OSErr; external name '_CDSequenceDisposeDataSource';
+{
+ * CDSequenceSetSourceData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CDSequenceSetSourceData(sourceID: ImageSequenceDataSource; data: UnivPtr; dataSize: SInt32): OSErr; external name '_CDSequenceSetSourceData';
+{
+ * CDSequenceChangedSourceData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CDSequenceChangedSourceData(sourceID: ImageSequenceDataSource): OSErr; external name '_CDSequenceChangedSourceData';
+{
+ * CDSequenceSetSourceDataQueue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CDSequenceSetSourceDataQueue(sourceID: ImageSequenceDataSource; dataQueue: QHdrPtr): OSErr; external name '_CDSequenceSetSourceDataQueue';
+{
+ * CDSequenceGetDataSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CDSequenceGetDataSource(seqID: ImageSequence; var sourceID: ImageSequenceDataSource; sourceType: OSType; sourceInputNumber: SInt32): OSErr; external name '_CDSequenceGetDataSource';
+{
+ * PtInDSequenceData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function PtInDSequenceData(seqID: ImageSequence; data: UnivPtr; dataSize: Size; where: Point; var hit: boolean): OSErr; external name '_PtInDSequenceData';
+{
+ * HitTestDSequenceData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function HitTestDSequenceData(seqID: ImageSequence; data: UnivPtr; dataSize: Size; where: Point; var hit: SInt32; hitFlags: SInt32): OSErr; external name '_HitTestDSequenceData';
+{
+ * GetGraphicsImporterForFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetGraphicsImporterForFile(const (*var*) theFile: FSSpec; var gi: ComponentInstance): OSErr; external name '_GetGraphicsImporterForFile';
+{
+ * GetGraphicsImporterForDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetGraphicsImporterForDataRef(dataRef: Handle; dataRefType: OSType; var gi: ComponentInstance): OSErr; external name '_GetGraphicsImporterForDataRef';
+const
+ kDontUseValidateToFindGraphicsImporter = $00000001;
+
+ {
+ * GetGraphicsImporterForFileWithFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetGraphicsImporterForFileWithFlags(const (*var*) theFile: FSSpec; var gi: ComponentInstance; flags: SInt32): OSErr; external name '_GetGraphicsImporterForFileWithFlags';
+{
+ * GetGraphicsImporterForDataRefWithFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetGraphicsImporterForDataRefWithFlags(dataRef: Handle; dataRefType: OSType; var gi: ComponentInstance; flags: SInt32): OSErr; external name '_GetGraphicsImporterForDataRefWithFlags';
+{
+ * QTGetFileNameExtension()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTGetFileNameExtension(const (*var*) fileName: StrFileName; fileType: OSType; var extension: OSType): OSErr; external name '_QTGetFileNameExtension';
+{
+ * ImageTranscodeSequenceBegin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageTranscodeSequenceBegin(var its: ImageTranscodeSequence; srcDesc: ImageDescriptionHandle; destType: OSType; var dstDesc: ImageDescriptionHandle; data: UnivPtr; dataSize: SInt32): OSErr; external name '_ImageTranscodeSequenceBegin';
+{
+ * ImageTranscodeSequenceEnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageTranscodeSequenceEnd(its: ImageTranscodeSequence): OSErr; external name '_ImageTranscodeSequenceEnd';
+{
+ * ImageTranscodeFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageTranscodeFrame(its: ImageTranscodeSequence; srcData: UnivPtr; srcDataSize: SInt32; var dstData: UnivPtr; var dstDataSize: SInt32): OSErr; external name '_ImageTranscodeFrame';
+{
+ * ImageTranscodeDisposeFrameData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageTranscodeDisposeFrameData(its: ImageTranscodeSequence; dstData: UnivPtr): OSErr; external name '_ImageTranscodeDisposeFrameData';
+{
+ * CDSequenceInvalidate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CDSequenceInvalidate(seqID: ImageSequence; invalRgn: RgnHandle): OSErr; external name '_CDSequenceInvalidate';
+{
+ * CDSequenceSetTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CDSequenceSetTimeBase(seqID: ImageSequence; base: UnivPtr): OSErr; external name '_CDSequenceSetTimeBase';
+{
+ * ImageFieldSequenceBegin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageFieldSequenceBegin(var ifs: ImageFieldSequence; desc1: ImageDescriptionHandle; desc2: ImageDescriptionHandle; descOut: ImageDescriptionHandle): OSErr; external name '_ImageFieldSequenceBegin';
+{
+ * ImageFieldSequenceExtractCombine()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageFieldSequenceExtractCombine(ifs: ImageFieldSequence; fieldFlags: SInt32; data1: UnivPtr; dataSize1: SInt32; data2: UnivPtr; dataSize2: SInt32; outputData: UnivPtr; var outDataSize: SInt32): OSErr; external name '_ImageFieldSequenceExtractCombine';
+{
+ * ImageFieldSequenceEnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageFieldSequenceEnd(ifs: ImageFieldSequence): OSErr; external name '_ImageFieldSequenceEnd';
+const
+ kICMTempThenAppMemory = $00001000;
+ kICMAppThenTempMemory = $00002000;
+
+ {
+ * QTNewGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTNewGWorld(var offscreenGWorld: GWorldPtr; PixelFormat: OSType; const (*var*) boundsRect: Rect; cTable: CTabHandle; aGDevice: GDHandle; flags: GWorldFlags): OSErr; external name '_QTNewGWorld';
+{
+ * QTNewGWorldFromPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function QTNewGWorldFromPtr(var gw: GWorldPtr; pixelFormat: OSType; const (*var*) boundsRect: Rect; cTable: CTabHandle; aGDevice: GDHandle; flags: GWorldFlags; baseAddr: UnivPtr; rowBytes: SInt32): OSErr; external name '_QTNewGWorldFromPtr';
+{
+ * QTUpdateGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTUpdateGWorld(var offscreenGWorld: GWorldPtr; PixelFormat: OSType; const (*var*) boundsRect: Rect; cTable: CTabHandle; aGDevice: GDHandle; flags: GWorldFlags): GWorldFlags; external name '_QTUpdateGWorld';
+{
+ * MakeImageDescriptionForPixMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MakeImageDescriptionForPixMap(pixmap: PixMapHandle; var idh: ImageDescriptionHandle): OSErr; external name '_MakeImageDescriptionForPixMap';
+{
+ * MakeImageDescriptionForEffect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MakeImageDescriptionForEffect(effectType: OSType; var idh: ImageDescriptionHandle): OSErr; external name '_MakeImageDescriptionForEffect';
+{
+ * QTGetPixelSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTGetPixelSize(PixelFormat: OSType): SInt16; external name '_QTGetPixelSize';
+{
+ * QTGetPixelFormatDepthForImageDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTGetPixelFormatDepthForImageDescription(PixelFormat: OSType): SInt16; external name '_QTGetPixelFormatDepthForImageDescription';
+{
+ * QTGetPixMapPtrRowBytes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function QTGetPixMapPtrRowBytes(pm: PixMapPtr): SInt32; external name '_QTGetPixMapPtrRowBytes';
+{
+ * QTGetPixMapHandleRowBytes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function QTGetPixMapHandleRowBytes(pm: PixMapHandle): SInt32; external name '_QTGetPixMapHandleRowBytes';
+{
+ * QTSetPixMapPtrRowBytes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function QTSetPixMapPtrRowBytes(pm: PixMapPtr; rowBytes: SInt32): OSErr; external name '_QTSetPixMapPtrRowBytes';
+{
+ * QTSetPixMapHandleRowBytes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function QTSetPixMapHandleRowBytes(pm: PixMapHandle; rowBytes: SInt32): OSErr; external name '_QTSetPixMapHandleRowBytes';
+const
+ kQTUsePlatformDefaultGammaLevel = 0; { When decompressing into this PixMap, gamma-correct to the platform's standard gamma. }
+ kQTUseSourceGammaLevel = -1; { When decompressing into this PixMap, don't perform gamma-correction. }
+ kQTCCIR601VideoGammaLevel = $00023333; { 2.2, standard television video gamma. }
+
+ {
+ * QTGetPixMapPtrGammaLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function QTGetPixMapPtrGammaLevel(pm: PixMapPtr): Fixed; external name '_QTGetPixMapPtrGammaLevel';
+{
+ * QTSetPixMapPtrGammaLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function QTSetPixMapPtrGammaLevel(pm: PixMapPtr; gammaLevel: Fixed): OSErr; external name '_QTSetPixMapPtrGammaLevel';
+{
+ * QTGetPixMapHandleGammaLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function QTGetPixMapHandleGammaLevel(pm: PixMapHandle): Fixed; external name '_QTGetPixMapHandleGammaLevel';
+{
+ * QTSetPixMapHandleGammaLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function QTSetPixMapHandleGammaLevel(pm: PixMapHandle; gammaLevel: Fixed): OSErr; external name '_QTSetPixMapHandleGammaLevel';
+{
+ * QTGetPixMapPtrRequestedGammaLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function QTGetPixMapPtrRequestedGammaLevel(pm: PixMapPtr): Fixed; external name '_QTGetPixMapPtrRequestedGammaLevel';
+{
+ * QTSetPixMapPtrRequestedGammaLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function QTSetPixMapPtrRequestedGammaLevel(pm: PixMapPtr; requestedGammaLevel: Fixed): OSErr; external name '_QTSetPixMapPtrRequestedGammaLevel';
+{
+ * QTGetPixMapHandleRequestedGammaLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function QTGetPixMapHandleRequestedGammaLevel(pm: PixMapHandle): Fixed; external name '_QTGetPixMapHandleRequestedGammaLevel';
+{
+ * QTSetPixMapHandleRequestedGammaLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function QTSetPixMapHandleRequestedGammaLevel(pm: PixMapHandle; requestedGammaLevel: Fixed): OSErr; external name '_QTSetPixMapHandleRequestedGammaLevel';
+{
+ * QuadToQuadMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+ {
+QA 1227: This call takes four initial points (FixedPoint), four final points (FixedPoint), and defines a matrix that will map between them.
+ }
+type
+ FixedPoint4 = array[0..3] of FixedPoint;
+function QuadToQuadMatrix(const (*var*) source: FixedPoint4; const (*var*) dest: FixedPoint4; var map: MatrixRecord): OSErr; external name '_QuadToQuadMatrix';
+const
+ identityMatrixType = $00; { result if matrix is identity }
+ translateMatrixType = $01; { result if matrix translates }
+ scaleMatrixType = $02; { result if matrix scales }
+ scaleTranslateMatrixType = $03; { result if matrix scales and translates }
+ linearMatrixType = $04; { result if matrix is general 2 x 2 }
+ linearTranslateMatrixType = $05; { result if matrix is general 2 x 2 and translates }
+ perspectiveMatrixType = $06; { result if matrix is general 3 x 3 }
+
+
+type
+ MatrixFlags = UInt16;
+ {
+ * GetMatrixType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMatrixType(const (*var*) m: MatrixRecord): SInt16; external name '_GetMatrixType';
+{
+ * CopyMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure CopyMatrix(const (*var*) m1: MatrixRecord; var m2: MatrixRecord); external name '_CopyMatrix';
+{
+ * EqualMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function EqualMatrix(const (*var*) m1: MatrixRecord; const (*var*) m2: MatrixRecord): boolean; external name '_EqualMatrix';
+{
+ * SetIdentityMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetIdentityMatrix(var matrix: MatrixRecord); external name '_SetIdentityMatrix';
+{
+ * TranslateMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure TranslateMatrix(var m: MatrixRecord; deltaH: Fixed; deltaV: Fixed); external name '_TranslateMatrix';
+{
+ * RotateMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure RotateMatrix(var m: MatrixRecord; degrees: Fixed; aboutX: Fixed; aboutY: Fixed); external name '_RotateMatrix';
+{
+ * ScaleMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure ScaleMatrix(var m: MatrixRecord; scaleX: Fixed; scaleY: Fixed; aboutX: Fixed; aboutY: Fixed); external name '_ScaleMatrix';
+{
+ * SkewMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SkewMatrix(var m: MatrixRecord; skewX: Fixed; skewY: Fixed; aboutX: Fixed; aboutY: Fixed); external name '_SkewMatrix';
+{
+ * TransformFixedPoints()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TransformFixedPoints(const (*var*) m: MatrixRecord; var fpt: FixedPoint; count: SInt32): OSErr; external name '_TransformFixedPoints';
+{
+ * TransformPoints()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TransformPoints(const (*var*) mp: MatrixRecord; var pt1: Point; count: SInt32): OSErr; external name '_TransformPoints';
+{
+ * TransformFixedRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TransformFixedRect(const (*var*) m: MatrixRecord; var fr: FixedRect; var fpp: FixedPoint): boolean; external name '_TransformFixedRect';
+{
+ * TransformRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TransformRect(const (*var*) m: MatrixRecord; var r: Rect; var fpp: FixedPoint): boolean; external name '_TransformRect';
+{
+ * InverseMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function InverseMatrix(const (*var*) m: MatrixRecord; var im: MatrixRecord): boolean; external name '_InverseMatrix';
+{
+ * ConcatMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure ConcatMatrix(const (*var*) a: MatrixRecord; var b: MatrixRecord); external name '_ConcatMatrix';
+{
+ * RectMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure RectMatrix(var matrix: MatrixRecord; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect); external name '_RectMatrix';
+{
+ * MapMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure MapMatrix(var matrix: MatrixRecord; const (*var*) fromRect: Rect; const (*var*) toRect: Rect); external name '_MapMatrix';
+{
+ * CompAdd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure CompAdd(var src: wide; var dst: wide); external name '_CompAdd';
+{
+ * CompSub()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure CompSub(var src: wide; var dst: wide); external name '_CompSub';
+{
+ * CompNeg()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure CompNeg(var dst: wide); external name '_CompNeg';
+{
+ * CompShift()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure CompShift(var src: wide; shift: SInt16); external name '_CompShift';
+{
+ * CompMul()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure CompMul(src1: SInt32; src2: SInt32; var dst: wide); external name '_CompMul';
+{
+ * CompDiv()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CompDiv(var numerator: wide; denominator: SInt32; var remainder: SInt32): SInt32; external name '_CompDiv';
+{
+ * CompFixMul()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure CompFixMul(var compSrc: wide; fixSrc: Fixed; var compDst: wide); external name '_CompFixMul';
+{
+ * CompMulDiv()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure CompMulDiv(var co: wide; mul: SInt32; divisor: SInt32); external name '_CompMulDiv';
+{
+ * CompMulDivTrunc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure CompMulDivTrunc(var co: wide; mul: SInt32; divisor: SInt32; var remainder: SInt32); external name '_CompMulDivTrunc';
+{
+ * CompCompare()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CompCompare(const (*var*) a: wide; const (*var*) minusb: wide): SInt32; external name '_CompCompare';
+{
+ * CompSquareRoot()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CompSquareRoot(const (*var*) src: wide): UInt32; external name '_CompSquareRoot';
+{
+ * FixMulDiv()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function FixMulDiv(src: Fixed; mul: Fixed; divisor: Fixed): Fixed; external name '_FixMulDiv';
+{
+ * UnsignedFixMulDiv()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function UnsignedFixMulDiv(src: Fixed; mul: Fixed; divisor: Fixed): Fixed; external name '_UnsignedFixMulDiv';
+{
+ * FracSinCos()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function FracSinCos(degree: Fixed; var cosOut: Fract): Fract; external name '_FracSinCos';
+{
+ * FixExp2()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function FixExp2(src: Fixed): Fixed; external name '_FixExp2';
+{
+ * FixLog2()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function FixLog2(src: Fixed): Fixed; external name '_FixLog2';
+{
+ * FixPow()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function FixPow(base: Fixed; exp: Fixed): Fixed; external name '_FixPow';
+type
+ GraphicsImportComponent = ComponentInstance;
+
+const
+ GraphicsImporterComponentType = $67726970 (* 'grip' *);
+
+ graphicsImporterUsesImageDecompressor = $00800000;
+
+ quickTimeImageFileImageDescriptionAtom = $69647363 (* 'idsc' *);
+ quickTimeImageFileImageDataAtom = $69646174 (* 'idat' *);
+ quickTimeImageFileMetaDataAtom = $6D657461 (* 'meta' *);
+ quickTimeImageFileColorSyncProfileAtom = $69696363 (* 'iicc' *);
+
+ graphicsImporterDrawsAllPixels = 0;
+ graphicsImporterDoesntDrawAllPixels = 1;
+ graphicsImporterDontKnowIfDrawAllPixels = 2;
+
+ { Flags for GraphicsImportSetFlags }
+ kGraphicsImporterDontDoGammaCorrection = $00000001;
+ kGraphicsImporterTrustResolutionFromFile = $00000002;
+ kGraphicsImporterEnableSubPixelPositioning = $00000004;
+
+ kGraphicsExportGroup = $6578706F (* 'expo' *);
+ kGraphicsExportFileType = $66747970 (* 'ftyp' *);
+ kGraphicsExportMIMEType = $6D696D65 (* 'mime' *);
+ kGraphicsExportExtension = $65787420 (* 'ext ' *);
+ kGraphicsExportDescription = $64657363 (* 'desc' *);
+
+ { User data types for layers of Photoshop files }
+ kQTPhotoshopLayerMode = $6C6D6F64 (* 'lmod' *); { OSType }
+ kQTPhotoshopLayerOpacity = $6C6F7061 (* 'lopa' *); { UInt8, 0 = transparent .. 255 = opaque }
+ kQTPhotoshopLayerClipping = $6C636C70 (* 'lclp' *); { UInt8, 0 = base, 1 = non-base }
+ kQTPhotoshopLayerFlags = $6C666C67 (* 'lflg' *); { UInt8 }
+ kQTPhotoshopLayerName = $C2A96C6E (* '©lnm' *); { Text }
+ kQTPhotoshopLayerUnicodeName = $6C756E69 (* 'luni' *); { Unicode characters, not terminated }
+
+ { User data returned by graphics importers to suggest intended use for indexed images }
+ kQTIndexedImageType = $6E74683F (* 'nth?' *); { 1 or more OSTypes, such as the following values: }
+ kQTIndexedImageIsThumbnail = $6E3D7468 (* 'n=th' *); { The image at this index is a thumbnail. }
+ kQTIndexedImageIsLayer = $6E3D6C79 (* 'n=ly' *); { The image at this index is a layer. }
+ kQTIndexedImageIsPage = $6E3D7067 (* 'n=pg' *); { The image at this index is a page. }
+ kQTIndexedImageIsMultiResolution = $6E3D7273 (* 'n=rs' *); { The image at this index is one of several identical images at different resolutions. }
+
+ { Other user data types returned by graphics importers }
+ kQTTIFFUserDataPrefix = $74690000; { Added to some tag values in TIFF IFDs to generate user data codes. (0x7469 is 'ti'.) }
+ { For example, YCbCrPositioning is tag 0x0213, so its user data code is 0x74690213. }
+ kQTTIFFExifUserDataPrefix = $65780000; { Added to tag values in Exif IFDs to generate user data codes. (0x6578 is 'ex'.) }
+ { For example, DateTimeOriginal is tag 0x9003, so its user data code is 0x65789003. }
+ kQTTIFFExifGPSUserDataPrefix = $67700000; { Added to tag values in Exif GPS IFDs to generate user data codes. (0x6770 is 'gp'.) }
+ { For example, GPSAltitude is tag 0x0006, so its user data code is 0x6770006. }
+ kQTAlphaMode = $616C6D6F (* 'almo' *); { UInt32; eg, graphicsModeStraightAlpha or graphicsModePreBlackAlpha }
+ kQTAlphaModePreMulColor = $616C6D70 (* 'almp' *); { RGBColor; used if kQTAlphaMode is graphicsModePreMulColorAlpha }
+ kUserDataIPTC = $69707463 (* 'iptc' *);
+
+ { Found in TIFF and Exif JPEG files }
+ kQTTIFFUserDataOrientation = $74690112; { 1 SHORT }
+ kQTTIFFUserDataTransferFunction = $7469012D; { n SHORTs }
+ kQTTIFFUserDataWhitePoint = $7469013E; { 2 RATIONALs }
+ kQTTIFFUserDataPrimaryChromaticities = $7469013F; { 6 RATIONALs }
+ kQTTIFFUserDataTransferRange = $74690156; { 6 SHORTs }
+ kQTTIFFUserDataYCbCrPositioning = $74690213; { 1 SHORT }
+ kQTTIFFUserDataReferenceBlackWhite = $74690214; { n LONGs }
+
+ { Found in GeoTIFF files; defined in the GeoTIFF 1.0 spec }
+ kQTTIFFUserDataModelPixelScale = $7469830E; { 3 DOUBLEs }
+ kQTTIFFUserDataModelTransformation = $746985D8; { 16 DOUBLEs }
+ kQTTIFFUserDataModelTiepoint = $74698482; { n DOUBLEs }
+ kQTTIFFUserDataGeoKeyDirectory = $746987AF; { n SHORTs }
+ kQTTIFFUserDataGeoDoubleParams = $746987B0; { n DOUBLEs }
+ kQTTIFFUserDataGeoAsciiParams = $746987B1; { n ASCIIs }
+ kQTTIFFUserDataIntergraphMatrix = $74698480; { 16 or 17 DOUBLEs }
+
+ { Found in Exif TIFF and Exif JPEG files; defined in the Exif 2.1 spec }
+ kQTExifUserDataExifVersion = $65789000; { 4 bytes (import only) }
+ kQTExifUserDataFlashPixVersion = $6578A000; { 4 bytes }
+ kQTExifUserDataColorSpace = $6578A001; { 1 SHORT }
+ kQTExifUserDataComponentsConfiguration = $65789101; { 4 bytes }
+ kQTExifUserDataCompressedBitsPerPixel = $65789102; { 1 RATIONAL }
+ kQTExifUserDataPixelXDimension = $6578A002; { 1 SHORT or LONG }
+ kQTExifUserDataPixelYDimension = $6578A003; { 1 SHORT or LONG }
+ kQTExifUserDataMakerNote = $6578927C; { n bytes }
+ kQTExifUserDataUserComment = $6578928C; { n bytes }
+ kQTExifUserDataRelatedSoundFile = $6578A004; { 13 ASCIIs }
+ kQTExifUserDataDateTimeOriginal = $65789003; { 20 ASCIIs }
+ kQTExifUserDataDateTimeDigitized = $65789004; { 20 ASCIIs }
+ kQTExifUserDataSubSecTime = $65789290; { n ASCIIs }
+ kQTExifUserDataSubSecTimeOriginal = $65789291; { n ASCIIs }
+ kQTExifUserDataSubSecTimeDigitized = $65789292; { n ASCIIs }
+ kQTExifUserDataExposureTime = $6578829A; { 1 RATIONAL }
+ kQTExifUserDataFNumber = $6578829D; { 1 RATIONAL }
+ kQTExifUserDataExposureProgram = $65788822; { 1 SHORT }
+ kQTExifUserDataSpectralSensitivity = $65788824; { n ASCIIs }
+ kQTExifUserDataISOSpeedRatings = $65788827; { n SHORTs }
+ kQTExifUserDataShutterSpeedValue = $65789201; { 1 SIGNED RATIONAL }
+ kQTExifUserDataApertureValue = $65789202; { 1 RATIONAL }
+ kQTExifUserDataBrightnessValue = $65789203; { 1 SIGNED RATIONAL }
+ kQTExifUserDataExposureBiasValue = $65789204; { 1 SIGNED RATIONAL }
+ kQTExifUserDataMaxApertureValue = $65789205; { 1 RATIONAL }
+ kQTExifUserDataSubjectDistance = $65789206; { 1 RATIONAL }
+ kQTExifUserDataMeteringMode = $65789207; { 1 SHORT }
+ kQTExifUserDataLightSource = $65789208; { 1 SHORT }
+ kQTExifUserDataFlash = $65789209; { 1 SHORT }
+ kQTExifUserDataFocalLength = $6578920A; { 1 RATIONAL }
+ kQTExifUserDataFlashEnergy = $6578A20B; { 1 RATIONAL }
+ kQTExifUserDataFocalPlaneXResolution = $6578A20E; { 1 RATIONAL }
+ kQTExifUserDataFocalPlaneYResolution = $6578A20F; { 1 RATIONAL }
+ kQTExifUserDataFocalPlaneResolutionUnit = $6578A210; { 1 SHORT }
+ kQTExifUserDataSubjectLocation = $6578A214; { 1 SHORT }
+ kQTExifUserDataExposureIndex = $6578A215; { 1 RATIONAL }
+ kQTExifUserDataSensingMethod = $6578A217; { 1 SHORT }
+ kQTExifUserDataFileSource = $6578A300; { 1 UNDEFINED }
+ kQTExifUserDataSceneType = $6578A301; { 1 UNDEFINED }
+
+ { Found in some Exif TIFF and Exif JPEG files; defined in the Exif 2.1 spec }
+ kQTExifUserDataGPSVersionID = $06770000; { 4 BYTEs }
+ kQTExifUserDataGPSLatitudeRef = $06770001; { 2 ASCIIs }
+ kQTExifUserDataGPSLatitude = $06770002; { 3 RATIONALs }
+ kQTExifUserDataGPSLongitudeRef = $06770003; { 2 ASCIIs }
+ kQTExifUserDataGPSLongitude = $06770004; { 3 RATIONALs }
+ kQTExifUserDataGPSAltitudeRef = $06770005; { 1 BYTE }
+ kQTExifUserDataGPSAltitude = $06770006; { 1 RATIONAL }
+ kQTExifUserDataGPSTimeStamp = $06770007; { 3 RATIONALs }
+ kQTExifUserDataGPSSatellites = $06770008; { n ASCIIs }
+ kQTExifUserDataGPSStatus = $06770009; { 2 ASCIIs }
+ kQTExifUserDataGPSMeasureMode = $0677000A; { 2 ASCIIs }
+ kQTExifUserDataGPSDOP = $0677000B; { 1 RATIONAL }
+ kQTExifUserDataGPSSpeedRef = $0677000C; { 2 ASCIIs }
+ kQTExifUserDataGPSSpeed = $0677000D; { 1 RATIONAL }
+ kQTExifUserDataGPSTrackRef = $0677000E; { 2 ASCIIs }
+ kQTExifUserDataGPSTrack = $0677000F; { 1 RATIONAL }
+ kQTExifUserDataGPSImgDirectionRef = $06770010; { 2 ASCIIs }
+ kQTExifUserDataGPSImgDirection = $06770011; { 1 RATIONAL }
+ kQTExifUserDataGPSMapDatum = $06770012; { n ASCII }
+ kQTExifUserDataGPSDestLatitudeRef = $06770013; { 2 ASCIIs }
+ kQTExifUserDataGPSDestLatitude = $06770014; { 3 RATIONALs }
+ kQTExifUserDataGPSDestLongitudeRef = $06770015; { 2 ASCIIs }
+ kQTExifUserDataGPSDestLongitude = $06770016; { 3 RATIONALs }
+ kQTExifUserDataGPSDestBearingRef = $06770017; { 2 ASCIIs }
+ kQTExifUserDataGPSDestBearing = $06770018; { 1 RATIONAL }
+ kQTExifUserDataGPSDestDistanceRef = $06770019; { 2 ASCIIs }
+ kQTExifUserDataGPSDestDistance = $0677001A; { 1 RATIONAL }
+
+
+ { * These are GraphicsImport procedures * }
+ {
+ * GraphicsImportSetDataReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportSetDataReference(ci: GraphicsImportComponent; dataRef: Handle; dataReType: OSType): ComponentResult; external name '_GraphicsImportSetDataReference';
+{
+ * GraphicsImportGetDataReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetDataReference(ci: GraphicsImportComponent; var dataRef: Handle; var dataReType: OSType): ComponentResult; external name '_GraphicsImportGetDataReference';
+{
+ * GraphicsImportSetDataFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportSetDataFile(ci: GraphicsImportComponent; const (*var*) theFile: FSSpec): ComponentResult; external name '_GraphicsImportSetDataFile';
+{
+ * GraphicsImportGetDataFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetDataFile(ci: GraphicsImportComponent; var theFile: FSSpec): ComponentResult; external name '_GraphicsImportGetDataFile';
+{
+ * GraphicsImportSetDataHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportSetDataHandle(ci: GraphicsImportComponent; h: Handle): ComponentResult; external name '_GraphicsImportSetDataHandle';
+{
+ * GraphicsImportGetDataHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetDataHandle(ci: GraphicsImportComponent; var h: Handle): ComponentResult; external name '_GraphicsImportGetDataHandle';
+{
+ * GraphicsImportGetImageDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetImageDescription(ci: GraphicsImportComponent; var desc: ImageDescriptionHandle): ComponentResult; external name '_GraphicsImportGetImageDescription';
+{
+ * GraphicsImportGetDataOffsetAndSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetDataOffsetAndSize(ci: GraphicsImportComponent; var offset: UInt32; var size: UInt32): ComponentResult; external name '_GraphicsImportGetDataOffsetAndSize';
+{
+ * GraphicsImportReadData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportReadData(ci: GraphicsImportComponent; dataPtr: UnivPtr; dataOffset: UInt32; dataSize: UInt32): ComponentResult; external name '_GraphicsImportReadData';
+{
+ * GraphicsImportSetClip()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportSetClip(ci: GraphicsImportComponent; clipRgn: RgnHandle): ComponentResult; external name '_GraphicsImportSetClip';
+{
+ * GraphicsImportGetClip()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetClip(ci: GraphicsImportComponent; var clipRgn: RgnHandle): ComponentResult; external name '_GraphicsImportGetClip';
+{
+ * GraphicsImportSetSourceRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportSetSourceRect(ci: GraphicsImportComponent; const (*var*) sourceRect: Rect): ComponentResult; external name '_GraphicsImportSetSourceRect';
+{
+ * GraphicsImportGetSourceRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetSourceRect(ci: GraphicsImportComponent; var sourceRect: Rect): ComponentResult; external name '_GraphicsImportGetSourceRect';
+{
+ * GraphicsImportGetNaturalBounds()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetNaturalBounds(ci: GraphicsImportComponent; var naturalBounds: Rect): ComponentResult; external name '_GraphicsImportGetNaturalBounds';
+{
+ * GraphicsImportDraw()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportDraw(ci: GraphicsImportComponent): ComponentResult; external name '_GraphicsImportDraw';
+{
+ * GraphicsImportSetGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportSetGWorld(ci: GraphicsImportComponent; port: CGrafPtr; gd: GDHandle): ComponentResult; external name '_GraphicsImportSetGWorld';
+{
+ * GraphicsImportGetGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetGWorld(ci: GraphicsImportComponent; var port: CGrafPtr; var gd: GDHandle): ComponentResult; external name '_GraphicsImportGetGWorld';
+{
+ * GraphicsImportSetMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportSetMatrix(ci: GraphicsImportComponent; const (*var*) matrix: MatrixRecord): ComponentResult; external name '_GraphicsImportSetMatrix';
+{
+ * GraphicsImportGetMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetMatrix(ci: GraphicsImportComponent; var matrix: MatrixRecord): ComponentResult; external name '_GraphicsImportGetMatrix';
+{
+ * GraphicsImportSetBoundsRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportSetBoundsRect(ci: GraphicsImportComponent; const (*var*) bounds: Rect): ComponentResult; external name '_GraphicsImportSetBoundsRect';
+{
+ * GraphicsImportGetBoundsRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetBoundsRect(ci: GraphicsImportComponent; var bounds: Rect): ComponentResult; external name '_GraphicsImportGetBoundsRect';
+{
+ * GraphicsImportSaveAsPicture()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportSaveAsPicture(ci: GraphicsImportComponent; const (*var*) fss: FSSpec; scriptTag: ScriptCode): ComponentResult; external name '_GraphicsImportSaveAsPicture';
+{
+ * GraphicsImportSetGraphicsMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportSetGraphicsMode(ci: GraphicsImportComponent; graphicsMode: SInt32; const (*var*) opColor: RGBColor): ComponentResult; external name '_GraphicsImportSetGraphicsMode';
+{
+ * GraphicsImportGetGraphicsMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetGraphicsMode(ci: GraphicsImportComponent; var graphicsMode: SInt32; var opColor: RGBColor): ComponentResult; external name '_GraphicsImportGetGraphicsMode';
+{
+ * GraphicsImportSetQuality()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportSetQuality(ci: GraphicsImportComponent; quality: CodecQ): ComponentResult; external name '_GraphicsImportSetQuality';
+{
+ * GraphicsImportGetQuality()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetQuality(ci: GraphicsImportComponent; var quality: CodecQ): ComponentResult; external name '_GraphicsImportGetQuality';
+{
+ * GraphicsImportSaveAsQuickTimeImageFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportSaveAsQuickTimeImageFile(ci: GraphicsImportComponent; const (*var*) fss: FSSpec; scriptTag: ScriptCode): ComponentResult; external name '_GraphicsImportSaveAsQuickTimeImageFile';
+{
+ * GraphicsImportSetDataReferenceOffsetAndLimit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportSetDataReferenceOffsetAndLimit(ci: GraphicsImportComponent; offset: UInt32; limit: UInt32): ComponentResult; external name '_GraphicsImportSetDataReferenceOffsetAndLimit';
+{
+ * GraphicsImportGetDataReferenceOffsetAndLimit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetDataReferenceOffsetAndLimit(ci: GraphicsImportComponent; var offset: UInt32; var limit: UInt32): ComponentResult; external name '_GraphicsImportGetDataReferenceOffsetAndLimit';
+{
+ * GraphicsImportGetAliasedDataReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetAliasedDataReference(ci: GraphicsImportComponent; var dataRef: Handle; var dataRefType: OSType): ComponentResult; external name '_GraphicsImportGetAliasedDataReference';
+{
+ * GraphicsImportValidate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportValidate(ci: GraphicsImportComponent; var valid: boolean): ComponentResult; external name '_GraphicsImportValidate';
+{
+ * GraphicsImportGetMetaData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetMetaData(ci: GraphicsImportComponent; userData: UnivPtr): ComponentResult; external name '_GraphicsImportGetMetaData';
+{
+ * GraphicsImportGetMIMETypeList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetMIMETypeList(ci: GraphicsImportComponent; qtAtomContainerPtr: UnivPtr): ComponentResult; external name '_GraphicsImportGetMIMETypeList';
+{
+ * GraphicsImportDoesDrawAllPixels()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportDoesDrawAllPixels(ci: GraphicsImportComponent; var drawsAllPixels: SInt16): ComponentResult; external name '_GraphicsImportDoesDrawAllPixels';
+{
+ * GraphicsImportGetAsPicture()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetAsPicture(ci: GraphicsImportComponent; var picture: PicHandle): ComponentResult; external name '_GraphicsImportGetAsPicture';
+{
+ * GraphicsImportExportImageFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportExportImageFile(ci: GraphicsImportComponent; fileType: OSType; fileCreator: OSType; const (*var*) fss: FSSpec; scriptTag: ScriptCode): ComponentResult; external name '_GraphicsImportExportImageFile';
+{
+ * GraphicsImportGetExportImageTypeList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetExportImageTypeList(ci: GraphicsImportComponent; qtAtomContainerPtr: UnivPtr): ComponentResult; external name '_GraphicsImportGetExportImageTypeList';
+{
+ * GraphicsImportDoExportImageFileDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportDoExportImageFileDialog(ci: GraphicsImportComponent; const (*var*) inDefaultSpec: FSSpec; prompt: StringPtr; filterProc: ModalFilterYDUPP; var outExportedType: OSType; var outExportedSpec: FSSpec; var outScriptTag: ScriptCode): ComponentResult; external name '_GraphicsImportDoExportImageFileDialog';
+{
+ * GraphicsImportGetExportSettingsAsAtomContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetExportSettingsAsAtomContainer(ci: GraphicsImportComponent; qtAtomContainerPtr: UnivPtr): ComponentResult; external name '_GraphicsImportGetExportSettingsAsAtomContainer';
+{
+ * GraphicsImportSetExportSettingsFromAtomContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportSetExportSettingsFromAtomContainer(ci: GraphicsImportComponent; qtAtomContainer: UnivPtr): ComponentResult; external name '_GraphicsImportSetExportSettingsFromAtomContainer';
+{
+ * GraphicsImportSetProgressProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportSetProgressProc(ci: GraphicsImportComponent; progressProc: ICMProgressProcRecordPtr): ComponentResult; external name '_GraphicsImportSetProgressProc';
+{
+ * GraphicsImportGetProgressProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImportGetProgressProc(ci: GraphicsImportComponent; progressProc: ICMProgressProcRecordPtr): ComponentResult; external name '_GraphicsImportGetProgressProc';
+{
+ * GraphicsImportGetImageCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportGetImageCount(ci: GraphicsImportComponent; var imageCount: UInt32): ComponentResult; external name '_GraphicsImportGetImageCount';
+{
+ * GraphicsImportSetImageIndex()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportSetImageIndex(ci: GraphicsImportComponent; imageIndex: UInt32): ComponentResult; external name '_GraphicsImportSetImageIndex';
+{
+ * GraphicsImportGetImageIndex()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportGetImageIndex(ci: GraphicsImportComponent; var imageIndex: UInt32): ComponentResult; external name '_GraphicsImportGetImageIndex';
+{
+ * GraphicsImportGetDataOffsetAndSize64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportGetDataOffsetAndSize64(ci: GraphicsImportComponent; var offset: wide; var size: wide): ComponentResult; external name '_GraphicsImportGetDataOffsetAndSize64';
+{
+ * GraphicsImportReadData64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportReadData64(ci: GraphicsImportComponent; dataPtr: UnivPtr; const (*var*) dataOffset: wide; dataSize: UInt32): ComponentResult; external name '_GraphicsImportReadData64';
+{
+ * GraphicsImportSetDataReferenceOffsetAndLimit64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportSetDataReferenceOffsetAndLimit64(ci: GraphicsImportComponent; const (*var*) offset: wide; const (*var*) limit: wide): ComponentResult; external name '_GraphicsImportSetDataReferenceOffsetAndLimit64';
+{
+ * GraphicsImportGetDataReferenceOffsetAndLimit64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportGetDataReferenceOffsetAndLimit64(ci: GraphicsImportComponent; var offset: wide; var limit: wide): ComponentResult; external name '_GraphicsImportGetDataReferenceOffsetAndLimit64';
+{
+ * GraphicsImportGetDefaultMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportGetDefaultMatrix(ci: GraphicsImportComponent; var defaultMatrix: MatrixRecord): ComponentResult; external name '_GraphicsImportGetDefaultMatrix';
+{
+ * GraphicsImportGetDefaultClip()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportGetDefaultClip(ci: GraphicsImportComponent; var defaultRgn: RgnHandle): ComponentResult; external name '_GraphicsImportGetDefaultClip';
+{
+ * GraphicsImportGetDefaultGraphicsMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportGetDefaultGraphicsMode(ci: GraphicsImportComponent; var defaultGraphicsMode: SInt32; var defaultOpColor: RGBColor): ComponentResult; external name '_GraphicsImportGetDefaultGraphicsMode';
+{
+ * GraphicsImportGetDefaultSourceRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportGetDefaultSourceRect(ci: GraphicsImportComponent; var defaultSourceRect: Rect): ComponentResult; external name '_GraphicsImportGetDefaultSourceRect';
+{
+ * GraphicsImportGetColorSyncProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportGetColorSyncProfile(ci: GraphicsImportComponent; var profile: Handle): ComponentResult; external name '_GraphicsImportGetColorSyncProfile';
+{
+ * GraphicsImportSetDestRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportSetDestRect(ci: GraphicsImportComponent; const (*var*) destRect: Rect): ComponentResult; external name '_GraphicsImportSetDestRect';
+{
+ * GraphicsImportGetDestRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportGetDestRect(ci: GraphicsImportComponent; var destRect: Rect): ComponentResult; external name '_GraphicsImportGetDestRect';
+{
+ * GraphicsImportSetFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportSetFlags(ci: GraphicsImportComponent; flags: SInt32): ComponentResult; external name '_GraphicsImportSetFlags';
+{
+ * GraphicsImportGetFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsImportGetFlags(ci: GraphicsImportComponent; var flags: SInt32): ComponentResult; external name '_GraphicsImportGetFlags';
+{ 2 private selectors }
+{
+ * GraphicsImportGetBaseDataOffsetAndSize64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0.2 and later
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Mac OS X: in version 10.1 and later
+ * Windows: in qtmlClient.lib 5.0.2 and later
+ }
+function GraphicsImportGetBaseDataOffsetAndSize64(ci: GraphicsImportComponent; var offset: wide; var size: wide): ComponentResult; external name '_GraphicsImportGetBaseDataOffsetAndSize64';
+{
+ * GraphicsImportSetImageIndexToThumbnail()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function GraphicsImportSetImageIndexToThumbnail(ci: GraphicsImportComponent): ComponentResult; external name '_GraphicsImportSetImageIndexToThumbnail';
+type
+ GraphicsExportComponent = ComponentInstance;
+
+const
+ GraphicsExporterComponentType = $67726578 (* 'grex' *);
+ kBaseGraphicsExporterSubType = $62617365 (* 'base' *);
+
+ graphicsExporterIsBaseExporter = $00000001;
+ graphicsExporterCanTranscode = $00000002;
+ graphicsExporterUsesImageCompressor = $00000004;
+
+
+type
+ QTResolutionSettingsPtr = ^QTResolutionSettings;
+ QTResolutionSettings = record
+ horizontalResolution: Fixed;
+ verticalResolution: Fixed;
+ end;
+
+ QTTargetDataSizePtr = ^QTTargetDataSize;
+ QTTargetDataSize = record
+ targetDataSize: UInt32;
+ end;
+
+ QTThumbnailSettingsPtr = ^QTThumbnailSettings;
+ QTThumbnailSettings = record
+ enableThumbnail: SInt32; { a thoroughly padded Boolean }
+ maxThumbnailWidth: SInt32; { set to zero to let someone else decide }
+ maxThumbnailHeight: SInt32; { set to zero to let someone else decide }
+ end;
+
+
+const
+ kQTResolutionSettings = $7265736F (* 'reso' *);
+ kQTTargetDataSize = $6461737A (* 'dasz' *);
+ kQTDontRecompress = $646E7472 (* 'dntr' *);
+ kQTInterlaceStyle = $696C6163 (* 'ilac' *);
+ kQTColorSyncProfile = $69636370 (* 'iccp' *);
+ kQTThumbnailSettings = $7468756D (* 'thum' *);
+ kQTEnableExif = $65786966 (* 'exif' *); { UInt8 (boolean) }
+ kQTMetaData = $6D657461 (* 'meta' *);
+
+ kQTTIFFCompressionMethod = $74696663 (* 'tifc' *); { UInt32 }
+ kQTTIFFCompression_None = 1;
+ kQTTIFFCompression_PackBits = 32773;
+ kQTTIFFLittleEndian = $74696665 (* 'tife' *); { UInt8 (boolean) }
+
+ kQTPNGFilterPreference = $706E6766 (* 'pngf' *); { UInt32 }
+ kQTPNGFilterBestForColorType = $62666C74 (* 'bflt' *);
+ kQTPNGFilterNone = 0;
+ kQTPNGFilterSub = 1;
+ kQTPNGFilterUp = 2;
+ kQTPNGFilterAverage = 3;
+ kQTPNGFilterPaeth = 4;
+ kQTPNGFilterAdaptivePerRow = $61666C74 (* 'aflt' *);
+ kQTPNGInterlaceStyle = $696C6163 (* 'ilac' *); { UInt32 }
+ kQTPNGInterlaceNone = 0;
+ kQTPNGInterlaceAdam7 = 1;
+
+
+ { * These are GraphicsExport procedures * }
+ { To use: set the input and output (and other settings as desired) and call GEDoExport. }
+ {
+ * GraphicsExportDoExport()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportDoExport(ci: GraphicsExportComponent; var actualSizeWritten: UInt32): ComponentResult; external name '_GraphicsExportDoExport';
+{ Used for internal communication between the base and format-specific graphics exporter: }
+{
+ * GraphicsExportCanTranscode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportCanTranscode(ci: GraphicsExportComponent; var canTranscode: boolean): ComponentResult; external name '_GraphicsExportCanTranscode';
+{
+ * GraphicsExportDoTranscode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportDoTranscode(ci: GraphicsExportComponent): ComponentResult; external name '_GraphicsExportDoTranscode';
+{
+ * GraphicsExportCanUseCompressor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportCanUseCompressor(ci: GraphicsExportComponent; var canUseCompressor: boolean; codecSettingsAtomContainerPtr: UnivPtr): ComponentResult; external name '_GraphicsExportCanUseCompressor';
+{
+ * GraphicsExportDoUseCompressor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportDoUseCompressor(ci: GraphicsExportComponent; codecSettingsAtomContainer: UnivPtr; var outDesc: ImageDescriptionHandle): ComponentResult; external name '_GraphicsExportDoUseCompressor';
+{
+ * GraphicsExportDoStandaloneExport()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportDoStandaloneExport(ci: GraphicsExportComponent): ComponentResult; external name '_GraphicsExportDoStandaloneExport';
+{ Queries applications can make of a format-specific graphics exporter: }
+{
+ * GraphicsExportGetDefaultFileTypeAndCreator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetDefaultFileTypeAndCreator(ci: GraphicsExportComponent; var fileType: OSType; var fileCreator: OSType): ComponentResult; external name '_GraphicsExportGetDefaultFileTypeAndCreator';
+{
+ * GraphicsExportGetDefaultFileNameExtension()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetDefaultFileNameExtension(ci: GraphicsExportComponent; var fileNameExtension: OSType): ComponentResult; external name '_GraphicsExportGetDefaultFileNameExtension';
+{
+ * GraphicsExportGetMIMETypeList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetMIMETypeList(ci: GraphicsExportComponent; qtAtomContainerPtr: UnivPtr): ComponentResult; external name '_GraphicsExportGetMIMETypeList';
+{ GraphicsExportIsTranscodePossibleFromCurrentInput is removed; call GraphicsExportCanTranscode instead }
+{ Graphics exporter settings: }
+{
+ * GraphicsExportRequestSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportRequestSettings(ci: GraphicsExportComponent; filterProc: ModalFilterYDUPP; yourDataProc: UnivPtr): ComponentResult; external name '_GraphicsExportRequestSettings';
+{
+ * GraphicsExportSetSettingsFromAtomContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetSettingsFromAtomContainer(ci: GraphicsExportComponent; qtAtomContainer: UnivPtr): ComponentResult; external name '_GraphicsExportSetSettingsFromAtomContainer';
+{
+ * GraphicsExportGetSettingsAsAtomContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetSettingsAsAtomContainer(ci: GraphicsExportComponent; qtAtomContainerPtr: UnivPtr): ComponentResult; external name '_GraphicsExportGetSettingsAsAtomContainer';
+{
+ * GraphicsExportGetSettingsAsText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetSettingsAsText(ci: GraphicsExportComponent; var theText: Handle): ComponentResult; external name '_GraphicsExportGetSettingsAsText';
+{ Graphics exporters may implement some or none of the following: }
+{
+ * GraphicsExportSetDontRecompress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetDontRecompress(ci: GraphicsExportComponent; dontRecompress: boolean): ComponentResult; external name '_GraphicsExportSetDontRecompress';
+{
+ * GraphicsExportGetDontRecompress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetDontRecompress(ci: GraphicsExportComponent; var dontRecompress: boolean): ComponentResult; external name '_GraphicsExportGetDontRecompress';
+{
+ * GraphicsExportSetInterlaceStyle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetInterlaceStyle(ci: GraphicsExportComponent; interlaceStyle: UInt32): ComponentResult; external name '_GraphicsExportSetInterlaceStyle';
+{
+ * GraphicsExportGetInterlaceStyle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetInterlaceStyle(ci: GraphicsExportComponent; var interlaceStyle: UInt32): ComponentResult; external name '_GraphicsExportGetInterlaceStyle';
+{
+ * GraphicsExportSetMetaData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetMetaData(ci: GraphicsExportComponent; userData: UnivPtr): ComponentResult; external name '_GraphicsExportSetMetaData';
+{
+ * GraphicsExportGetMetaData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetMetaData(ci: GraphicsExportComponent; userData: UnivPtr): ComponentResult; external name '_GraphicsExportGetMetaData';
+{
+ * GraphicsExportSetTargetDataSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetTargetDataSize(ci: GraphicsExportComponent; targetDataSize: UInt32): ComponentResult; external name '_GraphicsExportSetTargetDataSize';
+{
+ * GraphicsExportGetTargetDataSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetTargetDataSize(ci: GraphicsExportComponent; var targetDataSize: UInt32): ComponentResult; external name '_GraphicsExportGetTargetDataSize';
+{
+ * GraphicsExportSetCompressionMethod()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetCompressionMethod(ci: GraphicsExportComponent; compressionMethod: SInt32): ComponentResult; external name '_GraphicsExportSetCompressionMethod';
+{
+ * GraphicsExportGetCompressionMethod()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetCompressionMethod(ci: GraphicsExportComponent; var compressionMethod: SInt32): ComponentResult; external name '_GraphicsExportGetCompressionMethod';
+{
+ * GraphicsExportSetCompressionQuality()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetCompressionQuality(ci: GraphicsExportComponent; spatialQuality: CodecQ): ComponentResult; external name '_GraphicsExportSetCompressionQuality';
+{
+ * GraphicsExportGetCompressionQuality()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetCompressionQuality(ci: GraphicsExportComponent; var spatialQuality: CodecQ): ComponentResult; external name '_GraphicsExportGetCompressionQuality';
+{
+ * GraphicsExportSetResolution()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetResolution(ci: GraphicsExportComponent; horizontalResolution: Fixed; verticalResolution: Fixed): ComponentResult; external name '_GraphicsExportSetResolution';
+{
+ * GraphicsExportGetResolution()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetResolution(ci: GraphicsExportComponent; var horizontalResolution: Fixed; var verticalResolution: Fixed): ComponentResult; external name '_GraphicsExportGetResolution';
+{
+ * GraphicsExportSetDepth()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetDepth(ci: GraphicsExportComponent; depth: SInt32): ComponentResult; external name '_GraphicsExportSetDepth';
+{
+ * GraphicsExportGetDepth()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetDepth(ci: GraphicsExportComponent; var depth: SInt32): ComponentResult; external name '_GraphicsExportGetDepth';
+{ (2 unused selectors) }
+{
+ * GraphicsExportSetColorSyncProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetColorSyncProfile(ci: GraphicsExportComponent; colorSyncProfile: Handle): ComponentResult; external name '_GraphicsExportSetColorSyncProfile';
+{
+ * GraphicsExportGetColorSyncProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetColorSyncProfile(ci: GraphicsExportComponent; var colorSyncProfile: Handle): ComponentResult; external name '_GraphicsExportGetColorSyncProfile';
+{ Always implemented by the base graphics exporter: }
+{
+ * GraphicsExportSetProgressProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetProgressProc(ci: GraphicsExportComponent; progressProc: ICMProgressProcRecordPtr): ComponentResult; external name '_GraphicsExportSetProgressProc';
+{
+ * GraphicsExportGetProgressProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetProgressProc(ci: GraphicsExportComponent; progressProc: ICMProgressProcRecordPtr): ComponentResult; external name '_GraphicsExportGetProgressProc';
+{ Sources for the input image: }
+{
+ * GraphicsExportSetInputDataReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetInputDataReference(ci: GraphicsExportComponent; dataRef: Handle; dataRefType: OSType; desc: ImageDescriptionHandle): ComponentResult; external name '_GraphicsExportSetInputDataReference';
+{
+ * GraphicsExportGetInputDataReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetInputDataReference(ci: GraphicsExportComponent; var dataRef: Handle; var dataRefType: OSType): ComponentResult; external name '_GraphicsExportGetInputDataReference';
+{
+ * GraphicsExportSetInputFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetInputFile(ci: GraphicsExportComponent; const (*var*) theFile: FSSpec; desc: ImageDescriptionHandle): ComponentResult; external name '_GraphicsExportSetInputFile';
+{
+ * GraphicsExportGetInputFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetInputFile(ci: GraphicsExportComponent; var theFile: FSSpec): ComponentResult; external name '_GraphicsExportGetInputFile';
+{
+ * GraphicsExportSetInputHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetInputHandle(ci: GraphicsExportComponent; h: Handle; desc: ImageDescriptionHandle): ComponentResult; external name '_GraphicsExportSetInputHandle';
+{
+ * GraphicsExportGetInputHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetInputHandle(ci: GraphicsExportComponent; var h: Handle): ComponentResult; external name '_GraphicsExportGetInputHandle';
+{
+ * GraphicsExportSetInputPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetInputPtr(ci: GraphicsExportComponent; p: Ptr; size: UInt32; desc: ImageDescriptionHandle): ComponentResult; external name '_GraphicsExportSetInputPtr';
+{
+ * GraphicsExportGetInputPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetInputPtr(ci: GraphicsExportComponent; var p: Ptr; var size: UInt32): ComponentResult; external name '_GraphicsExportGetInputPtr';
+{
+ * GraphicsExportSetInputGraphicsImporter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetInputGraphicsImporter(ci: GraphicsExportComponent; grip: GraphicsImportComponent): ComponentResult; external name '_GraphicsExportSetInputGraphicsImporter';
+{
+ * GraphicsExportGetInputGraphicsImporter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetInputGraphicsImporter(ci: GraphicsExportComponent; var grip: GraphicsImportComponent): ComponentResult; external name '_GraphicsExportGetInputGraphicsImporter';
+{
+ * GraphicsExportSetInputPicture()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetInputPicture(ci: GraphicsExportComponent; picture: PicHandle): ComponentResult; external name '_GraphicsExportSetInputPicture';
+{
+ * GraphicsExportGetInputPicture()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetInputPicture(ci: GraphicsExportComponent; var picture: PicHandle): ComponentResult; external name '_GraphicsExportGetInputPicture';
+{
+ * GraphicsExportSetInputGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetInputGWorld(ci: GraphicsExportComponent; gworld: GWorldPtr): ComponentResult; external name '_GraphicsExportSetInputGWorld';
+{
+ * GraphicsExportGetInputGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetInputGWorld(ci: GraphicsExportComponent; var gworld: GWorldPtr): ComponentResult; external name '_GraphicsExportGetInputGWorld';
+{
+ * GraphicsExportSetInputPixmap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetInputPixmap(ci: GraphicsExportComponent; pixmap: PixMapHandle): ComponentResult; external name '_GraphicsExportSetInputPixmap';
+{
+ * GraphicsExportGetInputPixmap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetInputPixmap(ci: GraphicsExportComponent; var pixmap: PixMapHandle): ComponentResult; external name '_GraphicsExportGetInputPixmap';
+{ Only applicable when the input is a data reference, file, handle or ptr: }
+{
+ * GraphicsExportSetInputOffsetAndLimit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetInputOffsetAndLimit(ci: GraphicsExportComponent; offset: UInt32; limit: UInt32): ComponentResult; external name '_GraphicsExportSetInputOffsetAndLimit';
+{
+ * GraphicsExportGetInputOffsetAndLimit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetInputOffsetAndLimit(ci: GraphicsExportComponent; var offset: UInt32; var limit: UInt32): ComponentResult; external name '_GraphicsExportGetInputOffsetAndLimit';
+{ Used by format-specific graphics exporters when transcoding: }
+{
+ * GraphicsExportMayExporterReadInputData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportMayExporterReadInputData(ci: GraphicsExportComponent; var mayReadInputData: boolean): ComponentResult; external name '_GraphicsExportMayExporterReadInputData';
+{
+ * GraphicsExportGetInputDataSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetInputDataSize(ci: GraphicsExportComponent; var size: UInt32): ComponentResult; external name '_GraphicsExportGetInputDataSize';
+{
+ * GraphicsExportReadInputData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportReadInputData(ci: GraphicsExportComponent; dataPtr: UnivPtr; dataOffset: UInt32; dataSize: UInt32): ComponentResult; external name '_GraphicsExportReadInputData';
+{ Used by format-specific graphics exporters, especially when doing standalone export: }
+{
+ * GraphicsExportGetInputImageDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetInputImageDescription(ci: GraphicsExportComponent; var desc: ImageDescriptionHandle): ComponentResult; external name '_GraphicsExportGetInputImageDescription';
+{
+ * GraphicsExportGetInputImageDimensions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetInputImageDimensions(ci: GraphicsExportComponent; var dimensions: Rect): ComponentResult; external name '_GraphicsExportGetInputImageDimensions';
+{
+ * GraphicsExportGetInputImageDepth()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetInputImageDepth(ci: GraphicsExportComponent; var inputDepth: SInt32): ComponentResult; external name '_GraphicsExportGetInputImageDepth';
+{
+ * GraphicsExportDrawInputImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportDrawInputImage(ci: GraphicsExportComponent; gw: CGrafPtr; gd: GDHandle; const (*var*) srcRect: Rect; const (*var*) dstRect: Rect): ComponentResult; external name '_GraphicsExportDrawInputImage';
+{ Destinations for the output image: }
+{
+ * GraphicsExportSetOutputDataReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetOutputDataReference(ci: GraphicsExportComponent; dataRef: Handle; dataRefType: OSType): ComponentResult; external name '_GraphicsExportSetOutputDataReference';
+{
+ * GraphicsExportGetOutputDataReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetOutputDataReference(ci: GraphicsExportComponent; var dataRef: Handle; var dataRefType: OSType): ComponentResult; external name '_GraphicsExportGetOutputDataReference';
+{
+ * GraphicsExportSetOutputFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetOutputFile(ci: GraphicsExportComponent; const (*var*) theFile: FSSpec): ComponentResult; external name '_GraphicsExportSetOutputFile';
+{
+ * GraphicsExportGetOutputFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetOutputFile(ci: GraphicsExportComponent; var theFile: FSSpec): ComponentResult; external name '_GraphicsExportGetOutputFile';
+{
+ * GraphicsExportSetOutputHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetOutputHandle(ci: GraphicsExportComponent; h: Handle): ComponentResult; external name '_GraphicsExportSetOutputHandle';
+{
+ * GraphicsExportGetOutputHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetOutputHandle(ci: GraphicsExportComponent; var h: Handle): ComponentResult; external name '_GraphicsExportGetOutputHandle';
+{
+ * GraphicsExportSetOutputOffsetAndMaxSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetOutputOffsetAndMaxSize(ci: GraphicsExportComponent; offset: UInt32; maxSize: UInt32; truncateFile: boolean): ComponentResult; external name '_GraphicsExportSetOutputOffsetAndMaxSize';
+{
+ * GraphicsExportGetOutputOffsetAndMaxSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetOutputOffsetAndMaxSize(ci: GraphicsExportComponent; var offset: UInt32; var maxSize: UInt32; var truncateFile: boolean): ComponentResult; external name '_GraphicsExportGetOutputOffsetAndMaxSize';
+{
+ * GraphicsExportSetOutputFileTypeAndCreator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetOutputFileTypeAndCreator(ci: GraphicsExportComponent; fileType: OSType; fileCreator: OSType): ComponentResult; external name '_GraphicsExportSetOutputFileTypeAndCreator';
+{
+ * GraphicsExportGetOutputFileTypeAndCreator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetOutputFileTypeAndCreator(ci: GraphicsExportComponent; var fileType: OSType; var fileCreator: OSType): ComponentResult; external name '_GraphicsExportGetOutputFileTypeAndCreator';
+{ Used by format-specific graphics exporters: }
+{
+ * GraphicsExportWriteOutputData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportWriteOutputData(ci: GraphicsExportComponent; dataPtr: UnivPtr; dataSize: UInt32): ComponentResult; external name '_GraphicsExportWriteOutputData';
+{
+ * GraphicsExportSetOutputMark()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportSetOutputMark(ci: GraphicsExportComponent; mark: UInt32): ComponentResult; external name '_GraphicsExportSetOutputMark';
+{
+ * GraphicsExportGetOutputMark()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportGetOutputMark(ci: GraphicsExportComponent; var mark: UInt32): ComponentResult; external name '_GraphicsExportGetOutputMark';
+{
+ * GraphicsExportReadOutputData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GraphicsExportReadOutputData(ci: GraphicsExportComponent; dataPtr: UnivPtr; dataOffset: UInt32; dataSize: UInt32): ComponentResult; external name '_GraphicsExportReadOutputData';
+{ Allows embedded thumbnail creation, if supported. }
+{
+ * GraphicsExportSetThumbnailEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0.2 and later
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Mac OS X: in version 10.1 and later
+ * Windows: in qtmlClient.lib 5.0.2 and later
+ }
+function GraphicsExportSetThumbnailEnabled(ci: GraphicsExportComponent; enableThumbnail: boolean; maxThumbnailWidth: SInt32; maxThumbnailHeight: SInt32): ComponentResult; external name '_GraphicsExportSetThumbnailEnabled';
+{
+ * GraphicsExportGetThumbnailEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0.2 and later
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Mac OS X: in version 10.1 and later
+ * Windows: in qtmlClient.lib 5.0.2 and later
+ }
+function GraphicsExportGetThumbnailEnabled(ci: GraphicsExportComponent; var thumbnailEnabled: boolean; var maxThumbnailWidth: SInt32; var maxThumbnailHeight: SInt32): ComponentResult; external name '_GraphicsExportGetThumbnailEnabled';
+{ Allows export of Exif files, if supported. This disables Exif-incompatible settings such as grayscale JPEG and compressed TIFF, and enables export of Exif metadata. }
+{
+ * GraphicsExportSetExifEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0.2 and later
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Mac OS X: in version 10.1 and later
+ * Windows: in qtmlClient.lib 5.0.2 and later
+ }
+function GraphicsExportSetExifEnabled(ci: GraphicsExportComponent; enableExif: boolean): ComponentResult; external name '_GraphicsExportSetExifEnabled';
+{
+ * GraphicsExportGetExifEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0.2 and later
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Mac OS X: in version 10.1 and later
+ * Windows: in qtmlClient.lib 5.0.2 and later
+ }
+function GraphicsExportGetExifEnabled(ci: GraphicsExportComponent; var exifEnabled: boolean): ComponentResult; external name '_GraphicsExportGetExifEnabled';
+type
+ ImageTranscoderComponent = ComponentInstance;
+
+const
+ ImageTranscodererComponentType = $696D7463 (* 'imtc' *);
+
+
+ { * These are ImageTranscoder procedures * }
+ {
+ * ImageTranscoderBeginSequence()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageTranscoderBeginSequence(itc: ImageTranscoderComponent; srcDesc: ImageDescriptionHandle; var dstDesc: ImageDescriptionHandle; data: UnivPtr; dataSize: SInt32): ComponentResult; external name '_ImageTranscoderBeginSequence';
+{
+ * ImageTranscoderConvert()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageTranscoderConvert(itc: ImageTranscoderComponent; srcData: UnivPtr; srcDataSize: SInt32; var dstData: UnivPtr; var dstDataSize: SInt32): ComponentResult; external name '_ImageTranscoderConvert';
+{
+ * ImageTranscoderDisposeData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageTranscoderDisposeData(itc: ImageTranscoderComponent; dstData: UnivPtr): ComponentResult; external name '_ImageTranscoderDisposeData';
+{
+ * ImageTranscoderEndSequence()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageTranscoderEndSequence(itc: ImageTranscoderComponent): ComponentResult; external name '_ImageTranscoderEndSequence';
+{ UPP call backs }
+{$ALIGN MAC68K}
+
+
+{unit LowMem}
+{
+ File: LowMem.p
+
+ Contains: Low Memory Accessor Interfaces.
+
+ Version: Technology: Mac OS 8.1
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1993-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ifc NOT OPAQUE_TOOLBOX_STRUCTS}
+{$endc}
+
+
+{$ALIGN MAC68K}
+
+{*************************************************************************************
+
+ SIMPLE LOWMEM ACCESSORS
+
+*************************************************************************************}
+{
+ The following functions were moved to Quickdraw.h:
+
+ LMSetDeviceList
+ LMSetLastSPExtra
+ LMGetWidthListHand
+ LMSetWidthListHand
+ LMGetScrHRes
+ LMSetScrHRes
+ LMSetScrVRes
+ LMGetScrVRes
+ LMGetHiliteMode
+ LMSetHiliteMode
+ LMGetMainDevice
+ LMSetMainDevice
+ LMGetDeviceList
+ LMGetQDColors
+ LMSetQDColors
+ LMGetWidthPtr
+ LMSetWidthPtr
+ LMGetWidthTabHandle
+ LMSetWidthTabHandle
+ LMGetLastSPExtra
+ LMGetLastFOND
+ LMSetLastFOND
+ LMGetFractEnable
+ LMSetFractEnable
+ LMGetTheGDevice
+ LMSetTheGDevice
+ LMGetCursorNew
+ LMSetCursorNew
+ LMGetHiliteRGB
+ LMSetHiliteRGB
+
+ The following functions were moved to TextEdit.h:
+
+ LMGetWordRedraw
+ LMSetWordRedraw
+
+ The following functions were moved to Menus.h:
+
+ LMGetTheMenu
+
+ The following functions were moved to Events.h:
+
+ LMGetKeyRepThresh
+ LMSetKeyRepThresh
+ LMGetKeyThresh
+ LMSetKeyRepThresh
+ LMGetKbdLast
+ LMSetKbdLast
+ LMGetKbdType
+ LMSetKbdType
+
+}
+
+{
+ * LMGetMemTop()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetMemTop: Ptr; external name '_LMGetMemTop';
+{
+ * LMSetMemTop()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetMemTop(value: Ptr); external name '_LMSetMemTop';
+{
+ * LMGetBufPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetBufPtr: Ptr; external name '_LMGetBufPtr';
+{
+ * LMSetBufPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetBufPtr(value: Ptr); external name '_LMSetBufPtr';
+{
+ * LMGetHeapEnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetHeapEnd: Ptr; external name '_LMGetHeapEnd';
+{
+ * LMSetHeapEnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetHeapEnd(value: Ptr); external name '_LMSetHeapEnd';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetTheZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetTheZone: THz; external name '_LMGetTheZone';
+{
+ * LMSetTheZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetTheZone(value: THz); external name '_LMSetTheZone';
+{
+ * LMGetUTableBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetUTableBase: Ptr; external name '_LMGetUTableBase';
+{
+ * LMSetUTableBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetUTableBase(value: Ptr); external name '_LMSetUTableBase';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetCPUFlag()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetCPUFlag: ByteParameter; external name '_LMGetCPUFlag';
+{
+ * LMSetCPUFlag()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetCPUFlag(value: ByteParameter); external name '_LMSetCPUFlag';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetApplLimit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetApplLimit: Ptr; external name '_LMGetApplLimit';
+{
+ * LMSetApplLimit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetApplLimit(value: Ptr); external name '_LMSetApplLimit';
+{
+ * LMGetSysEvtMask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSysEvtMask: SInt16; external name '_LMGetSysEvtMask';
+{ Carbon Usage: use SetEventMask }
+{
+ * LMSetSysEvtMask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSysEvtMask(value: SInt16); external name '_LMSetSysEvtMask';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetRndSeed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetRndSeed: SInt32; external name '_LMGetRndSeed';
+{
+ * LMSetRndSeed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetRndSeed(value: SInt32); external name '_LMSetRndSeed';
+{
+ * LMGetSEvtEnb()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetSEvtEnb: ByteParameter; external name '_LMGetSEvtEnb';
+{
+ * LMSetSEvtEnb()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetSEvtEnb(value: ByteParameter); external name '_LMSetSEvtEnb';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetTicks()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetTicks: UInt32; external name '_LMGetTicks';
+{
+ * LMSetTicks()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetTicks(value: UInt32); external name '_LMSetTicks';
+{
+ * LMGetVIA()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetVIA: Ptr; external name '_LMGetVIA';
+{
+ * LMSetVIA()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetVIA(value: Ptr); external name '_LMSetVIA';
+{
+ * LMGetSCCRd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSCCRd: Ptr; external name '_LMGetSCCRd';
+{
+ * LMSetSCCRd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSCCRd(value: Ptr); external name '_LMSetSCCRd';
+{
+ * LMGetSCCWr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSCCWr: Ptr; external name '_LMGetSCCWr';
+{
+ * LMSetSCCWr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSCCWr(value: Ptr); external name '_LMSetSCCWr';
+{
+ * LMGetSPValid()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSPValid: ByteParameter; external name '_LMGetSPValid';
+{
+ * LMSetSPValid()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSPValid(value: ByteParameter); external name '_LMSetSPValid';
+{
+ * LMGetSPATalkA()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSPATalkA: ByteParameter; external name '_LMGetSPATalkA';
+{
+ * LMSetSPATalkA()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSPATalkA(value: ByteParameter); external name '_LMSetSPATalkA';
+{
+ * LMGetSPATalkB()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSPATalkB: ByteParameter; external name '_LMGetSPATalkB';
+{
+ * LMSetSPATalkB()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSPATalkB(value: ByteParameter); external name '_LMSetSPATalkB';
+{
+ * LMGetSPConfig()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSPConfig: ByteParameter; external name '_LMGetSPConfig';
+{
+ * LMSetSPConfig()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSPConfig(value: ByteParameter); external name '_LMSetSPConfig';
+{
+ * LMGetSPPortA()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSPPortA: SInt16; external name '_LMGetSPPortA';
+{
+ * LMSetSPPortA()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSPPortA(value: SInt16); external name '_LMSetSPPortA';
+{
+ * LMGetSPPortB()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSPPortB: SInt16; external name '_LMGetSPPortB';
+{
+ * LMSetSPPortB()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSPPortB(value: SInt16); external name '_LMSetSPPortB';
+{
+ * LMGetSPAlarm()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSPAlarm: SInt32; external name '_LMGetSPAlarm';
+{
+ * LMSetSPAlarm()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSPAlarm(value: SInt32); external name '_LMSetSPAlarm';
+{
+ * LMGetSPFont()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSPFont: SInt16; external name '_LMGetSPFont';
+{
+ * LMSetSPFont()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSPFont(value: SInt16); external name '_LMSetSPFont';
+{
+ * LMGetSPKbd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSPKbd: ByteParameter; external name '_LMGetSPKbd';
+{
+ * LMSetSPKbd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSPKbd(value: ByteParameter); external name '_LMSetSPKbd';
+{
+ * LMGetSPPrint()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSPPrint: ByteParameter; external name '_LMGetSPPrint';
+{
+ * LMSetSPPrint()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSPPrint(value: ByteParameter); external name '_LMSetSPPrint';
+{
+ * LMGetSPVolCtl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSPVolCtl: ByteParameter; external name '_LMGetSPVolCtl';
+{
+ * LMSetSPVolCtl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSPVolCtl(value: ByteParameter); external name '_LMSetSPVolCtl';
+{
+ * LMGetSPClikCaret()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSPClikCaret: ByteParameter; external name '_LMGetSPClikCaret';
+{
+ * LMSetSPClikCaret()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSPClikCaret(value: ByteParameter); external name '_LMSetSPClikCaret';
+{
+ * LMGetSPMisc2()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSPMisc2: ByteParameter; external name '_LMGetSPMisc2';
+{
+ * LMSetSPMisc2()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSPMisc2(value: ByteParameter); external name '_LMSetSPMisc2';
+{ Carbon Usage: use GetDateTime }
+{
+ * LMGetTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetTime: SInt32; external name '_LMGetTime';
+{ Carbon Usage: use SetDateTime }
+{
+ * LMSetTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetTime(value: SInt32); external name '_LMSetTime';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetBootDrive()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetBootDrive: SInt16; external name '_LMGetBootDrive';
+{
+ * LMSetBootDrive()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetBootDrive(value: SInt16); external name '_LMSetBootDrive';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetSFSaveDisk()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSFSaveDisk: SInt16; external name '_LMGetSFSaveDisk';
+{
+ * LMSetSFSaveDisk()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSFSaveDisk(value: SInt16); external name '_LMSetSFSaveDisk';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetMemErr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetMemErr: SInt16; external name '_LMGetMemErr';
+{
+ * LMSetMemErr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetMemErr(value: SInt16); external name '_LMSetMemErr';
+{
+ * LMGetSdVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetSdVolume: ByteParameter; external name '_LMGetSdVolume';
+{
+ * LMSetSdVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetSdVolume(value: ByteParameter); external name '_LMSetSdVolume';
+{
+ * LMGetSoundPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetSoundPtr: Ptr; external name '_LMGetSoundPtr';
+{
+ * LMSetSoundPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetSoundPtr(value: Ptr); external name '_LMSetSoundPtr';
+{
+ * LMGetSoundBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetSoundBase: Ptr; external name '_LMGetSoundBase';
+{
+ * LMSetSoundBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetSoundBase(value: Ptr); external name '_LMSetSoundBase';
+{
+ * LMGetSoundLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetSoundLevel: ByteParameter; external name '_LMGetSoundLevel';
+{
+ * LMSetSoundLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetSoundLevel(value: ByteParameter); external name '_LMSetSoundLevel';
+{
+ * LMGetCurPitch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetCurPitch: SInt16; external name '_LMGetCurPitch';
+{
+ * LMSetCurPitch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetCurPitch(value: SInt16); external name '_LMSetCurPitch';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetROM85()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetROM85: SInt16; external name '_LMGetROM85';
+{
+ * LMSetROM85()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetROM85(value: SInt16); external name '_LMSetROM85';
+{
+ * LMGetPortBUse()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetPortBUse: ByteParameter; external name '_LMGetPortBUse';
+{
+ * LMSetPortBUse()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetPortBUse(value: ByteParameter); external name '_LMSetPortBUse';
+{
+ * LMGetGNEFilter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetGNEFilter: GetNextEventFilterUPP; external name '_LMGetGNEFilter';
+{
+ * LMSetGNEFilter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetGNEFilter(value: GetNextEventFilterUPP); external name '_LMSetGNEFilter';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetSysZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetSysZone: THz; external name '_LMGetSysZone';
+{
+ * LMSetSysZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetSysZone(value: THz); external name '_LMSetSysZone';
+{
+ * LMGetApplZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetApplZone: THz; external name '_LMGetApplZone';
+{
+ * LMSetApplZone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetApplZone(value: THz); external name '_LMSetApplZone';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetROMBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetROMBase: Ptr; external name '_LMGetROMBase';
+{
+ * LMSetROMBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetROMBase(value: Ptr); external name '_LMSetROMBase';
+{
+ * LMGetRAMBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetRAMBase: Ptr; external name '_LMGetRAMBase';
+{
+ * LMSetRAMBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetRAMBase(value: Ptr); external name '_LMSetRAMBase';
+{
+ * LMGetDSAlertTab()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetDSAlertTab: Ptr; external name '_LMGetDSAlertTab';
+{
+ * LMSetDSAlertTab()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDSAlertTab(value: Ptr); external name '_LMSetDSAlertTab';
+{
+ NOTE: LMGetABusVars and LMSetABusVars have been removed.
+ Their implememtation in InterfaceLib was inconsistent
+ with their prototypes here. In InterfaceLib LMSetABusVars
+ would copy eight bytes and LMGetABusVars would return the
+ value 0x02D8 instead of the long at that location.
+
+ Use LMGetABusGlobals/LMSetABusGlobals to get/set the
+ long at location 0x02D8 which is a pointer to the AppleTalk
+ globals. Use LMGetABusDCE/LMSetABusDCE to get/set the
+ long at location 0x02DC which is the .MPP driver
+ Device Control Entry.
+
+}
+{
+ * LMGetABusGlobals()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetABusGlobals: Ptr; external name '_LMGetABusGlobals';
+{
+ * LMGetABusDCE()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetABusDCE: Ptr; external name '_LMGetABusDCE';
+{
+ * LMSetABusGlobals()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetABusGlobals(value: Ptr); external name '_LMSetABusGlobals';
+{
+ * LMSetABusDCE()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetABusDCE(value: Ptr); external name '_LMSetABusDCE';
+{ Carbon Usage: use GetDblTime }
+{
+ * LMGetDoubleTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetDoubleTime: UInt32; external name '_LMGetDoubleTime';
+{
+ * LMSetDoubleTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDoubleTime(value: UInt32); external name '_LMSetDoubleTime';
+{ Carbon Usage: use GetCaretTime }
+{
+ * LMGetCaretTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetCaretTime: UInt32; external name '_LMGetCaretTime';
+{
+ * LMSetCaretTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetCaretTime(value: UInt32); external name '_LMSetCaretTime';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetScrDmpEnb()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetScrDmpEnb: ByteParameter; external name '_LMGetScrDmpEnb';
+{
+ * LMSetScrDmpEnb()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetScrDmpEnb(value: ByteParameter); external name '_LMSetScrDmpEnb';
+{
+ * LMGetBufTgFNum()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetBufTgFNum: SInt32; external name '_LMGetBufTgFNum';
+{
+ * LMSetBufTgFNum()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetBufTgFNum(value: SInt32); external name '_LMSetBufTgFNum';
+{
+ * LMGetBufTgFFlg()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetBufTgFFlg: SInt16; external name '_LMGetBufTgFFlg';
+{
+ * LMSetBufTgFFlg()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetBufTgFFlg(value: SInt16); external name '_LMSetBufTgFFlg';
+{
+ * LMGetBufTgFBkNum()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetBufTgFBkNum: SInt16; external name '_LMGetBufTgFBkNum';
+{
+ * LMSetBufTgFBkNum()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetBufTgFBkNum(value: SInt16); external name '_LMSetBufTgFBkNum';
+{
+ * LMGetBufTgDate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetBufTgDate: SInt32; external name '_LMGetBufTgDate';
+{
+ * LMSetBufTgDate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetBufTgDate(value: SInt32); external name '_LMSetBufTgDate';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetLo3Bytes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetLo3Bytes: SInt32; external name '_LMGetLo3Bytes';
+{
+ * LMSetLo3Bytes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetLo3Bytes(value: SInt32); external name '_LMSetLo3Bytes';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetMinStack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetMinStack: SInt32; external name '_LMGetMinStack';
+{
+ * LMSetMinStack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetMinStack(value: SInt32); external name '_LMSetMinStack';
+{
+ * LMGetDefltStack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetDefltStack: SInt32; external name '_LMGetDefltStack';
+{
+ * LMSetDefltStack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetDefltStack(value: SInt32); external name '_LMSetDefltStack';
+{
+ * LMGetGZRootHnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetGZRootHnd: Handle; external name '_LMGetGZRootHnd';
+{
+ * LMSetGZRootHnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetGZRootHnd(value: Handle); external name '_LMSetGZRootHnd';
+{
+ * LMGetGZMoveHnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetGZMoveHnd: Handle; external name '_LMGetGZMoveHnd';
+{
+ * LMSetGZMoveHnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetGZMoveHnd(value: Handle); external name '_LMSetGZMoveHnd';
+{
+ LMGetFCBSPtr, LMSetFCBSPtr and LMSetFSFCBLen are not supported with Mac OS 9
+ and later. Access to information in File Control Blocks or Fork Control Blocks
+ (FCBs) should, if at all possible, be made with the GetFCBInfo or GetForkCBInfo
+ routines. See the Technote "FCBs, Now and Forever" or the Technical Q&A
+ "Accessing File Control Blocks" for complete information on this subject.
+ Direct access to FCBs is not allowed by Carbon. Non-Carbon programs that
+ require direct access to FCBs should use the File System Manager (FSM) FCB accessor
+ functions if FSM is available (use the Gestalt selector gestaltFSAttr to determine
+ this). Non-Carbon programs needing direct access to FCBs when FSM is not available
+ can define ENABLE_FCB_ARRAY_ACCESS to be true when compiling.
+}
+{$ifc undefined ENABLE_FCB_ARRAY_ACCESS}
+{$setc ENABLE_FCB_ARRAY_ACCESS := 0}
+{$endc}
+
+{$ifc ENABLE_FCB_ARRAY_ACCESS}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetFCBSPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetFCBSPtr: Ptr; external name '_LMGetFCBSPtr';
+{
+ * LMSetFCBSPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetFCBSPtr(value: Ptr); external name '_LMSetFCBSPtr';
+{
+ * LMSetFSFCBLen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetFSFCBLen(value: SInt16); external name '_LMSetFSFCBLen';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {ENABLE_FCB_ARRAY_ACCESS}
+
+{
+ LMGetFSFCBLen is supported only for the purpose of determining that the HFS
+ file system is available as documented in developer Technotes (the HFS file system
+ is available in System 3.2 and later). There is no documented use of FSFCBLen
+ other than testing it for a positive value.
+}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetFSFCBLen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetFSFCBLen: SInt16; external name '_LMGetFSFCBLen';
+{
+ * LMGetDefVCBPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetDefVCBPtr: Ptr; external name '_LMGetDefVCBPtr';
+{
+ * LMSetDefVCBPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDefVCBPtr(value: Ptr); external name '_LMSetDefVCBPtr';
+{
+ * LMGetCurDirStore()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetCurDirStore: SInt32; external name '_LMGetCurDirStore';
+{
+ * LMSetCurDirStore()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetCurDirStore(value: SInt32); external name '_LMSetCurDirStore';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetToExtFS()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetToExtFS: UniversalProcPtr; external name '_LMGetToExtFS';
+{
+ * LMSetToExtFS()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetToExtFS(value: UniversalProcPtr); external name '_LMSetToExtFS';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetScrnBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetScrnBase: Ptr; external name '_LMGetScrnBase';
+{
+ * LMSetScrnBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetScrnBase(value: Ptr); external name '_LMSetScrnBase';
+{
+ * LMGetCrsrBusy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetCrsrBusy: ByteParameter; external name '_LMGetCrsrBusy';
+{
+ * LMSetCrsrBusy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetCrsrBusy(value: ByteParameter); external name '_LMSetCrsrBusy';
+{
+ * LMGetJournalRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetJournalRef: SInt16; external name '_LMGetJournalRef';
+{
+ * LMSetJournalRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetJournalRef(value: SInt16); external name '_LMSetJournalRef';
+{
+ * LMGetCrsrThresh()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetCrsrThresh: SInt16; external name '_LMGetCrsrThresh';
+{
+ * LMSetCrsrThresh()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetCrsrThresh(value: SInt16); external name '_LMSetCrsrThresh';
+{
+ * LMGetJFetch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetJFetch: UniversalProcPtr; external name '_LMGetJFetch';
+{
+ * LMSetJFetch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetJFetch(value: UniversalProcPtr); external name '_LMSetJFetch';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetJStash()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetJStash: UniversalProcPtr; external name '_LMGetJStash';
+{
+ * LMSetJStash()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetJStash(value: UniversalProcPtr); external name '_LMSetJStash';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetJIODone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetJIODone: UniversalProcPtr; external name '_LMGetJIODone';
+{
+ * LMSetJIODone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetJIODone(value: UniversalProcPtr); external name '_LMSetJIODone';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetCurApRefNum()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetCurApRefNum: SInt16; external name '_LMGetCurApRefNum';
+{
+ * LMSetCurApRefNum()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetCurApRefNum(value: SInt16); external name '_LMSetCurApRefNum';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetCurrentA5()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetCurrentA5: Ptr; external name '_LMGetCurrentA5';
+{
+ * LMSetCurrentA5()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetCurrentA5(value: Ptr); external name '_LMSetCurrentA5';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetCurStackBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetCurStackBase: Ptr; external name '_LMGetCurStackBase';
+{
+ * LMSetCurStackBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetCurStackBase(value: Ptr); external name '_LMSetCurStackBase';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetCurJTOffset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetCurJTOffset: SInt16; external name '_LMGetCurJTOffset';
+{
+ * LMSetCurJTOffset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetCurJTOffset(value: SInt16); external name '_LMSetCurJTOffset';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetCurPageOption()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetCurPageOption: SInt16; external name '_LMGetCurPageOption';
+{
+ * LMSetCurPageOption()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetCurPageOption(value: SInt16); external name '_LMSetCurPageOption';
+{
+ * LMGetPrintErr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetPrintErr: SInt16; external name '_LMGetPrintErr';
+{
+ * LMSetPrintErr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetPrintErr(value: SInt16); external name '_LMSetPrintErr';
+{ Carbon Scrap Manager does not support low memory. }
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetScrapSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetScrapSize: SInt32; external name '_LMGetScrapSize';
+{
+ * LMSetScrapSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetScrapSize(value: SInt32); external name '_LMSetScrapSize';
+{
+ * LMGetScrapHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetScrapHandle: Handle; external name '_LMGetScrapHandle';
+{
+ * LMSetScrapHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetScrapHandle(value: Handle); external name '_LMSetScrapHandle';
+{
+ * LMGetScrapCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetScrapCount: SInt16; external name '_LMGetScrapCount';
+{
+ * LMSetScrapCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetScrapCount(value: SInt16); external name '_LMSetScrapCount';
+{
+ * LMGetScrapState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetScrapState: SInt16; external name '_LMGetScrapState';
+{
+ * LMSetScrapState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetScrapState(value: SInt16); external name '_LMSetScrapState';
+{
+ * LMGetScrapName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetScrapName: StringPtr; external name '_LMGetScrapName';
+{
+ * LMSetScrapName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetScrapName(value: StringPtr); external name '_LMSetScrapName';
+{
+ * LMGetROMFont0()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetROMFont0: Handle; external name '_LMGetROMFont0';
+{
+ * LMSetROMFont0()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetROMFont0(value: Handle); external name '_LMSetROMFont0';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetApFontID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetApFontID: SInt16; external name '_LMGetApFontID';
+{
+ * LMSetApFontID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetApFontID(value: SInt16); external name '_LMSetApFontID';
+{ Carbon versions of the Window Manager do not support LowMem. }
+{ Carbon Usage: use GetWindowList }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetWindowList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetWindowList: WindowRef; external name '_LMGetWindowList';
+{
+ * LMGetSaveUpdate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSaveUpdate: SInt16; external name '_LMGetSaveUpdate';
+{
+ * LMSetSaveUpdate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSaveUpdate(value: SInt16); external name '_LMSetSaveUpdate';
+{
+ * LMGetPaintWhite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetPaintWhite: SInt16; external name '_LMGetPaintWhite';
+{ Carbon Usage : use InstallWindowContentPaintProc }
+{
+ * LMSetPaintWhite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetPaintWhite(value: SInt16); external name '_LMSetPaintWhite';
+{
+ * LMGetWMgrPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetWMgrPort: GrafPtr; external name '_LMGetWMgrPort';
+{
+ * LMSetWMgrPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetWMgrPort(value: GrafPtr); external name '_LMSetWMgrPort';
+{ Carbon Usage: use GetGrayRgn }
+{
+ * LMGetGrayRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetGrayRgn: RgnHandle; external name '_LMGetGrayRgn';
+{
+ * LMGetDragHook()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetDragHook: DragGrayRgnUPP; external name '_LMGetDragHook';
+{
+ * LMSetDragHook()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDragHook(value: DragGrayRgnUPP); external name '_LMSetDragHook';
+{
+ * LMSetWindowList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetWindowList(value: WindowRef); external name '_LMSetWindowList';
+{
+ * LMGetGhostWindow()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetGhostWindow: WindowRef; external name '_LMGetGhostWindow';
+{
+ * LMSetGhostWindow()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetGhostWindow(value: WindowRef); external name '_LMSetGhostWindow';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ifc NOT OPAQUE_TOOLBOX_STRUCTS}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetAuxWinHead()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetAuxWinHead: AuxWinHandle; external name '_LMGetAuxWinHead';
+{
+ * LMSetAuxWinHead()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetAuxWinHead(value: AuxWinHandle); external name '_LMSetAuxWinHead';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc}
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetCurActivate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetCurActivate: WindowRef; external name '_LMGetCurActivate';
+{
+ * LMSetCurActivate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetCurActivate(value: WindowRef); external name '_LMSetCurActivate';
+{
+ * LMGetCurDeactive()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetCurDeactive: WindowRef; external name '_LMGetCurDeactive';
+{
+ * LMSetCurDeactive()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetCurDeactive(value: WindowRef); external name '_LMSetCurDeactive';
+{
+ * LMGetOldStructure()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetOldStructure: RgnHandle; external name '_LMGetOldStructure';
+{
+ * LMSetOldStructure()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetOldStructure(value: RgnHandle); external name '_LMSetOldStructure';
+{
+ * LMGetOldContent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetOldContent: RgnHandle; external name '_LMGetOldContent';
+{
+ * LMSetOldContent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetOldContent(value: RgnHandle); external name '_LMSetOldContent';
+{
+ * LMSetGrayRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetGrayRgn(value: RgnHandle); external name '_LMSetGrayRgn';
+{
+ * LMGetSaveVisRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSaveVisRgn: RgnHandle; external name '_LMGetSaveVisRgn';
+{
+ * LMSetSaveVisRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSaveVisRgn(value: RgnHandle); external name '_LMSetSaveVisRgn';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetOneOne()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetOneOne: SInt32; external name '_LMGetOneOne';
+{
+ * LMSetOneOne()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetOneOne(value: SInt32); external name '_LMSetOneOne';
+{
+ * LMGetMinusOne()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetMinusOne: SInt32; external name '_LMGetMinusOne';
+{
+ * LMSetMinusOne()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetMinusOne(value: SInt32); external name '_LMSetMinusOne';
+{ Carbon Usage: use GetMenuTrackingData }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetTopMenuItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetTopMenuItem: SInt16; external name '_LMGetTopMenuItem';
+{ Carbon Usage: replaced by MDEF messages and GetMenuTrackingData API }
+{
+ * LMSetTopMenuItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetTopMenuItem(value: SInt16); external name '_LMSetTopMenuItem';
+{ Carbon Usage: use GetMenuTrackingData }
+{
+ * LMGetAtMenuBottom()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetAtMenuBottom: SInt16; external name '_LMGetAtMenuBottom';
+{ Carbon Usage: replaced by MDEF messages and GetMenuTrackingData API }
+{
+ * LMSetAtMenuBottom()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetAtMenuBottom(value: SInt16); external name '_LMSetAtMenuBottom';
+{
+ Carbon usage: use GetMenuBar (which returns a newly allocated handle in
+ the same format as that returned by LMGetMenuList; dispose with DisposeMenuBar)
+ or GetRootMenu.
+}
+{
+ * LMGetMenuList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetMenuList: Handle; external name '_LMGetMenuList';
+{
+ * LMSetMenuList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetMenuList(value: Handle); external name '_LMSetMenuList';
+{ Carbon usage: no replacement }
+{
+ * LMGetMBarEnable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetMBarEnable: SInt16; external name '_LMGetMBarEnable';
+{
+ * LMSetMBarEnable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetMBarEnable(value: SInt16); external name '_LMSetMBarEnable';
+{ Carbon usage: no replacement }
+{
+ * LMGetMenuFlash()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetMenuFlash: SInt16; external name '_LMGetMenuFlash';
+{
+ * LMSetMenuFlash()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetMenuFlash(value: SInt16); external name '_LMSetMenuFlash';
+{ LMGetTheMenu() moved to Menus.h }
+{
+ * LMSetTheMenu()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetTheMenu(value: SInt16); external name '_LMSetTheMenu';
+{
+ * LMGetMBarHook()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetMBarHook: MBarHookUPP; external name '_LMGetMBarHook';
+{
+ * LMSetMBarHook()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetMBarHook(value: MBarHookUPP); external name '_LMSetMBarHook';
+{
+ * LMGetMenuHook()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetMenuHook: MenuHookUPP; external name '_LMGetMenuHook';
+{
+ * LMSetMenuHook()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetMenuHook(value: MenuHookUPP); external name '_LMSetMenuHook';
+{
+ * LMGetTopMapHndl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetTopMapHndl: Handle; external name '_LMGetTopMapHndl';
+{
+ * LMSetTopMapHndl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetTopMapHndl(value: Handle); external name '_LMSetTopMapHndl';
+{
+ * LMGetSysMapHndl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSysMapHndl: Handle; external name '_LMGetSysMapHndl';
+{
+ * LMSetSysMapHndl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSysMapHndl(value: Handle); external name '_LMSetSysMapHndl';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetSysMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetSysMap: SInt16; external name '_LMGetSysMap';
+{
+ * LMSetSysMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetSysMap(value: SInt16); external name '_LMSetSysMap';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetCurMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetCurMap: SInt16; external name '_LMGetCurMap';
+{
+ * LMSetCurMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetCurMap(value: SInt16); external name '_LMSetCurMap';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetResLoad()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetResLoad: ByteParameter; external name '_LMGetResLoad';
+{
+ * LMSetResLoad()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetResLoad(value: ByteParameter); external name '_LMSetResLoad';
+{
+ * LMGetResErr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetResErr: SInt16; external name '_LMGetResErr';
+{
+ * LMSetResErr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetResErr(value: SInt16); external name '_LMSetResErr';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetFScaleDisable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetFScaleDisable: ByteParameter; external name '_LMGetFScaleDisable';
+{
+ * LMSetFScaleDisable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetFScaleDisable(value: ByteParameter); external name '_LMSetFScaleDisable';
+{
+ * LMGetDeskHook()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetDeskHook: UniversalProcPtr; external name '_LMGetDeskHook';
+{
+ * LMSetDeskHook()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDeskHook(value: UniversalProcPtr); external name '_LMSetDeskHook';
+{ Carbon Usage: Use TEGetDoTextHook. }
+{
+ * LMGetTEDoText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetTEDoText: UniversalProcPtr; external name '_LMGetTEDoText';
+{ Carbon Usage: Use TESetDoTextHook. }
+{
+ * LMSetTEDoText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetTEDoText(value: UniversalProcPtr); external name '_LMSetTEDoText';
+{ Carbon Usage: Use TEGetRecalcHook. }
+{
+ * LMGetTERecal()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetTERecal: UniversalProcPtr; external name '_LMGetTERecal';
+{ Carbon Usage: Use TESetRecalcHook. }
+{
+ * LMSetTERecal()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetTERecal(value: UniversalProcPtr); external name '_LMSetTERecal';
+{
+ * LMGetResumeProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetResumeProc: UniversalProcPtr; external name '_LMGetResumeProc';
+{
+ * LMSetResumeProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetResumeProc(value: UniversalProcPtr); external name '_LMSetResumeProc';
+{
+ * LMGetANumber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetANumber: SInt16; external name '_LMGetANumber';
+{
+ * LMSetANumber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetANumber(value: SInt16); external name '_LMSetANumber';
+{ Carbon Usage: Use GetAlertStage. }
+{
+ * LMGetACount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetACount: SInt16; external name '_LMGetACount';
+{ Carbon Usage: Use ResetAlertStage. }
+{
+ * LMSetACount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetACount(value: SInt16); external name '_LMSetACount';
+{
+ * LMGetDABeeper()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetDABeeper: UniversalProcPtr; external name '_LMGetDABeeper';
+{
+ * LMSetDABeeper()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDABeeper(value: UniversalProcPtr); external name '_LMSetDABeeper';
+{ Carbon Usage: use TEGetScrapLength }
+{
+ * LMGetTEScrpLength()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetTEScrpLength: UInt16; external name '_LMGetTEScrpLength';
+{ Carbon Usage: use TESetScrapLength }
+{
+ * LMSetTEScrpLength()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetTEScrpLength(value: UInt16); external name '_LMSetTEScrpLength';
+{ Carbon Usage: use TEGetScrapHandle }
+{
+ * LMGetTEScrpHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetTEScrpHandle: Handle; external name '_LMGetTEScrpHandle';
+{ Carbon Usage: use TESetScrapHandle }
+{
+ * LMSetTEScrpHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetTEScrpHandle(value: Handle); external name '_LMSetTEScrpHandle';
+{
+ * LMGetAppParmHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetAppParmHandle: Handle; external name '_LMGetAppParmHandle';
+{
+ * LMSetAppParmHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetAppParmHandle(value: Handle); external name '_LMSetAppParmHandle';
+{
+ * LMGetDSErrCode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetDSErrCode: SInt16; external name '_LMGetDSErrCode';
+{
+ * LMSetDSErrCode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDSErrCode(value: SInt16); external name '_LMSetDSErrCode';
+{
+ * LMGetResErrProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetResErrProc: ResErrUPP; external name '_LMGetResErrProc';
+{
+ * LMSetResErrProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetResErrProc(value: ResErrUPP); external name '_LMSetResErrProc';
+{
+ * LMGetDlgFont()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetDlgFont: SInt16; external name '_LMGetDlgFont';
+{ Carbon Usage: use SetDialogFont }
+{
+ * LMSetDlgFont()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDlgFont(value: SInt16); external name '_LMSetDlgFont';
+{
+ * LMGetATalkHk2()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetATalkHk2: Ptr; external name '_LMGetATalkHk2';
+{
+ * LMSetATalkHk2()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetATalkHk2(value: Ptr); external name '_LMSetATalkHk2';
+{
+ * LMGetHWCfgFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetHWCfgFlags: SInt16; external name '_LMGetHWCfgFlags';
+{
+ * LMSetHWCfgFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetHWCfgFlags(value: SInt16); external name '_LMSetHWCfgFlags';
+{ Carbon Usage: use GetMenuTrackingData }
+{
+ * LMGetMenuDisable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetMenuDisable: SInt32; external name '_LMGetMenuDisable';
+{ Carbon Usage: use new MDEF messages }
+{
+ * LMSetMenuDisable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetMenuDisable(value: SInt32); external name '_LMSetMenuDisable';
+{
+ * LMGetROMMapInsert()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetROMMapInsert: ByteParameter; external name '_LMGetROMMapInsert';
+{
+ * LMSetROMMapInsert()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetROMMapInsert(value: ByteParameter); external name '_LMSetROMMapInsert';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetTmpResLoad()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetTmpResLoad: ByteParameter; external name '_LMGetTmpResLoad';
+{
+ * LMSetTmpResLoad()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetTmpResLoad(value: ByteParameter); external name '_LMSetTmpResLoad';
+{
+ * LMGetIntlSpec()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetIntlSpec: Ptr; external name '_LMGetIntlSpec';
+{
+ * LMSetIntlSpec()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetIntlSpec(value: Ptr); external name '_LMSetIntlSpec';
+{ LMGetWordRedraw and LMSetWordRedraw moved to TextEdit.h }
+{
+ * LMGetSysFontFam()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetSysFontFam: SInt16; external name '_LMGetSysFontFam';
+{
+ * LMSetSysFontFam()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetSysFontFam(value: SInt16); external name '_LMSetSysFontFam';
+{
+ * LMGetSysFontSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetSysFontSize: SInt16; external name '_LMGetSysFontSize';
+{
+ * LMSetSysFontSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetSysFontSize(value: SInt16); external name '_LMSetSysFontSize';
+{ Carbon Usge: use GetMBarHeight }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetMBarHeight()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetMBarHeight: SInt16; external name '_LMGetMBarHeight';
+{ Carbon Usage: use Hide/ShowMenuBar }
+{
+ * LMSetMBarHeight()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetMBarHeight(value: SInt16); external name '_LMSetMBarHeight';
+{
+ * LMGetTESysJust()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetTESysJust: SInt16; external name '_LMGetTESysJust';
+{
+ * LMSetTESysJust()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetTESysJust(value: SInt16); external name '_LMSetTESysJust';
+{
+ * LMGetMMU32Bit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetMMU32Bit: ByteParameter; external name '_LMGetMMU32Bit';
+{
+ * LMSetMMU32Bit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetMMU32Bit(value: ByteParameter); external name '_LMSetMMU32Bit';
+{
+ * LMGetDeskCPat()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetDeskCPat: PixPatHandle; external name '_LMGetDeskCPat';
+{
+ * LMSetDeskCPat()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDeskCPat(value: PixPatHandle); external name '_LMSetDeskCPat';
+{
+ * LMGetTimeDBRA()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetTimeDBRA: SInt16; external name '_LMGetTimeDBRA';
+{
+ * LMSetTimeDBRA()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetTimeDBRA(value: SInt16); external name '_LMSetTimeDBRA';
+{
+ * LMGetTimeSCCDB()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetTimeSCCDB: SInt16; external name '_LMGetTimeSCCDB';
+{
+ * LMSetTimeSCCDB()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetTimeSCCDB(value: SInt16); external name '_LMSetTimeSCCDB';
+{
+ * LMGetJVBLTask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetJVBLTask: UniversalProcPtr; external name '_LMGetJVBLTask';
+{
+ * LMSetJVBLTask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetJVBLTask(value: UniversalProcPtr); external name '_LMSetJVBLTask';
+{
+ * LMGetSynListHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSynListHandle: Handle; external name '_LMGetSynListHandle';
+{
+ * LMSetSynListHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetSynListHandle(value: Handle); external name '_LMSetSynListHandle';
+{
+ * LMGetMenuCInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetMenuCInfo: MCTableHandle; external name '_LMGetMenuCInfo';
+{
+ * LMSetMenuCInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetMenuCInfo(value: MCTableHandle); external name '_LMSetMenuCInfo';
+{
+ * LMGetJDTInstall()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetJDTInstall: UniversalProcPtr; external name '_LMGetJDTInstall';
+{
+ * LMSetJDTInstall()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetJDTInstall(value: UniversalProcPtr); external name '_LMSetJDTInstall';
+{
+ * LMGetTimeSCSIDB()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetTimeSCSIDB: SInt16; external name '_LMGetTimeSCSIDB';
+{
+ * LMSetTimeSCSIDB()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetTimeSCSIDB(value: SInt16); external name '_LMSetTimeSCSIDB';
+{*************************************************************************************
+
+ MORE COMPLEX LOWMEM ACCESSORS
+
+*************************************************************************************}
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ifc TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
+{*************************************************************************************
+ "BIG DATA"
+
+ These lowmem accessors access big (> 4 bytes) values.
+*************************************************************************************}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetDeskPattern()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMGetDeskPattern(var deskPatternValue: Pattern); external name '_LMGetDeskPattern';
+{
+ * LMSetDeskPattern()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDeskPattern(const (*var*) deskPatternValue: Pattern); external name '_LMSetDeskPattern';
+{$endc} {CALL_NOT_IN_CARBON}
+{*************************************************************************************
+ "BLOCKMOVE ACCESSORS"
+
+ These lowmem accessors use the BlockMove to set
+*************************************************************************************}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetCurApName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetCurApName: StringPtr; external name '_LMGetCurApName';
+{
+ * LMGetSysResName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetSysResName: StringPtr; external name '_LMGetSysResName';
+{
+ * LMGetFinderName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetFinderName: StringPtr; external name '_LMGetFinderName';
+{$endc} {CALL_NOT_IN_CARBON}
+{*************************************************************************************
+ "INDEXED ACCESSORS"
+
+ These lowmem accessors take an index parameter to get/set an indexed
+ lowmem global.
+*************************************************************************************}
+{************************************************************************************
+ The DAString accessors are gone with Carbon. Please use ParamText and
+ GetParamText instead.
+*************************************************************************************}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetDAStrings()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetDAStrings(whichString: SInt16): StringHandle; external name '_LMGetDAStrings';
+{
+ * LMSetDAStrings()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDAStrings(stringsValue: StringHandle; whichString: SInt16); external name '_LMSetDAStrings';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$elsec}
+{*************************************************************************************
+ "BIG DATA"
+
+ These lowmem accessors access big (> 4 bytes) values.
+*************************************************************************************}
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetDSAlertRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMGetDSAlertRect(var dsAlertRectValue: Rect); external name '_LMGetDSAlertRect';
+
+{
+ * LMSetDSAlertRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDSAlertRect(const (*var*) dsAlertRectValue: Rect); external name '_LMSetDSAlertRect';
+
+{
+ * LMGetDragPattern()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMGetDragPattern(var dragPatternValue: Pattern); external name '_LMGetDragPattern';
+
+{
+ * LMSetDragPattern()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDragPattern(const (*var*) dragPatternValue: Pattern); external name '_LMSetDragPattern';
+
+{
+ * LMGetDeskPattern()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMGetDeskPattern(var deskPatternValue: Pattern); external name '_LMGetDeskPattern';
+
+{
+ * LMSetDeskPattern()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDeskPattern(const (*var*) deskPatternValue: Pattern); external name '_LMSetDeskPattern';
+
+{
+ * LMGetEventQueue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetEventQueue: QHdrPtr; external name '_LMGetEventQueue';
+
+{
+ * LMSetEventQueue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetEventQueue(eventQueueValue: QHdrPtr); external name '_LMSetEventQueue';
+
+
+{
+ * LMGetVBLQueue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetVBLQueue: QHdrPtr; external name '_LMGetVBLQueue';
+
+{
+ * LMSetVBLQueue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetVBLQueue(vblQueueValue: QHdrPtr); external name '_LMSetVBLQueue';
+
+{
+ * LMGetDrvQHdr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetDrvQHdr: QHdrPtr; external name '_LMGetDrvQHdr';
+
+{
+ * LMSetDrvQHdr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDrvQHdr(drvQHdrValue: QHdrPtr); external name '_LMSetDrvQHdr';
+
+{
+ * LMGetVCBQHdr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetVCBQHdr: QHdrPtr; external name '_LMGetVCBQHdr';
+
+{
+ * LMSetVCBQHdr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetVCBQHdr(vcbQHdrValue: QHdrPtr); external name '_LMSetVCBQHdr';
+
+{
+ * LMGetDTQueue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetDTQueue: QHdrPtr; external name '_LMGetDTQueue';
+
+{
+ * LMSetDTQueue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDTQueue(dtQueueValue: QHdrPtr); external name '_LMSetDTQueue';
+
+{
+ * LMGetFSQHdr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetFSQHdr: QHdrPtr; external name '_LMGetFSQHdr';
+
+{*************************************************************************************
+ "BLOCKMOVE ACCESSORS"
+
+ These lowmem accessors use the BlockMove to set
+*************************************************************************************}
+{$endc} {CALL_NOT_IN_CARBON}
+{
+ * LMGetCurApName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetCurApName: StringPtr; external name '_LMGetCurApName';
+
+{
+ * LMSetCurApName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetCurApName(const (*var*) curApNameValue: Str31); external name '_LMSetCurApName';
+
+{
+ * LMGetSysResName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetSysResName: StringPtr; external name '_LMGetSysResName';
+
+{
+ * LMSetSysResName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetSysResName(const (*var*) sysResNameValue: Str15); external name '_LMSetSysResName';
+
+{
+ * LMGetFinderName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetFinderName: StringPtr; external name '_LMGetFinderName';
+
+{
+ * LMSetFinderName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetFinderName(const (*var*) finderNameValue: Str15); external name '_LMSetFinderName';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetScratch20()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetScratch20: Ptr; external name '_LMGetScratch20';
+
+{
+ * LMSetScratch20()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetScratch20(scratch20Value: UnivPtr); external name '_LMSetScratch20';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{
+ * LMGetToolScratch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetToolScratch: Ptr; external name '_LMGetToolScratch';
+
+{
+ * LMSetToolScratch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetToolScratch(toolScratchValue: UnivPtr); external name '_LMSetToolScratch';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetApplScratch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetApplScratch: Ptr; external name '_LMGetApplScratch';
+
+{
+ * LMSetApplScratch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetApplScratch(applScratchValue: UnivPtr); external name '_LMSetApplScratch';
+
+
+{*************************************************************************************
+ "INDEXED ACCESSORS"
+
+ These lowmem accessors take an index parameter to get/set an indexed
+ lowmem global.
+*************************************************************************************}
+
+{ Carbon Usage: use GetParamText }
+{
+ * LMGetDAStrings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetDAStrings(whichString: SInt16): StringHandle; external name '_LMGetDAStrings';
+
+{ Carbon Usage: use ParamText }
+{
+ * LMSetDAStrings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetDAStrings(stringsValue: StringHandle; whichString: SInt16); external name '_LMSetDAStrings';
+
+
+{$endc} {CALL_NOT_IN_CARBON}
+{
+ * LMGetLvl2DT()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetLvl2DT(vectorNumber: SInt16): UniversalProcPtr; external name '_LMGetLvl2DT';
+
+{
+ * LMSetLvl2DT()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetLvl2DT(Lvl2DTValue: UniversalProcPtr; vectorNumber: SInt16); external name '_LMSetLvl2DT';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetExtStsDT()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetExtStsDT(vectorNumber: SInt16): UniversalProcPtr; external name '_LMGetExtStsDT';
+
+{
+ * LMSetExtStsDT()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetExtStsDT(ExtStsDTValue: UniversalProcPtr; vectorNumber: SInt16); external name '_LMSetExtStsDT';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc}
+
+{*************************************************************************************
+ "Missing Accessors"
+
+ These lowmem accessors are not in the original InterfaceLib. They were
+ added to InterfaceLib in Mac OS 8.5. In Universal Interfaces 3.2 they
+ were defined via a macro. In you want to use these functions on a pre-8.5
+ systems, you must write your own macros to override the function prototype
+ or write your own implementation.
+
+*************************************************************************************}
+
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMSetMouseTemp()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetMouseTemp(value: Point); external name '_LMSetMouseTemp';
+{ accesses "MTemp" }
+{
+ * LMGetMouseTemp()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetMouseTemp: Point; external name '_LMGetMouseTemp';
+{
+ accesses "MBState"
+ Carbon Usage: use Button()
+}
+{
+ * LMGetMouseButtonState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetMouseButtonState: ByteParameter; external name '_LMGetMouseButtonState';
+{
+ * LMSetMouseButtonState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetMouseButtonState(value: ByteParameter); external name '_LMSetMouseButtonState';
+{
+ accesses "RawMouse"
+ Carbon Usage: use GetGlobalMouse
+}
+{
+ * LMGetRawMouseLocation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetRawMouseLocation: Point; external name '_LMGetRawMouseLocation';
+{ Carbon Usage: use GetGlobalMouse }
+{
+ * LMSetRawMouseLocation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetRawMouseLocation(value: Point); external name '_LMSetRawMouseLocation';
+{
+ accesses "Mouse"
+ Carbon Usage: use GetGlobalMouse
+}
+{
+ * LMGetMouseLocation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetMouseLocation: Point; external name '_LMGetMouseLocation';
+{
+ * LMSetMouseLocation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetMouseLocation(value: Point); external name '_LMSetMouseLocation';
+{ accesses "TheCrsr" }
+{
+ * LMGetTheCursor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMGetTheCursor(var currentCursor: Cursor); external name '_LMGetTheCursor';
+
+{
+ * LMSetTheCursor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetTheCursor(const (*var*) newCursor: Cursor); external name '_LMSetTheCursor';
+
+
+{ accesses "HiHeapMark" }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetHighHeapMark()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetHighHeapMark: Ptr; external name '_LMGetHighHeapMark';
+{
+ * LMSetHighHeapMark()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetHighHeapMark(value: Ptr); external name '_LMSetHighHeapMark';
+{ accesses "StkLowPt" }
+{
+ * LMGetStackLowPoint()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetStackLowPoint: Ptr; external name '_LMGetStackLowPoint';
+{
+ * LMSetStackLowPoint()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetStackLowPoint(value: Ptr); external name '_LMSetStackLowPoint';
+{ accesses "ROMMapHndl" }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetROMMapHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetROMMapHandle: Handle; external name '_LMGetROMMapHandle';
+{
+ * LMSetROMMapHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetROMMapHandle(value: Handle); external name '_LMSetROMMapHandle';
+{ accesses "UnitNtryCnt" }
+{
+ * LMGetUnitTableEntryCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetUnitTableEntryCount: SInt16; external name '_LMGetUnitTableEntryCount';
+{
+ * LMSetUnitTableEntryCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetUnitTableEntryCount(value: SInt16); external name '_LMSetUnitTableEntryCount';
+{ accesses "FmtDefaults" }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * LMGetDiskFormatingHFSDefaults()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function LMGetDiskFormatingHFSDefaults: Ptr; external name '_LMGetDiskFormatingHFSDefaults';
+{
+ * LMSetDiskFormatingHFSDefaults()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure LMSetDiskFormatingHFSDefaults(value: Ptr); external name '_LMSetDiskFormatingHFSDefaults';
+{ accesses "PortAUse" }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * LMGetPortAInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetPortAInfo: ByteParameter; external name '_LMGetPortAInfo';
+{
+ * LMSetPortAInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetPortAInfo(value: ByteParameter); external name '_LMSetPortAInfo';
+{
+ * LMGetMBTicks()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetMBTicks: SInt32; external name '_LMGetMBTicks';
+{
+ * LMSetMBTicks()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetMBTicks(value: SInt32); external name '_LMSetMBTicks';
+{
+ * LMGetKeyTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function LMGetKeyTime: SInt32; external name '_LMGetKeyTime';
+{
+ * LMSetKeyTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 8.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure LMSetKeyTime(value: SInt32); external name '_LMSetKeyTime';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ALIGN MAC68K}
+
+
+{unit MacHelp}
+{
+ File: HIToolbox/MacHelp.h
+
+ Contains: Macintosh Help Package Interfaces.
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1998-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Help Manager constants, etc. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kMacHelpVersion = $0003;
+
+const
+ kHMHelpMenuID = -16490; { Resource ID and menu ID of help menu }
+
+type
+ HMContentRequest = SInt16;
+const
+ kHMSupplyContent = 0;
+ kHMDisposeContent = 1;
+
+type
+ HMContentType = UInt32;
+const
+ kHMNoContent = $6E6F6E65 (* 'none' *);
+ kHMCFStringContent = $63667374 (* 'cfst' *); { CFStringRef}
+ kHMCFStringLocalizedContent = $6366736C (* 'cfsl' *); { CFStringRef; name of a localized string. Supported by Jaguar and later.}
+ kHMPascalStrContent = $70737472 (* 'pstr' *);
+ kHMStringResContent = $73747223 (* 'str#' *);
+ kHMTEHandleContent = $74787468 (* 'txth' *); { Supported by CarbonLib and Jaguar and later}
+ kHMTextResContent = $74657874 (* 'text' *); { Supported by CarbonLib and Jaguar and later}
+ kHMStrResContent = $73747220 (* 'str ' *);
+
+
+{
+ * HMTagDisplaySide
+ *
+ * Discussion:
+ * Help tag display locations relative to absolute hot rect
+ }
+type
+ HMTagDisplaySide = SInt16;
+const
+{
+ * System default location
+ }
+ kHMDefaultSide = 0;
+
+ {
+ * Above, aligned with left or right depending on system script
+ }
+ kHMOutsideTopScriptAligned = 1;
+
+ {
+ * To the left, centered vertically
+ }
+ kHMOutsideLeftCenterAligned = 2;
+ kHMOutsideBottomScriptAligned = 3;
+
+ {
+ * To the right, centered vertically
+ }
+ kHMOutsideRightCenterAligned = 4;
+
+ {
+ * Above, aligned with left
+ }
+ kHMOutsideTopLeftAligned = 5;
+
+ {
+ * Above, aligned with right
+ }
+ kHMOutsideTopRightAligned = 6;
+
+ {
+ * To the left, aligned with top
+ }
+ kHMOutsideLeftTopAligned = 7;
+
+ {
+ * To the left, aligned with bottom
+ }
+ kHMOutsideLeftBottomAligned = 8;
+
+ {
+ * To the right, aligned with top
+ }
+ kHMOutsideBottomLeftAligned = 9;
+
+ {
+ * To the right, aligned with bottom
+ }
+ kHMOutsideBottomRightAligned = 10;
+ kHMOutsideRightTopAligned = 11;
+ kHMOutsideRightBottomAligned = 12;
+
+ {
+ * Above, centered horizontally
+ }
+ kHMOutsideTopCenterAligned = 13;
+
+ {
+ * Below, centered horizontally
+ }
+ kHMOutsideBottomCenterAligned = 14;
+
+ {
+ * Inside, aligned with right, centered vertically
+ }
+ kHMInsideRightCenterAligned = 15;
+
+ {
+ * Inside, aligned with left, centered vertically
+ }
+ kHMInsideLeftCenterAligned = 16;
+
+ {
+ * Inside, aligned with bottom, centered horizontally
+ }
+ kHMInsideBottomCenterAligned = 17;
+
+ {
+ * Inside, aligned with top, centered horizontally
+ }
+ kHMInsideTopCenterAligned = 18;
+
+ {
+ * Inside, aligned with top and left
+ }
+ kHMInsideTopLeftCorner = 19;
+
+ {
+ * Inside, aligned with top and right
+ }
+ kHMInsideTopRightCorner = 20;
+
+ {
+ * Inside, aligned with bottom and left
+ }
+ kHMInsideBottomLeftCorner = 21;
+
+ {
+ * Inside, aligned with bottom and right
+ }
+ kHMInsideBottomRightCorner = 22;
+
+ {
+ * Centered vertically and horizontally
+ }
+ kHMAbsoluteCenterAligned = 23;
+
+{ Obsoleted constants HMTagDisplaySides, use the new ones, please }
+const
+ kHMTopSide = kHMOutsideTopScriptAligned;
+ kHMLeftSide = kHMOutsideLeftCenterAligned;
+ kHMBottomSide = kHMOutsideBottomScriptAligned;
+ kHMRightSide = kHMOutsideRightCenterAligned;
+ kHMTopLeftCorner = kHMOutsideTopLeftAligned;
+ kHMTopRightCorner = kHMOutsideTopRightAligned;
+ kHMLeftTopCorner = kHMOutsideLeftTopAligned;
+ kHMLeftBottomCorner = kHMOutsideLeftBottomAligned;
+ kHMBottomLeftCorner = kHMOutsideBottomLeftAligned;
+ kHMBottomRightCorner = kHMOutsideBottomRightAligned;
+ kHMRightTopCorner = kHMOutsideRightTopAligned;
+ kHMRightBottomCorner = kHMOutsideRightBottomAligned;
+
+type
+ HMContentProvidedType = SInt16;
+const
+ kHMContentProvided = 0;
+ kHMContentNotProvided = 1;
+ kHMContentNotProvidedDontPropagate = 2;
+
+const
+ kHMMinimumContentIndex = 0; { first entry in HMHelpContentRec.content is the minimum content }
+ kHMMaximumContentIndex = 1; { second entry in HMHelpContentRec.content is the maximum content }
+
+const
+ errHMIllegalContentForMinimumState = -10980; { unrecognized content type for minimum content }
+ errHMIllegalContentForMaximumState = -10981; { unrecognized content type for maximum content }
+
+{ obsolete names; will be removed}
+const
+ kHMIllegalContentForMinimumState = errHMIllegalContentForMinimumState;
+
+const
+ kHelpTagEventHandlerTag = $68657674 (* 'hevt' *);
+
+type
+ HMStringResType = record
+ hmmResID: SInt16;
+ hmmIndex: SInt16;
+ end;
+type
+ HMHelpContent = record
+ contentType: HMContentType;
+ case SInt16 of
+ 0: (
+ tagCFString: CFStringRef; { CFStringRef }
+ );
+ 1: (
+ tagString: Str255; { Pascal String }
+ );
+ 2: (
+ tagStringRes: HMStringResType; { STR# resource ID and index }
+ );
+ 3: (
+ tagTEHandle: TEHandle; { TextEdit handle (NOT SUPPORTED ON MAC OS X) }
+ );
+ 4: (
+ tagTextRes: SInt16; { TEXT/styl resource ID (NOT SUPPORTED ON MAC OS X) }
+ );
+ 5: (
+ tagStrRes: SInt16; { STR resource ID }
+ );
+ end;
+type
+ HMHelpContentRec = record
+ version: SInt32;
+ absHotRect: Rect;
+ tagSide: HMTagDisplaySide;
+ content: array [0..1] of HMHelpContent;
+ end;
+ HMHelpContentPtr = ^HMHelpContentRec;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Callback procs }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
+type
+ HMControlContentProcPtr = function( inControl: ControlRef; inGlobalMouse: Point; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr ): OSStatus;
+type
+ HMWindowContentProcPtr = function( inWindow: WindowRef; inGlobalMouse: Point; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr ): OSStatus;
+type
+ HMMenuTitleContentProcPtr = function( inMenu: MenuRef; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr ): OSStatus;
+type
+ HMMenuItemContentProcPtr = function( const (*var*) inTrackingData: MenuTrackingData; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr ): OSStatus;
+type
+ HMControlContentUPP = HMControlContentProcPtr;
+type
+ HMWindowContentUPP = HMWindowContentProcPtr;
+type
+ HMMenuTitleContentUPP = HMMenuTitleContentProcPtr;
+type
+ HMMenuItemContentUPP = HMMenuItemContentProcPtr;
+{
+ * NewHMControlContentUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewHMControlContentUPP( userRoutine: HMControlContentProcPtr ): HMControlContentUPP; external name '_NewHMControlContentUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewHMWindowContentUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewHMWindowContentUPP( userRoutine: HMWindowContentProcPtr ): HMWindowContentUPP; external name '_NewHMWindowContentUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewHMMenuTitleContentUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewHMMenuTitleContentUPP( userRoutine: HMMenuTitleContentProcPtr ): HMMenuTitleContentUPP; external name '_NewHMMenuTitleContentUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewHMMenuItemContentUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewHMMenuItemContentUPP( userRoutine: HMMenuItemContentProcPtr ): HMMenuItemContentUPP; external name '_NewHMMenuItemContentUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeHMControlContentUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeHMControlContentUPP( userUPP: HMControlContentUPP ); external name '_DisposeHMControlContentUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeHMWindowContentUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeHMWindowContentUPP( userUPP: HMWindowContentUPP ); external name '_DisposeHMWindowContentUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeHMMenuTitleContentUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeHMMenuTitleContentUPP( userUPP: HMMenuTitleContentUPP ); external name '_DisposeHMMenuTitleContentUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeHMMenuItemContentUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeHMMenuItemContentUPP( userUPP: HMMenuItemContentUPP ); external name '_DisposeHMMenuItemContentUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeHMControlContentUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeHMControlContentUPP( inControl: ControlRef; inGlobalMouse: Point; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr; userUPP: HMControlContentUPP ): OSStatus; external name '_InvokeHMControlContentUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeHMWindowContentUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeHMWindowContentUPP( inWindow: WindowRef; inGlobalMouse: Point; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr; userUPP: HMWindowContentUPP ): OSStatus; external name '_InvokeHMWindowContentUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeHMMenuTitleContentUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeHMMenuTitleContentUPP( inMenu: MenuRef; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr; userUPP: HMMenuTitleContentUPP ): OSStatus; external name '_InvokeHMMenuTitleContentUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeHMMenuItemContentUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeHMMenuItemContentUPP( const (*var*) inTrackingData: MenuTrackingData; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr; userUPP: HMMenuItemContentUPP ): OSStatus; external name '_InvokeHMMenuItemContentUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ API }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Help Menu }
+{
+ * HMGetHelpMenu()
+ *
+ * Summary:
+ * Returns a menu to which applications may add their own help items.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * outHelpMenu:
+ * On exit, contains the help menu.
+ *
+ * outFirstCustomItemIndex:
+ * On exit, contains the menu item index that will be used by the
+ * first item added by the application. This parameter may be NULL.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function HMGetHelpMenu( var outHelpMenu: MenuRef; outFirstCustomItemIndex: MenuItemIndexPtr { can be NULL } ): OSStatus; external name '_HMGetHelpMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Installing/Retrieving Content }
+{ Menu title and item help tags are not supported by CarbonLib. They are fully supported on Mac OS X. }
+{ Pass NULL for the inContent parameter of HMSetControl/Window/MenuItemHelpContent to remove help content
+ from a control, window, or menu. }
+{
+ * HMSetControlHelpContent()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMSetControlHelpContent( inControl: ControlRef; {const} inContent: HMHelpContentPtr { can be NULL } ): OSStatus; external name '_HMSetControlHelpContent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMGetControlHelpContent()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMGetControlHelpContent( inControl: ControlRef; var outContent: HMHelpContentRec ): OSStatus; external name '_HMGetControlHelpContent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMSetWindowHelpContent()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMSetWindowHelpContent( inWindow: WindowRef; {const} inContent: HMHelpContentPtr { can be NULL } ): OSStatus; external name '_HMSetWindowHelpContent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMGetWindowHelpContent()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMGetWindowHelpContent( inWindow: WindowRef; var outContent: HMHelpContentRec ): OSStatus; external name '_HMGetWindowHelpContent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMSetMenuItemHelpContent()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMSetMenuItemHelpContent( inMenu: MenuRef; inItem: MenuItemIndex; {const} inContent: HMHelpContentPtr { can be NULL } ): OSStatus; external name '_HMSetMenuItemHelpContent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMGetMenuItemHelpContent()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMGetMenuItemHelpContent( inMenu: MenuRef; inItem: MenuItemIndex; var outContent: HMHelpContentRec ): OSStatus; external name '_HMGetMenuItemHelpContent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Installing/Retrieving Content Callbacks }
+{
+ * HMInstallControlContentCallback()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMInstallControlContentCallback( inControl: ControlRef; inContentUPP: HMControlContentUPP ): OSStatus; external name '_HMInstallControlContentCallback';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMInstallWindowContentCallback()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMInstallWindowContentCallback( inWindow: WindowRef; inContentUPP: HMWindowContentUPP ): OSStatus; external name '_HMInstallWindowContentCallback';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMInstallMenuTitleContentCallback()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMInstallMenuTitleContentCallback( inMenu: MenuRef; inContentUPP: HMMenuTitleContentUPP ): OSStatus; external name '_HMInstallMenuTitleContentCallback';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMInstallMenuItemContentCallback()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMInstallMenuItemContentCallback( inMenu: MenuRef; inContentUPP: HMMenuItemContentUPP ): OSStatus; external name '_HMInstallMenuItemContentCallback';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMGetControlContentCallback()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMGetControlContentCallback( inControl: ControlRef; var outContentUPP: HMControlContentUPP ): OSStatus; external name '_HMGetControlContentCallback';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMGetWindowContentCallback()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMGetWindowContentCallback( inWindow: WindowRef; var outContentUPP: HMWindowContentUPP ): OSStatus; external name '_HMGetWindowContentCallback';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMGetMenuTitleContentCallback()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMGetMenuTitleContentCallback( inMenu: MenuRef; var outContentUPP: HMMenuTitleContentUPP ): OSStatus; external name '_HMGetMenuTitleContentCallback';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMGetMenuItemContentCallback()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMGetMenuItemContentCallback( inMenu: MenuRef; var outContentUPP: HMMenuItemContentUPP ): OSStatus; external name '_HMGetMenuItemContentCallback';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Enabling and Disabling Help Tags }
+{
+ * HMAreHelpTagsDisplayed()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMAreHelpTagsDisplayed: Boolean; external name '_HMAreHelpTagsDisplayed';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMSetHelpTagsDisplayed()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMSetHelpTagsDisplayed( inDisplayTags: Boolean ): OSStatus; external name '_HMSetHelpTagsDisplayed';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMSetTagDelay()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMSetTagDelay( inDelay: Duration ): OSStatus; external name '_HMSetTagDelay';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMGetTagDelay()
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMGetTagDelay( var outDelay: Duration ): OSStatus; external name '_HMGetTagDelay';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Compatibility }
+{
+ * HMSetMenuHelpFromBalloonRsrc()
+ *
+ * Summary:
+ * Not really implemented.
+ *
+ * Discussion:
+ * Though this API is exported from CarbonLib and Mac OS X, it is
+ * completely non-functional. We have no plans to implement it.
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMSetMenuHelpFromBalloonRsrc( inMenu: MenuRef; inHmnuRsrcID: SInt16 ): OSStatus; external name '_HMSetMenuHelpFromBalloonRsrc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMSetDialogHelpFromBalloonRsrc()
+ *
+ * Summary:
+ * Not really implemented.
+ *
+ * Discussion:
+ * Though this API is exported from CarbonLib and Mac OS X, it is
+ * completely non-functional. We have no plans to implement it.
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function HMSetDialogHelpFromBalloonRsrc( inDialog: DialogRef; inHdlgRsrcID: SInt16; inItemStart: SInt16 ): OSStatus; external name '_HMSetDialogHelpFromBalloonRsrc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Displaying tags }
+{
+ * HMDisplayTag()
+ *
+ * Summary:
+ * Displays a help tag at a user-defined location.
+ *
+ * Discussion:
+ * Note that HMDisplayTag does not currently retain the help content
+ * that is passed to it, nor release it when the tag is closed. Your
+ * application must ensure that the help content remains valid as
+ * long as the tag may be visible (which effectively means that your
+ * application should never dispose of help content that is passed
+ * to HMDisplayTag).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inContent:
+ * HMHelpContentRec describing the help tag to be displayed.
+ *
+ * Result:
+ * An OSStatus code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HMDisplayTag( const (*var*) inContent: HMHelpContentRec ): OSStatus; external name '_HMDisplayTag';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * HMHideTag()
+ *
+ * Summary:
+ * HMHideTag hides the currently visible help tag. If there is no
+ * current help tag, this call does nothing.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * An OSStatus code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.2 and later
+ * Non-Carbon CFM: not available
+ }
+function HMHideTag: OSStatus; external name '_HMHideTag';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{
+ * Summary:
+ * Values for the inOptions parameter to HMHideTagWithOptions.
+ }
+const
+{
+ * Causes the tag to fade out when hidden. If this flag is not
+ * specified, the tag is hidden without fading.
+ }
+ kHMHideTagFade = 1 shl 0;
+
+ {
+ * Causes the tag to begin hiding immediately. If this flag is not
+ * specified, the tag is hidden after a short delay (currently 0.75
+ * second).
+ }
+ kHMHideTagImmediately = 1 shl 1;
+
+{
+ * HMHideTagWithOptions()
+ *
+ * Summary:
+ * Hides the current help tag, with various options to control how
+ * the tag is hidden.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inOptions:
+ * Options for how the tag should be hidden. kHMHideTagFade and
+ * kHMHideTagImmediately are the only available options.
+ *
+ * Result:
+ * An operating system result code. noErr is returned if there is no
+ * tag currently visible.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x
+ * Non-Carbon CFM: not available
+ }
+function HMHideTagWithOptions( inOptions: OptionBits ): OSStatus; external name '_HMHideTagWithOptions';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+
+
+{unit MacTextEditor}
+{
+ File: HIToolbox/MacTextEditor.h
+
+ Contains: Interfaces for Multilingual Text Engine (MLTE)
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1996-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{$ALIGN MAC68K}
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Various Defs }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+type
+ TXNObject = ^SInt32; { an opaque 32-bit type }
+ TXNObjectPtr = ^TXNObject; { when a var xx:TXNObject parameter can be nil, it is changed to xx: TXNObjectPtr }
+type
+ TXNFontMenuObject = ^SInt32; { an opaque 32-bit type }
+ TXNFontMenuObjectPtr = ^TXNFontMenuObject; { when a var xx:TXNFontMenuObject parameter can be nil, it is changed to xx: TXNFontMenuObjectPtr }
+type
+ TXNVersionValue = UInt32;
+
+{
+ * TXNFrameID
+ *
+ * Summary:
+ * Deprecated. Pass NULL for any API which uses this type as a
+ * parameter.
+ }
+type
+ TXNFrameID = UInt32;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Error Status }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ MLTE status errors assigned is -22000 through -22039. See MacErrors.h for -22000 to -22018. }
+
+const
+ kTXNDisabledFunctionalityErr = -22019; { This routine's functionality is disabled.}
+ kTXNOperationNotAllowedErr = -22020; { Returned by MLTE API if function cannot be applied. }
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Feature Bits }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Useful for the TXNVersionInformation API. }
+
+const
+ kTXNWillDefaultToATSUIBit = 0;
+ kTXNWillDefaultToCarbonEventBit = 1; { Ignored - Carbon events are always used in Mac OS X version 10.1 and later.}
+
+type
+ TXNFeatureBits = OptionBits;
+const
+ kTXNWillDefaultToATSUIMask = 1 shl kTXNWillDefaultToATSUIBit;
+ kTXNWillDefaultToCarbonEventMask = 1 shl kTXNWillDefaultToCarbonEventBit;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Initialization Bits }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Useful for the TXNInitTextension API. }
+
+const
+ kTXNWantMoviesBit = 0;
+ kTXNWantSoundBit = 1;
+ kTXNWantGraphicsBit = 2;
+ kTXNAlwaysUseQuickDrawTextBit = 3;
+ kTXNUseTemporaryMemoryBit = 4;
+
+type
+ TXNInitOptions = OptionBits;
+const
+ kTXNWantMoviesMask = 1 shl kTXNWantMoviesBit;
+ kTXNWantSoundMask = 1 shl kTXNWantSoundBit;
+ kTXNWantGraphicsMask = 1 shl kTXNWantGraphicsBit;
+ kTXNAlwaysUseQuickDrawTextMask = 1 shl kTXNAlwaysUseQuickDrawTextBit;
+ kTXNUseTemporaryMemoryMask = 1 shl kTXNUseTemporaryMemoryBit;
+
+{ Default constants }
+
+const
+ kTXNDefaultFontName = nil;
+
+const
+ kTXNDefaultFontSize = $000C0000;
+
+const
+ kTXNDefaultFontStyle = normal;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ FrameOption Bits }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Useful for the TXNNewObject and TXNCreateObject APIs. }
+
+const
+ kTXNDrawGrowIconBit = 0;
+ kTXNShowWindowBit = 1;
+ kTXNWantHScrollBarBit = 2;
+ kTXNWantVScrollBarBit = 3;
+ kTXNReadOnlyBit = 5;
+ kTXNNoKeyboardSyncBit = 6;
+ kTXNNoSelectionBit = 7;
+ kTXNSaveStylesAsSTYLResourceBit = 8;
+ kOutputTextInUnicodeEncodingBit = 9;
+ kTXNDoNotInstallDragProcsBit = 10;
+ kTXNAlwaysWrapAtViewEdgeBit = 11;
+ kTXNDontDrawSelectionWhenInactiveBit = 13;
+ kTXNSingleLineOnlyBit = 14;
+ kTXNDisableDragAndDropBit = 15;
+ kTXNMonostyledTextBit = 17;
+ kTXNDoFontSubstitutionBit = 22;
+
+
+{
+ * TXNFrameOptions
+ *
+ * Summary:
+ * Defines the initial behavior of an MLTE object created with
+ * TXNCreateObject/TXNNewObject.
+ *
+ * Discussion:
+ * These masks can be combined and passed to
+ * TXNCreateObject/TXNNewObject to define the initial behavior of a
+ * new object.
+ }
+type
+ TXNFrameOptions = OptionBits;
+const
+{
+ * Indicates that the frame will have a size box.
+ }
+ kTXNDrawGrowIconMask = 1 shl kTXNDrawGrowIconBit;
+
+ {
+ * Indicates that the window associated with the text object will be
+ * displayed when the object is created. The application no longer
+ * needs to call the ShowWindow function from the Window Manager;
+ * MLTE will do this for you.
+ }
+ kTXNShowWindowMask = 1 shl kTXNShowWindowBit;
+
+ {
+ * Indicates that the frame will have a horizontal scrollbar. The
+ * scrollbar will be enabled upon creation. If there are multiple
+ * MLTE objects in the same window, the client will need to
+ * explicitly disable the scrollbars for those inactive MLTE objects.
+ * Use TXNSetScrollbarState to deactivate the scrollbar.
+ }
+ kTXNWantHScrollBarMask = 1 shl kTXNWantHScrollBarBit;
+
+ {
+ * Indicates that the frame will have a vertical scrollbar. The
+ * scrollbar will be enabled upon creation. If there are multiple
+ * MLTE objects in the same window, the client will need to
+ * explicitly disable the scrollbars for those inactive MLTE objects.
+ * Use TXNSetScrollbarState to deactivate the scrollbar.
+ }
+ kTXNWantVScrollBarMask = 1 shl kTXNWantVScrollBarBit;
+
+ {
+ * Indicates that the text object will be read-only. It is
+ * equivalent to setting the object into NoUserIO mode, via the tag
+ * kTXNNoUserIOTag in TXNSetTXNObjectControls. See description in
+ * individual API to determine if the API will still work in NoUserIO
+ * mode.
+ }
+ kTXNReadOnlyMask = 1 shl kTXNReadOnlyBit;
+
+ {
+ * Indicates that keyboard synchronization will not occur.
+ }
+ kTXNNoKeyboardSyncMask = 1 shl kTXNNoKeyboardSyncBit;
+
+ {
+ * Indicates that the user shouldn't be able to set the insertion
+ * point or make a selection.
+ }
+ kTXNNoSelectionMask = 1 shl kTXNNoSelectionBit;
+
+ {
+ * Indicates that the text style will be saved as a
+ * kTXNMultipleStylesPerTextDocumentResType resource. You can set
+ * this to assure compatibility with SimpleText. If you use
+ * kTXNMultipleStylesPerTextDocumentResType resources to save style
+ * info, your documents can have as many styles as you'd like.
+ * However tabs are not saved. If you don't use this mask, plain
+ * text files are saved as kTXNSingleStylePerTextDocumentResType
+ * resources, and only the first style in the document is saved.
+ * (Your application is expected to apply all style changes to the
+ * entire document.) If you save files with a
+ * kTXNSingleStylePerTextDocumentResType resource, their output is
+ * similar to those output by CodeWarrior, BBEdit, and MPW.
+ }
+ kTXNSaveStylesAsSTYLResourceMask = 1 shl kTXNSaveStylesAsSTYLResourceBit;
+
+ {
+ * Indicates that plain text will be saved as Unicode.
+ }
+ kOutputTextInUnicodeEncodingMask = 1 shl kOutputTextInUnicodeEncodingBit;
+
+ {
+ * Indicates that MLTE will not install its own drag handler for the
+ * text object. This can be used if the client wants to install
+ * their own handler.
+ }
+ kTXNDoNotInstallDragProcsMask = 1 shl kTXNDoNotInstallDragProcsBit;
+
+ {
+ * Indicates that lines will wrap at the edge of the view rectangle.
+ }
+ kTXNAlwaysWrapAtViewEdgeMask = 1 shl kTXNAlwaysWrapAtViewEdgeBit;
+
+ {
+ * Indicates that the selection (if one) shouldn't be drawn when the
+ * text object doesn't have focus.
+ }
+ kTXNDontDrawSelectionWhenInactiveMask = 1 shl kTXNDontDrawSelectionWhenInactiveBit;
+
+ {
+ * Indicates that the text object will not scroll vertically,
+ * horizontal scrolling will stop when the end of the text is visible
+ * (plus any right margin), and there will be no limit to the width
+ * of the text.
+ }
+ kTXNSingleLineOnlyMask = 1 shl kTXNSingleLineOnlyBit;
+
+ {
+ * Indicates that drag and drop will not be allowed in the text
+ * object.
+ }
+ kTXNDisableDragAndDropMask = 1 shl kTXNDisableDragAndDropBit;
+
+ {
+ * Indicates that the text object will keep in single style no matter
+ * what kind of changes made to the object. Mac OS X only.
+ }
+ kTXNMonostyledTextMask = 1 shl kTXNMonostyledTextBit;
+
+ {
+ * Indicates that ATSUI font substitution will be used. Mac OS X
+ * only.
+ }
+ kTXNDoFontSubstitutionMask = 1 shl kTXNDoFontSubstitutionBit;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ TextBox Option Bits }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Useful for TXNDrawUnicodeTextBox and TXNDrawCFStringTextBox APIs. }
+
+const
+ kTXNSetFlushnessBit = 0;
+ kTXNSetJustificationBit = 1;
+ kTXNUseFontFallBackBit = 2;
+ kTXNRotateTextBit = 3;
+ kTXNUseVerticalTextBit = 4;
+ kTXNDontUpdateBoxRectBit = 5;
+ kTXNDontDrawTextBit = 6;
+ kTXNUseCGContextRefBit = 7;
+ kTXNDontWrapTextBit = 9;
+
+
+{
+ * TXNTextBoxOptions
+ *
+ * Summary:
+ * Defines how text will be drawn by the TXNDrawUnicodeTextBox and
+ * TXNDrawCFStringTextBox APIs.
+ *
+ * Discussion:
+ * These masks can be combined and added to a TXNTextBoxOptionsData
+ * structure to be passed to the TXNDrawUnicodeTextBox and
+ * TXNDrawCFStringTextBox APIs.
+ }
+type
+ TXNTextBoxOptions = OptionBits;
+const
+{
+ * Indicates that the text will be flush according to the line
+ * direction.
+ }
+ kTXNSetFlushnessMask = 1 shl kTXNSetFlushnessBit;
+
+ {
+ * Indicates that the text will be justified in the direction that
+ * the text is displayed. Horizontal text will be justified
+ * horizontally, but not vertically. Vertical text will be justified
+ * vertically, but not horizontally.
+ }
+ kTXNSetJustificationMask = 1 shl kTXNSetJustificationBit;
+
+ {
+ * Indicates that ATSUI font substitution (that searches for a font
+ * that has a matching character) will be used.
+ }
+ kTXNUseFontFallBackMask = 1 shl kTXNUseFontFallBackBit;
+
+ {
+ * Indicates that the text will be rotated. The amount of rotation
+ * is given in the rotation field of the TXNTextBoxOptionsData
+ * structure and is in units of degrees (negative values indicate
+ * clockwise rotation).
+ }
+ kTXNRotateTextMask = 1 shl kTXNRotateTextBit;
+
+ {
+ * Indicates that the text will be displayed vertically from top to
+ * bottom.
+ }
+ kTXNUseVerticalTextMask = 1 shl kTXNUseVerticalTextBit;
+
+ {
+ * Indicates that the specified rectangle will not be updated. If
+ * you use this mask when you call a TXNDrawxxxTextBox function, the
+ * function does not update the right coordinate (bottom coordinate
+ * if kTXNUseVerticalTextMask is used) of the specified rectangle to
+ * accommodate the longest line for text.
+ }
+ kTXNDontUpdateBoxRectMask = 1 shl kTXNDontUpdateBoxRectBit;
+
+ {
+ * Indicates that the size of the text will be returned but the text
+ * box will not be drawn.
+ }
+ kTXNDontDrawTextMask = 1 shl kTXNDontDrawTextBit;
+
+ {
+ * Indicates that the client has provided a CGContext to be used for
+ * CG imaging inside the text box. Pass the CGContextRef in the
+ * options field of the TXNTextBoxOptionsData structure. Mac OS X
+ * only.
+ }
+ kTXNUseCGContextRefMask = 1 shl kTXNUseCGContextRefBit;
+
+ {
+ * Indicates that text should not be wrapped. Mac OS X only.
+ }
+ kTXNDontWrapTextMask = 1 shl kTXNDontWrapTextBit;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ TextBox Options Data }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+type
+ TXNTextBoxOptionsDataPtr = ^TXNTextBoxOptionsData;
+ TXNTextBoxOptionsData = record
+ optionTags: TXNTextBoxOptions;
+ flushness: Fract;
+ justification: Fract;
+ rotation: Fixed;
+ options: UnivPtr;
+ end;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ File Types }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNFileType
+ *
+ * Discussion:
+ * Useful for TXNNewObject and TXNSave APIs.
+ }
+type
+ TXNFileType = OSType;
+const
+ kTXNTextensionFile = $7478746E (* 'txtn' *);
+ kTXNTextFile = $54455854 (* 'TEXT' *);
+ kTXNPictureFile = $50494354 (* 'PICT' *);
+ kTXNMovieFile = $4D6F6F56 (* 'MooV' *);
+ kTXNSoundFile = $7366696C (* 'sfil' *);
+ kTXNAIFFFile = $41494646 (* 'AIFF' *);
+ kTXNUnicodeTextFile = $75747874 (* 'utxt' *);
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Text Encoding Types }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNPermanentTextEncodingType
+ *
+ * Discussion:
+ * Useful for TXNNewObject and TXNSave APIs.
+ }
+type
+ TXNPermanentTextEncodingType = UInt32;
+const
+ kTXNSystemDefaultEncoding = 0;
+ kTXNMacOSEncoding = 1;
+ kTXNUnicodeEncoding = 2;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Data Types }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+type
+ TXNDataTypePtr = ^TXNDataType;
+ TXNDataType = OSType;
+const
+ kTXNTextData = $54455854 (* 'TEXT' *);
+ kTXNPictureData = $50494354 (* 'PICT' *);
+ kTXNMovieData = $6D6F6F76 (* 'moov' *);
+ kTXNSoundData = $736E6420 (* 'snd ' *);
+ kTXNUnicodeTextData = $75747874 (* 'utxt' *);
+ kTXNTextAndMultimediaData = $7478746E (* 'txtn' *);
+ kTXNRichTextFormatData = $52544620 (* 'RTF ' *);
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Action constants used in undo/redo functions }
+{ In Mac OS X version 10.4 and later TXNActionKey is deprecated. }
+{ The following action constants should be used instead. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * kTXNActionTyping
+ *
+ * Discussion:
+ * Denotes a typing action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionTyping: CFStringRef; external name '_kTXNActionTyping'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionCut
+ *
+ * Discussion:
+ * Denotes a cut action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionCut: CFStringRef; external name '_kTXNActionCut'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionPaste
+ *
+ * Discussion:
+ * Denotes a paste action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionPaste: CFStringRef; external name '_kTXNActionPaste'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionClear
+ *
+ * Discussion:
+ * Denotes a clear action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionClear: CFStringRef; external name '_kTXNActionClear'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionChangeFont
+ *
+ * Discussion:
+ * Denotes a change font action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionChangeFont: CFStringRef; external name '_kTXNActionChangeFont'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionChangeColor
+ *
+ * Discussion:
+ * Denotes a change color action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionChangeColor: CFStringRef; external name '_kTXNActionChangeColor'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionChangeSize
+ *
+ * Discussion:
+ * Denotes a change size action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionChangeSize: CFStringRef; external name '_kTXNActionChangeSize'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionChangeStyle
+ *
+ * Discussion:
+ * Denotes a change style action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionChangeStyle: CFStringRef; external name '_kTXNActionChangeStyle'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionAlignLeft
+ *
+ * Discussion:
+ * Denotes an align left action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionAlignLeft: CFStringRef; external name '_kTXNActionAlignLeft'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionAlignCenter
+ *
+ * Discussion:
+ * Denotes an align center action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionAlignCenter: CFStringRef; external name '_kTXNActionAlignCenter'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionAlignRight
+ *
+ * Discussion:
+ * Denotes an align right action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionAlignRight: CFStringRef; external name '_kTXNActionAlignRight'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionDrop
+ *
+ * Discussion:
+ * Denotes a drop action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionDrop: CFStringRef; external name '_kTXNActionDrop'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionMove
+ *
+ * Discussion:
+ * Denotes a move action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionMove: CFStringRef; external name '_kTXNActionMove'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionChangeFontFeature
+ *
+ * Discussion:
+ * Denotes a change font feature action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionChangeFontFeature: CFStringRef; external name '_kTXNActionChangeFontFeature'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionChangeFontVariation
+ *
+ * Discussion:
+ * Denotes a change font variation action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionChangeFontVariation: CFStringRef; external name '_kTXNActionChangeFontVariation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionChangeGlyphVariation
+ *
+ * Discussion:
+ * Denotes a change glyph variation action.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionChangeGlyphVariation: CFStringRef; external name '_kTXNActionChangeGlyphVariation'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionChangeTextPosition
+ *
+ * Discussion:
+ * Denotes a change text's position action, which includes changing
+ * the space before/after characters and shifting the text's
+ * baseline.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionChangeTextPosition: CFStringRef; external name '_kTXNActionChangeTextPosition'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionUndoLast
+ *
+ * Discussion:
+ * Used in undo/redo functions if none of the other constants apply.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionUndoLast: CFStringRef; external name '_kTXNActionUndoLast'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Format Setting Constants }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+type
+ TXNTabType = SInt8;
+const
+ kTXNRightTab = -1;
+ kTXNLeftTab = 0;
+ kTXNCenterTab = 1;
+
+type
+ TXNTabPtr = ^TXNTab;
+ TXNTab = record
+ value: SInt16;
+ tabType: TXNTabType;
+ filler: SInt8;
+ end;
+const
+ kTXNLeftToRight = 0;
+ kTXNRightToLeft = 1;
+
+const
+ kTXNFlushDefault = 0; { Flush according to the line direction }
+ kTXNFlushLeft = 1;
+ kTXNFlushRight = 2;
+ kTXNCenter = 4;
+ kTXNFullJust = 8;
+ kTXNForceFullJust = 16; { Flush left and right for all lines }
+
+
+{
+ * TXNMargins
+ *
+ * Discussion:
+ * In MLTE version 1.2 and later you can change the top, left and
+ * right margins.
+ }
+type
+ TXNMarginsPtr = ^TXNMargins;
+ TXNMargins = record
+ topMargin: SInt16;
+ leftMargin: SInt16;
+ bottomMargin: SInt16;
+
+ {
+ * The bottom margin is a placeholder for possible future
+ * enhancements.
+ }
+ rightMargin: SInt16;
+ end;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Tags }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNControlTag
+ *
+ }
+type
+ TXNControlTag = FourCharCode;
+ TXNControlTagPtr = ^TXNControlTag; { when a VAR xx: TXNControlTag parameter can be nil, it is changed to xx: TXNControlTagPtr }
+const
+ kTXNLineDirectionTag = $6C6E6472 (* 'lndr' *); { Not functional when userIO is not allowed }
+ kTXNJustificationTag = $6A757374 (* 'just' *); { Not functional when userIO is not allowed }
+ kTXNIOPrivilegesTag = $696F7076 (* 'iopv' *);
+ kTXNSelectionStateTag = $736C7374 (* 'slst' *);
+ kTXNInlineStateTag = $696E7374 (* 'inst' *);
+ kTXNWordWrapStateTag = $77777273 (* 'wwrs' *);
+ kTXNKeyboardSyncStateTag = $6B627379 (* 'kbsy' *);
+ kTXNAutoIndentStateTag = $6175696E (* 'auin' *);
+ kTXNTabSettingsTag = $74616273 (* 'tabs' *);
+ kTXNRefConTag = $7266636E (* 'rfcn' *);
+ kTXNMarginsTag = $6D617267 (* 'marg' *);
+ kTXNFlattenMoviesTag = $666C6174 (* 'flat' *);
+ kTXNDoFontSubstitution = $66537562 (* 'fSub' *); { Note: This can degrade performance greatly in the case of large documents }
+ kTXNNoUserIOTag = $6E75696F (* 'nuio' *);
+
+ {
+ * In Mac OS X version 10.4 and later this constant is deprecated.
+ * The functions TXNSetEventTarget and TXNGetEventTarget should be
+ * used instead.
+ }
+ kTXNUseCarbonEvents = $63626362 (* 'cbcb' *);
+ kTXNDrawSelectionWhenInactiveTag = $64736C6E (* 'dsln' *);
+ kTXNDisableDragAndDropTag = $64726167 (* 'drag' *);
+ kTXNSingleLevelUndoTag = $756E646F (* 'undo' *); { Set this state during creation of the object. Switching Undo level back and forth is not recommended.}
+ kTXNVisibilityTag = $76697362 (* 'visb' *); { Set the visibility state of the object }
+
+ {
+ * In Mac OS X version 10.4 or later use this tag to disable and
+ * re-enable layout and drawing. It optimizes performance when adding
+ * data incrementally to a text object.
+ }
+ kTXNDisableLayoutAndDrawTag = kTXNVisibilityTag; { Turn on / off layout and drawing. Same as kTXNVisibilityTag but makes clear what the tag does}
+
+ {
+ * In Mac OS X version 10.4 or later use this constant to set
+ * autoscroll behaviour. See the discussion below for the enum
+ * TXNAutoScrollBehavior for the types of autoscrolling supported.
+ }
+ kTXNAutoScrollBehaviorTag = $73626576 (* 'sbev' *);
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Convenience Constants for TXNGet/SetTXNControls }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+const
+ kTXNClearThisControl = $FFFFFFFF; { To clear an object control setting }
+ kTXNClearTheseFontFeatures = $80000000; { To clear ATSUI font feature(s) }
+
+{ kTXNIOPrivilegesTag}
+const
+ kTXNReadWrite = false;
+ kTXNReadOnly = true;
+
+{ kTXNSelectionStateTag}
+const
+ kTXNSelectionOn = true;
+ kTXNSelectionOff = false;
+
+{ kTXNInlineStateTag}
+const
+ kTXNUseInline = false;
+ kTXNUseBottomline = true;
+
+{ kTXNWordWrapStateTag}
+const
+ kTXNAutoWrap = false;
+ kTXNNoAutoWrap = true;
+
+{ kTXNKeyboardSyncStateTag}
+const
+ kTXNSyncKeyboard = false;
+ kTXNNoSyncKeyboard = true;
+
+{ kTXNAutoIndentStateTag}
+const
+ kTXNAutoIndentOff = false;
+ kTXNAutoIndentOn = true;
+
+{ kTXNDrawSelectionWhenInactiveTag}
+const
+ kTXNDontDrawSelectionWhenInactive = false;
+ kTXNDrawSelectionWhenInactive = true;
+
+{ kTXNDisableDragAndDropTag}
+const
+ kTXNEnableDragAndDrop = false;
+ kTXNDisableDragAndDrop = true;
+
+{kTXNDisableLayoutAndDraw}
+const
+ kTXNDisableLayoutAndDraw = true;
+ kTXNEnableLayoutAndDraw = false;
+
+type
+ TXNControlDataPtr = ^TXNControlData;
+ TXNControlData = record
+ case SInt16 of
+ 0: (
+ uValue: UInt32;
+ );
+ 1: (
+ sValue: SInt32;
+ );
+ 2: (
+ tabValue: TXNTab;
+ );
+ 3: (
+ marginsPtr: TXNMarginsPtr;
+ );
+ end;
+
+{
+ * TXNAutoScrollBehavior
+ *
+ * Summary:
+ * Set of values that can be passed to the function
+ * TXNSetTXNObjectControls along with the control tag
+ * kTXNAutoScrollBehaviorTag to control scrolling behavior.
+ *
+ * Discussion:
+ * Beginning with Mac OS X version 10.4, MLTE supports 3 types of
+ * autoscroll behavior. These are: always scroll a new insertion
+ * into view, only scroll if the insertion point was visible and the
+ * end of the new insertion is out of view, and never auto scroll
+ * under any circumstance.
+ }
+type
+ TXNAutoScrollBehavior = UInt32;
+const
+{
+ * The default auto scrolling behavior. When text is inserted the
+ * document is scrolled to show the new insertion. This was the only
+ * type of autoscrolling prior to Mac OS X version 10.4.
+ }
+ kTXNAutoScrollInsertionIntoView = 0;
+
+ {
+ * Never autoscroll. This includes mouse dragging and text
+ * insertion. The only way to scroll the document is for the user to
+ * use the scrollbar or to scroll programatically.
+ }
+ kTXNAutoScrollNever = 1;
+
+ {
+ * This type of autoscrolling is best for implementing terminal or
+ * log windows. Autoscrolling only happens when the insertion offset
+ * is currently in the users view. This means that if the user is
+ * looking at page 1 of a 10 page document and text is inserted at
+ * the end of the document than no autoscrolling will occur. However,
+ * if the user was looking at page 10 and text was inserted there the
+ * document would scroll.
+ }
+ kTXNAutoScrollWhenInsertionVisible = 2;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Offset/Selection Constants }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+type
+ TXNOffset = UInt32;
+ TXNOffsetPtr = ^TXNOffset; { when a VAR xx: TXNOffset parameter can be nil, it is changed to xx: TXNOffsetPtr }
+const
+ kTXNUseCurrentSelection = $FFFFFFFF;
+ kTXNStartOffset = 0;
+ kTXNEndOffset = $7FFFFFFF;
+
+{ Useful for TXNShowSelection API.}
+const
+ kTXNShowStart = false;
+ kTXNShowEnd = true;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Resource Constants }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Useful for saving document. }
+
+const
+ kTXNSingleStylePerTextDocumentResType = $4D505352 (* 'MPSR' *);
+ kTXNMultipleStylesPerTextDocumentResType = $7374796C (* 'styl' *);
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ URL Constants }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNHyperLinkState
+ *
+ * Discussion:
+ * For future use. Currently not available.
+ }
+type
+ TXNHyperLinkState = UInt32;
+const
+ kTXNLinkNotPressed = 0;
+ kTXNLinkWasPressed = 1;
+ kTXNLinkTracking = 3;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Type Attributes / ATSUI Features and Variations }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Since MLTE currently uses ATSUI by default, the available face types for kTXNQDFontStyleAttribute }
+{ are limited by what's available in ATSUI. Currently, MLTE supports types defined in MacTypes.h }
+{ which are normal, bold, italic, underline, condensed, and extended. An alternative is to use }
+{ available QD compatibility tags defined in ATSUnicode.h. }
+
+type
+ TXNTypeRunAttributes = FourCharCode;
+const
+ kTXNQDFontNameAttribute = $666E746E (* 'fntn' *);
+ kTXNQDFontFamilyIDAttribute = $666F6E74 (* 'font' *);
+ kTXNQDFontStyleAttribute = $66616365 (* 'face' *);
+ kTXNQDFontColorAttribute = $6B6C6F72 (* 'klor' *);
+ kTXNTextEncodingAttribute = $656E6364 (* 'encd' *);
+ kTXNATSUIFontFeaturesAttribute = $61746665 (* 'atfe' *);
+ kTXNATSUIFontVariationsAttribute = $61747661 (* 'atva' *);
+ kTXNURLAttribute = $75726C61 (* 'urla' *);
+ kTXNATSUIStyle = $6173746C (* 'astl' *);
+
+type
+ TXNTypeRunAttributeSizes = ByteCount;
+const
+ kTXNQDFontNameAttributeSize = SizeOf(Str255);
+ kTXNQDFontFamilyIDAttributeSize = SizeOf(SInt16);
+ kTXNQDFontStyleAttributeSize = SizeOf(Style);
+ kTXNQDFontColorAttributeSize = SizeOf(RGBColor);
+ kTXNTextEncodingAttributeSize = SizeOf(TextEncoding);
+ kTXNFontSizeAttributeSize = SizeOf(Fixed);
+ kTXNATSUIStyleSize = SizeOf(ATSUStyle);
+
+type
+ TXNATSUIFeaturesPtr = ^TXNATSUIFeatures;
+ TXNATSUIFeatures = record
+ featureCount: ItemCount;
+ featureTypes: ATSUFontFeatureTypePtr;
+ featureSelectors: ATSUFontFeatureSelectorPtr;
+ end;
+
+type
+ TXNATSUIVariationsPtr = ^TXNATSUIVariations;
+ TXNATSUIVariations = record
+ variationCount: ItemCount;
+ variationAxis: ATSUFontVariationAxisPtr;
+ variationValues: ATSUFontVariationValuePtr;
+ end;
+
+ TXNAttributeDataPtr = ^TXNAttributeData;
+ TXNAttributeData = record
+ case SInt16 of
+ 0: (
+ dataPtr: UnivPtr;
+ );
+ 1: (
+ dataValue: UInt32;
+ );
+ 2: (
+ atsuFeatures: TXNATSUIFeaturesPtr;
+ );
+ 3: (
+ atsuVariations: TXNATSUIVariationsPtr;
+ );
+ end;
+
+type
+ TXNTypeAttributesPtr = ^TXNTypeAttributes;
+ TXNTypeAttributes = record
+ tag: TXNTypeRunAttributes;
+ size: ByteCount;
+ data: TXNAttributeData;
+ end;
+
+const
+ kTXNDontCareTypeSize = $FFFFFFFF;
+ kTXNDontCareTypeStyle = $FF;
+ kTXNIncrementTypeSize = $00000001;
+ kTXNDecrementTypeSize = $80000000;
+ kTXNUseScriptDefaultValue = -1;
+
+ {
+ * kTXNNoFontVariations is returned in the dataValue field when the
+ * caller as asked to see if the variation is continuous and there
+ * was no variation in the continuous range.
+ }
+ kTXNNoFontVariations = $7FFF;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Style Continuous Bits }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Useful for TXNGetContinuousTypeAttributes API. }
+
+const
+ kTXNFontContinuousBit = 0;
+ kTXNSizeContinuousBit = 1;
+ kTXNStyleContinuousBit = 2;
+ kTXNColorContinuousBit = 3;
+ kTXNATSUIStyleContinuousBit = 4;
+
+type
+ TXNContinuousFlags = OptionBits;
+const
+ kTXNFontContinuousMask = 1 shl kTXNFontContinuousBit;
+ kTXNSizeContinuousMask = 1 shl kTXNSizeContinuousBit;
+ kTXNStyleContinuousMask = 1 shl kTXNStyleContinuousBit;
+ kTXNColorContinuousMask = 1 shl kTXNColorContinuousBit;
+ kTXNATSUIStyleContinuousMask = 1 shl kTXNATSUIStyleContinuousBit;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Match Options Bits }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Useful for TXNFind API. }
+
+const
+ kTXNIgnoreCaseBit = 0;
+ kTXNEntireWordBit = 1;
+ kTXNUseEncodingWordRulesBit = 31;
+
+type
+ TXNMatchOptions = OptionBits;
+const
+ kTXNIgnoreCaseMask = 1 shl kTXNIgnoreCaseBit;
+ kTXNEntireWordMask = 1 shl kTXNEntireWordBit;
+ kTXNUseEncodingWordRulesMask = 1 shl kTXNUseEncodingWordRulesBit;
+
+type
+ TXNMatchTextRecordPtr = ^TXNMatchTextRecord;
+ TXNMatchTextRecord = record
+ iTextPtr: UnivPtr;
+ iTextToMatchLength: SInt32;
+ iTextEncoding: TextEncoding;
+ end;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Font Description }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+type
+ TXNMacOSPreferredFontDescriptionPtr = ^TXNMacOSPreferredFontDescription;
+ TXNMacOSPreferredFontDescription = record
+ fontID: UInt32;
+ pointSize: Fixed;
+ encoding: TextEncoding;
+ fontStyle: Style;
+ end;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Background }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNBackgroundType
+ *
+ * Discussion:
+ * Currently only an RGBColor is supported for the background.
+ }
+type
+ TXNBackgroundType = UInt32;
+const
+ kTXNBackgroundTypeRGB = 1;
+
+
+{
+ * TXNBackgroundData
+ *
+ * Discussion:
+ * The TXNBackgroundData is left as a union so that it can be
+ * expanded in the future to support other background types.
+ }
+type
+ TXNBackgroundDataPtr = ^TXNBackgroundData;
+ TXNBackgroundData = record
+ case SInt16 of
+ 0: (
+ color: RGBColor;
+ );
+ end;
+
+type
+ TXNBackgroundPtr = ^TXNBackground;
+ TXNBackground = record
+ bgType: TXNBackgroundType;
+ bg: TXNBackgroundData;
+ end;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Constants passed in iTXNActionName parameter of TXNGet/ClearCountForActionType }
+{ functions. In Mac OS X version 10.4 and later TXNCountOptions is deprecated. }
+{ The following action count constants should be used instead. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * kTXNActionCountOfTextChanges
+ *
+ * Discussion:
+ * All text changes other than style changes and custom defined
+ * actions are included in this action count. Includes key presses,
+ * inline sessions, cut/copy/paste, and drop, etc. Undo or redo
+ * events of the kind listed above are also included in this action
+ * count.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionCountOfTextChanges: CFStringRef; external name '_kTXNActionCountOfTextChanges'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionCountOfStyleChanges
+ *
+ * Discussion:
+ * Any text style change are included in this action count. Style
+ * changes include changing font/font face/font size/font
+ * feature/font variation/glyph variation/text position, and font
+ * color, etc. Undo or redo events of the kind listed above are also
+ * included in this action count.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionCountOfStyleChanges: CFStringRef; external name '_kTXNActionCountOfStyleChanges'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNActionCountOfAllChanges
+ *
+ * Discussion:
+ * A constant used to request the total count of actions including
+ * all text and style changes, as well as custom defined actions.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNActionCountOfAllChanges: CFStringRef; external name '_kTXNActionCountOfAllChanges'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Scrolling }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNScrollUnit
+ *
+ * Discussion:
+ * Use as a parameter in TXNScroll.
+ }
+type
+ TXNScrollUnit = UInt32;
+const
+ kTXNScrollUnitsInPixels = 0;
+ kTXNScrollUnitsInLines = 1;
+ kTXNScrollUnitsInViewRects = 2;
+
+
+{
+ * TXNScrollBarOrientation
+ *
+ * Discussion:
+ * Use as a parameter in ScrollInfo callback.
+ }
+type
+ TXNScrollBarOrientation = UInt32;
+const
+ kTXNHorizontal = 0;
+ kTXNVertical = 1;
+
+
+{
+ * TXNScrollBarState
+ *
+ * Discussion:
+ * Use as a parameter in TXNActivate and TXNSetScrollbarState.
+ }
+type
+ TXNScrollBarState = Boolean;
+const
+ kScrollBarsAlwaysActive = true;
+ kScrollBarsSyncWithFocus = false;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Draw Item Bits }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Specifies which element(s) of the text object to render. Useful in TXNDrawObject API. }
+
+const
+ kTXNDrawItemScrollbarsBit = 0;
+ kTXNDrawItemTextBit = 1;
+ kTXNDrawItemTextAndSelectionBit = 2;
+
+type
+ TXNDrawItems = OptionBits;
+const
+ kTXNDrawItemScrollbarsMask = 1 shl kTXNDrawItemScrollbarsBit;
+ kTXNDrawItemTextMask = 1 shl kTXNDrawItemTextBit;
+ kTXNDrawItemTextAndSelectionMask = 1 shl kTXNDrawItemTextAndSelectionBit;
+ kTXNDrawItemAllMask = $FFFFFFFF;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Rectangle Keys }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Each key corresponds to a specific bound for the object. Useful in TXNGetHIRect API. }
+
+type
+ TXNRectKey = UInt32;
+const
+ kTXNViewRectKey = 0;
+ kTXNDestinationRectKey = 1;
+ kTXNTextRectKey = 2;
+ kTXNVerticalScrollBarRectKey = 3;
+ kTXNHorizontalScrollBarRectKey = 4;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Carbon Event Info }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{ Dictionary keys currently supported in the TXNCarbonEventInfo dictionary }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTXNTextHandlerKey CFSTRP('TextInput')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTXNWindowEventHandlerKey CFSTRP('WindowEvent')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTXNWindowResizeEventHandlerKey CFSTRP('WindowResize')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTXNCommandTargetKey CFSTRP('CommandTarget')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTXNCommandUpdateKey CFSTRP('CommandUpdate')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTXNFontMenuObjectKey CFSTRP('FontMenuObject')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTXNActionNameMapperKey CFSTRP('ActionNameMapper')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTXNWheelMouseEventHandlerKey CFSTRP('WheelMouseEvent')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTXNTSMDocumentAccessHandlerKey CFSTRP('TSMDocumentAccess')}
+{$endc}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTXNFontPanelEventHandlerKey CFSTRP('FontPanel')}
+{$endc}
+
+{
+ * TXNCarbonEventInfo
+ *
+ * Summary:
+ * Used to pass an EventTargetRef to MLTE via
+ * TXNSetTXNObjectControls API.
+ }
+type
+ TXNCarbonEventInfoPtr = ^TXNCarbonEventInfo;
+ TXNCarbonEventInfo = record
+{
+ * Pass TRUE. MLTE no longer uses AppleEvents.
+ }
+ useCarbonEvents: Boolean;
+
+ {
+ * Pass NULL.
+ }
+ filler: SInt8;
+
+ {
+ * Pass NULL. AppleEvent flags have been deprecated.
+ }
+ flags: UInt16;
+
+ {
+ * A reference to a Core Foundation dictionary whose keys are the
+ * events you want handled and whose values are event target
+ * references associated with the events. See the above list of
+ * predefined keys you can use to build the dictionary.
+ }
+ fDictionary: CFDictionaryRef;
+ end;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ------------}
+{ ¥ Definition of dictionary keys for DocumentAttribute dictionary used in TXNWriteRangeToCFURL(), and }
+{ and TXNReadFromCFURL(). }
+{ When writing data out, document attributes are embedded into the data stream for document formats that }
+{ support them (ie. MLTE native format and RTF); when reading data in document attributes are extracted }
+{ from the data stream if the document format supports them. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ------------ÑÑÑ}
+
+{
+ * kTXNDocumentAttributeTitleKey
+ *
+ * Discussion:
+ * CFString containing document title
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNDocumentAttributeTitleKey: CFStringRef; external name '_kTXNDocumentAttributeTitleKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNDocumentAttributeCompanyNameKey
+ *
+ * Discussion:
+ * CFString containing company name
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNDocumentAttributeCompanyNameKey: CFStringRef; external name '_kTXNDocumentAttributeCompanyNameKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNDocumentAttributeSubjectKey
+ *
+ * Discussion:
+ * CFString containing subject
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNDocumentAttributeSubjectKey: CFStringRef; external name '_kTXNDocumentAttributeSubjectKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNDocumentAttributeAuthorKey
+ *
+ * Discussion:
+ * CFString containing author name (not necessarily same as "last
+ * editor," see editor key below)
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNDocumentAttributeAuthorKey: CFStringRef; external name '_kTXNDocumentAttributeAuthorKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNDocumentAttributeKeywordsKey
+ *
+ * Discussion:
+ * CFArray of CFString, containing keywords
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNDocumentAttributeKeywordsKey: CFStringRef; external name '_kTXNDocumentAttributeKeywordsKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNDocumentAttributeCommentKey
+ *
+ * Discussion:
+ * CFString containing comments
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNDocumentAttributeCommentKey: CFStringRef; external name '_kTXNDocumentAttributeCommentKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNDocumentAttributeEditorKey
+ *
+ * Discussion:
+ * CFString containing name of person who last edited the document
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNDocumentAttributeEditorKey: CFStringRef; external name '_kTXNDocumentAttributeEditorKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNDocumentAttributeCreationTimeKey
+ *
+ * Discussion:
+ * CFAbsoluteTime containing document comments; note that this is
+ * not the file system creation date of the file, but of the
+ * document, as it's stored in the document
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNDocumentAttributeCreationTimeKey: CFStringRef; external name '_kTXNDocumentAttributeCreationTimeKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNDocumentAttributeModificationTimeKey
+ *
+ * Discussion:
+ * CFAbsoluteTime containing the last modification date of the
+ * document contents
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNDocumentAttributeModificationTimeKey: CFStringRef; external name '_kTXNDocumentAttributeModificationTimeKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kTXNDocumentAttributeCopyrightKey
+ *
+ * Discussion:
+ * CFString containing the copyright of the document
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNDocumentAttributeCopyrightKey: CFStringRef; external name '_kTXNDocumentAttributeCopyrightKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ------------}
+{ ¥ Key and value definitions for DataOption dictionary used in TXNWriteRangeToCFURL(), and TXNReadFromCFURL(). }
+{ Data options are used to specify options for reading in and writing out data. }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ------------ÑÑÑ}
+
+{
+ * kTXNDataOptionDocumentTypeKey
+ *
+ * Discussion:
+ * CFString containing the document format. Supported string values:
+ * kTXNPlainTextDocumentType, kTXNMLTEDocumentType,
+ * kTXNRTFDocumentType, kTXNQuickTimeDocumentType
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNDataOptionDocumentTypeKey: CFStringRef; external name '_kTXNDataOptionDocumentTypeKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNDataOptionCharacterEncodingKey
+ *
+ * Discussion:
+ * CFNumber of type kCFNumberSInt32Type containing the character
+ * encoding as specified in CFString.h and CFStringEncodingExt.h
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNDataOptionCharacterEncodingKey: CFStringRef; external name '_kTXNDataOptionCharacterEncodingKey'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{ Document Type constants to be used as values for kTXNDataOptionDocumentTypeKey }
+
+{
+ * kTXNPlainTextDocumentType
+ *
+ * Discussion:
+ * Plain Text document
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNPlainTextDocumentType: CFStringRef; external name '_kTXNPlainTextDocumentType'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNMLTEDocumentType
+ *
+ * Discussion:
+ * MLTE native document
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNMLTEDocumentType: CFStringRef; external name '_kTXNMLTEDocumentType'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * kTXNRTFDocumentType
+ *
+ * Discussion:
+ * RTF document
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNRTFDocumentType: CFStringRef; external name '_kTXNRTFDocumentType'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+{
+ * kTXNQuickTimeDocumentType
+ *
+ * Discussion:
+ * Multimedia file that can be opened by QuickTime
+ * importers
+ * <BR>NOTE:Only supported for reading data, not writing.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+var kTXNQuickTimeDocumentType: CFStringRef; external name '_kTXNQuickTimeDocumentType'; (* attribute const *)
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Callbacks }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+type
+ TXNFindProcPtr = function( const (*var*) matchData: TXNMatchTextRecord; iDataType: TXNDataType; iMatchOptions: TXNMatchOptions; iSearchTextPtr: {const} UnivPtr; encoding: TextEncoding; absStartOffset: TXNOffset; searchTextLength: ByteCount; var oStartMatch: TXNOffset; var oEndMatch: TXNOffset; var ofound: Boolean; refCon: UInt32 ): OSStatus;
+type
+ TXNActionNameMapperProcPtr = function( actionName: CFStringRef; commandID: UInt32; inUserData: UnivPtr ): CFStringRef;
+type
+ TXNContextualMenuSetupProcPtr = procedure( iContextualMenu: MenuRef; objct: TXNObject; inUserData: UnivPtr );
+type
+ TXNScrollInfoProcPtr = procedure( iValue: SInt32; iMaximumValue: SInt32; iScrollBarOrientation: TXNScrollBarOrientation; iRefCon: SInt32 );
+type
+ TXNFindUPP = TXNFindProcPtr;
+type
+ TXNActionNameMapperUPP = TXNActionNameMapperProcPtr;
+type
+ TXNContextualMenuSetupUPP = TXNContextualMenuSetupProcPtr;
+type
+ TXNScrollInfoUPP = TXNScrollInfoProcPtr;
+{
+ * NewTXNFindUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewTXNFindUPP( userRoutine: TXNFindProcPtr ): TXNFindUPP; external name '_NewTXNFindUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewTXNActionNameMapperUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewTXNActionNameMapperUPP( userRoutine: TXNActionNameMapperProcPtr ): TXNActionNameMapperUPP; external name '_NewTXNActionNameMapperUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * NewTXNContextualMenuSetupUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewTXNContextualMenuSetupUPP( userRoutine: TXNContextualMenuSetupProcPtr ): TXNContextualMenuSetupUPP; external name '_NewTXNContextualMenuSetupUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * NewTXNScrollInfoUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewTXNScrollInfoUPP( userRoutine: TXNScrollInfoProcPtr ): TXNScrollInfoUPP; external name '_NewTXNScrollInfoUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * DisposeTXNFindUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeTXNFindUPP( userUPP: TXNFindUPP ); external name '_DisposeTXNFindUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeTXNActionNameMapperUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeTXNActionNameMapperUPP( userUPP: TXNActionNameMapperUPP ); external name '_DisposeTXNActionNameMapperUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * DisposeTXNContextualMenuSetupUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeTXNContextualMenuSetupUPP( userUPP: TXNContextualMenuSetupUPP ); external name '_DisposeTXNContextualMenuSetupUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * DisposeTXNScrollInfoUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeTXNScrollInfoUPP( userUPP: TXNScrollInfoUPP ); external name '_DisposeTXNScrollInfoUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * InvokeTXNFindUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeTXNFindUPP( const (*var*) matchData: TXNMatchTextRecord; iDataType: TXNDataType; iMatchOptions: TXNMatchOptions; iSearchTextPtr: {const} UnivPtr; encoding: TextEncoding; absStartOffset: TXNOffset; searchTextLength: ByteCount; var oStartMatch: TXNOffset; var oEndMatch: TXNOffset; var ofound: Boolean; refCon: UInt32; userUPP: TXNFindUPP ): OSStatus; external name '_InvokeTXNFindUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeTXNActionNameMapperUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeTXNActionNameMapperUPP( actionName: CFStringRef; commandID: UInt32; inUserData: UnivPtr; userUPP: TXNActionNameMapperUPP ): CFStringRef; external name '_InvokeTXNActionNameMapperUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * InvokeTXNContextualMenuSetupUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeTXNContextualMenuSetupUPP( iContextualMenu: MenuRef; objct: TXNObject; inUserData: UnivPtr; userUPP: TXNContextualMenuSetupUPP ); external name '_InvokeTXNContextualMenuSetupUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * InvokeTXNScrollInfoUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeTXNScrollInfoUPP( iValue: SInt32; iMaximumValue: SInt32; iScrollBarOrientation: TXNScrollBarOrientation; iRefCon: SInt32; userUPP: TXNScrollInfoUPP ); external name '_InvokeTXNScrollInfoUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{ **************************************************************************************************** }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ MLTE APIs ¥ }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ **************************************************************************************************** }
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Creating and Destroying Object }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNCreateObject()
+ *
+ * Summary:
+ * Creates a new text object of type TXNObject, which is an opaque
+ * structure that handles text formatting.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iFrameRect:
+ * A pointer to a variable of type HIRect. The rectangle is used
+ * to specify the destination and view rectangles for the new MLTE
+ * object. A value of NULL indicates that the rectangle for the
+ * window port will be used as view and destination rectangles
+ * when the object is attached later on to the window. See
+ * TXNAttachObjectToWindowRef below.
+ *
+ * iFrameOptions:
+ * A value of type TXNFrameOptions that specifies the options you
+ * want the object to support. ÒSee Frame OptionsÓ in the MLTE
+ * Reference for a description of the options.
+ *
+ * oTXNObject:
+ * A pointer to a structure of type TXNObject. On return, this
+ * points to the opaque text object data structure allocated by
+ * the function. You need to pass this object to most MLTE
+ * functions.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNCreateObject( const (*var*) iFrameRect: HIRect; iFrameOptions: TXNFrameOptions; var oTXNObject: TXNObject ): OSStatus; external name '_TXNCreateObject';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * TXNDeleteObject()
+ *
+ * Summary:
+ * Delete a previously allocated TXNObject and all associated data
+ * structures. If the frameType is multiple frames all frames are
+ * released.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject. The text
+ * object to free.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNDeleteObject( iTXNObject: TXNObject ); external name '_TXNDeleteObject';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNInitTextension()
+ *
+ * Summary:
+ * Initialize the Textension library. Should be called as soon as
+ * possible after the Macintosh toolbox is initialized. On Mac OS X
+ * version 10.3 or later, it's not necessary to call this routine.
+ * The cases where you may want to call this routine are: 1) A set
+ * of default fonts different from the system default is desired. 2)
+ * Want to have multimedia support 3) Want to use QuickdrawText
+ * instead of ATSUI to render the text.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iDefaultFonts:
+ * A table of font information including fontFamily ID, point
+ * size, style, and script code. The table can be NULL or can have
+ * an entry for any script for which you would like to to
+ * designate a default font. Only a valid script number is
+ * required. You can designate that Textension should use the
+ * default for a give script by setting the field to
+ * kTXNUseScriptDefaultValue (-1).
+ *
+ * iCountDefaultFonts:
+ * Count of entries in the iDefaultFonts parameter.
+ *
+ * iUsageFlags:
+ * Specify whether multimeida should be supported.
+ *
+ * Result:
+ * A result code indicating success or failure. Various MacOS errors
+ * are possible if something is wrong.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNInitTextension( {const} iDefaultFonts: {variable-size-array} TXNMacOSPreferredFontDescriptionPtr { can be NULL }; iCountDefaultFonts: ItemCount; iUsageFlags: TXNInitOptions ): OSStatus; external name '_TXNInitTextension';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNVersionInformation()
+ *
+ * Summary:
+ * Get the version number and a set of feature bits.
+ * TXNVersionValue uses a NumVersion structure. See MacTypes.h for
+ * the format of the version. Currently there are two feature bits:
+ * one for ATSUI default, another one for CarbonEvent default.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * oFeatureFlags:
+ * Pointer to a bit mask. See TXNFeatureMask enum above. If
+ * kTXNWillDefaultToATSUIBit is set it means that by default MLTE
+ * will use ATSUI to image and measure text and will default to
+ * using Unicode to store characters.
+ *
+ * Result:
+ * TXNVersionValue: Current version.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNVersionInformation( var oFeatureFlags: TXNFeatureBits ): TXNVersionValue; external name '_TXNVersionInformation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Set/Get Window Associated with the Object }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{
+ * TXNAttachObjectToWindowRef()
+ *
+ * Summary:
+ * Attaches a text object to a window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject. The text
+ * object you want to attach to the input window.
+ *
+ * iWindowRef:
+ * A WindowRef for the window you want to attach the object to.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNAttachObjectToWindowRef( iTXNObject: TXNObject; iWindowRef: WindowRef ): OSStatus; external name '_TXNAttachObjectToWindowRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * TXNGetWindowRef()
+ *
+ * Summary:
+ * Returns the window that the input object is attached to.
+ *
+ * Discussion:
+ * If no window is attached to the object it returns NULL.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject. The text
+ * object you want to attach to the input window.
+ *
+ * Result:
+ * The windowRef for the current window attached to the the text
+ * object.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNGetWindowRef( iTXNObject: TXNObject ): WindowRef; external name '_TXNGetWindowRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Events }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNKeyDown()
+ *
+ * Summary:
+ * Process a keydown event. Note that if CJK script is installed and
+ * current font is CJK inline input will take place. This is always
+ * the case unless the application has requested the bottomline
+ * window or has turned off TSM (see initialization options above).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque struct to apply keydown to.
+ *
+ * iEvent:
+ * The keydown event.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNKeyDown( iTXNObject: TXNObject; const (*var*) iEvent: EventRecord ); external name '_TXNKeyDown';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNAdjustCursor()
+ *
+ * Summary:
+ * Handle switching the cursor. If over text area set to i-beam.
+ * Over graphics, sound, movie, scrollbar or outside of window set
+ * to arrow.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque struct obtained from TXNCreateObject.
+ *
+ * ioCursorRgn:
+ * Region to be passed to WaitNextEvent. Resized accordingly by
+ * TXNAdjustCursor.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNAdjustCursor( iTXNObject: TXNObject; ioCursorRgn: RgnHandle ); external name '_TXNAdjustCursor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNClick()
+ *
+ * Summary:
+ * Process click in content region. Takes care of scrolling,
+ * selecting text, playing sound and movies, drag & drop, and
+ * double-clicks.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque struct obtained from TXNCreateObject.
+ *
+ * iEvent:
+ * The mousedown event.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNClick( iTXNObject: TXNObject; const (*var*) iEvent: EventRecord ); external name '_TXNClick';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNSelectAll()
+ *
+ * Summary:
+ * Selects everything in a frame.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque struct obtained from TXNCreateObject.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNSelectAll( iTXNObject: TXNObject ); external name '_TXNSelectAll';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNFocus()
+ *
+ * Summary:
+ * Focus the TXNObject. Scrollbars and insertion point are made
+ * active if iBecomingFocused is true, and inactive if false.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque struct obtained from TXNCreateObject.
+ *
+ * iBecomingFocused:
+ * true if becoming active. false otherwise.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNFocus( iTXNObject: TXNObject; iBecomingFocused: Boolean ); external name '_TXNFocus';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNUpdate()
+ *
+ * Summary:
+ * Handle update event (i.e. draw everything in a frame.) This
+ * function calls the Toolbox BeginUpdate - EndUpdate functions for
+ * the window that was passed to TXNCreateObject. This makes it
+ * inappropriate for windows that contain something else besides the
+ * TXNObject.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque struct obtained from TXNCreateObject.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNUpdate( iTXNObject: TXNObject ); external name '_TXNUpdate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNDrawObject()
+ *
+ * Summary:
+ * Renders the current content of the TXNObject on the screen.
+ *
+ * Discussion:
+ * Redraws the object element(s) specified in the TXNDrawItems
+ * flags. Drawing is limited to the input clip rectangle.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject. Draw into this
+ * text object.
+ *
+ * iClipRect:
+ * A pointer to a HIRect. If the rectangle is NULL, MLTE uses its
+ * view rectangle when drawing. If the rectangle is not NULL, MLTE
+ * will intersect iClipRect with the view rectangle to determine
+ * the rectangle to draw. MLTE will not draw in area not covered
+ * by the port's clip region. Therefore, a given clipRect larger
+ * than the port's clip region will be trimmed down.
+ *
+ * iDrawItems:
+ * A value of type TXNDrawItems. Indicates what element(s) of the
+ * object are to be drawn.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNDrawObject( iTXNObject: TXNObject; const (*var*) iClipRect: HIRect; iDrawItems: TXNDrawItems ): OSStatus; external name '_TXNDrawObject';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * TXNForceUpdate()
+ *
+ * Summary:
+ * Force a frame to be updated. Very much like toolbox call
+ * InvalRect.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNForceUpdate( iTXNObject: TXNObject ); external name '_TXNForceUpdate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNGetSleepTicks()
+ *
+ * Summary:
+ * Depending on state of window get the appropriate sleep time to be
+ * passed to WaitNextEvent.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Result:
+ * A UInt32 value of the appropriate sleep time.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNGetSleepTicks( iTXNObject: TXNObject ): UInt32; external name '_TXNGetSleepTicks';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNIdle()
+ *
+ * Summary:
+ * Do necessary Idle time processing. Typically flash the cursor. If
+ * a TextService is active pass a NULL event to the Text Service so
+ * it gets time.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNIdle( iTXNObject: TXNObject ); external name '_TXNIdle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNGrowWindow()
+ *
+ * Summary:
+ * Handle mouse-down in grow region.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iEvent:
+ * The mousedown event
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNGrowWindow( iTXNObject: TXNObject; const (*var*) iEvent: EventRecord ); external name '_TXNGrowWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNZoomWindow()
+ *
+ * Summary:
+ * Handle mouse-down in zoom.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iPart:
+ * Value returned by FindWindow
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNZoomWindow( iTXNObject: TXNObject; iPart: SInt16 ); external name '_TXNZoomWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Redo/Undo }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNBeginActionGroup()
+ *
+ * Summary:
+ * Starts an action group. Every supported edit action after
+ * TXNBeginActionGroup is called is added to the group until
+ * TXNEndActionGroup (see below) is called. When MLTE receives an
+ * undo/redo command, it will treat all actions added to the group
+ * as a single operation to undo/redo. Nesting of groups is not
+ * allowed. Calling TXNBeginActionGroup twice without calling
+ * TXNEndActionGroup in between will result in an error.
+ * TXNCanUndoAction and TXNCanRedoAction return false if there is an
+ * active action group.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iActionGroupName:
+ * A client supplied string used to describe the action group.
+ *
+ * Result:
+ * An operating system status code. The error
+ * kTXNOperationNotAllowedErr is returned if an undo action group
+ * has already been started but not terminated.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNBeginActionGroup( iTXNObject: TXNObject; iActionGroupName: CFStringRef ): OSStatus; external name '_TXNBeginActionGroup';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * TXNEndActionGroup()
+ *
+ * Summary:
+ * Ends the current action group. The call is ignored is there is no
+ * active action group.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNEndActionGroup( iTXNObject: TXNObject ): OSStatus; external name '_TXNEndActionGroup';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * TXNCanUndoAction()
+ *
+ * Summary:
+ * Tells the client whether the last action is undoable or not, and
+ * if requested it returns a string that identifies the last action.
+ * Usually, this function is used by clients to determine whether
+ * the Undo item in the Edit menu should be enabled or not, and to
+ * obtain the action name that should be used in that item. When the
+ * last action is an action group (See
+ * TXNBeginActionGroup/TXNEndActionGroup), the the string used to
+ * name the group is returned. If you have asked MLTE to handling
+ * updating for the Redo and Undo edit commands you should call
+ * TXNSetActionNameMapper after calling TXNCanUndoAction so that
+ * MLTE can callback to you to get the correct strings for those
+ * items.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * oActionName:
+ * Pointer to the string that denotes the last action. Pass in
+ * NULL if the string is not needed. The returned string is either
+ * a string defined by MLTE, or a string passed by the client to
+ * the TXNBeginActionGroup when a new action group is created. The
+ * client is responsible to retain and release the string.
+ *
+ * Result:
+ * Returns a Boolean value. If true, the last action is undoable,
+ * and the Undo item in the Edit menu, if there is one, should be
+ * enabled. If false, the last action cannot be undone and Undo item
+ * in the Edit menu should be grayed out.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNCanUndoAction( iTXNObject: TXNObject; var oActionName: CFStringRef ): Boolean; external name '_TXNCanUndoAction';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * TXNCanRedoAction()
+ *
+ * Summary:
+ * Tells the client whether the current item on the undo stack is
+ * redoable or not. Usually, this function is used by clients to
+ * determine whether the Redo item in the Edit menu should be
+ * enabled or not, and to obtain the action name that should be used
+ * in that item. When the current undo item is an action group (See
+ * TXNBeginActionGroup/TXNEndActionGroup), the string used to name
+ * the group is returned.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * oActionName:
+ * Pointer to the string that denotes the current item in the undo
+ * stack. Pass in NULL if the string is not needed. The returned
+ * string is either a string defined by MLTE, or the string passed
+ * by the client to TXNBeginActionGroup when a new action group is
+ * created. The client is responsible to retain and release the
+ * string.
+ *
+ * Result:
+ * Returns a Boolean value. If true, the last action is redoable,
+ * and the Redo item in the Edit menu, if there is one, should be
+ * enabled. If false, the last action cannot be redone, and the Redo
+ * item in the Edit menu should be grayed out.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNCanRedoAction( iTXNObject: TXNObject; var oActionName: CFStringRef ): Boolean; external name '_TXNCanRedoAction';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * TXNSetActionNameMapper()
+ *
+ * Summary:
+ * Provides MLTE with a callback that is used to obtain the
+ * appropriate localized string, which represent either a single
+ * action or an action group (See
+ * TXNBeginActionGroup/TXNEndActionGroup), for updating the Redo and
+ * Undo items in the Edit menu.
+ *
+ * Discussion:
+ * If you have asked MLTE to handling updating for the Redo and Undo
+ * edit commands you should call this function so that MLTE can
+ * callback to you to get the correct strings for those items. When
+ * MLTE's handler for kEventClassCommand/kEventCommandUpdateStatus
+ * is called for the Redo or Undo command MLTE will check to see if
+ * a TXNActionNameMapperProc has been installed. If it has the is
+ * called to get the correct string to update the menu item. The
+ * client can used the action name and the command ID to determine
+ * the appropriate string.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * The TXNObject.
+ *
+ * iStringForKeyProc:
+ * The callback.
+ *
+ * iUserData:
+ * A pointer to anything. Of course its a good idea to point at
+ * something that will help you map the action key to a string.
+ *
+ * Result:
+ * OSStatus. noErr if the operation is successful.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNSetActionNameMapper( iTXNObject: TXNObject; iStringForKeyProc: TXNActionNameMapperUPP; iUserData: {const} UnivPtr ): OSStatus; external name '_TXNSetActionNameMapper';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * TXNUndo()
+ *
+ * Summary:
+ * Undo the last command.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNUndo( iTXNObject: TXNObject ); external name '_TXNUndo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNRedo()
+ *
+ * Summary:
+ * Redo the last command.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNRedo( iTXNObject: TXNObject ); external name '_TXNRedo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNClearUndo()
+ *
+ * Summary:
+ * Purge the undo stack
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: in Textension not yet available
+ }
+function TXNClearUndo( iTXNObject: TXNObject ): OSStatus; external name '_TXNClearUndo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Editing }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNCut()
+ *
+ * Summary:
+ * Cut the current selection to the clipboard.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNCut( iTXNObject: TXNObject ): OSStatus; external name '_TXNCut';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNCopy()
+ *
+ * Summary:
+ * Copy current selection to the clipboard.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNCopy( iTXNObject: TXNObject ): OSStatus; external name '_TXNCopy';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNPaste()
+ *
+ * Summary:
+ * Paste from the clipboard.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNPaste( iTXNObject: TXNObject ): OSStatus; external name '_TXNPaste';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNClear()
+ *
+ * Summary:
+ * Clear the current selection.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNClear( iTXNObject: TXNObject ): OSStatus; external name '_TXNClear';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNIsScrapPastable()
+ *
+ * Summary:
+ * Test to see if the current scrap contains data that is supported
+ * by Textension. Used to determine if Paste item in Edit menu
+ * should be active or inactive. The types of data supported depends
+ * on what data types were specified in the TXNInitTextension
+ * options.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * Boolean: True if data type in Clipboard is supported. False if
+ * not a supported data type. If result is True the Paste item in
+ * the menu can be highlighted.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNIsScrapPastable: Boolean; external name '_TXNIsScrapPastable';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Selection }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNGetSelection()
+ *
+ * Summary:
+ * Get the absolute offsets of the current selection. Embedded
+ * graphics, sound, etc. each count as one character.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * oStartOffset:
+ * Absolute beginning of the current selection.
+ *
+ * oEndOffset:
+ * End of current selection.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNGetSelection( iTXNObject: TXNObject; var oStartOffset: TXNOffset; var oEndOffset: TXNOffset ); external name '_TXNGetSelection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNShowSelection()
+ *
+ * Summary:
+ * Scroll the current selection into view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iShowEnd:
+ * If true the end of the selection is scrolled into view. If
+ * false the beginning of selection is scrolled into view.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNShowSelection( iTXNObject: TXNObject; iShowEnd: Boolean ); external name '_TXNShowSelection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNIsSelectionEmpty()
+ *
+ * Summary:
+ * Call to find out if the current selection is empty. Use this to
+ * determine if Paste, Cut, Copy, Clear should be highlighted in
+ * Edit menu.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Result:
+ * Boolean: True if current selection is empty (i.e. start offset ==
+ * end offset). False if selection is not empty.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNIsSelectionEmpty( iTXNObject: TXNObject ): Boolean; external name '_TXNIsSelectionEmpty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNSetSelection()
+ *
+ * Summary:
+ * Set the current selection.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iStartOffset:
+ * New beginning.
+ *
+ * iEndOffset:
+ * New end.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNSetSelection( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset ): OSStatus; external name '_TXNSetSelection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Set/Get Type Attributes }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNGetContinuousTypeAttributes()
+ *
+ * Summary:
+ * Test the current selection to see if type size, style, color
+ * and/or font are continuous. That is is the current selection made
+ * up of one font, one font size, one Style, and/or one color. On
+ * return examine the flags to see if the attributes specified were
+ * continuous. If an attribute is continuous then the dataValue
+ * field in the TXNTypeAttributes can be examined to get the
+ * continous value. Remember that for color you pass a ptr to an
+ * RGBColor in attr[0].data.dataPtr.
+ *
+ * Discussion:
+ * If examining kTXNATSUIStyleContinuous bit, be sure to call
+ * ATSUDisposeStyle to dispose the style that is returned from MLTE.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * oContinuousFlags:
+ * Bits which can be examined to see if type size, style, color,
+ * and/or font are continuous. Example: if (
+ * TXNGetContinuousTypeAttributes( txnObject, &flags, 1, &attr )
+ * == noErr ) ( if ( flags & kTXNFontContinuousMask ) ....check a
+ * font name
+ *
+ * iCount:
+ * Count of TXNTypeAttributes records in the ioTypeAttributes
+ * array.
+ *
+ * ioTypeAttributes:
+ * Array of TXNTypeAttributes that indicate the type attributes
+ * the caller is interested in. For example: 1. if you wanted to
+ * know if the current selection was continuous in terms of being
+ * all one same font size you could do something like this.
+ * TXNTypeAttributes attr[1] = ( TXNFontSizeAttribute,
+ * sizeof(Fixed),( 0 ) ) on return from the function if size is
+ * continuous (i.e. if the bit 3 of flags is set) then the third
+ * field (attr[0].data.dataValue) will contain the size of the
+ * font as a Fixed value. 2. if you wanted to know if the current
+ * selection was continuous in ATSUI style you could do something
+ * like this. TXNTypeAttributes attr[1] = ( kTXNATSUIStyle,
+ * kTXNATSUIStyleSize, ( 0 ) ) on return from the function if
+ * ATSUI style is continuous, then the third field
+ * (attr[0].data.dataPtr) will contain the ATSUI style.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNGetContinuousTypeAttributes( iTXNObject: TXNObject; var oContinuousFlags: TXNContinuousFlags; iCount: ItemCount; ioTypeAttributes: {variable-size-array} TXNTypeAttributesPtr { can be NULL } ): OSStatus; external name '_TXNGetContinuousTypeAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNSetTypeAttributes()
+ *
+ * Summary:
+ * Set the current ranges font information. Values are passed in
+ * the attributes array. Values <= sizeof(UInt32) are passed by
+ * value. > sizeof(UInt32) are passed as a pointer. That is the
+ * TXNTypeAttributes' 3rd field is a union that servers as either a
+ * 32-bit integer where values can be written or a 32-bit pointer a
+ * value. Functional in NoUserIO mode.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iAttrCount:
+ * Count of type attributes in the TXNTypeAttributes array.
+ *
+ * iAttributes:
+ * Attributes that caller would like to set.
+ *
+ * iStartOffset:
+ * Start of the range where text attributes should be changed.
+ *
+ * iEndOffset:
+ * End of the range.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNSetTypeAttributes( iTXNObject: TXNObject; iAttrCount: ItemCount; {const} iAttributes: {variable-size-array} TXNTypeAttributesPtr; iStartOffset: TXNOffset; iEndOffset: TXNOffset ): OSStatus; external name '_TXNSetTypeAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Set/Get Object Controls }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNSetTXNObjectControls()
+ *
+ * Summary:
+ * Sets formatting and privileges attributes (such as justification,
+ * line direction, tab values, and read-only status) that apply to
+ * the entire text object.
+ *
+ * Discussion:
+ * On systems that use Apple Type Services for Unicode Imaging
+ * (ATSUI), the ATSUI line control attribute tags can be passed to
+ * this function in the iControlTag parameter. This is the case for
+ * all the ATSUI tags except kATSULineRotationTag. ATSUI tags are
+ * applied to the entire text object.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * The text object that identifies the document for which you want
+ * to set formatting and privileges attributes.
+ *
+ * iClearAll:
+ * A Boolean value. If you set this to true, all formatting and
+ * privileges attributes are reset to their default value. That
+ * is, true clears existing tags and resets each to its default
+ * value. This can be done even when the object is in NoUserIO
+ * mode.
+ *
+ * iControlCount:
+ * The number of items in the iControlTags array.
+ *
+ * iControlTags:
+ * An array of values that specifies kind of data that is passed
+ * in the iControlData parameter. See ÒFormatting and Privileges
+ * SettingsÓ for a description of possible values. On systems that
+ * use Apple Type Services for Unicode Imaging (ATSUI), you can
+ * also pass ATSUI attribute tag constants. See the ATSUI
+ * documentation for a description of the ATSUI constants. Can be
+ * NULL if iClearAll is true.
+ *
+ * iControlData:
+ * An array of TXNControlData unions that contain the information
+ * your application wants to set. The value you supply to the
+ * iControlTags parameter specifies how the union of type
+ * TXNControlData is treated. You must make sure that the value
+ * you assign to the iControlData parameter is the appropriate
+ * type implied by the value you passed in the iControlTags
+ * parameter. Can be NULL if iClearAll is true.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNSetTXNObjectControls( iTXNObject: TXNObject; iClearAll: Boolean; iControlCount: ItemCount; {const} iControlTags: {variable-size-array} TXNControlTagPtr { can be NULL }; {const} iControlData: {variable-size-array} TXNControlDataPtr { can be NULL } ): OSStatus; external name '_TXNSetTXNObjectControls';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNGetTXNObjectControls()
+ *
+ * Summary:
+ * Gets the current formatting and privileges attributes (such as
+ * justification, line direction, tab values, and read-only status)
+ * for a text object.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * The text object that identifies the document to be activated.
+ * If NULL then the default value for an MLTE object is returned.
+ *
+ * iControlCount:
+ * The number of items in the iControlTags array.
+ *
+ * iControlTags:
+ * An array of values that specify the kind of formatting
+ * information you want returned in the oControlData array. See
+ * ÒFormatting and Privileges SettingsÓ for a description of
+ * possible values.
+ *
+ * oControlData:
+ * An array of TXNControlData unions. On return, the array
+ * contains the information that was requested through the
+ * iControlTags array. Your application must allocate the
+ * oControlData array.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNGetTXNObjectControls( iTXNObject: TXNObject { can be NULL }; iControlCount: ItemCount; {const} iControlTags: {variable-size-array} TXNControlTagPtr; oControlData: {variable-size-array} TXNControlDataPtr ): OSStatus; external name '_TXNGetTXNObjectControls';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Other Settings }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNSetBackground()
+ *
+ * Summary:
+ * Set the type of background the TXNObject's text, etc. is drawn
+ * onto. At this point the background can be a color. Functional
+ * in NoUserIO mode.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iBackgroundInfo:
+ * Struct containing information that describes the background.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNSetBackground( iTXNObject: TXNObject; const (*var*) iBackgroundInfo: TXNBackground ): OSStatus; external name '_TXNSetBackground';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNEchoMode()
+ *
+ * Summary:
+ * Put the TXNObject into echo mode. What that means is that all
+ * characters in the TXNObject have the character 'echoCharacter'
+ * substituted for the actual glyph when drawing occurs.
+ *
+ * Discussion:
+ * Note that the echoCharacter is typed as a UniChar, but this is
+ * done merely to facilitate passing any 2 byte character. The
+ * encoding parameter actually determines the encoding used to
+ * locate a font and display a character. Thus if you wanted to
+ * display the diamond found in the Shift-JIS encoding for MacOS you
+ * would pass in 0x86A6 for the character but an encoding that was
+ * built to represent the MacOS Japanese encoding.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iEchoCharacter:
+ * Character to use in substitution.
+ *
+ * iEncoding:
+ * Encoding from which character is drawn.
+ *
+ * iOn:
+ * True if turning EchoMode on. False if turning it off.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNEchoMode( iTXNObject: TXNObject; iEchoCharacter: UniChar; iEncoding: TextEncoding; iOn: Boolean ): OSStatus; external name '_TXNEchoMode';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Retrieve Run Info }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNCountRunsInRange()
+ *
+ * Summary:
+ * Given a range specified by the starting and ending offset return
+ * a count of the runs in that range. Run in this case means
+ * changes in TextSyles or a graphic or sound.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iStartOffset:
+ * Start of range.
+ *
+ * iEndOffset:
+ * End of range.
+ *
+ * oRunCount:
+ * Count of runs in the range
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNCountRunsInRange( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; var oRunCount: ItemCount ): OSStatus; external name '_TXNCountRunsInRange';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNGetIndexedRunInfoFromRange()
+ *
+ * Summary:
+ * Gets information about a run in a range of data.
+ *
+ * Discussion:
+ * You should first call the TXNCountRunsInRange function to get the
+ * count. The TXNTypeAttributes structure must specify the text
+ * attribute in which the application is interested. In other words,
+ * the tag field must be set. If you asked for the kTXNATSUIStyle
+ * info, you are now responsible for disposing the ATSUI style
+ * returned from the attribute array by calling ATSUDisposeStyle.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * The text object for the current text area.
+ *
+ * iIndex:
+ * The value that corresponds to the run for which you want to get
+ * information. You call the TXNCountRunsInRange function to get
+ * the number of runs in a range. The iIndex parameter is
+ * zero-based, so its possible values are from 0 to the number of
+ * runs in a range minus 1.
+ *
+ * iStartOffset:
+ * The offset at which you want to start to obtain run information.
+ *
+ * iEndOffset:
+ * The offset at which you want run information to end.
+ *
+ * oRunStartOffset:
+ * On return, a pointer to a value that identifies the start of
+ * run relative to the beginning of the text, not the beginning of
+ * the range you specified in the iStartOffset parameter.
+ *
+ * oRunEndOffset:
+ * On return, a pointer to a value that identifies the end of the
+ * run relative to the beginning of the text, not the beginning of
+ * the range you specified in the iStartOffset parameter.
+ *
+ * oRunDataType:
+ * On return, a pointer to a value that identifies the type of
+ * data in the run. See ÒSupported Data TypesÓ for a description
+ * of possible values.
+ *
+ * iTypeAttributeCount:
+ * The number of font attributes.
+ *
+ * ioTypeAttributes:
+ * A pointer to a structure of type TXNTypeAttributes. On input,
+ * you specify the attribute (such as size) in the tag field and
+ * the attribute size in the size field. You can pass NULL for the
+ * data field. On return, the data field contains the attribute
+ * data. The data field is a union that serves either as a 32-bit
+ * integer or a 32-bit pointer, depending on the size field.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNGetIndexedRunInfoFromRange( iTXNObject: TXNObject; iIndex: ItemCount; iStartOffset: TXNOffset; iEndOffset: TXNOffset; oRunStartOffset: TXNOffsetPtr { can be NULL }; oRunEndOffset: TXNOffsetPtr { can be NULL }; oRunDataType: TXNDataTypePtr { can be NULL }; iTypeAttributeCount: ItemCount; ioTypeAttributes: TXNTypeAttributesPtr { can be NULL } ): OSStatus; external name '_TXNGetIndexedRunInfoFromRange';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Get Data Size }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNDataSize()
+ *
+ * Summary:
+ * Return the size in bytes of the characters in a given TXNObject.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Result:
+ * The bytes required to hold the characters.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNDataSize( iTXNObject: TXNObject ): ByteCount; external name '_TXNDataSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Read and Write APIs }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+
+{
+ * TXNWriteRangeToCFURL()
+ *
+ * Summary:
+ * Write a range of a TXNObject to a CFURLRef.
+ *
+ * Discussion:
+ * Write a range of a text object to a file or a special file bundle
+ * (directory). It supports different document formats and encodings
+ * which can be specified in the data options dictionary. Clients
+ * can specify additional document attributes when data is written
+ * out using a file format that supports such attributes (ie. RTF
+ * and native MLTE file format). See DocumentAttribute key
+ * definitions for additional information on the attributes
+ * supported.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iStartOffset:
+ * The initial offset in iTXNObject to write out to iFileURL.
+ *
+ * iEndOffset:
+ * The last offset in iTXNObject to write out to iFileURL.
+ *
+ * iDataOptions:
+ * A CFDictionaryRef that specifies options for writing out the
+ * data. See Data Options key documentation for a list of the
+ * options supported. If this parameter is NULL, the data is
+ * written out using MLTE's native format.
+ *
+ * iDocumentAttributes:
+ * Specifies the document attributes to be embedded in the data
+ * stream. This param is only supported when writing out the data
+ * using one of the following formats: RTF and MLTE native format.
+ * Only the key / values defined in Document Attributes are
+ * written out. The content of the dictionary is ignored for any
+ * other format. If the dictionary is NULL, no attributes are
+ * added to the data stream.
+ *
+ * iFileURL:
+ * Should point to an existing file or directory whichever is
+ * correct for file type. On exit, iFileURL will contain a copy of
+ * the data in the given range for the iTXNObject with the format
+ * and encoding specified by iDataOptions.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNWriteRangeToCFURL( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; iDataOptions: CFDictionaryRef { can be NULL }; iDocumentAttributes: CFDictionaryRef { can be NULL }; iFileURL: CFURLRef ): OSStatus; external name '_TXNWriteRangeToCFURL';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * TXNReadFromCFURL()
+ *
+ * Summary:
+ * Read data from a CFURLRef into a TXNObject.
+ *
+ * Discussion:
+ * Read in data from a file or or special file bundle (directory)
+ * into a text object. Offset parameters are used to specify whether
+ * the new data is inserted, appended or replaces an existing data
+ * range in the text object. Clients can specify the document format
+ * and encoding of the data using the DataOptions dictionary. This
+ * functions also returns the document attributes present in the
+ * data stream. Document attributes are only supported for the rich
+ * text file formats supported by MLTE: RTF and MLTE native file
+ * format.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject. New data will
+ * be added to this object.
+ *
+ * iStartOffset:
+ * The initial offset in iTXNObject to place the data read in from
+ * iFileURL.
+ *
+ * iEndOffset:
+ * The last offset in iTXNObject to place the data read in from
+ * iFileURL.
+ *
+ * iDataOptions:
+ * A CFDictionaryRef that specifies options for reading in the
+ * data. See Data Options key documentation for a list of the
+ * options supported. If this parameter is NULL, the data is
+ * written out using MLTE's native format.
+ *
+ * iFileURL:
+ * A value of type CFURLRef. The data to be added to the
+ * iTXNObject.
+ *
+ * oDocumentAttributes:
+ * A value of type CFDictionaryRef. It contains the document
+ * attributes for the text object. On exit, this dictionary
+ * contains the document attributes present in the data stream, if
+ * the file format supports them; otherwise it will be NULL. The
+ * native MLTE file format and RTF support embedded document
+ * attributes. See the DocumentAttribute key documentation for a
+ * list of the attributes supported. If this parameter is NULL, no
+ * document attributes are written out. Sample code: If the caller
+ * passes a pointer to a dictionary ref, the API will return a ref
+ * to the dictionary of attributes if there is one (caller must
+ * release dictionary), otherwise the API will set the ref to NULL
+ * in all other cases. CFDictionaryRef oDocumentAttributes = NULL;
+ * status = TXNReadFromCFURL (...., &oDocumentAttributes); if
+ * (oDocumentAttributes != NULL) ::CFRelease(oDocumentAttributes);
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNReadFromCFURL( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; iDataOptions: CFDictionaryRef { can be NULL }; iFileURL: CFURLRef; oDocumentAttributes: CFDictionaryRefPtr { can be NULL } ): OSStatus; external name '_TXNReadFromCFURL';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * TXNCopyTypeIdentifiersForRange()
+ *
+ * Summary:
+ * Returns an array of univeral type identifiers (UTIs) that can be
+ * used to write out a range of a text object with no information
+ * loss.
+ *
+ * Discussion:
+ * Some file formats support limited embedding of data when writing
+ * out to disk, and use attachments instead, such as RTF. This API
+ * can be used to determine the document format to use with
+ * TXNWriteRangeToCFURL - i.e., whether to use RTF (Rich Text
+ * Format). Note that support for new document formats could be
+ * added in the future.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iStartOffset:
+ * The initial offset in iTXNObject for the range to check.
+ *
+ * iEndOffset:
+ * The last offset in iTXNObject for the range to check.
+ *
+ * oTypeIdentifiersForRange:
+ * A pointer to a CFArrayRef. On exit, the array will contain the
+ * list of universal type identifiers (UTI) that MLTE supports,
+ * and that can be used to write the object out to disk with no
+ * data loss. Each entry in the array is a CFStringRef.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNCopyTypeIdentifiersForRange( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; var oTypeIdentifiersForRange: CFArrayRef ): OSStatus; external name '_TXNCopyTypeIdentifiersForRange';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * TXNGetData()
+ *
+ * Summary:
+ * Copy the data in the range specified by startOffset and endOffset.
+ *
+ * Discussion:
+ * This function should be used in conjunction with TXNNextDataRun.
+ * The client would call TXNCountRunsInRange to the number of data
+ * runs in a given range. The client can then walk the runs with
+ * the function TXNGetIndexedRunInfoFromRange.
+ * TXNGetIndexedRunInfoFromRange lets you examine each runs type and
+ * text attributes. For each data run of interest (i.e. one whose
+ * data the caller wanted to look at) the client would call
+ * TXNGetData. The handle passed to TXNGetData should not be
+ * allocated. TXNGetData takes care of allocating the dataHandle as
+ * necessary. However, the caller is responsible for disposing the
+ * handle.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iStartOffset:
+ * Absolute offset from which data copy should begin.
+ *
+ * iEndOffset:
+ * Absolute offset at which data copy should end.
+ *
+ * oDataHandle:
+ * If noErr a new handle containing the requested data. The caller
+ * is responsible for disposing the handle. Note that the handle
+ * is a copy so it can be safely disposed at any time.
+ *
+ * Result:
+ * Memory errors or TXN_IllegalToCrossDataBoundaries if offsets
+ * specify a range that crosses a data type boundary.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNGetData( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; var oDataHandle: Handle ): OSStatus; external name '_TXNGetData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNGetDataEncoded()
+ *
+ * Summary:
+ * Copy the data in the range specified by startOffset and endOffset.
+ *
+ * Discussion:
+ * The handle passed to TXNGetDataEncoded should not be allocated.
+ * TXNGetData takes care of allocating the dataHandle as necessary.
+ * However, the caller is responsible for disposing the handle.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iStartOffset:
+ * Absolute offset from which data copy should begin.
+ *
+ * iEndOffset:
+ * Absolute offset at which data copy should end.
+ *
+ * oDataHandle:
+ * If noErr a new handle containing the requested data.
+ *
+ * iEncoding:
+ * should be kTXNTextData or kTXNUnicodeTextData.
+ *
+ * Result:
+ * Memory errors or TXN_IllegalToCrossDataBoundaries if offsets
+ * specify a range that crosses a data type boundary.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNGetDataEncoded( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; var oDataHandle: Handle; iEncoding: TXNDataType ): OSStatus; external name '_TXNGetDataEncoded';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNSetData()
+ *
+ * Summary:
+ * Replaces a range of data (text, graphics, and so forth).
+ *
+ * Discussion:
+ * Functional in NoUserIO mode.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * The text object that identifies the document in which you want
+ * to replace data.
+ *
+ * iDataType:
+ * The type of the replacement data. See ÒSupported Data TypesÓ
+ * for a description of possible values.
+ *
+ * iDataPtr:
+ * A pointer to the data that will replace the data that is in the
+ * range specified by the iStartOffset and iEndOffset parameters.
+ * Can be NULL if the start and end offsets are different.
+ *
+ * iDataSize:
+ * The size of the data to which iDataPtr points.
+ *
+ * iStartOffset:
+ * The beginning of the range of data to replace. You can use the
+ * TXNGetSelection function to get the absolute offsets of the
+ * current selection.
+ *
+ * iEndOffset:
+ * The end of the range to replace. You can use the
+ * TXNGetSelection function to get the absolute offsets of the
+ * current selection. If you want to insert text, the ending and
+ * starting offsets should be the same value.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNSetData( iTXNObject: TXNObject; iDataType: TXNDataType; iDataPtr: {const} UnivPtr { can be NULL }; iDataSize: ByteCount; iStartOffset: TXNOffset; iEndOffset: TXNOffset ): OSStatus; external name '_TXNSetData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNFlattenObjectToCFDataRef()
+ *
+ * Summary:
+ * Flattens a text object so it can be saved to disk or embedded
+ * with other data.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject. Retrieve
+ * flattened data from this text object.
+ *
+ * iTXNDataType:
+ * A value of type TXNDataType that specifies the format in which
+ * the data is written out.
+ *
+ * oDataRef:
+ * A pointer to a structure of type CFDataRef. On return the data
+ * will contain a flattened version of the iTXNObject in the
+ * format specified by iTXNDataType. Clients are responsible to
+ * retain the returned CFDataRef.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNFlattenObjectToCFDataRef( iTXNObject: TXNObject; iTXNDataType: TXNDataType; var oDataRef: CFDataRef ): OSStatus; external name '_TXNFlattenObjectToCFDataRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Revert }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNRevert()
+ *
+ * Summary:
+ * Revert to the last saved version of this document. If the file
+ * was not previously saved the document is reverted to an empty
+ * document.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Result:
+ * A result code indicating success or failure. (such as File
+ * Manager errors)
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNRevert( iTXNObject: TXNObject ): OSStatus; external name '_TXNRevert';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Printing }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNPageSetup()
+ *
+ * Summary:
+ * Display the Page Setup dialog of the current default printer and
+ * react to any changes (i.e. Reformat the text if the page layout
+ * changes.)
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Result:
+ * A result code indicating success or failure. ( such as Print
+ * Manager errors )
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNPageSetup( iTXNObject: TXNObject ): OSStatus; external name '_TXNPageSetup';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNPrint()
+ *
+ * Summary:
+ * Print the document.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Result:
+ * A result code indicating success or failure. ( such as Print
+ * Manager errors )
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNPrint( iTXNObject: TXNObject ): OSStatus; external name '_TXNPrint';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Search }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNFind()
+ *
+ * Summary:
+ * Find a piece of text or a graphics object.
+ *
+ * Discussion:
+ * The default matching behavior is pretty simple for Text a basic
+ * binary compare is done. If the matchOptions say to ignore case
+ * the characters to be searched are duplicated and case
+ * neutralized. This naturally can fail due to lack of memory if
+ * there is a large amount of text. It also slows things down. If
+ * MatchOptions say find an entire word that once a match is found
+ * an effort is made to determine if the match is a word. The
+ * default behavior is to test the character before and after the to
+ * see if it is White space. If the kTXNUseEncodingWordRulesBit is
+ * set than the Script Manager's FindWord function is called to make
+ * this determination. If the caller is looking for a non-text type
+ * than each non-text type in the document is returned. If more
+ * elaborate ( a regular expression processor or whatever ) is what
+ * you want then that is what the FindProc is for.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iMatchTextDataPtr:
+ * Ptr to a MatchTextRecord which contains the text to match, the
+ * length of that text and the TextEncoding the text is encoded
+ * in. This must be there if you are looking for Text, but can be
+ * NULL if you are looking for a graphics object.
+ *
+ * iDataType:
+ * The type of data to find. This can be any of the types defined
+ * in TXNDataType enum (TEXT, PICT, moov, snd ). However, if
+ * PICT, moov, or snd is passed then the default behavior is to
+ * match on any non-Text object. If you really want to find a
+ * specific type you can provide a custom find callback or ignore
+ * matches which aren't the precise type you are interested in.
+ *
+ * iMatchOptions:
+ * Options on what to search for.
+ *
+ * iStartSearchOffset:
+ * The offset at which a search should begin. The constant
+ * kTXNStartOffset specifies the start of the objects data.
+ *
+ * iEndSearchOffset:
+ * The offset at which the search should end. The constant
+ * kTXNEndOffset specifies the end of the objects data.
+ *
+ * iFindProc:
+ * A custom callback. If will be called to match things rather
+ * than the default matching behavior.
+ *
+ * iRefCon:
+ * This can be use for whatever the caller likes. It is passed to
+ * the FindProc (if a FindProc is provided.
+ *
+ * oStartMatchOffset:
+ * Absolute offset to start of match. set to 0xFFFFFFFF if not
+ * match.
+ *
+ * oEndMatchOffset:
+ * Absolute offset to end of match. Set to 0xFFFFFFFF is no match.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNFind( iTXNObject: TXNObject; {const} iMatchTextDataPtr: TXNMatchTextRecordPtr { can be NULL }; iDataType: TXNDataType; iMatchOptions: TXNMatchOptions; iStartSearchOffset: TXNOffset; iEndSearchOffset: TXNOffset; iFindProc: TXNFindUPP; iRefCon: SInt32; var oStartMatchOffset: TXNOffset; var oEndMatchOffset: TXNOffset ): OSStatus; external name '_TXNFind';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Font Defaults }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNSetFontDefaults()
+ *
+ * Summary:
+ * For a given TXNObject specify the font defaults for each script.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iCount:
+ * Count of FontDescriptions.
+ *
+ * iFontDefaults:
+ * Array of FontDescriptions.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNSetFontDefaults( iTXNObject: TXNObject; iCount: ItemCount; {const} iFontDefaults: {variable-size-array} TXNMacOSPreferredFontDescriptionPtr ): OSStatus; external name '_TXNSetFontDefaults';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNGetFontDefaults()
+ *
+ * Summary:
+ * For a given TXNObject make a copy of the font defaults.
+ *
+ * Discussion:
+ * To determine how many font descriptions need to be in the array
+ * you should call this function with a NULL for the array. iCount
+ * will return with the number of font defaults currently stored.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * ioCount:
+ * Count of FontDescriptions in the array.
+ *
+ * oFontDefaults:
+ * Array of FontDescriptins to be filled out.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNGetFontDefaults( iTXNObject: TXNObject; var ioCount: ItemCount; oFontDefaults: {variable-size-array} TXNMacOSPreferredFontDescriptionPtr { can be NULL } ): OSStatus; external name '_TXNGetFontDefaults';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Font Menu }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNNewFontMenuObject()
+ *
+ * Summary:
+ * Get a FontMenuObject. Caller can extract a fontmenu from this
+ * object and pass this object to the active TXNObject to handle
+ * events in the font menu.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iFontMenuHandle:
+ * An empty menu handle (well the title is there) that the caller
+ * created via NewMenu or GetNewMenu. This menu handle should not
+ * be disposed before the returned TXNFontMenuObject has been
+ * disposed via TXNDisposeFontMenuObject.
+ *
+ * iMenuID:
+ * The MenuID for iFontMenuHandle.
+ *
+ * iStartHierMenuID:
+ * The first MenuID to use if any hierarchical menus need to be
+ * created. TXNNewFontMenuObject uses SetMenuItemHierarchicalID
+ * when creating hierarchial menus. The iStartHierMenuID must
+ * therefor follow the rules for this function. On systems less
+ * than system 8.5 the submenuID must be less than 255. For
+ * systems above system 8.5 the range can be as large can be as
+ * large 32767. However, it is important to remember that
+ * TXNNewFontMenuObject only uses iStartHierMenuID as a starting
+ * id when adding hierarchical menus. Therefore provide plenty of
+ * room to increment this value. For example, on a system less
+ * than 8.5 it would be good to start at 175. On systems greater
+ * than 8.5 it is probably a good idea to not use a value higher
+ * than 32000.
+ *
+ * oTXNFontMenuObject:
+ * A font menu object.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNNewFontMenuObject( iFontMenuHandle: MenuRef; iMenuID: SInt16; iStartHierMenuID: SInt16; var oTXNFontMenuObject: TXNFontMenuObject ): OSStatus; external name '_TXNNewFontMenuObject';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNGetFontMenuHandle()
+ *
+ * Summary:
+ * Get the MenuRef from the TXNFontMenuObject.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNFontMenuObject:
+ * A Font Menu Object obtained from TXNNewFontMenuObject.
+ *
+ * oFontMenuHandle:
+ * The returned font menu. Returned value could be NULL.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNGetFontMenuHandle( iTXNFontMenuObject: TXNFontMenuObject; var oFontMenuHandle: MenuRef ): OSStatus; external name '_TXNGetFontMenuHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+function TXNGetFontMenuRef( iTXNFontMenuObject: TXNFontMenuObject; var oFontMenuHandle: MenuRef ): OSStatus; external name '_TXNGetFontMenuHandle';
+
+
+{
+ * TXNDisposeFontMenuObject()
+ *
+ * Summary:
+ * Dispose a TXNFontMenuObject and its font menu handle.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNFontMenuObject:
+ * A Font Menu Object obtained from TXNNewFontMenuObject.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNDisposeFontMenuObject( iTXNFontMenuObject: TXNFontMenuObject ): OSStatus; external name '_TXNDisposeFontMenuObject';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNDoFontMenuSelection()
+ *
+ * Summary:
+ * Given the menuID and menu item returned by MenuSelect determine
+ * the selected font and change the current selection to be that
+ * Font. If the input TXNObject is not active a parameter error is
+ * returned.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iTXNFontMenuObject:
+ * A Font Menu Object obtained from TXNNewFontMenuObject.
+ *
+ * iMenuID:
+ * SInt16 the ID of the selected menu.
+ *
+ * iMenuItem:
+ * The item that was selected.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNDoFontMenuSelection( iTXNObject: TXNObject; iTXNFontMenuObject: TXNFontMenuObject; iMenuID: SInt16; iMenuItem: SInt16 ): OSStatus; external name '_TXNDoFontMenuSelection';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNPrepareFontMenu()
+ *
+ * Summary:
+ * Prepares a Font menu for display.
+ *
+ * Discussion:
+ * You should call the TXNPrepareFontMenu function just before your
+ * application opens the Font menu for your user. If the text
+ * objectÕs current selection is a single font, MLTE places a
+ * checkmark next to the menu item for that font.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * The text object that identifies the document with the Font menu
+ * you want to prepare. Pass NULL to display an inactive menu
+ * (dimmed).
+ *
+ * iTXNFontMenuObject:
+ * A Font menu object.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNPrepareFontMenu( iTXNObject: TXNObject { can be NULL }; iTXNFontMenuObject: TXNFontMenuObject ): OSStatus; external name '_TXNPrepareFontMenu';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Static Text Box }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNDrawUnicodeTextBox()
+ *
+ * Summary:
+ * Draws a Unicode string in the specified rectangle.
+ *
+ * Discussion:
+ * Client is supposed to do an EraseRect if needed. The drawing will
+ * be clipped to the rect unless the client specifies a rotation.
+ * Use kTXNUseVerticalTextMask to display text vertically (no need
+ * to use the kTXNRotateTextMask flag in this case).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iText:
+ * Ptr to a Unicode string (UTF16 chars).
+ *
+ * iLen:
+ * Number of UniChars in iText (this is not the size of iText).
+ *
+ * ioBox:
+ * On input the text box where the text will be displayed. On
+ * return will be updated to reflect the minimum bounding Rect
+ * that will enclose the text (unless kTXNDontUpdateBoxRectMask is
+ * used).
+ *
+ * iStyle:
+ * Style to use to display the text.
+ *
+ * iOptions:
+ * Can be used to specify non-default behavior.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: in Textension 1.1 and later
+ }
+function TXNDrawUnicodeTextBox( {const} iText: {variable-size-array} UniCharPtr; iLen: UniCharCount; var ioBox: Rect; iStyle: ATSUStyle { can be NULL }; {const} iOptions: TXNTextBoxOptionsDataPtr { can be NULL } ): OSStatus; external name '_TXNDrawUnicodeTextBox';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNDrawCFStringTextBox()
+ *
+ * Summary:
+ * Draws a CFString in the specified rectangle.
+ *
+ * Discussion:
+ * Client is supposed to do an EraseRect if needed. The drawing will
+ * be clipped to the rect unless the client specifies a rotation.
+ * Use kTXNUseVerticalTextMask to display text vertically (no need
+ * to use the kTXNRotateTextMask flag in this case).
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iText:
+ * A CFStringRef (see CFBase.h and CFString.h).
+ *
+ * ioBox:
+ * On input the text box where the text will be displayed. On
+ * return will be updated to reflect the minimum bounding Rect
+ * that will enclose the text (unless kTXNDontUpdateBoxRectMask is
+ * used).
+ *
+ * iStyle:
+ * Style to use to display the text.
+ *
+ * iOptions:
+ * Can be used to specify non-default behavior.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNDrawCFStringTextBox( iText: CFStringRef; var ioBox: Rect; iStyle: ATSUStyle { can be NULL }; {const} iOptions: TXNTextBoxOptionsDataPtr { can be NULL } ): OSStatus; external name '_TXNDrawCFStringTextBox';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Get Line Info }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNGetLineCount()
+ *
+ * Summary:
+ * Get the total number of lines in the TXNObject.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * oLineTotal:
+ * On return the total number of lines in the object.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: in Textension 1.1 and later
+ }
+function TXNGetLineCount( iTXNObject: TXNObject; var oLineTotal: ItemCount ): OSStatus; external name '_TXNGetLineCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNGetLineMetrics()
+ *
+ * Summary:
+ * Get the metrics for the specified line.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iLineNumber:
+ * The line we want the metrics for (0 based).
+ *
+ * oLineWidth:
+ * On return the width of the line (in Fixed format).
+ *
+ * oLineHeight:
+ * On return the height (ascent + descent) of the line (in Fixed
+ * format).
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: in Textension 1.1 and later
+ }
+function TXNGetLineMetrics( iTXNObject: TXNObject; iLineNumber: UInt32; var oLineWidth: Fixed; var oLineHeight: Fixed ): OSStatus; external name '_TXNGetLineMetrics';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Count Changes }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNGetChangeCount()
+ *
+ * Summary:
+ * Retrieve number of times document has been changed.
+ *
+ * Discussion:
+ * That is for every committed command (keydown, cut, copy) the
+ * value returned is count of those. This is useful for deciding if
+ * the Save item in the File menu should be active.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Result:
+ * ItemCount: count of changes. This is total changes since
+ * document was created or last saved. Not count since this
+ * routine was last called or anything like that.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNGetChangeCount( iTXNObject: TXNObject ): ItemCount; external name '_TXNGetChangeCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNGetCountForActionType()
+ *
+ * Summary:
+ * Retrieves the number of times a given kind of action has
+ * occurred. There are three MLTE defined counts:
+ * kTXNActionCountOfTextChanges, kTXNActionCountOfStyleChanges and
+ * kTXNActionCountOfAllChanges. In addition, this API can retrieve
+ * the number of times a custom action has occurred. See
+ * TXNBeginActionGroup for how to define a custom action group.
+ *
+ * Discussion:
+ * Call TXNClearCountForActionType to reset the counters.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iActionTypeName:
+ * Specifies the kind of action changes to be included when
+ * retrieving the count. The value can be
+ * kTXNActionCountOfTextChanges, kTXNActionCountOfStyleChanges,
+ * kTXNActionCountforAllChanges, or a string passed to
+ * TXNBeginActionGroup
+ *
+ * oCount:
+ * The number of times the iActionGroupName action has occurred.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNGetCountForActionType( iTXNObject: TXNObject; iActionTypeName: CFStringRef; var oCount: ItemCount ): OSStatus; external name '_TXNGetCountForActionType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * TXNClearCountForActionType()
+ *
+ * Summary:
+ * Reset the counter(s) for the specified kind of action(s) to zero.
+ *
+ * Discussion:
+ * Use kTXNActionCountOfAllChanges to reset all counters.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iActionTypeName:
+ * Specifies the kind of action changes for which the counter
+ * should be set to zero. The value can be
+ * kTXNActionCountOfTextChanges, kTXNActionCountOfStyleChanges,
+ * kTXNActionCountforAllChanges or any string used to form an
+ * action group with TXNBeginActionGroup.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNClearCountForActionType( iTXNObject: TXNObject; iActionTypeName: CFStringRef ): OSStatus; external name '_TXNClearCountForActionType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Set/Get Object Bounds }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNSetHIRectBounds()
+ *
+ * Summary:
+ * Sets the text object's view, the destination rectangles or both.
+ *
+ * Discussion:
+ * Either of the input rectangle can be NULL. HIRect provides an
+ * uniform interface to the HIView coordinate system.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject. The bounds for
+ * this text object will be set.
+ *
+ * iViewRect:
+ * A pointer to a HIRect data structure that contains the new
+ * coordinates for the view rectangle. Pass NULL if you donÕt want
+ * to change the view rectangle.
+ *
+ * iDestinationRect:
+ * A pointer to a HIRect data structure that contains the new
+ * coordinates for the destination rectangle. Pass NULL if you
+ * donÕt want to change the destination rectangle.
+ *
+ * iUpdate:
+ * Pass true if you want the location of the text and scrollbars
+ * to be recalculated and redrawn, otherwise pass false.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+procedure TXNSetHIRectBounds( iTXNObject: TXNObject; {const} iViewRect: HIRectPtr; {const} iDestinationRect: HIRectPtr; iUpdate: Boolean ); external name '_TXNSetHIRectBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * TXNGetHIRect()
+ *
+ * Summary:
+ * Gets one of the text object's bounds based on the specified
+ * TXNRectKey
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject. The specified
+ * bounds for this text object will be returned.
+ *
+ * iTXNRectKey:
+ * The value for the type of rectangle you want the function to
+ * return.
+ *
+ * oRectangle:
+ * On return, a pointer to the HIRect data structure that contains
+ * the coordinates for the requested rectangle. If a rect is not
+ * defined, a pointer to an empty rect will be returned. Note that
+ * only scrollbar rectangle may be undefined for the text object.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNGetHIRect( iTXNObject: TXNObject; iTXNRectKey: TXNRectKey; var oRectangle: HIRect ): OSStatus; external name '_TXNGetHIRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * TXNResizeFrame()
+ *
+ * Summary:
+ * Changes the frame's size to match the new width and height.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iWidth:
+ * New width in pixels.
+ *
+ * iHeight:
+ * New height in pixels.
+ *
+ * iTXNFrameID:
+ * Deprecated. Pass 0.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNResizeFrame( iTXNObject: TXNObject; iWidth: UInt32; iHeight: UInt32; iTXNFrameID: TXNFrameID ); external name '_TXNResizeFrame';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNSetFrameBounds()
+ *
+ * Summary:
+ * Changes the frame's bounds to match the Rect.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iTop:
+ * Top of the bounds.
+ *
+ * iLeft:
+ * Left of the bounds.
+ *
+ * iBottom:
+ * Bottom of the bounds.
+ *
+ * iRight:
+ * Right of the bounds.
+ *
+ * iTXNFrameID:
+ * Deprecated. Pass 0.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNSetFrameBounds( iTXNObject: TXNObject; iTop: SInt32; iLeft: SInt32; iBottom: SInt32; iRight: SInt32; iTXNFrameID: TXNFrameID ); external name '_TXNSetFrameBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNGetViewRect()
+ *
+ * Summary:
+ * Get the rectangle describing the current view into the document.
+ * The coordinates of this rectangle will be local to the the window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * oViewRect:
+ * The requested view rectangle.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNGetViewRect( iTXNObject: TXNObject; var oViewRect: Rect ); external name '_TXNGetViewRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Layout Calculation }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNRecalcTextLayout()
+ *
+ * Summary:
+ * Recalculates the text layout based on the new View and
+ * Destination rectangles.
+ *
+ * Discussion:
+ * Call this if you called TXNSetRectBounds with the iUpdate
+ * parameter set to false. It will also recalcuate where the
+ * scrollbars, if any, should be placed. Finally an update event
+ * will be generated so that the TXNObject is redrawn.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+procedure TXNRecalcTextLayout( iTXNObject: TXNObject ); external name '_TXNRecalcTextLayout';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Scrolling }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNScroll()
+ *
+ * Discussion:
+ * TXNScroll scrolls the text within a view rectangle of the
+ * specified object by the designated number of units. For example,
+ * you might want to scroll the text in an object in response to
+ * user input in a control other than the standard scrollbars that
+ * MLTE supplies.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iVerticalScrollUnit:
+ * Specifies what units the values in ioVerticalDelta are in. If
+ * iVerticalScrollUnit is equal to kTXNScrollUnitsInPixels the
+ * value is treated as pixels. If the value is
+ * kTXNScrollUnitsInLines the value is treated as a count of
+ * lines. Note that using this value is the slowest because each
+ * line must be measured before it scrolls. Finally if
+ * kTXNScrollUnitsInViewRects the value is treated as the height
+ * of the current viewRect.
+ *
+ * iHorizontalScrollUnit:
+ * Specifies what units the values in iDh are in. If
+ * iHorizontalScrollUnit is equal to kTXNScrollUnitsInPixels the
+ * value is treated as pixels. If the value is
+ * kTXNScrollUnitsInLines the value is treated as a count of
+ * lines. Note that using this value for horizontal scrolling
+ * means that 16 pixels will be used to represent a line. Finally
+ * if kTXNScrollUnitsInViewRects the value is treated as the width
+ * of the current viewRect.
+ *
+ * ioVerticalDelta:
+ * The vertical amount to scroll. The values in ioVerticalDelta
+ * can be treated as pixels, lines or viewrects. See the
+ * discussion of the TXNScrollUnit parameters for more information
+ * for this. On return this will contain the number of pixels
+ * actually scrolled in the vertical direction. A positive value
+ * moves the text down.
+ *
+ * ioHorizontalDelta:
+ * The horizontal amount to scroll. The values in
+ * ioHorizontalDelta can specify a scroll amount that is pixels,
+ * lines or view rects. Set TXNScrollUnit discussion for more
+ * information. On return this will contain the number of pixels
+ * actually scrolled in the horizontal direction. A positive value
+ * moves the text to the right.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: in Textension not yet available
+ }
+function TXNScroll( iTXNObject: TXNObject; iVerticalScrollUnit: TXNScrollUnit; iHorizontalScrollUnit: TXNScrollUnit; var ioVerticalDelta: SInt32; var ioHorizontalDelta: SInt32 ): OSStatus; external name '_TXNScroll';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * TXNRegisterScrollInfoProc()
+ *
+ * Discussion:
+ * If your application is drawing and handling its own scrolling
+ * widgets use this function to register a TXNScrollInfoUPP. If you
+ * register a TXNScrollInfoUPP it will be called every time MLTE
+ * would normally update the values and maximum values of an MLTE
+ * scrollbar. For example when the user types the return key to add
+ * a new line at the end of their text MLTE will calculate a new
+ * maximum value. If you have registered a TXNScrollInfoUPP it will
+ * be called with this nex maximum value. To turn off the callbacks
+ * call TXNRegisterScrollInfoProc with a value of NULL for the
+ * iTXNScrollInfoUPP.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iTXNScrollInfoUPP:
+ * A universal procedure pointer.
+ *
+ * iRefCon:
+ * A refcon that is passed to the callback.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
+ * Non-Carbon CFM: in Textension not yet available
+ }
+procedure TXNRegisterScrollInfoProc( iTXNObject: TXNObject; iTXNScrollInfoUPP: TXNScrollInfoUPP; iRefCon: SInt32 ); external name '_TXNRegisterScrollInfoProc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * TXNSetScrollbarState()
+ *
+ * Summary:
+ * Sets the state of the scrollbars
+ *
+ * Discussion:
+ * This replaces TXNActivate, which was confusing to many
+ * developers, since it only activates/inactivates the scrollbar.
+ * This is useful for activating scrollbar(s) even when the object
+ * does not have focus.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iActiveState:
+ * Boolean: if true, scrollbars will be active even if the object
+ * does not have the keyboard focus. If false, scrollbars are
+ * synched with active state
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNSetScrollbarState( iTXNObject: TXNObject; iActiveState: TXNScrollBarState ): OSStatus; external name '_TXNSetScrollbarState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Offset/Point Conversion }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNHIPointToOffset()
+ *
+ * Summary:
+ * Gets the coordinates of the point that corresponds to a specified
+ * offset in a text object.
+ *
+ * Discussion:
+ * The coordinates of the point are in the coordinate system of the
+ * window or view owning the text object. Note that the owner of
+ * the a text object is a view only in the case when the object is
+ * in a HITextView.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject. The text object
+ * for which you want to obtain an offset value.
+ *
+ * iHIPoint:
+ * A pointer to an HIPoint.
+ *
+ * oOffset:
+ * On return, a pointer to the offset that corresponds to the
+ * value of the iHIPoint parameter.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNHIPointToOffset( iTXNObject: TXNObject; const (*var*) iHIPoint: HIPoint; var oOffset: TXNOffset ): OSStatus; external name '_TXNHIPointToOffset';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * TXNOffsetToHIPoint()
+ *
+ * Summary:
+ * Gets the coordinates of the point that corresponds to a specified
+ * offset in a text object.
+ *
+ * Discussion:
+ * The coordinates of the point are in the coordinate system of the
+ * window or view owning the text object. Note that the owner of
+ * the a text object is a view only in the case when the object is
+ * in a HITextView.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject. The text object
+ * for which you want to obtain the coordinates of a point.
+ *
+ * iOffset:
+ * A text offset value.
+ *
+ * oHIPoint:
+ * On return, a pointer to the point that corresponds to the value
+ * of the iOffset parameter.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNOffsetToHIPoint( iTXNObject: TXNObject; iOffset: TXNOffset; var oHIPoint: HIPoint ): OSStatus; external name '_TXNOffsetToHIPoint';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Drag and Drop }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNDragTracker()
+ *
+ * Summary:
+ * If you ask that Drag handling procs not be installed. Call this
+ * when your drag tracker is called and you want Textension to take
+ * over.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNNewObject.
+ *
+ * iTXNFrameID:
+ * Deprecated. Pass 0.
+ *
+ * iMessage:
+ * Drag message obtained from Drag Manager.
+ *
+ * iWindow:
+ * WindowRef obtained from Drag Manager.
+ *
+ * iDragReference:
+ * DragReference obtained from Drag Manager.
+ *
+ * iDifferentObjectSameWindow:
+ * Pass true if the drag is still in the same window that it
+ * started in. False if the drag has moved into a different window.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNDragTracker( iTXNObject: TXNObject; iTXNFrameID: TXNFrameID; iMessage: DragTrackingMessage; iWindow: WindowRef; iDragReference: DragReference; iDifferentObjectSameWindow: Boolean ): OSErr; external name '_TXNDragTracker';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * TXNDragReceiver()
+ *
+ * Summary:
+ * If you ask that Drag handling procs not be installed. Call this
+ * when your drag receiver is called and you want Textension to take
+ * over.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNNewObject.
+ *
+ * iTXNFrameID:
+ * Deprecated. Pass 0.
+ *
+ * iWindow:
+ * WindowRef obtained from Drag Manager.
+ *
+ * iDragReference:
+ * DragReference obtained from Drag Manager.
+ *
+ * iDifferentObjectSameWindow:
+ * Pass true if the drag is still in the same window that it
+ * started in. False if the drag has moved into a different window.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNDragReceiver( iTXNObject: TXNObject; iTXNFrameID: TXNFrameID; iWindow: WindowRef; iDragReference: DragReference; iDifferentObjectSameWindow: Boolean ): OSErr; external name '_TXNDragReceiver';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Command Events and Spell Checking }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+
+{
+ * TXNCommandEventSupportOptions
+ *
+ * Discussion:
+ * Use these constants to turn support for specific HICommands in a
+ * given MLTE object.
+ }
+type
+ TXNCommandEventSupportOptions = UInt32;
+const
+{
+ * Setting this bit enables processing for these HICommands:
+ * kHICommandUndo, kHICommandRedo, kHICommandCut, kHICommandCopy,
+ * kHICommandPaste, kHICommandClear, kHICommandSelectAll.
+ }
+ kTXNSupportEditCommandProcessing = 1 shl 0;
+
+ {
+ * Setting this bit turns support on for updating the the menu item
+ * associated with the above edit commands. What that means is:
+ *
+ *
+ * For Undo the undo item will be enabled if there are any undoable
+ * actions in MLTE's command stack. Additionally, if you have
+ * installed an action key mapper proc that will be called to get the
+ * appropriate string for the undo item.
+ *
+ * For Redo the Redo item is enabled if there are any redoable
+ * actions and the action key mapper callback will be called if it is
+ * installed.
+ *
+ * For Cut and Clear the item is enabled if a the current selection
+ * is not empty. If the selection is empty this is disabled.
+ *
+ *
+ * For Paste the item is enabled if the clipboard is not empty. It
+ * is disabled if the clipboard is empty or contains data that MLTE
+ * does not understand.
+ * <BR> For Select All the item is always enabled.
+ }
+ kTXNSupportEditCommandUpdating = 1 shl 1;
+
+ {
+ * Turns on support for spell checking. The spell checking commands
+ * supported are: Show Spelling Panel ('shsp'), Check Spelling
+ * ('cksp'), Change Spelling ('chsp'), enable check spelling as you
+ * type ('aspc'), ignore spelling ('igsp'), learn spelling ('lrwd').
+ }
+ kTXNSupportSpellCheckCommandProcessing = 1 shl 2;
+
+ {
+ * Turns on support for updating the menu item associated with a
+ * given spell checking command.
+ *
+ * Show Spelling: This item is always enabled.
+ *
+ * Check Spelling: This item is always enabled.
+ *
+ * Change Spelling: Typically this is not included in a spelling
+ * menu. If it is included it is enabled if the current selection is
+ * a missspelled word. It is disabled if the current selection is
+ * empty or is not a misspelled word.
+ *
+ * Check Spelling as You Type: This item is always enabled. It is
+ * checked if this feature has been enabled. By default when you
+ * turn on spell checking this is enabled. If this feature has been
+ * disabled the item is unchecked.
+ *
+ * Ignore Spelling. This is a command that usually does not have a
+ * corresponding menu item. If a menu does have this item it is
+ * disabled if the current selection is empty or is not a misspelled
+ * word. It is enabled if the current selection is a misspelled
+ * word.
+ *
+ * Learn Spelling. Another command that typically does not have a
+ * corresponding menu item. It behaves exactly like the Ignore
+ * spelling command.
+ }
+ kTXNSupportSpellCheckCommandUpdating = 1 shl 3;
+
+ {
+ * Setting this bit to turn on Carbon Font Panel support. Once
+ * support is turned on, MLTE handles the following Carbon Events
+ * defined in FontPanel.h: ¥ kHICommandShowHideFontPanel and
+ * kEventFontPanelClosed to show and hide the Carbon font panel ¥
+ * kEventFontSelection event to update the document after you select
+ * a new font, size, style, color, or any features setting from the
+ * Typography Panel.
+ }
+ kTXNSupportFontCommandProcessing = 1 shl 4;
+
+ {
+ * Setting this bit to turn on support for updating the selection in
+ * Carbon Font Panel when the current selection in MLTE document is
+ * changed. When you set this bit, kTXNSupportFontCommandProcessing
+ * has to be set also, which means that you only can get this support
+ * if Carbon Font Panel support is on.
+ }
+ kTXNSupportFontCommandUpdating = 1 shl 5;
+
+{
+ * TXNSetCommandEventSupport()
+ *
+ * Summary:
+ * Turn support for a variety of HICommands on or off in MLTE. See
+ * the documentation for the TXNCommandEventSupportOptions constants
+ * for the set of commands that are supported.
+ *
+ * Discussion:
+ * This function enables support for a variety of commands. It is
+ * important to know that the handlers are installed immediatedly
+ * when an MLTE object is associated with an HIObject that can serve
+ * as an event target ( via a call to TXNAttachObjectToWindow or
+ * TXNSetEventTarget ). However when the handlers are installed they
+ * are not enabled. Calling TXNSetCommandEventSupport enables the
+ * commands. Using this approach means that an application can
+ * install handlers on top of these and be sure that enabling or
+ * disabling the MLTE handlers will not change the order of the
+ * handler chain.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * The TXNObject.
+ *
+ * iOptions:
+ * Set this to enable/disable command support for selected Edit
+ * commands (kHICommandUndo, kHICommandRedo, kHICommandCut,
+ * kHICommandCopy, kHICommandPaste, kHICommandClear,
+ * kHICommandSelectAll) and/or support for spell checking commands.
+ *
+ * Result:
+ * An OSStatus code. noErr if the operation was successful.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNSetCommandEventSupport( iTXNObject: TXNObject; iOptions: TXNCommandEventSupportOptions ): OSStatus; external name '_TXNSetCommandEventSupport';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * TXNGetCommandEventSupport()
+ *
+ * Summary:
+ * Returns the command event support that is currently set for an
+ * MLTE object.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * The TXNObject.
+ *
+ * oOptions:
+ * A pointer to a TXNCommandEventSupportOptions. Contains the
+ * option settings or return.
+ *
+ * Result:
+ * An OSStatus code. noErr if the operation was successful.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNGetCommandEventSupport( iTXNObject: TXNObject; var oOptions: TXNCommandEventSupportOptions ): OSStatus; external name '_TXNGetCommandEventSupport';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * TXNSetSpellCheckAsYouType()
+ *
+ * Summary:
+ * Call to turn on spell check as you type. If spell checking as
+ * not been enabled via a call to TXNSetCommandEventSupport than an
+ * error is returned.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * The TXNObject.
+ *
+ * iActivate:
+ * Turns "Spell Check as You Type" on if true. Turns it off if
+ * false.
+ *
+ * Result:
+ * An OSStatus code. noErr if the operation was successful.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNSetSpellCheckAsYouType( iTXNObject: TXNObject; iActivate: Boolean ): OSStatus; external name '_TXNSetSpellCheckAsYouType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * TXNGetSpellCheckAsYouType()
+ *
+ * Summary:
+ * Call this function to determine if "Spell Check as You Type" is
+ * turned on or off.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * The TXNObject.
+ *
+ * Result:
+ * A Boolean. The value is true if Spell Check As You Type is on
+ * and false if not. Additionally if Spell Checking is not enabled
+ * for the TXNObject then the result of this function will be false.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNGetSpellCheckAsYouType( iTXNObject: TXNObject ): Boolean; external name '_TXNGetSpellCheckAsYouType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ Functions for controlling the current event target object.
+}
+{
+ * TXNSetEventTarget()
+ *
+ * Summary:
+ * Specifies a Carbon Event target for MLTE Carbon Event Handlers.
+ *
+ * Discussion:
+ * Call this function when you want to override or set the
+ * TXNObject's Carbon Event Target. The default target for
+ * TXNObjects that are not contained in an HITextView is the
+ * TXNObject's window. Note that if the TXNObject already has a
+ * default target when this function is called the handlers will be
+ * removed from the old target before install the new handlers that
+ * are listed below.
+ *
+ * When this function returns handlers for the following Carbon
+ * Events are installed and are active:
+ *
+ * For kEventClassTextInput:
+ * kEventTextInputUpdateActiveInputArea
+ * kEventTextInputUnicodeForKeyEvent
+ * kEventTextInputUnicodeText
+ * kEventTextInputOffsetToPos
+ * kEventTextInputPosToOffset
+ * kEventTextInputGetSelectedText
+ *
+ * For kEventClassTSMDocumentAccess:
+ * kEventTSMDocumentAccessGetLength
+ * kEventTSMDocumentAccessGetSelectedRange
+ * kEventTSMDocumentAccessGetCharactersPtr
+ * kEventTSMDocumentAccessGetCharactersPtrForLargestBuffer
+ * kEventTSMDocumentAccessGetCharacters
+ * kEventTSMDocumentAccessGetFont
+ * kEventTSMDocumentAccessGetGlyphInfo
+ *
+ * For kEventClassFont:
+ * kEventFontPanelClosed
+ * kEventFontSelection
+ *
+ * Additionally these handlers for kEventClassCommand are installed,
+ * but are inactive by default.
+ * kEventProcessCommand
+ * kEventCommandUpdateStatus
+ *
+ * The kEventClassCommand handlers support the following commands:
+ *
+ * kHICommandUndo
+ * kHICommandRedo
+ * kHICommandSelectAll
+ * kHICommandCut
+ * kHICommandCopy
+ * kHICommandPaste
+ * kHICommandClear
+ * kHICommandShowSpellingPanel
+ * kHICommandCheckSpelling
+ * kHICommandChangeSpelling
+ * kHICommandCheckSpellingAsYouType
+ * kHICommandIgnoreSpelling
+ * kHICommandLearnWord
+ *
+ * Activate command support by calling TXNSetCommandEventSupport
+ * with the correct options.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * The TXNObject.
+ *
+ * iEventTarget:
+ * An HIObjectRef. The HIObject will become the event target for
+ * all of the TXNObject's Carbon Event handlers.
+ *
+ * Result:
+ * An OSStatus code. noErr if the operation was successful.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNSetEventTarget( iTXNObject: TXNObject; iEventTarget: HIObjectRef { can be NULL } ): OSStatus; external name '_TXNSetEventTarget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * TXNGetEventTarget()
+ *
+ * Summary:
+ * Requests a TXNObject's current event target.
+ *
+ * Discussion:
+ * This function is used to obtain the HIObjectRef which is the
+ * TXNObject's carbon event target. Callers can use this function to
+ * obtain the target and subsequently install their own handlers.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * The TXNObject.
+ *
+ * oEventTarget:
+ * An HIObjectRef pointer. The current Carbon Event target.
+ *
+ * Result:
+ * An OSStatus code. noErr if the operation was successful.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNGetEventTarget( iTXNObject: TXNObject; var oEventTarget: HIObjectRef ): OSStatus; external name '_TXNGetEventTarget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * TXNSetContextualMenuSetup()
+ *
+ * Summary:
+ * Provides a callback function that is called before MLTE displays
+ * its contextual menu.
+ *
+ * Discussion:
+ * The menuSetupProc is called immediately before MLTE displays its
+ * contextual menu. The menu that is passed to the callback will
+ * only contain MLTE specific items. The client items and handlers
+ * should be installed each time the callback is called. When the
+ * callback is called MLTE will have selected the word that the user
+ * option-clicked on. For convenience sake the TXNObject associated
+ * with the callback is passed to the callback as well as the user
+ * data.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * The TXNObject.
+ *
+ * iMenuSetupProc:
+ * The callback.
+ *
+ * iUserData:
+ * A pointer to some useful data.
+ *
+ * Result:
+ * OStatus. noErr is the operation is successful.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNSetContextualMenuSetup( iTXNObject: TXNObject; iMenuSetupProc: TXNContextualMenuSetupUPP; iUserData: {const} UnivPtr ): OSStatus; external name '_TXNSetContextualMenuSetup';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Accessibility }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNGetAccessibilityHIObject()
+ *
+ * Summary:
+ * Return an HIObjectRef used to represent the MLTE object for
+ * accessibility.
+ *
+ * Discussion:
+ * For each MLTE object a view creates, the view needs to call
+ * TXNGetAccessibilityHIObject to get an HIObjectRef that can be
+ * used to represent the MLTE object as an accessible
+ * object.
+ *
+ * After the view gets this HIObjectRef, it must add the HIObjectRef
+ * as a child of itself. The accessibility engine will then route
+ * events to MLTE accessible objects automatically.
+ *
+ * The view must install Carbon event handlers for
+ * kEventAccessibleGetAllAttributeNames and
+ * kEventAccessibleGetNamedAttribute, using the HIObjectRef as the
+ * target, to provide information for at least the following
+ * required attributes:
+ *
+ * kAXRoleAttribute
+ * kAXRoleDescriptionAttribute
+ * kAXWindowAttribute
+ * kAXTopUIElementAttribute
+ * kAXPositionAttribute
+ * kAXSizeAttribute
+ *
+ * MLTE also installs handlers for
+ * kEventAccessibleGetAllAttributeNames and
+ * kEventAccessibleGetNamedAttribute. These handlers return
+ * information for the following attributes. Note that these
+ * handlers will not get called unless the client-installed handlers
+ * return eventNotHandledErr.
+ *
+ * kAXEnabledAttribute
+ * kAXFocusedAttribute
+ * kAXValueAttribute
+ * kAXSelectedTextAttribute
+ * kAXSelectedTextRangeAttribute
+ * kAXNumberOfCharactersAttribute
+ *
+ * kAXLineForIndexParameterizedAttribute
+ * kAXRangeForLineParameterizedAttribute
+ * kAXStringForRangeParameterizedAttribute
+ * kAXRangeForPositionParameterizedAttribute
+ * kAXRangeForIndexParameterizedAttribute
+ * kAXBoundsForRangeParameterizedAttribute
+ * kAXStyleRangeForIndexParameterizedAttribute
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * oHIObjectRef:
+ * An HIObjectRef which represents iTXNObject as an accessible
+ * object.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNGetAccessibilityHIObject( iTXNObject: TXNObject; var oHIObjectRef: HIObjectRef ): OSStatus; external name '_TXNGetAccessibilityHIObject';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ **************************************************************************************************** }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ HITEXTVIEW APIs ¥ }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ **************************************************************************************************** }
+
+{==============================================================================}
+{ HITextView is a MLTE view that can be embedded in the HIView hierarchy. The }
+{ view can be embedded in an HIScrollView if scroll bars are desired and can }
+{ be used in a composited window. On creation, a TXNObject is created to back }
+{ the view. You can extract the TXNObject at any time and use a subset of the }
+{ MLTE API with that object as an argument. }
+{==============================================================================}
+{
+ In Mac OS X 10.4 and later, HITextView supports these tags previously defined for the EditText control:
+
+ kControlEditTextCharCount
+ kControlEditTextSelectionTag
+ kControlEditTextCFStringTag
+ kControlEditTextInsertCFStringRefTag
+}
+
+{ The HIObject class ID for the HITextView class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHITextViewClassID CFSTRP('com.apple.HITextView')}
+{$endc}
+{ ControlKind}
+const
+ kControlKindHITextView = $68697478 (* 'hitx' *);
+
+
+{
+ * HITextViewCreate()
+ *
+ * Summary:
+ * Creates a text view. The new view is initially invisible.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inBoundsRect:
+ * The bounding box of the view. If NULL, the bounds of the view
+ * will be initialized to 0.
+ *
+ * inOptions:
+ * There are currently no options. This must be 0.
+ *
+ * inTXNFrameOptions:
+ * Any frame options desired for the TXN object creation.
+ *
+ * outTextView:
+ * On exit, contains the new view.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HITextViewCreate( {const} inBoundsRect: HIRectPtr { can be NULL }; inOptions: OptionBits; inTXNFrameOptions: TXNFrameOptions; var outTextView: HIViewRef ): OSStatus; external name '_HITextViewCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HITextViewGetTXNObject()
+ *
+ * Summary:
+ * Obtains the TXNObject that backs the text view.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inTextView:
+ * The text view that contains the TXNObject you wish to retrieve.
+ *
+ * Result:
+ * The TXNObject backing the given view.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HITextViewGetTXNObject( inTextView: HIViewRef ): TXNObject; external name '_HITextViewGetTXNObject';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HITextViewSetBackgroundColor()
+ *
+ * Summary:
+ * Sets the background color of the view. This allows you to provide
+ * alpha as well. If inColor is NULL, the background of the text
+ * view will not draw.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inTextView:
+ * The text view that you are modifying the background color of.
+ *
+ * inColor:
+ * A CGColorRef representing the color or pattern that will fill
+ * the background of the text view. The CGColorRef will be
+ * retained by this API. If the text view already contains a
+ * background color, it will be released prior to the new color
+ * being retained. If inColor is NULL, the background of the text
+ * view will not draw.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HITextViewSetBackgroundColor( inTextView: HIViewRef; inColor: CGColorRef { can be NULL } ): OSStatus; external name '_HITextViewSetBackgroundColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{
+ * HITextViewCopyBackgroundColor()
+ *
+ * Summary:
+ * Gets the background color of the view. If the background color
+ * returned is NULL, the background does not draw.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inTextView:
+ * The text view from which you want to obtain the background
+ * color.
+ *
+ * outColor:
+ * A CGColorRef representing the color or pattern that is used for
+ * drawing the background of the text view. If the returned value
+ * is NULL, the background does not draw. If the returned
+ * CGColorRef is not NULL, it will be retained on return. You are
+ * responsible for releasing this CGColorRef when you are no
+ * longer referencing it.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function HITextViewCopyBackgroundColor( inTextView: HIViewRef; var outColor: CGColorRef ): OSStatus; external name '_HITextViewCopyBackgroundColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ **************************************************************************************************** }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ DEPRECATED ¥ }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ **************************************************************************************************** }
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ DEPRECATED CONSTANTS }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXTNTag
+ *
+ * Summary:
+ * Deprecated. Use TXNTypeRunAttributes.
+ }
+
+type
+ TXTNTag = FourCharCode;
+
+{
+ * TXNErrors
+ *
+ * Summary:
+ * Deprecated. Use OSStatus.
+ }
+type
+ TXNErrors = OSStatus;
+
+{
+ * TXNObjectRefcon
+ *
+ * Summary:
+ * Deprecated. Only used by TXNNewObject API, which has been
+ * deprecated.
+ }
+type
+ TXNObjectRefcon = UnivPtr;
+
+{
+ * TXNLongRect
+ *
+ * Summary:
+ * Deprecated. Only used by TXNGetRectBounds/TXNSetRectBounds APIs,
+ * which have been deprecated.
+ }
+type
+ TXNLongRectPtr = ^TXNLongRect;
+ TXNLongRect = record
+ top: SInt32;
+ left: SInt32;
+ bottom: SInt32;
+ right: SInt32;
+ end;
+
+{
+ * TXNFrameType
+ *
+ * Summary:
+ * Deprecated. Only used by TXNNewObject API, which has been
+ * deprecated. Only kTXNTextEditStyleFrameType is supported.
+ }
+type
+ TXNFrameType = UInt32;
+const
+ kTXNTextEditStyleFrameType = 1;
+ kTXNPageFrameType = 2; { Not supported}
+ kTXNMultipleFrameType = 3; { Not supported}
+
+
+{
+ Deprecated TXNTypeRunAttributes and TXNTypeRunAttributeSizes constants.
+ kTXNQDFontSizeAttribute is obsolete. Incorrect font sizes are always returned as a Fixed
+ value. Use kTXNFontSizeAttribute instead.
+}
+
+const
+ kTXNQDFontSizeAttribute = $73697A65 (* 'size' *);
+
+const
+ kTXNQDFontSizeAttributeSize = SizeOf(SInt16);
+
+
+{
+ Deprecated QuickDraw imaging constants.
+ On Mac OS X version 10.4 and later, MLTE always uses Quartz imaging.
+}
+
+const
+ kTXNUseQDforImagingBit = 16;
+
+const
+ kTXNUseQDforImagingMask = 1 shl kTXNUseQDforImagingBit;
+
+const
+ kTXNImageWithQDBit = 8;
+
+const
+ kTXNImageWithQDMask = 1 shl kTXNImageWithQDBit;
+
+
+{
+ Deprecated TXNControlTag constant.
+ On Mac OS X version 10.4 and later, MLTE never draws the caret when inactive.
+}
+
+const
+ kTXNDrawCaretWhenInactiveTag = $64637274 (* 'dcrt' *); { Caret will never be drawn when inactive.}
+
+const
+ kTXNDontDrawCaretWhenInactive = false;
+ kTXNDrawCaretWhenInactive = true;
+
+const
+ kTXNDontDrawCaretWhenInactiveBit = 12;
+
+const
+ kTXNDontDrawCaretWhenInactiveMask = 1 shl kTXNDontDrawCaretWhenInactiveBit;
+
+
+{
+ Deprecated TSM constants.
+ On Mac OS X, MLTE uses the Text Services Manager.
+}
+
+const
+ kTXNNoTSMEverBit = 4;
+
+const
+ kTXNNoTSMEverMask = 1 shl kTXNNoTSMEverBit;
+
+
+{
+ Deprecated TXNCarbonEventInfo flag constants.
+ MLTE does not support AppleEvents on Mac OS X version 10.1 and later.
+}
+
+const
+ kTXNNoAppleEventHandlersBit = 0;
+ kTXNRestartAppleEventHandlersBit = 1;
+
+const
+ kTXNNoAppleEventHandlersMask = 1 shl kTXNNoAppleEventHandlersBit;
+ kTXNRestartAppleEventHandlersMask = 1 shl kTXNRestartAppleEventHandlersBit;
+
+{ Use kTXNFontMenuObjectKey}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTXNFontMenuRefKey CFSTRP('FontMenuRef')}
+{$endc}
+
+{
+ * TXNActionKey
+ *
+ }
+type
+ TXNActionKeyPtr = ^TXNActionKey; { when a VAR xx: TXNActionKey parameter can be nil, it is changed to xx: TXNActionKeyPtr }
+ TXNActionKey = UInt32;
+const
+ kTXNTypingAction = 0;
+ kTXNCutAction = 1;
+ kTXNPasteAction = 2;
+ kTXNClearAction = 3;
+ kTXNChangeFontAction = 4;
+ kTXNChangeFontColorAction = 5;
+ kTXNChangeFontSizeAction = 6;
+ kTXNChangeStyleAction = 7;
+ kTXNAlignLeftAction = 8;
+ kTXNAlignCenterAction = 9;
+ kTXNAlignRightAction = 10;
+ kTXNDropAction = 11;
+ kTXNMoveAction = 12;
+ kTXNFontFeatureAction = 13;
+ kTXNFontVariationAction = 14;
+
+ {
+ * Use if none of the above apply.
+ }
+ kTXNUndoLastAction = 1024;
+
+{ Deprecated on Mac OS X version 10.4 and later, use kTXNActionNameMapperKey instead.}
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kTXNActionKeyMapperKey CFSTRP('ActionKeyMapper')}
+{$endc}
+
+{ Deprecated on Mac OS X version 10.4 and later, use TXNActionNameMapperProcPtr instead.}
+type
+ TXNActionKeyMapperProcPtr = function( actionKey: TXNActionKey; commandID: UInt32 ): CFStringRef;
+type
+ TXNActionKeyMapperUPP = TXNActionKeyMapperProcPtr;
+{
+ * NewTXNActionKeyMapperUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewTXNActionKeyMapperUPP( userRoutine: TXNActionKeyMapperProcPtr ): TXNActionKeyMapperUPP; external name '_NewTXNActionKeyMapperUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeTXNActionKeyMapperUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeTXNActionKeyMapperUPP( userUPP: TXNActionKeyMapperUPP ); external name '_DisposeTXNActionKeyMapperUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeTXNActionKeyMapperUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeTXNActionKeyMapperUPP( actionKey: TXNActionKey; commandID: UInt32; userUPP: TXNActionKeyMapperUPP ): CFStringRef; external name '_InvokeTXNActionKeyMapperUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Count Option Bits }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Options for TXNGet/ClearActionChangeCount to decide what type(s) of action count to use. }
+
+const
+ kTXNTextInputCountBit = 0;
+ kTXNRunCountBit = 1;
+
+
+{
+ * TXNCountOptions
+ *
+ }
+type
+ TXNCountOptions = OptionBits;
+const
+ kTXNTextInputCountMask = 1 shl kTXNTextInputCountBit;
+ kTXNRunCountMask = 1 shl kTXNRunCountBit;
+ kTXNAllCountMask = kTXNTextInputCountMask or kTXNRunCountMask;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ DEPRECATED APIs, Mac OS X version 10.2 and later }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNSetViewRect() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TXNSetFrameBounds or TXNSetRectBounds APIs instead.
+ *
+ * Discussion:
+ * Set the rectangle describing the current view into the document.
+ * This will change how much text is viewable. Not where a line of
+ * text wraps. That is controlled by TXNSetFrameBoundsSize.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iViewRect:
+ * Rect of the view.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.2
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: in Textension 1.3 and later
+ }
+procedure TXNSetViewRect( iTXNObject: TXNObject; const (*var*) iViewRect: Rect ); external name '_TXNSetViewRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ DEPRECATED APIs, Mac OS X version 10.3 and later }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNNewObject() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TXNCreateObject API instead.
+ *
+ * Discussion:
+ * Allocates a new frame (i.e. new is called to allocate a
+ * TXNObject) and returns a pointer to the object in the newDoc
+ * parameter.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iFileSpec:
+ * If NULL you start with an empty document. If not NULL, the
+ * file is read to obtain the document contents after the object
+ * is successfully allocated.
+ *
+ * iWindow:
+ * Required. The window in which the document is going to be
+ * displayed. If a fileSpec is provided during creation, the
+ * filename is going to be used as the window title. If iWindow
+ * is NULL, TXNAttachObjectToWindow needs to be called after
+ * creation.
+ *
+ * iFrame:
+ * If text-area does not fill the entire window. This specifies
+ * the area to fill. Can be NULL. In which case, the windowÕs
+ * portRect is used as the frame.
+ *
+ * iFrameOptions:
+ * Specify the options to be supported by this frame. The
+ * available options are support for cutting and pasting movies
+ * and sound, handle scrollbars and handle grow box in the frame.
+ *
+ * iFrameType:
+ * Specify the type of frame to be used. In MLTE version 1.1 and
+ * earlier, only kTXNTextEditStyleFrameType is supported.
+ *
+ * iFileType:
+ * Specify the primary file type. If you use
+ * kTextensionTextFile files will be saved in a private format
+ * (see xxx). If you want saved files to be plain text files you
+ * should specify 'TEXT' here. If you specify 'TEXT' here you can
+ * use the frameOptions parameter to specify whether the TEXT
+ * files should be saved with 'MPSR' resources or 'styl'
+ * resources. These are resources which contain style information
+ * for a file, and they both have there own limitations. If you
+ * use 'styl' resources to save style info your documents can have
+ * as many styles as you like however tabs will not be saved. If
+ * you use 'MPSR' resources only the first style in the document
+ * will be saved (you as client are expected to apply all style
+ * changes to the entire document). If you truly want rich
+ * documents which can potentially contain graphics and sound you
+ * should specify kTextensionTextFileOutput. If you want a plain
+ * text editor like SimpleText specify that style information by
+ * saved via ÔstylÕ resources. If you want files similar to those
+ * output by CW IDE, BBEdit, and MPW specify that style
+ * information be saved in a ÔMPSRÕ resource.
+ *
+ * iPermanentEncoding:
+ * The encoding in which the document should be saved (Unicode,
+ * Text or System default).
+ *
+ * oTXNObject:
+ * Pointer to the opaque datastructure allocated by the function.
+ * Most of the subsequent functions require that such a pointer be
+ * passed in.
+ *
+ * oTXNFrameID:
+ * Unique ID for the frame. This value is always set to 0.
+ *
+ * iRefCon:
+ * Caller can set this to any value. It is retained by the
+ * TXNNewObject which can later be asked to return it.
+ *
+ * Result:
+ * If anything goes wrong the error is returned. Success must be
+ * complete. That is if everything works, but there is a failure
+ * reading a specified file the object is freed.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNNewObject( {const} iFileSpec: FSSpecPtr { can be NULL }; iWindow: WindowRef; {const} iFrame: RectPtr { can be NULL }; iFrameOptions: TXNFrameOptions; iFrameType: TXNFrameType; iFileType: TXNFileType; iPermanentEncoding: TXNPermanentTextEncodingType; var oTXNObject: TXNObject; var oTXNFrameID: TXNFrameID; iRefCon: TXNObjectRefcon ): OSStatus; external name '_TXNNewObject';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * TXNTerminateTextension() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * No longer needed.
+ *
+ * Discussion:
+ * Close the Textension library. It is necessary to call this
+ * function so that Textension can correctly close down any TSM
+ * connections and do other clean up.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNTerminateTextension; external name '_TXNTerminateTextension';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * TXNSetDataFromFile() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TXNSetDataFromCFURLRef API instead.
+ *
+ * Discussion:
+ * Replace the specified range with the contents of the specified
+ * file. The data fork of the file must be opened by the caller.
+ * Functional in NoUserIO mode.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iFileRefNum:
+ * File RefNum.
+ *
+ * iFileType:
+ * File type.
+ *
+ * iFileLength:
+ * The length of data in the file that should be considered data.
+ * This parameter is available to enable callers to embed text
+ * inside their own private data structures. Note that if the
+ * data is in the Textension(txtn) format this parameter is
+ * ignored since length, etc. information is part of the format.
+ * Further note that if you you just want Textension to read a
+ * file and you are not interested in embedding you can just pass
+ * kTXNEndOffset(0x7FFFFFFF), and Textension will use the file
+ * manager to determine the files length.
+ *
+ * iStartOffset:
+ * Start position at which to insert the file into the document.
+ *
+ * iEndOffset:
+ * End position of range being replaced by the file.
+ *
+ * Result:
+ * File manager error or noErr.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNSetDataFromFile( iTXNObject: TXNObject; iFileRefNum: SInt16; iFileType: OSType; iFileLength: ByteCount; iStartOffset: TXNOffset; iEndOffset: TXNOffset ): OSStatus; external name '_TXNSetDataFromFile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * TXNConvertToPublicScrap() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * This is a no-op in OS X.
+ *
+ * Discussion:
+ * Convert the Textension private scrap to the public clipboard.
+ * This should be called on suspend events and before the
+ * application displays a dialog that might support cut and paste.
+ * Or more generally, whenever someone other than the Textension
+ * Shared Library needs access to the scrap data. This is a no-op in
+ * OS X.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * Memory Manager errors, Scrap Manager errors, or noErr.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNConvertToPublicScrap: OSStatus; external name '_TXNConvertToPublicScrap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * TXNConvertFromPublicScrap() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * No longer needed.
+ *
+ * Discussion:
+ * Convert the public clipboard to our private scrap . This should
+ * be called on resume events and after an application has modified
+ * the scrap. Before doing work we check the validity of the public
+ * scrap (date modification and type).
+ *
+ * This is no longer needed in Mac OS X version 10.2 and later.
+ * Calling TXNPaste will automatically handle conversion from public
+ * scrap.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Result:
+ * Memory Manager errors, Scrap Manager errors, or noErr.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNConvertFromPublicScrap: OSStatus; external name '_TXNConvertFromPublicScrap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * TXNDraw() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Deprecated.
+ *
+ * Discussion:
+ * Redraw the TXNObject including any scrollbars associated with the
+ * text frame. Call this function in response to an update event
+ * for a window that contains multiple TXNObjects or some other
+ * graphic element. The caller is responsible for calling
+ * BeginUpdate/EndUpdate in response to the update event.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iDrawPort:
+ * Can be NULL. If NULL the port is drawn to the port currently
+ * attached to the iTXNObject. If not NULL drawing goes to the
+ * iDrawPort. If drawing is done to the iDrawPort selection is
+ * not updated. This works this way so that it is possible to
+ * Draw a TXNObject to a static port (i.e. print the thing without
+ * reflowing the text to match the paper size which is what
+ * TXNPrint does) and not have a line drawn where the selection
+ * would be. If you pass an iDrawPort to an active TXNObject
+ * (i.e. editable) the selection will not be updated. In this case
+ * the selection will behave oddly until text is typed which will
+ * serve to realign the selection. Bottom-line don't pass a port
+ * in unless you want static text (printed or non-editable)
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+procedure TXNDraw( iTXNObject: TXNObject; iDrawPort: GWorldPtr { can be NULL } ); external name '_TXNDraw';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * TXNAttachObjectToWindow() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TXNAttachObjectToWindowRef API instead.
+ *
+ * Discussion:
+ * If a TXNObject was initialized with a NULL window pointer use
+ * this function to attach a window to that object. In version 1.0
+ * of Textension attaching a TXNObject to more than one window is
+ * not supported. Note that if a CGContextRef was passed to the
+ * TXNObject previously through TXNSetTXNObjectControls, that
+ * CGContextRef will be ignored. The CGContextRef associated with
+ * the iWindow will be used instead. You may revert back to the
+ * previous CGContextRef by calling the TXNSetTXNObjectControls API
+ * with the desired CGContextRef again after calling
+ * TXNAttachObjectToWindow.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iWindow:
+ * GWorldPtr that the object should be attached to.
+ *
+ * iIsActualWindow:
+ * Let the library know if the GWorldPtr is actually a WindowRef
+ * or actually a GWorldPtr. This is important if the client is
+ * taking advantage of the editing packages scrollbar support.
+ *
+ * Result:
+ * paramErrs or noErr.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNAttachObjectToWindow( iTXNObject: TXNObject; iWindow: GWorldPtr; iIsActualWindow: Boolean ): OSStatus; external name '_TXNAttachObjectToWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * TXNIsObjectAttachedToWindow() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Deprecated.
+ *
+ * Discussion:
+ * A utility function that allows a caller to check a TXNObject to
+ * see if it is attached to a window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * Result:
+ * True if object is attached, false if TXNObject is not attached.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNIsObjectAttachedToWindow( iTXNObject: TXNObject ): Boolean; external name '_TXNIsObjectAttachedToWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * TXNIsObjectAttachedToSpecificWindow() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Deprecated.
+ *
+ * Discussion:
+ * Determines whether the given object is attached to the given
+ * window.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNNewObject.
+ *
+ * iWindow:
+ * The window to check attachment against.
+ *
+ * oAttached:
+ * true if the object is attached to the given window, false
+ * otherwise.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: in Textension 1.2 and later
+ }
+function TXNIsObjectAttachedToSpecificWindow( iTXNObject: TXNObject; iWindow: WindowRef; var oAttached: Boolean ): OSStatus; external name '_TXNIsObjectAttachedToSpecificWindow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * TXNSetRectBounds() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TXNSetHIRectBounds API instead.
+ *
+ * Discussion:
+ * The View rectangle controls the text you see. The Destination
+ * rectangle controls how text is laid out. The Scrollbar is drawn
+ * inside the View rectangle. You only need to pass in pointers for
+ * the rectangles you want to set.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNNewObject.
+ *
+ * iViewRect:
+ * The new view rectangle. If you do not want to change the view
+ * rectangle pass NULL.
+ *
+ * iDestinationRect:
+ * The new destination rectangle. Pass NULL if you don't want to
+ * change the destination retangle.
+ *
+ * iUpdate:
+ * If you would like the the text and where the scrollbars are
+ * placed recalculated and redrawn pass true. If you prefer to
+ * wait on this pass false.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+procedure TXNSetRectBounds( iTXNObject: TXNObject; {const} iViewRect: RectPtr { can be NULL }; {const} iDestinationRect: TXNLongRectPtr { can be NULL }; iUpdate: Boolean ); external name '_TXNSetRectBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * TXNGetRectBounds() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TXNGetHIRect API instead.
+ *
+ * Discussion:
+ * Get the values for the current View rectangle, Destination
+ * rectangle and Text rectangle. You only need to pass in pointers
+ * for the rectangles you're interested in.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNNewObject.
+ *
+ * oViewRect:
+ * The current view rectangle
+ *
+ * oDestinationRect:
+ * The current destination rectangle
+ *
+ * oTextRect:
+ * The smallest rectangle needed to contain the current text.
+ * This rectangle is calculated by walking the lines of text and
+ * measuring each line. So this can be expensive. The width of
+ * this rectangle will be the width of the longest line in the
+ * text.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNGetRectBounds( iTXNObject: TXNObject; oViewRect: RectPtr { can be NULL }; oDestinationRect: TXNLongRectPtr { can be NULL }; oTextRect: TXNLongRectPtr { can be NULL } ): OSStatus; external name '_TXNGetRectBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * TXNActivate() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TXNSetScrollbarState API instead.
+ *
+ * Discussion:
+ * Make the TXNObject object active in the sense that it can be
+ * scrolled if it has scrollbars. If the TXNScrollBarState parameter
+ * is true than the scrollbars will be active even when the
+ * TXNObject is not focused (i.e. insertion point not active). See
+ * the equivalent TXNSetScrollbarState.
+ *
+ * This function should be used if you have multiple TXNObjects in a
+ * window, and you want them all to be scrollable even though only
+ * one at a time can have the keyboard focus.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iTXNFrameID:
+ * TXNFrameID obtained from TXNNewObject. Deprecated. Pass 0.
+ *
+ * iActiveState:
+ * Boolean if true Scrollbars active even though TXNObject does
+ * not have the keyboard focus. if false scrollbars are synced
+ * with active state (i.e. a focused object has an active
+ * insertion point or selection and active scrollbars. An
+ * unfocused object has inactive selection (grayed or framed
+ * selection) and inactive scrollbars. The latter state is the
+ * default and usually the one you use if you have one TXNObject
+ * in a window.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNActivate( iTXNObject: TXNObject; iTXNFrameID: TXNFrameID; iActiveState: TXNScrollBarState ): OSStatus; external name '_TXNActivate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * TXNPointToOffset() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TXNHIPointToOffset API instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iPoint:
+ * A point (in local coordinates).
+ *
+ * oOffset:
+ * Offset corresponding to the point.
+ *
+ * Result:
+ * A result code indicating success or failure. Memory, out of
+ * bounds errors (if the point is out of the ViewRect).
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: in Textension 1.1 and later
+ }
+function TXNPointToOffset( iTXNObject: TXNObject; iPoint: Point; var oOffset: TXNOffset ): OSStatus; external name '_TXNPointToOffset';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * TXNOffsetToPoint() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TXNOffsetToHIPoint API instead.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iOffset:
+ * An offset.
+ *
+ * oPoint:
+ * Point corresponding to the offset.
+ *
+ * Result:
+ * A result code indicating success or failure. Memory, out of
+ * bounds errors.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: in Textension 1.1 and later
+ }
+function TXNOffsetToPoint( iTXNObject: TXNObject; iOffset: TXNOffset; var oPoint: Point ): OSStatus; external name '_TXNOffsetToPoint';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
+
+
+{
+ * TXNTSMCheck()
+ *
+ * Summary:
+ * Deprecated.
+ *
+ * Discussion:
+ * Call this when WaitNextEvent returns false or there is no active
+ * TSMObject . The TXNObject parameter can be NULL which allows a
+ * client to call this function at any time. This is necessary to
+ * insure input methods enough time to be reasonably responsive.
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque struct obtained from TXNNewObject.
+ *
+ * ioEvent:
+ * The event record. Usually a NULL event. If the event is not
+ * an NULL event on entry, and an input method consumes the event
+ * the event should return as a NULL event.
+ *
+ * Result:
+ * Boolean: True if TSM handled this event. False if TSM did not
+ * handle this event.
+ *
+ * Availability:
+ * Mac OS X: not available
+ * CarbonLib: not available
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ DEPRECATED APIs, Mac OS X version 10.4 and later }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * TXNCanUndo() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TXNCanUndoAction API instead.
+ *
+ * Summary:
+ * Use this to determine if the Undo item in Edit menu should be
+ * highlighted or not. Tells you if last command was undoable.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * oTXNActionKey:
+ * The key code that the caller can use to pick a string to
+ * describe the undoable action in the undo item. Pass in NULL if
+ * the string isn't needed.
+ *
+ * Result:
+ * Boolean: If True the last command is undoable and the undo item
+ * in the menu should be active. If false last command cannot be
+ * undone and undo should be grayed in the menu.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNCanUndo( iTXNObject: TXNObject; oTXNActionKey: TXNActionKeyPtr { can be NULL } ): Boolean; external name '_TXNCanUndo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TXNCanRedo() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TXNCanRedoAction API instead.
+ *
+ * Summary:
+ * Use this to determine if the current item on the undo stack is
+ * redoable.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * oTXNActionKey:
+ * The key code that the caller can use to pick a string to
+ * describe the redoable action in the redo item. Pass in NULL if
+ * the string isn't needed.
+ *
+ * Result:
+ * If it returns true, then the redo item in the edit menu should be
+ * active.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNCanRedo( iTXNObject: TXNObject; oTXNActionKey: TXNActionKeyPtr { can be NULL } ): Boolean; external name '_TXNCanRedo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TXNGetActionChangeCount() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TXNGetCountForActionType API instead.
+ *
+ * Summary:
+ * Retrieves the number of times the specified action(s) have
+ * occurred.
+ *
+ * Discussion:
+ * Explicit call to TXNClearActionChangeCount is needed when the
+ * counter(s) have to be reset.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iOptions:
+ * Specify the the type of action changes to be include when
+ * retrieving the count. Choose from the TXNOptions.
+ *
+ * oCount:
+ * The number of counts returned by the function.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: in Textension 1.3 and later
+ }
+function TXNGetActionChangeCount( iTXNObject: TXNObject; iOptions: TXNCountOptions; var oCount: ItemCount ): OSStatus; external name '_TXNGetActionChangeCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TXNClearActionChangeCount() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TXNClearCountForActionType API instead.
+ *
+ * Summary:
+ * Reset the specified action counter(s) to zero.
+ *
+ * Discussion:
+ * Use kAllCountMask to reset everything.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iOptions:
+ * Specify the the type of action changes to be included when
+ * resetting the count. Choose from the TXNOptions.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Non-Carbon CFM: in Textension 1.3 and later
+ }
+function TXNClearActionChangeCount( iTXNObject: TXNObject; iOptions: TXNCountOptions ): OSStatus; external name '_TXNClearActionChangeCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TXNSetDataFromCFURLRef() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TXNReadFromCFURL API instead.
+ *
+ * Summary:
+ * Replaces a range of data with the content of a file.
+ *
+ * Discussion:
+ * Uses URL file name extension to determine the type of the input
+ * file. If the entire content is replaced, calling TXNRevert will
+ * revert to the last saved CFURLRef.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject. Data will be
+ * added to this text object.
+ *
+ * iURL:
+ * The url referring to the file which contains the data you want
+ * to add to the object.
+ *
+ * iStartOffset:
+ * The starting offset at which to insert the file into a
+ * document.. If you want to replace the entire text content then
+ * set the iStartOffset parameter to kTXNStartOffset.
+ *
+ * iEndOffset:
+ * The ending position of the range being replaced by the file. If
+ * you want to replace the entire text content then set the
+ * iEndOffset parameter to kTXNEndOffset.
+ *
+ * Result:
+ * A result code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
+ * Non-Carbon CFM: not available
+ }
+function TXNSetDataFromCFURLRef( iTXNObject: TXNObject; iURL: CFURLRef; iStartOffset: TXNOffset; iEndOffset: TXNOffset ): OSStatus; external name '_TXNSetDataFromCFURLRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * TXNSave() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use TXNWriteRangeToCFURL API instead.
+ *
+ * Summary:
+ * Save the contents of the document as the given type.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * iTXNObject:
+ * Opaque TXNObject obtained from TXNCreateObject.
+ *
+ * iType:
+ * The type of file to create.
+ *
+ * iResType:
+ * When saving file as plain TEXT the type of resource to save
+ * style information. Use kTXNMultipleStylesPerTextDocumentResType
+ * if your document contains multiple styles and you want a
+ * SimpleText like document. Use
+ * kTXNSingleStylePerTextDocumentResType if the document has a
+ * single style and you would like a BBEdit, MPW, CW type of
+ * document.
+ *
+ * iPermanentEncoding:
+ * The encoding in which the document should be saved (Unicode,
+ * Text or System default).
+ *
+ * iFileSpecification:
+ * The file specification to which the document should be saved.
+ * The file must have been opened by the caller. The file
+ * specification is remembered by the TXNObject and is used for
+ * any subsequent calls to TXNRevert.
+ *
+ * iDataReference:
+ * The data fork ref num. This is used to write data to the data
+ * fork of the file. The data is written beginning at the current
+ * mark.
+ *
+ * iResourceReference:
+ * The resource fork ref num. If the caller has specified that
+ * style information be saved as a resource (MPW or SimpleText)
+ * than this should be a valid reference to an open resource fork.
+ * If the txtn format is being used than this input value is
+ * ignored.
+ *
+ * Result:
+ * The result of writing the file.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in Textension 1.0 and later
+ }
+function TXNSave( iTXNObject: TXNObject; iType: TXNFileType; iResType: OSType; iPermanentEncoding: TXNPermanentTextEncodingType; const (*var*) iFileSpecification: FSSpec; iDataReference: SInt16; iResourceReference: SInt16 ): OSStatus; external name '_TXNSave';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{unit Printing}
+{
+ File: Printing.p
+
+ Contains: Print Manager Interfaces.
+
+ Version: Technology: System 7.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1985-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ kFirstPageMin = 1; { min value for first page }
+ kLastPageMax = 32767; { max value for last page }
+
+ iPFMaxPgs = 128;
+ iPrPgFract = 120; { Page scale factor. ptPgSize (below) is in units of 1/iPrPgFract }
+ iPrPgFst = 1; { Page range constants }
+ iPrPgMax = 9999;
+ iPrRelease = 3; { Current version number of the code. }
+ iPrSavPFil = -1;
+ iPrAbort = $0080;
+ iPrDevCtl = 7; { The PrDevCtl Proc's ctl number }
+ lPrReset = $00010000; { The PrDevCtl Proc's CParam for reset }
+ lPrLineFeed = $00030000;
+ lPrLFStd = $0003FFFF; { The PrDevCtl Proc's CParam for std paper advance }
+ lPrLFSixth = $0003FFFF;
+ lPrPageEnd = $00020000; { The PrDevCtl Proc's CParam for end page }
+ lPrDocOpen = $00010000;
+ lPrPageOpen = $00040000;
+ lPrPageClose = $00020000;
+ lPrDocClose = $00050000;
+ iFMgrCtl = 8; { The FMgr's Tail-hook Proc's ctl number }
+ iMscCtl = 9; { The FMgr's Tail-hook Proc's ctl number }
+ iPvtCtl = 10; { The FMgr's Tail-hook Proc's ctl number }
+
+ { Error Codes moved to Errors.(hap) }
+ pPrGlobals = $00000944; { The PrVars lo mem area: }
+ bDraftLoop = 0;
+ bSpoolLoop = 1;
+ bUser1Loop = 2;
+ bUser2Loop = 3;
+ fNewRunBit = 2;
+ fHiResOK = 3;
+ fWeOpenedRF = 4; { Driver constants }
+ iPrBitsCtl = 4;
+ lScreenBits = 0;
+ lPaintBits = 1;
+ lHiScreenBits = $00000002; { The Bitmap Print Proc's Screen Bitmap param }
+ lHiPaintBits = $00000003; { The Bitmap Print Proc's Paint [sq pix] param }
+ iPrIOCtl = 5;
+ iPrEvtCtl = 6; { The PrEvent Proc's ctl number }
+ lPrEvtAll = $0002FFFD; { The PrEvent Proc's CParam for the entire screen }
+ lPrEvtTop = $0001FFFD; { The PrEvent Proc's CParam for the top folder }
+ iPrDrvrRef = -3;
+
+ getRslDataOp = 4;
+ setRslOp = 5;
+ draftBitsOp = 6;
+ noDraftBitsOp = 7;
+ getRotnOp = 8;
+ NoSuchRsl = 1;
+ OpNotImpl = 2; { the driver doesn't support this opcode }
+ RgType1 = 1;
+
+
+type
+ TFeed = SInt8;
+const
+ feedCut = 0;
+ feedFanfold = 1;
+ feedMechCut = 2;
+ feedOther = 3;
+
+
+type
+ TScan = SInt8;
+const
+ scanTB = 0;
+ scanBT = 1;
+ scanLR = 2;
+ scanRL = 3;
+
+ { A Rect Ptr }
+
+type
+ TPRect = ^Rect;
+ TPRectPtr = ^TPRect;
+{$ifc TYPED_FUNCTION_POINTERS}
+ PrIdleProcPtr = procedure;
+{$elsec}
+ PrIdleProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ PItemProcPtr = procedure(theDialog: DialogRef; item: SInt16);
+{$elsec}
+ PItemProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ PrIdleUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ PrIdleUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ PItemUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ PItemUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppPrIdleProcInfo = $00000000;
+ uppPItemProcInfo = $000002C0;
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * NewPrIdleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewPrIdleUPP(userRoutine: PrIdleProcPtr): PrIdleUPP; external name '_NewPrIdleUPP'; { old name was NewPrIdleProc }
+{
+ * NewPItemUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewPItemUPP(userRoutine: PItemProcPtr): PItemUPP; external name '_NewPItemUPP'; { old name was NewPItemProc }
+{
+ * DisposePrIdleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposePrIdleUPP(userUPP: PrIdleUPP); external name '_DisposePrIdleUPP';
+{
+ * DisposePItemUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposePItemUPP(userUPP: PItemUPP); external name '_DisposePItemUPP';
+{
+ * InvokePrIdleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure InvokePrIdleUPP(userRoutine: PrIdleUPP); external name '_InvokePrIdleUPP'; { old name was CallPrIdleProc }
+{
+ * InvokePItemUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure InvokePItemUPP(theDialog: DialogRef; item: SInt16; userRoutine: PItemUPP); external name '_InvokePItemUPP'; { old name was CallPItemProc }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ifc NOT OPAQUE_TOOLBOX_STRUCTS}
+
+type
+ TPrPortPtr = ^TPrPort;
+ TPrPort = record
+ gPort: GrafPort; { The Printer's graf port. }
+ gProcs: QDProcs; { ..and its procs }
+ lGParam1: SInt32; { 16 bytes for private parameter storage. }
+ lGParam2: SInt32;
+ lGParam3: SInt32;
+ lGParam4: SInt32;
+ fOurPtr: boolean; { Whether the PrPort allocation was done by us. }
+ fOurBits: boolean; { Whether the BitMap allocation was done by us. }
+ end;
+
+ TPPrPort = ^TPrPort;
+{$elsec}
+
+type
+ TPPrPort = ^SInt32; { an opaque 32-bit type }
+ TPPrPortPtr = ^TPPrPort; { when a var xx:TPPrPort parameter can be nil, it is changed to xx: TPPrPortPtr }
+{$endc}
+
+ TPPrPortRef = TPPrPort;
+ { Printing Graf Port. All printer imaging, whether spooling, banding, etc, happens "thru" a GrafPort.
+ This is the "PrPeek" record. }
+ TPrInfoPtr = ^TPrInfo;
+ TPrInfo = record
+ iDev: SInt16; { Font mgr/QuickDraw device code }
+ iVRes: SInt16; { Resolution of device, in device coordinates }
+ iHRes: SInt16; { ..note: V before H => compatable with Point. }
+ rPage: Rect; { The page (printable) rectangle in device coordinates. }
+ end;
+
+ TPPrInfo = ^TPrInfo;
+ { Print Info Record: The parameters needed for page composition. }
+ TPrStlPtr = ^TPrStl;
+ TPrStl = record
+ wDev: SInt16;
+ iPageV: SInt16;
+ iPageH: SInt16;
+ bPort: SInt8;
+ feed: SInt8;
+ end;
+
+ TPPrStl = ^TPrStl;
+ TPrXInfoPtr = ^TPrXInfo;
+ TPrXInfo = record
+ iRowBytes: SInt16;
+ iBandV: SInt16;
+ iBandH: SInt16;
+ iDevBytes: SInt16;
+ iBands: SInt16;
+ bPatScale: SInt8;
+ bUlThick: SInt8;
+ bUlOffset: SInt8;
+ bUlShadow: SInt8;
+ scan: SInt8;
+ bXInfoX: SInt8;
+ end;
+
+ TPPrXInfo = ^TPrXInfo;
+ TPrJobPtr = ^TPrJob;
+ TPrJob = record
+ iFstPage: SInt16; { Page Range. }
+ iLstPage: SInt16;
+ iCopies: SInt16; { No. copies. }
+ bJDocLoop: SInt8; { The Doc style: Draft, Spool, .., and .. }
+ fFromUsr: boolean; { Printing from an User's App (not PrApp) flag }
+ pIdleProc: PrIdleUPP; { The Proc called while waiting on IO etc. }
+ pFileName: StringPtr; { Spool File Name: NIL for default. }
+ iFileVol: SInt16; { Spool File vol, set to 0 initially }
+ bFileVers: SInt8; { Spool File version, set to 0 initially }
+ bJobX: SInt8; { An eXtra byte. }
+ end;
+
+ TPPrJob = ^TPrJob;
+ { Print Job: Print "form" for a single print request. }
+ TPrFlag1Ptr = ^TPrFlag1;
+ TPrFlag1 = packed record
+ f15: boolean;
+ f14: boolean;
+ f13: boolean;
+ f12: boolean;
+ f11: boolean;
+ f10: boolean;
+ f9: boolean;
+ f8: boolean;
+ f7: boolean;
+ f6: boolean;
+ f5: boolean;
+ f4: boolean;
+ f3: boolean;
+ f2: boolean;
+ fLstPgFst: boolean;
+ fUserScale: boolean;
+ end;
+
+ TPrintPtr = ^TPrint;
+ TPrint = record
+ iPrVersion: SInt16; { (2) Printing software version }
+ prInfo: TPrInfo; { (14) the PrInfo data associated with the current style. }
+ rPaper: Rect; { (8) The paper rectangle [offset from rPage] }
+ prStl: TPrStl; { (8) This print request's style. }
+ prInfoPT: TPrInfo; { (14) Print Time Imaging metrics }
+ prXInfo: TPrXInfo; { (16) Print-time (expanded) Print info record. }
+ prJob: TPrJob; { (20) The Print Job request (82) Total of the above; 120-82 = 38 bytes needed to fill 120 }
+ case SInt16 of
+ 0: (
+ printX: array [1..19] of SInt16;
+ );
+ 1: (
+ prFlag1: TPrFlag1;
+ iZoomMin: SInt16;
+ iZoomMax: SInt16;
+ hDocName: StringHandle;
+ );
+ end;
+
+ TPPrint = ^TPrint;
+ THPrint = ^TPPrint;
+ TPrStatusPtr = ^TPrStatus;
+ TPrStatus = record
+ iTotPages: SInt16; { Total pages in Print File. }
+ iCurPage: SInt16; { Current page number }
+ iTotCopies: SInt16; { Total copies requested }
+ iCurCopy: SInt16; { Current copy number }
+ iTotBands: SInt16; { Total bands per page. }
+ iCurBand: SInt16; { Current band number }
+ fPgDirty: boolean; { True if current page has been written to. }
+ fImaging: boolean; { Set while in band's DrawPic call. }
+ hPrint: THPrint; { Handle to the active Printer record }
+ pPrPort: TPPrPort; { Ptr to the active PrPort }
+ hPic: PicHandle; { Handle to the active Picture }
+ end;
+
+ TPPrStatus = ^TPrStatus;
+ TPPrStatusRef = TPPrStatus;
+
+ { Print Status: Print information during printing. }
+ TPfPgDirPtr = ^TPfPgDir;
+ TPfPgDir = record
+ iPages: SInt16;
+ iPgPos: array [0..128] of SInt32; { array [0..iPfMaxPgs] of SInt32 }
+ end;
+
+ TPPfPgDir = ^TPfPgDir;
+ THPfPgDir = ^TPPfPgDir;
+ { PicFile = a TPfHeader followed by n QuickDraw Pics (whose PicSize is invalid!) }
+ { This is the Printing Dialog Record. Only used by folks appending their own
+ DITLs to the print dialogs. Print Dialog: The Dialog Stream object. }
+{$ifc NOT OPAQUE_TOOLBOX_STRUCTS}
+ TPrDlgPtr = ^TPrDlg;
+ TPrDlg = record
+ Dlg: DialogRecord; { The Dialog window }
+ pFltrProc: ModalFilterUPP; { The Filter Proc. }
+ pItemProc: PItemUPP; { The Item evaluating proc. }
+ hPrintUsr: THPrint; { The user's print record. }
+ fDoIt: boolean;
+ fDone: boolean;
+ lUser1: SInt32; { Four longs for apps to hang global data. }
+ lUser2: SInt32; { Plus more stuff needed by the particular }
+ lUser3: SInt32; { printing dialog. }
+ lUser4: SInt32;
+ end;
+
+ TPPrDlg = ^TPrDlg;
+{$elsec}
+ TPPrDlg = ^SInt32; { an opaque 32-bit type }
+ TPPrDlgPtr = ^TPPrDlg; { when a var xx:TPPrDlg parameter can be nil, it is changed to xx: TPPrDlgPtr }
+{$endc}
+
+ TPPrDlgRef = TPPrDlg;
+{$ifc TYPED_FUNCTION_POINTERS}
+ PDlgInitProcPtr = function(hPrint: THPrint): TPPrDlgRef;
+{$elsec}
+ PDlgInitProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ PDlgInitUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ PDlgInitUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppPDlgInitProcInfo = $000000F0;
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * NewPDlgInitUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewPDlgInitUPP(userRoutine: PDlgInitProcPtr): PDlgInitUPP; external name '_NewPDlgInitUPP'; { old name was NewPDlgInitProc }
+{
+ * DisposePDlgInitUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposePDlgInitUPP(userUPP: PDlgInitUPP); external name '_DisposePDlgInitUPP';
+{
+ * InvokePDlgInitUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InvokePDlgInitUPP(hPrint: THPrint; userRoutine: PDlgInitUPP): TPPrDlgRef; external name '_InvokePDlgInitUPP'; { old name was CallPDlgInitProc }
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+type
+ TGnlDataPtr = ^TGnlData;
+ TGnlData = record
+ iOpCode: SInt16;
+ iError: SInt16;
+ lReserved: SInt32; { more fields here depending on call }
+ end;
+
+ TRslRgPtr = ^TRslRg;
+ TRslRg = record
+ iMin: SInt16;
+ iMax: SInt16;
+ end;
+
+ TRslRecPtr = ^TRslRec;
+ TRslRec = record
+ iXRsl: SInt16;
+ iYRsl: SInt16;
+ end;
+
+ TGetRslBlkPtr = ^TGetRslBlk;
+ TGetRslBlk = record
+ iOpCode: SInt16;
+ iError: SInt16;
+ lReserved: SInt32;
+ iRgType: SInt16;
+ xRslRg: TRslRg;
+ yRslRg: TRslRg;
+ iRslRecCnt: SInt16;
+ rgRslRec: array [1..27] of TRslRec;
+ end;
+
+ TSetRslBlkPtr = ^TSetRslBlk;
+ TSetRslBlk = record
+ iOpCode: SInt16;
+ iError: SInt16;
+ lReserved: SInt32;
+ hPrint: THPrint;
+ iXRsl: SInt16;
+ iYRsl: SInt16;
+ end;
+
+ TDftBitsBlkPtr = ^TDftBitsBlk;
+ TDftBitsBlk = record
+ iOpCode: SInt16;
+ iError: SInt16;
+ lReserved: SInt32;
+ hPrint: THPrint;
+ end;
+
+ TGetRotnBlkPtr = ^TGetRotnBlk;
+ TGetRotnBlk = record
+ iOpCode: SInt16;
+ iError: SInt16;
+ lReserved: SInt32;
+ hPrint: THPrint;
+ fLandscape: boolean;
+ bXtra: SInt8;
+ end;
+
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * PrPurge()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PrPurge; external name '_PrPurge';
+{
+ * PrNoPurge()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PrNoPurge; external name '_PrNoPurge';
+{
+ * PrOpen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PrOpen; external name '_PrOpen';
+{
+ * PrClose()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PrClose; external name '_PrClose';
+{
+ * PrintDefault()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PrintDefault(hPrint: THPrint); external name '_PrintDefault';
+{
+ * PrValidate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PrValidate(hPrint: THPrint): boolean; external name '_PrValidate';
+{
+ * PrStlDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PrStlDialog(hPrint: THPrint): boolean; external name '_PrStlDialog';
+{
+ * PrJobDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PrJobDialog(hPrint: THPrint): boolean; external name '_PrJobDialog';
+{
+ * PrStlInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PrStlInit(hPrint: THPrint): TPPrDlgRef; external name '_PrStlInit';
+{
+ * PrJobInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PrJobInit(hPrint: THPrint): TPPrDlgRef; external name '_PrJobInit';
+{
+ * PrJobMerge()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PrJobMerge(hPrintSrc: THPrint; hPrintDst: THPrint); external name '_PrJobMerge';
+{
+ * PrDlgMain()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PrDlgMain(hPrint: THPrint; pDlgInit: PDlgInitUPP): boolean; external name '_PrDlgMain';
+{
+ * PrOpenDoc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PrOpenDoc(hPrint: THPrint; pPrPort: TPPrPort; pIOBuf: Ptr): TPPrPort; external name '_PrOpenDoc';
+{
+ * PrCloseDoc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PrCloseDoc(pPrPort: TPPrPort); external name '_PrCloseDoc';
+{
+ * PrOpenPage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PrOpenPage(pPrPort: TPPrPort; pPageFrame: TPRect); external name '_PrOpenPage';
+{
+ * PrClosePage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PrClosePage(pPrPort: TPPrPort); external name '_PrClosePage';
+{
+ * PrPicFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PrPicFile(hPrint: THPrint; pPrPort: TPPrPort; pIOBuf: Ptr; pDevBuf: Ptr; prStatus: TPPrStatus); external name '_PrPicFile';
+{
+ * PrError()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PrError: SInt16; external name '_PrError';
+{
+ * PrSetError()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PrSetError(iErr: SInt16); external name '_PrSetError';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PrGeneral()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PrGeneral(pData: Ptr); external name '_PrGeneral';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * PrDrvrOpen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PrDrvrOpen; external name '_PrDrvrOpen';
+{
+ * PrDrvrClose()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PrDrvrClose; external name '_PrDrvrClose';
+{
+ * PrCtlCall()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure PrCtlCall(iWhichCtl: SInt16; lParam1: SInt32; lParam2: SInt32; lParam3: SInt32); external name '_PrCtlCall';
+{
+ * PrDrvrDCE()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PrDrvrDCE: Handle; external name '_PrDrvrDCE';
+{
+ * PrDrvrVers()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PrDrvrVers: SInt16; external name '_PrDrvrVers';
+{
+ * PrLoadDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function PrLoadDriver: SInt16; external name '_PrLoadDriver';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ALIGN MAC68K}
+
+
+{unit Sound}
+{
+ File: Sound.p
+
+ Contains: Sound Manager Interfaces.
+
+ Version: Technology: Sound Manager 3.6
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1986-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{
+ * * * N O T E * * *
+
+ This file has been updated to include Sound Manager 3.3 interfaces.
+
+ Some of the Sound Manager 3.0 interfaces were not put into the InterfaceLib
+ that originally shipped with the PowerMacs. These missing functions and the
+ new 3.3 interfaces have been released in the SoundLib library for PowerPC
+ developers to link with. The runtime library for these functions are
+ installed by the Sound Manager. The following functions are found in SoundLib.
+
+ GetCompressionInfo(), GetSoundPreference(), SetSoundPreference(),
+ UnsignedFixedMulDiv(), SndGetInfo(), SndSetInfo(), GetSoundOutputInfo(),
+ SetSoundOutputInfo(), GetCompressionName(), SoundConverterOpen(),
+ SoundConverterClose(), SoundConverterGetBufferSizes(), SoundConverterBeginConversion(),
+ SoundConverterConvertBuffer(), SoundConverterEndConversion(),
+ AudioGetBass(), AudioGetInfo(), AudioGetMute(), AudioGetOutputDevice(),
+ AudioGetTreble(), AudioGetVolume(), AudioMuteOnEvent(), AudioSetBass(),
+ AudioSetMute(), AudioSetToDefaults(), AudioSetTreble(), AudioSetVolume(),
+ OpenMixerSoundComponent(), CloseMixerSoundComponent(), SoundComponentAddSource(),
+ SoundComponentGetInfo(), SoundComponentGetSource(), SoundComponentGetSourceData(),
+ SoundComponentInitOutputDevice(), SoundComponentPauseSource(),
+ SoundComponentPlaySourceBuffer(), SoundComponentRemoveSource(),
+ SoundComponentSetInfo(), SoundComponentSetOutput(), SoundComponentSetSource(),
+ SoundComponentStartSource(), SoundComponentStopSource(),
+ ParseAIFFHeader(), ParseSndHeader(), SoundConverterGetInfo(), SoundConverterSetInfo()
+}
+{
+ Interfaces for Sound Driver, !!! OBSOLETE and NOT SUPPORTED !!!
+
+ These items are no longer defined, but appear here so that someone
+ searching the interfaces might find them. If you are using one of these
+ items, you must change your code to support the Sound Manager.
+
+ swMode, ftMode, ffMode
+ FreeWave, FFSynthRec, Tone, SWSynthRec, Wave, FTSoundRec
+ SndCompletionProcPtr
+ StartSound, StopSound, SoundDone
+ SetSoundVol, GetSoundVol
+}
+{
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ constants
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+}
+const twelfthRootTwo = 1.05946309435;
+
+
+const
+ soundListRsrc = $736E6420 (* 'snd ' *); { Resource type used by Sound Manager }
+
+ kSimpleBeepID = 1; { reserved resource ID for Simple Beep }
+
+ rate48khz = $BB800000; { 48000.00000 in fixed-point }
+ rate44khz = $AC440000; { 44100.00000 in fixed-point }
+ rate32khz = $7D000000; { 32000.00000 in fixed-point }
+ rate22050hz = $56220000; { 22050.00000 in fixed-point }
+ rate22khz = $56EE8BA3; { 22254.54545 in fixed-point }
+ rate16khz = $3E800000; { 16000.00000 in fixed-point }
+ rate11khz = $2B7745D1; { 11127.27273 in fixed-point }
+ rate11025hz = $2B110000; { 11025.00000 in fixed-point }
+ rate8khz = $1F400000; { 8000.00000 in fixed-point }
+
+ { synthesizer numbers for SndNewChannel }
+ sampledSynth = 5; { sampled sound synthesizer }
+
+{$ifc CALL_NOT_IN_CARBON}
+ squareWaveSynth = 1; { square wave synthesizer }
+ waveTableSynth = 3; { wave table synthesizer }
+ { old Sound Manager MACE synthesizer numbers }
+ MACE3snthID = 11;
+ MACE6snthID = 13;
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+ kMiddleC = 60; { MIDI note value for middle C }
+
+ kNoVolume = 0; { setting for no sound volume }
+ kFullVolume = $0100; { 1.0, setting for full hardware output volume }
+
+ stdQLength = 128;
+
+ dataOffsetFlag = $8000;
+
+ kUseOptionalOutputDevice = -1; { only for Sound Manager 3.0 or later }
+
+ notCompressed = 0; { compression ID's }
+ fixedCompression = -1; { compression ID for fixed-sized compression }
+ variableCompression = -2; { compression ID for variable-sized compression }
+
+ twoToOne = 1;
+ eightToThree = 2;
+ threeToOne = 3;
+ sixToOne = 4;
+ sixToOnePacketSize = 8;
+ threeToOnePacketSize = 16;
+
+ stateBlockSize = 64;
+ leftOverBlockSize = 32;
+
+ firstSoundFormat = $0001; { general sound format }
+ secondSoundFormat = $0002; { special sampled sound format (HyperCard) }
+
+{$ifc CALL_NOT_IN_CARBON}
+ dbBufferReady = $00000001; { double buffer is filled }
+ dbLastBuffer = $00000004; { last double buffer to play }
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+ sysBeepDisable = $0000; { SysBeep() enable flags }
+ sysBeepEnable = $01;
+ sysBeepSynchronous = $02; { if bit set, make alert sounds synchronous }
+
+ unitTypeNoSelection = $FFFF; { unitTypes for AudioSelection.unitType }
+ unitTypeSeconds = $0000;
+
+ stdSH = $00; { Standard sound header encode value }
+ extSH = $FF; { Extended sound header encode value }
+ cmpSH = $FE; { Compressed sound header encode value }
+
+ { command numbers for SndDoCommand and SndDoImmediate }
+ nullCmd = 0;
+ quietCmd = 3;
+ flushCmd = 4;
+ reInitCmd = 5;
+ waitCmd = 10;
+ pauseCmd = 11;
+ resumeCmd = 12;
+ callBackCmd = 13;
+ syncCmd = 14;
+ availableCmd = 24;
+ versionCmd = 25;
+ volumeCmd = 46; { sound manager 3.0 or later only }
+ getVolumeCmd = 47; { sound manager 3.0 or later only }
+ clockComponentCmd = 50; { sound manager 3.2.1 or later only }
+ getClockComponentCmd = 51; { sound manager 3.2.1 or later only }
+ scheduledSoundCmd = 52; { sound manager 3.3 or later only }
+ linkSoundComponentsCmd = 53; { sound manager 3.3 or later only }
+ soundCmd = 80;
+ bufferCmd = 81;
+ rateMultiplierCmd = 86;
+ getRateMultiplierCmd = 87;
+
+{$ifc CALL_NOT_IN_CARBON}
+ { command numbers for SndDoCommand and SndDoImmediate that are not available for use in Carbon }
+ initCmd = 1;
+ freeCmd = 2;
+ totalLoadCmd = 26;
+ loadCmd = 27;
+ freqDurationCmd = 40;
+ restCmd = 41;
+ freqCmd = 42;
+ ampCmd = 43;
+ timbreCmd = 44;
+ getAmpCmd = 45;
+ waveTableCmd = 60;
+ phaseCmd = 61;
+ rateCmd = 82;
+ continueCmd = 83;
+ doubleBufferCmd = 84;
+ getRateCmd = 85;
+ sizeCmd = 90; { obsolete command }
+ convertCmd = 91; { obsolete MACE command }
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ifc OLDROUTINENAMES}
+ { channel initialization parameters }
+ waveInitChannelMask = $07;
+ waveInitChannel0 = $04; { wave table only, Sound Manager 2.0 and earlier }
+ waveInitChannel1 = $05; { wave table only, Sound Manager 2.0 and earlier }
+ waveInitChannel2 = $06; { wave table only, Sound Manager 2.0 and earlier }
+ waveInitChannel3 = $07; { wave table only, Sound Manager 2.0 and earlier }
+ initChan0 = $04; { obsolete spelling }
+ initChan1 = $05; { obsolete spelling }
+ initChan2 = $06; { obsolete spelling }
+ initChan3 = $07; { obsolete spelling }
+
+ outsideCmpSH = 0; { obsolete MACE constant }
+ insideCmpSH = 1; { obsolete MACE constant }
+ aceSuccess = 0; { obsolete MACE constant }
+ aceMemFull = 1; { obsolete MACE constant }
+ aceNilBlock = 2; { obsolete MACE constant }
+ aceBadComp = 3; { obsolete MACE constant }
+ aceBadEncode = 4; { obsolete MACE constant }
+ aceBadDest = 5; { obsolete MACE constant }
+ aceBadCmd = 6; { obsolete MACE constant }
+
+{$endc} {OLDROUTINENAMES}
+
+ initChanLeft = $0002; { left stereo channel }
+ initChanRight = $0003; { right stereo channel }
+ initNoInterp = $0004; { no linear interpolation }
+ initNoDrop = $0008; { no drop-sample conversion }
+ initMono = $0080; { monophonic channel }
+ initStereo = $00C0; { stereo channel }
+ initMACE3 = $0300; { MACE 3:1 }
+ initMACE6 = $0400; { MACE 6:1 }
+ initPanMask = $0003; { mask for right/left pan values }
+ initSRateMask = $0030; { mask for sample rate values }
+ initStereoMask = $00C0; { mask for mono/stereo values }
+ initCompMask = $FF00; { mask for compression IDs }
+
+ { Get&Set Sound Information Selectors }
+ siActiveChannels = $63686163 (* 'chac' *); { active channels }
+ siActiveLevels = $6C6D6163 (* 'lmac' *); { active meter levels }
+ siAGCOnOff = $61676320 (* 'agc ' *); { automatic gain control state }
+ siAsync = $6173796E (* 'asyn' *); { asynchronous capability }
+ siAVDisplayBehavior = $61766462 (* 'avdb' *);
+ siChannelAvailable = $63686176 (* 'chav' *); { number of channels available }
+ siCompressionAvailable = $636D6176 (* 'cmav' *); { compression types available }
+ siCompressionChannels = $63706374 (* 'cpct' *); { compressor's number of channels }
+ siCompressionFactor = $636D6661 (* 'cmfa' *); { current compression factor }
+ siCompressionHeader = $636D6864 (* 'cmhd' *); { return compression header }
+ siCompressionNames = $636E616D (* 'cnam' *); { compression type names available }
+ siCompressionParams = $65766177 (* 'evaw' *); { compression parameters }
+ siCompressionSampleRate = $63707274 (* 'cprt' *); { compressor's sample rate }
+ siCompressionType = $636F6D70 (* 'comp' *); { current compression type }
+ siContinuous = $636F6E74 (* 'cont' *); { continous recording }
+ siDecompressionParams = $77617665 (* 'wave' *); { decompression parameters }
+ siDeviceBufferInfo = $6462696E (* 'dbin' *); { size of interrupt buffer }
+ siDeviceConnected = $64636F6E (* 'dcon' *); { input device connection status }
+ siDeviceIcon = $69636F6E (* 'icon' *); { input device icon }
+ siDeviceName = $6E616D65 (* 'name' *); { input device name }
+ siEQSpectrumBands = $65717362 (* 'eqsb' *); { number of spectrum bands }
+ siEQSpectrumLevels = $65716C76 (* 'eqlv' *); { gets spectum meter levels }
+ siEQSpectrumOnOff = $65716C6F (* 'eqlo' *); { turn on/off spectum meter levels }
+ siEQSpectrumResolution = $65717273 (* 'eqrs' *); { set the resolution of the FFT, 0 = low res (<=16 bands), 1 = high res (16-64 bands) }
+ siEQToneControlGain = $65717467 (* 'eqtg' *); { set the bass and treble gain }
+ siEQToneControlOnOff = $65717463 (* 'eqtc' *); { turn on equalizer attenuation }
+ siHardwareBalance = $6862616C (* 'hbal' *);
+ siHardwareBalanceSteps = $68626C73 (* 'hbls' *);
+ siHardwareBass = $68626173 (* 'hbas' *);
+ siHardwareBassSteps = $68627374 (* 'hbst' *);
+ siHardwareBusy = $68776273 (* 'hwbs' *); { sound hardware is in use }
+ siHardwareFormat = $6877666D (* 'hwfm' *); { get hardware format }
+ siHardwareMute = $686D7574 (* 'hmut' *); { mute state of all hardware }
+ siHardwareMuteNoPrefs = $686D6E70 (* 'hmnp' *); { mute state of all hardware, but don't store in prefs }
+ siHardwareTreble = $68747262 (* 'htrb' *);
+ siHardwareTrebleSteps = $68777473 (* 'hwts' *);
+ siHardwareVolume = $68766F6C (* 'hvol' *); { volume level of all hardware }
+ siHardwareVolumeSteps = $68737470 (* 'hstp' *); { number of volume steps for hardware }
+ siHeadphoneMute = $706D7574 (* 'pmut' *); { mute state of headphones }
+ siHeadphoneVolume = $70766F6C (* 'pvol' *); { volume level of headphones }
+ siHeadphoneVolumeSteps = $68647374 (* 'hdst' *); { number of volume steps for headphones }
+ siInputAvailable = $696E6176 (* 'inav' *); { input sources available }
+ siInputGain = $6761696E (* 'gain' *); { input gain }
+ siInputSource = $736F7572 (* 'sour' *); { input source selector }
+ siInputSourceNames = $736E616D (* 'snam' *); { input source names }
+ siLevelMeterOnOff = $6C6D6574 (* 'lmet' *); { level meter state }
+ siModemGain = $6D676169 (* 'mgai' *); { modem input gain }
+ siMonitorAvailable = $6D6E6176 (* 'mnav' *);
+ siMonitorSource = $6D6F6E73 (* 'mons' *);
+ siNumberChannels = $6368616E (* 'chan' *); { current number of channels }
+ siOptionsDialog = $6F707464 (* 'optd' *); { display options dialog }
+ siOSTypeInputSource = $696E7074 (* 'inpt' *); { input source by OSType }
+ siOSTypeInputAvailable = $696E6176 (* 'inav' *); { list of available input source OSTypes }
+ siOutputDeviceName = $6F6E616D (* 'onam' *); { output device name }
+ siPlayThruOnOff = $706C7468 (* 'plth' *); { playthrough state }
+ siPostMixerSoundComponent = $70736D78 (* 'psmx' *); { install post-mixer effect }
+ siPreMixerSoundComponent = $70726D78 (* 'prmx' *); { install pre-mixer effect }
+ siQuality = $7175616C (* 'qual' *); { quality setting }
+ siRateMultiplier = $726D756C (* 'rmul' *); { throttle rate setting }
+ siRecordingQuality = $7175616C (* 'qual' *); { recording quality }
+ siSampleRate = $73726174 (* 'srat' *); { current sample rate }
+ siSampleRateAvailable = $73726176 (* 'srav' *); { sample rates available }
+ siSampleSize = $7373697A (* 'ssiz' *); { current sample size }
+ siSampleSizeAvailable = $73736176 (* 'ssav' *); { sample sizes available }
+ siSetupCDAudio = $73756364 (* 'sucd' *); { setup sound hardware for CD audio }
+ siSetupModemAudio = $73756D64 (* 'sumd' *); { setup sound hardware for modem audio }
+ siSlopeAndIntercept = $666C6170 (* 'flap' *); { floating point variables for conversion }
+ siSoundClock = $73636C6B (* 'sclk' *);
+ siUseThisSoundClock = $73636C63 (* 'sclc' *); { sdev uses this to tell the mixer to use his sound clock }
+ siSpeakerMute = $736D7574 (* 'smut' *); { mute state of all built-in speaker }
+ siSpeakerVolume = $73766F6C (* 'svol' *); { volume level of built-in speaker }
+ siSSpCPULoadLimit = $33646C6C (* '3dll' *);
+ siSSpLocalization = $33646966 (* '3dif' *);
+ siSSpSpeakerSetup = $33647374 (* '3dst' *);
+ siStereoInputGain = $73676169 (* 'sgai' *); { stereo input gain }
+ siSubwooferMute = $626D7574 (* 'bmut' *); { mute state of sub-woofer }
+ siTerminalType = $74747970 (* 'ttyp' *); { usb terminal type }
+ siTwosComplementOnOff = $74776F73 (* 'twos' *); { two's complement state }
+ siVendorProduct = $7670726F (* 'vpro' *); { vendor and product ID }
+ siVolume = $766F6C75 (* 'volu' *); { volume level of source }
+ siVoxRecordInfo = $766F7872 (* 'voxr' *); { VOX record parameters }
+ siVoxStopInfo = $766F7873 (* 'voxs' *); { VOX stop parameters }
+ siWideStereo = $77696465 (* 'wide' *); { wide stereo setting }
+ siSupportedExtendedFlags = $6578666C (* 'exfl' *); { which flags are supported in Extended sound data structures }
+ siRateConverterRollOffSlope = $72636462 (* 'rcdb' *); { the roll-off slope for the rate converter's filter, in whole dB as a long this value is a long whose range is from 20 (worst quality/fastest performance) to 90 (best quality/slowest performance) }
+ siOutputLatency = $6F6C7465 (* 'olte' *); { latency of sound output component }
+
+ siCloseDriver = $636C6F73 (* 'clos' *); { reserved for internal use only }
+ siInitializeDriver = $696E6974 (* 'init' *); { reserved for internal use only }
+ siPauseRecording = $70617573 (* 'paus' *); { reserved for internal use only }
+ siUserInterruptProc = $75736572 (* 'user' *); { reserved for internal use only }
+
+ { input source Types }
+ kInvalidSource = $FFFFFFFF; { this source may be returned from GetInfo if no other source is the monitored source }
+ kNoSource = $6E6F6E65 (* 'none' *); { no source selection }
+ kCDSource = $63642020 (* 'cd ' *); { internal CD player input }
+ kExtMicSource = $656D6963 (* 'emic' *); { external mic input }
+ kSoundInSource = $73696E6A (* 'sinj' *); { sound input jack }
+ kRCAInSource = $69726361 (* 'irca' *); { RCA jack input }
+ kTVFMTunerSource = $7476666D (* 'tvfm' *);
+ kDAVInSource = $69646176 (* 'idav' *); { DAV analog input }
+ kIntMicSource = $696D6963 (* 'imic' *); { internal mic input }
+ kMediaBaySource = $6D626179 (* 'mbay' *); { media bay input }
+ kModemSource = $6D6F646D (* 'modm' *); { modem input (internal modem on desktops, PCI input on PowerBooks) }
+ kPCCardSource = $70636D20 (* 'pcm ' *); { PC Card pwm input }
+ kZoomVideoSource = $7A767063 (* 'zvpc' *); { zoom video input }
+ kDVDSource = $64766461 (* 'dvda' *); { DVD audio input }
+ kMicrophoneArray = $6D696361 (* 'mica' *); { microphone array }
+
+ { Sound Component Types and Subtypes }
+ kNoSoundComponentType = $2A2A2A2A (* '****' *);
+ kSoundComponentType = $73696674 (* 'sift' *); { component type }
+ kSoundComponentPPCType = $6E696674 (* 'nift' *); { component type for PowerPC code }
+ kRate8SubType = $72617462 (* 'ratb' *); { 8-bit rate converter }
+ kRate16SubType = $72617477 (* 'ratw' *); { 16-bit rate converter }
+ kConverterSubType = $636F6E76 (* 'conv' *); { sample format converter }
+ kSndSourceSubType = $736F7572 (* 'sour' *); { generic source component }
+ kMixerType = $6D697872 (* 'mixr' *);
+ kMixer8SubType = $6D697862 (* 'mixb' *); { 8-bit mixer }
+ kMixer16SubType = $6D697877 (* 'mixw' *); { 16-bit mixer }
+ kSoundInputDeviceType = $73696E70 (* 'sinp' *); { sound input component }
+ kWaveInSubType = $77617669 (* 'wavi' *); { Windows waveIn }
+ kWaveInSnifferSubType = $7769736E (* 'wisn' *); { Windows waveIn sniffer }
+ kSoundOutputDeviceType = $73646576 (* 'sdev' *); { sound output component }
+ kClassicSubType = $636C6173 (* 'clas' *); { classic hardware, i.e. Mac Plus }
+ kASCSubType = $61736320 (* 'asc ' *); { Apple Sound Chip device }
+ kDSPSubType = $64737020 (* 'dsp ' *); { DSP device }
+ kAwacsSubType = $61776163 (* 'awac' *); { Another of Will's Audio Chips device }
+ kGCAwacsSubType = $61776763 (* 'awgc' *); { Awacs audio with Grand Central DMA }
+ kSingerSubType = $73696E67 (* 'sing' *); { Singer (via Whitney) based sound }
+ kSinger2SubType = $736E6732 (* 'sng2' *); { Singer 2 (via Whitney) for Acme }
+ kWhitSubType = $77686974 (* 'whit' *); { Whit sound component for PrimeTime 3 }
+ kSoundBlasterSubType = $73626C73 (* 'sbls' *); { Sound Blaster for CHRP }
+ kWaveOutSubType = $7761766F (* 'wavo' *); { Windows waveOut }
+ kWaveOutSnifferSubType = $776F736E (* 'wosn' *); { Windows waveOut sniffer }
+ kDirectSoundSubType = $64736E64 (* 'dsnd' *); { Windows DirectSound }
+ kDirectSoundSnifferSubType = $6473736E (* 'dssn' *); { Windows DirectSound sniffer }
+ kUNIXsdevSubType = $756E3178 (* 'un1x' *); { UNIX base sdev }
+ kUSBSubType = $75736220 (* 'usb ' *); { USB device }
+ kBlueBoxSubType = $62736E64 (* 'bsnd' *); { Blue Box sound component }
+ kSoundCompressor = $73636F6D (* 'scom' *);
+ kSoundDecompressor = $73646563 (* 'sdec' *);
+ kAudioComponentType = $6164696F (* 'adio' *); { Audio components and sub-types }
+ kAwacsPhoneSubType = $6870686E (* 'hphn' *);
+ kAudioVisionSpeakerSubType = $74656C63 (* 'telc' *);
+ kAudioVisionHeadphoneSubType = $74656C68 (* 'telh' *);
+ kPhilipsFaderSubType = $74766176 (* 'tvav' *);
+ kSGSToneSubType = $73677330 (* 'sgs0' *);
+ kSoundEffectsType = $736E6678 (* 'snfx' *); { sound effects type }
+ kEqualizerSubType = $6571616C (* 'eqal' *); { frequency equalizer }
+ kSSpLocalizationSubType = $736E6433 (* 'snd3' *);
+
+ { Format Types }
+ kSoundNotCompressed = $4E4F4E45 (* 'NONE' *); { sound is not compressed }
+ k8BitOffsetBinaryFormat = $72617720 (* 'raw ' *); { 8-bit offset binary }
+ k16BitBigEndianFormat = $74776F73 (* 'twos' *); { 16-bit big endian }
+ k16BitLittleEndianFormat = $736F7774 (* 'sowt' *); { 16-bit little endian }
+ kFloat32Format = $666C3332 (* 'fl32' *); { 32-bit floating point }
+ kFloat64Format = $666C3634 (* 'fl64' *); { 64-bit floating point }
+ k24BitFormat = $696E3234 (* 'in24' *); { 24-bit SInt16 }
+ k32BitFormat = $696E3332 (* 'in32' *); { 32-bit SInt16 }
+ k32BitLittleEndianFormat = $32336E69 (* '23ni' *); { 32-bit little endian SInt16 }
+ kMACE3Compression = $4D414333 (* 'MAC3' *); { MACE 3:1 }
+ kMACE6Compression = $4D414336 (* 'MAC6' *); { MACE 6:1 }
+ kCDXA4Compression = $63647834 (* 'cdx4' *); { CD/XA 4:1 }
+ kCDXA2Compression = $63647832 (* 'cdx2' *); { CD/XA 2:1 }
+ kIMACompression = $696D6134 (* 'ima4' *); { IMA 4:1 }
+ kULawCompression = $756C6177 (* 'ulaw' *); { µLaw 2:1 }
+ kALawCompression = $616C6177 (* 'alaw' *); { aLaw 2:1 }
+ kMicrosoftADPCMFormat = $6D730002; { Microsoft ADPCM - ACM code 2 }
+ kDVIIntelIMAFormat = $6D730011; { DVI/Intel IMA ADPCM - ACM code 17 }
+ kDVAudioFormat = $64766361 (* 'dvca' *); { DV Audio }
+ kQDesignCompression = $51444D43 (* 'QDMC' *); { QDesign music }
+ kQDesign2Compression = $51444D32 (* 'QDM2' *); { QDesign2 music }
+ kQUALCOMMCompression = $51636C70 (* 'Qclp' *); { QUALCOMM PureVoice }
+ kOffsetBinary = $72617720 (* 'raw ' *); { for compatibility }
+ kTwosComplement = $74776F73 (* 'twos' *); { for compatibility }
+ kLittleEndianFormat = $736F7774 (* 'sowt' *); { for compatibility }
+ kMPEGLayer3Format = $6D730055; { MPEG Layer 3, CBR only (pre QT4.1) }
+ kFullMPEGLay3Format = $2E6D7033 (* '.mp3' *); { MPEG Layer 3, CBR & VBR (QT4.1 and later) }
+
+{$ifc TARGET_RT_LITTLE_ENDIAN}
+ k16BitNativeEndianFormat = k16BitLittleEndianFormat;
+ k16BitNonNativeEndianFormat = k16BitBigEndianFormat;
+
+{$elsec}
+ k16BitNativeEndianFormat = k16BitBigEndianFormat;
+ k16BitNonNativeEndianFormat = k16BitLittleEndianFormat;
+
+{$endc} {TARGET_RT_LITTLE_ENDIAN}
+
+ { Features Flags }
+ k8BitRawIn = $01; { data description }
+ k8BitTwosIn = $02;
+ k16BitIn = $04;
+ kStereoIn = $08;
+ k8BitRawOut = $0100;
+ k8BitTwosOut = $0200;
+ k16BitOut = $0400;
+ kStereoOut = $0800;
+ kReverse = $00010000; { function description }
+ kRateConvert = $00020000;
+ kCreateSoundSource = $00040000;
+ kVMAwareness = $00200000; { component will hold its memory }
+ kHighQuality = $00400000; { performance description }
+ kNonRealTime = $00800000;
+
+ { SoundComponentPlaySourceBuffer action flags }
+ kSourcePaused = $01;
+ kPassThrough = $00010000;
+ kNoSoundComponentChain = $00020000;
+
+ { SoundParamBlock flags, usefull for OpenMixerSoundComponent }
+ kNoMixing = $01; { don't mix source }
+ kNoSampleRateConversion = $02; { don't convert sample rate (i.e. 11 kHz -> 22 kHz) }
+ kNoSampleSizeConversion = $04; { don't convert sample size (i.e. 16 -> 8) }
+ kNoSampleFormatConversion = $08; { don't convert sample format (i.e. 'twos' -> 'raw ') }
+ kNoChannelConversion = $10; { don't convert stereo/mono }
+ kNoDecompression = $20; { don't decompress (i.e. 'MAC3' -> 'raw ') }
+ kNoVolumeConversion = $40; { don't apply volume }
+ kNoRealtimeProcessing = $80; { won't run at interrupt time }
+ kScheduledSource = $0100; { source is scheduled }
+ kNonInterleavedBuffer = $0200; { buffer is not interleaved samples }
+ kNonPagingMixer = $0400; { if VM is on, use the non-paging mixer }
+ kSoundConverterMixer = $0800; { the mixer is to be used by the SoundConverter }
+ kPagingMixer = $1000; { the mixer is to be used as a paging mixer when VM is on }
+ kVMAwareMixer = $2000; { passed to the output device when the SM is going to deal with VM safety }
+ kExtendedSoundData = $4000; { SoundComponentData record is actually an ExtendedSoundComponentData }
+
+ { SoundParamBlock quality settings }
+ kBestQuality = $01; { use interpolation in rate conversion }
+
+ { useful bit masks }
+ kInputMask = $000000FF; { masks off input bits }
+ kOutputMask = $0000FF00; { masks off output bits }
+ kOutputShift = 8; { amount output bits are shifted }
+ kActionMask = $00FF0000; { masks off action bits }
+ kSoundComponentBits = $00FFFFFF;
+
+ { audio atom types }
+ kAudioFormatAtomType = $66726D61 (* 'frma' *);
+ kAudioEndianAtomType = $656E6461 (* 'enda' *);
+ kAudioVBRAtomType = $76627261 (* 'vbra' *);
+ kAudioTerminatorAtomType = 0;
+
+ { siAVDisplayBehavior types }
+ kAVDisplayHeadphoneRemove = 0; { monitor does not have a headphone attached }
+ kAVDisplayHeadphoneInsert = 1; { monitor has a headphone attached }
+ kAVDisplayPlainTalkRemove = 2; { monitor either sending no input through CPU input port or unable to tell if input is coming in }
+ kAVDisplayPlainTalkInsert = 3; { monitor sending PlainTalk level microphone source input through sound input port }
+
+ { Audio Component constants }
+ { Values for whichChannel parameter }
+ audioAllChannels = 0; { All channels (usually interpreted as both left and right) }
+ audioLeftChannel = 1; { Left channel }
+ audioRightChannel = 2; { Right channel }
+ { Values for mute parameter }
+ audioUnmuted = 0; { Device is unmuted }
+ audioMuted = 1; { Device is muted }
+ { Capabilities flags definitions }
+ audioDoesMono = $00000001; { Device supports mono output }
+ audioDoesStereo = $00000002; { Device supports stereo output }
+ audioDoesIndependentChannels = $00000004; { Device supports independent software control of each channel }
+
+ { Sound Input Qualities }
+ siCDQuality = $63642020 (* 'cd ' *); { 44.1kHz, stereo, 16 bit }
+ siBestQuality = $62657374 (* 'best' *); { 22kHz, mono, 8 bit }
+ siBetterQuality = $62657472 (* 'betr' *); { 22kHz, mono, MACE 3:1 }
+ siGoodQuality = $676F6F64 (* 'good' *); { 22kHz, mono, MACE 6:1 }
+ siNoneQuality = $6E6F6E65 (* 'none' *); { settings don't match any quality for a get call }
+
+ siDeviceIsConnected = 1; { input device is connected and ready for input }
+ siDeviceNotConnected = 0; { input device is not connected }
+ siDontKnowIfConnected = -1; { can't tell if input device is connected }
+ siReadPermission = 0; { permission passed to SPBOpenDevice }
+ siWritePermission = 1; { permission passed to SPBOpenDevice }
+
+ { flags that SoundConverterFillBuffer will return }
+ kSoundConverterDidntFillBuffer = $01; { set if the converter couldn't completely satisfy a SoundConverterFillBuffer request }
+ kSoundConverterHasLeftOverData = $02; { set if the converter had left over data after completely satisfying a SoundConverterFillBuffer call }
+
+ { flags for extendedFlags fields of ExtendedSoundComponentData, ExtendedSoundParamBlock, and ExtendedScheduledSoundHeader }
+ kExtendedSoundSampleCountNotValid = $00000001; { set if sampleCount of SoundComponentData isn't meaningful; use buffer size instead }
+ kExtendedSoundBufferSizeValid = $00000002; { set if bufferSize field is valid }
+
+ {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ typedefs
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ }
+
+
+type
+ SndCommandPtr = ^SndCommand;
+ SndCommand = packed record
+ cmd: UInt16;
+ param1: SInt16;
+ param2: SInt32;
+ end;
+
+ SndChannelPtr = ^SndChannel;
+{$ifc TYPED_FUNCTION_POINTERS}
+ SndCallBackProcPtr = procedure(chan: SndChannelPtr; var cmd: SndCommand);
+{$elsec}
+ SndCallBackProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ SndCallBackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SndCallBackUPP = UniversalProcPtr;
+{$endc}
+ SndChannel = packed record
+ nextChan: SndChannelPtr;
+ firstMod: Ptr; { reserved for the Sound Manager }
+ callBack: SndCallBackUPP;
+ userInfo: SInt32;
+ wait: SInt32; { The following is for internal Sound Manager use only. }
+ cmdInProgress: SndCommand;
+ flags: SInt16;
+ qLength: SInt16;
+ qHead: SInt16;
+ qTail: SInt16;
+ queue: array [0..127] of SndCommand;
+ end;
+
+
+const
+ uppSndCallBackProcInfo = $000003C0;
+ {
+ * NewSndCallBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSndCallBackUPP(userRoutine: SndCallBackProcPtr): SndCallBackUPP; external name '_NewSndCallBackUPP'; { old name was NewSndCallBackProc }
+{
+ * DisposeSndCallBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSndCallBackUPP(userUPP: SndCallBackUPP); external name '_DisposeSndCallBackUPP';
+{
+ * InvokeSndCallBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeSndCallBackUPP(chan: SndChannelPtr; var cmd: SndCommand; userRoutine: SndCallBackUPP); external name '_InvokeSndCallBackUPP'; { old name was CallSndCallBackProc }
+{MACE structures}
+
+type
+ StateBlockPtr = ^StateBlock;
+ StateBlock = record
+ stateVar: array [0..63] of SInt16;
+ end;
+
+ LeftOverBlockPtr = ^LeftOverBlock;
+ LeftOverBlock = record
+ count: UInt32;
+ sampleArea: array [0..31] of SInt8;
+ end;
+
+ ModRefPtr = ^ModRef;
+ ModRef = record
+ modNumber: UInt16;
+ modInit: SInt32;
+ end;
+
+ SndListResourcePtr = ^SndListResource;
+ SndListResource = record
+ format: SInt16;
+ numModifiers: SInt16;
+ modifierPart: array [0..0] of ModRef;
+ numCommands: SInt16;
+ commandPart: array [0..0] of SndCommand;
+ dataPart: SInt8;
+ end;
+
+ SndListPtr = ^SndListResource;
+ SndListHandle = ^SndListPtr;
+ SndListHndl = SndListHandle;
+ { HyperCard sound resource format }
+ Snd2ListResourcePtr = ^Snd2ListResource;
+ Snd2ListResource = record
+ format: SInt16;
+ refCount: SInt16;
+ numCommands: SInt16;
+ commandPart: array [0..0] of SndCommand;
+ dataPart: SInt8;
+ end;
+
+ Snd2ListPtr = ^Snd2ListResource;
+ Snd2ListHandle = ^Snd2ListPtr;
+ Snd2ListHndl = Snd2ListHandle;
+ SoundHeaderPtr = ^SoundHeader;
+ SoundHeader = packed record
+ samplePtr: Ptr; { if NIL then samples are in sampleArea }
+ length: UInt32; { length of sound in bytes }
+ sampleRate: UnsignedFixed; { sample rate for this sound }
+ loopStart: UInt32; { start of looping portion }
+ loopEnd: UInt32; { end of looping portion }
+ encode: UInt8; { header encoding }
+ baseFrequency: UInt8; { baseFrequency value }
+ sampleArea: packed array [0..0] of UInt8; { space for when samples follow directly }
+ pad: UInt8;
+ end;
+
+ CmpSoundHeaderPtr = ^CmpSoundHeader;
+ CmpSoundHeader = packed record
+ samplePtr: Ptr; { if nil then samples are in sample area }
+ numChannels: UInt32; { number of channels i.e. mono = 1 }
+ sampleRate: UnsignedFixed; { sample rate in Apples Fixed point representation }
+ loopStart: UInt32; { loopStart of sound before compression }
+ loopEnd: UInt32; { loopEnd of sound before compression }
+ encode: UInt8; { data structure used , stdSH, extSH, or cmpSH }
+ baseFrequency: UInt8; { same meaning as regular SoundHeader }
+ numFrames: UInt32; { length in frames ( packetFrames or sampleFrames ) }
+ AIFFSampleRate: extended80; { IEEE sample rate }
+ markerChunk: Ptr; { sync track }
+ format: OSType; { data format type, was futureUse1 }
+ futureUse2: UInt32; { reserved by Apple }
+ stateVars: StateBlockPtr; { pointer to State Block }
+ leftOverSamples: LeftOverBlockPtr; { used to save truncated samples between compression calls }
+ compressionID: SInt16; { 0 means no compression, non zero means compressionID }
+ packetSize: UInt16; { number of bits in compressed sample packet }
+ snthID: UInt16; { resource ID of Sound Manager snth that contains NRT C/E }
+ sampleSize: UInt16; { number of bits in non-compressed sample }
+ sampleArea: packed array [0..0] of UInt8; { space for when samples follow directly }
+ pad: UInt8;
+ end;
+
+ ExtSoundHeaderPtr = ^ExtSoundHeader;
+ ExtSoundHeader = packed record
+ samplePtr: Ptr; { if nil then samples are in sample area }
+ numChannels: UInt32; { number of channels, ie mono = 1 }
+ sampleRate: UnsignedFixed; { sample rate in Apples Fixed point representation }
+ loopStart: UInt32; { same meaning as regular SoundHeader }
+ loopEnd: UInt32; { same meaning as regular SoundHeader }
+ encode: UInt8; { data structure used , stdSH, extSH, or cmpSH }
+ baseFrequency: UInt8; { same meaning as regular SoundHeader }
+ numFrames: UInt32; { length in total number of frames }
+ AIFFSampleRate: extended80; { IEEE sample rate }
+ markerChunk: Ptr; { sync track }
+ instrumentChunks: Ptr; { AIFF instrument chunks }
+ AESRecording: Ptr;
+ sampleSize: UInt16; { number of bits in sample }
+ futureUse1: UInt16; { reserved by Apple }
+ futureUse2: UInt32; { reserved by Apple }
+ futureUse3: UInt32; { reserved by Apple }
+ futureUse4: UInt32; { reserved by Apple }
+ sampleArea: packed array [0..0] of UInt8; { space for when samples follow directly }
+ pad: UInt8;
+ end;
+
+ SoundHeaderUnionPtr = ^SoundHeaderUnion;
+ SoundHeaderUnion = record
+ case SInt16 of
+ 0: (
+ stdHeader: SoundHeader;
+ );
+ 1: (
+ cmpHeader: CmpSoundHeader;
+ );
+ 2: (
+ extHeader: ExtSoundHeader;
+ );
+ end;
+
+ ConversionBlockPtr = ^ConversionBlock;
+ ConversionBlock = record
+ destination: SInt16;
+ unused: SInt16;
+ inputPtr: CmpSoundHeaderPtr;
+ outputPtr: CmpSoundHeaderPtr;
+ end;
+
+ { ScheduledSoundHeader flags }
+
+const
+ kScheduledSoundDoScheduled = $01;
+ kScheduledSoundDoCallBack = $02;
+ kScheduledSoundExtendedHdr = $04;
+
+
+type
+ ScheduledSoundHeaderPtr = ^ScheduledSoundHeader;
+ ScheduledSoundHeader = record
+ u: SoundHeaderUnion;
+ flags: SInt32;
+ reserved: SInt16;
+ callBackParam1: SInt16;
+ callBackParam2: SInt32;
+ startTime: TimeRecord;
+ end;
+
+ ExtendedScheduledSoundHeaderPtr = ^ExtendedScheduledSoundHeader;
+ ExtendedScheduledSoundHeader = record
+ u: SoundHeaderUnion;
+ flags: SInt32;
+ reserved: SInt16;
+ callBackParam1: SInt16;
+ callBackParam2: SInt32;
+ startTime: TimeRecord;
+ recordSize: SInt32;
+ extendedFlags: SInt32;
+ bufferSize: SInt32;
+ end;
+
+ SMStatusPtr = ^SMStatus;
+ SMStatus = packed record
+ smMaxCPULoad: SInt16;
+ smNumChannels: SInt16;
+ smCurCPULoad: SInt16;
+ end;
+
+ SCStatusPtr = ^SCStatus;
+ SCStatus = record
+ scStartTime: UnsignedFixed;
+ scEndTime: UnsignedFixed;
+ scCurrentTime: UnsignedFixed;
+ scChannelBusy: boolean;
+ scChannelDisposed: boolean;
+ scChannelPaused: boolean;
+ scUnused: boolean;
+ scChannelAttributes: UInt32;
+ scCPULoad: SInt32;
+ end;
+
+ AudioSelectionPtr = ^AudioSelection;
+ AudioSelection = packed record
+ unitType: SInt32;
+ selStart: UnsignedFixed;
+ selEnd: UnsignedFixed;
+ end;
+
+{$ifc CALL_NOT_IN_CARBON}
+ SndDoubleBufferPtr = ^SndDoubleBuffer;
+ SndDoubleBuffer = packed record
+ dbNumFrames: SInt32;
+ dbFlags: SInt32;
+ dbUserInfo: array [0..1] of SInt32;
+ dbSoundData: array [0..0] of SInt8;
+ end;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SndDoubleBackProcPtr = procedure(channel: SndChannelPtr; doubleBufferPtr: SndDoubleBufferPtr);
+{$elsec}
+ SndDoubleBackProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ SndDoubleBackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SndDoubleBackUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppSndDoubleBackProcInfo = $000003C0;
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * NewSndDoubleBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewSndDoubleBackUPP(userRoutine: SndDoubleBackProcPtr): SndDoubleBackUPP; external name '_NewSndDoubleBackUPP'; { old name was NewSndDoubleBackProc }
+{
+ * DisposeSndDoubleBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposeSndDoubleBackUPP(userUPP: SndDoubleBackUPP); external name '_DisposeSndDoubleBackUPP';
+{
+ * InvokeSndDoubleBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure InvokeSndDoubleBackUPP(channel: SndChannelPtr; doubleBufferPtr: SndDoubleBufferPtr; userRoutine: SndDoubleBackUPP); external name '_InvokeSndDoubleBackUPP'; { old name was CallSndDoubleBackProc }
+{$endc} {CALL_NOT_IN_CARBON}
+
+type
+ SndDoubleBufferHeaderPtr = ^SndDoubleBufferHeader;
+ SndDoubleBufferHeader = packed record
+ dbhNumChannels: SInt16;
+ dbhSampleSize: SInt16;
+ dbhCompressionID: SInt16;
+ dbhPacketSize: SInt16;
+ dbhSampleRate: UnsignedFixed;
+ dbhBufferPtr: array [0..1] of SndDoubleBufferPtr;
+ dbhDoubleBack: SndDoubleBackUPP;
+ end;
+
+ SndDoubleBufferHeader2Ptr = ^SndDoubleBufferHeader2;
+ SndDoubleBufferHeader2 = packed record
+ dbhNumChannels: SInt16;
+ dbhSampleSize: SInt16;
+ dbhCompressionID: SInt16;
+ dbhPacketSize: SInt16;
+ dbhSampleRate: UnsignedFixed;
+ dbhBufferPtr: array [0..1] of SndDoubleBufferPtr;
+ dbhDoubleBack: SndDoubleBackUPP;
+ dbhFormat: OSType;
+ end;
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+ SoundInfoListPtr = ^SoundInfoList;
+ SoundInfoList = packed record
+ count: SInt16;
+ infoHandle: Handle;
+ end;
+
+ SoundComponentDataPtr = ^SoundComponentData;
+ SoundComponentData = record
+ flags: SInt32;
+ format: OSType;
+ numChannels: SInt16;
+ sampleSize: SInt16;
+ sampleRate: UnsignedFixed;
+ sampleCount: SInt32;
+ buffer: Ptr;
+ reserved: SInt32;
+ end;
+
+ ExtendedSoundComponentDataPtr = ^ExtendedSoundComponentData;
+ ExtendedSoundComponentData = record
+ desc: SoundComponentData; { description of sound buffer }
+ recordSize: SInt32; { size of this record in bytes }
+ extendedFlags: SInt32; { flags for extended record }
+ bufferSize: SInt32; { size of buffer in bytes }
+ end;
+
+ SoundParamBlockPtr = ^SoundParamBlock;
+{$ifc TYPED_FUNCTION_POINTERS}
+ SoundParamProcPtr = function(var pb: SoundParamBlockPtr): boolean;
+{$elsec}
+ SoundParamProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ SoundParamUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SoundParamUPP = UniversalProcPtr;
+{$endc}
+ SoundParamBlock = record
+ recordSize: SInt32; { size of this record in bytes }
+ desc: SoundComponentData; { description of sound buffer }
+ rateMultiplier: UnsignedFixed; { rate multiplier to apply to sound }
+ leftVolume: SInt16; { volumes to apply to sound }
+ rightVolume: SInt16;
+ quality: SInt32; { quality to apply to sound }
+ filter: ComponentInstance; { filter to apply to sound }
+ moreRtn: SoundParamUPP; { routine to call to get more data }
+ completionRtn: SoundParamUPP; { routine to call when buffer is complete }
+ refCon: SInt32; { user refcon }
+ result: SInt16; { result }
+ end;
+
+ ExtendedSoundParamBlockPtr = ^ExtendedSoundParamBlock;
+ ExtendedSoundParamBlock = record
+ pb: SoundParamBlock; { classic SoundParamBlock except recordSize == sizeof(ExtendedSoundParamBlock) }
+ reserved: SInt16;
+ extendedFlags: SInt32; { flags }
+ bufferSize: SInt32; { size of buffer in bytes }
+ end;
+
+ CompressionInfoPtr = ^CompressionInfo;
+ CompressionInfo = record
+ recordSize: SInt32;
+ format: OSType;
+ compressionID: SInt16;
+ samplesPerPacket: UInt16;
+ bytesPerPacket: UInt16;
+ bytesPerFrame: UInt16;
+ bytesPerSample: UInt16;
+ futureUse1: UInt16;
+ end;
+
+ CompressionInfoHandle = ^CompressionInfoPtr;
+ { variables for floating point conversion }
+ SoundSlopeAndInterceptRecordPtr = ^SoundSlopeAndInterceptRecord;
+ SoundSlopeAndInterceptRecord = record
+ slope: Float64;
+ intercept: Float64;
+ minClip: Float64;
+ maxClip: Float64;
+ end;
+
+ SoundSlopeAndInterceptPtr = ^SoundSlopeAndInterceptRecord;
+ { private thing to use as a reference to a Sound Converter }
+ SoundConverter = ^SInt32; { an opaque 32-bit type }
+ SoundConverterPtr = ^SoundConverter; { when a var xx:SoundConverter parameter can be nil, it is changed to xx: SoundConverterPtr }
+ { callback routine to provide data to the Sound Converter }
+{$ifc TYPED_FUNCTION_POINTERS}
+ SoundConverterFillBufferDataProcPtr = function(var data: SoundComponentDataPtr; refCon: UnivPtr): boolean;
+{$elsec}
+ SoundConverterFillBufferDataProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ SoundConverterFillBufferDataUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SoundConverterFillBufferDataUPP = UniversalProcPtr;
+{$endc}
+ { private thing to use as a reference to a Sound Source }
+ SoundSource = ^SInt32; { an opaque 32-bit type }
+ SoundSourcePtr = ^SoundSource; { when a var xx:SoundSource parameter can be nil, it is changed to xx: SoundSourcePtr }
+ SoundComponentLinkPtr = ^SoundComponentLink;
+ SoundComponentLink = record
+ description: ComponentDescription; { Describes the sound component }
+ mixerID: SoundSource; { Reserved by Apple }
+ linkID: SoundSourcePtr; { Reserved by Apple }
+ end;
+
+ AudioInfoPtr = ^AudioInfo;
+ AudioInfo = record
+ capabilitiesFlags: SInt32; { Describes device capabilities }
+ reserved: SInt32; { Reserved by Apple }
+ numVolumeSteps: UInt16; { Number of significant increments between min and max volume }
+ end;
+
+ AudioFormatAtomPtr = ^AudioFormatAtom;
+ AudioFormatAtom = record
+ size: SInt32; { = sizeof(AudioFormatAtom) }
+ atomType: OSType; { = kAudioFormatAtomType }
+ format: OSType;
+ end;
+
+ AudioEndianAtomPtr = ^AudioEndianAtom;
+ AudioEndianAtom = record
+ size: SInt32; { = sizeof(AudioEndianAtom) }
+ atomType: OSType; { = kAudioEndianAtomType }
+ littleEndian: SInt16;
+ end;
+
+ AudioTerminatorAtomPtr = ^AudioTerminatorAtom;
+ AudioTerminatorAtom = record
+ size: SInt32; { = sizeof(AudioTerminatorAtom) }
+ atomType: OSType; { = kAudioTerminatorAtomType }
+ end;
+
+ LevelMeterInfoPtr = ^LevelMeterInfo;
+ LevelMeterInfo = record
+ numChannels: SInt16; { mono or stereo source }
+ leftMeter: SInt8; { 0-255 range }
+ rightMeter: SInt8; { 0-255 range }
+ end;
+
+ EQSpectrumBandsRecordPtr = ^EQSpectrumBandsRecord;
+ EQSpectrumBandsRecord = record
+ count: SInt16;
+ frequency: UnsignedFixedPtr; { pointer to array of frequencies }
+ end;
+
+ { Sound Input Structures }
+ SPBPtr = ^SPB;
+ { user procedures called by sound input routines }
+{$ifc TYPED_FUNCTION_POINTERS}
+ SIInterruptProcPtr = procedure(inParamPtr: SPBPtr; dataBuffer: Ptr; peakAmplitude: SInt16; sampleSize: SInt32);
+{$elsec}
+ SIInterruptProcPtr = Register68kProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SICompletionProcPtr = procedure(inParamPtr: SPBPtr);
+{$elsec}
+ SICompletionProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ SIInterruptUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SIInterruptUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SICompletionUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SICompletionUPP = UniversalProcPtr;
+{$endc}
+ { Sound Input Parameter Block }
+ SPB = record
+ inRefNum: SInt32; { reference number of sound input device }
+ count: UInt32; { number of bytes to record }
+ milliseconds: UInt32; { number of milliseconds to record }
+ bufferLength: UInt32; { length of buffer in bytes }
+ bufferPtr: Ptr; { buffer to store sound data in }
+ completionRoutine: SICompletionUPP; { completion routine }
+ interruptRoutine: SIInterruptUPP; { interrupt routine }
+ userLong: SInt32; { user-defined field }
+ error: OSErr; { error }
+ unused1: SInt32; { reserved - must be zero }
+ end;
+
+
+const
+ uppSoundParamProcInfo = $000000D0;
+ uppSoundConverterFillBufferDataProcInfo = $000003D0;
+ uppSIInterruptProcInfo = $1C579802;
+ uppSICompletionProcInfo = $000000C0;
+ {
+ * NewSoundParamUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSoundParamUPP(userRoutine: SoundParamProcPtr): SoundParamUPP; external name '_NewSoundParamUPP'; { old name was NewSoundParamProc }
+{
+ * NewSoundConverterFillBufferDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSoundConverterFillBufferDataUPP(userRoutine: SoundConverterFillBufferDataProcPtr): SoundConverterFillBufferDataUPP; external name '_NewSoundConverterFillBufferDataUPP'; { old name was NewSoundConverterFillBufferDataProc }
+{
+ * NewSIInterruptUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSIInterruptUPP(userRoutine: SIInterruptProcPtr): SIInterruptUPP; external name '_NewSIInterruptUPP'; { old name was NewSIInterruptProc }
+{
+ * NewSICompletionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSICompletionUPP(userRoutine: SICompletionProcPtr): SICompletionUPP; external name '_NewSICompletionUPP'; { old name was NewSICompletionProc }
+{
+ * DisposeSoundParamUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSoundParamUPP(userUPP: SoundParamUPP); external name '_DisposeSoundParamUPP';
+{
+ * DisposeSoundConverterFillBufferDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSoundConverterFillBufferDataUPP(userUPP: SoundConverterFillBufferDataUPP); external name '_DisposeSoundConverterFillBufferDataUPP';
+{
+ * DisposeSIInterruptUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSIInterruptUPP(userUPP: SIInterruptUPP); external name '_DisposeSIInterruptUPP';
+{
+ * DisposeSICompletionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSICompletionUPP(userUPP: SICompletionUPP); external name '_DisposeSICompletionUPP';
+{
+ * InvokeSoundParamUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSoundParamUPP(var pb: SoundParamBlockPtr; userRoutine: SoundParamUPP): boolean; external name '_InvokeSoundParamUPP'; { old name was CallSoundParamProc }
+{
+ * InvokeSoundConverterFillBufferDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSoundConverterFillBufferDataUPP(var data: SoundComponentDataPtr; refCon: UnivPtr; userRoutine: SoundConverterFillBufferDataUPP): boolean; external name '_InvokeSoundConverterFillBufferDataUPP'; { old name was CallSoundConverterFillBufferDataProc }
+{
+ * InvokeSIInterruptUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeSIInterruptUPP(inParamPtr: SPBPtr; dataBuffer: Ptr; peakAmplitude: SInt16; sampleSize: SInt32; userRoutine: SIInterruptUPP); external name '_InvokeSIInterruptUPP'; { old name was CallSIInterruptProc }
+{
+ * InvokeSICompletionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeSICompletionUPP(inParamPtr: SPBPtr; userRoutine: SICompletionUPP); external name '_InvokeSICompletionUPP'; { old name was CallSICompletionProc }
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ FilePlayCompletionProcPtr = procedure(chan: SndChannelPtr);
+{$elsec}
+ FilePlayCompletionProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ FilePlayCompletionUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ FilePlayCompletionUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppFilePlayCompletionProcInfo = $000000C0;
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * NewFilePlayCompletionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewFilePlayCompletionUPP(userRoutine: FilePlayCompletionProcPtr): FilePlayCompletionUPP; external name '_NewFilePlayCompletionUPP'; { old name was NewFilePlayCompletionProc }
+{
+ * DisposeFilePlayCompletionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposeFilePlayCompletionUPP(userUPP: FilePlayCompletionUPP); external name '_DisposeFilePlayCompletionUPP';
+{
+ * InvokeFilePlayCompletionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure InvokeFilePlayCompletionUPP(chan: SndChannelPtr; userRoutine: FilePlayCompletionUPP); external name '_InvokeFilePlayCompletionUPP'; { old name was CallFilePlayCompletionProc }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ prototypes
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+}
+{ Sound Manager routines }
+{
+ * SysBeep()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SysBeep(duration: SInt16); external name '_SysBeep';
+{
+ * SndDoCommand()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SndDoCommand(chan: SndChannelPtr; const (*var*) cmd: SndCommand; noWait: boolean): OSErr; external name '_SndDoCommand';
+{
+ * SndDoImmediate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SndDoImmediate(chan: SndChannelPtr; const (*var*) cmd: SndCommand): OSErr; external name '_SndDoImmediate';
+{
+ * SndNewChannel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SndNewChannel(var chan: SndChannelPtr; synth: SInt16; init: SInt32; userRoutine: SndCallBackUPP): OSErr; external name '_SndNewChannel';
+{
+ * SndDisposeChannel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SndDisposeChannel(chan: SndChannelPtr; quietNow: boolean): OSErr; external name '_SndDisposeChannel';
+{
+ * SndPlay()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SndPlay(chan: SndChannelPtr; sndHandle: SndListHandle; async: boolean): OSErr; external name '_SndPlay';
+{$ifc OLDROUTINENAMES}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * SndAddModifier()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SndAddModifier(chan: SndChannelPtr; modifier: Ptr; id: SInt16; init: SInt32): OSErr; external name '_SndAddModifier';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {OLDROUTINENAMES}
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * SndControl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SndControl(id: SInt16; var cmd: SndCommand): OSErr; external name '_SndControl';
+{ Sound Manager 2.0 and later, uses _SoundDispatch }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * SndSoundManagerVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SndSoundManagerVersion: NumVersion; external name '_SndSoundManagerVersion';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * SndStartFilePlay()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SndStartFilePlay(chan: SndChannelPtr; fRefNum: SInt16; resNum: SInt16; bufferSize: SInt32; theBuffer: UnivPtr; theSelection: AudioSelectionPtr; theCompletion: FilePlayCompletionUPP; async: boolean): OSErr; external name '_SndStartFilePlay';
+{
+ * SndPauseFilePlay()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SndPauseFilePlay(chan: SndChannelPtr): OSErr; external name '_SndPauseFilePlay';
+{
+ * SndStopFilePlay()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SndStopFilePlay(chan: SndChannelPtr; quietNow: boolean): OSErr; external name '_SndStopFilePlay';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * SndChannelStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SndChannelStatus(chan: SndChannelPtr; theLength: SInt16; theStatus: SCStatusPtr): OSErr; external name '_SndChannelStatus';
+{
+ * SndManagerStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SndManagerStatus(theLength: SInt16; theStatus: SMStatusPtr): OSErr; external name '_SndManagerStatus';
+{
+ * SndGetSysBeepState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure SndGetSysBeepState(var sysBeepState: SInt16); external name '_SndGetSysBeepState';
+{
+ * SndSetSysBeepState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SndSetSysBeepState(sysBeepState: SInt16): OSErr; external name '_SndSetSysBeepState';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * SndPlayDoubleBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SndPlayDoubleBuffer(chan: SndChannelPtr; theParams: SndDoubleBufferHeaderPtr): OSErr; external name '_SndPlayDoubleBuffer';
+{ MACE compression routines, uses _SoundDispatch }
+{
+ * MACEVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function MACEVersion: NumVersion; external name '_MACEVersion';
+{
+ * Comp3to1()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure Comp3to1(inBuffer: UnivPtr; outBuffer: UnivPtr; cnt: UInt32; inState: StateBlockPtr; outState: StateBlockPtr; numChannels: UInt32; whichChannel: UInt32); external name '_Comp3to1';
+{
+ * Exp1to3()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure Exp1to3(inBuffer: UnivPtr; outBuffer: UnivPtr; cnt: UInt32; inState: StateBlockPtr; outState: StateBlockPtr; numChannels: UInt32; whichChannel: UInt32); external name '_Exp1to3';
+{
+ * Comp6to1()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure Comp6to1(inBuffer: UnivPtr; outBuffer: UnivPtr; cnt: UInt32; inState: StateBlockPtr; outState: StateBlockPtr; numChannels: UInt32; whichChannel: UInt32); external name '_Comp6to1';
+{
+ * Exp1to6()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure Exp1to6(inBuffer: UnivPtr; outBuffer: UnivPtr; cnt: UInt32; inState: StateBlockPtr; outState: StateBlockPtr; numChannels: UInt32; whichChannel: UInt32); external name '_Exp1to6';
+{ Sound Manager 3.0 and later calls, uses _SoundDispatch }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * GetSysBeepVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetSysBeepVolume(var level: SInt32): OSErr; external name '_GetSysBeepVolume';
+{
+ * SetSysBeepVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetSysBeepVolume(level: SInt32): OSErr; external name '_SetSysBeepVolume';
+{
+ * GetDefaultOutputVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetDefaultOutputVolume(var level: SInt32): OSErr; external name '_GetDefaultOutputVolume';
+{
+ * SetDefaultOutputVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetDefaultOutputVolume(level: SInt32): OSErr; external name '_SetDefaultOutputVolume';
+{
+ * GetSoundHeaderOffset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetSoundHeaderOffset(sndHandle: SndListHandle; var offset: SInt32): OSErr; external name '_GetSoundHeaderOffset';
+{
+ * UnsignedFixedMulDiv()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function UnsignedFixedMulDiv(value: UnsignedFixed; multiplier: UnsignedFixed; divisor: UnsignedFixed): UnsignedFixed; external name '_UnsignedFixedMulDiv';
+{
+ * GetCompressionInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetCompressionInfo(compressionID: SInt16; format: OSType; numChannels: SInt16; sampleSize: SInt16; cp: CompressionInfoPtr): OSErr; external name '_GetCompressionInfo';
+{
+ * SetSoundPreference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetSoundPreference(theType: OSType; var name: Str255; settings: Handle): OSErr; external name '_SetSoundPreference';
+{
+ * GetSoundPreference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetSoundPreference(theType: OSType; var name: Str255; settings: Handle): OSErr; external name '_GetSoundPreference';
+{
+ * OpenMixerSoundComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function OpenMixerSoundComponent(outputDescription: SoundComponentDataPtr; outputFlags: SInt32; var mixerComponent: ComponentInstance): OSErr; external name '_OpenMixerSoundComponent';
+{
+ * CloseMixerSoundComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function CloseMixerSoundComponent(ci: ComponentInstance): OSErr; external name '_CloseMixerSoundComponent';
+{ Sound Manager 3.1 and later calls, uses _SoundDispatch }
+{
+ * SndGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SndGetInfo(chan: SndChannelPtr; selector: OSType; infoPtr: UnivPtr): OSErr; external name '_SndGetInfo';
+{
+ * SndSetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SndSetInfo(chan: SndChannelPtr; selector: OSType; infoPtr: UnivPtr): OSErr; external name '_SndSetInfo';
+{
+ * GetSoundOutputInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetSoundOutputInfo(outputDevice: Component; selector: OSType; infoPtr: UnivPtr): OSErr; external name '_GetSoundOutputInfo';
+{
+ * SetSoundOutputInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetSoundOutputInfo(outputDevice: Component; selector: OSType; infoPtr: UnivPtr): OSErr; external name '_SetSoundOutputInfo';
+{ Sound Manager 3.2 and later calls, uses _SoundDispatch }
+{
+ * GetCompressionName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function GetCompressionName(compressionType: OSType; var compressionName: Str255): OSErr; external name '_GetCompressionName';
+{
+ * SoundConverterOpen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundConverterOpen(const (*var*) inputFormat: SoundComponentData; const (*var*) outputFormat: SoundComponentData; var sc: SoundConverter): OSErr; external name '_SoundConverterOpen';
+{
+ * SoundConverterClose()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundConverterClose(sc: SoundConverter): OSErr; external name '_SoundConverterClose';
+{
+ * SoundConverterGetBufferSizes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundConverterGetBufferSizes(sc: SoundConverter; inputBytesTarget: UInt32; var inputFrames: UInt32; var inputBytes: UInt32; var outputBytes: UInt32): OSErr; external name '_SoundConverterGetBufferSizes';
+{
+ * SoundConverterBeginConversion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundConverterBeginConversion(sc: SoundConverter): OSErr; external name '_SoundConverterBeginConversion';
+{
+ * SoundConverterConvertBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundConverterConvertBuffer(sc: SoundConverter; inputPtr: UnivPtr; inputFrames: UInt32; outputPtr: UnivPtr; var outputFrames: UInt32; var outputBytes: UInt32): OSErr; external name '_SoundConverterConvertBuffer';
+{
+ * SoundConverterEndConversion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.2 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundConverterEndConversion(sc: SoundConverter; outputPtr: UnivPtr; var outputFrames: UInt32; var outputBytes: UInt32): OSErr; external name '_SoundConverterEndConversion';
+{ Sound Manager 3.3 and later calls, uses _SoundDispatch }
+{
+ * SoundConverterGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.3 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundConverterGetInfo(sc: SoundConverter; selector: OSType; infoPtr: UnivPtr): OSErr; external name '_SoundConverterGetInfo';
+{
+ * SoundConverterSetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.3 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundConverterSetInfo(sc: SoundConverter; selector: OSType; infoPtr: UnivPtr): OSErr; external name '_SoundConverterSetInfo';
+{ Sound Manager 3.6 and later calls, uses _SoundDispatch }
+{
+ * SoundConverterFillBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.6 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundConverterFillBuffer(sc: SoundConverter; fillBufferDataUPP: SoundConverterFillBufferDataUPP; fillBufferDataRefCon: UnivPtr; outputBuffer: UnivPtr; outputBufferByteSize: UInt32; var bytesWritten: UInt32; var framesWritten: UInt32; var outputFlags: UInt32): OSErr; external name '_SoundConverterFillBuffer';
+{
+ * SoundManagerGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.6 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundManagerGetInfo(selector: OSType; infoPtr: UnivPtr): OSErr; external name '_SoundManagerGetInfo';
+{
+ * SoundManagerSetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.6 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundManagerSetInfo(selector: OSType; infoPtr: UnivPtr): OSErr; external name '_SoundManagerSetInfo';
+{
+ Sound Component Functions
+ basic sound component functions
+}
+
+{
+ * SoundComponentInitOutputDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundComponentInitOutputDevice(ti: ComponentInstance; actions: SInt32): ComponentResult; external name '_SoundComponentInitOutputDevice';
+{
+ * SoundComponentSetSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundComponentSetSource(ti: ComponentInstance; sourceID: SoundSource; source: ComponentInstance): ComponentResult; external name '_SoundComponentSetSource';
+{
+ * SoundComponentGetSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundComponentGetSource(ti: ComponentInstance; sourceID: SoundSource; var source: ComponentInstance): ComponentResult; external name '_SoundComponentGetSource';
+{
+ * SoundComponentGetSourceData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundComponentGetSourceData(ti: ComponentInstance; var sourceData: SoundComponentDataPtr): ComponentResult; external name '_SoundComponentGetSourceData';
+{
+ * SoundComponentSetOutput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundComponentSetOutput(ti: ComponentInstance; requested: SoundComponentDataPtr; var actual: SoundComponentDataPtr): ComponentResult; external name '_SoundComponentSetOutput';
+{ junction methods for the mixer, must be called at non-interrupt level }
+{
+ * SoundComponentAddSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundComponentAddSource(ti: ComponentInstance; var sourceID: SoundSource): ComponentResult; external name '_SoundComponentAddSource';
+{
+ * SoundComponentRemoveSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundComponentRemoveSource(ti: ComponentInstance; sourceID: SoundSource): ComponentResult; external name '_SoundComponentRemoveSource';
+{ info methods }
+{
+ * SoundComponentGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundComponentGetInfo(ti: ComponentInstance; sourceID: SoundSource; selector: OSType; infoPtr: UnivPtr): ComponentResult; external name '_SoundComponentGetInfo';
+{
+ * SoundComponentSetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundComponentSetInfo(ti: ComponentInstance; sourceID: SoundSource; selector: OSType; infoPtr: UnivPtr): ComponentResult; external name '_SoundComponentSetInfo';
+{ control methods }
+{
+ * SoundComponentStartSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundComponentStartSource(ti: ComponentInstance; count: SInt16; var sources: SoundSource): ComponentResult; external name '_SoundComponentStartSource';
+{
+ * SoundComponentStopSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundComponentStopSource(ti: ComponentInstance; count: SInt16; var sources: SoundSource): ComponentResult; external name '_SoundComponentStopSource';
+{
+ * SoundComponentPauseSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundComponentPauseSource(ti: ComponentInstance; count: SInt16; var sources: SoundSource): ComponentResult; external name '_SoundComponentPauseSource';
+{
+ * SoundComponentPlaySourceBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SoundComponentPlaySourceBuffer(ti: ComponentInstance; sourceID: SoundSource; pb: SoundParamBlockPtr; actions: SInt32): ComponentResult; external name '_SoundComponentPlaySourceBuffer';
+{ Audio Components }
+{Volume is described as a value between 0 and 1, with 0 indicating minimum
+ volume and 1 indicating maximum volume; if the device doesn't support
+ software control of volume, then a value of unimpErr is returned, indicating
+ that these functions are not supported by the device
+}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * AudioGetVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AudioGetVolume(ac: ComponentInstance; whichChannel: SInt16; var volume: ShortFixed): ComponentResult; external name '_AudioGetVolume';
+{
+ * AudioSetVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AudioSetVolume(ac: ComponentInstance; whichChannel: SInt16; volume: ShortFixed): ComponentResult; external name '_AudioSetVolume';
+{If the device doesn't support software control of mute, then a value of unimpErr is
+returned, indicating that these functions are not supported by the device.}
+{
+ * AudioGetMute()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AudioGetMute(ac: ComponentInstance; whichChannel: SInt16; var mute: SInt16): ComponentResult; external name '_AudioGetMute';
+{
+ * AudioSetMute()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AudioSetMute(ac: ComponentInstance; whichChannel: SInt16; mute: SInt16): ComponentResult; external name '_AudioSetMute';
+{AudioSetToDefaults causes the associated device to reset its volume and mute values
+(and perhaps other characteristics, e.g. attenuation) to "factory default" settings}
+{
+ * AudioSetToDefaults()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AudioSetToDefaults(ac: ComponentInstance): ComponentResult; external name '_AudioSetToDefaults';
+{ This routine is required; it must be implemented by all audio components }
+
+{
+ * AudioGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AudioGetInfo(ac: ComponentInstance; info: AudioInfoPtr): ComponentResult; external name '_AudioGetInfo';
+{
+ * AudioGetBass()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AudioGetBass(ac: ComponentInstance; whichChannel: SInt16; var bass: SInt16): ComponentResult; external name '_AudioGetBass';
+{
+ * AudioSetBass()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AudioSetBass(ac: ComponentInstance; whichChannel: SInt16; bass: SInt16): ComponentResult; external name '_AudioSetBass';
+{
+ * AudioGetTreble()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AudioGetTreble(ac: ComponentInstance; whichChannel: SInt16; var Treble: SInt16): ComponentResult; external name '_AudioGetTreble';
+{
+ * AudioSetTreble()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AudioSetTreble(ac: ComponentInstance; whichChannel: SInt16; Treble: SInt16): ComponentResult; external name '_AudioSetTreble';
+{
+ * AudioGetOutputDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AudioGetOutputDevice(ac: ComponentInstance; var outputDevice: Component): ComponentResult; external name '_AudioGetOutputDevice';
+{ This is routine is private to the AudioVision component. It enables the watching of the mute key. }
+{
+ * AudioMuteOnEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function AudioMuteOnEvent(ac: ComponentInstance; muteOnEvent: SInt16): ComponentResult; external name '_AudioMuteOnEvent';
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+const
+ kDelegatedSoundComponentSelectors = $0100;
+
+ { Sound Input Manager routines, uses _SoundDispatch }
+ {
+ * SPBVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SPBVersion: NumVersion; external name '_SPBVersion';
+{
+ * SndRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SndRecord(filterProc: ModalFilterUPP; corner: Point; quality: OSType; var sndHandle: SndListHandle): OSErr; external name '_SndRecord';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * SndRecordToFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SndRecordToFile(filterProc: ModalFilterUPP; corner: Point; quality: OSType; fRefNum: SInt16): OSErr; external name '_SndRecordToFile';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * SPBSignInDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SPBSignInDevice(deviceRefNum: SInt16; const (*var*) deviceName: Str255): OSErr; external name '_SPBSignInDevice';
+{
+ * SPBSignOutDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SPBSignOutDevice(deviceRefNum: SInt16): OSErr; external name '_SPBSignOutDevice';
+{
+ * SPBGetIndexedDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SPBGetIndexedDevice(count: SInt16; var deviceName: Str255; var deviceIconHandle: Handle): OSErr; external name '_SPBGetIndexedDevice';
+{
+ * SPBOpenDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SPBOpenDevice(const (*var*) deviceName: Str255; permission: SInt16; var inRefNum: SInt32): OSErr; external name '_SPBOpenDevice';
+{
+ * SPBCloseDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SPBCloseDevice(inRefNum: SInt32): OSErr; external name '_SPBCloseDevice';
+{
+ * SPBRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SPBRecord(inParamPtr: SPBPtr; asynchFlag: boolean): OSErr; external name '_SPBRecord';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * SPBRecordToFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SPBRecordToFile(fRefNum: SInt16; inParamPtr: SPBPtr; asynchFlag: boolean): OSErr; external name '_SPBRecordToFile';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * SPBPauseRecording()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SPBPauseRecording(inRefNum: SInt32): OSErr; external name '_SPBPauseRecording';
+{
+ * SPBResumeRecording()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SPBResumeRecording(inRefNum: SInt32): OSErr; external name '_SPBResumeRecording';
+{
+ * SPBStopRecording()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SPBStopRecording(inRefNum: SInt32): OSErr; external name '_SPBStopRecording';
+{
+ * SPBGetRecordingStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SPBGetRecordingStatus(inRefNum: SInt32; var recordingStatus: SInt16; var meterLevel: SInt16; var totalSamplesToRecord: UInt32; var numberOfSamplesRecorded: UInt32; var totalMsecsToRecord: UInt32; var numberOfMsecsRecorded: UInt32): OSErr; external name '_SPBGetRecordingStatus';
+{
+ * SPBGetDeviceInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SPBGetDeviceInfo(inRefNum: SInt32; infoType: OSType; infoData: UnivPtr): OSErr; external name '_SPBGetDeviceInfo';
+{
+ * SPBSetDeviceInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SPBSetDeviceInfo(inRefNum: SInt32; infoType: OSType; infoData: UnivPtr): OSErr; external name '_SPBSetDeviceInfo';
+{
+ * SPBMillisecondsToBytes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SPBMillisecondsToBytes(inRefNum: SInt32; var milliseconds: SInt32): OSErr; external name '_SPBMillisecondsToBytes';
+{
+ * SPBBytesToMilliseconds()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SPBBytesToMilliseconds(inRefNum: SInt32; var byteCount: SInt32): OSErr; external name '_SPBBytesToMilliseconds';
+{
+ * SetupSndHeader()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetupSndHeader(sndHandle: SndListHandle; numChannels: SInt16; sampleRate: UnsignedFixed; sampleSize: SInt16; compressionType: OSType; baseNote: SInt16; numBytes: UInt32; var headerLen: SInt16): OSErr; external name '_SetupSndHeader';
+{
+ * SetupAIFFHeader()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function SetupAIFFHeader(fRefNum: SInt16; numChannels: SInt16; sampleRate: UnsignedFixed; sampleSize: SInt16; compressionType: OSType; numBytes: UInt32; numFrames: UInt32): OSErr; external name '_SetupAIFFHeader';
+{ Sound Input Manager 1.1 and later calls, uses _SoundDispatch }
+{
+ * ParseAIFFHeader()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ParseAIFFHeader(fRefNum: SInt16; var sndInfo: SoundComponentData; var numFrames: UInt32; var dataOffset: UInt32): OSErr; external name '_ParseAIFFHeader';
+{
+ * ParseSndHeader()
+ *
+ * Availability:
+ * Non-Carbon CFM: in SoundLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function ParseSndHeader(sndHandle: SndListHandle; var sndInfo: SoundComponentData; var numFrames: UInt32; var dataOffset: UInt32): OSErr; external name '_ParseSndHeader';
+{$ifc NOT TARGET_OS_MAC OR TARGET_API_MAC_CARBON}
+{ Only to be used if you are writing a sound input component; this }
+{ is the param block for a read request from the SoundMgr to the }
+{ sound input component. Not to be confused with the SPB struct }
+{ above, which is the param block for a read request from an app }
+{ to the SoundMgr. }
+
+type
+ SndInputCmpParamPtr = ^SndInputCmpParam;
+{$ifc TYPED_FUNCTION_POINTERS}
+ SICCompletionProcPtr = procedure(SICParmPtr: SndInputCmpParamPtr);
+{$elsec}
+ SICCompletionProcPtr = ProcPtr;
+{$endc}
+
+ SndInputCmpParam = record
+ ioCompletion: SICCompletionProcPtr; { completion routine [pointer] }
+ ioInterrupt: SIInterruptProcPtr; { interrupt routine [pointer] }
+ ioResult: OSErr; { I/O result code [word] }
+ pad: SInt16;
+ ioReqCount: UInt32;
+ ioActCount: UInt32;
+ ioBuffer: Ptr;
+ ioMisc: Ptr;
+ end;
+
+ {
+ * SndInputReadAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function SndInputReadAsync(self: ComponentInstance; SICParmPtr: SndInputCmpParamPtr): ComponentResult; external name '_SndInputReadAsync';
+{
+ * SndInputReadSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function SndInputReadSync(self: ComponentInstance; SICParmPtr: SndInputCmpParamPtr): ComponentResult; external name '_SndInputReadSync';
+{
+ * SndInputPauseRecording()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function SndInputPauseRecording(self: ComponentInstance): ComponentResult; external name '_SndInputPauseRecording';
+{
+ * SndInputResumeRecording()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function SndInputResumeRecording(self: ComponentInstance): ComponentResult; external name '_SndInputResumeRecording';
+{
+ * SndInputStopRecording()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function SndInputStopRecording(self: ComponentInstance): ComponentResult; external name '_SndInputStopRecording';
+{
+ * SndInputGetStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function SndInputGetStatus(self: ComponentInstance; var recordingStatus: SInt16; var totalSamplesToRecord: UInt32; var numberOfSamplesRecorded: UInt32): ComponentResult; external name '_SndInputGetStatus';
+{
+ * SndInputGetDeviceInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function SndInputGetDeviceInfo(self: ComponentInstance; infoType: OSType; infoData: UnivPtr): ComponentResult; external name '_SndInputGetDeviceInfo';
+{
+ * SndInputSetDeviceInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function SndInputSetDeviceInfo(self: ComponentInstance; infoType: OSType; infoData: UnivPtr): ComponentResult; external name '_SndInputSetDeviceInfo';
+{
+ * SndInputInitHardware()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function SndInputInitHardware(self: ComponentInstance): ComponentResult; external name '_SndInputInitHardware';
+{$endc}
+
+
+{$ALIGN MAC68K}
+
+
+{unit TSMTE}
+{
+ File: HIToolbox/TSMTE.h
+
+ Contains: Text Services Managerfor TextEdit Interfaces. All Textedit functions as well all functions in
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1991-2005 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{****************************************************************************************************************
+
+ All Textedit functions as well all functions in this file are deprecated for Mac OS 10.4. The Multilingual Text
+ Engine (MLTE) API is recommended instead. MLTE support for inline input is built-in so there is no need for an
+ API parallel to TSMTE on Mac OS X. Please see MacTextEditor.h file for a description of the MLTE API.
+
+*****************************************************************************************************************}
+
+
+{$ALIGN MAC68K}
+
+{ signature, interface types}
+const
+ kTSMTESignature = $746D5445 (* 'tmTE' *);
+ kTSMTEInterfaceType = kTSMTEDocumentInterfaceType;
+
+{
+ In Carbon, since DialogRef is opaque, the TSMDialogRecord is removed.
+ Only one kind of TSMTE dialog remains, with extended data managed by TSMTE.
+ Use kTSMTESignature for the dialog refCon, and use the accessors below,
+ i.e. GetTSMTEDialogTSMTERecHandle, to get at the old TSMDialogRecord info.
+}
+
+{ update flag for TSMTERec}
+const
+ kTSMTEAutoScroll = 1;
+
+
+{ callback procedure definitions}
+
+type
+ TSMTEPreUpdateProcPtr = procedure( textH: TEHandle; refCon: SInt32 );
+ TSMTEPostUpdateProcPtr = procedure( textH: TEHandle; fixLen: SInt32; inputAreaStart: SInt32; inputAreaEnd: SInt32; pinStart: SInt32; pinEnd: SInt32; refCon: SInt32 );
+ TSMTEPreUpdateUPP = TSMTEPreUpdateProcPtr;
+ TSMTEPostUpdateUPP = TSMTEPostUpdateProcPtr;
+
+
+{ data types}
+type
+ TSMTERec = record
+ textH: TEHandle;
+ preUpdateProc: TSMTEPreUpdateUPP;
+ postUpdateProc: TSMTEPostUpdateUPP;
+ updateFlag: SInt32;
+ refCon: SInt32;
+ end;
+ TSMTERecPtr = ^TSMTERec;
+ TSMTERecHandle = ^TSMTERecPtr;
+
+{
+ * NewTSMTEPreUpdateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewTSMTEPreUpdateUPP( userRoutine: TSMTEPreUpdateProcPtr ): TSMTEPreUpdateUPP; external name '_NewTSMTEPreUpdateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * NewTSMTEPostUpdateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewTSMTEPostUpdateUPP( userRoutine: TSMTEPostUpdateProcPtr ): TSMTEPostUpdateUPP; external name '_NewTSMTEPostUpdateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeTSMTEPreUpdateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeTSMTEPreUpdateUPP( userUPP: TSMTEPreUpdateUPP ); external name '_DisposeTSMTEPreUpdateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * DisposeTSMTEPostUpdateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeTSMTEPostUpdateUPP( userUPP: TSMTEPostUpdateUPP ); external name '_DisposeTSMTEPostUpdateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeTSMTEPreUpdateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeTSMTEPreUpdateUPP( textH: TEHandle; refCon: SInt32; userUPP: TSMTEPreUpdateUPP ); external name '_InvokeTSMTEPreUpdateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * InvokeTSMTEPostUpdateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeTSMTEPostUpdateUPP( textH: TEHandle; fixLen: SInt32; inputAreaStart: SInt32; inputAreaEnd: SInt32; pinStart: SInt32; pinEnd: SInt32; refCon: SInt32; userUPP: TSMTEPostUpdateUPP ); external name '_InvokeTSMTEPostUpdateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+{
+ * IsTSMTEDialog() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
+ }
+function IsTSMTEDialog( dialog: DialogRef ): Boolean; external name '_IsTSMTEDialog';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Getters }
+{
+ * GetTSMTEDialogDocumentID() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
+ }
+function GetTSMTEDialogDocumentID( dialog: DialogRef ): TSMDocumentID; external name '_GetTSMTEDialogDocumentID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * GetTSMTEDialogTSMTERecHandle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
+ }
+function GetTSMTEDialogTSMTERecHandle( dialog: DialogRef ): TSMTERecHandle; external name '_GetTSMTEDialogTSMTERecHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Setters }
+{
+ * SetTSMTEDialogDocumentID() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
+ }
+procedure SetTSMTEDialogDocumentID( dialog: DialogRef; documentID: TSMDocumentID ); external name '_SetTSMTEDialogDocumentID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{
+ * SetTSMTEDialogTSMTERecHandle() *** DEPRECATED ***
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
+ }
+procedure SetTSMTEDialogTSMTERecHandle( dialog: DialogRef; tsmteRecHandle_: TSMTERecHandle ); external name '_SetTSMTEDialogTSMTERecHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+
+
+{unit CMApplication}
+{
+ File: ColorSync/CMApplication.h
+
+ Contains: Color Matching Interfaces
+
+ Version: ColorSync-174.1~229
+
+ Copyright: © 1992-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Gale R Paeper, <gpaeper@empirenet.com>, 2007 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$setc _DECLARE_CS_QD_API_ := 0} { Mac OS X ColorSync QuickDraw API are located in QuickDraw.p[.pas] }
+{$ifc TARGET_API_MAC_OS8}
+{$endc} {TARGET_API_MAC_OS8}
+
+
+{$ALIGN MAC68K}
+
+
+const
+ kDefaultCMMSignature = $6170706C (* 'appl' *);
+
+ { Macintosh 68K trap word }
+ cmTrap = $ABEE;
+
+
+ { PicComment IDs }
+ cmBeginProfile = 220;
+ cmEndProfile = 221;
+ cmEnableMatching = 222;
+ cmDisableMatching = 223;
+ cmComment = 224;
+
+ { PicComment selectors for cmComment }
+ cmBeginProfileSel = 0;
+ cmContinueProfileSel = 1;
+ cmEndProfileSel = 2;
+ cmProfileIdentifierSel = 3;
+
+
+ { Defines for version 1.0 CMProfileSearchRecord.fieldMask }
+ cmMatchCMMType = $00000001;
+ cmMatchApplProfileVersion = $00000002;
+ cmMatchDataType = $00000004;
+ cmMatchDeviceType = $00000008;
+ cmMatchDeviceManufacturer = $00000010;
+ cmMatchDeviceModel = $00000020;
+ cmMatchDeviceAttributes = $00000040;
+ cmMatchFlags = $00000080;
+ cmMatchOptions = $00000100;
+ cmMatchWhite = $00000200;
+ cmMatchBlack = $00000400;
+
+ { Defines for version 2.0 CMSearchRecord.searchMask }
+ cmMatchAnyProfile = $00000000;
+ cmMatchProfileCMMType = $00000001;
+ cmMatchProfileClass = $00000002;
+ cmMatchDataColorSpace = $00000004;
+ cmMatchProfileConnectionSpace = $00000008;
+ cmMatchManufacturer = $00000010;
+ cmMatchModel = $00000020;
+ cmMatchAttributes = $00000040;
+ cmMatchProfileFlags = $00000080;
+
+
+ { Flags for PostScript-related functions }
+ cmPS7bit = 1;
+ cmPS8bit = 2;
+
+ { Flags for profile embedding functions }
+ cmEmbedWholeProfile = $00000000;
+ cmEmbedProfileIdentifier = $00000001;
+
+ { Commands for CMFlattenUPP() }
+ cmOpenReadSpool = 1;
+ cmOpenWriteSpool = 2;
+ cmReadSpool = 3;
+ cmWriteSpool = 4;
+ cmCloseSpool = 5;
+
+ { Commands for CMAccessUPP() }
+ cmOpenReadAccess = 1;
+ cmOpenWriteAccess = 2;
+ cmReadAccess = 3;
+ cmWriteAccess = 4;
+ cmCloseAccess = 5;
+ cmCreateNewAccess = 6;
+ cmAbortWriteAccess = 7;
+ cmBeginAccess = 8;
+ cmEndAccess = 9;
+
+
+ { Use types for CMGet/SetDefaultProfileByUse() }
+ cmInputUse = $696E7074 (* 'inpt' *);
+ cmOutputUse = $6F757470 (* 'outp' *);
+ cmDisplayUse = $64706C79 (* 'dply' *);
+ cmProofUse = $70727566 (* 'pruf' *);
+
+
+ { Union of 1.0, 2.0, and 4.0 profile header variants }
+
+type
+ CMAppleProfileHeaderPtr = ^CMAppleProfileHeader;
+ CMAppleProfileHeader = record
+ case SInt16 of
+ 0: (
+ cm1: CMHeader;
+ );
+ 1: (
+ cm2: CM2Header;
+ );
+ 2: (
+ cm4: CM4Header;
+ );
+ end;
+
+ { CWConcatColorWorld() definitions }
+ CMConcatProfileSetPtr = ^CMConcatProfileSet;
+ CMConcatProfileSet = record
+ keyIndex: UInt16; { Zero-based }
+ count: UInt16; { Min 1 }
+ profileSet: array [0..0] of CMProfileRef; { Variable. Ordered from Source -> Dest }
+ end;
+
+ { NCWConcatColorWorld() definitions }
+ NCMConcatProfileSpecPtr = ^NCMConcatProfileSpec;
+ NCMConcatProfileSpec = record
+ renderingIntent: UInt32; { renderingIntent override }
+ transformTag: UInt32; { transform enumerations defined below }
+ profile: CMProfileRef; { profile }
+ end;
+
+ NCMConcatProfileSetPtr = ^NCMConcatProfileSet;
+ NCMConcatProfileSet = record
+ cmm: OSType; { e.g. 'KCMS', 'appl', ... uniquely ids the cmm, or 0000 }
+ flags: UInt32; { specify quality, lookup only, no gamut checking ... }
+ flagsMask: UInt32; { which bits of 'flags' to use to override profile }
+ profileCount: UInt32; { how many ProfileSpecs in the following set }
+ profileSpecs: array [0..0] of NCMConcatProfileSpec; { Variable. Ordered from Source -> Dest }
+ end;
+
+
+const
+ kNoTransform = 0; { Not used }
+ kUseAtoB = 1; { Use 'A2B*' tag from this profile or equivalent }
+ kUseBtoA = 2; { Use 'B2A*' tag from this profile or equivalent }
+ kUseBtoB = 3; { Use 'pre*' tag from this profile or equivalent }
+ { For typical device profiles the following synonyms may be useful }
+ kDeviceToPCS = 1; { Device Dependent to Device Independent }
+ kPCSToDevice = 2; { Device Independent to Device Dependent }
+ kPCSToPCS = 3; { Independent, through device's gamut }
+ kUseProfileIntent = $FFFFFFFF; { For renderingIntent in NCMConcatProfileSpec }
+
+
+ { ColorSync color data types }
+
+type
+ CMRGBColorPtr = ^CMRGBColor;
+ CMRGBColor = record
+ red: UInt16; { 0..65535 }
+ green: UInt16;
+ blue: UInt16;
+ end;
+
+ CMCMYKColorPtr = ^CMCMYKColor;
+ CMCMYKColor = record
+ cyan: UInt16; { 0..65535 }
+ magenta: UInt16;
+ yellow: UInt16;
+ black: UInt16;
+ end;
+
+ CMCMYColorPtr = ^CMCMYColor;
+ CMCMYColor = record
+ cyan: UInt16; { 0..65535 }
+ magenta: UInt16;
+ yellow: UInt16;
+ end;
+
+ CMHLSColorPtr = ^CMHLSColor;
+ CMHLSColor = record
+ hue: UInt16; { 0..65535. Fraction of circle. Red at 0 }
+ lightness: UInt16; { 0..65535 }
+ saturation: UInt16; { 0..65535 }
+ end;
+
+ CMHSVColorPtr = ^CMHSVColor;
+ CMHSVColor = record
+ hue: UInt16; { 0..65535. Fraction of circle. Red at 0 }
+ saturation: UInt16; { 0..65535 }
+ value: UInt16; { 0..65535 }
+ end;
+
+ CMLabColorPtr = ^CMLabColor;
+ CMLabColor = record
+ L: UInt16; { 0..65535 maps to 0..100 }
+ a: UInt16; { 0..65535 maps to -128..127.996 }
+ b: UInt16; { 0..65535 maps to -128..127.996 }
+ end;
+
+ CMLuvColorPtr = ^CMLuvColor;
+ CMLuvColor = record
+ L: UInt16; { 0..65535 maps to 0..100 }
+ u: UInt16; { 0..65535 maps to -128..127.996 }
+ v: UInt16; { 0..65535 maps to -128..127.996 }
+ end;
+
+ CMYxyColorPtr = ^CMYxyColor;
+ CMYxyColor = record
+ capY: UInt16; { 0..65535 maps to 0..1 }
+ x: UInt16; { 0..65535 maps to 0..1 }
+ y: UInt16; { 0..65535 maps to 0..1 }
+ end;
+
+ CMGrayColorPtr = ^CMGrayColor;
+ CMGrayColor = record
+ gray: UInt16; { 0..65535 }
+ end;
+
+ CMMultichannel5ColorPtr = ^CMMultichannel5Color;
+ CMMultichannel5Color = record
+ components: packed array [0..4] of UInt8; { 0..255 }
+ pad: UInt8; {pad byte so record size equals Apple gcc struct size}
+ end;
+
+ CMMultichannel6ColorPtr = ^CMMultichannel6Color;
+ CMMultichannel6Color = record
+ components: packed array [0..5] of UInt8; { 0..255 }
+ end;
+
+ CMMultichannel7ColorPtr = ^CMMultichannel7Color;
+ CMMultichannel7Color = record
+ components: packed array [0..6] of UInt8; { 0..255 }
+ pad: UInt8; {pad byte so record size equals Apple gcc struct size}
+ end;
+
+ CMMultichannel8ColorPtr = ^CMMultichannel8Color;
+ CMMultichannel8Color = record
+ components: packed array [0..7] of UInt8; { 0..255 }
+ end;
+
+ CMNamedColorPtr = ^CMNamedColor;
+ CMNamedColor = record
+ namedColorIndex: UInt32; { 0..a lot }
+ end;
+
+ CMColorPtr = ^CMColor;
+ CMColor = record
+ case SInt16 of
+ 0: (
+ rgb: CMRGBColor;
+ );
+ 1: (
+ hsv: CMHSVColor;
+ );
+ 2: (
+ hls: CMHLSColor;
+ );
+ 3: (
+ XYZ: CMXYZColor;
+ );
+ 4: (
+ Lab: CMLabColor;
+ );
+ 5: (
+ Luv: CMLuvColor;
+ );
+ 6: (
+ Yxy: CMYxyColor;
+ );
+ 7: (
+ cmyk: CMCMYKColor;
+ );
+ 8: (
+ cmy: CMCMYColor;
+ );
+ 9: (
+ gray: CMGrayColor;
+ );
+ 10: (
+ mc5: CMMultichannel5Color;
+ );
+ 11: (
+ mc6: CMMultichannel6Color;
+ );
+ 12: (
+ mc7: CMMultichannel7Color;
+ );
+ 13: (
+ mc8: CMMultichannel8Color;
+ );
+ 14: (
+ namedColor: CMNamedColor;
+ );
+ end;
+
+ { GetIndexedProfile() search definition }
+ CMProfileSearchRecordPtr = ^CMProfileSearchRecord;
+ CMProfileSearchRecord = record
+ header: CMHeader;
+ fieldMask: UInt32;
+ reserved: array [0..1] of UInt32;
+ end;
+
+ CMProfileSearchRecordHandle = ^CMProfileSearchRecordPtr;
+ { CMNewProfileSearch() search definition }
+ CMSearchRecordPtr = ^CMSearchRecord;
+ CMSearchRecord = record
+ CMMType: OSType;
+ profileClass: OSType;
+ dataColorSpace: OSType;
+ profileConnectionSpace: OSType;
+ deviceManufacturer: UInt32;
+ deviceModel: UInt32;
+ deviceAttributes: array [0..1] of UInt32;
+ profileFlags: UInt32;
+ searchMask: UInt32;
+ filter: CMProfileFilterUPP;
+ end;
+
+ { CMMIterateUPP() structure }
+ CMMInfoPtr = ^CMMInfo;
+ CMMInfo = record
+ dataSize: UInt32; { Size of this structure - compatibility }
+ CMMType: OSType; { Signature, e.g. 'appl', 'HDM ' or 'KCMS' }
+ CMMMfr: OSType; { Vendor, e.g. 'appl' }
+ CMMVersion: UInt32; { CMM version number }
+ ASCIIName: packed array [0..31] of UInt8; { pascal string - name }
+ ASCIIDesc: packed array [0..255] of UInt8; { pascal string - description or copyright }
+ UniCodeNameCount: UniCharCount; { count of UniChars in following array }
+ UniCodeName: array [0..31] of UniChar; { the name in UniCode chars }
+ UniCodeDescCount: UniCharCount; { count of UniChars in following array }
+ UniCodeDesc: array [0..255] of UniChar; { the description in UniCode chars }
+ end;
+
+ { GetCWInfo() structures }
+ CMMInfoRecordPtr = ^CMMInfoRecord;
+ CMMInfoRecord = record
+ CMMType: OSType;
+ CMMVersion: SInt32;
+ end;
+
+ CMCWInfoRecordPtr = ^CMCWInfoRecord;
+ CMCWInfoRecord = record
+ cmmCount: UInt32;
+ cmmInfo: array [0..1] of CMMInfoRecord;
+ end;
+
+ { profile identifier structures }
+ CMProfileIdentifierPtr = ^CMProfileIdentifier;
+ CMProfileIdentifier = record
+ profileHeader: CM2Header;
+ calibrationDate: CMDateTime;
+ ASCIIProfileDescriptionLen: UInt32;
+ ASCIIProfileDescription: SInt8; { variable length }
+ end;
+
+ { colorspace masks }
+
+const
+ cmColorSpaceSpaceMask = $0000003F;
+ cmColorSpacePremulAlphaMask = $00000040;
+ cmColorSpaceAlphaMask = $00000080;
+ cmColorSpaceSpaceAndAlphaMask = $000000FF;
+ cmColorSpacePackingMask = $0000FF00;
+ cmColorSpaceEncodingMask = $000F0000;
+ cmColorSpaceReservedMask = $FFF00000;
+
+ { packing formats }
+ cmNoColorPacking = $0000;
+ cmWord5ColorPacking = $0500;
+ cmWord565ColorPacking = $0600;
+ cmLong8ColorPacking = $0800;
+ cmLong10ColorPacking = $0A00;
+ cmAlphaFirstPacking = $1000;
+ cmOneBitDirectPacking = $0B00;
+ cmAlphaLastPacking = $0000;
+ cm8_8ColorPacking = $2800;
+ cm16_8ColorPacking = $2000;
+ cm24_8ColorPacking = $2100;
+ cm32_8ColorPacking = $0800;
+ cm40_8ColorPacking = $2200;
+ cm48_8ColorPacking = $2300;
+ cm56_8ColorPacking = $2400;
+ cm64_8ColorPacking = $2500;
+ cm32_16ColorPacking = $2600;
+ cm48_16ColorPacking = $2900;
+ cm64_16ColorPacking = $2A00;
+ cm32_32ColorPacking = $2700;
+ cmLittleEndianPacking = $4000;
+ cmReverseChannelPacking = $8000;
+
+ { channel encoding format }
+ cmSRGB16ChannelEncoding = $00010000; { used for sRGB64 encoding ( ±3.12 format) }
+
+ { general colorspaces }
+ cmNoSpace = $0000;
+ cmRGBSpace = $0001;
+ cmCMYKSpace = $0002;
+ cmHSVSpace = $0003;
+ cmHLSSpace = $0004;
+ cmYXYSpace = $0005;
+ cmXYZSpace = $0006;
+ cmLUVSpace = $0007;
+ cmLABSpace = $0008;
+ cmReservedSpace1 = $0009;
+ cmGraySpace = $000A;
+ cmReservedSpace2 = $000B;
+ cmGamutResultSpace = $000C;
+ cmNamedIndexedSpace = $0010;
+ cmMCFiveSpace = $0011;
+ cmMCSixSpace = $0012;
+ cmMCSevenSpace = $0013;
+ cmMCEightSpace = $0014;
+ cmAlphaPmulSpace = $0040;
+ cmAlphaSpace = $0080;
+ cmRGBASpace = $0081;
+ cmGrayASpace = $008A;
+ cmRGBAPmulSpace = $00C1;
+ cmGrayAPmulSpace = $00CA;
+
+ { supported CMBitmapColorSpaces - Each of the following is a }
+ { combination of a general colospace and a packing formats. }
+ { Each can also be or'd with cmReverseChannelPacking. }
+ cmGray8Space = $280A;
+ cmGray16Space = $000A;
+ cmGray16LSpace = $400A;
+ cmGrayA16Space = $208A;
+ cmGrayA32Space = $008A;
+ cmGrayA32LSpace = $408A;
+ cmGrayA16PmulSpace = $20CA;
+ cmGrayA32PmulSpace = $00CA;
+ cmGrayA32LPmulSpace = $40CA;
+ cmRGB16Space = $0501;
+ cmRGB16LSpace = $4501;
+ cmRGB565Space = $0601;
+ cmRGB565LSpace = $4601;
+ cmRGB24Space = $2101;
+ cmRGB32Space = $0801;
+ cmRGB48Space = $2901;
+ cmRGB48LSpace = $6901;
+ cmARGB32Space = $1881;
+ cmARGB64Space = $3A81;
+ cmARGB64LSpace = $7A81;
+ cmRGBA32Space = $0881;
+ cmRGBA64Space = $2A81;
+ cmRGBA64LSpace = $6A81;
+ cmARGB32PmulSpace = $18C1;
+ cmARGB64PmulSpace = $3AC1;
+ cmARGB64LPmulSpace = $7AC1;
+ cmRGBA32PmulSpace = $08C1;
+ cmRGBA64PmulSpace = $2AC1;
+ cmRGBA64LPmulSpace = $6AC1;
+ cmCMYK32Space = $0802;
+ cmCMYK64Space = $2A02;
+ cmCMYK64LSpace = $6A02;
+ cmHSV32Space = $0A03;
+ cmHLS32Space = $0A04;
+ cmYXY32Space = $0A05;
+ cmXYZ24Space = $2106;
+ cmXYZ32Space = $0A06;
+ cmXYZ48Space = $2906;
+ cmXYZ48LSpace = $6906;
+ cmLUV32Space = $0A07;
+ cmLAB24Space = $2108;
+ cmLAB32Space = $0A08;
+ cmLAB48Space = $2908;
+ cmLAB48LSpace = $6908;
+ cmGamutResult1Space = $0B0C;
+ cmNamedIndexed32Space = $2710;
+ cmNamedIndexed32LSpace = $6710;
+ cmMCFive8Space = $2211;
+ cmMCSix8Space = $2312;
+ cmMCSeven8Space = $2413;
+ cmMCEight8Space = $2514;
+
+
+type
+ CMBitmapColorSpace = UInt32;
+ CMBitmapPtr = ^CMBitmap;
+ CMBitmap = record
+ image: CStringPtr;
+ width: SInt32;
+ height: SInt32;
+ rowBytes: SInt32;
+ pixelSize: SInt32;
+ space: CMBitmapColorSpace;
+ user1: SInt32;
+ user2: SInt32;
+ end;
+
+const
+ { Profile Locations }
+ CS_MAX_PATH = 256;
+
+ cmNoProfileBase = 0;
+ cmFileBasedProfile = 1;
+ cmHandleBasedProfile = 2;
+ cmPtrBasedProfile = 3;
+ cmProcedureBasedProfile = 4;
+ cmPathBasedProfile = 5;
+ cmBufferBasedProfile = 6;
+
+
+type
+ CMFileLocationPtr = ^CMFileLocation;
+ CMFileLocation = record
+ spec: FSSpec;
+ end;
+
+ CMHandleLocationPtr = ^CMHandleLocation;
+ CMHandleLocation = record
+ h: Handle;
+ end;
+
+ CMPtrLocationPtr = ^CMPtrLocation;
+ CMPtrLocation = record
+ p: Ptr;
+ end;
+
+ CMProcedureLocationPtr = ^CMProcedureLocation;
+ CMProcedureLocation = record
+ proc: CMProfileAccessUPP;
+ refCon: Ptr;
+ end;
+
+ CMPathLocationPtr = ^CMPathLocation;
+ CMPathLocation = record
+ path: packed array [0..255] of char;
+ end;
+
+ CMBufferLocationPtr = ^CMBufferLocation;
+ CMBufferLocation = record
+ buffer: Ptr;
+ size: UInt32;
+ end;
+
+ CMProfLocPtr = ^CMProfLoc;
+ CMProfLoc = record
+ case SInt16 of
+ 0: (
+ fileLoc: CMFileLocation;
+ );
+ 1: (
+ handleLoc: CMHandleLocation;
+ );
+ 2: (
+ ptrLoc: CMPtrLocation;
+ );
+ 3: (
+ procLoc: CMProcedureLocation;
+ );
+ 4: (
+ pathLoc: CMPathLocation;
+ );
+ 5: (
+ bufferLoc: CMBufferLocation;
+ );
+ end;
+
+ CMProfileLocationPtr = ^CMProfileLocation;
+ CMProfileLocation = record
+ locType: SInt16;
+ u: CMProfLoc;
+ end;
+
+{$ifc TARGET_OS_MAC}
+
+const
+ cmOriginalProfileLocationSize = 72;
+ cmCurrentProfileLocationSize = 258;
+
+{$elsec}
+
+const
+ cmOriginalProfileLocationSize = 258;
+ cmCurrentProfileLocationSize = 258;
+
+{$endc} {TARGET_OS_MAC}
+
+ { Struct and enums used for Profile iteration }
+
+const
+ cmProfileIterateDataVersion1 = $00010000;
+ cmProfileIterateDataVersion2 = $00020000; { Added makeAndModel }
+ cmProfileIterateDataVersion3 = $00030000; { Added MD5 digest }
+
+
+type
+ CMProfileIterateDataPtr = ^CMProfileIterateData;
+ CMProfileIterateData = record
+ dataVersion: UInt32; { cmProfileIterateDataVersion2 }
+ header: CM2Header;
+ code: ScriptCode;
+ name: Str255;
+ location: CMProfileLocation;
+ uniCodeNameCount: UniCharCount;
+ uniCodeName: UniCharPtr;
+ asciiName: Ptr;
+ makeAndModel: CMMakeAndModelPtr;
+ digest: CMProfileMD5Ptr;
+ end;
+
+ { Caller-supplied callback function for Profile & CMM iteration }
+{$ifc TYPED_FUNCTION_POINTERS}
+ CMProfileIterateProcPtr = function(var iterateData: CMProfileIterateData; refCon: UnivPtr): OSErr;
+{$elsec}
+ CMProfileIterateProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ CMMIterateProcPtr = function(var iterateData: CMMInfo; refCon: UnivPtr): OSErr;
+{$elsec}
+ CMMIterateProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ CMProfileIterateUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CMProfileIterateUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ CMMIterateUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CMMIterateUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppCMProfileIterateProcInfo = $000003E0;
+ uppCMMIterateProcInfo = $000003E0;
+{
+ * NewCMProfileIterateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewCMProfileIterateUPP(userRoutine: CMProfileIterateProcPtr): CMProfileIterateUPP; external name '_NewCMProfileIterateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewCMMIterateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewCMMIterateUPP(userRoutine: CMMIterateProcPtr): CMMIterateUPP; external name '_NewCMMIterateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeCMProfileIterateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeCMProfileIterateUPP(userUPP: CMProfileIterateUPP); external name '_DisposeCMProfileIterateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeCMMIterateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeCMMIterateUPP(userUPP: CMMIterateUPP); external name '_DisposeCMMIterateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeCMProfileIterateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeCMProfileIterateUPP(var iterateData: CMProfileIterateData; refCon: UnivPtr; userRoutine: CMProfileIterateUPP): OSErr; external name '_InvokeCMProfileIterateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeCMMIterateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeCMMIterateUPP(var iterateData: CMMInfo; refCon: UnivPtr; userRoutine: CMMIterateUPP): OSErr; external name '_InvokeCMMIterateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ CMLabToLabProcPtr isn't used in any official Apple headers and no documentation exists on it. }
+//type
+// CMLabToLabProcPtr = procedure( var L: Float32; var a: Float32; var b: Float32; refcon: UnivPtr );
+
+{ Creating Profiles }
+{ Profile file and element access }
+{
+ * CMNewProfile()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMNewProfile(var prof: CMProfileRef; const (*var*) theProfile: CMProfileLocation): CMError; external name '_CMNewProfile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CWNewLinkProfile()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CWNewLinkProfile( var prof: CMProfileRef; const (*var*) targetLocation: CMProfileLocation; var profileSet: CMConcatProfileSet ): CMError; external name '_CWNewLinkProfile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NCWNewLinkProfile()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.6 and later
+ }
+function NCWNewLinkProfile( var prof: CMProfileRef; const (*var*) targetLocation: CMProfileLocation; var profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UnivPtr ): CMError; external name '_NCWNewLinkProfile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMMakeProfile()
+ *
+ * Summary:
+ * Make a display or abstract profile.
+ *
+ * Discussion:
+ * Adds appropriate tags to a profile to make display or abstract
+ * profile based on an specification dictionary.
+ *
+ * One key in the specification dictionary must be "profileType"
+ * which must have a CFString value of "abstractLab", "displayRGB"
+ * or "displayID". It can also contain the keys/values:
+ * "description" CFString (optional)
+ * "copyright" CFString (optional)
+ *
+ * For profileType of "abstractLab", the dictionary
+ * should also contain the keys/values:
+ * "gridPoints" CFNumber(SInt32) (should be odd)
+ * "proc" CFNumber(SInt64)
+ * (coerced from a LabToLabProcPtr)
+ * "refcon" CFNumber(SInt64) (optional)
+ * (coerced from a void*)
+ *
+ * For profileType of "displayRGB", the dictionary
+ * should also contain the keys/values:
+ * "targetGamma" CFNumber(Float) (e.g. 1.8) (optional)
+ * "targetWhite" CFNumber(SInt32) (e.g. 6500) (optional)
+ * "gammaR" CFNumber(Float) (e.g. 2.5)
+ * "gammaG" CFNumber(Float) (e.g. 2.5)
+ * "gammaB" CFNumber(Float) (e.g. 2.5)
+ * "tableChans" CFNumber(SInt32) (1 or 3) (optional)
+ * "tableEntries" CFNumber(SInt32) (e.g 16 or 255) (optional)
+ * "tableEntrySize" CFNumber(SInt32) (1 or 2) (optional)
+ * "tableData" CFData (lut in RRRGGGBBB order) (optional)
+ * either
+ * "phosphorRx" CFNumber(Float)
+ * "phosphorRy" CFNumber(Float)
+ * "phosphorGx" CFNumber(Float)
+ * "phosphorGy" CFNumber(Float)
+ * "phosphorBx" CFNumber(Float)
+ * "phosphorBy" CFNumber(Float)
+ * or
+ * "phosphorSet" CFString ("WideRGB", "700/525/450nm",
+ * "P22-EBU", "HDTV", "CCIR709", "sRGB",
+ * "AdobeRGB98" or "Trinitron")
+ * either
+ * "whitePointx" CFNumber(Float)
+ * "whitePointy" CFNumber(Float)
+ * or
+ * "whiteTemp" CFNumber(SInt32) (e.g. 5000, 6500, 9300)
+ *
+ * For profileType of "displayID", the dictionary
+ * should also contain the keys/values:
+ * "targetGamma" CFNumber(Float) (e.g. 1.8) (optional)
+ * "targetWhite" CFNumber(SInt32) (e.g. 6500) (optional)
+ * "displayID CFNumber(SInt32)
+ * Optionally, the keys/values for "displayRGB" can be
+ * provided to override the valuses from the display.
+ *
+ * Parameters:
+ *
+ * prof:
+ * (in) the profile to modify
+ *
+ * spec:
+ * (in) specification dictionary
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function CMMakeProfile( prof: CMProfileRef; spec: CFDictionaryRef ): CMError; external name '_CMMakeProfile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Accessing Profiles }
+{
+ * CMOpenProfile()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMOpenProfile(var prof: CMProfileRef; const (*var*) theProfile: CMProfileLocation): CMError; external name '_CMOpenProfile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMCloseProfile()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMCloseProfile(prof: CMProfileRef): CMError; external name '_CMCloseProfile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMUpdateProfile()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMUpdateProfile(prof: CMProfileRef): CMError; external name '_CMUpdateProfile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMCopyProfile()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMCopyProfile(var targetProf: CMProfileRef; const (*var*) targetLocation: CMProfileLocation; srcProf: CMProfileRef): CMError; external name '_CMCopyProfile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMValidateProfile()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMValidateProfile(prof: CMProfileRef; var valid: boolean; var preferredCMMnotfound: boolean): CMError; external name '_CMValidateProfile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetProfileLocation()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMGetProfileLocation(prof: CMProfileRef; var theProfile: CMProfileLocation): CMError; external name '_CMGetProfileLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NCMGetProfileLocation()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.5 and later
+ }
+function NCMGetProfileLocation(prof: CMProfileRef; var theProfile: CMProfileLocation; var locationSize: UInt32): CMError; external name '_NCMGetProfileLocation';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMProfileCopyICCData()
+ *
+ * Summary:
+ * Return a copy of the icc data specified by `prof'.
+ *
+ * Parameters:
+ *
+ * allocator:
+ * (in) The object to be used to allocate memory for the data
+ *
+ * prof:
+ * (in) The profile to query
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function CMProfileCopyICCData( allocator: CFAllocatorRef; prof: CMProfileRef ): CFDataRef; external name '_CMProfileCopyICCData';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+{
+ * CMFlattenProfile()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMFlattenProfile(prof: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UnivPtr; var preferredCMMnotfound: boolean): CMError; external name '_CMFlattenProfile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NCMUnflattenProfile()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.6 and later
+ }
+function NCMUnflattenProfile( var targetLocation: CMProfileLocation; proc: CMFlattenUPP; refCon: UnivPtr; var preferredCMMnotfound: Boolean ): CMError; external name '_NCMUnflattenProfile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{$ifc TARGET_OS_MAC}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * CMUnflattenProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMUnflattenProfile(var resultFileSpec: FSSpec; proc: CMFlattenUPP; refCon: UnivPtr; var preferredCMMnotfound: boolean): CMError; external name '_CMUnflattenProfile';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {TARGET_OS_MAC}
+
+{
+ * CMGetProfileHeader()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMGetProfileHeader(prof: CMProfileRef; var header: CMAppleProfileHeader): CMError; external name '_CMGetProfileHeader';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMSetProfileHeader()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMSetProfileHeader(prof: CMProfileRef; const (*var*) header: CMAppleProfileHeader): CMError; external name '_CMSetProfileHeader';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMCloneProfileRef()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMCloneProfileRef( prof: CMProfileRef ): CMError; external name '_CMCloneProfileRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetProfileRefCount()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMGetProfileRefCount( prof: CMProfileRef; var count: SInt32 ): CMError; external name '_CMGetProfileRefCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMProfileModified()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMProfileModified( prof: CMProfileRef; var modified: Boolean ): CMError; external name '_CMProfileModified';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetProfileMD5()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function CMGetProfileMD5( prof: CMProfileRef; digest: CMProfileMD5 ): CMError; external name '_CMGetProfileMD5';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{ Accessing Profile Elements }
+{
+ * CMCountProfileElements()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMCountProfileElements( prof: CMProfileRef; var elementCount: UInt32 ): CMError; external name '_CMCountProfileElements';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMProfileElementExists()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMProfileElementExists(prof: CMProfileRef; tag: OSType; var found: boolean): CMError; external name '_CMProfileElementExists';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetProfileElement()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMGetProfileElement(prof: CMProfileRef; tag: OSType; var elementSize: UInt32; elementData: UnivPtr): CMError; external name '_CMGetProfileElement';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMSetProfileElement()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMSetProfileElement(prof: CMProfileRef; tag: OSType; elementSize: UInt32; elementData: UnivPtr): CMError; external name '_CMSetProfileElement';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMSetProfileElementSize()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMSetProfileElementSize(prof: CMProfileRef; tag: OSType; elementSize: UInt32): CMError; external name '_CMSetProfileElementSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMSetProfileElementReference()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMSetProfileElementReference(prof: CMProfileRef; elementTag: OSType; referenceTag: OSType): CMError; external name '_CMSetProfileElementReference';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetPartialProfileElement()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMGetPartialProfileElement(prof: CMProfileRef; tag: OSType; offset: UInt32; var byteCount: UInt32; elementData: UnivPtr): CMError; external name '_CMGetPartialProfileElement';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMSetPartialProfileElement()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMSetPartialProfileElement(prof: CMProfileRef; tag: OSType; offset: UInt32; byteCount: UInt32; elementData: {const} UnivPtr): CMError; external name '_CMSetPartialProfileElement';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetIndProfileElementInfo()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMGetIndProfileElementInfo(prof: CMProfileRef; index: UInt32; var tag: OSType; var elementSize: UInt32; var refs: boolean): CMError; external name '_CMGetIndProfileElementInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetIndProfileElement()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMGetIndProfileElement(prof: CMProfileRef; index: UInt32; var elementSize: UInt32; elementData: UnivPtr): CMError; external name '_CMGetIndProfileElement';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMRemoveProfileElement()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMRemoveProfileElement(prof: CMProfileRef; tag: OSType): CMError; external name '_CMRemoveProfileElement';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ Accessing Profile Descriptions }
+{
+ * CMGetScriptProfileDescription()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMGetScriptProfileDescription(prof: CMProfileRef; var name: Str255; var code: ScriptCode): CMError; external name '_CMGetScriptProfileDescription';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetProfileDescriptions()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.6 and later
+ }
+function CMGetProfileDescriptions(prof: CMProfileRef; aName: CStringPtr; var aCount: UInt32; var mName: Str255; var mCode: ScriptCode; var uName: UniChar; var uCount: UniCharCount): CMError; external name '_CMGetProfileDescriptions';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMSetProfileDescriptions()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.6 and later
+ }
+function CMSetProfileDescriptions(prof: CMProfileRef; aName: ConstCStringPtr; aCount: UInt32; const (*var*) mName: Str255; mCode: ScriptCode; uName: ConstUniCharPtr; uCount: UniCharCount): CMError; external name '_CMSetProfileDescriptions';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMCopyProfileLocalizedStringDictionary()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: in ColorSyncLib 3.1 and later
+ }
+function CMCopyProfileLocalizedStringDictionary(prof: CMProfileRef; tag: OSType; var theDict: CFDictionaryRef): CMError; external name '_CMCopyProfileLocalizedStringDictionary';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * CMSetProfileLocalizedStringDictionary()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: in ColorSyncLib 3.1 and later
+ }
+function CMSetProfileLocalizedStringDictionary(prof: CMProfileRef; tag: OSType; theDict: CFDictionaryRef): CMError; external name '_CMSetProfileLocalizedStringDictionary';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * CMCopyProfileLocalizedString()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: in ColorSyncLib 3.1 and later
+ }
+function CMCopyProfileLocalizedString(prof: CMProfileRef; tag: OSType; reqLocale: CFStringRef; var locale: CFStringRef; var str: CFStringRef): CMError; external name '_CMCopyProfileLocalizedString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * CMCopyProfileDescriptionString()
+ *
+ * Summary:
+ * Returns the name of a profile as a CFString.
+ *
+ * Discussion:
+ * If the profile is multi-localized, the best localized name for
+ * the current process is returned.
+ *
+ * Parameters:
+ *
+ * prof:
+ * (in) the profile to query
+ *
+ * str:
+ * (out) returns the name
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function CMCopyProfileDescriptionString( prof: CMProfileRef; var str: CFStringRef ): CMError; external name '_CMCopyProfileDescriptionString';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+
+{ Accessing Name-Class Profiles }
+{
+ * CMGetNamedColorInfo()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMGetNamedColorInfo(prof: CMProfileRef; var deviceChannels: UInt32; var deviceColorSpace: OSType; var PCSColorSpace: OSType; var count: UInt32; prefix: StringPtr; suffix: StringPtr): CMError; external name '_CMGetNamedColorInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetNamedColorValue()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMGetNamedColorValue(prof: CMProfileRef; name: StringPtr; var deviceColor: CMColor; var PCSColor: CMColor): CMError; external name '_CMGetNamedColorValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetIndNamedColorValue()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMGetIndNamedColorValue(prof: CMProfileRef; index: UInt32; var deviceColor: CMColor; var PCSColor: CMColor): CMError; external name '_CMGetIndNamedColorValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetNamedColorIndex()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMGetNamedColorIndex(prof: CMProfileRef; name: StringPtr; var index: UInt32): CMError; external name '_CMGetNamedColorIndex';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetNamedColorName()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMGetNamedColorName(prof: CMProfileRef; index: UInt32; name: StringPtr): CMError; external name '_CMGetNamedColorName';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ General-purpose matching functions }
+{ Working with ColorWorlds }
+{
+ * NCWNewColorWorld()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function NCWNewColorWorld(var cw: CMWorldRef; src: CMProfileRef; dst: CMProfileRef): CMError; external name '_NCWNewColorWorld';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CWConcatColorWorld()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CWConcatColorWorld(var cw: CMWorldRef; var profileSet: CMConcatProfileSet): CMError; external name '_CWConcatColorWorld';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NCWConcatColorWorld()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.6 and later
+ }
+function NCWConcatColorWorld(var cw: CMWorldRef; var profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UnivPtr): CMError; external name '_NCWConcatColorWorld';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetCWInfo()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ }
+function CMGetCWInfo( cw: CMWorldRef; var info: CMCWInfoRecord ): CMError; external name '_CMGetCWInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CWDisposeColorWorld()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ }
+procedure CWDisposeColorWorld(cw: CMWorldRef); external name '_CWDisposeColorWorld';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CWMatchColors()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ }
+function CWMatchColors(cw: CMWorldRef; var myColors: CMColor; count: UInt32): CMError; external name '_CWMatchColors';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CWCheckColors()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ }
+function CWCheckColors(cw: CMWorldRef; var myColors: CMColor; count: UInt32; var result: SInt8): CMError; external name '_CWCheckColors';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CWMatchBitmap()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CWMatchBitmap(cw: CMWorldRef; var bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr; var matchedBitmap: CMBitmap): CMError; external name '_CWMatchBitmap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CWCheckBitmap()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CWCheckBitmap(cw: CMWorldRef; const (*var*) bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr; var resultBitmap: CMBitmap): CMError; external name '_CWCheckBitmap';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ OpenGL support }
+const
+ cmTextureRGBtoRGBX8 = 0; { RGB to 8-bit RGBx texture}
+
+{
+ * CWFillLookupTexture()
+ *
+ * Summary:
+ * Fills a 3d lookup texture from a colorworld.
+ *
+ * Discussion:
+ * The resulting table is suitable for use in OpenGL to accelerate
+ * color management in hardware.
+ *
+ * Parameters:
+ *
+ * cw:
+ * (in) the colorworld to use
+ *
+ * gridPoints:
+ * (in) number of grid points per channel in the texture
+ *
+ * format:
+ * (in) format of pixels in texture (e.g. cmTextureRGBtoRGBX8)
+ *
+ * dataSize:
+ * (in) size in bytes of texture data to fill
+ *
+ * data:
+ * (in/out) pointer to texture data to fill
+ *
+ * Availability:
+ * Mac OS X: in version 10.3 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function CWFillLookupTexture( cw: CMWorldRef; gridPoints: UInt32; format: UInt32; dataSize: UInt32; data: UnivPtr ): CMError; external name '_CWFillLookupTexture';
+(* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
+
+{ Quickdraw-specific matching }
+{ Mac OS X active declarations are in QuickDraw.p[.pas] }
+
+{$ifc TARGET_OS_MAC AND _DECLARE_CS_QD_API_}
+
+{
+ * CWMatchPixMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function CWMatchPixMap(cw: CMWorldRef; var myPixMap: PixMap; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr): CMError; external name '_CWMatchPixMap';
+{
+ * CWCheckPixMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function CWCheckPixMap(cw: CMWorldRef; var myPixMap: PixMap; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr; var resultBitMap: BitMap): CMError; external name '_CWCheckPixMap';
+{
+ * NCMBeginMatching()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function NCMBeginMatching(src: CMProfileRef; dst: CMProfileRef; var myRef: CMMatchRef): CMError; external name '_NCMBeginMatching';
+{
+ * CMEndMatching()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure CMEndMatching(myRef: CMMatchRef); external name '_CMEndMatching';
+{
+ * NCMDrawMatchedPicture()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure NCMDrawMatchedPicture(myPicture: PicHandle; dst: CMProfileRef; var myRect: Rect); external name '_NCMDrawMatchedPicture';
+{
+ * CMEnableMatchingComment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure CMEnableMatchingComment(enableIt: boolean); external name '_CMEnableMatchingComment';
+{
+ * NCMUseProfileComment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function NCMUseProfileComment(prof: CMProfileRef; flags: UInt32): CMError; external name '_NCMUseProfileComment';
+{$endc}
+
+{$ifc TARGET_OS_WIN32}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * CWMatchHBITMAP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CWMatchHBITMAP(cw: CMWorldRef; hBitmap_: HBITMAP; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr): CMError; external name '_CWMatchHBITMAP';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {TARGET_OS_WIN32}
+
+{ Accessing Special Profiles }
+{ System Profile access }
+{
+ * CMGetSystemProfile()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMGetSystemProfile(var prof: CMProfileRef): CMError; external name '_CMGetSystemProfile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMSetSystemProfile()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMSetSystemProfile(const (*var*) profileFileSpec: FSSpec): CMError; external name '_CMSetSystemProfile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NCMSetSystemProfile()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.6 and later
+ }
+function NCMSetSystemProfile(const (*var*) profLoc: CMProfileLocation): CMError; external name '_NCMSetSystemProfile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetDefaultProfileBySpace()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.5 and later
+ }
+function CMGetDefaultProfileBySpace(dataColorSpace: OSType; var prof: CMProfileRef): CMError; external name '_CMGetDefaultProfileBySpace';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMSetDefaultProfileBySpace()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.5 and later
+ }
+function CMSetDefaultProfileBySpace(dataColorSpace: OSType; prof: CMProfileRef): CMError; external name '_CMSetDefaultProfileBySpace';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ Profile access by Use }
+{
+ * CMGetDefaultProfileByUse()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 3.0 and later
+ }
+function CMGetDefaultProfileByUse(use: OSType; var prof: CMProfileRef): CMError; external name '_CMGetDefaultProfileByUse';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMSetDefaultProfileByUse()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 3.0 and later
+ }
+function CMSetDefaultProfileByUse(use: OSType; prof: CMProfileRef): CMError; external name '_CMSetDefaultProfileByUse';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetProfileByAVID()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.5 and later
+ }
+function CMGetProfileByAVID(theID: CMDisplayIDType; var prof: CMProfileRef): CMError; external name '_CMGetProfileByAVID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMSetProfileByAVID()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.5 and later
+ }
+function CMSetProfileByAVID(theID: CMDisplayIDType; prof: CMProfileRef): CMError; external name '_CMSetProfileByAVID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetGammaByAVID()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 3.0 and later
+ }
+function CMGetGammaByAVID(theID: CMDisplayIDType; var gamma: CMVideoCardGamma; var size: UInt32): CMError; external name '_CMGetGammaByAVID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMSetGammaByAVID()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 3.0 and later
+ }
+function CMSetGammaByAVID(theID: CMDisplayIDType; var gamma: CMVideoCardGamma): CMError; external name '_CMSetGammaByAVID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Profile Management }
+{ Searching for Profiles }
+{
+ * CMIterateColorSyncFolder()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.5 and later
+ }
+function CMIterateColorSyncFolder(proc: CMProfileIterateUPP; var seed: UInt32; var count: UInt32; refCon: UnivPtr): CMError; external name '_CMIterateColorSyncFolder';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetColorSyncFolderSpec()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMGetColorSyncFolderSpec(vRefNum: SInt16; createFolder: boolean; var foundVRefNum: SInt16; var foundDirID: SInt32): CMError; external name '_CMGetColorSyncFolderSpec';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMNewProfileSearch()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMNewProfileSearch(var searchSpec: CMSearchRecord; refCon: UnivPtr; var count: UInt32; var searchResult: CMProfileSearchRef): CMError; external name '_CMNewProfileSearch';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMUpdateProfileSearch()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMUpdateProfileSearch(search: CMProfileSearchRef; refCon: UnivPtr; var count: UInt32): CMError; external name '_CMUpdateProfileSearch';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMDisposeProfileSearch()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+procedure CMDisposeProfileSearch(search: CMProfileSearchRef); external name '_CMDisposeProfileSearch';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMSearchGetIndProfile()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMSearchGetIndProfile(search: CMProfileSearchRef; index: UInt32; var prof: CMProfileRef): CMError; external name '_CMSearchGetIndProfile';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMSearchGetIndProfileFileSpec()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMSearchGetIndProfileFileSpec(search: CMProfileSearchRef; index: UInt32; var profileFile: FSSpec): CMError; external name '_CMSearchGetIndProfileFileSpec';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMCreateProfileIdentifier()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMCreateProfileIdentifier(prof: CMProfileRef; ident: CMProfileIdentifierPtr; var size: UInt32): CMError; external name '_CMCreateProfileIdentifier';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMProfileIdentifierFolderSearch()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMProfileIdentifierFolderSearch(ident: CMProfileIdentifierPtr; var matchedCount: UInt32; var searchResult: CMProfileSearchRef): CMError; external name '_CMProfileIdentifierFolderSearch';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMProfileIdentifierListSearch()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMProfileIdentifierListSearch(ident: CMProfileIdentifierPtr; var profileList: CMProfileRef; listSize: UInt32; var matchedCount: UInt32; var matchedList: CMProfileRef): CMError; external name '_CMProfileIdentifierListSearch';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{$ifc TARGET_API_MAC_OS8}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * CMConvertProfile2to1()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMConvertProfile2to1(profv2: CMProfileRef; var profv1: CMProfileHandle): CMError; external name '_CMConvertProfile2to1';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {TARGET_API_MAC_OS8}
+
+{ Utilities }
+{
+ * CMGetPreferredCMM()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.5 and later
+ }
+function CMGetPreferredCMM(var cmmType: OSType; var preferredCMMnotfound: boolean): CMError; external name '_CMGetPreferredCMM';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMIterateCMMInfo()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.6 and later
+ }
+function CMIterateCMMInfo(proc: CMMIterateUPP; var count: UInt32; refCon: UnivPtr): CMError; external name '_CMIterateCMMInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetColorSyncVersion()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.6 and later
+ }
+function CMGetColorSyncVersion(var version: UInt32): CMError; external name '_CMGetColorSyncVersion';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMLaunchControlPanel()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 3.0 and later
+ }
+function CMLaunchControlPanel(flags: UInt32): CMError; external name '_CMLaunchControlPanel';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ ColorSpace conversion functions }
+{ Converting Colors }
+{
+ * CMConvertXYZToLab()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMConvertXYZToLab(const (*var*) src: CMColor; const (*var*) white: CMXYZColor; var dst: CMColor; count: UInt32): CMError; external name '_CMConvertXYZToLab';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMConvertLabToXYZ()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMConvertLabToXYZ(const (*var*) src: CMColor; const (*var*) white: CMXYZColor; var dst: CMColor; count: UInt32): CMError; external name '_CMConvertLabToXYZ';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMConvertXYZToLuv()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMConvertXYZToLuv(const (*var*) src: CMColor; const (*var*) white: CMXYZColor; var dst: CMColor; count: UInt32): CMError; external name '_CMConvertXYZToLuv';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMConvertLuvToXYZ()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMConvertLuvToXYZ(const (*var*) src: CMColor; const (*var*) white: CMXYZColor; var dst: CMColor; count: UInt32): CMError; external name '_CMConvertLuvToXYZ';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMConvertXYZToYxy()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMConvertXYZToYxy(const (*var*) src: CMColor; var dst: CMColor; count: UInt32): CMError; external name '_CMConvertXYZToYxy';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMConvertYxyToXYZ()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMConvertYxyToXYZ(const (*var*) src: CMColor; var dst: CMColor; count: UInt32): CMError; external name '_CMConvertYxyToXYZ';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMConvertRGBToHLS()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMConvertRGBToHLS(const (*var*) src: CMColor; var dst: CMColor; count: UInt32): CMError; external name '_CMConvertRGBToHLS';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMConvertHLSToRGB()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMConvertHLSToRGB(const (*var*) src: CMColor; var dst: CMColor; count: UInt32): CMError; external name '_CMConvertHLSToRGB';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMConvertRGBToHSV()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMConvertRGBToHSV(const (*var*) src: CMColor; var dst: CMColor; count: UInt32): CMError; external name '_CMConvertRGBToHSV';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMConvertHSVToRGB()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMConvertHSVToRGB(const (*var*) src: CMColor; var dst: CMColor; count: UInt32): CMError; external name '_CMConvertHSVToRGB';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMConvertRGBToGray()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMConvertRGBToGray(const (*var*) src: CMColor; var dst: CMColor; count: UInt32): CMError; external name '_CMConvertRGBToGray';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMConvertXYZToFixedXYZ()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMConvertXYZToFixedXYZ(const (*var*) src: CMXYZColor; var dst: CMFixedXYZColor; count: UInt32): CMError; external name '_CMConvertXYZToFixedXYZ';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMConvertFixedXYZToXYZ()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.1 and later
+ }
+function CMConvertFixedXYZToXYZ(const (*var*) src: CMFixedXYZColor; var dst: CMXYZColor; count: UInt32): CMError; external name '_CMConvertFixedXYZToXYZ';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMConvertXYZToXYZ()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in ApplicationServices.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function CMConvertXYZToXYZ(const (*var*) src: CMColor; const (*var*) srcIlluminant: CMXYZColor; var dst: CMColor; const (*var*) dstIlluminant: CMXYZColor; method: CMChromaticAdaptation; count: UInt32): CMError; external name '_CMConvertXYZToXYZ';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+
+{ PS-related }
+{ Working with PostScript }
+{
+ * CMGetPS2ColorSpace()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMGetPS2ColorSpace(srcProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UnivPtr; var preferredCMMnotfound: boolean): CMError; external name '_CMGetPS2ColorSpace';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetPS2ColorRenderingIntent()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMGetPS2ColorRenderingIntent(srcProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UnivPtr; var preferredCMMnotfound: boolean): CMError; external name '_CMGetPS2ColorRenderingIntent';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetPS2ColorRendering()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMGetPS2ColorRendering(srcProf: CMProfileRef; dstProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UnivPtr; var preferredCMMnotfound: boolean): CMError; external name '_CMGetPS2ColorRendering';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * CMGetPS2ColorRenderingVMSize()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in ApplicationServices.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ }
+function CMGetPS2ColorRenderingVMSize(srcProf: CMProfileRef; dstProf: CMProfileRef; var vmSize: UInt32; var preferredCMMnotfound: boolean): CMError; external name '_CMGetPS2ColorRenderingVMSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ Notifications }
+
+{
+ * Clients can register for notifications of ColorSync preference changes by
+ * using the kCMPrefsChangedNotification key. This notification will be sent
+ * if the user changes ColorSync preferences such as:
+ * the default profile by colors space, (CMSetDefaultProfileBySpace)
+ * the default profile by device useage, (CMSetDefaultProfileByUse)
+ * or the preferred CMM.
+ * See <CMDeviceIntegration.h> for more notifications that can be sent.
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kCMPrefsChangedNotification CFSTRP('AppleColorSyncPreferencesChangedNotification')}
+{$endc}
+
+{ ColorSync 1.0 functions which have parallel 2.0 counterparts }
+{$ifc TARGET_API_MAC_OS8}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * CWNewColorWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CWNewColorWorld(var cw: CMWorldRef; src: CMProfileHandle; dst: CMProfileHandle): CMError; external name '_CWNewColorWorld';
+{
+ * ConcatenateProfiles()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function ConcatenateProfiles(thru: CMProfileHandle; dst: CMProfileHandle; var newDst: CMProfileHandle): CMError; external name '_ConcatenateProfiles';
+{
+ * CMBeginMatching()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMBeginMatching(src: CMProfileHandle; dst: CMProfileHandle; var myRef: CMMatchRef): CMError; external name '_CMBeginMatching';
+{
+ * CMDrawMatchedPicture()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure CMDrawMatchedPicture(myPicture: PicHandle; dst: CMProfileHandle; var myRect: Rect); external name '_CMDrawMatchedPicture';
+{
+ * CMUseProfileComment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMUseProfileComment(profile: CMProfileHandle): CMError; external name '_CMUseProfileComment';
+{
+ * CMGetProfileName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure CMGetProfileName(myProfile: CMProfileHandle; var IStringResult: CMIString); external name '_CMGetProfileName';
+{
+ * CMGetProfileAdditionalDataOffset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMGetProfileAdditionalDataOffset(myProfile: CMProfileHandle): SInt32; external name '_CMGetProfileAdditionalDataOffset';
+{ ProfileResponder definitions }
+{$endc} {CALL_NOT_IN_CARBON}
+
+const
+ cmSystemDevice = $73797320 (* 'sys ' *);
+ cmGDevice = $67646576 (* 'gdev' *);
+
+ { ProfileResponder functions }
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * GetProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetProfile(deviceType: OSType; refNum: SInt32; aProfile: CMProfileHandle; var returnedProfile: CMProfileHandle): CMError; external name '_GetProfile';
+{
+ * SetProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SetProfile(deviceType: OSType; refNum: SInt32; newProfile: CMProfileHandle): CMError; external name '_SetProfile';
+{
+ * SetProfileDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function SetProfileDescription(deviceType: OSType; refNum: SInt32; deviceData: SInt32; hProfile: CMProfileHandle): CMError; external name '_SetProfileDescription';
+{
+ * GetIndexedProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function GetIndexedProfile(deviceType: OSType; refNum: SInt32; search: CMProfileSearchRecordHandle; var returnProfile: CMProfileHandle; var index: SInt32): CMError; external name '_GetIndexedProfile';
+{
+ * DeleteDeviceProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DeleteDeviceProfile(deviceType: OSType; refNum: SInt32; deleteMe: CMProfileHandle): CMError; external name '_DeleteDeviceProfile';
+{$endc} {CALL_NOT_IN_CARBON}
+{$ifc OLDROUTINENAMES}
+{ old constants }
+
+type
+ CMFlattenProc = CMFlattenProcPtr;
+ CMBitmapCallBackProc = CMBitmapCallBackProcPtr;
+ CMProfileFilterProc = CMProfileFilterProcPtr;
+
+const
+ qdSystemDevice = $73797320 (* 'sys ' *);
+ qdGDevice = $67646576 (* 'gdev' *);
+
+
+ kMatchCMMType = $00000001;
+ kMatchApplProfileVersion = $00000002;
+ kMatchDataType = $00000004;
+ kMatchDeviceType = $00000008;
+ kMatchDeviceManufacturer = $00000010;
+ kMatchDeviceModel = $00000020;
+ kMatchDeviceAttributes = $00000040;
+ kMatchFlags = $00000080;
+ kMatchOptions = $00000100;
+ kMatchWhite = $00000200;
+ kMatchBlack = $00000400;
+
+ { old types }
+
+type
+ CMYKColor = CMCMYKColor;
+ CMYKColorPtr = ^CMYKColor;
+ CWorld = CMWorldRef;
+ CMGamutResult = ^SInt32;
+ { old functions }
+{$endc} {OLDROUTINENAMES}
+{ Deprecated stuff }
+{ PrGeneral parameter blocks }
+
+const
+ enableColorMatchingOp = 12;
+ registerProfileOp = 13;
+
+
+type
+ TEnableColorMatchingBlkPtr = ^TEnableColorMatchingBlk;
+ TEnableColorMatchingBlk = record
+ iOpCode: SInt16;
+ iError: SInt16;
+ lReserved: SInt32;
+ hPrint: THPrint;
+ fEnableIt: boolean;
+ filler: SInt8;
+ end;
+
+ TRegisterProfileBlkPtr = ^TRegisterProfileBlk;
+ TRegisterProfileBlk = record
+ iOpCode: SInt16;
+ iError: SInt16;
+ lReserved: SInt32;
+ hPrint: THPrint;
+ fRegisterIt: boolean;
+ filler: SInt8;
+ end;
+
+{$endc} {TARGET_API_MAC_OS8}
+
+{$ALIGN MAC68K}
+
+
+{unit CMCalibrator}
+{
+ File: CMCalibrator.p
+
+ Contains: ColorSync Calibration API
+
+ Version: Technology: ColorSync 2.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1998-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ CalibrateEventProcPtr = procedure(var event: EventRecord);
+{$elsec}
+ CalibrateEventProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ CalibrateEventUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CalibrateEventUPP = UniversalProcPtr;
+{$endc}
+
+ { Interface for new ColorSync monitor calibrators (ColorSync 2.6 and greater) }
+
+
+const
+ kCalibratorNamePrefix = $63616C69 (* 'cali' *);
+
+
+type
+ CalibratorInfoPtr = ^CalibratorInfo;
+ CalibratorInfo = record
+ dataSize: UInt32; { Size of this structure - compatibility }
+ displayID: CMDisplayIDType; { Contains an hDC on Win32 }
+ profileLocationSize: UInt32; { Max size for returned profile location }
+ profileLocationPtr: CMProfileLocationPtr; { For returning the profile }
+ eventProc: CalibrateEventUPP; { Ignored on Win32 }
+ isGood: boolean; { true or false }
+ end;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ CanCalibrateProcPtr = function(displayID: CMDisplayIDType; var errMessage: Str255): boolean;
+{$elsec}
+ CanCalibrateProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ CalibrateProcPtr = function(var theInfo: CalibratorInfo): OSErr;
+{$elsec}
+ CalibrateProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ CanCalibrateUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CanCalibrateUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ CalibrateUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CalibrateUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppCalibrateEventProcInfo = $000000C0;
+ uppCanCalibrateProcInfo = $000003D0;
+ uppCalibrateProcInfo = $000000E0;
+ {
+ * NewCalibrateEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewCalibrateEventUPP(userRoutine: CalibrateEventProcPtr): CalibrateEventUPP; external name '_NewCalibrateEventUPP'; { old name was NewCalibrateEventProc }
+{
+ * NewCanCalibrateUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function NewCanCalibrateUPP(userRoutine: CanCalibrateProcPtr): CanCalibrateUPP; external name '_NewCanCalibrateUPP'; { old name was NewCanCalibrateProc }
+{
+ * NewCalibrateUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function NewCalibrateUPP(userRoutine: CalibrateProcPtr): CalibrateUPP; external name '_NewCalibrateUPP'; { old name was NewCalibrateProc }
+{
+ * DisposeCalibrateEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeCalibrateEventUPP(userUPP: CalibrateEventUPP); external name '_DisposeCalibrateEventUPP';
+{
+ * DisposeCanCalibrateUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure DisposeCanCalibrateUPP(userUPP: CanCalibrateUPP); external name '_DisposeCanCalibrateUPP';
+{
+ * DisposeCalibrateUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure DisposeCalibrateUPP(userUPP: CalibrateUPP); external name '_DisposeCalibrateUPP';
+{
+ * InvokeCalibrateEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeCalibrateEventUPP(var event: EventRecord; userRoutine: CalibrateEventUPP); external name '_InvokeCalibrateEventUPP'; { old name was CallCalibrateEventProc }
+{
+ * InvokeCanCalibrateUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function InvokeCanCalibrateUPP(displayID: CMDisplayIDType; var errMessage: Str255; userRoutine: CanCalibrateUPP): boolean; external name '_InvokeCanCalibrateUPP'; { old name was CallCanCalibrateProc }
+{
+ * InvokeCalibrateUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function InvokeCalibrateUPP(var theInfo: CalibratorInfo; userRoutine: CalibrateUPP): OSErr; external name '_InvokeCalibrateUPP'; { old name was CallCalibrateProc }
+{
+ * CMCalibrateDisplay()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function CMCalibrateDisplay(var theInfo: CalibratorInfo): OSErr; external name '_CMCalibrateDisplay';
+
+
+{$ifc OLDROUTINENAMES}
+{ Interface for original ColorSync monitor calibrators (ColorSync 2.5.x) }
+
+const
+ kOldCalibratorNamePrefix = $43616C69 (* 'Cali' *);
+
+
+type
+ OldCalibratorInfoPtr = ^OldCalibratorInfo;
+ OldCalibratorInfo = record
+ displayID: CMDisplayIDType; { Contains an hDC on Win32 }
+ profileLocation: CMProfileLocation;
+ eventProc: CalibrateEventUPP; { Ignored on Win32 }
+ reserved: UInt32; { Unused }
+ flags: UInt32; { Unused }
+ isGood: boolean; { true or false }
+ byteFiller: SInt8; { Unused }
+ end;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ OldCanCalibrateProcPtr = function(displayID: CMDisplayIDType): boolean;
+{$elsec}
+ OldCanCalibrateProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ OldCalibrateProcPtr = function(var theInfo: OldCalibratorInfo): OSErr;
+{$elsec}
+ OldCalibrateProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ OldCanCalibrateUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ OldCanCalibrateUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ OldCalibrateUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ OldCalibrateUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppOldCanCalibrateProcInfo = $000000D0;
+ uppOldCalibrateProcInfo = $000000E0;
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * NewOldCanCalibrateUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewOldCanCalibrateUPP(userRoutine: OldCanCalibrateProcPtr): OldCanCalibrateUPP; external name '_NewOldCanCalibrateUPP'; { old name was NewOldCanCalibrateProc }
+{
+ * NewOldCalibrateUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewOldCalibrateUPP(userRoutine: OldCalibrateProcPtr): OldCalibrateUPP; external name '_NewOldCalibrateUPP'; { old name was NewOldCalibrateProc }
+{
+ * DisposeOldCanCalibrateUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposeOldCanCalibrateUPP(userUPP: OldCanCalibrateUPP); external name '_DisposeOldCanCalibrateUPP';
+{
+ * DisposeOldCalibrateUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposeOldCalibrateUPP(userUPP: OldCalibrateUPP); external name '_DisposeOldCalibrateUPP';
+{
+ * InvokeOldCanCalibrateUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InvokeOldCanCalibrateUPP(displayID: CMDisplayIDType; userRoutine: OldCanCalibrateUPP): boolean; external name '_InvokeOldCanCalibrateUPP'; { old name was CallOldCanCalibrateProc }
+{
+ * InvokeOldCalibrateUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InvokeOldCalibrateUPP(var theInfo: OldCalibratorInfo; userRoutine: OldCalibrateUPP): OSErr; external name '_InvokeOldCalibrateUPP'; { old name was CallOldCalibrateProc }
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {OLDROUTINENAMES}
+
+{$ALIGN MAC68K}
+
+
+{unit CMDeviceIntegration}
+{
+ File: CMDeviceIntegration.p
+
+ Contains: Color Management Device Interfaces - for MacOSX
+
+ Version: Technology: ColorSync 3.1
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 2000-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{$ifc TARGET_API_MAC_OSX}
+{
+ The current versions of the data structure
+ containing information on registered devices.
+}
+
+const
+ cmDeviceInfoVersion1 = $00010000;
+ cmDeviceProfileInfoVersion1 = $00010000;
+
+ cmCurrentDeviceInfoVersion = $00010000;
+ cmCurrentProfileInfoVersion = $00010000;
+
+ {
+ Certain APIs require a device ID or profile ID.
+ In some cases, a "default ID" can be used.
+ }
+ cmDefaultDeviceID = 0;
+ cmDefaultProfileID = 0;
+
+ {
+ Possible values for device states accessible by the
+ CMGetDeviceState() and CMSetDeviceState() APIs.
+ }
+ cmDeviceStateDefault = $00000000;
+ cmDeviceStateOffline = $00000001;
+ cmDeviceStateBusy = $00000002;
+ cmDeviceStateForceNotify = $80000000;
+ cmDeviceStateDeviceRsvdBits = $00FF0000;
+ cmDeviceStateAppleRsvdBits = $FF00FFFF;
+
+ {
+ Possible values for flags passed to the
+ CMIterateDeviceProfiles() API.
+
+ "Factory" profiles are registered via the
+ CMSetDeviceFactoryProfiles() API.
+
+ "Custom" profiles are those which are meant to take
+ the place of the factory profiles, as a result of
+ customization or calibration. These profiles are
+ registered via the CMSetDeviceProfiles() API.
+
+ To retrieve all of the the former for all devices,
+ use cmIterateFactoryDeviceProfiles as the flags
+ value when calling CMIterateDeviceProfiles().
+
+ To retrieve only the latter for all devices, use
+ the cmIterateCustomDeviceProfiles, as the flags
+ value when calling CMIterateDeviceProfiles().
+
+ To get the profiles in use for all devices, use
+ cmIterateCurrentDeviceProfiles as the flags value.
+ This will replace the factory profiles with any
+ overrides, yielding the currently used set.
+ }
+ cmIterateFactoryDeviceProfiles = $00000001;
+ cmIterateCustomDeviceProfiles = $00000002;
+ cmIterateCurrentDeviceProfiles = $00000003;
+ cmIterateDeviceProfilesMask = $00000003;
+
+ kMaxDeviceNameLength = 256;
+ kMaxProfileNameLength = 256;
+
+ {
+ Errors returned by CMDeviceIntegration APIs
+ }
+ cmDeviceDBNotFoundErr = -4227; { Prefs not found/loaded }
+ cmDeviceAlreadyRegistered = -4228; { Re-registration of device }
+ cmDeviceNotRegistered = -4229; { Device not found }
+ cmDeviceProfilesNotFound = -4230; { Profiles not found }
+ cmInternalCFErr = -4231; { CoreFoundation failure }
+
+ {
+ Device state data.
+ }
+
+type
+ CMDeviceState = UInt32;
+ {
+ A CMDeviceID must be unique within a device's class.
+ }
+ CMDeviceID = UInt32;
+ {
+ A CMDeviceProfileID must only be unique per device.
+ }
+ CMDeviceProfileID = UInt32;
+ {
+ DeviceClass type.
+ }
+
+const
+ cmScannerDeviceClass = $73636E72 (* 'scnr' *);
+ cmCameraDeviceClass = $636D7261 (* 'cmra' *);
+ cmDisplayDeviceClass = $6D6E7472 (* 'mntr' *);
+ cmPrinterDeviceClass = $70727472 (* 'prtr' *);
+ cmProofDeviceClass = $70727566 (* 'pruf' *);
+
+
+type
+ CMDeviceClass = OSType;
+ {
+ CMDeviceScope
+ Structure specifying a device's or a device setting's scope.
+ }
+ CMDeviceScopePtr = ^CMDeviceScope;
+ CMDeviceScope = record
+ deviceUser: CFStringRef; { kCFPreferencesCurrentUser | _AnyUser }
+ deviceHost: CFStringRef; { kCFPreferencesCurrentHost | _AnyHost }
+ end;
+
+ {
+ CMDeviceInfo
+ Structure containing information on a given device.
+ }
+ CMDeviceInfoPtr = ^CMDeviceInfo;
+ CMDeviceInfo = record
+ dataVersion: UInt32; { cmDeviceInfoVersion1 }
+ deviceClass: CMDeviceClass; { device class }
+ deviceID: CMDeviceID; { device ID }
+ deviceScope: CMDeviceScope; { device's scope }
+ deviceState: CMDeviceState; { Device State flags }
+ defaultProfileID: CMDeviceProfileID; { Can change }
+ deviceName: ^CFDictionaryRef; { Ptr to storage for CFDictionary of }
+ { localized device names (could be nil) }
+ profileCount: UInt32; { Count of registered profiles }
+ reserved: UInt32; { Reserved for use by ColorSync }
+ end;
+
+ {
+ CMDeviceProfileInfo
+ Structure containing information on a device profile.
+ }
+ CMDeviceProfileInfoPtr = ^CMDeviceProfileInfo;
+ CMDeviceProfileInfo = record
+ dataVersion: UInt32; { cmProfileInfoVersion1 }
+ profileID: CMDeviceProfileID; { The identifier for this profile }
+ profileLoc: CMProfileLocation; { The profile's location }
+ profileName: CFDictionaryRef; { CFDictionary of localized device names }
+ reserved: UInt32; { Reserved for use by ColorSync }
+ end;
+
+ {
+ CMDeviceProfileArray
+ Structure containing the profiles for a device.
+ }
+ CMDeviceProfileArrayPtr = ^CMDeviceProfileArray;
+ CMDeviceProfileArray = record
+ profileCount: UInt32; { Count of profiles in array }
+ profiles: array [0..0] of CMDeviceProfileInfo; { The profile info records }
+ end;
+
+ {
+ Caller-supplied iterator functions
+ }
+{$ifc TYPED_FUNCTION_POINTERS}
+ CMIterateDeviceInfoProcPtr = function(const (*var*) deviceInfo: CMDeviceInfo; refCon: UnivPtr): OSErr;
+{$elsec}
+ CMIterateDeviceInfoProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ CMIterateDeviceProfileProcPtr = function(const (*var*) deviceInfo: CMDeviceInfo; const (*var*) profileData: CMDeviceProfileInfo; refCon: UnivPtr): OSErr;
+{$elsec}
+ CMIterateDeviceProfileProcPtr = ProcPtr;
+{$endc}
+
+ {
+ Device Registration
+ }
+ {
+ * CMRegisterColorDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMRegisterColorDevice(deviceClass: CMDeviceClass; deviceID: CMDeviceID; deviceName: CFDictionaryRef; const (*var*) deviceScope: CMDeviceScope): CMError; external name '_CMRegisterColorDevice';
+
+{
+ * CMUnregisterColorDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMUnregisterColorDevice(deviceClass: CMDeviceClass; deviceID: CMDeviceID): CMError; external name '_CMUnregisterColorDevice';
+
+{
+ Default Device accessors
+}
+{
+ * CMSetDefaultDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMSetDefaultDevice(deviceClass: CMDeviceClass; deviceID: CMDeviceID): CMError; external name '_CMSetDefaultDevice';
+
+{
+ * CMGetDefaultDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMGetDefaultDevice(deviceClass: CMDeviceClass; var deviceID: CMDeviceID): CMError; external name '_CMGetDefaultDevice';
+
+{
+ Device Profile Registration & Access
+}
+{
+ * CMSetDeviceFactoryProfiles()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMSetDeviceFactoryProfiles(deviceClass: CMDeviceClass; deviceID: CMDeviceID; defaultProfID: CMDeviceProfileID; const (*var*) deviceProfiles: CMDeviceProfileArray): CMError; external name '_CMSetDeviceFactoryProfiles';
+
+{
+ * CMGetDeviceFactoryProfiles()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMGetDeviceFactoryProfiles(deviceClass: CMDeviceClass; deviceID: CMDeviceID; var defaultProfID: CMDeviceProfileID; var arraySize: UInt32; var deviceProfiles: CMDeviceProfileArray): CMError; external name '_CMGetDeviceFactoryProfiles';
+
+{
+ * CMSetDeviceProfiles()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMSetDeviceProfiles(deviceClass: CMDeviceClass; deviceID: CMDeviceID; const (*var*) profileScope: CMDeviceScope; const (*var*) deviceProfiles: CMDeviceProfileArray): CMError; external name '_CMSetDeviceProfiles';
+
+{
+ * CMGetDeviceProfiles()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMGetDeviceProfiles(deviceClass: CMDeviceClass; deviceID: CMDeviceID; var arraySize: UInt32; var deviceProfiles: CMDeviceProfileArray): CMError; external name '_CMGetDeviceProfiles';
+
+{
+ * CMSetDeviceDefaultProfileID()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMSetDeviceDefaultProfileID(deviceClass: CMDeviceClass; deviceID: CMDeviceID; defaultProfID: CMDeviceProfileID): CMError; external name '_CMSetDeviceDefaultProfileID';
+
+{
+ * CMGetDeviceDefaultProfileID()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMGetDeviceDefaultProfileID(deviceClass: CMDeviceClass; deviceID: CMDeviceID; var defaultProfID: CMDeviceProfileID): CMError; external name '_CMGetDeviceDefaultProfileID';
+
+{
+ * CMGetDeviceProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMGetDeviceProfile(deviceClass: CMDeviceClass; deviceID: CMDeviceID; profileID: CMDeviceProfileID; var deviceProfLoc: CMProfileLocation): CMError; external name '_CMGetDeviceProfile';
+
+{
+ * CMSetDeviceProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMSetDeviceProfile(deviceClass: CMDeviceClass; deviceID: CMDeviceID; const (*var*) profileScope: CMDeviceScope; profileID: CMDeviceProfileID; const (*var*) deviceProfLoc: CMProfileLocation): CMError; external name '_CMSetDeviceProfile';
+
+{
+ Other Device State/Info accessors
+}
+{
+ * CMSetDeviceState()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMSetDeviceState(deviceClass: CMDeviceClass; deviceID: CMDeviceID; deviceState: CMDeviceState): CMError; external name '_CMSetDeviceState';
+
+{
+ * CMGetDeviceState()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMGetDeviceState(deviceClass: CMDeviceClass; deviceID: CMDeviceID; var deviceState: CMDeviceState): CMError; external name '_CMGetDeviceState';
+
+{
+ * CMGetDeviceInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMGetDeviceInfo(deviceClass: CMDeviceClass; deviceID: CMDeviceID; var deviceInfo: CMDeviceInfo): CMError; external name '_CMGetDeviceInfo';
+
+{
+ Device Data & Profile Iterators
+}
+{
+ * CMIterateColorDevices()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMIterateColorDevices(proc: CMIterateDeviceInfoProcPtr; var seed: UInt32; var count: UInt32; refCon: UnivPtr): CMError; external name '_CMIterateColorDevices';
+
+{
+ * CMIterateDeviceProfiles()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in 3.1 and later
+ }
+function CMIterateDeviceProfiles(proc: CMIterateDeviceProfileProcPtr; var seed: UInt32; var count: UInt32; flags: UInt32; refCon: UnivPtr): CMError; external name '_CMIterateDeviceProfiles';
+
+{$endc} {TARGET_API_MAC_OSX}
+
+{$ALIGN MAC68K}
+
+
+{unit CMMComponent}
+{
+ File: CMMComponent.p
+
+ Contains: ColorSync CMM Component API
+
+ Version: Technology: ColorSync 2.6
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1994-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN MAC68K}
+
+{ Component-based CMM interface version }
+
+const
+ CMMInterfaceVersion = 1;
+
+
+ { Component-based CMM function selectors }
+ { Required }
+ kCMMOpen = -1; { kComponentOpenSelect, }
+ kCMMClose = -2; { kComponentCloseSelect, }
+ kCMMGetInfo = -4; { kComponentVersionSelect }
+ kNCMMInit = 6;
+ kCMMMatchColors = 1;
+ kCMMCheckColors = 2; { }
+ { }
+ { Optional }
+ kCMMValidateProfile = 8;
+ kCMMMatchBitmap = 9;
+ kCMMCheckBitmap = 10;
+ kCMMConcatenateProfiles = 5;
+ kCMMConcatInit = 7;
+ kCMMNewLinkProfile = 16;
+ kNCMMConcatInit = 18;
+ kNCMMNewLinkProfile = 19;
+ kCMMGetPS2ColorSpace = 11;
+ kCMMGetPS2ColorRenderingIntent = 12;
+ kCMMGetPS2ColorRendering = 13;
+ kCMMGetPS2ColorRenderingVMSize = 17; { }
+ { }
+ { obsolete with ColorSync 2.5 }
+ kCMMFlattenProfile = 14;
+ kCMMUnflattenProfile = 15; { }
+ { }
+ { obsolete with ColorSync 2.6 }
+ kCMMInit = 0;
+ kCMMGetNamedColorInfo = 70;
+ kCMMGetNamedColorValue = 71;
+ kCMMGetIndNamedColorValue = 72;
+ kCMMGetNamedColorIndex = 73;
+ kCMMGetNamedColorName = 74; { }
+ { }
+ { obsolete with ColorSync 3.0 }
+ kCMMMatchPixMap = 3;
+ kCMMCheckPixMap = 4;
+
+
+{$ifc TARGET_API_MAC_OS8}
+
+type
+ CMMComponentInst = ComponentInstance;
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * NCMMInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NCMMInit(cmm: CMMComponentInst; srcProfile: CMProfileRef; dstProfile: CMProfileRef): CMError; external name '_NCMMInit';
+{
+ * CMMInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMInit(cmm: CMMComponentInst; srcProfile: CMProfileHandle; dstProfile: CMProfileHandle): CMError; external name '_CMMInit';
+{
+ * CMMMatchColors()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMMatchColors(cmm: CMMComponentInst; var colors: CMColor; count: UInt32): CMError; external name '_CMMMatchColors';
+{
+ * CMMCheckColors()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMCheckColors(cmm: CMMComponentInst; var colors: CMColor; count: UInt32; var result: UInt32): CMError; external name '_CMMCheckColors';
+{
+ * CMMValidateProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMValidateProfile(cmm: CMMComponentInst; prof: CMProfileRef; var valid: boolean): CMError; external name '_CMMValidateProfile';
+{
+ * CMMFlattenProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMFlattenProfile(cmm: CMMComponentInst; prof: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UnivPtr): CMError; external name '_CMMFlattenProfile';
+{
+ * CMMUnflattenProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMUnflattenProfile(cmm: CMMComponentInst; var resultFileSpec: FSSpec; proc: CMFlattenUPP; refCon: UnivPtr): CMError; external name '_CMMUnflattenProfile';
+{
+ * CMMMatchBitmap()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMMatchBitmap(cmm: CMMComponentInst; var bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr; var matchedBitmap: CMBitmap): CMError; external name '_CMMMatchBitmap';
+{
+ * CMMCheckBitmap()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMCheckBitmap(cmm: CMMComponentInst; const (*var*) bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr; var resultBitmap: CMBitmap): CMError; external name '_CMMCheckBitmap';
+{
+ * CMMMatchPixMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMMatchPixMap(cmm: CMMComponentInst; var pixMap_: PixMap; progressProc: CMBitmapCallBackUPP; refCon: UnivPtr): CMError; external name '_CMMMatchPixMap';
+{
+ * CMMCheckPixMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMCheckPixMap(cmm: CMMComponentInst; const (*var*) pixMap_: PixMap; progressProc: CMBitmapCallBackUPP; var bitMap_: BitMap; refCon: UnivPtr): CMError; external name '_CMMCheckPixMap';
+{
+ * CMMConcatInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMConcatInit(cmm: CMMComponentInst; var profileSet: CMConcatProfileSet): CMError; external name '_CMMConcatInit';
+{
+ * NCMMConcatInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NCMMConcatInit(cmm: CMMComponentInst; var profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UnivPtr): CMError; external name '_NCMMConcatInit';
+{
+ * CMMNewLinkProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMNewLinkProfile(cmm: CMMComponentInst; var prof: CMProfileRef; const (*var*) targetLocation: CMProfileLocation; var profileSet: CMConcatProfileSet): CMError; external name '_CMMNewLinkProfile';
+{
+ * NCMMNewLinkProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NCMMNewLinkProfile(cmm: CMMComponentInst; prof: CMProfileRef; var profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UnivPtr): CMError; external name '_NCMMNewLinkProfile';
+{
+ * CMMGetPS2ColorSpace()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMGetPS2ColorSpace(cmm: CMMComponentInst; srcProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UnivPtr): CMError; external name '_CMMGetPS2ColorSpace';
+{
+ * CMMGetPS2ColorRenderingIntent()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMGetPS2ColorRenderingIntent(cmm: CMMComponentInst; srcProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UnivPtr): CMError; external name '_CMMGetPS2ColorRenderingIntent';
+{
+ * CMMGetPS2ColorRendering()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMGetPS2ColorRendering(cmm: CMMComponentInst; srcProf: CMProfileRef; dstProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UnivPtr): CMError; external name '_CMMGetPS2ColorRendering';
+{
+ * CMMGetPS2ColorRenderingVMSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMGetPS2ColorRenderingVMSize(cmm: CMMComponentInst; srcProf: CMProfileRef; dstProf: CMProfileRef; var vmSize: UInt32): CMError; external name '_CMMGetPS2ColorRenderingVMSize';
+{
+ * CMMConcatenateProfiles()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMConcatenateProfiles(cmm: CMMComponentInst; thru: CMProfileHandle; dst: CMProfileHandle; var newDst: CMProfileHandle): CMError; external name '_CMMConcatenateProfiles';
+{
+ * CMMGetNamedColorInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMGetNamedColorInfo(cmm: CMMComponentInst; srcProf: CMProfileRef; var deviceChannels: UInt32; var deviceColorSpace: OSType; var PCSColorSpace: OSType; var count: UInt32; prefix: StringPtr; suffix: StringPtr): CMError; external name '_CMMGetNamedColorInfo';
+{
+ * CMMGetNamedColorValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMGetNamedColorValue(cmm: CMMComponentInst; prof: CMProfileRef; name: StringPtr; var deviceColor: CMColor; var PCSColor: CMColor): CMError; external name '_CMMGetNamedColorValue';
+{
+ * CMMGetIndNamedColorValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMGetIndNamedColorValue(cmm: CMMComponentInst; prof: CMProfileRef; index: UInt32; var deviceColor: CMColor; var PCSColor: CMColor): CMError; external name '_CMMGetIndNamedColorValue';
+{
+ * CMMGetNamedColorIndex()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMGetNamedColorIndex(cmm: CMMComponentInst; prof: CMProfileRef; name: StringPtr; var index: UInt32): CMError; external name '_CMMGetNamedColorIndex';
+{
+ * CMMGetNamedColorName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMMGetNamedColorName(cmm: CMMComponentInst; prof: CMProfileRef; index: UInt32; name: StringPtr): CMError; external name '_CMMGetNamedColorName';
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc} {TARGET_API_MAC_OS8}
+
+{$ALIGN MAC68K}
+
+
+{unit CMPRComponent}
+{
+ File: CMPRComponent.p
+
+ Contains: ColorSync ProfileResponder Component API
+
+ Version: Technology: ColorSync 1.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1993-2002 by Apple Computer, Inc. All rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ CMPRInterfaceVersion = 0;
+
+ { Component function selectors }
+ kCMPRGetProfile = 0;
+ kCMPRSetProfile = 1;
+ kCMPRSetProfileDescription = 2;
+ kCMPRGetIndexedProfile = 3;
+ kCMPRDeleteDeviceProfile = 4;
+
+
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * CMGetProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLibPriv 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMGetProfile(pr: ComponentInstance; aProfile: CMProfileHandle; var returnedProfile: CMProfileHandle): CMError; external name '_CMGetProfile';
+{
+ * CMSetProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLibPriv 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMSetProfile(pr: ComponentInstance; newProfile: CMProfileHandle): CMError; external name '_CMSetProfile';
+{
+ * CMSetProfileDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLibPriv 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMSetProfileDescription(pr: ComponentInstance; DeviceData: SInt32; hProfile: CMProfileHandle): CMError; external name '_CMSetProfileDescription';
+{
+ * CMGetIndexedProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLibPriv 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMGetIndexedProfile(pr: ComponentInstance; search: CMProfileSearchRecordHandle; var returnProfile: CMProfileHandle; var index: SInt32): CMError; external name '_CMGetIndexedProfile';
+{
+ * CMDeleteDeviceProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorSyncLibPriv 2.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function CMDeleteDeviceProfile(pr: ComponentInstance; deleteMe: CMProfileHandle): CMError; external name '_CMDeleteDeviceProfile';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ALIGN MAC68K}
+
+
+{unit CMScriptingPlugin}
+{
+ File: CMScriptingPlugin.p
+
+ Contains: ColorSync Scripting Plugin API
+
+ Version: Technology: ColorSync 2.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1998-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ { ColorSync Scripting AppleEvent Errors }
+ cmspInvalidImageFile = -4220; { Plugin cannot handle this image file type }
+ cmspInvalidImageSpace = -4221; { Plugin cannot create an image file of this colorspace }
+ cmspInvalidProfileEmbed = -4222; { Specific invalid profile errors }
+ cmspInvalidProfileSource = -4223;
+ cmspInvalidProfileDest = -4224;
+ cmspInvalidProfileProof = -4225;
+ cmspInvalidProfileLink = -4226;
+
+
+ { *** embedFlags field *** }
+ { reserved for future use: currently 0 }
+
+ { *** matchFlags field *** }
+ cmspFavorEmbeddedMask = $00000001; { if bit 0 is 0 then use srcProf profile, if 1 then use profile embedded in image if present }
+
+
+ { *** scripting plugin entry points *** }
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ ValidateImageProcPtr = function(const (*var*) spec: FSSpec): CMError;
+{$elsec}
+ ValidateImageProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ GetImageSpaceProcPtr = function(const (*var*) spec: FSSpec; var space: OSType): CMError;
+{$elsec}
+ GetImageSpaceProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ ValidateSpaceProcPtr = function(const (*var*) spec: FSSpec; var space: OSType): CMError;
+{$elsec}
+ ValidateSpaceProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ EmbedImageProcPtr = function(const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec; embedProf: CMProfileRef; embedFlags: UInt32): CMError;
+{$elsec}
+ EmbedImageProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ UnembedImageProcPtr = function(const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec): CMError;
+{$elsec}
+ UnembedImageProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ MatchImageProcPtr = function(const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec; qual: UInt32; srcIntent: UInt32; srcProf: CMProfileRef; dstProf: CMProfileRef; prfProf: CMProfileRef; matchFlags: UInt32): CMError;
+{$elsec}
+ MatchImageProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ CountImageProfilesProcPtr = function(const (*var*) spec: FSSpec; var count: UInt32): CMError;
+{$elsec}
+ CountImageProfilesProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ GetIndImageProfileProcPtr = function(const (*var*) spec: FSSpec; index: UInt32; var prof: CMProfileRef): CMError;
+{$elsec}
+ GetIndImageProfileProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SetIndImageProfileProcPtr = function(const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec; index: UInt32; prof: CMProfileRef; embedFlags: UInt32): CMError;
+{$elsec}
+ SetIndImageProfileProcPtr = ProcPtr;
+{$endc}
+
+ { *** CSScriptingLib API *** }
+
+ {
+ * CMValidImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CSScriptingLib 2.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in 3.0 and later
+ }
+function CMValidImage(const (*var*) spec: FSSpec): CMError; external name '_CMValidImage';
+
+{
+ * CMGetImageSpace()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CSScriptingLib 2.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in 3.0 and later
+ }
+function CMGetImageSpace(const (*var*) spec: FSSpec; var space: OSType): CMError; external name '_CMGetImageSpace';
+
+{
+ * CMEmbedImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CSScriptingLib 2.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in 3.0 and later
+ }
+function CMEmbedImage(const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec; repl: boolean; embProf: CMProfileRef): CMError; external name '_CMEmbedImage';
+
+{
+ * CMUnembedImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CSScriptingLib 2.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in 3.0 and later
+ }
+function CMUnembedImage(const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec; repl: boolean): CMError; external name '_CMUnembedImage';
+
+{
+ * CMMatchImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CSScriptingLib 2.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in 3.0 and later
+ }
+function CMMatchImage(const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec; repl: boolean; qual: UInt32; srcProf: CMProfileRef; srcIntent: UInt32; dstProf: CMProfileRef): CMError; external name '_CMMatchImage';
+
+{
+ * CMProofImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CSScriptingLib 2.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in 3.0 and later
+ }
+function CMProofImage(const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec; repl: boolean; qual: UInt32; srcProf: CMProfileRef; srcIntent: UInt32; dstProf: CMProfileRef; prfProf: CMProfileRef): CMError; external name '_CMProofImage';
+
+{
+ * CMLinkImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CSScriptingLib 2.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in 3.0 and later
+ }
+function CMLinkImage(const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec; repl: boolean; qual: UInt32; lnkProf: CMProfileRef; lnkIntent: UInt32): CMError; external name '_CMLinkImage';
+
+{
+ * CMCountImageProfiles()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CSScriptingLib 2.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in 3.0 and later
+ }
+function CMCountImageProfiles(const (*var*) spec: FSSpec; var count: UInt32): CMError; external name '_CMCountImageProfiles';
+
+{
+ * CMGetIndImageProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CSScriptingLib 2.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in 3.0 and later
+ }
+function CMGetIndImageProfile(const (*var*) spec: FSSpec; index: UInt32; var prof: CMProfileRef): CMError; external name '_CMGetIndImageProfile';
+
+{
+ * CMSetIndImageProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in CSScriptingLib 2.6 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in 3.0 and later
+ }
+function CMSetIndImageProfile(const (*var*) specFrom: FSSpec; const (*var*) specInto: FSSpec; repl: boolean; index: UInt32; prof: CMProfileRef): CMError; external name '_CMSetIndImageProfile';
+
+{$ALIGN MAC68K}
+
+
+{unit ColorPicker}
+{
+ File: ColorPicker.p
+
+ Contains: Color Picker package Interfaces.
+
+ Version: Technology: System 7.5
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1987-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ { Maximum small fract value, as long }
+ kMaximumSmallFract = $0000FFFF;
+
+ kDefaultColorPickerWidth = 383;
+ kDefaultColorPickerHeight = 238;
+
+
+type
+ DialogPlacementSpec = SInt16;
+const
+ kAtSpecifiedOrigin = 0;
+ kDeepestColorScreen = 1;
+ kCenterOnMainScreen = 2;
+
+
+ { These are for the flags field in the structs below (for example ColorPickerInfo). }
+ kColorPickerDialogIsMoveable = 1;
+ kColorPickerDialogIsModal = 2;
+ kColorPickerCanModifyPalette = 4;
+ kColorPickerCanAnimatePalette = 8;
+ kColorPickerAppIsColorSyncAware = 16;
+ kColorPickerInSystemDialog = 32;
+ kColorPickerInApplicationDialog = 64;
+ kColorPickerInPickerDialog = 128;
+ kColorPickerDetachedFromChoices = 256;
+ kColorPickerCallColorProcLive = 512;
+
+
+{$ifc OLDROUTINENAMES}
+ { Maximum small fract value, as long }
+ MaxSmallFract = $0000FFFF;
+
+ kDefaultWidth = 383;
+ kDefaultHeight = 238;
+
+ { These are for the flags field in the structs below (for example ColorPickerInfo). }
+ DialogIsMoveable = 1;
+ DialogIsModal = 2;
+ CanModifyPalette = 4;
+ CanAnimatePalette = 8;
+ AppIsColorSyncAware = 16;
+ InSystemDialog = 32;
+ InApplicationDialog = 64;
+ InPickerDialog = 128;
+ DetachedFromChoices = 256;
+ CallColorProcLive = 512;
+
+{$endc} {OLDROUTINENAMES}
+
+ { A SmallFract value is just the fractional part of a Fixed number,
+ which is the low order word. SmallFracts are used to save room,
+ and to be compatible with Quickdraw's RGBColor. They can be
+ assigned directly to and from INTEGERs. }
+ { Unsigned fraction between 0 and 1 }
+
+type
+ SmallFract = UInt16;
+ { For developmental simplicity in switching between the HLS and HSV
+ models, HLS is reordered into HSL. Thus both models start with
+ hue and saturation values; value/lightness/brightness is last. }
+
+ HSVColorPtr = ^HSVColor;
+ HSVColor = record
+ hue: SmallFract; { Fraction of circle, red at 0 }
+ saturation: SmallFract; { 0-1, 0 for gray, 1 for pure color }
+ value: SmallFract; { 0-1, 0 for black, 1 for max intensity }
+ end;
+
+ HSLColorPtr = ^HSLColor;
+ HSLColor = record
+ hue: SmallFract; { Fraction of circle, red at 0 }
+ saturation: SmallFract; { 0-1, 0 for gray, 1 for pure color }
+ lightness: SmallFract; { 0-1, 0 for black, 1 for white }
+ end;
+
+ CMYColorPtr = ^CMYColor;
+ CMYColor = record
+ cyan: SmallFract;
+ magenta: SmallFract;
+ yellow: SmallFract;
+ end;
+
+ PMColorPtr = ^PMColor;
+ PMColor = record
+ profile: CMProfileHandle;
+ color: CMColor;
+ end;
+
+ NPMColorPtr = ^NPMColor;
+ NPMColor = record
+ profile: CMProfileRef;
+ color: CMColor;
+ end;
+
+ Picker = ^SInt32; { an opaque 32-bit type }
+ PickerPtr = ^Picker; { when a var xx:Picker parameter can be nil, it is changed to xx: PickerPtr }
+ PickerMenuItemInfoPtr = ^PickerMenuItemInfo;
+ PickerMenuItemInfo = record
+ editMenuID: SInt16;
+ cutItem: SInt16;
+ copyItem: SInt16;
+ pasteItem: SInt16;
+ clearItem: SInt16;
+ undoItem: SInt16;
+ end;
+
+ { Structs related to deprecated API's have been pulled from this file. }
+ { Those structs necessary for developers writing their own color pickers... }
+ { have been moved to ColorPickerComponents.h. }
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ ColorChangedProcPtr = procedure(userData: SInt32; var newColor: PMColor);
+{$elsec}
+ ColorChangedProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ NColorChangedProcPtr = procedure(userData: SInt32; var newColor: NPMColor);
+{$elsec}
+ NColorChangedProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ UserEventProcPtr = function(var event: EventRecord): boolean;
+{$elsec}
+ UserEventProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ ColorChangedUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ColorChangedUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ NColorChangedUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ NColorChangedUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ UserEventUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ UserEventUPP = UniversalProcPtr;
+{$endc}
+ ColorPickerInfoPtr = ^ColorPickerInfo;
+ ColorPickerInfo = record
+ theColor: PMColor;
+ dstProfile: CMProfileHandle;
+ flags: UInt32;
+ placeWhere: DialogPlacementSpec;
+ dialogOrigin: Point;
+ pickerType: OSType;
+ eventProc: UserEventUPP;
+ colorProc: ColorChangedUPP;
+ colorProcData: UInt32;
+ prompt: Str255;
+ mInfo: PickerMenuItemInfo;
+ newColorChosen: boolean;
+ filler: SInt8;
+ end;
+
+ NColorPickerInfoPtr = ^NColorPickerInfo;
+ NColorPickerInfo = record
+ theColor: NPMColor;
+ dstProfile: CMProfileRef;
+ flags: UInt32;
+ placeWhere: DialogPlacementSpec;
+ dialogOrigin: Point;
+ pickerType: OSType;
+ eventProc: UserEventUPP;
+ colorProc: NColorChangedUPP;
+ colorProcData: UInt32;
+ prompt: Str255;
+ mInfo: PickerMenuItemInfo;
+ newColorChosen: boolean;
+ reserved: SInt8; { Must be 0 }
+ end;
+
+
+ { Below are the color conversion routines. }
+ {
+ * Fix2SmallFract()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function Fix2SmallFract(f: Fixed): SmallFract; external name '_Fix2SmallFract';
+{
+ * SmallFract2Fix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function SmallFract2Fix(s: SmallFract): Fixed; external name '_SmallFract2Fix';
+{
+ * CMY2RGB()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure CMY2RGB(const (*var*) cColor: CMYColor; var rColor: RGBColor); external name '_CMY2RGB';
+{
+ * RGB2CMY()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure RGB2CMY(const (*var*) rColor: RGBColor; var cColor: CMYColor); external name '_RGB2CMY';
+{
+ * HSL2RGB()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure HSL2RGB(const (*var*) hColor: HSLColor; var rColor: RGBColor); external name '_HSL2RGB';
+{
+ * RGB2HSL()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure RGB2HSL(const (*var*) rColor: RGBColor; var hColor: HSLColor); external name '_RGB2HSL';
+{
+ * HSV2RGB()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure HSV2RGB(const (*var*) hColor: HSVColor; var rColor: RGBColor); external name '_HSV2RGB';
+{
+ * RGB2HSV()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure RGB2HSV(const (*var*) rColor: RGBColor; var hColor: HSVColor); external name '_RGB2HSV';
+{ GetColor() works with or without the Color Picker extension. }
+{
+ * GetColor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function GetColor(where: Point; const (*var*) prompt: Str255; const (*var*) inColor: RGBColor; var outColor: RGBColor): boolean; external name '_GetColor';
+{ PickColor() requires the Color Picker extension (version 2.0 or greater). }
+{
+ * PickColor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorPickerLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function PickColor(var theColorInfo: ColorPickerInfo): OSErr; external name '_PickColor';
+{ NPickColor() requires the Color Picker extension (version 2.1 or greater). }
+{
+ * NPickColor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in ColorPickerLib 2.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function NPickColor(var theColorInfo: NColorPickerInfo): OSErr; external name '_NPickColor';
+{ A suite of mid-level API calls have been deprecated. Likely you never... }
+{ used them anyway. They were removed from this file and should not be... }
+{ used in the future as they are not gauranteed to be supported. }
+
+const
+ uppColorChangedProcInfo = $000003C0;
+ uppNColorChangedProcInfo = $000003C0;
+ uppUserEventProcInfo = $000000D0;
+ {
+ * NewColorChangedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function NewColorChangedUPP(userRoutine: ColorChangedProcPtr): ColorChangedUPP; external name '_NewColorChangedUPP'; { old name was NewColorChangedProc }
+{
+ * NewNColorChangedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function NewNColorChangedUPP(userRoutine: NColorChangedProcPtr): NColorChangedUPP; external name '_NewNColorChangedUPP'; { old name was NewNColorChangedProc }
+{
+ * NewUserEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function NewUserEventUPP(userRoutine: UserEventProcPtr): UserEventUPP; external name '_NewUserEventUPP'; { old name was NewUserEventProc }
+{
+ * DisposeColorChangedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure DisposeColorChangedUPP(userUPP: ColorChangedUPP); external name '_DisposeColorChangedUPP';
+{
+ * DisposeNColorChangedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure DisposeNColorChangedUPP(userUPP: NColorChangedUPP); external name '_DisposeNColorChangedUPP';
+{
+ * DisposeUserEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure DisposeUserEventUPP(userUPP: UserEventUPP); external name '_DisposeUserEventUPP';
+{
+ * InvokeColorChangedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure InvokeColorChangedUPP(userData: SInt32; var newColor: PMColor; userRoutine: ColorChangedUPP); external name '_InvokeColorChangedUPP'; { old name was CallColorChangedProc }
+{
+ * InvokeNColorChangedUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+procedure InvokeNColorChangedUPP(userData: SInt32; var newColor: NPMColor; userRoutine: NColorChangedUPP); external name '_InvokeNColorChangedUPP'; { old name was CallNColorChangedProc }
+{
+ * InvokeUserEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: not available
+ }
+function InvokeUserEventUPP(var event: EventRecord; userRoutine: UserEventUPP): boolean; external name '_InvokeUserEventUPP'; { old name was CallUserEventProc }
+{$ALIGN MAC68K}
+
+
+{unit ControlDefinitions}
+{
+ File: HIToolbox/ControlDefinitions.h
+
+ Contains: Definitions of controls provided by the Control Manager
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1999-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+{
+ * ControlDefinitions.h
+ *
+ * Discussion:
+ * System software supplies a variety of controls for your
+ * applications to use. They are described herein.
+ }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Resource Types }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+const
+ kControlTabListResType = $74616223 (* 'tab#' *); { used for tab control (Appearance 1.0 and later)}
+ kControlListDescResType = $6C646573 (* 'ldes' *); { used for list box control (Appearance 1.0 and later)}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Check Box Values }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kControlCheckBoxUncheckedValue = 0;
+ kControlCheckBoxCheckedValue = 1;
+ kControlCheckBoxMixedValue = 2;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Radio Button Values }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kControlRadioButtonUncheckedValue = 0;
+ kControlRadioButtonCheckedValue = 1;
+ kControlRadioButtonMixedValue = 2;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Pop-Up Menu Control Constants }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Variant codes for the System 7 pop-up menu}
+const
+ popupFixedWidth = 1 shl 0;
+ popupVariableWidth = 1 shl 1;
+ popupUseAddResMenu = 1 shl 2;
+ popupUseWFont = 1 shl 3;
+
+{ Menu label styles for the System 7 pop-up menu}
+const
+ popupTitleBold = 1 shl 8;
+ popupTitleItalic = 1 shl 9;
+ popupTitleUnderline = 1 shl 10;
+ popupTitleOutline = 1 shl 11;
+ popupTitleShadow = 1 shl 12;
+ popupTitleCondense = 1 shl 13;
+ popupTitleExtend = 1 shl 14;
+ popupTitleNoStyle = 1 shl 15;
+
+{ Menu label justifications for the System 7 pop-up menu}
+const
+ popupTitleLeftJust = $00000000;
+ popupTitleCenterJust = $00000001;
+ popupTitleRightJust = $000000FF;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Definition IDÕs }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Standard System 7 procIDs}
+
+const
+ pushButProc = 0;
+ checkBoxProc = 1;
+ radioButProc = 2;
+ scrollBarProc = 16;
+ popupMenuProc = 1008;
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Part Codes }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kControlLabelPart = 1;
+ kControlMenuPart = 2;
+ kControlTrianglePart = 4;
+ kControlEditTextPart = 5; { Appearance 1.0 and later}
+ kControlPicturePart = 6; { Appearance 1.0 and later}
+ kControlIconPart = 7; { Appearance 1.0 and later}
+ kControlClockPart = 8; { Appearance 1.0 and later}
+ kControlListBoxPart = 24; { Appearance 1.0 and later}
+ kControlListBoxDoubleClickPart = 25; { Appearance 1.0 and later}
+ kControlImageWellPart = 26; { Appearance 1.0 and later}
+ kControlRadioGroupPart = 27; { Appearance 1.0.2 and later}
+ kControlButtonPart = 10;
+ kControlCheckBoxPart = 11;
+ kControlRadioButtonPart = 11;
+ kControlUpButtonPart = kAppearancePartUpButton;
+ kControlDownButtonPart = kAppearancePartDownButton;
+ kControlPageUpPart = kAppearancePartPageUpArea;
+ kControlPageDownPart = kAppearancePartPageDownArea;
+ kControlClockHourDayPart = 9; { Appearance 1.1 and later}
+ kControlClockMinuteMonthPart = 10; { Appearance 1.1 and later}
+ kControlClockSecondYearPart = 11; { Appearance 1.1 and later}
+ kControlClockAMPMPart = 12; { Appearance 1.1 and later}
+ kControlDataBrowserPart = 24; { CarbonLib 1.0 and later}
+ kControlDataBrowserDraggedPart = 25; { CarbonLib 1.0 and later}
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ Control Types and IDÕs available only with Appearance 1.0 and later }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ BEVEL BUTTON INTERFACE (CDEF 2) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Bevel buttons allow you to control the content type (pict/icon/etc.), the behavior }
+{ (pushbutton/toggle/sticky), and the bevel size. You also have the option of }
+{ attaching a menu to it. When a menu is present, you can specify which way the }
+{ popup arrow is facing (down or right). }
+{ This is all made possible by overloading the Min, Max, and Value parameters for the }
+{ control, as well as adjusting the variant. Here's the breakdown of what goes where: }
+{ Parameter What Goes Here }
+{ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
+{ Min Hi Byte = Behavior, Lo Byte = content type. }
+{ Max ResID for resource-based content types. }
+{ Value MenuID to attach, 0 = no menu, please. }
+{ The variant is broken down into two halfs. The low 2 bits control the bevel type. }
+{ Bit 2 controls the popup arrow direction (if a menu is present) and bit 3 controls }
+{ whether or not to use the control's owning window's font. }
+{ Constants for all you need to put this together are below. The values for behaviors }
+{ are set up so that you can simply add them to the content type and pass them into }
+{ the Min parameter of NewControl. }
+{ An example call: }
+{ control = NewControl( window, &bounds, "\p", true, 0, kControlContentIconSuiteRes + }
+{ kBehaviorToggles, myIconSuiteID, bevelButtonSmallBevelProc, }
+{ 0L ); }
+{ Attaching a menu: }
+{ control = NewControl( window, &bounds, "\p", true, kMyMenuID, }
+{ kControlContentIconSuiteRes, myIconSuiteID, bevelButtonSmallBevelProc + }
+{ kBevelButtonMenuOnRight, 0L ); }
+{ This will attach menu ID kMyMenuID to the button, with the popup arrow facing right.}
+{ This also puts the menu up to the right of the button. You can also specify that a }
+{ menu can have multiple items checked at once by adding kBehaviorMultiValueMenus }
+{ into the Min parameter. If you do use multivalue menus, the GetBevelButtonMenuValue }
+{ helper function will return the last item chosen from the menu, whether or not it }
+{ was checked. }
+{ NOTE: Bevel buttons with menus actually have *two* values. The value of the }
+{ button (on/off), and the value of the menu. The menu value can be gotten }
+{ with the GetBevelButtonMenuValue helper function. }
+{ Handle-based Content }
+{ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
+{ You can create your control and then set the content to an existing handle to an }
+{ icon suite, etc. using the macros below. Please keep in mind that resource-based }
+{ content is owned by the control, handle-based content is owned by you. The CDEF will}
+{ not try to dispose of handle-based content. If you are changing the content type of }
+{ the button on the fly, you must make sure that if you are replacing a handle- }
+{ based content with a resource-based content to properly dispose of the handle, }
+{ else a memory leak will ensue. }
+{ Textual Content }
+{ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
+{ Please note that if a bevel button gets its textual content from the title }
+{ of the control. To alter the textual content of a bevel button, use the }
+{ SetControlTitle[WithCFString] API. }
+{ Bevel Button Proc IDs }
+const
+ kControlBevelButtonSmallBevelProc = 32;
+ kControlBevelButtonNormalBevelProc = 33;
+ kControlBevelButtonLargeBevelProc = 34;
+
+{ Add these variant codes to kBevelButtonSmallBevelProc to change the type of button }
+const
+ kControlBevelButtonSmallBevelVariant = 0;
+ kControlBevelButtonNormalBevelVariant = 1 shl 0;
+ kControlBevelButtonLargeBevelVariant = 1 shl 1;
+ kControlBevelButtonMenuOnRightVariant = 1 shl 2;
+
+{ Bevel Thicknesses }
+type
+ ControlBevelThickness = UInt16;
+const
+ kControlBevelButtonSmallBevel = 0;
+ kControlBevelButtonNormalBevel = 1;
+ kControlBevelButtonLargeBevel = 2;
+
+{ Behaviors of bevel buttons. These are set up so you can add }
+{ them together with the content types. }
+const
+ kControlBehaviorPushbutton = 0;
+ kControlBehaviorToggles = $0100;
+ kControlBehaviorSticky = $0200;
+ kControlBehaviorSingleValueMenu = 0;
+ kControlBehaviorMultiValueMenu = $4000; { only makes sense when a menu is attached.}
+ kControlBehaviorOffsetContents = $8000;
+
+{ Behaviors for 1.0.1 or later }
+const
+ kControlBehaviorCommandMenu = $2000; { menu holds commands, not choices. Overrides multi-value bit.}
+
+type
+ ControlBevelButtonBehavior = UInt16;
+type
+ ControlBevelButtonMenuBehavior = UInt16;
+{ Bevel Button Menu Placements }
+type
+ ControlBevelButtonMenuPlacement = UInt16;
+const
+ kControlBevelButtonMenuOnBottom = 0;
+ kControlBevelButtonMenuOnRight = 1 shl 2;
+
+{ Control Kind Tag }
+const
+ kControlKindBevelButton = $6265766C (* 'bevl' *);
+
+{ The HIObject class ID for the HIBevelButton class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIBevelButtonClassID CFSTRP('com.apple.HIBevelButton')}
+{$endc}
+{ Creation API: Carbon Only }
+{
+ * CreateBevelButtonControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateBevelButtonControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef; thickness: ControlBevelThickness; behavior: ControlBevelButtonBehavior; info: ControlButtonContentInfoPtr; menuID: SInt16; menuBehavior: ControlBevelButtonMenuBehavior; menuPlacement: ControlBevelButtonMenuPlacement; var outControl: ControlRef ): OSStatus; external name '_CreateBevelButtonControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Graphic Alignments }
+type
+ ControlButtonGraphicAlignment = SInt16;
+const
+ kControlBevelButtonAlignSysDirection = -1; { only left or right}
+ kControlBevelButtonAlignCenter = 0;
+ kControlBevelButtonAlignLeft = 1;
+ kControlBevelButtonAlignRight = 2;
+ kControlBevelButtonAlignTop = 3;
+ kControlBevelButtonAlignBottom = 4;
+ kControlBevelButtonAlignTopLeft = 5;
+ kControlBevelButtonAlignBottomLeft = 6;
+ kControlBevelButtonAlignTopRight = 7;
+ kControlBevelButtonAlignBottomRight = 8;
+
+{ Text Alignments }
+type
+ ControlButtonTextAlignment = SInt16;
+const
+ kControlBevelButtonAlignTextSysDirection = teFlushDefault;
+ kControlBevelButtonAlignTextCenter = teCenter;
+ kControlBevelButtonAlignTextFlushRight = teFlushRight;
+ kControlBevelButtonAlignTextFlushLeft = teFlushLeft;
+
+{ Text Placements }
+type
+ ControlButtonTextPlacement = SInt16;
+const
+ kControlBevelButtonPlaceSysDirection = -1; { if graphic on right, then on left}
+ kControlBevelButtonPlaceNormally = 0;
+ kControlBevelButtonPlaceToRightOfGraphic = 1;
+ kControlBevelButtonPlaceToLeftOfGraphic = 2;
+ kControlBevelButtonPlaceBelowGraphic = 3;
+ kControlBevelButtonPlaceAboveGraphic = 4;
+
+
+{ Data tags supported by the bevel button controls }
+const
+ kControlBevelButtonContentTag = $636F6E74 (* 'cont' *); { ButtonContentInfo}
+ kControlBevelButtonTransformTag = $7472616E (* 'tran' *); { IconTransformType}
+ kControlBevelButtonTextAlignTag = $74616C69 (* 'tali' *); { ButtonTextAlignment}
+ kControlBevelButtonTextOffsetTag = $746F6666 (* 'toff' *); { SInt16}
+ kControlBevelButtonGraphicAlignTag = $67616C69 (* 'gali' *); { ButtonGraphicAlignment}
+ kControlBevelButtonGraphicOffsetTag = $676F6666 (* 'goff' *); { Point}
+ kControlBevelButtonTextPlaceTag = $74706C63 (* 'tplc' *); { ButtonTextPlacement}
+ kControlBevelButtonMenuValueTag = $6D76616C (* 'mval' *); { SInt16}
+ kControlBevelButtonMenuHandleTag = $6D686E64 (* 'mhnd' *); { MenuRef}
+ kControlBevelButtonMenuRefTag = $6D686E64 (* 'mhnd' *); { MenuRef}
+ kControlBevelButtonCenterPopupGlyphTag = $70676C63 (* 'pglc' *); { Boolean: true = center, false = bottom right}
+
+{ These are tags in 1.0.1 or later }
+const
+ kControlBevelButtonLastMenuTag = $6C6D6E75 (* 'lmnu' *); { SInt16: menuID of last menu item selected from}
+ kControlBevelButtonMenuDelayTag = $6D646C79 (* 'mdly' *); { SInt32: ticks to delay before menu appears}
+
+{ tags available with Appearance 1.1 or later }
+const
+{ Boolean: True = if an icon of the ideal size for}
+ { the button isn't available, scale a larger or}
+ { smaller icon to the ideal size. False = don't}
+ { scale; draw a smaller icon or clip a larger icon.}
+ { Default is false. Only applies to IconSuites and}
+ kControlBevelButtonScaleIconTag = $7363616C (* 'scal' *); { IconRefs.}
+
+{ tags available in Mac OS X and later }
+const
+ kControlBevelButtonOwnedMenuRefTag = $6F6D7266 (* 'omrf' *); { MenuRef (control will dispose)}
+ kControlBevelButtonKindTag = $6265626B (* 'bebk' *); { ThemeButtonKind ( kTheme[Small,Medium,Large,Rounded]BevelButton )}
+
+
+{
+ * Summary:
+ * Tags available with Mac OS X 10.3 or later
+ }
+const
+{
+ * Passed data is an Boolean. Gets or sets whether or not the
+ * associated menu is a multi-value menu or not. True means that the
+ * menu can have multiple selections.
+ }
+ kControlBevelButtonIsMultiValueMenuTag = $6D756C74 (* 'mult' *);
+
+{ Helper routines are available only thru the shared library/glue. }
+{
+ * GetBevelButtonMenuValue()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetBevelButtonMenuValue( inButton: ControlRef; var outValue: SInt16 ): OSErr; external name '_GetBevelButtonMenuValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetBevelButtonMenuValue()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetBevelButtonMenuValue( inButton: ControlRef; inValue: SInt16 ): OSErr; external name '_SetBevelButtonMenuValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetBevelButtonMenuHandle()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetBevelButtonMenuHandle( inButton: ControlRef; var outHandle: MenuHandle ): OSErr; external name '_GetBevelButtonMenuHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+function GetBevelButtonMenuRef__NAME__GetBevelButtonMenuHandle( possibleWindow: WindowRef ): Boolean; external name '_GetBevelButtonMenuRef__NAME__GetBevelButtonMenuHandle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * GetBevelButtonContentInfo()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetBevelButtonContentInfo( inButton: ControlRef; outContent: ControlButtonContentInfoPtr ): OSErr; external name '_GetBevelButtonContentInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetBevelButtonContentInfo()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetBevelButtonContentInfo( inButton: ControlRef; inContent: ControlButtonContentInfoPtr ): OSErr; external name '_SetBevelButtonContentInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetBevelButtonTransform()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetBevelButtonTransform( inButton: ControlRef; transform: IconTransformType ): OSErr; external name '_SetBevelButtonTransform';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetBevelButtonGraphicAlignment()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetBevelButtonGraphicAlignment( inButton: ControlRef; inAlign: ControlButtonGraphicAlignment; inHOffset: SInt16; inVOffset: SInt16 ): OSErr; external name '_SetBevelButtonGraphicAlignment';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetBevelButtonTextAlignment()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetBevelButtonTextAlignment( inButton: ControlRef; inAlign: ControlButtonTextAlignment; inHOffset: SInt16 ): OSErr; external name '_SetBevelButtonTextAlignment';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetBevelButtonTextPlacement()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetBevelButtonTextPlacement( inButton: ControlRef; inWhere: ControlButtonTextPlacement ): OSErr; external name '_SetBevelButtonTextPlacement';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ SLIDER (CDEF 3) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ There are several variants that control the behavior of the slider control. Any }
+{ combination of the following three constants can be added to the basic CDEF ID }
+{ (kSliderProc). }
+{ Variants: }
+{ kSliderLiveFeedback Slider does not use "ghosted" indicator when tracking. }
+{ ActionProc is called (set via SetControlAction) as the }
+{ indicator is dragged. The value is updated so that the }
+{ actionproc can adjust some other property based on the }
+{ value each time the action proc is called. If no action }
+{ proc is installed, it reverts to the ghost indicator. }
+{ kSliderHasTickMarks Slider is drawn with 'tick marks'. The control }
+{ rectangle must be large enough to accomidate the tick }
+{ marks. }
+{ kSliderReverseDirection Slider thumb points in opposite direction than normal. }
+{ If the slider is vertical, the thumb will point to the }
+{ left, if the slider is horizontal, the thumb will point }
+{ upwards. }
+{ kSliderNonDirectional This option overrides the kSliderReverseDirection and }
+{ kSliderHasTickMarks variants. It creates an indicator }
+{ which is rectangular and doesn't point in any direction }
+{ like the normal indicator does. }
+{ Mac OS X has a "Scroll to here" option in the General pane of System Preferences }
+{ which allows users to click in the page up/down regions of a slider and have the }
+{ thumb/indicator jump directly to the clicked position, which alters the value of }
+{ the slider and moves any associated content appropriately. As long as the mouse }
+{ button is held down, the click is treated as though the user had clicked in the }
+{ thumb/indicator in the first place. }
+{ If you want the sliders in your application to work with the "Scroll to here" }
+{ option, you must do the following: }
+{ 1. Create live-tracking sliders, not sliders that show a "ghost" thumb when you }
+{ click on it. You can request live-tracking sliders by passing true in the }
+{ liveTracking parameter to CreateSliderControl. If you create sliders with }
+{ NewControl, use the kControlSliderLiveFeedback variant. }
+{ 2. Write an appropriate ControlActionProc and associate it with your slider via }
+{ the SetControlAction API. This allows your application to update its content }
+{ appropriately when the live-tracking slider is clicked. }
+{ 3. When calling HandleControlClick or TrackControl, pass -1 in the action proc }
+{ parameter. This is a request for the Control Manager to use the action proc you }
+{ associated with your control in step 2. If you rely on the standard window event }
+{ handler to do your control tracking, this step is handled for you automatically. }
+{ Slider proc ID and variants }
+const
+ kControlSliderProc = 48;
+ kControlSliderLiveFeedback = 1 shl 0;
+ kControlSliderHasTickMarks = 1 shl 1;
+ kControlSliderReverseDirection = 1 shl 2;
+ kControlSliderNonDirectional = 1 shl 3;
+
+{ Slider Orientation }
+type
+ ControlSliderOrientation = UInt16;
+const
+ kControlSliderPointsDownOrRight = 0;
+ kControlSliderPointsUpOrLeft = 1;
+ kControlSliderDoesNotPoint = 2;
+
+{ Control Kind Tag }
+const
+ kControlKindSlider = $736C6472 (* 'sldr' *);
+
+{ The HIObject class ID for the HISlider class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHISliderClassID CFSTRP('com.apple.HISlider')}
+{$endc}
+{ Creation API: Carbon Only }
+{
+ * CreateSliderControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateSliderControl( window: WindowRef; const (*var*) boundsRect: Rect; value: SInt32; minimum: SInt32; maximum: SInt32; orientation: ControlSliderOrientation; numTickMarks: UInt16; liveTracking: Boolean; liveTrackingProc: ControlActionUPP; var outControl: ControlRef ): OSStatus; external name '_CreateSliderControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ DISCLOSURE TRIANGLE (CDEF 4) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This control can be used as either left or right facing. It can also handle its own }
+{ tracking if you wish. This means that when the 'autotoggle' variant is used, if the }
+{ user clicks the control, it's state will change automatically from open to closed }
+{ and vice-versa depending on its initial state. After a successful call to Track- }
+{ Control, you can just check the current value to see what state it was switched to. }
+{ Triangle proc IDs }
+const
+ kControlTriangleProc = 64;
+ kControlTriangleLeftFacingProc = 65;
+ kControlTriangleAutoToggleProc = 66;
+ kControlTriangleLeftFacingAutoToggleProc = 67;
+
+type
+ ControlDisclosureTriangleOrientation = UInt16;
+const
+ kControlDisclosureTrianglePointDefault = 0; { points right on a left-to-right script system (Mac OS X and later or CarbonLib 1.5 and later only)}
+ kControlDisclosureTrianglePointRight = 1;
+ kControlDisclosureTrianglePointLeft = 2;
+
+{ Control Kind Tag }
+const
+ kControlKindDisclosureTriangle = $64697374 (* 'dist' *);
+
+{ The HIObject class ID for the HIDisclosureTriangle class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIDisclosureTriangleClassID CFSTRP('com.apple.HIDisclosureTriangle')}
+{$endc}
+{
+ * CreateDisclosureTriangleControl()
+ *
+ * Summary:
+ * Creates a Disclosure Triangle control at a specific position in
+ * the specified window.
+ *
+ * Discussion:
+ * Disclosure Triangles are small controls that give the user a way
+ * to toggle the visibility of information or other user interface.
+ * When information is in a hidden state, a Disclosure Triangle is
+ * considered "closed" and should point to the right (or sometimes
+ * to the left). When the user clicks on it, the Disclosure Triangle
+ * rotates downwards into the "open" state. The application should
+ * repond by revealing the appropriate information or interface. On
+ * Mac OS X, a root control will be created for the window if one
+ * does not already exist. If a root control exists for the window,
+ * the Disclosure Triangle control will be embedded into it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The WindowRef into which the Disclosure Triangle will be
+ * created.
+ *
+ * inBoundsRect:
+ * The desired position (in coordinates local to the window's
+ * port) for the Disclosure Triangle.
+ *
+ * inOrientation:
+ * The direction the Disclosure Triangle should point when it is
+ * "closed". Passing kControlDisclosureTrianglePointDefault is
+ * only legal as of Mac OS X and CarbonLib 1.5.
+ *
+ * inTitle:
+ * The title for the Disclosure Triangle. The title will only be
+ * displayed if the inDrawTitle parameter is true. Title display
+ * only works on Mac OS X.
+ *
+ * inInitialValue:
+ * The starting value determines whether the Disclosure Triangle
+ * is initially in its "open" or "closed" state. The value 0
+ * represents the "closed" state and 1 represents the "open" state.
+ *
+ * inDrawTitle:
+ * A Boolean indicating whether the Disclosure Triangle should
+ * draw its title next to the widget. Title display only works on
+ * Mac OS X.
+ *
+ * inAutoToggles:
+ * A Boolean indicating whether the Disclosure Triangle should
+ * change its own value (from "open" to "closed" and vice-versa)
+ * automatically when it is clicked on.
+ *
+ * outControl:
+ * On successful output, outControl will contain a reference to
+ * the Disclosure Triangle control.
+ *
+ * Result:
+ * An OSStatus code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateDisclosureTriangleControl( inWindow: WindowRef; const (*var*) inBoundsRect: Rect; inOrientation: ControlDisclosureTriangleOrientation; inTitle: CFStringRef; inInitialValue: SInt32; inDrawTitle: Boolean; inAutoToggles: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateDisclosureTriangleControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Tagged data supported by disclosure triangles }
+const
+ kControlTriangleLastValueTag = $6C617374 (* 'last' *); { SInt16}
+
+{ Helper routines are available only thru the shared library/glue. }
+{
+ * SetDisclosureTriangleLastValue()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetDisclosureTriangleLastValue( inTabControl: ControlRef; inValue: SInt16 ): OSErr; external name '_SetDisclosureTriangleLastValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ PROGRESS INDICATOR (CDEF 5) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This CDEF implements both determinate and indeterminate progress bars. To switch, }
+{ just use SetControlData to set the indeterminate flag to make it indeterminate. Any }
+{ animation will automatically be handled by the toolbox on an event timer. }
+{ We also use this same CDEF for Relevance bars. At this time this control does not }
+{ idle. }
+{ Progress Bar proc IDs }
+const
+ kControlProgressBarProc = 80;
+ kControlRelevanceBarProc = 81;
+
+{ Control Kind Tag }
+const
+ kControlKindProgressBar = $70726762 (* 'prgb' *);
+ kControlKindRelevanceBar = $72656C62 (* 'relb' *);
+
+{ The HIObject class ID for the HIProgressBar class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIProgressBarClassID CFSTRP('com.apple.HIProgressBar')}
+{$endc}
+{ Creation API: Carbon only }
+{
+ * CreateProgressBarControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateProgressBarControl( window: WindowRef; const (*var*) boundsRect: Rect; value: SInt32; minimum: SInt32; maximum: SInt32; indeterminate: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateProgressBarControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ The HIObject class ID for the HIRelevanceBar class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIRelevanceBarClassID CFSTRP('com.apple.HIRelevanceBar')}
+{$endc}
+{
+ * CreateRelevanceBarControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateRelevanceBarControl( window: WindowRef; const (*var*) boundsRect: Rect; value: SInt32; minimum: SInt32; maximum: SInt32; var outControl: ControlRef ): OSStatus; external name '_CreateRelevanceBarControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Tagged data supported by progress bars }
+const
+ kControlProgressBarIndeterminateTag = $696E6465 (* 'inde' *); { Boolean}
+ kControlProgressBarAnimatingTag = $616E696D (* 'anim' *); { Boolean}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ LITTLE ARROWS (CDEF 6) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This control implements the little up and down arrows you'd see in the Memory }
+{ control panel for adjusting the cache size. }
+{ Little Arrows proc IDs }
+const
+ kControlLittleArrowsProc = 96;
+
+{ Control Kind Tag }
+const
+ kControlKindLittleArrows = $6C617272 (* 'larr' *);
+
+
+{
+ * Summary:
+ * Tags available with Mac OS X 10.3 or later
+ }
+const
+{
+ * Passed data is an SInt32. Gets or sets the increment value of the
+ * control.
+ }
+ kControlLittleArrowsIncrementValueTag = $696E6372 (* 'incr' *);
+
+{ The HIObject class ID for the HILittleArrows class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHILittleArrowsClassID CFSTRP('com.apple.HILittleArrows')}
+{$endc}
+{ Creation API: Carbon only }
+{
+ * CreateLittleArrowsControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateLittleArrowsControl( window: WindowRef; const (*var*) boundsRect: Rect; value: SInt32; minimum: SInt32; maximum: SInt32; increment: SInt32; var outControl: ControlRef ): OSStatus; external name '_CreateLittleArrowsControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ CHASING ARROWS (CDEF 7) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This control will automatically animate via an event loop timer. }
+{ Chasing Arrows proc IDs }
+const
+ kControlChasingArrowsProc = 112;
+
+{ Control Kind Tag }
+const
+ kControlKindChasingArrows = $63617272 (* 'carr' *);
+
+{ The HIObject class ID for the HIChasingArrows class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIChasingArrowsClassID CFSTRP('com.apple.HIChasingArrows')}
+{$endc}
+{ Creation API: Carbon only }
+{
+ * CreateChasingArrowsControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateChasingArrowsControl( window: WindowRef; const (*var*) boundsRect: Rect; var outControl: ControlRef ): OSStatus; external name '_CreateChasingArrowsControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Tagged data supported by the Chasing Arrows control }
+const
+ kControlChasingArrowsAnimatingTag = $616E696D (* 'anim' *); { Boolean}
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ TABS (CDEF 8) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Tabs use an auxiliary resource (tab#) to hold tab information such as the tab name }
+{ and an icon suite ID for each tab. }
+{ The ID of the tab# resource that you wish to associate with a tab control should }
+{ be passed in as the Value parameter of the control. If you are using GetNewControl, }
+{ then the Value slot in the CNTL resource should have the ID of the 'tab#' resource }
+{ on creation. }
+{ Passing zero in for the tab# resource tells the control not to read in a tab# res. }
+{ You can then use SetControlMaximum to add tabs, followed by a call to SetControlData}
+{ with the kControlTabInfoTag, passing in a pointer to a ControlTabInfoRec. This sets }
+{ the name and optionally an icon for a tab. Pass the 1-based tab index as the part }
+{ code parameter to SetControlData to indicate the tab that you want to modify. }
+{ Accessibility Notes: Those of you who wish to customize the accessibility }
+{ information provided for individual tabs of a tabs control -- by handling various }
+{ kEventClassAccessibility Carbon Events, by calling }
+{ HIObjectSetAuxiliaryAccessibilityAttribute, etc. -- need to know how to interpret }
+{ and/or build AXUIElementRefs that represent individual tabs. The AXUIElement }
+{ representing an individual tab will/must be constructed using the tab control's }
+{ ControlRef and the UInt64 identifier of the one-based index of the tab the element }
+{ refers to. As usual, a UInt64 identifier of zero represents the tabs control as a }
+{ whole. You must neither interpret nor create tab control elements whose identifiers }
+{ are greater than the count of tabs in the tabs control. }
+{ Tabs proc IDs }
+const
+ kControlTabLargeProc = 128; { Large tab size, north facing }
+ kControlTabSmallProc = 129; { Small tab size, north facing }
+ kControlTabLargeNorthProc = 128; { Large tab size, north facing }
+ kControlTabSmallNorthProc = 129; { Small tab size, north facing }
+ kControlTabLargeSouthProc = 130; { Large tab size, south facing }
+ kControlTabSmallSouthProc = 131; { Small tab size, south facing }
+ kControlTabLargeEastProc = 132; { Large tab size, east facing }
+ kControlTabSmallEastProc = 133; { Small tab size, east facing }
+ kControlTabLargeWestProc = 134; { Large tab size, west facing }
+ kControlTabSmallWestProc = 135; { Small tab size, west facing }
+
+{ Tab Directions }
+type
+ ControlTabDirection = UInt16;
+const
+ kControlTabDirectionNorth = 0;
+ kControlTabDirectionSouth = 1;
+ kControlTabDirectionEast = 2;
+ kControlTabDirectionWest = 3;
+
+{ Tab Sizes }
+type
+ ControlTabSize = UInt16;
+const
+ kControlTabSizeLarge = kControlSizeNormal;
+ kControlTabSizeSmall = kControlSizeSmall;
+ kControlTabSizeMini = kControlSizeMini;
+
+{ Control Tab Entry - used during creation }
+{ Note that the client is responsible for allocating/providing }
+{ the ControlButtonContentInfo and string storage for this }
+{ structure. }
+type
+ ControlTabEntry = record
+ icon: ControlButtonContentInfoPtr;
+ name: CFStringRef;
+ enabled: Boolean;
+ end;
+{ Control Kind Tag }
+const
+ kControlKindTabs = $74616273 (* 'tabs' *);
+
+{ The HIObject class ID for the HITabbedView class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHITabbedViewClassID CFSTRP('com.apple.HITabbedView')}
+{$endc}
+{ Creation API: Carbon only }
+{
+ * CreateTabsControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateTabsControl( window: WindowRef; const (*var*) boundsRect: Rect; size: ControlTabSize; direction: ControlTabDirection; numTabs: UInt16; const (*var*) tabArray: ControlTabEntry; var outControl: ControlRef ): OSStatus; external name '_CreateTabsControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Tagged data supported by tabs }
+const
+ kControlTabContentRectTag = $72656374 (* 'rect' *); { Rect}
+ kControlTabEnabledFlagTag = $656E6162 (* 'enab' *); { Boolean}
+ kControlTabFontStyleTag = kControlFontStyleTag; { ControlFontStyleRec}
+
+{ New tags in 1.0.1 or later }
+const
+ kControlTabInfoTag = $74616269 (* 'tabi' *); { ControlTabInfoRec}
+
+{ New tags in X 10.1 or later }
+const
+ kControlTabImageContentTag = $636F6E74 (* 'cont' *); { ControlButtonContentInfo}
+
+const
+ kControlTabInfoVersionZero = 0; { ControlTabInfoRec}
+ kControlTabInfoVersionOne = 1; { ControlTabInfoRecV1}
+
+type
+ ControlTabInfoRecPtr = ^ControlTabInfoRec;
+ ControlTabInfoRec = record
+ version: SInt16; { version of this structure.}
+ iconSuiteID: SInt16; { icon suite to use. Zero indicates no icon}
+ name: Str255; { name to be displayed on the tab}
+ end;
+type
+ ControlTabInfoRecV1Ptr = ^ControlTabInfoRecV1;
+ ControlTabInfoRecV1 = record
+ version: SInt16; { version of this structure. == kControlTabInfoVersionOne}
+ iconSuiteID: SInt16; { icon suite to use. Zero indicates no icon}
+ name: CFStringRef; { name to be displayed on the tab. Will be retained so caller}
+ { should always release it.}
+ end;
+{ Helper routines are available only thru the shared library/glue. }
+{
+ * GetTabContentRect()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetTabContentRect( inTabControl: ControlRef; var outContentRect: Rect ): OSErr; external name '_GetTabContentRect';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetTabEnabled()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetTabEnabled( inTabControl: ControlRef; inTabToHilite: SInt16; inEnabled: Boolean ): OSErr; external name '_SetTabEnabled';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ VISUAL SEPARATOR (CDEF 9) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Separator lines determine their orientation (horizontal or vertical) automatically }
+{ based on the relative height and width of their contrlRect. }
+{ Visual separator proc IDs }
+const
+ kControlSeparatorLineProc = 144;
+
+{ Control Kind Tag }
+const
+ kControlKindSeparator = $73657061 (* 'sepa' *);
+
+{ The HIObject class ID for the HIVisualSeparator class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIVisualSeparatorClassID CFSTRP('com.apple.HIVisualSeparator')}
+{$endc}
+{ Creation API: Carbon only }
+{
+ * CreateSeparatorControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateSeparatorControl( window: WindowRef; const (*var*) boundsRect: Rect; var outControl: ControlRef ): OSStatus; external name '_CreateSeparatorControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ GROUP BOX (CDEF 10) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ The group box CDEF can be use in several ways. It can have no title, a text title, }
+{ a check box as the title, or a popup button as a title. There are two versions of }
+{ group boxes, primary and secondary, which look slightly different. }
+{ Group Box proc IDs }
+const
+ kControlGroupBoxTextTitleProc = 160;
+ kControlGroupBoxCheckBoxProc = 161;
+ kControlGroupBoxPopupButtonProc = 162;
+ kControlGroupBoxSecondaryTextTitleProc = 164;
+ kControlGroupBoxSecondaryCheckBoxProc = 165;
+ kControlGroupBoxSecondaryPopupButtonProc = 166;
+
+{ Control Kind Tag }
+const
+ kControlKindGroupBox = $67727062 (* 'grpb' *);
+ kControlKindCheckGroupBox = $63677270 (* 'cgrp' *);
+ kControlKindPopupGroupBox = $70677270 (* 'pgrp' *);
+
+{ The HIObject class ID for the HIGroupBox class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIGroupBoxClassID CFSTRP('com.apple.HIGroupBox')}
+{$endc}
+{ The HIObject class ID for the HICheckBoxGroup class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHICheckBoxGroupClassID CFSTRP('com.apple.HICheckBoxGroup')}
+{$endc}
+{ Creation APIs: Carbon only }
+{
+ * CreateGroupBoxControl()
+ *
+ * Summary:
+ * Creates a group box control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window that should contain the control.
+ *
+ * boundsRect:
+ * The bounding box of the control.
+ *
+ * title:
+ * The title of the control.
+ *
+ * primary:
+ * Whether to create a primary or secondary group box.
+ *
+ * outControl:
+ * On exit, contains the new control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateGroupBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef; primary: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateGroupBoxControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CreateCheckGroupBoxControl()
+ *
+ * Summary:
+ * Creates a group box control that has a check box as its title.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window that should contain the control.
+ *
+ * boundsRect:
+ * The bounding box of the control.
+ *
+ * title:
+ * The title of the control (used as the title of the check box).
+ *
+ * initialValue:
+ * The initial value of the check box.
+ *
+ * primary:
+ * Whether to create a primary or secondary group box.
+ *
+ * autoToggle:
+ * Whether to create an auto-toggling check box. Auto-toggling
+ * check box titles are only supported on Mac OS X; this parameter
+ * must be false when used with CarbonLib.
+ *
+ * outControl:
+ * On exit, contains the new control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateCheckGroupBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef; initialValue: SInt32; primary: Boolean; autoToggle: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateCheckGroupBoxControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CreatePopupGroupBoxControl()
+ *
+ * Summary:
+ * Creates a group box control that has a popup button as its title.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window that should contain the control.
+ *
+ * boundsRect:
+ * The bounding box of the control.
+ *
+ * title:
+ * The title of the control (used as the title of the popup
+ * button).
+ *
+ * primary:
+ * Whether to create a primary or secondary group box.
+ *
+ * menuID:
+ * The menu ID of the menu to be displayed by the popup button.
+ *
+ * variableWidth:
+ * Whether the popup button should have a variable-width title.
+ * Fixed-width titles are only supported by Mac OS X; this
+ * parameter must be true when used with CarbonLib.
+ *
+ * titleWidth:
+ * The width in pixels of the popup button title.
+ *
+ * titleJustification:
+ * The justification of the popup button title. Use one of the
+ * TextEdit justification constants here (teFlushDefault,
+ * teCenter, teFlushRight, or teFlushLeft).
+ *
+ * titleStyle:
+ * The QuickDraw text style of the popup button title.
+ *
+ * outControl:
+ * On exit, contains the new control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreatePopupGroupBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef; primary: Boolean; menuID: SInt16; variableWidth: Boolean; titleWidth: SInt16; titleJustification: SInt16; titleStyle: Style; var outControl: ControlRef ): OSStatus; external name '_CreatePopupGroupBoxControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Tagged data supported by group box }
+const
+ kControlGroupBoxMenuHandleTag = $6D68616E (* 'mhan' *); { MenuRef (popup title only)}
+ kControlGroupBoxMenuRefTag = $6D68616E (* 'mhan' *); { MenuRef (popup title only)}
+ kControlGroupBoxFontStyleTag = kControlFontStyleTag; { ControlFontStyleRec}
+
+{ tags available with Appearance 1.1 or later }
+const
+ kControlGroupBoxTitleRectTag = $74726563 (* 'trec' *); { Rect. Rectangle that the title text/control is drawn in. (get only)}
+
+
+{
+ * Summary:
+ * Tags available with Mac OS X 10.3 or later
+ }
+const
+{
+ * Passed data is a Rect. Returns the full rectangle that content is
+ * drawn in (get only). This is slightly different than the content
+ * region, as it also includes the frame drawn around the content.
+ }
+ kControlGroupBoxFrameRectTag = $66726563 (* 'frec' *);
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ IMAGE WELL (CDEF 11) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Image Wells allow you to control the content type (pict/icon/etc.) shown in the }
+{ well. }
+{ This is made possible by overloading the Min and Value parameters for the control. }
+{ Parameter What Goes Here }
+{ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
+{ Min content type (see constants for bevel buttons) }
+{ Value Resource ID of content type, if resource-based. }
+{ Handle-based Content }
+{ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
+{ You can create your control and then set the content to an existing handle to an }
+{ icon suite, etc. using the macros below. Please keep in mind that resource-based }
+{ content is owned by the control, handle-based content is owned by you. The CDEF will}
+{ not try to dispose of handle-based content. If you are changing the content type of }
+{ the button on the fly, you must make sure that if you are replacing a handle- }
+{ based content with a resource-based content to properly dispose of the handle, }
+{ else a memory leak will ensue. }
+{ Image Well proc IDs }
+const
+ kControlImageWellProc = 176;
+
+{ Control Kind Tag }
+const
+ kControlKindImageWell = $77656C6C (* 'well' *);
+
+{ The HIObject class ID for the HIImageWell class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIImageWellClassID CFSTRP('com.apple.HIImageWell')}
+{$endc}
+{ Creation API: Carbon only }
+{
+ * CreateImageWellControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateImageWellControl( window: WindowRef; const (*var*) boundsRect: Rect; const (*var*) info: ControlButtonContentInfo; var outControl: ControlRef ): OSStatus; external name '_CreateImageWellControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Tagged data supported by image wells }
+const
+ kControlImageWellContentTag = $636F6E74 (* 'cont' *); { ButtonContentInfo}
+ kControlImageWellTransformTag = $7472616E (* 'tran' *); { IconTransformType}
+ kControlImageWellIsDragDestinationTag = $64726167 (* 'drag' *); { Boolean}
+
+{ Helper routines are available only thru the shared library/glue. }
+{
+ * GetImageWellContentInfo()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function GetImageWellContentInfo( inButton: ControlRef; outContent: ControlButtonContentInfoPtr ): OSErr; external name '_GetImageWellContentInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetImageWellContentInfo()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetImageWellContentInfo( inButton: ControlRef; inContent: ControlButtonContentInfoPtr ): OSErr; external name '_SetImageWellContentInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetImageWellTransform()
+ *
+ * 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
+ * Non-Carbon CFM: in AppearanceLib 1.0 and later
+ }
+function SetImageWellTransform( inButton: ControlRef; inTransform: IconTransformType ): OSErr; external name '_SetImageWellTransform';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ POPUP ARROW (CDEF 12) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ The popup arrow CDEF is used to draw the small arrow normally associated with a }
+{ popup control. The arrow can point in four directions, and a small or large version }
+{ can be used. This control is provided to allow clients to draw the arrow in a }
+{ normalized fashion which will take advantage of themes automatically. }
+{ Popup Arrow proc IDs }
+const
+ kControlPopupArrowEastProc = 192;
+ kControlPopupArrowWestProc = 193;
+ kControlPopupArrowNorthProc = 194;
+ kControlPopupArrowSouthProc = 195;
+ kControlPopupArrowSmallEastProc = 196;
+ kControlPopupArrowSmallWestProc = 197;
+ kControlPopupArrowSmallNorthProc = 198;
+ kControlPopupArrowSmallSouthProc = 199;
+
+{ Popup Arrow Orientations }
+const
+ kControlPopupArrowOrientationEast = 0;
+ kControlPopupArrowOrientationWest = 1;
+ kControlPopupArrowOrientationNorth = 2;
+ kControlPopupArrowOrientationSouth = 3;
+
+
+type
+ ControlPopupArrowOrientation = UInt16;
+{ Popup Arrow Size }
+const
+ kControlPopupArrowSizeNormal = 0;
+ kControlPopupArrowSizeSmall = 1;
+
+type
+ ControlPopupArrowSize = UInt16;
+{ Control Kind Tag }
+const
+ kControlKindPopupArrow = $70617272 (* 'parr' *);
+
+{
+ * CreatePopupArrowControl()
+ *
+ * Summary:
+ * Creates a popup arrow control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window that should contain the control. May be NULL on 10.3
+ * and later.
+ *
+ * boundsRect:
+ * The bounding box of the control.
+ *
+ * orientation:
+ * The orientation of the control.
+ *
+ * size:
+ * The size of the control.
+ *
+ * outControl:
+ * On exit, contains the new control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreatePopupArrowControl( window: WindowRef { can be NULL }; const (*var*) boundsRect: Rect; orientation: ControlPopupArrowOrientation; size: ControlPopupArrowSize; var outControl: ControlRef ): OSStatus; external name '_CreatePopupArrowControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ PLACARD (CDEF 14) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Placard proc IDs }
+const
+ kControlPlacardProc = 224;
+
+{ Control Kind Tag }
+const
+ kControlKindPlacard = $706C6163 (* 'plac' *);
+
+{ The HIObject class ID for the HIPlacardView class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIPlacardViewClassID CFSTRP('com.apple.HIPlacardView')}
+{$endc}
+{
+ * CreatePlacardControl()
+ *
+ * Summary:
+ * Creates a placard control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window that should contain the control. May be NULL on 10.3
+ * and later.
+ *
+ * boundsRect:
+ * The bounding box of the control.
+ *
+ * outControl:
+ * On exit, contains the new control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreatePlacardControl( window: WindowRef { can be NULL }; const (*var*) boundsRect: Rect; var outControl: ControlRef ): OSStatus; external name '_CreatePlacardControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ CLOCK (CDEF 15) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ NOTE: You can specify more options in the Value paramter when creating the clock. }
+{ See below. }
+{ NOTE: Under Appearance 1.1, the clock control knows and returns more part codes. }
+{ The new clock-specific part codes are defined with the other control parts. }
+{ Besides these clock-specific parts, we also return kControlUpButtonPart }
+{ and kControlDownButtonPart when they hit the up and down arrows. }
+{ The new part codes give you more flexibility for focusing and hit testing. }
+{ The original kControlClockPart is still valid. When hit testing, it means }
+{ that some non-editable area of the clock's whitespace has been clicked. }
+{ When focusing a currently unfocused clock, it changes the focus to the }
+{ first part; it is the same as passing kControlFocusNextPart. When }
+{ re-focusing a focused clock, it will not change the focus at all. }
+{ Clock proc IDs }
+const
+ kControlClockTimeProc = 240;
+ kControlClockTimeSecondsProc = 241;
+ kControlClockDateProc = 242;
+ kControlClockMonthYearProc = 243;
+
+{ Clock Types }
+type
+ ControlClockType = UInt16;
+const
+ kControlClockTypeHourMinute = 0;
+ kControlClockTypeHourMinuteSecond = 1;
+ kControlClockTypeMonthDayYear = 2;
+ kControlClockTypeMonthYear = 3;
+
+{ Clock Flags }
+{ These flags can be passed into 'value' field on creation of the control. }
+{ Value is set to 0 after control is created. }
+type
+ ControlClockFlags = UInt32;
+const
+ kControlClockFlagStandard = 0; { editable, non-live}
+ kControlClockNoFlags = 0;
+ kControlClockFlagDisplayOnly = 1; { add this to become non-editable}
+ kControlClockIsDisplayOnly = 1;
+ kControlClockFlagLive = 2; { automatically shows current time on idle. only valid with display only.}
+ kControlClockIsLive = 2;
+
+{ Control Kind Tag }
+const
+ kControlKindClock = $636C636B (* 'clck' *);
+
+{ The HIObject class ID for the HIClock class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIClockViewClassID CFSTRP('com.apple.HIClock')}
+{$endc}
+{ Creation API: Carbon only }
+{
+ * CreateClockControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateClockControl( window: WindowRef; const (*var*) boundsRect: Rect; clockType: ControlClockType; clockFlags: ControlClockFlags; var outControl: ControlRef ): OSStatus; external name '_CreateClockControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Tagged data supported by clocks }
+const
+ kControlClockLongDateTag = $64617465 (* 'date' *); { LongDateRec}
+ kControlClockFontStyleTag = kControlFontStyleTag; { ControlFontStyleRec}
+ kControlClockAnimatingTag = $616E696D (* 'anim' *); { Boolean}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ USER PANE (CDEF 16) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ User panes have two primary purposes: to allow easy implementation of a custom }
+{ control by the developer, and to provide a generic container for embedding other }
+{ controls. }
+{ In Carbon, with the advent of Carbon-event-based controls, you may find it easier }
+{ to simply write a new control from scratch than to customize a user pane control. }
+{ The set of callbacks provided by the user pane will not be extended to support }
+{ new Control Manager features; instead, you should just write a real control. }
+{ User panes do not, by default, support embedding. If you try to embed a control }
+{ into a user pane, you will get back errControlIsNotEmbedder. You can make a user }
+{ pane support embedding by passing the kControlSupportsEmbedding flag in the 'value' }
+{ parameter when you create the control. }
+{ User panes support the following overloaded control initialization options: }
+{ Parameter What Goes Here }
+{ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
+{ Value Control feature flags }
+
+{ User Pane proc IDs }
+const
+ kControlUserPaneProc = 256;
+
+{ Control Kind Tag }
+const
+ kControlKindUserPane = $7570616E (* 'upan' *);
+
+{ The HIObject class ID for the HIUserPane class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIUserPaneClassID CFSTRP('com.apple.HIUserPane')}
+{$endc}
+{ Creation API: Carbon only }
+{
+ * CreateUserPaneControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateUserPaneControl( window: WindowRef; const (*var*) boundsRect: Rect; features: UInt32; var outControl: ControlRef ): OSStatus; external name '_CreateUserPaneControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Tagged data supported by user panes }
+{ Currently, they are all proc ptrs for doing things like drawing and hit testing, etc. }
+const
+ kControlUserItemDrawProcTag = $75696470 (* 'uidp' *); { UserItemUPP}
+ kControlUserPaneDrawProcTag = $64726177 (* 'draw' *); { ControlUserPaneDrawUPP}
+ kControlUserPaneHitTestProcTag = $68697474 (* 'hitt' *); { ControlUserPaneHitTestUPP}
+ kControlUserPaneTrackingProcTag = $7472616B (* 'trak' *); { ControlUserPaneTrackingUPP}
+ kControlUserPaneIdleProcTag = $69646C65 (* 'idle' *); { ControlUserPaneIdleUPP}
+ kControlUserPaneKeyDownProcTag = $6B657964 (* 'keyd' *); { ControlUserPaneKeyDownUPP}
+ kControlUserPaneActivateProcTag = $61637469 (* 'acti' *); { ControlUserPaneActivateUPP}
+ kControlUserPaneFocusProcTag = $666F6369 (* 'foci' *); { ControlUserPaneFocusUPP}
+ kControlUserPaneBackgroundProcTag = $6261636B (* 'back' *); { ControlUserPaneBackgroundUPP}
+
+type
+ ControlUserPaneDrawProcPtr = procedure( control: ControlRef; part: SInt16 );
+type
+ ControlUserPaneHitTestProcPtr = function( control: ControlRef; where: Point ): ControlPartCode;
+type
+ ControlUserPaneTrackingProcPtr = function( control: ControlRef; startPt: Point; actionProc: ControlActionUPP ): ControlPartCode;
+type
+ ControlUserPaneIdleProcPtr = procedure( control: ControlRef );
+type
+ ControlUserPaneKeyDownProcPtr = function( control: ControlRef; keyCode: SInt16; charCode: SInt16; modifiers: SInt16 ): ControlPartCode;
+type
+ ControlUserPaneActivateProcPtr = procedure( control: ControlRef; activating: Boolean );
+type
+ ControlUserPaneFocusProcPtr = function( control: ControlRef; action: ControlFocusPart ): ControlPartCode;
+type
+ ControlUserPaneBackgroundProcPtr = procedure( control: ControlRef; info: ControlBackgroundPtr );
+type
+ ControlUserPaneDrawUPP = ControlUserPaneDrawProcPtr;
+type
+ ControlUserPaneHitTestUPP = ControlUserPaneHitTestProcPtr;
+type
+ ControlUserPaneTrackingUPP = ControlUserPaneTrackingProcPtr;
+type
+ ControlUserPaneIdleUPP = ControlUserPaneIdleProcPtr;
+type
+ ControlUserPaneKeyDownUPP = ControlUserPaneKeyDownProcPtr;
+type
+ ControlUserPaneActivateUPP = ControlUserPaneActivateProcPtr;
+type
+ ControlUserPaneFocusUPP = ControlUserPaneFocusProcPtr;
+type
+ ControlUserPaneBackgroundUPP = ControlUserPaneBackgroundProcPtr;
+{
+ * NewControlUserPaneDrawUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewControlUserPaneDrawUPP( userRoutine: ControlUserPaneDrawProcPtr ): ControlUserPaneDrawUPP; external name '_NewControlUserPaneDrawUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewControlUserPaneHitTestUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewControlUserPaneHitTestUPP( userRoutine: ControlUserPaneHitTestProcPtr ): ControlUserPaneHitTestUPP; external name '_NewControlUserPaneHitTestUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewControlUserPaneTrackingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewControlUserPaneTrackingUPP( userRoutine: ControlUserPaneTrackingProcPtr ): ControlUserPaneTrackingUPP; external name '_NewControlUserPaneTrackingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewControlUserPaneIdleUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewControlUserPaneIdleUPP( userRoutine: ControlUserPaneIdleProcPtr ): ControlUserPaneIdleUPP; external name '_NewControlUserPaneIdleUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewControlUserPaneKeyDownUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewControlUserPaneKeyDownUPP( userRoutine: ControlUserPaneKeyDownProcPtr ): ControlUserPaneKeyDownUPP; external name '_NewControlUserPaneKeyDownUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewControlUserPaneActivateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewControlUserPaneActivateUPP( userRoutine: ControlUserPaneActivateProcPtr ): ControlUserPaneActivateUPP; external name '_NewControlUserPaneActivateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewControlUserPaneFocusUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewControlUserPaneFocusUPP( userRoutine: ControlUserPaneFocusProcPtr ): ControlUserPaneFocusUPP; external name '_NewControlUserPaneFocusUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewControlUserPaneBackgroundUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewControlUserPaneBackgroundUPP( userRoutine: ControlUserPaneBackgroundProcPtr ): ControlUserPaneBackgroundUPP; external name '_NewControlUserPaneBackgroundUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeControlUserPaneDrawUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeControlUserPaneDrawUPP( userUPP: ControlUserPaneDrawUPP ); external name '_DisposeControlUserPaneDrawUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeControlUserPaneHitTestUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeControlUserPaneHitTestUPP( userUPP: ControlUserPaneHitTestUPP ); external name '_DisposeControlUserPaneHitTestUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeControlUserPaneTrackingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeControlUserPaneTrackingUPP( userUPP: ControlUserPaneTrackingUPP ); external name '_DisposeControlUserPaneTrackingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeControlUserPaneIdleUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeControlUserPaneIdleUPP( userUPP: ControlUserPaneIdleUPP ); external name '_DisposeControlUserPaneIdleUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeControlUserPaneKeyDownUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeControlUserPaneKeyDownUPP( userUPP: ControlUserPaneKeyDownUPP ); external name '_DisposeControlUserPaneKeyDownUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeControlUserPaneActivateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeControlUserPaneActivateUPP( userUPP: ControlUserPaneActivateUPP ); external name '_DisposeControlUserPaneActivateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeControlUserPaneFocusUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeControlUserPaneFocusUPP( userUPP: ControlUserPaneFocusUPP ); external name '_DisposeControlUserPaneFocusUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeControlUserPaneBackgroundUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeControlUserPaneBackgroundUPP( userUPP: ControlUserPaneBackgroundUPP ); external name '_DisposeControlUserPaneBackgroundUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeControlUserPaneDrawUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeControlUserPaneDrawUPP( control: ControlRef; part: SInt16; userUPP: ControlUserPaneDrawUPP ); external name '_InvokeControlUserPaneDrawUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeControlUserPaneHitTestUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeControlUserPaneHitTestUPP( control: ControlRef; where: Point; userUPP: ControlUserPaneHitTestUPP ): ControlPartCode; external name '_InvokeControlUserPaneHitTestUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeControlUserPaneTrackingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeControlUserPaneTrackingUPP( control: ControlRef; startPt: Point; actionProc: ControlActionUPP; userUPP: ControlUserPaneTrackingUPP ): ControlPartCode; external name '_InvokeControlUserPaneTrackingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeControlUserPaneIdleUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeControlUserPaneIdleUPP( control: ControlRef; userUPP: ControlUserPaneIdleUPP ); external name '_InvokeControlUserPaneIdleUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeControlUserPaneKeyDownUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeControlUserPaneKeyDownUPP( control: ControlRef; keyCode: SInt16; charCode: SInt16; modifiers: SInt16; userUPP: ControlUserPaneKeyDownUPP ): ControlPartCode; external name '_InvokeControlUserPaneKeyDownUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeControlUserPaneActivateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeControlUserPaneActivateUPP( control: ControlRef; activating: Boolean; userUPP: ControlUserPaneActivateUPP ); external name '_InvokeControlUserPaneActivateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeControlUserPaneFocusUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function InvokeControlUserPaneFocusUPP( control: ControlRef; action: ControlFocusPart; userUPP: ControlUserPaneFocusUPP ): ControlPartCode; external name '_InvokeControlUserPaneFocusUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeControlUserPaneBackgroundUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeControlUserPaneBackgroundUPP( control: ControlRef; info: ControlBackgroundPtr; userUPP: ControlUserPaneBackgroundUPP ); external name '_InvokeControlUserPaneBackgroundUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+ ¥ EDIT TEXT (CDEF 17)
+ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
+}
+{ Edit Text proc IDs }
+const
+ kControlEditTextProc = 272;
+ kControlEditTextPasswordProc = 274;
+
+{ proc IDs available with Appearance 1.1 or later }
+const
+ kControlEditTextInlineInputProc = 276; { Can't combine with the other variants}
+
+{ Control Kind Tag }
+const
+ kControlKindEditText = $65747874 (* 'etxt' *);
+
+{
+ * CreateEditTextControl() *** DEPRECATED ***
+ *
+ * Deprecated:
+ * Use CreateEditUnicodeTextControl API instead.
+ *
+ * Summary:
+ * Creates a new edit text control.
+ *
+ * Discussion:
+ * This control is a legacy control. It is deprecated in favor of
+ * the EditUnicodeText control, which handles Unicode and draws its
+ * text using antialiasing.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window in which the control should be placed. May be NULL
+ * in 10.3 and later.
+ *
+ * boundsRect:
+ * The bounds of the control, in local coordinates of the window.
+ *
+ * text:
+ * The text of the control. May be NULL.
+ *
+ * isPassword:
+ * A Boolean indicating whether the field is to be used as a
+ * password field. Passing false indicates that the field is to
+ * display entered text normally. True means that the field will
+ * be used as a password field and any text typed into the field
+ * will be displayed only as bullets.
+ *
+ * useInlineInput:
+ * A Boolean indicating whether or not the control is to accept
+ * inline input. Pass true to to accept inline input, otherwise
+ * pass false.
+ *
+ * style:
+ * The control's font style, size, color, and so on. May be NULL.
+ *
+ * outControl:
+ * On exit, contains the new control (if noErr is returned as the
+ * result code).
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * 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
+ * Non-Carbon CFM: not available
+ }
+function CreateEditTextControl( window: WindowRef; const (*var*) boundsRect: Rect; text: CFStringRef { can be NULL }; isPassword: Boolean; useInlineInput: Boolean; {const} style: ControlFontStyleRecPtr { can be NULL }; var outControl: ControlRef ): OSStatus; external name '_CreateEditTextControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
+
+
+{ Tagged data supported by edit text }
+const
+ kControlEditTextStyleTag = kControlFontStyleTag; { ControlFontStyleRec}
+ kControlEditTextTextTag = $74657874 (* 'text' *); { Buffer of chars - you supply the buffer}
+ kControlEditTextTEHandleTag = $7468616E (* 'than' *); { The TEHandle of the text edit record}
+ kControlEditTextKeyFilterTag = kControlKeyFilterTag;
+ kControlEditTextSelectionTag = $73656C65 (* 'sele' *); { ControlEditTextSelectionRec}
+ kControlEditTextPasswordTag = $70617373 (* 'pass' *); { The clear text password text}
+ kControlEditTextCharCount = $63687263 (* 'chrc' *); { Count of characters in the control's text}
+
+{ tags available with Appearance 1.1 or later }
+const
+ kControlEditTextKeyScriptBehaviorTag = $6B736372 (* 'kscr' *); { ControlKeyScriptBehavior. Defaults to "PrefersRoman" for password fields,}
+ { or "AllowAnyScript" for non-password fields.}
+ kControlEditTextLockedTag = $6C6F636B (* 'lock' *); { Boolean. Locking disables editability.}
+ kControlEditTextFixedTextTag = $66747874 (* 'ftxt' *); { Like the normal text tag, but fixes inline input first}
+ kControlEditTextValidationProcTag = $76616C69 (* 'vali' *); { ControlEditTextValidationUPP. Called when a key filter can't be: after cut, paste, etc.}
+ kControlEditTextInlinePreUpdateProcTag = $70727570 (* 'prup' *); { TSMTEPreUpdateUPP and TSMTEPostUpdateUpp. For use with inline input variant...}
+ kControlEditTextInlinePostUpdateProcTag = $706F7570 (* 'poup' *); { ...The refCon parameter will contain the ControlRef.}
+
+
+{
+ * Discussion:
+ * EditText ControlData tags available with MacOSX and later.
+ }
+const
+{
+ * Extract the content of the edit text field as a CFString. Don't
+ * forget that you own the returned CFStringRef and are responsible
+ * for CFReleasing it.
+ }
+ kControlEditTextCFStringTag = $63667374 (* 'cfst' *); { CFStringRef (Also available on CarbonLib 1.5)}
+
+ {
+ * Extract the content of the edit text field as a CFString, if it is
+ * a password field. Don't forget that you own the returned
+ * CFStringRef and are responsible for CFReleasing it.
+ }
+ kControlEditTextPasswordCFStringTag = $70776366 (* 'pwcf' *); { CFStringRef}
+
+
+{ Structure for getting the edit text selection }
+type
+ ControlEditTextSelectionRecPtr = ^ControlEditTextSelectionRec;
+ ControlEditTextSelectionRec = record
+ selStart: SInt16;
+ selEnd: SInt16;
+ end;
+type
+ ControlEditTextSelectionPtr = ControlEditTextSelectionRecPtr;
+type
+ ControlEditTextValidationProcPtr = procedure( control: ControlRef );
+type
+ ControlEditTextValidationUPP = ControlEditTextValidationProcPtr;
+{
+ * NewControlEditTextValidationUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+function NewControlEditTextValidationUPP( userRoutine: ControlEditTextValidationProcPtr ): ControlEditTextValidationUPP; external name '_NewControlEditTextValidationUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeControlEditTextValidationUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure DisposeControlEditTextValidationUPP( userUPP: ControlEditTextValidationUPP ); external name '_DisposeControlEditTextValidationUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeControlEditTextValidationUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Non-Carbon CFM: available as macro/inline
+ }
+procedure InvokeControlEditTextValidationUPP( control: ControlRef; userUPP: ControlEditTextValidationUPP ); external name '_InvokeControlEditTextValidationUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ STATIC TEXT (CDEF 18) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Static Text proc IDs }
+const
+ kControlStaticTextProc = 288;
+
+{ Control Kind Tag }
+const
+ kControlKindStaticText = $73747874 (* 'stxt' *);
+
+{ The HIObject class ID for the HIStaticTextView class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIStaticTextViewClassID CFSTRP('com.apple.HIStaticTextView')}
+{$endc}
+{ Creation API: Carbon only }
+{
+ * CreateStaticTextControl()
+ *
+ * Summary:
+ * Creates a new static text control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window in which the control should be placed. May be NULL
+ * in 10.3 and later.
+ *
+ * boundsRect:
+ * The bounds of the control, in local coordinates of the window.
+ *
+ * text:
+ * The text of the control. May be NULL.
+ *
+ * style:
+ * The control's font style, size, color, and so on. May be NULL.
+ *
+ * outControl:
+ * On exit, contains the new control.
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateStaticTextControl( window: WindowRef { can be NULL }; const (*var*) boundsRect: Rect; text: CFStringRef { can be NULL }; {const} style: ControlFontStyleRecPtr { can be NULL }; var outControl: ControlRef ): OSStatus; external name '_CreateStaticTextControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * Summary:
+ * Tagged data supported by the static text control
+ }
+const
+{
+ * Used to get or set the control's current text style. Data is of
+ * type ControlFontStyleRec. Available with Appearance Manager 1.0
+ * (Mac OS 8.0) and later.
+ }
+ kControlStaticTextStyleTag = kControlFontStyleTag;
+
+ {
+ * Used to get or set the control's current text. Data is an array of
+ * chars. Generally you should used GetControlDataSize to determine
+ * the length of the text, and allocate a buffer of that length,
+ * before calling GetControlData with this selector. Deprecated in
+ * Carbon in favor of kControlStaticTextCFStringTag. Available with
+ * Appearance Manager 1.0 (Mac OS 8.0) and later.
+ }
+ kControlStaticTextTextTag = $74657874 (* 'text' *);
+
+ {
+ * Used to get the height of the control's text. May not be used with
+ * SetControlData. Data is of type SInt16. Available with Appearance
+ * Manager 1.0 (Mac OS 8.0) and later.
+ }
+ kControlStaticTextTextHeightTag = $74686569 (* 'thei' *);
+
+ {
+ * Used to get or set the control's text truncation style. Data is of
+ * type TruncCode; pass a truncation code of -1 to indication no
+ * truncation. Available with Appearance Manager 1.1 (Mac OS 8.5) and
+ * later. Truncation will not occur unless
+ * kControlStaticTextIsMultilineTag is set to false.
+ }
+ kControlStaticTextTruncTag = $7472756E (* 'trun' *);
+
+ {
+ * Used to get or set the control's current text. Data is of type
+ * CFStringRef. When setting the text, the control will retain the
+ * string, so you may release the string after calling
+ * SetControlData; if the string is mutable, the control will make a
+ * copy of the string, so any changes to the string after calling
+ * SetControlData will not affect the control. When getting the text,
+ * the control retains the string before returning it to you, so you
+ * must release the string after you are done with it. Available in
+ * CarbonLib 1.5 and Mac OS X 10.0 and later.
+ }
+ kControlStaticTextCFStringTag = $63667374 (* 'cfst' *);
+
+ {
+ * Used to get or set whether the control draws its text in multiple
+ * lines if the text is too wide for the control bounds. If false,
+ * then the control always draws the text in a single line. Data is
+ * of type Boolean. Available in Mac OS X 10.1 and later.
+ }
+ kControlStaticTextIsMultilineTag = $7374696D (* 'stim' *);
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ PICTURE CONTROL (CDEF 19) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Value parameter should contain the ID of the picture you wish to display when }
+{ creating controls of this type. If you don't want the control tracked at all, use }
+{ the 'no track' variant. }
+{ Picture control proc IDs }
+const
+ kControlPictureProc = 304;
+ kControlPictureNoTrackProc = 305; { immediately returns kControlPicturePart}
+
+{ Control Kind Tag }
+const
+ kControlKindPicture = $70696374 (* 'pict' *);
+
+{
+ * CreatePictureControl()
+ *
+ * Summary:
+ * Creates a picture control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window that should contain the control. May be NULL on 10.3
+ * and later.
+ *
+ * boundsRect:
+ * The bounding box of the control.
+ *
+ * content:
+ * The descriptor for the picture you want the control to display.
+ *
+ * dontTrack:
+ * A Boolean value indicating whether the control should hilite
+ * when it is clicked on. False means hilite and track the mouse.
+ *
+ * outControl:
+ * On exit, contains the new control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreatePictureControl( window: WindowRef { can be NULL }; const (*var*) boundsRect: Rect; const (*var*) content: ControlButtonContentInfo; dontTrack: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreatePictureControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Tagged data supported by picture controls }
+const
+ kControlPictureHandleTag = $70696368 (* 'pich' *); { PicHandle}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ ICON CONTROL (CDEF 20) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Value parameter should contain the ID of the ICON or cicn you wish to display when }
+{ creating controls of this type. If you don't want the control tracked at all, use }
+{ the 'no track' variant. }
+{ Icon control proc IDs }
+const
+ kControlIconProc = 320;
+ kControlIconNoTrackProc = 321; { immediately returns kControlIconPart}
+ kControlIconSuiteProc = 322;
+ kControlIconSuiteNoTrackProc = 323; { immediately returns kControlIconPart}
+
+const
+{ icon ref controls may have either an icon, color icon, icon suite, or icon ref.}
+ { for data other than icon, you must set the data by passing a}
+ { ControlButtonContentInfo to SetControlData}
+ kControlIconRefProc = 324;
+ kControlIconRefNoTrackProc = 325; { immediately returns kControlIconPart}
+
+{ Control Kind Tag }
+const
+ kControlKindIcon = $69636F6E (* 'icon' *);
+
+{ The HIObject class ID for the HIIconView class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIIconViewClassID CFSTRP('com.apple.HIIconView')}
+{$endc}
+{
+ * CreateIconControl()
+ *
+ * Summary:
+ * Creates an Icon control at a specific position in the specified
+ * window.
+ *
+ * Discussion:
+ * Icon controls display an icon that (optionally) hilites when
+ * clicked on. On Mac OS X, a root control will be created for the
+ * window if one does not already exist. If a root control exists
+ * for the window, the Icon control will be embedded into it.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The WindowRef into which the Icon control will be created. May
+ * be NULL on 10.3 and later.
+ *
+ * inBoundsRect:
+ * The desired position (in coordinates local to the window's
+ * port) for the Icon control.
+ *
+ * inIconContent:
+ * The descriptor for the icon you want the control to display.
+ * Mac OS X and CarbonLib 1.5 (and beyond) support all of the icon
+ * content types. Prior to CarbonLib 1.5, the only content types
+ * that are properly respected are kControlContentIconSuiteRes,
+ * kControlContentCIconRes, and kControlContentICONRes.
+ *
+ * inDontTrack:
+ * A Boolean value indicating whether the control should hilite
+ * when it is clicked on. False means hilite and track the mouse.
+ *
+ * outControl:
+ * On successful output, outControl will contain a reference to
+ * the Icon control.
+ *
+ * Result:
+ * An OSStatus code indicating success or failure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateIconControl( inWindow: WindowRef { can be NULL }; const (*var*) inBoundsRect: Rect; const (*var*) inIconContent: ControlButtonContentInfo; inDontTrack: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateIconControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Tagged data supported by icon controls }
+const
+ kControlIconTransformTag = $7472666D (* 'trfm' *); { IconTransformType}
+ kControlIconAlignmentTag = $616C676E (* 'algn' *); { IconAlignmentType}
+
+{ Tags available with appearance 1.1 or later }
+const
+ kControlIconResourceIDTag = $69726573 (* 'ires' *); { SInt16 resource ID of icon to use}
+ kControlIconContentTag = $636F6E74 (* 'cont' *); { accepts a ControlButtonContentInfo}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ WINDOW HEADER (CDEF 21) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Window Header proc IDs }
+const
+ kControlWindowHeaderProc = 336; { normal header}
+ kControlWindowListViewHeaderProc = 337; { variant for list views - no bottom line}
+
+{ Control Kind Tag }
+const
+ kControlKindWindowHeader = $77686564 (* 'whed' *);
+
+
+{
+ * Summary:
+ * Tags available with Mac OS X 10.3 or later
+ }
+const
+{
+ * Passed data is a Boolean. Set to true if the control is to draw
+ * as a list header.
+ }
+ kControlWindowHeaderIsListHeaderTag = $69736C68 (* 'islh' *);
+
+{ The HIObject class ID for the HIWindowHeaderView class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIWindowHeaderViewClassID CFSTRP('com.apple.HIWindowHeaderView')}
+{$endc}
+{ Creation API: Carbon Only }
+{
+ * CreateWindowHeaderControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateWindowHeaderControl( window: WindowRef; const (*var*) boundsRect: Rect; isListHeader: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateWindowHeaderControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ LIST BOX (CDEF 22) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ Lists use an auxiliary resource to define their format. The resource type used is }
+{ 'ldes' and a definition for it can be found in Appearance.r. The resource ID for }
+{ the ldes is passed in the 'value' parameter when creating the control. You may pass }
+{ zero in value. This tells the List Box control to not use a resource. The list will }
+{ be created with default values, and will use the standard LDEF (0). You can change }
+{ the list by getting the list handle. You can set the LDEF to use by using the tag }
+{ below (kControlListBoxLDEFTag) }
+{ List Box proc IDs }
+const
+ kControlListBoxProc = 352;
+ kControlListBoxAutoSizeProc = 353;
+
+{ Control Kind Tag }
+const
+ kControlKindListBox = $6C626F78 (* 'lbox' *);
+
+{ Creation API: Carbon Only }
+{
+ * CreateListBoxControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateListBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; autoSize: Boolean; numRows: SInt16; numColumns: SInt16; horizScroll: Boolean; vertScroll: Boolean; cellHeight: SInt16; cellWidth: SInt16; hasGrowSpace: Boolean; const (*var*) listDef: ListDefSpec; var outControl: ControlRef ): OSStatus; external name '_CreateListBoxControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Tagged data supported by list box }
+const
+ kControlListBoxListHandleTag = $6C68616E (* 'lhan' *); { ListHandle}
+ kControlListBoxKeyFilterTag = kControlKeyFilterTag; { ControlKeyFilterUPP}
+ kControlListBoxFontStyleTag = kControlFontStyleTag; { ControlFontStyleRec}
+
+{ New tags in 1.0.1 or later }
+const
+ kControlListBoxDoubleClickTag = $64626C63 (* 'dblc' *); { Boolean. Was last click a double-click?}
+ kControlListBoxLDEFTag = $6C646566 (* 'ldef' *); { SInt16. ID of LDEF to use.}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ PUSH BUTTON (CDEF 23) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ The new standard checkbox and radio button controls support a "mixed" value that }
+{ indicates that the current setting contains a mixed set of on and off values. The }
+{ control value used to display this indication is defined in Controls.h: }
+{ kControlCheckBoxMixedValue = 2 }
+{ Two new variants of the standard pushbutton have been added to the standard control }
+{ suite that draw a color icon next to the control title. One variant draws the icon }
+{ on the left side, the other draws it on the right side (when the system justifica- }
+{ tion is right to left, these are reversed). }
+{ When either of the icon pushbuttons are created, the contrlMax field of the control }
+{ record is used to determine the ID of the 'cicn' resource drawn in the pushbutton. }
+{ In addition, a push button can now be told to draw with a default outline using the }
+{ SetControlData routine with the kControlPushButtonDefaultTag below. }
+{ A push button may also be marked using the kControlPushButtonCancelTag. This has }
+{ no visible representation, but does cause the button to play the CancelButton theme }
+{ sound instead of the regular pushbutton theme sound when pressed. }
+{ Theme Push Button/Check Box/Radio Button proc IDs }
+const
+ kControlPushButtonProc = 368;
+ kControlCheckBoxProc = 369;
+ kControlRadioButtonProc = 370;
+ kControlPushButLeftIconProc = 374; { Standard pushbutton with left-side icon}
+ kControlPushButRightIconProc = 375; { Standard pushbutton with right-side icon}
+
+{ Variants with Appearance 1.1 or later }
+const
+ kControlCheckBoxAutoToggleProc = 371;
+ kControlRadioButtonAutoToggleProc = 372;
+
+{ Push Button Icon Alignments }
+type
+ ControlPushButtonIconAlignment = UInt16;
+const
+ kControlPushButtonIconOnLeft = 6;
+ kControlPushButtonIconOnRight = 7;
+
+{ Control Kind Tag }
+const
+ kControlKindPushButton = $70757368 (* 'push' *);
+ kControlKindPushIconButton = $7069636E (* 'picn' *);
+ kControlKindRadioButton = $7264696F (* 'rdio' *);
+ kControlKindCheckBox = $63626F78 (* 'cbox' *);
+
+{ The HIObject class ID for the HIPushButton class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIPushButtonClassID CFSTRP('com.apple.HIPushButton')}
+{$endc}
+{ The HIObject class ID for the HICheckBox class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHICheckBoxClassID CFSTRP('com.apple.HICheckBox')}
+{$endc}
+{ The HIObject class ID for the HIRadioButton class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIRadioButtonClassID CFSTRP('com.apple.HIRadioButton')}
+{$endc}
+{ Creation APIs: Carbon Only }
+{
+ * CreatePushButtonControl()
+ *
+ * Summary:
+ * Creates a push button control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window that should contain the control. May be NULL on 10.3
+ * and later.
+ *
+ * boundsRect:
+ * The bounds of the control, in local coordinates of the window.
+ *
+ * title:
+ * The control title. May be NULL.
+ *
+ * outControl:
+ * On exit, contains the new control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreatePushButtonControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef { can be NULL }; var outControl: ControlRef ): OSStatus; external name '_CreatePushButtonControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CreatePushButtonWithIconControl()
+ *
+ * Summary:
+ * Creates a push button control containing an icon or other
+ * graphical content.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window that should contain the control. May be NULL on 10.3
+ * and later.
+ *
+ * boundsRect:
+ * The bounds of the control, in local coordinates of the window.
+ *
+ * title:
+ * The control title. May be NULL.
+ *
+ * icon:
+ * The control graphic content.
+ *
+ * iconAlignment:
+ * The alignment of the control graphic content.
+ *
+ * outControl:
+ * On exit, contains the new control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreatePushButtonWithIconControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef { can be NULL }; var icon: ControlButtonContentInfo; iconAlignment: ControlPushButtonIconAlignment; var outControl: ControlRef ): OSStatus; external name '_CreatePushButtonWithIconControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CreateRadioButtonControl()
+ *
+ * Summary:
+ * Creates a radio button control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window that should contain the control. May be NULL on 10.3
+ * and later.
+ *
+ * boundsRect:
+ * The bounds of the control, in local coordinates of the window.
+ *
+ * title:
+ * The control title. May be NULL.
+ *
+ * initialValue:
+ * The initial value of the control. Should be zero (off), one
+ * (on), or two (mixed). The control is automatically given a
+ * minimum value of zero and a maximum value of two.
+ *
+ * autoToggle:
+ * Whether this control should have auto-toggle behavior. If true,
+ * the control will automatically toggle between on and off states
+ * when clicked. This parameter should be false if the control
+ * will be embedded into a radio group control; in that case, the
+ * radio group will handle setting the correct control value in
+ * response to a click.
+ *
+ * outControl:
+ * On exit, contains the new control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateRadioButtonControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef { can be NULL }; initialValue: SInt32; autoToggle: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateRadioButtonControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CreateCheckBoxControl()
+ *
+ * Summary:
+ * Creates a checkbox control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window that should contain the control. May be NULL on 10.3
+ * and later.
+ *
+ * boundsRect:
+ * The bounds of the control, in local coordinates of the window.
+ *
+ * title:
+ * The control title. May be NULL.
+ *
+ * initialValue:
+ * The initial value of the control. Should be zero (off), one
+ * (on), or two (mixed). The control is automatically given a
+ * minimum value of zero and a maximum value of two.
+ *
+ * autoToggle:
+ * Whether this control should have auto-toggle behavior. If true,
+ * the control will automatically toggle between on and off states
+ * when clicked.
+ *
+ * outControl:
+ * On exit, contains the new control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateCheckBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; title: CFStringRef { can be NULL }; initialValue: SInt32; autoToggle: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateCheckBoxControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Tagged data supported by standard buttons }
+const
+ kControlPushButtonDefaultTag = $64666C74 (* 'dflt' *); { default ring flag}
+ kControlPushButtonCancelTag = $636E636C (* 'cncl' *); { cancel button flag (1.1 and later)}
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ SCROLL BAR (CDEF 24) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This is the new Appearance scroll bar. }
+{ Mac OS X has a "Scroll to here" option in the General pane of System Preferences }
+{ which allows users to click in the page up/down regions of a scroll bar and have }
+{ the thumb/indicator jump directly to the clicked position, which alters the value }
+{ of the scroll bar and moves the scrolled content appropriately. As long as the }
+{ mouse button is held down, the click is treated as though the user had clicked in }
+{ the thumb/indicator in the first place. }
+{ If you want the scroll bars in your application to work with the "Scroll to here" }
+{ option, you must do the following: }
+{ 1. Create live-tracking scroll bars, not scroll bars that show a "ghost" thumb }
+{ when you click on it. You can request live-tracking scroll bars by passing true }
+{ in the liveTracking parameter to CreateScrollBarControl. If you create scroll bars }
+{ with NewControl, use the kControlScrollBarLiveProc. }
+{ 2. Write an appropriate ControlActionProc and associate it with your scroll bar }
+{ via the SetControlAction API. This allows your application to update its content }
+{ appropriately when the live-tracking scroll bar is clicked. }
+{ 3. When calling HandleControlClick or TrackControl, pass -1 in the action proc }
+{ parameter. This is a request for the Control Manager to use the action proc you }
+{ associated with your control in step 2. If you rely on the standard window event }
+{ handler to do your control tracking, this step is handled for you automatically. }
+{ Theme Scroll Bar proc IDs }
+const
+ kControlScrollBarProc = 384; { normal scroll bar}
+ kControlScrollBarLiveProc = 386; { live scrolling variant}
+
+{ Control Kind Tag }
+const
+ kControlKindScrollBar = $73626172 (* 'sbar' *);
+
+{ The HIObject class ID for the HIScrollBar class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIScrollBarClassID CFSTRP('com.apple.HIScrollBar')}
+{$endc}
+{
+ * CreateScrollBarControl()
+ *
+ * Summary:
+ * Creates a scroll bar control.
+ *
+ * Discussion:
+ * This creation API is available in Carbon only.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window that should contain the control. May be NULL on 10.3
+ * and later.
+ *
+ * boundsRect:
+ * The bounding box of the control.
+ *
+ * value:
+ * The initial value of the control.
+ *
+ * minimum:
+ * The minimum value of the control.
+ *
+ * maximum:
+ * The maximum value of the control.
+ *
+ * viewSize:
+ * The size of the visible area of the scroll bar content.
+ *
+ * liveTracking:
+ * A Boolean indicating whether or not live tracking is enabled
+ * for this scroll bar. If set to true and a valid
+ * liveTrackingProc is also passed in, the callback will be called
+ * repeatedly as the thumb is moved during tracking. If set to
+ * false, a semi-transparent thumb called a "ghost thumb" will
+ * draw and no live tracking will occur.
+ *
+ * liveTrackingProc:
+ * If liveTracking is on, a ControlActionUPP callback to be called
+ * as the control live tracks. This callback is called repeatedly
+ * as the scroll thumb is moved during tracking.
+ *
+ * outControl:
+ * On exit, contains the new control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateScrollBarControl( window: WindowRef; const (*var*) boundsRect: Rect; value: SInt32; minimum: SInt32; maximum: SInt32; viewSize: SInt32; liveTracking: Boolean; liveTrackingProc: ControlActionUPP; var outControl: ControlRef ): OSStatus; external name '_CreateScrollBarControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ These tags are available in Mac OS X or later }
+const
+ kControlScrollBarShowsArrowsTag = $6172726F (* 'arro' *); { Boolean whether or not to draw the scroll arrows}
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ POPUP BUTTON (CDEF 25) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This is the new Appearance Popup Button. It takes the same variants and does the }
+{ same overloading as the previous popup menu control. There are some differences: }
+{ Passing in a menu ID of -12345 causes the popup not to try and get the menu from a }
+{ resource. Instead, you can build the menu and later stuff the MenuRef field in }
+{ the popup data information. }
+{ You can pass -1 in the Max parameter to have the control calculate the width of the }
+{ title on its own instead of guessing and then tweaking to get it right. It adds the }
+{ appropriate amount of space between the title and the popup. }
+{ Theme Popup Button proc IDs }
+const
+ kControlPopupButtonProc = 400;
+ kControlPopupFixedWidthVariant = 1 shl 0;
+ kControlPopupVariableWidthVariant = 1 shl 1;
+ kControlPopupUseAddResMenuVariant = 1 shl 2;
+ kControlPopupUseWFontVariant = kControlUsesOwningWindowsFontVariant;
+
+{ Control Kind Tag }
+const
+ kControlKindPopupButton = $706F7062 (* 'popb' *);
+
+{ The HIObject class ID for the HIPopupButton class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIPopupButtonClassID CFSTRP('com.apple.HIPopupButton')}
+{$endc}
+{
+ * CreatePopupButtonControl()
+ *
+ * Summary:
+ * Creates a popup button control.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window that should contain the control. May be NULL on 10.3
+ * and later.
+ *
+ * boundsRect:
+ * The bounding box of the control.
+ *
+ * title:
+ * The title of the control.
+ *
+ * menuID:
+ * The ID of a menu that should be used by the control. A menu
+ * with this ID should be inserted into the menubar with
+ * InsertMenu(menu, kInsertHierarchicalMenu). You can also pass
+ * -12345 to have the control delay its acquisition of a menu; in
+ * this case, you can build the menu and later provide it to the
+ * control with SetControlData and kControlPopupButtonMenuRefTag
+ * or kControlPopupButtonOwnedMenuRefTag.
+ *
+ * variableWidth:
+ * Whether the width of the control is allowed to vary according
+ * to the width of the selected menu item text, or should remain
+ * fixed to the original control bounds width.
+ *
+ * titleWidth:
+ * The width of the title.
+ *
+ * titleJustification:
+ * The justification of the title.
+ *
+ * titleStyle:
+ * A QuickDraw style bitfield indicating the font style of the
+ * title.
+ *
+ * outControl:
+ * On exit, contains the new control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreatePopupButtonControl( window: WindowRef { can be NULL }; const (*var*) boundsRect: Rect; title: CFStringRef; menuID: SInt16; variableWidth: Boolean; titleWidth: SInt16; titleJustification: SInt16; titleStyle: Style; var outControl: ControlRef ): OSStatus; external name '_CreatePopupButtonControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ These tags are available in 1.0.1 or later of Appearance }
+const
+ kControlPopupButtonMenuHandleTag = $6D68616E (* 'mhan' *); { MenuRef}
+ kControlPopupButtonMenuRefTag = $6D68616E (* 'mhan' *); { MenuRef}
+ kControlPopupButtonMenuIDTag = $6D6E6964 (* 'mnid' *); { SInt16}
+
+{ These tags are available in 1.1 or later of Appearance }
+const
+ kControlPopupButtonExtraHeightTag = $65786874 (* 'exht' *); { SInt16 - extra vertical whitespace within the button}
+ kControlPopupButtonOwnedMenuRefTag = $6F6D7266 (* 'omrf' *); { MenuRef}
+
+{ These tags are available in Mac OS X }
+const
+ kControlPopupButtonCheckCurrentTag = $6368636B (* 'chck' *); { Boolean - whether the popup puts a checkmark next to the current item (defaults to true)}
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ RADIO GROUP (CDEF 26) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This control implements a radio group. It is an embedding control and can therefore }
+{ only be used when a control hierarchy is established for its owning window. You }
+{ should only embed radio buttons within it. As radio buttons are embedded into it, }
+{ the group sets up its value, min, and max to represent the number of embedded items.}
+{ The current value of the control is the index of the sub-control that is the current}
+{ 'on' radio button. To get the current radio button control handle, you can use the }
+{ control manager call GetIndSubControl, passing in the value of the radio group. }
+{ Note that when creating radio buttons for use in a radio group control, you should }
+{ not use the autoToggle version of the radio button. The radio group control will }
+{ handling toggling the radio button values itself; auto-toggle radio buttons do not }
+{ work properly in a radio group control on Mac OS 9. }
+{ NOTE: This control is only available with Appearance 1.0.1. }
+{ Radio Group Proc ID }
+const
+ kControlRadioGroupProc = 416;
+
+{ Control Kind Tag }
+const
+ kControlKindRadioGroup = $72677270 (* 'rgrp' *);
+
+{ The HIObject class ID for the HIRadioGroup class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIRadioGroupClassID CFSTRP('com.apple.HIRadioGroup')}
+{$endc}
+{ Creation API: Carbon Only }
+{
+ * CreateRadioGroupControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateRadioGroupControl( window: WindowRef; const (*var*) boundsRect: Rect; var outControl: ControlRef ): OSStatus; external name '_CreateRadioGroupControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ SCROLL TEXT BOX (CDEF 27) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This control implements a scrolling box of (non-editable) text. This is useful for }
+{ credits in about boxes, etc. }
+{ The standard version of this control has a scroll bar, but the autoscrolling }
+{ variant does not. The autoscrolling variant needs two pieces of information to }
+{ work: delay (in ticks) before the scrolling starts, and time (in ticks) between }
+{ scrolls. It will scroll one pixel at a time, unless changed via SetControlData. }
+{ Parameter What Goes Here }
+{ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ }
+{ Value Resource ID of 'TEXT'/'styl' content. }
+{ Min Scroll start delay (in ticks) . }
+{ Max Delay (in ticks) between scrolls. }
+{ NOTE: This control is only available with Appearance 1.1. }
+{ Scroll Text Box Proc IDs }
+const
+ kControlScrollTextBoxProc = 432;
+ kControlScrollTextBoxAutoScrollProc = 433;
+
+{ Control Kind Tag }
+const
+ kControlKindScrollingTextBox = $73746278 (* 'stbx' *);
+
+{ Creation API: Carbon Only }
+{
+ * CreateScrollingTextBoxControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateScrollingTextBoxControl( window: WindowRef; const (*var*) boundsRect: Rect; contentResID: SInt16; autoScroll: Boolean; delayBeforeAutoScroll: UInt32; delayBetweenAutoScroll: UInt32; autoScrollAmount: UInt16; var outControl: ControlRef ): OSStatus; external name '_CreateScrollingTextBoxControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Tagged data supported by Scroll Text Box }
+const
+ kControlScrollTextBoxDelayBeforeAutoScrollTag = $7374646C (* 'stdl' *); { UInt32 (ticks until autoscrolling starts)}
+ kControlScrollTextBoxDelayBetweenAutoScrollTag = $7363646C (* 'scdl' *); { UInt32 (ticks between scrolls)}
+ kControlScrollTextBoxAutoScrollAmountTag = $73616D74 (* 'samt' *); { UInt16 (pixels per scroll) -- defaults to 1}
+ kControlScrollTextBoxContentsTag = $74726573 (* 'tres' *); { SInt16 (resource ID of 'TEXT'/'styl') -- write only!}
+ kControlScrollTextBoxAnimatingTag = $616E696D (* 'anim' *); { Boolean (whether the text box should auto-scroll)}
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ DISCLOSURE BUTTON }
+{ (CDEF 30) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ The HIObject class ID for the HIDisclosureButton class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIDisclosureButtonClassID CFSTRP('com.apple.HIDisclosureButton')}
+{$endc}
+{
+ * CreateDisclosureButtonControl()
+ *
+ * Summary:
+ * Creates a new instance of the Disclosure Button Control.
+ *
+ * Discussion:
+ * CreateDisclosureButtonControl is preferred over NewControl
+ * because it allows you to specify the exact set of parameters
+ * required to create the control without overloading parameter
+ * semantics. The initial minimum of the Disclosure Button will be
+ * kControlDisclosureButtonClosed, and the maximum will be
+ * kControlDisclosureButtonDisclosed.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The WindowRef in which to create the control.
+ *
+ * inBoundsRect:
+ * The bounding rectangle for the control. The height of the
+ * control is fixed and the control will be centered vertically
+ * within the rectangle you specify.
+ *
+ * inValue:
+ * The initial value; either kControlDisclosureButtonClosed or
+ * kControlDisclosureButtonDisclosed.
+ *
+ * inAutoToggles:
+ * A boolean value indicating whether its value should change
+ * automatically after tracking the mouse.
+ *
+ * outControl:
+ * On successful exit, this will contain the new control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateDisclosureButtonControl( inWindow: WindowRef; const (*var*) inBoundsRect: Rect; inValue: SInt32; inAutoToggles: Boolean; var outControl: ControlRef ): OSStatus; external name '_CreateDisclosureButtonControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Control Kind Tag }
+const
+ kControlKindDisclosureButton = $64697362 (* 'disb' *);
+
+
+{
+ * Discussion:
+ * Disclosure Button Values
+ }
+const
+{
+ * The control be drawn suggesting a closed state.
+ }
+ kControlDisclosureButtonClosed = 0;
+
+ {
+ * The control will be drawn suggesting an open state.
+ }
+ kControlDisclosureButtonDisclosed = 1;
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ ROUND BUTTON }
+{ (CDEF 31) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+
+{
+ * ControlRoundButtonSize
+ *
+ * Discussion:
+ * Button Sizes
+ }
+type
+ ControlRoundButtonSize = SInt16;
+const
+{
+ * A 20 pixel diameter button.
+ }
+ kControlRoundButtonNormalSize = kControlSizeNormal;
+
+ {
+ * A 25 pixel diameter button.
+ }
+ kControlRoundButtonLargeSize = kControlSizeLarge;
+
+{ Data tags supported by the round button controls }
+const
+ kControlRoundButtonContentTag = $636F6E74 (* 'cont' *); { ControlButtonContentInfo}
+ kControlRoundButtonSizeTag = kControlSizeTag; { ControlRoundButtonSize}
+
+{ Control Kind Tag }
+const
+ kControlKindRoundButton = $726E6462 (* 'rndb' *);
+
+{ The HIObject class ID for the HIRoundButton class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIRoundButtonClassID CFSTRP('com.apple.HIRoundButton')}
+{$endc}
+{
+ * CreateRoundButtonControl()
+ *
+ * Summary:
+ * Creates a new instance of the Round Button Control.
+ *
+ * Discussion:
+ * CreateRoundButtonControl is preferred over NewControl because it
+ * allows you to specify the exact set of parameters required to
+ * create the control without overloading parameter semantics.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inWindow:
+ * The WindowRef in which to create the control. May be NULL in
+ * 10.3 and later.
+ *
+ * inBoundsRect:
+ * The bounding rectangle for the control. The height and width of
+ * the control is fixed (specified by the ControlRoundButtonSize
+ * parameter) and the control will be centered within the
+ * rectangle you specify.
+ *
+ * inSize:
+ * The button size; either kControlRoundButtonNormalSize or
+ * kControlRoundButtonLargeSize.
+ *
+ * inContent:
+ * Any optional content displayed in the button. Currently only
+ * kControlContentIconRef is supported. May be NULL.
+ *
+ * outControl:
+ * On successful exit, this will contain the new control.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateRoundButtonControl( inWindow: WindowRef { can be NULL }; const (*var*) inBoundsRect: Rect; inSize: ControlRoundButtonSize; inContent: ControlButtonContentInfoPtr { can be NULL }; var outControl: ControlRef ): OSStatus; external name '_CreateRoundButtonControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ DATA BROWSER }
+{ (CDEF 29) }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ This control implements a user interface component for browsing (optionally) }
+{ hiearchical data structures. The browser supports multiple presentation styles }
+{ including, but not limited to: }
+{ kDataBrowserListView - items and item properties in }
+{ multi-column (optionally outline) format }
+{ kDataBrowserColumnView - in-place browsing using fixed navigation columns }
+{ The browser manages all view styles through a single high-level interface. }
+{ The high-level interface makes the following assumptions: }
+{ - Items have unique 32-bit identifiers (0 is reserved) }
+{ - Items have two kinds of named and typed properties: }
+{ - Predefined attribute properties ( < 1024 ) }
+{ (including some display properties) }
+{ - Client-defined display properties ( >= 1024 ) }
+{ - Some items are containers of other items }
+{ - Items may be sorted by any property }
+{ Because a browser doesn't know all details about the type of objects it manages, }
+{ some implementation responsibility is best handled by its client. The client must }
+{ provide a set of callback routines which define the item hierarchy and help to }
+{ populate the browser with items. The client may also provide callbacks for handling }
+{ custom data types and doing low-level event management. }
+{ The API is subdivided into a "universal" set of routines that applies to all view }
+{ styles, and a set of routines unique to each view style. kDataBrowserListView and }
+{ kDataBrowserColumnView share an (internal) TableView abstract base class. The }
+{ TableView formatting options and API applies to both of these view styles. }
+{ NOTE: This control is only available with CarbonLib 1.1. }
+{ NOTE: This control must be created with the CreateDataBrowserControl API in }
+{ CarbonLib 1.1 through 1.4. In Mac OS X and CarbonLib 1.5 and later, you }
+{ may use the control's procID (29) to create the control with NewControl }
+{ or with a 'CNTL' resource. }
+{ The HIObject class ID for the HIDataBrowser class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIDataBrowserClassID CFSTRP('com.apple.HIDataBrowser')}
+{$endc}
+{ Control Kind Tag }
+const
+ kControlKindDataBrowser = $64617462 (* 'datb' *);
+
+{ Error Codes }
+const
+ errDataBrowserNotConfigured = -4970;
+ errDataBrowserItemNotFound = -4971;
+ errDataBrowserItemNotAdded = -4975;
+ errDataBrowserPropertyNotFound = -4972;
+ errDataBrowserInvalidPropertyPart = -4973;
+ errDataBrowserInvalidPropertyData = -4974;
+ errDataBrowserPropertyNotSupported = -4979; { Return from DataBrowserGetSetItemDataProc }
+
+const
+{ Generic Control Tags }
+ kControlDataBrowserIncludesFrameAndFocusTag = $62726472 (* 'brdr' *); { Boolean }
+ kControlDataBrowserKeyFilterTag = kControlEditTextKeyFilterTag;
+ kControlDataBrowserEditTextKeyFilterTag = kControlDataBrowserKeyFilterTag;
+ kControlDataBrowserEditTextValidationProcTag = kControlEditTextValidationProcTag;
+
+{ Data Browser View Styles }
+type
+ DataBrowserViewStyle = OSType;
+const
+ kDataBrowserNoView = $3F3F3F3F (* '????' *); { Error State }
+ kDataBrowserListView = $6C737476 (* 'lstv' *);
+ kDataBrowserColumnView = $636C6D76 (* 'clmv' *);
+
+{ Selection Flags }
+type
+ DataBrowserSelectionFlags = UInt32;
+const
+ kDataBrowserDragSelect = 1 shl 0; { Å ListMgr lNoRect }
+ kDataBrowserSelectOnlyOne = 1 shl 1; { Å ListMgr lOnlyOne }
+ kDataBrowserResetSelection = 1 shl 2; { Å ListMgr lNoExtend }
+ kDataBrowserCmdTogglesSelection = 1 shl 3; { Å ListMgr lUseSense }
+ kDataBrowserNoDisjointSelection = 1 shl 4; { Å ListMgr lNoDisjoint }
+ kDataBrowserAlwaysExtendSelection = 1 shl 5; { Å ListMgr lExtendDrag }
+ kDataBrowserNeverEmptySelectionSet = 1 shl 6; { Å ListMgr lNoNilHilite }
+
+{ Data Browser Sorting }
+type
+ DataBrowserSortOrder = UInt16;
+const
+ kDataBrowserOrderUndefined = 0; { Not currently supported }
+ kDataBrowserOrderIncreasing = 1;
+ kDataBrowserOrderDecreasing = 2;
+
+{ Data Browser Item Management }
+type
+ DataBrowserItemID = UInt32;
+ DataBrowserItemIDPtr = ^DataBrowserItemID;
+const
+ kDataBrowserNoItem = 0; { Reserved DataBrowserItemID }
+
+type
+ DataBrowserItemState = UInt32;
+const
+ kDataBrowserItemNoState = 0;
+ kDataBrowserItemAnyState = $FFFFFFFF;
+ kDataBrowserItemIsSelected = 1 shl 0;
+ kDataBrowserContainerIsOpen = 1 shl 1;
+ kDataBrowserItemIsDragTarget = 1 shl 2; { During a drag operation }
+
+{ Options for use with RevealDataBrowserItem }
+type
+ DataBrowserRevealOptions = UInt8;
+const
+ kDataBrowserRevealOnly = 0;
+ kDataBrowserRevealAndCenterInView = 1 shl 0;
+ kDataBrowserRevealWithoutSelecting = 1 shl 1;
+
+{ Set operations for use with SetDataBrowserSelectedItems }
+type
+ DataBrowserSetOption = UInt32;
+const
+ kDataBrowserItemsAdd = 0; { add specified items to existing set }
+ kDataBrowserItemsAssign = 1; { assign destination set to specified items }
+ kDataBrowserItemsToggle = 2; { toggle membership state of specified items }
+ kDataBrowserItemsRemove = 3; { remove specified items from existing set }
+
+{ Commands for use with MoveDataBrowserSelectionAnchor }
+type
+ DataBrowserSelectionAnchorDirection = UInt32;
+const
+ kDataBrowserSelectionAnchorUp = 0;
+ kDataBrowserSelectionAnchorDown = 1;
+ kDataBrowserSelectionAnchorLeft = 2;
+ kDataBrowserSelectionAnchorRight = 3;
+
+{ Edit menu command IDs for use with Enable/ExecuteDataBrowserEditCommand }
+type
+ DataBrowserEditCommand = UInt32;
+const
+ kDataBrowserEditMsgUndo = kHICommandUndo;
+ kDataBrowserEditMsgRedo = kHICommandRedo;
+ kDataBrowserEditMsgCut = kHICommandCut;
+ kDataBrowserEditMsgCopy = kHICommandCopy;
+ kDataBrowserEditMsgPaste = kHICommandPaste;
+ kDataBrowserEditMsgClear = kHICommandClear;
+ kDataBrowserEditMsgSelectAll = kHICommandSelectAll;
+
+{ Notifications used in DataBrowserItemNotificationProcPtr }
+type
+ DataBrowserItemNotification = UInt32;
+const
+ kDataBrowserItemAdded = 1; { The specified item has been added to the browser }
+ kDataBrowserItemRemoved = 2; { The specified item has been removed from the browser }
+ kDataBrowserEditStarted = 3; { Starting an EditText session for specified item }
+ kDataBrowserEditStopped = 4; { Stopping an EditText session for specified item }
+ kDataBrowserItemSelected = 5; { Item has just been added to the selection set }
+ kDataBrowserItemDeselected = 6; { Item has just been removed from the selection set }
+ kDataBrowserItemDoubleClicked = 7;
+ kDataBrowserContainerOpened = 8; { Container is open }
+ kDataBrowserContainerClosing = 9; { Container is about to close (and will real soon now, y'all) }
+ kDataBrowserContainerClosed = 10; { Container is closed (y'all come back now!) }
+ kDataBrowserContainerSorting = 11; { Container is about to be sorted (lock any volatile properties) }
+ kDataBrowserContainerSorted = 12; { Container has been sorted (you may release any property locks) }
+ kDataBrowserUserToggledContainer = 16; { _User_ requested container open/close state to be toggled }
+ kDataBrowserTargetChanged = 15; { The target has changed to the specified item }
+ kDataBrowserUserStateChanged = 13; { The user has reformatted the view for the target }
+ kDataBrowserSelectionSetChanged = 14; { The selection set has been modified (net result may be the same) }
+
+
+{
+ * DataBrowserPropertyID
+ *
+ * Discussion:
+ * Properties with values 0 through 1023 are reserved for Apple's
+ * use. Values greater than or equal to 1024 are for client use.
+ }
+type
+ DataBrowserPropertyID = UInt32;
+const
+{ Predefined attribute properties, optional & non-display unless otherwise stated }
+ kDataBrowserItemNoProperty = 0; { The anti-property (no associated data) }
+ kDataBrowserItemIsActiveProperty = 1; { Boolean typed data (defaults to true) }
+ kDataBrowserItemIsSelectableProperty = 2; { Boolean typed data (defaults to true) }
+ kDataBrowserItemIsEditableProperty = 3; { Boolean typed data (defaults to false, used for editable properties) }
+ kDataBrowserItemIsContainerProperty = 4; { Boolean typed data (defaults to false) }
+ kDataBrowserContainerIsOpenableProperty = 5; { Boolean typed data (defaults to true) }
+ kDataBrowserContainerIsClosableProperty = 6; { Boolean typed data (defaults to true) }
+ kDataBrowserContainerIsSortableProperty = 7; { Boolean typed data (defaults to true) }
+ kDataBrowserItemSelfIdentityProperty = 8; { kDataBrowserIconAndTextType (display property; ColumnView only) }
+
+ {
+ * kDataBrowserContainerAliasIDProperty is sent to your
+ * DataBrowserItemDataProcPtr callback to give you a chance to follow
+ * an alias or symlink that the item might represent. If the incoming
+ * item is an alias to another item, you can call
+ * SetDataBrowserItemDataItemID to let Data Browser know which other
+ * item the incoming item points to.
+ *
+ * This is only sent from column view, and your support for it is
+ * optional. It allows Data Browser to be more memory efficient with
+ * its internal storage. If a given container item is an alias to an
+ * item whose contents are already displayed in an existing column
+ * view column, the contents can be shared between those two columns.
+ }
+ kDataBrowserContainerAliasIDProperty = 9; { DataBrowserItemID (alias/symlink an item to a container item) }
+
+ {
+ * kDataBrowserColumnViewPreviewProperty is sent to various callbacks
+ * to give you a chance to draw or track in the preview column of
+ * column view.
+ *
+ * You can also pass kDataBrowserColumnViewPreviewProperty in the
+ * property parameter of RevealDataBrowserItem in conjunction with
+ * the appropriate DataBrowserItemID of the item whose preview is
+ * being displayed when you want to make sure the preview column is
+ * visible to the user.
+ *
+ * kDataBrowserColumnViewPreviewProperty is only supported in column
+ * view.
+ }
+ kDataBrowserColumnViewPreviewProperty = 10; { kDataBrowserCustomType (display property; ColumnView only) }
+
+ {
+ * kDataBrowserItemParentContainerProperty is sent to your
+ * DataBrowserItemDataProcPtr callback when Data Browser needs to
+ * know the parent container item for a given item.
+ *
+ * In column view, this allows the internals of SetDataBrowserTarget
+ * to work. The target is the container whose contents you wish to
+ * display, which is the rightmost column in column view. However,
+ * unlike SetDataBrowserColumnViewPath, SetDataBrowserTarget doesn't
+ * offer a way for you to communicate the DataBrowserItemIDs of the
+ * rest of the column containers, so SetDataBrowserTarget needs to
+ * ask for them explicitly by asking for the container's parent, then
+ * the container's parent's parent, and so on.
+ *
+ * In list view, this allows you to pass a non-container to
+ * SetDataBrowserTarget. In this situation, Data Browser will ask you
+ * for the parent of the target so it knows which container to
+ * display the contents of in the list view.
+ *
+ * In both list and column views, your DataBrowserItemDataProcPtr
+ * callback might be called with
+ * kDataBrowserItemParentContainerProperty at a variety of other
+ * times, so you should be sure to support this property if your Data
+ * Browser displays a containment hierarchy.
+ }
+ kDataBrowserItemParentContainerProperty = 11; { DataBrowserItemID (the parent of the specified item, used by ColumnView) }
+
+{ DataBrowser Property Types (for display properties; i.e. ListView columns) }
+{ These are primarily presentation types (or styles) although }
+{ they also imply a particular set of primitive types or structures. }
+type
+ DataBrowserPropertyType = OSType;
+const
+{ == Corresponding data type or structure == }
+ kDataBrowserCustomType = $3F3F3F3F; { No associated data, custom callbacks used }
+ kDataBrowserIconType = $69636E72 (* 'icnr' *); { IconRef, IconTransformType, RGBColor }
+ kDataBrowserTextType = $74657874 (* 'text' *); { CFStringRef }
+ kDataBrowserDateTimeType = $64617465 (* 'date' *); { DateTime or LongDateTime }
+ kDataBrowserSliderType = $736C6472 (* 'sldr' *); { Min, Max, Value }
+ kDataBrowserCheckboxType = $63686278 (* 'chbx' *); { ThemeButtonValue }
+ kDataBrowserProgressBarType = $70726F67 (* 'prog' *); { Min, Max, Value }
+ kDataBrowserRelevanceRankType = $72616E6B (* 'rank' *); { Min, Max, Value }
+ kDataBrowserPopupMenuType = $6D656E75 (* 'menu' *); { MenuRef, Value }
+ kDataBrowserIconAndTextType = $7469636E (* 'ticn' *); { IconRef, CFStringRef, etc }
+
+{ DataBrowser Property Parts }
+{ Visual components of a property type. }
+{ For use with GetDataBrowserItemPartBounds. }
+type
+ DataBrowserPropertyPart = OSType;
+const
+ kDataBrowserPropertyEnclosingPart = 0;
+ kDataBrowserPropertyContentPart = $2D2D2D2D (* '----' *);
+ kDataBrowserPropertyDisclosurePart = $64697363 (* 'disc' *);
+ kDataBrowserPropertyTextPart = kDataBrowserTextType;
+ kDataBrowserPropertyIconPart = kDataBrowserIconType;
+ kDataBrowserPropertySliderPart = kDataBrowserSliderType;
+ kDataBrowserPropertyCheckboxPart = kDataBrowserCheckboxType;
+ kDataBrowserPropertyProgressBarPart = kDataBrowserProgressBarType;
+ kDataBrowserPropertyRelevanceRankPart = kDataBrowserRelevanceRankType;
+
+{ Modify appearance/behavior of display properties }
+type
+ DataBrowserPropertyFlags = UInt32;
+{ Low 8 bits apply to all property types }
+const
+ kDataBrowserUniversalPropertyFlagsMask = $FF;
+ kDataBrowserPropertyIsMutable = 1 shl 0;
+ kDataBrowserDefaultPropertyFlags = 0 shl 0;
+ kDataBrowserUniversalPropertyFlags = kDataBrowserUniversalPropertyFlagsMask; { support for an old name}
+ kDataBrowserPropertyIsEditable = kDataBrowserPropertyIsMutable; { support for an old name}
+
+{ Next 8 bits contain property-specific modifiers }
+
+{
+ * Summary:
+ * Data Browser Property Flags
+ }
+const
+ kDataBrowserPropertyFlagsOffset = 8;
+ kDataBrowserPropertyFlagsMask = $FF shl kDataBrowserPropertyFlagsOffset;
+ kDataBrowserCheckboxTriState = 1 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserCheckboxType}
+ kDataBrowserDateTimeRelative = 1 shl (kDataBrowserPropertyFlagsOffset); { kDataBrowserDateTimeType }
+ kDataBrowserDateTimeDateOnly = 1 shl (kDataBrowserPropertyFlagsOffset + 1); { kDataBrowserDateTimeType }
+ kDataBrowserDateTimeTimeOnly = 1 shl (kDataBrowserPropertyFlagsOffset + 2); { kDataBrowserDateTimeType }
+ kDataBrowserDateTimeSecondsToo = 1 shl (kDataBrowserPropertyFlagsOffset + 3); { kDataBrowserDateTimeType }
+ kDataBrowserSliderPlainThumb = kThemeThumbPlain shl kDataBrowserPropertyFlagsOffset; { kDataBrowserSliderType }
+ kDataBrowserSliderUpwardThumb = kThemeThumbUpward shl kDataBrowserPropertyFlagsOffset; { kDataBrowserSliderType }
+ kDataBrowserSliderDownwardThumb = kThemeThumbDownward shl kDataBrowserPropertyFlagsOffset; { kDataBrowserSliderType }
+ kDataBrowserDoNotTruncateText = 3 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
+ kDataBrowserTruncateTextAtEnd = 2 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
+ kDataBrowserTruncateTextMiddle = 0 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
+ kDataBrowserTruncateTextAtStart = 1 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserTextType && kDataBrowserIconAndTextType }
+
+ {
+ * This flag is only for use with columns of type
+ * kDataBrowserPopupMenuType. This flag indicates that the popup be
+ * drawn in a sleek buttonless fashion. The text will be drawn next
+ * to a popup glyph, and the whole cell will be clickable. Available
+ * on 10.4 and later.
+ }
+ kDataBrowserPopupMenuButtonless = 1 shl kDataBrowserPropertyFlagsOffset; { kDataBrowserPopupMenuType}
+ kDataBrowserPropertyModificationFlags = kDataBrowserPropertyFlagsMask; { support for an old name}
+ kDataBrowserRelativeDateTime = kDataBrowserDateTimeRelative; { support for an old name}
+
+{
+ Next 8 bits contain viewStyle-specific modifiers
+ See individual ViewStyle sections below for flag definitions
+}
+const
+ kDataBrowserViewSpecificFlagsOffset = 16;
+ kDataBrowserViewSpecificFlagsMask = $FF shl kDataBrowserViewSpecificFlagsOffset;
+ kDataBrowserViewSpecificPropertyFlags = kDataBrowserViewSpecificFlagsMask; { support for an old name}
+
+{ High 8 bits are reserved for client application use }
+const
+ kDataBrowserClientPropertyFlagsOffset = 24;
+ kDataBrowserClientPropertyFlagsMask = $FF000000;
+
+{ Client defined property description }
+type
+ DataBrowserPropertyDescPtr = ^DataBrowserPropertyDesc;
+ DataBrowserPropertyDesc = record
+ propertyID: DataBrowserPropertyID;
+ propertyType: DataBrowserPropertyType;
+ propertyFlags: DataBrowserPropertyFlags;
+ end;
+{ Callback definition for use with ForEachDataBrowserItem }
+type
+ DataBrowserItemProcPtr = procedure( item: DataBrowserItemID; state: DataBrowserItemState; clientData: UnivPtr );
+type
+ DataBrowserItemUPP = DataBrowserItemProcPtr;
+{
+ * NewDataBrowserItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserItemUPP( userRoutine: DataBrowserItemProcPtr ): DataBrowserItemUPP; external name '_NewDataBrowserItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDataBrowserItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserItemUPP( userUPP: DataBrowserItemUPP ); external name '_DisposeDataBrowserItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDataBrowserItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure InvokeDataBrowserItemUPP( item: DataBrowserItemID; state: DataBrowserItemState; clientData: UnivPtr; userUPP: DataBrowserItemUPP ); external name '_InvokeDataBrowserItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ Creation/Configuration }
+{
+ * CreateDataBrowserControl()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateDataBrowserControl( window: WindowRef; const (*var*) boundsRect: Rect; style: DataBrowserViewStyle; var outControl: ControlRef ): OSStatus; external name '_CreateDataBrowserControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserViewStyle()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserViewStyle( browser: ControlRef; var style: DataBrowserViewStyle ): OSStatus; external name '_GetDataBrowserViewStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserViewStyle()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserViewStyle( browser: ControlRef; style: DataBrowserViewStyle ): OSStatus; external name '_SetDataBrowserViewStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * Summary:
+ * Data Browser attributes
+ *
+ * Discussion:
+ * For use with DataBrowserChangeAttributes and
+ * DataBrowserGetAttributes. Available in Mac OS X 10.4 and later.
+ }
+const
+{
+ * A constant with value zero; the lack of any attributes.
+ }
+ kDataBrowserAttributeNone = 0;
+
+ {
+ * In Column View, this Data Browser is allowed to resize the owning
+ * window whenever necessary. This includes, but is not necessarily
+ * limited to, situations where column resize operations need more
+ * visible space in the window. If you turn this attribute on, your
+ * window must tolerate being resized behind your app's back. If your
+ * window needs to react to bounds changes, use a
+ * kEventWindowBoundsChanged event handler. If you need to constrain
+ * your window's minimum and maximum bounds, use
+ * kEventWindowGetMinimum/MaximumSize handlers, the
+ * SetWindowResizeLimits API, or something similar.
+ }
+ kDataBrowserAttributeColumnViewResizeWindow = 1 shl 0;
+
+ {
+ * In List View, this Data Browser should draw alternating row
+ * background colors.
+ }
+ kDataBrowserAttributeListViewAlternatingRowColors = 1 shl 1;
+
+ {
+ * In List View, this Data Browser should draw a vertical line
+ * between the columns.
+ }
+ kDataBrowserAttributeListViewDrawColumnDividers = 1 shl 2;
+
+{
+ * DataBrowserChangeAttributes()
+ *
+ * Summary:
+ * Set the attributes for the given Data Browser.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDataBrowser:
+ * The Data Browser whose attributes to change.
+ *
+ * inAttributesToSet:
+ * The attributes to set.
+ *
+ * inAttributesToClear:
+ * The attributes to clear.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function DataBrowserChangeAttributes( inDataBrowser: ControlRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_DataBrowserChangeAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * DataBrowserGetAttributes()
+ *
+ * Summary:
+ * Returns the attributes of a given Data Browser.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDataBrowser:
+ * The Data Browser whose attributes to query.
+ *
+ * outAttributes:
+ * On exit, will contain the attributes of the Data Browser. This
+ * parameter cannot be NULL.
+ *
+ * Result:
+ * An operating system status code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function DataBrowserGetAttributes( inDataBrowser: ControlRef; var outAttributes: OptionBits ): OSStatus; external name '_DataBrowserGetAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * Summary:
+ * DataBrowserMetric values
+ *
+ * Discussion:
+ * For use with DataBrowserSetMetric.
+ }
+const
+{
+ * The content (icon, text, etc.) within a cell is drawn a certain
+ * amount in from the left & right edges of the cell. This metric
+ * governs the amount of inset.
+ }
+ kDataBrowserMetricCellContentInset = 1;
+
+ {
+ * This metric controls the space between the icon and text within a
+ * column of type kDataBrowserIconAndTextType.
+ }
+ kDataBrowserMetricIconAndTextGap = 2;
+
+ {
+ * In List View only, this metric is similar to
+ * kDataBrowserMetricCellContentInset, but it only affects the
+ * disclosure column and it only affects the side of the cell that
+ * displays the disclosure triangle. In other words, this metric is
+ * used instead of (not in addition to)
+ * DataBrowserMetricCellContentInset for one side of the disclosure
+ * column.
+ }
+ kDataBrowserMetricDisclosureColumnEdgeInset = 3;
+
+ {
+ * In List View only, this metric controls the amount of space
+ * between the disclosure triangle and the cell's content.
+ }
+ kDataBrowserMetricDisclosureTriangleAndContentGap = 4;
+
+ {
+ * In List View only, this metric controls the amount of space in the
+ * disclosure column for each level of indentation in progressively
+ * deeper hierarchies of disclosed items.
+ }
+ kDataBrowserMetricDisclosureColumnPerDepthGap = 5;
+ kDataBrowserMetricLast = kDataBrowserMetricDisclosureColumnPerDepthGap;
+
+
+type
+ DataBrowserMetric = UInt32;
+{
+ * DataBrowserSetMetric()
+ *
+ * Summary:
+ * Sets a value for a specified Data Browser metric.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDataBrowser:
+ * The Data Browser instance whose metric is being changed.
+ *
+ * inMetric:
+ * The DataBrowserMetric whose value is being changed.
+ *
+ * inUseDefaultValue:
+ * A Boolean indicating whether you want the Data Browser instance
+ * to revert to the default value for the metric. If you pass
+ * true, inValue will be ignored and a suitable default value will
+ * be used. If you pass false, inValue will be used as the value
+ * of the metric.
+ *
+ * inValue:
+ * When you pass false for inUseDefaultValue, this parameter is
+ * the value to use for the metric.
+ *
+ * Result:
+ * An operating system status code. If the incoming ControlRef isn't
+ * a Data Browser instance, or if the incoming metric isn't known,
+ * this function will return paramErr.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function DataBrowserSetMetric( inDataBrowser: ControlRef; inMetric: DataBrowserMetric; inUseDefaultValue: Boolean; inValue: Float32 ): OSStatus; external name '_DataBrowserSetMetric';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * DataBrowserGetMetric()
+ *
+ * Summary:
+ * Gets the value for a specified Data Browser metric.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDataBrowser:
+ * The Data Browser instance whose metric value to get.
+ *
+ * inMetric:
+ * The DataBrowserMetric value to get.
+ *
+ * outUsingDefaultValue:
+ * On exit, this is a Boolean indicating whether the metric's
+ * value is determined by Data Browser's default values. You may
+ * pass NULL if you don't need this information.
+ *
+ * outValue:
+ * On exit, this is the value of the metric.
+ *
+ * Result:
+ * An operating system status code. If the incoming ControlRef isn't
+ * a Data Browser instance, or if the incoming metric isn't known,
+ * this function will return paramErr.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function DataBrowserGetMetric( inDataBrowser: ControlRef; inMetric: DataBrowserMetric; outUsingDefaultValue: BooleanPtr { can be NULL }; var outValue: Float32 ): OSStatus; external name '_DataBrowserGetMetric';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{ Item Manipulation }
+{ Passing NULL for "items" argument to RemoveDataBrowserItems and }
+{ UpdateDataBrowserItems refers to all items in the specified container. }
+{ Passing NULL for "items" argument to AddDataBrowserItems means }
+{ "generate IDs starting from 1." }
+{
+ * AddDataBrowserItems()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function AddDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; numItems: UInt32; {const} items: DataBrowserItemIDPtr { can be NULL }; preSortProperty: DataBrowserPropertyID ): OSStatus; external name '_AddDataBrowserItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RemoveDataBrowserItems()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function RemoveDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; numItems: UInt32; {const} items: DataBrowserItemIDPtr { can be NULL }; preSortProperty: DataBrowserPropertyID ): OSStatus; external name '_RemoveDataBrowserItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * UpdateDataBrowserItems()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function UpdateDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; numItems: UInt32; {const} items: DataBrowserItemIDPtr { can be NULL }; preSortProperty: DataBrowserPropertyID; propertyID: DataBrowserPropertyID ): OSStatus; external name '_UpdateDataBrowserItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Edit Menu Enabling and Handling }
+{
+ * EnableDataBrowserEditCommand()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function EnableDataBrowserEditCommand( browser: ControlRef; command: DataBrowserEditCommand ): Boolean; external name '_EnableDataBrowserEditCommand';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ExecuteDataBrowserEditCommand()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function ExecuteDataBrowserEditCommand( browser: ControlRef; command: DataBrowserEditCommand ): OSStatus; external name '_ExecuteDataBrowserEditCommand';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserSelectionAnchor()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserSelectionAnchor( browser: ControlRef; var first: DataBrowserItemID; var last: DataBrowserItemID ): OSStatus; external name '_GetDataBrowserSelectionAnchor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * MoveDataBrowserSelectionAnchor()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function MoveDataBrowserSelectionAnchor( browser: ControlRef; direction: DataBrowserSelectionAnchorDirection; extendSelection: Boolean ): OSStatus; external name '_MoveDataBrowserSelectionAnchor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Container Manipulation }
+{
+ * OpenDataBrowserContainer()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function OpenDataBrowserContainer( browser: ControlRef; container: DataBrowserItemID ): OSStatus; external name '_OpenDataBrowserContainer';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CloseDataBrowserContainer()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CloseDataBrowserContainer( browser: ControlRef; container: DataBrowserItemID ): OSStatus; external name '_CloseDataBrowserContainer';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SortDataBrowserContainer()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SortDataBrowserContainer( browser: ControlRef; container: DataBrowserItemID; sortChildren: Boolean ): OSStatus; external name '_SortDataBrowserContainer';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Aggregate Item Access and Iteration }
+{
+ * GetDataBrowserItems()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItems( browser: ControlRef; container: DataBrowserItemID; recurse: Boolean; state: DataBrowserItemState; items: Handle ): OSStatus; external name '_GetDataBrowserItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemCount()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemCount( browser: ControlRef; container: DataBrowserItemID; recurse: Boolean; state: DataBrowserItemState; var numItems: UInt32 ): OSStatus; external name '_GetDataBrowserItemCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * ForEachDataBrowserItem()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function ForEachDataBrowserItem( browser: ControlRef; container: DataBrowserItemID; recurse: Boolean; state: DataBrowserItemState; callback: DataBrowserItemUPP; clientData: UnivPtr ): OSStatus; external name '_ForEachDataBrowserItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Individual Item Access and Display }
+{
+ * IsDataBrowserItemSelected()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function IsDataBrowserItemSelected( browser: ControlRef; item: DataBrowserItemID ): Boolean; external name '_IsDataBrowserItemSelected';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemState()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemState( browser: ControlRef; item: DataBrowserItemID; var state: DataBrowserItemState ): OSStatus; external name '_GetDataBrowserItemState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * RevealDataBrowserItem()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function RevealDataBrowserItem( browser: ControlRef; item: DataBrowserItemID; propertyID: DataBrowserPropertyID; options: DataBrowserRevealOptions ): OSStatus; external name '_RevealDataBrowserItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Selection Set Manipulation }
+{
+ * SetDataBrowserSelectedItems()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserSelectedItems( browser: ControlRef; numItems: UInt32; items: DataBrowserItemIDPtr; operation: DataBrowserSetOption ): OSStatus; external name '_SetDataBrowserSelectedItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ DataBrowser Attribute Manipulation }
+{ The user customizable portion of the current view style settings }
+{
+ * SetDataBrowserUserState()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserUserState( browser: ControlRef; stateInfo: CFDictionaryRef ): OSStatus; external name '_SetDataBrowserUserState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserUserState()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserUserState( browser: ControlRef; var stateInfo: CFDictionaryRef ): OSStatus; external name '_GetDataBrowserUserState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ All items are active/enabled or not }
+{
+ * SetDataBrowserActiveItems()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserActiveItems( browser: ControlRef; active: Boolean ): OSStatus; external name '_SetDataBrowserActiveItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserActiveItems()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserActiveItems( browser: ControlRef; var active: Boolean ): OSStatus; external name '_GetDataBrowserActiveItems';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Inset the scrollbars within the DataBrowser bounds }
+{
+ * SetDataBrowserScrollBarInset()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserScrollBarInset( browser: ControlRef; var insetRect: Rect ): OSStatus; external name '_SetDataBrowserScrollBarInset';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserScrollBarInset()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserScrollBarInset( browser: ControlRef; var insetRect: Rect ): OSStatus; external name '_GetDataBrowserScrollBarInset';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ The "user focused" item }
+{ For the ListView, this means the root container }
+{ For the ColumnView, this means the rightmost container column }
+{
+ * SetDataBrowserTarget()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserTarget( browser: ControlRef; target: DataBrowserItemID ): OSStatus; external name '_SetDataBrowserTarget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserTarget()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserTarget( browser: ControlRef; var target: DataBrowserItemID ): OSStatus; external name '_GetDataBrowserTarget';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Current sort ordering }
+{ ListView tracks this per-column }
+{
+ * SetDataBrowserSortOrder()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserSortOrder( browser: ControlRef; order: DataBrowserSortOrder ): OSStatus; external name '_SetDataBrowserSortOrder';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserSortOrder()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserSortOrder( browser: ControlRef; var order: DataBrowserSortOrder ): OSStatus; external name '_GetDataBrowserSortOrder';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Scrollbar values }
+{
+ * SetDataBrowserScrollPosition()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserScrollPosition( browser: ControlRef; top: UInt32; left: UInt32 ): OSStatus; external name '_SetDataBrowserScrollPosition';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserScrollPosition()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserScrollPosition( browser: ControlRef; var top: UInt32; var left: UInt32 ): OSStatus; external name '_GetDataBrowserScrollPosition';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Show/Hide each scrollbar }
+{
+ * SetDataBrowserHasScrollBars()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserHasScrollBars( browser: ControlRef; horiz: Boolean; vert: Boolean ): OSStatus; external name '_SetDataBrowserHasScrollBars';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserHasScrollBars()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserHasScrollBars( browser: ControlRef; var horiz: Boolean; var vert: Boolean ): OSStatus; external name '_GetDataBrowserHasScrollBars';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Property passed to sort callback (ListView sort column) }
+{
+ * SetDataBrowserSortProperty()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserSortProperty( browser: ControlRef; property: DataBrowserPropertyID ): OSStatus; external name '_SetDataBrowserSortProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserSortProperty()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserSortProperty( browser: ControlRef; var property: DataBrowserPropertyID ): OSStatus; external name '_GetDataBrowserSortProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Modify selection behavior }
+{
+ * SetDataBrowserSelectionFlags()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserSelectionFlags( browser: ControlRef; selectionFlags: DataBrowserSelectionFlags ): OSStatus; external name '_SetDataBrowserSelectionFlags';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserSelectionFlags()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserSelectionFlags( browser: ControlRef; var selectionFlags: DataBrowserSelectionFlags ): OSStatus; external name '_GetDataBrowserSelectionFlags';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Dynamically modify property appearance/behavior }
+{
+ * SetDataBrowserPropertyFlags()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserPropertyFlags( browser: ControlRef; property: DataBrowserPropertyID; flags: DataBrowserPropertyFlags ): OSStatus; external name '_SetDataBrowserPropertyFlags';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserPropertyFlags()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserPropertyFlags( browser: ControlRef; property: DataBrowserPropertyID; var flags: DataBrowserPropertyFlags ): OSStatus; external name '_GetDataBrowserPropertyFlags';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Text of current in-place edit session }
+{
+ * SetDataBrowserEditText()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserEditText( browser: ControlRef; text: CFStringRef ): OSStatus; external name '_SetDataBrowserEditText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CopyDataBrowserEditText()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function CopyDataBrowserEditText( browser: ControlRef; var text: CFStringRef ): OSStatus; external name '_CopyDataBrowserEditText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserEditText()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserEditText( browser: ControlRef; text: CFMutableStringRef ): OSStatus; external name '_GetDataBrowserEditText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Item/property currently being edited }
+{
+ * SetDataBrowserEditItem()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserEditItem( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID ): OSStatus; external name '_SetDataBrowserEditItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserEditItem()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserEditItem( browser: ControlRef; var item: DataBrowserItemID; var property: DataBrowserPropertyID ): OSStatus; external name '_GetDataBrowserEditItem';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Get the current bounds of a visual part of an item's property }
+{
+ * GetDataBrowserItemPartBounds()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemPartBounds( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; part: DataBrowserPropertyPart; var bounds: Rect ): OSStatus; external name '_GetDataBrowserItemPartBounds';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ DataBrowser ItemData Accessors (used within DataBrowserItemData callback) }
+type
+ DataBrowserItemDataRef = UnivPtr;
+{
+ * SetDataBrowserItemDataIcon()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserItemDataIcon( itemData: DataBrowserItemDataRef; theData: IconRef ): OSStatus; external name '_SetDataBrowserItemDataIcon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemDataIcon()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemDataIcon( itemData: DataBrowserItemDataRef; var theData: IconRef ): OSStatus; external name '_GetDataBrowserItemDataIcon';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserItemDataText()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserItemDataText( itemData: DataBrowserItemDataRef; theData: CFStringRef ): OSStatus; external name '_SetDataBrowserItemDataText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemDataText()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemDataText( itemData: DataBrowserItemDataRef; var theData: CFStringRef ): OSStatus; external name '_GetDataBrowserItemDataText';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserItemDataValue()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserItemDataValue( itemData: DataBrowserItemDataRef; theData: SInt32 ): OSStatus; external name '_SetDataBrowserItemDataValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemDataValue()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemDataValue( itemData: DataBrowserItemDataRef; var theData: SInt32 ): OSStatus; external name '_GetDataBrowserItemDataValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserItemDataMinimum()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserItemDataMinimum( itemData: DataBrowserItemDataRef; theData: SInt32 ): OSStatus; external name '_SetDataBrowserItemDataMinimum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemDataMinimum()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemDataMinimum( itemData: DataBrowserItemDataRef; var theData: SInt32 ): OSStatus; external name '_GetDataBrowserItemDataMinimum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserItemDataMaximum()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserItemDataMaximum( itemData: DataBrowserItemDataRef; theData: SInt32 ): OSStatus; external name '_SetDataBrowserItemDataMaximum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemDataMaximum()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemDataMaximum( itemData: DataBrowserItemDataRef; var theData: SInt32 ): OSStatus; external name '_GetDataBrowserItemDataMaximum';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserItemDataBooleanValue()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserItemDataBooleanValue( itemData: DataBrowserItemDataRef; theData: Boolean ): OSStatus; external name '_SetDataBrowserItemDataBooleanValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemDataBooleanValue()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemDataBooleanValue( itemData: DataBrowserItemDataRef; var theData: Boolean ): OSStatus; external name '_GetDataBrowserItemDataBooleanValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserItemDataMenuRef()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserItemDataMenuRef( itemData: DataBrowserItemDataRef; theData: MenuRef ): OSStatus; external name '_SetDataBrowserItemDataMenuRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemDataMenuRef()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemDataMenuRef( itemData: DataBrowserItemDataRef; var theData: MenuRef ): OSStatus; external name '_GetDataBrowserItemDataMenuRef';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserItemDataRGBColor()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserItemDataRGBColor( itemData: DataBrowserItemDataRef; const (*var*) theData: RGBColor ): OSStatus; external name '_SetDataBrowserItemDataRGBColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemDataRGBColor()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemDataRGBColor( itemData: DataBrowserItemDataRef; var theData: RGBColor ): OSStatus; external name '_GetDataBrowserItemDataRGBColor';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserItemDataDrawState()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserItemDataDrawState( itemData: DataBrowserItemDataRef; theData: ThemeDrawState ): OSStatus; external name '_SetDataBrowserItemDataDrawState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemDataDrawState()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemDataDrawState( itemData: DataBrowserItemDataRef; var theData: ThemeDrawState ): OSStatus; external name '_GetDataBrowserItemDataDrawState';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserItemDataButtonValue()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserItemDataButtonValue( itemData: DataBrowserItemDataRef; theData: ThemeButtonValue ): OSStatus; external name '_SetDataBrowserItemDataButtonValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemDataButtonValue()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemDataButtonValue( itemData: DataBrowserItemDataRef; var theData: ThemeButtonValue ): OSStatus; external name '_GetDataBrowserItemDataButtonValue';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserItemDataIconTransform()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserItemDataIconTransform( itemData: DataBrowserItemDataRef; theData: IconTransformType ): OSStatus; external name '_SetDataBrowserItemDataIconTransform';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemDataIconTransform()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemDataIconTransform( itemData: DataBrowserItemDataRef; var theData: IconTransformType ): OSStatus; external name '_GetDataBrowserItemDataIconTransform';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserItemDataDateTime()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserItemDataDateTime( itemData: DataBrowserItemDataRef; theData: SInt32 ): OSStatus; external name '_SetDataBrowserItemDataDateTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemDataDateTime()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemDataDateTime( itemData: DataBrowserItemDataRef; var theData: SInt32 ): OSStatus; external name '_GetDataBrowserItemDataDateTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserItemDataLongDateTime()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserItemDataLongDateTime( itemData: DataBrowserItemDataRef; (*const*) var theData: LongDateTime ): OSStatus; external name '_SetDataBrowserItemDataLongDateTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemDataLongDateTime()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemDataLongDateTime( itemData: DataBrowserItemDataRef; var theData: LongDateTime ): OSStatus; external name '_GetDataBrowserItemDataLongDateTime';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserItemDataItemID()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserItemDataItemID( itemData: DataBrowserItemDataRef; theData: DataBrowserItemID ): OSStatus; external name '_SetDataBrowserItemDataItemID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemDataItemID()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemDataItemID( itemData: DataBrowserItemDataRef; var theData: DataBrowserItemID ): OSStatus; external name '_GetDataBrowserItemDataItemID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserItemDataProperty()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserItemDataProperty( itemData: DataBrowserItemDataRef; var theData: DataBrowserPropertyID ): OSStatus; external name '_GetDataBrowserItemDataProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Standard DataBrowser Callbacks }
+
+{ Basic Item Management & Manipulation }
+type
+ DataBrowserItemDataProcPtr = function( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; itemData: DataBrowserItemDataRef; setValue: Boolean ): OSStatus;
+type
+ DataBrowserItemDataUPP = DataBrowserItemDataProcPtr;
+
+{ Item Comparison }
+type
+ DataBrowserItemCompareProcPtr = function( browser: ControlRef; itemOne: DataBrowserItemID; itemTwo: DataBrowserItemID; sortProperty: DataBrowserPropertyID ): Boolean;
+type
+ DataBrowserItemCompareUPP = DataBrowserItemCompareProcPtr;
+
+{ ItemEvent Notification }
+{ A Very Important Note about DataBrowserItemNotificationProcPtr: }
+{ Under all currently shipping versions of CarbonLib (eg. up through 1.3), your callback is called }
+{ just as the prototype appears in this header. It should only be expecting three parameters because }
+{ DataBrowser will only pass three parameters. }
+{ Under Mac OS X, your callback is called with an additional parameter. If you wish to interpret }
+{ the additional parameter, your callback should have the same prototype as the }
+{ DataBrowserItemNotificationWithItemProcPtr (below). You may freely take a callback with this }
+{ prototype and pass it to NewDataBrowserItemNotificationUPP in order to generate a }
+{ DataBrowserItemNotificationUPP that you can use just like any other DataBrowserItemNotificationUPP. }
+{ If you use this technique under CarbonLib, you will *not* receive valid data in the fourth }
+{ parameter, and any attempt to use the invalid data will probably result in a crash. }
+type
+ DataBrowserItemNotificationWithItemProcPtr = procedure( browser: ControlRef; item: DataBrowserItemID; message: DataBrowserItemNotification; itemData: DataBrowserItemDataRef );
+type
+ DataBrowserItemNotificationProcPtr = procedure( browser: ControlRef; item: DataBrowserItemID; message: DataBrowserItemNotification );
+type
+ DataBrowserItemNotificationWithItemUPP = DataBrowserItemNotificationWithItemProcPtr;
+type
+ DataBrowserItemNotificationUPP = DataBrowserItemNotificationProcPtr;
+
+
+{ Drag & Drop Processing }
+type
+ DataBrowserAddDragItemProcPtr = function( browser: ControlRef; theDrag: DragReference; item: DataBrowserItemID; var itemRef: ItemReference ): Boolean;
+type
+ DataBrowserAcceptDragProcPtr = function( browser: ControlRef; theDrag: DragReference; item: DataBrowserItemID ): Boolean;
+type
+ DataBrowserReceiveDragProcPtr = function( browser: ControlRef; theDrag: DragReference; item: DataBrowserItemID ): Boolean;
+type
+ DataBrowserPostProcessDragProcPtr = procedure( browser: ControlRef; theDrag: DragReference; trackDragResult: OSStatus );
+type
+ DataBrowserAddDragItemUPP = DataBrowserAddDragItemProcPtr;
+type
+ DataBrowserAcceptDragUPP = DataBrowserAcceptDragProcPtr;
+type
+ DataBrowserReceiveDragUPP = DataBrowserReceiveDragProcPtr;
+type
+ DataBrowserPostProcessDragUPP = DataBrowserPostProcessDragProcPtr;
+
+{ Contextual Menu Support }
+type
+ DataBrowserGetContextualMenuProcPtr = procedure( browser: ControlRef; var menu: MenuRef; var helpType: UInt32; var helpItemString: CFStringRef; var selection: AEDesc );
+type
+ DataBrowserSelectContextualMenuProcPtr = procedure( browser: ControlRef; menu: MenuRef; selectionType: UInt32; menuID: SInt16; menuItem: MenuItemIndex );
+type
+ DataBrowserGetContextualMenuUPP = DataBrowserGetContextualMenuProcPtr;
+type
+ DataBrowserSelectContextualMenuUPP = DataBrowserSelectContextualMenuProcPtr;
+
+{ Help Manager Support }
+type
+ DataBrowserItemHelpContentProcPtr = procedure( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr );
+type
+ DataBrowserItemHelpContentUPP = DataBrowserItemHelpContentProcPtr;
+{
+ * NewDataBrowserItemDataUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserItemDataUPP( userRoutine: DataBrowserItemDataProcPtr ): DataBrowserItemDataUPP; external name '_NewDataBrowserItemDataUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDataBrowserItemCompareUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserItemCompareUPP( userRoutine: DataBrowserItemCompareProcPtr ): DataBrowserItemCompareUPP; external name '_NewDataBrowserItemCompareUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDataBrowserItemNotificationWithItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserItemNotificationWithItemUPP( userRoutine: DataBrowserItemNotificationWithItemProcPtr ): DataBrowserItemNotificationWithItemUPP; external name '_NewDataBrowserItemNotificationWithItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * NewDataBrowserItemNotificationUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserItemNotificationUPP( userRoutine: DataBrowserItemNotificationProcPtr ): DataBrowserItemNotificationUPP; external name '_NewDataBrowserItemNotificationUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDataBrowserAddDragItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserAddDragItemUPP( userRoutine: DataBrowserAddDragItemProcPtr ): DataBrowserAddDragItemUPP; external name '_NewDataBrowserAddDragItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDataBrowserAcceptDragUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserAcceptDragUPP( userRoutine: DataBrowserAcceptDragProcPtr ): DataBrowserAcceptDragUPP; external name '_NewDataBrowserAcceptDragUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDataBrowserReceiveDragUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserReceiveDragUPP( userRoutine: DataBrowserReceiveDragProcPtr ): DataBrowserReceiveDragUPP; external name '_NewDataBrowserReceiveDragUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDataBrowserPostProcessDragUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserPostProcessDragUPP( userRoutine: DataBrowserPostProcessDragProcPtr ): DataBrowserPostProcessDragUPP; external name '_NewDataBrowserPostProcessDragUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDataBrowserGetContextualMenuUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserGetContextualMenuUPP( userRoutine: DataBrowserGetContextualMenuProcPtr ): DataBrowserGetContextualMenuUPP; external name '_NewDataBrowserGetContextualMenuUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDataBrowserSelectContextualMenuUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserSelectContextualMenuUPP( userRoutine: DataBrowserSelectContextualMenuProcPtr ): DataBrowserSelectContextualMenuUPP; external name '_NewDataBrowserSelectContextualMenuUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * NewDataBrowserItemHelpContentUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserItemHelpContentUPP( userRoutine: DataBrowserItemHelpContentProcPtr ): DataBrowserItemHelpContentUPP; external name '_NewDataBrowserItemHelpContentUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDataBrowserItemDataUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserItemDataUPP( userUPP: DataBrowserItemDataUPP ); external name '_DisposeDataBrowserItemDataUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDataBrowserItemCompareUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserItemCompareUPP( userUPP: DataBrowserItemCompareUPP ); external name '_DisposeDataBrowserItemCompareUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDataBrowserItemNotificationWithItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserItemNotificationWithItemUPP( userUPP: DataBrowserItemNotificationWithItemUPP ); external name '_DisposeDataBrowserItemNotificationWithItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * DisposeDataBrowserItemNotificationUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserItemNotificationUPP( userUPP: DataBrowserItemNotificationUPP ); external name '_DisposeDataBrowserItemNotificationUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDataBrowserAddDragItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserAddDragItemUPP( userUPP: DataBrowserAddDragItemUPP ); external name '_DisposeDataBrowserAddDragItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDataBrowserAcceptDragUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserAcceptDragUPP( userUPP: DataBrowserAcceptDragUPP ); external name '_DisposeDataBrowserAcceptDragUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDataBrowserReceiveDragUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserReceiveDragUPP( userUPP: DataBrowserReceiveDragUPP ); external name '_DisposeDataBrowserReceiveDragUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDataBrowserPostProcessDragUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserPostProcessDragUPP( userUPP: DataBrowserPostProcessDragUPP ); external name '_DisposeDataBrowserPostProcessDragUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDataBrowserGetContextualMenuUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserGetContextualMenuUPP( userUPP: DataBrowserGetContextualMenuUPP ); external name '_DisposeDataBrowserGetContextualMenuUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDataBrowserSelectContextualMenuUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserSelectContextualMenuUPP( userUPP: DataBrowserSelectContextualMenuUPP ); external name '_DisposeDataBrowserSelectContextualMenuUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeDataBrowserItemHelpContentUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserItemHelpContentUPP( userUPP: DataBrowserItemHelpContentUPP ); external name '_DisposeDataBrowserItemHelpContentUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDataBrowserItemDataUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InvokeDataBrowserItemDataUPP( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; itemData: DataBrowserItemDataRef; setValue: Boolean; userUPP: DataBrowserItemDataUPP ): OSStatus; external name '_InvokeDataBrowserItemDataUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDataBrowserItemCompareUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InvokeDataBrowserItemCompareUPP( browser: ControlRef; itemOne: DataBrowserItemID; itemTwo: DataBrowserItemID; sortProperty: DataBrowserPropertyID; userUPP: DataBrowserItemCompareUPP ): Boolean; external name '_InvokeDataBrowserItemCompareUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDataBrowserItemNotificationWithItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+procedure InvokeDataBrowserItemNotificationWithItemUPP( browser: ControlRef; item: DataBrowserItemID; message: DataBrowserItemNotification; itemData: DataBrowserItemDataRef; userUPP: DataBrowserItemNotificationWithItemUPP ); external name '_InvokeDataBrowserItemNotificationWithItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * InvokeDataBrowserItemNotificationUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure InvokeDataBrowserItemNotificationUPP( browser: ControlRef; item: DataBrowserItemID; message: DataBrowserItemNotification; userUPP: DataBrowserItemNotificationUPP ); external name '_InvokeDataBrowserItemNotificationUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDataBrowserAddDragItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InvokeDataBrowserAddDragItemUPP( browser: ControlRef; theDrag: DragReference; item: DataBrowserItemID; var itemRef: ItemReference; userUPP: DataBrowserAddDragItemUPP ): Boolean; external name '_InvokeDataBrowserAddDragItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDataBrowserAcceptDragUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InvokeDataBrowserAcceptDragUPP( browser: ControlRef; theDrag: DragReference; item: DataBrowserItemID; userUPP: DataBrowserAcceptDragUPP ): Boolean; external name '_InvokeDataBrowserAcceptDragUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDataBrowserReceiveDragUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InvokeDataBrowserReceiveDragUPP( browser: ControlRef; theDrag: DragReference; item: DataBrowserItemID; userUPP: DataBrowserReceiveDragUPP ): Boolean; external name '_InvokeDataBrowserReceiveDragUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDataBrowserPostProcessDragUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure InvokeDataBrowserPostProcessDragUPP( browser: ControlRef; theDrag: DragReference; trackDragResult: OSStatus; userUPP: DataBrowserPostProcessDragUPP ); external name '_InvokeDataBrowserPostProcessDragUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDataBrowserGetContextualMenuUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure InvokeDataBrowserGetContextualMenuUPP( browser: ControlRef; var menu: MenuRef; var helpType: UInt32; var helpItemString: CFStringRef; var selection: AEDesc; userUPP: DataBrowserGetContextualMenuUPP ); external name '_InvokeDataBrowserGetContextualMenuUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDataBrowserSelectContextualMenuUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure InvokeDataBrowserSelectContextualMenuUPP( browser: ControlRef; menu: MenuRef; selectionType: UInt32; menuID: SInt16; menuItem: MenuItemIndex; userUPP: DataBrowserSelectContextualMenuUPP ); external name '_InvokeDataBrowserSelectContextualMenuUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeDataBrowserItemHelpContentUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure InvokeDataBrowserItemHelpContentUPP( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; inRequest: HMContentRequest; var outContentProvided: HMContentProvidedType; ioHelpContent: HMHelpContentPtr; userUPP: DataBrowserItemHelpContentUPP ); external name '_InvokeDataBrowserItemHelpContentUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{ Standard Callback (vtable) Structure }
+const
+ kDataBrowserLatestCallbacks = 0;
+
+type
+ DataBrowserCallbacksPtr = ^DataBrowserCallbacks;
+ DataBrowserCallbacks = record
+ version: UInt32; { Use kDataBrowserLatestCallbacks }
+ case SInt16 of
+ 0: (
+ itemDataCallback: DataBrowserItemDataUPP;
+ itemCompareCallback: DataBrowserItemCompareUPP;
+ itemNotificationCallback: DataBrowserItemNotificationUPP;
+ addDragItemCallback: DataBrowserAddDragItemUPP;
+ acceptDragCallback: DataBrowserAcceptDragUPP;
+ receiveDragCallback: DataBrowserReceiveDragUPP;
+ postProcessDragCallback: DataBrowserPostProcessDragUPP;
+ itemHelpContentCallback: DataBrowserItemHelpContentUPP;
+ getContextualMenuCallback: DataBrowserGetContextualMenuUPP;
+ selectContextualMenuCallback: DataBrowserSelectContextualMenuUPP;
+ );
+ end;
+{
+ * InitDataBrowserCallbacks()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InitDataBrowserCallbacks( var callbacks: DataBrowserCallbacks ): OSStatus; external name '_InitDataBrowserCallbacks';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Macro for initializing callback structure }
+// #define InitializeDataBrowserCallbacks(callbacks, vers) \
+{ (callbacks)->version = (vers); InitDataBrowserCallbacks(callbacks); }
+
+{
+ * GetDataBrowserCallbacks()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserCallbacks( browser: ControlRef; var callbacks: DataBrowserCallbacks ): OSStatus; external name '_GetDataBrowserCallbacks';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserCallbacks()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserCallbacks( browser: ControlRef; const (*var*) callbacks: DataBrowserCallbacks ): OSStatus; external name '_SetDataBrowserCallbacks';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Custom Format Callbacks (kDataBrowserCustomType display properties) }
+
+type
+ DataBrowserDragFlags = UInt32;
+type
+ DataBrowserTrackingResult = SInt16;
+const
+ kDataBrowserContentHit = 1;
+ kDataBrowserNothingHit = 0;
+ kDataBrowserStopTracking = -1;
+
+type
+ DataBrowserDrawItemProcPtr = procedure( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; itemState: DataBrowserItemState; const (*var*) theRect: Rect; gdDepth: SInt16; colorDevice: Boolean );
+type
+ DataBrowserEditItemProcPtr = function( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; theString: CFStringRef; var maxEditTextRect: Rect; var shrinkToFit: Boolean ): Boolean;
+type
+ DataBrowserHitTestProcPtr = function( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; const (*var*) mouseRect: Rect ): Boolean;
+type
+ DataBrowserTrackingProcPtr = function( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; startPt: Point; modifiers: EventModifiers ): DataBrowserTrackingResult;
+type
+ DataBrowserItemDragRgnProcPtr = procedure( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; dragRgn: RgnHandle );
+type
+ DataBrowserItemAcceptDragProcPtr = function( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; theDrag: DragReference ): DataBrowserDragFlags;
+type
+ DataBrowserItemReceiveDragProcPtr = function( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; dragFlags: DataBrowserDragFlags; theDrag: DragReference ): Boolean;
+type
+ DataBrowserDrawItemUPP = DataBrowserDrawItemProcPtr;
+type
+ DataBrowserEditItemUPP = DataBrowserEditItemProcPtr;
+type
+ DataBrowserHitTestUPP = DataBrowserHitTestProcPtr;
+type
+ DataBrowserTrackingUPP = DataBrowserTrackingProcPtr;
+type
+ DataBrowserItemDragRgnUPP = DataBrowserItemDragRgnProcPtr;
+type
+ DataBrowserItemAcceptDragUPP = DataBrowserItemAcceptDragProcPtr;
+type
+ DataBrowserItemReceiveDragUPP = DataBrowserItemReceiveDragProcPtr;
+{
+ * NewDataBrowserDrawItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserDrawItemUPP( userRoutine: DataBrowserDrawItemProcPtr ): DataBrowserDrawItemUPP; external name '_NewDataBrowserDrawItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * NewDataBrowserEditItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserEditItemUPP( userRoutine: DataBrowserEditItemProcPtr ): DataBrowserEditItemUPP; external name '_NewDataBrowserEditItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * NewDataBrowserHitTestUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserHitTestUPP( userRoutine: DataBrowserHitTestProcPtr ): DataBrowserHitTestUPP; external name '_NewDataBrowserHitTestUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * NewDataBrowserTrackingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserTrackingUPP( userRoutine: DataBrowserTrackingProcPtr ): DataBrowserTrackingUPP; external name '_NewDataBrowserTrackingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * NewDataBrowserItemDragRgnUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserItemDragRgnUPP( userRoutine: DataBrowserItemDragRgnProcPtr ): DataBrowserItemDragRgnUPP; external name '_NewDataBrowserItemDragRgnUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * NewDataBrowserItemAcceptDragUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserItemAcceptDragUPP( userRoutine: DataBrowserItemAcceptDragProcPtr ): DataBrowserItemAcceptDragUPP; external name '_NewDataBrowserItemAcceptDragUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * NewDataBrowserItemReceiveDragUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function NewDataBrowserItemReceiveDragUPP( userRoutine: DataBrowserItemReceiveDragProcPtr ): DataBrowserItemReceiveDragUPP; external name '_NewDataBrowserItemReceiveDragUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * DisposeDataBrowserDrawItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserDrawItemUPP( userUPP: DataBrowserDrawItemUPP ); external name '_DisposeDataBrowserDrawItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * DisposeDataBrowserEditItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserEditItemUPP( userUPP: DataBrowserEditItemUPP ); external name '_DisposeDataBrowserEditItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * DisposeDataBrowserHitTestUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserHitTestUPP( userUPP: DataBrowserHitTestUPP ); external name '_DisposeDataBrowserHitTestUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * DisposeDataBrowserTrackingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserTrackingUPP( userUPP: DataBrowserTrackingUPP ); external name '_DisposeDataBrowserTrackingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * DisposeDataBrowserItemDragRgnUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserItemDragRgnUPP( userUPP: DataBrowserItemDragRgnUPP ); external name '_DisposeDataBrowserItemDragRgnUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * DisposeDataBrowserItemAcceptDragUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserItemAcceptDragUPP( userUPP: DataBrowserItemAcceptDragUPP ); external name '_DisposeDataBrowserItemAcceptDragUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * DisposeDataBrowserItemReceiveDragUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeDataBrowserItemReceiveDragUPP( userUPP: DataBrowserItemReceiveDragUPP ); external name '_DisposeDataBrowserItemReceiveDragUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * InvokeDataBrowserDrawItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure InvokeDataBrowserDrawItemUPP( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; itemState: DataBrowserItemState; const (*var*) theRect: Rect; gdDepth: SInt16; colorDevice: Boolean; userUPP: DataBrowserDrawItemUPP ); external name '_InvokeDataBrowserDrawItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * InvokeDataBrowserEditItemUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InvokeDataBrowserEditItemUPP( browser: ControlRef; item: DataBrowserItemID; property: DataBrowserPropertyID; theString: CFStringRef; var maxEditTextRect: Rect; var shrinkToFit: Boolean; userUPP: DataBrowserEditItemUPP ): Boolean; external name '_InvokeDataBrowserEditItemUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * InvokeDataBrowserHitTestUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InvokeDataBrowserHitTestUPP( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; const (*var*) mouseRect: Rect; userUPP: DataBrowserHitTestUPP ): Boolean; external name '_InvokeDataBrowserHitTestUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * InvokeDataBrowserTrackingUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InvokeDataBrowserTrackingUPP( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; startPt: Point; modifiers: EventModifiers; userUPP: DataBrowserTrackingUPP ): DataBrowserTrackingResult; external name '_InvokeDataBrowserTrackingUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * InvokeDataBrowserItemDragRgnUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure InvokeDataBrowserItemDragRgnUPP( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; dragRgn: RgnHandle; userUPP: DataBrowserItemDragRgnUPP ); external name '_InvokeDataBrowserItemDragRgnUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * InvokeDataBrowserItemAcceptDragUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InvokeDataBrowserItemAcceptDragUPP( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; const (*var*) theRect: Rect; theDrag: DragReference; userUPP: DataBrowserItemAcceptDragUPP ): DataBrowserDragFlags; external name '_InvokeDataBrowserItemAcceptDragUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{
+ * InvokeDataBrowserItemReceiveDragUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.1 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InvokeDataBrowserItemReceiveDragUPP( browser: ControlRef; itemID: DataBrowserItemID; property: DataBrowserPropertyID; dragFlags: DataBrowserDragFlags; theDrag: DragReference; userUPP: DataBrowserItemReceiveDragUPP ): Boolean; external name '_InvokeDataBrowserItemReceiveDragUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
+
+{ Custom Callback (vtable) Structure }
+const
+ kDataBrowserLatestCustomCallbacks = 0;
+
+type
+ DataBrowserCustomCallbacksPtr = ^DataBrowserCustomCallbacks;
+ DataBrowserCustomCallbacks = record
+ version: UInt32; { Use kDataBrowserLatestCustomCallbacks }
+ case SInt16 of
+ 0: (
+ drawItemCallback: DataBrowserDrawItemUPP;
+ editTextCallback: DataBrowserEditItemUPP;
+ hitTestCallback: DataBrowserHitTestUPP;
+ trackingCallback: DataBrowserTrackingUPP;
+ dragRegionCallback: DataBrowserItemDragRgnUPP;
+ acceptDragCallback: DataBrowserItemAcceptDragUPP;
+ receiveDragCallback: DataBrowserItemReceiveDragUPP;
+ );
+ end;
+{
+ * InitDataBrowserCustomCallbacks()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function InitDataBrowserCustomCallbacks( var callbacks: DataBrowserCustomCallbacks ): OSStatus; external name '_InitDataBrowserCustomCallbacks';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ Macro for initializing custom callback structure }
+// #define InitializeDataBrowserCustomCallbacks(callbacks, vers) \
+{ (callbacks)->version = (vers); InitDataBrowserCustomCallbacks(callbacks); }
+
+{
+ * GetDataBrowserCustomCallbacks()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserCustomCallbacks( browser: ControlRef; var callbacks: DataBrowserCustomCallbacks ): OSStatus; external name '_GetDataBrowserCustomCallbacks';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserCustomCallbacks()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserCustomCallbacks( browser: ControlRef; const (*var*) callbacks: DataBrowserCustomCallbacks ): OSStatus; external name '_SetDataBrowserCustomCallbacks';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ TableView Formatting }
+type
+ DataBrowserTableViewHiliteStyle = UInt32;
+const
+ kDataBrowserTableViewMinimalHilite = 0;
+ kDataBrowserTableViewFillHilite = 1;
+
+type
+ DataBrowserTableViewPropertyFlags = UInt32;
+const
+{ kDataBrowserTableView DataBrowserPropertyFlags }
+ kDataBrowserTableViewSelectionColumn = 1 shl kDataBrowserViewSpecificFlagsOffset;
+
+{ The row and column indicies are zero-based }
+
+type
+ DataBrowserTableViewRowIndex = UInt32;
+type
+ DataBrowserTableViewColumnIndex = UInt32;
+type
+ DataBrowserTableViewColumnID = DataBrowserPropertyID;
+type
+ DataBrowserTableViewColumnDesc = DataBrowserPropertyDesc;
+ DataBrowserTableViewColumnDescPtr = ^DataBrowserTableViewColumnDesc;
+
+{ TableView API }
+{ Use when setting column position }
+const
+ kDataBrowserTableViewLastColumn = $FFFFFFFF;
+
+{
+ * RemoveDataBrowserTableViewColumn()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function RemoveDataBrowserTableViewColumn( browser: ControlRef; column: DataBrowserTableViewColumnID ): OSStatus; external name '_RemoveDataBrowserTableViewColumn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserTableViewColumnCount()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserTableViewColumnCount( browser: ControlRef; var numColumns: UInt32 ): OSStatus; external name '_GetDataBrowserTableViewColumnCount';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserTableViewHiliteStyle()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserTableViewHiliteStyle( browser: ControlRef; hiliteStyle: DataBrowserTableViewHiliteStyle ): OSStatus; external name '_SetDataBrowserTableViewHiliteStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserTableViewHiliteStyle()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserTableViewHiliteStyle( browser: ControlRef; var hiliteStyle: DataBrowserTableViewHiliteStyle ): OSStatus; external name '_GetDataBrowserTableViewHiliteStyle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserTableViewRowHeight()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserTableViewRowHeight( browser: ControlRef; height: UInt16 ): OSStatus; external name '_SetDataBrowserTableViewRowHeight';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserTableViewRowHeight()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserTableViewRowHeight( browser: ControlRef; var height: UInt16 ): OSStatus; external name '_GetDataBrowserTableViewRowHeight';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserTableViewColumnWidth()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserTableViewColumnWidth( browser: ControlRef; width: UInt16 ): OSStatus; external name '_SetDataBrowserTableViewColumnWidth';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserTableViewColumnWidth()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserTableViewColumnWidth( browser: ControlRef; var width: UInt16 ): OSStatus; external name '_GetDataBrowserTableViewColumnWidth';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserTableViewItemRowHeight()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserTableViewItemRowHeight( browser: ControlRef; item: DataBrowserItemID; height: UInt16 ): OSStatus; external name '_SetDataBrowserTableViewItemRowHeight';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserTableViewItemRowHeight()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserTableViewItemRowHeight( browser: ControlRef; item: DataBrowserItemID; var height: UInt16 ): OSStatus; external name '_GetDataBrowserTableViewItemRowHeight';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserTableViewNamedColumnWidth()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserTableViewNamedColumnWidth( browser: ControlRef; column: DataBrowserTableViewColumnID; width: UInt16 ): OSStatus; external name '_SetDataBrowserTableViewNamedColumnWidth';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserTableViewNamedColumnWidth()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserTableViewNamedColumnWidth( browser: ControlRef; column: DataBrowserTableViewColumnID; var width: UInt16 ): OSStatus; external name '_GetDataBrowserTableViewNamedColumnWidth';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserTableViewGeometry()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserTableViewGeometry( browser: ControlRef; variableWidthColumns: Boolean; variableHeightRows: Boolean ): OSStatus; external name '_SetDataBrowserTableViewGeometry';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserTableViewGeometry()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserTableViewGeometry( browser: ControlRef; var variableWidthColumns: Boolean; var variableHeightRows: Boolean ): OSStatus; external name '_GetDataBrowserTableViewGeometry';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserTableViewItemID()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserTableViewItemID( browser: ControlRef; row: DataBrowserTableViewRowIndex; var item: DataBrowserItemID ): OSStatus; external name '_GetDataBrowserTableViewItemID';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserTableViewItemRow()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserTableViewItemRow( browser: ControlRef; item: DataBrowserItemID; row: DataBrowserTableViewRowIndex ): OSStatus; external name '_SetDataBrowserTableViewItemRow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserTableViewItemRow()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserTableViewItemRow( browser: ControlRef; item: DataBrowserItemID; var row: DataBrowserTableViewRowIndex ): OSStatus; external name '_GetDataBrowserTableViewItemRow';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserTableViewColumnPosition()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserTableViewColumnPosition( browser: ControlRef; column: DataBrowserTableViewColumnID; position: DataBrowserTableViewColumnIndex ): OSStatus; external name '_SetDataBrowserTableViewColumnPosition';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserTableViewColumnPosition()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserTableViewColumnPosition( browser: ControlRef; column: DataBrowserTableViewColumnID; var position: DataBrowserTableViewColumnIndex ): OSStatus; external name '_GetDataBrowserTableViewColumnPosition';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserTableViewColumnProperty()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserTableViewColumnProperty( browser: ControlRef; column: DataBrowserTableViewColumnIndex; var property: DataBrowserTableViewColumnID ): OSStatus; external name '_GetDataBrowserTableViewColumnProperty';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ kDataBrowserListView Formatting }
+
+{
+ * Discussion:
+ * DataBrowserPropertyFlags that are specific to kDataBrowserListView
+ }
+const
+ kDataBrowserListViewSelectionColumn = kDataBrowserTableViewSelectionColumn;
+ kDataBrowserListViewMovableColumn = 1 shl (kDataBrowserViewSpecificFlagsOffset + 1);
+ kDataBrowserListViewSortableColumn = 1 shl (kDataBrowserViewSpecificFlagsOffset + 2);
+
+ {
+ * kDataBrowserListViewTypeSelectColumn marks a column as
+ * type-selectable. If one or more of your list view columns are
+ * marked as type-selectable, Data Browser will do type-selection for
+ * you automatically. Data Browser applies the typing to the first
+ * column (in the system direction) with this property flag. This
+ * flag only intended for use with columns of type
+ * kDataBrowserTextType, kDataBrowserIconAndTextType, and
+ * kDataBrowserDateTimeType; if you set it for a column of another
+ * type, the type-selection behavior is undefined. Turning on this
+ * flag also causes Data Browser to gather all keyboard input via a
+ * carbon event handler instead of relying on calls to
+ * HandleControlKey; therefore, you will never see these keyboard
+ * events come out of WaitNextEvent. Only available on 10.3 and later.
+ }
+ kDataBrowserListViewTypeSelectColumn = 1 shl (kDataBrowserViewSpecificFlagsOffset + 3);
+
+ {
+ * Normally the text in a header button for a column of type
+ * kDataBrowserIconAndTextType is aligned as though it has an icon
+ * next to it even if no icon is specified for the header button; in
+ * other words, space is reserved for an icon in the header button
+ * even if no icon is displayed. However, this flag indicates that
+ * space should not be reserved for an icon if no icon is provided
+ * for the header button. This flag allows a client to justify the
+ * left edge of the text in a header button to the left edge of the
+ * icon in the cells beneath it. Available on 10.4 and later.
+ }
+ kDataBrowserListViewNoGapForIconInHeaderButton = 1 shl (kDataBrowserViewSpecificFlagsOffset + 4);
+ kDataBrowserListViewDefaultColumnFlags = kDataBrowserListViewMovableColumn + kDataBrowserListViewSortableColumn;
+
+type
+ DataBrowserListViewPropertyFlags = DataBrowserPropertyFlags;
+const
+ kDataBrowserListViewLatestHeaderDesc = 0;
+
+type
+ DataBrowserListViewHeaderDescPtr = ^DataBrowserListViewHeaderDesc;
+ DataBrowserListViewHeaderDesc = record
+ version: UInt32; { Use kDataBrowserListViewLatestHeaderDesc }
+
+ minimumWidth: UInt16;
+ maximumWidth: UInt16;
+
+ titleOffset: SInt16;
+ titleString: CFStringRef;
+ initialOrder: DataBrowserSortOrder;
+ btnFontStyle: ControlFontStyleRec;
+ btnContentInfo: ControlButtonContentInfo;
+ end;
+type
+ DataBrowserListViewColumnDescPtr = ^DataBrowserListViewColumnDesc;
+ DataBrowserListViewColumnDesc = record
+ propertyDesc: DataBrowserTableViewColumnDesc;
+ headerBtnDesc: DataBrowserListViewHeaderDesc;
+ end;
+{ kDataBrowserListView API }
+const
+ kDataBrowserListViewAppendColumn = kDataBrowserTableViewLastColumn;
+
+{
+ * AutoSizeDataBrowserListViewColumns()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function AutoSizeDataBrowserListViewColumns( browser: ControlRef ): OSStatus; external name '_AutoSizeDataBrowserListViewColumns';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * AddDataBrowserListViewColumn()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function AddDataBrowserListViewColumn( browser: ControlRef; var columnDesc: DataBrowserListViewColumnDesc; position: DataBrowserTableViewColumnIndex ): OSStatus; external name '_AddDataBrowserListViewColumn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserListViewHeaderDesc()
+ *
+ * Summary:
+ * Returns information about a specified column header in a list
+ * view.
+ *
+ * Discussion:
+ * Note that this API does not correctly use CoreFoundation naming
+ * conventions. Although the API name begins with "Get", implying
+ * that you do not need to release the CFStringRef and IconRef
+ * returned by this API, in fact you do actually need to release
+ * these objects.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * browser:
+ * The data browser for which you need header information.
+ *
+ * column:
+ * The column ID for which you need header information.
+ *
+ * desc:
+ * On exit, contains header information for the specified column.
+ * You must release the CFStringRef and IconRef contained in this
+ * structure.
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserListViewHeaderDesc( browser: ControlRef; column: DataBrowserTableViewColumnID; var desc: DataBrowserListViewHeaderDesc ): OSStatus; external name '_GetDataBrowserListViewHeaderDesc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * SetDataBrowserListViewHeaderDesc()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.2 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserListViewHeaderDesc( browser: ControlRef; column: DataBrowserTableViewColumnID; var desc: DataBrowserListViewHeaderDesc ): OSStatus; external name '_SetDataBrowserListViewHeaderDesc';
+(* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
+
+
+{
+ * SetDataBrowserListViewHeaderBtnHeight()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserListViewHeaderBtnHeight( browser: ControlRef; height: UInt16 ): OSStatus; external name '_SetDataBrowserListViewHeaderBtnHeight';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserListViewHeaderBtnHeight()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserListViewHeaderBtnHeight( browser: ControlRef; var height: UInt16 ): OSStatus; external name '_GetDataBrowserListViewHeaderBtnHeight';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserListViewUsePlainBackground()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserListViewUsePlainBackground( browser: ControlRef; usePlainBackground: Boolean ): OSStatus; external name '_SetDataBrowserListViewUsePlainBackground';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserListViewUsePlainBackground()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserListViewUsePlainBackground( browser: ControlRef; var usePlainBackground: Boolean ): OSStatus; external name '_GetDataBrowserListViewUsePlainBackground';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserListViewDisclosureColumn()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserListViewDisclosureColumn( browser: ControlRef; column: DataBrowserTableViewColumnID; expandableRows: Boolean ): OSStatus; external name '_SetDataBrowserListViewDisclosureColumn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserListViewDisclosureColumn()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserListViewDisclosureColumn( browser: ControlRef; var column: DataBrowserTableViewColumnID; var expandableRows: Boolean ): OSStatus; external name '_GetDataBrowserListViewDisclosureColumn';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ kDataBrowserColumnView API }
+{
+ * GetDataBrowserColumnViewPath()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserColumnViewPath( browser: ControlRef; path: Handle ): OSStatus; external name '_GetDataBrowserColumnViewPath';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserColumnViewPathLength()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserColumnViewPathLength( browser: ControlRef; var pathLength: UInt32 ): OSStatus; external name '_GetDataBrowserColumnViewPathLength';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserColumnViewPath()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserColumnViewPath( browser: ControlRef; length: UInt32; path: DataBrowserItemIDPtr ): OSStatus; external name '_SetDataBrowserColumnViewPath';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetDataBrowserColumnViewDisplayType()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetDataBrowserColumnViewDisplayType( browser: ControlRef; propertyType: DataBrowserPropertyType ): OSStatus; external name '_SetDataBrowserColumnViewDisplayType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * GetDataBrowserColumnViewDisplayType()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function GetDataBrowserColumnViewDisplayType( browser: ControlRef; var propertyType: DataBrowserPropertyType ): OSStatus; external name '_GetDataBrowserColumnViewDisplayType';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ DataBrowser UPP macros }
+{
+ Customizing Data Browser Accessibility Information
+
+ Warning: The following assumes you already understand how to handle the
+ Accessibility Carbon Events described in CarbonEvents.h.
+
+ Data Browser automatically handles the various Accessibility Carbon
+ Events to provide a large amount of Accessibility information. However,
+ your application may need to override or augment the default information
+ that Data Browser provides.
+
+ Though it is already possible for your application to install various
+ Accessibility Carbon Event handlers on a Data Browser instance, it is
+ impossible to interpret the AXUIElementRefs contained in the events
+ without the help of the Data Browser. A given AXUIElementRef that is
+ passed to Data Browser list view in an Accessibility Carbon Event could
+ represent a row, a cell, or the list view as a whole. If your
+ application needs to add an attribute to only the rows in a list view,
+ your application will need to ask Data Browser what any given
+ AXUIElementRef represents. The AXUIElementGetDataBrowserItemInfo allows
+ your application to ask that question.
+
+ Additionally, your application may want to generate its own AXUIElementRefs
+ that represent children of or point to various rows or cells of a Data Browser
+ instance. The AXUIElementCreateWithDataBrowserAndItemInfo API allows your
+ application to manufacture AXUIElementRefs that represent certain parts of a
+ Data Browser so you can provide them in your Accessibility Carbon Event
+ handlers.
+
+ Typical Usage Scenario: You want to add an Accessibility attribute to
+ all rows in a Data Browser list view.
+
+ Step 1: Install the appropriate Accessibility Carbon Event handlers
+ on your Data Browser instance. Call InstallEventHandler or a similar
+ API to install a handler onto your Data Browser ControlRef for the
+ kEventAccessibleGetAllAttributeNames,
+ kEventAccessibleGetNamedAttribute, and other appropriate events.
+
+ Step 2: Your handler should find out what part of the Data Browser
+ is being asked for its accessibility information. Extract the
+ kEventParamAccessibleObject parameter out of the Carbon Event and
+ pass it to AXUIElementGetDataBrowserItemInfo. See that API
+ description for more usage information and calling requirements.
+ Examine the DataBrowserAccessibilityItemInfo structure that is
+ filled out to determine whether it represents the part of the Data
+ Browser you are interested in adding an attribute to. In this case,
+ you are looking for a row, so you would make sure the item field is
+ not kDataBrowserNoItem, and that the columnProperty is
+ kDataBrowserItemNoProperty.
+
+ Step 3: Your event handler should call CallNextEventHandler to allow
+ the Data Browser to do the default handling of the event. This is
+ particularly important if the AXUIElementRef did not represent a
+ row, since you don't want to disrupt the Data Browser's handling of
+ the event for parts other than rows.
+
+ Step 4: If you determined that the part was a row in step 2, your
+ handler should now do whatever custom work it deems necessary. For
+ the kEventAccessibleGetAllAttributeNames, your handler would extract
+ the kEventParamAccessibleAttributeNames parameter out of the event
+ and add your custom attribute name to the array. For the
+ kEventAccessibleGetNamedAttribute event, your handler would test the
+ kEventParamAccessibleAttributeName parameter to see if it matches
+ your custom attribute name; if so, your handler would put its custom
+ data in the kEventParamAccessibleAttributeValue parameter. Any other
+ events would be handled similarly.
+
+ Step 5: Your event handler should return an appropriate result code.
+ In cases where the AXUIElementRef does not represent a row or when
+ the attribute name is not your custom attribute, your handler can
+ return the same result code that was returned by
+ CallNextEventHandler in step 3. In cases where your handler decided
+ to augment or override the default handling of the event, your
+ handler will typically want to return noErr. See the Carbon Event
+ documentation for more details on the meanings of result codes
+ returned by event handlers.
+}
+
+{
+ * DataBrowserAccessibilityItemInfoV0
+ *
+ * Summary:
+ * A specific description of Data Browser accessibility item
+ * information.
+ *
+ * Discussion:
+ * If you fill this structure as part of a
+ * DataBrowserAccessibilityItemInfo, you must set the
+ * DataBrowserAccessibilityItemInfo's version field to zero.
+ }
+type
+ DataBrowserAccessibilityItemInfoV0 = record
+{
+ * The DataBrowserItemID of the container the AXUIElementRef
+ * represents or lives within. Even kDataBrowserNoItem might be
+ * meaningful, since it is the root container ID if you haven't
+ * overridden it via SetDataBrowserTarget. In list view, the
+ * container helps narrow down the AXUIElementRef to either a
+ * disclosed child of another row, or the list as a whole. In column
+ * view, the container helps narrow down the AXUIElementRef to a
+ * column; also see the columnProperty description below.
+ }
+ container: DataBrowserItemID;
+
+ {
+ * The DataBrowserItemID of the item the AXUIElementRef represents or
+ * lives within. If item is kDataBrowserNoItem, the AXUIElementRef
+ * represents just the container. In list view, the item helps narrow
+ * down the AXUIElementRef to either a row, or the root container as
+ * a whole. In column view, the item helps narrow down the
+ * AXUIElementRef to either a cell, or a column as a whole; also see
+ * the columnProperty description below.
+ }
+ item: DataBrowserItemID;
+
+ {
+ * The DataBrowserPropertyID of the column the AXUIElementRef
+ * represents or lives within. If columnProperty is
+ * kDataBrowserItemNoProperty and item is not kDataBrowserNoItem, the
+ * AXUIElementRef represents a whole row. In list view, this field
+ * helps narrow down the AXUIElementRef to either a cell, or a row as
+ * a whole. In column view, the columnProperty will/must always be
+ * set to kDataBrowserItemNoProperty unless the AXUIElementRef
+ * represents the preview column. When the AXUIElementRef represents
+ * the preview column, the columnProperty will/must always be set to
+ * kDataBrowserColumnViewPreviewProperty, and the other fields of
+ * this structure will/must be set to zero or the equivalent constant.
+ }
+ columnProperty: DataBrowserPropertyID;
+
+ {
+ * The DataBrowserPropertyPart of the sub-cell part the
+ * AXUIElementRef represents. Examples include the disclosure
+ * triangle in a cell, the text in a cell, and the check box in a
+ * cell. If propertyPart is kDataBrowserPropertyEnclosingPart and
+ * columnProperty is not kDataBrowserItemNoProperty, the
+ * AXUIElementRef represents the cell as a whole. In both list view
+ * and column view, this field helps narrow down the AXUIElementRef
+ * to either a sub-cell part, or a cell as a whole. For column view,
+ * also see the columnProperty description above.
+ }
+ propertyPart: DataBrowserPropertyPart;
+ end;
+
+{
+ * DataBrowserAccessibilityItemInfoV1
+ *
+ * Summary:
+ * A specific description of Data Browser accessibility item
+ * information.
+ *
+ * Discussion:
+ * If you fill this structure as part of a
+ * DataBrowserAccessibilityItemInfo, you must set the
+ * DataBrowserAccessibilityItemInfo's version field to one.
+ *
+ * This structure is identical to the V0 structure except for the
+ * inclusion of row and column indicies. These indicies may be
+ * useful to clients who call AXUIElementGetDataBrowserItemInfo.
+ *
+ * If your Data Browser instance allows a given item and/or
+ * container to be displayed more than once at a given point in
+ * time, you can use the row and column indicies to differentiate
+ * the particular visual occurances of that item when calling
+ * AXUIElementCreateWithDataBrowserAndItemInfo. See the additional
+ * details in the rowIndex and columnIndex discussions below.
+ }
+type
+ DataBrowserAccessibilityItemInfoV1 = record
+{
+ * The DataBrowserItemID of the container the AXUIElementRef
+ * represents or lives within. Even kDataBrowserNoItem might be
+ * meaningful, since it is the root container ID if you haven't
+ * overridden it via SetDataBrowserTarget. In list view, the
+ * container helps narrow down the AXUIElementRef to either a
+ * disclosed child of another row, or the list as a whole. In column
+ * view, the container helps narrow down the AXUIElementRef to a
+ * column; also see the columnProperty description below.
+ }
+ container: DataBrowserItemID;
+
+ {
+ * The DataBrowserItemID of the item the AXUIElementRef represents or
+ * lives within. If item is kDataBrowserNoItem, the AXUIElementRef
+ * represents just the container. In list view, the item helps narrow
+ * down the AXUIElementRef to either a row, or the root container as
+ * a whole. In column view, the item helps narrow down the
+ * AXUIElementRef to either a cell, or a column as a whole; also see
+ * the columnProperty description below.
+ }
+ item: DataBrowserItemID;
+
+ {
+ * The DataBrowserPropertyID of the column the AXUIElementRef
+ * represents or lives within. If columnProperty is
+ * kDataBrowserItemNoProperty and item is not kDataBrowserNoItem, the
+ * AXUIElementRef represents a whole row. In list view, this field
+ * helps narrow down the AXUIElementRef to either a cell, or a row as
+ * a whole. In column view, the columnProperty will/must always be
+ * set to kDataBrowserItemNoProperty unless the AXUIElementRef
+ * represents the preview column. When the AXUIElementRef represents
+ * the preview column, the columnProperty will/must always be set to
+ * kDataBrowserColumnViewPreviewProperty, and the other fields of
+ * this structure will/must be set to zero or the equivalent constant.
+ }
+ columnProperty: DataBrowserPropertyID;
+
+ {
+ * The DataBrowserPropertyPart of the sub-cell part the
+ * AXUIElementRef represents. Examples include the disclosure
+ * triangle in a cell, the text in a cell, and the check box in a
+ * cell. If propertyPart is kDataBrowserPropertyEnclosingPart and
+ * columnProperty is not kDataBrowserItemNoProperty, the
+ * AXUIElementRef represents the cell as a whole. In both list view
+ * and column view, this field helps narrow down the AXUIElementRef
+ * to either a sub-cell part, or a cell as a whole. For column view,
+ * also see the columnProperty description above.
+ }
+ propertyPart: DataBrowserPropertyPart;
+
+ {
+ * The zero-based DataBrowserTableViewRowIndex of the row specified
+ * by the other parts of this structure. If the other parts of this
+ * structure do not specify a row or a part thereof, this field
+ * will/must be set to zero; because this field is zero based, you
+ * must test the other parts this structure to see whether this field
+ * is meaningful. In list view, when the other parts of this
+ * structure specify an item or part thereof, this field will/must be
+ * set to the row index at which the specified item can be found. In
+ * column view, when the other parts of this structure specify a cell
+ * or part thereof, this field will/must be set to the row index at
+ * which the specified cell can be found.
+ }
+ rowIndex: DataBrowserTableViewRowIndex;
+
+ {
+ * The zero-based DataBrowserTableViewColumnIndex of the column
+ * specified by the other parts of this structure. If the other parts
+ * of this structure do not specify a column or a part thereof, this
+ * field will/must be set to zero; because this field is zero based,
+ * you must test the other parts this structure to see whether this
+ * field is meaningful. In list view, when the other parts of this
+ * structure specify a cell or part thereof, this field will/must be
+ * set to the column index at which the specified cell can be found.
+ * In column view, when the other parts of this structure specify a
+ * column or part thereof, this field will/must be set to the column
+ * index at which the specified cell can be found.
+ }
+ columnIndex: DataBrowserTableViewColumnIndex;
+ end;
+
+{
+ * DataBrowserAccessibilityItemInfo
+ *
+ * Summary:
+ * A generalized description of Data Browser accessibility item
+ * information.
+ *
+ * Discussion:
+ * Pass this structure to AXUIElementGetDataBrowserItemInfo or
+ * AXUIElementCreateWithDataBrowserAndItemInfo.
+ }
+type
+ DataBrowserAccessibilityItemInfo = record
+{
+ * A UInt32 which identifies how to interpret the following union.
+ * Set this field to zero if you fill out the union's data in the
+ * form of a DataBrowserAccessibilityItemInfoV0 structure. Set this
+ * field to one if you fill out the union's data in the form of a
+ * DataBrowserAccessibilityItemInfoV1 structure.
+ }
+ version: UInt32;
+ case SInt16 of
+ 0: (
+ v0: DataBrowserAccessibilityItemInfoV0;
+ );
+ 1: (
+ v1: DataBrowserAccessibilityItemInfoV1;
+ );
+ end;
+{
+ * AXUIElementGetDataBrowserItemInfo()
+ *
+ * Summary:
+ * Gets a description of the part of a Data Browser represented by a
+ * given AXUIElementRef.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inElement:
+ * An AXUIElementRef representing part of a Data Browser.
+ *
+ * inDataBrowser:
+ * A Data Browser ControlRef.
+ *
+ * inDesiredInfoVersion:
+ * A UInt32 indicating the the version you want the ioInfo
+ * structure passed back as. Currently, the only supported version
+ * is zero, so you must pass zero in the inDesiredInfoVersion
+ * parameter.
+ *
+ * outInfo:
+ * A DataBrowserAccessibilityItemInfo that will be filled in with
+ * a description of the part of the Data Browser that the
+ * AXUIElementRef represents.
+ *
+ * Result:
+ * An OSStatus result code. The function will return noErr if it was
+ * able to generate a description of the AXUIElementRef. If the
+ * AXUIElementRef does not represent the Data Browser you passed in,
+ * the function will return paramErr. If the AXUIElementRef
+ * represents some non-item part of the Data Browser, the function
+ * will return errDataBrowserItemNotFound.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function AXUIElementGetDataBrowserItemInfo( inElement: AXUIElementRef; inDataBrowser: ControlRef; inDesiredInfoVersion: UInt32; var outInfo: DataBrowserAccessibilityItemInfo ): OSStatus; external name '_AXUIElementGetDataBrowserItemInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * AXUIElementCreateWithDataBrowserAndItemInfo()
+ *
+ * Summary:
+ * Creates an AXUIElementRef to represent some part of a Data
+ * Browser accessibility hierarchy.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * inDataBrowser:
+ * A Data Browser ControlRef.
+ *
+ * inInfo:
+ * A DataBrowserAccessibilityItemInfo describing the part of the
+ * Data Browser for which you want to create an AXUIElementRef.
+ *
+ * Result:
+ * An AXUIElementRef representing the part, or NULL if one cannot be
+ * created to represent the part you specified.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
+ * Non-Carbon CFM: not available
+ }
+function AXUIElementCreateWithDataBrowserAndItemInfo( inDataBrowser: ControlRef; const (*var*) inInfo: DataBrowserAccessibilityItemInfo ): AXUIElementRef; external name '_AXUIElementCreateWithDataBrowserAndItemInfo';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{---------------------------------------------------------------------------------------}
+{ EditUnicodeText Control }
+{---------------------------------------------------------------------------------------}
+{ This control is only available in Mac OS X. It is super similar to Edit Text control }
+{ Use all the same Get/Set tags. But don't ask for the TEHandle. }
+{---------------------------------------------------------------------------------------}
+{ This callback supplies the functionality of the TSMTEPostUpdateProcPtr that is used }
+{ in the EditText control. A client should supply this call if they want to look at }
+{ inline text that has been fixed before it is included in the actual body text }
+{ if the new text (i.e. the text in the handle) should be included in the body text }
+{ the client should return true. If the client wants to block the inclusion of the }
+{ text they should return false. }
+type
+ EditUnicodePostUpdateProcPtr = function( uniText: UniCharArrayHandle; uniTextLength: UniCharCount; iStartOffset: UniCharArrayOffset; iEndOffset: UniCharArrayOffset; refcon: UnivPtr ): Boolean;
+type
+ EditUnicodePostUpdateUPP = EditUnicodePostUpdateProcPtr;
+{
+ * NewEditUnicodePostUpdateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function NewEditUnicodePostUpdateUPP( userRoutine: EditUnicodePostUpdateProcPtr ): EditUnicodePostUpdateUPP; external name '_NewEditUnicodePostUpdateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * DisposeEditUnicodePostUpdateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeEditUnicodePostUpdateUPP( userUPP: EditUnicodePostUpdateUPP ); external name '_DisposeEditUnicodePostUpdateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+{
+ * InvokeEditUnicodePostUpdateUPP()
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function InvokeEditUnicodePostUpdateUPP( uniText: UniCharArrayHandle; uniTextLength: UniCharCount; iStartOffset: UniCharArrayOffset; iEndOffset: UniCharArrayOffset; refcon: UnivPtr; userUPP: EditUnicodePostUpdateUPP ): Boolean; external name '_InvokeEditUnicodePostUpdateUPP';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+const
+ kControlEditUnicodeTextProc = 912;
+ kControlEditUnicodeTextPasswordProc = 914;
+
+{ Control Kind Tag }
+const
+ kControlKindEditUnicodeText = $65757478 (* 'eutx' *);
+
+{ The HIObject class ID for the HITextField class. }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHITextFieldClassID CFSTRP('com.apple.HITextField')}
+{$endc}
+{
+ * CreateEditUnicodeTextControl()
+ *
+ * Summary:
+ * Creates a new edit text control.
+ *
+ * Discussion:
+ * This is the preferred edit text control. Use it instead of the
+ * EditText control. This control handles Unicode and draws its text
+ * using antialiasing, which the other control does not.
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Parameters:
+ *
+ * window:
+ * The window in which the control should be placed. May be NULL
+ * in 10.3 and later.
+ *
+ * boundsRect:
+ * The bounds of the control, in local coordinates of the window.
+ *
+ * text:
+ * The text of the control. May be NULL.
+ *
+ * isPassword:
+ * A Boolean indicating whether the field is to be used as a
+ * password field. Passing false indicates that the field is to
+ * display entered text normally. True means that the field will
+ * be used as a password field and any text typed into the field
+ * will be displayed only as bullets.
+ *
+ * style:
+ * The control's font style, size, color, and so on. May be NULL.
+ *
+ * outControl:
+ * On exit, contains the new control (if noErr is returned as the
+ * result code).
+ *
+ * Result:
+ * An operating system result code.
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateEditUnicodeTextControl( window: WindowRef; const (*var*) boundsRect: Rect; text: CFStringRef { can be NULL }; isPassword: Boolean; {const} style: ControlFontStyleRecPtr { can be NULL }; var outControl: ControlRef ): OSStatus; external name '_CreateEditUnicodeTextControl';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ The EditUnicodeText control supports these tags previously defined for the EditText control:
+
+ kControlEditTextLockedTag
+ kControlFontStyleTag
+ kControlEditTextFixedTextTag
+ kControlEditTextTextTag
+ kControlEditTextKeyFilterTag
+ kControlEditTextValidationProcTag
+ kControlEditTextSelectionTag
+ kControlEditTextKeyScriptBehaviorTag
+ kControlEditTextCFStringTag
+ kControlEditTextPasswordTag
+ kControlEditTextPasswordCFStringTag
+}
+{ Tagged data supported by EditUnicodeText control only }
+const
+ kControlEditTextSingleLineTag = $73676C63 (* 'sglc' *); { data is a Boolean; indicates whether the control should always be single-line}
+ kControlEditTextInsertTextBufferTag = $696E7478 (* 'intx' *); { data is an array of char; get or set the control's text as WorldScript-encoded text}
+ kControlEditTextInsertCFStringRefTag = $696E6366 (* 'incf' *); { data is a CFStringRef; get or set the control's text as a CFStringRef. Caller should release CFString if getting.}
+ kControlEditUnicodeTextPostUpdateProcTag = $75707570 (* 'upup' *); { data is a UnicodePostUpdateUPP; get or set the post-update proc}
+
+{$ifc OLDROUTINENAMES}
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+{ ¥ OLDROUTINENAMES }
+{ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
+const
+ kControlCheckboxUncheckedValue = kControlCheckBoxUncheckedValue;
+ kControlCheckboxCheckedValue = kControlCheckBoxCheckedValue;
+ kControlCheckboxMixedValue = kControlCheckBoxMixedValue;
+
+const
+ inLabel = kControlLabelPart;
+ inMenu = kControlMenuPart;
+ inTriangle = kControlTrianglePart;
+ inButton = kControlButtonPart;
+ inCheckBox = kControlCheckBoxPart;
+ inUpButton = kControlUpButtonPart;
+ inDownButton = kControlDownButtonPart;
+ inPageUp = kControlPageUpPart;
+ inPageDown = kControlPageDownPart;
+
+const
+ kInLabelControlPart = kControlLabelPart;
+ kInMenuControlPart = kControlMenuPart;
+ kInTriangleControlPart = kControlTrianglePart;
+ kInButtonControlPart = kControlButtonPart;
+ kInCheckBoxControlPart = kControlCheckBoxPart;
+ kInUpButtonControlPart = kControlUpButtonPart;
+ kInDownButtonControlPart = kControlDownButtonPart;
+ kInPageUpControlPart = kControlPageUpPart;
+ kInPageDownControlPart = kControlPageDownPart;
+
+
+{$endc} {OLDROUTINENAMES}
+
+
+{$ALIGN MAC68K}
+
+
+{unit Displays}
+{
+ File: Displays.p
+
+ Contains: Display Manager Interfaces.
+
+ Version: Technology: Mac OS 8
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1993-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+ DMProcessInfoPtr = ProcessSerialNumberPtr;
+ DMModalFilterUPP = ModalFilterUPP;
+
+
+const
+ { AppleEvents Core Suite }
+ kAESystemConfigNotice = $636E6667 (* 'cnfg' *); { Core Suite types }
+ kAEDisplayNotice = $6473706C (* 'dspl' *);
+ kAEDisplaySummary = $6473756D (* 'dsum' *);
+ keyDMConfigVersion = $646D6376 (* 'dmcv' *);
+ keyDMConfigFlags = $646D6366 (* 'dmcf' *);
+ keyDMConfigReserved = $646D6372 (* 'dmcr' *);
+ keyDisplayID = $646D6964 (* 'dmid' *);
+ keyDisplayComponent = $646D6463 (* 'dmdc' *);
+ keyDisplayDevice = $646D6464 (* 'dmdd' *);
+ keyDisplayFlags = $646D6466 (* 'dmdf' *);
+ keyDisplayMode = $646D646D (* 'dmdm' *);
+ keyDisplayModeReserved = $646D6D72 (* 'dmmr' *);
+ keyDisplayReserved = $646D6472 (* 'dmdr' *);
+ keyDisplayMirroredId = $646D6D69 (* 'dmmi' *);
+ keyDeviceFlags = $64646466 (* 'dddf' *);
+ keyDeviceDepthMode = $6464646D (* 'dddm' *);
+ keyDeviceRect = $64646472 (* 'dddr' *);
+ keyPixMapRect = $64706472 (* 'dpdr' *);
+ keyPixMapHResolution = $64706872 (* 'dphr' *);
+ keyPixMapVResolution = $64707672 (* 'dpvr' *);
+ keyPixMapPixelType = $64707074 (* 'dppt' *);
+ keyPixMapPixelSize = $64707073 (* 'dpps' *);
+ keyPixMapCmpCount = $64706363 (* 'dpcc' *);
+ keyPixMapCmpSize = $64706373 (* 'dpcs' *);
+ keyPixMapAlignment = $64707061 (* 'dppa' *);
+ keyPixMapResReserved = $64707272 (* 'dprr' *);
+ keyPixMapReserved = $64707072 (* 'dppr' *);
+ keyPixMapColorTableSeed = $64706374 (* 'dpct' *);
+ keySummaryMenubar = $64736D62 (* 'dsmb' *);
+ keySummaryChanges = $64736368 (* 'dsch' *);
+ keyDisplayOldConfig = $646F6C64 (* 'dold' *);
+ keyDisplayNewConfig = $646E6577 (* 'dnew' *);
+
+ dmOnlyActiveDisplays = true;
+ dmAllDisplays = false;
+
+
+ { DMSendDependentNotification notifyClass }
+ kDependentNotifyClassShowCursor = $73686372 (* 'shcr' *); { When display mgr shows a hidden cursor during an unmirror }
+ kDependentNotifyClassDriverOverride = $6E647276 (* 'ndrv' *); { When a driver is overridden }
+ kDependentNotifyClassDisplayMgrOverride = $646D6772 (* 'dmgr' *); { When display manager is upgraded }
+ kDependentNotifyClassProfileChanged = $70726F66 (* 'prof' *); { When DMSetProfileByAVID is called }
+
+
+ { Switch Flags }
+ kNoSwitchConfirmBit = 0; { Flag indicating that there is no need to confirm a switch to this mode }
+ kDepthNotAvailableBit = 1; { Current depth not available in new mode }
+ kShowModeBit = 3; { Show this mode even though it requires a confirm. }
+ kModeNotResizeBit = 4; { Do not use this mode to resize display (for cards that mode drives a different connector). }
+ kNeverShowModeBit = 5; { This mode should not be shown in the user interface. }
+
+ { Summary Change Flags (sticky bits indicating an operation was performed)
+ For example, moving a display then moving it back will still set the kMovedDisplayBit.
+ }
+ kBeginEndConfigureBit = 0;
+ kMovedDisplayBit = 1;
+ kSetMainDisplayBit = 2;
+ kSetDisplayModeBit = 3;
+ kAddDisplayBit = 4;
+ kRemoveDisplayBit = 5;
+ kNewDisplayBit = 6;
+ kDisposeDisplayBit = 7;
+ kEnabledDisplayBit = 8;
+ kDisabledDisplayBit = 9;
+ kMirrorDisplayBit = 10;
+ kUnMirrorDisplayBit = 11;
+
+
+ { Notification Messages for extended call back routines }
+ kDMNotifyRequestConnectionProbe = 0; { Like kDMNotifyRequestDisplayProbe only not for smart displays (used in wake before all busses are awake) }
+ kDMNotifyInstalled = 1; { At install time }
+ kDMNotifyEvent = 2; { Post change time }
+ kDMNotifyRemoved = 3; { At remove time }
+ kDMNotifyPrep = 4; { Pre change time }
+ kDMNotifyExtendEvent = 5; { Allow registrees to extend apple event before it is sent }
+ kDMNotifyDependents = 6; { Minor notification check without full update }
+ kDMNotifySuspendConfigure = 7; { Temporary end of configuration }
+ kDMNotifyResumeConfigure = 8; { Resume configuration }
+ kDMNotifyRequestDisplayProbe = 9; { Request smart displays re-probe (used in sleep and hot plugging) }
+ { Notification Flags }
+ kExtendedNotificationProc = $00010000;
+
+
+ { types for notifyType }
+ kFullNotify = 0; { This is the appleevent whole nine yards notify }
+ kFullDependencyNotify = 1; { Only sends to those who want to know about interrelated functionality (used for updating UI) }
+
+ { DisplayID/DeviceID constants }
+ kDummyDeviceID = $00FF; { This is the ID of the dummy display, used when the last ÒrealÓ display is disabled. }
+ kInvalidDisplayID = $0000; { This is the invalid ID }
+ kFirstDisplayID = $0100;
+
+ { bits for panelListFlags }
+ kAllowDuplicatesBit = 0;
+
+ { bits for nameFlags }
+ kSuppressNumberBit = 0;
+ kSuppressNumberMask = 1;
+ kForceNumberBit = 1;
+ kForceNumberMask = 2;
+ kSuppressNameBit = 2;
+ kSuppressNameMask = 4;
+
+ { DMGetNameByAVID masks }
+ kDMSupressNumbersMask = $01; { Supress the numbers and return only names }
+ kDMForceNumbersMask = $02; { Force numbers to always be shown (even on single display configs) }
+ kDMSupressNameMask = $04; { Supress the names and return only numbers. }
+
+
+ { Constants for fidelity checks }
+ kNoFidelity = 0;
+ kMinimumFidelity = 1;
+ kDefaultFidelity = 500; { I'm just picking a number for Apple default panels and engines }
+ kDefaultManufacturerFidelity = 1000; { I'm just picking a number for Manufacturer's panels and engines (overrides apple defaults) }
+
+ kAnyPanelType = 0; { Pass to DMNewEngineList for list of all panels (as opposed to specific types) }
+ kAnyEngineType = 0; { Pass to DMNewEngineList for list of all engines }
+ kAnyDeviceType = 0; { Pass to DMNewDeviceList for list of all devices }
+ kAnyPortType = 0; { Pass to DMNewDevicePortList for list of all devices }
+
+ { portListFlags for DM_NewDevicePortList }
+ { Should offline devices be put into the port list (such as dummy display) }
+ kPLIncludeOfflineDevicesBit = 0;
+
+
+ { confirmFlags for DMConfirmConfiguration }
+ kForceConfirmBit = 0; { Force a confirm dialog }
+ kForceConfirmMask = $01;
+
+
+ { Flags for displayModeFlags }
+ kDisplayModeListNotPreferredBit = 0;
+ kDisplayModeListNotPreferredMask = $01;
+
+
+ { Flags for itemFlags }
+ kComponentListNotPreferredBit = 0;
+ kComponentListNotPreferredMask = $01;
+
+ kDisplayTimingInfoVersionZero = 1;
+ kDisplayTimingInfoReservedCountVersionZero = 16;
+ kDisplayModeEntryVersionZero = 0; { displayModeVersion - original version }
+ kDisplayModeEntryVersionOne = 1; { displayModeVersion - added displayModeOverrideInfo }
+
+
+ kMakeAndModelReservedCount = 4; { Number of reserved fields }
+
+
+ { Display Gestalt for DMDisplayGestalt }
+ kDisplayGestaltDisplayCommunicationAttr = $636F6D6D (* 'comm' *);
+ kDisplayGestaltForbidI2CMask = $01; { Some displays have firmware problems if they get I2C communication. If this bit is set, then I2C communication is forbidden }
+ kDisplayGestaltUseI2CPowerMask = $02; { Some displays require I2C power settings (most use DPMS). }
+ kDisplayGestaltCalibratorAttr = $63616C69 (* 'cali' *);
+ kDisplayGestaltBrightnessAffectsGammaMask = $01; { Used by default calibrator (should we show brightness panel) }
+ kDisplayGestaltViewAngleAffectsGammaMask = $02; { Currently not used by color sync }
+
+
+type
+ DMFidelityType = UInt32;
+ {
+ AVID is an ID for ports and devices the old DisplayID type
+ is carried on for compatibility
+ }
+
+
+ DMListType = Ptr;
+ DMListIndexType = UInt32;
+ AVPowerStateRec = VDPowerStateRec;
+ AVPowerStateRecPtr = ^AVPowerStateRec;
+ AVPowerStatePtr = ^VDPowerStateRec;
+ DMDisplayTimingInfoRecPtr = ^DMDisplayTimingInfoRec;
+ DMDisplayTimingInfoRec = record
+ timingInfoVersion: UInt32;
+ timingInfoAttributes: UInt32; { Flags }
+ timingInfoRelativeQuality: SInt32; { quality of the timing }
+ timingInfoRelativeDefault: SInt32; { relative default of the timing }
+ timingInfoReserved: array [0..15] of UInt32; { Reserved }
+ end;
+
+ DMDisplayTimingInfoPtr = ^DMDisplayTimingInfoRec;
+
+ DMComponentListEntryRecPtr = ^DMComponentListEntryRec;
+ DMComponentListEntryRec = record
+ itemID: DisplayIDType; { DisplayID Manager }
+ itemComponent: Component; { Component Manager }
+ itemDescription: ComponentDescription; { We can always construct this if we use something beyond the compontent mgr. }
+ itemClass: ResType; { Class of group to put this panel (eg geometry/color/etc for panels, brightness/contrast for engines, video out/sound/etc for devices) }
+ itemFidelity: DMFidelityType; { How good is this item for the specified search? }
+ itemSubClass: ResType; { Subclass of group to put this panel. Can use to do sub-grouping (eg volume for volume panel and mute panel) }
+ itemSort: Point; { Set to 0 - future to sort the items in a sub group. }
+ itemFlags: UInt32; { Set to 0 (future expansion) }
+ itemReserved: ResType; { What kind of code does the itemReference point to (right now - kPanelEntryTypeComponentMgr only) }
+ itemFuture1: UInt32; { Set to 0 (future expansion - probably an alternate code style) }
+ itemFuture2: UInt32; { Set to 0 (future expansion - probably an alternate code style) }
+ itemFuture3: UInt32; { Set to 0 (future expansion - probably an alternate code style) }
+ itemFuture4: UInt32; { Set to 0 (future expansion - probably an alternate code style) }
+ end;
+
+ DMComponentListEntryPtr = ^DMComponentListEntryRec;
+ { ¥¥¥ Move AVLocationRec to AVComponents.i AFTER AVComponents.i is created }
+ AVLocationRecPtr = ^AVLocationRec;
+ AVLocationRec = record
+ locationConstant: UInt32; { Set to 0 (future expansion - probably an alternate code style) }
+ end;
+
+ AVLocationPtr = ^AVLocationRec;
+ DMDepthInfoRecPtr = ^DMDepthInfoRec;
+ DMDepthInfoRec = record
+ depthSwitchInfo: VDSwitchInfoPtr; { This is the switch mode to choose this timing/depth }
+ depthVPBlock: VPBlockPtr; { VPBlock (including size, depth and format) }
+ depthFlags: UInt32; { VDVideoParametersInfoRec.csDepthFlags }
+ depthReserved1: UInt32; { Reserved }
+ depthReserved2: UInt32; { Reserved }
+ end;
+
+ DMDepthInfoPtr = ^DMDepthInfoRec;
+ DMDepthInfoBlockRecPtr = ^DMDepthInfoBlockRec;
+ DMDepthInfoBlockRec = record
+ depthBlockCount: UInt32; { How many depths are there? }
+ depthVPBlock: DMDepthInfoPtr; { Array of DMDepthInfoRec }
+ depthBlockFlags: UInt32; { Reserved }
+ depthBlockReserved1: UInt32; { Reserved }
+ depthBlockReserved2: UInt32; { Reserved }
+ end;
+
+ DMDepthInfoBlockPtr = ^DMDepthInfoBlockRec;
+ DMDisplayModeListEntryRecPtr = ^DMDisplayModeListEntryRec;
+ DMDisplayModeListEntryRec = record
+ displayModeFlags: UInt32;
+ displayModeSwitchInfo: VDSwitchInfoPtr;
+ displayModeResolutionInfo: VDResolutionInfoPtr;
+ displayModeTimingInfo: VDTimingInfoPtr;
+ displayModeDepthBlockInfo: DMDepthInfoBlockPtr; { Information about all the depths }
+ displayModeVersion: UInt32; { What version is this record (now kDisplayModeEntryVersionOne) }
+ displayModeName: StringPtr; { Name of the timing mode }
+ displayModeDisplayInfo: DMDisplayTimingInfoPtr; { Information from the display. }
+ end;
+
+ DMDisplayModeListEntryPtr = ^DMDisplayModeListEntryRec;
+
+ DependentNotifyRecPtr = ^DependentNotifyRec;
+ DependentNotifyRec = record
+ notifyType: ResType; { What type was the engine that made the change (may be zero) }
+ notifyClass: ResType; { What class was the change (eg geometry, color etc) }
+ notifyPortID: DisplayIDType; { Which device was touched (kInvalidDisplayID -> all or none) }
+ notifyComponent: ComponentInstance; { What engine did it (may be 0)? }
+ notifyVersion: UInt32; { Set to 0 (future expansion) }
+ notifyFlags: UInt32; { Set to 0 (future expansion) }
+ notifyReserved: UInt32; { Set to 0 (future expansion) }
+ notifyFuture: UInt32; { Set to 0 (future expansion) }
+ end;
+
+ DependentNotifyPtr = ^DependentNotifyRec;
+
+ DMMakeAndModelRecPtr = ^DMMakeAndModelRec;
+ DMMakeAndModelRec = record
+ manufacturer: ResType;
+ model: UInt32;
+ serialNumber: UInt32;
+ manufactureDate: UInt32;
+ makeReserved: array [0..3] of UInt32;
+ end;
+
+ DMMakeAndModelPtr = ^DMMakeAndModelRec;
+ { DMNewDisplayList displayListIncludeFlags }
+
+const
+ kIncludeOnlineActiveDisplaysMask = $01;
+ kIncludeOnlineDisabledDisplaysMask = $02;
+ kIncludeOfflineDisplaysMask = $04;
+ kIncludeOfflineDummyDisplaysMask = $08;
+ kIncludeHardwareMirroredDisplaysMask = $10;
+
+
+ { modeListFlags for DMNewDisplayModeList }
+ kDMModeListIncludeAllModesMask = $01; { Include all timing modes not _explicitly_ excluded (see other bits) }
+ kDMModeListIncludeOfflineModesMask = $02;
+ kDMModeListExcludeDriverModesMask = $04; { Exclude old-style timing modes (cscGetNextResolution/kDisplayModeIDFindFirstResolution modes) }
+ kDMModeListExcludeDisplayModesMask = $08; { Exclude timing modes that come from the display (always arbritrary timing modes) }
+ kDMModeListExcludeCustomModesMask = $10; { Exclude custom modes that came neither from the driver or display (need a better name) }
+ kDMModeListPreferStretchedModesMask = $20; { Prefer modes that are stretched over modes that are letterboxed when setting kDisplayModeListNotPreferredBit }
+ kDMModeListPreferSafeModesMask = $40; { Prefer modes that are safe over modes that are not when setting kDisplayModeListNotPreferredBit }
+ kDMModeListExcludeDriverScaledModesMask = $80; { Exclude modes that are scaled by the driver (usually on fixed resolution displays) }
+
+
+ { DMNewDisplayList displayListFlags }
+
+type
+ DisplayListEntryRecPtr = ^DisplayListEntryRec;
+ DisplayListEntryRec = record
+ displayListEntryGDevice: GDHandle;
+ displayListEntryDisplayID: DisplayIDType;
+ displayListEntryIncludeFlags: UInt32; { Reason this entry was included }
+ displayListEntryReserved1: UInt32;
+ displayListEntryReserved2: UInt32; { Zero }
+ displayListEntryReserved3: UInt32; { Zero }
+ displayListEntryReserved4: UInt32; { Zero }
+ displayListEntryReserved5: UInt32; { Zero }
+ end;
+
+ DisplayListEntryPtr = ^DisplayListEntryRec;
+ DMProfileListEntryRecPtr = ^DMProfileListEntryRec;
+ DMProfileListEntryRec = record
+ profileRef: CMProfileRef;
+ profileReserved1: Ptr; { Reserved }
+ profileReserved2: Ptr; { Reserved }
+ profileReserved3: Ptr; { Reserved }
+ end;
+
+ DMProfileListEntryPtr = ^DMProfileListEntryRec;
+{$ifc TYPED_FUNCTION_POINTERS}
+ DMNotificationProcPtr = procedure(var theEvent: AppleEvent);
+{$elsec}
+ DMNotificationProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ DMExtendedNotificationProcPtr = procedure(userData: UnivPtr; theMessage: SInt16; notifyData: UnivPtr);
+{$elsec}
+ DMExtendedNotificationProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ DMComponentListIteratorProcPtr = procedure(userData: UnivPtr; itemIndex: DMListIndexType; componentInfo: DMComponentListEntryPtr);
+{$elsec}
+ DMComponentListIteratorProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ DMDisplayModeListIteratorProcPtr = procedure(userData: UnivPtr; itemIndex: DMListIndexType; displaymodeInfo: DMDisplayModeListEntryPtr);
+{$elsec}
+ DMDisplayModeListIteratorProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ DMProfileListIteratorProcPtr = procedure(userData: UnivPtr; itemIndex: DMListIndexType; profileInfo: DMProfileListEntryPtr);
+{$elsec}
+ DMProfileListIteratorProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ DMDisplayListIteratorProcPtr = procedure(userData: UnivPtr; itemIndex: DMListIndexType; displaymodeInfo: DisplayListEntryPtr);
+{$elsec}
+ DMDisplayListIteratorProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ DMNotificationUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DMNotificationUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ DMExtendedNotificationUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DMExtendedNotificationUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ DMComponentListIteratorUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DMComponentListIteratorUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ DMDisplayModeListIteratorUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DMDisplayModeListIteratorUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ DMProfileListIteratorUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DMProfileListIteratorUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ DMDisplayListIteratorUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DMDisplayListIteratorUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppDMNotificationProcInfo = $000000C0;
+ uppDMExtendedNotificationProcInfo = $00000EC0;
+ uppDMComponentListIteratorProcInfo = $00000FC0;
+ uppDMDisplayModeListIteratorProcInfo = $00000FC0;
+ uppDMProfileListIteratorProcInfo = $00000FC0;
+ uppDMDisplayListIteratorProcInfo = $00000FC0;
+ {
+ * NewDMNotificationUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewDMNotificationUPP(userRoutine: DMNotificationProcPtr): DMNotificationUPP; external name '_NewDMNotificationUPP'; { old name was NewDMNotificationProc }
+{
+ * NewDMExtendedNotificationUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewDMExtendedNotificationUPP(userRoutine: DMExtendedNotificationProcPtr): DMExtendedNotificationUPP; external name '_NewDMExtendedNotificationUPP'; { old name was NewDMExtendedNotificationProc }
+{
+ * NewDMComponentListIteratorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewDMComponentListIteratorUPP(userRoutine: DMComponentListIteratorProcPtr): DMComponentListIteratorUPP; external name '_NewDMComponentListIteratorUPP'; { old name was NewDMComponentListIteratorProc }
+{
+ * NewDMDisplayModeListIteratorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewDMDisplayModeListIteratorUPP(userRoutine: DMDisplayModeListIteratorProcPtr): DMDisplayModeListIteratorUPP; external name '_NewDMDisplayModeListIteratorUPP'; { old name was NewDMDisplayModeListIteratorProc }
+{
+ * NewDMProfileListIteratorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewDMProfileListIteratorUPP(userRoutine: DMProfileListIteratorProcPtr): DMProfileListIteratorUPP; external name '_NewDMProfileListIteratorUPP'; { old name was NewDMProfileListIteratorProc }
+{
+ * NewDMDisplayListIteratorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewDMDisplayListIteratorUPP(userRoutine: DMDisplayListIteratorProcPtr): DMDisplayListIteratorUPP; external name '_NewDMDisplayListIteratorUPP'; { old name was NewDMDisplayListIteratorProc }
+{
+ * DisposeDMNotificationUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeDMNotificationUPP(userUPP: DMNotificationUPP); external name '_DisposeDMNotificationUPP';
+{
+ * DisposeDMExtendedNotificationUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeDMExtendedNotificationUPP(userUPP: DMExtendedNotificationUPP); external name '_DisposeDMExtendedNotificationUPP';
+{
+ * DisposeDMComponentListIteratorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeDMComponentListIteratorUPP(userUPP: DMComponentListIteratorUPP); external name '_DisposeDMComponentListIteratorUPP';
+{
+ * DisposeDMDisplayModeListIteratorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeDMDisplayModeListIteratorUPP(userUPP: DMDisplayModeListIteratorUPP); external name '_DisposeDMDisplayModeListIteratorUPP';
+{
+ * DisposeDMProfileListIteratorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeDMProfileListIteratorUPP(userUPP: DMProfileListIteratorUPP); external name '_DisposeDMProfileListIteratorUPP';
+{
+ * DisposeDMDisplayListIteratorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeDMDisplayListIteratorUPP(userUPP: DMDisplayListIteratorUPP); external name '_DisposeDMDisplayListIteratorUPP';
+{
+ * InvokeDMNotificationUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeDMNotificationUPP(var theEvent: AppleEvent; userRoutine: DMNotificationUPP); external name '_InvokeDMNotificationUPP'; { old name was CallDMNotificationProc }
+{
+ * InvokeDMExtendedNotificationUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeDMExtendedNotificationUPP(userData: UnivPtr; theMessage: SInt16; notifyData: UnivPtr; userRoutine: DMExtendedNotificationUPP); external name '_InvokeDMExtendedNotificationUPP'; { old name was CallDMExtendedNotificationProc }
+{
+ * InvokeDMComponentListIteratorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeDMComponentListIteratorUPP(userData: UnivPtr; itemIndex: DMListIndexType; componentInfo: DMComponentListEntryPtr; userRoutine: DMComponentListIteratorUPP); external name '_InvokeDMComponentListIteratorUPP'; { old name was CallDMComponentListIteratorProc }
+{
+ * InvokeDMDisplayModeListIteratorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeDMDisplayModeListIteratorUPP(userData: UnivPtr; itemIndex: DMListIndexType; displaymodeInfo: DMDisplayModeListEntryPtr; userRoutine: DMDisplayModeListIteratorUPP); external name '_InvokeDMDisplayModeListIteratorUPP'; { old name was CallDMDisplayModeListIteratorProc }
+{
+ * InvokeDMProfileListIteratorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeDMProfileListIteratorUPP(userData: UnivPtr; itemIndex: DMListIndexType; profileInfo: DMProfileListEntryPtr; userRoutine: DMProfileListIteratorUPP); external name '_InvokeDMProfileListIteratorUPP'; { old name was CallDMProfileListIteratorProc }
+{
+ * InvokeDMDisplayListIteratorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeDMDisplayListIteratorUPP(userData: UnivPtr; itemIndex: DMListIndexType; displaymodeInfo: DisplayListEntryPtr; userRoutine: DMDisplayListIteratorUPP); external name '_InvokeDMDisplayListIteratorUPP'; { old name was CallDMDisplayListIteratorProc }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * DMDisplayGestalt()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DMDisplayGestalt(theDisplayID: DisplayIDType; displayGestaltSelector: ResType; var displayGestaltResponse: UInt32): OSErr; external name '_DMDisplayGestalt';
+{
+ * DMUseScreenPrefs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DMUseScreenPrefs(usePrefs: boolean; displayState: Handle): OSErr; external name '_DMUseScreenPrefs';
+{
+ * DMSuspendConfigure()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DMSuspendConfigure(displayState: Handle; reserved1: UInt32): OSErr; external name '_DMSuspendConfigure';
+{
+ * DMResumeConfigure()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DMResumeConfigure(displayState: Handle; reserved1: UInt32): OSErr; external name '_DMResumeConfigure';
+{
+ * DMSetGammaByAVID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DMSetGammaByAVID(gammaAVID: AVIDType; setGammaFlags: UInt32; theGamma: GammaTblHandle): OSErr; external name '_DMSetGammaByAVID';
+{
+ * DMGetGammaByAVID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DMGetGammaByAVID(gammaAVID: AVIDType; getGammaFlags: UInt32; var theGamma: GammaTblHandle): OSErr; external name '_DMGetGammaByAVID';
+{
+ * DMGetMakeAndModelByAVID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DMGetMakeAndModelByAVID(theAVID: AVIDType; theMakeAndModel: DMMakeAndModelPtr): OSErr; external name '_DMGetMakeAndModelByAVID';
+{
+ * DMNewDisplayList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DMNewDisplayList(displayListIncludeFlags: UInt32; reserved1: UInt32; reserved2: UInt32; var theCount: DMListIndexType; var theDisplayList: DMListType): OSErr; external name '_DMNewDisplayList';
+{
+ * DMGetIndexedDisplayFromList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DMGetIndexedDisplayFromList(theDisplayList: DMListType; itemIndex: DMListIndexType; reserved: UInt32; listIterator: DMDisplayListIteratorUPP; userData: UnivPtr): OSErr; external name '_DMGetIndexedDisplayFromList';
+{
+ * DMNewProfileListByAVID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DMNewProfileListByAVID(theAVID: AVIDType; reserved: UInt32; var profileCount: DMListIndexType; var profileList: DMListType): OSErr; external name '_DMNewProfileListByAVID';
+{
+ * DMGetIndexedProfileFromList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DMGetIndexedProfileFromList(profileList: DMListType; itemIndex: DMListIndexType; reserved: UInt32; listIterator: DMProfileListIteratorUPP; userData: UnivPtr): OSErr; external name '_DMGetIndexedProfileFromList';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * DMGetFirstScreenDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetFirstScreenDevice(activeOnly: boolean): GDHandle; external name '_DMGetFirstScreenDevice';
+{
+ * DMGetNextScreenDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetNextScreenDevice(theDevice: GDHandle; activeOnly: boolean): GDHandle; external name '_DMGetNextScreenDevice';
+{
+ * DMDrawDesktopRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DMDrawDesktopRect(var globalRect: Rect); external name '_DMDrawDesktopRect';
+{
+ * DMDrawDesktopRegion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DMDrawDesktopRegion(globalRgn: RgnHandle); external name '_DMDrawDesktopRegion';
+{
+ * DMBeginConfigureDisplays()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMBeginConfigureDisplays(var displayState: Handle): OSErr; external name '_DMBeginConfigureDisplays';
+{
+ * DMEndConfigureDisplays()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMEndConfigureDisplays(displayState: Handle): OSErr; external name '_DMEndConfigureDisplays';
+{
+ * DMAddDisplay()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMAddDisplay(newDevice: GDHandle; driver: SInt16; mode: UInt32; reserved: UInt32; displayID: UInt32; displayComponent: Component; displayState: Handle): OSErr; external name '_DMAddDisplay';
+{
+ * DMMoveDisplay()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMMoveDisplay(moveDevice: GDHandle; x: SInt16; y: SInt16; displayState: Handle): OSErr; external name '_DMMoveDisplay';
+{
+ * DMDisableDisplay()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMDisableDisplay(disableDevice: GDHandle; displayState: Handle): OSErr; external name '_DMDisableDisplay';
+{
+ * DMEnableDisplay()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMEnableDisplay(enableDevice: GDHandle; displayState: Handle): OSErr; external name '_DMEnableDisplay';
+{
+ * DMRemoveDisplay()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMRemoveDisplay(removeDevice: GDHandle; displayState: Handle): OSErr; external name '_DMRemoveDisplay';
+{
+ * DMSetMainDisplay()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMSetMainDisplay(newMainDevice: GDHandle; displayState: Handle): OSErr; external name '_DMSetMainDisplay';
+{
+ * DMSetDisplayMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMSetDisplayMode(theDevice: GDHandle; mode: UInt32; var depthMode: UInt32; reserved: UInt32; displayState: Handle): OSErr; external name '_DMSetDisplayMode';
+{
+ * DMCheckDisplayMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMCheckDisplayMode(theDevice: GDHandle; mode: UInt32; depthMode: UInt32; var switchFlags: UInt32; reserved: UInt32; var modeOk: boolean): OSErr; external name '_DMCheckDisplayMode';
+{
+ * DMGetDeskRegion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetDeskRegion(var desktopRegion: RgnHandle): OSErr; external name '_DMGetDeskRegion';
+{
+ * DMRegisterNotifyProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMRegisterNotifyProc(notificationProc: DMNotificationUPP; whichPSN: DMProcessInfoPtr): OSErr; external name '_DMRegisterNotifyProc';
+{
+ * DMRemoveNotifyProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMRemoveNotifyProc(notificationProc: DMNotificationUPP; whichPSN: DMProcessInfoPtr): OSErr; external name '_DMRemoveNotifyProc';
+{
+ * DMQDIsMirroringCapable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMQDIsMirroringCapable(var qdIsMirroringCapable: boolean): OSErr; external name '_DMQDIsMirroringCapable';
+{
+ * DMCanMirrorNow()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMCanMirrorNow(var canMirrorNow: boolean): OSErr; external name '_DMCanMirrorNow';
+{
+ * DMIsMirroringOn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMIsMirroringOn(var isMirroringOn: boolean): OSErr; external name '_DMIsMirroringOn';
+{
+ * DMMirrorDevices()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMMirrorDevices(gD1: GDHandle; gD2: GDHandle; displayState: Handle): OSErr; external name '_DMMirrorDevices';
+{
+ * DMUnmirrorDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMUnmirrorDevice(gDevice: GDHandle; displayState: Handle): OSErr; external name '_DMUnmirrorDevice';
+{
+ * DMGetNextMirroredDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetNextMirroredDevice(gDevice: GDHandle; var mirroredDevice: GDHandle): OSErr; external name '_DMGetNextMirroredDevice';
+{
+ * DMBlockMirroring()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMBlockMirroring: OSErr; external name '_DMBlockMirroring';
+{
+ * DMUnblockMirroring()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMUnblockMirroring: OSErr; external name '_DMUnblockMirroring';
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * DMGetDisplayMgrA5World()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DMGetDisplayMgrA5World(var dmA5: Ptr): OSErr; external name '_DMGetDisplayMgrA5World';
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * DMGetDisplayIDByGDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetDisplayIDByGDevice(displayDevice: GDHandle; var displayID: DisplayIDType; failToMain: boolean): OSErr; external name '_DMGetDisplayIDByGDevice';
+{
+ * DMGetGDeviceByDisplayID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetGDeviceByDisplayID(displayID: DisplayIDType; var displayDevice: GDHandle; failToMain: boolean): OSErr; external name '_DMGetGDeviceByDisplayID';
+{
+ * DMSetDisplayComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMSetDisplayComponent(theDevice: GDHandle; displayComponent: Component): OSErr; external name '_DMSetDisplayComponent';
+{
+ * DMGetDisplayComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetDisplayComponent(theDevice: GDHandle; var displayComponent: Component): OSErr; external name '_DMGetDisplayComponent';
+{
+ * DMNewDisplay()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMNewDisplay(var newDevice: GDHandle; driverRefNum: SInt16; mode: UInt32; reserved: UInt32; displayID: DisplayIDType; displayComponent: Component; displayState: Handle): OSErr; external name '_DMNewDisplay';
+{
+ * DMDisposeDisplay()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMDisposeDisplay(disposeDevice: GDHandle; displayState: Handle): OSErr; external name '_DMDisposeDisplay';
+{
+ * DMResolveDisplayComponents()
+ *
+ * Availability:
+ * Non-Carbon CFM: in InterfaceLib 7.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMResolveDisplayComponents: OSErr; external name '_DMResolveDisplayComponents';
+{
+ * DMRegisterExtendedNotifyProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMRegisterExtendedNotifyProc(notifyProc: DMExtendedNotificationUPP; notifyUserData: UnivPtr; nofifyOnFlags: UInt16; whichPSN: DMProcessInfoPtr): OSErr; external name '_DMRegisterExtendedNotifyProc';
+{
+ * DMRemoveExtendedNotifyProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMRemoveExtendedNotifyProc(notifyProc: DMExtendedNotificationUPP; notifyUserData: UnivPtr; whichPSN: DMProcessInfoPtr; removeFlags: UInt16): OSErr; external name '_DMRemoveExtendedNotifyProc';
+{
+ * DMNewAVPanelList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMNewAVPanelList(displayID: DisplayIDType; panelType: ResType; minimumFidelity: DMFidelityType; panelListFlags: UInt32; reserved: UInt32; var thePanelCount: DMListIndexType; var thePanelList: DMListType): OSErr; external name '_DMNewAVPanelList';
+{
+ * DMNewAVEngineList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMNewAVEngineList(displayID: DisplayIDType; engineType: ResType; minimumFidelity: DMFidelityType; engineListFlags: UInt32; reserved: UInt32; var engineCount: DMListIndexType; var engineList: DMListType): OSErr; external name '_DMNewAVEngineList';
+{
+ * DMNewAVDeviceList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMNewAVDeviceList(deviceType: ResType; deviceListFlags: UInt32; reserved: UInt32; var deviceCount: DMListIndexType; var deviceList: DMListType): OSErr; external name '_DMNewAVDeviceList';
+{
+ * DMNewAVPortListByPortType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMNewAVPortListByPortType(subType: ResType; portListFlags: UInt32; reserved: UInt32; var devicePortCount: DMListIndexType; var theDevicePortList: DMListType): OSErr; external name '_DMNewAVPortListByPortType';
+{
+ * DMGetIndexedComponentFromList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetIndexedComponentFromList(panelList: DMListType; itemIndex: DMListIndexType; reserved: UInt32; listIterator: DMComponentListIteratorUPP; userData: UnivPtr): OSErr; external name '_DMGetIndexedComponentFromList';
+{
+ * DMDisposeList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMDisposeList(panelList: DMListType): OSErr; external name '_DMDisposeList';
+{
+ * DMGetNameByAVID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetNameByAVID(theID: AVIDType; nameFlags: UInt32; var name: Str255): OSErr; external name '_DMGetNameByAVID';
+{
+ * DMNewAVIDByPortComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMNewAVIDByPortComponent(thePortComponent: Component; portKind: ResType; reserved: UInt32; var newID: AVIDType): OSErr; external name '_DMNewAVIDByPortComponent';
+{
+ * DMGetPortComponentByAVID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetPortComponentByAVID(thePortID: DisplayIDType; var thePortComponent: Component; var theDesciption: ComponentDescription; var thePortKind: ResType): OSErr; external name '_DMGetPortComponentByAVID';
+{
+ * DMSendDependentNotification()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMSendDependentNotification(notifyType: ResType; notifyClass: ResType; displayID: AVIDType; notifyComponent: ComponentInstance): OSErr; external name '_DMSendDependentNotification';
+{
+ * DMDisposeAVComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMDisposeAVComponent(theAVComponent: Component): OSErr; external name '_DMDisposeAVComponent';
+{
+ * DMSaveScreenPrefs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMSaveScreenPrefs(reserved1: UInt32; saveFlags: UInt32; reserved2: UInt32): OSErr; external name '_DMSaveScreenPrefs';
+{
+ * DMNewAVIDByDeviceComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMNewAVIDByDeviceComponent(theDeviceComponent: Component; portKind: ResType; reserved: UInt32; var newID: DisplayIDType): OSErr; external name '_DMNewAVIDByDeviceComponent';
+{
+ * DMNewAVPortListByDeviceAVID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMNewAVPortListByDeviceAVID(theID: AVIDType; minimumFidelity: DMFidelityType; portListFlags: UInt32; reserved: UInt32; var devicePortCount: DMListIndexType; var theDevicePortList: DMListType): OSErr; external name '_DMNewAVPortListByDeviceAVID';
+{
+ * DMGetDeviceComponentByAVID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetDeviceComponentByAVID(theDeviceID: AVIDType; var theDeviceComponent: Component; var theDesciption: ComponentDescription; var theDeviceKind: ResType): OSErr; external name '_DMGetDeviceComponentByAVID';
+{
+ * DMNewDisplayModeList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMNewDisplayModeList(displayID: DisplayIDType; modeListFlags: UInt32; reserved: UInt32; var thePanelCount: DMListIndexType; var thePanelList: DMListType): OSErr; external name '_DMNewDisplayModeList';
+{
+ * DMGetIndexedDisplayModeFromList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetIndexedDisplayModeFromList(panelList: DMListType; itemIndex: DMListIndexType; reserved: UInt32; listIterator: DMDisplayModeListIteratorUPP; userData: UnivPtr): OSErr; external name '_DMGetIndexedDisplayModeFromList';
+{
+ * DMGetGraphicInfoByAVID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetGraphicInfoByAVID(theID: AVIDType; var theAVPcit: PicHandle; var theAVIconSuite: Handle; var theAVLocation: AVLocationRec): OSErr; external name '_DMGetGraphicInfoByAVID';
+{
+ * DMGetAVPowerState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetAVPowerState(theID: AVIDType; getPowerState: AVPowerStatePtr; reserved1: UInt32): OSErr; external name '_DMGetAVPowerState';
+{
+ * DMSetAVPowerState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMSetAVPowerState(theID: AVIDType; setPowerState: AVPowerStatePtr; powerFlags: UInt32; displayState: Handle): OSErr; external name '_DMSetAVPowerState';
+{
+ * DMGetDeviceAVIDByPortAVID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetDeviceAVIDByPortAVID(portAVID: AVIDType; var deviceAVID: AVIDType): OSErr; external name '_DMGetDeviceAVIDByPortAVID';
+{
+ * DMGetEnableByAVID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetEnableByAVID(theAVID: AVIDType; var isAVIDEnabledNow: boolean; var canChangeEnableNow: boolean): OSErr; external name '_DMGetEnableByAVID';
+{
+ * DMSetEnableByAVID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMSetEnableByAVID(theAVID: AVIDType; doEnable: boolean; displayState: Handle): OSErr; external name '_DMSetEnableByAVID';
+{
+ * DMGetDisplayMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib68k 2.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMGetDisplayMode(theDevice: GDHandle; switchInfo: VDSwitchInfoPtr): OSErr; external name '_DMGetDisplayMode';
+{
+ * DMConfirmConfiguration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DisplayLib 2.1 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function DMConfirmConfiguration(filterProc: DMModalFilterUPP; confirmFlags: UInt32; reserved: UInt32; displayState: Handle): OSErr; external name '_DMConfirmConfiguration';
+{$ALIGN MAC68K}
+
+
+{unit DrawSprocket}
+{
+ File: DrawSprocket.p
+
+ Contains: Games Sprockets: DrawSprocket interfaces
+
+ Version: Technology: Draw Sprocket 1.7
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1996-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+{$ALIGN POWER}
+
+{
+********************************************************************************
+** constants
+********************************************************************************
+}
+
+type
+ DSpDepthMask = SInt32;
+const
+ kDSpDepthMask_1 = $01;
+ kDSpDepthMask_2 = $02;
+ kDSpDepthMask_4 = $04;
+ kDSpDepthMask_8 = $08;
+ kDSpDepthMask_16 = $10;
+ kDSpDepthMask_32 = $20;
+ kDSpDepthMask_All = -1;
+
+
+type
+ DSpColorNeeds = SInt32;
+const
+ kDSpColorNeeds_DontCare = 0;
+ kDSpColorNeeds_Request = 1;
+ kDSpColorNeeds_Require = 2;
+
+
+type
+ DSpContextState = SInt32;
+const
+ kDSpContextState_Active = 0;
+ kDSpContextState_Paused = 1;
+ kDSpContextState_Inactive = 2;
+
+ { kDSpContextOption_QD3DAccel not yet implemented }
+
+type
+ DSpContextOption = SInt32;
+const
+ { kDSpContextOption_QD3DAccel = 1<<0, }
+ kDSpContextOption_PageFlip = $02;
+ kDSpContextOption_DontSyncVBL = $04;
+ kDSpContextOption_Stereoscopic = $08;
+
+
+type
+ DSpAltBufferOption = SInt32;
+const
+ kDSpAltBufferOption_RowBytesEqualsWidth = $01;
+
+
+type
+ DSpBufferKind = SInt32;
+const
+ kDSpBufferKind_Normal = 0;
+
+
+type
+ DSpBlitMode = SInt32;
+const
+ kDSpBlitMode_Plain = 0;
+ kDSpBlitMode_SrcKey = $01;
+ kDSpBlitMode_DstKey = $02;
+ kDSpBlitMode_Interpolation = $04;
+
+ {
+ ********************************************************************************
+ ** data types
+ ********************************************************************************
+ }
+
+type
+ DSpAltBufferReference = ^SInt32; { an opaque 32-bit type }
+ DSpAltBufferReferencePtr = ^DSpAltBufferReference; { when a var xx:DSpAltBufferReference parameter can be nil, it is changed to xx: DSpAltBufferReferencePtr }
+ DSpContextReference = ^SInt32; { an opaque 32-bit type }
+ DSpContextReferencePtr = ^DSpContextReference; { when a var xx:DSpContextReference parameter can be nil, it is changed to xx: DSpContextReferencePtr }
+ DSpContextReferenceConst = ^SInt32; { an opaque 32-bit type }
+ DSpContextReferenceConstPtr = ^DSpContextReferenceConst; { when a var xx:DSpContextReferenceConst parameter can be nil, it is changed to xx: DSpContextReferenceConstPtr }
+{$ifc TYPED_FUNCTION_POINTERS}
+ DSpEventProcPtr = function(var inEvent: EventRecord): boolean;
+{$elsec}
+ DSpEventProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ DSpCallbackProcPtr = function(inContext: DSpContextReference; inRefCon: UnivPtr): boolean;
+{$elsec}
+ DSpCallbackProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ DSpEventUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DSpEventUPP = DSpEventProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ DSpCallbackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DSpCallbackUPP = DSpCallbackProcPtr;
+{$endc}
+
+const
+ uppDSpEventProcInfo = $000000D1;
+ uppDSpCallbackProcInfo = $000003D1;
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * NewDSpEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewDSpEventUPP(userRoutine: DSpEventProcPtr): DSpEventUPP; external name '_NewDSpEventUPP';
+{
+ * NewDSpCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewDSpCallbackUPP(userRoutine: DSpCallbackProcPtr): DSpCallbackUPP; external name '_NewDSpCallbackUPP';
+{
+ * DisposeDSpEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposeDSpEventUPP(userUPP: DSpEventUPP); external name '_DisposeDSpEventUPP';
+{
+ * DisposeDSpCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposeDSpCallbackUPP(userUPP: DSpCallbackUPP); external name '_DisposeDSpCallbackUPP';
+{
+ * InvokeDSpEventUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InvokeDSpEventUPP(var inEvent: EventRecord; userRoutine: DSpEventUPP): boolean; external name '_InvokeDSpEventUPP';
+{
+ * InvokeDSpCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function InvokeDSpCallbackUPP(inContext: DSpContextReference; inRefCon: UnivPtr; userRoutine: DSpCallbackUPP): boolean; external name '_InvokeDSpCallbackUPP';
+{$endc} {CALL_NOT_IN_CARBON}
+
+
+type
+ DSpContextAttributesPtr = ^DSpContextAttributes;
+ DSpContextAttributes = record
+ frequency: Fixed;
+ displayWidth: UInt32;
+ displayHeight: UInt32;
+ reserved1: UInt32;
+ reserved2: UInt32;
+ colorNeeds: UInt32;
+ colorTable: CTabHandle;
+ contextOptions: OptionBits;
+ backBufferDepthMask: OptionBits;
+ displayDepthMask: OptionBits;
+ backBufferBestDepth: UInt32;
+ displayBestDepth: UInt32;
+ pageCount: UInt32;
+ filler1,filler2,filler3: SInt8;
+ gameMustConfirmSwitch: boolean;
+ reserved3: array [0..3] of UInt32;
+ end;
+
+ DSpAltBufferAttributesPtr = ^DSpAltBufferAttributes;
+ DSpAltBufferAttributes = record
+ width: UInt32;
+ height: UInt32;
+ options: DSpAltBufferOption;
+ reserved: array [0..3] of UInt32;
+ end;
+
+ DSpBlitInfoPtr = ^DSpBlitInfo;
+{$ifc TYPED_FUNCTION_POINTERS}
+ DSpBlitDoneProc = procedure(info: DSpBlitInfoPtr);
+{$elsec}
+ DSpBlitDoneProc = ProcPtr;
+{$endc}
+
+ DSpBlitInfo = record
+ completionFlag: boolean;
+ filler1, filler2, filler3: SInt8;
+ completionProc: DSpBlitDoneProc;
+ srcContext: DSpContextReference;
+ srcBuffer: CGrafPtr;
+ srcRect: Rect;
+ srcKey: UInt32;
+ dstContext: DSpContextReference;
+ dstBuffer: CGrafPtr;
+ dstRect: Rect;
+ dstKey: UInt32;
+ mode: DSpBlitMode;
+ reserved: array [0..3] of UInt32;
+ end;
+
+ {
+ ********************************************************************************
+ ** function prototypes
+ ********************************************************************************
+ }
+
+ {
+ ** global operations
+ }
+ {
+ * DSpStartup()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpStartup: OSStatus; external name '_DSpStartup';
+
+{
+ * DSpShutdown()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpShutdown: OSStatus; external name '_DSpShutdown';
+
+{
+ * DSpGetVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.7 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpGetVersion: NumVersion; external name '_DSpGetVersion';
+
+{
+ * DSpGetFirstContext()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpGetFirstContext(inDisplayID: DisplayIDType; var outContext: DSpContextReference): OSStatus; external name '_DSpGetFirstContext';
+
+{
+ * DSpGetNextContext()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpGetNextContext(inCurrentContext: DSpContextReference; var outContext: DSpContextReference): OSStatus; external name '_DSpGetNextContext';
+
+{
+ * DSpGetCurrentContext()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.7 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpGetCurrentContext(inDisplayID: DisplayIDType; var outContext: DSpContextReference): OSStatus; external name '_DSpGetCurrentContext';
+
+{
+ * DSpFindBestContext()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpFindBestContext(inDesiredAttributes: DSpContextAttributesPtr; var outContext: DSpContextReference): OSStatus; external name '_DSpFindBestContext';
+
+{
+ * DSpFindBestContextOnDisplayID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.7 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpFindBestContextOnDisplayID(inDesiredAttributes: DSpContextAttributesPtr; var outContext: DSpContextReference; inDisplayID: DisplayIDType): OSStatus; external name '_DSpFindBestContextOnDisplayID';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * DSpCanUserSelectContext()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpCanUserSelectContext(inDesiredAttributes: DSpContextAttributesPtr; var outUserCanSelectContext: boolean): OSStatus; external name '_DSpCanUserSelectContext';
+
+{
+ * DSpUserSelectContext()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpUserSelectContext(inDesiredAttributes: DSpContextAttributesPtr; inDialogDisplayLocation: DisplayIDType; inEventProc: DSpEventUPP; var outContext: DSpContextReference): OSStatus; external name '_DSpUserSelectContext';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * DSpProcessEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpProcessEvent(var inEvent: EventRecord; var outEventWasProcessed: boolean): OSStatus; external name '_DSpProcessEvent';
+
+{
+ * DSpSetBlankingColor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpSetBlankingColor(const (*var*) inRGBColor: RGBColor): OSStatus; external name '_DSpSetBlankingColor';
+
+{
+ * DSpSetDebugMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpSetDebugMode(inDebugMode: boolean): OSStatus; external name '_DSpSetDebugMode';
+
+{
+ * DSpFindContextFromPoint()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpFindContextFromPoint(inGlobalPoint: Point; var outContext: DSpContextReference): OSStatus; external name '_DSpFindContextFromPoint';
+
+{
+ * DSpGetMouse()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpGetMouse(var outGlobalPoint: Point): OSStatus; external name '_DSpGetMouse';
+
+{
+** alternate buffer operations
+}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * DSpAltBuffer_New()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpAltBuffer_New(inContext: DSpContextReference; inVRAMBuffer: boolean; var inAttributes: DSpAltBufferAttributes; var outAltBuffer: DSpAltBufferReference): OSStatus; external name '_DSpAltBuffer_New';
+
+{
+ * DSpAltBuffer_Dispose()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpAltBuffer_Dispose(inAltBuffer: DSpAltBufferReference): OSStatus; external name '_DSpAltBuffer_Dispose';
+
+{
+ * DSpAltBuffer_InvalRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpAltBuffer_InvalRect(inAltBuffer: DSpAltBufferReference; const (*var*) inInvalidRect: Rect): OSStatus; external name '_DSpAltBuffer_InvalRect';
+
+{
+ * DSpAltBuffer_GetCGrafPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpAltBuffer_GetCGrafPtr(inAltBuffer: DSpAltBufferReference; inBufferKind: DSpBufferKind; var outCGrafPtr: CGrafPtr; var outGDevice: GDHandle): OSStatus; external name '_DSpAltBuffer_GetCGrafPtr';
+
+{
+** context operations
+}
+{ general }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * DSpContext_GetAttributes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_GetAttributes(inContext: DSpContextReferenceConst; outAttributes: DSpContextAttributesPtr): OSStatus; external name '_DSpContext_GetAttributes';
+
+{
+ * DSpContext_Reserve()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_Reserve(inContext: DSpContextReference; inDesiredAttributes: DSpContextAttributesPtr): OSStatus; external name '_DSpContext_Reserve';
+
+{
+ * DSpContext_Queue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.7 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_Queue(inParentContext: DSpContextReference; inChildContext: DSpContextReference; inDesiredAttributes: DSpContextAttributesPtr): OSStatus; external name '_DSpContext_Queue';
+
+{
+ * DSpContext_Switch()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.7 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_Switch(inOldContext: DSpContextReference; inNewContext: DSpContextReference): OSStatus; external name '_DSpContext_Switch';
+
+{
+ * DSpContext_Release()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_Release(inContext: DSpContextReference): OSStatus; external name '_DSpContext_Release';
+
+{
+ * DSpContext_Dispose()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_Dispose(inContext: DSpContextReference): OSStatus; external name '_DSpContext_Dispose';
+
+{
+ * DSpContext_GetDisplayID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_GetDisplayID(inContext: DSpContextReferenceConst; var outDisplayID: DisplayIDType): OSStatus; external name '_DSpContext_GetDisplayID';
+
+{
+ * DSpContext_GlobalToLocal()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_GlobalToLocal(inContext: DSpContextReferenceConst; var ioPoint: Point): OSStatus; external name '_DSpContext_GlobalToLocal';
+
+{
+ * DSpContext_LocalToGlobal()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_LocalToGlobal(inContext: DSpContextReferenceConst; var ioPoint: Point): OSStatus; external name '_DSpContext_LocalToGlobal';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * DSpContext_SetVBLProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpContext_SetVBLProc(inContext: DSpContextReference; inProcPtr: DSpCallbackUPP; inRefCon: UnivPtr): OSStatus; external name '_DSpContext_SetVBLProc';
+
+{
+ * DSpContext_GetFlattenedSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpContext_GetFlattenedSize(inContext: DSpContextReference; var outFlatContextSize: UInt32): OSStatus; external name '_DSpContext_GetFlattenedSize';
+
+{
+ * DSpContext_Flatten()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpContext_Flatten(inContext: DSpContextReference; outFlatContext: UnivPtr): OSStatus; external name '_DSpContext_Flatten';
+
+{
+ * DSpContext_Restore()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpContext_Restore(inFlatContext: UnivPtr; var outRestoredContext: DSpContextReference): OSStatus; external name '_DSpContext_Restore';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * DSpContext_GetMonitorFrequency()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_GetMonitorFrequency(inContext: DSpContextReferenceConst; var outFrequency: Fixed): OSStatus; external name '_DSpContext_GetMonitorFrequency';
+
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * DSpContext_SetMaxFrameRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpContext_SetMaxFrameRate(inContext: DSpContextReference; inMaxFPS: UInt32): OSStatus; external name '_DSpContext_SetMaxFrameRate';
+
+{
+ * DSpContext_GetMaxFrameRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpContext_GetMaxFrameRate(inContext: DSpContextReferenceConst; var outMaxFPS: UInt32): OSStatus; external name '_DSpContext_GetMaxFrameRate';
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * DSpContext_SetState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_SetState(inContext: DSpContextReference; inState: DSpContextState): OSStatus; external name '_DSpContext_SetState';
+
+{
+ * DSpContext_GetState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_GetState(inContext: DSpContextReferenceConst; var outState: DSpContextState): OSStatus; external name '_DSpContext_GetState';
+
+{
+ * DSpContext_IsBusy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_IsBusy(inContext: DSpContextReferenceConst; var outBusyFlag: boolean): OSStatus; external name '_DSpContext_IsBusy';
+
+{ dirty rectangles }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * DSpContext_SetDirtyRectGridSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpContext_SetDirtyRectGridSize(inContext: DSpContextReference; inCellPixelWidth: UInt32; inCellPixelHeight: UInt32): OSStatus; external name '_DSpContext_SetDirtyRectGridSize';
+
+{
+ * DSpContext_GetDirtyRectGridSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpContext_GetDirtyRectGridSize(inContext: DSpContextReferenceConst; var outCellPixelWidth: UInt32; var outCellPixelHeight: UInt32): OSStatus; external name '_DSpContext_GetDirtyRectGridSize';
+
+{
+ * DSpContext_GetDirtyRectGridUnits()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpContext_GetDirtyRectGridUnits(inContext: DSpContextReferenceConst; var outCellPixelWidth: UInt32; var outCellPixelHeight: UInt32): OSStatus; external name '_DSpContext_GetDirtyRectGridUnits';
+
+{
+ * DSpContext_InvalBackBufferRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpContext_InvalBackBufferRect(inContext: DSpContextReference; const (*var*) inRect: Rect): OSStatus; external name '_DSpContext_InvalBackBufferRect';
+
+{ underlays }
+{
+ * DSpContext_SetUnderlayAltBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpContext_SetUnderlayAltBuffer(inContext: DSpContextReference; inNewUnderlay: DSpAltBufferReference): OSStatus; external name '_DSpContext_SetUnderlayAltBuffer';
+
+{
+ * DSpContext_GetUnderlayAltBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpContext_GetUnderlayAltBuffer(inContext: DSpContextReferenceConst; var outUnderlay: DSpAltBufferReference): OSStatus; external name '_DSpContext_GetUnderlayAltBuffer';
+
+{ gamma }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{
+ * DSpContext_FadeGammaOut()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_FadeGammaOut(inContext: DSpContextReference; var inZeroIntensityColor: RGBColor): OSStatus; external name '_DSpContext_FadeGammaOut';
+
+{
+ * DSpContext_FadeGammaIn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_FadeGammaIn(inContext: DSpContextReference; var inZeroIntensityColor: RGBColor): OSStatus; external name '_DSpContext_FadeGammaIn';
+
+{
+ * DSpContext_FadeGamma()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_FadeGamma(inContext: DSpContextReference; inPercentOfOriginalIntensity: SInt32; var inZeroIntensityColor: RGBColor): OSStatus; external name '_DSpContext_FadeGamma';
+
+{ buffering }
+{
+ * DSpContext_SwapBuffers()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_SwapBuffers(inContext: DSpContextReference; inBusyProc: DSpCallbackUPP; inUserRefCon: UnivPtr): OSStatus; external name '_DSpContext_SwapBuffers';
+
+{
+ * DSpContext_GetBackBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_GetBackBuffer(inContext: DSpContextReference; inBufferKind: DSpBufferKind; var outBackBuffer: CGrafPtr): OSStatus; external name '_DSpContext_GetBackBuffer';
+
+{
+ * DSpContext_GetFrontBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_GetFrontBuffer(inContext: DSpContextReferenceConst; var outFrontBuffer: CGrafPtr): OSStatus; external name '_DSpContext_GetFrontBuffer';
+
+{ clut operations }
+{
+ * DSpContext_SetCLUTEntries()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_SetCLUTEntries(inContext: DSpContextReference; const (*var*) inEntries: ColorSpec; inStartingEntry: UInt16; inLastEntry: UInt16): OSStatus; external name '_DSpContext_SetCLUTEntries';
+
+{
+ * DSpContext_GetCLUTEntries()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.0 and later
+ * CarbonLib: not available
+ * Mac OS X: in version 10.0 and later
+ }
+function DSpContext_GetCLUTEntries(inContext: DSpContextReferenceConst; var outEntries: ColorSpec; inStartingEntry: UInt16; inLastEntry: UInt16): OSStatus; external name '_DSpContext_GetCLUTEntries';
+
+{ blit operations }
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * DSpBlit_Faster()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpBlit_Faster(inBlitInfo: DSpBlitInfoPtr; inAsyncFlag: boolean): OSStatus; external name '_DSpBlit_Faster';
+
+{
+ * DSpBlit_Fastest()
+ *
+ * Availability:
+ * Non-Carbon CFM: in DrawSprocketLib 1.1 and later
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function DSpBlit_Fastest(inBlitInfo: DSpBlitInfoPtr; inAsyncFlag: boolean): OSStatus; external name '_DSpBlit_Fastest';
+
+
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ALIGN MAC68K}
+
+
+{unit IBCarbonRuntime}
+{
+ File: HIToolbox/IBCarbonRuntime.h
+
+ Contains: Nib support for Carbon
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 2000-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation Updated: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+const
+ kIBCarbonRuntimeCantFindNibFile = -10960;
+ kIBCarbonRuntimeObjectNotOfRequestedType = -10961;
+ kIBCarbonRuntimeCantFindObject = -10962;
+
+{ ----- typedef ------ }
+type
+ IBNibRef = ^SInt32; { an opaque 32-bit type }
+{ ----- Create & Dispose NIB References ------ }
+{
+ * CreateNibReference()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateNibReference( inNibName: CFStringRef; var outNibRef: IBNibRef ): OSStatus; external name '_CreateNibReference';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * CreateNibReferenceWithCFBundle()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateNibReferenceWithCFBundle( inBundle: CFBundleRef; inNibName: CFStringRef; var outNibRef: IBNibRef ): OSStatus; external name '_CreateNibReferenceWithCFBundle';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * DisposeNibReference()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+procedure DisposeNibReference( inNibRef: IBNibRef ); external name '_DisposeNibReference';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ ----- Window ------ }
+{
+ * CreateWindowFromNib()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateWindowFromNib( inNibRef: IBNibRef; inName: CFStringRef; var outWindow: WindowRef ): OSStatus; external name '_CreateWindowFromNib';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ ----- Menu -----}
+
+{
+ * CreateMenuFromNib()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateMenuFromNib( inNibRef: IBNibRef; inName: CFStringRef; var outMenuRef: MenuRef ): OSStatus; external name '_CreateMenuFromNib';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{ ----- MenuBar ------}
+
+{
+ * CreateMenuBarFromNib()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function CreateMenuBarFromNib( inNibRef: IBNibRef; inName: CFStringRef; var outMenuBar: Handle ): OSStatus; external name '_CreateMenuBarFromNib';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{
+ * SetMenuBarFromNib()
+ *
+ * Mac OS X threading:
+ * Not thread safe
+ *
+ * Availability:
+ * Mac OS X: in version 10.0 and later in Carbon.framework
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Non-Carbon CFM: not available
+ }
+function SetMenuBarFromNib( inNibRef: IBNibRef; inName: CFStringRef ): OSStatus; external name '_SetMenuBarFromNib';
+(* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
+
+
+{unit Movies}
+{
+ File: Movies.p
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1990-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+{ "kFix1" is defined in FixMath as "fixed1" }
+{ error codes are in Errors.[haa] }
+{ gestalt codes are in Gestalt.[hpa] }
+
+const
+ MovieFileType = $4D6F6F56 (* 'MooV' *);
+ MovieScrapType = $6D6F6F76 (* 'moov' *);
+
+ MovieResourceType = $6D6F6F76 (* 'moov' *);
+ MovieForwardPointerResourceType = $666F7265 (* 'fore' *);
+ MovieBackwardPointerResourceType = $6261636B (* 'back' *);
+
+ MovieResourceAtomType = $6D6F6F76 (* 'moov' *);
+ MovieDataAtomType = $6D646174 (* 'mdat' *);
+ FreeAtomType = $66726565 (* 'free' *);
+ SkipAtomType = $736B6970 (* 'skip' *);
+ WideAtomPlaceholderType = $77696465 (* 'wide' *);
+
+ MediaHandlerType = $6D686C72 (* 'mhlr' *);
+ DataHandlerType = $64686C72 (* 'dhlr' *);
+
+ VideoMediaType = $76696465 (* 'vide' *);
+ SoundMediaType = $736F756E (* 'soun' *);
+ TextMediaType = $74657874 (* 'text' *);
+ BaseMediaType = $676E7263 (* 'gnrc' *);
+ MPEGMediaType = $4D504547 (* 'MPEG' *);
+ MusicMediaType = $6D757369 (* 'musi' *);
+ TimeCodeMediaType = $746D6364 (* 'tmcd' *);
+ SpriteMediaType = $73707274 (* 'sprt' *);
+ FlashMediaType = $666C7368 (* 'flsh' *);
+ MovieMediaType = $6D6F6F76 (* 'moov' *);
+ TweenMediaType = $7477656E (* 'twen' *);
+ ThreeDeeMediaType = $71643364 (* 'qd3d' *);
+ SkinMediaType = $736B696E (* 'skin' *);
+ HandleDataHandlerSubType = $686E646C (* 'hndl' *);
+ PointerDataHandlerSubType = $70747220 (* 'ptr ' *);
+ NullDataHandlerSubType = $6E756C6C (* 'null' *);
+ ResourceDataHandlerSubType = $72737263 (* 'rsrc' *);
+ URLDataHandlerSubType = $75726C20 (* 'url ' *);
+ WiredActionHandlerType = $77697265 (* 'wire' *);
+
+ VisualMediaCharacteristic = $65796573 (* 'eyes' *);
+ AudioMediaCharacteristic = $65617273 (* 'ears' *);
+ kCharacteristicCanSendVideo = $76736E64 (* 'vsnd' *);
+ kCharacteristicProvidesActions = $6163746E (* 'actn' *);
+ kCharacteristicNonLinear = $6E6F6E6C (* 'nonl' *);
+ kCharacteristicCanStep = $73746570 (* 'step' *);
+ kCharacteristicHasNoDuration = $6E6F7469 (* 'noti' *);
+ kCharacteristicHasSkinData = $736B696E (* 'skin' *);
+ kCharacteristicProvidesKeyFocus = $6B657966 (* 'keyf' *);
+
+ kUserDataMovieControllerType = $63747970 (* 'ctyp' *);
+ kUserDataName = $6E616D65 (* 'name' *);
+ kUserDataTextAlbum = $C2A9616C (* '©alb' *);
+ kUserDataTextArtist = $C2A94152 (* '©ART' *);
+ kUserDataTextAuthor = $C2A96175 (* '©aut' *);
+ kUserDataTextChapter = $C2A96368 (* '©chp' *);
+ kUserDataTextComment = $C2A9636D (* '©cmt' *);
+ kUserDataTextComposer = $C2A9636F (* '©com' *);
+ kUserDataTextCopyright = $C2A96370 (* '©cpy' *);
+ kUserDataTextCreationDate = $C2A96461 (* '©day' *);
+ kUserDataTextDescription = $C2A96465 (* '©des' *);
+ kUserDataTextDirector = $C2A96469 (* '©dir' *);
+ kUserDataTextDisclaimer = $C2A96469 (* '©dis' *);
+ kUserDataTextEncodedBy = $C2A9656E (* '©enc' *);
+ kUserDataTextFullName = $C2A96E61 (* '©nam' *);
+ kUserDataTextGenre = $C2A96765 (* '©gen' *);
+ kUserDataTextHostComputer = $C2A96873 (* '©hst' *);
+ kUserDataTextInformation = $C2A9696E (* '©inf' *);
+ kUserDataTextKeywords = $C2A96B65 (* '©key' *);
+ kUserDataTextMake = $C2A96D61 (* '©mak' *);
+ kUserDataTextModel = $C2A96D6F (* '©mod' *);
+ kUserDataTextOriginalArtist = $C2A96F70 (* '©ope' *);
+ kUserDataTextOriginalFormat = $C2A9666D (* '©fmt' *);
+ kUserDataTextOriginalSource = $C2A97372 (* '©src' *);
+ kUserDataTextPerformers = $C2A97072 (* '©prf' *);
+ kUserDataTextProducer = $C2A97072 (* '©prd' *);
+ kUserDataTextProduct = $C2A95052 (* '©PRD' *);
+ kUserDataTextSoftware = $C2A97377 (* '©swr' *);
+ kUserDataTextSpecialPlaybackRequirements = $C2A97265 (* '©req' *);
+ kUserDataTextTrack = $C2A97472 (* '©trk' *);
+ kUserDataTextWarning = $C2A97772 (* '©wrn' *);
+ kUserDataTextWriter = $C2A97772 (* '©wrt' *);
+ kUserDataTextURLLink = $C2A97572 (* '©url' *);
+ kUserDataTextEditDate1 = $C2A96564 (* '©ed1' *);
+
+ kUserDataUnicodeBit = $00000080;
+
+ DoTheRightThing = 0;
+
+
+type
+ MovieRecordPtr = ^MovieRecord;
+ MovieRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ Movie = ^MovieRecord;
+ Movie_fix = Movie; { used as field type when a record declaration contains a Movie field identifier }
+ MoviePtr = ^Movie;
+ TrackRecordPtr = ^TrackRecord;
+ TrackRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ Track = ^TrackRecord;
+ Track_fix = Track; { used as field type when a record declaration contains a Track field identifier }
+ MediaRecordPtr = ^MediaRecord;
+ MediaRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ Media = ^MediaRecord;
+ UserDataRecordPtr = ^UserDataRecord;
+ UserDataRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ UserData = ^UserDataRecord;
+ TrackEditStateRecordPtr = ^TrackEditStateRecord;
+ TrackEditStateRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ TrackEditState = ^TrackEditStateRecord;
+ MovieEditStateRecordPtr = ^MovieEditStateRecord;
+ MovieEditStateRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ MovieEditState = ^MovieEditStateRecord;
+ QTRestrictionSetRecordPtr = ^QTRestrictionSetRecord;
+ QTRestrictionSetRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ QTRestrictionSet = ^QTRestrictionSetRecord;
+ SpriteWorldRecordPtr = ^SpriteWorldRecord;
+ SpriteWorldRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ SpriteWorld = ^SpriteWorldRecord;
+ SpriteRecordPtr = ^SpriteRecord;
+ SpriteRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ Sprite = ^SpriteRecord;
+ QTTweenerRecordPtr = ^QTTweenerRecord;
+ QTTweenerRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ QTTweener = ^QTTweenerRecord;
+ SampleDescriptionPtr = ^SampleDescription;
+ SampleDescription = record
+ descSize: SInt32;
+ dataFormat: SInt32;
+ resvd1: SInt32;
+ resvd2: SInt16;
+ dataRefIndex: SInt16;
+ end;
+
+ SampleDescriptionHandle = ^SampleDescriptionPtr;
+ QTBandwidthReference = ^SInt32; { an opaque 32-bit type }
+ QTBandwidthReferencePtr = ^QTBandwidthReference; { when a var xx:QTBandwidthReference parameter can be nil, it is changed to xx: QTBandwidthReferencePtr }
+ QTScheduledBandwidthReference = ^SInt32; { an opaque 32-bit type }
+ QTScheduledBandwidthReferencePtr = ^QTScheduledBandwidthReference; { when a var xx:QTScheduledBandwidthReference parameter can be nil, it is changed to xx: QTScheduledBandwidthReferencePtr }
+
+const
+ kQTNetworkStatusNoNetwork = -2;
+ kQTNetworkStatusUncertain = -1;
+ kQTNetworkStatusNotConnected = 0;
+ kQTNetworkStatusConnected = 1;
+
+
+type
+ QTAtomContainer = Handle;
+ QTAtom = SInt32;
+ QTAtomType = SInt32;
+ QTAtomID = SInt32;
+ { QTFloatDouble is the 64-bit IEEE-754 standard }
+ QTFloatDouble = Float64;
+ { QTFloatSingle is the 32-bit IEEE-754 standard }
+ QTFloatSingle = Float32;
+
+
+ SoundDescriptionPtr = ^SoundDescription;
+ SoundDescription = record
+ descSize: SInt32; { total size of SoundDescription including extra data }
+ dataFormat: SInt32; { sound format }
+ resvd1: SInt32; { reserved for apple use. set to zero }
+ resvd2: SInt16; { reserved for apple use. set to zero }
+ dataRefIndex: SInt16;
+ version: SInt16; { which version is this data }
+ revlevel: SInt16; { what version of that codec did this }
+ vendor: SInt32; { whose codec compressed this data }
+ numChannels: SInt16; { number of channels of sound }
+ sampleSize: SInt16; { number of bits per sample }
+ compressionID: SInt16; { unused. set to zero. }
+ packetSize: SInt16; { unused. set to zero. }
+ sampleRate: UnsignedFixed; { sample rate sound is captured at }
+ end;
+
+ SoundDescriptionHandle = ^SoundDescriptionPtr;
+ { version 1 of the SoundDescription record }
+ SoundDescriptionV1Ptr = ^SoundDescriptionV1;
+ SoundDescriptionV1 = record
+ { original fields }
+ desc: SoundDescription;
+ { fixed compression ratio information }
+ samplesPerPacket: UInt32;
+ bytesPerPacket: UInt32;
+ bytesPerFrame: UInt32;
+ bytesPerSample: UInt32;
+ { additional atom based fields ([long size, long type, some data], repeat) }
+ end;
+
+ SoundDescriptionV1Handle = ^SoundDescriptionV1Ptr;
+ TextDescriptionPtr = ^TextDescription;
+ TextDescription = record
+ descSize: SInt32; { Total size of TextDescription }
+ dataFormat: SInt32; { 'text' }
+ resvd1: SInt32;
+ resvd2: SInt16;
+ dataRefIndex: SInt16;
+ displayFlags: SInt32; { see enum below for flag values }
+ textJustification: SInt32; { Can be: teCenter,teFlush -Default,-Right,-Left }
+ bgColor: RGBColor; { Background color }
+ defaultTextBox: Rect; { Location to place the text within the track bounds }
+ defaultStyle: ScrpSTElement; { Default style (struct defined in TextEdit.h) }
+ defaultFontName: SInt8; { Font Name (pascal string - struct extended to fit) }
+ end;
+
+ TextDescriptionHandle = ^TextDescriptionPtr;
+ SpriteDescriptionPtr = ^SpriteDescription;
+ SpriteDescription = record
+ descSize: SInt32; { total size of SpriteDescription including extra data }
+ dataFormat: SInt32; { }
+ resvd1: SInt32; { reserved for apple use }
+ resvd2: SInt16;
+ dataRefIndex: SInt16;
+ version: SInt32; { which version is this data }
+ decompressorType: OSType; { which decompressor to use, 0 for no decompression }
+ sampleFlags: SInt32; { how to interpret samples }
+ end;
+
+ SpriteDescriptionHandle = ^SpriteDescriptionPtr;
+ FlashDescriptionPtr = ^FlashDescription;
+ FlashDescription = record
+ descSize: SInt32;
+ dataFormat: SInt32;
+ resvd1: SInt32;
+ resvd2: SInt16;
+ dataRefIndex: SInt16;
+ version: SInt32; { which version is this data }
+ decompressorType: OSType; { which decompressor to use, 0 for no decompression }
+ flags: SInt32;
+ end;
+
+ FlashDescriptionHandle = ^FlashDescriptionPtr;
+ ThreeDeeDescriptionPtr = ^ThreeDeeDescription;
+ ThreeDeeDescription = record
+ descSize: SInt32; { total size of ThreeDeeDescription including extra data }
+ dataFormat: SInt32; { }
+ resvd1: SInt32; { reserved for apple use }
+ resvd2: SInt16;
+ dataRefIndex: SInt16;
+ version: SInt32; { which version is this data }
+ rendererType: SInt32; { which renderer to use, 0 for default }
+ decompressorType: SInt32; { which decompressor to use, 0 for default }
+ end;
+
+ ThreeDeeDescriptionHandle = ^ThreeDeeDescriptionPtr;
+ DataReferenceRecordPtr = ^DataReferenceRecord;
+ DataReferenceRecord = record
+ dataRefType: OSType;
+ dataRef: Handle;
+ end;
+
+ DataReferencePtr = ^DataReferenceRecord;
+ { --------------------------
+ Music Sample Description
+ -------------------------- }
+ MusicDescriptionPtr = ^MusicDescription;
+ MusicDescription = record
+ descSize: SInt32;
+ dataFormat: SInt32; { 'musi' }
+ resvd1: SInt32;
+ resvd2: SInt16;
+ dataRefIndex: SInt16;
+ musicFlags: SInt32;
+ headerData: array [0..0] of UInt32; { variable size! }
+ end;
+
+ MusicDescriptionHandle = ^MusicDescriptionPtr;
+
+const
+ kMusicFlagDontPlay2Soft = $00000001;
+ kMusicFlagDontSlaveToMovie = $00000002;
+
+
+ dfDontDisplay = $01; { Don't display the text }
+ dfDontAutoScale = $02; { Don't scale text as track bounds grows or shrinks }
+ dfClipToTextBox = $04; { Clip update to the textbox }
+ dfUseMovieBGColor = $08; { Set text background to movie's background color }
+ dfShrinkTextBoxToFit = $10; { Compute minimum box to fit the sample }
+ dfScrollIn = $20; { Scroll text in until last of text is in view }
+ dfScrollOut = $40; { Scroll text out until last of text is gone (if both set, scroll in then out) }
+ dfHorizScroll = $80; { Scroll text horizontally (otherwise it's vertical) }
+ dfReverseScroll = $0100; { vert: scroll down rather than up; horiz: scroll backwards (justfication dependent) }
+ dfContinuousScroll = $0200; { new samples cause previous samples to scroll out }
+ dfFlowHoriz = $0400; { horiz scroll text flows in textbox rather than extend to right }
+ dfContinuousKaraoke = $0800; { ignore begin offset, hilite everything up to the end offset(karaoke) }
+ dfDropShadow = $1000; { display text with a drop shadow }
+ dfAntiAlias = $2000; { attempt to display text anti aliased }
+ dfKeyedText = $4000; { key the text over background }
+ dfInverseHilite = $8000; { Use inverse hiliting rather than using hilite color }
+ dfTextColorHilite = $00010000; { changes text color in place of hiliting. }
+
+ searchTextDontGoToFoundTime = $00010000;
+ searchTextDontHiliteFoundText = $00020000;
+ searchTextOneTrackOnly = $00040000;
+ searchTextEnabledTracksOnly = $00080000;
+
+ { use these with the text property routines }
+ { set property parameter / get property parameter }
+ kTextTextHandle = 1; { Handle / preallocated Handle }
+ kTextTextPtr = 2; { Pointer }
+ kTextTEStyle = 3; { TextStyle * / TextStyle * }
+ kTextSelection = 4; { long [2] / long [2] }
+ kTextBackColor = 5; { RGBColor * / RGBColor * }
+ kTextForeColor = 6; { RGBColor * / RGBColor * }
+ kTextFace = 7; { long / long * }
+ kTextFont = 8; { long / long * }
+ kTextSize = 9; { long / long * }
+ kTextAlignment = 10; { short * / short * }
+ kTextHilite = 11; { hiliteRecord * / hiliteRecord * }
+ kTextDropShadow = 12; { dropShadowRecord * / dropShadowRecord * }
+ kTextDisplayFlags = 13; { long / long * }
+ kTextScroll = 14; { TimeValue * / TimeValue * }
+ kTextRelativeScroll = 15; { Point * }
+ kTextHyperTextFace = 16; { hyperTextSetFace * / hyperTextSetFace * }
+ kTextHyperTextColor = 17; { hyperTextSetColor * / hyperTextSetColor * }
+ kTextKeyEntry = 18; { short }
+ kTextMouseDown = 19; { Point * }
+ kTextTextBox = 20; { Rect * / Rect * }
+ kTextEditState = 21; { short / short * }
+ kTextLength = 22; { / long * }
+
+ k3DMediaRendererEntry = $72656E64 (* 'rend' *);
+ k3DMediaRendererName = $6E616D65 (* 'name' *);
+ k3DMediaRendererCode = $72636F64 (* 'rcod' *);
+
+ { progress messages }
+ movieProgressOpen = 0;
+ movieProgressUpdatePercent = 1;
+ movieProgressClose = 2;
+
+ { progress operations }
+ progressOpFlatten = 1;
+ progressOpInsertTrackSegment = 2;
+ progressOpInsertMovieSegment = 3;
+ progressOpPaste = 4;
+ progressOpAddMovieSelection = 5;
+ progressOpCopy = 6;
+ progressOpCut = 7;
+ progressOpLoadMovieIntoRam = 8;
+ progressOpLoadTrackIntoRam = 9;
+ progressOpLoadMediaIntoRam = 10;
+ progressOpImportMovie = 11;
+ progressOpExportMovie = 12;
+
+ mediaQualityDraft = $0000;
+ mediaQualityNormal = $0040;
+ mediaQualityBetter = $0080;
+ mediaQualityBest = $00C0;
+
+ { ****
+ Interactive Sprites Support
+ **** }
+ { QTEventRecord flags }
+ kQTEventPayloadIsQTList = $00000001;
+
+
+type
+ QTEventRecordPtr = ^QTEventRecord;
+ QTEventRecord = record
+ version: SInt32;
+ eventType: OSType;
+ where: Point;
+ flags: SInt32;
+ payloadRefcon: SInt32; { from here down only present if version >= 2 }
+ param1: SInt32;
+ param2: SInt32;
+ param3: SInt32;
+ end;
+
+ QTAtomSpecPtr = ^QTAtomSpec;
+ QTAtomSpec = record
+ container: QTAtomContainer;
+ atom: QTAtom;
+ end;
+
+ ResolvedQTEventSpecPtr = ^ResolvedQTEventSpec;
+ ResolvedQTEventSpec = record
+ actionAtom: QTAtomSpec;
+ targetTrack: Track;
+ targetRefCon: SInt32;
+ end;
+
+
+ { action constants }
+
+const
+ kActionMovieSetVolume = 1024; { (short movieVolume) }
+ kActionMovieSetRate = 1025; { (Fixed rate) }
+ kActionMovieSetLoopingFlags = 1026; { (long loopingFlags) }
+ kActionMovieGoToTime = 1027; { (TimeValue time) }
+ kActionMovieGoToTimeByName = 1028; { (Str255 timeName) }
+ kActionMovieGoToBeginning = 1029; { no params }
+ kActionMovieGoToEnd = 1030; { no params }
+ kActionMovieStepForward = 1031; { no params }
+ kActionMovieStepBackward = 1032; { no params }
+ kActionMovieSetSelection = 1033; { (TimeValue startTime, TimeValue endTime) }
+ kActionMovieSetSelectionByName = 1034; { (Str255 startTimeName, Str255 endTimeName) }
+ kActionMoviePlaySelection = 1035; { (Boolean selectionOnly) }
+ kActionMovieSetLanguage = 1036; { (long language) }
+ kActionMovieChanged = 1037; { no params }
+ kActionMovieRestartAtTime = 1038; { (TimeValue startTime, Fixed rate) }
+ kActionMovieGotoNextChapter = 1039; { no params }
+ kActionMovieGotoPreviousChapter = 1040; { no params }
+ kActionMovieGotoFirstChapter = 1041; { no params }
+ kActionMovieGotoLastChapter = 1042; { no params }
+ kActionMovieGotoChapterByIndex = 1043; { ( short index ) }
+ kActionMovieSetScale = 1044; { (Fixed xScale, Fixed yScale) }
+ kActionTrackSetVolume = 2048; { (short volume) }
+ kActionTrackSetBalance = 2049; { (short balance) }
+ kActionTrackSetEnabled = 2050; { (Boolean enabled) }
+ kActionTrackSetMatrix = 2051; { (MatrixRecord matrix) }
+ kActionTrackSetLayer = 2052; { (short layer) }
+ kActionTrackSetClip = 2053; { (RgnHandle clip) }
+ kActionTrackSetCursor = 2054; { (QTATomID cursorID) }
+ kActionTrackSetGraphicsMode = 2055; { (ModifierTrackGraphicsModeRecord graphicsMode) }
+ kActionTrackSetIdleFrequency = 2056; { (long frequency) }
+ kActionTrackSetBassTreble = 2057; { (short base, short treble) }
+ kActionSpriteSetMatrix = 3072; { (MatrixRecord matrix) }
+ kActionSpriteSetImageIndex = 3073; { (short imageIndex) }
+ kActionSpriteSetVisible = 3074; { (short visible) }
+ kActionSpriteSetLayer = 3075; { (short layer) }
+ kActionSpriteSetGraphicsMode = 3076; { (ModifierTrackGraphicsModeRecord graphicsMode) }
+ kActionSpritePassMouseToCodec = 3078; { no params }
+ kActionSpriteClickOnCodec = 3079; { Point localLoc }
+ kActionSpriteTranslate = 3080; { (Fixed x, Fixed y, Boolean isAbsolute) }
+ kActionSpriteScale = 3081; { (Fixed xScale, Fixed yScale) }
+ kActionSpriteRotate = 3082; { (Fixed degrees) }
+ kActionSpriteStretch = 3083; { (Fixed p1x, Fixed p1y, Fixed p2x, Fixed p2y, Fixed p3x, Fixed p3y, Fixed p4x, Fixed p4y) }
+ kActionSpriteSetCanBeHitTested = 3094; { (short canBeHitTested) }
+ kActionQTVRSetPanAngle = 4096; { (float panAngle) }
+ kActionQTVRSetTiltAngle = 4097; { (float tiltAngle) }
+ kActionQTVRSetFieldOfView = 4098; { (float fieldOfView) }
+ kActionQTVRShowDefaultView = 4099; { no params }
+ kActionQTVRGoToNodeID = 4100; { (UInt32 nodeID) }
+ kActionQTVREnableHotSpot = 4101; { long ID, Boolean enable }
+ kActionQTVRShowHotSpots = 4102; { Boolean show }
+ kActionQTVRTranslateObject = 4103; { float xMove, float yMove }
+ kActionQTVRSetViewState = 4109; { long viewStateType, short state }
+ kActionMusicPlayNote = 5120; { (long sampleDescIndex, long partNumber, long delay, long pitch, long velocity, long duration) }
+ kActionMusicSetController = 5121; { (long sampleDescIndex, long partNumber, long delay, long controller, long value) }
+ kActionCase = 6144; { [(CaseStatementActionAtoms)] }
+ kActionWhile = 6145; { [(WhileStatementActionAtoms)] }
+ kActionGoToURL = 6146; { (C string urlLink) }
+ kActionSendQTEventToSprite = 6147; { ([(SpriteTargetAtoms)], QTEventRecord theEvent) }
+ kActionDebugStr = 6148; { (Str255 theString) }
+ kActionPushCurrentTime = 6149; { no params }
+ kActionPushCurrentTimeWithLabel = 6150; { (Str255 theLabel) }
+ kActionPopAndGotoTopTime = 6151; { no params }
+ kActionPopAndGotoLabeledTime = 6152; { (Str255 theLabel) }
+ kActionStatusString = 6153; { (C string theString, long stringTypeFlags) }
+ kActionSendQTEventToTrackObject = 6154; { ([(TrackObjectTargetAtoms)], QTEventRecord theEvent) }
+ kActionAddChannelSubscription = 6155; { (Str255 channelName, C string channelsURL, C string channelsPictureURL) }
+ kActionRemoveChannelSubscription = 6156; { (C string channelsURL) }
+ kActionOpenCustomActionHandler = 6157; { (long handlerID, ComponentDescription handlerDesc) }
+ kActionDoScript = 6158; { (long scriptTypeFlags, CString command, CString arguments) }
+ kActionDoCompressedActions = 6159; { (compressed QTAtomContainer prefixed with eight bytes: long compressorType, long decompressedSize) }
+ kActionSendAppMessage = 6160; { (long appMessageID) }
+ kActionLoadComponent = 6161; { (ComponentDescription handlerDesc) }
+ kActionSetFocus = 6162; { [(TargetAtoms theObject)] }
+ kActionDontPassKeyEvent = 6163; { no params }
+ kActionSetRandomSeed = 6164; { long randomSeed }
+ kActionSpriteTrackSetVariable = 7168; { (QTAtomID variableID, float value) }
+ kActionSpriteTrackNewSprite = 7169; { (QTAtomID spriteID, short imageIndex, MatrixRecord *matrix, short visible, short layer, ModifierTrackGraphicsModeRecord *graphicsMode, QTAtomID actionHandlingSpriteID) }
+ kActionSpriteTrackDisposeSprite = 7170; { (QTAtomID spriteID) }
+ kActionSpriteTrackSetVariableToString = 7171; { (QTAtomID variableID, C string value) }
+ kActionSpriteTrackConcatVariables = 7172; { (QTAtomID firstVariableID, QTAtomID secondVariableID, QTAtomID resultVariableID ) }
+ kActionSpriteTrackSetVariableToMovieURL = 7173; { (QTAtomID variableID, < optional: [(MovieTargetAtoms)] > ) }
+ kActionSpriteTrackSetVariableToMovieBaseURL = 7174; { (QTAtomID variableID, < optional: [(MovieTargetAtoms)] > ) }
+ kActionSpriteTrackSetAllSpritesHitTestingMode = 7181;
+ kActionSpriteTrackNewImage = 7182; { (C string imageURL, QTAtomID desiredID) }
+ kActionSpriteTrackDisposeImage = 7183; { (short imageIndex) }
+ kActionApplicationNumberAndString = 8192; { (long aNumber, Str255 aString ) }
+ kActionQD3DNamedObjectTranslateTo = 9216; { (Fixed x, Fixed y, Fixed z ) }
+ kActionQD3DNamedObjectScaleTo = 9217; { (Fixed xScale, Fixed yScale, Fixed zScale ) }
+ kActionQD3DNamedObjectRotateTo = 9218; { (Fixed xDegrees, Fixed yDegrees, Fixed zDegrees ) }
+ kActionFlashTrackSetPan = 10240; { (short xPercent, short yPercent ) }
+ kActionFlashTrackSetZoom = 10241; { (short zoomFactor ) }
+ kActionFlashTrackSetZoomRect = 10242; { (long left, long top, long right, long bottom ) }
+ kActionFlashTrackGotoFrameNumber = 10243; { (long frameNumber ) }
+ kActionFlashTrackGotoFrameLabel = 10244; { (C string frameLabel ) }
+ kActionFlashTrackSetFlashVariable = 10245; { (C string path, C string name, C string value, Boolean updateFocus) }
+ kActionFlashTrackDoButtonActions = 10246; { (C string path, long buttonID, long transition) }
+ kActionMovieTrackAddChildMovie = 11264; { (QTAtomID childMovieID, C string childMovieURL) }
+ kActionMovieTrackLoadChildMovie = 11265; { (QTAtomID childMovieID) }
+ kActionMovieTrackLoadChildMovieWithQTListParams = 11266; { (QTAtomID childMovieID, C string qtlistXML) }
+ kActionTextTrackPasteText = 12288; { (C string theText, long startSelection, long endSelection ) }
+ kActionTextTrackSetTextBox = 12291; { (short left, short top, short right, short bottom) }
+ kActionTextTrackSetTextStyle = 12292; { (Handle textStyle) }
+ kActionTextTrackSetSelection = 12293; { (long startSelection, long endSelection ) }
+ kActionTextTrackSetBackgroundColor = 12294; { (ModifierTrackGraphicsModeRecord backgroundColor ) }
+ kActionTextTrackSetForegroundColor = 12295; { (ModifierTrackGraphicsModeRecord foregroundColor ) }
+ kActionTextTrackSetFace = 12296; { (long fontFace ) }
+ kActionTextTrackSetFont = 12297; { (long fontID ) }
+ kActionTextTrackSetSize = 12298; { (long fontSize ) }
+ kActionTextTrackSetAlignment = 12299; { (short alignment ) }
+ kActionTextTrackSetHilite = 12300; { (long startHighlight, long endHighlight, ModifierTrackGraphicsModeRecord highlightColor ) }
+ kActionTextTrackSetDropShadow = 12301; { (Point dropShadow, short transparency ) }
+ kActionTextTrackSetDisplayFlags = 12302; { (long flags ) }
+ kActionTextTrackSetScroll = 12303; { (long delay ) }
+ kActionTextTrackRelativeScroll = 12304; { (short deltaX, short deltaY ) }
+ kActionTextTrackFindText = 12305; { (long flags, Str255 theText, ModifierTrackGraphicsModeRecord highlightColor ) }
+ kActionTextTrackSetHyperTextFace = 12306; { (short index, long fontFace ) }
+ kActionTextTrackSetHyperTextColor = 12307; { (short index, ModifierTrackGraphicsModeRecord highlightColor ) }
+ kActionTextTrackKeyEntry = 12308; { (short character ) }
+ kActionTextTrackMouseDown = 12309; { no params }
+ kActionTextTrackSetEditable = 12310; { (short editState) }
+ kActionListAddElement = 13312; { (C string parentPath, long atIndex, C string newElementName) }
+ kActionListRemoveElements = 13313; { (C string parentPath, long startIndex, long endIndex) }
+ kActionListSetElementValue = 13314; { (C string elementPath, C string valueString) }
+ kActionListPasteFromXML = 13315; { (C string xml, C string targetParentPath, long startIndex) }
+ kActionListSetMatchingFromXML = 13316; { (C string xml, C string targetParentPath) }
+ kActionListSetFromURL = 13317; { (C string url, C string targetParentPath ) }
+ kActionListExchangeLists = 13318; { (C string url, C string parentPath) }
+ kActionListServerQuery = 13319; { (C string url, C string keyValuePairs, long flags, C string parentPath) }
+
+
+ kOperandExpression = 1;
+ kOperandConstant = 2;
+ kOperandSubscribedToChannel = 3; { C string channelsURL }
+ kOperandUniqueCustomActionHandlerID = 4;
+ kOperandCustomActionHandlerIDIsOpen = 5; { long ID }
+ kOperandConnectionSpeed = 6;
+ kOperandGMTDay = 7;
+ kOperandGMTMonth = 8;
+ kOperandGMTYear = 9;
+ kOperandGMTHours = 10;
+ kOperandGMTMinutes = 11;
+ kOperandGMTSeconds = 12;
+ kOperandLocalDay = 13;
+ kOperandLocalMonth = 14;
+ kOperandLocalYear = 15;
+ kOperandLocalHours = 16;
+ kOperandLocalMinutes = 17;
+ kOperandLocalSeconds = 18;
+ kOperandRegisteredForQuickTimePro = 19;
+ kOperandPlatformRunningOn = 20;
+ kOperandQuickTimeVersion = 21;
+ kOperandComponentVersion = 22; { C string type, C string subType, C string manufacturer }
+ kOperandOriginalHandlerRefcon = 23;
+ kOperandTicks = 24;
+ kOperandMaxLoadedTimeInMovie = 25;
+ kOperandEventParameter = 26; { short index }
+ kOperandFreeMemory = 27;
+ kOperandNetworkStatus = 28;
+ kOperandQuickTimeVersionRegistered = 29; { long version }
+ kOperandSystemVersion = 30;
+ kOperandMovieVolume = 1024;
+ kOperandMovieRate = 1025;
+ kOperandMovieIsLooping = 1026;
+ kOperandMovieLoopIsPalindrome = 1027;
+ kOperandMovieTime = 1028;
+ kOperandMovieDuration = 1029;
+ kOperandMovieTimeScale = 1030;
+ kOperandMovieWidth = 1031;
+ kOperandMovieHeight = 1032;
+ kOperandMovieLoadState = 1033;
+ kOperandMovieTrackCount = 1034;
+ kOperandMovieIsActive = 1035;
+ kOperandMovieName = 1036;
+ kOperandMovieID = 1037;
+ kOperandMovieChapterCount = 1038;
+ kOperandMovieChapterIndex = 1039;
+ kOperandMovieChapterName = 1040;
+ kOperandMovieChapterNameByIndex = 1041; { ( short index ) }
+ kOperandMovieChapterIndexByName = 1042; { (c string name) }
+ kOperandMovieAnnotation = 1043; { (c string requested, long flags) }
+ kOperandMovieConnectionFlags = 1044;
+ kOperandMovieConnectionString = 1045;
+ kOperandTrackVolume = 2048;
+ kOperandTrackBalance = 2049;
+ kOperandTrackEnabled = 2050;
+ kOperandTrackLayer = 2051;
+ kOperandTrackWidth = 2052;
+ kOperandTrackHeight = 2053;
+ kOperandTrackDuration = 2054;
+ kOperandTrackName = 2055;
+ kOperandTrackID = 2056;
+ kOperandTrackIdleFrequency = 2057;
+ kOperandTrackBass = 2058;
+ kOperandTrackTreble = 2059;
+ kOperandSpriteBoundsLeft = 3072;
+ kOperandSpriteBoundsTop = 3073;
+ kOperandSpriteBoundsRight = 3074;
+ kOperandSpriteBoundsBottom = 3075;
+ kOperandSpriteImageIndex = 3076;
+ kOperandSpriteVisible = 3077;
+ kOperandSpriteLayer = 3078;
+ kOperandSpriteTrackVariable = 3079; { [QTAtomID variableID] }
+ kOperandSpriteTrackNumSprites = 3080;
+ kOperandSpriteTrackNumImages = 3081;
+ kOperandSpriteID = 3082;
+ kOperandSpriteIndex = 3083;
+ kOperandSpriteFirstCornerX = 3084;
+ kOperandSpriteFirstCornerY = 3085;
+ kOperandSpriteSecondCornerX = 3086;
+ kOperandSpriteSecondCornerY = 3087;
+ kOperandSpriteThirdCornerX = 3088;
+ kOperandSpriteThirdCornerY = 3089;
+ kOperandSpriteFourthCornerX = 3090;
+ kOperandSpriteFourthCornerY = 3091;
+ kOperandSpriteImageRegistrationPointX = 3092;
+ kOperandSpriteImageRegistrationPointY = 3093;
+ kOperandSpriteTrackSpriteIDAtPoint = 3094; { short x, short y }
+ kOperandSpriteName = 3095;
+ kOperandSpriteCanBeHitTested = 3105; { short }
+ kOperandSpriteTrackAllSpritesHitTestingMode = 3106;
+ kOperandSpriteTrackImageIDByIndex = 3107; { short imageIndex }
+ kOperandSpriteTrackImageIndexByID = 3108; { QTAtomID }
+ kOperandQTVRPanAngle = 4096;
+ kOperandQTVRTiltAngle = 4097;
+ kOperandQTVRFieldOfView = 4098;
+ kOperandQTVRNodeID = 4099;
+ kOperandQTVRHotSpotsVisible = 4100;
+ kOperandQTVRViewCenterH = 4101;
+ kOperandQTVRViewCenterV = 4102;
+ kOperandQTVRViewStateCount = 4103;
+ kOperandQTVRViewState = 4104; { long viewStateType }
+ kOperandMouseLocalHLoc = 5120; { [TargetAtoms aTrack] }
+ kOperandMouseLocalVLoc = 5121; { [TargetAtoms aTrack] }
+ kOperandKeyIsDown = 5122; { [short modKeys, char asciiValue] }
+ kOperandRandom = 5123; { [short min, short max] }
+ kOperandCanHaveFocus = 5124; { [(TargetAtoms theObject)] }
+ kOperandHasFocus = 5125; { [(TargetAtoms theObject)] }
+ kOperandTextTrackEditable = 6144;
+ kOperandTextTrackCopyText = 6145; { long startSelection, long endSelection }
+ kOperandTextTrackStartSelection = 6146;
+ kOperandTextTrackEndSelection = 6147;
+ kOperandTextTrackTextBoxLeft = 6148;
+ kOperandTextTrackTextBoxTop = 6149;
+ kOperandTextTrackTextBoxRight = 6150;
+ kOperandTextTrackTextBoxBottom = 6151;
+ kOperandTextTrackTextLength = 6152;
+ kOperandListCountElements = 7168; { (C string parentPath) }
+ kOperandListGetElementPathByIndex = 7169; { (C string parentPath, long index) }
+ kOperandListGetElementValue = 7170; { (C string elementPath) }
+ kOperandListCopyToXML = 7171; { (C string parentPath, long startIndex, long endIndex) }
+ kOperandSin = 8192; { float x }
+ kOperandCos = 8193; { float x }
+ kOperandTan = 8194; { float x }
+ kOperandATan = 8195; { float x }
+ kOperandATan2 = 8196; { float y, float x }
+ kOperandDegreesToRadians = 8197; { float x }
+ kOperandRadiansToDegrees = 8198; { float x }
+ kOperandSquareRoot = 8199; { float x }
+ kOperandExponent = 8200; { float x }
+ kOperandLog = 8201; { float x }
+ kOperandFlashTrackVariable = 9216; { [CString path, CString name] }
+ kOperandStringLength = 10240; { (C string text) }
+ kOperandStringCompare = 10241; { (C string aText, C string bText, Boolean caseSensitive, Boolan diacSensitive) }
+ kOperandStringSubString = 10242; { (C string text, long offset, long length) }
+ kOperandStringConcat = 10243; { (C string aText, C string bText) }
+
+ kFirstMovieAction = 1024;
+ kLastMovieAction = 1044;
+ kFirstTrackAction = 2048;
+ kLastTrackAction = 2057;
+ kFirstSpriteAction = 3072;
+ kLastSpriteAction = 3094;
+ kFirstQTVRAction = 4096;
+ kLastQTVRAction = 4109;
+ kFirstMusicAction = 5120;
+ kLastMusicAction = 5121;
+ kFirstSystemAction = 6144;
+ kLastSystemAction = 6164;
+ kFirstSpriteTrackAction = 7168;
+ kLastSpriteTrackAction = 7183;
+ kFirstApplicationAction = 8192;
+ kLastApplicationAction = 8192;
+ kFirstQD3DNamedObjectAction = 9216;
+ kLastQD3DNamedObjectAction = 9218;
+ kFirstFlashTrackAction = 10240;
+ kLastFlashTrackAction = 10246;
+ kFirstMovieTrackAction = 11264;
+ kLastMovieTrackAction = 11266;
+ kFirstTextTrackAction = 12288;
+ kLastTextTrackAction = 12310;
+ kFirstMultiTargetAction = 13312;
+ kLastMultiTargetAction = 13319;
+ kFirstAction = 1024;
+ kLastAction = 13319;
+
+ { target atom types }
+ kTargetMovie = $6D6F6F76 (* 'moov' *); { no data }
+ kTargetMovieName = $6D6F6E61 (* 'mona' *); { (PString movieName) }
+ kTargetMovieID = $6D6F6964 (* 'moid' *); { (long movieID) }
+ kTargetRootMovie = $6D6F726F (* 'moro' *); { no data }
+ kTargetParentMovie = $6D6F7061 (* 'mopa' *); { no data }
+ kTargetChildMovieTrackName = $6D6F746E (* 'motn' *); { (PString childMovieTrackName) }
+ kTargetChildMovieTrackID = $6D6F7469 (* 'moti' *); { (long childMovieTrackID) }
+ kTargetChildMovieTrackIndex = $6D6F7478 (* 'motx' *); { (long childMovieTrackIndex) }
+ kTargetChildMovieMovieName = $6D6F6D6E (* 'momn' *); { (PString childMovieName) }
+ kTargetChildMovieMovieID = $6D6F6D69 (* 'momi' *); { (long childMovieID) }
+ kTargetTrackName = $74726E61 (* 'trna' *); { (PString trackName) }
+ kTargetTrackID = $74726964 (* 'trid' *); { (long trackID) }
+ kTargetTrackType = $74727479 (* 'trty' *); { (OSType trackType) }
+ kTargetTrackIndex = $7472696E (* 'trin' *); { (long trackIndex) }
+ kTargetSpriteName = $73706E61 (* 'spna' *); { (PString spriteName) }
+ kTargetSpriteID = $73706964 (* 'spid' *); { (QTAtomID spriteID) }
+ kTargetSpriteIndex = $7370696E (* 'spin' *); { (short spriteIndex) }
+ kTargetQD3DNamedObjectName = $6E616E61 (* 'nana' *); { (CString objectName) }
+ kTargetCurrentQTEventParams = $65767061 (* 'evpa' *); { no data }
+
+ { action container atom types }
+ kQTEventType = $65766E74 (* 'evnt' *);
+ kAction = $6163746E (* 'actn' *);
+ kWhichAction = $77686963 (* 'whic' *);
+ kActionParameter = $7061726D (* 'parm' *);
+ kActionTarget = $74617267 (* 'targ' *);
+ kActionFlags = $666C6167 (* 'flag' *);
+ kActionParameterMinValue = $6D696E76 (* 'minv' *);
+ kActionParameterMaxValue = $6D617876 (* 'maxv' *);
+ kActionListAtomType = $6C697374 (* 'list' *);
+ kExpressionContainerAtomType = $65787072 (* 'expr' *);
+ kConditionalAtomType = $74657374 (* 'test' *);
+ kOperatorAtomType = $6F706572 (* 'oper' *);
+ kOperandAtomType = $6F70726E (* 'oprn' *);
+ kCommentAtomType = $77687920 (* 'why ' *);
+ kCustomActionHandler = $63757374 (* 'cust' *);
+ kCustomHandlerID = $69642020 (* 'id ' *);
+ kCustomHandlerDesc = $64657363 (* 'desc' *);
+ kQTEventRecordAtomType = $65726563 (* 'erec' *);
+
+ { QTEvent types }
+ kQTEventMouseClick = $636C696B (* 'clik' *);
+ kQTEventMouseClickEnd = $63656E64 (* 'cend' *);
+ kQTEventMouseClickEndTriggerButton = $74726967 (* 'trig' *);
+ kQTEventMouseEnter = $656E7472 (* 'entr' *);
+ kQTEventMouseExit = $65786974 (* 'exit' *);
+ kQTEventMouseMoved = $6D6F7665 (* 'move' *);
+ kQTEventFrameLoaded = $6672616D (* 'fram' *);
+ kQTEventIdle = $69646C65 (* 'idle' *);
+ kQTEventKey = $6B657920 (* 'key ' *); { qtevent.param1 = key, qtevent.param2 = modifiers, qtEvent.param3 = scanCode }
+ kQTEventMovieLoaded = $6C6F6164 (* 'load' *);
+ kQTEventRequestToModifyMovie = $7265716D (* 'reqm' *);
+ kQTEventListReceived = $6C697374 (* 'list' *);
+ kQTEventKeyUp = $6B657955 (* 'keyU' *); { qtevent.param1 = key, qtevent.param2 = modifiers, qtEvent.param3 = scanCode }
+
+ { flags for the kActionFlags atom }
+ kActionFlagActionIsDelta = $00000002;
+ kActionFlagParameterWrapsAround = $00000004;
+ kActionFlagActionIsToggle = $00000008;
+
+ { flags for stringTypeFlags field of the QTStatusStringRecord }
+ kStatusStringIsURLLink = $00000002;
+ kStatusStringIsStreamingStatus = $00000004;
+ kStatusHasCodeNumber = $00000008; { high 16 bits of stringTypeFlags is error code number }
+ kStatusIsError = $00000010;
+
+ { flags for scriptTypeFlags field of the QTDoScriptRecord }
+ kScriptIsUnknownType = $00000001;
+ kScriptIsJavaScript = $00000002;
+ kScriptIsLingoEvent = $00000004;
+ kScriptIsVBEvent = $00000008;
+ kScriptIsProjectorCommand = $00000010;
+ kScriptIsAppleScript = $00000020;
+
+ { flags for CheckQuickTimeRegistration routine }
+ kQTRegistrationDialogTimeOutFlag = $01;
+ kQTRegistrationDialogShowDialog = $02;
+ kQTRegistrationDialogForceDialog = $04;
+
+ { constants for kOperatorAtomType IDs (operator types) }
+ kOperatorAdd = $61646420 (* 'add ' *);
+ kOperatorSubtract = $73756220 (* 'sub ' *);
+ kOperatorMultiply = $6D756C74 (* 'mult' *);
+ kOperatorDivide = $64697620 (* 'div ' *);
+ kOperatorOr = $6F722020 (* 'or ' *);
+ kOperatorAnd = $616E6420 (* 'and ' *);
+ kOperatorNot = $6E6F7420 (* 'not ' *);
+ kOperatorLessThan = $3C202020 (* '< ' *);
+ kOperatorLessThanEqualTo = $3C3D2020 (* '<= ' *);
+ kOperatorEqualTo = $3D202020 (* '= ' *);
+ kOperatorNotEqualTo = $213D2020 (* '!= ' *);
+ kOperatorGreaterThan = $3E202020 (* '> ' *);
+ kOperatorGreaterThanEqualTo = $3E3D2020 (* '>= ' *);
+ kOperatorModulo = $6D6F6420 (* 'mod ' *);
+ kOperatorIntegerDivide = $69646976 (* 'idiv' *);
+ kOperatorAbsoluteValue = $61627320 (* 'abs ' *);
+ kOperatorNegate = $6E656720 (* 'neg ' *);
+
+ { constants for kOperandPlatformRunningOn }
+ kPlatformMacintosh = 1;
+ kPlatformWindows = 2;
+
+ { flags for kOperandSystemVersion }
+ kSystemIsWindows9x = $00010000;
+ kSystemIsWindowsNT = $00020000;
+
+ { constants for MediaPropertiesAtom }
+ kMediaPropertyNonLinearAtomType = $6E6F6E6C (* 'nonl' *);
+ kMediaPropertyHasActions = 105;
+
+ { TimeBase and TimeRecord moved to MacTypes.h }
+
+type
+ TimeBaseFlags = UInt32;
+const
+ loopTimeBase = 1;
+ palindromeLoopTimeBase = 2;
+ maintainTimeBaseZero = 4;
+
+
+type
+ CallBackRecordPtr = ^CallBackRecord;
+ CallBackRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ QTCallBack = ^CallBackRecord;
+ { CallBack equates }
+ QTCallBackFlags = UInt16;
+const
+ triggerTimeFwd = $0001; { when curTime exceeds triggerTime going forward }
+ triggerTimeBwd = $0002; { when curTime exceeds triggerTime going backwards }
+ triggerTimeEither = $0003; { when curTime exceeds triggerTime going either direction }
+ triggerRateLT = $0004; { when rate changes to less than trigger value }
+ triggerRateGT = $0008; { when rate changes to greater than trigger value }
+ triggerRateEqual = $0010; { when rate changes to equal trigger value }
+ triggerRateLTE = $0014;
+ triggerRateGTE = $0018;
+ triggerRateNotEqual = $001C;
+ triggerRateChange = 0;
+ triggerAtStart = $0001;
+ triggerAtStop = $0002;
+
+
+type
+ TimeBaseStatus = UInt32;
+const
+ timeBaseBeforeStartTime = 1;
+ timeBaseAfterStopTime = 2;
+
+
+type
+ QTCallBackType = UInt16;
+const
+ callBackAtTime = 1;
+ callBackAtRate = 2;
+ callBackAtTimeJump = 3;
+ callBackAtExtremes = 4;
+ callBackAtTimeBaseDisposed = 5;
+ callBackAtInterrupt = $8000;
+ callBackAtDeferredTask = $4000;
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ QTCallBackProcPtr = procedure(cb: QTCallBack; refCon: SInt32);
+{$elsec}
+ QTCallBackProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ QTCallBackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QTCallBackUPP = UniversalProcPtr;
+{$endc}
+
+const
+ qtcbNeedsRateChanges = 1; { wants to know about rate changes }
+ qtcbNeedsTimeChanges = 2; { wants to know about time changes }
+ qtcbNeedsStartStopChanges = 4; { wants to know when TimeBase start/stop is changed }
+
+
+type
+ QTCallBackHeaderPtr = ^QTCallBackHeader;
+ QTCallBackHeader = record
+ callBackFlags: SInt32;
+ reserved1: SInt32;
+ qtPrivate: array [0..39] of SInt8;
+ end;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QTSyncTaskProcPtr = procedure(task: UnivPtr);
+{$elsec}
+ QTSyncTaskProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ QTSyncTaskUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QTSyncTaskUPP = UniversalProcPtr;
+{$endc}
+ QTSyncTaskRecordPtr = ^QTSyncTaskRecord;
+ QTSyncTaskRecord = record
+ qLink: Ptr;
+ proc: QTSyncTaskUPP;
+ end;
+
+ QTSyncTaskPtr = ^QTSyncTaskRecord;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ MovieRgnCoverProcPtr = function(theMovie: Movie; changedRgn: RgnHandle; refcon: SInt32): OSErr;
+{$elsec}
+ MovieRgnCoverProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ MovieProgressProcPtr = function(theMovie: Movie; message: SInt16; whatOperation: SInt16; percentDone: Fixed; refcon: SInt32): OSErr;
+{$elsec}
+ MovieProgressProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ MovieDrawingCompleteProcPtr = function(theMovie: Movie; refCon: SInt32): OSErr;
+{$elsec}
+ MovieDrawingCompleteProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TrackTransferProcPtr = function(t: Track; refCon: SInt32): OSErr;
+{$elsec}
+ TrackTransferProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ GetMovieProcPtr = function(offset: SInt32; size: SInt32; dataPtr: UnivPtr; refCon: UnivPtr): OSErr;
+{$elsec}
+ GetMovieProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ MoviePreviewCallOutProcPtr = function(refcon: SInt32): boolean;
+{$elsec}
+ MoviePreviewCallOutProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TextMediaProcPtr = function(theText: Handle; theMovie: Movie; var displayFlag: SInt16; refcon: SInt32): OSErr;
+{$elsec}
+ TextMediaProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ ActionsProcPtr = function(refcon: UnivPtr; targetTrack: Track; targetRefCon: SInt32; theEvent: QTEventRecordPtr): OSErr;
+{$elsec}
+ ActionsProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ DoMCActionProcPtr = function(refcon: UnivPtr; action: SInt16; params: UnivPtr; var handled: boolean): OSErr;
+{$elsec}
+ DoMCActionProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ MovieExecuteWiredActionsProcPtr = function(theMovie: Movie; refcon: UnivPtr; flags: SInt32; wiredActions: QTAtomContainer): OSErr;
+{$elsec}
+ MovieExecuteWiredActionsProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ MoviePrePrerollCompleteProcPtr = procedure(theMovie: Movie; prerollErr: OSErr; refcon: UnivPtr);
+{$elsec}
+ MoviePrePrerollCompleteProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QTNextTaskNeededSoonerCallbackProcPtr = procedure(duration: TimeValue; flags: UInt32; refcon: UnivPtr);
+{$elsec}
+ QTNextTaskNeededSoonerCallbackProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ MoviesErrorProcPtr = procedure(theErr: OSErr; refcon: SInt32);
+{$elsec}
+ MoviesErrorProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ MovieRgnCoverUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ MovieRgnCoverUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ MovieProgressUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ MovieProgressUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ MovieDrawingCompleteUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ MovieDrawingCompleteUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ TrackTransferUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ TrackTransferUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ GetMovieUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ GetMovieUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ MoviePreviewCallOutUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ MoviePreviewCallOutUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ TextMediaUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ TextMediaUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ ActionsUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ActionsUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ DoMCActionUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DoMCActionUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ MovieExecuteWiredActionsUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ MovieExecuteWiredActionsUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ MoviePrePrerollCompleteUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ MoviePrePrerollCompleteUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QTNextTaskNeededSoonerCallbackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QTNextTaskNeededSoonerCallbackUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ MoviesErrorUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ MoviesErrorUPP = UniversalProcPtr;
+{$endc}
+ MediaHandler = ComponentInstance;
+ DataHandler = ComponentInstance;
+ MediaHandlerComponent = Component;
+ DataHandlerComponent = Component;
+ HandlerError = ComponentResult;
+
+const
+ keepInRam = $01; { load and make non-purgable }
+ unkeepInRam = $02; { mark as purgable }
+ flushFromRam = $04; { empty those handles }
+ loadForwardTrackEdits = $08; { load track edits into ram for playing forward }
+ loadBackwardTrackEdits = $10; { load track edits into ram for playing in reverse }
+
+ newMovieActive = $01;
+ newMovieDontResolveDataRefs = $02;
+ newMovieDontAskUnresolvedDataRefs = $04;
+ newMovieDontAutoAlternates = $08;
+ newMovieDontUpdateForeBackPointers = $10;
+ newMovieDontAutoUpdateClock = $20;
+ newMovieAsyncOK = $0100;
+ newMovieIdleImportOK = $0400;
+ newMovieDontInteractWithUser = $0800;
+
+ { track usage bits }
+ trackUsageInMovie = $02;
+ trackUsageInPreview = $04;
+ trackUsageInPoster = $08;
+
+ { Add/GetMediaSample flags }
+ mediaSampleNotSync = $01; { sample is not a sync sample (eg. is frame differenced }
+ mediaSampleShadowSync = $02; { sample is a shadow sync }
+
+ pasteInParallel = $01;
+ showUserSettingsDialog = $02;
+ movieToFileOnlyExport = $04;
+ movieFileSpecValid = $08;
+
+ nextTimeMediaSample = $01;
+ nextTimeMediaEdit = $02;
+ nextTimeTrackEdit = $04;
+ nextTimeSyncSample = $08;
+ nextTimeStep = $10;
+ nextTimeEdgeOK = $4000;
+ nextTimeIgnoreActiveSegment = $8000;
+
+
+type
+ nextTimeFlagsEnum = UInt16;
+
+const
+ createMovieFileDeleteCurFile = $80000000;
+ createMovieFileDontCreateMovie = $40000000;
+ createMovieFileDontOpenFile = $20000000;
+ createMovieFileDontCreateResFile = $10000000;
+
+
+type
+ createMovieFileFlagsEnum = UInt32;
+
+const
+ flattenAddMovieToDataFork = $00000001;
+ flattenActiveTracksOnly = $00000004;
+ flattenDontInterleaveFlatten = $00000008;
+ flattenFSSpecPtrIsDataRefRecordPtr = $00000010;
+ flattenCompressMovieResource = $00000020;
+ flattenForceMovieResourceBeforeMovieData = $00000040;
+
+
+type
+ movieFlattenFlagsEnum = UInt32;
+
+const
+ movieInDataForkResID = -1; { magic res ID }
+
+ mcTopLeftMovie = $01; { usually centered }
+ mcScaleMovieToFit = $02; { usually only scales down }
+ mcWithBadge = $04; { give me a badge }
+ mcNotVisible = $08; { don't show controller }
+ mcWithFrame = $10; { gimme a frame }
+
+ movieScrapDontZeroScrap = $01;
+ movieScrapOnlyPutMovie = $02;
+
+ dataRefSelfReference = $01;
+ dataRefWasNotResolved = $02;
+
+
+type
+ dataRefAttributesFlags = UInt32;
+
+const
+ kMovieAnchorDataRefIsDefault = $01; { data ref returned is movie default data ref }
+
+ hintsScrubMode = $01; { mask == && (if flags == scrub on, flags != scrub off) }
+ hintsLoop = $02;
+ hintsDontPurge = $04;
+ hintsUseScreenBuffer = $20;
+ hintsAllowInterlace = $40;
+ hintsUseSoundInterp = $80;
+ hintsHighQuality = $0100; { slooooow }
+ hintsPalindrome = $0200;
+ hintsInactive = $0800;
+ hintsOffscreen = $1000;
+ hintsDontDraw = $2000;
+ hintsAllowBlacklining = $4000;
+ hintsDontUseVideoOverlaySurface = $00010000;
+ hintsIgnoreBandwidthRestrictions = $00020000;
+ hintsPlayingEveryFrame = $00040000;
+ hintsAllowDynamicResize = $00080000;
+ hintsSingleField = $00100000;
+ hintsNoRenderingTimeOut = $00200000;
+ hintsFlushVideoInsteadOfDirtying = $00400000;
+ hintsEnableSubPixelPositioning = $00800000;
+
+
+type
+ playHintsEnum = UInt32;
+
+const
+ mediaHandlerFlagBaseClient = 1;
+
+
+type
+ mediaHandlerFlagsEnum = UInt32;
+
+const
+ movieTrackMediaType = $01;
+ movieTrackCharacteristic = $02;
+ movieTrackEnabledOnly = $04;
+
+
+type
+ SampleReferenceRecordPtr = ^SampleReferenceRecord;
+ SampleReferenceRecord = record
+ dataOffset: SInt32;
+ dataSize: SInt32;
+ durationPerSample: TimeValue;
+ numberOfSamples: SInt32;
+ sampleFlags: SInt16;
+ end;
+
+ SampleReferencePtr = ^SampleReferenceRecord;
+ SampleReference64RecordPtr = ^SampleReference64Record;
+ SampleReference64Record = record
+ dataOffset: wide;
+ dataSize: UInt32;
+ durationPerSample: TimeValue;
+ numberOfSamples: UInt32;
+ sampleFlags: SInt16;
+ end;
+
+ SampleReference64Ptr = ^SampleReference64Record;
+
+ { ************************
+ * Initialization Routines
+ ************************* }
+ {
+ * CheckQuickTimeRegistration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure CheckQuickTimeRegistration(registrationKey: UnivPtr; flags: SInt32); external name '_CheckQuickTimeRegistration';
+{
+ * EnterMovies()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function EnterMovies: OSErr; external name '_EnterMovies';
+{
+ * ExitMovies()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure ExitMovies; external name '_ExitMovies';
+{************************
+* Error Routines
+*************************}
+
+{
+ * GetMoviesError()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMoviesError: OSErr; external name '_GetMoviesError';
+{
+ * ClearMoviesStickyError()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure ClearMoviesStickyError; external name '_ClearMoviesStickyError';
+{
+ * GetMoviesStickyError()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMoviesStickyError: OSErr; external name '_GetMoviesStickyError';
+{
+ * SetMoviesErrorProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMoviesErrorProc(errProc: MoviesErrorUPP; refcon: SInt32); external name '_SetMoviesErrorProc';
+{************************
+* Idle Routines
+*************************}
+{
+ * MoviesTask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure MoviesTask(theMovie: Movie; maxMilliSecToUse: SInt32); external name '_MoviesTask';
+{
+ * PrerollMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function PrerollMovie(theMovie: Movie; time: TimeValue; Rate: Fixed): OSErr; external name '_PrerollMovie';
+{
+ * PrePrerollMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function PrePrerollMovie(m: Movie; time: TimeValue; rate: Fixed; proc: MoviePrePrerollCompleteUPP; refcon: UnivPtr): OSErr; external name '_PrePrerollMovie';
+{
+ * AbortPrePrerollMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+procedure AbortPrePrerollMovie(m: Movie; err: OSErr); external name '_AbortPrePrerollMovie';
+{
+ * LoadMovieIntoRam()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function LoadMovieIntoRam(theMovie: Movie; time: TimeValue; duration: TimeValue; flags: SInt32): OSErr; external name '_LoadMovieIntoRam';
+{
+ * LoadTrackIntoRam()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function LoadTrackIntoRam(theTrack: Track; time: TimeValue; duration: TimeValue; flags: SInt32): OSErr; external name '_LoadTrackIntoRam';
+{
+ * LoadMediaIntoRam()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function LoadMediaIntoRam(theMedia: Media; time: TimeValue; duration: TimeValue; flags: SInt32): OSErr; external name '_LoadMediaIntoRam';
+{
+ * SetMovieActive()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieActive(theMovie: Movie; active: boolean); external name '_SetMovieActive';
+{
+ * GetMovieActive()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieActive(theMovie: Movie): boolean; external name '_GetMovieActive';
+{
+ * QTGetWallClockTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTGetWallClockTimeBase(var wallClockTimeBase: TimeBase): OSErr; external name '_QTGetWallClockTimeBase';
+{************************
+* Idle Management
+*************************}
+
+type
+ IdleManager = ^SInt32; { an opaque 32-bit type }
+ IdleManagerPtr = ^IdleManager; { when a var xx:IdleManager parameter can be nil, it is changed to xx: IdleManagerPtr }
+ {
+ * QTIdleManagerOpen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTIdleManagerOpen: IdleManager; external name '_QTIdleManagerOpen';
+{
+ * QTIdleManagerClose()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTIdleManagerClose(im: IdleManager): OSErr; external name '_QTIdleManagerClose';
+{
+ * QTIdleManagerGetNextIdleTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTIdleManagerGetNextIdleTime(im: IdleManager; var nextIdle: TimeRecord): OSErr; external name '_QTIdleManagerGetNextIdleTime';
+{
+ * QTIdleManagerSetNextIdleTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTIdleManagerSetNextIdleTime(im: IdleManager; var nextIdle: TimeRecord): OSErr; external name '_QTIdleManagerSetNextIdleTime';
+{
+ * QTIdleManagerSetNextIdleTimeNever()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTIdleManagerSetNextIdleTimeNever(im: IdleManager): OSErr; external name '_QTIdleManagerSetNextIdleTimeNever';
+{
+ * QTIdleManagerSetNextIdleTimeNow()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTIdleManagerSetNextIdleTimeNow(im: IdleManager): OSErr; external name '_QTIdleManagerSetNextIdleTimeNow';
+{
+ * QTIdleManagerSetNextIdleTimeDelta()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTIdleManagerSetNextIdleTimeDelta(im: IdleManager; duration: TimeValue; scale: TimeScale): OSErr; external name '_QTIdleManagerSetNextIdleTimeDelta';
+{
+ * QTIdleManagerSetParent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTIdleManagerSetParent(im: IdleManager; parent: IdleManager): OSErr; external name '_QTIdleManagerSetParent';
+{
+ * QTIdleManagerNeedsAnIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTIdleManagerNeedsAnIdle(im: IdleManager; var needsOne: boolean): OSErr; external name '_QTIdleManagerNeedsAnIdle';
+{************************
+* Carbon Movie Control
+*************************}
+{ Movie Control option bits }
+
+const
+ kMovieControlOptionHideController = $00000001;
+ kMovieControlOptionLocateTopLeft = $00000002;
+ kMovieControlOptionEnableEditing = $00000004;
+ kMovieControlOptionHandleEditingHI = $00000008;
+ kMovieControlOptionSetKeysEnabled = $00000010;
+ kMovieControlOptionManuallyIdled = $00000020;
+
+ { Item tags for use in GetControlData() (some with SetControlData()) calls on Movie Controls }
+ kMovieControlDataMovieController = $6D632020 (* 'mc ' *);
+ kMovieControlDataMovie = $6D6F6F76 (* 'moov' *);
+ kMovieControlDataManualIdling = $6D616E75 (* 'manu' *);
+
+ {
+ ** CreateMovieControl() - This is the public API routine that creates a Movie Control. Given a window and location
+ ** plus a movie, it constructs a Movie Control with a Movie Controller in the window.
+ }
+ {
+ * CreateMovieControl()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ }
+function CreateMovieControl(theWindow: WindowRef; var localRect: Rect; theMovie: Movie; options: UInt32; var returnedControl: ControlRef): OSErr; external name '_CreateMovieControl';
+{************************
+* calls for playing movies, previews, posters
+*************************}
+{
+ * StartMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure StartMovie(theMovie: Movie); external name '_StartMovie';
+{
+ * StopMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure StopMovie(theMovie: Movie); external name '_StopMovie';
+{
+ * GoToBeginningOfMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GoToBeginningOfMovie(theMovie: Movie); external name '_GoToBeginningOfMovie';
+{
+ * GoToEndOfMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GoToEndOfMovie(theMovie: Movie); external name '_GoToEndOfMovie';
+{
+ * IsMovieDone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function IsMovieDone(theMovie: Movie): boolean; external name '_IsMovieDone';
+{
+ * GetMoviePreviewMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMoviePreviewMode(theMovie: Movie): boolean; external name '_GetMoviePreviewMode';
+{
+ * SetMoviePreviewMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMoviePreviewMode(theMovie: Movie; usePreview: boolean); external name '_SetMoviePreviewMode';
+{
+ * ShowMoviePoster()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure ShowMoviePoster(theMovie: Movie); external name '_ShowMoviePoster';
+{
+ * PlayMoviePreview()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure PlayMoviePreview(theMovie: Movie; callOutProc: MoviePreviewCallOutUPP; refcon: SInt32); external name '_PlayMoviePreview';
+{************************
+* calls for controlling movies & tracks which are playing
+*************************}
+{
+ * GetMovieTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieTimeBase(theMovie: Movie): TimeBase; external name '_GetMovieTimeBase';
+{
+ * SetMovieMasterTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieMasterTimeBase(theMovie: Movie; tb: TimeBase; const (*var*) slaveZero: TimeRecord); external name '_SetMovieMasterTimeBase';
+{
+ * SetMovieMasterClock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieMasterClock(theMovie: Movie; clockMeister: Component; const (*var*) slaveZero: TimeRecord); external name '_SetMovieMasterClock';
+{
+ * ChooseMovieClock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+procedure ChooseMovieClock(m: Movie; flags: SInt32); external name '_ChooseMovieClock';
+{
+ * GetMovieGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetMovieGWorld(theMovie: Movie; var port: CGrafPtr; var gdh: GDHandle); external name '_GetMovieGWorld';
+{
+ * SetMovieGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieGWorld(theMovie: Movie; port: CGrafPtr; gdh: GDHandle); external name '_SetMovieGWorld';
+const
+ movieDrawingCallWhenChanged = 0;
+ movieDrawingCallAlways = 1;
+
+ {
+ * SetMovieDrawingCompleteProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieDrawingCompleteProc(theMovie: Movie; flags: SInt32; proc: MovieDrawingCompleteUPP; refCon: SInt32); external name '_SetMovieDrawingCompleteProc';
+{
+ * GetMovieNaturalBoundsRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetMovieNaturalBoundsRect(theMovie: Movie; var naturalBounds: Rect); external name '_GetMovieNaturalBoundsRect';
+{
+ * GetNextTrackForCompositing()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetNextTrackForCompositing(theMovie: Movie; theTrack: Track): Track; external name '_GetNextTrackForCompositing';
+{
+ * GetPrevTrackForCompositing()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetPrevTrackForCompositing(theMovie: Movie; theTrack: Track): Track; external name '_GetPrevTrackForCompositing';
+{
+ * SetTrackGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTrackGWorld(theTrack: Track; port: CGrafPtr; gdh: GDHandle; proc: TrackTransferUPP; refCon: SInt32); external name '_SetTrackGWorld';
+{
+ * GetMoviePict()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMoviePict(theMovie: Movie; time: TimeValue): PicHandle; external name '_GetMoviePict';
+{
+ * GetTrackPict()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackPict(theTrack: Track; time: TimeValue): PicHandle; external name '_GetTrackPict';
+{
+ * GetMoviePosterPict()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMoviePosterPict(theMovie: Movie): PicHandle; external name '_GetMoviePosterPict';
+{ called between Begin & EndUpdate }
+{
+ * UpdateMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function UpdateMovie(theMovie: Movie): OSErr; external name '_UpdateMovie';
+{
+ * InvalidateMovieRegion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function InvalidateMovieRegion(theMovie: Movie; invalidRgn: RgnHandle): OSErr; external name '_InvalidateMovieRegion';
+{*** spatial movie routines ***}
+{
+ * GetMovieBox()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetMovieBox(theMovie: Movie; var boxRect: Rect); external name '_GetMovieBox';
+{
+ * SetMovieBox()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieBox(theMovie: Movie; const (*var*) boxRect: Rect); external name '_SetMovieBox';
+{* movie display clip }
+{
+ * GetMovieDisplayClipRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieDisplayClipRgn(theMovie: Movie): RgnHandle; external name '_GetMovieDisplayClipRgn';
+{
+ * SetMovieDisplayClipRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieDisplayClipRgn(theMovie: Movie; theClip: RgnHandle); external name '_SetMovieDisplayClipRgn';
+{* movie src clip }
+{
+ * GetMovieClipRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieClipRgn(theMovie: Movie): RgnHandle; external name '_GetMovieClipRgn';
+{
+ * SetMovieClipRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieClipRgn(theMovie: Movie; theClip: RgnHandle); external name '_SetMovieClipRgn';
+{* track src clip }
+{
+ * GetTrackClipRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackClipRgn(theTrack: Track): RgnHandle; external name '_GetTrackClipRgn';
+{
+ * SetTrackClipRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTrackClipRgn(theTrack: Track; theClip: RgnHandle); external name '_SetTrackClipRgn';
+{* bounds in display space (not clipped by display clip) }
+{
+ * GetMovieDisplayBoundsRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieDisplayBoundsRgn(theMovie: Movie): RgnHandle; external name '_GetMovieDisplayBoundsRgn';
+{
+ * GetTrackDisplayBoundsRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackDisplayBoundsRgn(theTrack: Track): RgnHandle; external name '_GetTrackDisplayBoundsRgn';
+{* bounds in movie space }
+{
+ * GetMovieBoundsRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieBoundsRgn(theMovie: Movie): RgnHandle; external name '_GetMovieBoundsRgn';
+{
+ * GetTrackMovieBoundsRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackMovieBoundsRgn(theTrack: Track): RgnHandle; external name '_GetTrackMovieBoundsRgn';
+{* bounds in track space }
+{
+ * GetTrackBoundsRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackBoundsRgn(theTrack: Track): RgnHandle; external name '_GetTrackBoundsRgn';
+{* mattes - always in track space }
+{
+ * GetTrackMatte()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackMatte(theTrack: Track): PixMapHandle; external name '_GetTrackMatte';
+{
+ * SetTrackMatte()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTrackMatte(theTrack: Track; theMatte: PixMapHandle); external name '_SetTrackMatte';
+{
+ * DisposeMatte()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure DisposeMatte(theMatte: PixMapHandle); external name '_DisposeMatte';
+{* video out }
+{
+ * SetMovieVideoOutput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+procedure SetMovieVideoOutput(theMovie: Movie; vout: ComponentInstance); external name '_SetMovieVideoOutput';
+{************************
+* calls for getting/saving movies
+*************************}
+{
+ * NewMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewMovie(flags: SInt32): Movie; external name '_NewMovie';
+{
+ * PutMovieIntoHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function PutMovieIntoHandle(theMovie: Movie; publicMovie: Handle): OSErr; external name '_PutMovieIntoHandle';
+{
+ * PutMovieIntoDataFork()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function PutMovieIntoDataFork(theMovie: Movie; fRefNum: SInt16; offset: SInt32; maxSize: SInt32): OSErr; external name '_PutMovieIntoDataFork';
+{
+ * PutMovieIntoDataFork64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function PutMovieIntoDataFork64(theMovie: Movie; fRefNum: SInt32; const (*var*) offset: wide; maxSize: UInt32): OSErr; external name '_PutMovieIntoDataFork64';
+{
+ * PutMovieIntoStorage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function PutMovieIntoStorage(theMovie: Movie; dh: DataHandler; const (*var*) offset: wide; maxSize: UInt32): OSErr; external name '_PutMovieIntoStorage';
+{
+ * PutMovieForDataRefIntoHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function PutMovieForDataRefIntoHandle(theMovie: Movie; dataRef: Handle; dataRefType: OSType; publicMovie: Handle): OSErr; external name '_PutMovieForDataRefIntoHandle';
+{
+ * DisposeMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure DisposeMovie(theMovie: Movie); external name '_DisposeMovie';
+{************************
+* Movie State Routines
+*************************}
+{
+ * GetMovieCreationTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieCreationTime(theMovie: Movie): UInt32; external name '_GetMovieCreationTime';
+{
+ * GetMovieModificationTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieModificationTime(theMovie: Movie): UInt32; external name '_GetMovieModificationTime';
+{
+ * GetMovieTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieTimeScale(theMovie: Movie): TimeScale; external name '_GetMovieTimeScale';
+{
+ * SetMovieTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieTimeScale(theMovie: Movie; timeScale_: TimeScale); external name '_SetMovieTimeScale';
+{
+ * GetMovieDuration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieDuration(theMovie: Movie): TimeValue; external name '_GetMovieDuration';
+{
+ * GetMovieRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieRate(theMovie: Movie): Fixed; external name '_GetMovieRate';
+{
+ * SetMovieRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieRate(theMovie: Movie; rate: Fixed); external name '_SetMovieRate';
+{
+ * GetMoviePreferredRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMoviePreferredRate(theMovie: Movie): Fixed; external name '_GetMoviePreferredRate';
+{
+ * SetMoviePreferredRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMoviePreferredRate(theMovie: Movie; rate: Fixed); external name '_SetMoviePreferredRate';
+{
+ * GetMoviePreferredVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMoviePreferredVolume(theMovie: Movie): SInt16; external name '_GetMoviePreferredVolume';
+{
+ * SetMoviePreferredVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMoviePreferredVolume(theMovie: Movie; volume: SInt16); external name '_SetMoviePreferredVolume';
+{
+ * GetMovieVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieVolume(theMovie: Movie): SInt16; external name '_GetMovieVolume';
+{
+ * SetMovieVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieVolume(theMovie: Movie; volume: SInt16); external name '_SetMovieVolume';
+{
+ * GetMovieMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetMovieMatrix(theMovie: Movie; var matrix: MatrixRecord); external name '_GetMovieMatrix';
+{
+ * SetMovieMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieMatrix(theMovie: Movie; const (*var*) matrix: MatrixRecord); external name '_SetMovieMatrix';
+{
+ * GetMoviePreviewTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetMoviePreviewTime(theMovie: Movie; var previewTime: TimeValue; var previewDuration: TimeValue); external name '_GetMoviePreviewTime';
+{
+ * SetMoviePreviewTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMoviePreviewTime(theMovie: Movie; previewTime: TimeValue; previewDuration: TimeValue); external name '_SetMoviePreviewTime';
+{
+ * GetMoviePosterTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMoviePosterTime(theMovie: Movie): TimeValue; external name '_GetMoviePosterTime';
+{
+ * SetMoviePosterTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMoviePosterTime(theMovie: Movie; posterTime: TimeValue); external name '_SetMoviePosterTime';
+{
+ * GetMovieSelection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetMovieSelection(theMovie: Movie; var selectionTime: TimeValue; var selectionDuration: TimeValue); external name '_GetMovieSelection';
+{
+ * SetMovieSelection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieSelection(theMovie: Movie; selectionTime: TimeValue; selectionDuration: TimeValue); external name '_SetMovieSelection';
+{
+ * SetMovieActiveSegment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieActiveSegment(theMovie: Movie; startTime: TimeValue; duration: TimeValue); external name '_SetMovieActiveSegment';
+{
+ * GetMovieActiveSegment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetMovieActiveSegment(theMovie: Movie; var startTime: TimeValue; var duration: TimeValue); external name '_GetMovieActiveSegment';
+{
+ * GetMovieTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieTime(theMovie: Movie; var currentTime: TimeRecord): TimeValue; external name '_GetMovieTime';
+{
+ * SetMovieTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieTime(theMovie: Movie; const (*var*) newtime: TimeRecord); external name '_SetMovieTime';
+{
+ * SetMovieTimeValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieTimeValue(theMovie: Movie; newtime: TimeValue); external name '_SetMovieTimeValue';
+{
+ * GetMovieUserData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieUserData(theMovie: Movie): UserData; external name '_GetMovieUserData';
+{
+ * QTGetTimeUntilNextTask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTGetTimeUntilNextTask(var duration: SInt32; scale: SInt32): OSErr; external name '_QTGetTimeUntilNextTask';
+{
+ * QTInstallNextTaskNeededSoonerCallback()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTInstallNextTaskNeededSoonerCallback(callbackProc: QTNextTaskNeededSoonerCallbackUPP; scale: TimeScale; flags: UInt32; refcon: UnivPtr): OSErr; external name '_QTInstallNextTaskNeededSoonerCallback';
+{
+ * QTUninstallNextTaskNeededSoonerCallback()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTUninstallNextTaskNeededSoonerCallback(callbackProc: QTNextTaskNeededSoonerCallbackUPP; refcon: UnivPtr): OSErr; external name '_QTUninstallNextTaskNeededSoonerCallback';
+{************************
+* Track/Media finding routines
+*************************}
+{
+ * GetMovieTrackCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieTrackCount(theMovie: Movie): SInt32; external name '_GetMovieTrackCount';
+{
+ * GetMovieTrack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieTrack(theMovie: Movie; trackID: SInt32): Track; external name '_GetMovieTrack';
+{
+ * GetMovieIndTrack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieIndTrack(theMovie: Movie; index: SInt32): Track; external name '_GetMovieIndTrack';
+{
+ * GetMovieIndTrackType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieIndTrackType(theMovie: Movie; index: SInt32; trackType: OSType; flags: SInt32): Track; external name '_GetMovieIndTrackType';
+{
+ * GetTrackID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackID(theTrack: Track): SInt32; external name '_GetTrackID';
+{
+ * GetTrackMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackMovie(theTrack: Track): Movie; external name '_GetTrackMovie';
+{************************
+* Track creation routines
+*************************}
+{
+ * NewMovieTrack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewMovieTrack(theMovie: Movie; width: Fixed; height: Fixed; trackVolume: SInt16): Track; external name '_NewMovieTrack';
+{
+ * DisposeMovieTrack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure DisposeMovieTrack(theTrack: Track); external name '_DisposeMovieTrack';
+{************************
+* Track State routines
+*************************}
+{
+ * GetTrackCreationTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackCreationTime(theTrack: Track): UInt32; external name '_GetTrackCreationTime';
+{
+ * GetTrackModificationTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackModificationTime(theTrack: Track): UInt32; external name '_GetTrackModificationTime';
+{
+ * GetTrackEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackEnabled(theTrack: Track): boolean; external name '_GetTrackEnabled';
+{
+ * SetTrackEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTrackEnabled(theTrack: Track; isEnabled: boolean); external name '_SetTrackEnabled';
+{
+ * GetTrackUsage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackUsage(theTrack: Track): SInt32; external name '_GetTrackUsage';
+{
+ * SetTrackUsage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTrackUsage(theTrack: Track; usage: SInt32); external name '_SetTrackUsage';
+{
+ * GetTrackDuration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackDuration(theTrack: Track): TimeValue; external name '_GetTrackDuration';
+{
+ * GetTrackOffset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackOffset(theTrack: Track): TimeValue; external name '_GetTrackOffset';
+{
+ * SetTrackOffset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTrackOffset(theTrack: Track; movieOffsetTime: TimeValue); external name '_SetTrackOffset';
+{
+ * GetTrackLayer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackLayer(theTrack: Track): SInt16; external name '_GetTrackLayer';
+{
+ * SetTrackLayer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTrackLayer(theTrack: Track; layer: SInt16); external name '_SetTrackLayer';
+{
+ * GetTrackAlternate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackAlternate(theTrack: Track): Track; external name '_GetTrackAlternate';
+{
+ * SetTrackAlternate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTrackAlternate(theTrack: Track; alternateT: Track); external name '_SetTrackAlternate';
+{
+ * SetAutoTrackAlternatesEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetAutoTrackAlternatesEnabled(theMovie: Movie; enable: boolean); external name '_SetAutoTrackAlternatesEnabled';
+{
+ * SelectMovieAlternates()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SelectMovieAlternates(theMovie: Movie); external name '_SelectMovieAlternates';
+{
+ * GetTrackVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackVolume(theTrack: Track): SInt16; external name '_GetTrackVolume';
+{
+ * SetTrackVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTrackVolume(theTrack: Track; volume: SInt16); external name '_SetTrackVolume';
+{
+ * GetTrackMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetTrackMatrix(theTrack: Track; var matrix: MatrixRecord); external name '_GetTrackMatrix';
+{
+ * SetTrackMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTrackMatrix(theTrack: Track; const (*var*) matrix: MatrixRecord); external name '_SetTrackMatrix';
+{
+ * GetTrackDimensions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetTrackDimensions(theTrack: Track; var width: Fixed; var height: Fixed); external name '_GetTrackDimensions';
+{
+ * SetTrackDimensions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTrackDimensions(theTrack: Track; width: Fixed; height: Fixed); external name '_SetTrackDimensions';
+{
+ * GetTrackUserData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackUserData(theTrack: Track): UserData; external name '_GetTrackUserData';
+{
+ * GetTrackDisplayMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackDisplayMatrix(theTrack: Track; var matrix: MatrixRecord): OSErr; external name '_GetTrackDisplayMatrix';
+{
+ * GetTrackSoundLocalizationSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackSoundLocalizationSettings(theTrack: Track; var settings: Handle): OSErr; external name '_GetTrackSoundLocalizationSettings';
+{
+ * SetTrackSoundLocalizationSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetTrackSoundLocalizationSettings(theTrack: Track; settings: Handle): OSErr; external name '_SetTrackSoundLocalizationSettings';
+{************************
+* get Media routines
+*************************}
+{
+ * NewTrackMedia()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewTrackMedia(theTrack: Track; mediaType: OSType; timeScale_: TimeScale; dataRef: Handle; dataRefType: OSType): Media; external name '_NewTrackMedia';
+{
+ * DisposeTrackMedia()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure DisposeTrackMedia(theMedia: Media); external name '_DisposeTrackMedia';
+{
+ * GetTrackMedia()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackMedia(theTrack: Track): Media; external name '_GetTrackMedia';
+{
+ * GetMediaTrack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaTrack(theMedia: Media): Track; external name '_GetMediaTrack';
+{************************
+* Media State routines
+*************************}
+{
+ * GetMediaCreationTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaCreationTime(theMedia: Media): UInt32; external name '_GetMediaCreationTime';
+{
+ * GetMediaModificationTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaModificationTime(theMedia: Media): UInt32; external name '_GetMediaModificationTime';
+{
+ * GetMediaTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaTimeScale(theMedia: Media): TimeScale; external name '_GetMediaTimeScale';
+{
+ * SetMediaTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMediaTimeScale(theMedia: Media; timeScale_: TimeScale); external name '_SetMediaTimeScale';
+{
+ * GetMediaDuration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaDuration(theMedia: Media): TimeValue; external name '_GetMediaDuration';
+{
+ * GetMediaLanguage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaLanguage(theMedia: Media): SInt16; external name '_GetMediaLanguage';
+{
+ * SetMediaLanguage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMediaLanguage(theMedia: Media; language: SInt16); external name '_SetMediaLanguage';
+{
+ * GetMediaQuality()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaQuality(theMedia: Media): SInt16; external name '_GetMediaQuality';
+{
+ * SetMediaQuality()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMediaQuality(theMedia: Media; quality: SInt16); external name '_SetMediaQuality';
+{
+ * GetMediaHandlerDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetMediaHandlerDescription(theMedia: Media; var mediaType: OSType; var creatorName: Str255; var creatorManufacturer: OSType); external name '_GetMediaHandlerDescription';
+{
+ * GetMediaUserData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaUserData(theMedia: Media): UserData; external name '_GetMediaUserData';
+{
+ * GetMediaInputMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaInputMap(theMedia: Media; var inputMap: QTAtomContainer): OSErr; external name '_GetMediaInputMap';
+{
+ * SetMediaInputMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetMediaInputMap(theMedia: Media; inputMap: QTAtomContainer): OSErr; external name '_SetMediaInputMap';
+{************************
+* Media Handler routines
+*************************}
+{
+ * GetMediaHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaHandler(theMedia: Media): MediaHandler; external name '_GetMediaHandler';
+{
+ * SetMediaHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetMediaHandler(theMedia: Media; mH: MediaHandlerComponent): OSErr; external name '_SetMediaHandler';
+{************************
+* Media's Data routines
+*************************}
+{
+ * BeginMediaEdits()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function BeginMediaEdits(theMedia: Media): OSErr; external name '_BeginMediaEdits';
+{
+ * EndMediaEdits()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function EndMediaEdits(theMedia: Media): OSErr; external name '_EndMediaEdits';
+{
+ * SetMediaDefaultDataRefIndex()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetMediaDefaultDataRefIndex(theMedia: Media; index: SInt16): OSErr; external name '_SetMediaDefaultDataRefIndex';
+{
+ * GetMediaDataHandlerDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetMediaDataHandlerDescription(theMedia: Media; index: SInt16; var dhType: OSType; var creatorName: Str255; var creatorManufacturer: OSType); external name '_GetMediaDataHandlerDescription';
+{
+ * GetMediaDataHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaDataHandler(theMedia: Media; index: SInt16): DataHandler; external name '_GetMediaDataHandler';
+{
+ * SetMediaDataHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetMediaDataHandler(theMedia: Media; index: SInt16; dataHandler: DataHandlerComponent): OSErr; external name '_SetMediaDataHandler';
+{
+ * GetDataHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetDataHandler(dataRef: Handle; dataHandlerSubType: OSType; flags: SInt32): Component; external name '_GetDataHandler';
+{
+ * OpenADataHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function OpenADataHandler(dataRef: Handle; dataHandlerSubType: OSType; anchorDataRef: Handle; anchorDataRefType: OSType; tb: TimeBase; flags: SInt32; var dh: ComponentInstance): OSErr; external name '_OpenADataHandler';
+{************************
+* Media Sample Table Routines
+*************************}
+{
+ * GetMediaSampleDescriptionCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaSampleDescriptionCount(theMedia: Media): SInt32; external name '_GetMediaSampleDescriptionCount';
+{
+ * GetMediaSampleDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetMediaSampleDescription(theMedia: Media; index: SInt32; descH: SampleDescriptionHandle); external name '_GetMediaSampleDescription';
+{
+ * SetMediaSampleDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetMediaSampleDescription(theMedia: Media; index: SInt32; descH: SampleDescriptionHandle): OSErr; external name '_SetMediaSampleDescription';
+{
+ * GetMediaSampleCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaSampleCount(theMedia: Media): SInt32; external name '_GetMediaSampleCount';
+{
+ * GetMediaSyncSampleCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaSyncSampleCount(theMedia: Media): SInt32; external name '_GetMediaSyncSampleCount';
+{
+ * SampleNumToMediaTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SampleNumToMediaTime(theMedia: Media; logicalSampleNum: SInt32; var sampleTime: TimeValue; var sampleDuration: TimeValue); external name '_SampleNumToMediaTime';
+{
+ * MediaTimeToSampleNum()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure MediaTimeToSampleNum(theMedia: Media; time: TimeValue; var sampleNum: SInt32; var sampleTime: TimeValue; var sampleDuration: TimeValue); external name '_MediaTimeToSampleNum';
+{
+ * AddMediaSample()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function AddMediaSample(theMedia: Media; dataIn: Handle; inOffset: SInt32; size: UInt32; durationPerSample: TimeValue; sampleDescriptionH: SampleDescriptionHandle; numberOfSamples: SInt32; sampleFlags: SInt16; var sampleTime: TimeValue): OSErr; external name '_AddMediaSample';
+{
+ * AddMediaSampleReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function AddMediaSampleReference(theMedia: Media; dataOffset: SInt32; size: UInt32; durationPerSample: TimeValue; sampleDescriptionH: SampleDescriptionHandle; numberOfSamples: SInt32; sampleFlags: SInt16; var sampleTime: TimeValue): OSErr; external name '_AddMediaSampleReference';
+{
+ * AddMediaSampleReferences()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function AddMediaSampleReferences(theMedia: Media; sampleDescriptionH: SampleDescriptionHandle; numberOfSamples: SInt32; sampleRefs: SampleReferencePtr; var sampleTime: TimeValue): OSErr; external name '_AddMediaSampleReferences';
+{
+ * AddMediaSampleReferences64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function AddMediaSampleReferences64(theMedia: Media; sampleDescriptionH: SampleDescriptionHandle; numberOfSamples: SInt32; sampleRefs: SampleReference64Ptr; var sampleTime: TimeValue): OSErr; external name '_AddMediaSampleReferences64';
+{
+ * GetMediaSample()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaSample(theMedia: Media; dataOut: Handle; maxSizeToGrow: SInt32; var size: SInt32; time: TimeValue; var sampleTime: TimeValue; var durationPerSample: TimeValue; sampleDescriptionH: SampleDescriptionHandle; var sampleDescriptionIndex: SInt32; maxNumberOfSamples: SInt32; var numberOfSamples: SInt32; var sampleFlags: SInt16): OSErr; external name '_GetMediaSample';
+{
+ * GetMediaSampleReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaSampleReference(theMedia: Media; var dataOffset: SInt32; var size: SInt32; time: TimeValue; var sampleTime: TimeValue; var durationPerSample: TimeValue; sampleDescriptionH: SampleDescriptionHandle; var sampleDescriptionIndex: SInt32; maxNumberOfSamples: SInt32; var numberOfSamples: SInt32; var sampleFlags: SInt16): OSErr; external name '_GetMediaSampleReference';
+{
+ * GetMediaSampleReferences()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaSampleReferences(theMedia: Media; time: TimeValue; var sampleTime: TimeValue; sampleDescriptionH: SampleDescriptionHandle; var sampleDescriptionIndex: SInt32; maxNumberOfEntries: SInt32; var actualNumberofEntries: SInt32; sampleRefs: SampleReferencePtr): OSErr; external name '_GetMediaSampleReferences';
+{
+ * GetMediaSampleReferences64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GetMediaSampleReferences64(theMedia: Media; time: TimeValue; var sampleTime: TimeValue; sampleDescriptionH: SampleDescriptionHandle; var sampleDescriptionIndex: SInt32; maxNumberOfEntries: SInt32; var actualNumberofEntries: SInt32; sampleRefs: SampleReference64Ptr): OSErr; external name '_GetMediaSampleReferences64';
+{
+ * SetMediaPreferredChunkSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetMediaPreferredChunkSize(theMedia: Media; maxChunkSize: SInt32): OSErr; external name '_SetMediaPreferredChunkSize';
+{
+ * GetMediaPreferredChunkSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaPreferredChunkSize(theMedia: Media; var maxChunkSize: SInt32): OSErr; external name '_GetMediaPreferredChunkSize';
+{
+ * SetMediaShadowSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetMediaShadowSync(theMedia: Media; frameDiffSampleNum: SInt32; syncSampleNum: SInt32): OSErr; external name '_SetMediaShadowSync';
+{
+ * GetMediaShadowSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaShadowSync(theMedia: Media; frameDiffSampleNum: SInt32; var syncSampleNum: SInt32): OSErr; external name '_GetMediaShadowSync';
+{************************
+* Editing Routines
+*************************}
+{
+ * InsertMediaIntoTrack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function InsertMediaIntoTrack(theTrack: Track; trackStart: TimeValue; mediaTime: TimeValue; mediaDuration: TimeValue; mediaRate: Fixed): OSErr; external name '_InsertMediaIntoTrack';
+{
+ * InsertTrackSegment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function InsertTrackSegment(srcTrack: Track; dstTrack: Track; srcIn: TimeValue; srcDuration: TimeValue; dstIn: TimeValue): OSErr; external name '_InsertTrackSegment';
+{
+ * InsertMovieSegment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function InsertMovieSegment(srcMovie: Movie; dstMovie: Movie; srcIn: TimeValue; srcDuration: TimeValue; dstIn: TimeValue): OSErr; external name '_InsertMovieSegment';
+{
+ * InsertEmptyTrackSegment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function InsertEmptyTrackSegment(dstTrack: Track; dstIn: TimeValue; dstDuration: TimeValue): OSErr; external name '_InsertEmptyTrackSegment';
+{
+ * InsertEmptyMovieSegment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function InsertEmptyMovieSegment(dstMovie: Movie; dstIn: TimeValue; dstDuration: TimeValue): OSErr; external name '_InsertEmptyMovieSegment';
+{
+ * DeleteTrackSegment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DeleteTrackSegment(theTrack: Track; startTime: TimeValue; duration: TimeValue): OSErr; external name '_DeleteTrackSegment';
+{
+ * DeleteMovieSegment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DeleteMovieSegment(theMovie: Movie; startTime: TimeValue; duration: TimeValue): OSErr; external name '_DeleteMovieSegment';
+{
+ * ScaleTrackSegment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ScaleTrackSegment(theTrack: Track; startTime: TimeValue; oldDuration: TimeValue; newDuration: TimeValue): OSErr; external name '_ScaleTrackSegment';
+{
+ * ScaleMovieSegment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ScaleMovieSegment(theMovie: Movie; startTime: TimeValue; oldDuration: TimeValue; newDuration: TimeValue): OSErr; external name '_ScaleMovieSegment';
+{************************
+* Hi-level Editing Routines
+*************************}
+{
+ * CutMovieSelection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CutMovieSelection(theMovie: Movie): Movie; external name '_CutMovieSelection';
+{
+ * CopyMovieSelection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CopyMovieSelection(theMovie: Movie): Movie; external name '_CopyMovieSelection';
+{
+ * PasteMovieSelection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure PasteMovieSelection(theMovie: Movie; src: Movie); external name '_PasteMovieSelection';
+{
+ * AddMovieSelection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure AddMovieSelection(theMovie: Movie; src: Movie); external name '_AddMovieSelection';
+{
+ * ClearMovieSelection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure ClearMovieSelection(theMovie: Movie); external name '_ClearMovieSelection';
+{
+ * PasteHandleIntoMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function PasteHandleIntoMovie(h: Handle; handleType: OSType; theMovie: Movie; flags: SInt32; userComp: ComponentInstance): OSErr; external name '_PasteHandleIntoMovie';
+{
+ * PutMovieIntoTypedHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function PutMovieIntoTypedHandle(theMovie: Movie; targetTrack: Track; handleType: OSType; publicMovie: Handle; start: TimeValue; dur: TimeValue; flags: SInt32; userComp: ComponentInstance): OSErr; external name '_PutMovieIntoTypedHandle';
+{
+ * IsScrapMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function IsScrapMovie(targetTrack: Track): Component; external name '_IsScrapMovie';
+{************************
+* Middle-level Editing Routines
+*************************}
+{
+ * CopyTrackSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CopyTrackSettings(srcTrack: Track; dstTrack: Track): OSErr; external name '_CopyTrackSettings';
+{
+ * CopyMovieSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CopyMovieSettings(srcMovie: Movie; dstMovie: Movie): OSErr; external name '_CopyMovieSettings';
+{
+ * AddEmptyTrackToMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function AddEmptyTrackToMovie(srcTrack: Track; dstMovie: Movie; dataRef: Handle; dataRefType: OSType; var dstTrack: Track): OSErr; external name '_AddEmptyTrackToMovie';
+const
+ kQTCloneShareSamples = $01;
+ kQTCloneDontCopyEdits = $02;
+
+ {
+ * AddClonedTrackToMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function AddClonedTrackToMovie(srcTrack: Track; dstMovie: Movie; flags: SInt32; var dstTrack: Track): OSErr; external name '_AddClonedTrackToMovie';
+{************************
+* movie & track edit state routines
+*************************}
+{
+ * NewMovieEditState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewMovieEditState(theMovie: Movie): MovieEditState; external name '_NewMovieEditState';
+{
+ * UseMovieEditState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function UseMovieEditState(theMovie: Movie; toState: MovieEditState): OSErr; external name '_UseMovieEditState';
+{
+ * DisposeMovieEditState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DisposeMovieEditState(state: MovieEditState): OSErr; external name '_DisposeMovieEditState';
+{
+ * NewTrackEditState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewTrackEditState(theTrack: Track): TrackEditState; external name '_NewTrackEditState';
+{
+ * UseTrackEditState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function UseTrackEditState(theTrack: Track; state: TrackEditState): OSErr; external name '_UseTrackEditState';
+{
+ * DisposeTrackEditState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DisposeTrackEditState(state: TrackEditState): OSErr; external name '_DisposeTrackEditState';
+{************************
+* track reference routines
+*************************}
+{
+ * AddTrackReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function AddTrackReference(theTrack: Track; refTrack: Track; refType: OSType; var addedIndex: SInt32): OSErr; external name '_AddTrackReference';
+{
+ * DeleteTrackReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DeleteTrackReference(theTrack: Track; refType: OSType; index: SInt32): OSErr; external name '_DeleteTrackReference';
+{
+ * SetTrackReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetTrackReference(theTrack: Track; refTrack: Track; refType: OSType; index: SInt32): OSErr; external name '_SetTrackReference';
+{
+ * GetTrackReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackReference(theTrack: Track; refType: OSType; index: SInt32): Track; external name '_GetTrackReference';
+{
+ * GetNextTrackReferenceType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetNextTrackReferenceType(theTrack: Track; refType: OSType): SInt32; external name '_GetNextTrackReferenceType';
+{
+ * GetTrackReferenceCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackReferenceCount(theTrack: Track; refType: OSType): SInt32; external name '_GetTrackReferenceCount';
+{************************
+* high level file conversion routines
+*************************}
+{
+ * ConvertFileToMovieFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ConvertFileToMovieFile(const (*var*) inputFile: FSSpec; const (*var*) outputFile: FSSpec; creator: OSType; scriptTag: ScriptCode; var resID: SInt16; flags: SInt32; userComp: ComponentInstance; proc: MovieProgressUPP; refCon: SInt32): OSErr; external name '_ConvertFileToMovieFile';
+{
+ * ConvertMovieToFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ConvertMovieToFile(theMovie: Movie; onlyTrack: Track; var outputFile: FSSpec; fileType: OSType; creator: OSType; scriptTag: ScriptCode; var resID: SInt16; flags: SInt32; userComp: ComponentInstance): OSErr; external name '_ConvertMovieToFile';
+const
+ kGetMovieImporterValidateToFind = $00000001;
+ kGetMovieImporterAllowNewFile = $00000002;
+ kGetMovieImporterDontConsiderGraphicsImporters = $00000004;
+ kGetMovieImporterDontConsiderFileOnlyImporters = $00000040;
+ kGetMovieImporterAutoImportOnly = $00000400; { reject aggressive movie importers which have dontAutoFileMovieImport set }
+
+ {
+ * GetMovieImporterForDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieImporterForDataRef(dataRefType: OSType; dataRef: Handle; flags: SInt32; var importer: Component): OSErr; external name '_GetMovieImporterForDataRef';
+const
+ kQTGetMIMETypeInfoIsQuickTimeMovieType = $6D6F6F76 (* 'moov' *); { info is a pointer to a Boolean }
+ kQTGetMIMETypeInfoIsUnhelpfulType = $64756D62 (* 'dumb' *); { info is a pointer to a Boolean }
+
+ {
+ * QTGetMIMETypeInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function QTGetMIMETypeInfo(mimeStringStart: ConstCStringPtr; mimeStringLength: SInt16; infoSelector: OSType; infoDataPtr: UnivPtr; var infoDataSize: SInt32): OSErr; external name '_QTGetMIMETypeInfo';
+{************************
+* Movie Timebase Conversion Routines
+*************************}
+{
+ * TrackTimeToMediaTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TrackTimeToMediaTime(value: TimeValue; theTrack: Track): TimeValue; external name '_TrackTimeToMediaTime';
+{
+ * GetTrackEditRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackEditRate(theTrack: Track; atTime: TimeValue): Fixed; external name '_GetTrackEditRate';
+{************************
+* Miscellaneous Routines
+*************************}
+
+{
+ * GetMovieDataSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieDataSize(theMovie: Movie; startTime: TimeValue; duration: TimeValue): SInt32; external name '_GetMovieDataSize';
+{
+ * GetMovieDataSize64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GetMovieDataSize64(theMovie: Movie; startTime: TimeValue; duration: TimeValue; var dataSize: wide): OSErr; external name '_GetMovieDataSize64';
+{
+ * GetTrackDataSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackDataSize(theTrack: Track; startTime: TimeValue; duration: TimeValue): SInt32; external name '_GetTrackDataSize';
+{
+ * GetTrackDataSize64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GetTrackDataSize64(theTrack: Track; startTime: TimeValue; duration: TimeValue; var dataSize: wide): OSErr; external name '_GetTrackDataSize64';
+{
+ * GetMediaDataSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaDataSize(theMedia: Media; startTime: TimeValue; duration: TimeValue): SInt32; external name '_GetMediaDataSize';
+{
+ * GetMediaDataSize64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function GetMediaDataSize64(theMedia: Media; startTime: TimeValue; duration: TimeValue; var dataSize: wide): OSErr; external name '_GetMediaDataSize64';
+{
+ * PtInMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function PtInMovie(theMovie: Movie; pt: Point): boolean; external name '_PtInMovie';
+{
+ * PtInTrack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function PtInTrack(theTrack: Track; pt: Point): boolean; external name '_PtInTrack';
+{************************
+* Group Selection Routines
+*************************}
+
+{
+ * SetMovieLanguage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieLanguage(theMovie: Movie; language: SInt32); external name '_SetMovieLanguage';
+{************************
+* User Data
+*************************}
+
+{
+ * GetUserData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetUserData(theUserData: UserData; data: Handle; udType: OSType; index: SInt32): OSErr; external name '_GetUserData';
+{
+ * AddUserData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function AddUserData(theUserData: UserData; data: Handle; udType: OSType): OSErr; external name '_AddUserData';
+{
+ * RemoveUserData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function RemoveUserData(theUserData: UserData; udType: OSType; index: SInt32): OSErr; external name '_RemoveUserData';
+{
+ * CountUserDataType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CountUserDataType(theUserData: UserData; udType: OSType): SInt16; external name '_CountUserDataType';
+{
+ * GetNextUserDataType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetNextUserDataType(theUserData: UserData; udType: OSType): SInt32; external name '_GetNextUserDataType';
+{
+ * GetUserDataItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetUserDataItem(theUserData: UserData; data: UnivPtr; size: SInt32; udType: OSType; index: SInt32): OSErr; external name '_GetUserDataItem';
+{
+ * SetUserDataItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetUserDataItem(theUserData: UserData; data: UnivPtr; size: SInt32; udType: OSType; index: SInt32): OSErr; external name '_SetUserDataItem';
+{
+ * AddUserDataText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function AddUserDataText(theUserData: UserData; data: Handle; udType: OSType; index: SInt32; itlRegionTag: SInt16): OSErr; external name '_AddUserDataText';
+{
+ * GetUserDataText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetUserDataText(theUserData: UserData; data: Handle; udType: OSType; index: SInt32; itlRegionTag: SInt16): OSErr; external name '_GetUserDataText';
+{
+ * RemoveUserDataText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function RemoveUserDataText(theUserData: UserData; udType: OSType; index: SInt32; itlRegionTag: SInt16): OSErr; external name '_RemoveUserDataText';
+{
+ * NewUserData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewUserData(var theUserData: UserData): OSErr; external name '_NewUserData';
+{
+ * DisposeUserData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DisposeUserData(theUserData: UserData): OSErr; external name '_DisposeUserData';
+{
+ * NewUserDataFromHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewUserDataFromHandle(h: Handle; var theUserData: UserData): OSErr; external name '_NewUserDataFromHandle';
+{
+ * PutUserDataIntoHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function PutUserDataIntoHandle(theUserData: UserData; h: Handle): OSErr; external name '_PutUserDataIntoHandle';
+const
+ kQTCopyUserDataReplace = $72706C63 (* 'rplc' *); { Delete all destination user data items and then add source user data items }
+ kQTCopyUserDataMerge = $6D657267 (* 'merg' *); { Add source user data items to destination user data }
+
+ {
+ * CopyMovieUserData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function CopyMovieUserData(srcMovie: Movie; dstMovie: Movie; copyRule: OSType): OSErr; external name '_CopyMovieUserData';
+{
+ * CopyTrackUserData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function CopyTrackUserData(srcTrack: Track; dstTrack: Track; copyRule: OSType): OSErr; external name '_CopyTrackUserData';
+{
+ * CopyMediaUserData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function CopyMediaUserData(srcMedia: Media; dstMedia: Media; copyRule: OSType): OSErr; external name '_CopyMediaUserData';
+{
+ * CopyUserData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function CopyUserData(srcUserData: UserData; dstUserData: UserData; copyRule: OSType): OSErr; external name '_CopyUserData';
+{
+ * SetMoviePropertyAtom()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function SetMoviePropertyAtom(theMovie: Movie; propertyAtom: QTAtomContainer): OSErr; external name '_SetMoviePropertyAtom';
+{
+ * GetMoviePropertyAtom()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function GetMoviePropertyAtom(theMovie: Movie; var propertyAtom: QTAtomContainer): OSErr; external name '_GetMoviePropertyAtom';
+{
+ * GetMediaNextInterestingTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetMediaNextInterestingTime(theMedia: Media; interestingTimeFlags: SInt16; time: TimeValue; rate: Fixed; var interestingTime: TimeValue; var interestingDuration: TimeValue); external name '_GetMediaNextInterestingTime';
+{
+ * GetTrackNextInterestingTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetTrackNextInterestingTime(theTrack: Track; interestingTimeFlags: SInt16; time: TimeValue; rate: Fixed; var interestingTime: TimeValue; var interestingDuration: TimeValue); external name '_GetTrackNextInterestingTime';
+{
+ * GetMovieNextInterestingTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetMovieNextInterestingTime(theMovie: Movie; interestingTimeFlags: SInt16; numMediaTypes: SInt16; whichMediaTypes: OSTypePtr; time: TimeValue; rate: Fixed; var interestingTime: TimeValue; var interestingDuration: TimeValue); external name '_GetMovieNextInterestingTime';
+{
+ * CreateMovieFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CreateMovieFile(const (*var*) fileSpec: FSSpec; creator: OSType; scriptTag: ScriptCode; createMovieFileFlags: UInt32; var resRefNum: SInt16; var newmovie: Movie): OSErr; external name '_CreateMovieFile';
+{
+ * OpenMovieFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function OpenMovieFile(const (*var*) fileSpec: FSSpec; var resRefNum: SInt16; permission: SInt8): OSErr; external name '_OpenMovieFile';
+{
+ * CloseMovieFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CloseMovieFile(resRefNum: SInt16): OSErr; external name '_CloseMovieFile';
+{
+ * DeleteMovieFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DeleteMovieFile(const (*var*) fileSpec: FSSpec): OSErr; external name '_DeleteMovieFile';
+{
+ * NewMovieFromFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewMovieFromFile(var theMovie: Movie; resRefNum: SInt16; resId: SInt16Ptr; resName: StringPtr; newMovieFlags: SInt16; dataRefWasChanged: BooleanPtr): OSErr; external name '_NewMovieFromFile';
+{
+ * NewMovieFromHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewMovieFromHandle(var theMovie: Movie; h: Handle; newMovieFlags: SInt16; var dataRefWasChanged: boolean): OSErr; external name '_NewMovieFromHandle';
+{
+ * NewMovieFromDataFork()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewMovieFromDataFork(var theMovie: Movie; fRefNum: SInt16; fileOffset: SInt32; newMovieFlags: SInt16; var dataRefWasChanged: boolean): OSErr; external name '_NewMovieFromDataFork';
+{
+ * NewMovieFromDataFork64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function NewMovieFromDataFork64(var theMovie: Movie; fRefNum: SInt32; const (*var*) fileOffset: wide; newMovieFlags: SInt16; var dataRefWasChanged: boolean): OSErr; external name '_NewMovieFromDataFork64';
+{
+ * NewMovieFromUserProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewMovieFromUserProc(var m: Movie; flags: SInt16; var dataRefWasChanged: boolean; getProc: GetMovieUPP; refCon: UnivPtr; defaultDataRef: Handle; dataRefType: OSType): OSErr; external name '_NewMovieFromUserProc';
+{
+ * NewMovieFromDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewMovieFromDataRef(var m: Movie; flags: SInt16; var id: SInt16; dataRef: Handle; dtaRefType: OSType): OSErr; external name '_NewMovieFromDataRef';
+{
+ * NewMovieFromStorageOffset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function NewMovieFromStorageOffset(var theMovie: Movie; dh: DataHandler; const (*var*) fileOffset: wide; newMovieFlags: SInt16; var dataRefWasCataRefType: boolean): OSErr; external name '_NewMovieFromStorageOffset';
+{
+ * NewMovieForDataRefFromHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function NewMovieForDataRefFromHandle(var theMovie: Movie; h: Handle; newMovieFlags: SInt16; var dataRefWasChanged: boolean; dataRef: Handle; dataRefType: OSType): OSErr; external name '_NewMovieForDataRefFromHandle';
+{
+ * AddMovieResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function AddMovieResource(theMovie: Movie; resRefNum: SInt16; var resId: SInt16; const (*var*) resName: Str255): OSErr; external name '_AddMovieResource';
+{
+ * UpdateMovieResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function UpdateMovieResource(theMovie: Movie; resRefNum: SInt16; resId: SInt16; const (*var*) resName: Str255): OSErr; external name '_UpdateMovieResource';
+{
+ * RemoveMovieResource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function RemoveMovieResource(resRefNum: SInt16; resId: SInt16): OSErr; external name '_RemoveMovieResource';
+{
+ * CreateMovieStorage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function CreateMovieStorage(dataRef: Handle; dataRefType: OSType; creator: OSType; scriptTag: ScriptCode; createMovieFileFlags: SInt32; var outDataHandler: DataHandler; var newmovie: Movie): OSErr; external name '_CreateMovieStorage';
+{
+ * OpenMovieStorage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function OpenMovieStorage(dataRef: Handle; dataRefType: OSType; flags: SInt32; var outDataHandler: DataHandler): OSErr; external name '_OpenMovieStorage';
+{
+ * CloseMovieStorage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function CloseMovieStorage(dh: DataHandler): OSErr; external name '_CloseMovieStorage';
+{
+ * DeleteMovieStorage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function DeleteMovieStorage(dataRef: Handle; dataRefType: OSType): OSErr; external name '_DeleteMovieStorage';
+{
+ * AddMovieToStorage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function AddMovieToStorage(theMovie: Movie; dh: DataHandler): OSErr; external name '_AddMovieToStorage';
+{
+ * UpdateMovieInStorage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function UpdateMovieInStorage(theMovie: Movie; dh: DataHandler): OSErr; external name '_UpdateMovieInStorage';
+{
+ * HasMovieChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function HasMovieChanged(theMovie: Movie): boolean; external name '_HasMovieChanged';
+{
+ * ClearMovieChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure ClearMovieChanged(theMovie: Movie); external name '_ClearMovieChanged';
+{
+ * SetMovieDefaultDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetMovieDefaultDataRef(theMovie: Movie; dataRef: Handle; dataRefType: OSType): OSErr; external name '_SetMovieDefaultDataRef';
+{
+ * GetMovieDefaultDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieDefaultDataRef(theMovie: Movie; var dataRef: Handle; var dataRefType: OSType): OSErr; external name '_GetMovieDefaultDataRef';
+{
+ * SetMovieAnchorDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function SetMovieAnchorDataRef(theMovie: Movie; dataRef: Handle; dataRefType: OSType): OSErr; external name '_SetMovieAnchorDataRef';
+{
+ * GetMovieAnchorDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function GetMovieAnchorDataRef(theMovie: Movie; var dataRef: Handle; var dataRefType: OSType; var outFlags: SInt32): OSErr; external name '_GetMovieAnchorDataRef';
+{
+ * SetMovieColorTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetMovieColorTable(theMovie: Movie; ctab: CTabHandle): OSErr; external name '_SetMovieColorTable';
+{
+ * GetMovieColorTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieColorTable(theMovie: Movie; var ctab: CTabHandle): OSErr; external name '_GetMovieColorTable';
+{
+ * FlattenMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure FlattenMovie(theMovie: Movie; movieFlattenFlags: SInt32; const (*var*) theFile: FSSpec; creator: OSType; scriptTag: ScriptCode; createMovieFileFlags: SInt32; var resId: SInt16; const (*var*) resName: Str255); external name '_FlattenMovie';
+{
+ * FlattenMovieData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function FlattenMovieData(theMovie: Movie; movieFlattenFlags: SInt32; const (*var*) theFile: FSSpec; creator: OSType; scriptTag: ScriptCode; createMovieFileFlags: SInt32): Movie; external name '_FlattenMovieData';
+{
+ * FlattenMovieDataToDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function FlattenMovieDataToDataRef(theMovie: Movie; movieFlattenFlags: SInt32; dataRef: Handle; dataRefType: OSType; creator: OSType; scriptTag: ScriptCode; createMovieFileFlags: SInt32): Movie; external name '_FlattenMovieDataToDataRef';
+{
+ * SetMovieProgressProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieProgressProc(theMovie: Movie; p: MovieProgressUPP; refcon: SInt32); external name '_SetMovieProgressProc';
+{
+ * GetMovieProgressProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+procedure GetMovieProgressProc(theMovie: Movie; var p: MovieProgressUPP; var refcon: SInt32); external name '_GetMovieProgressProc';
+{
+ * CreateShortcutMovieFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function CreateShortcutMovieFile(const (*var*) fileSpec: FSSpec; creator: OSType; scriptTag: ScriptCode; createMovieFileFlags: SInt32; targetDataRef: Handle; targetDataRefType: OSType): OSErr; external name '_CreateShortcutMovieFile';
+{
+ * MovieSearchText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieSearchText(theMovie: Movie; text: Ptr; size: SInt32; searchFlags: SInt32; var searchTrack: Track; var searchTime: TimeValue; var searchOffset: SInt32): OSErr; external name '_MovieSearchText';
+{
+ * GetPosterBox()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetPosterBox(theMovie: Movie; var boxRect: Rect); external name '_GetPosterBox';
+{
+ * SetPosterBox()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetPosterBox(theMovie: Movie; const (*var*) boxRect: Rect); external name '_SetPosterBox';
+{
+ * GetMovieSegmentDisplayBoundsRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieSegmentDisplayBoundsRgn(theMovie: Movie; time: TimeValue; duration: TimeValue): RgnHandle; external name '_GetMovieSegmentDisplayBoundsRgn';
+{
+ * GetTrackSegmentDisplayBoundsRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackSegmentDisplayBoundsRgn(theTrack: Track; time: TimeValue; duration: TimeValue): RgnHandle; external name '_GetTrackSegmentDisplayBoundsRgn';
+{
+ * SetMovieCoverProcs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMovieCoverProcs(theMovie: Movie; uncoverProc: MovieRgnCoverUPP; coverProc: MovieRgnCoverUPP; refcon: SInt32); external name '_SetMovieCoverProcs';
+{
+ * GetMovieCoverProcs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieCoverProcs(theMovie: Movie; var uncoverProc: MovieRgnCoverUPP; var coverProc: MovieRgnCoverUPP; var refcon: SInt32): OSErr; external name '_GetMovieCoverProcs';
+{
+ * GetTrackStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTrackStatus(theTrack: Track): ComponentResult; external name '_GetTrackStatus';
+{
+ * GetMovieStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMovieStatus(theMovie: Movie; var firstProblemTrack: Track): ComponentResult; external name '_GetMovieStatus';
+const
+ kMovieLoadStateError = -1;
+ kMovieLoadStateLoading = 1000;
+ kMovieLoadStateLoaded = 2000;
+ kMovieLoadStatePlayable = 10000;
+ kMovieLoadStatePlaythroughOK = 20000;
+ kMovieLoadStateComplete = 100000;
+
+ {
+ * GetMovieLoadState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function GetMovieLoadState(theMovie: Movie): SInt32; external name '_GetMovieLoadState';
+{ Input flags for CanQuickTimeOpenFile/DataRef }
+
+const
+ kQTDontUseDataToFindImporter = $00000001;
+ kQTDontLookForMovieImporterIfGraphicsImporterFound = $00000002;
+ kQTAllowOpeningStillImagesAsMovies = $00000004;
+ kQTAllowImportersThatWouldCreateNewFile = $00000008;
+ kQTAllowAggressiveImporters = $00000010; { eg, TEXT and PICT movie importers }
+
+ { Determines whether the file could be opened using a graphics importer or opened in place as a movie. }
+ {
+ * CanQuickTimeOpenFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function CanQuickTimeOpenFile(fileSpec: FSSpecPtr; fileType: OSType; fileNameExtension: OSType; var outCanOpenWithGraphicsImporter: boolean; var outCanOpenAsMovie: boolean; var outPreferGraphicsImporter: boolean; inFlags: UInt32): OSErr; external name '_CanQuickTimeOpenFile';
+{ Determines whether the file could be opened using a graphics importer or opened in place as a movie. }
+{
+ * CanQuickTimeOpenDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function CanQuickTimeOpenDataRef(dataRef: Handle; dataRefType: OSType; var outCanOpenWithGraphicsImporter: boolean; var outCanOpenAsMovie: boolean; var outPreferGraphicsImporter: boolean; inFlags: UInt32): OSErr; external name '_CanQuickTimeOpenDataRef';
+{***
+ Movie Controller support routines
+***}
+{
+ * NewMovieController()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewMovieController(theMovie: Movie; const (*var*) movieRect: Rect; someFlags: SInt32): ComponentInstance; external name '_NewMovieController';
+{
+ * DisposeMovieController()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure DisposeMovieController(mc: ComponentInstance); external name '_DisposeMovieController';
+{
+ * ShowMovieInformation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure ShowMovieInformation(theMovie: Movie; filterProc: ModalFilterUPP; refCon: SInt32); external name '_ShowMovieInformation';
+{****
+ Scrap routines
+****}
+{
+ * PutMovieOnScrap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function PutMovieOnScrap(theMovie: Movie; movieScrapFlags: SInt32): OSErr; external name '_PutMovieOnScrap';
+{
+ * NewMovieFromScrap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewMovieFromScrap(newMovieFlags: SInt32): Movie; external name '_NewMovieFromScrap';
+{****
+ DataRef routines
+****}
+
+{
+ * GetMediaDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaDataRef(theMedia: Media; index: SInt16; var dataRef: Handle; var dataRefType: OSType; var dataRefAttributes: SInt32): OSErr; external name '_GetMediaDataRef';
+{
+ * SetMediaDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetMediaDataRef(theMedia: Media; index: SInt16; dataRef: Handle; dataRefType: OSType): OSErr; external name '_SetMediaDataRef';
+{
+ * SetMediaDataRefAttributes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetMediaDataRefAttributes(theMedia: Media; index: SInt16; dataRefAttributes: SInt32): OSErr; external name '_SetMediaDataRefAttributes';
+{
+ * AddMediaDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function AddMediaDataRef(theMedia: Media; var index: SInt16; dataRef: Handle; dataRefType: OSType): OSErr; external name '_AddMediaDataRef';
+{
+ * GetMediaDataRefCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaDataRefCount(theMedia: Media; var count: SInt16): OSErr; external name '_GetMediaDataRefCount';
+{
+ * QTNewAlias()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTNewAlias(const (*var*) fss: FSSpec; var alias: AliasHandle; minimal: boolean): OSErr; external name '_QTNewAlias';
+{****
+ Playback hint routines
+****}
+{
+ * SetMoviePlayHints()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMoviePlayHints(theMovie: Movie; flags: SInt32; flagsMask: SInt32); external name '_SetMoviePlayHints';
+{
+ * SetMediaPlayHints()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetMediaPlayHints(theMedia: Media; flags: SInt32; flagsMask: SInt32); external name '_SetMediaPlayHints';
+{
+ * GetMediaPlayHints()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetMediaPlayHints(theMedia: Media; var flags: SInt32); external name '_GetMediaPlayHints';
+{****
+ Load time track hints
+****}
+
+const
+ preloadAlways = $00000001;
+ preloadOnlyIfEnabled = $00000002;
+
+ {
+ * SetTrackLoadSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTrackLoadSettings(theTrack: Track; preloadTime: TimeValue; preloadDuration: TimeValue; preloadFlags: SInt32; defaultHints: SInt32); external name '_SetTrackLoadSettings';
+{
+ * GetTrackLoadSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure GetTrackLoadSettings(theTrack: Track; var preloadTime: TimeValue; var preloadDuration: TimeValue; var preloadFlags: SInt32; var defaultHints: SInt32); external name '_GetTrackLoadSettings';
+{****
+ Big screen TV
+****}
+
+const
+ fullScreenHideCursor = $00000001;
+ fullScreenAllowEvents = $00000002;
+ fullScreenDontChangeMenuBar = $00000004;
+ fullScreenPreflightSize = $00000008;
+
+ {
+ * BeginFullScreen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function BeginFullScreen(var restoreState: Ptr; whichGD: GDHandle; var desiredWidth: SInt16; var desiredHeight: SInt16; var newWindow: WindowRef; var eraseColor: RGBColor; flags: SInt32): OSErr; external name '_BeginFullScreen';
+{
+ * EndFullScreen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function EndFullScreen(fullState: Ptr; flags: SInt32): OSErr; external name '_EndFullScreen';
+{****
+ Wired Actions
+****}
+{ flags for MovieExecuteWiredActions }
+
+const
+ movieExecuteWiredActionDontExecute = $00000001;
+
+ {
+ * AddMovieExecuteWiredActionsProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function AddMovieExecuteWiredActionsProc(theMovie: Movie; proc: MovieExecuteWiredActionsUPP; refCon: UnivPtr): OSErr; external name '_AddMovieExecuteWiredActionsProc';
+{
+ * RemoveMovieExecuteWiredActionsProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function RemoveMovieExecuteWiredActionsProc(theMovie: Movie; proc: MovieExecuteWiredActionsUPP; refCon: UnivPtr): OSErr; external name '_RemoveMovieExecuteWiredActionsProc';
+{
+ * MovieExecuteWiredActions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MovieExecuteWiredActions(theMovie: Movie; flags: SInt32; actions: QTAtomContainer): OSErr; external name '_MovieExecuteWiredActions';
+{****
+ Keyboard Navigation/Editable Text Field Support
+****}
+{
+ Navigation Direction Constants
+ for MediaNavigateTargetRefCon
+}
+
+const
+ kRefConNavigationNext = 0;
+ kRefConNavigationPrevious = 1;
+
+ {
+ Refcon Properties
+ for MediaRefConGetProerty/MediaRefConSetProperty
+ }
+ kRefConPropertyCanHaveFocus = 1; { Boolean }
+ kRefConPropertyHasFocus = 2; { Boolean }
+
+ { media properties }
+ kTrackFocusCanEditFlag = $6B656474 (* 'kedt' *);
+ kTrackDefaultFocusFlags = $6B666F63 (* 'kfoc' *);
+ kTrackFocusDefaultRefcon = $6B726566 (* 'kref' *);
+
+ { focus flags }
+ kTrackFocusOn = 1;
+ kTrackHandlesTabs = 2; { this is reserved for a future release }
+
+ { ****
+ Flash track properties
+ **** }
+ kFlashTrackPropertyAcceptAllClicks = $636C696B (* 'clik' *); { type of media property atom; data is a Boolean }
+
+ { ****
+ Sprite Toolbox
+ **** }
+ kBackgroundSpriteLayerNum = 32767;
+
+
+ { Sprite Properties }
+ kSpritePropertyMatrix = 1;
+ kSpritePropertyImageDescription = 2;
+ kSpritePropertyImageDataPtr = 3;
+ kSpritePropertyVisible = 4;
+ kSpritePropertyLayer = 5;
+ kSpritePropertyGraphicsMode = 6;
+ kSpritePropertyImageDataSize = 7;
+ kSpritePropertyActionHandlingSpriteID = 8;
+ kSpritePropertyCanBeHitTested = 9;
+ kSpritePropertyImageIndex = 100;
+ kSpriteTrackPropertyBackgroundColor = 101;
+ kSpriteTrackPropertyOffscreenBitDepth = 102;
+ kSpriteTrackPropertySampleFormat = 103;
+ kSpriteTrackPropertyScaleSpritesToScaleWorld = 104;
+ kSpriteTrackPropertyHasActions = 105;
+ kSpriteTrackPropertyVisible = 106;
+ kSpriteTrackPropertyQTIdleEventsFrequency = 107;
+ kSpriteTrackPropertyAllSpritesHitTestingMode = 108;
+ kSpriteTrackPropertyPreferredDepthInterpretationMode = 109;
+ kSpriteImagePropertyRegistrationPoint = 1000;
+ kSpriteImagePropertyGroupID = 1001;
+
+ { values for kSpriteTrackPropertyPreferredDepthInterpretationMode }
+ kSpriteTrackPreferredDepthCompatibilityMode = 0;
+ kSpriteTrackPreferredDepthModernMode = 1;
+
+ { values for kSpriteTrackPropertyAllSpritesHitTestingMode }
+ kSpriteHitTestUseSpritesOwnPropertiesMode = 0;
+ kSpriteHitTestTreatAllSpritesAsHitTestableMode = 1;
+ kSpriteHitTestTreatAllSpritesAsNotHitTestableMode = 2;
+
+ { special value for kSpriteTrackPropertyQTIdleEventsFrequency (the default) }
+ kNoQTIdleEvents = -1;
+
+ { GetSpriteProperties for accessing invalid SpriteWorldRegion }
+ kGetSpriteWorldInvalidRegionAndLeaveIntact = -1;
+ kGetSpriteWorldInvalidRegionAndThenSetEmpty = -2;
+
+ { flagsIn for SpriteWorldIdle }
+ kOnlyDrawToSpriteWorld = $00000001;
+ kSpriteWorldPreflight = $00000002;
+
+ { flagsOut for SpriteWorldIdle }
+ kSpriteWorldDidDraw = $00000001;
+ kSpriteWorldNeedsToDraw = $00000002;
+
+ { flags for sprite track sample format }
+ kKeyFrameAndSingleOverride = $00000002;
+ kKeyFrameAndAllOverrides = $00000004;
+
+ { sprite world flags }
+ kScaleSpritesToScaleWorld = $00000002;
+ kSpriteWorldHighQuality = $00000004;
+ kSpriteWorldDontAutoInvalidate = $00000008;
+ kSpriteWorldInvisible = $00000010;
+ kSpriteWorldDirtyInsteadOfFlush = $00000020;
+
+ {
+ * NewSpriteWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewSpriteWorld(var newSpriteWorld: SpriteWorld; destination: GWorldPtr; spriteLayer: GWorldPtr; var backgroundColor: RGBColor; background: GWorldPtr): OSErr; external name '_NewSpriteWorld';
+{
+ * DisposeSpriteWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure DisposeSpriteWorld(theSpriteWorld: SpriteWorld); external name '_DisposeSpriteWorld';
+{
+ * SetSpriteWorldClip()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetSpriteWorldClip(theSpriteWorld: SpriteWorld; clipRgn: RgnHandle): OSErr; external name '_SetSpriteWorldClip';
+{
+ * SetSpriteWorldMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetSpriteWorldMatrix(theSpriteWorld: SpriteWorld; const (*var*) matrix: MatrixRecord): OSErr; external name '_SetSpriteWorldMatrix';
+{
+ * SetSpriteWorldGraphicsMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetSpriteWorldGraphicsMode(theSpriteWorld: SpriteWorld; mode: SInt32; const (*var*) opColor: RGBColor): OSErr; external name '_SetSpriteWorldGraphicsMode';
+{
+ * SpriteWorldIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteWorldIdle(theSpriteWorld: SpriteWorld; flagsIn: SInt32; var flagsOut: SInt32): OSErr; external name '_SpriteWorldIdle';
+{
+ * InvalidateSpriteWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function InvalidateSpriteWorld(theSpriteWorld: SpriteWorld; var invalidArea: Rect): OSErr; external name '_InvalidateSpriteWorld';
+{
+ * SpriteWorldHitTest()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteWorldHitTest(theSpriteWorld: SpriteWorld; flags: SInt32; loc: Point; var spriteHit: Sprite): OSErr; external name '_SpriteWorldHitTest';
+{
+ * SpriteHitTest()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteHitTest(theSprite: Sprite; flags: SInt32; loc: Point; var wasHit: boolean): OSErr; external name '_SpriteHitTest';
+{
+ * DisposeAllSprites()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure DisposeAllSprites(theSpriteWorld: SpriteWorld); external name '_DisposeAllSprites';
+{
+ * SetSpriteWorldFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetSpriteWorldFlags(spriteWorld_: SpriteWorld; flags: SInt32; flagsMask: SInt32): OSErr; external name '_SetSpriteWorldFlags';
+{
+ * NewSprite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewSprite(var newSprite: Sprite; itsSpriteWorld: SpriteWorld; idh: ImageDescriptionHandle; imageDataPtr: Ptr; var matrix: MatrixRecord; visible: boolean; layer: SInt16): OSErr; external name '_NewSprite';
+{
+ * DisposeSprite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure DisposeSprite(theSprite: Sprite); external name '_DisposeSprite';
+{
+ * InvalidateSprite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure InvalidateSprite(theSprite: Sprite); external name '_InvalidateSprite';
+{
+ * SetSpriteProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetSpriteProperty(theSprite: Sprite; propertyType: SInt32; propertyValue: UnivPtr): OSErr; external name '_SetSpriteProperty';
+{
+ * GetSpriteProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetSpriteProperty(theSprite: Sprite; propertyType: SInt32; propertyValue: UnivPtr): OSErr; external name '_GetSpriteProperty';
+{****
+ QT Atom Data Support
+****}
+
+const
+ kParentAtomIsContainer = 0;
+
+ { create and dispose QTAtomContainer objects }
+
+ {
+ * QTNewAtomContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTNewAtomContainer(var atomData: QTAtomContainer): OSErr; external name '_QTNewAtomContainer';
+{
+ * QTDisposeAtomContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTDisposeAtomContainer(atomData: QTAtomContainer): OSErr; external name '_QTDisposeAtomContainer';
+{ locating nested atoms within QTAtomContainer container }
+
+{
+ * QTGetNextChildType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTGetNextChildType(container: QTAtomContainer; parentAtom: QTAtom; currentChildType: QTAtomType): QTAtomType; external name '_QTGetNextChildType';
+{
+ * QTCountChildrenOfType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTCountChildrenOfType(container: QTAtomContainer; parentAtom: QTAtom; childType: QTAtomType): SInt16; external name '_QTCountChildrenOfType';
+{
+ * QTFindChildByIndex()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTFindChildByIndex(container: QTAtomContainer; parentAtom: QTAtom; atomType: QTAtomType; index: SInt16; var id: QTAtomID): QTAtom; external name '_QTFindChildByIndex';
+{
+ * QTFindChildByID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTFindChildByID(container: QTAtomContainer; parentAtom: QTAtom; atomType: QTAtomType; id: QTAtomID; var index: SInt16): QTAtom; external name '_QTFindChildByID';
+{
+ * QTNextChildAnyType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTNextChildAnyType(container: QTAtomContainer; parentAtom: QTAtom; currentChild: QTAtom; var nextChild: QTAtom): OSErr; external name '_QTNextChildAnyType';
+{ set a leaf atom's data }
+{
+ * QTSetAtomData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTSetAtomData(container: QTAtomContainer; atom: QTAtom; dataSize: SInt32; atomData: UnivPtr): OSErr; external name '_QTSetAtomData';
+{ extracting data }
+{
+ * QTCopyAtomDataToHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTCopyAtomDataToHandle(container: QTAtomContainer; atom: QTAtom; targetHandle: Handle): OSErr; external name '_QTCopyAtomDataToHandle';
+{
+ * QTCopyAtomDataToPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTCopyAtomDataToPtr(container: QTAtomContainer; atom: QTAtom; sizeOrLessOK: boolean; size: SInt32; targetPtr: UnivPtr; var actualSize: SInt32): OSErr; external name '_QTCopyAtomDataToPtr';
+{
+ * QTGetAtomTypeAndID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTGetAtomTypeAndID(container: QTAtomContainer; atom: QTAtom; var atomType: QTAtomType; var id: QTAtomID): OSErr; external name '_QTGetAtomTypeAndID';
+{ extract a copy of an atom and all of it's children, caller disposes }
+{
+ * QTCopyAtom()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTCopyAtom(container: QTAtomContainer; atom: QTAtom; var targetContainer: QTAtomContainer): OSErr; external name '_QTCopyAtom';
+{ obtaining direct reference to atom data }
+{
+ * QTLockContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTLockContainer(container: QTAtomContainer): OSErr; external name '_QTLockContainer';
+{
+ * QTGetAtomDataPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTGetAtomDataPtr(container: QTAtomContainer; atom: QTAtom; var dataSize: SInt32; var atomData: Ptr): OSErr; external name '_QTGetAtomDataPtr';
+{
+ * QTUnlockContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTUnlockContainer(container: QTAtomContainer): OSErr; external name '_QTUnlockContainer';
+{
+ building QTAtomContainer trees
+ creates and inserts new atom at specified index, existing atoms at or after index are moved toward end of list
+ used for Top-Down tree creation
+}
+{
+ * QTInsertChild()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTInsertChild(container: QTAtomContainer; parentAtom: QTAtom; atomType: QTAtomType; id: QTAtomID; index: SInt16; dataSize: SInt32; data: UnivPtr; var newAtom: QTAtom): OSErr; external name '_QTInsertChild';
+{ inserts children from childrenContainer as children of parentAtom }
+{
+ * QTInsertChildren()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTInsertChildren(container: QTAtomContainer; parentAtom: QTAtom; childrenContainer: QTAtomContainer): OSErr; external name '_QTInsertChildren';
+{ destruction }
+{
+ * QTRemoveAtom()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTRemoveAtom(container: QTAtomContainer; atom: QTAtom): OSErr; external name '_QTRemoveAtom';
+{
+ * QTRemoveChildren()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTRemoveChildren(container: QTAtomContainer; atom: QTAtom): OSErr; external name '_QTRemoveChildren';
+{ replacement must be same type as target }
+{
+ * QTReplaceAtom()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTReplaceAtom(targetContainer: QTAtomContainer; targetAtom: QTAtom; replacementContainer: QTAtomContainer; replacementAtom: QTAtom): OSErr; external name '_QTReplaceAtom';
+{
+ * QTSwapAtoms()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTSwapAtoms(container: QTAtomContainer; atom1: QTAtom; atom2: QTAtom): OSErr; external name '_QTSwapAtoms';
+{
+ * QTSetAtomID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTSetAtomID(container: QTAtomContainer; atom: QTAtom; newID: QTAtomID): OSErr; external name '_QTSetAtomID';
+{
+ * QTGetAtomParent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function QTGetAtomParent(container: QTAtomContainer; childAtom: QTAtom): QTAtom; external name '_QTGetAtomParent';
+{
+ * SetMediaPropertyAtom()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetMediaPropertyAtom(theMedia: Media; propertyAtom: QTAtomContainer): OSErr; external name '_SetMediaPropertyAtom';
+{
+ * GetMediaPropertyAtom()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMediaPropertyAtom(theMedia: Media; var propertyAtom: QTAtomContainer): OSErr; external name '_GetMediaPropertyAtom';
+{****
+ Tween Support
+****}
+
+type
+ TweenRecordPtr = ^TweenRecord;
+{$ifc TYPED_FUNCTION_POINTERS}
+ TweenerDataProcPtr = function(tr: TweenRecordPtr; tweenData: UnivPtr; tweenDataSize: SInt32; dataDescriptionSeed: SInt32; dataDescription: Handle; asyncCompletionProc: ICMCompletionProcRecordPtr; transferProc: UniversalProcPtr; refCon: UnivPtr): ComponentResult;
+{$elsec}
+ TweenerDataProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ TweenerDataUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ TweenerDataUPP = UniversalProcPtr;
+{$endc}
+ TweenRecord = record
+ version: SInt32;
+ container: QTAtomContainer;
+ tweenAtom: QTAtom;
+ dataAtom: QTAtom;
+ percent: Fixed;
+ dataProc: TweenerDataUPP;
+ private1: Ptr;
+ private2: Ptr;
+ end;
+
+ TweenV1RecordPtr = ^TweenV1Record;
+ TweenV1Record = record
+ version: SInt32;
+ container: QTAtomContainer;
+ tweenAtom: QTAtom;
+ dataAtom: QTAtom;
+ percent: Fixed;
+ dataProc: TweenerDataUPP;
+ private1: Ptr;
+ private2: Ptr;
+ fractPercent: Fract;
+ end;
+
+
+const
+ kTweenRecordNoFlags = 0;
+ kTweenRecordIsAtInterruptTime = $00000001;
+
+
+type
+ TweenV2RecordPtr = ^TweenV2Record;
+ TweenV2Record = record
+ version: SInt32;
+ container: QTAtomContainer;
+ tweenAtom: QTAtom;
+ dataAtom: QTAtom;
+ percent: Fixed;
+ dataProc: TweenerDataUPP;
+ private1: Ptr;
+ private2: Ptr;
+ fractPercent: Fract;
+ flags: SInt32;
+ end;
+
+ {
+ * QTNewTween()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTNewTween(var tween: QTTweener; container: QTAtomContainer; tweenAtom: QTAtom; maxTime: TimeValue): OSErr; external name '_QTNewTween';
+{
+ * QTDisposeTween()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTDisposeTween(tween: QTTweener): OSErr; external name '_QTDisposeTween';
+{
+ * QTDoTween()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTDoTween(tween: QTTweener; atTime: TimeValue; result: Handle; var resultSize: SInt32; tweenDataProc: TweenerDataUPP; tweenDataRefCon: UnivPtr): OSErr; external name '_QTDoTween';
+{
+ QTDoTweenPtr is an interrupt-safe version of QTDoTween. It has the following limitations:
+ - not all tween types support this call (those which must allocated memory), in which case they return codecUnimpErr.
+ - the QTAtomContainer used for the tween must be locked
+ - the dataSize must be large enough to contain the result
+ - this call is not supported for sequence tweens, use interpolation tweens instead
+}
+{
+ * QTDoTweenPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTDoTweenPtr(tween: QTTweener; atTime: TimeValue; result: Ptr; resultSize: SInt32): OSErr; external name '_QTDoTweenPtr';
+{****
+ Sound Description Manipulations
+****}
+{
+ * AddSoundDescriptionExtension()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function AddSoundDescriptionExtension(desc: SoundDescriptionHandle; extension: Handle; idType: OSType): OSErr; external name '_AddSoundDescriptionExtension';
+{
+ * GetSoundDescriptionExtension()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetSoundDescriptionExtension(desc: SoundDescriptionHandle; var extension: Handle; idType: OSType): OSErr; external name '_GetSoundDescriptionExtension';
+{
+ * RemoveSoundDescriptionExtension()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function RemoveSoundDescriptionExtension(desc: SoundDescriptionHandle; idType: OSType): OSErr; external name '_RemoveSoundDescriptionExtension';
+{****
+ Preferences
+****}
+{
+ * GetQuickTimePreference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetQuickTimePreference(preferenceType: OSType; var preferenceAtom: QTAtomContainer): OSErr; external name '_GetQuickTimePreference';
+{
+ * SetQuickTimePreference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SetQuickTimePreference(preferenceType: OSType; preferenceAtom: QTAtomContainer): OSErr; external name '_SetQuickTimePreference';
+{****
+ Effects and dialog Support
+****}
+{ atom types for entries in the effects list }
+
+const
+ kEffectNameAtom = $6E616D65 (* 'name' *); { name of effect }
+ kEffectTypeAtom = $74797065 (* 'type' *); { codec sub-type for effect }
+ kEffectManufacturerAtom = $6D616E75 (* 'manu' *); { codec manufacturer for effect }
+
+
+type
+ QTParamPreviewRecordPtr = ^QTParamPreviewRecord;
+ QTParamPreviewRecord = record
+ sourceID: SInt32; { 1 based source identifier }
+ sourcePicture: PicHandle; { picture for preview, must not dispose until dialog is disposed }
+ end;
+
+ QTParamPreviewPtr = ^QTParamPreviewRecord;
+ QTParamDialogEventRecordPtr = ^QTParamDialogEventRecord;
+ QTParamDialogEventRecord = record
+ theEvent: EventRecordPtr; { Event received by the dialog }
+ whichDialog: DialogRef; { dialog that event was directed towards }
+ itemHit: SInt16; { dialog item which was hit }
+ end;
+
+ QTParamDialogEventPtr = ^QTParamDialogEventRecord;
+ QTParamFetchPreviewRecordPtr = ^QTParamFetchPreviewRecord;
+ QTParamFetchPreviewRecord = record
+ theWorld: GWorldPtr; { the world into which to draw the preview }
+ percentage: Fixed; { frame percentage (from 0.0 - 1.0) to be drawn }
+ end;
+
+ QTParamFetchPreviewPtr = ^QTParamFetchPreviewRecord;
+
+const
+ pdActionConfirmDialog = 1; { no param }
+ pdActionSetAppleMenu = 2; { param is MenuRef }
+ pdActionSetEditMenu = 3; { param is MenuRef }
+ pdActionGetDialogValues = 4; { param is QTAtomContainer }
+ pdActionSetPreviewUserItem = 5; { param is long }
+ pdActionSetPreviewPicture = 6; { param is QTParamPreviewPtr; }
+ pdActionSetColorPickerEventProc = 7; { param is UserEventUPP }
+ pdActionSetDialogTitle = 8; { param is StringPtr }
+ pdActionGetSubPanelMenu = 9; { param is MenuRef* }
+ pdActionActivateSubPanel = 10; { param is long }
+ pdActionConductStopAlert = 11; { param is StringPtr }
+ pdActionModelessCallback = 12; { param is QTParamDialogEventPtr }
+ pdActionFetchPreview = 13; { param is QTParamFetchPreviewPtr }
+ pdActionSetDialogSettings = 14; { param is QTAtomContainer }
+ pdActionGetDialogSettings = 15; { param is QTAtomContainer }
+ pdActionGetNextSample = 16; { param is QTAtomContainer with effect sample to change - createdDialog may be NIL }
+ pdActionGetPreviousSample = 17; { param is QTAtomContainer with effect sample to change - createdDialog may be NIL }
+ pdActionCompactSample = 18; { param is QTAtomContainer with effect sample to compact, - createdDialog may be NIL }
+ pdActionSetEditCallout = 19; { param is QTParamPreviewCalloutPtr, can be NIL }
+ pdActionSetSampleTime = 20; { param is QTParamSampleTimePtr, can be NIL }
+ pdActionDoEditCommand = 21; { param is long with menu command (ie, mcMenuCut etc) }
+ pdActionGetSubPanelMenuValue = 22; { param is long and returns current sub-panel value selected by the effect }
+ { Action codes and typedefs used for custom controls within effects }
+ pdActionCustomNewControl = 23; { param is QTCustomControlNewPtr }
+ pdActionCustomDisposeControl = 24; { param is QTCustomControlNewPtr }
+ pdActionCustomPositionControl = 25; { param is QTCustomControlPositionControlPtr }
+ pdActionCustomShowHideControl = 26; { param is QTCustomControlShowHideControlPtr }
+ pdActionCustomHandleEvent = 27; { param is QTCustomControlHandleEventPtr }
+ pdActionCustomSetFocus = 28; { param is QTCustomControlSetFocusPtr }
+ pdActionCustomSetEditMenu = 29; { param is QTCustomControlSetEditMenuPtr }
+ pdActionCustomSetPreviewPicture = 30; { param is QTCustomControlSetPreviewPicturePtr }
+ pdActionCustomSetEditCallout = 31; { param is QTCustomControlSetEditCalloutPtr }
+ pdActionCustomGetEnableValue = 32; { param is QTCustomControlGetEnableValuePtr }
+ pdActionCustomSetSampleTime = 33; { param is QTCustomControlSetSampleTimePtr }
+ pdActionCustomGetValue = 34; { param is QTCustomControlGetValue }
+ pdActionCustomDoEditCommand = 35; { param is QTCustomControlDoEditCommand }
+
+ { Sample Time information }
+ pdSampleTimeDisplayOptionsNone = $00000000;
+
+
+type
+ QTParamSampleTimeRecordPtr = ^QTParamSampleTimeRecord;
+ QTParamSampleTimeRecord = record
+ displayOptions: SInt32;
+ sampleStartTime: TimeRecord;
+ sampleDuration: TimeValue;
+ framesPerSecond: SInt32; { if 0, will cause revert to seconds display }
+ end;
+
+ QTParamSampleTimePtr = ^QTParamSampleTimeRecord;
+ { Preview change callout information }
+ QTParamPreviewCalloutRecordPtr = ^QTParamPreviewCalloutRecord;
+ QTParamPreviewCalloutRecord = record
+ calloutProc: MoviePreviewCallOutUPP; { called when user makes editing changes to dialog. May be NIL. You should return true from your function. }
+ refCon: SInt32; { passed to the callout procedure }
+ end;
+
+ QTParamPreviewCalloutPtr = ^QTParamPreviewCalloutRecord;
+ QTParameterDialogOptions = SInt32;
+ { ------- CUSTOM EFFECT CONTROLS }
+ {
+ Effects may choose to implement custom controls to allow the user to more easily edit complex parameters
+ that are ill-served by simple sliders or type in boxes. Effects may allow a custom control for either
+ a single parameter, or for a group of parameters.
+
+ Parameter(s) for a custom control must still be data types defined by the standard set, or for
+ complex records of data, must be defined within a group as individual parameters made up from base
+ data types (for example, a point is a group containing two Fixed point numbers).
+ This is to allow applications that do not wish to use the custom control for the effect to set values themselves.
+
+ Effects should be aware that these custom controls may be deployed by the application in either a dialog or
+ a window, with application defined background colors or patterns, along with application defined font
+ characteristics for the window.
+
+ It is recommended that effects implement custom controls only when needed, and that custom controls be used
+ for specific types of parameters (ie, point, rectangle, polygon, path) rather than the entire user interface
+ for the effect. Effects may choose to implement multiple custom controls which combine with standard controls
+ to present the total user interface. For effects which have very complex user interfaces not well suited for
+ inclusion within a single window, it is recommended to use kParameterImageIsPreset -- which allows the effect to
+ have an external editing application for parameters which may then be set within the standard UI via the open file
+ dialog or drag and drop. The Lens Flare effect's "Flare Type" is an example of such a preset.
+
+ For parameters that use a custom control to control a single parameter value, a new behavior
+ flag has been added (kCustomControl), and the behavior for the parameter should be kParameterItemControl.
+
+ For parameters that are groups, the same flag (kCustomControl) should be used, and the behavior
+ should be kParameterItemGroupDivider. Groups with the kCustomControl bit set will be implemented
+ by calling the custom control for that group -- the parameters within that group will not be processed
+ in the normal manner.
+
+ In both cases, the new customType and customID fields of the behavior must be filled in. These are
+ used in order to allow your custom control to determine which parameter is being edited in the case
+ where the custom control is used for the editing of multiple parameters. These values are passed into
+ the pdActionCustomNewControl call. Since the custom control mechanism is also used by QuickTime's
+ default effect dialogs, you should be prepared to pass onto the base effect any pdActionCustomNewControl
+ calls for type/id pairs that you do not handle yourself. When pdActionCustomNewControl is called
+ for controls of types handled by QuickTime, customType is kParameterAtomTypeAndID and customID is
+ the ID of the parameter atom.
+ }
+
+
+ {
+ pdActionCustomNewControlControl is called by application to create a new custom control or set of controls
+ for an effect parameter. When pdActionCustomNewControl is called, the effect should perform any
+ basic allocation it needs for storage and return the result in storage. The options parameter tells
+ the control if the application wishes to support interpolated, optionally interpolated, or a single
+ value parameter.
+
+ Since pdActionCustomNewControlControl may be called upon your effect for other items within the
+ dialog, it is recommended that your effect have an easy way to determine which controls it implements:
+ a) by having storage be a pointer with an OSType at the begining to mark controls
+ implemented by your code.
+ - or -
+ b) keeping track in your component globals those custom controls which you have created.
+
+ When pdActionCustomDisposeControl is called any allocation done by the control should be disposed. In addition,
+ pdActionCustomDisposeControl is the last chance the control has to commit any user changes into the sample.
+ Controls which implement type in fields typically need to commit any final user edits at this time.
+ }
+ QTCustomControlNewRecordPtr = ^QTCustomControlNewRecord;
+ QTCustomControlNewRecord = record
+ storage: Ptr; { storage allocated/disposed by the control }
+ options: QTParameterDialogOptions; { options used to control interpolation/not }
+ sample: QTAtomContainer; { sample that holds the data to be edited }
+ customType: SInt32; { custom type and ID specified by effect for creation of this control }
+ customID: SInt32;
+ end;
+
+ QTCustomControlNewPtr = ^QTCustomControlNewRecord;
+ {
+ pdActionCustomPositionControl is called by the application to position the control within a window or dialog.
+
+ The control should determine if it will fit in the alloted area and position itself there. It should also
+ return the space taken up by the control. Note you are free to implement controls which are variable in size depending upon
+ which parameter you are editing. You need not scale your control to the requested size. If the area presented to your
+ control is too small, set didFit to false. You should still return in used the size you would have liked to use for
+ the control. The application will then try again with a new size. Note that all
+ controls must be able to fit within a minimum of 300 by 250 pixels.
+
+ Custom controls that draw text should make note of the text font, size, and style at this time in order
+ to properly display within application windows.
+
+ Note that the default state for the control is hidden. You will receive a pdActionCustomShowHideControl
+ in order to enable your control. You should not draw your control in response to pdActionCustomPositionControl.
+ }
+ QTCustomControlPositionControlRecordPtr = ^QTCustomControlPositionControlRecord;
+ QTCustomControlPositionControlRecord = record
+ storage: Ptr; { storage for the control }
+ window: WindowPtr; { window to be used by the control }
+ location: Rect; { location within the window the control may use }
+ used: Rect; { returned by the control to indicate size it actually used }
+ didFit: boolean; { did the control fit in the specified area? }
+ pad1,pad2,pad3: SInt8;
+ end;
+
+ QTCustomControlPositionControlPtr = ^QTCustomControlPositionControlRecord;
+ {
+ pdActionCustomShowHideControl is called when the application wishes to enable/disable your control, or
+ completely disable drawing of the control
+
+ Your control should make note of the new state (if different from the last) and perform an InvalRect()
+ on your drawing area, or you may draw your control's initial state in the case of show. You should not
+ attempt to erase your control as the result of a hide -- instead call InvalRect() and allow the application
+ to process the resulting event as appropriate.
+ }
+ QTCustomControlShowHideControlRecordPtr = ^QTCustomControlShowHideControlRecord;
+ QTCustomControlShowHideControlRecord = record
+ storage: Ptr; { storage for the control }
+ show: boolean; { display the control? }
+ enable: boolean; { enable the control (ie, black vs gray display) }
+ pad: array [0..1] of boolean;
+ end;
+
+ QTCustomControlShowHideControlPtr = ^QTCustomControlShowHideControlRecord;
+ {
+ pdActionCustomHandleEvent is called to allow your custom control to process events.
+
+ Typical controls handle the following events:
+ - activate - to draw your control in normal/gray mode
+ - update - to draw your control
+ - mouseDown - to handle clicks
+ - keyDown - to handle typing when you have focus
+ - idle - to perform idle drawing (if applicable)
+ If your control handles the entire event, set didProcess to true. If
+ you handled the event, but other controls still need the event, set didProcess to false.
+
+ If your control supports the concept of focus for the purposes of typing (such as by having
+ a type-in box for the parameter) then you set the tookFocus Boolean as part of your processing
+ of the event. It is assumed that your control will draw the appropriate focus UI as a result, and
+ the calling application will disable any focus drawing within the remainder of the UI.
+
+ By default, custom controls are not given idle time. If you need idle time, set needIdle to true
+ in response to the even that causes you to need idle (typically the taking of focus, or the first draw).
+ Your control will continue to be given idle events until you set needIdle to false in response to
+ a nullEvent.
+ }
+ QTCustomControlHandleEventRecordPtr = ^QTCustomControlHandleEventRecord;
+ QTCustomControlHandleEventRecord = record
+ storage: Ptr; { storage for the control }
+ pEvent: EventRecordPtr; { event to process }
+ didProcess: boolean; { did we process entire event? }
+ tookFocus: boolean; { did we take focus as a result of this event (typically mouseDowns) }
+ needIdle: boolean; { does this control need idle events? }
+ didEdit: boolean; { did we edit the samples? }
+ end;
+
+ QTCustomControlHandleEventPtr = ^QTCustomControlHandleEventRecord;
+ {
+ pdActionCustomSetFocus is called in order to set or advance the current focus of the user interface, typically
+ because the user has pressed the tab or shift-tab keys, or because the user clicked within the area defined by
+ your control.
+
+ Your control will be called with pdActionFocusFirst, pdActionFocusLast, or pdActionFocusOff to set or clear focus on your
+ control. Your control will be called with pdActionFocusForward or pdActionFocusBackward to cycle
+ focus within your control (if your control has multiple focus). If your control does not support focus,
+ or the focus request results in focus moving beyond your supported range, return pdActionFocusOff in
+ the focus parameter. Otherwise, return the focus that you set.
+
+ Controls which have no focus would always set focus to be pdActionFocusOff.
+
+ Controls with a single focus would set pdActionFocusFirst when requsted to set either
+ pdActionFocusFirst or pdActionFocusLast, and would set pdActionFocusOff for either
+ pdActionFocusForward or pdActionFocusBackward.
+ }
+
+const
+ pdActionFocusOff = 0; { no focus }
+ pdActionFocusFirst = 1; { focus on first element }
+ pdActionFocusLast = 2; { focus on last element }
+ pdActionFocusForward = 3; { focus on next element }
+ pdActionFocusBackward = 4; { focus on previous element }
+
+
+type
+ QTCustomControlSetFocusRecordPtr = ^QTCustomControlSetFocusRecord;
+ QTCustomControlSetFocusRecord = record
+ storage: Ptr; { storage for the control }
+ focus: SInt32; { focus to set, return resulting focus }
+ end;
+
+ QTCustomControlSetFocusPtr = ^QTCustomControlSetFocusRecord;
+ {
+ pdActionCustomSetEditMenu will be called to inform your custom control of the location of the edit menu.
+
+ If your control has editing boxes, this is useful in order to allow the user to perform cut/copy/paste operations
+ when focus is on one of these boxes.
+ }
+ QTCustomControlSetEditMenuRecordPtr = ^QTCustomControlSetEditMenuRecord;
+ QTCustomControlSetEditMenuRecord = record
+ storage: Ptr; { storage for the control }
+ editMenu: MenuHandle; { edit menu, or NIL }
+ end;
+
+ QTCustomControlSetEditMenuPtr = ^QTCustomControlSetEditMenuRecord;
+ {
+ pdActionCustomSetPreviewPicture will be called to inform your custom control of preview information that you
+ may wish to use in the drawing of your user interface.
+ }
+ QTCustomControlSetPreviewPictureRecordPtr = ^QTCustomControlSetPreviewPictureRecord;
+ QTCustomControlSetPreviewPictureRecord = record
+ storage: Ptr; { storage for the control }
+ preview: QTParamPreviewPtr; { preview to set }
+ end;
+
+ QTCustomControlSetPreviewPicturePtr = ^QTCustomControlSetPreviewPictureRecord;
+ {
+ pdActionCustomSetEditCallout tells your control of the need by the application to be informed of
+ changes to the parameter values (typically for the purposes of updating previews).
+
+ If a callout is available, your custom control should call it whenever a change has been
+ made to the parameter(s) that your control is editing (as a result of user actions, most typically).
+ If you choose not to implement this, live dragging or updating of values will not work.
+ }
+ QTCustomControlSetEditCalloutRecordPtr = ^QTCustomControlSetEditCalloutRecord;
+ QTCustomControlSetEditCalloutRecord = record
+ storage: Ptr; { storage for the control }
+ callout: QTParamPreviewCalloutPtr; { requested callout, or NIL to disable }
+ end;
+
+ QTCustomControlSetEditCalloutPtr = ^QTCustomControlSetEditCalloutRecord;
+ {
+ pdActionCustomGetEnableValue allows you to return a value for the purposes of enabling/disabling
+ other controls.
+ Most custom controls do not need to implement this call.
+
+ If your control is able to control the enabling and disabling of other parameter controls (such as is done
+ by standard pop up or enumerated type controls), you need to supply a value that can be use for greater than/less than
+ types of comparisons.
+ }
+ QTCustomControlGetEnableValueRecordPtr = ^QTCustomControlGetEnableValueRecord;
+ QTCustomControlGetEnableValueRecord = record
+ storage: Ptr; { storage for the control }
+ currentValue: SInt32; { value to compare against for enable/disable purposes }
+ end;
+
+ QTCustomControlGetEnableValuePtr = ^QTCustomControlGetEnableValueRecord;
+ {
+ pdActionCustomSetSampleTime tells your control information from the application about the duration
+ and start time for the sample being edited.
+
+ Most controls do not need this information, but some may choose to use it in the interface
+ they present the user. However, this call need not be made by applications, so the custom
+ control should be prepared to run when the sample time information is not available.
+ }
+ QTCustomControlSetSampleTimeRecordPtr = ^QTCustomControlSetSampleTimeRecord;
+ QTCustomControlSetSampleTimeRecord = record
+ storage: Ptr; { storage for the control }
+ sampleTime: QTParamSampleTimePtr; { sample time information or NIL }
+ end;
+
+ QTCustomControlSetSampleTimePtr = ^QTCustomControlSetSampleTimeRecord;
+ {
+ pdActionCustomGetValue tells your control to store any value(s) into the specified atom container.
+
+ All custom controls must implement this call
+ }
+ QTCustomControlGetValueRecordPtr = ^QTCustomControlGetValueRecord;
+ QTCustomControlGetValueRecord = record
+ storage: Ptr; { storage for the control }
+ sample: QTAtomContainer; { sample to store into }
+ end;
+
+ QTCustomControlGetValuePtr = ^QTCustomControlGetValueRecord;
+ {
+ pdActionCustomDoEditCommand tells your control to handle edit commands if it allow focus and type in boxes.
+
+ All custom controls must implement this call if they support edit boxes
+ }
+ QTCustomControlDoEditCommandRecordPtr = ^QTCustomControlDoEditCommandRecord;
+ QTCustomControlDoEditCommandRecord = record
+ storage: Ptr; { storage for the control }
+ command: SInt32; { command to execute, return 0 here if processed }
+ end;
+
+ QTCustomControlDoEditCommandPtr = ^QTCustomControlDoEditCommandRecord;
+ QTParameterDialog = SInt32;
+
+const
+ elOptionsIncludeNoneInList = $00000001; { "None" effect is included in list }
+
+
+type
+ QTEffectListOptions = SInt32;
+
+const
+ pdOptionsCollectOneValue = $00000001; { should collect a single value only }
+ pdOptionsAllowOptionalInterpolations = $00000002; { non-novice interpolation options are shown }
+ pdOptionsModalDialogBox = $00000004; { dialog box should be modal }
+ pdOptionsEditCurrentEffectOnly = $00000008; { List of effects will not be shown }
+ pdOptionsHidePreview = $00000010; { Preview item will not be shown }
+
+ effectIsRealtime = 0; { effect can be rendered in real time }
+
+ {
+ QTGetEffectsListExtended is a call that provides for
+ more advanced filtering of effects to be placed into the
+ effect list. Applications can filter on:
+ 1) number of input sources
+ 2) effect major or minor class
+ 3) custom filtering through a callback
+ The callback will be called for each effect which passes
+ the other criteria for inclusion. If the callback
+ returns a true result the effect will be included in the list.
+
+ Note that your filter proc may receive multiple effects from various
+ manufacturers. If you return true for multiple effects of a given type
+ only the one with the higher parameter version number will be included.
+ If you wish other filtering (such as effects from a given manufacturer, you
+ can do this by return false for the other effects and true for those
+ that you prefer.
+ }
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ QTEffectListFilterProcPtr = function(effect: Component; effectMinSource: SInt32; effectMaxSource: SInt32; majorClass: OSType; minorClass: OSType; refcon: UnivPtr): boolean;
+{$elsec}
+ QTEffectListFilterProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ QTEffectListFilterUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QTEffectListFilterUPP = UniversalProcPtr;
+{$endc}
+ {
+ * QTGetEffectsList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTGetEffectsList(var returnedList: QTAtomContainer; minSources: SInt32; maxSources: SInt32; getOptions: QTEffectListOptions): OSErr; external name '_QTGetEffectsList';
+{
+ * QTGetEffectsListExtended()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTGetEffectsListExtended(var returnedList: QTAtomContainer; minSources: SInt32; maxSources: SInt32; getOptions: QTEffectListOptions; majorClass: OSType; minorClass: OSType; filterProc: QTEffectListFilterUPP; filterRefCon: UnivPtr): OSErr; external name '_QTGetEffectsListExtended';
+{
+ * QTCreateStandardParameterDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTCreateStandardParameterDialog(effectList: QTAtomContainer; parameters: QTAtomContainer; dialogOptions: QTParameterDialogOptions; var createdDialog: QTParameterDialog): OSErr; external name '_QTCreateStandardParameterDialog';
+{
+ * QTIsStandardParameterDialogEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTIsStandardParameterDialogEvent(var pEvent: EventRecord; createdDialog: QTParameterDialog): OSErr; external name '_QTIsStandardParameterDialogEvent';
+{
+ * QTDismissStandardParameterDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTDismissStandardParameterDialog(createdDialog: QTParameterDialog): OSErr; external name '_QTDismissStandardParameterDialog';
+{
+ * QTStandardParameterDialogDoAction()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTStandardParameterDialogDoAction(createdDialog: QTParameterDialog; action: SInt32; params: UnivPtr): OSErr; external name '_QTStandardParameterDialogDoAction';
+{
+ * QTGetEffectSpeed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTGetEffectSpeed(parameters: QTAtomContainer; var pFPS: Fixed): OSErr; external name '_QTGetEffectSpeed';
+{****
+ Error reporting
+****}
+
+type
+ QTErrorReplacementRecordPtr = ^QTErrorReplacementRecord;
+ QTErrorReplacementRecord = record
+ numEntries: SInt32;
+ replacementString: array [0..0] of StringPtr; { array of numEntries StringPtrs (each String is allocated separately). }
+ end;
+
+ QTErrorReplacementPtr = ^QTErrorReplacementRecord;
+ {
+ QTAddMovieError is used to add orthogonal errors to a list of errors that will
+ later be reported (at the end of an import or playback, for example). Errors are stored
+ in 'qter' resources within the component.
+
+ QTAddMovieError(Movie addTo, // in: movie to add error to
+ Component adder, // in: component which is adding the error
+ long errorCode, // in: error code being added
+ QTErrorReplacementPtr stringReplacements);// in: list of strings to subsitute (in order) for "^1", "^2", etc
+ }
+ {
+ * QTAddMovieError()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTAddMovieError(movieH: Movie; c: Component; errorCode: SInt32; stringReplacements: QTErrorReplacementPtr): OSErr; external name '_QTAddMovieError';
+{****
+ Access Keys
+****}
+
+const
+ kAccessKeyAtomType = $61636B79 (* 'acky' *);
+
+ kAccessKeySystemFlag = $00000001;
+
+ {
+ * QTGetAccessKeys()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTGetAccessKeys(var accessKeyType: Str255; flags: SInt32; var keys: QTAtomContainer): OSErr; external name '_QTGetAccessKeys';
+{
+ * QTRegisterAccessKey()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTRegisterAccessKey(var accessKeyType: Str255; flags: SInt32; accessKey: Handle): OSErr; external name '_QTRegisterAccessKey';
+{
+ * QTUnregisterAccessKey()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTUnregisterAccessKey(var accessKeyType: Str255; flags: SInt32; accessKey: Handle): OSErr; external name '_QTUnregisterAccessKey';
+{****
+ Content Restrictions
+****}
+
+{
+ * QTGetMovieRestrictions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTGetMovieRestrictions(theMovie: Movie; var outRestrictionSet: QTRestrictionSet; var outSeed: UInt32): OSErr; external name '_QTGetMovieRestrictions';
+{
+ * QTRestrictionsGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTRestrictionsGetInfo(inRestrictionSet: QTRestrictionSet; var outRestrictionClassCount: SInt32; var outSeed: SInt32): OSErr; external name '_QTRestrictionsGetInfo';
+{
+ * QTRestrictionsGetIndClass()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTRestrictionsGetIndClass(inRestrictionSet: QTRestrictionSet; inIndex: SInt32; var outClass: OSType): OSErr; external name '_QTRestrictionsGetIndClass';
+{
+ * QTRestrictionsGetItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTRestrictionsGetItem(inRestrictionSet: QTRestrictionSet; inRestrictionClass: OSType; var outRestrictions: UInt32): OSErr; external name '_QTRestrictionsGetItem';
+{
+ * QTGetSupportedRestrictions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTGetSupportedRestrictions(inRestrictionClass: OSType; var outRestrictionIDs: UInt32): OSErr; external name '_QTGetSupportedRestrictions';
+{
+ * QTCreateUUID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTCreateUUID(var outUUID: QTUUID; creationFlags: SInt32): OSErr; external name '_QTCreateUUID';
+{
+ * QTEqualUUIDs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTEqualUUIDs(const (*var*) uuid1: QTUUID; const (*var*) uuid2: QTUUID): boolean; external name '_QTEqualUUIDs';
+{****
+ Time table
+****}
+{
+ * MakeTrackTimeTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MakeTrackTimeTable(trackH: Track; var offsets: SInt32Ptr; startTime: TimeValue; endTime: TimeValue; timeIncrement: TimeValue; firstDataRefIndex: SInt16; lastDataRefIndex: SInt16; var retdataRefSkew: SInt32): OSErr; external name '_MakeTrackTimeTable';
+{
+ * MakeMediaTimeTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MakeMediaTimeTable(theMedia: Media; var offsets: SInt32Ptr; startTime: TimeValue; endTime: TimeValue; timeIncrement: TimeValue; firstDataRefIndex: SInt16; lastDataRefIndex: SInt16; var retdataRefSkew: SInt32): OSErr; external name '_MakeMediaTimeTable';
+{
+ * GetMaxLoadedTimeInMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetMaxLoadedTimeInMovie(theMovie: Movie; var time: TimeValue): OSErr; external name '_GetMaxLoadedTimeInMovie';
+{
+ * QTMovieNeedsTimeTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTMovieNeedsTimeTable(theMovie: Movie; var needsTimeTable: boolean): OSErr; external name '_QTMovieNeedsTimeTable';
+{
+ * QTGetDataRefMaxFileOffset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTGetDataRefMaxFileOffset(movieH: Movie; dataRefType: OSType; dataRef: Handle; var offset: SInt32): OSErr; external name '_QTGetDataRefMaxFileOffset';
+{****
+ Bandwidth management support
+****}
+
+const
+ ConnectionSpeedPrefsType = $63737064 (* 'cspd' *);
+ BandwidthManagementPrefsType = $62776D67 (* 'bwmg' *);
+
+
+type
+ ConnectionSpeedPrefsRecordPtr = ^ConnectionSpeedPrefsRecord;
+ ConnectionSpeedPrefsRecord = record
+ connectionSpeed: SInt32;
+ end;
+
+ ConnectionSpeedPrefsPtr = ^ConnectionSpeedPrefsRecord;
+ ConnectionSpeedPrefsHandle = ^ConnectionSpeedPrefsPtr;
+ BandwidthManagementPrefsRecordPtr = ^BandwidthManagementPrefsRecord;
+ BandwidthManagementPrefsRecord = record
+ overrideConnectionSpeedForBandwidth: boolean;
+ pad: SInt8
+ end;
+
+ BandwidthManagementPrefsPtr = ^BandwidthManagementPrefsRecord;
+ BandwidthManagementPrefsHandle = ^BandwidthManagementPrefsPtr;
+
+const
+ kQTIdlePriority = 10;
+ kQTNonRealTimePriority = 20;
+ kQTRealTimeSharedPriority = 25;
+ kQTRealTimePriority = 30;
+
+ kQTBandwidthNotifyNeedToStop = $00000001;
+ kQTBandwidthNotifyGoodToGo = $00000002;
+ kQTBandwidthChangeRequest = $00000004;
+ kQTBandwidthQueueRequest = $00000008;
+ kQTBandwidthScheduledRequest = $00000010;
+ kQTBandwidthVoluntaryRelease = $00000020;
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ QTBandwidthNotificationProcPtr = function(flags: SInt32; reserved: UnivPtr; refcon: UnivPtr): OSErr;
+{$elsec}
+ QTBandwidthNotificationProcPtr = ProcPtr;
+{$endc}
+
+ QTScheduledBandwidthRecordPtr = ^QTScheduledBandwidthRecord;
+ QTScheduledBandwidthRecord = record
+ recordSize: SInt32; { total number of bytes in QTScheduledBandwidthRecord }
+ priority: SInt32;
+ dataRate: SInt32;
+ startTime: CompTimeValue; { bandwidth usage start time }
+ duration: CompTimeValue; { duration of bandwidth usage (0 if unknown) }
+ prerollDuration: CompTimeValue; { time for negotiation before startTime (0 if unknown) }
+ scale: TimeScale; { timescale of value/duration/prerollDuration fields }
+ base: TimeBase; { timebase }
+ end;
+
+ QTScheduledBandwidthPtr = ^QTScheduledBandwidthRecord;
+ QTScheduledBandwidthHandle = ^QTScheduledBandwidthPtr;
+{$ifc OPAQUE_UPP_TYPES}
+ QTBandwidthNotificationUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QTBandwidthNotificationUPP = UniversalProcPtr;
+{$endc}
+ {
+ * QTBandwidthRequest()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function QTBandwidthRequest(priority: SInt32; callback: QTBandwidthNotificationUPP; refcon: UnivPtr; var bwRef: QTBandwidthReference; flags: SInt32): OSErr; external name '_QTBandwidthRequest';
+{
+ * QTBandwidthRequestForTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function QTBandwidthRequestForTimeBase(tb: TimeBase; priority: SInt32; callback: QTBandwidthNotificationUPP; refcon: UnivPtr; var bwRef: QTBandwidthReference; flags: SInt32): OSErr; external name '_QTBandwidthRequestForTimeBase';
+{
+ * QTBandwidthRelease()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function QTBandwidthRelease(bwRef: QTBandwidthReference; flags: SInt32): OSErr; external name '_QTBandwidthRelease';
+{
+ * QTScheduledBandwidthRequest()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function QTScheduledBandwidthRequest(scheduleRec: QTScheduledBandwidthPtr; notificationCallback: QTBandwidthNotificationUPP; refcon: UnivPtr; var sbwRef: QTScheduledBandwidthReference; flags: SInt32): OSErr; external name '_QTScheduledBandwidthRequest';
+{
+ * QTScheduledBandwidthRelease()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function QTScheduledBandwidthRelease(sbwRef: QTScheduledBandwidthReference; flags: SInt32): OSErr; external name '_QTScheduledBandwidthRelease';
+const
+ uppQTCallBackProcInfo = $000003C0;
+ uppQTSyncTaskProcInfo = $000000C0;
+ uppMovieRgnCoverProcInfo = $00000FE0;
+ uppMovieProgressProcInfo = $0000FAE0;
+ uppMovieDrawingCompleteProcInfo = $000003E0;
+ uppTrackTransferProcInfo = $000003E0;
+ uppGetMovieProcInfo = $00003FE0;
+ uppMoviePreviewCallOutProcInfo = $000000D0;
+ uppTextMediaProcInfo = $00003FE0;
+ uppActionsProcInfo = $00003FE0;
+ uppDoMCActionProcInfo = $00003EE0;
+ uppMovieExecuteWiredActionsProcInfo = $00003FE0;
+ uppMoviePrePrerollCompleteProcInfo = $00000EC0;
+ uppQTNextTaskNeededSoonerCallbackProcInfo = $00000FC0;
+ uppMoviesErrorProcInfo = $00000380;
+ uppTweenerDataProcInfo = $003FFFF0;
+ uppQTEffectListFilterProcInfo = $0003FFD0;
+ uppQTBandwidthNotificationProcInfo = $00000FE0;
+ {
+ * NewQTCallBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewQTCallBackUPP(userRoutine: QTCallBackProcPtr): QTCallBackUPP; external name '_NewQTCallBackUPP'; { old name was NewQTCallBackProc }
+{
+ * NewQTSyncTaskUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewQTSyncTaskUPP(userRoutine: QTSyncTaskProcPtr): QTSyncTaskUPP; external name '_NewQTSyncTaskUPP'; { old name was NewQTSyncTaskProc }
+{
+ * NewMovieRgnCoverUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewMovieRgnCoverUPP(userRoutine: MovieRgnCoverProcPtr): MovieRgnCoverUPP; external name '_NewMovieRgnCoverUPP'; { old name was NewMovieRgnCoverProc }
+{
+ * NewMovieProgressUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewMovieProgressUPP(userRoutine: MovieProgressProcPtr): MovieProgressUPP; external name '_NewMovieProgressUPP'; { old name was NewMovieProgressProc }
+{
+ * NewMovieDrawingCompleteUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewMovieDrawingCompleteUPP(userRoutine: MovieDrawingCompleteProcPtr): MovieDrawingCompleteUPP; external name '_NewMovieDrawingCompleteUPP'; { old name was NewMovieDrawingCompleteProc }
+{
+ * NewTrackTransferUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewTrackTransferUPP(userRoutine: TrackTransferProcPtr): TrackTransferUPP; external name '_NewTrackTransferUPP'; { old name was NewTrackTransferProc }
+{
+ * NewGetMovieUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewGetMovieUPP(userRoutine: GetMovieProcPtr): GetMovieUPP; external name '_NewGetMovieUPP'; { old name was NewGetMovieProc }
+{
+ * NewMoviePreviewCallOutUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewMoviePreviewCallOutUPP(userRoutine: MoviePreviewCallOutProcPtr): MoviePreviewCallOutUPP; external name '_NewMoviePreviewCallOutUPP'; { old name was NewMoviePreviewCallOutProc }
+{
+ * NewTextMediaUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewTextMediaUPP(userRoutine: TextMediaProcPtr): TextMediaUPP; external name '_NewTextMediaUPP'; { old name was NewTextMediaProc }
+{
+ * NewActionsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewActionsUPP(userRoutine: ActionsProcPtr): ActionsUPP; external name '_NewActionsUPP'; { old name was NewActionsProc }
+{
+ * NewDoMCActionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewDoMCActionUPP(userRoutine: DoMCActionProcPtr): DoMCActionUPP; external name '_NewDoMCActionUPP'; { old name was NewDoMCActionProc }
+{
+ * NewMovieExecuteWiredActionsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewMovieExecuteWiredActionsUPP(userRoutine: MovieExecuteWiredActionsProcPtr): MovieExecuteWiredActionsUPP; external name '_NewMovieExecuteWiredActionsUPP'; { old name was NewMovieExecuteWiredActionsProc }
+{
+ * NewMoviePrePrerollCompleteUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewMoviePrePrerollCompleteUPP(userRoutine: MoviePrePrerollCompleteProcPtr): MoviePrePrerollCompleteUPP; external name '_NewMoviePrePrerollCompleteUPP'; { old name was NewMoviePrePrerollCompleteProc }
+{
+ * NewQTNextTaskNeededSoonerCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ }
+function NewQTNextTaskNeededSoonerCallbackUPP(userRoutine: QTNextTaskNeededSoonerCallbackProcPtr): QTNextTaskNeededSoonerCallbackUPP; external name '_NewQTNextTaskNeededSoonerCallbackUPP'; { old name was NewQTNextTaskNeededSoonerCallbackProc }
+{
+ * NewMoviesErrorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewMoviesErrorUPP(userRoutine: MoviesErrorProcPtr): MoviesErrorUPP; external name '_NewMoviesErrorUPP'; { old name was NewMoviesErrorProc }
+{
+ * NewTweenerDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewTweenerDataUPP(userRoutine: TweenerDataProcPtr): TweenerDataUPP; external name '_NewTweenerDataUPP'; { old name was NewTweenerDataProc }
+{
+ * NewQTEffectListFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ }
+function NewQTEffectListFilterUPP(userRoutine: QTEffectListFilterProcPtr): QTEffectListFilterUPP; external name '_NewQTEffectListFilterUPP'; { old name was NewQTEffectListFilterProc }
+{
+ * NewQTBandwidthNotificationUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewQTBandwidthNotificationUPP(userRoutine: QTBandwidthNotificationProcPtr): QTBandwidthNotificationUPP; external name '_NewQTBandwidthNotificationUPP'; { old name was NewQTBandwidthNotificationProc }
+{
+ * DisposeQTCallBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeQTCallBackUPP(userUPP: QTCallBackUPP); external name '_DisposeQTCallBackUPP';
+{
+ * DisposeQTSyncTaskUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeQTSyncTaskUPP(userUPP: QTSyncTaskUPP); external name '_DisposeQTSyncTaskUPP';
+{
+ * DisposeMovieRgnCoverUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeMovieRgnCoverUPP(userUPP: MovieRgnCoverUPP); external name '_DisposeMovieRgnCoverUPP';
+{
+ * DisposeMovieProgressUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeMovieProgressUPP(userUPP: MovieProgressUPP); external name '_DisposeMovieProgressUPP';
+{
+ * DisposeMovieDrawingCompleteUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeMovieDrawingCompleteUPP(userUPP: MovieDrawingCompleteUPP); external name '_DisposeMovieDrawingCompleteUPP';
+{
+ * DisposeTrackTransferUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeTrackTransferUPP(userUPP: TrackTransferUPP); external name '_DisposeTrackTransferUPP';
+{
+ * DisposeGetMovieUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeGetMovieUPP(userUPP: GetMovieUPP); external name '_DisposeGetMovieUPP';
+{
+ * DisposeMoviePreviewCallOutUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeMoviePreviewCallOutUPP(userUPP: MoviePreviewCallOutUPP); external name '_DisposeMoviePreviewCallOutUPP';
+{
+ * DisposeTextMediaUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeTextMediaUPP(userUPP: TextMediaUPP); external name '_DisposeTextMediaUPP';
+{
+ * DisposeActionsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeActionsUPP(userUPP: ActionsUPP); external name '_DisposeActionsUPP';
+{
+ * DisposeDoMCActionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeDoMCActionUPP(userUPP: DoMCActionUPP); external name '_DisposeDoMCActionUPP';
+{
+ * DisposeMovieExecuteWiredActionsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeMovieExecuteWiredActionsUPP(userUPP: MovieExecuteWiredActionsUPP); external name '_DisposeMovieExecuteWiredActionsUPP';
+{
+ * DisposeMoviePrePrerollCompleteUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeMoviePrePrerollCompleteUPP(userUPP: MoviePrePrerollCompleteUPP); external name '_DisposeMoviePrePrerollCompleteUPP';
+{
+ * DisposeQTNextTaskNeededSoonerCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ }
+procedure DisposeQTNextTaskNeededSoonerCallbackUPP(userUPP: QTNextTaskNeededSoonerCallbackUPP); external name '_DisposeQTNextTaskNeededSoonerCallbackUPP';
+{
+ * DisposeMoviesErrorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeMoviesErrorUPP(userUPP: MoviesErrorUPP); external name '_DisposeMoviesErrorUPP';
+{
+ * DisposeTweenerDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeTweenerDataUPP(userUPP: TweenerDataUPP); external name '_DisposeTweenerDataUPP';
+{
+ * DisposeQTEffectListFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ }
+procedure DisposeQTEffectListFilterUPP(userUPP: QTEffectListFilterUPP); external name '_DisposeQTEffectListFilterUPP';
+{
+ * DisposeQTBandwidthNotificationUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeQTBandwidthNotificationUPP(userUPP: QTBandwidthNotificationUPP); external name '_DisposeQTBandwidthNotificationUPP';
+{
+ * InvokeQTCallBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeQTCallBackUPP(cb: QTCallBack; refCon: SInt32; userRoutine: QTCallBackUPP); external name '_InvokeQTCallBackUPP'; { old name was CallQTCallBackProc }
+{
+ * InvokeQTSyncTaskUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeQTSyncTaskUPP(task: UnivPtr; userRoutine: QTSyncTaskUPP); external name '_InvokeQTSyncTaskUPP'; { old name was CallQTSyncTaskProc }
+{
+ * InvokeMovieRgnCoverUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeMovieRgnCoverUPP(theMovie: Movie; changedRgn: RgnHandle; refcon: SInt32; userRoutine: MovieRgnCoverUPP): OSErr; external name '_InvokeMovieRgnCoverUPP'; { old name was CallMovieRgnCoverProc }
+{
+ * InvokeMovieProgressUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeMovieProgressUPP(theMovie: Movie; message: SInt16; whatOperation: SInt16; percentDone: Fixed; refcon: SInt32; userRoutine: MovieProgressUPP): OSErr; external name '_InvokeMovieProgressUPP'; { old name was CallMovieProgressProc }
+{
+ * InvokeMovieDrawingCompleteUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeMovieDrawingCompleteUPP(theMovie: Movie; refCon: SInt32; userRoutine: MovieDrawingCompleteUPP): OSErr; external name '_InvokeMovieDrawingCompleteUPP'; { old name was CallMovieDrawingCompleteProc }
+{
+ * InvokeTrackTransferUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeTrackTransferUPP(t: Track; refCon: SInt32; userRoutine: TrackTransferUPP): OSErr; external name '_InvokeTrackTransferUPP'; { old name was CallTrackTransferProc }
+{
+ * InvokeGetMovieUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeGetMovieUPP(offset: SInt32; size: SInt32; dataPtr: UnivPtr; refCon: UnivPtr; userRoutine: GetMovieUPP): OSErr; external name '_InvokeGetMovieUPP'; { old name was CallGetMovieProc }
+{
+ * InvokeMoviePreviewCallOutUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeMoviePreviewCallOutUPP(refcon: SInt32; userRoutine: MoviePreviewCallOutUPP): boolean; external name '_InvokeMoviePreviewCallOutUPP'; { old name was CallMoviePreviewCallOutProc }
+{
+ * InvokeTextMediaUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeTextMediaUPP(theText: Handle; theMovie: Movie; var displayFlag: SInt16; refcon: SInt32; userRoutine: TextMediaUPP): OSErr; external name '_InvokeTextMediaUPP'; { old name was CallTextMediaProc }
+{
+ * InvokeActionsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeActionsUPP(refcon: UnivPtr; targetTrack: Track; targetRefCon: SInt32; theEvent: QTEventRecordPtr; userRoutine: ActionsUPP): OSErr; external name '_InvokeActionsUPP'; { old name was CallActionsProc }
+{
+ * InvokeDoMCActionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeDoMCActionUPP(refcon: UnivPtr; action: SInt16; params: UnivPtr; var handled: boolean; userRoutine: DoMCActionUPP): OSErr; external name '_InvokeDoMCActionUPP'; { old name was CallDoMCActionProc }
+{
+ * InvokeMovieExecuteWiredActionsUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeMovieExecuteWiredActionsUPP(theMovie: Movie; refcon: UnivPtr; flags: SInt32; wiredActions: QTAtomContainer; userRoutine: MovieExecuteWiredActionsUPP): OSErr; external name '_InvokeMovieExecuteWiredActionsUPP'; { old name was CallMovieExecuteWiredActionsProc }
+{
+ * InvokeMoviePrePrerollCompleteUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeMoviePrePrerollCompleteUPP(theMovie: Movie; prerollErr: OSErr; refcon: UnivPtr; userRoutine: MoviePrePrerollCompleteUPP); external name '_InvokeMoviePrePrerollCompleteUPP'; { old name was CallMoviePrePrerollCompleteProc }
+{
+ * InvokeQTNextTaskNeededSoonerCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ }
+procedure InvokeQTNextTaskNeededSoonerCallbackUPP(duration: TimeValue; flags: UInt32; refcon: UnivPtr; userRoutine: QTNextTaskNeededSoonerCallbackUPP); external name '_InvokeQTNextTaskNeededSoonerCallbackUPP'; { old name was CallQTNextTaskNeededSoonerCallbackProc }
+{
+ * InvokeMoviesErrorUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeMoviesErrorUPP(theErr: OSErr; refcon: SInt32; userRoutine: MoviesErrorUPP); external name '_InvokeMoviesErrorUPP'; { old name was CallMoviesErrorProc }
+{
+ * InvokeTweenerDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeTweenerDataUPP(tr: TweenRecordPtr; tweenData: UnivPtr; tweenDataSize: SInt32; dataDescriptionSeed: SInt32; dataDescription: Handle; asyncCompletionProc: ICMCompletionProcRecordPtr; transferProc: UniversalProcPtr; refCon: UnivPtr; userRoutine: TweenerDataUPP): ComponentResult; external name '_InvokeTweenerDataUPP'; { old name was CallTweenerDataProc }
+{
+ * InvokeQTEffectListFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ }
+function InvokeQTEffectListFilterUPP(effect: Component; effectMinSource: SInt32; effectMaxSource: SInt32; majorClass: OSType; minorClass: OSType; refcon: UnivPtr; userRoutine: QTEffectListFilterUPP): boolean; external name '_InvokeQTEffectListFilterUPP'; { old name was CallQTEffectListFilterProc }
+{
+ * InvokeQTBandwidthNotificationUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeQTBandwidthNotificationUPP(flags: SInt32; reserved: UnivPtr; refcon: UnivPtr; userRoutine: QTBandwidthNotificationUPP): OSErr; external name '_InvokeQTBandwidthNotificationUPP'; { old name was CallQTBandwidthNotificationProc }
+{****
+ QT International Text Atom Support
+****}
+
+const
+ kITextRemoveEverythingBut = $00;
+ kITextRemoveLeaveSuggestedAlternate = $02;
+
+ kITextAtomType = $69747874 (* 'itxt' *);
+ kITextStringAtomType = $74657874 (* 'text' *);
+
+ {
+ * ITextAddString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ITextAddString(container: QTAtomContainer; parentAtom: QTAtom; theRegionCode: RegionCode; const (*var*) theString: Str255): OSErr; external name '_ITextAddString';
+{
+ * ITextRemoveString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ITextRemoveString(container: QTAtomContainer; parentAtom: QTAtom; theRegionCode: RegionCode; flags: SInt32): OSErr; external name '_ITextRemoveString';
+{
+ * ITextGetString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ITextGetString(container: QTAtomContainer; parentAtom: QTAtom; requestedRegion: RegionCode; var foundRegion: RegionCode; theString: StringPtr): OSErr; external name '_ITextGetString';
+{
+ * QTTextToNativeText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTTextToNativeText(theText: Handle; encoding: SInt32; flags: SInt32): OSErr; external name '_QTTextToNativeText';
+{ QTParseTextHREF inContainer atoms }
+
+const
+ kQTParseTextHREFText = $74657874 (* 'text' *); { string }
+ kQTParseTextHREFBaseURL = $6275726C (* 'burl' *); { string }
+ kQTParseTextHREFClickPoint = $636C696B (* 'clik' *); { Point; if present, QTParseTextHREF will expand URLs to support server-side image maps }
+ kQTParseTextHREFUseAltDelim = $616C7464 (* 'altd' *); { boolean; if no kQTParseTextHREFDelimiter, delim is ':' }
+ kQTParseTextHREFDelimiter = $64656C6D (* 'delm' *); { character }
+ kQTParseTextHREFRecomposeHREF = $72687266 (* 'rhrf' *); { Boolean; if true, QTParseTextHREF returns recomposed HREF with URL expanded as appropriate }
+
+ { QTParseTextHREF outContainer atoms }
+ kQTParseTextHREFURL = $75726C20 (* 'url ' *); { string }
+ kQTParseTextHREFTarget = $74617267 (* 'targ' *); { string }
+ kQTParseTextHREFChapter = $63686170 (* 'chap' *); { string }
+ kQTParseTextHREFIsAutoHREF = $6175746F (* 'auto' *); { Boolean }
+ kQTParseTextHREFIsServerMap = $736D6170 (* 'smap' *); { Boolean }
+ kQTParseTextHREFHREF = $68726566 (* 'href' *); { string; recomposed HREF with URL expanded as appropriate, suitable for mcActionLinkToURL }
+ kQTParseTextHREFEMBEDArgs = $6D626564 (* 'mbed' *); { string; text between 'E<' and '>' to be used as new movie's embed tags }
+
+ {
+ * QTParseTextHREF()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function QTParseTextHREF(href: CStringPtr; hrefLen: SInt32; inContainer: QTAtomContainer; var outContainer: QTAtomContainer): OSErr; external name '_QTParseTextHREF';
+{************************
+* track reference types
+*************************}
+
+const
+ kTrackReferenceChapterList = $63686170 (* 'chap' *);
+ kTrackReferenceTimeCode = $746D6364 (* 'tmcd' *);
+ kTrackReferenceModifier = $73737263 (* 'ssrc' *);
+
+ { ************************
+ * modifier track types
+ ************************* }
+ kTrackModifierInput = $696E; { is really 'in' }
+ kTrackModifierType = $7479; { is really 'ty' }
+ kTrackModifierReference = $73737263 (* 'ssrc' *);
+ kTrackModifierObjectID = $6F626964 (* 'obid' *);
+ kTrackModifierInputName = $6E616D65 (* 'name' *);
+
+ kInputMapSubInputID = $73756269 (* 'subi' *);
+
+ kTrackModifierTypeMatrix = 1;
+ kTrackModifierTypeClip = 2;
+ kTrackModifierTypeGraphicsMode = 5;
+ kTrackModifierTypeVolume = 3;
+ kTrackModifierTypeBalance = 4;
+ kTrackModifierTypeImage = $76696465 (* 'vide' *); { was kTrackModifierTypeSpriteImage }
+ kTrackModifierObjectMatrix = 6;
+ kTrackModifierObjectGraphicsMode = 7;
+ kTrackModifierType3d4x4Matrix = 8;
+ kTrackModifierCameraData = 9;
+ kTrackModifierSoundLocalizationData = 10;
+ kTrackModifierObjectImageIndex = 11;
+ kTrackModifierObjectLayer = 12;
+ kTrackModifierObjectVisible = 13;
+ kTrackModifierAngleAspectCamera = 14;
+ kTrackModifierPanAngle = $70616E20 (* 'pan ' *);
+ kTrackModifierTiltAngle = $74696C74 (* 'tilt' *);
+ kTrackModifierVerticalFieldOfViewAngle = $666F7620 (* 'fov ' *);
+ kTrackModifierObjectQTEventSend = $65766E74 (* 'evnt' *);
+ kTrackModifierObjectCanBeHitTested = 15;
+
+
+type
+ ModifierTrackGraphicsModeRecordPtr = ^ModifierTrackGraphicsModeRecord;
+ ModifierTrackGraphicsModeRecord = record
+ graphicsMode: SInt32;
+ opColor: RGBColor;
+ end;
+
+
+ { ************************
+ * tween track types
+ ************************* }
+
+const
+ kTweenTypeShort = 1;
+ kTweenTypeLong = 2;
+ kTweenTypeFixed = 3;
+ kTweenTypePoint = 4;
+ kTweenTypeQDRect = 5;
+ kTweenTypeQDRegion = 6;
+ kTweenTypeMatrix = 7;
+ kTweenTypeRGBColor = 8;
+ kTweenTypeGraphicsModeWithRGBColor = 9;
+ kTweenTypeQTFloatSingle = 10;
+ kTweenTypeQTFloatDouble = 11;
+ kTweenTypeFixedPoint = 12;
+ kTweenType3dScale = $33736361 (* '3sca' *);
+ kTweenType3dTranslate = $33747261 (* '3tra' *);
+ kTweenType3dRotate = $33726F74 (* '3rot' *);
+ kTweenType3dRotateAboutPoint = $33726170 (* '3rap' *);
+ kTweenType3dRotateAboutAxis = $33726178 (* '3rax' *);
+ kTweenType3dRotateAboutVector = $33727663 (* '3rvc' *);
+ kTweenType3dQuaternion = $33717561 (* '3qua' *);
+ kTweenType3dMatrix = $336D6174 (* '3mat' *);
+ kTweenType3dCameraData = $3363616D (* '3cam' *);
+ kTweenType3dAngleAspectCameraData = $33636161 (* '3caa' *);
+ kTweenType3dSoundLocalizationData = $33736C63 (* '3slc' *);
+ kTweenTypePathToMatrixTranslation = $67786D74 (* 'gxmt' *);
+ kTweenTypePathToMatrixRotation = $67787072 (* 'gxpr' *);
+ kTweenTypePathToMatrixTranslationAndRotation = $67786D72 (* 'gxmr' *);
+ kTweenTypePathToFixedPoint = $67786670 (* 'gxfp' *);
+ kTweenTypePathXtoY = $67787879 (* 'gxxy' *);
+ kTweenTypePathYtoX = $67787978 (* 'gxyx' *);
+ kTweenTypeAtomList = $61746F6D (* 'atom' *);
+ kTweenTypePolygon = $706F6C79 (* 'poly' *);
+ kTweenTypeMultiMatrix = $6D756C6D (* 'mulm' *);
+ kTweenTypeSpin = $7370696E (* 'spin' *);
+ kTweenType3dMatrixNonLinear = $336E6C72 (* '3nlr' *);
+ kTweenType3dVRObject = $3376726F (* '3vro' *);
+
+ kTweenEntry = $7477656E (* 'twen' *);
+ kTweenData = $64617461 (* 'data' *);
+ kTweenType = $74776E74 (* 'twnt' *);
+ kTweenStartOffset = $74777374 (* 'twst' *);
+ kTweenDuration = $74776475 (* 'twdu' *);
+ kTweenFlags = $666C6167 (* 'flag' *);
+ kTweenOutputMin = $6F6D696E (* 'omin' *);
+ kTweenOutputMax = $6F6D6178 (* 'omax' *);
+ kTweenSequenceElement = $73657165 (* 'seqe' *);
+ kTween3dInitialCondition = $69636E64 (* 'icnd' *);
+ kTweenInterpolationID = $696E7472 (* 'intr' *);
+ kTweenRegionData = $71647267 (* 'qdrg' *);
+ kTweenPictureData = $50494354 (* 'PICT' *);
+ kListElementType = $74797065 (* 'type' *);
+ kListElementDataType = $64617479 (* 'daty' *);
+ kNameAtom = $6E616D65 (* 'name' *);
+ kInitialRotationAtom = $696E726F (* 'inro' *);
+ kNonLinearTweenHeader = $6E6C7468 (* 'nlth' *);
+
+ { kTweenFlags }
+ kTweenReturnDelta = $00000001;
+
+
+type
+ TweenSequenceEntryRecordPtr = ^TweenSequenceEntryRecord;
+ TweenSequenceEntryRecord = record
+ endPercent: Fixed;
+ tweenAtomID: QTAtomID;
+ dataAtomID: QTAtomID;
+ end;
+
+
+ { ****
+ Content Restrictions
+ **** }
+
+const
+ kQTRestrictionClassSave = $73617665 (* 'save' *);
+ kQTRestrictionSaveDontAddMovieResource = $00000001;
+ kQTRestrictionSaveDontFlatten = $00000002;
+ kQTRestrictionSaveDontExport = $00000004;
+ kQTRestrictionSaveDontExtract = $00000008; { don't allow any form of extraction of content }
+ kQTRestrictionClassEdit = $65646974 (* 'edit' *);
+ kQTRestrictionEditDontCopy = $00000001; { disable copy }
+ kQTRestrictionEditDontCut = $00000002; { disable cut }
+ kQTRestrictionEditDontPaste = $00000004; { disable paste }
+ kQTRestrictionEditDontClear = $00000008; { disable clear }
+ kQTRestrictionEditDontModify = $00000010; { don't allow modification of content }
+ kQTRestrictionEditDontExtract = $00000020; { don't allow any form of extraction of content }
+
+
+ { ************************
+ * Video Media routines
+ ************************* }
+
+
+ videoFlagDontLeanAhead = $00000001;
+
+
+ { use these five routines at your own peril }
+ {
+ * VideoMediaResetStatistics()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VideoMediaResetStatistics(mh: MediaHandler): ComponentResult; external name '_VideoMediaResetStatistics';
+{
+ * VideoMediaGetStatistics()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VideoMediaGetStatistics(mh: MediaHandler): ComponentResult; external name '_VideoMediaGetStatistics';
+{
+ * VideoMediaGetStallCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VideoMediaGetStallCount(mh: MediaHandler; var stalls: UInt32): ComponentResult; external name '_VideoMediaGetStallCount';
+{
+ * VideoMediaSetCodecParameter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function VideoMediaSetCodecParameter(mh: MediaHandler; cType: CodecType; parameterID: OSType; parameterChangeSeed: SInt32; dataPtr: UnivPtr; dataSize: SInt32): ComponentResult; external name '_VideoMediaSetCodecParameter';
+{
+ * VideoMediaGetCodecParameter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function VideoMediaGetCodecParameter(mh: MediaHandler; cType: CodecType; parameterID: OSType; outParameterData: Handle): ComponentResult; external name '_VideoMediaGetCodecParameter';
+{************************
+* Text Media routines
+*************************}
+
+
+{ Return displayFlags for TextProc }
+
+const
+ txtProcDefaultDisplay = 0; { Use the media's default }
+ txtProcDontDisplay = 1; { Don't display the text }
+ txtProcDoDisplay = 2; { Do display the text }
+
+ {
+ * TextMediaSetTextProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TextMediaSetTextProc(mh: MediaHandler; TextProc: TextMediaUPP; refcon: SInt32): ComponentResult; external name '_TextMediaSetTextProc';
+{
+ * TextMediaAddTextSample()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TextMediaAddTextSample(mh: MediaHandler; text: Ptr; size: UInt32; fontNumber: SInt16; fontSize: SInt16; txtFace: ByteParameter; var textColor: RGBColor; var backColor: RGBColor; textJustification: SInt16; var textBox: Rect; displayFlags: SInt32; scrollDelay: TimeValue; hiliteStart: SInt16; hiliteEnd: SInt16; var rgbHiliteColor: RGBColor; duration: TimeValue; var sampleTime: TimeValue): ComponentResult; external name '_TextMediaAddTextSample';
+{
+ * TextMediaAddTESample()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TextMediaAddTESample(mh: MediaHandler; hTE: TEHandle; var backColor: RGBColor; textJustification: SInt16; var textBox: Rect; displayFlags: SInt32; scrollDelay: TimeValue; hiliteStart: SInt16; hiliteEnd: SInt16; var rgbHiliteColor: RGBColor; duration: TimeValue; var sampleTime: TimeValue): ComponentResult; external name '_TextMediaAddTESample';
+{
+ * TextMediaAddHiliteSample()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TextMediaAddHiliteSample(mh: MediaHandler; hiliteStart: SInt16; hiliteEnd: SInt16; var rgbHiliteColor: RGBColor; duration: TimeValue; var sampleTime: TimeValue): ComponentResult; external name '_TextMediaAddHiliteSample';
+{
+ * TextMediaDrawRaw()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function TextMediaDrawRaw(mh: MediaHandler; gw: GWorldPtr; gd: GDHandle; data: UnivPtr; dataSize: SInt32; tdh: TextDescriptionHandle): ComponentResult; external name '_TextMediaDrawRaw';
+{
+ * TextMediaSetTextProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function TextMediaSetTextProperty(mh: MediaHandler; atMediaTime: TimeValue; propertyType: SInt32; data: UnivPtr; dataSize: SInt32): ComponentResult; external name '_TextMediaSetTextProperty';
+{
+ * TextMediaRawSetup()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function TextMediaRawSetup(mh: MediaHandler; gw: GWorldPtr; gd: GDHandle; data: UnivPtr; dataSize: SInt32; tdh: TextDescriptionHandle; sampleDuration: TimeValue): ComponentResult; external name '_TextMediaRawSetup';
+{
+ * TextMediaRawIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function TextMediaRawIdle(mh: MediaHandler; gw: GWorldPtr; gd: GDHandle; sampleTime: TimeValue; flagsIn: SInt32; var flagsOut: SInt32): ComponentResult; external name '_TextMediaRawIdle';
+{
+ * TextMediaGetTextProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function TextMediaGetTextProperty(mh: MediaHandler; atMediaTime: TimeValue; propertyType: SInt32; data: UnivPtr; dataSize: SInt32): ComponentResult; external name '_TextMediaGetTextProperty';
+const
+ findTextEdgeOK = $01; { Okay to find text at specified sample time }
+ findTextCaseSensitive = $02; { Case sensitive search }
+ findTextReverseSearch = $04; { Search from sampleTime backwards }
+ findTextWrapAround = $08; { Wrap search when beginning or end of movie is hit }
+ findTextUseOffset = $10; { Begin search at the given character offset into sample rather than edge }
+
+ {
+ * TextMediaFindNextText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TextMediaFindNextText(mh: MediaHandler; text: Ptr; size: SInt32; findFlags: SInt16; startTime: TimeValue; var foundTime: TimeValue; var foundDuration: TimeValue; var offset: SInt32): ComponentResult; external name '_TextMediaFindNextText';
+{
+ * TextMediaHiliteTextSample()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TextMediaHiliteTextSample(mh: MediaHandler; sampleTime: TimeValue; hiliteStart: SInt16; hiliteEnd: SInt16; var rgbHiliteColor: RGBColor): ComponentResult; external name '_TextMediaHiliteTextSample';
+const
+ dropShadowOffsetType = $6472706F (* 'drpo' *);
+ dropShadowTranslucencyType = $64727074 (* 'drpt' *);
+
+ {
+ * TextMediaSetTextSampleData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TextMediaSetTextSampleData(mh: MediaHandler; data: UnivPtr; dataType: OSType): ComponentResult; external name '_TextMediaSetTextSampleData';
+{************************
+* Sprite Media routines
+*************************}
+{ flags for sprite hit test routines }
+
+const
+ spriteHitTestBounds = $00000001; { point must only be within sprite's bounding box }
+ spriteHitTestImage = $00000002; { point must be within the shape of the sprite's image }
+ spriteHitTestInvisibleSprites = $00000004; { invisible sprites may be hit tested }
+ spriteHitTestIsClick = $00000008; { for codecs that want mouse events }
+ spriteHitTestLocInDisplayCoordinates = $00000010; { set if you want to pass a display coordiate point to SpriteHitTest }
+ spriteHitTestTreatAllSpritesAsHitTestable = $00000020; { set if you want to override each sprites hittestable property as true }
+
+ { atom types for sprite media }
+ kSpriteAtomType = $73707274 (* 'sprt' *);
+ kSpriteImagesContainerAtomType = $696D6374 (* 'imct' *);
+ kSpriteImageAtomType = $696D6167 (* 'imag' *);
+ kSpriteImageDataAtomType = $696D6461 (* 'imda' *);
+ kSpriteImageDataRefAtomType = $696D7265 (* 'imre' *);
+ kSpriteImageDataRefTypeAtomType = $696D7274 (* 'imrt' *);
+ kSpriteImageGroupIDAtomType = $696D6772 (* 'imgr' *);
+ kSpriteImageRegistrationAtomType = $696D7267 (* 'imrg' *);
+ kSpriteImageDefaultImageIndexAtomType = $64656669 (* 'defi' *);
+ kSpriteSharedDataAtomType = $64666C74 (* 'dflt' *);
+ kSpriteNameAtomType = $6E616D65 (* 'name' *);
+ kSpriteImageNameAtomType = $6E616D65 (* 'name' *);
+ kSpriteUsesImageIDsAtomType = $75736573 (* 'uses' *); { leaf data is an array of QTAtomID's, one per image used }
+ kSpriteBehaviorsAtomType = $62656861 (* 'beha' *);
+ kSpriteImageBehaviorAtomType = $696D6167 (* 'imag' *);
+ kSpriteCursorBehaviorAtomType = $63727372 (* 'crsr' *);
+ kSpriteStatusStringsBehaviorAtomType = $73737472 (* 'sstr' *);
+ kSpriteVariablesContainerAtomType = $76617273 (* 'vars' *);
+ kSpriteStringVariableAtomType = $73747276 (* 'strv' *);
+ kSpriteFloatingPointVariableAtomType = $666C6F76 (* 'flov' *);
+
+
+type
+ QTRuntimeSpriteDescStructPtr = ^QTRuntimeSpriteDescStruct;
+ QTRuntimeSpriteDescStruct = record
+ version: SInt32; { set to zero }
+ spriteID: QTAtomID;
+ imageIndex: SInt16;
+ matrix: MatrixRecord;
+ visible: SInt16;
+ layer: SInt16;
+ graphicsMode: ModifierTrackGraphicsModeRecord;
+ actionHandlingSpriteID: QTAtomID;
+ end;
+
+ QTRuntimeSpriteDescPtr = ^QTRuntimeSpriteDescStruct;
+ {
+ when filling in QTSpriteButtonBehaviorStruct values -1 may be used to indicate that
+ the state transition does not change the property
+ }
+ QTSpriteButtonBehaviorStructPtr = ^QTSpriteButtonBehaviorStruct;
+ QTSpriteButtonBehaviorStruct = record
+ notOverNotPressedStateID: QTAtomID;
+ overNotPressedStateID: QTAtomID;
+ overPressedStateID: QTAtomID;
+ notOverPressedStateID: QTAtomID;
+ end;
+
+ QTSpriteButtonBehaviorPtr = ^QTSpriteButtonBehaviorStruct;
+ {
+ * SpriteMediaSetProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaSetProperty(mh: MediaHandler; spriteIndex: SInt16; propertyType: SInt32; propertyValue: UnivPtr): ComponentResult; external name '_SpriteMediaSetProperty';
+{
+ * SpriteMediaGetProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaGetProperty(mh: MediaHandler; spriteIndex: SInt16; propertyType: SInt32; propertyValue: UnivPtr): ComponentResult; external name '_SpriteMediaGetProperty';
+{
+ * SpriteMediaHitTestSprites()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaHitTestSprites(mh: MediaHandler; flags: SInt32; loc: Point; var spriteHitIndex: SInt16): ComponentResult; external name '_SpriteMediaHitTestSprites';
+{
+ * SpriteMediaCountSprites()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaCountSprites(mh: MediaHandler; var numSprites: SInt16): ComponentResult; external name '_SpriteMediaCountSprites';
+{
+ * SpriteMediaCountImages()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaCountImages(mh: MediaHandler; var numImages: SInt16): ComponentResult; external name '_SpriteMediaCountImages';
+{
+ * SpriteMediaGetIndImageDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaGetIndImageDescription(mh: MediaHandler; imageIndex: SInt16; imageDescription: ImageDescriptionHandle): ComponentResult; external name '_SpriteMediaGetIndImageDescription';
+{
+ * SpriteMediaGetDisplayedSampleNumber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaGetDisplayedSampleNumber(mh: MediaHandler; var sampleNum: SInt32): ComponentResult; external name '_SpriteMediaGetDisplayedSampleNumber';
+{
+ * SpriteMediaGetSpriteName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaGetSpriteName(mh: MediaHandler; spriteID: QTAtomID; var spriteName: Str255): ComponentResult; external name '_SpriteMediaGetSpriteName';
+{
+ * SpriteMediaGetImageName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaGetImageName(mh: MediaHandler; imageIndex: SInt16; var imageName: Str255): ComponentResult; external name '_SpriteMediaGetImageName';
+{
+ * SpriteMediaSetSpriteProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaSetSpriteProperty(mh: MediaHandler; spriteID: QTAtomID; propertyType: SInt32; propertyValue: UnivPtr): ComponentResult; external name '_SpriteMediaSetSpriteProperty';
+{
+ * SpriteMediaGetSpriteProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaGetSpriteProperty(mh: MediaHandler; spriteID: QTAtomID; propertyType: SInt32; propertyValue: UnivPtr): ComponentResult; external name '_SpriteMediaGetSpriteProperty';
+{
+ * SpriteMediaHitTestAllSprites()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaHitTestAllSprites(mh: MediaHandler; flags: SInt32; loc: Point; var spriteHitID: QTAtomID): ComponentResult; external name '_SpriteMediaHitTestAllSprites';
+{
+ * SpriteMediaHitTestOneSprite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaHitTestOneSprite(mh: MediaHandler; spriteID: QTAtomID; flags: SInt32; loc: Point; var wasHit: boolean): ComponentResult; external name '_SpriteMediaHitTestOneSprite';
+{
+ * SpriteMediaSpriteIndexToID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaSpriteIndexToID(mh: MediaHandler; spriteIndex: SInt16; var spriteID: QTAtomID): ComponentResult; external name '_SpriteMediaSpriteIndexToID';
+{
+ * SpriteMediaSpriteIDToIndex()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaSpriteIDToIndex(mh: MediaHandler; spriteID: QTAtomID; var spriteIndex: SInt16): ComponentResult; external name '_SpriteMediaSpriteIDToIndex';
+{
+ * SpriteMediaGetSpriteActionsForQTEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaGetSpriteActionsForQTEvent(mh: MediaHandler; event: QTEventRecordPtr; spriteID: QTAtomID; var container: QTAtomContainer; var atom: QTAtom): ComponentResult; external name '_SpriteMediaGetSpriteActionsForQTEvent';
+{
+ * SpriteMediaSetActionVariable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaSetActionVariable(mh: MediaHandler; variableID: QTAtomID; value: Float32Ptr): ComponentResult; external name '_SpriteMediaSetActionVariable';
+{
+ * SpriteMediaGetActionVariable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaGetActionVariable(mh: MediaHandler; variableID: QTAtomID; var value: Float32): ComponentResult; external name '_SpriteMediaGetActionVariable';
+{
+ * SpriteMediaGetIndImageProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SpriteMediaGetIndImageProperty(mh: MediaHandler; imageIndex: SInt16; imagePropertyType: SInt32; imagePropertyValue: UnivPtr): ComponentResult; external name '_SpriteMediaGetIndImageProperty';
+{
+ * SpriteMediaNewSprite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function SpriteMediaNewSprite(mh: MediaHandler; newSpriteDesc: QTRuntimeSpriteDescPtr): ComponentResult; external name '_SpriteMediaNewSprite';
+{
+ * SpriteMediaDisposeSprite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function SpriteMediaDisposeSprite(mh: MediaHandler; spriteID: QTAtomID): ComponentResult; external name '_SpriteMediaDisposeSprite';
+{
+ * SpriteMediaSetActionVariableToString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function SpriteMediaSetActionVariableToString(mh: MediaHandler; variableID: QTAtomID; theCString: Ptr): ComponentResult; external name '_SpriteMediaSetActionVariableToString';
+{
+ * SpriteMediaGetActionVariableAsString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function SpriteMediaGetActionVariableAsString(mh: MediaHandler; variableID: QTAtomID; var theCString: Handle): ComponentResult; external name '_SpriteMediaGetActionVariableAsString';
+{
+ * SpriteMediaNewImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function SpriteMediaNewImage(mh: MediaHandler; dataRef: Handle; dataRefType: OSType; desiredID: QTAtomID): ComponentResult; external name '_SpriteMediaNewImage';
+{
+ * SpriteMediaDisposeImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function SpriteMediaDisposeImage(mh: MediaHandler; imageIndex: SInt16): ComponentResult; external name '_SpriteMediaDisposeImage';
+{
+ * SpriteMediaImageIndexToID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function SpriteMediaImageIndexToID(mh: MediaHandler; imageIndex: SInt16; var imageID: QTAtomID): ComponentResult; external name '_SpriteMediaImageIndexToID';
+{
+ * SpriteMediaImageIDToIndex()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function SpriteMediaImageIDToIndex(mh: MediaHandler; imageID: QTAtomID; var imageIndex: SInt16): ComponentResult; external name '_SpriteMediaImageIDToIndex';
+{************************
+* Flash Media routines
+*************************}
+
+{
+ * FlashMediaSetPan()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function FlashMediaSetPan(mh: MediaHandler; xPercent: SInt16; yPercent: SInt16): ComponentResult; external name '_FlashMediaSetPan';
+{
+ * FlashMediaSetZoom()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function FlashMediaSetZoom(mh: MediaHandler; factor: SInt16): ComponentResult; external name '_FlashMediaSetZoom';
+{
+ * FlashMediaSetZoomRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function FlashMediaSetZoomRect(mh: MediaHandler; left: SInt32; top: SInt32; right: SInt32; bottom: SInt32): ComponentResult; external name '_FlashMediaSetZoomRect';
+{
+ * FlashMediaGetRefConBounds()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function FlashMediaGetRefConBounds(mh: MediaHandler; refCon: SInt32; var left: SInt32; var top: SInt32; var right: SInt32; var bottom: SInt32): ComponentResult; external name '_FlashMediaGetRefConBounds';
+{
+ * FlashMediaGetRefConID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function FlashMediaGetRefConID(mh: MediaHandler; refCon: SInt32; var refConID: SInt32): ComponentResult; external name '_FlashMediaGetRefConID';
+{
+ * FlashMediaIDToRefCon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function FlashMediaIDToRefCon(mh: MediaHandler; refConID: SInt32; var refCon: SInt32): ComponentResult; external name '_FlashMediaIDToRefCon';
+{
+ * FlashMediaGetDisplayedFrameNumber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function FlashMediaGetDisplayedFrameNumber(mh: MediaHandler; var flashFrameNumber: SInt32): ComponentResult; external name '_FlashMediaGetDisplayedFrameNumber';
+{
+ * FlashMediaFrameNumberToMovieTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function FlashMediaFrameNumberToMovieTime(mh: MediaHandler; flashFrameNumber: SInt32; var movieTime: TimeValue): ComponentResult; external name '_FlashMediaFrameNumberToMovieTime';
+{
+ * FlashMediaFrameLabelToMovieTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function FlashMediaFrameLabelToMovieTime(mh: MediaHandler; theLabel: Ptr; var movieTime: TimeValue): ComponentResult; external name '_FlashMediaFrameLabelToMovieTime';
+{
+ * FlashMediaGetFlashVariable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function FlashMediaGetFlashVariable(mh: MediaHandler; path: CStringPtr; name: CStringPtr; var theVariableCStringOut: Handle): ComponentResult; external name '_FlashMediaGetFlashVariable';
+{
+ * FlashMediaSetFlashVariable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function FlashMediaSetFlashVariable(mh: MediaHandler; path: CStringPtr; name: CStringPtr; value: CStringPtr; updateFocus: boolean): ComponentResult; external name '_FlashMediaSetFlashVariable';
+{
+ * FlashMediaDoButtonActions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function FlashMediaDoButtonActions(mh: MediaHandler; path: CStringPtr; buttonID: SInt32; transition: SInt32): ComponentResult; external name '_FlashMediaDoButtonActions';
+{
+ * FlashMediaGetSupportedSwfVersion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function FlashMediaGetSupportedSwfVersion(mh: MediaHandler; var swfVersion: UInt8): ComponentResult; external name '_FlashMediaGetSupportedSwfVersion';
+{ sample format atoms }
+
+const
+ kMovieMediaDataReference = $6D6D6472 (* 'mmdr' *); { data reference }
+ kMovieMediaDefaultDataReferenceID = $64647269 (* 'ddri' *); { atom id }
+ kMovieMediaSlaveTime = $736C7469 (* 'slti' *); { boolean }
+ kMovieMediaSlaveAudio = $736C6175 (* 'slau' *); { boolean }
+ kMovieMediaSlaveGraphicsMode = $736C6772 (* 'slgr' *); { boolean }
+ kMovieMediaAutoPlay = $706C6179 (* 'play' *); { boolean }
+ kMovieMediaLoop = $6C6F6F70 (* 'loop' *); { UInt8 (0=no loop, 1=loop, 2=palindrome loop) }
+ kMovieMediaUseMIMEType = $6D696D65 (* 'mime' *); { string indicating the MIME type to use for the dataref (usually not required) }
+ kMovieMediaTitle = $7469746C (* 'titl' *); { string of the media's title (tooltips) }
+ kMovieMediaAltText = $616C7474 (* 'altt' *); { string of alternate text if media isn't loaded }
+ kMovieMediaClipBegin = $636C7062 (* 'clpb' *); { MovieMediaTimeRecord of start time of embedded media }
+ kMovieMediaClipDuration = $636C7064 (* 'clpd' *); { MovieMediaTimeRecord of duration of embedded media }
+ kMovieMediaRegionAtom = $72656769 (* 'regi' *); { contains subatoms that describe layout }
+ kMovieMediaSlaveTrackDuration = $736C7472 (* 'sltr' *); { Boolean indicating that media handler should adjust track and media based on actual embedded movie duration }
+ kMovieMediaEnableFrameStepping = $656E6673 (* 'enfs' *); { boolean. if true stepping on external movie steps frames within embedded movie. }
+ kMovieMediaBackgroundColor = $626B636C (* 'bkcl' *); { RGBColor. }
+ kMovieMediaPrerollTime = $70726572 (* 'prer' *); { SInt32 indicating preroll time }
+
+ { fit types }
+ kMovieMediaFitNone = 0;
+ kMovieMediaFitScroll = $7363726F (* 'scro' *);
+ kMovieMediaFitClipIfNecessary = $68696464 (* 'hidd' *);
+ kMovieMediaFitFill = $66696C6C (* 'fill' *);
+ kMovieMediaFitMeet = $6D656574 (* 'meet' *);
+ kMovieMediaFitSlice = $736C6963 (* 'slic' *);
+
+ { sub atoms for region atom }
+ kMovieMediaSpatialAdjustment = $66697420 (* 'fit ' *); { OSType from kMovieMediaFit* }
+ kMovieMediaRectangleAtom = $72656374 (* 'rect' *);
+ kMovieMediaTop = $746F7020 (* 'top ' *);
+ kMovieMediaLeft = $6C656674 (* 'left' *);
+ kMovieMediaWidth = $77642020 (* 'wd ' *);
+ kMovieMediaHeight = $68742020 (* 'ht ' *);
+
+ { contained movie properties }
+ kMoviePropertyDuration = $64757261 (* 'dura' *); { TimeValue * }
+ kMoviePropertyTimeScale = $74696D73 (* 'tims' *); { TimeValue * }
+ kMoviePropertyTime = $74696D76 (* 'timv' *); { TimeValue * }
+ kMoviePropertyNaturalBounds = $6E617462 (* 'natb' *); { Rect * }
+ kMoviePropertyMatrix = $6D747278 (* 'mtrx' *); { Matrix * }
+ kMoviePropertyTrackList = $746C7374 (* 'tlst' *); { long *** }
+
+
+ kTrackPropertyMediaType = $6D747970 (* 'mtyp' *); { OSType }
+ kTrackPropertyInstantiation = $696E7374 (* 'inst' *); { MovieMediaInstantiationInfoRecord }
+
+
+type
+ MovieMediaTimeRecordPtr = ^MovieMediaTimeRecord;
+ MovieMediaTimeRecord = record
+ time: wide;
+ scale: TimeScale;
+ end;
+
+ MovieMediaInstantiationInfoRecordPtr = ^MovieMediaInstantiationInfoRecord;
+ MovieMediaInstantiationInfoRecord = record
+ immediately: boolean;
+ pad: boolean;
+ bitRate: SInt32;
+ end;
+
+ { ************************
+ * Movie Media routines
+ ************************* }
+
+
+ {
+ * MovieMediaGetChildDoMCActionCallback()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function MovieMediaGetChildDoMCActionCallback(mh: MediaHandler; var doMCActionCallbackProc: DoMCActionUPP; var refcon: SInt32): ComponentResult; external name '_MovieMediaGetChildDoMCActionCallback';
+{
+ * MovieMediaGetDoMCActionCallback()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function MovieMediaGetDoMCActionCallback(mh: MediaHandler; var doMCActionCallbackProc: DoMCActionUPP; var refcon: SInt32): ComponentResult; external name '_MovieMediaGetDoMCActionCallback';
+{
+ * MovieMediaGetCurrentMovieProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function MovieMediaGetCurrentMovieProperty(mh: MediaHandler; whichProperty: OSType; value: UnivPtr): ComponentResult; external name '_MovieMediaGetCurrentMovieProperty';
+{
+ * MovieMediaGetCurrentTrackProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function MovieMediaGetCurrentTrackProperty(mh: MediaHandler; trackID: SInt32; whichProperty: OSType; value: UnivPtr): ComponentResult; external name '_MovieMediaGetCurrentTrackProperty';
+{
+ * MovieMediaGetChildMovieDataReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function MovieMediaGetChildMovieDataReference(mh: MediaHandler; dataRefID: QTAtomID; dataRefIndex: SInt16; var dataRefType: OSType; var dataRef: Handle; var dataRefIDOut: QTAtomID; var dataRefIndexOut: SInt16): ComponentResult; external name '_MovieMediaGetChildMovieDataReference';
+{
+ * MovieMediaSetChildMovieDataReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function MovieMediaSetChildMovieDataReference(mh: MediaHandler; dataRefID: QTAtomID; dataRefType: OSType; dataRef: Handle): ComponentResult; external name '_MovieMediaSetChildMovieDataReference';
+{
+ * MovieMediaLoadChildMovieFromDataReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function MovieMediaLoadChildMovieFromDataReference(mh: MediaHandler; dataRefID: QTAtomID): ComponentResult; external name '_MovieMediaLoadChildMovieFromDataReference';
+{************************
+* 3D Media routines
+*************************}
+{
+ * Media3DGetNamedObjectList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function Media3DGetNamedObjectList(mh: MediaHandler; var objectList: QTAtomContainer): ComponentResult; external name '_Media3DGetNamedObjectList';
+{
+ * Media3DGetRendererList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function Media3DGetRendererList(mh: MediaHandler; var rendererList: QTAtomContainer): ComponentResult; external name '_Media3DGetRendererList';
+{
+ * Media3DGetCurrentGroup()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function Media3DGetCurrentGroup(mh: MediaHandler; group: UnivPtr): ComponentResult; external name '_Media3DGetCurrentGroup';
+{
+ * Media3DTranslateNamedObjectTo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function Media3DTranslateNamedObjectTo(mh: MediaHandler; objectName: CStringPtr; x: Fixed; y: Fixed; z: Fixed): ComponentResult; external name '_Media3DTranslateNamedObjectTo';
+{
+ * Media3DScaleNamedObjectTo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function Media3DScaleNamedObjectTo(mh: MediaHandler; objectName: CStringPtr; xScale: Fixed; yScale: Fixed; zScale: Fixed): ComponentResult; external name '_Media3DScaleNamedObjectTo';
+{
+ * Media3DRotateNamedObjectTo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function Media3DRotateNamedObjectTo(mh: MediaHandler; objectName: CStringPtr; xDegrees: Fixed; yDegrees: Fixed; zDegrees: Fixed): ComponentResult; external name '_Media3DRotateNamedObjectTo';
+{
+ * Media3DSetCameraData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function Media3DSetCameraData(mh: MediaHandler; cameraData: UnivPtr): ComponentResult; external name '_Media3DSetCameraData';
+{
+ * Media3DGetCameraData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function Media3DGetCameraData(mh: MediaHandler; cameraData: UnivPtr): ComponentResult; external name '_Media3DGetCameraData';
+{
+ * Media3DSetCameraAngleAspect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function Media3DSetCameraAngleAspect(mh: MediaHandler; fov: QTFloatSingle; aspectRatioXToY: QTFloatSingle): ComponentResult; external name '_Media3DSetCameraAngleAspect';
+{
+ * Media3DGetCameraAngleAspect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function Media3DGetCameraAngleAspect(mh: MediaHandler; var fov: QTFloatSingle; var aspectRatioXToY: QTFloatSingle): ComponentResult; external name '_Media3DGetCameraAngleAspect';
+{
+ * Media3DSetCameraRange()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function Media3DSetCameraRange(mh: MediaHandler; tQ3CameraRange: UnivPtr): ComponentResult; external name '_Media3DSetCameraRange';
+{
+ * Media3DGetCameraRange()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function Media3DGetCameraRange(mh: MediaHandler; tQ3CameraRange: UnivPtr): ComponentResult; external name '_Media3DGetCameraRange';
+{
+ * Media3DGetViewObject()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function Media3DGetViewObject(mh: MediaHandler; tq3viewObject: UnivPtr): ComponentResult; external name '_Media3DGetViewObject';
+{***************************************
+* *
+* M O V I E C O N T R O L L E R *
+* *
+***************************************}
+
+const
+ MovieControllerComponentType = $706C6179 (* 'play' *);
+
+
+ kMovieControllerQTVRFlag = $01;
+ kMovieControllerDontDisplayToUser = $02;
+
+
+type
+ MovieController = ComponentInstance;
+ MovieControllerPtr = ^MovieController;
+
+const
+ mcActionIdle = 1; { no param }
+ mcActionDraw = 2; { param is WindowRef }
+ mcActionActivate = 3; { no param }
+ mcActionDeactivate = 4; { no param }
+ mcActionMouseDown = 5; { param is pointer to EventRecord }
+ mcActionKey = 6; { param is pointer to EventRecord }
+ mcActionPlay = 8; { param is Fixed, play rate }
+ mcActionGoToTime = 12; { param is TimeRecord }
+ mcActionSetVolume = 14; { param is a short }
+ mcActionGetVolume = 15; { param is pointer to a short }
+ mcActionStep = 18; { param is number of steps (short) }
+ mcActionSetLooping = 21; { param is Boolean }
+ mcActionGetLooping = 22; { param is pointer to a Boolean }
+ mcActionSetLoopIsPalindrome = 23; { param is Boolean }
+ mcActionGetLoopIsPalindrome = 24; { param is pointer to a Boolean }
+ mcActionSetGrowBoxBounds = 25; { param is a Rect }
+ mcActionControllerSizeChanged = 26; { no param }
+ mcActionSetSelectionBegin = 29; { param is TimeRecord }
+ mcActionSetSelectionDuration = 30; { param is TimeRecord, action only taken on set-duration }
+ mcActionSetKeysEnabled = 32; { param is Boolean }
+ mcActionGetKeysEnabled = 33; { param is pointer to Boolean }
+ mcActionSetPlaySelection = 34; { param is Boolean }
+ mcActionGetPlaySelection = 35; { param is pointer to Boolean }
+ mcActionSetUseBadge = 36; { param is Boolean }
+ mcActionGetUseBadge = 37; { param is pointer to Boolean }
+ mcActionSetFlags = 38; { param is long of flags }
+ mcActionGetFlags = 39; { param is pointer to a long of flags }
+ mcActionSetPlayEveryFrame = 40; { param is Boolean }
+ mcActionGetPlayEveryFrame = 41; { param is pointer to Boolean }
+ mcActionGetPlayRate = 42; { param is pointer to Fixed }
+ mcActionShowBalloon = 43; { param is a pointer to a boolean. set to false to stop balloon }
+ mcActionBadgeClick = 44; { param is pointer to Boolean. set to false to ignore click }
+ mcActionMovieClick = 45; { param is pointer to event record. change "what" to nullEvt to kill click }
+ mcActionSuspend = 46; { no param }
+ mcActionResume = 47; { no param }
+ mcActionSetControllerKeysEnabled = 48; { param is Boolean }
+ mcActionGetTimeSliderRect = 49; { param is pointer to rect }
+ mcActionMovieEdited = 50; { no param }
+ mcActionGetDragEnabled = 51; { param is pointer to Boolean }
+ mcActionSetDragEnabled = 52; { param is Boolean }
+ mcActionGetSelectionBegin = 53; { param is TimeRecord }
+ mcActionGetSelectionDuration = 54; { param is TimeRecord }
+ mcActionPrerollAndPlay = 55; { param is Fixed, play rate }
+ mcActionGetCursorSettingEnabled = 56; { param is pointer to Boolean }
+ mcActionSetCursorSettingEnabled = 57; { param is Boolean }
+ mcActionSetColorTable = 58; { param is CTabHandle }
+ mcActionLinkToURL = 59; { param is Handle to URL }
+ mcActionCustomButtonClick = 60; { param is pointer to EventRecord }
+ mcActionForceTimeTableUpdate = 61; { no param }
+ mcActionSetControllerTimeLimits = 62; { param is pointer to 2 time values min/max. do no send this message to controller. used internally only. }
+ mcActionExecuteAllActionsForQTEvent = 63; { param is ResolvedQTEventSpecPtr }
+ mcActionExecuteOneActionForQTEvent = 64; { param is ResolvedQTEventSpecPtr }
+ mcActionAdjustCursor = 65; { param is pointer to EventRecord (WindowRef is in message parameter) }
+ mcActionUseTrackForTimeTable = 66; { param is pointer to (long trackID; Boolean useIt). do not send this message to controller. }
+ mcActionClickAndHoldPoint = 67; { param is point (local coordinates). return true if point has click & hold action (e.g., VR object movie autorotate spot) }
+ mcActionShowMessageString = 68; { param is a StringPtr }
+ mcActionShowStatusString = 69; { param is a QTStatusStringPtr }
+ mcActionGetExternalMovie = 70; { param is a QTGetExternalMoviePtr }
+ mcActionGetChapterTime = 71; { param is a QTGetChapterTimePtr }
+ mcActionPerformActionList = 72; { param is a QTAtomSpecPtr }
+ mcActionEvaluateExpression = 73; { param is a QTEvaluateExpressionPtr }
+ mcActionFetchParameterAs = 74; { param is a QTFetchParameterAsPtr }
+ mcActionGetCursorByID = 75; { param is a QTGetCursorByIDPtr }
+ mcActionGetNextURL = 76; { param is a Handle to URL }
+ mcActionMovieChanged = 77;
+ mcActionDoScript = 78; { param is QTDoScriptPtr }
+ mcActionRestartAtTime = 79; { param is QTResartAtTimePtr }
+ mcActionGetIndChapter = 80; { param is QTChapterInfoPtr }
+ mcActionLinkToURLExtended = 81; { param is QTAtomContainer as used by QTParseHREF }
+ mcActionSetVolumeStep = 82; { param is short containing amount to step volume via arrow keys - default = 64 }
+ mcActionAutoPlay = 83; { param is Fixed, play rate }
+ mcActionPauseToBuffer = 84; { param is Fixed, play rate on restart }
+ mcActionAppMessageReceived = 85; { param is a long, application message }
+ mcActionEvaluateExpressionWithType = 89; { param is a QTEvaluateExpressionWithTypePtr }
+ mcActionGetMovieName = 90; { param is a p String Handle }
+ mcActionGetMovieID = 91; { param is pointer to long }
+ mcActionGetMovieActive = 92; { param is pointer to Boolean }
+
+
+type
+ mcAction = SInt16;
+
+const
+ mcFlagSuppressMovieFrame = $01;
+ mcFlagSuppressStepButtons = $02;
+ mcFlagSuppressSpeakerButton = $04;
+ mcFlagsUseWindowPalette = $08;
+ mcFlagsDontInvalidate = $10;
+ mcFlagsUseCustomButton = $20;
+
+
+ mcPositionDontInvalidate = $20;
+
+
+type
+ mcFlags = UInt32;
+
+const
+ kMCIEEnabledButtonPicture = 1;
+ kMCIEDisabledButtonPicture = 2;
+ kMCIEDepressedButtonPicture = 3;
+ kMCIEEnabledSizeBoxPicture = 4;
+ kMCIEDisabledSizeBoxPicture = 5;
+ kMCIEEnabledUnavailableButtonPicture = 6;
+ kMCIEDisabledUnavailableButtonPicture = 7;
+ kMCIESoundSlider = 128;
+ kMCIESoundThumb = 129;
+ kMCIEColorTable = 256;
+ kMCIEIsFlatAppearance = 257;
+ kMCIEDoButtonIconsDropOnDepress = 258;
+
+
+type
+ MCInterfaceElement = UInt32;
+{$ifc TYPED_FUNCTION_POINTERS}
+ MCActionFilterProcPtr = function(mc: MovieController; var action: SInt16; params: UnivPtr): boolean;
+{$elsec}
+ MCActionFilterProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ MCActionFilterWithRefConProcPtr = function(mc: MovieController; action: SInt16; params: UnivPtr; refCon: SInt32): boolean;
+{$elsec}
+ MCActionFilterWithRefConProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ MCActionFilterUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ MCActionFilterUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ MCActionFilterWithRefConUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ MCActionFilterWithRefConUPP = UniversalProcPtr;
+{$endc}
+ {
+ menu related stuff
+ }
+
+const
+ mcInfoUndoAvailable = $01;
+ mcInfoCutAvailable = $02;
+ mcInfoCopyAvailable = $04;
+ mcInfoPasteAvailable = $08;
+ mcInfoClearAvailable = $10;
+ mcInfoHasSound = $20;
+ mcInfoIsPlaying = $40;
+ mcInfoIsLooping = $80;
+ mcInfoIsInPalindrome = $0100;
+ mcInfoEditingEnabled = $0200;
+ mcInfoMovieIsInteractive = $0400;
+
+ { menu item codes }
+ mcMenuUndo = 1;
+ mcMenuCut = 3;
+ mcMenuCopy = 4;
+ mcMenuPaste = 5;
+ mcMenuClear = 6;
+
+ { messages to the application via mcActionAppMessageReceived }
+ kQTAppMessageSoftwareChanged = 1; { notification to app that installed QuickTime software has been updated }
+ kQTAppMessageWindowCloseRequested = 3; { request for app to close window containing movie controller }
+ kQTAppMessageExitFullScreenRequested = 4; { request for app to turn off full screen mode if active }
+ kQTAppMessageDisplayChannels = 5; { request for app to display the channel UI }
+ kQTAppMessageEnterFullScreenRequested = 6; { request for app to turn on full screen mode }
+
+ { structures used as mcActionFilterProc params }
+
+type
+ QTStatusStringRecordPtr = ^QTStatusStringRecord;
+ QTStatusStringRecord = record
+ stringTypeFlags: SInt32;
+ statusString: CStringPtr;
+ end;
+
+ QTStatusStringPtr = ^QTStatusStringRecord;
+ QTGetExternalMovieRecordPtr = ^QTGetExternalMovieRecord;
+ QTGetExternalMovieRecord = record
+ targetType: SInt32; { set to kTargetMovieName or kTargetMovieID }
+ movieName: StringPtr;
+ movieID: SInt32;
+ theMovie: MoviePtr;
+ theController: MovieControllerPtr;
+ end;
+
+ QTGetExternalMoviePtr = ^QTGetExternalMovieRecord;
+ QTGetChapterTimeRecordPtr = ^QTGetChapterTimeRecord;
+ QTGetChapterTimeRecord = record
+ chapterName: StringPtr;
+ chapterTime: TimeRecord;
+ end;
+
+ QTGetChapterTimePtr = ^QTGetChapterTimeRecord;
+ QTChapterInfoRecordPtr = ^QTChapterInfoRecord;
+ QTChapterInfoRecord = record
+ index: SInt32; { first chapter has index of 1 }
+ time: TimeValue; { -1 if no more chapters available }
+ name: Str255;
+ end;
+
+ QTChapterInfoPtr = ^QTChapterInfoRecord;
+ QTEvaluateExpressionRecordPtr = ^QTEvaluateExpressionRecord;
+ QTEvaluateExpressionRecord = record
+ expressionSpec: QTAtomSpec;
+ expressionResult: Float32Ptr;
+ end;
+
+ QTEvaluateExpressionPtr = ^QTEvaluateExpressionRecord;
+ QTEvaluateExpressionWithTypeRecordPtr = ^QTEvaluateExpressionWithTypeRecord;
+ QTEvaluateExpressionWithTypeRecord = record
+ recordSize: SInt32; { Size of structure (fill in at allocation) }
+ expressionSpec: QTAtomSpec;
+ expressionResult: Float32Ptr;
+ fetchAsType: SInt32;
+ nonNumericResult: Handle;
+ { Current size is 24 }
+ end;
+
+ QTEvaluateExpressionWithTypePtr = ^QTEvaluateExpressionWithTypeRecord;
+ QTFetchParameterAsRecordPtr = ^QTFetchParameterAsRecord;
+ QTFetchParameterAsRecord = record
+ paramListSpec: QTAtomSpec;
+ paramIndex: SInt32;
+ paramType: SInt32;
+ allowedFlags: SInt32;
+ min: Ptr;
+ max: Ptr;
+ currentValue: Ptr;
+ newValue: Ptr;
+ isUnsignedValue: boolean;
+ end;
+
+ QTFetchParameterAsPtr = ^QTFetchParameterAsRecord;
+ QTGetCursorByIDRecordPtr = ^QTGetCursorByIDRecord;
+ QTGetCursorByIDRecord = record
+ cursorID: SInt16;
+ colorCursorData: Handle;
+ reserved1: SInt32;
+ end;
+
+ QTGetCursorByIDPtr = ^QTGetCursorByIDRecord;
+ QTDoScriptRecordPtr = ^QTDoScriptRecord;
+ QTDoScriptRecord = record
+ scriptTypeFlags: SInt32;
+ command: CStringPtr;
+ arguments: CStringPtr;
+ end;
+
+ QTDoScriptPtr = ^QTDoScriptRecord;
+ QTRestartAtTimeRecordPtr = ^QTRestartAtTimeRecord;
+ QTRestartAtTimeRecord = record
+ startTime: TimeValue; { time scale is the movie timescale }
+ rate: Fixed; { if rate is zero, the movie's current rate is maintained }
+ end;
+
+ QTRestartAtTimePtr = ^QTRestartAtTimeRecord;
+ { values for paramType field of QTFetchParameterAsRecord }
+
+const
+ kFetchAsBooleanPtr = 1;
+ kFetchAsShortPtr = 2;
+ kFetchAsLongPtr = 3;
+ kFetchAsMatrixRecordPtr = 4;
+ kFetchAsModifierTrackGraphicsModeRecord = 5;
+ kFetchAsHandle = 6;
+ kFetchAsStr255 = 7;
+ kFetchAsFloatPtr = 8;
+ kFetchAsPointPtr = 9;
+ kFetchAsNewAtomContainer = 10;
+ kFetchAsQTEventRecordPtr = 11;
+ kFetchAsFixedPtr = 12;
+ kFetchAsSetControllerValuePtr = 13;
+ kFetchAsRgnHandle = 14; { flipped to native }
+ kFetchAsComponentDescriptionPtr = 15;
+ kFetchAsCString = 16;
+
+ kQTCursorOpenHand = -19183;
+ kQTCursorClosedHand = -19182;
+ kQTCursorPointingHand = -19181;
+ kQTCursorRightArrow = -19180;
+ kQTCursorLeftArrow = -19179;
+ kQTCursorDownArrow = -19178;
+ kQTCursorUpArrow = -19177;
+ kQTCursorIBeam = -19176;
+
+
+ { target management }
+ {
+ * MCSetMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCSetMovie(mc: MovieController; theMovie: Movie; movieWindow: WindowRef; where: Point): ComponentResult; external name '_MCSetMovie';
+{
+ * MCGetIndMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCGetIndMovie(mc: MovieController; index: SInt16): Movie; external name '_MCGetIndMovie';
+{
+ * MCRemoveAllMovies()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCRemoveAllMovies(mc: MovieController): ComponentResult; external name '_MCRemoveAllMovies';
+{
+ * MCRemoveAMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCRemoveAMovie(mc: MovieController; m: Movie): ComponentResult; external name '_MCRemoveAMovie';
+{
+ * MCRemoveMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCRemoveMovie(mc: MovieController): ComponentResult; external name '_MCRemoveMovie';
+{ event handling etc. }
+{
+ * MCIsPlayerEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCIsPlayerEvent(mc: MovieController; const (*var*) e: EventRecord): ComponentResult; external name '_MCIsPlayerEvent';
+{ obsolete. use MCSetActionFilterWithRefCon instead. }
+{
+ * MCSetActionFilter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCSetActionFilter(mc: MovieController; blob: MCActionFilterUPP): ComponentResult; external name '_MCSetActionFilter';
+{
+ proc is of the form:
+ Boolean userPlayerFilter(MovieController mc, short *action, void *params) =
+ proc returns TRUE if it handles the action, FALSE if not
+ action is passed as a var so that it could be changed by filter
+ this is consistent with the current dialog manager stuff
+ params is any potential parameters that go with the action
+ such as set playback rate to xxx.
+}
+{
+ * MCDoAction()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCDoAction(mc: MovieController; action: SInt16; params: UnivPtr): ComponentResult; external name '_MCDoAction';
+{ state type things }
+{
+ * MCSetControllerAttached()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCSetControllerAttached(mc: MovieController; attach: boolean): ComponentResult; external name '_MCSetControllerAttached';
+{
+ * MCIsControllerAttached()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCIsControllerAttached(mc: MovieController): ComponentResult; external name '_MCIsControllerAttached';
+{
+ * MCSetControllerPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCSetControllerPort(mc: MovieController; gp: CGrafPtr): ComponentResult; external name '_MCSetControllerPort';
+{
+ * MCGetControllerPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCGetControllerPort(mc: MovieController): CGrafPtr; external name '_MCGetControllerPort';
+{
+ * MCSetVisible()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCSetVisible(mc: MovieController; visible: boolean): ComponentResult; external name '_MCSetVisible';
+{
+ * MCGetVisible()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCGetVisible(mc: MovieController): ComponentResult; external name '_MCGetVisible';
+{
+ * MCGetControllerBoundsRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCGetControllerBoundsRect(mc: MovieController; var bounds: Rect): ComponentResult; external name '_MCGetControllerBoundsRect';
+{
+ * MCSetControllerBoundsRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCSetControllerBoundsRect(mc: MovieController; const (*var*) bounds: Rect): ComponentResult; external name '_MCSetControllerBoundsRect';
+{
+ * MCGetControllerBoundsRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCGetControllerBoundsRgn(mc: MovieController): RgnHandle; external name '_MCGetControllerBoundsRgn';
+{
+ * MCGetWindowRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCGetWindowRgn(mc: MovieController; w: WindowRef): RgnHandle; external name '_MCGetWindowRgn';
+{ other stuff }
+{
+ * MCMovieChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCMovieChanged(mc: MovieController; m: Movie): ComponentResult; external name '_MCMovieChanged';
+{
+ called when the app has changed thing about the movie (like bounding rect) or rate. So that we
+ can update our graphical (and internal) state accordingly.
+}
+{
+ * MCSetDuration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCSetDuration(mc: MovieController; duration: TimeValue): ComponentResult; external name '_MCSetDuration';
+{
+ duration to use for time slider -- will be reset next time MCMovieChanged is called
+ or MCSetMovie is called
+}
+{
+ * MCGetCurrentTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCGetCurrentTime(mc: MovieController; var scale: TimeScale): TimeValue; external name '_MCGetCurrentTime';
+{
+ returns the time value and the time scale it is on. if there are no movies, the
+ time scale is passed back as 0. scale is an optional parameter
+
+}
+{
+ * MCNewAttachedController()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCNewAttachedController(mc: MovieController; theMovie: Movie; w: WindowRef; where: Point): ComponentResult; external name '_MCNewAttachedController';
+{
+ makes theMovie the only movie attached to the controller. makes the controller visible.
+ the window and where parameters are passed a long to MCSetMovie and behave as
+ described there
+}
+{
+ * MCDraw()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCDraw(mc: MovieController; w: WindowRef): ComponentResult; external name '_MCDraw';
+{
+ * MCActivate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCActivate(mc: MovieController; w: WindowRef; activate: boolean): ComponentResult; external name '_MCActivate';
+{
+ * MCIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCIdle(mc: MovieController): ComponentResult; external name '_MCIdle';
+{
+ * MCKey()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCKey(mc: MovieController; key: SInt8; modifiers: SInt32): ComponentResult; external name '_MCKey';
+{
+ * MCClick()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCClick(mc: MovieController; w: WindowRef; where: Point; when: SInt32; modifiers: SInt32): ComponentResult; external name '_MCClick';
+{
+ calls for editing
+}
+{
+ * MCEnableEditing()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCEnableEditing(mc: MovieController; enabled: boolean): ComponentResult; external name '_MCEnableEditing';
+{
+ * MCIsEditingEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCIsEditingEnabled(mc: MovieController): SInt32; external name '_MCIsEditingEnabled';
+{
+ * MCCopy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCCopy(mc: MovieController): Movie; external name '_MCCopy';
+{
+ * MCCut()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCCut(mc: MovieController): Movie; external name '_MCCut';
+{
+ * MCPaste()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCPaste(mc: MovieController; srcMovie: Movie): ComponentResult; external name '_MCPaste';
+{
+ * MCClear()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCClear(mc: MovieController): ComponentResult; external name '_MCClear';
+{
+ * MCUndo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCUndo(mc: MovieController): ComponentResult; external name '_MCUndo';
+{
+ * somewhat special stuff
+ }
+{
+ * MCPositionController()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCPositionController(mc: MovieController; const (*var*) movieRect: Rect; const (*var*) controllerRect: Rect; someFlags: SInt32): ComponentResult; external name '_MCPositionController';
+{
+ * MCGetControllerInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCGetControllerInfo(mc: MovieController; var someFlags: SInt32): ComponentResult; external name '_MCGetControllerInfo';
+{
+ * MCSetClip()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCSetClip(mc: MovieController; theClip: RgnHandle; movieClip: RgnHandle): ComponentResult; external name '_MCSetClip';
+{
+ * MCGetClip()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCGetClip(mc: MovieController; var theClip: RgnHandle; var movieClip: RgnHandle): ComponentResult; external name '_MCGetClip';
+{
+ * MCDrawBadge()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCDrawBadge(mc: MovieController; movieRgn: RgnHandle; var badgeRgn: RgnHandle): ComponentResult; external name '_MCDrawBadge';
+{
+ * MCSetUpEditMenu()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCSetUpEditMenu(mc: MovieController; modifiers: SInt32; mh: MenuRef): ComponentResult; external name '_MCSetUpEditMenu';
+{
+ * MCGetMenuString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCGetMenuString(mc: MovieController; modifiers: SInt32; item: SInt16; var aString: Str255): ComponentResult; external name '_MCGetMenuString';
+{
+ * MCSetActionFilterWithRefCon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCSetActionFilterWithRefCon(mc: MovieController; blob: MCActionFilterWithRefConUPP; refCon: SInt32): ComponentResult; external name '_MCSetActionFilterWithRefCon';
+{
+ * MCPtInController()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCPtInController(mc: MovieController; thePt: Point; var inController: boolean): ComponentResult; external name '_MCPtInController';
+{
+ * MCInvalidate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCInvalidate(mc: MovieController; w: WindowRef; invalidRgn: RgnHandle): ComponentResult; external name '_MCInvalidate';
+{
+ * MCAdjustCursor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCAdjustCursor(mc: MovieController; w: WindowRef; where: Point; modifiers: SInt32): ComponentResult; external name '_MCAdjustCursor';
+{
+ * MCGetInterfaceElement()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MCGetInterfaceElement(mc: MovieController; whichElement: MCInterfaceElement; element: UnivPtr): ComponentResult; external name '_MCGetInterfaceElement';
+{
+ * MCGetDoActionsProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MCGetDoActionsProc(mc: MovieController; var doMCActionProc: DoMCActionUPP; var doMCActionRefCon: SInt32): ComponentResult; external name '_MCGetDoActionsProc';
+{
+ * MCAddMovieSegment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function MCAddMovieSegment(mc: MovieController; srcMovie: Movie; scaled: boolean): ComponentResult; external name '_MCAddMovieSegment';
+{
+ * MCTrimMovieSegment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function MCTrimMovieSegment(mc: MovieController): ComponentResult; external name '_MCTrimMovieSegment';
+{
+ * MCSetIdleManager()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function MCSetIdleManager(mc: MovieController; im: IdleManager): ComponentResult; external name '_MCSetIdleManager';
+{ Called (but not implemented) by controllers that derive from the standard movie controller.
+ All controllers except standard movie controller must delegate this call. }
+
+const
+ kControllerUnderstandsIdleManagers = $01;
+
+ {
+ * MCSetControllerCapabilities()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function MCSetControllerCapabilities(mc: MovieController; flags: SInt32; flagsMask: SInt32): ComponentResult; external name '_MCSetControllerCapabilities';
+{***************************************
+* *
+* T I M E B A S E *
+* *
+***************************************}
+{
+ * NewTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewTimeBase: TimeBase; external name '_NewTimeBase';
+{
+ * DisposeTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure DisposeTimeBase(tb: TimeBase); external name '_DisposeTimeBase';
+{
+ * GetTimeBaseTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTimeBaseTime(tb: TimeBase; s: TimeScale; var tr: TimeRecord): TimeValue; external name '_GetTimeBaseTime';
+{
+ * SetTimeBaseTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTimeBaseTime(tb: TimeBase; const (*var*) tr: TimeRecord); external name '_SetTimeBaseTime';
+{
+ * SetTimeBaseValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTimeBaseValue(tb: TimeBase; t: TimeValue; s: TimeScale); external name '_SetTimeBaseValue';
+{
+ * GetTimeBaseRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTimeBaseRate(tb: TimeBase): Fixed; external name '_GetTimeBaseRate';
+{
+ * SetTimeBaseRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTimeBaseRate(tb: TimeBase; r: Fixed); external name '_SetTimeBaseRate';
+{
+ * GetTimeBaseStartTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTimeBaseStartTime(tb: TimeBase; s: TimeScale; var tr: TimeRecord): TimeValue; external name '_GetTimeBaseStartTime';
+{
+ * SetTimeBaseStartTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTimeBaseStartTime(tb: TimeBase; const (*var*) tr: TimeRecord); external name '_SetTimeBaseStartTime';
+{
+ * GetTimeBaseStopTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTimeBaseStopTime(tb: TimeBase; s: TimeScale; var tr: TimeRecord): TimeValue; external name '_GetTimeBaseStopTime';
+{
+ * SetTimeBaseStopTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTimeBaseStopTime(tb: TimeBase; const (*var*) tr: TimeRecord); external name '_SetTimeBaseStopTime';
+{
+ * GetTimeBaseFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTimeBaseFlags(tb: TimeBase): SInt32; external name '_GetTimeBaseFlags';
+{
+ * SetTimeBaseFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTimeBaseFlags(tb: TimeBase; timeBaseFlags: SInt32); external name '_SetTimeBaseFlags';
+{
+ * SetTimeBaseMasterTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTimeBaseMasterTimeBase(slave: TimeBase; master: TimeBase; const (*var*) slaveZero: TimeRecord); external name '_SetTimeBaseMasterTimeBase';
+{
+ * GetTimeBaseMasterTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTimeBaseMasterTimeBase(tb: TimeBase): TimeBase; external name '_GetTimeBaseMasterTimeBase';
+{
+ * SetTimeBaseMasterClock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTimeBaseMasterClock(slave: TimeBase; clockMeister: Component; const (*var*) slaveZero: TimeRecord); external name '_SetTimeBaseMasterClock';
+{
+ * GetTimeBaseMasterClock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTimeBaseMasterClock(tb: TimeBase): ComponentInstance; external name '_GetTimeBaseMasterClock';
+{
+ * ConvertTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure ConvertTime(var theTime: TimeRecord; newBase: TimeBase); external name '_ConvertTime';
+{
+ * ConvertTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure ConvertTimeScale(var theTime: TimeRecord; newScale: TimeScale); external name '_ConvertTimeScale';
+{
+ * AddTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure AddTime(var dst: TimeRecord; const (*var*) src: TimeRecord); external name '_AddTime';
+{
+ * SubtractTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SubtractTime(var dst: TimeRecord; const (*var*) src: TimeRecord); external name '_SubtractTime';
+{
+ * GetTimeBaseStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTimeBaseStatus(tb: TimeBase; var unpinnedTime: TimeRecord): SInt32; external name '_GetTimeBaseStatus';
+{
+ * SetTimeBaseZero()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure SetTimeBaseZero(tb: TimeBase; var zero: TimeRecord); external name '_SetTimeBaseZero';
+{
+ * GetTimeBaseEffectiveRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetTimeBaseEffectiveRate(tb: TimeBase): Fixed; external name '_GetTimeBaseEffectiveRate';
+{***************************************
+* *
+* C A L L B A C K *
+* *
+***************************************}
+{
+ * NewCallBack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NewCallBack(tb: TimeBase; cbType: SInt16): QTCallBack; external name '_NewCallBack';
+{
+ * DisposeCallBack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure DisposeCallBack(cb: QTCallBack); external name '_DisposeCallBack';
+{
+ * GetCallBackType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetCallBackType(cb: QTCallBack): SInt16; external name '_GetCallBackType';
+{
+ * GetCallBackTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetCallBackTimeBase(cb: QTCallBack): TimeBase; external name '_GetCallBackTimeBase';
+{
+ * CallMeWhen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CallMeWhen(cb: QTCallBack; callBackProc: QTCallBackUPP; refCon: SInt32; param1: SInt32; param2: SInt32; param3: SInt32): OSErr; external name '_CallMeWhen';
+{
+ * CancelCallBack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure CancelCallBack(cb: QTCallBack); external name '_CancelCallBack';
+{***************************************
+* *
+* C L O C K C A L L B A C K *
+* S U P P O R T *
+* *
+***************************************}
+{
+ * AddCallBackToTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function AddCallBackToTimeBase(cb: QTCallBack): OSErr; external name '_AddCallBackToTimeBase';
+{
+ * RemoveCallBackFromTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function RemoveCallBackFromTimeBase(cb: QTCallBack): OSErr; external name '_RemoveCallBackFromTimeBase';
+{
+ * GetFirstCallBack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetFirstCallBack(tb: TimeBase): QTCallBack; external name '_GetFirstCallBack';
+{
+ * GetNextCallBack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GetNextCallBack(cb: QTCallBack): QTCallBack; external name '_GetNextCallBack';
+{
+ * ExecuteCallBack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+procedure ExecuteCallBack(cb: QTCallBack); external name '_ExecuteCallBack';
+{
+ * MusicMediaGetIndexedTunePlayer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicMediaGetIndexedTunePlayer(ti: ComponentInstance; sampleDescIndex: SInt32; var tp: ComponentInstance): ComponentResult; external name '_MusicMediaGetIndexedTunePlayer';
+{ UPP call backs }
+
+const
+ uppMCActionFilterProcInfo = $00000FD0;
+ uppMCActionFilterWithRefConProcInfo = $00003ED0;
+ {
+ * NewMCActionFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewMCActionFilterUPP(userRoutine: MCActionFilterProcPtr): MCActionFilterUPP; external name '_NewMCActionFilterUPP'; { old name was NewMCActionFilterProc }
+{
+ * NewMCActionFilterWithRefConUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewMCActionFilterWithRefConUPP(userRoutine: MCActionFilterWithRefConProcPtr): MCActionFilterWithRefConUPP; external name '_NewMCActionFilterWithRefConUPP'; { old name was NewMCActionFilterWithRefConProc }
+{
+ * DisposeMCActionFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeMCActionFilterUPP(userUPP: MCActionFilterUPP); external name '_DisposeMCActionFilterUPP';
+{
+ * DisposeMCActionFilterWithRefConUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeMCActionFilterWithRefConUPP(userUPP: MCActionFilterWithRefConUPP); external name '_DisposeMCActionFilterWithRefConUPP';
+{
+ * InvokeMCActionFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeMCActionFilterUPP(mc: MovieController; var action: SInt16; params: UnivPtr; userRoutine: MCActionFilterUPP): boolean; external name '_InvokeMCActionFilterUPP'; { old name was CallMCActionFilterProc }
+{
+ * InvokeMCActionFilterWithRefConUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeMCActionFilterWithRefConUPP(mc: MovieController; action: SInt16; params: UnivPtr; refCon: SInt32; userRoutine: MCActionFilterWithRefConUPP): boolean; external name '_InvokeMCActionFilterWithRefConUPP'; { old name was CallMCActionFilterWithRefConProc }
+{$ALIGN MAC68K}
+
+
+{unit MoviesFormat}
+{
+ File: MoviesFormat.p
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1990-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ kMovieVersion = 0; { version number of the format here described }
+
+ { ***************************************
+ *
+ * General Types -
+ * These types are used in more than one of the
+ * directory types.
+ *
+ *************************************** }
+ { MoviesUserData is the type used for user data in movie and track directories }
+
+type
+ MoviesUserDataPtr = ^MoviesUserData;
+ MoviesUserData = record
+ size: SInt32; { size of this user data }
+ udType: SInt32; { type of user data }
+ data: SInt8; { the user data }
+ end;
+
+ UserDataAtomPtr = ^UserDataAtom;
+ UserDataAtom = record
+ size: SInt32;
+ atomType: SInt32;
+ userData: array [0..0] of MoviesUserData;
+ end;
+
+ { MoviesDataDescription tells us where the data for the movie or track lives.
+ The data can follow the directory, be in the datafork of the same file as the directory resource,
+ be in the resource fork of the same file as the directory resource, be in another file in the
+ data fork or resource fork, or require a specific bottleneck to fetch the data. }
+ { ***************************************
+ *
+ * MediaDirectory information -
+ * The MediaDirectory is tightly coupled to the data.
+ *
+ *************************************** }
+
+ SampleDescriptionAtomPtr = ^SampleDescriptionAtom;
+ SampleDescriptionAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'stsd' }
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ numEntries: SInt32;
+ sampleDescTable: array [0..0] of SampleDescription;
+ end;
+
+ { TimeToSampleNum maps physical sample time to physical sample number. }
+ TimeToSampleNumPtr = ^TimeToSampleNum;
+ TimeToSampleNum = record
+ sampleCount: SInt32;
+ sampleDuration: TimeValue;
+ end;
+
+ TimeToSampleNumAtomPtr = ^TimeToSampleNumAtom;
+ TimeToSampleNumAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'stts' }
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ numEntries: SInt32;
+ timeToSampleNumTable: array [0..0] of TimeToSampleNum;
+ end;
+
+ { SyncSamples is a list of the physical samples which are self contained. }
+ SyncSampleAtomPtr = ^SyncSampleAtom;
+ SyncSampleAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'stss' }
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ numEntries: SInt32;
+ syncSampleTable: array [0..0] of SInt32;
+ end;
+
+ { SampleToChunk maps physical sample number to chunk number. }
+ { same as SampleToChunk, but redundant first sample is removed }
+ SampleToChunkPtr = ^SampleToChunk;
+ SampleToChunk = record
+ firstChunk: SInt32;
+ samplesPerChunk: SInt32;
+ sampleDescriptionID: SInt32;
+ end;
+
+ SampleToChunkAtomPtr = ^SampleToChunkAtom;
+ SampleToChunkAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'stsc' }
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ numEntries: SInt32;
+ sampleToChunkTable: array [0..0] of SampleToChunk;
+ end;
+
+ ChunkOffsetAtomPtr = ^ChunkOffsetAtom;
+ ChunkOffsetAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'stco' }
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ numEntries: SInt32;
+ chunkOffsetTable: array [0..0] of SInt32;
+ end;
+
+ SampleSizeAtomPtr = ^SampleSizeAtom;
+ SampleSizeAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'stsz' }
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ sampleSize: SInt32;
+ numEntries: SInt32;
+ sampleSizeTable: array [0..0] of SInt32;
+ end;
+
+ ShadowSyncPtr = ^ShadowSync;
+ ShadowSync = record
+ fdSampleNum: SInt32;
+ syncSampleNum: SInt32;
+ end;
+
+ ShadowSyncAtomPtr = ^ShadowSyncAtom;
+ ShadowSyncAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'stsz' }
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ numEntries: SInt32;
+ shadowSyncTable: array [0..0] of ShadowSync;
+ end;
+
+ SampleTableAtomPtr = ^SampleTableAtom;
+ SampleTableAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'stbl' }
+ sampleDescription: SampleDescriptionAtom;
+ timeToSampleNum: TimeToSampleNumAtom;
+ sampleToChunk: SampleToChunkAtom;
+ syncSample: SyncSampleAtom;
+ sampleSize: SampleSizeAtom;
+ chunkOffset: ChunkOffsetAtom;
+ shadowSync: ShadowSyncAtom;
+ end;
+
+ PublicHandlerInfoPtr = ^PublicHandlerInfo;
+ PublicHandlerInfo = record
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ componentType: SInt32;
+ componentSubType: SInt32;
+ componentManufacturer: SInt32;
+ componentFlags: SInt32;
+ componentFlagsMask: SInt32;
+ componentName: SInt8;
+ end;
+
+ HandlerAtomPtr = ^HandlerAtom;
+ HandlerAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'hdlr' }
+ hInfo: PublicHandlerInfo;
+ end;
+
+ { a data reference is a private structure }
+ DataRefAtom = SInt32;
+ DataInfoAtomPtr = ^DataInfoAtom;
+ DataInfoAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'dinf' }
+ dataRef: DataRefAtom;
+ end;
+
+ RgnAtomPtr = ^RgnAtom;
+ RgnAtom = record
+ size: SInt32;
+ atomType: SInt32;
+ rgnSize: SInt16;
+ rgnBBox: Rect;
+ data: SInt8;
+ end;
+
+ MatteCompressedAtomPtr = ^MatteCompressedAtom;
+ MatteCompressedAtom = record
+ size: SInt32;
+ atomType: SInt32;
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ matteImageDescription: ImageDescription;
+ matteData: SInt8;
+ end;
+
+ MatteAtomPtr = ^MatteAtom;
+ MatteAtom = record
+ size: SInt32;
+ atomType: SInt32;
+ aCompressedMatte: MatteCompressedAtom;
+ end;
+
+ ClippingAtomPtr = ^ClippingAtom;
+ ClippingAtom = record
+ size: SInt32;
+ atomType: SInt32;
+ aRgnClip: RgnAtom;
+ end;
+
+ { **********************
+ * Media Info Example Structures
+ ********************** }
+
+ VideoMediaInfoHeaderPtr = ^VideoMediaInfoHeader;
+ VideoMediaInfoHeader = record
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ graphicsMode: SInt16; { for QD - transfer mode }
+ opColorRed: SInt16; { opcolor for transfer mode }
+ opColorGreen: SInt16;
+ opColorBlue: SInt16;
+ end;
+
+ VideoMediaInfoHeaderAtomPtr = ^VideoMediaInfoHeaderAtom;
+ VideoMediaInfoHeaderAtom = record
+ size: SInt32; { size of Media info }
+ atomType: SInt32; { = 'vmhd' }
+ vmiHeader: VideoMediaInfoHeader;
+ end;
+
+ VideoMediaInfoPtr = ^VideoMediaInfo;
+ VideoMediaInfo = record
+ size: SInt32; { size of Media info }
+ atomType: SInt32; { = 'minf' }
+ header: VideoMediaInfoHeaderAtom;
+ dataHandler: HandlerAtom;
+ dataInfo: DataInfoAtom;
+ sampleTable: SampleTableAtom;
+ end;
+
+ SoundMediaInfoHeaderPtr = ^SoundMediaInfoHeader;
+ SoundMediaInfoHeader = record
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ balance: SInt16;
+ rsrvd: SInt16;
+ end;
+
+ SoundMediaInfoHeaderAtomPtr = ^SoundMediaInfoHeaderAtom;
+ SoundMediaInfoHeaderAtom = record
+ size: SInt32; { size of Media info }
+ atomType: SInt32; { = 'vmhd' }
+ smiHeader: SoundMediaInfoHeader;
+ end;
+
+ SoundMediaInfoPtr = ^SoundMediaInfo;
+ SoundMediaInfo = record
+ size: SInt32; { size of Media info }
+ atomType: SInt32; { = 'minf' }
+ header: SoundMediaInfoHeaderAtom;
+ dataHandler: HandlerAtom;
+ dataReference: DataRefAtom;
+ sampleTable: SampleTableAtom;
+ end;
+
+ { whatever data the media handler needs goes after the atomType }
+ MediaInfoPtr = ^MediaInfo;
+ MediaInfo = record
+ size: SInt32;
+ atomType: SInt32;
+ end;
+ MediaInfo_fix = MediaInfo; { used as field type when a record declaration contains a MediaInfo field identifier }
+
+ { **********************
+ * Media Directory Structures
+ ********************** }
+ MediaHeaderPtr = ^MediaHeader;
+ MediaHeader = record
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ creationTime: SInt32; { seconds since Jan 1904 when directory was created }
+ modificationTime: SInt32; { seconds since Jan 1904 when directory was appended }
+ timeScale: TimeValue; { start time for Media (Media time) }
+ duration: TimeValue; { length of Media (Media time) }
+ language: SInt16;
+ quality: SInt16;
+ end;
+
+ MediaHeaderAtomPtr = ^MediaHeaderAtom;
+ MediaHeaderAtom = record
+ size: SInt32;
+ atomType: SInt32;
+ header: MediaHeader;
+ end;
+
+ MediaDirectoryPtr = ^MediaDirectory;
+ MediaDirectory = record
+ size: SInt32;
+ atomType: SInt32; { = 'mdia' }
+ mediaHeader: MediaHeaderAtom; { standard Media information }
+ mediaHandler: HandlerAtom;
+ mediaInfo: MediaInfo_fix;
+ end;
+
+ { **********************
+ * Track Structures
+ ********************** }
+
+const
+ TrackEnable = $01;
+ TrackInMovie = $02;
+ TrackInPreview = $04;
+ TrackInPoster = $08;
+
+
+type
+ TrackHeaderPtr = ^TrackHeader;
+ TrackHeader = record
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ creationTime: SInt32; { seconds since Jan 1904 when directory was created }
+ modificationTime: SInt32; { seconds since Jan 1904 when directory was appended }
+ trackID: SInt32;
+ reserved1: SInt32;
+ duration: TimeValue; { length of track (track time) }
+ reserved2: SInt32;
+ reserved3: SInt32;
+ layer: SInt16;
+ alternateGroup: SInt16;
+ volume: SInt16;
+ reserved4: SInt16;
+ matrix: MatrixRecord;
+ trackWidth: Fixed;
+ trackHeight: Fixed;
+ end;
+
+ TrackHeaderAtomPtr = ^TrackHeaderAtom;
+ TrackHeaderAtom = record
+ size: SInt32; { size of track header }
+ atomType: SInt32; { = 'tkhd' }
+ header: TrackHeader;
+ end;
+
+ EditListTypePtr = ^EditListType;
+ EditListType = record
+ trackDuration: TimeValue;
+ mediaTime: TimeValue;
+ mediaRate: Fixed;
+ end;
+
+ EditListAtomPtr = ^EditListAtom;
+ EditListAtom = record
+ size: SInt32;
+ atomType: SInt32; { = elst }
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ numEntries: SInt32;
+ editListTable: array [0..0] of EditListType;
+ end;
+
+ EditsAtomPtr = ^EditsAtom;
+ EditsAtom = record
+ size: SInt32;
+ atomType: SInt32; { = edts }
+ editList: EditListAtom;
+ end;
+
+ TrackLoadSettingsPtr = ^TrackLoadSettings;
+ TrackLoadSettings = record
+ preloadStartTime: TimeValue;
+ preloadDuration: TimeValue;
+ preloadFlags: SInt32;
+ defaultHints: SInt32;
+ end;
+
+ TrackLoadSettingsAtomPtr = ^TrackLoadSettingsAtom;
+ TrackLoadSettingsAtom = record
+ size: SInt32;
+ atomType: SInt32; { = load }
+ settings: TrackLoadSettings;
+ end;
+
+ TrackDirectoryPtr = ^TrackDirectory;
+ TrackDirectory = record
+ size: SInt32;
+ atomType: SInt32; { = 'trak' }
+ trackHeader: TrackHeaderAtom; { standard track information }
+ trackClip: ClippingAtom;
+ edits: EditsAtom;
+ media: MediaDirectory;
+ userData: UserDataAtom; { space for extending with new data types }
+ end;
+ TrackDirectory_fix = TrackDirectory; { used as field type when a record declaration contains a TrackDirectory field identifier }
+
+ { ***************************************
+ *
+ * MovieDirectory -
+ * The MovieDirectory is the top level structure which
+ * holds the TrackInstance describing where the
+ * TrackDirectories are.
+ *
+ *************************************** }
+ MovieHeaderPtr = ^MovieHeader;
+ MovieHeader = record
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ creationTime: SInt32; { seconds since Jan 1904 when directory was created }
+ modificationTime: SInt32; { seconds since Jan 1904 when directory was appended }
+ timeScale: TimeValue; { Time specifications }
+ duration: TimeValue;
+ preferredRate: Fixed; { rate at which to play this movie }
+ preferredVolume: SInt16; { volume to play movie at }
+ reserved1: SInt16;
+ preferredLong1: SInt32;
+ preferredLong2: SInt32;
+ matrix: MatrixRecord;
+ previewTime: TimeValue; { time in track the proxy begins (track time) }
+ previewDuration: TimeValue; { how long the proxy lasts (track time) }
+ posterTime: TimeValue; { time in track the proxy begins (track time) }
+ selectionTime: TimeValue; { time in track the proxy begins (track time) }
+ selectionDuration: TimeValue; { time in track the proxy begins (track time) }
+ currentTime: TimeValue; { time in track the proxy begins (track time) }
+ nextTrackID: SInt32; { next value to use for a TrackID }
+ end;
+
+ MovieHeaderAtomPtr = ^MovieHeaderAtom;
+ MovieHeaderAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'mvhd' }
+ header: MovieHeader;
+ end;
+
+ TrackDirectoryEntryPtr = ^TrackDirectoryEntry;
+ TrackDirectoryEntry = record
+ trackDirectory: TrackDirectory_fix; { Track directory information }
+ end;
+
+ MovieDirectoryPtr = ^MovieDirectory;
+ MovieDirectory = record
+ size: SInt32;
+ atomType: SInt32; { = 'moov' }
+ header: MovieHeaderAtom;
+ movieClip: ClippingAtom;
+ { Track Directories }
+ track: array [0..0] of TrackDirectoryEntry; { Track directory information }
+ { User data for Movie }
+ userData: UserDataAtom; { space for user extensions }
+ end;
+
+ { ***************************************
+ *************************************** }
+
+ { Movie formats and tags }
+
+const
+ { some system defined format IDs }
+ MOVIE_TYPE = $6D6F6F76 (* 'moov' *);
+ TRACK_TYPE = $7472616B (* 'trak' *);
+ MEDIA_TYPE = $6D646961 (* 'mdia' *);
+ VIDEO_TYPE = $76696465 (* 'vide' *);
+ SOUND_TYPE = $736F756E (* 'soun' *);
+
+ { atom id's }
+ MovieAID = $6D6F6F76 (* 'moov' *);
+ MovieHeaderAID = $6D766864 (* 'mvhd' *);
+ ClipAID = $636C6970 (* 'clip' *);
+ RgnClipAID = $6372676E (* 'crgn' *);
+ MatteAID = $6D617474 (* 'matt' *);
+ MatteCompAID = $6B6D6174 (* 'kmat' *);
+ TrackAID = $7472616B (* 'trak' *);
+ UserDataAID = $75647461 (* 'udta' *);
+ TrackHeaderAID = $746B6864 (* 'tkhd' *);
+ EditsAID = $65647473 (* 'edts' *);
+ EditListAID = $656C7374 (* 'elst' *);
+ MediaAID = $6D646961 (* 'mdia' *);
+ MediaHeaderAID = $6D646864 (* 'mdhd' *);
+ MediaInfoAID = $6D696E66 (* 'minf' *);
+ VideoMediaInfoHeaderAID = $766D6864 (* 'vmhd' *);
+ SoundMediaInfoHeaderAID = $736D6864 (* 'smhd' *);
+ GenericMediaInfoHeaderAID = $676D6864 (* 'gmhd' *);
+ GenericMediaInfoAID = $676D696E (* 'gmin' *);
+ DataInfoAID = $64696E66 (* 'dinf' *);
+ DataRefAID = $64726566 (* 'dref' *);
+ SampleTableAID = $7374626C (* 'stbl' *);
+ STSampleDescAID = $73747364 (* 'stsd' *);
+ STTimeToSampAID = $73747473 (* 'stts' *);
+ STSyncSampleAID = $73747373 (* 'stss' *);
+ STSampleToChunkAID = $73747363 (* 'stsc' *);
+ STShadowSyncAID = $73747368 (* 'stsh' *);
+ HandlerAID = $68646C72 (* 'hdlr' *);
+ STSampleSizeAID = $7374737A (* 'stsz' *);
+ STChunkOffsetAID = $7374636F (* 'stco' *);
+ STChunkOffset64AID = $636F3634 (* 'co64' *);
+ STSampleIDAID = $73746964 (* 'stid' *);
+ DataRefContainerAID = $64726663 (* 'drfc' *);
+ TrackReferenceAID = $74726566 (* 'tref' *);
+ ColorTableAID = $63746162 (* 'ctab' *);
+ LoadSettingsAID = $6C6F6164 (* 'load' *);
+ PropertyAtomAID = $636F6465 (* 'code' *);
+ InputMapAID = $696D6170 (* 'imap' *);
+ MovieBufferHintsAID = $6D626668 (* 'mbfh' *);
+ MovieDataRefAliasAID = $6D647261 (* 'mdra' *);
+ SoundLocalizationAID = $736C6F63 (* 'sloc' *);
+ CompressedMovieAID = $636D6F76 (* 'cmov' *);
+ CompressedMovieDataAID = $636D7664 (* 'cmvd' *);
+ DataCompressionAtomAID = $64636F6D (* 'dcom' *);
+ ReferenceMovieRecordAID = $726D7261 (* 'rmra' *);
+ ReferenceMovieDescriptorAID = $726D6461 (* 'rmda' *);
+ ReferenceMovieDataRefAID = $72647266 (* 'rdrf' *);
+ ReferenceMovieVersionCheckAID = $726D7663 (* 'rmvc' *);
+ ReferenceMovieDataRateAID = $726D6472 (* 'rmdr' *);
+ ReferenceMovieComponentCheckAID = $726D6364 (* 'rmcd' *);
+ ReferenceMovieQualityAID = $726D7175 (* 'rmqu' *);
+ ReferenceMovieLanguageAID = $726D6C61 (* 'rmla' *);
+ ReferenceMovieCPURatingAID = $726D6373 (* 'rmcs' *);
+ ReferenceMovieAlternateGroupAID = $726D6167 (* 'rmag' *);
+ ReferenceMovieNetworkStatusAID = $726E6574 (* 'rnet' *);
+ CloneMediaAID = $636C6F6E (* 'clon' *);
+ FileTypeAID = $66747970 (* 'ftyp' *);
+ SecureContentInfoAID = $73696E66 (* 'sinf' *);
+ SecureContentSchemeTypeAID = $7363686D (* 'schm' *);
+ SecureContentSchemeInfoAID = $73636869 (* 'schi' *);
+
+ { Text ATOM definitions }
+
+
+type
+ TextBoxAtomPtr = ^TextBoxAtom;
+ TextBoxAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'tbox' }
+ textBox: Rect; { New text box (overrides defaultTextBox) }
+ end;
+
+ HiliteAtomPtr = ^HiliteAtom;
+ HiliteAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'hlit' }
+ selStart: SInt32; { hilite selection start character }
+ selEnd: SInt32; { hilite selection end character }
+ end;
+
+ KaraokeRecPtr = ^KaraokeRec;
+ KaraokeRec = record
+ timeVal: TimeValue;
+ beginHilite: SInt16;
+ endHilite: SInt16;
+ end;
+
+ KaraokeAtomPtr = ^KaraokeAtom;
+ KaraokeAtom = record
+ numEntries: SInt32;
+ karaokeEntries: array [0..0] of KaraokeRec;
+ end;
+
+ { for ReferenceMovieDataRefRecord.flags }
+
+const
+ kDataRefIsSelfContained = $01;
+
+
+type
+ ReferenceMovieDataRefRecordPtr = ^ReferenceMovieDataRefRecord;
+ ReferenceMovieDataRefRecord = record
+ flags: SInt32;
+ dataRefType: OSType;
+ dataRefSize: SInt32;
+ dataRef: SInt8;
+ end;
+
+ { for VersionCheckRecord.checkType }
+
+const
+ kVersionCheckMin = 0; { val1 is the min. version required }
+ kVersionCheckMask = 1; { (gestalt return value & val2) must == val1 }
+
+
+type
+ QTAltVersionCheckRecordPtr = ^QTAltVersionCheckRecord;
+ QTAltVersionCheckRecord = record
+ flags: SInt32; { currently always 0 }
+ gestaltTag: OSType;
+ val1: UInt32;
+ val2: UInt32;
+ checkType: SInt16;
+ end;
+
+ { some helpful constants for DataRateRecord.dataRate }
+
+const
+ kDataRate144ModemRate = 1400;
+ kDataRate288ModemRate = 2800;
+ kDataRateISDNRate = 5600;
+ kDataRateDualISDNRate = 11200;
+ kDataRate256kbpsRate = 25600;
+ kDataRate384kbpsRate = 38400;
+ kDataRate512kbpsRate = 51200;
+ kDataRate768kbpsRate = 76800;
+ kDataRate1MbpsRate = 100000;
+ kDataRateT1Rate = 150000;
+ kDataRateInfiniteRate = $7FFFFFFF;
+ kDataRateDefaultIfNotSet = 5600;
+
+
+type
+ QTAltDataRateRecordPtr = ^QTAltDataRateRecord;
+ QTAltDataRateRecord = record
+ flags: SInt32; { currently always 0 }
+ dataRate: SInt32;
+ end;
+
+ QTAltComponentCheckRecordPtr = ^QTAltComponentCheckRecord;
+ QTAltComponentCheckRecord = record
+ flags: SInt32; { currently always 0 }
+ cd: ComponentDescription;
+ minVersion: UInt32;
+ end;
+
+ QTAltLanguageRecordPtr = ^QTAltLanguageRecord;
+ QTAltLanguageRecord = record
+ flags: SInt32; { currently always 0 }
+ language: SInt16;
+ end;
+
+
+const
+ kQTCPUSpeed1Rating = 100; { slowest }
+ kQTCPUSpeed2Rating = 200;
+ kQTCPUSpeed3Rating = 300;
+ kQTCPUSpeed4Rating = 400;
+ kQTCPUSpeed5Rating = 500; { fastest }
+
+
+type
+ QTAltCPURatingRecordPtr = ^QTAltCPURatingRecord;
+ QTAltCPURatingRecord = record
+ flags: UInt32; { currently always 0 }
+ speed: UInt16;
+ end;
+
+ ReferenceMovieNetworkStatusRecordPtr = ^ReferenceMovieNetworkStatusRecord;
+ ReferenceMovieNetworkStatusRecord = record
+ flags: UInt32; { currently always 0 }
+ valueCount: UInt32; { how many status values are in array }
+ netStatusValues: array [0..0] of SInt32; { a value from kQTNetworkStatus... constants }
+ end;
+
+ CloneRecordPtr = ^CloneRecord;
+ CloneRecord = record
+ flags: SInt32;
+ masterTrackID: SInt32; { track ID of the track we're cloning }
+ end;
+
+ CloneAtomPtr = ^CloneAtom;
+ CloneAtom = record
+ size: SInt32;
+ atomType: SInt32; { = clon }
+ cloneInfo: CloneRecord;
+ end;
+
+ FileTypeAtomPtr = ^FileTypeAtom;
+ FileTypeAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'ftyp' }
+ majorBrand: SInt32; { best use brand }
+ minorVersion: SInt32;
+ compatibleBrands: array [0..3] of SInt32; { 1 or greater }
+ end;
+
+
+const
+ kQTFileTypeBrandQuickTimeMovie = $71742020 (* 'qt ' *); { QuickTime movie files }
+ kQTFileTypeBrandISOFile = $69736F6D (* 'isom' *); { ISO Base Media files }
+ kQTFileTypeBrandMPEG4v1 = $6D703431 (* 'mp41' *); { MPEG-4 (ISO/IEC 14496-1) version 1 files }
+ kQTFileTypeBrandMPEG4v2 = $6D703432 (* 'mp42' *); { MPEG-4 (ISO/IEC 14496-1) version 2 files }
+
+
+type
+ SecureContentInfoAtomPtr = ^SecureContentInfoAtom;
+ SecureContentInfoAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'sinf' }
+ end;
+
+ SecureContentSchemeTypeAtomPtr = ^SecureContentSchemeTypeAtom;
+ SecureContentSchemeTypeAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'schm' }
+ flags: SInt32; { 1 byte of version / 3 bytes of flags }
+ schemeType: SInt32;
+ schemeVersion: UInt16;
+ { if flags & 1, C string holding URL for security component server }
+ end;
+
+ SecureContentSchemeInfoAtomPtr = ^SecureContentSchemeInfoAtom;
+ SecureContentSchemeInfoAtom = record
+ size: SInt32;
+ atomType: SInt32; { = 'schi' }
+ end;
+
+{$ALIGN MAC68K}
+
+
+{unit PMCore}
+{
+ File: PMCore.p
+
+ Contains: Carbon Printing Manager Interfaces.
+
+ Version: Technology: Mac OS X
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1998-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{$ifc undefined PM_USE_SESSION_APIS}
+{$setc PM_USE_SESSION_APIS := 1}
+{$endc}
+
+{ Callbacks }
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ PMIdleProcPtr = procedure;
+{$elsec}
+ PMIdleProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ PMIdleUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ PMIdleUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppPMIdleProcInfo = $00000000;
+ {
+ * NewPMIdleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewPMIdleUPP(userRoutine: PMIdleProcPtr): PMIdleUPP; external name '_NewPMIdleUPP';
+{
+ * DisposePMIdleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposePMIdleUPP(userUPP: PMIdleUPP); external name '_DisposePMIdleUPP';
+{
+ * InvokePMIdleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokePMIdleUPP(userRoutine: PMIdleUPP); external name '_InvokePMIdleUPP';
+{$ifc PM_USE_SESSION_APIS}
+{ Session routines }
+{ Session support }
+{
+ * PMRetain()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMRetain(objct: PMObject): OSStatus; external name '_PMRetain';
+
+{
+ * PMRelease()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMRelease(objct: PMObject): OSStatus; external name '_PMRelease';
+
+{ Session Print loop }
+{**********************}
+{ A session is created with a refcount of 1. }
+{**********************}
+{
+ * PMCreateSession()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMCreateSession(var printSession: PMPrintSession): OSStatus; external name '_PMCreateSession';
+
+{ Session PMPageFormat }
+{**********************}
+{ A pageformat is created with a refcount of 1. }
+{**********************}
+{
+ * PMCreatePageFormat()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMCreatePageFormat(var pageFormat: PMPageFormat): OSStatus; external name '_PMCreatePageFormat';
+
+{
+ * PMSessionDefaultPageFormat()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionDefaultPageFormat(printSession: PMPrintSession; pageFormat: PMPageFormat): OSStatus; external name '_PMSessionDefaultPageFormat';
+
+{
+ * PMSessionValidatePageFormat()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionValidatePageFormat(printSession: PMPrintSession; pageFormat: PMPageFormat; result: BooleanPtr): OSStatus; external name '_PMSessionValidatePageFormat';
+
+{ Session PMPrintSettings }
+{**********************}
+{ A printSettings is created with a refcount of 1. }
+{**********************}
+{
+ * PMCreatePrintSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMCreatePrintSettings(var printSettings: PMPrintSettings): OSStatus; external name '_PMCreatePrintSettings';
+
+{
+ * PMSessionDefaultPrintSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionDefaultPrintSettings(printSession: PMPrintSession; printSettings: PMPrintSettings): OSStatus; external name '_PMSessionDefaultPrintSettings';
+
+{
+ * PMSessionValidatePrintSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionValidatePrintSettings(printSession: PMPrintSession; printSettings: PMPrintSettings; result: BooleanPtr): OSStatus; external name '_PMSessionValidatePrintSettings';
+
+{ Session Classic support }
+{
+ * PMSessionGeneral()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionGeneral(printSession: PMPrintSession; pData: Ptr): OSStatus; external name '_PMSessionGeneral';
+
+{
+ * PMSessionConvertOldPrintRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionConvertOldPrintRecord(printSession: PMPrintSession; printRecordHandle: Handle; var printSettings: PMPrintSettings; var pageFormat: PMPageFormat): OSStatus; external name '_PMSessionConvertOldPrintRecord';
+
+{
+ * PMSessionMakeOldPrintRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionMakeOldPrintRecord(printSession: PMPrintSession; printSettings: PMPrintSettings; pageFormat: PMPageFormat; var printRecordHandle: Handle): OSStatus; external name '_PMSessionMakeOldPrintRecord';
+
+{ Session Driver Information }
+{
+ * PMPrinterGetDescriptionURL()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPrinterGetDescriptionURL(printer: PMPrinter; descriptionType: CFStringRef; var fileURL: CFURLRef): OSStatus; external name '_PMPrinterGetDescriptionURL';
+
+{
+ * PMSessionGetCurrentPrinter()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionGetCurrentPrinter(printSession: PMPrintSession; var currentPrinter: PMPrinter): OSStatus; external name '_PMSessionGetCurrentPrinter';
+
+{
+ * PMPrinterGetLanguageInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPrinterGetLanguageInfo(printer: PMPrinter; var info: PMLanguageInfo): OSStatus; external name '_PMPrinterGetLanguageInfo';
+
+{
+ * PMPrinterGetDriverCreator()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPrinterGetDriverCreator(printer: PMPrinter; var creator: OSType): OSStatus; external name '_PMPrinterGetDriverCreator';
+
+{
+ * PMPrinterGetDriverReleaseInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPrinterGetDriverReleaseInfo(printer: PMPrinter; var release: VersRec): OSStatus; external name '_PMPrinterGetDriverReleaseInfo';
+
+{
+ * PMPrinterGetPrinterResolutionCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPrinterGetPrinterResolutionCount(printer: PMPrinter; var count: UInt32): OSStatus; external name '_PMPrinterGetPrinterResolutionCount';
+
+{
+ * PMPrinterGetPrinterResolution()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPrinterGetPrinterResolution(printer: PMPrinter; tag: PMTag; var res: PMResolution): OSStatus; external name '_PMPrinterGetPrinterResolution';
+
+{
+ * PMPrinterGetIndexedPrinterResolution()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPrinterGetIndexedPrinterResolution(printer: PMPrinter; index: UInt32; var res: PMResolution): OSStatus; external name '_PMPrinterGetIndexedPrinterResolution';
+
+{
+ * PMPrinterIsPostScriptCapable()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ }
+function PMPrinterIsPostScriptCapable(printer: PMPrinter): boolean; external name '_PMPrinterIsPostScriptCapable';
+
+{
+ * PMPrinterGetMakeAndModelName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ }
+function PMPrinterGetMakeAndModelName(printer: PMPrinter; var makeAndModel: CFStringRef): OSStatus; external name '_PMPrinterGetMakeAndModelName';
+
+{ Session ColorSync & PostScript Support }
+{
+ * PMSessionEnableColorSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionEnableColorSync(printSession: PMPrintSession): OSStatus; external name '_PMSessionEnableColorSync';
+
+{
+ * PMSessionDisableColorSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionDisableColorSync(printSession: PMPrintSession): OSStatus; external name '_PMSessionDisableColorSync';
+
+{
+ * PMSessionPostScriptBegin()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionPostScriptBegin(printSession: PMPrintSession): OSStatus; external name '_PMSessionPostScriptBegin';
+
+{
+ * PMSessionPostScriptEnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionPostScriptEnd(printSession: PMPrintSession): OSStatus; external name '_PMSessionPostScriptEnd';
+
+{
+ * PMSessionPostScriptHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionPostScriptHandle(printSession: PMPrintSession; psHandle: Handle): OSStatus; external name '_PMSessionPostScriptHandle';
+
+{
+ * PMSessionPostScriptData()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionPostScriptData(printSession: PMPrintSession; psPtr: Ptr; len: Size): OSStatus; external name '_PMSessionPostScriptData';
+
+{
+ * PMSessionPostScriptFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionPostScriptFile(printSession: PMPrintSession; var psFile: FSSpec): OSStatus; external name '_PMSessionPostScriptFile';
+
+{
+ * PMSessionSetPSInjectionData()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionSetPSInjectionData(printSession: PMPrintSession; printSettings: PMPrintSettings; injectionDictArray: CFArrayRef): OSStatus; external name '_PMSessionSetPSInjectionData';
+
+{ Session Error }
+{
+ * PMSessionError()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionError(printSession: PMPrintSession): OSStatus; external name '_PMSessionError';
+
+{
+ * PMSessionSetError()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionSetError(printSession: PMPrintSession; printError: OSStatus): OSStatus; external name '_PMSessionSetError';
+
+{ Other Session routines }
+{
+ * PMSessionGetDocumentFormatGeneration()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionGetDocumentFormatGeneration(printSession: PMPrintSession; var docFormats: CFArrayRef): OSStatus; external name '_PMSessionGetDocumentFormatGeneration';
+
+{
+ * PMSessionSetDocumentFormatGeneration()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionSetDocumentFormatGeneration(printSession: PMPrintSession; docFormat: CFStringRef; graphicsContextTypes: CFArrayRef; options: CFTypeRef): OSStatus; external name '_PMSessionSetDocumentFormatGeneration';
+
+{
+ * PMSessionGetDocumentFormatSupported()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionGetDocumentFormatSupported(printSession: PMPrintSession; var docFormats: CFArrayRef; limit: UInt32): OSStatus; external name '_PMSessionGetDocumentFormatSupported';
+
+{
+ * PMSessionIsDocumentFormatSupported()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionIsDocumentFormatSupported(printSession: PMPrintSession; docFormat: CFStringRef; var supported: boolean): OSStatus; external name '_PMSessionIsDocumentFormatSupported';
+
+{
+ * PMSessionGetGraphicsContext()
+ *
+ * Parameters:
+ *
+ * printSession:
+ * the session
+ *
+ * graphicsContextType:
+ * either kPMGraphicsContextQuickdraw or
+ * kPMGraphicsContextCoreGraphics
+ *
+ * graphicsContext:
+ * returns a GrafPtr or a CGContextRef
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionGetGraphicsContext(printSession: PMPrintSession; graphicsContextType: CFStringRef; var graphicsContext: UnivPtr): OSStatus; external name '_PMSessionGetGraphicsContext';
+
+{
+ * PMSessionSetIdleProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionSetIdleProc(printSession: PMPrintSession; idleProc: PMIdleUPP): OSStatus; external name '_PMSessionSetIdleProc';
+
+{
+ * PMSessionSetDataInSession()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionSetDataInSession(printSession: PMPrintSession; key: CFStringRef; data: CFTypeRef): OSStatus; external name '_PMSessionSetDataInSession';
+
+{
+ * PMSessionGetDataFromSession()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionGetDataFromSession(printSession: PMPrintSession; key: CFStringRef; var data: CFTypeRef): OSStatus; external name '_PMSessionGetDataFromSession';
+
+{
+ * PMSessionCreatePrinterList()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function PMSessionCreatePrinterList(printSession: PMPrintSession; var printerList: CFArrayRef; var currentIndex: CFIndex; var currentPrinter: PMPrinter): OSStatus; external name '_PMSessionCreatePrinterList';
+
+{
+ * PMSessionSetCurrentPrinter()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.4 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function PMSessionSetCurrentPrinter(session: PMPrintSession; printerName: CFStringRef): OSStatus; external name '_PMSessionSetCurrentPrinter';
+
+{
+ * PMSessionSetDestination()
+ *
+ * Summary:
+ * Alter a print session and print settings so that an associated
+ * print job is sent to the provided destination type in the,
+ * optional, MIME document format.
+ *
+ * Discussion:
+ * This function is most useful when an application would like to
+ * write its print output to disk without requiring user
+ * interaction. The list of MIME types that can be sent to the
+ * provided destination can be obtained from
+ * PMSessionCopyOutputFormatList and one of these passed to this
+ * function.
+ *
+ * Parameters:
+ *
+ * printSession:
+ * The session to be used for a print job. The session holds the
+ * preview setting which can override the destination type in the
+ * print settings.
+ *
+ * printSettings:
+ * The print settings to be used for a print job. The print
+ * settings specify whether a job will be directed toward a
+ * printer or to file. It also holds the requested MIME output
+ * type.
+ *
+ * destType:
+ * The destiation type for a print job associated with the
+ * provided print session and print settings. Fax is currently not
+ * supported, but kPMDestinationPrinter, kPMDestinationFile, and
+ * kPMDestinationPreview can be set.
+ *
+ * destFormat:
+ * The MIME type to be generated for the provided destination
+ * type. This parameter can be NULL in which the default format
+ * for the requested destination type is used. To obtain a list of
+ * valid formats for a given destiation type, use the function
+ * PMSessionCopyOutputFormatList.
+ *
+ * destLocation:
+ * Some destination types support a destination location. The
+ * clearest example is the kPMDestinationFile destination type
+ * which allows a caller to also supply a file URL specifying
+ * where the output file is to be created.
+ *
+ * SPECIAL_AVAILABILITY_NOTE:
+ * This routine is available in ApplicationsServices.framework in
+ * Mac OS X version 10.1 and later. On Mac OS X it is available to
+ * CFM applications through CarbonLib starting with Mac OS X
+ * version 10.2 and later.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function PMSessionSetDestination(printSession: PMPrintSession; printSettings: PMPrintSettings; destType: PMDestinationType; destFormat: CFStringRef; destLocation: CFURLRef): OSStatus; external name '_PMSessionSetDestination';
+
+{
+ * PMSessionGetDestinationType()
+ *
+ * Summary:
+ * Hand back the destination type that will be used for a print job
+ * with the specified print settings and print session.
+ *
+ * Discussion:
+ * Currently there are four destination types:
+ * kPMDestinationPrinter, kPMDestinationFile, kPMDestinationFax and
+ * kPMDestinationPreview. The first three destination types are
+ * stored in the print settings. The switch for preview is stored in
+ * the print session and, if enabled, overrides the destination in
+ * the print setting. This function is preferred over
+ * PMGetDestination as the latter does not take a print session
+ * parameter and therefore can not indicate whether preview has been
+ * selected as the destination.
+ *
+ * Parameters:
+ *
+ * printSession:
+ * The session to be used for a print job. The session holds the
+ * preview setting which can override the destination type in the
+ * print settings.
+ *
+ * printSettings:
+ * The print settings to be used for a print job. The print
+ * settings specify whether a job will be directed toward a
+ * printer or to file.
+ *
+ * destTypeP:
+ * A pointer to a caller supplied PMDestinationType variable. If
+ * this function succeeds then *'destTypeP' will be filled in with
+ * the destination type for a print job that used the specified
+ * session and print settings. If this function fails, then
+ * *'destType' will be set to kPMDestinationInvalid.
+ *
+ * SPECIAL_AVAILABILITY_NOTE:
+ * This routine is available in ApplicationsServices.framework in
+ * Mac OS X version 10.1 and later. On Mac OS X it is available to
+ * CFM applications through CarbonLib starting with Mac OS X
+ * version 10.2 and later.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function PMSessionGetDestinationType(printSession: PMPrintSession; printSettings: PMPrintSettings; var destTypeP: PMDestinationType): OSStatus; external name '_PMSessionGetDestinationType';
+
+{
+ * PMSessionCopyDestinationFormat()
+ *
+ * Summary:
+ * Hand back the destination output MIME type associated with the
+ * provided print session and print settings.
+ *
+ * Parameters:
+ *
+ * printSession:
+ * A currently open print session.
+ *
+ * printSettings:
+ * The print settings that are to be searched.
+ *
+ * destFormatP:
+ * A pointer to a caller allocated CFStringRef variable. If this
+ * routine returns noErr then *'destFormatP' will either be a copy
+ * of a CFStringRef specifying the output format for the print
+ * job, or NULL indicating that the default output format will be
+ * used. If this function return an error, then *'destFormatP'
+ * will be set to NULL.
+ *
+ * SPECIAL_AVAILABILITY_NOTE:
+ * This routine is available in ApplicationsServices.framework in
+ * Mac OS X version 10.1 and later. On Mac OS X it is available to
+ * CFM applications through CarbonLib starting with Mac OS X
+ * version 10.2 and later.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function PMSessionCopyDestinationFormat(printSession: PMPrintSession; printSettings: PMPrintSettings; var destFormatP: CFStringRef): OSStatus; external name '_PMSessionCopyDestinationFormat';
+
+{
+ * PMSessionCopyDestinationLocation()
+ *
+ * Summary:
+ * Hand back the URL destination location given a print session and
+ * print settings.
+ *
+ * Discussion:
+ * Some destination type support a destination location which
+ * further defines where the output from a pritn job should be sent.
+ * The kPMDestinationFile destiation type, for example, will use a
+ * file URL to determine where a new file should be created.
+ *
+ * Parameters:
+ *
+ * printSession:
+ * A currently open print session.
+ *
+ * printSettings:
+ * The print settings that are to be searched.
+ *
+ * destLocationP:
+ * A pointer to a caller allocated CFURLRef variable. If this
+ * routine returns noErr then *'outputFileP' will either be NULL
+ * indicating that the job is using the default destination
+ * location for the current destination type or a copy of a
+ * CFURLRef will be placed in *'destLocationP'. If this function
+ * returns an error then 'destLocationP' will be set to NULL.
+ *
+ * SPECIAL_AVAILABILITY_NOTE:
+ * This routine is available in ApplicationsServices.framework in
+ * Mac OS X version 10.1 and later. On Mac OS X it is available to
+ * CFM applications through CarbonLib starting with Mac OS X
+ * version 10.2 and later.
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.5 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function PMSessionCopyDestinationLocation(printSession: PMPrintSession; printSettings: PMPrintSettings; var destLocationP: CFURLRef): OSStatus; external name '_PMSessionCopyDestinationLocation';
+
+{
+ * PMSessionCopyOutputFormatList()
+ *
+ * Summary:
+ * Hands back an an array of MIME types describing the possible
+ * output formats for the printer module associated with the current
+ * printer.
+ *
+ * Parameters:
+ *
+ * printSession:
+ * This session's current printer's printer module will be queried
+ * for its supported output MIME types.
+ *
+ * destType:
+ * A print job can have one of several possible destination types.
+ * The list of valid output formats is dependent upon the
+ * destination type. This parameter specifies destination type of
+ * interest when retrieving the output formats list.
+ *
+ * documentFormatP:
+ * A pointer to a caller's CFArrayRef variable. If this routine
+ * completes successfully, then *'documentFormatP' will be set to
+ * a CFArrayRef containing CFStringRefs. Each CFStringRef in the
+ * array is a MIME type specifying a type of output that can be
+ * generated by the printer module associated with the current
+ * printer.
+ *
+ * SPECIAL_AVAILABILITY_NOTE:
+ * This routine is available in ApplicationsServices.framework in
+ * Mac OS X version 10.1 and later. On Mac OS X it is available to
+ * CFM applications through CarbonLib starting with Mac OS X
+ * version 10.2 and later. On Mac OS 8/9 using CarbonLib, this
+ * routine returns kPMNotImplemented
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function PMSessionCopyOutputFormatList(printSession: PMPrintSession; destType: PMDestinationType; var documentFormatP: CFArrayRef): OSStatus; external name '_PMSessionCopyOutputFormatList';
+
+
+{
+ * PMSessionCreatePageFormatList()
+ *
+ * Summary:
+ * Hand back a list of page format instances. Each page format
+ * instance describes a paper size available on the specified
+ * printer.
+ *
+ * Parameters:
+ *
+ * printSession:
+ * A currently open print session.
+ *
+ * printer:
+ * The printer whose page size list should be enumerated. To get
+ * the session's current printer, see PMSessionGetCurrentPrinter().
+ *
+ * pageFormatList:
+ * If this function is successful then noErr will be returned and
+ * *'pageFormatList' will be set to a newly created CFArray. Each
+ * element in the array will be a PMPageFormat describing an
+ * available paper size for the specified printer. If this
+ * function fails then a non-zero error code will be returned and
+ * *'pageFormatList' will be set to NULL.
+ *
+ * SPECIAL_AVAILABILITY_NOTE:
+ * This routine is available in ApplicationsServices.framework in
+ * Mac OS X version 10.1 and later. On Mac OS X it is available to
+ * CFM applications through CarbonLib starting with Mac OS X
+ * version 10.2 and later. On Mac OS 8/9 using CarbonLib, this
+ * routine returns kPMNotImplemented
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function PMSessionCreatePageFormatList(printSession: PMPrintSession; printer: PMPrinter; var pageFormatList: CFArrayRef): OSStatus; external name '_PMSessionCreatePageFormatList';
+
+{
+ * SPECIAL AVAILABILITY note: This routine is available in ApplicationsServices.framework in
+ * Mac OS X version 10.0 and later. On Mac OS X it is available to CFM applications through CarbonLib
+ * starting with Mac OS X version 10.2 and later.
+ *
+ * On Mac OS 8/9 using CarbonLib, this routine returns kPMNotImplemented
+ }
+{
+ * PMSessionBeginDocumentNoDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionBeginDocumentNoDialog(printSession: PMPrintSession; printSettings: PMPrintSettings; pageFormat: PMPageFormat): OSStatus; external name '_PMSessionBeginDocumentNoDialog';
+
+{
+ * SPECIAL AVAILABILITY note: This routine is available in ApplicationsServices.framework in
+ * Mac OS X version 10.0 and later. On Mac OS X it is available to CFM applications through CarbonLib
+ * starting with Mac OS X version 10.2 and later.
+ *
+ * On Mac OS 8/9 using CarbonLib, this routine returns kPMNotImplemented
+ }
+{
+ * PMSessionEndDocumentNoDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionEndDocumentNoDialog(printSession: PMPrintSession): OSStatus; external name '_PMSessionEndDocumentNoDialog';
+
+{
+ * SPECIAL AVAILABILITY note: This routine is available in ApplicationsServices.framework in
+ * Mac OS X version 10.0 and later. On Mac OS X it is available to CFM applications through CarbonLib
+ * starting with Mac OS X version 10.2 and later.
+ *
+ * On Mac OS 8/9 using CarbonLib, this routine returns kPMNotImplemented
+ }
+{
+ * PMSessionBeginPageNoDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionBeginPageNoDialog(printSession: PMPrintSession; pageFormat: PMPageFormat; pageFrame: PMRectPtr): OSStatus; external name '_PMSessionBeginPageNoDialog';
+
+{
+ * SPECIAL AVAILABILITY note: This routine is available in ApplicationsServices.framework in
+ * Mac OS X version 10.0 and later. On Mac OS X it is available to CFM applications through CarbonLib
+ * starting with Mac OS X version 10.2 and later.
+ *
+ * On Mac OS 8/9 using CarbonLib, this routine returns kPMNotImplemented
+ }
+{
+ * PMSessionEndPageNoDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionEndPageNoDialog(printSession: PMPrintSession): OSStatus; external name '_PMSessionEndPageNoDialog';
+
+{$elsec}
+{
+ * PMSetIdleProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetIdleProc(idleProc: PMIdleUPP): OSStatus; external name '_PMSetIdleProc';
+
+{ Print loop }
+{
+ * PMBegin()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMBegin: OSStatus; external name '_PMBegin';
+
+{
+ * PMEnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMEnd: OSStatus; external name '_PMEnd';
+
+{**********************}
+{ Valid only within a PMBeginPage/PMEndPage block. You should retrieve the printing }
+{ port with this call and set it before imaging a page. }
+{**********************}
+{
+ * PMGetGrafPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetGrafPtr(printContext: PMPrintContext; var grafPort: GrafPtr): OSStatus; external name '_PMGetGrafPtr';
+
+{ PMPageFormat }
+{
+ * PMNewPageFormat()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMNewPageFormat(var pageFormat: PMPageFormat): OSStatus; external name '_PMNewPageFormat';
+
+{
+ * PMDisposePageFormat()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMDisposePageFormat(pageFormat: PMPageFormat): OSStatus; external name '_PMDisposePageFormat';
+
+{
+ * PMDefaultPageFormat()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMDefaultPageFormat(pageFormat: PMPageFormat): OSStatus; external name '_PMDefaultPageFormat';
+
+{
+ * PMValidatePageFormat()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMValidatePageFormat(pageFormat: PMPageFormat; var result: boolean): OSStatus; external name '_PMValidatePageFormat';
+
+{ PMPrintSettings }
+{
+ * PMNewPrintSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMNewPrintSettings(var printSettings: PMPrintSettings): OSStatus; external name '_PMNewPrintSettings';
+
+{
+ * PMDisposePrintSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMDisposePrintSettings(printSettings: PMPrintSettings): OSStatus; external name '_PMDisposePrintSettings';
+
+{
+ * PMDefaultPrintSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMDefaultPrintSettings(printSettings: PMPrintSettings): OSStatus; external name '_PMDefaultPrintSettings';
+
+{
+ * PMValidatePrintSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMValidatePrintSettings(printSettings: PMPrintSettings; var result: boolean): OSStatus; external name '_PMValidatePrintSettings';
+
+{ Classic Support }
+{
+ * PMGeneral()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGeneral(pData: Ptr): OSStatus; external name '_PMGeneral';
+
+{
+ * PMConvertOldPrintRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMConvertOldPrintRecord(printRecordHandle: Handle; var printSettings: PMPrintSettings; var pageFormat: PMPageFormat): OSStatus; external name '_PMConvertOldPrintRecord';
+
+{
+ * PMMakeOldPrintRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMMakeOldPrintRecord(printSettings: PMPrintSettings; pageFormat: PMPageFormat; var printRecordHandle: Handle): OSStatus; external name '_PMMakeOldPrintRecord';
+
+{ Driver Information }
+{
+ * PMIsPostScriptDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMIsPostScriptDriver(var isPostScript: boolean): OSStatus; external name '_PMIsPostScriptDriver';
+
+{
+ * PMGetLanguageInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetLanguageInfo(var info: PMLanguageInfo): OSStatus; external name '_PMGetLanguageInfo';
+
+{
+ * PMGetDriverCreator()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetDriverCreator(var creator: OSType): OSStatus; external name '_PMGetDriverCreator';
+
+{
+ * PMGetDriverReleaseInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetDriverReleaseInfo(var release: VersRec): OSStatus; external name '_PMGetDriverReleaseInfo';
+
+{
+ * PMGetPrinterResolutionCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetPrinterResolutionCount(var count: UInt32): OSStatus; external name '_PMGetPrinterResolutionCount';
+
+{
+ * PMGetPrinterResolution()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetPrinterResolution(tag: PMTag; var res: PMResolution): OSStatus; external name '_PMGetPrinterResolution';
+
+{
+ * PMGetIndexedPrinterResolution()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetIndexedPrinterResolution(index: UInt32; var res: PMResolution): OSStatus; external name '_PMGetIndexedPrinterResolution';
+
+{**********************}
+{ PMEnableColorSync and PMDisableColorSync are valid within }
+{ BeginPage/EndPage block }
+{**********************}
+{ ColorSync & PostScript Support }
+{
+ * PMEnableColorSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMEnableColorSync: OSStatus; external name '_PMEnableColorSync';
+
+{
+ * PMDisableColorSync()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMDisableColorSync: OSStatus; external name '_PMDisableColorSync';
+
+{**********************}
+{ The PMPostScriptxxx calls are valid within a }
+{ BeginPage/EndPage block }
+{**********************}
+{
+ * PMPostScriptBegin()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPostScriptBegin: OSStatus; external name '_PMPostScriptBegin';
+
+{
+ * PMPostScriptEnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPostScriptEnd: OSStatus; external name '_PMPostScriptEnd';
+
+{**********************}
+{ These PMPostScriptxxx calls are valid within a }
+{ PMPostScriptBegin/PMPostScriptEnd block }
+{**********************}
+{
+ * PMPostScriptHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPostScriptHandle(psHandle: Handle): OSStatus; external name '_PMPostScriptHandle';
+
+{
+ * PMPostScriptData()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPostScriptData(psPtr: Ptr; len: Size): OSStatus; external name '_PMPostScriptData';
+
+{
+ * PMPostScriptFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPostScriptFile(var psFile: FSSpec): OSStatus; external name '_PMPostScriptFile';
+
+{ Error }
+{
+ * PMError()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMError: OSStatus; external name '_PMError';
+
+{
+ * PMSetError()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetError(printError: OSStatus): OSStatus; external name '_PMSetError';
+
+{$endc} {PM_USE_SESSION_APIS}
+
+{ PMPageFormat }
+{
+ * PMCopyPageFormat()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMCopyPageFormat(formatSrc: PMPageFormat; formatDest: PMPageFormat): OSStatus; external name '_PMCopyPageFormat';
+
+{**********************}
+{ Flattening a page format should only be necessary if you intend to preserve }
+{ the object settings along with a document. A page format will persist outside of a }
+{ PMBegin/PMEnd block. This will allow you to use any accessors on the object without }
+{ the need to flatten and unflatten. Keep in mind accessors make no assumption }
+{ on the validity of the value you set. This can only be done thru PMValidatePageFormat }
+{ in a PMBegin/PMEnd block or with PMSessionValidatePageFormat with a valid session. }
+{ It is your responsibility for disposing of the handle. }
+{**********************}
+{
+ * PMFlattenPageFormat()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMFlattenPageFormat(pageFormat: PMPageFormat; var flatFormat: Handle): OSStatus; external name '_PMFlattenPageFormat';
+
+{
+ * PMUnflattenPageFormat()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMUnflattenPageFormat(flatFormat: Handle; var pageFormat: PMPageFormat): OSStatus; external name '_PMUnflattenPageFormat';
+
+{ PMPageFormat Accessors }
+{**********************}
+{ PMSetxxx calls only saves the value inside the printing object. They make no assumption on the }
+{ validity of the value. This should be done using PMValidatePageFormat/PMSessionValidatePageFormat }
+{ Any dependant settings are also updated during a validate call. }
+{ For example: }
+{ PMGetAdjustedPaperRect - returns a rect of a certain size }
+{ PMSetScale( aPageFormat, 500.0 ) }
+{ PMGetAdjustedPaperRect - returns the SAME rect as the first call }
+{}
+{ PMGetAdjustedPaperRect - returns a rect of a certain size }
+{ PMSetScale( aPageFormat, 500.0 ) }
+{ PMValidatePageFormat or PMSessionValidatePageFormat }
+{ PMGetAdjustedPaperRect - returns a rect thats scaled 500% from the first call }
+{**********************}
+{
+ * PMGetPageFormatExtendedData()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetPageFormatExtendedData(pageFormat: PMPageFormat; dataID: OSType; var size: UInt32; extendedData: UnivPtr): OSStatus; external name '_PMGetPageFormatExtendedData';
+
+{
+ * PMSetPageFormatExtendedData()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetPageFormatExtendedData(pageFormat: PMPageFormat; dataID: OSType; size: UInt32; extendedData: UnivPtr): OSStatus; external name '_PMSetPageFormatExtendedData';
+
+{**********************}
+{ A value of 100.0 means 100% (no scaling). 50.0 means 50% scaling }
+{**********************}
+{
+ * PMGetScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetScale(pageFormat: PMPageFormat; var scale: Double): OSStatus; external name '_PMGetScale';
+
+{
+ * PMSetScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetScale(pageFormat: PMPageFormat; scale: Double): OSStatus; external name '_PMSetScale';
+
+{**********************}
+{ This is the drawing resolution of an app. This should not be confused with }
+{ the resolution of the printer. You can call PMGetPrinterResolution to see }
+{ what resolutions are avaliable for the current printer. }
+{**********************}
+{
+ * PMGetResolution()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetResolution(pageFormat: PMPageFormat; var res: PMResolution): OSStatus; external name '_PMGetResolution';
+
+{
+ * PMSetResolution()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetResolution(pageFormat: PMPageFormat; const (*var*) res: PMResolution): OSStatus; external name '_PMSetResolution';
+
+{**********************}
+{ This is the physical size of the paper without regard to resolution, orientation }
+{ or scaling. It is returned as a 72dpi value. }
+{**********************}
+{
+ * PMGetPhysicalPaperSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetPhysicalPaperSize(pageFormat: PMPageFormat; var paperSize: PMRect): OSStatus; external name '_PMGetPhysicalPaperSize';
+
+{
+ * PMSetPhysicalPaperSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetPhysicalPaperSize(pageFormat: PMPageFormat; const (*var*) paperSize: PMRect): OSStatus; external name '_PMSetPhysicalPaperSize';
+
+{**********************}
+{ This is the physical size of the page without regard to resolution, orientation }
+{ or scaling. It is returned as a 72dpi value. }
+{**********************}
+{
+ * PMGetPhysicalPageSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetPhysicalPageSize(pageFormat: PMPageFormat; var pageSize: PMRect): OSStatus; external name '_PMGetPhysicalPageSize';
+
+{
+ * PMGetAdjustedPaperRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetAdjustedPaperRect(pageFormat: PMPageFormat; var paperRect: PMRect): OSStatus; external name '_PMGetAdjustedPaperRect';
+
+{
+ * PMGetAdjustedPageRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetAdjustedPageRect(pageFormat: PMPageFormat; var pageRect: PMRect): OSStatus; external name '_PMGetAdjustedPageRect';
+
+{
+ * PMGetUnadjustedPaperRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetUnadjustedPaperRect(pageFormat: PMPageFormat; var paperRect: PMRect): OSStatus; external name '_PMGetUnadjustedPaperRect';
+
+{
+ * PMSetUnadjustedPaperRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetUnadjustedPaperRect(pageFormat: PMPageFormat; const (*var*) paperRect: PMRect): OSStatus; external name '_PMSetUnadjustedPaperRect';
+
+{
+ * PMGetUnadjustedPageRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetUnadjustedPageRect(pageFormat: PMPageFormat; var pageRect: PMRect): OSStatus; external name '_PMGetUnadjustedPageRect';
+
+{
+ * PMSetAdjustedPageRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetAdjustedPageRect(pageFormat: PMPageFormat; const (*var*) pageRect: PMRect): OSStatus; external name '_PMSetAdjustedPageRect';
+
+{
+ * PMGetOrientation()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetOrientation(pageFormat: PMPageFormat; var orientation: PMOrientation): OSStatus; external name '_PMGetOrientation';
+
+{
+ * PMSetOrientation()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetOrientation(pageFormat: PMPageFormat; orientation: PMOrientation; lock: boolean): OSStatus; external name '_PMSetOrientation';
+
+{ PMPrintSettings }
+{
+ * PMCopyPrintSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMCopyPrintSettings(settingSrc: PMPrintSettings; settingDest: PMPrintSettings): OSStatus; external name '_PMCopyPrintSettings';
+
+{**********************}
+{ Flattening a print settings should only be necessary if you intend to preserve }
+{ the object settings along with a document. A print settings will persist outside of a }
+{ PMBegin/PMEnd block. This allows you to use any accessors on the object without }
+{ the need to flatten and unflatten. Keep in mind the accessors make no assumption }
+{ on the validity of the value. This can only be done thru PMValidatePrintSettings }
+{ in a PMBegin/PMEnd block or with PMSessionValidatePrintSettings with a valid session. }
+{ It is your responsibility for disposing of the handle. }
+{**********************}
+{
+ * PMFlattenPrintSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMFlattenPrintSettings(printSettings: PMPrintSettings; var flatSettings: Handle): OSStatus; external name '_PMFlattenPrintSettings';
+
+{
+ * PMUnflattenPrintSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMUnflattenPrintSettings(flatSettings: Handle; var printSettings: PMPrintSettings): OSStatus; external name '_PMUnflattenPrintSettings';
+
+{ PMPrintSettings Accessors }
+{
+ * PMGetPrintSettingsExtendedData()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetPrintSettingsExtendedData(printSettings: PMPrintSettings; dataID: OSType; var size: UInt32; extendedData: UnivPtr): OSStatus; external name '_PMGetPrintSettingsExtendedData';
+
+{
+ * PMSetPrintSettingsExtendedData()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetPrintSettingsExtendedData(printSettings: PMPrintSettings; dataID: OSType; size: UInt32; extendedData: UnivPtr): OSStatus; external name '_PMSetPrintSettingsExtendedData';
+
+{
+ * PMGetDestination()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetDestination(printSettings: PMPrintSettings; var destType: PMDestinationType; var fileURL: CFURLRef): OSStatus; external name '_PMGetDestination';
+
+{
+ * PMGetJobName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetJobName(printSettings: PMPrintSettings; name: StringPtr): OSStatus; external name '_PMGetJobName';
+
+{
+ * PMSetJobName()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetJobName(printSettings: PMPrintSettings; const (*var*) name: Str255): OSStatus; external name '_PMSetJobName';
+
+{
+ * PMGetCopies()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetCopies(printSettings: PMPrintSettings; var copies: UInt32): OSStatus; external name '_PMGetCopies';
+
+{
+ * PMSetCopies()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetCopies(printSettings: PMPrintSettings; copies: UInt32; lock: boolean): OSStatus; external name '_PMSetCopies';
+
+{
+ * PMGetFirstPage()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetFirstPage(printSettings: PMPrintSettings; var first: UInt32): OSStatus; external name '_PMGetFirstPage';
+
+{
+ * PMSetFirstPage()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetFirstPage(printSettings: PMPrintSettings; first: UInt32; lock: boolean): OSStatus; external name '_PMSetFirstPage';
+
+{
+ * PMGetLastPage()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetLastPage(printSettings: PMPrintSettings; var last: UInt32): OSStatus; external name '_PMGetLastPage';
+
+{
+ * PMSetLastPage()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetLastPage(printSettings: PMPrintSettings; last: UInt32; lock: boolean): OSStatus; external name '_PMSetLastPage';
+
+{**********************}
+{ The default page range is from 1-32000. The page range is something that is }
+{ set by the application. It is NOT the first and last page to print. It serves }
+{ as limits for setting the first and last page. You may pass kPMPrintAllPages for }
+{ the maxPage value to specified that all pages are available for printing. }
+{**********************}
+{
+ * PMGetPageRange()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetPageRange(printSettings: PMPrintSettings; var minPage: UInt32; var maxPage: UInt32): OSStatus; external name '_PMGetPageRange';
+
+{**********************}
+{ The first and last page are immediately clipped to the new range }
+{**********************}
+{
+ * PMSetPageRange()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetPageRange(printSettings: PMPrintSettings; minPage: UInt32; maxPage: UInt32): OSStatus; external name '_PMSetPageRange';
+
+{
+ * PMSetProfile()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetProfile(printSettings: PMPrintSettings; tag: PMTag; const (*var*) profile: CMProfileLocation): OSStatus; external name '_PMSetProfile';
+
+{
+ * PMGetColorMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetColorMode(printSettings: PMPrintSettings; var colorMode: PMColorMode): OSStatus; external name '_PMGetColorMode';
+
+{
+ * PMSetColorMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetColorMode(printSettings: PMPrintSettings; colorMode: PMColorMode): OSStatus; external name '_PMSetColorMode';
+
+{
+ * PMGetJobNameCFString()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetJobNameCFString(printSettings: PMPrintSettings; var name: CFStringRef): OSStatus; external name '_PMGetJobNameCFString';
+
+{
+ * PMSetJobNameCFString()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetJobNameCFString(printSettings: PMPrintSettings; name: CFStringRef): OSStatus; external name '_PMSetJobNameCFString';
+
+{
+ * PMSetCollate()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ }
+function PMSetCollate(printSettings: PMPrintSettings; collate: boolean): OSStatus; external name '_PMSetCollate';
+
+{
+ * PMGetCollate()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ }
+function PMGetCollate(printSettings: PMPrintSettings; var collate: boolean): OSStatus; external name '_PMGetCollate';
+
+{$ALIGN MAC68K}
+
+
+{unit QuickTimeMusic}
+{
+ File: QuickTimeMusic.p
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1990-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ kaiToneDescType = $746F6E65 (* 'tone' *);
+ kaiNoteRequestInfoType = $6E747271 (* 'ntrq' *);
+ kaiKnobListType = $6B6E626C (* 'knbl' *);
+ kaiKeyRangeInfoType = $73696E66 (* 'sinf' *);
+ kaiSampleDescType = $73647363 (* 'sdsc' *);
+ kaiSampleInfoType = $736D696E (* 'smin' *);
+ kaiSampleDataType = $73646174 (* 'sdat' *);
+ kaiSampleDataQUIDType = $71756964 (* 'quid' *);
+ kaiInstInfoType = $69696E66 (* 'iinf' *);
+ kaiPictType = $70696374 (* 'pict' *);
+ kaiWriterType = $C2A97772 (* '©wrt' *);
+ kaiCopyrightType = $C2A96370 (* '©cpy' *);
+ kaiOtherStrType = $73747220 (* 'str ' *);
+ kaiInstrumentRefType = $69726566 (* 'iref' *);
+ kaiInstGMQualityType = $7175616C (* 'qual' *);
+ kaiLibraryInfoType = $6C696E66 (* 'linf' *);
+ kaiLibraryDescType = $6C647363 (* 'ldsc' *);
+
+
+type
+ InstLibDescRecPtr = ^InstLibDescRec;
+ InstLibDescRec = record
+ libIDName: Str31;
+ end;
+
+ InstKnobRecPtr = ^InstKnobRec;
+ InstKnobRec = record
+ number: BigEndianLong;
+ value: BigEndianLong;
+ end;
+
+
+const
+ kInstKnobMissingUnknown = 0;
+ kInstKnobMissingDefault = $01;
+
+
+type
+ InstKnobListPtr = ^InstKnobList;
+ InstKnobList = record
+ knobCount: BigEndianLong;
+ knobFlags: BigEndianLong;
+ knob: array [0..0] of InstKnobRec;
+ end;
+
+
+const
+ kMusicLoopTypeNormal = 0;
+ kMusicLoopTypePalindrome = 1; { back & forth }
+
+ instSamplePreProcessFlag = $01;
+
+
+type
+ InstSampleDescRecPtr = ^InstSampleDescRec;
+ InstSampleDescRec = record
+ dataFormat: BigEndianOSType;
+ numChannels: BigEndianShort;
+ sampleSize: BigEndianShort;
+ sampleRate: BigEndianUnsignedFixed;
+ sampleDataID: BigEndianShort;
+ offset: BigEndianLong; { offset within SampleData - this could be just for internal use }
+ numSamples: BigEndianLong; { this could also just be for internal use, we'll see }
+ loopType: BigEndianLong;
+ loopStart: BigEndianLong;
+ loopEnd: BigEndianLong;
+ pitchNormal: BigEndianLong;
+ pitchLow: BigEndianLong;
+ pitchHigh: BigEndianLong;
+ end;
+
+ AtomicInstrument = Handle;
+ AtomicInstrumentPtr = Ptr;
+
+const
+ kQTMIDIComponentType = $6D696469 (* 'midi' *);
+
+ kOMSComponentSubType = $4F4D5320 (* 'OMS ' *);
+ kFMSComponentSubType = $464D5320 (* 'FMS ' *);
+ kMIDIManagerComponentSubType = $6D6D6772 (* 'mmgr' *);
+ kOSXMIDIComponentSubType = $6F73786D (* 'osxm' *);
+
+
+type
+ QTMIDIComponent = ComponentInstance;
+
+const
+ kMusicPacketPortLost = 1; { received when application loses the default input port }
+ kMusicPacketPortFound = 2; { received when application gets it back out from under someone else's claim }
+ kMusicPacketTimeGap = 3; { data[0] = number of milliseconds to keep the MIDI line silent }
+
+ kAppleSysexID = $11; { apple sysex is followed by 2-byte command. 0001 is the command for samplesize }
+ kAppleSysexCmdSampleSize = $0001; { 21 bit number in 3 midi bytes follows sysex ID and 2 cmd bytes }
+ kAppleSysexCmdSampleBreak = $0002; { specifies that the sample should break right here }
+ kAppleSysexCmdAtomicInstrument = $0010; { contents of atomic instrument handle }
+ kAppleSysexCmdDeveloper = $7F00; { F0 11 7F 00 ww xx yy zz ... F7 is available for non-Apple developers, where wxyz is unique app signature with 8th bit cleared, unique to developer, and 00 and 7f are reserved }
+
+
+type
+ MusicMIDIPacketPtr = ^MusicMIDIPacket;
+ MusicMIDIPacket = record
+ length: UInt16;
+ reserved: UInt32; { if length zero, then reserved = above enum }
+ data: packed array [0..248] of UInt8;
+ end;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ MusicMIDISendProcPtr = function(self: ComponentInstance; refCon: SInt32; var mmp: MusicMIDIPacket): ComponentResult;
+{$elsec}
+ MusicMIDISendProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ MusicMIDISendUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ MusicMIDISendUPP = UniversalProcPtr;
+{$endc}
+
+const
+ kSynthesizerConnectionFMS = 1; { this connection imported from FMS }
+ kSynthesizerConnectionMMgr = 2; { this connection imported from the MIDI Mgr }
+ kSynthesizerConnectionOMS = 4; { this connection imported from OMS }
+ kSynthesizerConnectionQT = 8; { this connection is a QuickTime-only port }
+ kSynthesizerConnectionOSXMIDI = 16; { this connection is an OS X CoreMIDI port }
+ { lowest five bits are mutually exclusive; combinations reserved for future use. }
+ kSynthesizerConnectionUnavailable = 256; { port exists, but cannot be used just now }
+
+ {
+ The sampleBankFile field of this structure can be used to pass in a pointer to an FSSpec
+ that represents a SoundFont 2 or DLS file (otherwise set it to NULL ).
+
+ You then pass in a structure with this field set (all other fields should be zero) to
+ NARegisterMusicDevice:
+ - with synthType as kSoftSynthComponentSubType
+ - with name being used to return to the application the "name" of the synth
+ that should be used in the synthesiserName field of the ToneDescription structure
+ and is also used to retrieve a particular MusicComponent with the
+ NAGetRegisteredMusicDevice call
+
+ This call will create a MusicComponent of kSoftSynthComponentSubType, with the specified
+ sound bank as the sample data source.
+
+ This field requires QuickTime 5.0 or later and should be set to NULL for prior versions.
+ }
+
+type
+ SynthesizerConnectionsPtr = ^SynthesizerConnections;
+ SynthesizerConnections = record
+ clientID: OSType;
+ inputPortID: OSType; { terminology death: this port is used to SEND to the midi synth }
+ outputPortID: OSType; { terminology death: this port receives from a keyboard or other control device }
+ midiChannel: SInt32; { The system channel; others are configurable (or the nubus slot number) }
+ flags: SInt32;
+ unique: SInt32; { unique id may be used instead of index, to getinfo and unregister calls }
+ sampleBankFile: FSSpecPtr; { see notes above }
+ reserved2: SInt32; { should be zero }
+ end;
+
+ QTMIDIPortPtr = ^QTMIDIPort;
+ QTMIDIPort = record
+ portConnections: SynthesizerConnections;
+ portName: Str63;
+ end;
+
+ QTMIDIPortListPtr = ^QTMIDIPortList;
+ QTMIDIPortList = record
+ portCount: SInt16;
+ port: array [0..0] of QTMIDIPort;
+ end;
+
+ QTMIDIPortListHandle = ^QTMIDIPortListPtr;
+ {
+ * QTMIDIGetMIDIPorts()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTMIDIGetMIDIPorts(ci: QTMIDIComponent; var inputPorts: QTMIDIPortListHandle; var outputPorts: QTMIDIPortListHandle): ComponentResult; external name '_QTMIDIGetMIDIPorts';
+{
+ * QTMIDIUseSendPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTMIDIUseSendPort(ci: QTMIDIComponent; portIndex: SInt32; inUse: SInt32): ComponentResult; external name '_QTMIDIUseSendPort';
+{
+ * QTMIDISendMIDI()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTMIDISendMIDI(ci: QTMIDIComponent; portIndex: SInt32; var mp: MusicMIDIPacket): ComponentResult; external name '_QTMIDISendMIDI';
+const
+ kMusicComponentType = $6D757369 (* 'musi' *);
+ kInstrumentComponentType = $696E7374 (* 'inst' *);
+
+ kSoftSynthComponentSubType = $73732020 (* 'ss ' *);
+ kGMSynthComponentSubType = $676D2020 (* 'gm ' *);
+
+
+type
+ MusicComponent = ComponentInstance;
+ { MusicSynthesizerFlags }
+
+const
+ kSynthesizerDynamicVoice = $01; { can assign voices on the fly (else, polyphony is very important }
+ kSynthesizerUsesMIDIPort = $02; { must be patched through MIDI Manager }
+ kSynthesizerMicrotone = $04; { can play microtonal scales }
+ kSynthesizerHasSamples = $08; { synthesizer has some use for sampled data }
+ kSynthesizerMixedDrums = $10; { any part can play drum parts, total = instrument parts }
+ kSynthesizerSoftware = $20; { implemented in main CPU software == uses cpu cycles }
+ kSynthesizerHardware = $40; { is a hardware device (such as nubus, or maybe DSP?) }
+ kSynthesizerDynamicChannel = $80; { can move any part to any channel or disable each part. (else we assume it lives on all channels in masks) }
+ kSynthesizerHogsSystemChannel = $0100; { can be channelwise dynamic, but always responds on its system channel }
+ kSynthesizerHasSystemChannel = $0200; { has some "system channel" notion to distinguish it from multiple instances of the same device (GM devices dont) }
+ kSynthesizerSlowSetPart = $0400; { SetPart() and SetPartInstrumentNumber() calls do not have rapid response, may glitch notes }
+ kSynthesizerOffline = $1000; { can enter an offline synthesis mode }
+ kSynthesizerGM = $4000; { synth is a GM device }
+ kSynthesizerDLS = $8000; { synth supports DLS level 1 }
+ kSynthesizerSoundLocalization = $00010000; { synth supports extremely baroque, nonstandard, and proprietary "apple game sprockets" localization parameter set }
+
+ {
+ * Note that these controller numbers
+ * are _not_ identical to the MIDI controller numbers.
+ * These are _signed_ 8.8 values, and the LSB's are
+ * always sent to a MIDI device. Controllers 32-63 are
+ * reserved (for MIDI, they are LSB's for 0-31, but we
+ * always send both).
+ *
+ * The full range, therefore, is -128.00 to 127.7f.
+ *
+ * _Excepting_ _volume_, all controls default to zero.
+ *
+ * Pitch bend is specified in fractional semitones! No
+ * more "pitch bend range" nonsense. You can bend as far
+ * as you want, any time you want.
+ }
+
+type
+ MusicController = SInt32;
+
+const
+ kControllerModulationWheel = 1;
+ kControllerBreath = 2;
+ kControllerFoot = 4;
+ kControllerPortamentoTime = 5; { time in 8.8 seconds, portamento on/off is omitted, 0 time = 'off' }
+ kControllerVolume = 7; { main volume control }
+ kControllerBalance = 8;
+ kControllerPan = 10; { 0 - "default", 1 - n: positioned in output 1-n (incl fractions) }
+ kControllerExpression = 11; { secondary volume control }
+ kControllerLever1 = 16; { general purpose controllers }
+ kControllerLever2 = 17; { general purpose controllers }
+ kControllerLever3 = 18; { general purpose controllers }
+ kControllerLever4 = 19; { general purpose controllers }
+ kControllerLever5 = 80; { general purpose controllers }
+ kControllerLever6 = 81; { general purpose controllers }
+ kControllerLever7 = 82; { general purpose controllers }
+ kControllerLever8 = 83; { general purpose controllers }
+ kControllerPitchBend = 32; { positive & negative semitones, with 8 bits fraction, same units as transpose controllers }
+ kControllerAfterTouch = 33; { aka channel pressure }
+ kControllerPartTranspose = 40; { identical to pitchbend, for overall part xpose }
+ kControllerTuneTranspose = 41; { another pitchbend, for "song global" pitch offset }
+ kControllerPartVolume = 42; { another volume control, passed right down from note allocator part volume }
+ kControllerTuneVolume = 43; { another volume control, used for "song global" volume - since we share one synthesizer across multiple tuneplayers }
+ kControllerSustain = 64; { boolean - positive for on, 0 or negative off }
+ kControllerPortamento = 65; { boolean }
+ kControllerSostenuto = 66; { boolean }
+ kControllerSoftPedal = 67; { boolean }
+ kControllerReverb = 91;
+ kControllerTremolo = 92;
+ kControllerChorus = 93;
+ kControllerCeleste = 94;
+ kControllerPhaser = 95;
+ kControllerEditPart = 113; { last 16 controllers 113-128 and above are global controllers which respond on part zero }
+ kControllerMasterTune = 114;
+ kControllerMasterTranspose = 114; { preferred }
+ kControllerMasterVolume = 115;
+ kControllerMasterCPULoad = 116;
+ kControllerMasterPolyphony = 117;
+ kControllerMasterFeatures = 118;
+
+
+ { ID's of knobs supported by the QuickTime Music Synthesizer built into QuickTime }
+
+ kQTMSKnobStartID = $02000000;
+ kQTMSKnobVolumeAttackTimeID = $02000001;
+ kQTMSKnobVolumeDecayTimeID = $02000002;
+ kQTMSKnobVolumeSustainLevelID = $02000003;
+ kQTMSKnobVolumeRelease1RateID = $02000004;
+ kQTMSKnobVolumeDecayKeyScalingID = $02000005;
+ kQTMSKnobVolumeReleaseTimeID = $02000006;
+ kQTMSKnobVolumeLFODelayID = $02000007;
+ kQTMSKnobVolumeLFORampTimeID = $02000008;
+ kQTMSKnobVolumeLFOPeriodID = $02000009;
+ kQTMSKnobVolumeLFOShapeID = $0200000A;
+ kQTMSKnobVolumeLFODepthID = $0200000B;
+ kQTMSKnobVolumeOverallID = $0200000C;
+ kQTMSKnobVolumeVelocity127ID = $0200000D;
+ kQTMSKnobVolumeVelocity96ID = $0200000E;
+ kQTMSKnobVolumeVelocity64ID = $0200000F;
+ kQTMSKnobVolumeVelocity32ID = $02000010;
+ kQTMSKnobVolumeVelocity16ID = $02000011; { Pitch related knobs }
+ kQTMSKnobPitchTransposeID = $02000012;
+ kQTMSKnobPitchLFODelayID = $02000013;
+ kQTMSKnobPitchLFORampTimeID = $02000014;
+ kQTMSKnobPitchLFOPeriodID = $02000015;
+ kQTMSKnobPitchLFOShapeID = $02000016;
+ kQTMSKnobPitchLFODepthID = $02000017;
+ kQTMSKnobPitchLFOQuantizeID = $02000018; { Stereo related knobs }
+ kQTMSKnobStereoDefaultPanID = $02000019;
+ kQTMSKnobStereoPositionKeyScalingID = $0200001A;
+ kQTMSKnobPitchLFOOffsetID = $0200001B;
+ kQTMSKnobExclusionGroupID = $0200001C; { Misc knobs, late additions }
+ kQTMSKnobSustainTimeID = $0200001D;
+ kQTMSKnobSustainInfiniteID = $0200001E;
+ kQTMSKnobVolumeLFOStereoID = $0200001F;
+ kQTMSKnobVelocityLowID = $02000020;
+ kQTMSKnobVelocityHighID = $02000021;
+ kQTMSKnobVelocitySensitivityID = $02000022;
+ kQTMSKnobPitchSensitivityID = $02000023;
+ kQTMSKnobVolumeLFODepthFromWheelID = $02000024;
+ kQTMSKnobPitchLFODepthFromWheelID = $02000025; { Volume Env again }
+ kQTMSKnobVolumeExpOptionsID = $02000026; { Env1 }
+ kQTMSKnobEnv1AttackTimeID = $02000027;
+ kQTMSKnobEnv1DecayTimeID = $02000028;
+ kQTMSKnobEnv1SustainLevelID = $02000029;
+ kQTMSKnobEnv1SustainTimeID = $0200002A;
+ kQTMSKnobEnv1SustainInfiniteID = $0200002B;
+ kQTMSKnobEnv1ReleaseTimeID = $0200002C;
+ kQTMSKnobEnv1ExpOptionsID = $0200002D; { Env2 }
+ kQTMSKnobEnv2AttackTimeID = $0200002E;
+ kQTMSKnobEnv2DecayTimeID = $0200002F;
+ kQTMSKnobEnv2SustainLevelID = $02000030;
+ kQTMSKnobEnv2SustainTimeID = $02000031;
+ kQTMSKnobEnv2SustainInfiniteID = $02000032;
+ kQTMSKnobEnv2ReleaseTimeID = $02000033;
+ kQTMSKnobEnv2ExpOptionsID = $02000034; { Pitch Env }
+ kQTMSKnobPitchEnvelopeID = $02000035;
+ kQTMSKnobPitchEnvelopeDepthID = $02000036; { Filter }
+ kQTMSKnobFilterKeyFollowID = $02000037;
+ kQTMSKnobFilterTransposeID = $02000038;
+ kQTMSKnobFilterQID = $02000039;
+ kQTMSKnobFilterFrequencyEnvelopeID = $0200003A;
+ kQTMSKnobFilterFrequencyEnvelopeDepthID = $0200003B;
+ kQTMSKnobFilterQEnvelopeID = $0200003C;
+ kQTMSKnobFilterQEnvelopeDepthID = $0200003D; { Reverb Threshhold }
+ kQTMSKnobReverbThresholdID = $0200003E;
+ kQTMSKnobVolumeAttackVelScalingID = $0200003F;
+ kQTMSKnobLastIDPlus1 = $02000040;
+
+
+ kControllerMaximum = $00007FFF; { +01111111.11111111 }
+ kControllerMinimum = $FFFF8000; { -10000000.00000000 }
+
+
+type
+ SynthesizerDescriptionPtr = ^SynthesizerDescription;
+ SynthesizerDescription = record
+ synthesizerType: OSType; { synthesizer type (must be same as component subtype) }
+ name: Str31; { text name of synthesizer type }
+ flags: UInt32; { from the above enum }
+ voiceCount: UInt32; { maximum polyphony }
+ partCount: UInt32; { maximum multi-timbrality (and midi channels) }
+ instrumentCount: UInt32; { non gm, built in (rom) instruments only }
+ modifiableInstrumentCount: UInt32; { plus n-more are user modifiable }
+ channelMask: UInt32; { (midi device only) which channels device always uses }
+ drumPartCount: UInt32; { maximum multi-timbrality of drum parts }
+ drumCount: UInt32; { non gm, built in (rom) drumkits only }
+ modifiableDrumCount: UInt32; { plus n-more are user modifiable }
+ drumChannelMask: UInt32; { (midi device only) which channels device always uses }
+ outputCount: UInt32; { number of audio outputs (usually two) }
+ latency: UInt32; { response time in µSec }
+ controllers: array [0..3] of UInt32; { array of 128 bits }
+ gmInstruments: array [0..3] of UInt32; { array of 128 bits }
+ gmDrums: array [0..3] of UInt32; { array of 128 bits }
+ end;
+
+
+const
+ kVoiceCountDynamic = -1; { constant to use to specify dynamic voicing }
+
+
+type
+ ToneDescriptionPtr = ^ToneDescription;
+ ToneDescription = record
+ synthesizerType: BigEndianOSType; { synthesizer type }
+ synthesizerName: Str31; { name of instantiation of synth }
+ instrumentName: Str31; { preferred name for human use }
+ instrumentNumber: BigEndianLong; { inst-number used if synth-name matches }
+ gmNumber: BigEndianLong; { Best matching general MIDI number }
+ end;
+
+
+const
+ kFirstGMInstrument = $00000001;
+ kLastGMInstrument = $00000080;
+ kFirstGSInstrument = $00000081;
+ kLastGSInstrument = $00003FFF;
+ kFirstDrumkit = $00004000; { (first value is "no drum". instrument numbers from 16384->16384+128 are drumkits, and for GM they are _defined_ drumkits! }
+ kLastDrumkit = $00004080;
+ kFirstROMInstrument = $00008000;
+ kLastROMInstrument = $0000FFFF;
+ kFirstUserInstrument = $00010000;
+ kLastUserInstrument = $0001FFFF;
+
+ { InstrumentMatch }
+ kInstrumentMatchSynthesizerType = 1;
+ kInstrumentMatchSynthesizerName = 2;
+ kInstrumentMatchName = 4;
+ kInstrumentMatchNumber = 8;
+ kInstrumentMatchGMNumber = 16;
+ kInstrumentMatchGSNumber = 32;
+
+ { KnobFlags }
+ kKnobBasic = 8; { knob shows up in certain simplified lists of knobs }
+ kKnobReadOnly = 16; { knob value cannot be changed by user or with a SetKnob call }
+ kKnobInterruptUnsafe = 32; { only alter this knob from foreground task time (may access toolbox) }
+ kKnobKeyrangeOverride = 64; { knob can be overridden within a single keyrange (software synth only) }
+ kKnobGroupStart = 128; { knob is first in some logical group of knobs }
+ kKnobFixedPoint8 = 1024;
+ kKnobFixedPoint16 = 2048; { One of these may be used at a time. }
+ kKnobTypeNumber = $00;
+ kKnobTypeGroupName = $1000; { "knob" is really a group name for display purposes }
+ kKnobTypeBoolean = $2000; { if range is greater than 1, its a multi-checkbox field }
+ kKnobTypeNote = $3000; { knob range is equivalent to MIDI keys }
+ kKnobTypePan = $4000; { range goes left/right (lose this? ) }
+ kKnobTypeInstrument = $5000; { knob value = reference to another instrument number }
+ kKnobTypeSetting = $6000; { knob value is 1 of n different things (eg, fm algorithms) popup menu }
+ kKnobTypeMilliseconds = $7000; { knob is a millisecond time range }
+ kKnobTypePercentage = $8000; { knob range is displayed as a Percentage }
+ kKnobTypeHertz = $9000; { knob represents frequency }
+ kKnobTypeButton = $A000; { momentary trigger push button }
+
+
+ kUnknownKnobValue = $7FFFFFFF; { a knob with this value means, we don't know it. }
+ kDefaultKnobValue = $7FFFFFFE; { used to set a knob to its default value. }
+
+
+type
+ KnobDescriptionPtr = ^KnobDescription;
+ KnobDescription = record
+ name: Str63;
+ lowValue: SInt32;
+ highValue: SInt32;
+ defaultValue: SInt32; { a default instrument is made of all default values }
+ flags: SInt32;
+ knobID: SInt32;
+ end;
+
+ GCInstrumentDataPtr = ^GCInstrumentData;
+ GCInstrumentData = record
+ tone: ToneDescription;
+ knobCount: SInt32;
+ knob: array [0..0] of SInt32;
+ end;
+
+ GCInstrumentDataHandle = ^GCInstrumentDataPtr;
+ InstrumentAboutInfoPtr = ^InstrumentAboutInfo;
+ InstrumentAboutInfo = record
+ p: PicHandle;
+ author: Str255;
+ copyright: Str255;
+ other: Str255;
+ end;
+
+
+const
+ notImplementedMusicErr = $8000F7E9;
+ cantSendToSynthesizerErr = $8000F7E8;
+ cantReceiveFromSynthesizerErr = $8000F7E7;
+ illegalVoiceAllocationErr = $8000F7E6;
+ illegalPartErr = $8000F7E5;
+ illegalChannelErr = $8000F7E4;
+ illegalKnobErr = $8000F7E3;
+ illegalKnobValueErr = $8000F7E2;
+ illegalInstrumentErr = $8000F7E1;
+ illegalControllerErr = $8000F7E0;
+ midiManagerAbsentErr = $8000F7DF;
+ synthesizerNotRespondingErr = $8000F7DE;
+ synthesizerErr = $8000F7DD;
+ illegalNoteChannelErr = $8000F7DC;
+ noteChannelNotAllocatedErr = $8000F7DB;
+ tunePlayerFullErr = $8000F7DA;
+ tuneParseErr = $8000F7D9;
+
+ kGetAtomicInstNoExpandedSamples = $01;
+ kGetAtomicInstNoOriginalSamples = $02;
+ kGetAtomicInstNoSamples = $03;
+ kGetAtomicInstNoKnobList = $04;
+ kGetAtomicInstNoInstrumentInfo = $08;
+ kGetAtomicInstOriginalKnobList = $10;
+ kGetAtomicInstAllKnobs = $20; { return even those that are set to default }
+
+ {
+ For non-gm instruments, instrument number of tone description == 0
+ If you want to speed up while running, slam the inst num with what Get instrument number returns
+ All missing knobs are slammed to the default value
+ }
+ kSetAtomicInstKeepOriginalInstrument = $01;
+ kSetAtomicInstShareAcrossParts = $02; { inst disappears when app goes away }
+ kSetAtomicInstCallerTosses = $04; { the caller isn't keeping a copy around (for NASetAtomicInstrument) }
+ kSetAtomicInstCallerGuarantees = $08; { the caller guarantees a copy is around }
+ kSetAtomicInstInterruptSafe = $10; { dont move memory at this time (but process at next task time) }
+ kSetAtomicInstDontPreprocess = $80; { perform no further preprocessing because either 1)you know the instrument is digitally clean, or 2) you got it from a GetPartAtomic }
+
+ kInstrumentNamesModifiable = 1;
+ kInstrumentNamesBoth = 2;
+
+ {
+ * Structures specific to the GenericMusicComponent
+ }
+
+ kGenericMusicComponentSubtype = $67656E65 (* 'gene' *);
+
+
+type
+ GenericKnobDescriptionPtr = ^GenericKnobDescription;
+ GenericKnobDescription = record
+ kd: KnobDescription;
+ hw1: SInt32; { driver defined }
+ hw2: SInt32; { driver defined }
+ hw3: SInt32; { driver defined }
+ settingsID: SInt32; { resource ID list for boolean and popup names }
+ end;
+
+ GenericKnobDescriptionListPtr = ^GenericKnobDescriptionList;
+ GenericKnobDescriptionList = record
+ knobCount: SInt32;
+ knob: array [0..0] of GenericKnobDescription;
+ end;
+
+ GenericKnobDescriptionListHandle = ^GenericKnobDescriptionListPtr;
+ { knobTypes for MusicDerivedSetKnob }
+
+const
+ kGenericMusicKnob = 1;
+ kGenericMusicInstrumentKnob = 2;
+ kGenericMusicDrumKnob = 3;
+ kGenericMusicGlobalController = 4;
+
+
+ kGenericMusicResFirst = 0;
+ kGenericMusicResMiscStringList = 1; { STR# 1: synth name, 2:about author,3:aboutcopyright,4:aboutother }
+ kGenericMusicResMiscLongList = 2; { Long various params, see list below }
+ kGenericMusicResInstrumentList = 3; { NmLs of names and shorts, categories prefixed by '¥¥' }
+ kGenericMusicResDrumList = 4; { NmLs of names and shorts }
+ kGenericMusicResInstrumentKnobDescriptionList = 5; { Knob }
+ kGenericMusicResDrumKnobDescriptionList = 6; { Knob }
+ kGenericMusicResKnobDescriptionList = 7; { Knob }
+ kGenericMusicResBitsLongList = 8; { Long back to back bitmaps of controllers, gminstruments, and drums }
+ kGenericMusicResModifiableInstrumentHW = 9; { Shrt same as the hw shorts trailing the instrument names, a shortlist }
+ kGenericMusicResGMTranslation = 10; { Long 128 long entries, 1 for each gm inst, of local instrument numbers 1-n (not hw numbers) }
+ kGenericMusicResROMInstrumentData = 11; { knob lists for ROM instruments, so the knob values may be known }
+ kGenericMusicResAboutPICT = 12; { picture for aboutlist. must be present for GetAbout call to work }
+ kGenericMusicResLast = 13;
+
+ { elements of the misc long list }
+ kGenericMusicMiscLongFirst = 0;
+ kGenericMusicMiscLongVoiceCount = 1;
+ kGenericMusicMiscLongPartCount = 2;
+ kGenericMusicMiscLongModifiableInstrumentCount = 3;
+ kGenericMusicMiscLongChannelMask = 4;
+ kGenericMusicMiscLongDrumPartCount = 5;
+ kGenericMusicMiscLongModifiableDrumCount = 6;
+ kGenericMusicMiscLongDrumChannelMask = 7;
+ kGenericMusicMiscLongOutputCount = 8;
+ kGenericMusicMiscLongLatency = 9;
+ kGenericMusicMiscLongFlags = 10;
+ kGenericMusicMiscLongFirstGMHW = 11; { number to add to locate GM main instruments }
+ kGenericMusicMiscLongFirstGMDrumHW = 12; { number to add to locate GM drumkits }
+ kGenericMusicMiscLongFirstUserHW = 13; { First hw number of user instruments (presumed sequential) }
+ kGenericMusicMiscLongLast = 14;
+
+
+type
+ GCPartPtr = ^GCPart;
+ GCPart = record
+ hwInstrumentNumber: SInt32; { internal number of recalled instrument }
+ controller: array [0..127] of SInt16; { current values for all controllers }
+ volume: SInt32; { ctrl 7 is special case }
+ polyphony: SInt32;
+ midiChannel: SInt32; { 1-16 if in use }
+ id: GCInstrumentData; { ToneDescription & knoblist, uncertain length }
+ end;
+
+ {
+ * Calls specific to the GenericMusicComponent
+ }
+
+const
+ kMusicGenericRange = $0100;
+ kMusicDerivedRange = $0200;
+
+ {
+ * Flags in GenericMusicConfigure call
+ }
+ kGenericMusicDoMIDI = $01; { implement normal MIDI messages for note, controllers, and program changes 0-127 }
+ kGenericMusicBank0 = $02; { implement instrument bank changes on controller 0 }
+ kGenericMusicBank32 = $04; { implement instrument bank changes on controller 32 }
+ kGenericMusicErsatzMIDI = $08; { construct MIDI packets, but send them to the derived component }
+ kGenericMusicCallKnobs = $10; { call the derived component with special knob format call }
+ kGenericMusicCallParts = $20; { call the derived component with special part format call }
+ kGenericMusicCallInstrument = $40; { call MusicDerivedSetInstrument for MusicSetInstrument calls }
+ kGenericMusicCallNumber = $80; { call MusicDerivedSetPartInstrumentNumber for MusicSetPartInstrumentNumber calls, & don't send any C0 or bank stuff }
+ kGenericMusicCallROMInstrument = $0100; { call MusicSetInstrument for MusicSetPartInstrumentNumber for "ROM" instruments, passing params from the ROMi resource }
+ kGenericMusicAllDefaults = $0200; { indicates that when a new instrument is recalled, all knobs are reset to DEFAULT settings. True for GS modules }
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ MusicOfflineDataProcPtr = function(SoundData: Ptr; numBytes: SInt32; myRefCon: SInt32): ComponentResult;
+{$elsec}
+ MusicOfflineDataProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ MusicOfflineDataUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ MusicOfflineDataUPP = UniversalProcPtr;
+{$endc}
+ OfflineSampleTypePtr = ^OfflineSampleType;
+ OfflineSampleType = record
+ numChannels: UInt32; { number of channels, ie mono = 1 }
+ sampleRate: UnsignedFixed; { sample rate in Apples Fixed point representation }
+ sampleSize: UInt16; { number of bits in sample }
+ end;
+
+ InstrumentInfoRecordPtr = ^InstrumentInfoRecord;
+ InstrumentInfoRecord = record
+ instrumentNumber: SInt32; { instrument number (if 0, name is a catagory) }
+ flags: SInt32; { show in picker, etc. }
+ toneNameIndex: SInt32; { index in toneNames (1 based) }
+ itxtNameAtomID: SInt32; { index in itxtNames (itxt/name by index) }
+ end;
+
+ InstrumentInfoListPtr = ^InstrumentInfoList;
+ InstrumentInfoList = record
+ recordCount: SInt32;
+ toneNames: Handle; { name from tone description }
+ itxtNames: QTAtomContainer; { itxt/name atoms for instruments }
+ info: array [0..0] of InstrumentInfoRecord;
+ end;
+
+ InstrumentInfoListHandle = ^InstrumentInfoListPtr;
+ {
+ * MusicGetDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetDescription(mc: MusicComponent; var sd: SynthesizerDescription): ComponentResult; external name '_MusicGetDescription';
+{
+ * MusicGetPart()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetPart(mc: MusicComponent; part: SInt32; var midiChannel: SInt32; var polyphony: SInt32): ComponentResult; external name '_MusicGetPart';
+{
+ * MusicSetPart()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicSetPart(mc: MusicComponent; part: SInt32; midiChannel: SInt32; polyphony: SInt32): ComponentResult; external name '_MusicSetPart';
+{
+ * MusicSetPartInstrumentNumber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicSetPartInstrumentNumber(mc: MusicComponent; part: SInt32; instrumentNumber: SInt32): ComponentResult; external name '_MusicSetPartInstrumentNumber';
+{
+ * MusicGetPartInstrumentNumber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetPartInstrumentNumber(mc: MusicComponent; part: SInt32): ComponentResult; external name '_MusicGetPartInstrumentNumber';
+{
+ * MusicStorePartInstrument()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicStorePartInstrument(mc: MusicComponent; part: SInt32; instrumentNumber: SInt32): ComponentResult; external name '_MusicStorePartInstrument';
+{
+ * MusicGetPartAtomicInstrument()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetPartAtomicInstrument(mc: MusicComponent; part: SInt32; var ai: AtomicInstrument; flags: SInt32): ComponentResult; external name '_MusicGetPartAtomicInstrument';
+{
+ * MusicSetPartAtomicInstrument()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicSetPartAtomicInstrument(mc: MusicComponent; part: SInt32; aiP: AtomicInstrumentPtr; flags: SInt32): ComponentResult; external name '_MusicSetPartAtomicInstrument';
+{
+ * MusicGetPartKnob()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetPartKnob(mc: MusicComponent; part: SInt32; knobID: SInt32): ComponentResult; external name '_MusicGetPartKnob';
+{
+ * MusicSetPartKnob()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicSetPartKnob(mc: MusicComponent; part: SInt32; knobID: SInt32; knobValue: SInt32): ComponentResult; external name '_MusicSetPartKnob';
+{
+ * MusicGetKnob()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetKnob(mc: MusicComponent; knobID: SInt32): ComponentResult; external name '_MusicGetKnob';
+{
+ * MusicSetKnob()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicSetKnob(mc: MusicComponent; knobID: SInt32; knobValue: SInt32): ComponentResult; external name '_MusicSetKnob';
+{
+ * MusicGetPartName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetPartName(mc: MusicComponent; part: SInt32; name: StringPtr): ComponentResult; external name '_MusicGetPartName';
+{
+ * MusicSetPartName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicSetPartName(mc: MusicComponent; part: SInt32; name: StringPtr): ComponentResult; external name '_MusicSetPartName';
+{
+ * MusicFindTone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicFindTone(mc: MusicComponent; var td: ToneDescription; var libraryIndexOut: SInt32; var fit: UInt32): ComponentResult; external name '_MusicFindTone';
+{
+ * MusicPlayNote()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicPlayNote(mc: MusicComponent; part: SInt32; pitch: SInt32; velocity: SInt32): ComponentResult; external name '_MusicPlayNote';
+{
+ * MusicResetPart()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicResetPart(mc: MusicComponent; part: SInt32): ComponentResult; external name '_MusicResetPart';
+{
+ * MusicSetPartController()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicSetPartController(mc: MusicComponent; part: SInt32; controllerNumber: MusicController; controllerValue: SInt32): ComponentResult; external name '_MusicSetPartController';
+{
+ * MusicGetPartController()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetPartController(mc: MusicComponent; part: SInt32; controllerNumber: MusicController): ComponentResult; external name '_MusicGetPartController';
+{
+ * MusicGetMIDIProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetMIDIProc(mc: MusicComponent; var midiSendProc: MusicMIDISendUPP; var refCon: SInt32): ComponentResult; external name '_MusicGetMIDIProc';
+{
+ * MusicSetMIDIProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicSetMIDIProc(mc: MusicComponent; midiSendProc: MusicMIDISendUPP; refCon: SInt32): ComponentResult; external name '_MusicSetMIDIProc';
+{
+ * MusicGetInstrumentNames()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetInstrumentNames(mc: MusicComponent; modifiableInstruments: SInt32; var instrumentNames: Handle; var instrumentCategoryLasts: Handle; var instrumentCategoryNames: Handle): ComponentResult; external name '_MusicGetInstrumentNames';
+{
+ * MusicGetDrumNames()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetDrumNames(mc: MusicComponent; modifiableInstruments: SInt32; var instrumentNumbers: Handle; var instrumentNames: Handle): ComponentResult; external name '_MusicGetDrumNames';
+{
+ * MusicGetMasterTune()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetMasterTune(mc: MusicComponent): ComponentResult; external name '_MusicGetMasterTune';
+{
+ * MusicSetMasterTune()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicSetMasterTune(mc: MusicComponent; masterTune: SInt32): ComponentResult; external name '_MusicSetMasterTune';
+{
+ * MusicGetInstrumentAboutInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetInstrumentAboutInfo(mc: MusicComponent; part: SInt32; var iai: InstrumentAboutInfo): ComponentResult; external name '_MusicGetInstrumentAboutInfo';
+{
+ * MusicGetDeviceConnection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetDeviceConnection(mc: MusicComponent; index: SInt32; var id1: SInt32; var id2: SInt32): ComponentResult; external name '_MusicGetDeviceConnection';
+{
+ * MusicUseDeviceConnection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicUseDeviceConnection(mc: MusicComponent; id1: SInt32; id2: SInt32): ComponentResult; external name '_MusicUseDeviceConnection';
+{
+ * MusicGetKnobSettingStrings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetKnobSettingStrings(mc: MusicComponent; knobIndex: SInt32; isGlobal: SInt32; var settingsNames: Handle; var settingsCategoryLasts: Handle; var settingsCategoryNames: Handle): ComponentResult; external name '_MusicGetKnobSettingStrings';
+{
+ * MusicGetMIDIPorts()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetMIDIPorts(mc: MusicComponent; var inputPortCount: SInt32; var outputPortCount: SInt32): ComponentResult; external name '_MusicGetMIDIPorts';
+{
+ * MusicSendMIDI()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicSendMIDI(mc: MusicComponent; portIndex: SInt32; var mp: MusicMIDIPacket): ComponentResult; external name '_MusicSendMIDI';
+{
+ * MusicStartOffline()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicStartOffline(mc: MusicComponent; var numChannels: UInt32; var sampleRate: UnsignedFixed; var sampleSize: UInt16; dataProc: MusicOfflineDataUPP; dataProcRefCon: SInt32): ComponentResult; external name '_MusicStartOffline';
+{
+ * MusicSetOfflineTimeTo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicSetOfflineTimeTo(mc: MusicComponent; newTimeStamp: SInt32): ComponentResult; external name '_MusicSetOfflineTimeTo';
+{
+ * MusicGetInstrumentKnobDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetInstrumentKnobDescription(mc: MusicComponent; knobIndex: SInt32; var mkd: KnobDescription): ComponentResult; external name '_MusicGetInstrumentKnobDescription';
+{
+ * MusicGetDrumKnobDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetDrumKnobDescription(mc: MusicComponent; knobIndex: SInt32; var mkd: KnobDescription): ComponentResult; external name '_MusicGetDrumKnobDescription';
+{
+ * MusicGetKnobDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetKnobDescription(mc: MusicComponent; knobIndex: SInt32; var mkd: KnobDescription): ComponentResult; external name '_MusicGetKnobDescription';
+{
+ * MusicGetInfoText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetInfoText(mc: MusicComponent; selector: SInt32; var textH: Handle; var styleH: Handle): ComponentResult; external name '_MusicGetInfoText';
+const
+ kGetInstrumentInfoNoBuiltIn = $01;
+ kGetInstrumentInfoMidiUserInst = $02;
+ kGetInstrumentInfoNoIText = $04;
+
+ {
+ * MusicGetInstrumentInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGetInstrumentInfo(mc: MusicComponent; getInstrumentInfoFlags: SInt32; var infoListH: InstrumentInfoListHandle): ComponentResult; external name '_MusicGetInstrumentInfo';
+{
+ * MusicTask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicTask(mc: MusicComponent): ComponentResult; external name '_MusicTask';
+{
+ * MusicSetPartInstrumentNumberInterruptSafe()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicSetPartInstrumentNumberInterruptSafe(mc: MusicComponent; part: SInt32; instrumentNumber: SInt32): ComponentResult; external name '_MusicSetPartInstrumentNumberInterruptSafe';
+{
+ * MusicSetPartSoundLocalization()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicSetPartSoundLocalization(mc: MusicComponent; part: SInt32; data: Handle): ComponentResult; external name '_MusicSetPartSoundLocalization';
+{
+ * MusicGenericConfigure()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGenericConfigure(mc: MusicComponent; mode: SInt32; flags: SInt32; baseResID: SInt32): ComponentResult; external name '_MusicGenericConfigure';
+{
+ * MusicGenericGetPart()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGenericGetPart(mc: MusicComponent; partNumber: SInt32; var part: UnivPtr): ComponentResult; external name '_MusicGenericGetPart';
+{
+ * MusicGenericGetKnobList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGenericGetKnobList(mc: MusicComponent; knobType: SInt32; var gkdlH: GenericKnobDescriptionListHandle): ComponentResult; external name '_MusicGenericGetKnobList';
+{
+ * MusicGenericSetResourceNumbers()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicGenericSetResourceNumbers(mc: MusicComponent; resourceIDH: Handle): ComponentResult; external name '_MusicGenericSetResourceNumbers';
+{
+ * MusicDerivedMIDISend()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicDerivedMIDISend(mc: MusicComponent; var packet: MusicMIDIPacket): ComponentResult; external name '_MusicDerivedMIDISend';
+{
+ * MusicDerivedSetKnob()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicDerivedSetKnob(mc: MusicComponent; knobType: SInt32; knobNumber: SInt32; knobValue: SInt32; partNumber: SInt32; var p: GCPart; var gkd: GenericKnobDescription): ComponentResult; external name '_MusicDerivedSetKnob';
+{
+ * MusicDerivedSetPart()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicDerivedSetPart(mc: MusicComponent; partNumber: SInt32; var p: GCPart): ComponentResult; external name '_MusicDerivedSetPart';
+{
+ * MusicDerivedSetInstrument()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicDerivedSetInstrument(mc: MusicComponent; partNumber: SInt32; var p: GCPart): ComponentResult; external name '_MusicDerivedSetInstrument';
+{
+ * MusicDerivedSetPartInstrumentNumber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicDerivedSetPartInstrumentNumber(mc: MusicComponent; partNumber: SInt32; var p: GCPart): ComponentResult; external name '_MusicDerivedSetPartInstrumentNumber';
+{
+ * MusicDerivedSetMIDI()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicDerivedSetMIDI(mc: MusicComponent; midiProc: MusicMIDISendUPP; refcon: SInt32; midiChannel: SInt32): ComponentResult; external name '_MusicDerivedSetMIDI';
+{
+ * MusicDerivedStorePartInstrument()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicDerivedStorePartInstrument(mc: MusicComponent; partNumber: SInt32; var p: GCPart; instrumentNumber: SInt32): ComponentResult; external name '_MusicDerivedStorePartInstrument';
+{
+ * MusicDerivedOpenResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicDerivedOpenResFile(mc: MusicComponent): ComponentResult; external name '_MusicDerivedOpenResFile';
+{
+ * MusicDerivedCloseResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MusicDerivedCloseResFile(mc: MusicComponent; resRefNum: SInt16): ComponentResult; external name '_MusicDerivedCloseResFile';
+{--------------------------
+ Types
+--------------------------}
+
+const
+ kNoteRequestNoGM = 1; { don't degrade to a GM synth }
+ kNoteRequestNoSynthType = 2; { don't degrade to another synth of same type but different name }
+ kNoteRequestSynthMustMatch = 4; { synthType must be a match, including kGMSynthComponentSubType }
+
+
+ kNoteRequestSpecifyMIDIChannel = $80;
+
+
+type
+ NoteAllocator = ComponentInstance;
+ {
+ The midiChannelAssignment field of this structure is used to assign a MIDI channel
+ when a NoteChannel is created from a NoteRequest.
+ A value of 0 indicates a MIDI channel has *not* been assigned
+ A value of (kNoteRequestSpecifyMIDIChannel | 1->16) is a MIDI channel assignment
+
+ This field requires QuickTime 5.0 or later and should be set to 0 for prior versions.
+ }
+ NoteRequestMIDIChannel = UInt8;
+ NoteRequestInfoPtr = ^NoteRequestInfo;
+ NoteRequestInfo = record
+ flags: SInt8; { 1: dont accept GM match, 2: dont accept same-synth-type match }
+ midiChannelAssignment: SInt8; { (kNoteRequestSpecifyMIDIChannel | 1->16) as MIDI Channel assignement or zero - see notes above }
+ polyphony: BigEndianShort; { Maximum number of voices }
+ typicalPolyphony: BigEndianFixed; { Hint for level mixing }
+ end;
+
+ NoteRequestPtr = ^NoteRequest;
+ NoteRequest = record
+ info: NoteRequestInfo;
+ tone: ToneDescription;
+ end;
+
+ NoteChannel = ^SInt32; { an opaque 32-bit type }
+ NoteChannelPtr = ^NoteChannel; { when a var xx:NoteChannel parameter can be nil, it is changed to xx: NoteChannelPtr }
+
+
+const
+ kPickDontMix = 1; { dont mix instruments with drum sounds }
+ kPickSameSynth = 2; { only allow the same device that went in, to come out }
+ kPickUserInsts = 4; { show user insts in addition to ROM voices }
+ kPickEditAllowEdit = 8; { lets user switch over to edit mode }
+ kPickEditAllowPick = 16; { lets the user switch over to pick mode }
+ kPickEditSynthGlobal = 32; { edit the global knobs of the synth }
+ kPickEditControllers = 64; { edit the controllers of the notechannel }
+
+
+ kNoteAllocatorComponentType = $6E6F7461 (* 'nota' *);
+
+
+ { --------------------------------
+ Note Allocator Prototypes
+ -------------------------------- }
+ {
+ * NARegisterMusicDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NARegisterMusicDevice(na: NoteAllocator; synthType: OSType; var name: Str31; var connections: SynthesizerConnections): ComponentResult; external name '_NARegisterMusicDevice';
+{
+ * NAUnregisterMusicDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAUnregisterMusicDevice(na: NoteAllocator; index: SInt32): ComponentResult; external name '_NAUnregisterMusicDevice';
+{
+ * NAGetRegisteredMusicDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAGetRegisteredMusicDevice(na: NoteAllocator; index: SInt32; var synthType: OSType; var name: Str31; var connections: SynthesizerConnections; var mc: MusicComponent): ComponentResult; external name '_NAGetRegisteredMusicDevice';
+{
+ * NASaveMusicConfiguration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NASaveMusicConfiguration(na: NoteAllocator): ComponentResult; external name '_NASaveMusicConfiguration';
+{
+ * NANewNoteChannel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NANewNoteChannel(na: NoteAllocator; var noteRequest_: NoteRequest; var outChannel: NoteChannel): ComponentResult; external name '_NANewNoteChannel';
+{
+ * NADisposeNoteChannel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NADisposeNoteChannel(na: NoteAllocator; noteChannel_: NoteChannel): ComponentResult; external name '_NADisposeNoteChannel';
+{
+ * NAGetNoteChannelInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAGetNoteChannelInfo(na: NoteAllocator; noteChannel_: NoteChannel; var index: SInt32; var part: SInt32): ComponentResult; external name '_NAGetNoteChannelInfo';
+{
+ * NAPrerollNoteChannel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAPrerollNoteChannel(na: NoteAllocator; noteChannel_: NoteChannel): ComponentResult; external name '_NAPrerollNoteChannel';
+{
+ * NAUnrollNoteChannel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAUnrollNoteChannel(na: NoteAllocator; noteChannel_: NoteChannel): ComponentResult; external name '_NAUnrollNoteChannel';
+{
+ * NASetNoteChannelVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NASetNoteChannelVolume(na: NoteAllocator; noteChannel_: NoteChannel; volume: Fixed): ComponentResult; external name '_NASetNoteChannelVolume';
+{
+ * NAResetNoteChannel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAResetNoteChannel(na: NoteAllocator; noteChannel_: NoteChannel): ComponentResult; external name '_NAResetNoteChannel';
+{
+ * NAPlayNote()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAPlayNote(na: NoteAllocator; noteChannel_: NoteChannel; pitch: SInt32; velocity: SInt32): ComponentResult; external name '_NAPlayNote';
+{
+ * NASetController()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NASetController(na: NoteAllocator; noteChannel_: NoteChannel; controllerNumber: SInt32; controllerValue: SInt32): ComponentResult; external name '_NASetController';
+{
+ * NASetKnob()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NASetKnob(na: NoteAllocator; noteChannel_: NoteChannel; knobNumber: SInt32; knobValue: SInt32): ComponentResult; external name '_NASetKnob';
+{
+ * NAFindNoteChannelTone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAFindNoteChannelTone(na: NoteAllocator; noteChannel_: NoteChannel; var td: ToneDescription; var instrumentNumber: SInt32): ComponentResult; external name '_NAFindNoteChannelTone';
+{
+ * NASetInstrumentNumber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NASetInstrumentNumber(na: NoteAllocator; noteChannel_: NoteChannel; instrumentNumber: SInt32): ComponentResult; external name '_NASetInstrumentNumber';
+{
+ * NAPickInstrument()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAPickInstrument(na: NoteAllocator; filterProc: ModalFilterUPP; prompt: StringPtr; var sd: ToneDescription; flags: UInt32; refCon: SInt32; reserved1: SInt32; reserved2: SInt32): ComponentResult; external name '_NAPickInstrument';
+{
+ * NAPickArrangement()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAPickArrangement(na: NoteAllocator; filterProc: ModalFilterUPP; prompt: StringPtr; zero1: SInt32; zero2: SInt32; t: Track; songName: StringPtr): ComponentResult; external name '_NAPickArrangement';
+{
+ * NAStuffToneDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAStuffToneDescription(na: NoteAllocator; gmNumber: SInt32; var td: ToneDescription): ComponentResult; external name '_NAStuffToneDescription';
+{
+ * NACopyrightDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NACopyrightDialog(na: NoteAllocator; p: PicHandle; author: StringPtr; copyright: StringPtr; other: StringPtr; title: StringPtr; filterProc: ModalFilterUPP; refCon: SInt32): ComponentResult; external name '_NACopyrightDialog';
+{
+ kNADummyOneSelect = 29
+ kNADummyTwoSelect = 30
+}
+
+{
+ * NAGetIndNoteChannel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAGetIndNoteChannel(na: NoteAllocator; index: SInt32; var nc: NoteChannel; var seed: SInt32): ComponentResult; external name '_NAGetIndNoteChannel';
+{
+ * NAGetMIDIPorts()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAGetMIDIPorts(na: NoteAllocator; var inputPorts: QTMIDIPortListHandle; var outputPorts: QTMIDIPortListHandle): ComponentResult; external name '_NAGetMIDIPorts';
+{
+ * NAGetNoteRequest()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAGetNoteRequest(na: NoteAllocator; noteChannel_: NoteChannel; var nrOut: NoteRequest): ComponentResult; external name '_NAGetNoteRequest';
+{
+ * NASendMIDI()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NASendMIDI(na: NoteAllocator; noteChannel_: NoteChannel; var mp: MusicMIDIPacket): ComponentResult; external name '_NASendMIDI';
+{
+ * NAPickEditInstrument()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAPickEditInstrument(na: NoteAllocator; filterProc: ModalFilterUPP; prompt: StringPtr; refCon: SInt32; nc: NoteChannel; ai: AtomicInstrument; flags: SInt32): ComponentResult; external name '_NAPickEditInstrument';
+{
+ * NANewNoteChannelFromAtomicInstrument()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NANewNoteChannelFromAtomicInstrument(na: NoteAllocator; instrument: AtomicInstrumentPtr; flags: SInt32; var outChannel: NoteChannel): ComponentResult; external name '_NANewNoteChannelFromAtomicInstrument';
+{
+ * NASetAtomicInstrument()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NASetAtomicInstrument(na: NoteAllocator; noteChannel_: NoteChannel; instrument: AtomicInstrumentPtr; flags: SInt32): ComponentResult; external name '_NASetAtomicInstrument';
+{
+ * NAGetKnob()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAGetKnob(na: NoteAllocator; noteChannel_: NoteChannel; knobNumber: SInt32; var knobValue: SInt32): ComponentResult; external name '_NAGetKnob';
+{
+ * NATask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NATask(na: NoteAllocator): ComponentResult; external name '_NATask';
+{
+ * NASetNoteChannelBalance()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NASetNoteChannelBalance(na: NoteAllocator; noteChannel_: NoteChannel; balance: SInt32): ComponentResult; external name '_NASetNoteChannelBalance';
+{
+ * NASetInstrumentNumberInterruptSafe()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NASetInstrumentNumberInterruptSafe(na: NoteAllocator; noteChannel_: NoteChannel; instrumentNumber: SInt32): ComponentResult; external name '_NASetInstrumentNumberInterruptSafe';
+{
+ * NASetNoteChannelSoundLocalization()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NASetNoteChannelSoundLocalization(na: NoteAllocator; noteChannel_: NoteChannel; data: Handle): ComponentResult; external name '_NASetNoteChannelSoundLocalization';
+{
+ * NAGetController()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function NAGetController(na: NoteAllocator; noteChannel_: NoteChannel; controllerNumber: SInt32; var controllerValue: SInt32): ComponentResult; external name '_NAGetController';
+const
+ kTuneQueueDepth = 8; { Deepest you can queue tune segments }
+
+
+type
+ TuneStatusPtr = ^TuneStatus;
+ TuneStatus = record
+ tune: SInt32Ptr; { currently playing tune }
+ tunePtr: SInt32Ptr; { position within currently playing piece }
+ time: TimeValue; { current tune time }
+ queueCount: SInt16; { how many pieces queued up? }
+ queueSpots: SInt16; { How many more tunepieces can be queued }
+ queueTime: TimeValue; { How much time is queued up? (can be very inaccurate) }
+ reserved: array [0..2] of SInt32;
+ end;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TuneCallBackProcPtr = procedure(const (*var*) status: TuneStatus; refCon: SInt32);
+{$elsec}
+ TuneCallBackProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ TunePlayCallBackProcPtr = procedure(var event: UInt32; seed: SInt32; refCon: SInt32);
+{$elsec}
+ TunePlayCallBackProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ TuneCallBackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ TuneCallBackUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ TunePlayCallBackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ TunePlayCallBackUPP = UniversalProcPtr;
+{$endc}
+ TunePlayer = ComponentInstance;
+
+const
+ kTunePlayerComponentType = $74756E65 (* 'tune' *);
+
+
+ {
+ * TuneSetHeader()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneSetHeader(tp: TunePlayer; var header: UInt32): ComponentResult; external name '_TuneSetHeader';
+{
+ * TuneGetTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneGetTimeBase(tp: TunePlayer; var tb: TimeBase): ComponentResult; external name '_TuneGetTimeBase';
+{
+ * TuneSetTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneSetTimeScale(tp: TunePlayer; scale: TimeScale): ComponentResult; external name '_TuneSetTimeScale';
+{
+ * TuneGetTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneGetTimeScale(tp: TunePlayer; var scale: TimeScale): ComponentResult; external name '_TuneGetTimeScale';
+{
+ * TuneGetIndexedNoteChannel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneGetIndexedNoteChannel(tp: TunePlayer; i: SInt32; var nc: NoteChannel): ComponentResult; external name '_TuneGetIndexedNoteChannel';
+{ Values for when to start. }
+
+const
+ kTuneStartNow = 1; { start after buffer is implied }
+ kTuneDontClipNotes = 2; { allow notes to finish their durations outside sample }
+ kTuneExcludeEdgeNotes = 4; { dont play notes that start at end of tune }
+ kTuneQuickStart = 8; { Leave all the controllers where they are, ignore start time }
+ kTuneLoopUntil = 16; { loop a queued tune if there's nothing else in the queue }
+ kTunePlayDifference = 32; { by default, the tune difference is skipped }
+ kTunePlayConcurrent = 64; { dont block the next tune sequence with this one }
+ kTuneStartNewMaster = 16384;
+
+ {
+ * TuneQueue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneQueue(tp: TunePlayer; var tune: UInt32; tuneRate: Fixed; tuneStartPosition: UInt32; tuneStopPosition: UInt32; queueFlags: UInt32; callBackProc: TuneCallBackUPP; refCon: SInt32): ComponentResult; external name '_TuneQueue';
+{
+ * TuneInstant()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneInstant(tp: TunePlayer; var tune: UInt32; tunePosition: UInt32): ComponentResult; external name '_TuneInstant';
+{
+ * TuneGetStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneGetStatus(tp: TunePlayer; var status: TuneStatus): ComponentResult; external name '_TuneGetStatus';
+{ Values for stopping. }
+
+const
+ kTuneStopFade = 1; { do a quick, synchronous fadeout }
+ kTuneStopSustain = 2; { don't silece notes }
+ kTuneStopInstant = 4; { silence notes fast (else, decay them) }
+ kTuneStopReleaseChannels = 8; { afterwards, let the channels go }
+
+ {
+ * TuneStop()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneStop(tp: TunePlayer; stopFlags: SInt32): ComponentResult; external name '_TuneStop';
+{
+ * TuneSetVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneSetVolume(tp: TunePlayer; volume: Fixed): ComponentResult; external name '_TuneSetVolume';
+{
+ * TuneGetVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneGetVolume(tp: TunePlayer): ComponentResult; external name '_TuneGetVolume';
+{
+ * TunePreroll()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TunePreroll(tp: TunePlayer): ComponentResult; external name '_TunePreroll';
+{
+ * TuneUnroll()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneUnroll(tp: TunePlayer): ComponentResult; external name '_TuneUnroll';
+{
+ * TuneSetNoteChannels()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneSetNoteChannels(tp: TunePlayer; count: UInt32; var noteChannelList: NoteChannel; playCallBackProc: TunePlayCallBackUPP; refCon: SInt32): ComponentResult; external name '_TuneSetNoteChannels';
+{
+ * TuneSetPartTranspose()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneSetPartTranspose(tp: TunePlayer; part: UInt32; transpose: SInt32; velocityShift: SInt32): ComponentResult; external name '_TuneSetPartTranspose';
+{
+ * TuneGetNoteAllocator()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneGetNoteAllocator(tp: TunePlayer): NoteAllocator; external name '_TuneGetNoteAllocator';
+{
+ * TuneSetSofter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneSetSofter(tp: TunePlayer; softer: SInt32): ComponentResult; external name '_TuneSetSofter';
+{
+ * TuneTask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneTask(tp: TunePlayer): ComponentResult; external name '_TuneTask';
+{
+ * TuneSetBalance()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneSetBalance(tp: TunePlayer; balance: SInt32): ComponentResult; external name '_TuneSetBalance';
+{
+ * TuneSetSoundLocalization()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneSetSoundLocalization(tp: TunePlayer; data: Handle): ComponentResult; external name '_TuneSetSoundLocalization';
+{
+ * TuneSetHeaderWithSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneSetHeaderWithSize(tp: TunePlayer; var header: UInt32; size: UInt32): ComponentResult; external name '_TuneSetHeaderWithSize';
+{ flags for part mix. }
+
+const
+ kTuneMixMute = 1; { disable a part }
+ kTuneMixSolo = 2; { if any parts soloed, play only soloed parts }
+
+
+ {
+ * TuneSetPartMix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneSetPartMix(tp: TunePlayer; partNumber: UInt32; volume: SInt32; balance: SInt32; mixFlags: SInt32): ComponentResult; external name '_TuneSetPartMix';
+{
+ * TuneGetPartMix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TuneGetPartMix(tp: TunePlayer; partNumber: UInt32; var volumeOut: SInt32; var balanceOut: SInt32; var mixFlagsOut: SInt32): ComponentResult; external name '_TuneGetPartMix';
+type
+ MusicOpWord = UInt32;
+ MusicOpWordPtr = ^MusicOpWord;
+ { QuickTime Music Track Event Formats:
+
+ At this time, QuickTime music tracks support 5 different event types -- REST events,
+ short NOTE events, short CONTROL events, short GENERAL events, Long NOTE events,
+ long CONTROL events, and variable GENERAL events.
+
+ ¥ REST Event (4 bytes/event):
+
+ (0 0 0) (5-bit UNUSED) (24-bit Rest Duration)
+
+ ¥ÊShort NOTE Events (4 bytes/event):
+
+ (0 0 1) (5-bit Part) (6-bit Pitch) (7-bit Volume) (11-bit Duration)
+
+ where: Pitch is offset by 32 (Actual pitch = pitch field + 32)
+
+ ¥ÊShort CONTROL Events (4 bytes/event):
+
+ (0 1 0) (5-bit Part) (8-bit Controller) (1-bit UNUSED) (1-bit Sign) (7-bit MSB) (7-bit LSB)
+ ( or 15-bit Signed Value)
+ ¥ Short GENERAL Event (4 bytes/event):
+
+ (0 1 1) (1-bit UNUSED) (12-bit Sub-Type) (16-bit Value)
+
+ ¥ Long NOTE Events (8 bytes/event):
+
+ (1 0 0 1) (12-bit Part) (1-bit UNUSED) (7-bit Pitch) (1-bit UNUSED) (7-bit Volume)
+ (1 0) (8-bit UNUSED) (22-bit Duration)
+
+ ¥ÊLong CONTROL Event (8 bytes/event):
+
+ (1 0 1 0) (12-bit Part) (16-bit Value MSB)
+ (1 0) (14-bit Controller) (16-bit Value LSB)
+
+ ¥ÊLong KNOB Event (8 bytes/event):
+
+ (1 0 1 1) (12-bit Sub-Type) (16-bit Value MSB)
+ (1 0) (14-bit KNOB) (16-bit Value LSB)
+
+ ¥ÊVariable GENERAL Length Events (N bytes/event):
+
+ (1 1 1 1) (12-bit Sub-Type) (16-bit Length)
+ :
+ (32-bit Data values)
+ :
+ (1 1) (14-bit UNUSED) (16-bit Length)
+
+ where: Length field is the number of LONG words in the record.
+ Lengths include the first and last long words (Minimum length = 2)
+
+ The following event type values have not been used yet and are reserved for
+ future expansion:
+
+ ¥ (1 0 0 0) (8 bytes/event)
+ ¥ (1 1 0 0) (N bytes/event)
+ ¥ (1 1 0 1) (N bytes/event)
+ ¥ (1 1 1 0) (N bytes/event)
+
+ For all events, the following generalizations apply:
+
+ - All duration values are specified in Millisecond units.
+ - Pitch values are intended to map directly to the MIDI key numbers.
+ - Controllers from 0 to 127 correspond to the standard MIDI controllers.
+ Controllers greater than 127 correspond to other controls (i.e., Pitch Bend,
+ Key Pressure, and Channel Pressure).
+ }
+
+ { Defines for the implemented music event data fields }
+
+const
+ kRestEventType = $00000000; { lower 3-bits }
+ kNoteEventType = $00000001; { lower 3-bits }
+ kControlEventType = $00000002; { lower 3-bits }
+ kMarkerEventType = $00000003; { lower 3-bits }
+ kUndefined1EventType = $00000008; { 4-bits }
+ kXNoteEventType = $00000009; { 4-bits }
+ kXControlEventType = $0000000A; { 4-bits }
+ kKnobEventType = $0000000B; { 4-bits }
+ kUndefined2EventType = $0000000C; { 4-bits }
+ kUndefined3EventType = $0000000D; { 4-bits }
+ kUndefined4EventType = $0000000E; { 4-bits }
+ kGeneralEventType = $0000000F; { 4-bits }
+ kXEventLengthBits = $00000002; { 2 bits: indicates 8-byte event record }
+ kGeneralEventLengthBits = $00000003; { 2 bits: indicates variable length event record }
+ kEventLen = 1; { length of events in long words }
+ kXEventLen = 2;
+ kRestEventLen = 1; { length of events in long words }
+ kNoteEventLen = 1;
+ kControlEventLen = 1;
+ kMarkerEventLen = 1;
+ kXNoteEventLen = 2;
+ kXControlEventLen = 2;
+ kGeneralEventLen = 2; { 2 or more, however }
+ { Universal Event Defines }
+ kEventLengthFieldPos = 30; { by looking at these two bits of the 1st or last word }
+ kEventLengthFieldWidth = 2; { of an event you can determine the event length }
+ { length field: 0 & 1 => 1 long; 2 => 2 longs; 3 => variable length }
+ kEventTypeFieldPos = 29; { event type field for short events }
+ kEventTypeFieldWidth = 3; { short type is 3 bits }
+ kXEventTypeFieldPos = 28; { event type field for extended events }
+ kXEventTypeFieldWidth = 4; { extended type is 4 bits }
+ kEventPartFieldPos = 24;
+ kEventPartFieldWidth = 5;
+ kXEventPartFieldPos = 16; { in the 1st long word }
+ kXEventPartFieldWidth = 12; { Rest Events }
+ kRestEventDurationFieldPos = 0;
+ kRestEventDurationFieldWidth = 24;
+ kRestEventDurationMax = $00FFFFFF; { Note Events }
+ kNoteEventPitchFieldPos = 18;
+ kNoteEventPitchFieldWidth = 6;
+ kNoteEventPitchOffset = 32; { add to value in pitch field to get actual pitch }
+ kNoteEventVolumeFieldPos = 11;
+ kNoteEventVolumeFieldWidth = 7;
+ kNoteEventVolumeOffset = 0; { add to value in volume field to get actual volume }
+ kNoteEventDurationFieldPos = 0;
+ kNoteEventDurationFieldWidth = 11;
+ kNoteEventDurationMax = $000007FF;
+ kXNoteEventPitchFieldPos = 0; { in the 1st long word }
+ kXNoteEventPitchFieldWidth = 16;
+ kXNoteEventDurationFieldPos = 0; { in the 2nd long word }
+ kXNoteEventDurationFieldWidth = 22;
+ kXNoteEventDurationMax = $003FFFFF;
+ kXNoteEventVolumeFieldPos = 22; { in the 2nd long word }
+ kXNoteEventVolumeFieldWidth = 7; { Control Events }
+ kControlEventControllerFieldPos = 16;
+ kControlEventControllerFieldWidth = 8;
+ kControlEventValueFieldPos = 0;
+ kControlEventValueFieldWidth = 16;
+ kXControlEventControllerFieldPos = 0; { in the 2nd long word }
+ kXControlEventControllerFieldWidth = 16;
+ kXControlEventValueFieldPos = 0; { in the 1st long word }
+ kXControlEventValueFieldWidth = 16; { Knob Events }
+ kKnobEventValueHighFieldPos = 0; { 1st long word }
+ kKnobEventValueHighFieldWidth = 16;
+ kKnobEventKnobFieldPos = 16; { 2nd long word }
+ kKnobEventKnobFieldWidth = 14;
+ kKnobEventValueLowFieldPos = 0; { 2nd long word }
+ kKnobEventValueLowFieldWidth = 16; { Marker Events }
+ kMarkerEventSubtypeFieldPos = 16;
+ kMarkerEventSubtypeFieldWidth = 8;
+ kMarkerEventValueFieldPos = 0;
+ kMarkerEventValueFieldWidth = 16; { General Events }
+ kGeneralEventSubtypeFieldPos = 16; { in the last long word }
+ kGeneralEventSubtypeFieldWidth = 14;
+ kGeneralEventLengthFieldPos = 0; { in the 1st & last long words }
+ kGeneralEventLengthFieldWidth = 16;
+
+{$ifc TARGET_RT_LITTLE_ENDIAN}
+ kEndMarkerValue = $00000060;
+
+{$elsec}
+ kEndMarkerValue = $60000000;
+
+{$endc} {TARGET_RT_LITTLE_ENDIAN}
+
+ { macros for extracting various fields from the QuickTime event records }
+
+
+ { General Event Defined Types }
+ kGeneralEventNoteRequest = 1; { Encapsulates NoteRequest data structure }
+ kGeneralEventPartKey = 4;
+ kGeneralEventTuneDifference = 5; { Contains a standard sequence, with end marker, for the tune difference of a sequence piece (halts QuickTime 2.0 Music) }
+ kGeneralEventAtomicInstrument = 6; { Encapsulates AtomicInstrument record }
+ kGeneralEventKnob = 7; { knobID/knobValue pairs; smallest event is 4 longs }
+ kGeneralEventMIDIChannel = 8; { used in tune header, one longword identifies the midi channel it originally came from }
+ kGeneralEventPartChange = 9; { used in tune sequence, one longword identifies the tune part which can now take over this part's note channel (similar to program change) (halts QuickTime 2.0 Music) }
+ kGeneralEventNoOp = 10; { guaranteed to do nothing and be ignored. (halts QuickTime 2.0 Music) }
+ kGeneralEventUsedNotes = 11; { four longwords specifying which midi notes are actually used, 0..127 msb to lsb }
+ kGeneralEventPartMix = 12; { three longwords: Fixed volume, long balance, long flags }
+
+ { Marker Event Defined Types // marker is 60 ee vv vv in hex, where e = event type, and v = value }
+ kMarkerEventEnd = 0; { marker type 0 means: value 0 - stop, value != 0 - ignore }
+ kMarkerEventBeat = 1; { value 0 = single beat; anything else is 65536ths-of-a-beat (quarter note) }
+ kMarkerEventTempo = 2; { value same as beat marker, but indicates that a tempo event should be computed (based on where the next beat or tempo marker is) and emitted upon export }
+
+ kCurrentlyNativeEndian = 1;
+ kCurrentlyNotNativeEndian = 2;
+
+ { UPP call backs }
+ uppMusicMIDISendProcInfo = $00000FF0;
+ uppMusicOfflineDataProcInfo = $00000FF0;
+ uppTuneCallBackProcInfo = $000003C0;
+ uppTunePlayCallBackProcInfo = $00000FC0;
+ {
+ * NewMusicMIDISendUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewMusicMIDISendUPP(userRoutine: MusicMIDISendProcPtr): MusicMIDISendUPP; external name '_NewMusicMIDISendUPP'; { old name was NewMusicMIDISendProc }
+{
+ * NewMusicOfflineDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewMusicOfflineDataUPP(userRoutine: MusicOfflineDataProcPtr): MusicOfflineDataUPP; external name '_NewMusicOfflineDataUPP'; { old name was NewMusicOfflineDataProc }
+{
+ * NewTuneCallBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewTuneCallBackUPP(userRoutine: TuneCallBackProcPtr): TuneCallBackUPP; external name '_NewTuneCallBackUPP'; { old name was NewTuneCallBackProc }
+{
+ * NewTunePlayCallBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewTunePlayCallBackUPP(userRoutine: TunePlayCallBackProcPtr): TunePlayCallBackUPP; external name '_NewTunePlayCallBackUPP'; { old name was NewTunePlayCallBackProc }
+{
+ * DisposeMusicMIDISendUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeMusicMIDISendUPP(userUPP: MusicMIDISendUPP); external name '_DisposeMusicMIDISendUPP';
+{
+ * DisposeMusicOfflineDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeMusicOfflineDataUPP(userUPP: MusicOfflineDataUPP); external name '_DisposeMusicOfflineDataUPP';
+{
+ * DisposeTuneCallBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeTuneCallBackUPP(userUPP: TuneCallBackUPP); external name '_DisposeTuneCallBackUPP';
+{
+ * DisposeTunePlayCallBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeTunePlayCallBackUPP(userUPP: TunePlayCallBackUPP); external name '_DisposeTunePlayCallBackUPP';
+{
+ * InvokeMusicMIDISendUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeMusicMIDISendUPP(self: ComponentInstance; refCon: SInt32; var mmp: MusicMIDIPacket; userRoutine: MusicMIDISendUPP): ComponentResult; external name '_InvokeMusicMIDISendUPP'; { old name was CallMusicMIDISendProc }
+{
+ * InvokeMusicOfflineDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeMusicOfflineDataUPP(SoundData: Ptr; numBytes: SInt32; myRefCon: SInt32; userRoutine: MusicOfflineDataUPP): ComponentResult; external name '_InvokeMusicOfflineDataUPP'; { old name was CallMusicOfflineDataProc }
+{
+ * InvokeTuneCallBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeTuneCallBackUPP(const (*var*) status: TuneStatus; refCon: SInt32; userRoutine: TuneCallBackUPP); external name '_InvokeTuneCallBackUPP'; { old name was CallTuneCallBackProc }
+{
+ * InvokeTunePlayCallBackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeTunePlayCallBackUPP(var event: UInt32; seed: SInt32; refCon: SInt32; userRoutine: TunePlayCallBackUPP); external name '_InvokeTunePlayCallBackUPP'; { old name was CallTunePlayCallBackProc }
+{$ALIGN MAC68K}
+
+
+{unit QuickTimeVR}
+{
+ File: QuickTimeVR.p
+
+ Contains: QuickTime VR interfaces
+
+ Version: Technology: QuickTime VR 5.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1997-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+ QTVRInstance = ^SInt32; { an opaque 32-bit type }
+ QTVRInstancePtr = ^QTVRInstance; { when a var xx:QTVRInstance parameter can be nil, it is changed to xx: QTVRInstancePtr }
+
+
+const
+ kQTVRControllerSubType = $63747970 (* 'ctyp' *);
+ kQTVRQTVRType = $71747672 (* 'qtvr' *);
+ kQTVRPanoramaType = $70616E6F (* 'pano' *);
+ kQTVRObjectType = $6F626A65 (* 'obje' *);
+ kQTVROldPanoType = $5354706E (* 'STpn' *); { Used in QTVR 1.0 release }
+ kQTVROldObjectType = $73746E61 (* 'stna' *); { Used in QTVR 1.0 release }
+
+{$ifc TARGET_OS_MAC}
+{$elsec}
+{$endc} {TARGET_OS_MAC}
+
+ { QTVR hot spot types }
+ kQTVRHotSpotLinkType = $6C696E6B (* 'link' *);
+ kQTVRHotSpotURLType = $75726C20 (* 'url ' *);
+ kQTVRHotSpotUndefinedType = $756E6466 (* 'undf' *);
+
+ { Special Values for nodeID in QTVRGoToNodeID }
+ kQTVRCurrentNode = 0;
+ kQTVRPreviousNode = $80000000;
+ kQTVRDefaultNode = $80000001;
+
+ { Panorama correction modes used for the kQTVRImagingCorrection imaging property }
+ kQTVRNoCorrection = 0;
+ kQTVRPartialCorrection = 1;
+ kQTVRFullCorrection = 2;
+
+ { Imaging Modes used by QTVRSetImagingProperty, QTVRGetImagingProperty, QTVRUpdate, QTVRBeginUpdate }
+
+type
+ QTVRImagingMode = UInt32;
+const
+ kQTVRStatic = 1;
+ kQTVRMotion = 2;
+ kQTVRCurrentMode = 0; { Special Value for QTVRUpdate }
+ kQTVRAllModes = 100; { Special value for QTVRSetProperty }
+
+ { Imaging Properties used by QTVRSetImagingProperty, QTVRGetImagingProperty }
+ kQTVRImagingCorrection = 1;
+ kQTVRImagingQuality = 2;
+ kQTVRImagingDirectDraw = 3;
+ kQTVRImagingCurrentMode = 100; { Get Only }
+
+ { OR the above with kImagingDefaultValue to get/set the default value }
+ kImagingDefaultValue = $80000000;
+
+ { Transition Types used by QTVRSetTransitionProperty, QTVREnableTransition }
+ kQTVRTransitionSwing = 1;
+
+ { Transition Properties QTVRSetTransitionProperty }
+ kQTVRTransitionSpeed = 1;
+ kQTVRTransitionDirection = 2;
+
+ { Constraint values used to construct value returned by GetConstraintStatus }
+ kQTVRUnconstrained = 0;
+ kQTVRCantPanLeft = $00000001;
+ kQTVRCantPanRight = $00000002;
+ kQTVRCantPanUp = $00000004;
+ kQTVRCantPanDown = $00000008;
+ kQTVRCantZoomIn = $00000010;
+ kQTVRCantZoomOut = $00000020;
+ kQTVRCantTranslateLeft = $00000040;
+ kQTVRCantTranslateRight = $00000080;
+ kQTVRCantTranslateUp = $00000100;
+ kQTVRCantTranslateDown = $00000200;
+
+ { Object-only mouse mode values used to construct value returned by QTVRGetCurrentMouseMode }
+ kQTVRPanning = $00000001; { standard objects, "object only" controllers }
+ kQTVRTranslating = $00000002; { all objects }
+ kQTVRZooming = $00000004; { all objects }
+ kQTVRScrolling = $00000008; { standard object arrow scrollers and joystick object }
+ kQTVRSelecting = $00000010; { object absolute controller }
+
+ { Properties for use with QTVRSetInteractionProperty/GetInteractionProperty }
+ kQTVRInteractionMouseClickHysteresis = 1; { pixels within which the mouse is considered not to have moved (UInt16) }
+ kQTVRInteractionMouseClickTimeout = 2; { ticks after which a mouse click times out and turns into panning (UInt32) }
+ kQTVRInteractionPanTiltSpeed = 3; { control the relative pan/tilt speed from 1 (slowest) to 10 (fastest). (UInt32) Default is 5; }
+ kQTVRInteractionZoomSpeed = 4; { control the relative zooming speed from 1 (slowest) to 10 (fastest). (UInt32) Default is 5; }
+ kQTVRInteractionTranslateOnMouseDown = 101; { Holding MouseDown with this setting translates zoomed object movies (Boolean) }
+ kQTVRInteractionMouseMotionScale = 102; { The maximum angle of rotation caused by dragging across the display window. (* float) }
+ kQTVRInteractionNudgeMode = 103; { A QTVRNudgeMode: rotate, translate, or the same as the current mouse mode. Requires QTVR 2.1 }
+
+ { OR the above with kQTVRInteractionDefaultValue to get/set the default value }
+ kQTVRInteractionDefaultValue = $80000000;
+
+
+ { Geometry constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings, QTVRGetBackBufferMemInfo }
+ kQTVRUseMovieGeometry = 0;
+ kQTVRVerticalCylinder = $7663796C (* 'vcyl' *);
+ kQTVRHorizontalCylinder = $6863796C (* 'hcyl' *);
+ kQTVRCube = $63756265 (* 'cube' *);
+
+ { Resolution constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings, QTVRGetBackBufferMemInfo }
+ kQTVRDefaultRes = 0;
+ kQTVRFullRes = $00000001;
+ kQTVRHalfRes = $00000002;
+ kQTVRQuarterRes = $00000004;
+
+ { QTVR-specific pixelFormat constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings, QTVRGetBackBufferMemInfo }
+ kQTVRUseMovieDepth = 0;
+
+ { Cache Size Pref constants used in QTVRSetBackBufferPrefs, QTVRGetBackBufferSettings }
+ kQTVRMinimumCache = -1;
+ kQTVRSuggestedCache = 0;
+ kQTVRFullCache = 1;
+
+ { Angular units used by QTVRSetAngularUnits }
+
+type
+ QTVRAngularUnits = UInt32;
+const
+ kQTVRDegrees = 0;
+ kQTVRRadians = 1;
+
+ { Values for enableFlag parameter in QTVREnableHotSpot }
+ kQTVRHotSpotID = 0;
+ kQTVRHotSpotType = 1;
+ kQTVRAllHotSpots = 2;
+
+ { Values for viewParameter for QTVRSet/GetViewParameter }
+ kQTVRPanAngle = $0100; { default units; &float, &float }
+ kQTVRTiltAngle = $0101; { default units; &float, &float }
+ kQTVRFieldOfViewAngle = $0103; { default units; &float, &float }
+ kQTVRViewCenter = $0104; { pixels (per object movies); &QTVRFloatPoint, &QTVRFloatPoint }
+ kQTVRHotSpotsVisible = $0200; { Boolean, &Boolean }
+
+ { Values for flagsIn for QTVRSet/GetViewParameter }
+ kQTVRValueIsRelative = $00000001; { Is the value absolute or relative to the current value? }
+ kQTVRValueIsRate = $00000002; { Is the value absolute or a rate of change to be applied? }
+ kQTVRValueIsUserPrefRelative = $00000004; { Is the value a percentage of the user rate pref? }
+
+ { Values for kind parameter in QTVRGet/SetConstraints, QTVRGetViewingLimits }
+ kQTVRPan = 0;
+ kQTVRTilt = 1;
+ kQTVRFieldOfView = 2;
+ kQTVRViewCenterH = 4; { WrapAndConstrain only }
+ kQTVRViewCenterV = 5; { WrapAndConstrain only }
+
+ { Values for setting parameter in QTVRSetAnimationSetting, QTVRGetAnimationSetting }
+
+type
+ QTVRObjectAnimationSetting = UInt32;
+const
+ { View Frame Animation Settings }
+ kQTVRPalindromeViewFrames = 1;
+ kQTVRStartFirstViewFrame = 2;
+ kQTVRDontLoopViewFrames = 3;
+ kQTVRPlayEveryViewFrame = 4; { Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10) }
+ { View Animation Settings }
+ kQTVRSyncViewToFrameRate = 16;
+ kQTVRPalindromeViews = 17;
+ kQTVRPlayStreamingViews = 18; { Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10) }
+
+
+type
+ QTVRControlSetting = UInt32;
+const
+ kQTVRWrapPan = 1;
+ kQTVRWrapTilt = 2;
+ kQTVRCanZoom = 3;
+ kQTVRReverseHControl = 4;
+ kQTVRReverseVControl = 5;
+ kQTVRSwapHVControl = 6;
+ kQTVRTranslation = 7;
+
+
+type
+ QTVRViewStateType = UInt32;
+const
+ kQTVRDefault = 0;
+ kQTVRCurrent = 2;
+ kQTVRMouseDown = 3;
+
+
+type
+ QTVRNudgeControl = UInt32;
+const
+ kQTVRRight = 0;
+ kQTVRUpRight = 45;
+ kQTVRUp = 90;
+ kQTVRUpLeft = 135;
+ kQTVRLeft = 180;
+ kQTVRDownLeft = 225;
+ kQTVRDown = 270;
+ kQTVRDownRight = 315;
+
+
+type
+ QTVRNudgeMode = UInt32;
+const
+ kQTVRNudgeRotate = 0;
+ kQTVRNudgeTranslate = 1;
+ kQTVRNudgeSameAsMouse = 2;
+
+
+ { Flags to control elements of the QTVR control bar (set via mcActionSetFlags) }
+ mcFlagQTVRSuppressBackBtn = $00010000;
+ mcFlagQTVRSuppressZoomBtns = $00020000;
+ mcFlagQTVRSuppressHotSpotBtn = $00040000;
+ mcFlagQTVRSuppressTranslateBtn = $00080000;
+ mcFlagQTVRSuppressHelpText = $00100000;
+ mcFlagQTVRSuppressHotSpotNames = $00200000;
+ mcFlagQTVRExplicitFlagSet = $80000000; { bits 0->30 should be interpreted as "explicit on" for the corresponding suppression bits }
+
+ { Cursor types used in type field of QTVRCursorRecord }
+ kQTVRUseDefaultCursor = 0;
+ kQTVRStdCursorType = 1;
+ kQTVRColorCursorType = 2;
+
+ { Values for flags parameter in QTVRMouseOverHotSpot callback }
+ kQTVRHotSpotEnter = 0;
+ kQTVRHotSpotWithin = 1;
+ kQTVRHotSpotLeave = 2;
+
+ { Values for flags parameter in QTVRSetPrescreenImagingCompleteProc }
+ kQTVRPreScreenEveryIdle = $00000001; { Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10) }
+
+ { Values for flags field of areasOfInterest in QTVRSetBackBufferImagingProc }
+ kQTVRBackBufferEveryUpdate = $00000001;
+ kQTVRBackBufferEveryIdle = $00000002;
+ kQTVRBackBufferAlwaysRefresh = $00000004;
+ kQTVRBackBufferHorizontal = $00000008; { Requires that backbuffer proc be long-rowBytes aware (gestaltQDHasLongRowBytes) }
+
+ { Values for flagsIn parameter in QTVRBackBufferImaging callback }
+ kQTVRBackBufferRectVisible = $00000001;
+ kQTVRBackBufferWasRefreshed = $00000002;
+
+ { Values for flagsOut parameter in QTVRBackBufferImaging callback }
+ kQTVRBackBufferFlagDidDraw = $00000001;
+ kQTVRBackBufferFlagLastFlag = $80000000;
+
+ { QTVRCursorRecord used in QTVRReplaceCursor }
+
+type
+ QTVRCursorRecordPtr = ^QTVRCursorRecord;
+ QTVRCursorRecord = record
+ theType: UInt16; { field was previously named "type" }
+ rsrcID: SInt16;
+ handle: Handle_fix;
+ end;
+
+ QTVRFloatPointPtr = ^QTVRFloatPoint;
+ QTVRFloatPoint = record
+ x: Single;
+ y: Single;
+ end;
+
+ { Struct used for areasOfInterest parameter in QTVRSetBackBufferImagingProc }
+ QTVRAreaOfInterestPtr = ^QTVRAreaOfInterest;
+ QTVRAreaOfInterest = record
+ panAngle: Single;
+ tiltAngle: Single;
+ width: Single;
+ height: Single;
+ flags: UInt32;
+ end;
+
+ {
+ =================================================================================================
+ Callback routines
+ -------------------------------------------------------------------------------------------------
+ }
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QTVRLeavingNodeProcPtr = function(qtvr: QTVRInstance; fromNodeID: UInt32; toNodeID: UInt32; var cancel: boolean; refCon: SInt32): OSErr;
+{$elsec}
+ QTVRLeavingNodeProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QTVREnteringNodeProcPtr = function(qtvr: QTVRInstance; nodeID: UInt32; refCon: SInt32): OSErr;
+{$elsec}
+ QTVREnteringNodeProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QTVRMouseOverHotSpotProcPtr = function(qtvr: QTVRInstance; hotSpotID: UInt32; flags: UInt32; refCon: SInt32): OSErr;
+{$elsec}
+ QTVRMouseOverHotSpotProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QTVRImagingCompleteProcPtr = function(qtvr: QTVRInstance; refCon: SInt32): OSErr;
+{$elsec}
+ QTVRImagingCompleteProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QTVRBackBufferImagingProcPtr = function(qtvr: QTVRInstance; var drawRect: Rect; areaIndex: UInt16; flagsIn: UInt32; var flagsOut: UInt32; refCon: SInt32): OSErr;
+{$elsec}
+ QTVRBackBufferImagingProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ QTVRLeavingNodeUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QTVRLeavingNodeUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QTVREnteringNodeUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QTVREnteringNodeUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QTVRMouseOverHotSpotUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QTVRMouseOverHotSpotUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QTVRImagingCompleteUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QTVRImagingCompleteUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ QTVRBackBufferImagingUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QTVRBackBufferImagingUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppQTVRLeavingNodeProcInfo = $0000FFE0;
+ uppQTVREnteringNodeProcInfo = $00000FE0;
+ uppQTVRMouseOverHotSpotProcInfo = $00003FE0;
+ uppQTVRImagingCompleteProcInfo = $000003E0;
+ uppQTVRBackBufferImagingProcInfo = $0003FBE0;
+ {
+ * NewQTVRLeavingNodeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewQTVRLeavingNodeUPP(userRoutine: QTVRLeavingNodeProcPtr): QTVRLeavingNodeUPP; external name '_NewQTVRLeavingNodeUPP'; { old name was NewQTVRLeavingNodeProc }
+{
+ * NewQTVREnteringNodeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewQTVREnteringNodeUPP(userRoutine: QTVREnteringNodeProcPtr): QTVREnteringNodeUPP; external name '_NewQTVREnteringNodeUPP'; { old name was NewQTVREnteringNodeProc }
+{
+ * NewQTVRMouseOverHotSpotUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewQTVRMouseOverHotSpotUPP(userRoutine: QTVRMouseOverHotSpotProcPtr): QTVRMouseOverHotSpotUPP; external name '_NewQTVRMouseOverHotSpotUPP'; { old name was NewQTVRMouseOverHotSpotProc }
+{
+ * NewQTVRImagingCompleteUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewQTVRImagingCompleteUPP(userRoutine: QTVRImagingCompleteProcPtr): QTVRImagingCompleteUPP; external name '_NewQTVRImagingCompleteUPP'; { old name was NewQTVRImagingCompleteProc }
+{
+ * NewQTVRBackBufferImagingUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewQTVRBackBufferImagingUPP(userRoutine: QTVRBackBufferImagingProcPtr): QTVRBackBufferImagingUPP; external name '_NewQTVRBackBufferImagingUPP'; { old name was NewQTVRBackBufferImagingProc }
+{
+ * DisposeQTVRLeavingNodeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeQTVRLeavingNodeUPP(userUPP: QTVRLeavingNodeUPP); external name '_DisposeQTVRLeavingNodeUPP';
+{
+ * DisposeQTVREnteringNodeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeQTVREnteringNodeUPP(userUPP: QTVREnteringNodeUPP); external name '_DisposeQTVREnteringNodeUPP';
+{
+ * DisposeQTVRMouseOverHotSpotUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeQTVRMouseOverHotSpotUPP(userUPP: QTVRMouseOverHotSpotUPP); external name '_DisposeQTVRMouseOverHotSpotUPP';
+{
+ * DisposeQTVRImagingCompleteUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeQTVRImagingCompleteUPP(userUPP: QTVRImagingCompleteUPP); external name '_DisposeQTVRImagingCompleteUPP';
+{
+ * DisposeQTVRBackBufferImagingUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeQTVRBackBufferImagingUPP(userUPP: QTVRBackBufferImagingUPP); external name '_DisposeQTVRBackBufferImagingUPP';
+{
+ * InvokeQTVRLeavingNodeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeQTVRLeavingNodeUPP(qtvr: QTVRInstance; fromNodeID: UInt32; toNodeID: UInt32; var cancel: boolean; refCon: SInt32; userRoutine: QTVRLeavingNodeUPP): OSErr; external name '_InvokeQTVRLeavingNodeUPP'; { old name was CallQTVRLeavingNodeProc }
+{
+ * InvokeQTVREnteringNodeUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeQTVREnteringNodeUPP(qtvr: QTVRInstance; nodeID: UInt32; refCon: SInt32; userRoutine: QTVREnteringNodeUPP): OSErr; external name '_InvokeQTVREnteringNodeUPP'; { old name was CallQTVREnteringNodeProc }
+{
+ * InvokeQTVRMouseOverHotSpotUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeQTVRMouseOverHotSpotUPP(qtvr: QTVRInstance; hotSpotID: UInt32; flags: UInt32; refCon: SInt32; userRoutine: QTVRMouseOverHotSpotUPP): OSErr; external name '_InvokeQTVRMouseOverHotSpotUPP'; { old name was CallQTVRMouseOverHotSpotProc }
+{
+ * InvokeQTVRImagingCompleteUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeQTVRImagingCompleteUPP(qtvr: QTVRInstance; refCon: SInt32; userRoutine: QTVRImagingCompleteUPP): OSErr; external name '_InvokeQTVRImagingCompleteUPP'; { old name was CallQTVRImagingCompleteProc }
+{
+ * InvokeQTVRBackBufferImagingUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeQTVRBackBufferImagingUPP(qtvr: QTVRInstance; var drawRect: Rect; areaIndex: UInt16; flagsIn: UInt32; var flagsOut: UInt32; refCon: SInt32; userRoutine: QTVRBackBufferImagingUPP): OSErr; external name '_InvokeQTVRBackBufferImagingUPP'; { old name was CallQTVRBackBufferImagingProc }
+{
+ =================================================================================================
+ QTVR Intercept Struct, Callback, Routine Descriptors
+ -------------------------------------------------------------------------------------------------
+}
+
+
+type
+ QTVRProcSelector = UInt32;
+const
+ kQTVRSetPanAngleSelector = $2000;
+ kQTVRSetTiltAngleSelector = $2001;
+ kQTVRSetFieldOfViewSelector = $2002;
+ kQTVRSetViewCenterSelector = $2003;
+ kQTVRMouseEnterSelector = $2004;
+ kQTVRMouseWithinSelector = $2005;
+ kQTVRMouseLeaveSelector = $2006;
+ kQTVRMouseDownSelector = $2007;
+ kQTVRMouseStillDownSelector = $2008;
+ kQTVRMouseUpSelector = $2009;
+ kQTVRTriggerHotSpotSelector = $200A;
+ kQTVRGetHotSpotTypeSelector = $200B; { Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10) }
+ kQTVRSetViewParameterSelector = $200C; { Requires QTVR 5.0 (kQTVRAPIMajorVersion05 + kQTVRAPIMinorVersion00) }
+ kQTVRGetViewParameterSelector = $200D; { Requires QTVR 5.0 (kQTVRAPIMajorVersion05 + kQTVRAPIMinorVersion00) }
+
+
+type
+ QTVRInterceptRecordPtr = ^QTVRInterceptRecord;
+ QTVRInterceptRecord = record
+ reserved1: SInt32;
+ selector: SInt32;
+ reserved2: SInt32;
+ reserved3: SInt32;
+ paramCount: SInt32;
+ parameter: array [0..5] of Ptr;
+ end;
+
+ QTVRInterceptPtr = ^QTVRInterceptRecord;
+ { Prototype for Intercept Proc callback }
+{$ifc TYPED_FUNCTION_POINTERS}
+ QTVRInterceptProcPtr = procedure(qtvr: QTVRInstance; qtvrMsg: QTVRInterceptPtr; refCon: SInt32; var cancel: boolean);
+{$elsec}
+ QTVRInterceptProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ QTVRInterceptUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QTVRInterceptUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppQTVRInterceptProcInfo = $00003FC0;
+ {
+ * NewQTVRInterceptUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewQTVRInterceptUPP(userRoutine: QTVRInterceptProcPtr): QTVRInterceptUPP; external name '_NewQTVRInterceptUPP'; { old name was NewQTVRInterceptProc }
+{
+ * DisposeQTVRInterceptUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeQTVRInterceptUPP(userUPP: QTVRInterceptUPP); external name '_DisposeQTVRInterceptUPP';
+{
+ * InvokeQTVRInterceptUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeQTVRInterceptUPP(qtvr: QTVRInstance; qtvrMsg: QTVRInterceptPtr; refCon: SInt32; var cancel: boolean; userRoutine: QTVRInterceptUPP); external name '_InvokeQTVRInterceptUPP'; { old name was CallQTVRInterceptProc }
+{
+ =================================================================================================
+ Initialization QTVR calls
+ -------------------------------------------------------------------------------------------------
+ Requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10) and only work on Non-Macintosh platforms
+}
+{$ifc NOT TARGET_OS_MAC}
+{$ifc CALL_NOT_IN_CARBON}
+{
+ * InitializeQTVR()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function InitializeQTVR: OSErr; external name '_InitializeQTVR';
+
+{
+ * TerminateQTVR()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: not available
+ * Mac OS X: not available
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function TerminateQTVR: OSErr; external name '_TerminateQTVR';
+
+{$endc} {CALL_NOT_IN_CARBON}
+{$endc}
+
+{
+ =================================================================================================
+ General QTVR calls
+ -------------------------------------------------------------------------------------------------
+}
+{
+ * QTVRGetQTVRTrack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetQTVRTrack(theMovie: Movie; index: SInt32): Track; external name '_QTVRGetQTVRTrack';
+
+{
+ * QTVRGetQTVRInstance()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetQTVRInstance(var qtvr: QTVRInstance; qtvrTrack: Track; mc: MovieController): OSErr; external name '_QTVRGetQTVRInstance';
+
+{
+ =================================================================================================
+ Viewing Angles and Zooming
+ -------------------------------------------------------------------------------------------------
+}
+
+{ QTVRSetViewParameter requires QTVR 5.0 (kQTVRAPIMajorVersion05 + kQTVRAPIMinorVersion00) }
+{
+ * QTVRSetViewParameter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 5.0 and later
+ }
+function QTVRSetViewParameter(qtvr: QTVRInstance; viewParameter: UInt32; value: UnivPtr; flagsIn: UInt32): OSErr; external name '_QTVRSetViewParameter';
+
+{ QTVRGetViewParameter requires QTVR 5.0 (kQTVRAPIMajorVersion05 + kQTVRAPIMinorVersion00) }
+{
+ * QTVRGetViewParameter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 5.0 and later
+ }
+function QTVRGetViewParameter(qtvr: QTVRInstance; viewParameter: UInt32; value: UnivPtr; flagsIn: UInt32; var flagsOut: UInt32): OSErr; external name '_QTVRGetViewParameter';
+
+{
+ * QTVRSetPanAngle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetPanAngle(qtvr: QTVRInstance; panAngle: Single): OSErr; external name '_QTVRSetPanAngle';
+
+{
+ * QTVRGetPanAngle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetPanAngle(qtvr: QTVRInstance): Single; external name '_QTVRGetPanAngle';
+
+{
+ * QTVRSetTiltAngle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetTiltAngle(qtvr: QTVRInstance; tiltAngle: Single): OSErr; external name '_QTVRSetTiltAngle';
+
+{
+ * QTVRGetTiltAngle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetTiltAngle(qtvr: QTVRInstance): Single; external name '_QTVRGetTiltAngle';
+
+{
+ * QTVRSetFieldOfView()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetFieldOfView(qtvr: QTVRInstance; fieldOfView: Single): OSErr; external name '_QTVRSetFieldOfView';
+
+{
+ * QTVRGetFieldOfView()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetFieldOfView(qtvr: QTVRInstance): Single; external name '_QTVRGetFieldOfView';
+
+{
+ * QTVRShowDefaultView()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRShowDefaultView(qtvr: QTVRInstance): OSErr; external name '_QTVRShowDefaultView';
+
+{ Object Specific }
+{
+ * QTVRSetViewCenter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetViewCenter(qtvr: QTVRInstance; const (*var*) viewCenter: QTVRFloatPoint): OSErr; external name '_QTVRSetViewCenter';
+
+{
+ * QTVRGetViewCenter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetViewCenter(qtvr: QTVRInstance; var viewCenter: QTVRFloatPoint): OSErr; external name '_QTVRGetViewCenter';
+
+{
+ * QTVRNudge()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRNudge(qtvr: QTVRInstance; direction: QTVRNudgeControl): OSErr; external name '_QTVRNudge';
+
+{ QTVRInteractionNudge requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10) }
+{
+ * QTVRInteractionNudge()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRInteractionNudge(qtvr: QTVRInstance; direction: QTVRNudgeControl): OSErr; external name '_QTVRInteractionNudge';
+
+{
+ =================================================================================================
+ Scene and Node Location Information
+ -------------------------------------------------------------------------------------------------
+}
+
+{
+ * QTVRGetVRWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetVRWorld(qtvr: QTVRInstance; var VRWorld: QTAtomContainer): OSErr; external name '_QTVRGetVRWorld';
+
+{
+ * QTVRGetNodeInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetNodeInfo(qtvr: QTVRInstance; nodeID: UInt32; var nodeInfo: QTAtomContainer): OSErr; external name '_QTVRGetNodeInfo';
+
+{
+ * QTVRGoToNodeID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGoToNodeID(qtvr: QTVRInstance; nodeID: UInt32): OSErr; external name '_QTVRGoToNodeID';
+
+{
+ * QTVRGetCurrentNodeID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetCurrentNodeID(qtvr: QTVRInstance): UInt32; external name '_QTVRGetCurrentNodeID';
+
+{
+ * QTVRGetNodeType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetNodeType(qtvr: QTVRInstance; nodeID: UInt32): SInt32; external name '_QTVRGetNodeType';
+
+{
+ =================================================================================================
+ Hot Spot related calls
+ -------------------------------------------------------------------------------------------------
+}
+
+{
+ * QTVRPtToHotSpotID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRPtToHotSpotID(qtvr: QTVRInstance; pt: Point; var hotSpotID: UInt32): OSErr; external name '_QTVRPtToHotSpotID';
+
+{ QTVRGetHotSpotType requires QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10) }
+{
+ * QTVRGetHotSpotType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetHotSpotType(qtvr: QTVRInstance; hotSpotID: UInt32; var hotSpotType: OSType): OSErr; external name '_QTVRGetHotSpotType';
+
+{
+ * QTVRTriggerHotSpot()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRTriggerHotSpot(qtvr: QTVRInstance; hotSpotID: UInt32; nodeInfo: QTAtomContainer; selectedAtom: QTAtom): OSErr; external name '_QTVRTriggerHotSpot';
+
+{
+ * QTVRSetMouseOverHotSpotProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetMouseOverHotSpotProc(qtvr: QTVRInstance; mouseOverHotSpotProc: QTVRMouseOverHotSpotUPP; refCon: SInt32; flags: UInt32): OSErr; external name '_QTVRSetMouseOverHotSpotProc';
+
+{
+ * QTVREnableHotSpot()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVREnableHotSpot(qtvr: QTVRInstance; enableFlag: UInt32; hotSpotValue: UInt32; enable: boolean): OSErr; external name '_QTVREnableHotSpot';
+
+{
+ * QTVRGetVisibleHotSpots()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetVisibleHotSpots(qtvr: QTVRInstance; hotSpots: Handle): UInt32; external name '_QTVRGetVisibleHotSpots';
+
+{
+ * QTVRGetHotSpotRegion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetHotSpotRegion(qtvr: QTVRInstance; hotSpotID: UInt32; hotSpotRegion: RgnHandle): OSErr; external name '_QTVRGetHotSpotRegion';
+
+{
+ =================================================================================================
+ Event & Cursor Handling Calls
+ -------------------------------------------------------------------------------------------------
+}
+
+{
+ * QTVRSetMouseOverTracking()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetMouseOverTracking(qtvr: QTVRInstance; enable: boolean): OSErr; external name '_QTVRSetMouseOverTracking';
+
+{
+ * QTVRGetMouseOverTracking()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetMouseOverTracking(qtvr: QTVRInstance): boolean; external name '_QTVRGetMouseOverTracking';
+
+{
+ * QTVRSetMouseDownTracking()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetMouseDownTracking(qtvr: QTVRInstance; enable: boolean): OSErr; external name '_QTVRSetMouseDownTracking';
+
+{
+ * QTVRGetMouseDownTracking()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetMouseDownTracking(qtvr: QTVRInstance): boolean; external name '_QTVRGetMouseDownTracking';
+
+{
+ * QTVRMouseEnter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRMouseEnter(qtvr: QTVRInstance; pt: Point; var hotSpotID: UInt32; w: WindowRef): OSErr; external name '_QTVRMouseEnter';
+
+{
+ * QTVRMouseWithin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRMouseWithin(qtvr: QTVRInstance; pt: Point; var hotSpotID: UInt32; w: WindowRef): OSErr; external name '_QTVRMouseWithin';
+
+{
+ * QTVRMouseLeave()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRMouseLeave(qtvr: QTVRInstance; pt: Point; w: WindowRef): OSErr; external name '_QTVRMouseLeave';
+
+{
+ * QTVRMouseDown()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRMouseDown(qtvr: QTVRInstance; pt: Point; when: UInt32; modifiers: UInt16; var hotSpotID: UInt32; w: WindowRef): OSErr; external name '_QTVRMouseDown';
+
+{
+ * QTVRMouseStillDown()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRMouseStillDown(qtvr: QTVRInstance; pt: Point; var hotSpotID: UInt32; w: WindowRef): OSErr; external name '_QTVRMouseStillDown';
+
+{
+ * QTVRMouseUp()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRMouseUp(qtvr: QTVRInstance; pt: Point; var hotSpotID: UInt32; w: WindowRef): OSErr; external name '_QTVRMouseUp';
+
+{ These require QTVR 2.01 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion01) }
+{
+ * QTVRMouseStillDownExtended()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRMouseStillDownExtended(qtvr: QTVRInstance; pt: Point; var hotSpotID: UInt32; w: WindowRef; when: UInt32; modifiers: UInt16): OSErr; external name '_QTVRMouseStillDownExtended';
+
+{
+ * QTVRMouseUpExtended()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRMouseUpExtended(qtvr: QTVRInstance; pt: Point; var hotSpotID: UInt32; w: WindowRef; when: UInt32; modifiers: UInt16): OSErr; external name '_QTVRMouseUpExtended';
+
+{
+ =================================================================================================
+ Intercept Routines
+ -------------------------------------------------------------------------------------------------
+}
+
+{
+ * QTVRInstallInterceptProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRInstallInterceptProc(qtvr: QTVRInstance; selector: QTVRProcSelector; interceptProc: QTVRInterceptUPP; refCon: SInt32; flags: UInt32): OSErr; external name '_QTVRInstallInterceptProc';
+
+{
+ * QTVRCallInterceptedProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRCallInterceptedProc(qtvr: QTVRInstance; var qtvrMsg: QTVRInterceptRecord): OSErr; external name '_QTVRCallInterceptedProc';
+
+{
+ =================================================================================================
+ Object Movie Specific Calls
+ -------------------------------------------------------------------------------------------------
+ QTVRGetCurrentMouseMode requires QTRVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10)
+}
+{
+ * QTVRGetCurrentMouseMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetCurrentMouseMode(qtvr: QTVRInstance): UInt32; external name '_QTVRGetCurrentMouseMode';
+
+{
+ * QTVRSetFrameRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetFrameRate(qtvr: QTVRInstance; rate: Single): OSErr; external name '_QTVRSetFrameRate';
+
+{
+ * QTVRGetFrameRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetFrameRate(qtvr: QTVRInstance): Single; external name '_QTVRGetFrameRate';
+
+{
+ * QTVRSetViewRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetViewRate(qtvr: QTVRInstance; rate: Single): OSErr; external name '_QTVRSetViewRate';
+
+{
+ * QTVRGetViewRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetViewRate(qtvr: QTVRInstance): Single; external name '_QTVRGetViewRate';
+
+{
+ * QTVRSetViewCurrentTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetViewCurrentTime(qtvr: QTVRInstance; time: TimeValue): OSErr; external name '_QTVRSetViewCurrentTime';
+
+{
+ * QTVRGetViewCurrentTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetViewCurrentTime(qtvr: QTVRInstance): TimeValue; external name '_QTVRGetViewCurrentTime';
+
+{
+ * QTVRGetCurrentViewDuration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetCurrentViewDuration(qtvr: QTVRInstance): TimeValue; external name '_QTVRGetCurrentViewDuration';
+
+{
+ =================================================================================================
+ View State Calls - QTVR Object Only
+ -------------------------------------------------------------------------------------------------
+}
+
+{
+ * QTVRSetViewState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetViewState(qtvr: QTVRInstance; viewStateType: QTVRViewStateType; state: UInt16): OSErr; external name '_QTVRSetViewState';
+
+{
+ * QTVRGetViewState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetViewState(qtvr: QTVRInstance; viewStateType: QTVRViewStateType; var state: UInt16): OSErr; external name '_QTVRGetViewState';
+
+{
+ * QTVRGetViewStateCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetViewStateCount(qtvr: QTVRInstance): UInt16; external name '_QTVRGetViewStateCount';
+
+{
+ * QTVRSetAnimationSetting()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetAnimationSetting(qtvr: QTVRInstance; setting: QTVRObjectAnimationSetting; enable: boolean): OSErr; external name '_QTVRSetAnimationSetting';
+
+{
+ * QTVRGetAnimationSetting()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetAnimationSetting(qtvr: QTVRInstance; setting: QTVRObjectAnimationSetting; var enable: boolean): OSErr; external name '_QTVRGetAnimationSetting';
+
+{
+ * QTVRSetControlSetting()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetControlSetting(qtvr: QTVRInstance; setting: QTVRControlSetting; enable: boolean): OSErr; external name '_QTVRSetControlSetting';
+
+{
+ * QTVRGetControlSetting()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetControlSetting(qtvr: QTVRInstance; setting: QTVRControlSetting; var enable: boolean): OSErr; external name '_QTVRGetControlSetting';
+
+{
+ * QTVREnableFrameAnimation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVREnableFrameAnimation(qtvr: QTVRInstance; enable: boolean): OSErr; external name '_QTVREnableFrameAnimation';
+
+{
+ * QTVRGetFrameAnimation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetFrameAnimation(qtvr: QTVRInstance): boolean; external name '_QTVRGetFrameAnimation';
+
+{
+ * QTVREnableViewAnimation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVREnableViewAnimation(qtvr: QTVRInstance; enable: boolean): OSErr; external name '_QTVREnableViewAnimation';
+
+{
+ * QTVRGetViewAnimation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetViewAnimation(qtvr: QTVRInstance): boolean; external name '_QTVRGetViewAnimation';
+
+
+{
+ =================================================================================================
+ Imaging Characteristics
+ -------------------------------------------------------------------------------------------------
+}
+
+{
+ * QTVRSetVisible()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetVisible(qtvr: QTVRInstance; visible: boolean): OSErr; external name '_QTVRSetVisible';
+
+{
+ * QTVRGetVisible()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetVisible(qtvr: QTVRInstance): boolean; external name '_QTVRGetVisible';
+
+{
+ * QTVRSetImagingProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetImagingProperty(qtvr: QTVRInstance; imagingMode: QTVRImagingMode; imagingProperty: UInt32; propertyValue: SInt32): OSErr; external name '_QTVRSetImagingProperty';
+
+{
+ * QTVRGetImagingProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetImagingProperty(qtvr: QTVRInstance; imagingMode: QTVRImagingMode; imagingProperty: UInt32; var propertyValue: SInt32): OSErr; external name '_QTVRGetImagingProperty';
+
+{
+ * QTVRUpdate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRUpdate(qtvr: QTVRInstance; imagingMode: QTVRImagingMode): OSErr; external name '_QTVRUpdate';
+
+{
+ * QTVRBeginUpdateStream()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRBeginUpdateStream(qtvr: QTVRInstance; imagingMode: QTVRImagingMode): OSErr; external name '_QTVRBeginUpdateStream';
+
+{
+ * QTVREndUpdateStream()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVREndUpdateStream(qtvr: QTVRInstance): OSErr; external name '_QTVREndUpdateStream';
+
+{
+ * QTVRSetTransitionProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetTransitionProperty(qtvr: QTVRInstance; transitionType: UInt32; transitionProperty: UInt32; transitionValue: SInt32): OSErr; external name '_QTVRSetTransitionProperty';
+
+{
+ * QTVREnableTransition()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVREnableTransition(qtvr: QTVRInstance; transitionType: UInt32; enable: boolean): OSErr; external name '_QTVREnableTransition';
+
+{
+ =================================================================================================
+ Basic Conversion and Math Routines
+ -------------------------------------------------------------------------------------------------
+}
+
+{
+ * QTVRSetAngularUnits()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetAngularUnits(qtvr: QTVRInstance; units: QTVRAngularUnits): OSErr; external name '_QTVRSetAngularUnits';
+
+{
+ * QTVRGetAngularUnits()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetAngularUnits(qtvr: QTVRInstance): QTVRAngularUnits; external name '_QTVRGetAngularUnits';
+
+{ Pano specific routines }
+{
+ * QTVRPtToAngles()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRPtToAngles(qtvr: QTVRInstance; pt: Point; var panAngle: Single; var tiltAngle: Single): OSErr; external name '_QTVRPtToAngles';
+
+{
+ * QTVRCoordToAngles()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRCoordToAngles(qtvr: QTVRInstance; var coord: QTVRFloatPoint; var panAngle: Single; var tiltAngle: Single): OSErr; external name '_QTVRCoordToAngles';
+
+{
+ * QTVRAnglesToCoord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRAnglesToCoord(qtvr: QTVRInstance; panAngle: Single; tiltAngle: Single; var coord: QTVRFloatPoint): OSErr; external name '_QTVRAnglesToCoord';
+
+{ Object specific routines }
+{
+ * QTVRPanToColumn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRPanToColumn(qtvr: QTVRInstance; panAngle: Single): SInt16; external name '_QTVRPanToColumn';
+
+{ zero based }
+{
+ * QTVRColumnToPan()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRColumnToPan(qtvr: QTVRInstance; column: SInt16): Single; external name '_QTVRColumnToPan';
+
+{ zero based }
+{
+ * QTVRTiltToRow()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRTiltToRow(qtvr: QTVRInstance; tiltAngle: Single): SInt16; external name '_QTVRTiltToRow';
+
+{ zero based }
+{
+ * QTVRRowToTilt()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRRowToTilt(qtvr: QTVRInstance; row: SInt16): Single; external name '_QTVRRowToTilt';
+
+{ zero based }
+{
+ * QTVRWrapAndConstrain()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRWrapAndConstrain(qtvr: QTVRInstance; kind: SInt16; value: Single; var result: Single): OSErr; external name '_QTVRWrapAndConstrain';
+
+
+{
+ =================================================================================================
+ Interaction Routines
+ -------------------------------------------------------------------------------------------------
+}
+
+{
+ * QTVRSetEnteringNodeProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetEnteringNodeProc(qtvr: QTVRInstance; enteringNodeProc: QTVREnteringNodeUPP; refCon: SInt32; flags: UInt32): OSErr; external name '_QTVRSetEnteringNodeProc';
+
+{
+ * QTVRSetLeavingNodeProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetLeavingNodeProc(qtvr: QTVRInstance; leavingNodeProc: QTVRLeavingNodeUPP; refCon: SInt32; flags: UInt32): OSErr; external name '_QTVRSetLeavingNodeProc';
+
+{
+ * QTVRSetInteractionProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetInteractionProperty(qtvr: QTVRInstance; proprty: UInt32; value: UnivPtr): OSErr; external name '_QTVRSetInteractionProperty';
+
+{
+ * QTVRGetInteractionProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetInteractionProperty(qtvr: QTVRInstance; proprty: UInt32; value: UnivPtr): OSErr; external name '_QTVRGetInteractionProperty';
+
+{
+ * QTVRReplaceCursor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRReplaceCursor(qtvr: QTVRInstance; var cursRecord: QTVRCursorRecord): OSErr; external name '_QTVRReplaceCursor';
+
+{
+ =================================================================================================
+ Viewing Limits and Constraints
+ -------------------------------------------------------------------------------------------------
+}
+
+{
+ * QTVRGetViewingLimits()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetViewingLimits(qtvr: QTVRInstance; kind: UInt16; var minValue: Single; var maxValue: Single): OSErr; external name '_QTVRGetViewingLimits';
+
+{
+ * QTVRGetConstraintStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetConstraintStatus(qtvr: QTVRInstance): UInt32; external name '_QTVRGetConstraintStatus';
+
+{
+ * QTVRGetConstraints()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetConstraints(qtvr: QTVRInstance; kind: UInt16; var minValue: Single; var maxValue: Single): OSErr; external name '_QTVRGetConstraints';
+
+{
+ * QTVRSetConstraints()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetConstraints(qtvr: QTVRInstance; kind: UInt16; minValue: Single; maxValue: Single): OSErr; external name '_QTVRSetConstraints';
+
+
+{
+ =================================================================================================
+ Back Buffer Memory Management
+ -------------------------------------------------------------------------------------------------
+}
+
+{
+ * QTVRGetAvailableResolutions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetAvailableResolutions(qtvr: QTVRInstance; var resolutionsMask: UInt16): OSErr; external name '_QTVRGetAvailableResolutions';
+
+{ These require QTVR 2.1 (kQTVRAPIMajorVersion02 + kQTVRAPIMinorVersion10) }
+{
+ * QTVRGetBackBufferMemInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetBackBufferMemInfo(qtvr: QTVRInstance; geometry: UInt32; resolution: UInt16; cachePixelFormat: UInt32; var minCacheBytes: SInt32; var suggestedCacheBytes: SInt32; var fullCacheBytes: SInt32): OSErr; external name '_QTVRGetBackBufferMemInfo';
+
+{
+ * QTVRGetBackBufferSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRGetBackBufferSettings(qtvr: QTVRInstance; var geometry: UInt32; var resolution: UInt16; var cachePixelFormat: UInt32; var cacheSize: SInt16): OSErr; external name '_QTVRGetBackBufferSettings';
+
+{
+ * QTVRSetBackBufferPrefs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetBackBufferPrefs(qtvr: QTVRInstance; geometry: UInt32; resolution: UInt16; cachePixelFormat: UInt32; cacheSize: SInt16): OSErr; external name '_QTVRSetBackBufferPrefs';
+
+{
+ =================================================================================================
+ Buffer Access
+ -------------------------------------------------------------------------------------------------
+}
+
+{
+ * QTVRSetPrescreenImagingCompleteProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetPrescreenImagingCompleteProc(qtvr: QTVRInstance; imagingCompleteProc: QTVRImagingCompleteUPP; refCon: SInt32; flags: UInt32): OSErr; external name '_QTVRSetPrescreenImagingCompleteProc';
+
+{
+ * QTVRSetBackBufferImagingProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRSetBackBufferImagingProc(qtvr: QTVRInstance; backBufferImagingProc: QTVRBackBufferImagingUPP; numAreas: UInt16; var areasOfInterest: QTVRAreaOfInterest; refCon: SInt32): OSErr; external name '_QTVRSetBackBufferImagingProc';
+
+{
+ * QTVRRefreshBackBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeVRLib 2.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTVR.lib 2.1 and later
+ }
+function QTVRRefreshBackBuffer(qtvr: QTVRInstance; flags: UInt32): OSErr; external name '_QTVRRefreshBackBuffer';
+
+
+{
+ =================================================================================================
+ Old Names
+ -------------------------------------------------------------------------------------------------
+}
+{$ifc OLDROUTINENAMES}
+
+type
+ CursorRecord = QTVRCursorRecord;
+ CursorRecordPtr = ^CursorRecord;
+ AreaOfInterest = QTVRAreaOfInterest;
+ AreaOfInterestPtr = ^AreaOfInterest;
+ FloatPoint = QTVRFloatPoint;
+ FloatPointPtr = ^FloatPoint;
+ LeavingNodeProcPtr = QTVRLeavingNodeProcPtr;
+ LeavingNodeUPP = QTVRLeavingNodeUPP;
+ EnteringNodeProcPtr = QTVREnteringNodeProcPtr;
+ EnteringNodeUPP = QTVREnteringNodeUPP;
+ MouseOverHotSpotProcPtr = QTVRMouseOverHotSpotProcPtr;
+ MouseOverHotSpotUPP = QTVRMouseOverHotSpotUPP;
+ ImagingCompleteProcPtr = QTVRImagingCompleteProcPtr;
+ ImagingCompleteUPP = QTVRImagingCompleteUPP;
+ BackBufferImagingProcPtr = QTVRBackBufferImagingProcPtr;
+ BackBufferImagingUPP = QTVRBackBufferImagingUPP;
+{$endc} {OLDROUTINENAMES}
+
+
+{$ALIGN MAC68K}
+
+
+{unit QuickTimeVRFormat}
+{
+ File: QuickTimeVRFormat.p
+
+ Contains: QuickTime VR interfaces
+
+ Version: Technology: QuickTime VR 5.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1997-2002 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ User data type for the Movie Controller type specifier }
+
+const
+ kQTControllerType = $63747970 (* 'ctyp' *); { Atom & ID of where our }
+ kQTControllerID = 1; { ...controller name is stored }
+
+ { VRWorld atom types }
+ kQTVRWorldHeaderAtomType = $76727363 (* 'vrsc' *);
+ kQTVRImagingParentAtomType = $696D6770 (* 'imgp' *);
+ kQTVRPanoImagingAtomType = $696D706E (* 'impn' *);
+ kQTVRObjectImagingAtomType = $696D6F62 (* 'imob' *);
+ kQTVRNodeParentAtomType = $76726E70 (* 'vrnp' *);
+ kQTVRNodeIDAtomType = $76726E69 (* 'vrni' *);
+ kQTVRNodeLocationAtomType = $6E6C6F63 (* 'nloc' *);
+ kQTVRCursorParentAtomType = $76726370 (* 'vrcp' *); { New with 2.1 }
+ kQTVRCursorAtomType = $43555253 (* 'CURS' *); { New with 2.1 }
+ kQTVRColorCursorAtomType = $63727372 (* 'crsr' *); { New with 2.1 }
+
+ { NodeInfo atom types }
+ kQTVRNodeHeaderAtomType = $6E646864 (* 'ndhd' *);
+ kQTVRHotSpotParentAtomType = $68737061 (* 'hspa' *);
+ kQTVRHotSpotAtomType = $686F7473 (* 'hots' *);
+ kQTVRHotSpotInfoAtomType = $6873696E (* 'hsin' *);
+ kQTVRLinkInfoAtomType = $6C696E6B (* 'link' *);
+
+ { Miscellaneous atom types }
+ kQTVRStringAtomType = $76727367 (* 'vrsg' *);
+ kQTVRStringEncodingAtomType = $76727365 (* 'vrse' *); { New with 2.1 }
+ kQTVRPanoSampleDataAtomType = $70646174 (* 'pdat' *);
+ kQTVRObjectInfoAtomType = $6F626A69 (* 'obji' *);
+ kQTVRImageTrackRefAtomType = $696D7472 (* 'imtr' *); { Parent is kQTVRObjectInfoAtomType. Required if track ref is not 1 as required by 2.0 format. }
+ kQTVRHotSpotTrackRefAtomType = $68737472 (* 'hstr' *); { Parent is kQTVRObjectInfoAtomType. Required if track ref is not 1 as required by 2.0 format. }
+ kQTVRAngleRangeAtomType = $61726E67 (* 'arng' *);
+ kQTVRTrackRefArrayAtomType = $74726566 (* 'tref' *);
+ kQTVRPanConstraintAtomType = $70636F6E (* 'pcon' *);
+ kQTVRTiltConstraintAtomType = $74636F6E (* 'tcon' *);
+ kQTVRFOVConstraintAtomType = $66636F6E (* 'fcon' *);
+ kQTVRCubicViewAtomType = $63757677 (* 'cuvw' *); { New with 5.0 }
+ kQTVRCubicFaceDataAtomType = $63756661 (* 'cufa' *); { New with 5.0 }
+
+ kQTVRObjectInfoAtomID = 1;
+ kQTVRObjectImageTrackRefAtomID = 1; { New with 2.1, it adds a track reference to select between multiple image tracks }
+ kQTVRObjectHotSpotTrackRefAtomID = 1; { New with 2.1, it adds a track reference to select between multiple hotspot tracks }
+
+ { Track reference types }
+ kQTVRImageTrackRefType = $696D6774 (* 'imgt' *);
+ kQTVRHotSpotTrackRefType = $686F7474 (* 'hott' *);
+
+ { Old hot spot types }
+ kQTVRHotSpotNavigableType = $6E617667 (* 'navg' *);
+
+ { Valid bits used in QTVRLinkHotSpotAtom }
+ kQTVRValidPan = $00000001;
+ kQTVRValidTilt = $00000002;
+ kQTVRValidFOV = $00000004;
+ kQTVRValidViewCenter = $00000008;
+
+
+ { Values for flags field in QTVRPanoSampleAtom }
+ kQTVRPanoFlagHorizontal = $00000001;
+ kQTVRPanoFlagLast = $80000000;
+
+
+ { Values for locationFlags field in QTVRNodeLocationAtom }
+ kQTVRSameFile = 0;
+
+
+ { Header for QTVR track's Sample Description record (vrWorld atom container is appended) }
+
+type
+ QTVRSampleDescriptionPtr = ^QTVRSampleDescription;
+ QTVRSampleDescription = record
+ descSize: UInt32; { total size of the QTVRSampleDescription }
+ descType: UInt32; { must be 'qtvr' }
+ reserved1: UInt32; { must be zero }
+ reserved2: UInt16; { must be zero }
+ dataRefIndex: UInt16; { must be zero }
+ data: UInt32; { Will be extended to hold vrWorld QTAtomContainer }
+ end;
+
+ QTVRSampleDescriptionHandle = ^QTVRSampleDescriptionPtr;
+ {
+ =================================================================================================
+ Definitions and structures used in the VRWorld QTAtomContainer
+ -------------------------------------------------------------------------------------------------
+ }
+
+ QTVRStringAtomPtr = ^QTVRStringAtom;
+ QTVRStringAtom = record
+ stringUsage: UInt16;
+ stringLength: UInt16;
+ theString: packed array [0..3] of UInt8; { field previously named "string" }
+ end;
+
+
+ QTVRWorldHeaderAtomPtr = ^QTVRWorldHeaderAtom;
+ QTVRWorldHeaderAtom = record
+ majorVersion: UInt16;
+ minorVersion: UInt16;
+ nameAtomID: QTAtomID;
+ defaultNodeID: UInt32;
+ vrWorldFlags: UInt32;
+ reserved1: UInt32;
+ reserved2: UInt32;
+ end;
+
+
+ { Valid bits used in QTVRPanoImagingAtom }
+
+const
+ kQTVRValidCorrection = $00000001;
+ kQTVRValidQuality = $00000002;
+ kQTVRValidDirectDraw = $00000004;
+ kQTVRValidFirstExtraProperty = $00000008;
+
+
+type
+ QTVRPanoImagingAtomPtr = ^QTVRPanoImagingAtom;
+ QTVRPanoImagingAtom = record
+ majorVersion: UInt16;
+ minorVersion: UInt16;
+ imagingMode: UInt32;
+ imagingValidFlags: UInt32;
+ correction: UInt32;
+ quality: UInt32;
+ directDraw: UInt32;
+ imagingProperties: array [0..5] of UInt32; { for future properties }
+ reserved1: UInt32;
+ reserved2: UInt32;
+ end;
+
+ QTVRNodeLocationAtomPtr = ^QTVRNodeLocationAtom;
+ QTVRNodeLocationAtom = record
+ majorVersion: UInt16;
+ minorVersion: UInt16;
+ nodeType: OSType;
+ locationFlags: UInt32;
+ locationData: UInt32;
+ reserved1: UInt32;
+ reserved2: UInt32;
+ end;
+
+ {
+ =================================================================================================
+ Definitions and structures used in the Nodeinfo QTAtomContainer
+ -------------------------------------------------------------------------------------------------
+ }
+
+ QTVRNodeHeaderAtomPtr = ^QTVRNodeHeaderAtom;
+ QTVRNodeHeaderAtom = record
+ majorVersion: UInt16;
+ minorVersion: UInt16;
+ nodeType: OSType;
+ nodeID: QTAtomID;
+ nameAtomID: QTAtomID;
+ commentAtomID: QTAtomID;
+ reserved1: UInt32;
+ reserved2: UInt32;
+ end;
+
+ QTVRAngleRangeAtomPtr = ^QTVRAngleRangeAtom;
+ QTVRAngleRangeAtom = record
+ minimumAngle: Float32;
+ maximumAngle: Float32;
+ end;
+
+ QTVRHotSpotInfoAtomPtr = ^QTVRHotSpotInfoAtom;
+ QTVRHotSpotInfoAtom = record
+ majorVersion: UInt16;
+ minorVersion: UInt16;
+ hotSpotType: OSType;
+ nameAtomID: QTAtomID;
+ commentAtomID: QTAtomID;
+ cursorID: array [0..2] of SInt32;
+ { canonical view for this hot spot }
+ bestPan: Float32;
+ bestTilt: Float32;
+ bestFOV: Float32;
+ bestViewCenter: QTVRFloatPoint;
+ { Bounding box for this hot spot }
+ hotSpotRect: Rect;
+ flags: UInt32;
+ reserved1: UInt32;
+ reserved2: UInt32;
+ end;
+
+ QTVRLinkHotSpotAtomPtr = ^QTVRLinkHotSpotAtom;
+ QTVRLinkHotSpotAtom = record
+ majorVersion: UInt16;
+ minorVersion: UInt16;
+ toNodeID: UInt32;
+ fromValidFlags: UInt32;
+ fromPan: Float32;
+ fromTilt: Float32;
+ fromFOV: Float32;
+ fromViewCenter: QTVRFloatPoint;
+ toValidFlags: UInt32;
+ toPan: Float32;
+ toTilt: Float32;
+ toFOV: Float32;
+ toViewCenter: QTVRFloatPoint;
+ distance: Float32;
+ flags: UInt32;
+ reserved1: UInt32;
+ reserved2: UInt32;
+ end;
+
+ {
+ =================================================================================================
+ Definitions and structures used in Panorama and Object tracks
+ -------------------------------------------------------------------------------------------------
+ }
+
+ QTVRPanoSampleAtomPtr = ^QTVRPanoSampleAtom;
+ QTVRPanoSampleAtom = record
+ majorVersion: UInt16;
+ minorVersion: UInt16;
+ imageRefTrackIndex: UInt32; { track reference index of the full res image track }
+ hotSpotRefTrackIndex: UInt32; { track reference index of the full res hot spot track }
+ minPan: Float32;
+ maxPan: Float32;
+ minTilt: Float32;
+ maxTilt: Float32;
+ minFieldOfView: Float32;
+ maxFieldOfView: Float32;
+ defaultPan: Float32;
+ defaultTilt: Float32;
+ defaultFieldOfView: Float32;
+ { Info for highest res version of image track }
+ imageSizeX: UInt32; { pixel width of the panorama (e.g. 768) }
+ imageSizeY: UInt32; { pixel height of the panorama (e.g. 2496) }
+ imageNumFramesX: UInt16; { diced frames wide (e.g. 1) }
+ imageNumFramesY: UInt16; { diced frames high (e.g. 24) }
+ { Info for highest res version of hotSpot track }
+ hotSpotSizeX: UInt32; { pixel width of the hot spot panorama (e.g. 768) }
+ hotSpotSizeY: UInt32; { pixel height of the hot spot panorama (e.g. 2496) }
+ hotSpotNumFramesX: UInt16; { diced frames wide (e.g. 1) }
+ hotSpotNumFramesY: UInt16; { diced frames high (e.g. 24) }
+ flags: UInt32;
+ panoType: OSType;
+ reserved2: UInt32;
+ end;
+
+ {
+ View atom for cubes (since same fields in QTVRPanoSampleAtom are set to special
+ values for backwards compatibility and hence are ignored by the cubic engine)
+ }
+ QTVRCubicViewAtomPtr = ^QTVRCubicViewAtom;
+ QTVRCubicViewAtom = record
+ minPan: Float32;
+ maxPan: Float32;
+ minTilt: Float32;
+ maxTilt: Float32;
+ minFieldOfView: Float32;
+ maxFieldOfView: Float32;
+ defaultPan: Float32;
+ defaultTilt: Float32;
+ defaultFieldOfView: Float32;
+ end;
+
+ QTVRCubicFaceDataPtr = ^QTVRCubicFaceData;
+ QTVRCubicFaceData = record
+ orientation: array [0..3] of Float32; { WXYZ quaternion of absolute orientation }
+ center: array [0..1] of Float32; { Center of image relative to center of projection (default = (0,0)) in normalized units }
+ aspect: Float32; { aspect>1 => tall pixels; aspect <1 => squat pixels (default = 1) }
+ skew: Float32; { skew x by y (default = 0) }
+ end;
+
+ { Special resolution values for the Image Track Reference Atoms. Use only one value per track reference. }
+
+const
+ kQTVRFullTrackRes = $00000001;
+ kQTVRHalfTrackRes = $00000002;
+ kQTVRQuarterTrackRes = $00000004;
+ kQTVRPreviewTrackRes = $8000;
+
+
+type
+ QTVRTrackRefEntryPtr = ^QTVRTrackRefEntry;
+ QTVRTrackRefEntry = record
+ trackRefType: UInt32;
+ trackResolution: UInt16;
+ trackRefIndex: UInt32;
+ end;
+
+ {
+ =================================================================================================
+ Object File format 2.0
+ -------------------------------------------------------------------------------------------------
+ }
+
+const
+ kQTVRObjectAnimateViewFramesOn = $00000001;
+ kQTVRObjectPalindromeViewFramesOn = $00000002;
+ kQTVRObjectStartFirstViewFrameOn = $00000004;
+ kQTVRObjectAnimateViewsOn = $00000008;
+ kQTVRObjectPalindromeViewsOn = $00000010;
+ kQTVRObjectSyncViewToFrameRate = $00000020;
+ kQTVRObjectDontLoopViewFramesOn = $00000040;
+ kQTVRObjectPlayEveryViewFrameOn = $00000080;
+ kQTVRObjectStreamingViewsOn = $00000100;
+
+ kQTVRObjectWrapPanOn = $00000001;
+ kQTVRObjectWrapTiltOn = $00000002;
+ kQTVRObjectCanZoomOn = $00000004;
+ kQTVRObjectReverseHControlOn = $00000008;
+ kQTVRObjectReverseVControlOn = $00000010;
+ kQTVRObjectSwapHVControlOn = $00000020;
+ kQTVRObjectTranslationOn = $00000040;
+
+ kGrabberScrollerUI = 1; { "Object" }
+ kOldJoyStickUI = 2; { "1.0 Object as Scene" }
+ kJoystickUI = 3; { "Object In Scene" }
+ kGrabberUI = 4; { "Grabber only" }
+ kAbsoluteUI = 5; { "Absolute pointer" }
+
+
+type
+ QTVRObjectSampleAtomPtr = ^QTVRObjectSampleAtom;
+ QTVRObjectSampleAtom = record
+ majorVersion: UInt16; { kQTVRMajorVersion }
+ minorVersion: UInt16; { kQTVRMinorVersion }
+ movieType: UInt16; { ObjectUITypes }
+ viewStateCount: UInt16; { The number of view states 1 based }
+ defaultViewState: UInt16; { The default view state number. The number must be 1 to viewStateCount }
+ mouseDownViewState: UInt16; { The mouse down view state. The number must be 1 to viewStateCount }
+ viewDuration: UInt32; { The duration of each view including all animation frames in a view }
+ columns: UInt32; { Number of columns in movie }
+ rows: UInt32; { Number rows in movie }
+ mouseMotionScale: Float32; { 180.0 for kStandardObject or kQTVRObjectInScene, actual degrees for kOldNavigableMovieScene. }
+ minPan: Float32; { Start horizontal pan angle in degrees }
+ maxPan: Float32; { End horizontal pan angle in degrees }
+ defaultPan: Float32; { Initial horizontal pan angle in degrees (poster view) }
+ minTilt: Float32; { Start vertical pan angle in degrees }
+ maxTilt: Float32; { End vertical pan angle in degrees }
+ defaultTilt: Float32; { Initial vertical pan angle in degrees (poster view) }
+ minFieldOfView: Float32; { minimum field of view setting (appears as the maximum zoom effect) must be >= 1 }
+ fieldOfView: Float32; { the field of view range must be >= 1 }
+ defaultFieldOfView: Float32; { must be in minFieldOfView and maxFieldOfView range inclusive }
+ defaultViewCenterH: Float32;
+ defaultViewCenterV: Float32;
+ viewRate: Float32;
+ frameRate: Float32;
+ animationSettings: UInt32; { 32 reserved bit fields }
+ controlSettings: UInt32; { 32 reserved bit fields }
+ end;
+
+ {
+ =================================================================================================
+ QuickTime VR Authoring Components
+ -------------------------------------------------------------------------------------------------
+ }
+
+ {
+ ComponentDescription constants for QTVR Export components
+ (componentType = MovieExportType; componentSubType = MovieFileType)
+ }
+
+const
+ kQTVRFlattenerManufacturer = $76727765 (* 'vrwe' *); { aka QTVRFlattenerType }
+ kQTVRSplitterManufacturer = $76727370 (* 'vrsp' *);
+ kQTVRObjExporterManufacturer = $76726F62 (* 'vrob' *);
+
+ { QuickTime VR Flattener atom types }
+ kQTVRFlattenerSettingsParentAtomType = $56525765 (* 'VRWe' *); { parent of settings atoms (other than compression) }
+ kQTVRFlattenerPreviewResAtomType = $50526573 (* 'PRes' *); { preview resolution Int16 }
+ kQTVRFlattenerImportSpecAtomType = $49537065 (* 'ISpe' *); { import file spec FSSpec }
+ kQTVRFlattenerCreatePreviewAtomType = $50726576 (* 'Prev' *); { Boolean }
+ kQTVRFlattenerImportPreviewAtomType = $49507265 (* 'IPre' *); { Boolean }
+ kQTVRFlattenerBlurPreviewAtomType = $426C7572 (* 'Blur' *); { Boolean }
+
+ { QuickTime VR Splitter atom types }
+ kQTVRSplitterSettingsParentAtomType = $56525370 (* 'VRSp' *); { parent of settings atoms (other than compression) }
+ kQTVRSplitterGenerateHTMLAtomType = $4768746D (* 'Ghtm' *); { Boolean }
+ kQTVRSplitterOverwriteFilesAtomType = $4F776669 (* 'Owfi' *); { Boolean }
+ kQTVRSplitterUseFlattenerAtomType = $55736566 (* 'Usef' *); { Boolean }
+ kQTVRSplitterShowControllerAtomType = $5368636F (* 'Shco' *); { Boolean }
+ kQTVRSplitterTargetMyselfAtomType = $5467746D (* 'Tgtm' *); { Boolean }
+
+ { QuickTime VR Object Exporter atom types }
+ kQTVRObjExporterSettingsBlockSize = $6273697A (* 'bsiz' *); { block size for compression }
+ kQTVRObjExporterSettingsTargetSize = $7473697A (* 'tsiz' *); { target file size }
+
+
+{$ifc OLDROUTINENAMES}
+
+type
+ VRStringAtom = QTVRStringAtom;
+ VRStringAtomPtr = ^VRStringAtom;
+ VRWorldHeaderAtom = QTVRWorldHeaderAtom;
+ VRWorldHeaderAtomPtr = ^VRWorldHeaderAtom;
+ VRPanoImagingAtom = QTVRPanoImagingAtom;
+ VRPanoImagingAtomPtr = ^VRPanoImagingAtom;
+ VRNodeLocationAtom = QTVRNodeLocationAtom;
+ VRNodeLocationAtomPtr = ^VRNodeLocationAtom;
+ VRNodeHeaderAtom = QTVRNodeHeaderAtom;
+ VRNodeHeaderAtomPtr = ^VRNodeHeaderAtom;
+ VRAngleRangeAtom = QTVRAngleRangeAtom;
+ VRAngleRangeAtomPtr = ^VRAngleRangeAtom;
+ VRHotSpotInfoAtom = QTVRHotSpotInfoAtom;
+ VRHotSpotInfoAtomPtr = ^VRHotSpotInfoAtom;
+ VRLinkHotSpotAtom = QTVRLinkHotSpotAtom;
+ VRLinkHotSpotAtomPtr = ^VRLinkHotSpotAtom;
+ VRPanoSampleAtom = QTVRPanoSampleAtom;
+ VRPanoSampleAtomPtr = ^VRPanoSampleAtom;
+ VRTrackRefEntry = QTVRTrackRefEntry;
+ VRTrackRefEntryPtr = ^VRTrackRefEntry;
+ VRObjectSampleAtom = QTVRObjectSampleAtom;
+ VRObjectSampleAtomPtr = ^VRObjectSampleAtom;
+{$endc} {OLDROUTINENAMES}
+
+
+{$ALIGN MAC68K}
+
+
+{unit HIMovieView}
+{
+ File: QuickTime/HIMovieView.h
+
+ Contains: HIView-based movie playback
+
+ Version: QuickTime 7.1.2
+
+ Copyright: © 2004-2006 by Apple Computer, Inc., all rights reserved.
+
+}
+
+{ Pascal Translation: Gale R Paeper, <gpaeper@empirenet.com>, 2006 }
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{
+ * kHIMovieViewClassID
+ *
+ * Summary:
+ * Class ID for HIMovieView
+ }
+{$ifc USE_CFSTR_CONSTANT_MACROS}
+{$definec kHIMovieViewClassID CFSTRP('com.apple.quicktime.HIMovieView')}
+{$endc}
+
+{
+ * Summary:
+ * HIMovieView Event class
+ }
+const
+{
+ * Events related to movie views.
+ }
+ kEventClassMovieView = $6D6F6F76 (* 'moov' *);
+
+
+{
+ * kEventClassMovieView / kEventMovieViewOptimalBoundsChanged
+ *
+ * Summary:
+ * Sent when the movie size changes.
+ *
+ * Parameters:
+ *
+ * --> kEventParamDirectObject (in, typeControlRef)
+ * The movie view whose size is changing.
+ *
+ * --> kEventParamControlOptimalBounds (in, typeHIRect)
+ * The new optimal bounds.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ * CarbonLib: not available
+ }
+const
+ kEventMovieViewOptimalBoundsChanged = 1;
+
+
+{
+ * Summary:
+ * HIMovieView attributes
+ }
+const
+{
+ * No attributes
+ }
+ kHIMovieViewNoAttributes = 0;
+
+ {
+ * Movie controller bar is visible below visual content
+ }
+ kHIMovieViewControllerVisibleAttribute = 1 shl 0;
+
+ {
+ * Automatically call MCIdle() at appropriate times
+ }
+ kHIMovieViewAutoIdlingAttribute = 1 shl 1;
+
+ {
+ * Accepts keyboard focus
+ }
+ kHIMovieViewAcceptsFocusAttribute = 1 shl 2;
+
+ {
+ * Movie editing enabled
+ }
+ kHIMovieViewEditableAttribute = 1 shl 3;
+
+ {
+ * Handles editing HI commands such as cut, copy and paste
+ }
+ kHIMovieViewHandleEditingHIAttribute = 1 shl 4;
+
+ {
+ * Combination of kHIMovieViewControllerVisibleAttribute,
+ * kHIMovieViewAutoIdlingAttribute, and
+ * kHIMovieViewAcceptsFocusAttribute
+ }
+ kHIMovieViewStandardAttributes = kHIMovieViewControllerVisibleAttribute or kHIMovieViewAutoIdlingAttribute or kHIMovieViewAcceptsFocusAttribute;
+
+{
+ * HIMovieViewCreate()
+ *
+ * Summary:
+ * Creates an HIMovieView object
+ *
+ * Discussion:
+ * If successful, the created view will have a single retain count.
+ *
+ * Parameters:
+ *
+ * inMovie:
+ * [in] Initial movie to view, may be NULL
+ *
+ * inAttributes:
+ * [in] Initial HIMovieView attributes
+ *
+ * outMovieView:
+ * [out] Points to variable to receive new HIMovieView
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function HIMovieViewCreate( inMovie: Movie; inAttributes: OptionBits; var outMovieView: HIViewRef ): OSStatus; external name '_HIMovieViewCreate';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIMovieViewGetMovie()
+ *
+ * Summary:
+ * Returns the view's current movie.
+ *
+ * Parameters:
+ *
+ * inView:
+ * [in] The HIMovieView
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function HIMovieViewGetMovie( inView: HIViewRef ): Movie; external name '_HIMovieViewGetMovie';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIMovieViewSetMovie()
+ *
+ * Summary:
+ * Sets the view's current movie.
+ *
+ * Parameters:
+ *
+ * inView:
+ * [in] The HIMovieView
+ *
+ * inMovie:
+ * [in] The new movie to display
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function HIMovieViewSetMovie( inView: HIViewRef; inMovie: Movie ): OSStatus; external name '_HIMovieViewSetMovie';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIMovieViewGetAttributes()
+ *
+ * Summary:
+ * Returns the view's current attributes.
+ *
+ * Parameters:
+ *
+ * inView:
+ * [in] The HIMovieView
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function HIMovieViewGetAttributes( inView: HIViewRef ): OptionBits; external name '_HIMovieViewGetAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIMovieViewChangeAttributes()
+ *
+ * Summary:
+ * Changes the views attributes.
+ *
+ * Discussion:
+ * Setting an attribute takes precedence over clearing the attribute.
+ *
+ * Parameters:
+ *
+ * inView:
+ * [in] The HIMovieView
+ *
+ * inAttributesToSet:
+ * [in] Attributes to set
+ *
+ * inAttributesToClear:
+ * [in] Attributes to clear
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function HIMovieViewChangeAttributes( inView: HIViewRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HIMovieViewChangeAttributes';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIMovieViewGetMovieController()
+ *
+ * Summary:
+ * Returns the view's current movie controller.
+ *
+ * Parameters:
+ *
+ * inView:
+ * [in] The HIMovieView
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function HIMovieViewGetMovieController( inView: HIViewRef ): MovieController; external name '_HIMovieViewGetMovieController';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIMovieViewGetControllerBarSize()
+ *
+ * Summary:
+ * Returns the size of the visible movie controller bar.
+ *
+ * Parameters:
+ *
+ * inView:
+ * [in] The HIMovieView
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function HIMovieViewGetControllerBarSize( inView: HIViewRef ): HISize; external name '_HIMovieViewGetControllerBarSize';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIMovieViewPlay()
+ *
+ * Summary:
+ * Convenience routine to play the view's current movie.
+ *
+ * Discussion:
+ * If the movie is already playing, this function does nothing.
+ *
+ * Parameters:
+ *
+ * movieView:
+ * [in] The movie view.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function HIMovieViewPlay( movieView: HIViewRef ): OSStatus; external name '_HIMovieViewPlay';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{
+ * HIMovieViewPause()
+ *
+ * Summary:
+ * Convenience routine to pause the view's current movie.
+ *
+ * Discussion:
+ * If the movie is already paused, this function does nothing.
+ *
+ * Parameters:
+ *
+ * movieView:
+ * [in] The movie view.
+ *
+ * Availability:
+ * Mac OS X: in version 10.4 (or QuickTime 7.0) and later in QuickTime.framework
+ * CarbonLib: not available
+ * Non-Carbon CFM: not available
+ }
+function HIMovieViewPause( movieView: HIViewRef ): OSStatus; external name '_HIMovieViewPause';
+(* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
+
+
+{unit HIToolbox}
+{
+ File: HIToolbox/HIToolbox.h
+
+ Contains: Master include for HIToolbox private framework
+
+ Version: HIToolbox-219.4.81~2
+
+ Copyright: © 1999-2005 by Apple Computer, Inc., all rights reserved.
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+{ Pascal Translation: Peter N Lewis, <peter@stairways.com.au>, August 2005 }
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+{$ALIGN POWER}
+
+
+{ #include <Displays.i> -- moved to QD.i }
+
+
+{unit ImageCodec}
+{
+ File: ImageCodec.p
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1990-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+{ codec capabilities flags }
+
+const
+ codecCanScale = $00000001;
+ codecCanMask = $00000002;
+ codecCanMatte = $00000004;
+ codecCanTransform = $00000008;
+ codecCanTransferMode = $00000010;
+ codecCanCopyPrev = $00000020;
+ codecCanSpool = $00000040;
+ codecCanClipVertical = $00000080;
+ codecCanClipRectangular = $00000100;
+ codecCanRemapColor = $00000200;
+ codecCanFastDither = $00000400;
+ codecCanSrcExtract = $00000800;
+ codecCanCopyPrevComp = $00001000;
+ codecCanAsync = $00002000;
+ codecCanMakeMask = $00004000;
+ codecCanShift = $00008000;
+ codecCanAsyncWhen = $00010000;
+ codecCanShieldCursor = $00020000;
+ codecCanManagePrevBuffer = $00040000;
+ codecHasVolatileBuffer = $00080000; { codec requires redraw after window movement }
+ codecWantsRegionMask = $00100000;
+ codecImageBufferIsOnScreen = $00200000; { old def of codec using overlay surface, = ( codecIsDirectToScreenOnly | codecUsesOverlaySurface | codecImageBufferIsOverlaySurface | codecSrcMustBeImageBuffer ) }
+ codecWantsDestinationPixels = $00400000;
+ codecWantsSpecialScaling = $00800000;
+ codecHandlesInputs = $01000000;
+ codecCanDoIndirectSurface = $02000000; { codec can handle indirect surface (GDI) }
+ codecIsSequenceSensitive = $04000000;
+ codecRequiresOffscreen = $08000000;
+ codecRequiresMaskBits = $10000000;
+ codecCanRemapResolution = $20000000;
+ codecIsDirectToScreenOnly = $40000000; { codec can only decompress data to the screen }
+ codecCanLockSurface = $80000000; { codec can lock destination surface, icm doesn't lock for you }
+
+ { codec capabilities flags2 }
+ codecUsesOverlaySurface = $00000001; { codec uses overlay surface }
+ codecImageBufferIsOverlaySurface = $00000002; { codec image buffer is overlay surface, the bits in the buffer are on the screen }
+ codecSrcMustBeImageBuffer = $00000004; { codec can only source data from an image buffer }
+ codecImageBufferIsInAGPMemory = $00000010; { codec image buffer is in AGP space, byte writes are OK }
+ codecImageBufferIsInPCIMemory = $00000020; { codec image buffer is across a PCI bus; byte writes are bad }
+ codecImageBufferMemoryFlagsValid = $00000040; { set by ImageCodecNewImageBufferMemory/NewImageGWorld to indicate that it set the AGP/PCI flags (supported in QuickTime 6.0 and later) }
+ codecDrawsHigherQualityScaled = $00000080; { codec will draw higher-quality image if it performs scaling (eg, wipe effect with border) }
+
+
+type
+ CodecCapabilitiesPtr = ^CodecCapabilities;
+ CodecCapabilities = record
+ flags: SInt32;
+ wantedPixelSize: SInt16;
+ extendWidth: SInt16;
+ extendHeight: SInt16;
+ bandMin: SInt16;
+ bandInc: SInt16;
+ pad: SInt16;
+ time: UInt32;
+ flags2: SInt32; { field new in QuickTime 4.0 }
+ end;
+
+ { codec condition flags }
+
+const
+ codecConditionFirstBand = $00000001;
+ codecConditionLastBand = $00000002;
+ codecConditionFirstFrame = $00000004;
+ codecConditionNewDepth = $00000008;
+ codecConditionNewTransform = $00000010;
+ codecConditionNewSrcRect = $00000020;
+ codecConditionNewMask = $00000040;
+ codecConditionNewMatte = $00000080;
+ codecConditionNewTransferMode = $00000100;
+ codecConditionNewClut = $00000200;
+ codecConditionNewAccuracy = $00000400;
+ codecConditionNewDestination = $00000800;
+ codecConditionFirstScreen = $00001000;
+ codecConditionDoCursor = $00002000;
+ codecConditionCatchUpDiff = $00004000;
+ codecConditionMaskMayBeChanged = $00008000;
+ codecConditionToBuffer = $00010000;
+ codecConditionCodecChangedMask = $80000000;
+
+
+ codecInfoResourceType = $63646369 (* 'cdci' *); { codec info resource type }
+ codecInterfaceVersion = 2; { high word returned in component GetVersion }
+
+
+type
+ CDSequenceDataSourceQueueEntryPtr = ^CDSequenceDataSourceQueueEntry;
+ CDSequenceDataSourceQueueEntry = record
+ nextBusy: Ptr;
+ descSeed: SInt32;
+ dataDesc: Handle;
+ data: Ptr;
+ dataSize: SInt32;
+ useCount: SInt32;
+ frameTime: TimeValue;
+ frameDuration: TimeValue;
+ timeScale: TimeValue;
+ end;
+
+ CDSequenceDataSourcePtr = ^CDSequenceDataSource;
+ CDSequenceDataSource = record
+ recordSize: SInt32;
+ next: Ptr;
+ seqID: ImageSequence;
+ sourceID: ImageSequenceDataSource;
+ sourceType: OSType;
+ sourceInputNumber: SInt32;
+ dataPtr: Ptr;
+ dataDescription: Handle;
+ changeSeed: SInt32;
+ transferProc: ICMConvertDataFormatUPP;
+ transferRefcon: Ptr;
+ dataSize: SInt32;
+ { fields available in QT 3 and later }
+ dataQueue: QHdrPtr; { queue of CDSequenceDataSourceQueueEntry structures }
+ originalDataPtr: Ptr;
+ originalDataSize: SInt32;
+ originalDataDescription: Handle;
+ originalDataDescriptionSeed: SInt32;
+ end;
+
+ ICMFrameTimeInfoPtr = ^ICMFrameTimeInfo;
+ ICMFrameTimeInfo = record
+ startTime: wide;
+ scale: SInt32;
+ duration: SInt32;
+ end;
+
+ CodecCompressParamsPtr = ^CodecCompressParams;
+ CodecCompressParams = record
+ sequenceID: ImageSequence; { precompress,bandcompress }
+ imageDescription: ImageDescriptionHandle; { precompress,bandcompress }
+ data: Ptr;
+ bufferSize: SInt32;
+ frameNumber: SInt32;
+ startLine: SInt32;
+ stopLine: SInt32;
+ conditionFlags: SInt32;
+ callerFlags: CodecFlags;
+ capabilities: CodecCapabilitiesPtr; { precompress,bandcompress }
+ progressProcRecord: ICMProgressProcRecord;
+ completionProcRecord: ICMCompletionProcRecord;
+ flushProcRecord: ICMFlushProcRecord;
+ srcPixMap: PixMap; { precompress,bandcompress }
+ prevPixMap: PixMap;
+ spatialQuality: CodecQ;
+ temporalQuality: CodecQ;
+ similarity: Fixed;
+ dataRateParams: DataRateParamsPtr;
+ reserved: SInt32;
+ { The following fields only exist for QuickTime 2.1 and greater }
+ majorSourceChangeSeed: UInt16;
+ minorSourceChangeSeed: UInt16;
+ sourceData: CDSequenceDataSourcePtr;
+ { The following fields only exist for QuickTime 2.5 and greater }
+ preferredPacketSizeInBytes: SInt32;
+ { The following fields only exist for QuickTime 3.0 and greater }
+ requestedBufferWidth: SInt32; { must set codecWantsSpecialScaling to indicate this field is valid }
+ requestedBufferHeight: SInt32; { must set codecWantsSpecialScaling to indicate this field is valid }
+ { The following fields only exist for QuickTime 4.0 and greater }
+ wantedSourcePixelType: OSType;
+ { The following fields only exist for QuickTime 5.0 and greater }
+ compressedDataSize: SInt32; { if nonzero, this overrides (*imageDescription)->dataSize }
+ taskWeight: UInt32; { preferred weight for MP tasks implementing this operation }
+ taskName: OSType; { preferred name (type) for MP tasks implementing this operation }
+ end;
+
+ CodecDecompressParamsPtr = ^CodecDecompressParams;
+ CodecDecompressParams = record
+ sequenceID: ImageSequence; { predecompress,banddecompress }
+ imageDescription: ImageDescriptionHandle; { predecompress,banddecompress }
+ data: Ptr;
+ bufferSize: SInt32;
+ frameNumber: SInt32;
+ startLine: SInt32;
+ stopLine: SInt32;
+ conditionFlags: SInt32;
+ callerFlags: CodecFlags;
+ capabilities: CodecCapabilitiesPtr; { predecompress,banddecompress }
+ progressProcRecord: ICMProgressProcRecord;
+ completionProcRecord: ICMCompletionProcRecord;
+ dataProcRecord: ICMDataProcRecord;
+ port: CGrafPtr; { predecompress,banddecompress }
+ dstPixMap: PixMap; { predecompress,banddecompress }
+ maskBits: BitMapPtr;
+ mattePixMap: PixMapPtr;
+ srcRect: Rect; { predecompress,banddecompress }
+ matrix: MatrixRecordPtr; { predecompress,banddecompress }
+ accuracy: CodecQ; { predecompress,banddecompress }
+ transferMode: SInt16; { predecompress,banddecompress }
+ frameTime: ICMFrameTimePtr; { banddecompress }
+ reserved: array [0..0] of SInt32;
+ { The following fields only exist for QuickTime 2.0 and greater }
+ matrixFlags: SInt8; { high bit set if 2x resize }
+ matrixType: SInt8;
+ dstRect: Rect; { only valid for simple transforms }
+ { The following fields only exist for QuickTime 2.1 and greater }
+ majorSourceChangeSeed: UInt16;
+ minorSourceChangeSeed: UInt16;
+ sourceData: CDSequenceDataSourcePtr;
+ maskRegion: RgnHandle;
+ { The following fields only exist for QuickTime 2.5 and greater }
+ wantedDestinationPixelTypes: ^OSTypePtr; { Handle to 0-terminated list of OSTypes }
+ screenFloodMethod: SInt32;
+ screenFloodValue: SInt32;
+ preferredOffscreenPixelSize: SInt16;
+ { The following fields only exist for QuickTime 3.0 and greater }
+ syncFrameTime: ICMFrameTimeInfoPtr; { banddecompress }
+ needUpdateOnTimeChange: boolean; { banddecompress }
+ enableBlackLining: boolean;
+ needUpdateOnSourceChange: boolean; { band decompress }
+ pad: boolean;
+ unused: SInt32;
+ finalDestinationPort: CGrafPtr;
+ requestedBufferWidth: SInt32; { must set codecWantsSpecialScaling to indicate this field is valid }
+ requestedBufferHeight: SInt32; { must set codecWantsSpecialScaling to indicate this field is valid }
+ { The following fields only exist for QuickTime 4.0 and greater }
+ displayableAreaOfRequestedBuffer: Rect; { set in predecompress }
+ requestedSingleField: boolean;
+ needUpdateOnNextIdle: boolean;
+ pad2: array [0..1] of boolean;
+ bufferGammaLevel: Fixed;
+ { The following fields only exist for QuickTime 5.0 and greater }
+ taskWeight: UInt32; { preferred weight for MP tasks implementing this operation }
+ taskName: OSType; { preferred name (type) for MP tasks implementing this operation }
+ { The following fields only exist for QuickTime 6.0 and greater }
+ bidirectionalPredictionMode: boolean;
+ destinationBufferMemoryPreference: SInt8; { a codec's PreDecompress/Preflight call can set this to express a preference about what kind of memory its destination buffer should go into. no guarantees. }
+ codecBufferMemoryPreference: SInt8; { may indicate preferred kind of memory that NewImageGWorld/NewImageBufferMemory should create its buffer in, if applicable. }
+ pad4: SInt8;
+ mediaContextID: QTMediaContextID;
+ end;
+
+
+const
+ matrixFlagScale2x = $00000080;
+ matrixFlagScale1x = $00000040;
+ matrixFlagScaleHalf = $00000020;
+
+ kScreenFloodMethodNone = 0;
+ kScreenFloodMethodKeyColor = 1;
+ kScreenFloodMethodAlpha = 2;
+
+ kFlushLastQueuedFrame = 0;
+ kFlushFirstQueuedFrame = 1;
+
+ kNewImageGWorldErase = $00000001;
+
+ { values for destinationBufferMemoryPreference and codecBufferMemoryPreference }
+ kICMImageBufferNoPreference = 0;
+ kICMImageBufferPreferMainMemory = 1;
+ kICMImageBufferPreferVideoMemory = 2;
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ ImageCodecTimeTriggerProcPtr = procedure(refcon: UnivPtr);
+{$elsec}
+ ImageCodecTimeTriggerProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ ImageCodecDrawBandCompleteProcPtr = procedure(refcon: UnivPtr; drawBandResult: ComponentResult; drawBandCompleteFlags: UInt32);
+{$elsec}
+ ImageCodecDrawBandCompleteProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ ImageCodecTimeTriggerUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ImageCodecTimeTriggerUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ ImageCodecDrawBandCompleteUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ImageCodecDrawBandCompleteUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppImageCodecTimeTriggerProcInfo = $000000C0;
+ uppImageCodecDrawBandCompleteProcInfo = $00000FC0;
+ {
+ * NewImageCodecTimeTriggerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewImageCodecTimeTriggerUPP(userRoutine: ImageCodecTimeTriggerProcPtr): ImageCodecTimeTriggerUPP; external name '_NewImageCodecTimeTriggerUPP'; { old name was NewImageCodecTimeTriggerProc }
+{
+ * NewImageCodecDrawBandCompleteUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewImageCodecDrawBandCompleteUPP(userRoutine: ImageCodecDrawBandCompleteProcPtr): ImageCodecDrawBandCompleteUPP; external name '_NewImageCodecDrawBandCompleteUPP'; { old name was NewImageCodecDrawBandCompleteProc }
+{
+ * DisposeImageCodecTimeTriggerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeImageCodecTimeTriggerUPP(userUPP: ImageCodecTimeTriggerUPP); external name '_DisposeImageCodecTimeTriggerUPP';
+{
+ * DisposeImageCodecDrawBandCompleteUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeImageCodecDrawBandCompleteUPP(userUPP: ImageCodecDrawBandCompleteUPP); external name '_DisposeImageCodecDrawBandCompleteUPP';
+{
+ * InvokeImageCodecTimeTriggerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeImageCodecTimeTriggerUPP(refcon: UnivPtr; userRoutine: ImageCodecTimeTriggerUPP); external name '_InvokeImageCodecTimeTriggerUPP'; { old name was CallImageCodecTimeTriggerProc }
+{
+ * InvokeImageCodecDrawBandCompleteUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeImageCodecDrawBandCompleteUPP(refcon: UnivPtr; drawBandResult: ComponentResult; drawBandCompleteFlags: UInt32; userRoutine: ImageCodecDrawBandCompleteUPP); external name '_InvokeImageCodecDrawBandCompleteUPP'; { old name was CallImageCodecDrawBandCompleteProc }
+type
+ ImageSubCodecDecompressCapabilitiesPtr = ^ImageSubCodecDecompressCapabilities;
+ ImageSubCodecDecompressCapabilities = record
+ recordSize: SInt32; { sizeof(ImageSubCodecDecompressCapabilities) }
+ decompressRecordSize: SInt32; { size of your codec's decompress record }
+ canAsync: boolean; { default true }
+ pad0: SInt8;
+ { The following field only exists for QuickTime 4.1 and greater }
+ suggestedQueueSize: UInt16;
+ { The following field only exists for QuickTime 4.0 and greater }
+ canProvideTrigger: boolean;
+ { The following fields only exist for QuickTime 5.0 and greater }
+ subCodecFlushesScreen: boolean; { only used on Mac OS X }
+ subCodecCallsDrawBandComplete: boolean;
+ pad2: SInt8;
+ { The following fields only exist for QuickTime 5.0.1 and greater }
+ isChildCodec: boolean; { set by base codec before calling Initialize }
+ pad3,pad4,pad5: SInt8;
+ end;
+
+
+const
+ kCodecFrameTypeUnknown = 0;
+ kCodecFrameTypeKey = 1;
+ kCodecFrameTypeDifference = 2;
+ kCodecFrameTypeDroppableDifference = 3;
+
+
+type
+ ImageSubCodecDecompressRecordPtr = ^ImageSubCodecDecompressRecord;
+ ImageSubCodecDecompressRecord = record
+ baseAddr: Ptr;
+ rowBytes: SInt32;
+ codecData: Ptr;
+ progressProcRecord: ICMProgressProcRecord;
+ dataProcRecord: ICMDataProcRecord;
+ userDecompressRecord: Ptr; { pointer to codec-specific per-band data }
+ frameType: SInt8;
+ inhibitMP: boolean; { set this in BeginBand to tell the base decompressor not to call DrawBand from an MP task for this frame. (Only has any effect for MP-capable subcodecs. New in QuickTime 5.0.) }
+ pad: packed array [0..1] of UInt8;
+ priv: array [0..1] of SInt32;
+ { The following fields only exist for QuickTime 5.0 and greater }
+ drawBandCompleteUPP: ImageCodecDrawBandCompleteUPP; { only used if subcodec set subCodecCallsDrawBandComplete; if drawBandCompleteUPP is non-nil, codec must call it when a frame is finished, but may return from DrawBand before the frame is finished. }
+ drawBandCompleteRefCon: Ptr; { Note: do not call drawBandCompleteUPP directly from a hardware interrupt; instead, use DTInstall to run a function at deferred task time, and call drawBandCompleteUPP from that. }
+ end;
+
+ {
+ These data structures are used by code that wants to pass planar pixmap
+ information around.
+ The structure below gives the basic idea of what is being done.
+ Normal instances of code will use a fixed number of planes (eg YUV420 uses
+ three planes, Y, U and V). Each such code instance will define its own
+ version of the PlanarPixMapInfo struct counting the number of planes it
+ needs along with defining constants that specify the meanings of each
+ plane.
+ }
+ PlanarComponentInfoPtr = ^PlanarComponentInfo;
+ PlanarComponentInfo = record
+ offset: SInt32;
+ rowBytes: UInt32;
+ end;
+
+ PlanarPixMapInfoPtr = ^PlanarPixMapInfo;
+ PlanarPixMapInfo = record
+ componentInfo: array [0..0] of PlanarComponentInfo;
+ end;
+
+ PlanarPixmapInfoSorensonYUV9Ptr = ^PlanarPixmapInfoSorensonYUV9;
+ PlanarPixmapInfoSorensonYUV9 = record
+ componentInfoY: PlanarComponentInfo;
+ componentInfoU: PlanarComponentInfo;
+ componentInfoV: PlanarComponentInfo;
+ end;
+
+ PlanarPixmapInfoYUV420Ptr = ^PlanarPixmapInfoYUV420;
+ PlanarPixmapInfoYUV420 = record
+ componentInfoY: PlanarComponentInfo;
+ componentInfoCb: PlanarComponentInfo;
+ componentInfoCr: PlanarComponentInfo;
+ end;
+
+
+const
+ codecSuggestedBufferSentinel = $73656E74 (* 'sent' *); { codec public resource containing suggested data pattern to put past end of data buffer }
+
+
+ { name of parameters or effect -- placed in root container, required }
+ kParameterTitleName = $6E616D65 (* 'name' *);
+ kParameterTitleID = 1;
+
+ { codec sub-type of parameters or effect -- placed in root container, required }
+ kParameterWhatName = $77686174 (* 'what' *);
+ kParameterWhatID = 1;
+
+ { effect version -- placed in root container, optional, but recommended }
+ kParameterVersionName = $76657273 (* 'vers' *);
+ kParameterVersionID = 1;
+
+ { is effect repeatable -- placed in root container, optional, default is TRUE }
+ kParameterRepeatableName = $70657465 (* 'pete' *);
+ kParameterRepeatableID = 1;
+
+ kParameterRepeatableTrue = 1;
+ kParameterRepeatableFalse = 0;
+
+ { substitution codec in case effect is missing -- placed in root container, recommended }
+ kParameterAlternateCodecName = $73756273 (* 'subs' *);
+ kParameterAlternateCodecID = 1;
+
+ { maximum number of sources -- placed in root container, required }
+ kParameterSourceCountName = $73726373 (* 'srcs' *);
+ kParameterSourceCountID = 1;
+
+ { EFFECT CLASSES }
+
+ {
+ The effect major class defines the major grouping of the effect.
+ Major classes are defined only by Apple and are not extendable by third
+ parties. Major classes are used for filtering of the effect list by
+ applications, but do not define what UI sub-group may or may not be
+ presented to the user. For example, the major class may be a transition,
+ but the minor class may be a wipe.
+ }
+
+ {
+ Effects that fail to include a
+ kEffectMajorClassType will be classified as kMiscMajorClass.
+ }
+ kEffectMajorClassType = $636C7361 (* 'clsa' *);
+ kEffectMajorClassID = 1;
+
+ kGeneratorMajorClass = $67656E72 (* 'genr' *); { zero source effects }
+ kFilterMajorClass = $66696C74 (* 'filt' *); { one source effects }
+ kTransitionMajorClass = $7472616E (* 'tran' *); { multisource morph effects }
+ kCompositorMajorClass = $636F6D70 (* 'comp' *); { multisource layer effects }
+ kMiscMajorClass = $6D697363 (* 'misc' *); { all other effects }
+
+ {
+ The effect minor class defines the grouping of effects for the purposes
+ of UI. Apple defines a set of minor classes and will extend it over
+ time. Apple also provides strings within the UI for minor classes
+ that it defines. Third party developers may either classify
+ their effects as a type defined by Apple, or may define their own
+ minor class. Effects which define a minor class of their own
+ must also then supply a kEffectMinorClassNameType atom.
+ }
+
+ {
+ If a kEffectMinorClassNameType atom is present, but
+ the minor type is one defined by Apple, the Apple supplied
+ string will be used in the UI.
+ }
+
+ {
+ Effects that fail to supply a kEffectMinorClassType will be
+ classified as kMiscMinorClass.
+ }
+ kEffectMinorClassType = $636C7369 (* 'clsi' *);
+ kEffectMinorClassID = 1;
+ kEffectMinorClassNameType = $636C736E (* 'clsn' *);
+ kEffectMinorClassNameID = 1;
+
+ kGeneratorMinorClass = $67656E72 (* 'genr' *); { "Generators" }
+ kRenderMinorClass = $72656E64 (* 'rend' *); { "Render" }
+ kFilterMinorClass = $66696C74 (* 'filt' *); { "Filters" }
+ kArtisticMinorClass = $61727473 (* 'arts' *); { "Artistic }
+ kBlurMinorClass = $626C7572 (* 'blur' *); { "Blur" }
+ kSharpenMinorClass = $73687270 (* 'shrp' *); { "Sharpen" }
+ kDistortMinorClass = $64697374 (* 'dist' *); { "Distort" }
+ kNoiseMinorClass = $6E6F6973 (* 'nois' *); { "Noise" }
+ kAdjustmentMinorClass = $61647374 (* 'adst' *); { "Adjustments" }
+ kTransitionMinorClass = $7472616E (* 'tran' *); { "Transitions" }
+ kWipeMinorClass = $77697065 (* 'wipe' *); { "Wipes" }
+ k3DMinorClass = $707A7265 (* 'pzre' *); { "3D Transitions" }
+ kCompositorMinorClass = $636F6D70 (* 'comp' *); { "Compositors" }
+ kEffectsMinorClass = $66786678 (* 'fxfx' *); { "Special Effects" }
+ kMiscMinorClass = $6D697363 (* 'misc' *); { "Miscellaneous" }
+
+ {
+ Effects can define a number of "preset" values which will be presented to the user
+ in a simplified UI. Each preset is an atom within the parameter description list
+ and must have an atom ID from 1 going up sequentially. Inside of this atom are three other
+ atoms containing:
+ 1) the name of the preset as a Pascal string
+ 2) a preview picture for the preset, 86 x 64 pixels in size
+ 3) the ENTIRE set of parameter values needed to create a sample of this preset.
+ }
+ kEffectPresetType = $70656666 (* 'peff' *);
+ kPresetNameType = $706E616D (* 'pnam' *);
+ kPresetNameID = 1;
+ kPresetPreviewPictureType = $70706374 (* 'ppct' *);
+ kPresetPreviewPictureID = 1;
+ kPresetSettingsType = $70737374 (* 'psst' *);
+ kPresetSettingsID = 1;
+
+ kParameterDependencyName = $64656570 (* 'deep' *);
+ kParameterDependencyID = 1;
+
+ kParameterListDependsUponColorProfiles = $70726F66 (* 'prof' *);
+ kParameterListDependsUponFonts = $666F6E74 (* 'font' *);
+
+
+type
+ ParameterDependancyRecordPtr = ^ParameterDependancyRecord;
+ ParameterDependancyRecord = record
+ dependCount: SInt32;
+ depends: array [0..0] of OSType;
+ end;
+
+ {
+ enumeration list in container -- placed in root container, optional unless used by a
+ parameter in the list
+ }
+
+const
+ kParameterEnumList = $656E756D (* 'enum' *);
+
+
+type
+ EnumValuePairPtr = ^EnumValuePair;
+ EnumValuePair = record
+ value: SInt32;
+ name: Str255;
+ end;
+
+ EnumListRecordPtr = ^EnumListRecord;
+ EnumListRecord = record
+ enumCount: SInt32; { number of enumeration items to follow }
+ values: array [0..0] of EnumValuePair; { values and names for them, packed }
+ end;
+
+ { atom type of parameter }
+
+const
+ kParameterAtomTypeAndID = $74797065 (* 'type' *);
+
+ kNoAtom = $6E6F6E65 (* 'none' *); { atom type for no data got/set }
+ kAtomNoFlags = $00000000;
+ kAtomNotInterpolated = $00000001; { atom can never be interpolated }
+ kAtomInterpolateIsOptional = $00000002; { atom can be interpolated, but it is an advanced user operation }
+ kAtomMayBeIndexed = $00000004; { more than one value of atom can exist with accending IDs (ie, lists of colors) }
+
+
+type
+ ParameterAtomTypeAndIDPtr = ^ParameterAtomTypeAndID;
+ ParameterAtomTypeAndID = record
+ atomType: QTAtomType; { type of atom this data comes from/goes into }
+ atomID: QTAtomID; { ID of atom this data comes from/goes into }
+ atomFlags: SInt32; { options for this atom }
+ atomName: Str255; { name of this value type }
+ end;
+
+ { data type of a parameter }
+
+const
+ kParameterDataType = $64617461 (* 'data' *);
+
+ kParameterTypeDataLong = 2; { SInt16 value }
+ kParameterTypeDataFixed = 3; { fixed point value }
+ kParameterTypeDataRGBValue = 8; { RGBColor data }
+ kParameterTypeDataDouble = 11; { IEEE 64 bit floating point value }
+ kParameterTypeDataText = $74657874 (* 'text' *); { editable text item }
+ kParameterTypeDataEnum = $656E756D (* 'enum' *); { enumerated lookup value }
+ kParameterTypeDataBitField = $626F6F6C (* 'bool' *); { bit field value (something that holds boolean(s)) }
+ kParameterTypeDataImage = $696D6167 (* 'imag' *); { reference to an image via Picture data }
+
+
+type
+ ParameterDataTypePtr = ^ParameterDataType;
+ ParameterDataType = record
+ dataType: OSType; { type of data this item is stored as }
+ end;
+
+ {
+ alternate (optional) data type -- main data type always required.
+ Must be modified or deleted when modifying main data type.
+ Main data type must be modified when alternate is modified.
+ }
+
+const
+ kParameterAlternateDataType = $616C7431 (* 'alt1' *);
+ kParameterTypeDataColorValue = $636D6C72 (* 'cmlr' *); { CMColor data (supported on machines with ColorSync) }
+ kParameterTypeDataCubic = $63756269 (* 'cubi' *); { cubic bezier(s) (no built-in support) }
+ kParameterTypeDataNURB = $6E757262 (* 'nurb' *); { nurb(s) (no built-in support) }
+
+
+type
+ ParameterAlternateDataEntryPtr = ^ParameterAlternateDataEntry;
+ ParameterAlternateDataEntry = record
+ dataType: OSType; { type of data this item is stored as }
+ alternateAtom: QTAtomType; { where to store }
+ end;
+
+ ParameterAlternateDataTypePtr = ^ParameterAlternateDataType;
+ ParameterAlternateDataType = record
+ numEntries: SInt32;
+ entries: array [0..0] of ParameterAlternateDataEntry;
+ end;
+
+ { legal values for the parameter }
+
+const
+ kParameterDataRange = $72616E67 (* 'rang' *);
+
+ kNoMinimumLongFixed = $7FFFFFFF; { ignore minimum/maxiumum values }
+ kNoMaximumLongFixed = $80000000;
+ kNoScaleLongFixed = 0; { don't perform any scaling of value }
+ kNoPrecision = -1; { allow as many digits as format }
+
+ { 'text' }
+
+type
+ StringRangeRecordPtr = ^StringRangeRecord;
+ StringRangeRecord = record
+ maxChars: SInt32; { maximum length of string }
+ maxLines: SInt32; { number of editing lines to use (1 typical, 0 to default) }
+ end;
+
+ { 'long' }
+ LongRangeRecordPtr = ^LongRangeRecord;
+ LongRangeRecord = record
+ minValue: SInt32; { no less than this }
+ maxValue: SInt32; { no more than this }
+ scaleValue: SInt32; { muliply content by this going in, divide going out }
+ precisionDigits: SInt32; { # digits of precision when editing via typing }
+ end;
+
+ { 'enum' }
+ EnumRangeRecordPtr = ^EnumRangeRecord;
+ EnumRangeRecord = record
+ enumID: SInt32; { 'enum' list in root container to search within }
+ end;
+
+ { 'fixd' }
+ FixedRangeRecordPtr = ^FixedRangeRecord;
+ FixedRangeRecord = record
+ minValue: Fixed; { no less than this }
+ maxValue: Fixed; { no more than this }
+ scaleValue: Fixed; { muliply content by this going in, divide going out }
+ precisionDigits: SInt32; { # digits of precision when editing via typing }
+ end;
+
+ { 'doub' }
+ { 'bool' }
+ BooleanRangeRecordPtr = ^BooleanRangeRecord;
+ BooleanRangeRecord = record
+ maskValue: SInt32; { value to mask on/off to set/clear the boolean }
+ end;
+
+ { 'rgb ' }
+ RGBRangeRecordPtr = ^RGBRangeRecord;
+ RGBRangeRecord = record
+ minColor: RGBColor;
+ maxColor: RGBColor;
+ end;
+
+ { 'imag' }
+
+const
+ kParameterImageNoFlags = 0;
+ kParameterImageIsPreset = 1;
+
+ kStandardPresetGroup = $70736574 (* 'pset' *);
+
+
+type
+ ImageRangeRecordPtr = ^ImageRangeRecord;
+ ImageRangeRecord = record
+ imageFlags: SInt32;
+ fileType: OSType; { file type to contain the preset group (normally kStandardPresetGroup) }
+ replacedAtoms: SInt32; { # atoms at this level replaced by this preset group }
+ end;
+
+ { union of all of the above }
+ { UI behavior of a parameter }
+
+const
+ kParameterDataBehavior = $6469746C (* 'ditl' *);
+
+ { items edited via typing }
+ kParameterItemEditText = $65646974 (* 'edit' *); { edit text box }
+ kParameterItemEditLong = $6C6F6E67 (* 'long' *); { long number editing box }
+ kParameterItemEditFixed = $66697864 (* 'fixd' *); { fixed point number editing box }
+ kParameterItemEditDouble = $646F7562 (* 'doub' *); { double number editing box }
+ { items edited via control(s) }
+ kParameterItemPopUp = $706F7075 (* 'popu' *); { pop up value for enum types }
+ kParameterItemRadioCluster = $72616469 (* 'radi' *); { radio cluster for enum types }
+ kParameterItemCheckBox = $63686578 (* 'chex' *); { check box for booleans }
+ kParameterItemControl = $636E746C (* 'cntl' *); { item controlled via a standard control of some type }
+ { special user items }
+ kParameterItemLine = $6C696E65 (* 'line' *); { line }
+ kParameterItemColorPicker = $7069636B (* 'pick' *); { color swatch & picker }
+ kParameterItemGroupDivider = $64697669 (* 'divi' *); { start of a new group of items }
+ kParameterItemStaticText = $73746174 (* 'stat' *); { display "parameter name" as static text }
+ kParameterItemDragImage = $696D6167 (* 'imag' *); { allow image display, along with drag and drop }
+ { flags valid for lines and groups }
+ kGraphicsNoFlags = $00000000; { no options for graphics }
+ kGraphicsFlagsGray = $00000001; { draw lines with gray }
+ { flags valid for groups }
+ kGroupNoFlags = $00000000; { no options for group -- may be combined with graphics options }
+ kGroupAlignText = $00010000; { edit text items in group have the same size }
+ kGroupSurroundBox = $00020000; { group should be surrounded with a box }
+ kGroupMatrix = $00040000; { side-by-side arrangement of group is okay }
+ kGroupNoName = $00080000; { name of group should not be displayed above box }
+ { flags valid for popup/radiocluster/checkbox/control }
+ kDisableControl = $00000001;
+ kDisableWhenNotEqual = $00000001;
+ kDisableWhenEqual = $00000011;
+ kDisableWhenLessThan = $00000021;
+ kDisableWhenGreaterThan = $00000031; { flags valid for controls }
+ kCustomControl = $00100000; { flags valid for popups }
+ kPopupStoreAsString = $00010000;
+
+
+type
+ ControlBehaviorsPtr = ^ControlBehaviors;
+ ControlBehaviors = record
+ groupID: QTAtomID; { group under control of this item }
+ controlValue: SInt32; { control value for comparison purposes }
+ end;
+
+ ParameterDataBehaviorPtr = ^ParameterDataBehavior;
+ ParameterDataBehavior = record
+ behaviorType: OSType;
+ behaviorFlags: SInt32;
+ case SInt16 of
+ 0: (
+ controls: ControlBehaviors;
+ );
+ end;
+
+ { higher level purpose of a parameter or set of parameters }
+
+const
+ kParameterDataUsage = $75736520 (* 'use ' *);
+
+ kParameterUsagePixels = $7069786C (* 'pixl' *);
+ kParameterUsageRectangle = $72656374 (* 'rect' *);
+ kParameterUsagePoint = $78792020 (* 'xy ' *);
+ kParameterUsage3DPoint = $78797A20 (* 'xyz ' *);
+ kParameterUsageDegrees = $64656772 (* 'degr' *);
+ kParameterUsageRadians = $72616473 (* 'rads' *);
+ kParameterUsagePercent = $70636E74 (* 'pcnt' *);
+ kParameterUsageSeconds = $73656373 (* 'secs' *);
+ kParameterUsageMilliseconds = $6D736563 (* 'msec' *);
+ kParameterUsageMicroseconds = $C2B57365 (* 'µsec' *);
+ kParameterUsage3by3Matrix = $33627933 (* '3by3' *);
+ kParameterUsageCircularDegrees = $64656763 (* 'degc' *);
+ kParameterUsageCircularRadians = $72616463 (* 'radc' *);
+
+
+type
+ ParameterDataUsagePtr = ^ParameterDataUsage;
+ ParameterDataUsage = record
+ usageType: OSType; { higher level purpose of the data or group }
+ end;
+
+ { default value(s) for a parameter }
+
+const
+ kParameterDataDefaultItem = $64666C74 (* 'dflt' *);
+
+ { atoms that help to fill in data within the info window }
+ kParameterInfoLongName = $C2A96E61 (* '©nam' *);
+ kParameterInfoCopyright = $C2A96370 (* '©cpy' *);
+ kParameterInfoDescription = $C2A9696E (* '©inf' *);
+ kParameterInfoWindowTitle = $C2A9776E (* '©wnt' *);
+ kParameterInfoPicture = $C2A97069 (* '©pix' *);
+ kParameterInfoManufacturer = $C2A96D61 (* '©man' *);
+ kParameterInfoIDs = 1;
+
+ { flags for ImageCodecValidateParameters }
+ kParameterValidationNoFlags = $00000000;
+ kParameterValidationFinalValidation = $00000001;
+
+
+type
+ QTParameterValidationOptions = SInt32;
+ { QTAtomTypes for atoms in image compressor settings containers }
+
+const
+ kImageCodecSettingsFieldCount = $6669656C (* 'fiel' *); { Number of fields (UInt8) }
+ kImageCodecSettingsFieldOrdering = $66646F6D (* 'fdom' *); { Ordering of fields (UInt8) }
+ kImageCodecSettingsFieldOrderingF1F2 = 1;
+ kImageCodecSettingsFieldOrderingF2F1 = 2;
+
+
+ { Additional Image Description Extensions }
+ kColorInfoImageDescriptionExtension = $636F6C72 (* 'colr' *); { image description extension describing the color properties }
+ kPixelAspectRatioImageDescriptionExtension = $70617370 (* 'pasp' *); { image description extension describing the pixel aspect ratio }
+ kCleanApertureImageDescriptionExtension = $636C6170 (* 'clap' *); { image description extension describing the pixel aspect ratio }
+
+
+ { Color Info Image Description Extension types }
+ kVideoColorInfoImageDescriptionExtensionType = $6E636C63 (* 'nclc' *); { For video color descriptions (defined below) }
+ kICCProfileColorInfoImageDescriptionExtensionType = $70726F66 (* 'prof' *); { For ICC Profile color descriptions (not defined here) }
+
+
+ { Video Color Info Image Description Extensions }
+
+type
+ NCLCColorInfoImageDescriptionExtensionPtr = ^NCLCColorInfoImageDescriptionExtension;
+ NCLCColorInfoImageDescriptionExtension = record
+ colorParamType: OSType; { Type of color parameter 'nclc' }
+ primaries: UInt16; { CIE 1931 xy chromaticity coordinates }
+ transferFunction: UInt16; { Nonlinear transfer function from RGB to ErEgEb }
+ matrix: UInt16; { Matrix from ErEgEb to EyEcbEcr }
+ end;
+
+ { Primaries }
+
+const
+ kQTPrimaries_ITU_R709_2 = 1; { ITU-R BT.709-2, SMPTE 274M-1995, and SMPTE 296M-1997 }
+ kQTPrimaries_Unknown = 2; { Unknown }
+ kQTPrimaries_EBU_3213 = 5; { EBU Tech. 3213 (1981) }
+ kQTPrimaries_SMPTE_C = 6; { SMPTE C Primaries from SMPTE RP 145-1993 }
+
+ { Transfer Function }
+ kQTTransferFunction_ITU_R709_2 = 1; { Recommendation ITU-R BT.709-2, SMPTE 274M-1995, SMPTE 296M-1997, SMPTE 293M-1996 and SMPTE 170M-1994 }
+ kQTTransferFunction_Unknown = 2; { Unknown }
+ kQTTransferFunction_SMPTE_240M_1995 = 7; { SMPTE 240M-1995 and interim color implementation of SMPTE 274M-1995 }
+
+ { Matrix }
+ kQTMatrix_ITU_R_709_2 = 1; { Recommendation ITU-R BT.709-2 (1125/60/2:1 only), SMPTE 274M-1995 and SMPTE 296M-1997 }
+ kQTMatrix_Unknown = 2; { Unknown }
+ kQTMatrix_ITU_R_601_4 = 6; { Recommendation ITU-R BT.601-4, Recommendation ITU-R BT.470-4 System B and G, SMPTE 170M-1994 and SMPTE 293M-1996 }
+ kQTMatrix_SMPTE_240M_1995 = 7; { SMPTE 240M-1995 and interim color implementation of SMPTE 274M-1995 }
+
+
+ { Field/Frame Info Image Description (this remaps to FieldInfoImageDescriptionExtension) }
+
+type
+ FieldInfoImageDescriptionExtension2Ptr = ^FieldInfoImageDescriptionExtension2;
+ FieldInfoImageDescriptionExtension2 = packed record
+ fields: UInt8;
+ detail: UInt8;
+ end;
+
+
+const
+ kQTFieldsProgressiveScan = 1;
+ kQTFieldsInterlaced = 2;
+
+ kQTFieldDetailUnknown = 0;
+ kQTFieldDetailTemporalTopFirst = 1;
+ kQTFieldDetailTemporalBottomFirst = 6;
+ kQTFieldDetailSpatialFirstLineEarly = 9;
+ kQTFieldDetailSpatialFirstLineLate = 14;
+
+
+ { Pixel Aspect Ratio Image Description Extensions }
+
+type
+ PixelAspectRatioImageDescriptionExtensionPtr = ^PixelAspectRatioImageDescriptionExtension;
+ PixelAspectRatioImageDescriptionExtension = record
+ hSpacing: UInt32; { Horizontal Spacing }
+ vSpacing: UInt32; { Vertical Spacing }
+ end;
+
+ { Clean Aperture Image Description Extensions }
+ CleanApertureImageDescriptionExtensionPtr = ^CleanApertureImageDescriptionExtension;
+ CleanApertureImageDescriptionExtension = record
+ cleanApertureWidthN: UInt32; { width of clean aperture, numerator, denominator }
+ cleanApertureWidthD: UInt32;
+ cleanApertureHeightN: UInt32; { height of clean aperture, numerator, denominator }
+ cleanApertureHeightD: UInt32;
+ horizOffN: UInt32; { horizontal offset of clean aperture center minus (width-1)/2, numerator, denominator }
+ horizOffD: UInt32;
+ vertOffN: UInt32; { vertical offset of clean aperture center minus (height-1)/2, numerator, denominator }
+ vertOffD: UInt32;
+ end;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ ImageCodecMPDrawBandProcPtr = function(refcon: UnivPtr; var drp: ImageSubCodecDecompressRecord): ComponentResult;
+{$elsec}
+ ImageCodecMPDrawBandProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ ImageCodecMPDrawBandUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ ImageCodecMPDrawBandUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppImageCodecMPDrawBandProcInfo = $000003F0;
+ {
+ * NewImageCodecMPDrawBandUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewImageCodecMPDrawBandUPP(userRoutine: ImageCodecMPDrawBandProcPtr): ImageCodecMPDrawBandUPP; external name '_NewImageCodecMPDrawBandUPP'; { old name was NewImageCodecMPDrawBandProc }
+{
+ * DisposeImageCodecMPDrawBandUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeImageCodecMPDrawBandUPP(userUPP: ImageCodecMPDrawBandUPP); external name '_DisposeImageCodecMPDrawBandUPP';
+{
+ * InvokeImageCodecMPDrawBandUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeImageCodecMPDrawBandUPP(refcon: UnivPtr; var drp: ImageSubCodecDecompressRecord; userRoutine: ImageCodecMPDrawBandUPP): ComponentResult; external name '_InvokeImageCodecMPDrawBandUPP'; { old name was CallImageCodecMPDrawBandProc }
+{ codec selectors 0-127 are reserved by Apple }
+{ codec selectors 128-191 are subtype specific }
+{ codec selectors 192-255 are vendor specific }
+{ codec selectors 256-32767 are available for general use }
+{ negative selectors are reserved by the Component Manager }
+{
+ * ImageCodecGetCodecInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecGetCodecInfo(ci: ComponentInstance; var info: CodecInfo): ComponentResult; external name '_ImageCodecGetCodecInfo';
+{
+ * ImageCodecGetCompressionTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecGetCompressionTime(ci: ComponentInstance; src: PixMapHandle; const (*var*) srcRect: Rect; depth: SInt16; var spatialQuality: CodecQ; var temporalQuality: CodecQ; var time: UInt32): ComponentResult; external name '_ImageCodecGetCompressionTime';
+{
+ * ImageCodecGetMaxCompressionSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecGetMaxCompressionSize(ci: ComponentInstance; src: PixMapHandle; const (*var*) srcRect: Rect; depth: SInt16; quality: CodecQ; var size: SInt32): ComponentResult; external name '_ImageCodecGetMaxCompressionSize';
+{
+ * ImageCodecPreCompress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecPreCompress(ci: ComponentInstance; var params: CodecCompressParams): ComponentResult; external name '_ImageCodecPreCompress';
+{
+ * ImageCodecBandCompress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecBandCompress(ci: ComponentInstance; var params: CodecCompressParams): ComponentResult; external name '_ImageCodecBandCompress';
+{
+ * ImageCodecPreDecompress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecPreDecompress(ci: ComponentInstance; var params: CodecDecompressParams): ComponentResult; external name '_ImageCodecPreDecompress';
+{
+ * ImageCodecBandDecompress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecBandDecompress(ci: ComponentInstance; var params: CodecDecompressParams): ComponentResult; external name '_ImageCodecBandDecompress';
+{
+ * ImageCodecBusy()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecBusy(ci: ComponentInstance; seq: ImageSequence): ComponentResult; external name '_ImageCodecBusy';
+{
+ * ImageCodecGetCompressedImageSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecGetCompressedImageSize(ci: ComponentInstance; desc: ImageDescriptionHandle; data: Ptr; bufferSize: SInt32; dataProc: ICMDataProcRecordPtr; var dataSize: SInt32): ComponentResult; external name '_ImageCodecGetCompressedImageSize';
+{
+ * ImageCodecGetSimilarity()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecGetSimilarity(ci: ComponentInstance; src: PixMapHandle; const (*var*) srcRect: Rect; desc: ImageDescriptionHandle; data: Ptr; var similarity: Fixed): ComponentResult; external name '_ImageCodecGetSimilarity';
+{
+ * ImageCodecTrimImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecTrimImage(ci: ComponentInstance; Desc: ImageDescriptionHandle; inData: Ptr; inBufferSize: SInt32; dataProc: ICMDataProcRecordPtr; outData: Ptr; outBufferSize: SInt32; flushProc: ICMFlushProcRecordPtr; var trimRect: Rect; progressProc: ICMProgressProcRecordPtr): ComponentResult; external name '_ImageCodecTrimImage';
+{
+ * ImageCodecRequestSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecRequestSettings(ci: ComponentInstance; settings: Handle; var rp: Rect; filterProc: ModalFilterUPP): ComponentResult; external name '_ImageCodecRequestSettings';
+{
+ * ImageCodecGetSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecGetSettings(ci: ComponentInstance; settings: Handle): ComponentResult; external name '_ImageCodecGetSettings';
+{
+ * ImageCodecSetSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecSetSettings(ci: ComponentInstance; settings: Handle): ComponentResult; external name '_ImageCodecSetSettings';
+{
+ * ImageCodecFlush()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecFlush(ci: ComponentInstance): ComponentResult; external name '_ImageCodecFlush';
+{
+ * ImageCodecSetTimeCode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecSetTimeCode(ci: ComponentInstance; timeCodeFormat: UnivPtr; timeCodeTime: UnivPtr): ComponentResult; external name '_ImageCodecSetTimeCode';
+{
+ * ImageCodecIsImageDescriptionEquivalent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecIsImageDescriptionEquivalent(ci: ComponentInstance; newDesc: ImageDescriptionHandle; var equivalent: boolean): ComponentResult; external name '_ImageCodecIsImageDescriptionEquivalent';
+{
+ * ImageCodecNewMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecNewMemory(ci: ComponentInstance; var data: Ptr; dataSize: Size; dataUse: SInt32; memoryGoneProc: ICMMemoryDisposedUPP; refCon: UnivPtr): ComponentResult; external name '_ImageCodecNewMemory';
+{
+ * ImageCodecDisposeMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecDisposeMemory(ci: ComponentInstance; data: Ptr): ComponentResult; external name '_ImageCodecDisposeMemory';
+{
+ * ImageCodecHitTestData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecHitTestData(ci: ComponentInstance; desc: ImageDescriptionHandle; data: UnivPtr; dataSize: Size; where: Point; var hit: boolean): ComponentResult; external name '_ImageCodecHitTestData';
+{
+ * ImageCodecNewImageBufferMemory()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecNewImageBufferMemory(ci: ComponentInstance; var params: CodecDecompressParams; flags: SInt32; memoryGoneProc: ICMMemoryDisposedUPP; refCon: UnivPtr): ComponentResult; external name '_ImageCodecNewImageBufferMemory';
+{
+ * ImageCodecExtractAndCombineFields()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecExtractAndCombineFields(ci: ComponentInstance; fieldFlags: SInt32; data1: UnivPtr; dataSize1: SInt32; desc1: ImageDescriptionHandle; data2: UnivPtr; dataSize2: SInt32; desc2: ImageDescriptionHandle; outputData: UnivPtr; var outDataSize: SInt32; descOut: ImageDescriptionHandle): ComponentResult; external name '_ImageCodecExtractAndCombineFields';
+{
+ * ImageCodecGetMaxCompressionSizeWithSources()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecGetMaxCompressionSizeWithSources(ci: ComponentInstance; src: PixMapHandle; const (*var*) srcRect: Rect; depth: SInt16; quality: CodecQ; sourceData: CDSequenceDataSourcePtr; var size: SInt32): ComponentResult; external name '_ImageCodecGetMaxCompressionSizeWithSources';
+{
+ * ImageCodecSetTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecSetTimeBase(ci: ComponentInstance; base: UnivPtr): ComponentResult; external name '_ImageCodecSetTimeBase';
+{
+ * ImageCodecSourceChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecSourceChanged(ci: ComponentInstance; majorSourceChangeSeed: UInt32; minorSourceChangeSeed: UInt32; sourceData: CDSequenceDataSourcePtr; var flagsOut: SInt32): ComponentResult; external name '_ImageCodecSourceChanged';
+{
+ * ImageCodecFlushFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecFlushFrame(ci: ComponentInstance; flags: UInt32): ComponentResult; external name '_ImageCodecFlushFrame';
+{
+ * ImageCodecGetSettingsAsText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecGetSettingsAsText(ci: ComponentInstance; var text: Handle): ComponentResult; external name '_ImageCodecGetSettingsAsText';
+{
+ * ImageCodecGetParameterListHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecGetParameterListHandle(ci: ComponentInstance; var parameterDescriptionHandle: Handle): ComponentResult; external name '_ImageCodecGetParameterListHandle';
+{
+ * ImageCodecGetParameterList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecGetParameterList(ci: ComponentInstance; var parameterDescription: QTAtomContainer): ComponentResult; external name '_ImageCodecGetParameterList';
+{
+ * ImageCodecCreateStandardParameterDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecCreateStandardParameterDialog(ci: ComponentInstance; parameterDescription: QTAtomContainer; parameters: QTAtomContainer; dialogOptions: QTParameterDialogOptions; existingDialog: DialogPtr; existingUserItem: SInt16; var createdDialog: QTParameterDialog): ComponentResult; external name '_ImageCodecCreateStandardParameterDialog';
+{
+ * ImageCodecIsStandardParameterDialogEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecIsStandardParameterDialogEvent(ci: ComponentInstance; var pEvent: EventRecord; createdDialog: QTParameterDialog): ComponentResult; external name '_ImageCodecIsStandardParameterDialogEvent';
+{
+ * ImageCodecDismissStandardParameterDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecDismissStandardParameterDialog(ci: ComponentInstance; createdDialog: QTParameterDialog): ComponentResult; external name '_ImageCodecDismissStandardParameterDialog';
+{
+ * ImageCodecStandardParameterDialogDoAction()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecStandardParameterDialogDoAction(ci: ComponentInstance; createdDialog: QTParameterDialog; action: SInt32; params: UnivPtr): ComponentResult; external name '_ImageCodecStandardParameterDialogDoAction';
+{
+ * ImageCodecNewImageGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecNewImageGWorld(ci: ComponentInstance; var params: CodecDecompressParams; var newGW: GWorldPtr; flags: SInt32): ComponentResult; external name '_ImageCodecNewImageGWorld';
+{
+ * ImageCodecDisposeImageGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecDisposeImageGWorld(ci: ComponentInstance; theGW: GWorldPtr): ComponentResult; external name '_ImageCodecDisposeImageGWorld';
+{
+ * ImageCodecHitTestDataWithFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecHitTestDataWithFlags(ci: ComponentInstance; desc: ImageDescriptionHandle; data: UnivPtr; dataSize: Size; where: Point; var hit: SInt32; hitFlags: SInt32): ComponentResult; external name '_ImageCodecHitTestDataWithFlags';
+{
+ * ImageCodecValidateParameters()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecValidateParameters(ci: ComponentInstance; parameters: QTAtomContainer; validationFlags: QTParameterValidationOptions; errorString: StringPtr): ComponentResult; external name '_ImageCodecValidateParameters';
+{
+ * ImageCodecGetBaseMPWorkFunction()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecGetBaseMPWorkFunction(ci: ComponentInstance; var workFunction: ComponentMPWorkFunctionUPP; var refCon: UnivPtr; drawProc: ImageCodecMPDrawBandUPP; drawProcRefCon: UnivPtr): ComponentResult; external name '_ImageCodecGetBaseMPWorkFunction';
+{
+ * ImageCodecRequestGammaLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function ImageCodecRequestGammaLevel(ci: ComponentInstance; srcGammaLevel: Fixed; dstGammaLevel: Fixed; var codecCanMatch: SInt32): ComponentResult; external name '_ImageCodecRequestGammaLevel';
+{
+ * ImageCodecGetSourceDataGammaLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function ImageCodecGetSourceDataGammaLevel(ci: ComponentInstance; var sourceDataGammaLevel: Fixed): ComponentResult; external name '_ImageCodecGetSourceDataGammaLevel';
+{
+ * ImageCodecGetDecompressLatency()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function ImageCodecGetDecompressLatency(ci: ComponentInstance; var latency: TimeRecord): ComponentResult; external name '_ImageCodecGetDecompressLatency';
+{
+ * ImageCodecMergeFloatingImageOntoWindow()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function ImageCodecMergeFloatingImageOntoWindow(ci: ComponentInstance; flags: UInt32): ComponentResult; external name '_ImageCodecMergeFloatingImageOntoWindow';
+{
+ * ImageCodecRemoveFloatingImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function ImageCodecRemoveFloatingImage(ci: ComponentInstance; flags: UInt32): ComponentResult; external name '_ImageCodecRemoveFloatingImage';
+{
+ * ImageCodecGetDITLForSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function ImageCodecGetDITLForSize(ci: ComponentInstance; var ditl: Handle; var requestedSize: Point): ComponentResult; external name '_ImageCodecGetDITLForSize';
+{
+ * ImageCodecDITLInstall()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function ImageCodecDITLInstall(ci: ComponentInstance; d: DialogRef; itemOffset: SInt16): ComponentResult; external name '_ImageCodecDITLInstall';
+{
+ * ImageCodecDITLEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function ImageCodecDITLEvent(ci: ComponentInstance; d: DialogRef; itemOffset: SInt16; const (*var*) theEvent: EventRecord; var itemHit: SInt16; var handled: boolean): ComponentResult; external name '_ImageCodecDITLEvent';
+{
+ * ImageCodecDITLItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function ImageCodecDITLItem(ci: ComponentInstance; d: DialogRef; itemOffset: SInt16; itemNum: SInt16): ComponentResult; external name '_ImageCodecDITLItem';
+{
+ * ImageCodecDITLRemove()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function ImageCodecDITLRemove(ci: ComponentInstance; d: DialogRef; itemOffset: SInt16): ComponentResult; external name '_ImageCodecDITLRemove';
+{
+ * ImageCodecDITLValidateInput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function ImageCodecDITLValidateInput(ci: ComponentInstance; var ok: boolean): ComponentResult; external name '_ImageCodecDITLValidateInput';
+{
+ * ImageCodecPreflight()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecPreflight(ci: ComponentInstance; var params: CodecDecompressParams): ComponentResult; external name '_ImageCodecPreflight';
+{
+ * ImageCodecInitialize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecInitialize(ci: ComponentInstance; var cap: ImageSubCodecDecompressCapabilities): ComponentResult; external name '_ImageCodecInitialize';
+{
+ * ImageCodecBeginBand()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecBeginBand(ci: ComponentInstance; var params: CodecDecompressParams; var drp: ImageSubCodecDecompressRecord; flags: SInt32): ComponentResult; external name '_ImageCodecBeginBand';
+{
+ * ImageCodecDrawBand()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecDrawBand(ci: ComponentInstance; var drp: ImageSubCodecDecompressRecord): ComponentResult; external name '_ImageCodecDrawBand';
+{
+ * ImageCodecEndBand()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecEndBand(ci: ComponentInstance; var drp: ImageSubCodecDecompressRecord; result: OSErr; flags: SInt32): ComponentResult; external name '_ImageCodecEndBand';
+{
+ * ImageCodecQueueStarting()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecQueueStarting(ci: ComponentInstance): ComponentResult; external name '_ImageCodecQueueStarting';
+{
+ * ImageCodecQueueStopping()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecQueueStopping(ci: ComponentInstance): ComponentResult; external name '_ImageCodecQueueStopping';
+{
+ * ImageCodecDroppingFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecDroppingFrame(ci: ComponentInstance; const (*var*) drp: ImageSubCodecDecompressRecord): ComponentResult; external name '_ImageCodecDroppingFrame';
+{
+ * ImageCodecScheduleFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function ImageCodecScheduleFrame(ci: ComponentInstance; const (*var*) drp: ImageSubCodecDecompressRecord; triggerProc: ImageCodecTimeTriggerUPP; triggerProcRefCon: UnivPtr): ComponentResult; external name '_ImageCodecScheduleFrame';
+{
+ * ImageCodecCancelTrigger()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function ImageCodecCancelTrigger(ci: ComponentInstance): ComponentResult; external name '_ImageCodecCancelTrigger';
+const
+ kMotionJPEGTag = $6D6A7067 (* 'mjpg' *);
+ kJPEGQuantizationTablesImageDescriptionExtension = $6D6A7174 (* 'mjqt' *);
+ kJPEGHuffmanTablesImageDescriptionExtension = $6D6A6874 (* 'mjht' *);
+ kFieldInfoImageDescriptionExtension = $6669656C (* 'fiel' *); { image description extension describing the field count and field orderings }
+
+ kFieldOrderUnknown = 0;
+ kFieldsStoredF1F2DisplayedF1F2 = 1;
+ kFieldsStoredF1F2DisplayedF2F1 = 2;
+ kFieldsStoredF2F1DisplayedF1F2 = 5;
+ kFieldsStoredF2F1DisplayedF2F1 = 6;
+
+
+type
+ MotionJPEGApp1MarkerPtr = ^MotionJPEGApp1Marker;
+ MotionJPEGApp1Marker = record
+ unused: SInt32;
+ tag: SInt32;
+ fieldSize: SInt32;
+ paddedFieldSize: SInt32;
+ offsetToNextField: SInt32;
+ qTableOffset: SInt32;
+ huffmanTableOffset: SInt32;
+ sofOffset: SInt32;
+ sosOffset: SInt32;
+ soiOffset: SInt32;
+ end;
+
+ FieldInfoImageDescriptionExtensionPtr = ^FieldInfoImageDescriptionExtension;
+ FieldInfoImageDescriptionExtension = packed record
+ fieldCount: UInt8;
+ fieldOrderings: UInt8;
+ end;
+
+
+ {
+ * QTPhotoSetSampling()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTPhotoSetSampling(codec: ComponentInstance; yH: SInt16; yV: SInt16; cbH: SInt16; cbV: SInt16; crH: SInt16; crV: SInt16): ComponentResult; external name '_QTPhotoSetSampling';
+{
+ * QTPhotoSetRestartInterval()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTPhotoSetRestartInterval(codec: ComponentInstance; restartInterval: UInt16): ComponentResult; external name '_QTPhotoSetRestartInterval';
+{
+ * QTPhotoDefineHuffmanTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTPhotoDefineHuffmanTable(codec: ComponentInstance; componentNumber: SInt16; isDC: boolean; lengthCounts: UInt8Ptr; values: UInt8Ptr): ComponentResult; external name '_QTPhotoDefineHuffmanTable';
+{
+ * QTPhotoDefineQuantizationTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTPhotoDefineQuantizationTable(codec: ComponentInstance; componentNumber: SInt16; table: UInt8Ptr): ComponentResult; external name '_QTPhotoDefineQuantizationTable';
+{ source identifier -- placed in root container of description, one or more required }
+
+const
+ kEffectSourceName = $73726320 (* 'src ' *);
+
+
+ { source type -- placed in the input map to identify the source kind }
+ kEffectDataSourceType = $64747374 (* 'dtst' *);
+
+ { default effect types }
+ kEffectRawSource = 0; { the source is raw image data }
+ kEffectGenericType = $67656666 (* 'geff' *); { generic effect for combining others }
+
+
+type
+ EffectSourcePtr = ^EffectSource;
+ SourceDataPtr = ^SourceData;
+ SourceData = record
+ case SInt16 of
+ 0: (
+ image: CDSequenceDataSourcePtr;
+ );
+ 1: (
+ effect: EffectSourcePtr;
+ );
+ end;
+
+
+ EffectSource = record
+ effectType: SInt32; { type of effect or kEffectRawSource if raw ICM data }
+ data: Ptr; { track data for this effect }
+ source: SourceData; { source/effect pointers }
+ next: EffectSourcePtr; { the next source for the parent effect }
+ { fields added for QuickTime 4.0 }
+ lastTranslatedFrameTime: TimeValue; { start frame time of last converted frame, may be -1 }
+ lastFrameDuration: TimeValue; { duration of the last converted frame, may be zero }
+ lastFrameTimeScale: TimeValue; { time scale of this source frame, only has meaning if above fields are valid }
+ end;
+
+ EffectsFrameParamsPtr = ^EffectsFrameParams;
+ EffectsFrameParams = record
+ frameTime: ICMFrameTimeRecord; { timing data }
+ effectDuration: SInt32; { the duration of a single effect frame }
+ doAsync: boolean; { set to true if the effect can go async }
+ pad1,pad2,pad3: SInt8;
+ source: EffectSourcePtr; { ptr to the source input tree }
+ refCon: Ptr; { storage for the effect }
+ end;
+
+
+ {
+ * ImageCodecEffectSetup()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecEffectSetup(effect: ComponentInstance; var p: CodecDecompressParams): ComponentResult; external name '_ImageCodecEffectSetup';
+{
+ * ImageCodecEffectBegin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecEffectBegin(effect: ComponentInstance; var p: CodecDecompressParams; ePtr: EffectsFrameParamsPtr): ComponentResult; external name '_ImageCodecEffectBegin';
+{
+ * ImageCodecEffectRenderFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecEffectRenderFrame(effect: ComponentInstance; p: EffectsFrameParamsPtr): ComponentResult; external name '_ImageCodecEffectRenderFrame';
+{
+ * ImageCodecEffectConvertEffectSourceToFormat()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecEffectConvertEffectSourceToFormat(effect: ComponentInstance; sourceToConvert: EffectSourcePtr; requestedDesc: ImageDescriptionHandle): ComponentResult; external name '_ImageCodecEffectConvertEffectSourceToFormat';
+{
+ * ImageCodecEffectCancel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecEffectCancel(effect: ComponentInstance; p: EffectsFrameParamsPtr): ComponentResult; external name '_ImageCodecEffectCancel';
+{
+ * ImageCodecEffectGetSpeed()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ImageCodecEffectGetSpeed(effect: ComponentInstance; parameters: QTAtomContainer; var pFPS: Fixed): ComponentResult; external name '_ImageCodecEffectGetSpeed';
+const
+ kSMPTENoFlag = 0;
+ kSMPTESmoothEdgeFlag = $01; { smooth edges of the stroke }
+ kSMPTEStrokeEdgeFlag = $02; { stroke edge with color }
+
+
+type
+ SMPTEFlags = SInt32;
+ SMPTEFrameReference = SInt32;
+
+const
+ kSlideHorizontalWipe = 1;
+ kSlideVerticalWipe = 2;
+ kTopLeftWipe = 3;
+ kTopRightWipe = 4;
+ kBottomRightWipe = 5;
+ kBottomLeftWipe = 6;
+ kFourCornerWipe = 7;
+ kFourBoxWipe = 8;
+ kBarnVerticalWipe = 21;
+ kBarnHorizontalWipe = 22;
+ kTopCenterWipe = 23;
+ kRightCenterWipe = 24;
+ kBottomCenterWipe = 25;
+ kLeftCenterWipe = 26;
+ kDiagonalLeftDownWipe = 41;
+ kDiagonalRightDownWipe = 42;
+ kTopBottomBowTieWipe = 43;
+ kLeftRightBowTieWipe = 44;
+ kDiagonalLeftOutWipe = 45;
+ kDiagonalRightOutWipe = 46;
+ kDiagonalCrossWipe = 47;
+ kDiagonalBoxWipe = 48;
+ kFilledVWipe = 61;
+ kFilledVRightWipe = 62;
+ kFilledVBottomWipe = 63;
+ kFilledVLeftWipe = 64;
+ kHollowVWipe = 65;
+ kHollowVRightWipe = 66;
+ kHollowVBottomWipe = 67;
+ kHollowVLeftWipe = 68;
+ kVerticalZigZagWipe = 71;
+ kHorizontalZigZagWipe = 72;
+ kVerticalBarnZigZagWipe = 73;
+ kHorizontalBarnZigZagWipe = 74;
+
+ kRectangleWipe = 101;
+ kDiamondWipe = 102;
+ kTriangleWipe = 103;
+ kTriangleRightWipe = 104;
+ kTriangleUpsideDownWipe = 105;
+ kTriangleLeftWipe = 106;
+ kSpaceShipWipe = 107;
+ kSpaceShipRightWipe = 108;
+ kSpaceShipUpsideDownWipe = 109;
+ kSpaceShipLeftWipe = 110;
+ kPentagonWipe = 111;
+ kPentagonUpsideDownWipe = 112;
+ kHexagonWipe = 113;
+ kHexagonSideWipe = 114;
+ kCircleWipe = 119;
+ kOvalWipe = 120;
+ kOvalSideWipe = 121;
+ kCatEyeWipe = 122;
+ kCatEyeSideWipe = 123;
+ kRoundRectWipe = 124;
+ kRoundRectSideWipe = 125;
+ kFourPointStarWipe = 127;
+ kFivePointStarWipe = 128;
+ kStarOfDavidWipe = 129;
+ kHeartWipe = 130;
+ kKeyholeWipe = 131;
+
+ kRotatingTopWipe = 201;
+ kRotatingRightWipe = 202;
+ kRotatingBottomWipe = 203;
+ kRotatingLeftWipe = 204;
+ kRotatingTopBottomWipe = 205;
+ kRotatingLeftRightWipe = 206;
+ kRotatingQuadrantWipe = 207;
+ kTopToBottom180Wipe = 211;
+ kRightToLeft180Wipe = 212;
+ kTopToBottom90Wipe = 213;
+ kRightToLeft90Wipe = 214;
+ kTop180Wipe = 221;
+ kRight180Wipe = 222;
+ kBottom180Wipe = 223;
+ kLeft180Wipe = 224;
+ kCounterRotatingTopBottomWipe = 225;
+ kCounterRotatingLeftRightWipe = 226;
+ kDoubleRotatingTopBottomWipe = 227;
+ kDoubleRotatingLeftRightWipe = 228;
+ kVOpenTopWipe = 231;
+ kVOpenRightWipe = 232;
+ kVOpenBottomWipe = 233;
+ kVOpenLeftWipe = 234;
+ kVOpenTopBottomWipe = 235;
+ kVOpenLeftRightWipe = 236;
+ kRotatingTopLeftWipe = 241;
+ kRotatingBottomLeftWipe = 242;
+ kRotatingBottomRightWipe = 243;
+ kRotatingTopRightWipe = 244;
+ kRotatingTopLeftBottomRightWipe = 245;
+ kRotatingBottomLeftTopRightWipe = 246;
+ kRotatingTopLeftRightWipe = 251;
+ kRotatingLeftTopBottomWipe = 252;
+ kRotatingBottomLeftRightWipe = 253;
+ kRotatingRightTopBottomWipe = 254;
+ kRotatingDoubleCenterRightWipe = 261;
+ kRotatingDoubleCenterTopWipe = 262;
+ kRotatingDoubleCenterTopBottomWipe = 263;
+ kRotatingDoubleCenterLeftRightWipe = 264;
+
+ kHorizontalMatrixWipe = 301;
+ kVerticalMatrixWipe = 302;
+ kTopLeftDiagonalMatrixWipe = 303;
+ kTopRightDiagonalMatrixWipe = 304;
+ kBottomRightDiagonalMatrixWipe = 305;
+ kBottomLeftDiagonalMatrixWipe = 306;
+ kClockwiseTopLeftMatrixWipe = 310;
+ kClockwiseTopRightMatrixWipe = 311;
+ kClockwiseBottomRightMatrixWipe = 312;
+ kClockwiseBottomLeftMatrixWipe = 313;
+ kCounterClockwiseTopLeftMatrixWipe = 314;
+ kCounterClockwiseTopRightMatrixWipe = 315;
+ kCounterClockwiseBottomRightMatrixWipe = 316;
+ kCounterClockwiseBottomLeftMatrixWipe = 317;
+ kVerticalStartTopMatrixWipe = 320;
+ kVerticalStartBottomMatrixWipe = 321;
+ kVerticalStartTopOppositeMatrixWipe = 322;
+ kVerticalStartBottomOppositeMatrixWipe = 323;
+ kHorizontalStartLeftMatrixWipe = 324;
+ kHorizontalStartRightMatrixWipe = 325;
+ kHorizontalStartLeftOppositeMatrixWipe = 326;
+ kHorizontalStartRightOppositeMatrixWipe = 327;
+ kDoubleDiagonalTopRightMatrixWipe = 328;
+ kDoubleDiagonalBottomRightMatrixWipe = 329;
+ kDoubleSpiralTopMatixWipe = 340;
+ kDoubleSpiralBottomMatixWipe = 341;
+ kDoubleSpiralLeftMatixWipe = 342;
+ kDoubleSpiralRightMatixWipe = 343;
+ kQuadSpiralVerticalMatixWipe = 344;
+ kQuadSpiralHorizontalMatixWipe = 345;
+ kVerticalWaterfallLeftMatrixWipe = 350;
+ kVerticalWaterfallRightMatrixWipe = 351;
+ kHorizontalWaterfallLeftMatrixWipe = 352;
+ kHorizontalWaterfallRightMatrixWipe = 353;
+ kRandomWipe = 409; { non-SMPTE standard numbers }
+ kRandomWipeGroupWipe = 501;
+ kRandomIrisGroupWipe = 502;
+ kRandomRadialGroupWipe = 503;
+ kRandomMatrixGroupWipe = 504;
+
+
+type
+ SMPTEWipeType = UInt32;
+ {
+ * ImageCodecEffectPrepareSMPTEFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function ImageCodecEffectPrepareSMPTEFrame(effect: ComponentInstance; destPixMap: PixMapPtr; var returnValue: SMPTEFrameReference): ComponentResult; external name '_ImageCodecEffectPrepareSMPTEFrame';
+{
+ * ImageCodecEffectDisposeSMPTEFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function ImageCodecEffectDisposeSMPTEFrame(effect: ComponentInstance; frameRef: SMPTEFrameReference): ComponentResult; external name '_ImageCodecEffectDisposeSMPTEFrame';
+{
+ * ImageCodecEffectRenderSMPTEFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function ImageCodecEffectRenderSMPTEFrame(effect: ComponentInstance; destPixMap: PixMapPtr; frameRef: SMPTEFrameReference; effectPercentageEven: Fixed; effectPercentageOdd: Fixed; var pSourceRect: Rect; var pMatrix: MatrixRecord; effectNumber: SMPTEWipeType; xRepeat: SInt32; yRepeat: SInt32; flags: SMPTEFlags; penWidth: Fixed; strokeValue: SInt32): ComponentResult; external name '_ImageCodecEffectRenderSMPTEFrame';
+{ curve atom types and data structures }
+
+const
+ kCurvePathAtom = $70617468 (* 'path' *);
+ kCurveEndAtom = $7A65726F (* 'zero' *);
+ kCurveAntialiasControlAtom = $616E7469 (* 'anti' *);
+ kCurveAntialiasOff = 0;
+ kCurveAntialiasOn = $FFFFFFFF;
+ kCurveFillTypeAtom = $66696C6C (* 'fill' *);
+ kCurvePenThicknessAtom = $70656E74 (* 'pent' *);
+ kCurveMiterLimitAtom = $6D697472 (* 'mitr' *);
+ kCurveJoinAttributesAtom = $6A6F696E (* 'join' *);
+ kCurveMinimumDepthAtom = $6D696E64 (* 'mind' *);
+ kCurveDepthAlwaysOffscreenMask = $80000000;
+ kCurveTransferModeAtom = $78666572 (* 'xfer' *);
+ kCurveGradientAngleAtom = $616E676C (* 'angl' *);
+ kCurveGradientRadiusAtom = $72616469 (* 'radi' *);
+ kCurveGradientOffsetAtom = $63656E74 (* 'cent' *);
+
+ kCurveARGBColorAtom = $61726762 (* 'argb' *);
+
+
+type
+ ARGBColorPtr = ^ARGBColor;
+ ARGBColor = record
+ alpha: UInt16;
+ red: UInt16;
+ green: UInt16;
+ blue: UInt16;
+ end;
+
+
+const
+ kCurveGradientRecordAtom = $67726164 (* 'grad' *);
+
+
+type
+ GradientColorRecordPtr = ^GradientColorRecord;
+ GradientColorRecord = record
+ thisColor: ARGBColor;
+ endingPercentage: Fixed;
+ end;
+
+ GradientColorPtr = ^GradientColorRecord;
+
+const
+ kCurveGradientTypeAtom = $67726474 (* 'grdt' *);
+
+ { currently supported gradient types }
+ kLinearGradient = 0;
+ kCircularGradient = 1;
+
+
+type
+ GradientType = SInt32;
+ {
+ * CurveGetLength()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CurveGetLength(effect: ComponentInstance; var target: gxPaths; index: SInt32; var wideLength: wide): ComponentResult; external name '_CurveGetLength';
+{
+ * CurveLengthToPoint()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CurveLengthToPoint(effect: ComponentInstance; var target: gxPaths; index: SInt32; length: Fixed; var location: FixedPoint; var tangent: FixedPoint): ComponentResult; external name '_CurveLengthToPoint';
+{
+ * CurveNewPath()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CurveNewPath(effect: ComponentInstance; var pPath: Handle): ComponentResult; external name '_CurveNewPath';
+{
+ * CurveCountPointsInPath()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CurveCountPointsInPath(effect: ComponentInstance; var aPath: gxPaths; contourIndex: UInt32; var pCount: UInt32): ComponentResult; external name '_CurveCountPointsInPath';
+{
+ * CurveGetPathPoint()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CurveGetPathPoint(effect: ComponentInstance; var aPath: gxPaths; contourIndex: UInt32; pointIndex: UInt32; var thePoint: gxPoint; var ptIsOnPath: boolean): ComponentResult; external name '_CurveGetPathPoint';
+{
+ * CurveInsertPointIntoPath()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CurveInsertPointIntoPath(effect: ComponentInstance; var aPoint: gxPoint; thePath: Handle; contourIndex: UInt32; pointIndex: UInt32; ptIsOnPath: boolean): ComponentResult; external name '_CurveInsertPointIntoPath';
+{
+ * CurveSetPathPoint()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CurveSetPathPoint(effect: ComponentInstance; var aPath: gxPaths; contourIndex: UInt32; pointIndex: UInt32; var thePoint: gxPoint; ptIsOnPath: boolean): ComponentResult; external name '_CurveSetPathPoint';
+{
+ * CurveGetNearestPathPoint()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CurveGetNearestPathPoint(effect: ComponentInstance; var aPath: gxPaths; var thePoint: FixedPoint; var contourIndex: UInt32; var pointIndex: UInt32; var theDelta: Fixed): ComponentResult; external name '_CurveGetNearestPathPoint';
+{
+ * CurvePathPointToLength()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CurvePathPointToLength(ci: ComponentInstance; var aPath: gxPaths; startDist: Fixed; endDist: Fixed; var thePoint: FixedPoint; var pLength: Fixed): ComponentResult; external name '_CurvePathPointToLength';
+{
+ * CurveCreateVectorStream()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CurveCreateVectorStream(effect: ComponentInstance; var pStream: Handle): ComponentResult; external name '_CurveCreateVectorStream';
+{
+ * CurveAddAtomToVectorStream()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CurveAddAtomToVectorStream(effect: ComponentInstance; atomType: OSType; atomSize: Size; pAtomData: UnivPtr; vectorStream: Handle): ComponentResult; external name '_CurveAddAtomToVectorStream';
+{
+ * CurveAddPathAtomToVectorStream()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CurveAddPathAtomToVectorStream(effect: ComponentInstance; pathData: Handle; vectorStream: Handle): ComponentResult; external name '_CurveAddPathAtomToVectorStream';
+{
+ * CurveAddZeroAtomToVectorStream()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CurveAddZeroAtomToVectorStream(effect: ComponentInstance; vectorStream: Handle): ComponentResult; external name '_CurveAddZeroAtomToVectorStream';
+{
+ * CurveGetAtomDataFromVectorStream()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function CurveGetAtomDataFromVectorStream(effect: ComponentInstance; vectorStream: Handle; atomType: SInt32; var dataSize: SInt32; var dataPtr: Ptr): ComponentResult; external name '_CurveGetAtomDataFromVectorStream';
+{ UPP call backs }
+{$ALIGN MAC68K}
+
+
+{unit MediaHandlers}
+{
+ File: MediaHandlers.p
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1990-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ PrePrerollCompleteProcPtr = procedure(mh: MediaHandler; err: OSErr; refcon: UnivPtr);
+{$elsec}
+ PrePrerollCompleteProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ PrePrerollCompleteUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ PrePrerollCompleteUPP = UniversalProcPtr;
+{$endc}
+
+const
+ handlerHasSpatial = $01;
+ handlerCanClip = $02;
+ handlerCanMatte = $04;
+ handlerCanTransferMode = $08;
+ handlerNeedsBuffer = $10;
+ handlerNoIdle = $20;
+ handlerNoScheduler = $40;
+ handlerWantsTime = $80;
+ handlerCGrafPortOnly = $0100;
+ handlerCanSend = $0200;
+ handlerCanHandleComplexMatrix = $0400;
+ handlerWantsDestinationPixels = $0800;
+ handlerCanSendImageData = $1000;
+ handlerCanPicSave = $2000;
+
+ { media task flags }
+ mMustDraw = $08;
+ mAtEnd = $10;
+ mPreflightDraw = $20;
+ mSyncDrawing = $40;
+ mPrecompositeOnly = $0200;
+ mSoundOnly = $0400;
+ mDoIdleActionsBeforeDraws = $0800;
+ mDisableIdleActions = $1000;
+
+ { media task result flags }
+ mDidDraw = $01;
+ mNeedsToDraw = $04;
+ mDrawAgain = $08;
+ mPartialDraw = $10;
+ mWantIdleActions = $20;
+
+ forceUpdateRedraw = $01;
+ forceUpdateNewBuffer = $02;
+
+ { media hit test flags }
+ mHitTestBounds = $00000001; { point must only be within targetRefCon's bounding box }
+ mHitTestImage = $00000002; { point must be within the shape of the targetRefCon's image }
+ mHitTestInvisible = $00000004; { invisible targetRefCon's may be hit tested }
+ mHitTestIsClick = $00000008; { for codecs that want mouse events }
+
+ { media is opaque flags }
+ mOpaque = $00000001;
+ mInvisible = $00000002;
+
+ { MediaSetPublicInfo/MediaGetPublicInfo selectors }
+ kMediaQTIdleFrequencySelector = $69646671 (* 'idfq' *);
+
+
+type
+ GetMovieCompleteParamsPtr = ^GetMovieCompleteParams;
+ GetMovieCompleteParams = record
+ version: SInt16;
+ theMovie: Movie;
+ theTrack: Track;
+ theMedia: Media;
+ movieScale: TimeScale;
+ mediaScale: TimeScale;
+ movieDuration: TimeValue;
+ trackDuration: TimeValue;
+ mediaDuration: TimeValue;
+ effectiveRate: Fixed;
+ timeBase: TimeBase_fix;
+ volume: SInt16;
+ width: Fixed;
+ height: Fixed;
+ trackMovieMatrix: MatrixRecord;
+ moviePort: CGrafPtr;
+ movieGD: GDHandle;
+ trackMatte: PixMapHandle;
+ inputMap: QTAtomContainer;
+ mediaContextID: QTMediaContextID;
+ end;
+
+
+const
+ kMediaVideoParamBrightness = 1;
+ kMediaVideoParamContrast = 2;
+ kMediaVideoParamHue = 3;
+ kMediaVideoParamSharpness = 4;
+ kMediaVideoParamSaturation = 5;
+ kMediaVideoParamBlackLevel = 6;
+ kMediaVideoParamWhiteLevel = 7;
+
+ { These are for MediaGetInfo() and MediaSetInfo(). }
+ kMHInfoEncodedFrameRate = $6F726174 (* 'orat' *); { Parameter is a MHInfoEncodedFrameRateRecord*. }
+
+ { This holds the frame rate at which the track was encoded. }
+
+type
+ MHInfoEncodedFrameRateRecordPtr = ^MHInfoEncodedFrameRateRecord;
+ MHInfoEncodedFrameRateRecord = record
+ encodedFrameRate: Fixed;
+ end;
+
+ dataHandlePtr = ^Handle;
+ dataHandleHandle = ^dataHandlePtr;
+
+ QTCustomActionTargetRecordPtr = ^QTCustomActionTargetRecord;
+ QTCustomActionTargetRecord = record
+ movie: Movie_fix;
+ doMCActionCallbackProc: DoMCActionUPP;
+ callBackRefcon: SInt32;
+ track: Track_fix;
+ trackObjectRefCon: SInt32;
+ defaultTrack: Track_fix;
+ defaultObjectRefCon: SInt32;
+ reserved1: SInt32;
+ reserved2: SInt32;
+ end;
+
+ QTCustomActionTargetPtr = ^QTCustomActionTargetRecord;
+ MediaEQSpectrumBandsRecordPtr = ^MediaEQSpectrumBandsRecord;
+ MediaEQSpectrumBandsRecord = record
+ count: SInt16;
+ frequency: UnsignedFixedPtr; { pointer to array of frequencies }
+ end;
+
+ {
+ * CallComponentExecuteWiredAction()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function CallComponentExecuteWiredAction(ci: ComponentInstance; actionContainer: QTAtomContainer; actionAtom: QTAtom; target: QTCustomActionTargetPtr; event: QTEventRecordPtr): ComponentResult; external name '_CallComponentExecuteWiredAction';
+{ MediaCallRange2 }
+{ These are unique to each type of media handler }
+{ They are also included in the public interfaces }
+
+
+{ Flags for MediaSetChunkManagementFlags }
+
+const
+ kEmptyPurgableChunksOverAllowance = 1;
+
+ {
+ * MediaSetChunkManagementFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function MediaSetChunkManagementFlags(mh: MediaHandler; flags: UInt32; flagsMask: UInt32): ComponentResult; external name '_MediaSetChunkManagementFlags';
+{
+ * MediaGetChunkManagementFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function MediaGetChunkManagementFlags(mh: MediaHandler; var flags: UInt32): ComponentResult; external name '_MediaGetChunkManagementFlags';
+{
+ * MediaSetPurgeableChunkMemoryAllowance()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function MediaSetPurgeableChunkMemoryAllowance(mh: MediaHandler; allowance: Size): ComponentResult; external name '_MediaSetPurgeableChunkMemoryAllowance';
+{
+ * MediaGetPurgeableChunkMemoryAllowance()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function MediaGetPurgeableChunkMemoryAllowance(mh: MediaHandler; var allowance: Size): ComponentResult; external name '_MediaGetPurgeableChunkMemoryAllowance';
+{
+ * MediaEmptyAllPurgeableChunks()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function MediaEmptyAllPurgeableChunks(mh: MediaHandler): ComponentResult; external name '_MediaEmptyAllPurgeableChunks';
+{**** These are the calls for dealing with the Generic media handler ****}
+{
+ * MediaInitialize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaInitialize(mh: MediaHandler; var gmc: GetMovieCompleteParams): ComponentResult; external name '_MediaInitialize';
+{
+ * MediaSetHandlerCapabilities()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetHandlerCapabilities(mh: MediaHandler; flags: SInt32; flagsMask: SInt32): ComponentResult; external name '_MediaSetHandlerCapabilities';
+{
+ * MediaIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaIdle(mh: MediaHandler; atMediaTime: TimeValue; flagsIn: SInt32; var flagsOut: SInt32; const (*var*) movieTime: TimeRecord): ComponentResult; external name '_MediaIdle';
+{
+ * MediaGetMediaInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetMediaInfo(mh: MediaHandler; h: Handle): ComponentResult; external name '_MediaGetMediaInfo';
+{
+ * MediaPutMediaInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaPutMediaInfo(mh: MediaHandler; h: Handle): ComponentResult; external name '_MediaPutMediaInfo';
+{
+ * MediaSetActive()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetActive(mh: MediaHandler; enableMedia: boolean): ComponentResult; external name '_MediaSetActive';
+{
+ * MediaSetRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetRate(mh: MediaHandler; rate: Fixed): ComponentResult; external name '_MediaSetRate';
+{
+ * MediaGGetStatus()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGGetStatus(mh: MediaHandler; var statusErr: ComponentResult): ComponentResult; external name '_MediaGGetStatus';
+{
+ * MediaTrackEdited()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaTrackEdited(mh: MediaHandler): ComponentResult; external name '_MediaTrackEdited';
+{
+ * MediaSetMediaTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetMediaTimeScale(mh: MediaHandler; newTimeScale: TimeScale): ComponentResult; external name '_MediaSetMediaTimeScale';
+{
+ * MediaSetMovieTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetMovieTimeScale(mh: MediaHandler; newTimeScale: TimeScale): ComponentResult; external name '_MediaSetMovieTimeScale';
+{
+ * MediaSetGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetGWorld(mh: MediaHandler; aPort: CGrafPtr; aGD: GDHandle): ComponentResult; external name '_MediaSetGWorld';
+{
+ * MediaSetDimensions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetDimensions(mh: MediaHandler; width: Fixed; height: Fixed): ComponentResult; external name '_MediaSetDimensions';
+{
+ * MediaSetClip()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetClip(mh: MediaHandler; theClip: RgnHandle): ComponentResult; external name '_MediaSetClip';
+{
+ * MediaSetMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetMatrix(mh: MediaHandler; var trackMovieMatrix: MatrixRecord): ComponentResult; external name '_MediaSetMatrix';
+{
+ * MediaGetTrackOpaque()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetTrackOpaque(mh: MediaHandler; var trackIsOpaque: boolean): ComponentResult; external name '_MediaGetTrackOpaque';
+{
+ * MediaSetGraphicsMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetGraphicsMode(mh: MediaHandler; mode: SInt32; const (*var*) opColor: RGBColor): ComponentResult; external name '_MediaSetGraphicsMode';
+{
+ * MediaGetGraphicsMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetGraphicsMode(mh: MediaHandler; var mode: SInt32; var opColor: RGBColor): ComponentResult; external name '_MediaGetGraphicsMode';
+{
+ * MediaGSetVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGSetVolume(mh: MediaHandler; volume: SInt16): ComponentResult; external name '_MediaGSetVolume';
+{
+ * MediaSetSoundBalance()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetSoundBalance(mh: MediaHandler; balance: SInt16): ComponentResult; external name '_MediaSetSoundBalance';
+{
+ * MediaGetSoundBalance()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetSoundBalance(mh: MediaHandler; var balance: SInt16): ComponentResult; external name '_MediaGetSoundBalance';
+{
+ * MediaGetNextBoundsChange()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetNextBoundsChange(mh: MediaHandler; var when: TimeValue): ComponentResult; external name '_MediaGetNextBoundsChange';
+{
+ * MediaGetSrcRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetSrcRgn(mh: MediaHandler; rgn: RgnHandle; atMediaTime: TimeValue): ComponentResult; external name '_MediaGetSrcRgn';
+{
+ * MediaPreroll()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaPreroll(mh: MediaHandler; time: TimeValue; rate: Fixed): ComponentResult; external name '_MediaPreroll';
+{
+ * MediaSampleDescriptionChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSampleDescriptionChanged(mh: MediaHandler; index: SInt32): ComponentResult; external name '_MediaSampleDescriptionChanged';
+{
+ * MediaHasCharacteristic()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaHasCharacteristic(mh: MediaHandler; characteristic: OSType; var hasIt: boolean): ComponentResult; external name '_MediaHasCharacteristic';
+{
+ * MediaGetOffscreenBufferSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetOffscreenBufferSize(mh: MediaHandler; var bounds: Rect; depth: SInt16; ctab: CTabHandle): ComponentResult; external name '_MediaGetOffscreenBufferSize';
+{
+ * MediaSetHints()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetHints(mh: MediaHandler; hints: SInt32): ComponentResult; external name '_MediaSetHints';
+{
+ * MediaGetName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetName(mh: MediaHandler; var name: Str255; requestedLanguage: SInt32; var actualLanguage: SInt32): ComponentResult; external name '_MediaGetName';
+{
+ * MediaForceUpdate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaForceUpdate(mh: MediaHandler; forceUpdateFlags: SInt32): ComponentResult; external name '_MediaForceUpdate';
+{
+ * MediaGetDrawingRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetDrawingRgn(mh: MediaHandler; var partialRgn: RgnHandle): ComponentResult; external name '_MediaGetDrawingRgn';
+{
+ * MediaGSetActiveSegment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGSetActiveSegment(mh: MediaHandler; activeStart: TimeValue; activeDuration: TimeValue): ComponentResult; external name '_MediaGSetActiveSegment';
+{
+ * MediaInvalidateRegion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaInvalidateRegion(mh: MediaHandler; invalRgn: RgnHandle): ComponentResult; external name '_MediaInvalidateRegion';
+{
+ * MediaGetNextStepTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetNextStepTime(mh: MediaHandler; flags: SInt16; mediaTimeIn: TimeValue; var mediaTimeOut: TimeValue; rate: Fixed): ComponentResult; external name '_MediaGetNextStepTime';
+{
+ * MediaSetNonPrimarySourceData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetNonPrimarySourceData(mh: MediaHandler; inputIndex: SInt32; dataDescriptionSeed: SInt32; dataDescription: Handle; data: UnivPtr; dataSize: SInt32; asyncCompletionProc: ICMCompletionProcRecordPtr; transferProc: ICMConvertDataFormatUPP; refCon: UnivPtr): ComponentResult; external name '_MediaSetNonPrimarySourceData';
+{
+ * MediaChangedNonPrimarySource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaChangedNonPrimarySource(mh: MediaHandler; inputIndex: SInt32): ComponentResult; external name '_MediaChangedNonPrimarySource';
+{
+ * MediaTrackReferencesChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaTrackReferencesChanged(mh: MediaHandler): ComponentResult; external name '_MediaTrackReferencesChanged';
+{
+ * MediaGetSampleDataPointer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetSampleDataPointer(mh: MediaHandler; sampleNum: SInt32; var dataPtr: Ptr; var dataSize: SInt32; var sampleDescIndex: SInt32): ComponentResult; external name '_MediaGetSampleDataPointer';
+{
+ * MediaReleaseSampleDataPointer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaReleaseSampleDataPointer(mh: MediaHandler; sampleNum: SInt32): ComponentResult; external name '_MediaReleaseSampleDataPointer';
+{
+ * MediaTrackPropertyAtomChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaTrackPropertyAtomChanged(mh: MediaHandler): ComponentResult; external name '_MediaTrackPropertyAtomChanged';
+{
+ * MediaSetTrackInputMapReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetTrackInputMapReference(mh: MediaHandler; inputMap: QTAtomContainer): ComponentResult; external name '_MediaSetTrackInputMapReference';
+{
+ * MediaSetVideoParam()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetVideoParam(mh: MediaHandler; whichParam: SInt32; var value: UInt16): ComponentResult; external name '_MediaSetVideoParam';
+{
+ * MediaGetVideoParam()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetVideoParam(mh: MediaHandler; whichParam: SInt32; var value: UInt16): ComponentResult; external name '_MediaGetVideoParam';
+{
+ * MediaCompare()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaCompare(mh: MediaHandler; var isOK: boolean; srcMedia: Media; srcMediaComponent: ComponentInstance): ComponentResult; external name '_MediaCompare';
+{
+ * MediaGetClock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetClock(mh: MediaHandler; var clock: ComponentInstance): ComponentResult; external name '_MediaGetClock';
+{
+ * MediaSetSoundOutputComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetSoundOutputComponent(mh: MediaHandler; outputComponent: Component): ComponentResult; external name '_MediaSetSoundOutputComponent';
+{
+ * MediaGetSoundOutputComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetSoundOutputComponent(mh: MediaHandler; var outputComponent: Component): ComponentResult; external name '_MediaGetSoundOutputComponent';
+{
+ * MediaSetSoundLocalizationData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetSoundLocalizationData(mh: MediaHandler; data: Handle): ComponentResult; external name '_MediaSetSoundLocalizationData';
+{
+ * MediaGetInvalidRegion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetInvalidRegion(mh: MediaHandler; rgn: RgnHandle): ComponentResult; external name '_MediaGetInvalidRegion';
+{
+ * MediaSampleDescriptionB2N()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSampleDescriptionB2N(mh: MediaHandler; sampleDescriptionH: SampleDescriptionHandle): ComponentResult; external name '_MediaSampleDescriptionB2N';
+{
+ * MediaSampleDescriptionN2B()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSampleDescriptionN2B(mh: MediaHandler; sampleDescriptionH: SampleDescriptionHandle): ComponentResult; external name '_MediaSampleDescriptionN2B';
+{
+ * MediaQueueNonPrimarySourceData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaQueueNonPrimarySourceData(mh: MediaHandler; inputIndex: SInt32; dataDescriptionSeed: SInt32; dataDescription: Handle; data: UnivPtr; dataSize: SInt32; asyncCompletionProc: ICMCompletionProcRecordPtr; const (*var*) frameTime: ICMFrameTimeRecord; transferProc: ICMConvertDataFormatUPP; refCon: UnivPtr): ComponentResult; external name '_MediaQueueNonPrimarySourceData';
+{
+ * MediaFlushNonPrimarySourceData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaFlushNonPrimarySourceData(mh: MediaHandler; inputIndex: SInt32): ComponentResult; external name '_MediaFlushNonPrimarySourceData';
+{
+ * MediaGetURLLink()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetURLLink(mh: MediaHandler; displayWhere: Point; var urlLink: Handle): ComponentResult; external name '_MediaGetURLLink';
+{
+ * MediaMakeMediaTimeTable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaMakeMediaTimeTable(mh: MediaHandler; var offsets: SInt32Ptr; startTime: TimeValue; endTime: TimeValue; timeIncrement: TimeValue; firstDataRefIndex: SInt16; lastDataRefIndex: SInt16; var retDataRefSkew: SInt32): ComponentResult; external name '_MediaMakeMediaTimeTable';
+{
+ * MediaHitTestForTargetRefCon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaHitTestForTargetRefCon(mh: MediaHandler; flags: SInt32; loc: Point; var targetRefCon: SInt32): ComponentResult; external name '_MediaHitTestForTargetRefCon';
+{
+ * MediaHitTestTargetRefCon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaHitTestTargetRefCon(mh: MediaHandler; targetRefCon: SInt32; flags: SInt32; loc: Point; var wasHit: boolean): ComponentResult; external name '_MediaHitTestTargetRefCon';
+{
+ * MediaGetActionsForQTEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaGetActionsForQTEvent(mh: MediaHandler; event: QTEventRecordPtr; targetRefCon: SInt32; var container: QTAtomContainer; var atom: QTAtom): ComponentResult; external name '_MediaGetActionsForQTEvent';
+{
+ * MediaDisposeTargetRefCon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaDisposeTargetRefCon(mh: MediaHandler; targetRefCon: SInt32): ComponentResult; external name '_MediaDisposeTargetRefCon';
+{
+ * MediaTargetRefConsEqual()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaTargetRefConsEqual(mh: MediaHandler; firstRefCon: SInt32; secondRefCon: SInt32; var equal: boolean): ComponentResult; external name '_MediaTargetRefConsEqual';
+{
+ * MediaSetActionsCallback()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaSetActionsCallback(mh: MediaHandler; actionsCallbackProc: ActionsUPP; refcon: UnivPtr): ComponentResult; external name '_MediaSetActionsCallback';
+{
+ * MediaPrePrerollBegin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaPrePrerollBegin(mh: MediaHandler; time: TimeValue; rate: Fixed; completeProc: PrePrerollCompleteUPP; refcon: UnivPtr): ComponentResult; external name '_MediaPrePrerollBegin';
+{
+ * MediaPrePrerollCancel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaPrePrerollCancel(mh: MediaHandler; refcon: UnivPtr): ComponentResult; external name '_MediaPrePrerollCancel';
+{
+ * MediaEnterEmptyEdit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaEnterEmptyEdit(mh: MediaHandler): ComponentResult; external name '_MediaEnterEmptyEdit';
+{
+ * MediaCurrentMediaQueuedData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MediaCurrentMediaQueuedData(mh: MediaHandler; var milliSecs: SInt32): ComponentResult; external name '_MediaCurrentMediaQueuedData';
+{
+ * MediaGetEffectiveVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaGetEffectiveVolume(mh: MediaHandler; var volume: SInt16): ComponentResult; external name '_MediaGetEffectiveVolume';
+{
+ * MediaResolveTargetRefCon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaResolveTargetRefCon(mh: MediaHandler; container: QTAtomContainer; atom: QTAtom; var targetRefCon: SInt32): ComponentResult; external name '_MediaResolveTargetRefCon';
+{
+ * MediaGetSoundLevelMeteringEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaGetSoundLevelMeteringEnabled(mh: MediaHandler; var enabled: boolean): ComponentResult; external name '_MediaGetSoundLevelMeteringEnabled';
+{
+ * MediaSetSoundLevelMeteringEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaSetSoundLevelMeteringEnabled(mh: MediaHandler; enable: boolean): ComponentResult; external name '_MediaSetSoundLevelMeteringEnabled';
+{
+ * MediaGetSoundLevelMeterInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaGetSoundLevelMeterInfo(mh: MediaHandler; levelInfo: LevelMeterInfoPtr): ComponentResult; external name '_MediaGetSoundLevelMeterInfo';
+{
+ * MediaGetEffectiveSoundBalance()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaGetEffectiveSoundBalance(mh: MediaHandler; var balance: SInt16): ComponentResult; external name '_MediaGetEffectiveSoundBalance';
+{
+ * MediaSetScreenLock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaSetScreenLock(mh: MediaHandler; lockIt: boolean): ComponentResult; external name '_MediaSetScreenLock';
+{
+ * MediaSetDoMCActionCallback()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaSetDoMCActionCallback(mh: MediaHandler; doMCActionCallbackProc: DoMCActionUPP; refcon: UnivPtr): ComponentResult; external name '_MediaSetDoMCActionCallback';
+{
+ * MediaGetErrorString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaGetErrorString(mh: MediaHandler; theError: ComponentResult; var errorString: Str255): ComponentResult; external name '_MediaGetErrorString';
+{
+ * MediaGetSoundEqualizerBands()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaGetSoundEqualizerBands(mh: MediaHandler; spectrumInfo: MediaEQSpectrumBandsRecordPtr): ComponentResult; external name '_MediaGetSoundEqualizerBands';
+{
+ * MediaSetSoundEqualizerBands()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaSetSoundEqualizerBands(mh: MediaHandler; spectrumInfo: MediaEQSpectrumBandsRecordPtr): ComponentResult; external name '_MediaSetSoundEqualizerBands';
+{
+ * MediaGetSoundEqualizerBandLevels()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaGetSoundEqualizerBandLevels(mh: MediaHandler; var bandLevels: UInt8): ComponentResult; external name '_MediaGetSoundEqualizerBandLevels';
+{
+ * MediaDoIdleActions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaDoIdleActions(mh: MediaHandler): ComponentResult; external name '_MediaDoIdleActions';
+{
+ * MediaSetSoundBassAndTreble()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaSetSoundBassAndTreble(mh: MediaHandler; bass: SInt16; treble: SInt16): ComponentResult; external name '_MediaSetSoundBassAndTreble';
+{
+ * MediaGetSoundBassAndTreble()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaGetSoundBassAndTreble(mh: MediaHandler; var bass: SInt16; var treble: SInt16): ComponentResult; external name '_MediaGetSoundBassAndTreble';
+{
+ * MediaTimeBaseChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MediaTimeBaseChanged(mh: MediaHandler): ComponentResult; external name '_MediaTimeBaseChanged';
+{
+ * MediaMCIsPlayerEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function MediaMCIsPlayerEvent(mh: MediaHandler; const (*var*) e: EventRecord; var handledIt: boolean): ComponentResult; external name '_MediaMCIsPlayerEvent';
+{
+ * MediaGetMediaLoadState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function MediaGetMediaLoadState(mh: MediaHandler; var mediaLoadState: SInt32): ComponentResult; external name '_MediaGetMediaLoadState';
+{
+ * MediaVideoOutputChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function MediaVideoOutputChanged(mh: MediaHandler; vout: ComponentInstance): ComponentResult; external name '_MediaVideoOutputChanged';
+{
+ * MediaEmptySampleCache()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function MediaEmptySampleCache(mh: MediaHandler; sampleNum: SInt32; sampleCount: SInt32): ComponentResult; external name '_MediaEmptySampleCache';
+{
+ * MediaGetPublicInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function MediaGetPublicInfo(mh: MediaHandler; infoSelector: OSType; infoDataPtr: UnivPtr; var ioDataSize: Size): ComponentResult; external name '_MediaGetPublicInfo';
+{
+ * MediaSetPublicInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function MediaSetPublicInfo(mh: MediaHandler; infoSelector: OSType; infoDataPtr: UnivPtr; dataSize: Size): ComponentResult; external name '_MediaSetPublicInfo';
+{
+ * MediaGetUserPreferredCodecs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function MediaGetUserPreferredCodecs(mh: MediaHandler; var userPreferredCodecs: CodecComponentHandle): ComponentResult; external name '_MediaGetUserPreferredCodecs';
+{
+ * MediaSetUserPreferredCodecs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function MediaSetUserPreferredCodecs(mh: MediaHandler; userPreferredCodecs: CodecComponentHandle): ComponentResult; external name '_MediaSetUserPreferredCodecs';
+{ Keyboard Focus Support }
+
+{
+ * MediaRefConSetProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function MediaRefConSetProperty(mh: MediaHandler; refCon: SInt32; propertyType: SInt32; propertyValue: UnivPtr): ComponentResult; external name '_MediaRefConSetProperty';
+{
+ * MediaRefConGetProperty()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function MediaRefConGetProperty(mh: MediaHandler; refCon: SInt32; propertyType: SInt32; propertyValue: UnivPtr): ComponentResult; external name '_MediaRefConGetProperty';
+{
+ * MediaNavigateTargetRefCon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function MediaNavigateTargetRefCon(mh: MediaHandler; navigation: SInt32; var refCon: SInt32): ComponentResult; external name '_MediaNavigateTargetRefCon';
+{
+ * MediaGGetIdleManager()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function MediaGGetIdleManager(mh: MediaHandler; var pim: IdleManager): ComponentResult; external name '_MediaGGetIdleManager';
+{
+ * MediaGSetIdleManager()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function MediaGSetIdleManager(mh: MediaHandler; im: IdleManager): ComponentResult; external name '_MediaGSetIdleManager';
+const
+ uppPrePrerollCompleteProcInfo = $00000EC0;
+{$ifc CALL_NOT_IN_CARBON}
+ {
+ * NewPrePrerollCompleteUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+function NewPrePrerollCompleteUPP(userRoutine: PrePrerollCompleteProcPtr): PrePrerollCompleteUPP; external name '_NewPrePrerollCompleteUPP'; { old name was NewPrePrerollCompleteProc }
+{
+ * DisposePrePrerollCompleteUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure DisposePrePrerollCompleteUPP(userUPP: PrePrerollCompleteUPP); external name '_DisposePrePrerollCompleteUPP';
+{
+ * InvokePrePrerollCompleteUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: not available
+ * Mac OS X: not available
+ }
+procedure InvokePrePrerollCompleteUPP(mh: MediaHandler; err: OSErr; refcon: UnivPtr; userRoutine: PrePrerollCompleteUPP); external name '_InvokePrePrerollCompleteUPP'; { old name was CallPrePrerollCompleteProc }
+{$endc} {CALL_NOT_IN_CARBON}
+
+{$ALIGN MAC68K}
+
+
+{unit PMApplication}
+{
+ File: PMApplication.p
+
+ Contains: Carbon Printing Manager Interfaces.
+
+ Version: Technology: Mac OS X
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1998-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{ Callbacks }
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ PMItemProcPtr = procedure(theDialog: DialogRef; item: SInt16);
+{$elsec}
+ PMItemProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ PMPrintDialogInitProcPtr = procedure(printSettings: PMPrintSettings; var theDialog: PMDialog);
+{$elsec}
+ PMPrintDialogInitProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ PMPageSetupDialogInitProcPtr = procedure(pageFormat: PMPageFormat; var theDialog: PMDialog);
+{$elsec}
+ PMPageSetupDialogInitProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ PMSheetDoneProcPtr = procedure(printSession: PMPrintSession; documentWindow: WindowRef; accepted: boolean);
+{$elsec}
+ PMSheetDoneProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ PMItemUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ PMItemUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ PMPrintDialogInitUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ PMPrintDialogInitUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ PMPageSetupDialogInitUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ PMPageSetupDialogInitUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ PMSheetDoneUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ PMSheetDoneUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppPMItemProcInfo = $000002C0;
+ uppPMPrintDialogInitProcInfo = $000003C0;
+ uppPMPageSetupDialogInitProcInfo = $000003C0;
+ uppPMSheetDoneProcInfo = $000007C0;
+ {
+ * NewPMItemUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewPMItemUPP(userRoutine: PMItemProcPtr): PMItemUPP; external name '_NewPMItemUPP';
+{
+ * NewPMPrintDialogInitUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewPMPrintDialogInitUPP(userRoutine: PMPrintDialogInitProcPtr): PMPrintDialogInitUPP; external name '_NewPMPrintDialogInitUPP';
+{
+ * NewPMPageSetupDialogInitUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewPMPageSetupDialogInitUPP(userRoutine: PMPageSetupDialogInitProcPtr): PMPageSetupDialogInitUPP; external name '_NewPMPageSetupDialogInitUPP';
+{
+ * NewPMSheetDoneUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewPMSheetDoneUPP(userRoutine: PMSheetDoneProcPtr): PMSheetDoneUPP; external name '_NewPMSheetDoneUPP';
+{
+ * DisposePMItemUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposePMItemUPP(userUPP: PMItemUPP); external name '_DisposePMItemUPP';
+{
+ * DisposePMPrintDialogInitUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposePMPrintDialogInitUPP(userUPP: PMPrintDialogInitUPP); external name '_DisposePMPrintDialogInitUPP';
+{
+ * DisposePMPageSetupDialogInitUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposePMPageSetupDialogInitUPP(userUPP: PMPageSetupDialogInitUPP); external name '_DisposePMPageSetupDialogInitUPP';
+{
+ * DisposePMSheetDoneUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposePMSheetDoneUPP(userUPP: PMSheetDoneUPP); external name '_DisposePMSheetDoneUPP';
+{
+ * InvokePMItemUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokePMItemUPP(theDialog: DialogRef; item: SInt16; userRoutine: PMItemUPP); external name '_InvokePMItemUPP';
+{
+ * InvokePMPrintDialogInitUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokePMPrintDialogInitUPP(printSettings: PMPrintSettings; var theDialog: PMDialog; userRoutine: PMPrintDialogInitUPP); external name '_InvokePMPrintDialogInitUPP';
+{
+ * InvokePMPageSetupDialogInitUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokePMPageSetupDialogInitUPP(pageFormat: PMPageFormat; var theDialog: PMDialog; userRoutine: PMPageSetupDialogInitUPP); external name '_InvokePMPageSetupDialogInitUPP';
+{
+ * InvokePMSheetDoneUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokePMSheetDoneUPP(printSession: PMPrintSession; documentWindow: WindowRef; accepted: boolean; userRoutine: PMSheetDoneUPP); external name '_InvokePMSheetDoneUPP';
+{$ifc PM_USE_SESSION_APIS}
+{ Print loop }
+{
+ * PMSessionBeginDocument()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionBeginDocument(printSession: PMPrintSession; printSettings: PMPrintSettings; pageFormat: PMPageFormat): OSStatus; external name '_PMSessionBeginDocument';
+
+{
+ * PMSessionEndDocument()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionEndDocument(printSession: PMPrintSession): OSStatus; external name '_PMSessionEndDocument';
+
+{
+ * PMSessionBeginPage()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionBeginPage(printSession: PMPrintSession; pageFormat: PMPageFormat; pageFrame: PMRectPtr): OSStatus; external name '_PMSessionBeginPage';
+
+{
+ * PMSessionEndPage()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionEndPage(printSession: PMPrintSession): OSStatus; external name '_PMSessionEndPage';
+
+{ Session Printing Dialogs }
+{
+ * PMSessionPageSetupDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionPageSetupDialog(printSession: PMPrintSession; pageFormat: PMPageFormat; var accepted: boolean): OSStatus; external name '_PMSessionPageSetupDialog';
+
+{
+ * PMSessionPrintDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionPrintDialog(printSession: PMPrintSession; printSettings: PMPrintSettings; constPageFormat: PMPageFormat; var accepted: boolean): OSStatus; external name '_PMSessionPrintDialog';
+
+{
+ * PMSessionPageSetupDialogInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionPageSetupDialogInit(printSession: PMPrintSession; pageFormat: PMPageFormat; var newDialog: PMDialog): OSStatus; external name '_PMSessionPageSetupDialogInit';
+
+{
+ * PMSessionPrintDialogInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionPrintDialogInit(printSession: PMPrintSession; printSettings: PMPrintSettings; constPageFormat: PMPageFormat; var newDialog: PMDialog): OSStatus; external name '_PMSessionPrintDialogInit';
+
+{
+ * PMSessionPrintDialogMain()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionPrintDialogMain(printSession: PMPrintSession; printSettings: PMPrintSettings; constPageFormat: PMPageFormat; var accepted: boolean; myInitProc: PMPrintDialogInitUPP): OSStatus; external name '_PMSessionPrintDialogMain';
+
+{
+ * PMSessionPageSetupDialogMain()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionPageSetupDialogMain(printSession: PMPrintSession; pageFormat: PMPageFormat; var accepted: boolean; myInitProc: PMPageSetupDialogInitUPP): OSStatus; external name '_PMSessionPageSetupDialogMain';
+
+{**********************}
+{ Sheets are not available on classic. }
+{**********************}
+{
+ * PMSessionUseSheets()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.2 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSessionUseSheets(printSession: PMPrintSession; documentWindow: WindowRef; sheetDoneProc: PMSheetDoneUPP): OSStatus; external name '_PMSessionUseSheets';
+
+{$elsec}
+{ Print loop }
+{
+ * PMBeginDocument()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMBeginDocument(printSettings: PMPrintSettings; pageFormat: PMPageFormat; var printContext: PMPrintContext): OSStatus; external name '_PMBeginDocument';
+
+{
+ * PMEndDocument()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMEndDocument(printContext: PMPrintContext): OSStatus; external name '_PMEndDocument';
+
+{
+ * PMBeginPage()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMBeginPage(printContext: PMPrintContext; const (*var*) pageFrame: PMRect): OSStatus; external name '_PMBeginPage';
+
+{
+ * PMEndPage()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMEndPage(printContext: PMPrintContext): OSStatus; external name '_PMEndPage';
+
+{ Printing Dialogs }
+{
+ * PMPageSetupDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPageSetupDialog(pageFormat: PMPageFormat; var accepted: boolean): OSStatus; external name '_PMPageSetupDialog';
+
+{
+ * PMPrintDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPrintDialog(printSettings: PMPrintSettings; constPageFormat: PMPageFormat; var accepted: boolean): OSStatus; external name '_PMPrintDialog';
+
+{
+ * PMPageSetupDialogInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPageSetupDialogInit(pageFormat: PMPageFormat; var newDialog: PMDialog): OSStatus; external name '_PMPageSetupDialogInit';
+
+{**********************}
+{ PMPrintDialogInit is not recommended. You should instead use }
+{ PMPrintDialogInitWithPageFormat or PMSessionPrintDialogInit }
+{**********************}
+{
+ * PMPrintDialogInit()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPrintDialogInit(printSettings: PMPrintSettings; var newDialog: PMDialog): OSStatus; external name '_PMPrintDialogInit';
+
+{
+ * PMPrintDialogInitWithPageFormat()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPrintDialogInitWithPageFormat(printSettings: PMPrintSettings; constPageFormat: PMPageFormat; var newDialog: PMDialog): OSStatus; external name '_PMPrintDialogInitWithPageFormat';
+
+{
+ * PMPrintDialogMain()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPrintDialogMain(printSettings: PMPrintSettings; constPageFormat: PMPageFormat; var accepted: boolean; myInitProc: PMPrintDialogInitUPP): OSStatus; external name '_PMPrintDialogMain';
+
+{
+ * PMPageSetupDialogMain()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMPageSetupDialogMain(pageFormat: PMPageFormat; var accepted: boolean; myInitProc: PMPageSetupDialogInitUPP): OSStatus; external name '_PMPageSetupDialogMain';
+
+{$endc} {PM_USE_SESSION_APIS}
+
+{ Printing Dialog accessors }
+{
+ * PMGetDialogPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetDialogPtr(pmDialog_: PMDialog; var theDialog: DialogRef): OSStatus; external name '_PMGetDialogPtr';
+
+{
+ * PMGetModalFilterProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetModalFilterProc(pmDialog_: PMDialog; var filterProc: ModalFilterUPP): OSStatus; external name '_PMGetModalFilterProc';
+
+{
+ * PMSetModalFilterProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetModalFilterProc(pmDialog_: PMDialog; filterProc: ModalFilterUPP): OSStatus; external name '_PMSetModalFilterProc';
+
+{
+ * PMGetItemProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetItemProc(pmDialog_: PMDialog; var itemProc: PMItemUPP): OSStatus; external name '_PMGetItemProc';
+
+{
+ * PMSetItemProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetItemProc(pmDialog_: PMDialog; itemProc: PMItemUPP): OSStatus; external name '_PMSetItemProc';
+
+{
+ * PMGetDialogAccepted()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetDialogAccepted(pmDialog_: PMDialog; var process: boolean): OSStatus; external name '_PMGetDialogAccepted';
+
+{
+ * PMSetDialogAccepted()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetDialogAccepted(pmDialog_: PMDialog; process: boolean): OSStatus; external name '_PMSetDialogAccepted';
+
+{
+ * PMGetDialogDone()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMGetDialogDone(pmDialog_: PMDialog; var done: boolean): OSStatus; external name '_PMGetDialogDone';
+
+{
+ * PMSetDialogDone()
+ *
+ * Availability:
+ * Non-Carbon CFM: not available
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function PMSetDialogDone(pmDialog_: PMDialog; done: boolean): OSStatus; external name '_PMSetDialogDone';
+
+{$ALIGN MAC68K}
+
+
+{unit QuickTimeComponents}
+{
+ File: QuickTimeComponents.p
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1990-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ clockComponentType = $636C6F6B (* 'clok' *);
+ systemTickClock = $7469636B (* 'tick' *); { subtype: 60ths since boot }
+ systemSecondClock = $7365636F (* 'seco' *); { subtype: seconds since 1904 }
+ systemMillisecondClock = $6D696C6C (* 'mill' *); { subtype: 1000ths since boot }
+ systemMicrosecondClock = $6D696372 (* 'micr' *); { subtype: 1000000ths since boot }
+
+ kClockRateIsLinear = 1;
+ kClockImplementsCallBacks = 2;
+ kClockCanHandleIntermittentSound = 4; { sound clocks only }
+
+ { * These are Clock procedures * }
+ {
+ * ClockGetTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ClockGetTime(aClock: ComponentInstance; var out: TimeRecord): ComponentResult; external name '_ClockGetTime';
+{
+ * ClockNewCallBack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ClockNewCallBack(aClock: ComponentInstance; tb: TimeBase; callBackType: SInt16): QTCallBack; external name '_ClockNewCallBack';
+{
+ * ClockDisposeCallBack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ClockDisposeCallBack(aClock: ComponentInstance; cb: QTCallBack): ComponentResult; external name '_ClockDisposeCallBack';
+{
+ * ClockCallMeWhen()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ClockCallMeWhen(aClock: ComponentInstance; cb: QTCallBack; param1: SInt32; param2: SInt32; param3: SInt32): ComponentResult; external name '_ClockCallMeWhen';
+{
+ * ClockCancelCallBack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ClockCancelCallBack(aClock: ComponentInstance; cb: QTCallBack): ComponentResult; external name '_ClockCancelCallBack';
+{
+ * ClockRateChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ClockRateChanged(aClock: ComponentInstance; cb: QTCallBack): ComponentResult; external name '_ClockRateChanged';
+{
+ * ClockTimeChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ClockTimeChanged(aClock: ComponentInstance; cb: QTCallBack): ComponentResult; external name '_ClockTimeChanged';
+{
+ * ClockSetTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ClockSetTimeBase(aClock: ComponentInstance; tb: TimeBase): ComponentResult; external name '_ClockSetTimeBase';
+{
+ * ClockStartStopChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ClockStartStopChanged(aClock: ComponentInstance; cb: QTCallBack; startChanged: boolean; stopChanged: boolean): ComponentResult; external name '_ClockStartStopChanged';
+{
+ * ClockGetRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function ClockGetRate(aClock: ComponentInstance; var rate: Fixed): ComponentResult; external name '_ClockGetRate';
+const
+ StandardCompressionType = $73636469 (* 'scdi' *);
+ StandardCompressionSubType = $696D6167 (* 'imag' *);
+ StandardCompressionSubTypeSound = $736F756E (* 'soun' *);
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ SCModalFilterProcPtr = function(theDialog: DialogRef; var theEvent: EventRecord; var itemHit: SInt16; refcon: SInt32): boolean;
+{$elsec}
+ SCModalFilterProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SCModalHookProcPtr = function(theDialog: DialogRef; itemHit: SInt16; params: UnivPtr; refcon: SInt32): SInt16;
+{$elsec}
+ SCModalHookProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ SCModalFilterUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SCModalFilterUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SCModalHookUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SCModalHookUPP = UniversalProcPtr;
+{$endc}
+ { Preference flags. }
+
+const
+ scListEveryCodec = $00000002;
+ scAllowZeroFrameRate = $00000004;
+ scAllowZeroKeyFrameRate = $00000008;
+ scShowBestDepth = $00000010;
+ scUseMovableModal = $00000020;
+ scDisableFrameRateItem = $00000040;
+ scShowDataRateAsKilobits = $00000080;
+
+
+ { Possible test flags for setting test image. }
+ scPreferCropping = $01;
+ scPreferScaling = $02;
+ scPreferScalingAndCropping = $03;
+ scDontDetermineSettingsFromTestImage = $04;
+
+
+ { Dimensions of the image preview box. }
+ scTestImageWidth = 80;
+ scTestImageHeight = 80;
+
+ { Possible items returned by hookProc. }
+ scOKItem = 1;
+ scCancelItem = 2;
+ scCustomItem = 3;
+
+ { Result returned when user cancelled. }
+ scUserCancelled = 1;
+
+
+ { Get/SetInfo structures. }
+
+
+type
+ SCSpatialSettingsPtr = ^SCSpatialSettings;
+ SCSpatialSettings = record
+ codecType: CodecType_fix;
+ codec: CodecComponent;
+ depth: SInt16;
+ spatialQuality: CodecQ;
+ end;
+
+ SCTemporalSettingsPtr = ^SCTemporalSettings;
+ SCTemporalSettings = record
+ temporalQuality: CodecQ;
+ frameRate: Fixed;
+ keyFrameRate: SInt32;
+ end;
+
+ SCDataRateSettingsPtr = ^SCDataRateSettings;
+ SCDataRateSettings = record
+ dataRate: SInt32;
+ frameDuration: SInt32;
+ minSpatialQuality: CodecQ;
+ minTemporalQuality: CodecQ;
+ end;
+
+ SCExtendedProcsPtr = ^SCExtendedProcs;
+ SCExtendedProcs = record
+ filterProc: SCModalFilterUPP;
+ hookProc: SCModalHookUPP;
+ refcon: SInt32;
+ customName: Str31;
+ end;
+
+ { Get/SetInfo selectors }
+
+const
+ scSpatialSettingsType = $7370746C (* 'sptl' *); { pointer to SCSpatialSettings struct }
+ scTemporalSettingsType = $7470726C (* 'tprl' *); { pointer to SCTemporalSettings struct }
+ scDataRateSettingsType = $64726174 (* 'drat' *); { pointer to SCDataRateSettings struct }
+ scColorTableType = $636C7574 (* 'clut' *); { pointer to CTabHandle }
+ scProgressProcType = $70726F67 (* 'prog' *); { pointer to ProgressRecord struct }
+ scExtendedProcsType = $78707263 (* 'xprc' *); { pointer to SCExtendedProcs struct }
+ scPreferenceFlagsType = $70726566 (* 'pref' *); { pointer to long }
+ scSettingsStateType = $73737461 (* 'ssta' *); { pointer to Handle }
+ scSequenceIDType = $73657175 (* 'sequ' *); { pointer to ImageSequence }
+ scWindowPositionType = $776E6477 (* 'wndw' *); { pointer to Point }
+ scCodecFlagsType = $63666C67 (* 'cflg' *); { pointer to CodecFlags }
+ scCodecSettingsType = $63646563 (* 'cdec' *); { pointer to Handle }
+ scForceKeyValueType = $6B73696D (* 'ksim' *); { pointer to long }
+ scSoundSampleRateType = $73737274 (* 'ssrt' *); { pointer to UnsignedFixed }
+ scSoundSampleSizeType = $73737373 (* 'ssss' *); { pointer to short }
+ scSoundChannelCountType = $73736363 (* 'sscc' *); { pointer to short }
+ scSoundCompressionType = $73736374 (* 'ssct' *); { pointer to OSType }
+ scCompressionListType = $6374796C (* 'ctyl' *); { pointer to OSType Handle }
+ scCodecManufacturerType = $636D6672 (* 'cmfr' *); { pointer to OSType }
+ scSoundVBRCompressionOK = $63766272 (* 'cvbr' *); { pointer to Boolean }
+ scSoundInputSampleRateType = $73736972 (* 'ssir' *); { pointer to UnsignedFixed }
+ scSoundSampleRateChangeOK = $72636F6B (* 'rcok' *); { pointer to Boolean }
+ scAvailableCompressionListType = $61766169 (* 'avai' *); { pointer to OSType Handle }
+
+ { scTypeNotFoundErr returned by Get/SetInfo when type cannot be found. }
+
+
+type
+ SCParamsPtr = ^SCParams;
+ SCParams = record
+ flags: SInt32;
+ theCodecType: CodecType;
+ theCodec: CodecComponent;
+ spatialQuality: CodecQ;
+ temporalQuality: CodecQ;
+ depth: SInt16;
+ frameRate: Fixed;
+ keyFrameRate: SInt32;
+ reserved1: SInt32;
+ reserved2: SInt32;
+ end;
+
+
+const
+ scGetCompression = 1;
+ scShowMotionSettings = $00000001;
+ scSettingsChangedItem = -1;
+
+ scCompressFlagIgnoreIdenticalFrames = 1;
+
+ { QTAtomTypes for atoms found in settings atom containers }
+ kQTSettingsVideo = $76696465 (* 'vide' *); { Container for video/image compression related atoms (Get/SetInfo selectors) }
+ kQTSettingsSound = $736F756E (* 'soun' *); { Container for sound compression related atoms (Get/SetInfo selectors) }
+ kQTSettingsComponentVersion = $76657273 (* 'vers' *); { . Version of component that wrote settings (QTSettingsVersionAtomRecord) }
+
+ { Format of 'vers' atom found in settings atom containers }
+
+type
+ QTSettingsVersionAtomRecordPtr = ^QTSettingsVersionAtomRecord;
+ QTSettingsVersionAtomRecord = record
+ componentVersion: SInt32; { standard compression component version }
+ flags: SInt16; { low bit is 1 if little endian platform, 0 if big endian platform }
+ reserved: SInt16; { should be 0 }
+ end;
+
+ { * These are Progress procedures * }
+ {
+ * SCGetCompressionExtended()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCGetCompressionExtended(ci: ComponentInstance; var params: SCParams; where: Point; filterProc: SCModalFilterUPP; hookProc: SCModalHookUPP; refcon: SInt32; customName: StringPtr): ComponentResult; external name '_SCGetCompressionExtended';
+{
+ * SCPositionRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCPositionRect(ci: ComponentInstance; var rp: Rect; var where: Point): ComponentResult; external name '_SCPositionRect';
+{
+ * SCPositionDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCPositionDialog(ci: ComponentInstance; id: SInt16; var where: Point): ComponentResult; external name '_SCPositionDialog';
+{
+ * SCSetTestImagePictHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCSetTestImagePictHandle(ci: ComponentInstance; testPict: PicHandle; var testRect: Rect; testFlags: SInt16): ComponentResult; external name '_SCSetTestImagePictHandle';
+{
+ * SCSetTestImagePictFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCSetTestImagePictFile(ci: ComponentInstance; testFileRef: SInt16; var testRect: Rect; testFlags: SInt16): ComponentResult; external name '_SCSetTestImagePictFile';
+{
+ * SCSetTestImagePixMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCSetTestImagePixMap(ci: ComponentInstance; testPixMap: PixMapHandle; var testRect: Rect; testFlags: SInt16): ComponentResult; external name '_SCSetTestImagePixMap';
+{
+ * SCGetBestDeviceRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCGetBestDeviceRect(ci: ComponentInstance; var r: Rect): ComponentResult; external name '_SCGetBestDeviceRect';
+{
+ * SCRequestImageSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCRequestImageSettings(ci: ComponentInstance): ComponentResult; external name '_SCRequestImageSettings';
+{
+ * SCCompressImage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCCompressImage(ci: ComponentInstance; src: PixMapHandle; const (*var*) srcRect: Rect; var desc: ImageDescriptionHandle; var data: Handle): ComponentResult; external name '_SCCompressImage';
+{
+ * SCCompressPicture()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCCompressPicture(ci: ComponentInstance; srcPicture: PicHandle; dstPicture: PicHandle): ComponentResult; external name '_SCCompressPicture';
+{
+ * SCCompressPictureFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCCompressPictureFile(ci: ComponentInstance; srcRefNum: SInt16; dstRefNum: SInt16): ComponentResult; external name '_SCCompressPictureFile';
+{
+ * SCRequestSequenceSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCRequestSequenceSettings(ci: ComponentInstance): ComponentResult; external name '_SCRequestSequenceSettings';
+{
+ * SCCompressSequenceBegin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCCompressSequenceBegin(ci: ComponentInstance; src: PixMapHandle; const (*var*) srcRect: Rect; var desc: ImageDescriptionHandle): ComponentResult; external name '_SCCompressSequenceBegin';
+{
+ * SCCompressSequenceFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCCompressSequenceFrame(ci: ComponentInstance; src: PixMapHandle; const (*var*) srcRect: Rect; var data: Handle; var dataSize: SInt32; var notSyncFlag: SInt16): ComponentResult; external name '_SCCompressSequenceFrame';
+{
+ * SCCompressSequenceEnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCCompressSequenceEnd(ci: ComponentInstance): ComponentResult; external name '_SCCompressSequenceEnd';
+{
+ * SCDefaultPictHandleSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCDefaultPictHandleSettings(ci: ComponentInstance; srcPicture: PicHandle; motion: SInt16): ComponentResult; external name '_SCDefaultPictHandleSettings';
+{
+ * SCDefaultPictFileSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCDefaultPictFileSettings(ci: ComponentInstance; srcRef: SInt16; motion: SInt16): ComponentResult; external name '_SCDefaultPictFileSettings';
+{
+ * SCDefaultPixMapSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCDefaultPixMapSettings(ci: ComponentInstance; src: PixMapHandle; motion: SInt16): ComponentResult; external name '_SCDefaultPixMapSettings';
+{
+ * SCGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCGetInfo(ci: ComponentInstance; infoType: OSType; info: UnivPtr): ComponentResult; external name '_SCGetInfo';
+{
+ * SCSetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCSetInfo(ci: ComponentInstance; infoType: OSType; info: UnivPtr): ComponentResult; external name '_SCSetInfo';
+{
+ * SCNewGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCNewGWorld(ci: ComponentInstance; var gwp: GWorldPtr; var rp: Rect; flags: GWorldFlags): ComponentResult; external name '_SCNewGWorld';
+{
+ * SCSetCompressFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCSetCompressFlags(ci: ComponentInstance; flags: SInt32): ComponentResult; external name '_SCSetCompressFlags';
+{
+ * SCGetCompressFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCGetCompressFlags(ci: ComponentInstance; var flags: SInt32): ComponentResult; external name '_SCGetCompressFlags';
+{
+ * SCGetSettingsAsText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCGetSettingsAsText(ci: ComponentInstance; var text: Handle): ComponentResult; external name '_SCGetSettingsAsText';
+{
+ * SCGetSettingsAsAtomContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCGetSettingsAsAtomContainer(ci: ComponentInstance; var settings: QTAtomContainer): ComponentResult; external name '_SCGetSettingsAsAtomContainer';
+{
+ * SCSetSettingsFromAtomContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SCSetSettingsFromAtomContainer(ci: ComponentInstance; settings: QTAtomContainer): ComponentResult; external name '_SCSetSettingsFromAtomContainer';
+{ Note: if you're using SCCompressSequenceFrameAsync with a scForceKeyValue setting, you must call SCAsyncIdle occasionally at main task time. }
+{
+ * SCCompressSequenceFrameAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function SCCompressSequenceFrameAsync(ci: ComponentInstance; src: PixMapHandle; const (*var*) srcRect: Rect; var data: Handle; var dataSize: SInt32; var notSyncFlag: SInt16; asyncCompletionProc: ICMCompletionProcRecordPtr): ComponentResult; external name '_SCCompressSequenceFrameAsync';
+{
+ * SCAsyncIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function SCAsyncIdle(ci: ComponentInstance): ComponentResult; external name '_SCAsyncIdle';
+const
+ TweenComponentType = $7477656E (* 'twen' *);
+
+
+type
+ TweenerComponent = ComponentInstance;
+ {
+ * TweenerInitialize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TweenerInitialize(tc: TweenerComponent; container: QTAtomContainer; tweenAtom: QTAtom; dataAtom: QTAtom): ComponentResult; external name '_TweenerInitialize';
+{
+ * TweenerDoTween()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TweenerDoTween(tc: TweenerComponent; var tr: TweenRecord): ComponentResult; external name '_TweenerDoTween';
+{
+ * TweenerReset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TweenerReset(tc: TweenerComponent): ComponentResult; external name '_TweenerReset';
+const
+ TCSourceRefNameType = $6E616D65 (* 'name' *);
+
+ tcDropFrame = $01;
+ tc24HourMax = $02;
+ tcNegTimesOK = $04;
+ tcCounter = $08;
+
+
+type
+ TimeCodeDefPtr = ^TimeCodeDef;
+ TimeCodeDef = record
+ flags: SInt32; { drop-frame, etc. }
+ fTimeScale: TimeScale; { time scale of frameDuration (eg. 2997) }
+ frameDuration: TimeValue; { duration of each frame (eg. 100) }
+ numFrames: SInt8; { frames/sec for timecode (eg. 30) OR frames/tick for counter mode }
+ padding: SInt8; { unused padding byte }
+ end;
+ TimeCodeDef_fix = TimeCodeDef; { used as field type when a record declaration contains a TimeCodeDef field identifier }
+
+
+const
+ tctNegFlag = $80; { negative bit is in minutes }
+
+
+type
+ TimeCodeTimePtr = ^TimeCodeTime;
+ TimeCodeTime = record
+ hours: SInt8;
+ minutes: SInt8;
+ seconds: SInt8;
+ frames: SInt8;
+ end;
+
+ TimeCodeCounterPtr = ^TimeCodeCounter;
+ TimeCodeCounter = record
+ counter: SInt32;
+ end;
+
+ TimeCodeRecordPtr = ^TimeCodeRecord;
+ TimeCodeRecord = record
+ case SInt16 of
+ 0: (
+ t: TimeCodeTime;
+ );
+ 1: (
+ c: TimeCodeCounter;
+ );
+ end;
+
+ TimeCodeDescriptionPtr = ^TimeCodeDescription;
+ TimeCodeDescription = record
+ descSize: SInt32; { standard sample description header }
+ dataFormat: SInt32;
+ resvd1: SInt32;
+ resvd2: SInt16;
+ dataRefIndex: SInt16;
+ flags: SInt32; { timecode specific stuff }
+ timeCodeDef: TimeCodeDef_fix;
+ srcRef: array [0..0] of SInt32;
+ end;
+
+ TimeCodeDescriptionHandle = ^TimeCodeDescriptionPtr;
+
+const
+ tcdfShowTimeCode = $01;
+
+
+type
+ TCTextOptionsPtr = ^TCTextOptions;
+ TCTextOptions = record
+ txFont: SInt16;
+ txFace: SInt16;
+ txSize: SInt16;
+ pad: SInt16; { let's make it longword aligned - thanks.. }
+ foreColor: RGBColor;
+ backColor: RGBColor;
+ end;
+
+ {
+ * TCGetCurrentTimeCode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TCGetCurrentTimeCode(mh: MediaHandler; var frameNum: SInt32; var tcdef: TimeCodeDef; var tcrec: TimeCodeRecord; var srcRefH: UserData): HandlerError; external name '_TCGetCurrentTimeCode';
+{
+ * TCGetTimeCodeAtTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TCGetTimeCodeAtTime(mh: MediaHandler; mediaTime: TimeValue; var frameNum: SInt32; var tcdef: TimeCodeDef; var tcdata: TimeCodeRecord; var srcRefH: UserData): HandlerError; external name '_TCGetTimeCodeAtTime';
+{
+ * TCTimeCodeToString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TCTimeCodeToString(mh: MediaHandler; var tcdef: TimeCodeDef; var tcrec: TimeCodeRecord; tcStr: StringPtr): HandlerError; external name '_TCTimeCodeToString';
+{
+ * TCTimeCodeToFrameNumber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TCTimeCodeToFrameNumber(mh: MediaHandler; var tcdef: TimeCodeDef; var tcrec: TimeCodeRecord; var frameNumber: SInt32): HandlerError; external name '_TCTimeCodeToFrameNumber';
+{
+ * TCFrameNumberToTimeCode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TCFrameNumberToTimeCode(mh: MediaHandler; frameNumber: SInt32; var tcdef: TimeCodeDef; var tcrec: TimeCodeRecord): HandlerError; external name '_TCFrameNumberToTimeCode';
+{
+ * TCGetSourceRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TCGetSourceRef(mh: MediaHandler; tcdH: TimeCodeDescriptionHandle; var srefH: UserData): HandlerError; external name '_TCGetSourceRef';
+{
+ * TCSetSourceRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TCSetSourceRef(mh: MediaHandler; tcdH: TimeCodeDescriptionHandle; srefH: UserData): HandlerError; external name '_TCSetSourceRef';
+{
+ * TCSetTimeCodeFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TCSetTimeCodeFlags(mh: MediaHandler; flags: SInt32; flagsMask: SInt32): HandlerError; external name '_TCSetTimeCodeFlags';
+{
+ * TCGetTimeCodeFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TCGetTimeCodeFlags(mh: MediaHandler; var flags: SInt32): HandlerError; external name '_TCGetTimeCodeFlags';
+{
+ * TCSetDisplayOptions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TCSetDisplayOptions(mh: MediaHandler; textOptions: TCTextOptionsPtr): HandlerError; external name '_TCSetDisplayOptions';
+{
+ * TCGetDisplayOptions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TCGetDisplayOptions(mh: MediaHandler; textOptions: TCTextOptionsPtr): HandlerError; external name '_TCGetDisplayOptions';
+type
+ MovieImportComponent = ComponentInstance;
+ MovieExportComponent = ComponentInstance;
+
+const
+ MovieImportType = $65617420 (* 'eat ' *);
+ MovieExportType = $73706974 (* 'spit' *);
+
+ canMovieImportHandles = $01;
+ canMovieImportFiles = $02;
+ hasMovieImportUserInterface = $04;
+ canMovieExportHandles = $08;
+ canMovieExportFiles = $10;
+ hasMovieExportUserInterface = $20;
+ movieImporterIsXMLBased = $20;
+ dontAutoFileMovieImport = $40;
+ canMovieExportAuxDataHandle = $80;
+ canMovieImportValidateHandles = $0100;
+ canMovieImportValidateFile = $0200;
+ dontRegisterWithEasyOpen = $0400;
+ canMovieImportInPlace = $0800;
+ movieImportSubTypeIsFileExtension = $1000;
+ canMovieImportPartial = $2000;
+ hasMovieImportMIMEList = $4000;
+ canMovieImportAvoidBlocking = $8000;
+ canMovieExportFromProcedures = $8000;
+ canMovieExportValidateMovie = $00010000;
+ movieImportMustGetDestinationMediaType = $00010000;
+ movieExportNeedsResourceFork = $00020000;
+ canMovieImportDataReferences = $00040000;
+ movieExportMustGetSourceMediaType = $00080000;
+ canMovieImportWithIdle = $00100000;
+ canMovieImportValidateDataReferences = $00200000;
+ reservedForUseByGraphicsImporters = $00800000;
+
+ movieImportCreateTrack = 1;
+ movieImportInParallel = 2;
+ movieImportMustUseTrack = 4;
+ movieImportWithIdle = 16;
+
+ movieImportResultUsedMultipleTracks = 8;
+ movieImportResultNeedIdles = 32;
+ movieImportResultComplete = 64;
+
+ kMovieExportTextOnly = 0;
+ kMovieExportAbsoluteTime = 1;
+ kMovieExportRelativeTime = 2;
+
+ kMIDIImportSilenceBefore = $01;
+ kMIDIImportSilenceAfter = $02;
+ kMIDIImport20Playable = $04;
+ kMIDIImportWantLyrics = $08;
+
+
+ kQTMediaConfigResourceType = $6D636667 (* 'mcfg' *);
+ kQTMediaConfigResourceVersion = 2;
+ kQTMediaGroupResourceType = $6D677270 (* 'mgrp' *);
+ kQTMediaGroupResourceVersion = 1;
+ kQTBrowserInfoResourceType = $62727773 (* 'brws' *);
+ kQTBrowserInfoResourceVersion = 1;
+
+
+ kQTMediaMIMEInfoHasChanged = $00000002; { the MIME type(s) is(are) new or has changed since the last time }
+ { someone asked about it }
+ kQTMediaFileInfoHasChanged = $00000004; { the file extension(s) is(are) new or has changed since the last time }
+ { anyone asked about it }
+ kQTMediaConfigCanUseApp = $00040000; { this MIME type can be configured to use app }
+ kQTMediaConfigCanUsePlugin = $00080000; { this MIME type can be configured to use plug-in }
+ kQTMediaConfigUNUSED = $00100000; { currently unused }
+ kQTMediaConfigBinaryFile = $00800000; { file should be transfered in binary mode }
+ kQTMediaConfigTextFile = 0; { not a bit, defined for clarity }
+ kQTMediaConfigMacintoshFile = $01000000; { file's resource fork is significant }
+ kQTMediaConfigAssociateByDefault = $08000000; { take this file association by default }
+ kQTMediaConfigUseAppByDefault = $10000000; { use the app by default for this MIME type }
+ kQTMediaConfigUsePluginByDefault = $20000000; { use the plug-in by default for this MIME type }
+ kQTMediaConfigDefaultsMask = $30000000;
+ kQTMediaConfigDefaultsShift = 12; { ((flags & kQTMediaConfigDefaultsMask) >> kQTMediaConfigDefaultsShift) to get default setting }
+ kQTMediaConfigHasFileHasQTAtoms = $40000000; { the file has a "QuickTime like" file format }
+
+
+ { mime type group constants for groupID field of 'mcfg' resource }
+ kQTMediaConfigStreamGroupID = $7374726D (* 'strm' *);
+ kQTMediaConfigInteractiveGroupID = $696E7472 (* 'intr' *);
+ kQTMediaConfigVideoGroupID = $65796573 (* 'eyes' *);
+ kQTMediaConfigAudioGroupID = $65617273 (* 'ears' *);
+ kQTMediaConfigMPEGGroupID = $6D706567 (* 'mpeg' *);
+ kQTMediaConfigMP3GroupID = $6D703320 (* 'mp3 ' *);
+ kQTMediaConfigImageGroupID = $6F676C65 (* 'ogle' *);
+ kQTMediaConfigMiscGroupID = $6D697363 (* 'misc' *);
+
+ { file type group constants for groupID field of 'mcfg' resource }
+ kQTMediaInfoNetGroup = $6E657420 (* 'net ' *);
+ kQTMediaInfoWinGroup = $77696E20 (* 'win ' *);
+ kQTMediaInfoMacGroup = $6D616320 (* 'mac ' *);
+ kQTMediaInfoMiscGroup = $3F3F3F3F; { '????' }
+
+
+ kMimeInfoMimeTypeTag = $6D696D65 (* 'mime' *);
+ kMimeInfoFileExtensionTag = $65787420 (* 'ext ' *);
+ kMimeInfoDescriptionTag = $64657363 (* 'desc' *);
+ kMimeInfoGroupTag = $67726F70 (* 'grop' *);
+ kMimeInfoDoNotOverrideExistingFileTypeAssociation = $6E6F6661 (* 'nofa' *);
+
+ kQTFileTypeAIFF = $41494646 (* 'AIFF' *);
+ kQTFileTypeAIFC = $41494643 (* 'AIFC' *);
+ kQTFileTypeDVC = $64766321 (* 'dvc!' *);
+ kQTFileTypeMIDI = $4D696469 (* 'Midi' *);
+ kQTFileTypePicture = $50494354 (* 'PICT' *);
+ kQTFileTypeMovie = $4D6F6F56 (* 'MooV' *);
+ kQTFileTypeText = $54455854 (* 'TEXT' *);
+ kQTFileTypeWave = $57415645 (* 'WAVE' *);
+ kQTFileTypeSystemSevenSound = $7366696C (* 'sfil' *);
+ kQTFileTypeMuLaw = $554C4157 (* 'ULAW' *);
+ kQTFileTypeAVI = $56665720 (* 'VfW ' *);
+ kQTFileTypeSoundDesignerII = $53643266 (* 'Sd2f' *);
+ kQTFileTypeAudioCDTrack = $7472616B (* 'trak' *);
+ kQTFileTypePICS = $50494353 (* 'PICS' *);
+ kQTFileTypeGIF = $47494666 (* 'GIFf' *);
+ kQTFileTypePNG = $504E4766 (* 'PNGf' *);
+ kQTFileTypeTIFF = $54494646 (* 'TIFF' *);
+ kQTFileTypePhotoShop = $38425053 (* '8BPS' *);
+ kQTFileTypeSGIImage = $2E534749 (* '.SGI' *);
+ kQTFileTypeBMP = $424D5066 (* 'BMPf' *);
+ kQTFileTypeJPEG = $4A504547 (* 'JPEG' *);
+ kQTFileTypeJFIF = $4A504547 (* 'JPEG' *);
+ kQTFileTypeMacPaint = $504E5447 (* 'PNTG' *);
+ kQTFileTypeTargaImage = $54504943 (* 'TPIC' *);
+ kQTFileTypeQuickDrawGXPicture = $71646778 (* 'qdgx' *);
+ kQTFileTypeQuickTimeImage = $71746966 (* 'qtif' *);
+ kQTFileType3DMF = $33444D46 (* '3DMF' *);
+ kQTFileTypeFLC = $464C4320 (* 'FLC ' *);
+ kQTFileTypeFlash = $5357464C (* 'SWFL' *);
+ kQTFileTypeFlashPix = $46506978 (* 'FPix' *);
+ kQTFileTypeMP4 = $6D706734 (* 'mpg4' *);
+
+ { QTAtomTypes for atoms in import/export settings containers }
+ kQTSettingsDVExportNTSC = $64766376 (* 'dvcv' *); { True is export as NTSC, false is export as PAL. (Boolean) }
+ kQTSettingsDVExportLockedAudio = $6C6F636B (* 'lock' *); { True if audio locked to video. (Boolean) }
+ kQTSettingsEffect = $65666665 (* 'effe' *); { Parent atom whose contents are atoms of an effects description }
+ kQTSettingsGraphicsFileImportSequence = $73657175 (* 'sequ' *); { Parent atom of graphic file movie import component }
+ kQTSettingsGraphicsFileImportSequenceEnabled = $656E6162 (* 'enab' *); { . If true, import numbered image sequence (Boolean) }
+ kQTSettingsMovieExportEnableVideo = $656E7669 (* 'envi' *); { Enable exporting of video track (Boolean) }
+ kQTSettingsMovieExportEnableSound = $656E736F (* 'enso' *); { Enable exporting of sound track (Boolean) }
+ kQTSettingsMovieExportSaveOptions = $73617665 (* 'save' *); { Parent atom of save options }
+ kQTSettingsMovieExportSaveForInternet = $66617374 (* 'fast' *); { . Save for Internet }
+ kQTSettingsMovieExportSaveCompressedMovie = $636D706D (* 'cmpm' *); { . Save compressed movie resource }
+ kQTSettingsMIDI = $4D494449 (* 'MIDI' *); { MIDI import related container }
+ kQTSettingsMIDISettingFlags = $73747467 (* 'sttg' *); { . MIDI import settings (UInt32) }
+ kQTSettingsText = $74657874 (* 'text' *); { Text related container }
+ kQTSettingsTextDescription = $64657363 (* 'desc' *); { . Text import settings (TextDescription record) }
+ kQTSettingsTextSize = $73697A65 (* 'size' *); { . Width/height to create during import (FixedPoint) }
+ kQTSettingsTextSettingFlags = $73747467 (* 'sttg' *); { . Text export settings (UInt32) }
+ kQTSettingsTextTimeFraction = $74696D66 (* 'timf' *); { . Movie time fraction for export (UInt32) }
+ kQTSettingsTime = $74696D65 (* 'time' *); { Time related container }
+ kQTSettingsTimeDuration = $64757261 (* 'dura' *); { . Time related container }
+ kQTSettingsAudioCDTrack = $7472616B (* 'trak' *); { Audio CD track related container }
+ kQTSettingsAudioCDTrackRateShift = $72736866 (* 'rshf' *); { . Rate shift to be performed (SInt16) }
+ kQTSettingsDVExportDVFormat = $64766366 (* 'dvcf' *); { Exported DV Format, DV('dv ') or DVCPRO('dvp '). (OSType) }
+
+
+type
+ MovieExportGetDataParamsPtr = ^MovieExportGetDataParams;
+ MovieExportGetDataParams = record
+ recordSize: SInt32;
+ trackID: SInt32;
+ sourceTimeScale: TimeScale;
+ requestedTime: TimeValue;
+ actualTime: TimeValue;
+ dataPtr: Ptr;
+ dataSize: SInt32;
+ desc: SampleDescriptionHandle;
+ descType: OSType;
+ descSeed: SInt32;
+ requestedSampleCount: SInt32;
+ actualSampleCount: SInt32;
+ durationPerSample: TimeValue;
+ sampleFlags: SInt32;
+ end;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ MovieExportGetDataProcPtr = function(refCon: UnivPtr; var params: MovieExportGetDataParams): OSErr;
+{$elsec}
+ MovieExportGetDataProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ MovieExportGetPropertyProcPtr = function(refcon: UnivPtr; trackID: SInt32; propertyType: OSType; propertyValue: UnivPtr): OSErr;
+{$elsec}
+ MovieExportGetPropertyProcPtr = ProcPtr;
+{$endc}
+
+
+const
+ kQTPresetsListResourceType = $73746723 (* 'stg#' *);
+ kQTPresetsPlatformListResourceType = $73746770 (* 'stgp' *);
+
+ kQTPresetInfoIsDivider = 1;
+
+
+type
+ QTPresetInfoPtr = ^QTPresetInfo;
+ QTPresetInfo = record
+ presetKey: OSType; { unique key for this preset in presetsArray }
+ presetFlags: UInt32; { flags about this preset }
+ settingsResourceType: OSType; { resource type of settings resource }
+ settingsResourceID: SInt16; { resource id of settings resource }
+ padding1: SInt16;
+ nameStringListID: SInt16; { name string list resource id }
+ nameStringIndex: SInt16; { name string index }
+ infoStringListID: SInt16; { info string list resource id }
+ infoStringIndex: SInt16; { info string index }
+ end;
+
+ QTPresetListRecordPtr = ^QTPresetListRecord;
+ QTPresetListRecord = record
+ flags: UInt32; { flags for whole list }
+ count: UInt32; { number of elements in presetsArray }
+ reserved: UInt32;
+ presetsArray: array [0..0] of QTPresetInfo; { info about each preset }
+ end;
+
+
+const
+ kQTMovieExportSourceInfoResourceType = $73726323 (* 'src#' *);
+ kQTMovieExportSourceInfoIsMediaType = $00000001;
+ kQTMovieExportSourceInfoIsMediaCharacteristic = $00000002;
+ kQTMovieExportSourceInfoIsSourceType = $00000004;
+
+
+type
+ QTMovieExportSourceInfoPtr = ^QTMovieExportSourceInfo;
+ QTMovieExportSourceInfo = record
+ mediaType: OSType; { Media type of source }
+ minCount: UInt16; { min number of sources of this kind required, zero if none required }
+ maxCount: UInt16; { max number of sources of this kind allowed, -1 if unlimited allowed }
+ flags: SInt32; { reserved for flags }
+ end;
+
+ QTMovieExportSourceRecordPtr = ^QTMovieExportSourceRecord;
+ QTMovieExportSourceRecord = record
+ count: SInt32;
+ reserved: SInt32;
+ sourceArray: array [0..0] of QTMovieExportSourceInfo;
+ end;
+
+{$ifc OPAQUE_UPP_TYPES}
+ MovieExportGetDataUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ MovieExportGetDataUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ MovieExportGetPropertyUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ MovieExportGetPropertyUPP = UniversalProcPtr;
+{$endc}
+
+const
+ uppSCModalFilterProcInfo = $00003FD0;
+ uppSCModalHookProcInfo = $00003EE0;
+ uppMovieExportGetDataProcInfo = $000003E0;
+ uppMovieExportGetPropertyProcInfo = $00003FE0;
+ {
+ * NewSCModalFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSCModalFilterUPP(userRoutine: SCModalFilterProcPtr): SCModalFilterUPP; external name '_NewSCModalFilterUPP'; { old name was NewSCModalFilterProc }
+{
+ * NewSCModalHookUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSCModalHookUPP(userRoutine: SCModalHookProcPtr): SCModalHookUPP; external name '_NewSCModalHookUPP'; { old name was NewSCModalHookProc }
+{
+ * NewMovieExportGetDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewMovieExportGetDataUPP(userRoutine: MovieExportGetDataProcPtr): MovieExportGetDataUPP; external name '_NewMovieExportGetDataUPP'; { old name was NewMovieExportGetDataProc }
+{
+ * NewMovieExportGetPropertyUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewMovieExportGetPropertyUPP(userRoutine: MovieExportGetPropertyProcPtr): MovieExportGetPropertyUPP; external name '_NewMovieExportGetPropertyUPP'; { old name was NewMovieExportGetPropertyProc }
+{
+ * DisposeSCModalFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSCModalFilterUPP(userUPP: SCModalFilterUPP); external name '_DisposeSCModalFilterUPP';
+{
+ * DisposeSCModalHookUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSCModalHookUPP(userUPP: SCModalHookUPP); external name '_DisposeSCModalHookUPP';
+{
+ * DisposeMovieExportGetDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeMovieExportGetDataUPP(userUPP: MovieExportGetDataUPP); external name '_DisposeMovieExportGetDataUPP';
+{
+ * DisposeMovieExportGetPropertyUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeMovieExportGetPropertyUPP(userUPP: MovieExportGetPropertyUPP); external name '_DisposeMovieExportGetPropertyUPP';
+{
+ * InvokeSCModalFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSCModalFilterUPP(theDialog: DialogRef; var theEvent: EventRecord; var itemHit: SInt16; refcon: SInt32; userRoutine: SCModalFilterUPP): boolean; external name '_InvokeSCModalFilterUPP'; { old name was CallSCModalFilterProc }
+{
+ * InvokeSCModalHookUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSCModalHookUPP(theDialog: DialogRef; itemHit: SInt16; params: UnivPtr; refcon: SInt32; userRoutine: SCModalHookUPP): SInt16; external name '_InvokeSCModalHookUPP'; { old name was CallSCModalHookProc }
+{
+ * InvokeMovieExportGetDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeMovieExportGetDataUPP(refCon: UnivPtr; var params: MovieExportGetDataParams; userRoutine: MovieExportGetDataUPP): OSErr; external name '_InvokeMovieExportGetDataUPP'; { old name was CallMovieExportGetDataProc }
+{
+ * InvokeMovieExportGetPropertyUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeMovieExportGetPropertyUPP(refcon: UnivPtr; trackID: SInt32; propertyType: OSType; propertyValue: UnivPtr; userRoutine: MovieExportGetPropertyUPP): OSErr; external name '_InvokeMovieExportGetPropertyUPP'; { old name was CallMovieExportGetPropertyProc }
+{
+ * MovieImportHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportHandle(ci: MovieImportComponent; dataH: Handle; theMovie: Movie; targetTrack: Track; var usedTrack: Track; atTime: TimeValue; var addedDuration: TimeValue; inFlags: SInt32; var outFlags: SInt32): ComponentResult; external name '_MovieImportHandle';
+{
+ * MovieImportFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportFile(ci: MovieImportComponent; const (*var*) theFile: FSSpec; theMovie: Movie; targetTrack: Track; var usedTrack: Track; atTime: TimeValue; var addedDuration: TimeValue; inFlags: SInt32; var outFlags: SInt32): ComponentResult; external name '_MovieImportFile';
+{
+ * MovieImportSetSampleDuration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportSetSampleDuration(ci: MovieImportComponent; duration: TimeValue; scale: TimeScale): ComponentResult; external name '_MovieImportSetSampleDuration';
+{
+ * MovieImportSetSampleDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportSetSampleDescription(ci: MovieImportComponent; desc: SampleDescriptionHandle; mediaType: OSType): ComponentResult; external name '_MovieImportSetSampleDescription';
+{
+ * MovieImportSetMediaFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportSetMediaFile(ci: MovieImportComponent; alias: AliasHandle): ComponentResult; external name '_MovieImportSetMediaFile';
+{
+ * MovieImportSetDimensions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportSetDimensions(ci: MovieImportComponent; width: Fixed; height: Fixed): ComponentResult; external name '_MovieImportSetDimensions';
+{
+ * MovieImportSetChunkSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportSetChunkSize(ci: MovieImportComponent; chunkSize: SInt32): ComponentResult; external name '_MovieImportSetChunkSize';
+{
+ * MovieImportSetProgressProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportSetProgressProc(ci: MovieImportComponent; proc: MovieProgressUPP; refcon: SInt32): ComponentResult; external name '_MovieImportSetProgressProc';
+{
+ * MovieImportSetAuxiliaryData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportSetAuxiliaryData(ci: MovieImportComponent; data: Handle; handleType: OSType): ComponentResult; external name '_MovieImportSetAuxiliaryData';
+{
+ * MovieImportSetFromScrap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportSetFromScrap(ci: MovieImportComponent; fromScrap: boolean): ComponentResult; external name '_MovieImportSetFromScrap';
+{
+ * MovieImportDoUserDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportDoUserDialog(ci: MovieImportComponent; const (*var*) theFile: FSSpec; theData: Handle; var canceled: boolean): ComponentResult; external name '_MovieImportDoUserDialog';
+{
+ * MovieImportSetDuration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportSetDuration(ci: MovieImportComponent; duration: TimeValue): ComponentResult; external name '_MovieImportSetDuration';
+{
+ * MovieImportGetAuxiliaryDataType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportGetAuxiliaryDataType(ci: MovieImportComponent; var auxType: OSType): ComponentResult; external name '_MovieImportGetAuxiliaryDataType';
+{
+ * MovieImportValidate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportValidate(ci: MovieImportComponent; const (*var*) theFile: FSSpec; theData: Handle; var valid: boolean): ComponentResult; external name '_MovieImportValidate';
+{
+ * MovieImportGetFileType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportGetFileType(ci: MovieImportComponent; var fileType: OSType): ComponentResult; external name '_MovieImportGetFileType';
+{
+ * MovieImportDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportDataRef(ci: MovieImportComponent; dataRef: Handle; dataRefType: OSType; theMovie: Movie; targetTrack: Track; var usedTrack: Track; atTime: TimeValue; var addedDuration: TimeValue; inFlags: SInt32; var outFlags: SInt32): ComponentResult; external name '_MovieImportDataRef';
+{
+ * MovieImportGetSampleDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportGetSampleDescription(ci: MovieImportComponent; var desc: SampleDescriptionHandle; var mediaType: OSType): ComponentResult; external name '_MovieImportGetSampleDescription';
+{
+ * MovieImportGetMIMETypeList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportGetMIMETypeList(ci: MovieImportComponent; var mimeInfo: QTAtomContainer): ComponentResult; external name '_MovieImportGetMIMETypeList';
+{
+ * MovieImportSetOffsetAndLimit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportSetOffsetAndLimit(ci: MovieImportComponent; offset: UInt32; limit: UInt32): ComponentResult; external name '_MovieImportSetOffsetAndLimit';
+{
+ * MovieImportGetSettingsAsAtomContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportGetSettingsAsAtomContainer(ci: MovieImportComponent; var settings: QTAtomContainer): ComponentResult; external name '_MovieImportGetSettingsAsAtomContainer';
+{
+ * MovieImportSetSettingsFromAtomContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieImportSetSettingsFromAtomContainer(ci: MovieImportComponent; settings: QTAtomContainer): ComponentResult; external name '_MovieImportSetSettingsFromAtomContainer';
+{
+ * MovieImportSetOffsetAndLimit64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MovieImportSetOffsetAndLimit64(ci: MovieImportComponent; const (*var*) offset: wide; const (*var*) limit: wide): ComponentResult; external name '_MovieImportSetOffsetAndLimit64';
+{
+ * MovieImportIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MovieImportIdle(ci: MovieImportComponent; inFlags: SInt32; var outFlags: SInt32): ComponentResult; external name '_MovieImportIdle';
+{
+ * MovieImportValidateDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MovieImportValidateDataRef(ci: MovieImportComponent; dataRef: Handle; dataRefType: OSType; var valid: UInt8): ComponentResult; external name '_MovieImportValidateDataRef';
+{
+ * MovieImportGetLoadState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function MovieImportGetLoadState(ci: MovieImportComponent; var importerLoadState: SInt32): ComponentResult; external name '_MovieImportGetLoadState';
+{
+ * MovieImportGetMaxLoadedTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function MovieImportGetMaxLoadedTime(ci: MovieImportComponent; var time: TimeValue): ComponentResult; external name '_MovieImportGetMaxLoadedTime';
+{
+ * MovieImportEstimateCompletionTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function MovieImportEstimateCompletionTime(ci: MovieImportComponent; var time: TimeRecord): ComponentResult; external name '_MovieImportEstimateCompletionTime';
+{
+ * MovieImportSetDontBlock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function MovieImportSetDontBlock(ci: MovieImportComponent; dontBlock: boolean): ComponentResult; external name '_MovieImportSetDontBlock';
+{
+ * MovieImportGetDontBlock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function MovieImportGetDontBlock(ci: MovieImportComponent; var willBlock: boolean): ComponentResult; external name '_MovieImportGetDontBlock';
+{
+ * MovieImportSetIdleManager()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function MovieImportSetIdleManager(ci: MovieImportComponent; im: IdleManager): ComponentResult; external name '_MovieImportSetIdleManager';
+{
+ * MovieImportSetNewMovieFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function MovieImportSetNewMovieFlags(ci: MovieImportComponent; newMovieFlags: SInt32): ComponentResult; external name '_MovieImportSetNewMovieFlags';
+{
+ * MovieImportGetDestinationMediaType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function MovieImportGetDestinationMediaType(ci: MovieImportComponent; var mediaType: OSType): ComponentResult; external name '_MovieImportGetDestinationMediaType';
+{
+ * MovieExportToHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportToHandle(ci: MovieExportComponent; dataH: Handle; theMovie: Movie; onlyThisTrack: Track; startTime: TimeValue; duration: TimeValue): ComponentResult; external name '_MovieExportToHandle';
+{
+ * MovieExportToFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportToFile(ci: MovieExportComponent; const (*var*) theFile: FSSpec; theMovie: Movie; onlyThisTrack: Track; startTime: TimeValue; duration: TimeValue): ComponentResult; external name '_MovieExportToFile';
+{
+ * MovieExportGetAuxiliaryData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportGetAuxiliaryData(ci: MovieExportComponent; dataH: Handle; var handleType: OSType): ComponentResult; external name '_MovieExportGetAuxiliaryData';
+{
+ * MovieExportSetProgressProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportSetProgressProc(ci: MovieExportComponent; proc: MovieProgressUPP; refcon: SInt32): ComponentResult; external name '_MovieExportSetProgressProc';
+{
+ * MovieExportSetSampleDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportSetSampleDescription(ci: MovieExportComponent; desc: SampleDescriptionHandle; mediaType: OSType): ComponentResult; external name '_MovieExportSetSampleDescription';
+{
+ * MovieExportDoUserDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportDoUserDialog(ci: MovieExportComponent; theMovie: Movie; onlyThisTrack: Track; startTime: TimeValue; duration: TimeValue; var canceled: boolean): ComponentResult; external name '_MovieExportDoUserDialog';
+{
+ * MovieExportGetCreatorType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportGetCreatorType(ci: MovieExportComponent; var creator: OSType): ComponentResult; external name '_MovieExportGetCreatorType';
+{
+ * MovieExportToDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportToDataRef(ci: MovieExportComponent; dataRef: Handle; dataRefType: OSType; theMovie: Movie; onlyThisTrack: Track; startTime: TimeValue; duration: TimeValue): ComponentResult; external name '_MovieExportToDataRef';
+{
+ * MovieExportFromProceduresToDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportFromProceduresToDataRef(ci: MovieExportComponent; dataRef: Handle; dataRefType: OSType): ComponentResult; external name '_MovieExportFromProceduresToDataRef';
+{
+ * MovieExportAddDataSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportAddDataSource(ci: MovieExportComponent; trackType: OSType; scale: TimeScale; var trackID: SInt32; getPropertyProc: MovieExportGetPropertyUPP; getDataProc: MovieExportGetDataUPP; refCon: UnivPtr): ComponentResult; external name '_MovieExportAddDataSource';
+{
+ * MovieExportValidate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportValidate(ci: MovieExportComponent; theMovie: Movie; onlyThisTrack: Track; var valid: boolean): ComponentResult; external name '_MovieExportValidate';
+{
+ * MovieExportGetSettingsAsAtomContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportGetSettingsAsAtomContainer(ci: MovieExportComponent; var settings: QTAtomContainer): ComponentResult; external name '_MovieExportGetSettingsAsAtomContainer';
+{
+ * MovieExportSetSettingsFromAtomContainer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportSetSettingsFromAtomContainer(ci: MovieExportComponent; settings: QTAtomContainer): ComponentResult; external name '_MovieExportSetSettingsFromAtomContainer';
+{
+ * MovieExportGetFileNameExtension()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportGetFileNameExtension(ci: MovieExportComponent; var extension: OSType): ComponentResult; external name '_MovieExportGetFileNameExtension';
+{
+ * MovieExportGetShortFileTypeString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportGetShortFileTypeString(ci: MovieExportComponent; var typeString: Str255): ComponentResult; external name '_MovieExportGetShortFileTypeString';
+{
+ * MovieExportGetSourceMediaType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportGetSourceMediaType(ci: MovieExportComponent; var mediaType: OSType): ComponentResult; external name '_MovieExportGetSourceMediaType';
+{
+ * MovieExportSetGetMoviePropertyProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function MovieExportSetGetMoviePropertyProc(ci: MovieExportComponent; getPropertyProc: MovieExportGetPropertyUPP; refCon: UnivPtr): ComponentResult; external name '_MovieExportSetGetMoviePropertyProc';
+{ Text Export Display Info data structure }
+
+type
+ TextDisplayDataPtr = ^TextDisplayData;
+ TextDisplayData = record
+ displayFlags: SInt32;
+ textJustification: SInt32;
+ bgColor: RGBColor;
+ textBox: Rect;
+ beginHilite: SInt16;
+ endHilite: SInt16;
+ hiliteColor: RGBColor;
+ doHiliteColor: boolean;
+ filler: SInt8;
+ scrollDelayDur: TimeValue;
+ dropShadowOffset: Point;
+ dropShadowTransparency: SInt16;
+ end;
+
+ TextExportComponent = ComponentInstance;
+ GraphicImageMovieImportComponent = ComponentInstance;
+ {
+ * TextExportGetDisplayData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TextExportGetDisplayData(ci: TextExportComponent; var textDisplay: TextDisplayData): ComponentResult; external name '_TextExportGetDisplayData';
+{
+ * TextExportGetTimeFraction()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TextExportGetTimeFraction(ci: TextExportComponent; var movieTimeFraction: SInt32): ComponentResult; external name '_TextExportGetTimeFraction';
+{
+ * TextExportSetTimeFraction()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TextExportSetTimeFraction(ci: TextExportComponent; movieTimeFraction: SInt32): ComponentResult; external name '_TextExportSetTimeFraction';
+{
+ * TextExportGetSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TextExportGetSettings(ci: TextExportComponent; var setting: SInt32): ComponentResult; external name '_TextExportGetSettings';
+{
+ * TextExportSetSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function TextExportSetSettings(ci: TextExportComponent; setting: SInt32): ComponentResult; external name '_TextExportSetSettings';
+{
+ * MIDIImportGetSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MIDIImportGetSettings(ci: TextExportComponent; var setting: SInt32): ComponentResult; external name '_MIDIImportGetSettings';
+{
+ * MIDIImportSetSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MIDIImportSetSettings(ci: TextExportComponent; setting: SInt32): ComponentResult; external name '_MIDIImportSetSettings';
+{
+ * MovieExportNewGetDataAndPropertiesProcs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportNewGetDataAndPropertiesProcs(ci: MovieExportComponent; trackType: OSType; var scale: TimeScale; theMovie: Movie; theTrack: Track; startTime: TimeValue; duration: TimeValue; var getPropertyProc: MovieExportGetPropertyUPP; var getDataProc: MovieExportGetDataUPP; var refCon: UnivPtr): ComponentResult; external name '_MovieExportNewGetDataAndPropertiesProcs';
+{
+ * MovieExportDisposeGetDataAndPropertiesProcs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function MovieExportDisposeGetDataAndPropertiesProcs(ci: MovieExportComponent; getPropertyProc: MovieExportGetPropertyUPP; getDataProc: MovieExportGetDataUPP; refCon: UnivPtr): ComponentResult; external name '_MovieExportDisposeGetDataAndPropertiesProcs';
+const
+ movieExportUseConfiguredSettings = $75636667 (* 'ucfg' *); { pointer to Boolean }
+ movieExportWidth = $77647468 (* 'wdth' *); { pointer to Fixed }
+ movieExportHeight = $68656774 (* 'hegt' *); { pointer to Fixed }
+ movieExportDuration = $64757261 (* 'dura' *); { pointer to TimeRecord }
+ movieExportVideoFilter = $69666C74 (* 'iflt' *); { pointer to QTAtomContainer }
+ movieExportTimeScale = $746D7363 (* 'tmsc' *); { pointer to TimeScale }
+
+ {
+ * GraphicsImageImportSetSequenceEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImageImportSetSequenceEnabled(ci: GraphicImageMovieImportComponent; enable: boolean): ComponentResult; external name '_GraphicsImageImportSetSequenceEnabled';
+{
+ * GraphicsImageImportGetSequenceEnabled()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function GraphicsImageImportGetSequenceEnabled(ci: GraphicImageMovieImportComponent; var enable: boolean): ComponentResult; external name '_GraphicsImageImportGetSequenceEnabled';
+{----------------------------'brws' ¥ browser prefs configuration info ------------------------}
+
+const
+ kQTBrowserInfoCanUseSystemFolderPlugin = $00000001; { Mac browser can use plug-in from System "Internet Plug-ins" folder }
+
+
+ kQTPreFlightOpenComponent = $00000002; { Open component as preflight check }
+
+
+type
+ ComponentPreflightFlagsPtr = ^ComponentPreflightFlags;
+ ComponentPreflightFlags = record
+ flags: SInt32;
+ end;
+
+
+ { **************
+
+ File Preview Components
+
+ ************** }
+ pnotComponent = ComponentInstance;
+
+const
+ pnotComponentWantsEvents = 1;
+ pnotComponentNeedsNoCache = 2;
+
+ ShowFilePreviewComponentType = $706E6F74 (* 'pnot' *);
+ CreateFilePreviewComponentType = $706D616B (* 'pmak' *);
+
+ {
+ * PreviewShowData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function PreviewShowData(p: pnotComponent; dataType: OSType; data: Handle; const (*var*) inHere: Rect): ComponentResult; external name '_PreviewShowData';
+{
+ * PreviewMakePreview()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function PreviewMakePreview(p: pnotComponent; var previewType: OSType; var previewResult: Handle; const (*var*) sourceFile: FSSpec; progress: ICMProgressProcRecordPtr): ComponentResult; external name '_PreviewMakePreview';
+{
+ * PreviewMakePreviewReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function PreviewMakePreviewReference(p: pnotComponent; var previewType: OSType; var resID: SInt16; const (*var*) sourceFile: FSSpec): ComponentResult; external name '_PreviewMakePreviewReference';
+{
+ * PreviewEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function PreviewEvent(p: pnotComponent; var e: EventRecord; var handledEvent: boolean): ComponentResult; external name '_PreviewEvent';
+type
+ DataCompressorComponent = ComponentInstance;
+ DataDecompressorComponent = ComponentInstance;
+ DataCodecComponent = ComponentInstance;
+
+const
+ DataCompressorComponentType = $64636F6D (* 'dcom' *);
+ DataDecompressorComponentType = $64646563 (* 'ddec' *);
+ AppleDataCompressorSubType = $61646563 (* 'adec' *);
+ zlibDataCompressorSubType = $7A6C6962 (* 'zlib' *);
+
+
+ { * These are DataCodec procedures * }
+ {
+ * DataCodecDecompress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataCodecDecompress(dc: DataCodecComponent; srcData: UnivPtr; srcSize: UInt32; dstData: UnivPtr; dstBufferSize: UInt32): ComponentResult; external name '_DataCodecDecompress';
+{
+ * DataCodecGetCompressBufferSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataCodecGetCompressBufferSize(dc: DataCodecComponent; srcSize: UInt32; var dstSize: UInt32): ComponentResult; external name '_DataCodecGetCompressBufferSize';
+{
+ * DataCodecCompress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataCodecCompress(dc: DataCodecComponent; srcData: UnivPtr; srcSize: UInt32; dstData: UnivPtr; dstBufferSize: UInt32; var actualDstSize: UInt32; var decompressSlop: UInt32): ComponentResult; external name '_DataCodecCompress';
+{
+ * DataCodecBeginInterruptSafe()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataCodecBeginInterruptSafe(dc: DataCodecComponent; maxSrcSize: UInt32): ComponentResult; external name '_DataCodecBeginInterruptSafe';
+{
+ * DataCodecEndInterruptSafe()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataCodecEndInterruptSafe(dc: DataCodecComponent): ComponentResult; external name '_DataCodecEndInterruptSafe';
+{
+ * DataCodecDecompressPartial()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataCodecDecompressPartial(dc: DataCodecComponent; var next_in: UnivPtr; var avail_in: UInt32; var total_in: UInt32; var next_out: UnivPtr; var avail_out: UInt32; var total_out: UInt32; var didFinish: boolean): ComponentResult; external name '_DataCodecDecompressPartial';
+{
+ * DataCodecCompressPartial()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataCodecCompressPartial(dc: DataCodecComponent; var next_in: UnivPtr; var avail_in: UInt32; var total_in: UInt32; var next_out: UnivPtr; var avail_out: UInt32; var total_out: UInt32; tryToFinish: boolean; var didFinish: boolean): ComponentResult; external name '_DataCodecCompressPartial';
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ DataHCompletionProcPtr = procedure(request: Ptr; refcon: SInt32; err: OSErr);
+{$elsec}
+ DataHCompletionProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ DataHCompletionUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ DataHCompletionUPP = UniversalProcPtr;
+{$endc}
+
+
+const
+ kDataHCanRead = $00000001;
+ kDataHSpecialRead = $00000002;
+ kDataHSpecialReadFile = $00000004;
+ kDataHCanWrite = $00000008;
+ kDataHSpecialWrite = $10;
+ kDataHSpecialWriteFile = $20;
+ kDataHCanStreamingWrite = $40;
+ kDataHMustCheckDataRef = $80;
+
+ { Data reference records for specific data ref types }
+
+type
+ HandleDataRefRecordPtr = ^HandleDataRefRecord;
+ HandleDataRefRecord = record
+ dataHndl: Handle;
+ end;
+
+ HandleDataRefPtr = ^HandleDataRefRecord;
+ HandleDataRef = ^HandleDataRefPtr;
+ PointerDataRefRecordPtr = ^PointerDataRefRecord;
+ PointerDataRefRecord = record
+ data: Ptr;
+ dataLength: Size;
+ end;
+
+ PointerDataRefPtr = ^PointerDataRefRecord;
+ PointerDataRef = ^PointerDataRefPtr;
+ { Data reference extensions }
+
+const
+ kDataRefExtensionChokeSpeed = $63686F6B (* 'chok' *);
+ kDataRefExtensionFileName = $666E616D (* 'fnam' *);
+ kDataRefExtensionMIMEType = $6D696D65 (* 'mime' *);
+ kDataRefExtensionMacOSFileType = $66747970 (* 'ftyp' *);
+ kDataRefExtensionInitializationData = $64617461 (* 'data' *);
+ kDataRefExtensionQuickTimeMediaType = $6D747970 (* 'mtyp' *);
+
+ kDataHChokeToMovieDataRate = $01; { param is 0 }
+ kDataHChokeToParam = $02; { param is bytes per second }
+
+
+type
+ DataHChokeAtomRecordPtr = ^DataHChokeAtomRecord;
+ DataHChokeAtomRecord = record
+ flags: SInt32; { one of kDataHChokeTo constants }
+ param: SInt32;
+ end;
+
+
+ DataHVolumeListRecordPtr = ^DataHVolumeListRecord;
+ DataHVolumeListRecord = record
+ vRefNum: SInt16;
+ flags: SInt32;
+ end;
+
+ DataHVolumeListPtr = ^DataHVolumeListRecord;
+ DataHVolumeList = ^DataHVolumeListPtr;
+
+const
+ kDataHExtendedSchedule = $78746E64 (* 'xtnd' *);
+
+
+type
+ DataHScheduleRecordPtr = ^DataHScheduleRecord;
+ DataHScheduleRecord = record
+ timeNeededBy: TimeRecord;
+ extendedID: SInt32; { always is kDataHExtendedSchedule }
+ extendedVers: SInt32; { always set to 0 }
+ priority: Fixed; { 100.0 or more means must have. lower numbersÉ }
+ end;
+
+ DataHSchedulePtr = ^DataHScheduleRecord;
+ { Flags for DataHGetInfoFlags }
+
+const
+ kDataHInfoFlagNeverStreams = $01; { set if this data handler doesn't stream }
+ kDataHInfoFlagCanUpdateDataRefs = $02; { set if this data handler might update data reference }
+ kDataHInfoFlagNeedsNetworkBandwidth = $04; { set if this data handler may need to occupy the network }
+
+
+ { Types for DataHGetFileTypeOrdering }
+ kDataHFileTypeMacOSFileType = $66747970 (* 'ftyp' *);
+ kDataHFileTypeExtension = $66657874 (* 'fext' *);
+ kDataHFileTypeMIME = $6D696D65 (* 'mime' *);
+
+
+type
+ DataHFileTypeOrderingPtr = ^OSType;
+ DataHFileTypeOrderingHandle = ^DataHFileTypeOrderingPtr;
+
+ {
+ * DataHGetData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetData(dh: DataHandler; h: Handle; hOffset: SInt32; offset: SInt32; size: SInt32): ComponentResult; external name '_DataHGetData';
+{
+ * DataHPutData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHPutData(dh: DataHandler; h: Handle; hOffset: SInt32; var offset: SInt32; size: SInt32): ComponentResult; external name '_DataHPutData';
+{
+ * DataHFlushData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHFlushData(dh: DataHandler): ComponentResult; external name '_DataHFlushData';
+{
+ * DataHOpenForWrite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHOpenForWrite(dh: DataHandler): ComponentResult; external name '_DataHOpenForWrite';
+{
+ * DataHCloseForWrite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHCloseForWrite(dh: DataHandler): ComponentResult; external name '_DataHCloseForWrite';
+{
+ * DataHOpenForRead()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHOpenForRead(dh: DataHandler): ComponentResult; external name '_DataHOpenForRead';
+{
+ * DataHCloseForRead()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHCloseForRead(dh: DataHandler): ComponentResult; external name '_DataHCloseForRead';
+{
+ * DataHSetDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHSetDataRef(dh: DataHandler; dataRef: Handle): ComponentResult; external name '_DataHSetDataRef';
+{
+ * DataHGetDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetDataRef(dh: DataHandler; var dataRef: Handle): ComponentResult; external name '_DataHGetDataRef';
+{
+ * DataHCompareDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHCompareDataRef(dh: DataHandler; dataRef: Handle; var equal: boolean): ComponentResult; external name '_DataHCompareDataRef';
+{
+ * DataHTask()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHTask(dh: DataHandler): ComponentResult; external name '_DataHTask';
+{
+ * DataHScheduleData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHScheduleData(dh: DataHandler; PlaceToPutDataPtr: Ptr; FileOffset: SInt32; DataSize: SInt32; RefCon: SInt32; scheduleRec: DataHSchedulePtr; CompletionRtn: DataHCompletionUPP): ComponentResult; external name '_DataHScheduleData';
+{
+ * DataHFinishData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHFinishData(dh: DataHandler; PlaceToPutDataPtr: Ptr; Cancel: boolean): ComponentResult; external name '_DataHFinishData';
+{
+ * DataHFlushCache()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHFlushCache(dh: DataHandler): ComponentResult; external name '_DataHFlushCache';
+{
+ * DataHResolveDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHResolveDataRef(dh: DataHandler; theDataRef: Handle; var wasChanged: boolean; userInterfaceAllowed: boolean): ComponentResult; external name '_DataHResolveDataRef';
+{
+ * DataHGetFileSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetFileSize(dh: DataHandler; var fileSize: SInt32): ComponentResult; external name '_DataHGetFileSize';
+{
+ * DataHCanUseDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHCanUseDataRef(dh: DataHandler; dataRef: Handle; var useFlags: SInt32): ComponentResult; external name '_DataHCanUseDataRef';
+{
+ * DataHGetVolumeList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetVolumeList(dh: DataHandler; var volumeList: DataHVolumeList): ComponentResult; external name '_DataHGetVolumeList';
+{
+ * DataHWrite()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHWrite(dh: DataHandler; data: Ptr; offset: SInt32; size: SInt32; completion: DataHCompletionUPP; refCon: SInt32): ComponentResult; external name '_DataHWrite';
+{
+ * DataHPreextend()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHPreextend(dh: DataHandler; maxToAdd: UInt32; var spaceAdded: UInt32): ComponentResult; external name '_DataHPreextend';
+{
+ * DataHSetFileSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHSetFileSize(dh: DataHandler; fileSize: SInt32): ComponentResult; external name '_DataHSetFileSize';
+{
+ * DataHGetFreeSpace()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetFreeSpace(dh: DataHandler; var freeSize: UInt32): ComponentResult; external name '_DataHGetFreeSpace';
+{
+ * DataHCreateFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHCreateFile(dh: DataHandler; creator: OSType; deleteExisting: boolean): ComponentResult; external name '_DataHCreateFile';
+{
+ * DataHGetPreferredBlockSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetPreferredBlockSize(dh: DataHandler; var blockSize: SInt32): ComponentResult; external name '_DataHGetPreferredBlockSize';
+{
+ * DataHGetDeviceIndex()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetDeviceIndex(dh: DataHandler; var deviceIndex: SInt32): ComponentResult; external name '_DataHGetDeviceIndex';
+{
+ * DataHIsStreamingDataHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHIsStreamingDataHandler(dh: DataHandler; var yes: boolean): ComponentResult; external name '_DataHIsStreamingDataHandler';
+{
+ * DataHGetDataInBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetDataInBuffer(dh: DataHandler; startOffset: SInt32; var size: SInt32): ComponentResult; external name '_DataHGetDataInBuffer';
+{
+ * DataHGetScheduleAheadTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetScheduleAheadTime(dh: DataHandler; var millisecs: SInt32): ComponentResult; external name '_DataHGetScheduleAheadTime';
+{
+ * DataHSetCacheSizeLimit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHSetCacheSizeLimit(dh: DataHandler; cacheSizeLimit: Size): ComponentResult; external name '_DataHSetCacheSizeLimit';
+{
+ * DataHGetCacheSizeLimit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetCacheSizeLimit(dh: DataHandler; var cacheSizeLimit: Size): ComponentResult; external name '_DataHGetCacheSizeLimit';
+{
+ * DataHGetMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetMovie(dh: DataHandler; var theMovie: Movie; var id: SInt16): ComponentResult; external name '_DataHGetMovie';
+{
+ * DataHAddMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHAddMovie(dh: DataHandler; theMovie: Movie; var id: SInt16): ComponentResult; external name '_DataHAddMovie';
+{
+ * DataHUpdateMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHUpdateMovie(dh: DataHandler; theMovie: Movie; id: SInt16): ComponentResult; external name '_DataHUpdateMovie';
+{
+ * DataHDoesBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHDoesBuffer(dh: DataHandler; var buffersReads: boolean; var buffersWrites: boolean): ComponentResult; external name '_DataHDoesBuffer';
+{
+ * DataHGetFileName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetFileName(dh: DataHandler; var str: Str255): ComponentResult; external name '_DataHGetFileName';
+{
+ * DataHGetAvailableFileSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetAvailableFileSize(dh: DataHandler; var fileSize: SInt32): ComponentResult; external name '_DataHGetAvailableFileSize';
+{
+ * DataHGetMacOSFileType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetMacOSFileType(dh: DataHandler; var fileType: OSType): ComponentResult; external name '_DataHGetMacOSFileType';
+{
+ * DataHGetMIMEType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetMIMEType(dh: DataHandler; var mimeType: Str255): ComponentResult; external name '_DataHGetMIMEType';
+{
+ * DataHSetDataRefWithAnchor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHSetDataRefWithAnchor(dh: DataHandler; anchorDataRef: Handle; dataRefType: OSType; dataRef: Handle): ComponentResult; external name '_DataHSetDataRefWithAnchor';
+{
+ * DataHGetDataRefWithAnchor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHGetDataRefWithAnchor(dh: DataHandler; anchorDataRef: Handle; dataRefType: OSType; var dataRef: Handle): ComponentResult; external name '_DataHGetDataRefWithAnchor';
+{
+ * DataHSetMacOSFileType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHSetMacOSFileType(dh: DataHandler; fileType: OSType): ComponentResult; external name '_DataHSetMacOSFileType';
+{
+ * DataHSetTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHSetTimeBase(dh: DataHandler; tb: TimeBase): ComponentResult; external name '_DataHSetTimeBase';
+{
+ * DataHGetInfoFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function DataHGetInfoFlags(dh: DataHandler; var flags: UInt32): ComponentResult; external name '_DataHGetInfoFlags';
+{
+ * DataHScheduleData64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function DataHScheduleData64(dh: DataHandler; PlaceToPutDataPtr: Ptr; const (*var*) FileOffset: wide; DataSize: SInt32; RefCon: SInt32; scheduleRec: DataHSchedulePtr; CompletionRtn: DataHCompletionUPP): ComponentResult; external name '_DataHScheduleData64';
+{
+ * DataHWrite64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function DataHWrite64(dh: DataHandler; data: Ptr; const (*var*) offset: wide; size: SInt32; completion: DataHCompletionUPP; refCon: SInt32): ComponentResult; external name '_DataHWrite64';
+{
+ * DataHGetFileSize64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function DataHGetFileSize64(dh: DataHandler; var fileSize: wide): ComponentResult; external name '_DataHGetFileSize64';
+{
+ * DataHPreextend64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function DataHPreextend64(dh: DataHandler; const (*var*) maxToAdd: wide; var spaceAdded: wide): ComponentResult; external name '_DataHPreextend64';
+{
+ * DataHSetFileSize64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function DataHSetFileSize64(dh: DataHandler; const (*var*) fileSize: wide): ComponentResult; external name '_DataHSetFileSize64';
+{
+ * DataHGetFreeSpace64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function DataHGetFreeSpace64(dh: DataHandler; var freeSize: wide): ComponentResult; external name '_DataHGetFreeSpace64';
+{
+ * DataHAppend64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function DataHAppend64(dh: DataHandler; data: UnivPtr; var fileOffset: wide; size: UInt32): ComponentResult; external name '_DataHAppend64';
+{
+ * DataHReadAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function DataHReadAsync(dh: DataHandler; dataPtr: UnivPtr; dataSize: UInt32; const (*var*) dataOffset: wide; completion: DataHCompletionUPP; refCon: SInt32): ComponentResult; external name '_DataHReadAsync';
+{
+ * DataHPollRead()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function DataHPollRead(dh: DataHandler; dataPtr: UnivPtr; var dataSizeSoFar: UInt32): ComponentResult; external name '_DataHPollRead';
+{
+ * DataHGetDataAvailability()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function DataHGetDataAvailability(dh: DataHandler; offset: SInt32; len: SInt32; var missing_offset: SInt32; var missing_len: SInt32): ComponentResult; external name '_DataHGetDataAvailability';
+{
+ * DataHGetFileSizeAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function DataHGetFileSizeAsync(dh: DataHandler; var fileSize: wide; completionRtn: DataHCompletionUPP; refCon: SInt32): ComponentResult; external name '_DataHGetFileSizeAsync';
+{
+ * DataHGetDataRefAsType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function DataHGetDataRefAsType(dh: DataHandler; requestedType: OSType; var dataRef: Handle): ComponentResult; external name '_DataHGetDataRefAsType';
+{
+ * DataHSetDataRefExtension()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function DataHSetDataRefExtension(dh: DataHandler; extension: Handle; idType: OSType): ComponentResult; external name '_DataHSetDataRefExtension';
+{
+ * DataHGetDataRefExtension()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function DataHGetDataRefExtension(dh: DataHandler; var extension: Handle; idType: OSType): ComponentResult; external name '_DataHGetDataRefExtension';
+{
+ * DataHGetMovieWithFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function DataHGetMovieWithFlags(dh: DataHandler; var theMovie: Movie; var id: SInt16; flags: SInt16): ComponentResult; external name '_DataHGetMovieWithFlags';
+{
+ * DataHGetFileTypeOrdering()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function DataHGetFileTypeOrdering(dh: DataHandler; var orderingListHandle: DataHFileTypeOrderingHandle): ComponentResult; external name '_DataHGetFileTypeOrdering';
+{ flags for DataHCreateFileWithFlags }
+
+const
+ kDataHCreateFileButDontCreateResFile = $00000001;
+
+ {
+ * DataHCreateFileWithFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function DataHCreateFileWithFlags(dh: DataHandler; creator: OSType; deleteExisting: boolean; flags: UInt32): ComponentResult; external name '_DataHCreateFileWithFlags';
+{
+ * DataHGetMIMETypeAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function DataHGetMIMETypeAsync(dh: DataHandler; var mimeType: Str255; completionRtn: DataHCompletionUPP; refCon: SInt32): ComponentResult; external name '_DataHGetMIMETypeAsync';
+{
+ * DataHGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0.1 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.1 and later
+ * Windows: in qtmlClient.lib 5.0.1 and later
+ }
+function DataHGetInfo(dh: DataHandler; what: OSType; info: UnivPtr): ComponentResult; external name '_DataHGetInfo';
+{
+ * DataHSetIdleManager()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function DataHSetIdleManager(dh: DataHandler; im: IdleManager): ComponentResult; external name '_DataHSetIdleManager';
+{
+ * DataHDeleteFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function DataHDeleteFile(dh: DataHandler): ComponentResult; external name '_DataHDeleteFile';
+const
+ kDataHMovieUsageDoAppendMDAT = $00000001; { if set, datahandler should append wide and mdat atoms in append call }
+
+ {
+ * DataHSetMovieUsageFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function DataHSetMovieUsageFlags(dh: DataHandler; flags: SInt32): ComponentResult; external name '_DataHSetMovieUsageFlags';
+const
+ kDataHTempUseSameDirectory = $00000001; { temp data ref should be in same directory as current data ref (vs. in temporary directory) }
+ kDataHTempUseSameVolume = $00000002; { temp data ref should be on same volume as current data ref (vs. find "best" volume) }
+ kDataHTempCreateFile = $00000004; { create the file }
+ kDataHTempOpenFile = $00000008; { open temporary file for write (kDataHTempCreateFile must be passed, too) }
+
+ {
+ * DataHUseTemporaryDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function DataHUseTemporaryDataRef(dh: DataHandler; inFlags: SInt32): ComponentResult; external name '_DataHUseTemporaryDataRef';
+{
+ * DataHGetTemporaryDataRefCapabilities()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function DataHGetTemporaryDataRefCapabilities(dh: DataHandler; var outUnderstoodFlags: SInt32): ComponentResult; external name '_DataHGetTemporaryDataRefCapabilities';
+{
+ * DataHRenameFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function DataHRenameFile(dh: DataHandler; newDataRef: Handle): ComponentResult; external name '_DataHRenameFile';
+{
+ * DataHPlaybackHints()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function DataHPlaybackHints(dh: DataHandler; flags: SInt32; minFileOffset: UInt32; maxFileOffset: UInt32; bytesPerSecond: SInt32): ComponentResult; external name '_DataHPlaybackHints';
+{
+ * DataHPlaybackHints64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.1 and later
+ }
+function DataHPlaybackHints64(dh: DataHandler; flags: SInt32; const (*var*) minFileOffset: wide; const (*var*) maxFileOffset: wide; bytesPerSecond: SInt32): ComponentResult; external name '_DataHPlaybackHints64';
+{ Symbolic constants for DataHGetDataRate }
+
+const
+ kDataHGetDataRateInfiniteRate = $7FFFFFFF; { all the data arrived instantaneously }
+
+ {
+ * DataHGetDataRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function DataHGetDataRate(dh: DataHandler; flags: SInt32; var bytesPerSecond: SInt32): ComponentResult; external name '_DataHGetDataRate';
+{ Flags for DataHSetTimeHints }
+
+const
+ kDataHSetTimeHintsSkipBandwidthRequest = $01; { set if this data handler should use the network without requesting bandwidth }
+
+ {
+ * DataHSetTimeHints()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function DataHSetTimeHints(dh: DataHandler; flags: SInt32; bandwidthPriority: SInt32; scale: TimeScale; minTime: TimeValue; maxTime: TimeValue): ComponentResult; external name '_DataHSetTimeHints';
+{ Standard type for video digitizers }
+
+const
+ videoDigitizerComponentType = $76646967 (* 'vdig' *);
+ vdigInterfaceRev = 2;
+
+ { Input Format Standards }
+ ntscIn = 0; { current input format }
+ currentIn = 0; { ntsc input format }
+ palIn = 1; { pal input format }
+ secamIn = 2; { secam input format }
+ ntscReallyIn = 3; { ntsc input format }
+
+ { Input Formats }
+ compositeIn = 0; { input is composite format }
+ sVideoIn = 1; { input is sVideo format }
+ rgbComponentIn = 2; { input is rgb component format }
+ rgbComponentSyncIn = 3; { input is rgb component format (sync on green?) }
+ yuvComponentIn = 4; { input is yuv component format }
+ yuvComponentSyncIn = 5; { input is yuv component format (sync on green?) }
+ tvTunerIn = 6;
+ sdiIn = 7;
+
+
+ { Video Digitizer PlayThru States }
+ vdPlayThruOff = 0;
+ vdPlayThruOn = 1;
+
+ { Input Color Space Modes }
+ vdDigitizerBW = 0; { black and white }
+ vdDigitizerRGB = 1; { rgb color }
+
+ { Phase Lock Loop Modes }
+ vdBroadcastMode = 0; { Broadcast / Laser Disk video mode }
+ vdVTRMode = 1; { VCR / Magnetic media mode }
+
+ { Field Select Options }
+ vdUseAnyField = 0; { Digitizers choice on field use }
+ vdUseOddField = 1; { Use odd field for half size vert and smaller }
+ vdUseEvenField = 2; { Use even field for half size vert and smaller }
+
+ { vdig types }
+ vdTypeBasic = 0; { basic, no clipping }
+ vdTypeAlpha = 1; { supports clipping with alpha channel }
+ vdTypeMask = 2; { supports clipping with mask plane }
+ vdTypeKey = 3; { supports clipping with key color(s) }
+
+
+ { Digitizer Input Capability/Current Flags }
+ digiInDoesNTSC = $00000001; { digitizer supports NTSC input format }
+ digiInDoesPAL = $00000002; { digitizer supports PAL input format }
+ digiInDoesSECAM = $00000004; { digitizer supports SECAM input format }
+ digiInDoesGenLock = $00000080; { digitizer does genlock }
+ digiInDoesComposite = $00000100; { digitizer supports composite input type }
+ digiInDoesSVideo = $00000200; { digitizer supports S-Video input type }
+ digiInDoesComponent = $00000400; { digitizer supports component = rgb, input type }
+ digiInVTR_Broadcast = $00000800; { digitizer can differentiate between the two }
+ digiInDoesColor = $00001000; { digitizer supports color }
+ digiInDoesBW = $00002000; { digitizer supports black & white }
+ { Digitizer Input Current Flags = these are valid only during active operating conditions, }
+ digiInSignalLock = $80000000; { digitizer detects input signal is locked, this bit = horiz lock || vertical lock }
+
+
+ { Digitizer Output Capability/Current Flags }
+ digiOutDoes1 = $00000001; { digitizer supports 1 bit pixels }
+ digiOutDoes2 = $00000002; { digitizer supports 2 bit pixels }
+ digiOutDoes4 = $00000004; { digitizer supports 4 bit pixels }
+ digiOutDoes8 = $00000008; { digitizer supports 8 bit pixels }
+ digiOutDoes16 = $00000010; { digitizer supports 16 bit pixels }
+ digiOutDoes32 = $00000020; { digitizer supports 32 bit pixels }
+ digiOutDoesDither = $00000040; { digitizer dithers in indexed modes }
+ digiOutDoesStretch = $00000080; { digitizer can arbitrarily stretch }
+ digiOutDoesShrink = $00000100; { digitizer can arbitrarily shrink }
+ digiOutDoesMask = $00000200; { digitizer can mask to clipping regions }
+ digiOutDoesDouble = $00000800; { digitizer can stretch to exactly double size }
+ digiOutDoesQuad = $00001000; { digitizer can stretch exactly quadruple size }
+ digiOutDoesQuarter = $00002000; { digitizer can shrink to exactly quarter size }
+ digiOutDoesSixteenth = $00004000; { digitizer can shrink to exactly sixteenth size }
+ digiOutDoesRotate = $00008000; { digitizer supports rotate transformations }
+ digiOutDoesHorizFlip = $00010000; { digitizer supports horizontal flips Sx < 0 }
+ digiOutDoesVertFlip = $00020000; { digitizer supports vertical flips Sy < 0 }
+ digiOutDoesSkew = $00040000; { digitizer supports skew = shear,twist, }
+ digiOutDoesBlend = $00080000;
+ digiOutDoesWarp = $00100000;
+ digiOutDoesHW_DMA = $00200000; { digitizer not constrained to local device }
+ digiOutDoesHWPlayThru = $00400000; { digitizer doesn't need time to play thru }
+ digiOutDoesILUT = $00800000; { digitizer does inverse LUT for index modes }
+ digiOutDoesKeyColor = $01000000; { digitizer does key color functions too }
+ digiOutDoesAsyncGrabs = $02000000; { digitizer supports async grabs }
+ digiOutDoesUnreadableScreenBits = $04000000; { playthru doesn't generate readable bits on screen }
+ digiOutDoesCompress = $08000000; { supports alternate output data types }
+ digiOutDoesCompressOnly = $10000000; { can't provide raw frames anywhere }
+ digiOutDoesPlayThruDuringCompress = $20000000; { digi can do playthru while providing compressed data }
+ digiOutDoesCompressPartiallyVisible = $40000000; { digi doesn't need all bits visible on screen to do hardware compress }
+ digiOutDoesNotNeedCopyOfCompressData = $80000000; { digi doesn't need any bufferization when providing compressed data }
+
+ { Types }
+
+type
+ VideoDigitizerComponent = ComponentInstance;
+ VideoDigitizerError = ComponentResult;
+ DigitizerInfoPtr = ^DigitizerInfo;
+ DigitizerInfo = record
+ vdigType: SInt16;
+ inputCapabilityFlags: SInt32;
+ outputCapabilityFlags: SInt32;
+ inputCurrentFlags: SInt32;
+ outputCurrentFlags: SInt32;
+ slot: SInt16; { temporary for connection purposes }
+ gdh: GDHandle; { temporary for digitizers that have preferred screen }
+ maskgdh: GDHandle; { temporary for digitizers that have mask planes }
+ minDestHeight: SInt16; { Smallest resizable height }
+ minDestWidth: SInt16; { Smallest resizable width }
+ maxDestHeight: SInt16; { Largest resizable height }
+ maxDestWidth: SInt16; { Largest resizable width }
+ blendLevels: SInt16; { Number of blend levels supported (2 if 1 bit mask) }
+ reserved: SInt32; { reserved }
+ end;
+
+ VdigTypePtr = ^VdigType;
+ VdigType = record
+ digType: SInt32;
+ reserved: SInt32;
+ end;
+
+ VdigTypeListPtr = ^VdigTypeList;
+ VdigTypeList = record
+ count: SInt16;
+ list: array [0..0] of VdigType;
+ end;
+
+ VdigBufferRecPtr = ^VdigBufferRec;
+ VdigBufferRec = record
+ dest: PixMapHandle;
+ location: Point;
+ reserved: SInt32;
+ end;
+
+ VdigBufferRecListPtr = ^VdigBufferRecList;
+ VdigBufferRecList = record
+ count: SInt16;
+ matrix: MatrixRecordPtr;
+ mask: RgnHandle;
+ list: array [0..0] of VdigBufferRec;
+ end;
+
+ VdigBufferRecListHandle = ^VdigBufferRecListPtr;
+{$ifc TYPED_FUNCTION_POINTERS}
+ VdigIntProcPtr = procedure(flags: SInt32; refcon: SInt32);
+{$elsec}
+ VdigIntProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ VdigIntUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ VdigIntUPP = UniversalProcPtr;
+{$endc}
+ VDCompressionListPtr = ^VDCompressionList;
+ VDCompressionList = record
+ codec: CodecComponent;
+ cType: CodecType;
+ typeName: Str63;
+ name: Str63;
+ formatFlags: SInt32;
+ compressFlags: SInt32;
+ reserved: SInt32;
+ end;
+
+ VDCompressionListHandle = ^VDCompressionListPtr;
+
+const
+ dmaDepth1 = 1;
+ dmaDepth2 = 2;
+ dmaDepth4 = 4;
+ dmaDepth8 = 8;
+ dmaDepth16 = 16;
+ dmaDepth32 = 32;
+ dmaDepth2Gray = 64;
+ dmaDepth4Gray = 128;
+ dmaDepth8Gray = 256;
+
+ kVDIGControlledFrameRate = -1;
+
+
+ {
+ * VDGetMaxSrcRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetMaxSrcRect(ci: VideoDigitizerComponent; inputStd: SInt16; var maxSrcRect: Rect): VideoDigitizerError; external name '_VDGetMaxSrcRect';
+{
+ * VDGetActiveSrcRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetActiveSrcRect(ci: VideoDigitizerComponent; inputStd: SInt16; var activeSrcRect: Rect): VideoDigitizerError; external name '_VDGetActiveSrcRect';
+{
+ * VDSetDigitizerRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetDigitizerRect(ci: VideoDigitizerComponent; var digitizerRect: Rect): VideoDigitizerError; external name '_VDSetDigitizerRect';
+{
+ * VDGetDigitizerRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetDigitizerRect(ci: VideoDigitizerComponent; var digitizerRect: Rect): VideoDigitizerError; external name '_VDGetDigitizerRect';
+{
+ * VDGetVBlankRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetVBlankRect(ci: VideoDigitizerComponent; inputStd: SInt16; var vBlankRect: Rect): VideoDigitizerError; external name '_VDGetVBlankRect';
+{
+ * VDGetMaskPixMap()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetMaskPixMap(ci: VideoDigitizerComponent; maskPixMap: PixMapHandle): VideoDigitizerError; external name '_VDGetMaskPixMap';
+{
+ * VDGetPlayThruDestination()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetPlayThruDestination(ci: VideoDigitizerComponent; var dest: PixMapHandle; var destRect: Rect; var m: MatrixRecord; var mask: RgnHandle): VideoDigitizerError; external name '_VDGetPlayThruDestination';
+{
+ * VDUseThisCLUT()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDUseThisCLUT(ci: VideoDigitizerComponent; colorTableHandle: CTabHandle): VideoDigitizerError; external name '_VDUseThisCLUT';
+{
+ * VDSetInputGammaValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetInputGammaValue(ci: VideoDigitizerComponent; channel1: Fixed; channel2: Fixed; channel3: Fixed): VideoDigitizerError; external name '_VDSetInputGammaValue';
+{
+ * VDGetInputGammaValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetInputGammaValue(ci: VideoDigitizerComponent; var channel1: Fixed; var channel2: Fixed; var channel3: Fixed): VideoDigitizerError; external name '_VDGetInputGammaValue';
+{
+ * VDSetBrightness()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetBrightness(ci: VideoDigitizerComponent; var brightness: UInt16): VideoDigitizerError; external name '_VDSetBrightness';
+{
+ * VDGetBrightness()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetBrightness(ci: VideoDigitizerComponent; var brightness: UInt16): VideoDigitizerError; external name '_VDGetBrightness';
+{
+ * VDSetContrast()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetContrast(ci: VideoDigitizerComponent; var contrast: UInt16): VideoDigitizerError; external name '_VDSetContrast';
+{
+ * VDSetHue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetHue(ci: VideoDigitizerComponent; var hue: UInt16): VideoDigitizerError; external name '_VDSetHue';
+{
+ * VDSetSharpness()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetSharpness(ci: VideoDigitizerComponent; var sharpness: UInt16): VideoDigitizerError; external name '_VDSetSharpness';
+{
+ * VDSetSaturation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetSaturation(ci: VideoDigitizerComponent; var saturation: UInt16): VideoDigitizerError; external name '_VDSetSaturation';
+{
+ * VDGetContrast()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetContrast(ci: VideoDigitizerComponent; var contrast: UInt16): VideoDigitizerError; external name '_VDGetContrast';
+{
+ * VDGetHue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetHue(ci: VideoDigitizerComponent; var hue: UInt16): VideoDigitizerError; external name '_VDGetHue';
+{
+ * VDGetSharpness()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetSharpness(ci: VideoDigitizerComponent; var sharpness: UInt16): VideoDigitizerError; external name '_VDGetSharpness';
+{
+ * VDGetSaturation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetSaturation(ci: VideoDigitizerComponent; var saturation: UInt16): VideoDigitizerError; external name '_VDGetSaturation';
+{
+ * VDGrabOneFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGrabOneFrame(ci: VideoDigitizerComponent): VideoDigitizerError; external name '_VDGrabOneFrame';
+{
+ * VDGetMaxAuxBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetMaxAuxBuffer(ci: VideoDigitizerComponent; var pm: PixMapHandle; var r: Rect): VideoDigitizerError; external name '_VDGetMaxAuxBuffer';
+{
+ * VDGetDigitizerInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetDigitizerInfo(ci: VideoDigitizerComponent; var info: DigitizerInfo): VideoDigitizerError; external name '_VDGetDigitizerInfo';
+{
+ * VDGetCurrentFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetCurrentFlags(ci: VideoDigitizerComponent; var inputCurrentFlag: SInt32; var outputCurrentFlag: SInt32): VideoDigitizerError; external name '_VDGetCurrentFlags';
+{
+ * VDSetKeyColor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetKeyColor(ci: VideoDigitizerComponent; index: SInt32): VideoDigitizerError; external name '_VDSetKeyColor';
+{
+ * VDGetKeyColor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetKeyColor(ci: VideoDigitizerComponent; var index: SInt32): VideoDigitizerError; external name '_VDGetKeyColor';
+{
+ * VDAddKeyColor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDAddKeyColor(ci: VideoDigitizerComponent; var index: SInt32): VideoDigitizerError; external name '_VDAddKeyColor';
+{
+ * VDGetNextKeyColor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetNextKeyColor(ci: VideoDigitizerComponent; index: SInt32): VideoDigitizerError; external name '_VDGetNextKeyColor';
+{
+ * VDSetKeyColorRange()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetKeyColorRange(ci: VideoDigitizerComponent; var minRGB: RGBColor; var maxRGB: RGBColor): VideoDigitizerError; external name '_VDSetKeyColorRange';
+{
+ * VDGetKeyColorRange()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetKeyColorRange(ci: VideoDigitizerComponent; var minRGB: RGBColor; var maxRGB: RGBColor): VideoDigitizerError; external name '_VDGetKeyColorRange';
+{
+ * VDSetDigitizerUserInterrupt()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetDigitizerUserInterrupt(ci: VideoDigitizerComponent; flags: SInt32; userInterruptProc: VdigIntUPP; refcon: SInt32): VideoDigitizerError; external name '_VDSetDigitizerUserInterrupt';
+{
+ * VDSetInputColorSpaceMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetInputColorSpaceMode(ci: VideoDigitizerComponent; colorSpaceMode: SInt16): VideoDigitizerError; external name '_VDSetInputColorSpaceMode';
+{
+ * VDGetInputColorSpaceMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetInputColorSpaceMode(ci: VideoDigitizerComponent; var colorSpaceMode: SInt16): VideoDigitizerError; external name '_VDGetInputColorSpaceMode';
+{
+ * VDSetClipState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetClipState(ci: VideoDigitizerComponent; clipEnable: SInt16): VideoDigitizerError; external name '_VDSetClipState';
+{
+ * VDGetClipState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetClipState(ci: VideoDigitizerComponent; var clipEnable: SInt16): VideoDigitizerError; external name '_VDGetClipState';
+{
+ * VDSetClipRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetClipRgn(ci: VideoDigitizerComponent; clipRegion: RgnHandle): VideoDigitizerError; external name '_VDSetClipRgn';
+{
+ * VDClearClipRgn()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDClearClipRgn(ci: VideoDigitizerComponent; clipRegion: RgnHandle): VideoDigitizerError; external name '_VDClearClipRgn';
+{
+ * VDGetCLUTInUse()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetCLUTInUse(ci: VideoDigitizerComponent; var colorTableHandle: CTabHandle): VideoDigitizerError; external name '_VDGetCLUTInUse';
+{
+ * VDSetPLLFilterType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetPLLFilterType(ci: VideoDigitizerComponent; pllType: SInt16): VideoDigitizerError; external name '_VDSetPLLFilterType';
+{
+ * VDGetPLLFilterType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetPLLFilterType(ci: VideoDigitizerComponent; var pllType: SInt16): VideoDigitizerError; external name '_VDGetPLLFilterType';
+{
+ * VDGetMaskandValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetMaskandValue(ci: VideoDigitizerComponent; blendLevel: UInt16; var mask: SInt32; var value: SInt32): VideoDigitizerError; external name '_VDGetMaskandValue';
+{
+ * VDSetMasterBlendLevel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetMasterBlendLevel(ci: VideoDigitizerComponent; var blendLevel: UInt16): VideoDigitizerError; external name '_VDSetMasterBlendLevel';
+{
+ * VDSetPlayThruDestination()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetPlayThruDestination(ci: VideoDigitizerComponent; dest: PixMapHandle; destRect: RectPtr; m: MatrixRecordPtr; mask: RgnHandle): VideoDigitizerError; external name '_VDSetPlayThruDestination';
+{
+ * VDSetPlayThruOnOff()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetPlayThruOnOff(ci: VideoDigitizerComponent; state: SInt16): VideoDigitizerError; external name '_VDSetPlayThruOnOff';
+{
+ * VDSetFieldPreference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetFieldPreference(ci: VideoDigitizerComponent; fieldFlag: SInt16): VideoDigitizerError; external name '_VDSetFieldPreference';
+{
+ * VDGetFieldPreference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetFieldPreference(ci: VideoDigitizerComponent; var fieldFlag: SInt16): VideoDigitizerError; external name '_VDGetFieldPreference';
+{
+ * VDPreflightDestination()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDPreflightDestination(ci: VideoDigitizerComponent; var digitizerRect: Rect; var dest: PixMapPtr; destRect: RectPtr; m: MatrixRecordPtr): VideoDigitizerError; external name '_VDPreflightDestination';
+{
+ * VDPreflightGlobalRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDPreflightGlobalRect(ci: VideoDigitizerComponent; theWindow: GrafPtr; var globalRect: Rect): VideoDigitizerError; external name '_VDPreflightGlobalRect';
+{
+ * VDSetPlayThruGlobalRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetPlayThruGlobalRect(ci: VideoDigitizerComponent; theWindow: GrafPtr; var globalRect: Rect): VideoDigitizerError; external name '_VDSetPlayThruGlobalRect';
+{
+ * VDSetInputGammaRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetInputGammaRecord(ci: VideoDigitizerComponent; inputGammaPtr: VDGamRecPtr): VideoDigitizerError; external name '_VDSetInputGammaRecord';
+{
+ * VDGetInputGammaRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetInputGammaRecord(ci: VideoDigitizerComponent; var inputGammaPtr: VDGamRecPtr): VideoDigitizerError; external name '_VDGetInputGammaRecord';
+{
+ * VDSetBlackLevelValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetBlackLevelValue(ci: VideoDigitizerComponent; var blackLevel: UInt16): VideoDigitizerError; external name '_VDSetBlackLevelValue';
+{
+ * VDGetBlackLevelValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetBlackLevelValue(ci: VideoDigitizerComponent; var blackLevel: UInt16): VideoDigitizerError; external name '_VDGetBlackLevelValue';
+{
+ * VDSetWhiteLevelValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetWhiteLevelValue(ci: VideoDigitizerComponent; var whiteLevel: UInt16): VideoDigitizerError; external name '_VDSetWhiteLevelValue';
+{
+ * VDGetWhiteLevelValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetWhiteLevelValue(ci: VideoDigitizerComponent; var whiteLevel: UInt16): VideoDigitizerError; external name '_VDGetWhiteLevelValue';
+{
+ * VDGetVideoDefaults()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetVideoDefaults(ci: VideoDigitizerComponent; var blackLevel: UInt16; var whiteLevel: UInt16; var brightness: UInt16; var hue: UInt16; var saturation: UInt16; var contrast: UInt16; var sharpness: UInt16): VideoDigitizerError; external name '_VDGetVideoDefaults';
+{
+ * VDGetNumberOfInputs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetNumberOfInputs(ci: VideoDigitizerComponent; var inputs: SInt16): VideoDigitizerError; external name '_VDGetNumberOfInputs';
+{
+ * VDGetInputFormat()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetInputFormat(ci: VideoDigitizerComponent; input: SInt16; var format: SInt16): VideoDigitizerError; external name '_VDGetInputFormat';
+{
+ * VDSetInput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetInput(ci: VideoDigitizerComponent; input: SInt16): VideoDigitizerError; external name '_VDSetInput';
+{
+ * VDGetInput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetInput(ci: VideoDigitizerComponent; var input: SInt16): VideoDigitizerError; external name '_VDGetInput';
+{
+ * VDSetInputStandard()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetInputStandard(ci: VideoDigitizerComponent; inputStandard: SInt16): VideoDigitizerError; external name '_VDSetInputStandard';
+{
+ * VDSetupBuffers()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetupBuffers(ci: VideoDigitizerComponent; bufferList: VdigBufferRecListHandle): VideoDigitizerError; external name '_VDSetupBuffers';
+{
+ * VDGrabOneFrameAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGrabOneFrameAsync(ci: VideoDigitizerComponent; buffer: SInt16): VideoDigitizerError; external name '_VDGrabOneFrameAsync';
+{
+ * VDDone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDDone(ci: VideoDigitizerComponent; buffer: SInt16): VideoDigitizerError; external name '_VDDone';
+{
+ * VDSetCompression()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetCompression(ci: VideoDigitizerComponent; compressType: OSType; depth: SInt16; var bounds: Rect; spatialQuality: CodecQ; temporalQuality: CodecQ; keyFrameRate: SInt32): VideoDigitizerError; external name '_VDSetCompression';
+{
+ * VDCompressOneFrameAsync()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDCompressOneFrameAsync(ci: VideoDigitizerComponent): VideoDigitizerError; external name '_VDCompressOneFrameAsync';
+{ Note that UInt8* queuedFrameCount replaces Boolean* done. 0(==false) still means no frames, and 1(==true) one,
+ but if more than one are available the number should be returned here. The value 2 previously meant more than one frame,
+ so some VDIGs may return 2 even if more than 2 are available, and some will still return 1 as they are using the original definition }
+{
+ * VDCompressDone()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDCompressDone(ci: VideoDigitizerComponent; var queuedFrameCount: UInt8; var theData: Ptr; var dataSize: SInt32; var similarity: UInt8; var t: TimeRecord): VideoDigitizerError; external name '_VDCompressDone';
+{
+ * VDReleaseCompressBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDReleaseCompressBuffer(ci: VideoDigitizerComponent; bufferAddr: Ptr): VideoDigitizerError; external name '_VDReleaseCompressBuffer';
+{
+ * VDGetImageDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetImageDescription(ci: VideoDigitizerComponent; desc: ImageDescriptionHandle): VideoDigitizerError; external name '_VDGetImageDescription';
+{
+ * VDResetCompressSequence()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDResetCompressSequence(ci: VideoDigitizerComponent): VideoDigitizerError; external name '_VDResetCompressSequence';
+{
+ * VDSetCompressionOnOff()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetCompressionOnOff(ci: VideoDigitizerComponent; state: boolean): VideoDigitizerError; external name '_VDSetCompressionOnOff';
+{
+ * VDGetCompressionTypes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetCompressionTypes(ci: VideoDigitizerComponent; h: VDCompressionListHandle): VideoDigitizerError; external name '_VDGetCompressionTypes';
+{
+ * VDSetTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetTimeBase(ci: VideoDigitizerComponent; t: TimeBase): VideoDigitizerError; external name '_VDSetTimeBase';
+{
+ * VDSetFrameRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetFrameRate(ci: VideoDigitizerComponent; framesPerSecond: Fixed): VideoDigitizerError; external name '_VDSetFrameRate';
+{
+ * VDGetDataRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetDataRate(ci: VideoDigitizerComponent; var milliSecPerFrame: SInt32; var framesPerSecond: Fixed; var bytesPerSecond: SInt32): VideoDigitizerError; external name '_VDGetDataRate';
+{
+ * VDGetSoundInputDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetSoundInputDriver(ci: VideoDigitizerComponent; var soundDriverName: Str255): VideoDigitizerError; external name '_VDGetSoundInputDriver';
+{
+ * VDGetDMADepths()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetDMADepths(ci: VideoDigitizerComponent; var depthArray: SInt32; var preferredDepth: SInt32): VideoDigitizerError; external name '_VDGetDMADepths';
+{
+ * VDGetPreferredTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetPreferredTimeScale(ci: VideoDigitizerComponent; var preferred: TimeScale): VideoDigitizerError; external name '_VDGetPreferredTimeScale';
+{
+ * VDReleaseAsyncBuffers()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDReleaseAsyncBuffers(ci: VideoDigitizerComponent): VideoDigitizerError; external name '_VDReleaseAsyncBuffers';
+{ 83 is reserved for compatibility reasons }
+{
+ * VDSetDataRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetDataRate(ci: VideoDigitizerComponent; bytesPerSecond: SInt32): VideoDigitizerError; external name '_VDSetDataRate';
+{
+ * VDGetTimeCode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetTimeCode(ci: VideoDigitizerComponent; var atTime: TimeRecord; timeCodeFormat: UnivPtr; timeCodeTime: UnivPtr): VideoDigitizerError; external name '_VDGetTimeCode';
+{
+ * VDUseSafeBuffers()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDUseSafeBuffers(ci: VideoDigitizerComponent; useSafeBuffers: boolean): VideoDigitizerError; external name '_VDUseSafeBuffers';
+{
+ * VDGetSoundInputSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetSoundInputSource(ci: VideoDigitizerComponent; videoInput: SInt32; var soundInput: SInt32): VideoDigitizerError; external name '_VDGetSoundInputSource';
+{
+ * VDGetCompressionTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetCompressionTime(ci: VideoDigitizerComponent; compressionType: OSType; depth: SInt16; var srcRect: Rect; var spatialQuality: CodecQ; var temporalQuality: CodecQ; var compressTime: UInt32): VideoDigitizerError; external name '_VDGetCompressionTime';
+{
+ * VDSetPreferredPacketSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetPreferredPacketSize(ci: VideoDigitizerComponent; preferredPacketSizeInBytes: SInt32): VideoDigitizerError; external name '_VDSetPreferredPacketSize';
+{
+ * VDSetPreferredImageDimensions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetPreferredImageDimensions(ci: VideoDigitizerComponent; width: SInt32; height: SInt32): VideoDigitizerError; external name '_VDSetPreferredImageDimensions';
+{
+ * VDGetPreferredImageDimensions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetPreferredImageDimensions(ci: VideoDigitizerComponent; var width: SInt32; var height: SInt32): VideoDigitizerError; external name '_VDGetPreferredImageDimensions';
+{
+ * VDGetInputName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDGetInputName(ci: VideoDigitizerComponent; videoInput: SInt32; var name: Str255): VideoDigitizerError; external name '_VDGetInputName';
+{
+ * VDSetDestinationPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function VDSetDestinationPort(ci: VideoDigitizerComponent; destPort: CGrafPtr): VideoDigitizerError; external name '_VDSetDestinationPort';
+{
+ The following call is designed to give the VDIG a little more control over how it is presented to the User, to clarify the
+ distinction between Devices and Inputs. Historically, the assumption has been that there is one component registered per device
+ and the component name is displayed. This change lets a component choose its name after registration.
+ vdDeviceFlagShowInputsAsDevices is meant for components that register once and support multiple devices
+ The UI is clearer if these are presented as device rather than inputs,
+ and this allows a VDIG to present itself this way without huge restructuring
+ vdDeviceFlagHideDevice is for the kind of VDIG that registers itself, and then can register a further VDIG for each device.
+ If no hardware is available, returning this flag will omit it from the list.
+ This call being made is also a good time to check for hardware and register further VDIG components if needed,
+ allowing for lazy initialization when the Application needs to find a VDIG rather than on every launch or replug.
+}
+
+
+const
+ vdDeviceFlagShowInputsAsDevices = $01; { Tell the Panel to promote Inputs to Devices }
+ vdDeviceFlagHideDevice = $02; { Omit this Device entirely from the list }
+
+ {
+ * VDGetDeviceNameAndFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function VDGetDeviceNameAndFlags(ci: VideoDigitizerComponent; var outName: Str255; var outNameFlags: UInt32): VideoDigitizerError; external name '_VDGetDeviceNameAndFlags';
+const
+ vdFlagCaptureStarting = $01; { Capture is about to start; allocate bandwidth }
+ vdFlagCaptureStopping = $02; { Capture is about to stop; stop queuing frames }
+ vdFlagCaptureIsForPreview = $04; { Capture is just to screen for preview purposes }
+ vdFlagCaptureIsForRecord = $08; { Capture is going to be recorded }
+ vdFlagCaptureLowLatency = $10; { Fresh frames are more important than delivering every frame - don't queue too much }
+ vdFlagCaptureAlwaysUseTimeBase = $20; { Use the timebase for every frame; don't worry about making durations uniform }
+ vdFlagCaptureSetSettingsBegin = $40; { A series of calls are about to be made to restore settings. }
+ vdFlagCaptureSetSettingsEnd = $80; { Finished restoring settings; any set calls after this are from the app or UI }
+
+ {
+ * VDCaptureStateChanging()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function VDCaptureStateChanging(ci: VideoDigitizerComponent; inStateFlags: UInt32): VideoDigitizerError; external name '_VDCaptureStateChanging';
+{
+ These UniqueID calls are so that the VDIG can give the SG information enabling it to restore a particular
+ configuration - choose a particular device and input from those available.
+ For example, restoring the specific camera for a set of several hot-plugged FireWire cameras
+ the caller can pass nil if it is not interested in one of the IDs
+ returning 0 in an ID means you don't have one
+}
+
+{
+ * VDGetUniqueIDs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function VDGetUniqueIDs(ci: VideoDigitizerComponent; var outDeviceID: UInt64; var outInputID: UInt64): VideoDigitizerError; external name '_VDGetUniqueIDs';
+{
+ Note this is a 'Select' not a 'Set' - the assumption is that the Unique ID is a function of the hardware
+ and not modifiable by the calling application. Either a nil pointer or 0 an the ID means don't care.
+ return vdDontHaveThatUniqueIDErr if your device doesn't have a match.
+}
+
+{
+ * VDSelectUniqueIDs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function VDSelectUniqueIDs(ci: VideoDigitizerComponent; (*const*) var inDeviceID: UInt64; (*const*) var inInputID: UInt64): VideoDigitizerError; external name '_VDSelectUniqueIDs';
+const
+ xmlParseComponentType = $70617273 (* 'pars' *);
+ xmlParseComponentSubType = $786D6C20 (* 'xml ' *);
+
+ xmlIdentifierInvalid = 0;
+ xmlIdentifierUnrecognized = $FFFFFFFF;
+ xmlContentTypeInvalid = 0;
+ xmlContentTypeElement = 1;
+ xmlContentTypeCharData = 2;
+
+ elementFlagAlwaysSelfContained = $00000001; { Element doesn't have contents or closing tag even if it doesn't end with />, as in the HTML <img> tag }
+ elementFlagPreserveWhiteSpace = $00000002; { Preserve whitespace in content, default is to remove it }
+ xmlParseFlagAllowUppercase = $00000001; { Entities and attributes do not have to be lowercase (strict XML), but can be upper or mixed case as in HTML }
+ xmlParseFlagAllowUnquotedAttributeValues = $00000002; { Attributes values do not have to be enclosed in quotes (strict XML), but can be left unquoted if they contain no spaces }
+ xmlParseFlagEventParseOnly = $00000004; { Do event parsing only }
+
+ attributeValueKindCharString = 0;
+ attributeValueKindInteger = $00000001; { Number }
+ attributeValueKindPercent = $00000002; { Number or percent }
+ attributeValueKindBoolean = $00000004; { "true" or "false" }
+ attributeValueKindOnOff = $00000008; { "on" or "off" }
+ attributeValueKindColor = $00000010; { Either "#rrggbb" or a color name }
+ attributeValueKindEnum = $00000020; { one of a number of strings; the enum strings are passed as a zero-separated, double-zero-terminated C string in the attributeKindValueInfo param }
+ attributeValueKindCaseSensEnum = $00000040; { one of a number of strings; the enum strings are passed as for attributeValueKindEnum, but the values are case-sensitive }
+ MAX_ATTRIBUTE_VALUE_KIND = $00000040;
+
+ nameSpaceIDNone = 0;
+
+ { A Parsed XML attribute value, one of number/percent, boolean/on-off, color, or enumerated type }
+
+type
+ XMLAttributeValuePtr = ^XMLAttributeValue;
+ XMLAttributeValue = record
+ case SInt16 of
+ 0: (
+ number: SInt32; { The value when valueKind is attributeValueKindInteger or attributeValueKindPercent }
+ );
+ 1: (
+ boolean: boolean_fix; { The value when valueKind is attributeValueKindBoolean or attributeValueKindOnOff }
+ );
+ 2: (
+ color: RGBColor; { The value when valueKind is attributeValueKindColor }
+ );
+ 3: (
+ enumType: UInt32; { The value when valueKind is attributeValueKindEnum }
+ );
+ end;
+
+ { An XML attribute-value pair }
+ XMLAttributePtr = ^XMLAttribute;
+ XMLAttribute = record
+ identifier: UInt32; { Tokenized identifier, if the attribute name was recognized by the parser }
+ name: CStringPtr; { Attribute name, Only present if identifier == xmlIdentifierUnrecognized }
+ valueKind: SInt32; { Type of parsed value, if the value was recognized and parsed; otherwise, attributeValueKindCharString }
+ value: XMLAttributeValue; { Parsed attribute value }
+ valueStr: CStringPtr; { Always present }
+ end;
+
+ { Forward struct declarations for recursively-defined tree structure }
+ XMLContentPtr = ^XMLContent;
+ {
+ An XML Element, i.e.
+ <element attr="value" attr="value" ...> [contents] </element>
+ or
+ <element attr="value" attr="value" .../>
+ }
+ XMLElementPtr = ^XMLElement;
+ XMLElement = record
+ identifier: UInt32; { Tokenized identifier, if the element name was recognized by the parser }
+ name: CStringPtr; { Element name, only present if identifier == xmlIdentifierUnrecognized }
+ attributes: XMLAttributePtr; { Array of attributes, terminated with an attribute with identifier == xmlIdentifierInvalid }
+ contents: XMLContentPtr; { Array of contents, terminated with a content with kind == xmlIdentifierInvalid }
+ end;
+
+ {
+ The content of an XML element is a series of parts, each of which may be either another element
+ or simply character data.
+ }
+ XMLElementContentPtr = ^XMLElementContent;
+ XMLElementContent = record
+ case SInt16 of
+ 0: (
+ element: XMLElement; { The contents when the content kind is xmlContentTypeElement }
+ );
+ 1: (
+ charData: CStringPtr; { The contents when the content kind is xmlContentTypeCharData }
+ );
+ end;
+
+ XMLContent = record
+ kind: UInt32;
+ actualContent: XMLElementContent;
+ end;
+
+ XMLDocRecordPtr = ^XMLDocRecord;
+ XMLDocRecord = record
+ xmlDataStorage: Ptr; { opaque storage }
+ rootElement: XMLElement;
+ end;
+
+ XMLDoc = ^XMLDocRecord;
+ { callback routines for event parsing }
+{$ifc TYPED_FUNCTION_POINTERS}
+ StartDocumentHandler = function(refcon: SInt32): ComponentResult;
+{$elsec}
+ StartDocumentHandler = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ EndDocumentHandler = function(refcon: SInt32): ComponentResult;
+{$elsec}
+ EndDocumentHandler = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ StartElementHandler = function(name: ConstCStringPtr; var atts: ConstCStringPtr; refcon: SInt32): ComponentResult;
+{$elsec}
+ StartElementHandler = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ EndElementHandler = function(name: ConstCStringPtr; refcon: SInt32): ComponentResult;
+{$elsec}
+ EndElementHandler = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ CharDataHandler = function(charData: ConstCStringPtr; refcon: SInt32): ComponentResult;
+{$elsec}
+ CharDataHandler = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ PreprocessInstructionHandler = function(name: ConstCStringPtr; atts: ConstCStringPtrPtr; refcon: SInt32): ComponentResult;
+{$elsec}
+ PreprocessInstructionHandler = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ CommentHandler = function(comment: ConstCStringPtr; refcon: SInt32): ComponentResult;
+{$elsec}
+ CommentHandler = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ CDataHandler = function(cdata: ConstCStringPtr; refcon: SInt32): ComponentResult;
+{$elsec}
+ CDataHandler = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ StartDocumentHandlerUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ StartDocumentHandlerUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ EndDocumentHandlerUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ EndDocumentHandlerUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ StartElementHandlerUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ StartElementHandlerUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ EndElementHandlerUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ EndElementHandlerUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ CharDataHandlerUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CharDataHandlerUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ PreprocessInstructionHandlerUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ PreprocessInstructionHandlerUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ CommentHandlerUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CommentHandlerUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ CDataHandlerUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ CDataHandlerUPP = UniversalProcPtr;
+{$endc}
+ { Parses the XML file pointed to by dataRef, returning a XMLDoc parse tree }
+ {
+ * XMLParseDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseDataRef(aParser: ComponentInstance; dataRef: Handle; dataRefType: OSType; parseFlags: SInt32; var document: XMLDoc): ComponentResult; external name '_XMLParseDataRef';
+{ Parses the XML file pointed to by fileSpec, returning a XMLDoc parse tree }
+{
+ * XMLParseFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseFile(aParser: ComponentInstance; fileSpec: ConstFSSpecPtr; parseFlags: SInt32; var document: XMLDoc): ComponentResult; external name '_XMLParseFile';
+{ Disposes of a XMLDoc parse tree }
+{
+ * XMLParseDisposeXMLDoc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseDisposeXMLDoc(aParser: ComponentInstance; document: XMLDoc): ComponentResult; external name '_XMLParseDisposeXMLDoc';
+{
+ Returns a more detailed description of the error and the line in which it occurred, if a
+ file failed to parse properly.
+}
+{
+ * XMLParseGetDetailedParseError()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseGetDetailedParseError(aParser: ComponentInstance; var errorLine: SInt32; errDesc: StringPtr): ComponentResult; external name '_XMLParseGetDetailedParseError';
+{
+ Tell the parser of an element to be recognized. The tokenized element unique identifier is
+ passed in *elementID, unless *elementID is zero, whereupon a unique ID is generated and returned.
+ Thus, a valid element identifier can never be zero.
+}
+{
+ * XMLParseAddElement()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseAddElement(aParser: ComponentInstance; elementName: CStringPtr; nameSpaceID: UInt32; var elementID: UInt32; elementFlags: SInt32): ComponentResult; external name '_XMLParseAddElement';
+{
+ Tells the parser of an attribute for the specified element. The tokenized attribute unique
+ ID is passed in *attributeID, unless *attributeID is zero, whereupon a unique ID is generated and
+ returned. Thus, a valid attribute identifier can never be zero.
+}
+{
+ * XMLParseAddAttribute()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseAddAttribute(aParser: ComponentInstance; elementID: UInt32; nameSpaceID: UInt32; attributeName: CStringPtr; var attributeID: UInt32): ComponentResult; external name '_XMLParseAddAttribute';
+{
+ Tells the parser of several attributes for the specified element. The attributes are passed
+ as a zero-delimited, double-zero-terminated C string in attributeNames, and the attribute
+ IDs are passed in on attributeIDs as an array; if any attributeIDs are zero, unique IDs
+ are generated for those and returned
+}
+{
+ * XMLParseAddMultipleAttributes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseAddMultipleAttributes(aParser: ComponentInstance; elementID: UInt32; var nameSpaceIDs: UInt32; attributeNames: CStringPtr; var attributeIDs: UInt32): ComponentResult; external name '_XMLParseAddMultipleAttributes';
+{
+ Tells the parser of an attribute, which may have a particular type of value, for the
+ specified element. Params are as in XMLParseAddAttribute, plus all the kinds of values
+ the attribute may have are passed in attributeValueKind, and optional additional information
+ required to tokenize the particular kind of attribute is passed in attributeValueKindInfo
+}
+{
+ * XMLParseAddAttributeAndValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseAddAttributeAndValue(aParser: ComponentInstance; elementID: UInt32; nameSpaceID: UInt32; attributeName: CStringPtr; var attributeID: UInt32; attributeValueKind: UInt32; attributeValueKindInfo: UnivPtr): ComponentResult; external name '_XMLParseAddAttributeAndValue';
+{
+ Tells the parser of several attributes, which may have a particular type of value, for the
+ specified element. Params are as in XMLParseAddMultipleAttributes, plus all the kinds of values
+ the attributes may have are passed in attributeValueKinds, and optional additional information
+ required to tokenize the particular kind of attributes is passed in attributeValueKindInfos
+}
+{
+ * XMLParseAddMultipleAttributesAndValues()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseAddMultipleAttributesAndValues(aParser: ComponentInstance; elementID: UInt32; var nameSpaceIDs: UInt32; attributeNames: CStringPtr; var attributeIDs: UInt32; var attributeValueKinds: UInt32; var attributeValueKindInfos: UnivPtr): ComponentResult; external name '_XMLParseAddMultipleAttributesAndValues';
+{
+ Tells the parser that the particular attribute may have an additional kind of
+ value, as specified by attributeValueKind and attributeValueKindInfo
+}
+{
+ * XMLParseAddAttributeValueKind()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseAddAttributeValueKind(aParser: ComponentInstance; elementID: UInt32; attributeID: UInt32; attributeValueKind: UInt32; attributeValueKindInfo: UnivPtr): ComponentResult; external name '_XMLParseAddAttributeValueKind';
+{
+ Tell the parser of a namespace to be recognized. The tokenized namespace unique identifier is
+ passed in *nameSpaceID, unless *nameSpaceID is zero, whereupon a unique ID is generated and returned.
+ Thus, a valid nameSpaceID identifier can never be zero.
+}
+{
+ * XMLParseAddNameSpace()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseAddNameSpace(aParser: ComponentInstance; nameSpaceURL: CStringPtr; var nameSpaceID: UInt32): ComponentResult; external name '_XMLParseAddNameSpace';
+{ Specifies the offset and limit for reading from the dataref to be used when parsing }
+{
+ * XMLParseSetOffsetAndLimit()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseSetOffsetAndLimit(aParser: ComponentInstance; offset: UInt32; limit: UInt32): ComponentResult; external name '_XMLParseSetOffsetAndLimit';
+{ Set the event parse refcon }
+{
+ * XMLParseSetEventParseRefCon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseSetEventParseRefCon(aParser: ComponentInstance; refcon: SInt32): ComponentResult; external name '_XMLParseSetEventParseRefCon';
+{ Set the start document handler UPP for event parsing }
+{
+ * XMLParseSetStartDocumentHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseSetStartDocumentHandler(aParser: ComponentInstance; startDocument: StartDocumentHandlerUPP): ComponentResult; external name '_XMLParseSetStartDocumentHandler';
+{ Set the end document handler UPP for event parsing }
+{
+ * XMLParseSetEndDocumentHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseSetEndDocumentHandler(aParser: ComponentInstance; endDocument: EndDocumentHandlerUPP): ComponentResult; external name '_XMLParseSetEndDocumentHandler';
+{ Set the start element handler UPP for event parsing }
+{
+ * XMLParseSetStartElementHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseSetStartElementHandler(aParser: ComponentInstance; startElement: StartElementHandlerUPP): ComponentResult; external name '_XMLParseSetStartElementHandler';
+{ Set the end element handler UPP for event parsing }
+{
+ * XMLParseSetEndElementHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseSetEndElementHandler(aParser: ComponentInstance; endElement: EndElementHandlerUPP): ComponentResult; external name '_XMLParseSetEndElementHandler';
+{ Set the character data handler UPP for event parsing }
+{
+ * XMLParseSetCharDataHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseSetCharDataHandler(aParser: ComponentInstance; charData: CharDataHandlerUPP): ComponentResult; external name '_XMLParseSetCharDataHandler';
+{ Set the preprocess instruction handler UPP for event parsing }
+{
+ * XMLParseSetPreprocessInstructionHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseSetPreprocessInstructionHandler(aParser: ComponentInstance; preprocessInstruction: PreprocessInstructionHandlerUPP): ComponentResult; external name '_XMLParseSetPreprocessInstructionHandler';
+{ Set the comment handler UPP for event parsing }
+{
+ * XMLParseSetCommentHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function XMLParseSetCommentHandler(aParser: ComponentInstance; comment: CommentHandlerUPP): ComponentResult; external name '_XMLParseSetCommentHandler';
+{ Set the cdata handler UPP for event parsing }
+{
+ * XMLParseSetCDataHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function XMLParseSetCDataHandler(aParser: ComponentInstance; cdata: CDataHandlerUPP): ComponentResult; external name '_XMLParseSetCDataHandler';
+{
+ Helper Macros
+
+ These macros allow you to easily add entities and attributes to the parser
+ in an error free manner when the identifiers are defined in a particular manner.
+ For these to work, you must define the identifiers as follows:
+
+ For entities, they must be defined as element_elementName, as in:
+
+ enum
+ (
+ element_xml = 1, // "xml"
+ element_head, // "head"
+ element_body // "body"
+ );
+
+ If the element name has characters that are illegal in an identifier,
+ some of the macros support that, but the identifier must not contain
+ the illegal characters:
+
+ enum
+ (
+ element_rootlayout // "root-layout"
+ )
+
+ For attribute names, similar rules apply except that they must be defined
+ as attr_attributeName, as in:
+
+ enum
+ (
+ attr_src = 1, // "src"
+ attr_href,
+ attr_width,
+ attr_height
+ )
+
+ Finally, the existence of local variables elementID and attributeID is required.
+}
+{
+ Adds the specified element to the parser, i.e. XML_ADD_ELEMENT(head) adds the element "head" with
+ a unique identifier of element_head
+}
+{
+ Adds the specified element to the parser, not using the same string to generate the identifier and
+ the element name. Use for element names that contain characters which are illegal in identifiers,
+ i.e XML_ADD_COMPLEX_ELEMENT("root-layout",rootlayout) adds the element "root-layout" with a unique
+ identifier of element_rootlayout
+}
+{
+ Adds the specified attribute to the current element in the parser, i.e. XML_ADD_ATTRIBUTE(src)
+ adds the attribute "src" to the current element, and identifies it by attr_src
+}
+{
+ Adds the specified attribute to the current element in the parser, i.e. XML_ADD_ATTRIBUTE(element_img, src)
+ adds the attribute "src" to the element_img element, and identifies it by attr_src
+ Adds the specified attribute to the current element in the parser, not using the same string to
+ generate the identifier and the element name. Use for attribute names that contain characters which
+ are illegal in identifiers, i.e XML_ADD_COMPLEX_ATTRIBUTE("http-equiv",httpequiv) adds the element
+ "http-equiv" with a unique identifier of attr_httpequiv
+}
+
+
+{
+ General Sequence Grab stuff
+}
+
+type
+ SeqGrabComponent = ComponentInstance;
+ SGChannel = ComponentInstance;
+
+const
+ SeqGrabComponentType = $62617267 (* 'barg' *);
+ SeqGrabChannelType = $73676368 (* 'sgch' *);
+ SeqGrabPanelType = $7367706E (* 'sgpn' *);
+ SeqGrabCompressionPanelType = $636D7072 (* 'cmpr' *);
+ SeqGrabSourcePanelType = $736F7572 (* 'sour' *);
+
+ seqGrabToDisk = 1;
+ seqGrabToMemory = 2;
+ seqGrabDontUseTempMemory = 4;
+ seqGrabAppendToFile = 8;
+ seqGrabDontAddMovieResource = 16;
+ seqGrabDontMakeMovie = 32;
+ seqGrabPreExtendFile = 64;
+ seqGrabDataProcIsInterruptSafe = 128;
+ seqGrabDataProcDoesOverlappingReads = 256;
+
+
+type
+ SeqGrabDataOutputEnum = UInt32;
+
+const
+ seqGrabRecord = 1;
+ seqGrabPreview = 2;
+ seqGrabPlayDuringRecord = 4;
+ seqGrabLowLatencyCapture = 8; { return the freshest frame possible, for live work (videoconferencing, live broadcast, live image processing) }
+ seqGrabAlwaysUseTimeBase = 16; { Tell VDIGs to use TimebaseTime always, rather than creating uniform frame durations, for more accurate live sync with audio }
+
+
+type
+ SeqGrabUsageEnum = UInt32;
+
+const
+ seqGrabHasBounds = 1;
+ seqGrabHasVolume = 2;
+ seqGrabHasDiscreteSamples = 4;
+ seqGrabDoNotBufferizeData = 8;
+ seqGrabCanMoveWindowWhileRecording = 16;
+
+
+type
+ SeqGrabChannelInfoEnum = UInt32;
+ SGOutputRecordPtr = ^SGOutputRecord;
+ SGOutputRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ SGOutput = ^SGOutputRecord;
+ SeqGrabFrameInfoPtr = ^SeqGrabFrameInfo;
+ SeqGrabFrameInfo = record
+ frameOffset: SInt32;
+ frameTime: SInt32;
+ frameSize: SInt32;
+ frameChannel: SGChannel;
+ frameRefCon: SInt32;
+ end;
+
+ SeqGrabExtendedFrameInfoPtr = ^SeqGrabExtendedFrameInfo;
+ SeqGrabExtendedFrameInfo = record
+ frameOffset: wide;
+ frameTime: SInt32;
+ frameSize: SInt32;
+ frameChannel: SGChannel;
+ frameRefCon: SInt32;
+ frameOutput: SGOutput;
+ end;
+
+
+const
+ grabPictOffScreen = 1;
+ grabPictIgnoreClip = 2;
+ grabPictCurrentImage = 4;
+
+ sgFlagControlledGrab = $01;
+ sgFlagAllowNonRGBPixMaps = $02;
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ SGDataProcPtr = function(c: SGChannel; p: Ptr; len: SInt32; var offset: SInt32; chRefCon: SInt32; time: TimeValue; writeType: SInt16; refCon: SInt32): OSErr;
+{$elsec}
+ SGDataProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ SGDataUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SGDataUPP = UniversalProcPtr;
+{$endc}
+ SGDeviceInputNamePtr = ^SGDeviceInputName;
+ SGDeviceInputName = record
+ name: Str63;
+ icon: Handle;
+ flags: SInt32;
+ reserved: SInt32; { zero }
+ end;
+
+
+const
+ sgDeviceInputNameFlagInputUnavailable = $01;
+
+
+type
+ SGDeviceInputListRecordPtr = ^SGDeviceInputListRecord;
+ SGDeviceInputListRecord = record
+ count: SInt16;
+ selectedIndex: SInt16;
+ reserved: SInt32; { zero }
+ entry: array [0..0] of SGDeviceInputName;
+ end;
+
+ SGDeviceInputListPtr = ^SGDeviceInputListRecord;
+ SGDeviceInputList = ^SGDeviceInputListPtr;
+ SGDeviceNamePtr = ^SGDeviceName;
+ SGDeviceName = record
+ name: Str63;
+ icon: Handle;
+ flags: SInt32;
+ refCon: SInt32;
+ inputs: SGDeviceInputList; { list of inputs; formerly reserved to 0 }
+ end;
+
+
+const
+ sgDeviceNameFlagDeviceUnavailable = $01;
+ sgDeviceNameFlagShowInputsAsDevices = $02;
+
+
+type
+ SGDeviceListRecordPtr = ^SGDeviceListRecord;
+ SGDeviceListRecord = record
+ count: SInt16;
+ selectedIndex: SInt16;
+ reserved: SInt32; { zero }
+ entry: array [0..0] of SGDeviceName;
+ end;
+
+ SGDeviceListPtr = ^SGDeviceListRecord;
+ SGDeviceList = ^SGDeviceListPtr;
+
+const
+ sgDeviceListWithIcons = $01;
+ sgDeviceListDontCheckAvailability = $02;
+ sgDeviceListIncludeInputs = $04;
+
+ seqGrabWriteAppend = 0;
+ seqGrabWriteReserve = 1;
+ seqGrabWriteFill = 2;
+
+ seqGrabUnpause = 0;
+ seqGrabPause = 1;
+ seqGrabPauseForMenu = 3;
+
+ channelFlagDontOpenResFile = 2;
+ channelFlagHasDependency = 4;
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ SGModalFilterProcPtr = function(theDialog: DialogRef; const (*var*) theEvent: EventRecord; var itemHit: SInt16; refCon: SInt32): boolean;
+{$elsec}
+ SGModalFilterProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ SGModalFilterUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SGModalFilterUPP = UniversalProcPtr;
+{$endc}
+
+const
+ sgPanelFlagForPanel = 1;
+
+ seqGrabSettingsPreviewOnly = 1;
+
+ channelPlayNormal = 0;
+ channelPlayFast = 1;
+ channelPlayHighQuality = 2;
+ channelPlayAllData = 4;
+
+
+ {
+ * SGInitialize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGInitialize(s: SeqGrabComponent): ComponentResult; external name '_SGInitialize';
+{
+ * SGSetDataOutput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetDataOutput(s: SeqGrabComponent; const (*var*) movieFile: FSSpec; whereFlags: SInt32): ComponentResult; external name '_SGSetDataOutput';
+{
+ * SGGetDataOutput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetDataOutput(s: SeqGrabComponent; var movieFile: FSSpec; var whereFlags: SInt32): ComponentResult; external name '_SGGetDataOutput';
+{
+ * SGSetGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetGWorld(s: SeqGrabComponent; gp: CGrafPtr; gd: GDHandle): ComponentResult; external name '_SGSetGWorld';
+{
+ * SGGetGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetGWorld(s: SeqGrabComponent; var gp: CGrafPtr; var gd: GDHandle): ComponentResult; external name '_SGGetGWorld';
+{
+ * SGNewChannel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGNewChannel(s: SeqGrabComponent; channelType: OSType; var ref: SGChannel): ComponentResult; external name '_SGNewChannel';
+{
+ * SGDisposeChannel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGDisposeChannel(s: SeqGrabComponent; c: SGChannel): ComponentResult; external name '_SGDisposeChannel';
+{
+ * SGStartPreview()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGStartPreview(s: SeqGrabComponent): ComponentResult; external name '_SGStartPreview';
+{
+ * SGStartRecord()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGStartRecord(s: SeqGrabComponent): ComponentResult; external name '_SGStartRecord';
+{
+ * SGIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGIdle(s: SeqGrabComponent): ComponentResult; external name '_SGIdle';
+{
+ * SGStop()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGStop(s: SeqGrabComponent): ComponentResult; external name '_SGStop';
+{
+ * SGPause()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGPause(s: SeqGrabComponent; pause: ByteParameter): ComponentResult; external name '_SGPause';
+{
+ * SGPrepare()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGPrepare(s: SeqGrabComponent; prepareForPreview: boolean; prepareForRecord: boolean): ComponentResult; external name '_SGPrepare';
+{
+ * SGRelease()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGRelease(s: SeqGrabComponent): ComponentResult; external name '_SGRelease';
+{
+ * SGGetMovie()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetMovie(s: SeqGrabComponent): Movie; external name '_SGGetMovie';
+{
+ * SGSetMaximumRecordTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetMaximumRecordTime(s: SeqGrabComponent; ticks: UInt32): ComponentResult; external name '_SGSetMaximumRecordTime';
+{
+ * SGGetMaximumRecordTime()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetMaximumRecordTime(s: SeqGrabComponent; var ticks: UInt32): ComponentResult; external name '_SGGetMaximumRecordTime';
+{
+ * SGGetStorageSpaceRemaining()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetStorageSpaceRemaining(s: SeqGrabComponent; var bytes: UInt32): ComponentResult; external name '_SGGetStorageSpaceRemaining';
+{
+ * SGGetTimeRemaining()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetTimeRemaining(s: SeqGrabComponent; var ticksLeft: SInt32): ComponentResult; external name '_SGGetTimeRemaining';
+{
+ * SGGrabPict()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGrabPict(s: SeqGrabComponent; var p: PicHandle; const (*var*) bounds: Rect; offscreenDepth: SInt16; grabPictFlags: SInt32): ComponentResult; external name '_SGGrabPict';
+{
+ * SGGetLastMovieResID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetLastMovieResID(s: SeqGrabComponent; var resID: SInt16): ComponentResult; external name '_SGGetLastMovieResID';
+{
+ * SGSetFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetFlags(s: SeqGrabComponent; sgFlags: SInt32): ComponentResult; external name '_SGSetFlags';
+{
+ * SGGetFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetFlags(s: SeqGrabComponent; var sgFlags: SInt32): ComponentResult; external name '_SGGetFlags';
+{
+ * SGSetDataProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetDataProc(s: SeqGrabComponent; proc: SGDataUPP; refCon: SInt32): ComponentResult; external name '_SGSetDataProc';
+{
+ * SGNewChannelFromComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGNewChannelFromComponent(s: SeqGrabComponent; var newChannel: SGChannel; sgChannelComponent: Component): ComponentResult; external name '_SGNewChannelFromComponent';
+{
+ * SGDisposeDeviceList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGDisposeDeviceList(s: SeqGrabComponent; list: SGDeviceList): ComponentResult; external name '_SGDisposeDeviceList';
+{
+ * SGAppendDeviceListToMenu()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGAppendDeviceListToMenu(s: SeqGrabComponent; list: SGDeviceList; mh: MenuRef): ComponentResult; external name '_SGAppendDeviceListToMenu';
+{
+ * SGSetSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetSettings(s: SeqGrabComponent; ud: UserData; flags: SInt32): ComponentResult; external name '_SGSetSettings';
+{
+ * SGGetSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetSettings(s: SeqGrabComponent; var ud: UserData; flags: SInt32): ComponentResult; external name '_SGGetSettings';
+{
+ * SGGetIndChannel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetIndChannel(s: SeqGrabComponent; index: SInt16; var ref: SGChannel; var chanType: OSType): ComponentResult; external name '_SGGetIndChannel';
+{
+ * SGUpdate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGUpdate(s: SeqGrabComponent; updateRgn: RgnHandle): ComponentResult; external name '_SGUpdate';
+{
+ * SGGetPause()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetPause(s: SeqGrabComponent; var paused: Byte): ComponentResult; external name '_SGGetPause';
+type
+ ConstComponentListPtr = ^Component;
+ {
+ * SGSettingsDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSettingsDialog(s: SeqGrabComponent; c: SGChannel; numPanels: SInt16; panelList: ConstComponentListPtr; flags: SInt32; proc: SGModalFilterUPP; procRefNum: SInt32): ComponentResult; external name '_SGSettingsDialog';
+{
+ * SGGetAlignmentProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetAlignmentProc(s: SeqGrabComponent; alignmentProc: ICMAlignmentProcRecordPtr): ComponentResult; external name '_SGGetAlignmentProc';
+{
+ * SGSetChannelSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetChannelSettings(s: SeqGrabComponent; c: SGChannel; ud: UserData; flags: SInt32): ComponentResult; external name '_SGSetChannelSettings';
+{
+ * SGGetChannelSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetChannelSettings(s: SeqGrabComponent; c: SGChannel; var ud: UserData; flags: SInt32): ComponentResult; external name '_SGGetChannelSettings';
+{
+ * SGGetMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetMode(s: SeqGrabComponent; var previewMode: boolean; var recordMode: boolean): ComponentResult; external name '_SGGetMode';
+{
+ * SGSetDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetDataRef(s: SeqGrabComponent; dataRef: Handle; dataRefType: OSType; whereFlags: SInt32): ComponentResult; external name '_SGSetDataRef';
+{
+ * SGGetDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetDataRef(s: SeqGrabComponent; var dataRef: Handle; var dataRefType: OSType; var whereFlags: SInt32): ComponentResult; external name '_SGGetDataRef';
+{
+ * SGNewOutput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGNewOutput(s: SeqGrabComponent; dataRef: Handle; dataRefType: OSType; whereFlags: SInt32; var sgOut: SGOutput): ComponentResult; external name '_SGNewOutput';
+{
+ * SGDisposeOutput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGDisposeOutput(s: SeqGrabComponent; sgOut: SGOutput): ComponentResult; external name '_SGDisposeOutput';
+{
+ * SGSetOutputFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetOutputFlags(s: SeqGrabComponent; sgOut: SGOutput; whereFlags: SInt32): ComponentResult; external name '_SGSetOutputFlags';
+{
+ * SGSetChannelOutput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetChannelOutput(s: SeqGrabComponent; c: SGChannel; sgOut: SGOutput): ComponentResult; external name '_SGSetChannelOutput';
+{
+ * SGGetDataOutputStorageSpaceRemaining()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetDataOutputStorageSpaceRemaining(s: SeqGrabComponent; sgOut: SGOutput; var space: UInt32): ComponentResult; external name '_SGGetDataOutputStorageSpaceRemaining';
+{
+ * SGHandleUpdateEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGHandleUpdateEvent(s: SeqGrabComponent; const (*var*) event: EventRecord; var handled: boolean): ComponentResult; external name '_SGHandleUpdateEvent';
+{
+ * SGSetOutputNextOutput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetOutputNextOutput(s: SeqGrabComponent; sgOut: SGOutput; nextOut: SGOutput): ComponentResult; external name '_SGSetOutputNextOutput';
+{
+ * SGGetOutputNextOutput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetOutputNextOutput(s: SeqGrabComponent; sgOut: SGOutput; var nextOut: SGOutput): ComponentResult; external name '_SGGetOutputNextOutput';
+{
+ * SGSetOutputMaximumOffset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetOutputMaximumOffset(s: SeqGrabComponent; sgOut: SGOutput; const (*var*) maxOffset: wide): ComponentResult; external name '_SGSetOutputMaximumOffset';
+{
+ * SGGetOutputMaximumOffset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetOutputMaximumOffset(s: SeqGrabComponent; sgOut: SGOutput; var maxOffset: wide): ComponentResult; external name '_SGGetOutputMaximumOffset';
+{
+ * SGGetOutputDataReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetOutputDataReference(s: SeqGrabComponent; sgOut: SGOutput; var dataRef: Handle; var dataRefType: OSType): ComponentResult; external name '_SGGetOutputDataReference';
+{
+ * SGWriteExtendedMovieData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGWriteExtendedMovieData(s: SeqGrabComponent; c: SGChannel; p: Ptr; len: SInt32; var offset: wide; var sgOut: SGOutput): ComponentResult; external name '_SGWriteExtendedMovieData';
+{
+ * SGGetStorageSpaceRemaining64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function SGGetStorageSpaceRemaining64(s: SeqGrabComponent; var bytes: wide): ComponentResult; external name '_SGGetStorageSpaceRemaining64';
+{
+ * SGGetDataOutputStorageSpaceRemaining64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function SGGetDataOutputStorageSpaceRemaining64(s: SeqGrabComponent; sgOut: SGOutput; var space: wide): ComponentResult; external name '_SGGetDataOutputStorageSpaceRemaining64';
+{
+ calls from Channel to seqGrab
+}
+{
+ * SGWriteMovieData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGWriteMovieData(s: SeqGrabComponent; c: SGChannel; p: Ptr; len: SInt32; var offset: SInt32): ComponentResult; external name '_SGWriteMovieData';
+{
+ * SGAddFrameReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGAddFrameReference(s: SeqGrabComponent; frameInfo: SeqGrabFrameInfoPtr): ComponentResult; external name '_SGAddFrameReference';
+{
+ * SGGetNextFrameReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetNextFrameReference(s: SeqGrabComponent; frameInfo: SeqGrabFrameInfoPtr; var frameDuration: TimeValue; var frameNumber: SInt32): ComponentResult; external name '_SGGetNextFrameReference';
+{
+ * SGGetTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetTimeBase(s: SeqGrabComponent; var tb: TimeBase): ComponentResult; external name '_SGGetTimeBase';
+{
+ * SGSortDeviceList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSortDeviceList(s: SeqGrabComponent; list: SGDeviceList): ComponentResult; external name '_SGSortDeviceList';
+{
+ * SGAddMovieData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGAddMovieData(s: SeqGrabComponent; c: SGChannel; p: Ptr; len: SInt32; var offset: SInt32; chRefCon: SInt32; time: TimeValue; writeType: SInt16): ComponentResult; external name '_SGAddMovieData';
+{
+ * SGChangedSource()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGChangedSource(s: SeqGrabComponent; c: SGChannel): ComponentResult; external name '_SGChangedSource';
+{
+ * SGAddExtendedFrameReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGAddExtendedFrameReference(s: SeqGrabComponent; frameInfo: SeqGrabExtendedFrameInfoPtr): ComponentResult; external name '_SGAddExtendedFrameReference';
+{
+ * SGGetNextExtendedFrameReference()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetNextExtendedFrameReference(s: SeqGrabComponent; frameInfo: SeqGrabExtendedFrameInfoPtr; var frameDuration: TimeValue; var frameNumber: SInt32): ComponentResult; external name '_SGGetNextExtendedFrameReference';
+{
+ * SGAddExtendedMovieData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGAddExtendedMovieData(s: SeqGrabComponent; c: SGChannel; p: Ptr; len: SInt32; var offset: wide; chRefCon: SInt32; time: TimeValue; writeType: SInt16; var whichOutput: SGOutput): ComponentResult; external name '_SGAddExtendedMovieData';
+{
+ * SGAddOutputDataRefToMedia()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGAddOutputDataRefToMedia(s: SeqGrabComponent; sgOut: SGOutput; theMedia: Media; desc: SampleDescriptionHandle): ComponentResult; external name '_SGAddOutputDataRefToMedia';
+{
+ * SGSetSettingsSummary()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function SGSetSettingsSummary(s: SeqGrabComponent; summaryText: Handle): ComponentResult; external name '_SGSetSettingsSummary';
+{** Sequence Grab CHANNEL Component Stuff **}
+
+{
+ * SGSetChannelUsage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetChannelUsage(c: SGChannel; usage: SInt32): ComponentResult; external name '_SGSetChannelUsage';
+{
+ * SGGetChannelUsage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetChannelUsage(c: SGChannel; var usage: SInt32): ComponentResult; external name '_SGGetChannelUsage';
+{
+ * SGSetChannelBounds()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetChannelBounds(c: SGChannel; const (*var*) bounds: Rect): ComponentResult; external name '_SGSetChannelBounds';
+{
+ * SGGetChannelBounds()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetChannelBounds(c: SGChannel; var bounds: Rect): ComponentResult; external name '_SGGetChannelBounds';
+{
+ * SGSetChannelVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetChannelVolume(c: SGChannel; volume: SInt16): ComponentResult; external name '_SGSetChannelVolume';
+{
+ * SGGetChannelVolume()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetChannelVolume(c: SGChannel; var volume: SInt16): ComponentResult; external name '_SGGetChannelVolume';
+{
+ * SGGetChannelInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetChannelInfo(c: SGChannel; var channelInfo: SInt32): ComponentResult; external name '_SGGetChannelInfo';
+{
+ * SGSetChannelPlayFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetChannelPlayFlags(c: SGChannel; playFlags: SInt32): ComponentResult; external name '_SGSetChannelPlayFlags';
+{
+ * SGGetChannelPlayFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetChannelPlayFlags(c: SGChannel; var playFlags: SInt32): ComponentResult; external name '_SGGetChannelPlayFlags';
+{
+ * SGSetChannelMaxFrames()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetChannelMaxFrames(c: SGChannel; frameCount: SInt32): ComponentResult; external name '_SGSetChannelMaxFrames';
+{
+ * SGGetChannelMaxFrames()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetChannelMaxFrames(c: SGChannel; var frameCount: SInt32): ComponentResult; external name '_SGGetChannelMaxFrames';
+{
+ * SGSetChannelRefCon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetChannelRefCon(c: SGChannel; refCon: SInt32): ComponentResult; external name '_SGSetChannelRefCon';
+{
+ * SGSetChannelClip()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetChannelClip(c: SGChannel; theClip: RgnHandle): ComponentResult; external name '_SGSetChannelClip';
+{
+ * SGGetChannelClip()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetChannelClip(c: SGChannel; var theClip: RgnHandle): ComponentResult; external name '_SGGetChannelClip';
+{
+ * SGGetChannelSampleDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetChannelSampleDescription(c: SGChannel; sampleDesc: Handle): ComponentResult; external name '_SGGetChannelSampleDescription';
+{
+ * SGGetChannelDeviceList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetChannelDeviceList(c: SGChannel; selectionFlags: SInt32; var list: SGDeviceList): ComponentResult; external name '_SGGetChannelDeviceList';
+{
+ * SGSetChannelDevice()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetChannelDevice(c: SGChannel; name: StringPtr): ComponentResult; external name '_SGSetChannelDevice';
+{
+ * SGSetChannelMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetChannelMatrix(c: SGChannel; const (*var*) m: MatrixRecord): ComponentResult; external name '_SGSetChannelMatrix';
+{
+ * SGGetChannelMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetChannelMatrix(c: SGChannel; var m: MatrixRecord): ComponentResult; external name '_SGGetChannelMatrix';
+{
+ * SGGetChannelTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetChannelTimeScale(c: SGChannel; var scale: TimeScale): ComponentResult; external name '_SGGetChannelTimeScale';
+{
+ * SGChannelPutPicture()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGChannelPutPicture(c: SGChannel): ComponentResult; external name '_SGChannelPutPicture';
+{
+ * SGChannelSetRequestedDataRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGChannelSetRequestedDataRate(c: SGChannel; bytesPerSecond: SInt32): ComponentResult; external name '_SGChannelSetRequestedDataRate';
+{
+ * SGChannelGetRequestedDataRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGChannelGetRequestedDataRate(c: SGChannel; var bytesPerSecond: SInt32): ComponentResult; external name '_SGChannelGetRequestedDataRate';
+{
+ * SGChannelSetDataSourceName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGChannelSetDataSourceName(c: SGChannel; const (*var*) name: Str255; scriptTag: ScriptCode): ComponentResult; external name '_SGChannelSetDataSourceName';
+{
+ * SGChannelGetDataSourceName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGChannelGetDataSourceName(c: SGChannel; var name: Str255; var scriptTag: ScriptCode): ComponentResult; external name '_SGChannelGetDataSourceName';
+{
+ * SGChannelSetCodecSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function SGChannelSetCodecSettings(c: SGChannel; settings: Handle): ComponentResult; external name '_SGChannelSetCodecSettings';
+{
+ * SGChannelGetCodecSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function SGChannelGetCodecSettings(c: SGChannel; var settings: Handle): ComponentResult; external name '_SGChannelGetCodecSettings';
+{
+ * SGGetChannelTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.0.2 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 4.0 and later
+ }
+function SGGetChannelTimeBase(c: SGChannel; var tb: TimeBase): ComponentResult; external name '_SGGetChannelTimeBase';
+{
+ * SGGetChannelRefCon()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function SGGetChannelRefCon(c: SGChannel; var refCon: SInt32): ComponentResult; external name '_SGGetChannelRefCon';
+{ A utility call to find out the current device and input names, instead of having to call GetDeviceList and walk it yourself }
+{
+ * SGGetChannelDeviceAndInputNames()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function SGGetChannelDeviceAndInputNames(c: SGChannel; var outDeviceName: Str255; var outInputName: Str255; var outInputNumber: SInt16): ComponentResult; external name '_SGGetChannelDeviceAndInputNames';
+{ A media format independent call for this. Inputs start at 0 here (Sound starts at 1, VDIGs at 0 in direct calls) }
+{
+ * SGSetChannelDeviceInput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function SGSetChannelDeviceInput(c: SGChannel; inInputNumber: SInt16): ComponentResult; external name '_SGSetChannelDeviceInput';
+{ A call to bracket SetSettings related calls, to give downstream components an opportunity to deal with the entire
+ settings change in one go }
+
+const
+ sgSetSettingsBegin = $01; { SGSetSettings related set calls about to start }
+ sgSetSettingsEnd = $02; { Finished SGSetSettings calls. Get ready to use the new settings }
+
+ {
+ * SGSetChannelSettingsStateChanging()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function SGSetChannelSettingsStateChanging(c: SGChannel; inFlags: UInt32): ComponentResult; external name '_SGSetChannelSettingsStateChanging';
+{
+ calls from seqGrab to Channel
+}
+{
+ * SGInitChannel()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGInitChannel(c: SGChannel; owner: SeqGrabComponent): ComponentResult; external name '_SGInitChannel';
+{
+ * SGWriteSamples()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGWriteSamples(c: SGChannel; m: Movie; theFile: AliasHandle): ComponentResult; external name '_SGWriteSamples';
+{
+ * SGGetDataRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetDataRate(c: SGChannel; var bytesPerSecond: SInt32): ComponentResult; external name '_SGGetDataRate';
+{
+ * SGAlignChannelRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGAlignChannelRect(c: SGChannel; var r: Rect): ComponentResult; external name '_SGAlignChannelRect';
+{
+ Dorky dialog panel calls
+}
+{
+ * SGPanelGetDitl()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGPanelGetDitl(s: SeqGrabComponent; var ditl: Handle): ComponentResult; external name '_SGPanelGetDitl';
+{
+ * SGPanelGetTitle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGPanelGetTitle(s: SeqGrabComponent; var title: Str255): ComponentResult; external name '_SGPanelGetTitle';
+{
+ * SGPanelCanRun()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGPanelCanRun(s: SeqGrabComponent; c: SGChannel): ComponentResult; external name '_SGPanelCanRun';
+{
+ * SGPanelInstall()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGPanelInstall(s: SeqGrabComponent; c: SGChannel; d: DialogRef; itemOffset: SInt16): ComponentResult; external name '_SGPanelInstall';
+{
+ * SGPanelEvent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGPanelEvent(s: SeqGrabComponent; c: SGChannel; d: DialogRef; itemOffset: SInt16; const (*var*) theEvent: EventRecord; var itemHit: SInt16; var handled: boolean): ComponentResult; external name '_SGPanelEvent';
+{
+ * SGPanelItem()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGPanelItem(s: SeqGrabComponent; c: SGChannel; d: DialogRef; itemOffset: SInt16; itemNum: SInt16): ComponentResult; external name '_SGPanelItem';
+{
+ * SGPanelRemove()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGPanelRemove(s: SeqGrabComponent; c: SGChannel; d: DialogRef; itemOffset: SInt16): ComponentResult; external name '_SGPanelRemove';
+{
+ * SGPanelSetGrabber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGPanelSetGrabber(s: SeqGrabComponent; sg: SeqGrabComponent): ComponentResult; external name '_SGPanelSetGrabber';
+{
+ * SGPanelSetResFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGPanelSetResFile(s: SeqGrabComponent; resRef: SInt16): ComponentResult; external name '_SGPanelSetResFile';
+{
+ * SGPanelGetSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGPanelGetSettings(s: SeqGrabComponent; c: SGChannel; var ud: UserData; flags: SInt32): ComponentResult; external name '_SGPanelGetSettings';
+{
+ * SGPanelSetSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGPanelSetSettings(s: SeqGrabComponent; c: SGChannel; ud: UserData; flags: SInt32): ComponentResult; external name '_SGPanelSetSettings';
+{
+ * SGPanelValidateInput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGPanelValidateInput(s: SeqGrabComponent; var ok: boolean): ComponentResult; external name '_SGPanelValidateInput';
+{
+ * SGPanelSetEventFilter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGPanelSetEventFilter(s: SeqGrabComponent; proc: SGModalFilterUPP; refCon: SInt32): ComponentResult; external name '_SGPanelSetEventFilter';
+{
+ SGPanelGetDITLForSize is used to retrieve user interface elements that fit within a specified size
+ panel. The component should return badComponentSelector for sizes it does not support. The component
+ is required to support kSGSmallestDITLSize, and it is recommended to support kSGLargestDITLSize.
+
+ If SGPanelGetDITLForSize is unimplemented entirely, the panel is assumed to not have resizable UI elements.
+}
+
+const
+ kSGSmallestDITLSize = -1; { requestedSize h and v set to this to retrieve small size }
+ kSGLargestDITLSize = -2; { requestedSize h and v set to this to retrieve large size }
+
+ {
+ * SGPanelGetDITLForSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function SGPanelGetDITLForSize(s: SeqGrabComponent; var ditl: Handle; var requestedSize: Point): ComponentResult; external name '_SGPanelGetDITLForSize';
+{** Sequence Grab VIDEO CHANNEL Component Stuff **}
+{
+ Video stuff
+}
+
+type
+ SGCompressInfoPtr = ^SGCompressInfo;
+ SGCompressInfo = record
+ buffer: Ptr;
+ bufferSize: UInt32;
+ similarity: SInt8;
+ reserved: SInt8;
+ end;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SGGrabBottleProcPtr = function(c: SGChannel; bufferNum: SInt16; refCon: SInt32): ComponentResult;
+{$elsec}
+ SGGrabBottleProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SGGrabCompleteBottleProcPtr = function(c: SGChannel; bufferNum: SInt16; var done: boolean; refCon: SInt32): ComponentResult;
+{$elsec}
+ SGGrabCompleteBottleProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SGDisplayBottleProcPtr = function(c: SGChannel; bufferNum: SInt16; var mp: MatrixRecord; clipRgn: RgnHandle; refCon: SInt32): ComponentResult;
+{$elsec}
+ SGDisplayBottleProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SGCompressBottleProcPtr = function(c: SGChannel; bufferNum: SInt16; refCon: SInt32): ComponentResult;
+{$elsec}
+ SGCompressBottleProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SGCompressCompleteBottleProcPtr = function(c: SGChannel; bufferNum: SInt16; var done: boolean; var ci: SGCompressInfo; refCon: SInt32): ComponentResult;
+{$elsec}
+ SGCompressCompleteBottleProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SGAddFrameBottleProcPtr = function(c: SGChannel; bufferNum: SInt16; atTime: TimeValue; scale: TimeScale; const (*var*) ci: SGCompressInfo; refCon: SInt32): ComponentResult;
+{$elsec}
+ SGAddFrameBottleProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SGTransferFrameBottleProcPtr = function(c: SGChannel; bufferNum: SInt16; var mp: MatrixRecord; clipRgn: RgnHandle; refCon: SInt32): ComponentResult;
+{$elsec}
+ SGTransferFrameBottleProcPtr = ProcPtr;
+{$endc}
+
+ { Note that UInt8 *queuedFrameCount replaces Boolean *done. 0(==false) still means no frames, and 1(==true) one,
+ but if more than one are available the number should be returned here. The value 2 previously meant more than one frame,
+ so some VDIGs may return 2 even if more than 2 are available, and some will still return 1 as they are using the original definition. }
+{$ifc TYPED_FUNCTION_POINTERS}
+ SGGrabCompressCompleteBottleProcPtr = function(c: SGChannel; var queuedFrameCount: UInt8; var ci: SGCompressInfo; var t: TimeRecord; refCon: SInt32): ComponentResult;
+{$elsec}
+ SGGrabCompressCompleteBottleProcPtr = ProcPtr;
+{$endc}
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ SGDisplayCompressBottleProcPtr = function(c: SGChannel; dataPtr: Ptr; desc: ImageDescriptionHandle; var mp: MatrixRecord; clipRgn: RgnHandle; refCon: SInt32): ComponentResult;
+{$elsec}
+ SGDisplayCompressBottleProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ SGGrabBottleUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SGGrabBottleUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SGGrabCompleteBottleUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SGGrabCompleteBottleUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SGDisplayBottleUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SGDisplayBottleUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SGCompressBottleUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SGCompressBottleUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SGCompressCompleteBottleUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SGCompressCompleteBottleUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SGAddFrameBottleUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SGAddFrameBottleUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SGTransferFrameBottleUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SGTransferFrameBottleUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SGGrabCompressCompleteBottleUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SGGrabCompressCompleteBottleUPP = UniversalProcPtr;
+{$endc}
+{$ifc OPAQUE_UPP_TYPES}
+ SGDisplayCompressBottleUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ SGDisplayCompressBottleUPP = UniversalProcPtr;
+{$endc}
+ VideoBottlesPtr = ^VideoBottles;
+ VideoBottles = record
+ procCount: SInt16;
+ grabProc: SGGrabBottleUPP;
+ grabCompleteProc: SGGrabCompleteBottleUPP;
+ displayProc: SGDisplayBottleUPP;
+ compressProc: SGCompressBottleUPP;
+ compressCompleteProc: SGCompressCompleteBottleUPP;
+ addFrameProc: SGAddFrameBottleUPP;
+ transferFrameProc: SGTransferFrameBottleUPP;
+ grabCompressCompleteProc: SGGrabCompressCompleteBottleUPP;
+ displayCompressProc: SGDisplayCompressBottleUPP;
+ end;
+
+ {
+ * SGGetSrcVideoBounds()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetSrcVideoBounds(c: SGChannel; var r: Rect): ComponentResult; external name '_SGGetSrcVideoBounds';
+{
+ * SGSetVideoRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetVideoRect(c: SGChannel; const (*var*) r: Rect): ComponentResult; external name '_SGSetVideoRect';
+{
+ * SGGetVideoRect()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetVideoRect(c: SGChannel; var r: Rect): ComponentResult; external name '_SGGetVideoRect';
+{
+ * SGGetVideoCompressorType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetVideoCompressorType(c: SGChannel; var compressorType: OSType): ComponentResult; external name '_SGGetVideoCompressorType';
+{
+ * SGSetVideoCompressorType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetVideoCompressorType(c: SGChannel; compressorType: OSType): ComponentResult; external name '_SGSetVideoCompressorType';
+{
+ * SGSetVideoCompressor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetVideoCompressor(c: SGChannel; depth: SInt16; compressor: CompressorComponent; spatialQuality: CodecQ; temporalQuality: CodecQ; keyFrameRate: SInt32): ComponentResult; external name '_SGSetVideoCompressor';
+{
+ * SGGetVideoCompressor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetVideoCompressor(c: SGChannel; var depth: SInt16; var compressor: CompressorComponent; var spatialQuality: CodecQ; var temporalQuality: CodecQ; var keyFrameRate: SInt32): ComponentResult; external name '_SGGetVideoCompressor';
+{
+ * SGGetVideoDigitizerComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetVideoDigitizerComponent(c: SGChannel): ComponentInstance; external name '_SGGetVideoDigitizerComponent';
+{
+ * SGSetVideoDigitizerComponent()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetVideoDigitizerComponent(c: SGChannel; vdig: ComponentInstance): ComponentResult; external name '_SGSetVideoDigitizerComponent';
+{
+ * SGVideoDigitizerChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGVideoDigitizerChanged(c: SGChannel): ComponentResult; external name '_SGVideoDigitizerChanged';
+{
+ * SGSetVideoBottlenecks()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetVideoBottlenecks(c: SGChannel; var vb: VideoBottles): ComponentResult; external name '_SGSetVideoBottlenecks';
+{
+ * SGGetVideoBottlenecks()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetVideoBottlenecks(c: SGChannel; var vb: VideoBottles): ComponentResult; external name '_SGGetVideoBottlenecks';
+{
+ * SGGrabFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGrabFrame(c: SGChannel; bufferNum: SInt16): ComponentResult; external name '_SGGrabFrame';
+{
+ * SGGrabFrameComplete()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGrabFrameComplete(c: SGChannel; bufferNum: SInt16; var done: boolean): ComponentResult; external name '_SGGrabFrameComplete';
+{
+ * SGDisplayFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGDisplayFrame(c: SGChannel; bufferNum: SInt16; const (*var*) mp: MatrixRecord; clipRgn: RgnHandle): ComponentResult; external name '_SGDisplayFrame';
+{
+ * SGCompressFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGCompressFrame(c: SGChannel; bufferNum: SInt16): ComponentResult; external name '_SGCompressFrame';
+{
+ * SGCompressFrameComplete()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGCompressFrameComplete(c: SGChannel; bufferNum: SInt16; var done: boolean; var ci: SGCompressInfo): ComponentResult; external name '_SGCompressFrameComplete';
+{
+ * SGAddFrame()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGAddFrame(c: SGChannel; bufferNum: SInt16; atTime: TimeValue; scale: TimeScale; const (*var*) ci: SGCompressInfo): ComponentResult; external name '_SGAddFrame';
+{
+ * SGTransferFrameForCompress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGTransferFrameForCompress(c: SGChannel; bufferNum: SInt16; const (*var*) mp: MatrixRecord; clipRgn: RgnHandle): ComponentResult; external name '_SGTransferFrameForCompress';
+{
+ * SGSetCompressBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetCompressBuffer(c: SGChannel; depth: SInt16; const (*var*) compressSize: Rect): ComponentResult; external name '_SGSetCompressBuffer';
+{
+ * SGGetCompressBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetCompressBuffer(c: SGChannel; var depth: SInt16; var compressSize: Rect): ComponentResult; external name '_SGGetCompressBuffer';
+{
+ * SGGetBufferInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetBufferInfo(c: SGChannel; bufferNum: SInt16; var bufferPM: PixMapHandle; var bufferRect: Rect; var compressBuffer: GWorldPtr; var compressBufferRect: Rect): ComponentResult; external name '_SGGetBufferInfo';
+{
+ * SGSetUseScreenBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetUseScreenBuffer(c: SGChannel; useScreenBuffer: boolean): ComponentResult; external name '_SGSetUseScreenBuffer';
+{
+ * SGGetUseScreenBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetUseScreenBuffer(c: SGChannel; var useScreenBuffer: boolean): ComponentResult; external name '_SGGetUseScreenBuffer';
+{ Note that UInt8 *queuedFrameCount replaces Boolean *done. 0(==false) still means no frames, and 1(==true) one,
+ but if more than one are available the number should be returned here. The value 2 previously meant more than one frame,
+ so some VDIGs may return 2 even if more than 2 are available, and some will still return 1 as they are using the original definition. }
+{
+ * SGGrabCompressComplete()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGrabCompressComplete(c: SGChannel; var queuedFrameCount: UInt8; var ci: SGCompressInfo; var tr: TimeRecord): ComponentResult; external name '_SGGrabCompressComplete';
+{
+ * SGDisplayCompress()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGDisplayCompress(c: SGChannel; dataPtr: Ptr; desc: ImageDescriptionHandle; var mp: MatrixRecord; clipRgn: RgnHandle): ComponentResult; external name '_SGDisplayCompress';
+{
+ * SGSetFrameRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetFrameRate(c: SGChannel; frameRate: Fixed): ComponentResult; external name '_SGSetFrameRate';
+{
+ * SGGetFrameRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetFrameRate(c: SGChannel; var frameRate: Fixed): ComponentResult; external name '_SGGetFrameRate';
+{
+ * SGSetPreferredPacketSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetPreferredPacketSize(c: SGChannel; preferredPacketSizeInBytes: SInt32): ComponentResult; external name '_SGSetPreferredPacketSize';
+{
+ * SGGetPreferredPacketSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetPreferredPacketSize(c: SGChannel; var preferredPacketSizeInBytes: SInt32): ComponentResult; external name '_SGGetPreferredPacketSize';
+{
+ * SGSetUserVideoCompressorList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetUserVideoCompressorList(c: SGChannel; compressorTypes: Handle): ComponentResult; external name '_SGSetUserVideoCompressorList';
+{
+ * SGGetUserVideoCompressorList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetUserVideoCompressorList(c: SGChannel; var compressorTypes: Handle): ComponentResult; external name '_SGGetUserVideoCompressorList';
+{** Sequence Grab SOUND CHANNEL Component Stuff **}
+
+{
+ Sound stuff
+}
+{
+ * SGSetSoundInputDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetSoundInputDriver(c: SGChannel; const (*var*) driverName: Str255): ComponentResult; external name '_SGSetSoundInputDriver';
+{
+ * SGGetSoundInputDriver()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetSoundInputDriver(c: SGChannel): SInt32; external name '_SGGetSoundInputDriver';
+{
+ * SGSoundInputDriverChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSoundInputDriverChanged(c: SGChannel): ComponentResult; external name '_SGSoundInputDriverChanged';
+{
+ * SGSetSoundRecordChunkSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetSoundRecordChunkSize(c: SGChannel; seconds: SInt32): ComponentResult; external name '_SGSetSoundRecordChunkSize';
+{
+ * SGGetSoundRecordChunkSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetSoundRecordChunkSize(c: SGChannel): SInt32; external name '_SGGetSoundRecordChunkSize';
+{
+ * SGSetSoundInputRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetSoundInputRate(c: SGChannel; rate: Fixed): ComponentResult; external name '_SGSetSoundInputRate';
+{
+ * SGGetSoundInputRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetSoundInputRate(c: SGChannel): Fixed; external name '_SGGetSoundInputRate';
+{
+ * SGSetSoundInputParameters()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetSoundInputParameters(c: SGChannel; sampleSize: SInt16; numChannels: SInt16; compressionType: OSType): ComponentResult; external name '_SGSetSoundInputParameters';
+{
+ * SGGetSoundInputParameters()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetSoundInputParameters(c: SGChannel; var sampleSize: SInt16; var numChannels: SInt16; var compressionType: OSType): ComponentResult; external name '_SGGetSoundInputParameters';
+{
+ * SGSetAdditionalSoundRates()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetAdditionalSoundRates(c: SGChannel; rates: Handle): ComponentResult; external name '_SGSetAdditionalSoundRates';
+{
+ * SGGetAdditionalSoundRates()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetAdditionalSoundRates(c: SGChannel; var rates: Handle): ComponentResult; external name '_SGGetAdditionalSoundRates';
+{
+ Text stuff
+}
+{
+ * SGSetFontName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetFontName(c: SGChannel; pstr: StringPtr): ComponentResult; external name '_SGSetFontName';
+{
+ * SGSetFontSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetFontSize(c: SGChannel; fontSize: SInt16): ComponentResult; external name '_SGSetFontSize';
+{
+ * SGSetTextForeColor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetTextForeColor(c: SGChannel; var theColor: RGBColor): ComponentResult; external name '_SGSetTextForeColor';
+{
+ * SGSetTextBackColor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetTextBackColor(c: SGChannel; var theColor: RGBColor): ComponentResult; external name '_SGSetTextBackColor';
+{
+ * SGSetJustification()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetJustification(c: SGChannel; just: SInt16): ComponentResult; external name '_SGSetJustification';
+{
+ * SGGetTextReturnToSpaceValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetTextReturnToSpaceValue(c: SGChannel; var rettospace: SInt16): ComponentResult; external name '_SGGetTextReturnToSpaceValue';
+{
+ * SGSetTextReturnToSpaceValue()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetTextReturnToSpaceValue(c: SGChannel; rettospace: SInt16): ComponentResult; external name '_SGSetTextReturnToSpaceValue';
+{
+ Music stuff
+}
+{
+ * SGGetInstrument()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGGetInstrument(c: SGChannel; var td: ToneDescription): ComponentResult; external name '_SGGetInstrument';
+{
+ * SGSetInstrument()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 2.5 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function SGSetInstrument(c: SGChannel; var td: ToneDescription): ComponentResult; external name '_SGSetInstrument';
+const
+ sgChannelAtom = $6368616E (* 'chan' *);
+ sgChannelSettingsAtom = $63746F6D (* 'ctom' *);
+ sgChannelDescription = $63647363 (* 'cdsc' *);
+ sgChannelSettings = $63736574 (* 'cset' *);
+
+ sgDeviceNameType = $6E616D65 (* 'name' *);
+ sgDeviceDisplayNameType = $646E616D (* 'dnam' *);
+ sgDeviceUIDType = $64756964 (* 'duid' *);
+ sgInputUIDType = $69756964 (* 'iuid' *);
+ sgUsageType = $75736520 (* 'use ' *);
+ sgPlayFlagsType = $706C7966 (* 'plyf' *);
+ sgClipType = $636C6970 (* 'clip' *);
+ sgMatrixType = $6D747278 (* 'mtrx' *);
+ sgVolumeType = $766F6C75 (* 'volu' *);
+
+ sgPanelSettingsAtom = $70746F6D (* 'ptom' *);
+ sgPanelDescription = $70647363 (* 'pdsc' *);
+ sgPanelSettings = $70736574 (* 'pset' *);
+
+ sgcSoundCompressionType = $73636D70 (* 'scmp' *);
+ sgcSoundCodecSettingsType = $63646563 (* 'cdec' *);
+ sgcSoundSampleRateType = $73726174 (* 'srat' *);
+ sgcSoundChannelCountType = $7363686E (* 'schn' *);
+ sgcSoundSampleSizeType = $7373697A (* 'ssiz' *);
+ sgcSoundInputType = $73696E70 (* 'sinp' *);
+ sgcSoundGainType = $6761696E (* 'gain' *);
+
+ sgcVideoHueType = $68756520 (* 'hue ' *);
+ sgcVideoSaturationType = $73617472 (* 'satr' *);
+ sgcVideoContrastType = $74727374 (* 'trst' *);
+ sgcVideoSharpnessType = $73687270 (* 'shrp' *);
+ sgcVideoBrigtnessType = $62726974 (* 'brit' *);
+ sgcVideoBlackLevelType = $626C6B6C (* 'blkl' *);
+ sgcVideoWhiteLevelType = $7768746C (* 'whtl' *);
+ sgcVideoInputType = $76696E70 (* 'vinp' *);
+ sgcVideoFormatType = $76737464 (* 'vstd' *);
+ sgcVideoFilterType = $76666C74 (* 'vflt' *);
+ sgcVideoRectType = $76726374 (* 'vrct' *);
+ sgcVideoDigitizerType = $76646967 (* 'vdig' *);
+
+
+type
+ QTVideoOutputComponent = ComponentInstance;
+ { Component type and subtype enumerations }
+
+const
+ QTVideoOutputComponentType = $766F7574 (* 'vout' *);
+ QTVideoOutputComponentBaseSubType = $62617365 (* 'base' *);
+
+
+ { QTVideoOutput Component flags }
+
+ kQTVideoOutputDontDisplayToUser = $00000001;
+
+ { Display mode atom types }
+
+ kQTVODisplayModeItem = $71646D69 (* 'qdmi' *);
+ kQTVODimensions = $64696D6E (* 'dimn' *); { atom contains two longs - pixel count - width, height }
+ kQTVOResolution = $7265736C (* 'resl' *); { atom contains two Fixed - hRes, vRes in dpi }
+ kQTVORefreshRate = $72656672 (* 'refr' *); { atom contains one Fixed - refresh rate in Hz }
+ kQTVOPixelType = $7069786C (* 'pixl' *); { atom contains one OSType - pixel format of mode }
+ kQTVOName = $6E616D65 (* 'name' *); { atom contains string (no length byte) - name of mode for display to user }
+ kQTVODecompressors = $6465636F (* 'deco' *); { atom contains other atoms indicating supported decompressors }
+ { kQTVODecompressors sub-atoms }
+ kQTVODecompressorType = $64657479 (* 'dety' *); { atom contains one OSType - decompressor type code }
+ kQTVODecompressorContinuous = $636F6E74 (* 'cont' *); { atom contains one Boolean - true if this type is displayed continuously }
+ kQTVODecompressorComponent = $636D7074 (* 'cmpt' *); { atom contains one Component - component id of decompressor }
+
+ { * These are QTVideoOutput procedures * }
+ {
+ * QTVideoOutputGetDisplayModeList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputGetDisplayModeList(vo: QTVideoOutputComponent; var outputs: QTAtomContainer): ComponentResult; external name '_QTVideoOutputGetDisplayModeList';
+{
+ * QTVideoOutputGetCurrentClientName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputGetCurrentClientName(vo: QTVideoOutputComponent; var str: Str255): ComponentResult; external name '_QTVideoOutputGetCurrentClientName';
+{
+ * QTVideoOutputSetClientName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputSetClientName(vo: QTVideoOutputComponent; const (*var*) str: Str255): ComponentResult; external name '_QTVideoOutputSetClientName';
+{
+ * QTVideoOutputGetClientName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputGetClientName(vo: QTVideoOutputComponent; var str: Str255): ComponentResult; external name '_QTVideoOutputGetClientName';
+{
+ * QTVideoOutputBegin()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputBegin(vo: QTVideoOutputComponent): ComponentResult; external name '_QTVideoOutputBegin';
+{
+ * QTVideoOutputEnd()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputEnd(vo: QTVideoOutputComponent): ComponentResult; external name '_QTVideoOutputEnd';
+{
+ * QTVideoOutputSetDisplayMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputSetDisplayMode(vo: QTVideoOutputComponent; displayModeID: SInt32): ComponentResult; external name '_QTVideoOutputSetDisplayMode';
+{
+ * QTVideoOutputGetDisplayMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputGetDisplayMode(vo: QTVideoOutputComponent; var displayModeID: SInt32): ComponentResult; external name '_QTVideoOutputGetDisplayMode';
+{
+ * QTVideoOutputCustomConfigureDisplay()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputCustomConfigureDisplay(vo: QTVideoOutputComponent; filter: ModalFilterUPP): ComponentResult; external name '_QTVideoOutputCustomConfigureDisplay';
+{
+ * QTVideoOutputSaveState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputSaveState(vo: QTVideoOutputComponent; var state: QTAtomContainer): ComponentResult; external name '_QTVideoOutputSaveState';
+{
+ * QTVideoOutputRestoreState()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputRestoreState(vo: QTVideoOutputComponent; state: QTAtomContainer): ComponentResult; external name '_QTVideoOutputRestoreState';
+{
+ * QTVideoOutputGetGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputGetGWorld(vo: QTVideoOutputComponent; var gw: GWorldPtr): ComponentResult; external name '_QTVideoOutputGetGWorld';
+{
+ * QTVideoOutputGetGWorldParameters()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputGetGWorldParameters(vo: QTVideoOutputComponent; var baseAddr: Ptr; var rowBytes: SInt32; var colorTable: CTabHandle): ComponentResult; external name '_QTVideoOutputGetGWorldParameters';
+{
+ * QTVideoOutputGetIndSoundOutput()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputGetIndSoundOutput(vo: QTVideoOutputComponent; index: SInt32; var outputComponent: Component): ComponentResult; external name '_QTVideoOutputGetIndSoundOutput';
+{
+ * QTVideoOutputGetClock()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputGetClock(vo: QTVideoOutputComponent; var clock: ComponentInstance): ComponentResult; external name '_QTVideoOutputGetClock';
+{
+ * QTVideoOutputSetEchoPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 3.0 and later
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 3.0 and later
+ }
+function QTVideoOutputSetEchoPort(vo: QTVideoOutputComponent; echoPort: CGrafPtr): ComponentResult; external name '_QTVideoOutputSetEchoPort';
+{
+ * QTVideoOutputGetIndImageDecompressor()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in qtmlClient.lib 5.0 and later
+ }
+function QTVideoOutputGetIndImageDecompressor(vo: QTVideoOutputComponent; index: SInt32; var codec: Component): ComponentResult; external name '_QTVideoOutputGetIndImageDecompressor';
+{
+ * QTVideoOutputBaseSetEchoPort()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QuickTimeLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function QTVideoOutputBaseSetEchoPort(vo: QTVideoOutputComponent; echoPort: CGrafPtr): ComponentResult; external name '_QTVideoOutputBaseSetEchoPort';
+{ UPP call backs }
+
+const
+ uppDataHCompletionProcInfo = $00000BC0;
+ uppVdigIntProcInfo = $000003C0;
+ uppStartDocumentHandlerProcInfo = $000000F0;
+ uppEndDocumentHandlerProcInfo = $000000F0;
+ uppStartElementHandlerProcInfo = $00000FF0;
+ uppEndElementHandlerProcInfo = $000003F0;
+ uppCharDataHandlerProcInfo = $000003F0;
+ uppPreprocessInstructionHandlerProcInfo = $00000FF0;
+ uppCommentHandlerProcInfo = $000003F0;
+ uppCDataHandlerProcInfo = $000003F0;
+ uppSGDataProcInfo = $003BFFE0;
+ uppSGModalFilterProcInfo = $00003FD0;
+ uppSGGrabBottleProcInfo = $00000EF0;
+ uppSGGrabCompleteBottleProcInfo = $00003EF0;
+ uppSGDisplayBottleProcInfo = $0000FEF0;
+ uppSGCompressBottleProcInfo = $00000EF0;
+ uppSGCompressCompleteBottleProcInfo = $0000FEF0;
+ uppSGAddFrameBottleProcInfo = $0003FEF0;
+ uppSGTransferFrameBottleProcInfo = $0000FEF0;
+ uppSGGrabCompressCompleteBottleProcInfo = $0000FFF0;
+ uppSGDisplayCompressBottleProcInfo = $0003FFF0;
+ {
+ * NewDataHCompletionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewDataHCompletionUPP(userRoutine: DataHCompletionProcPtr): DataHCompletionUPP; external name '_NewDataHCompletionUPP'; { old name was NewDataHCompletionProc }
+{
+ * NewVdigIntUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewVdigIntUPP(userRoutine: VdigIntProcPtr): VdigIntUPP; external name '_NewVdigIntUPP'; { old name was NewVdigIntProc }
+{
+ * NewStartDocumentHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewStartDocumentHandlerUPP(userRoutine: StartDocumentHandler): StartDocumentHandlerUPP; external name '_NewStartDocumentHandlerUPP'; { old name was NewStartDocumentHandlerProc }
+{
+ * NewEndDocumentHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewEndDocumentHandlerUPP(userRoutine: EndDocumentHandler): EndDocumentHandlerUPP; external name '_NewEndDocumentHandlerUPP'; { old name was NewEndDocumentHandlerProc }
+{
+ * NewStartElementHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewStartElementHandlerUPP(userRoutine: StartElementHandler): StartElementHandlerUPP; external name '_NewStartElementHandlerUPP'; { old name was NewStartElementHandlerProc }
+{
+ * NewEndElementHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewEndElementHandlerUPP(userRoutine: EndElementHandler): EndElementHandlerUPP; external name '_NewEndElementHandlerUPP'; { old name was NewEndElementHandlerProc }
+{
+ * NewCharDataHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewCharDataHandlerUPP(userRoutine: CharDataHandler): CharDataHandlerUPP; external name '_NewCharDataHandlerUPP'; { old name was NewCharDataHandlerProc }
+{
+ * NewPreprocessInstructionHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewPreprocessInstructionHandlerUPP(userRoutine: PreprocessInstructionHandler): PreprocessInstructionHandlerUPP; external name '_NewPreprocessInstructionHandlerUPP'; { old name was NewPreprocessInstructionHandlerProc }
+{
+ * NewCommentHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewCommentHandlerUPP(userRoutine: CommentHandler): CommentHandlerUPP; external name '_NewCommentHandlerUPP'; { old name was NewCommentHandlerProc }
+{
+ * NewCDataHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ }
+function NewCDataHandlerUPP(userRoutine: CDataHandler): CDataHandlerUPP; external name '_NewCDataHandlerUPP'; { old name was NewCDataHandlerProc }
+{
+ * NewSGDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSGDataUPP(userRoutine: SGDataProcPtr): SGDataUPP; external name '_NewSGDataUPP'; { old name was NewSGDataProc }
+{
+ * NewSGModalFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSGModalFilterUPP(userRoutine: SGModalFilterProcPtr): SGModalFilterUPP; external name '_NewSGModalFilterUPP'; { old name was NewSGModalFilterProc }
+{
+ * NewSGGrabBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSGGrabBottleUPP(userRoutine: SGGrabBottleProcPtr): SGGrabBottleUPP; external name '_NewSGGrabBottleUPP'; { old name was NewSGGrabBottleProc }
+{
+ * NewSGGrabCompleteBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSGGrabCompleteBottleUPP(userRoutine: SGGrabCompleteBottleProcPtr): SGGrabCompleteBottleUPP; external name '_NewSGGrabCompleteBottleUPP'; { old name was NewSGGrabCompleteBottleProc }
+{
+ * NewSGDisplayBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSGDisplayBottleUPP(userRoutine: SGDisplayBottleProcPtr): SGDisplayBottleUPP; external name '_NewSGDisplayBottleUPP'; { old name was NewSGDisplayBottleProc }
+{
+ * NewSGCompressBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSGCompressBottleUPP(userRoutine: SGCompressBottleProcPtr): SGCompressBottleUPP; external name '_NewSGCompressBottleUPP'; { old name was NewSGCompressBottleProc }
+{
+ * NewSGCompressCompleteBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSGCompressCompleteBottleUPP(userRoutine: SGCompressCompleteBottleProcPtr): SGCompressCompleteBottleUPP; external name '_NewSGCompressCompleteBottleUPP'; { old name was NewSGCompressCompleteBottleProc }
+{
+ * NewSGAddFrameBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSGAddFrameBottleUPP(userRoutine: SGAddFrameBottleProcPtr): SGAddFrameBottleUPP; external name '_NewSGAddFrameBottleUPP'; { old name was NewSGAddFrameBottleProc }
+{
+ * NewSGTransferFrameBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSGTransferFrameBottleUPP(userRoutine: SGTransferFrameBottleProcPtr): SGTransferFrameBottleUPP; external name '_NewSGTransferFrameBottleUPP'; { old name was NewSGTransferFrameBottleProc }
+{
+ * NewSGGrabCompressCompleteBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSGGrabCompressCompleteBottleUPP(userRoutine: SGGrabCompressCompleteBottleProcPtr): SGGrabCompressCompleteBottleUPP; external name '_NewSGGrabCompressCompleteBottleUPP'; { old name was NewSGGrabCompressCompleteBottleProc }
+{
+ * NewSGDisplayCompressBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewSGDisplayCompressBottleUPP(userRoutine: SGDisplayCompressBottleProcPtr): SGDisplayCompressBottleUPP; external name '_NewSGDisplayCompressBottleUPP'; { old name was NewSGDisplayCompressBottleProc }
+{
+ * DisposeDataHCompletionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeDataHCompletionUPP(userUPP: DataHCompletionUPP); external name '_DisposeDataHCompletionUPP';
+{
+ * DisposeVdigIntUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeVdigIntUPP(userUPP: VdigIntUPP); external name '_DisposeVdigIntUPP';
+{
+ * DisposeStartDocumentHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeStartDocumentHandlerUPP(userUPP: StartDocumentHandlerUPP); external name '_DisposeStartDocumentHandlerUPP';
+{
+ * DisposeEndDocumentHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeEndDocumentHandlerUPP(userUPP: EndDocumentHandlerUPP); external name '_DisposeEndDocumentHandlerUPP';
+{
+ * DisposeStartElementHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeStartElementHandlerUPP(userUPP: StartElementHandlerUPP); external name '_DisposeStartElementHandlerUPP';
+{
+ * DisposeEndElementHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeEndElementHandlerUPP(userUPP: EndElementHandlerUPP); external name '_DisposeEndElementHandlerUPP';
+{
+ * DisposeCharDataHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeCharDataHandlerUPP(userUPP: CharDataHandlerUPP); external name '_DisposeCharDataHandlerUPP';
+{
+ * DisposePreprocessInstructionHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposePreprocessInstructionHandlerUPP(userUPP: PreprocessInstructionHandlerUPP); external name '_DisposePreprocessInstructionHandlerUPP';
+{
+ * DisposeCommentHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeCommentHandlerUPP(userUPP: CommentHandlerUPP); external name '_DisposeCommentHandlerUPP';
+{
+ * DisposeCDataHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ }
+procedure DisposeCDataHandlerUPP(userUPP: CDataHandlerUPP); external name '_DisposeCDataHandlerUPP';
+{
+ * DisposeSGDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSGDataUPP(userUPP: SGDataUPP); external name '_DisposeSGDataUPP';
+{
+ * DisposeSGModalFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSGModalFilterUPP(userUPP: SGModalFilterUPP); external name '_DisposeSGModalFilterUPP';
+{
+ * DisposeSGGrabBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSGGrabBottleUPP(userUPP: SGGrabBottleUPP); external name '_DisposeSGGrabBottleUPP';
+{
+ * DisposeSGGrabCompleteBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSGGrabCompleteBottleUPP(userUPP: SGGrabCompleteBottleUPP); external name '_DisposeSGGrabCompleteBottleUPP';
+{
+ * DisposeSGDisplayBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSGDisplayBottleUPP(userUPP: SGDisplayBottleUPP); external name '_DisposeSGDisplayBottleUPP';
+{
+ * DisposeSGCompressBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSGCompressBottleUPP(userUPP: SGCompressBottleUPP); external name '_DisposeSGCompressBottleUPP';
+{
+ * DisposeSGCompressCompleteBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSGCompressCompleteBottleUPP(userUPP: SGCompressCompleteBottleUPP); external name '_DisposeSGCompressCompleteBottleUPP';
+{
+ * DisposeSGAddFrameBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSGAddFrameBottleUPP(userUPP: SGAddFrameBottleUPP); external name '_DisposeSGAddFrameBottleUPP';
+{
+ * DisposeSGTransferFrameBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSGTransferFrameBottleUPP(userUPP: SGTransferFrameBottleUPP); external name '_DisposeSGTransferFrameBottleUPP';
+{
+ * DisposeSGGrabCompressCompleteBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSGGrabCompressCompleteBottleUPP(userUPP: SGGrabCompressCompleteBottleUPP); external name '_DisposeSGGrabCompressCompleteBottleUPP';
+{
+ * DisposeSGDisplayCompressBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeSGDisplayCompressBottleUPP(userUPP: SGDisplayCompressBottleUPP); external name '_DisposeSGDisplayCompressBottleUPP';
+{
+ * InvokeDataHCompletionUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeDataHCompletionUPP(request: Ptr; refcon: SInt32; err: OSErr; userRoutine: DataHCompletionUPP); external name '_InvokeDataHCompletionUPP'; { old name was CallDataHCompletionProc }
+{
+ * InvokeVdigIntUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeVdigIntUPP(flags: SInt32; refcon: SInt32; userRoutine: VdigIntUPP); external name '_InvokeVdigIntUPP'; { old name was CallVdigIntProc }
+{
+ * InvokeStartDocumentHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeStartDocumentHandlerUPP(refcon: SInt32; userRoutine: StartDocumentHandlerUPP): ComponentResult; external name '_InvokeStartDocumentHandlerUPP'; { old name was CallStartDocumentHandlerProc }
+{
+ * InvokeEndDocumentHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeEndDocumentHandlerUPP(refcon: SInt32; userRoutine: EndDocumentHandlerUPP): ComponentResult; external name '_InvokeEndDocumentHandlerUPP'; { old name was CallEndDocumentHandlerProc }
+{
+ * InvokeStartElementHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeStartElementHandlerUPP(name: ConstCStringPtr; var atts: ConstCStringPtr; refcon: SInt32; userRoutine: StartElementHandlerUPP): ComponentResult; external name '_InvokeStartElementHandlerUPP'; { old name was CallStartElementHandlerProc }
+{
+ * InvokeEndElementHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeEndElementHandlerUPP(name: ConstCStringPtr; refcon: SInt32; userRoutine: EndElementHandlerUPP): ComponentResult; external name '_InvokeEndElementHandlerUPP'; { old name was CallEndElementHandlerProc }
+{
+ * InvokeCharDataHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeCharDataHandlerUPP(charData: ConstCStringPtr; refcon: SInt32; userRoutine: CharDataHandlerUPP): ComponentResult; external name '_InvokeCharDataHandlerUPP'; { old name was CallCharDataHandlerProc }
+{
+ * InvokePreprocessInstructionHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokePreprocessInstructionHandlerUPP(name: ConstCStringPtr; atts: ConstCStringPtrPtr; refcon: SInt32; userRoutine: PreprocessInstructionHandlerUPP): ComponentResult; external name '_InvokePreprocessInstructionHandlerUPP'; { old name was CallPreprocessInstructionHandlerProc }
+{
+ * InvokeCommentHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeCommentHandlerUPP(comment: ConstCStringPtr; refcon: SInt32; userRoutine: CommentHandlerUPP): ComponentResult; external name '_InvokeCommentHandlerUPP'; { old name was CallCommentHandlerProc }
+{
+ * InvokeCDataHandlerUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ }
+function InvokeCDataHandlerUPP(cdata: ConstCStringPtr; refcon: SInt32; userRoutine: CDataHandlerUPP): ComponentResult; external name '_InvokeCDataHandlerUPP'; { old name was CallCDataHandlerProc }
+{
+ * InvokeSGDataUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSGDataUPP(c: SGChannel; p: Ptr; len: SInt32; var offset: SInt32; chRefCon: SInt32; time: TimeValue; writeType: SInt16; refCon: SInt32; userRoutine: SGDataUPP): OSErr; external name '_InvokeSGDataUPP'; { old name was CallSGDataProc }
+{
+ * InvokeSGModalFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSGModalFilterUPP(theDialog: DialogRef; const (*var*) theEvent: EventRecord; var itemHit: SInt16; refCon: SInt32; userRoutine: SGModalFilterUPP): boolean; external name '_InvokeSGModalFilterUPP'; { old name was CallSGModalFilterProc }
+{
+ * InvokeSGGrabBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSGGrabBottleUPP(c: SGChannel; bufferNum: SInt16; refCon: SInt32; userRoutine: SGGrabBottleUPP): ComponentResult; external name '_InvokeSGGrabBottleUPP'; { old name was CallSGGrabBottleProc }
+{
+ * InvokeSGGrabCompleteBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSGGrabCompleteBottleUPP(c: SGChannel; bufferNum: SInt16; var done: boolean; refCon: SInt32; userRoutine: SGGrabCompleteBottleUPP): ComponentResult; external name '_InvokeSGGrabCompleteBottleUPP'; { old name was CallSGGrabCompleteBottleProc }
+{
+ * InvokeSGDisplayBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSGDisplayBottleUPP(c: SGChannel; bufferNum: SInt16; var mp: MatrixRecord; clipRgn: RgnHandle; refCon: SInt32; userRoutine: SGDisplayBottleUPP): ComponentResult; external name '_InvokeSGDisplayBottleUPP'; { old name was CallSGDisplayBottleProc }
+{
+ * InvokeSGCompressBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSGCompressBottleUPP(c: SGChannel; bufferNum: SInt16; refCon: SInt32; userRoutine: SGCompressBottleUPP): ComponentResult; external name '_InvokeSGCompressBottleUPP'; { old name was CallSGCompressBottleProc }
+{
+ * InvokeSGCompressCompleteBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSGCompressCompleteBottleUPP(c: SGChannel; bufferNum: SInt16; var done: boolean; var ci: SGCompressInfo; refCon: SInt32; userRoutine: SGCompressCompleteBottleUPP): ComponentResult; external name '_InvokeSGCompressCompleteBottleUPP'; { old name was CallSGCompressCompleteBottleProc }
+{
+ * InvokeSGAddFrameBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSGAddFrameBottleUPP(c: SGChannel; bufferNum: SInt16; atTime: TimeValue; scale: TimeScale; const (*var*) ci: SGCompressInfo; refCon: SInt32; userRoutine: SGAddFrameBottleUPP): ComponentResult; external name '_InvokeSGAddFrameBottleUPP'; { old name was CallSGAddFrameBottleProc }
+{
+ * InvokeSGTransferFrameBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSGTransferFrameBottleUPP(c: SGChannel; bufferNum: SInt16; var mp: MatrixRecord; clipRgn: RgnHandle; refCon: SInt32; userRoutine: SGTransferFrameBottleUPP): ComponentResult; external name '_InvokeSGTransferFrameBottleUPP'; { old name was CallSGTransferFrameBottleProc }
+{
+ * InvokeSGGrabCompressCompleteBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSGGrabCompressCompleteBottleUPP(c: SGChannel; var queuedFrameCount: UInt8; var ci: SGCompressInfo; var t: TimeRecord; refCon: SInt32; userRoutine: SGGrabCompressCompleteBottleUPP): ComponentResult; external name '_InvokeSGGrabCompressCompleteBottleUPP'; { old name was CallSGGrabCompressCompleteBottleProc }
+{
+ * InvokeSGDisplayCompressBottleUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.0 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeSGDisplayCompressBottleUPP(c: SGChannel; dataPtr: Ptr; desc: ImageDescriptionHandle; var mp: MatrixRecord; clipRgn: RgnHandle; refCon: SInt32; userRoutine: SGDisplayCompressBottleUPP): ComponentResult; external name '_InvokeSGDisplayCompressBottleUPP'; { old name was CallSGDisplayCompressBottleProc }
+{$ALIGN MAC68K}
+
+
+{unit QuickTimeStreaming}
+{
+ File: QuickTimeStreaming.p
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1990-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ kQTSInfiniteDuration = $7FFFFFFF;
+ kQTSUnknownDuration = $00000000;
+ kQTSNormalForwardRate = $00010000;
+ kQTSStoppedRate = $00000000;
+
+
+type
+ QTSPresentationRecordPtr = ^QTSPresentationRecord;
+ QTSPresentationRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ QTSPresentation = ^QTSPresentationRecord;
+ QTSStreamRecordPtr = ^QTSStreamRecord;
+ QTSStreamRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ QTSStream = ^QTSStreamRecord;
+ QTSEditEntryPtr = ^QTSEditEntry;
+ QTSEditEntry = record
+ presentationDuration: TimeValue64;
+ streamStartTime: TimeValue64;
+ streamRate: Fixed;
+ end;
+
+ QTSEditListPtr = ^QTSEditList;
+ QTSEditList = record
+ numEdits: SInt32;
+ edits: array [0..0] of QTSEditEntry;
+ end;
+
+ QTSEditListHandle = ^QTSEditListPtr;
+{$ifc TYPED_FUNCTION_POINTERS}
+ QTSNotificationProcPtr = function(inErr: ComponentResult; inNotificationType: OSType; inNotificationParams: UnivPtr; inRefCon: UnivPtr): ComponentResult;
+{$elsec}
+ QTSNotificationProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ QTSNotificationUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QTSNotificationUPP = UniversalProcPtr;
+{$endc}
+ { -----------------------------------------
+ Get / Set Info
+ ----------------------------------------- }
+
+const
+ kQTSGetURLLink = $67756C6C (* 'gull' *); { QTSGetURLLinkRecord* }
+
+ { get and set }
+ kQTSTargetBufferDurationInfo = $62756672 (* 'bufr' *); { Fixed* in seconds; expected, not actual }
+ kQTSDurationInfo = $64757261 (* 'dura' *); { QTSDurationAtom* }
+ kQTSSoundLevelMeteringEnabledInfo = $6D74726E (* 'mtrn' *); { Boolean* }
+ kQTSSoundLevelMeterInfo = $6C65766D (* 'levm' *); { LevelMeterInfoPtr }
+ kQTSSourceTrackIDInfo = $6F746964 (* 'otid' *); { UInt32* }
+ kQTSSourceLayerInfo = $6F6C7972 (* 'olyr' *); { UInt16* }
+ kQTSSourceLanguageInfo = $6F6C6E67 (* 'olng' *); { UInt16* }
+ kQTSSourceTrackFlagsInfo = $6F74666C (* 'otfl' *); { SInt32* }
+ kQTSSourceDimensionsInfo = $6F64696D (* 'odim' *); { QTSDimensionParams* }
+ kQTSSourceVolumesInfo = $6F766F6C (* 'ovol' *); { QTSVolumesParams* }
+ kQTSSourceMatrixInfo = $6F6D6174 (* 'omat' *); { MatrixRecord* }
+ kQTSSourceClipRectInfo = $6F636C70 (* 'oclp' *); { Rect* }
+ kQTSSourceGraphicsModeInfo = $6F67726D (* 'ogrm' *); { QTSGraphicsModeParams* }
+ kQTSSourceScaleInfo = $6F73636C (* 'oscl' *); { Point* }
+ kQTSSourceBoundingRectInfo = $6F726374 (* 'orct' *); { Rect* }
+ kQTSSourceUserDataInfo = $6F756474 (* 'oudt' *); { UserData }
+ kQTSSourceInputMapInfo = $6F696D70 (* 'oimp' *); { QTAtomContainer }
+ kQTSInfo_DataProc = $64617470 (* 'datp' *); { QTSDataProcParams* }
+ kQTSInfo_SendDataExtras = $64657874 (* 'dext' *); { QTSSendDataExtrasParams* }
+ kQTSInfo_HintTrackID = $68746964 (* 'htid' *); { long* }
+ kQTSInfo_URL = $75726C20 (* 'url ' *); { Handle*, cstring in handle }
+ kQTSInfo_Authentication = $61757570 (* 'auup' *); { QTSAuthenticationParams }
+ kQTSInfo_MediaPacketizer = $726D706B (* 'rmpk' *); { ComponentInstance }
+
+ { get only }
+ kQTSStatisticsInfo = $73746174 (* 'stat' *); { QTSStatisticsParams* }
+ kQTSMinStatusDimensionsInfo = $6D737464 (* 'mstd' *); { QTSDimensionParams* }
+ kQTSNormalStatusDimensionsInfo = $6E737464 (* 'nstd' *); { QTSDimensionParams* }
+ kQTSTotalDataRateInfo = $64727474 (* 'drtt' *); { UInt32*, add to what's there }
+ kQTSTotalDataRateInInfo = $64727469 (* 'drti' *); { UInt32*, add to what's there }
+ kQTSTotalDataRateOutInfo = $6472746F (* 'drto' *); { UInt32*, add to what's there }
+ kQTSLostPercentInfo = $6C706374 (* 'lpct' *); { QTSLostPercentParams*, add to what's there }
+ kQTSNumViewersInfo = $6E766977 (* 'nviw' *); { UInt32* }
+ kQTSMediaTypeInfo = $6D747970 (* 'mtyp' *); { OSType* }
+ kQTSNameInfo = $6E616D65 (* 'name' *); { QTSNameParams* }
+ kQTSCanHandleSendDataType = $63687364 (* 'chsd' *); { QTSCanHandleSendDataTypeParams* }
+ kQTSAnnotationsInfo = $6D657461 (* 'meta' *); { QTAtomContainer }
+ kQTSRemainingBufferTimeInfo = $62746D73 (* 'btms' *); { UInt32* remaining buffer time before playback, in microseconds }
+ kQTSInfo_SettingsText = $73747478 (* 'sttx' *); { QTSSettingsTextParams* }
+ kQTSInfo_AverageFrameRate = $66707320 (* 'fps ' *); { UnsignedFixed* }
+
+
+type
+ QTSAuthenticationParamsPtr = ^QTSAuthenticationParams;
+ QTSAuthenticationParams = record
+ flags: SInt32;
+ userID: ConstCStringPtr; { caller disposes of pointer }
+ password: ConstCStringPtr; { caller disposes of pointer }
+ end;
+
+
+const
+ kQTSTargetBufferDurationTimeScale = 1000;
+
+
+type
+ QTSPanelFilterParamsPtr = ^QTSPanelFilterParams;
+ QTSPanelFilterParams = record
+ version: SInt32;
+ inStream: QTSStream;
+ inPanelType: OSType;
+ inPanelSubType: OSType;
+ details: QTAtomSpec;
+ end;
+
+ { return true to keep this panel }
+{$ifc TYPED_FUNCTION_POINTERS}
+ QTSPanelFilterProcPtr = function(var inParams: QTSPanelFilterParams; inRefCon: UnivPtr): boolean;
+{$elsec}
+ QTSPanelFilterProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ QTSPanelFilterUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QTSPanelFilterUPP = UniversalProcPtr;
+{$endc}
+
+const
+ kQTSSettingsTextSummary = $73657431 (* 'set1' *);
+ kQTSSettingsTextDetails = $73657464 (* 'setd' *);
+
+
+type
+ QTSSettingsTextParamsPtr = ^QTSSettingsTextParams;
+ QTSSettingsTextParams = record
+ flags: SInt32; { None yet defined }
+ inSettingsSelector: OSType; { which kind of setting you want from enum above }
+ outSettingsAsText: Handle; { QTS allocates; Caller disposes }
+ inPanelFilterProc: QTSPanelFilterUPP; { To get a subset filter with this }
+ inPanelFilterProcRefCon: Ptr;
+ end;
+
+ QTSCanHandleSendDataTypeParamsPtr = ^QTSCanHandleSendDataTypeParams;
+ QTSCanHandleSendDataTypeParams = record
+ modifierTypeOrInputID: SInt32;
+ isModifierType: boolean;
+ returnedCanHandleSendDataType: boolean; { callee sets to true if it can handle it }
+ end;
+
+ QTSNameParamsPtr = ^QTSNameParams;
+ QTSNameParams = record
+ maxNameLength: SInt32;
+ requestedLanguage: SInt32;
+ returnedActualLanguage: SInt32;
+ returnedName: Ptr; { pascal string; caller supplies }
+ end;
+
+ QTSLostPercentParamsPtr = ^QTSLostPercentParams;
+ QTSLostPercentParams = record
+ receivedPkts: UInt32;
+ lostPkts: UInt32;
+ percent: Fixed;
+ end;
+
+ QTSDimensionParamsPtr = ^QTSDimensionParams;
+ QTSDimensionParams = record
+ width: Fixed;
+ height: Fixed;
+ end;
+
+ QTSVolumesParamsPtr = ^QTSVolumesParams;
+ QTSVolumesParams = record
+ leftVolume: SInt16;
+ rightVolume: SInt16;
+ end;
+
+ QTSGraphicsModeParamsPtr = ^QTSGraphicsModeParams;
+ QTSGraphicsModeParams = record
+ graphicsMode: SInt16;
+ opColor: RGBColor;
+ end;
+
+ QTSGetURLLinkRecordPtr = ^QTSGetURLLinkRecord;
+ QTSGetURLLinkRecord = record
+ displayWhere: Point;
+ returnedURLLink: Handle;
+ end;
+
+
+const
+ kQTSDataProcParamsVersion1 = 1;
+
+ kQTSDataProcType_MediaSample = $6D646961 (* 'mdia' *);
+ kQTSDataProcType_HintSample = $68696E74 (* 'hint' *);
+
+
+type
+ QTSDataProcParamsPtr = ^QTSDataProcParams;
+ QTSDataProcParams = record
+ version: SInt32;
+ flags: SInt32;
+ stream: QTSStream;
+ procType: OSType;
+ proc: QTSNotificationUPP;
+ procRefCon: Ptr;
+ end;
+
+
+const
+ kQTSDataProcSelector_SampleData = $73616D70 (* 'samp' *);
+ kQTSDataProcSelector_UserData = $75736572 (* 'user' *);
+
+ kQTSSampleDataCallbackParamsVersion1 = 1;
+
+
+type
+ QTSSampleDataCallbackParamsPtr = ^QTSSampleDataCallbackParams;
+ QTSSampleDataCallbackParams = record
+ version: SInt32;
+ flags: SInt32;
+ stream: QTSStream;
+ procType: OSType;
+ mediaType: OSType;
+ mediaTimeScale: TimeScale;
+ sampleDesc: SampleDescriptionHandle;
+ sampleDescSeed: UInt32;
+ sampleTime: TimeValue64;
+ duration: TimeValue64; { could be 0 }
+ sampleFlags: SInt32;
+ dataLength: UInt32;
+ data: Ptr;
+ end;
+
+
+const
+ kQTSUserDataCallbackParamsVersion1 = 1;
+
+
+type
+ QTSUserDataCallbackParamsPtr = ^QTSUserDataCallbackParams;
+ QTSUserDataCallbackParams = record
+ version: SInt32;
+ flags: SInt32;
+ stream: QTSStream;
+ procType: OSType;
+ userDataType: OSType;
+ userDataHandle: Handle; { caller must make copy if it wants to keep the data around }
+ end;
+
+
+const
+ kQTSSendDataExtrasParamsVersion1 = 1;
+
+
+type
+ QTSSendDataExtrasParamsPtr = ^QTSSendDataExtrasParams;
+ QTSSendDataExtrasParams = record
+ version: SInt32;
+ flags: SInt32;
+ procType: OSType;
+ end;
+
+{$ifc TYPED_FUNCTION_POINTERS}
+ QTSModalFilterProcPtr = function(inDialog: DialogPtr; const (*var*) inEvent: EventRecord; var ioItemHit: SInt16; inRefCon: UnivPtr): boolean;
+{$elsec}
+ QTSModalFilterProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ QTSModalFilterUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ QTSModalFilterUPP = UniversalProcPtr;
+{$endc}
+ { -----------------------------------------
+ Characteristics
+ ----------------------------------------- }
+ { characteristics in Movies.h work here too }
+
+const
+ kQTSSupportsPerStreamControlCharacteristic = $70736374 (* 'psct' *);
+
+
+type
+ QTSVideoParamsPtr = ^QTSVideoParams;
+ QTSVideoParams = record
+ width: Fixed;
+ height: Fixed;
+ matrix: MatrixRecord;
+ gWorld: CGrafPtr;
+ gdHandle: GDHandle_fix;
+ clip: RgnHandle;
+ graphicsMode: SInt16;
+ opColor: RGBColor;
+ end;
+
+ QTSAudioParamsPtr = ^QTSAudioParams;
+ QTSAudioParams = record
+ leftVolume: SInt16;
+ rightVolume: SInt16;
+ bassLevel: SInt16;
+ trebleLevel: SInt16;
+ frequencyBandsCount: SInt16;
+ frequencyBands: Ptr;
+ levelMeteringEnabled: boolean;
+ end;
+
+ QTSMediaParamsPtr = ^QTSMediaParams;
+ QTSMediaParams = record
+ v: QTSVideoParams;
+ a: QTSAudioParams;
+ end;
+
+
+const
+ kQTSMustDraw = $08;
+ kQTSAtEnd = $10;
+ kQTSPreflightDraw = $20;
+ kQTSSyncDrawing = $40;
+
+ { media task result flags }
+ kQTSDidDraw = $01;
+ kQTSNeedsToDraw = $04;
+ kQTSDrawAgain = $08;
+ kQTSPartialDraw = $10;
+
+ { ============================================================================
+ Notifications
+ ============================================================================ }
+ { ------ notification types ------ }
+ kQTSNullNotification = $6E756C6C (* 'null' *); { NULL }
+ kQTSErrorNotification = $65727220 (* 'err ' *); { QTSErrorParams*, optional }
+ kQTSNewPresDetectedNotification = $6E657770 (* 'newp' *); { QTSNewPresDetectedParams* }
+ kQTSPresBeginChangingNotification = $70726362 (* 'prcb' *); { NULL }
+ kQTSPresDoneChangingNotification = $70726364 (* 'prcd' *); { NULL }
+ kQTSPresentationChangedNotification = $70726368 (* 'prch' *); { NULL }
+ kQTSNewStreamNotification = $73746E77 (* 'stnw' *); { QTSNewStreamParams* }
+ kQTSStreamBeginChangingNotification = $73746362 (* 'stcb' *); { QTSStream }
+ kQTSStreamDoneChangingNotification = $73746364 (* 'stcd' *); { QTSStream }
+ kQTSStreamChangedNotification = $73746368 (* 'stch' *); { QTSStreamChangedParams* }
+ kQTSStreamGoneNotification = $7374676E (* 'stgn' *); { QTSStreamGoneParams* }
+ kQTSPreviewAckNotification = $7076616B (* 'pvak' *); { QTSStream }
+ kQTSPrerollAckNotification = $7061636B (* 'pack' *); { QTSStream }
+ kQTSStartAckNotification = $7361636B (* 'sack' *); { QTSStream }
+ kQTSStopAckNotification = $7861636B (* 'xack' *); { QTSStream }
+ kQTSStatusNotification = $73746174 (* 'stat' *); { QTSStatusParams* }
+ kQTSURLNotification = $75726C20 (* 'url ' *); { QTSURLParams* }
+ kQTSDurationNotification = $64757261 (* 'dura' *); { QTSDurationAtom* }
+ kQTSNewPresentationNotification = $6E707273 (* 'nprs' *); { QTSPresentation }
+ kQTSPresentationGoneNotification = $78707273 (* 'xprs' *); { QTSPresentation }
+ kQTSPresentationDoneNotification = $70646F6E (* 'pdon' *); { NULL }
+ kQTSBandwidthAlertNotification = $6277616C (* 'bwal' *); { QTSBandwidthAlertParams* }
+ kQTSAnnotationsChangedNotification = $6D657461 (* 'meta' *); { NULL }
+
+
+ { flags for QTSErrorParams }
+ kQTSFatalErrorFlag = $00000001;
+
+
+type
+ QTSErrorParamsPtr = ^QTSErrorParams;
+ QTSErrorParams = record
+ errorString: ConstCStringPtr;
+ flags: SInt32;
+ end;
+
+ QTSNewPresDetectedParamsPtr = ^QTSNewPresDetectedParams;
+ QTSNewPresDetectedParams = record
+ data: Ptr;
+ end;
+
+ QTSNewStreamParamsPtr = ^QTSNewStreamParams;
+ QTSNewStreamParams = record
+ stream: QTSStream;
+ end;
+
+ QTSStreamChangedParamsPtr = ^QTSStreamChangedParams;
+ QTSStreamChangedParams = record
+ stream: QTSStream;
+ mediaComponent: ComponentInstance; { could be NULL }
+ end;
+
+ QTSStreamGoneParamsPtr = ^QTSStreamGoneParams;
+ QTSStreamGoneParams = record
+ stream: QTSStream;
+ end;
+
+ QTSStatusParamsPtr = ^QTSStatusParams;
+ QTSStatusParams = record
+ status: UInt32;
+ statusString: ConstCStringPtr;
+ detailedStatus: UInt32;
+ detailedStatusString: ConstCStringPtr;
+ end;
+
+ QTSInfoParamsPtr = ^QTSInfoParams;
+ QTSInfoParams = record
+ infoType: OSType;
+ infoParams: Ptr;
+ end;
+
+ QTSURLParamsPtr = ^QTSURLParams;
+ QTSURLParams = record
+ urlLength: UInt32;
+ url: ConstCStringPtr;
+ end;
+
+
+const
+ kQTSBandwidthAlertNeedToStop = $01;
+ kQTSBandwidthAlertRestartAt = $02;
+
+
+type
+ QTSBandwidthAlertParamsPtr = ^QTSBandwidthAlertParams;
+ QTSBandwidthAlertParams = record
+ flags: SInt32;
+ restartAt: TimeValue; { new field in QT 4.1 }
+ reserved: Ptr;
+ end;
+
+ { ============================================================================
+ Presentation
+ ============================================================================ }
+ { -----------------------------------------
+ Flags
+ ----------------------------------------- }
+ { flags for NewPresentationFromData }
+
+const
+ kQTSAutoModeFlag = $00000001;
+ kQTSDontShowStatusFlag = $00000008;
+ kQTSSendMediaFlag = $00010000;
+ kQTSReceiveMediaFlag = $00020000;
+
+
+type
+ QTSNewPresentationParamsPtr = ^QTSNewPresentationParams;
+ QTSNewPresentationParams = record
+ dataType: OSType;
+ data: Ptr;
+ dataLength: UInt32;
+ editList: QTSEditListHandle;
+ flags: SInt32;
+ timeScale: TimeScale_fix; { set to 0 for default timescale }
+ mediaParams: QTSMediaParamsPtr;
+ notificationProc: QTSNotificationUPP;
+ notificationRefCon: Ptr;
+ end;
+
+ QTSPresParamsPtr = ^QTSPresParams;
+ QTSPresParams = record
+ version: UInt32;
+ editList: QTSEditListHandle;
+ flags: SInt32;
+ timeScale: TimeScale_fix; { set to 0 for default timescale }
+ mediaParams: QTSMediaParamsPtr;
+ notificationProc: QTSNotificationUPP;
+ notificationRefCon: Ptr;
+ end;
+
+
+const
+ kQTSPresParamsVersion1 = 1;
+
+
+type
+ QTSPresIdleParamsPtr = ^QTSPresIdleParams;
+ QTSPresIdleParams = record
+ stream: QTSStream;
+ movieTimeToDisplay: TimeValue64;
+ flagsIn: SInt32;
+ flagsOut: SInt32;
+ end;
+
+
+const
+ kQTSExportFlag_ShowDialog = $00000001;
+
+ kQTSExportParamsVersion1 = 1;
+
+
+type
+ QTSExportParamsPtr = ^QTSExportParams;
+ QTSExportParams = record
+ version: SInt32;
+ exportType: OSType;
+ exportExtraData: Ptr;
+ destinationContainerType: OSType;
+ destinationContainerData: Ptr;
+ destinationContainerExtras: Ptr;
+ flagsIn: SInt32;
+ flagsOut: SInt32;
+ filterProc: QTSModalFilterUPP;
+ filterProcRefCon: Ptr;
+ exportComponent: Component; { NULL unless you want to override }
+ end;
+
+ { -----------------------------------------
+ Toolbox Init/Close
+ ----------------------------------------- }
+ { all "apps" must call this }
+ {
+ * InitializeQTS()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function InitializeQTS: OSErr; external name '_InitializeQTS';
+
+{
+ * TerminateQTS()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function TerminateQTS: OSErr; external name '_TerminateQTS';
+
+{-----------------------------------------
+ Presentation Functions
+-----------------------------------------}
+{
+ * QTSNewPresentation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSNewPresentation(const (*var*) inParams: QTSNewPresentationParams; var outPresentation: QTSPresentation): OSErr; external name '_QTSNewPresentation';
+
+{
+ * QTSNewPresentationFromData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 5.0 and later
+ }
+function QTSNewPresentationFromData(inDataType: OSType; inData: UnivPtr; (*const*) var inDataLength: SInt64; const (*var*) inPresParams: QTSPresParams; var outPresentation: QTSPresentation): OSErr; external name '_QTSNewPresentationFromData';
+
+{
+ * QTSNewPresentationFromFile()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 5.0 and later
+ }
+function QTSNewPresentationFromFile(const (*var*) inFileSpec: FSSpec; const (*var*) inPresParams: QTSPresParams; var outPresentation: QTSPresentation): OSErr; external name '_QTSNewPresentationFromFile';
+
+{
+ * QTSNewPresentationFromDataRef()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 5.0 and later
+ }
+function QTSNewPresentationFromDataRef(inDataRef: Handle; inDataRefType: OSType; const (*var*) inPresParams: QTSPresParams; var outPresentation: QTSPresentation): OSErr; external name '_QTSNewPresentationFromDataRef';
+
+{
+ * QTSDisposePresentation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSDisposePresentation(inPresentation: QTSPresentation; inFlags: SInt32): OSErr; external name '_QTSDisposePresentation';
+
+{
+ * QTSPresExport()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 5.0 and later
+ }
+function QTSPresExport(inPresentation: QTSPresentation; inStream: QTSStream; var inExportParams: QTSExportParams): OSErr; external name '_QTSPresExport';
+
+{
+ * QTSPresIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+procedure QTSPresIdle(inPresentation: QTSPresentation; var ioParams: QTSPresIdleParams); external name '_QTSPresIdle';
+
+{
+ * QTSPresInvalidateRegion()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresInvalidateRegion(inPresentation: QTSPresentation; inRegion: RgnHandle): OSErr; external name '_QTSPresInvalidateRegion';
+
+{-----------------------------------------
+ Presentation Configuration
+-----------------------------------------}
+{
+ * QTSPresSetFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresSetFlags(inPresentation: QTSPresentation; inFlags: SInt32; inFlagsMask: SInt32): OSErr; external name '_QTSPresSetFlags';
+
+{
+ * QTSPresGetFlags()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetFlags(inPresentation: QTSPresentation; var outFlags: SInt32): OSErr; external name '_QTSPresGetFlags';
+
+{
+ * QTSPresGetTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetTimeBase(inPresentation: QTSPresentation; var outTimeBase: TimeBase): OSErr; external name '_QTSPresGetTimeBase';
+
+{
+ * QTSPresGetTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetTimeScale(inPresentation: QTSPresentation; var outTimeScale: TimeScale): OSErr; external name '_QTSPresGetTimeScale';
+
+{
+ * QTSPresSetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresSetInfo(inPresentation: QTSPresentation; inStream: QTSStream; inSelector: OSType; ioParam: UnivPtr): OSErr; external name '_QTSPresSetInfo';
+
+{
+ * QTSPresGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetInfo(inPresentation: QTSPresentation; inStream: QTSStream; inSelector: OSType; ioParam: UnivPtr): OSErr; external name '_QTSPresGetInfo';
+
+{
+ * QTSPresHasCharacteristic()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresHasCharacteristic(inPresentation: QTSPresentation; inStream: QTSStream; inCharacteristic: OSType; var outHasIt: boolean): OSErr; external name '_QTSPresHasCharacteristic';
+
+{
+ * QTSPresSetNotificationProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresSetNotificationProc(inPresentation: QTSPresentation; inNotificationProc: QTSNotificationUPP; inRefCon: UnivPtr): OSErr; external name '_QTSPresSetNotificationProc';
+
+{
+ * QTSPresGetNotificationProc()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetNotificationProc(inPresentation: QTSPresentation; var outNotificationProc: QTSNotificationUPP; var outRefCon: UnivPtr): OSErr; external name '_QTSPresGetNotificationProc';
+
+{-----------------------------------------
+ Presentation Control
+-----------------------------------------}
+{
+ * QTSPresPreview()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSPresPreview(inPresentation: QTSPresentation; inStream: QTSStream; (*const*) var inTimeValue: TimeValue64; inRate: Fixed; inFlags: SInt32): OSErr; external name '_QTSPresPreview';
+
+{
+ * QTSPresPreroll()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresPreroll(inPresentation: QTSPresentation; inStream: QTSStream; inTimeValue: UInt32; inRate: Fixed; inFlags: SInt32): OSErr; external name '_QTSPresPreroll';
+
+{
+ * QTSPresPreroll64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.1 and later
+ }
+function QTSPresPreroll64(inPresentation: QTSPresentation; inStream: QTSStream; (*const*) var inPrerollTime: TimeValue64; inRate: Fixed; inFlags: SInt32): OSErr; external name '_QTSPresPreroll64';
+
+{
+ * QTSPresStart()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresStart(inPresentation: QTSPresentation; inStream: QTSStream; inFlags: SInt32): OSErr; external name '_QTSPresStart';
+
+{
+ * QTSPresSkipTo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresSkipTo(inPresentation: QTSPresentation; inTimeValue: UInt32): OSErr; external name '_QTSPresSkipTo';
+
+{
+ * QTSPresSkipTo64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.1 and later
+ }
+function QTSPresSkipTo64(inPresentation: QTSPresentation; (*const*) var inTimeValue: TimeValue64): OSErr; external name '_QTSPresSkipTo64';
+
+{
+ * QTSPresStop()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresStop(inPresentation: QTSPresentation; inStream: QTSStream; inFlags: SInt32): OSErr; external name '_QTSPresStop';
+
+{============================================================================
+ Streams
+============================================================================}
+{-----------------------------------------
+ Stream Functions
+-----------------------------------------}
+{
+ * QTSPresNewStream()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresNewStream(inPresentation: QTSPresentation; inDataType: OSType; inData: UnivPtr; inDataLength: UInt32; inFlags: SInt32; var outStream: QTSStream): OSErr; external name '_QTSPresNewStream';
+
+{
+ * QTSDisposeStream()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSDisposeStream(inStream: QTSStream; inFlags: SInt32): OSErr; external name '_QTSDisposeStream';
+
+{
+ * QTSPresGetNumStreams()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetNumStreams(inPresentation: QTSPresentation): UInt32; external name '_QTSPresGetNumStreams';
+
+{
+ * QTSPresGetIndStream()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetIndStream(inPresentation: QTSPresentation; inIndex: UInt32): QTSStream; external name '_QTSPresGetIndStream';
+
+{
+ * QTSGetStreamPresentation()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSGetStreamPresentation(inStream: QTSStream): QTSPresentation; external name '_QTSGetStreamPresentation';
+
+{
+ * QTSPresSetPreferredRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresSetPreferredRate(inPresentation: QTSPresentation; inRate: Fixed; inFlags: SInt32): OSErr; external name '_QTSPresSetPreferredRate';
+
+{
+ * QTSPresGetPreferredRate()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetPreferredRate(inPresentation: QTSPresentation; var outRate: Fixed): OSErr; external name '_QTSPresGetPreferredRate';
+
+{
+ * QTSPresSetEnable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresSetEnable(inPresentation: QTSPresentation; inStream: QTSStream; inEnableMode: boolean): OSErr; external name '_QTSPresSetEnable';
+
+{
+ * QTSPresGetEnable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetEnable(inPresentation: QTSPresentation; inStream: QTSStream; var outEnableMode: boolean): OSErr; external name '_QTSPresGetEnable';
+
+{
+ * QTSPresSetPresenting()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresSetPresenting(inPresentation: QTSPresentation; inStream: QTSStream; inPresentingMode: boolean): OSErr; external name '_QTSPresSetPresenting';
+
+{
+ * QTSPresGetPresenting()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetPresenting(inPresentation: QTSPresentation; inStream: QTSStream; var outPresentingMode: boolean): OSErr; external name '_QTSPresGetPresenting';
+
+{
+ * QTSPresSetActiveSegment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.1 and later
+ }
+function QTSPresSetActiveSegment(inPresentation: QTSPresentation; inStream: QTSStream; (*const*) var inStartTime: TimeValue64; (*const*) var inDuration: TimeValue64): OSErr; external name '_QTSPresSetActiveSegment';
+
+{
+ * QTSPresGetActiveSegment()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.1 and later
+ }
+function QTSPresGetActiveSegment(inPresentation: QTSPresentation; inStream: QTSStream; var outStartTime: TimeValue64; var outDuration: TimeValue64): OSErr; external name '_QTSPresGetActiveSegment';
+
+{
+ * QTSPresSetPlayHints()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresSetPlayHints(inPresentation: QTSPresentation; inStream: QTSStream; inFlags: SInt32; inFlagsMask: SInt32): OSErr; external name '_QTSPresSetPlayHints';
+
+{
+ * QTSPresGetPlayHints()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetPlayHints(inPresentation: QTSPresentation; inStream: QTSStream; var outFlags: SInt32): OSErr; external name '_QTSPresGetPlayHints';
+
+{-----------------------------------------
+ Stream Spatial Functions
+-----------------------------------------}
+{
+ * QTSPresSetGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresSetGWorld(inPresentation: QTSPresentation; inStream: QTSStream; inGWorld: CGrafPtr; inGDHandle: GDHandle): OSErr; external name '_QTSPresSetGWorld';
+
+{
+ * QTSPresGetGWorld()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetGWorld(inPresentation: QTSPresentation; inStream: QTSStream; var outGWorld: CGrafPtr; var outGDHandle: GDHandle): OSErr; external name '_QTSPresGetGWorld';
+
+{
+ * QTSPresSetClip()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresSetClip(inPresentation: QTSPresentation; inStream: QTSStream; inClip: RgnHandle): OSErr; external name '_QTSPresSetClip';
+
+{
+ * QTSPresGetClip()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetClip(inPresentation: QTSPresentation; inStream: QTSStream; var outClip: RgnHandle): OSErr; external name '_QTSPresGetClip';
+
+{
+ * QTSPresSetMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresSetMatrix(inPresentation: QTSPresentation; inStream: QTSStream; const (*var*) inMatrix: MatrixRecord): OSErr; external name '_QTSPresSetMatrix';
+
+{
+ * QTSPresGetMatrix()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetMatrix(inPresentation: QTSPresentation; inStream: QTSStream; var outMatrix: MatrixRecord): OSErr; external name '_QTSPresGetMatrix';
+
+{
+ * QTSPresSetDimensions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresSetDimensions(inPresentation: QTSPresentation; inStream: QTSStream; inWidth: Fixed; inHeight: Fixed): OSErr; external name '_QTSPresSetDimensions';
+
+{
+ * QTSPresGetDimensions()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetDimensions(inPresentation: QTSPresentation; inStream: QTSStream; var outWidth: Fixed; var outHeight: Fixed): OSErr; external name '_QTSPresGetDimensions';
+
+{
+ * QTSPresSetGraphicsMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresSetGraphicsMode(inPresentation: QTSPresentation; inStream: QTSStream; inMode: SInt16; const (*var*) inOpColor: RGBColor): OSErr; external name '_QTSPresSetGraphicsMode';
+
+{
+ * QTSPresGetGraphicsMode()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetGraphicsMode(inPresentation: QTSPresentation; inStream: QTSStream; var outMode: SInt16; var outOpColor: RGBColor): OSErr; external name '_QTSPresGetGraphicsMode';
+
+{
+ * QTSPresGetPicture()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetPicture(inPresentation: QTSPresentation; inStream: QTSStream; var outPicture: PicHandle): OSErr; external name '_QTSPresGetPicture';
+
+{-----------------------------------------
+ Stream Sound Functions
+-----------------------------------------}
+{
+ * QTSPresSetVolumes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresSetVolumes(inPresentation: QTSPresentation; inStream: QTSStream; inLeftVolume: SInt16; inRightVolume: SInt16): OSErr; external name '_QTSPresSetVolumes';
+
+{
+ * QTSPresGetVolumes()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSPresGetVolumes(inPresentation: QTSPresentation; inStream: QTSStream; var outLeftVolume: SInt16; var outRightVolume: SInt16): OSErr; external name '_QTSPresGetVolumes';
+
+{-----------------------------------------
+ Sourcing
+-----------------------------------------}
+{
+ * QTSPresGetSettingsAsText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0.1 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function QTSPresGetSettingsAsText(inPresentation: QTSPresentation; inStream: QTSStream; inFlags: SInt32; inSettingsType: OSType; var outText: Handle; inPanelFilterProc: QTSPanelFilterUPP; inPanelFilterProcRefCon: UnivPtr): OSErr; external name '_QTSPresGetSettingsAsText';
+
+{
+ * QTSPresSettingsDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSPresSettingsDialog(inPresentation: QTSPresentation; inStream: QTSStream; inFlags: SInt32; inFilterProc: QTSModalFilterUPP; inFilterProcRefCon: UnivPtr): OSErr; external name '_QTSPresSettingsDialog';
+
+{
+ * QTSPresSettingsDialogWithFilters()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0.1 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function QTSPresSettingsDialogWithFilters(inPresentation: QTSPresentation; inStream: QTSStream; inFlags: SInt32; inFilterProc: QTSModalFilterUPP; inFilterProcRefCon: UnivPtr; inPanelFilterProc: QTSPanelFilterUPP; inPanelFilterProcRefCon: UnivPtr): OSErr; external name '_QTSPresSettingsDialogWithFilters';
+
+{
+ * QTSPresSetSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSPresSetSettings(inPresentation: QTSPresentation; inStream: QTSStream; inSettings: QTAtomSpecPtr; inFlags: SInt32): OSErr; external name '_QTSPresSetSettings';
+
+{
+ * QTSPresGetSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSPresGetSettings(inPresentation: QTSPresentation; inStream: QTSStream; var outSettings: QTAtomContainer; inFlags: SInt32): OSErr; external name '_QTSPresGetSettings';
+
+{
+ * QTSPresAddSourcer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSPresAddSourcer(inPresentation: QTSPresentation; inStream: QTSStream; inSourcer: ComponentInstance; inFlags: SInt32): OSErr; external name '_QTSPresAddSourcer';
+
+{
+ * QTSPresRemoveSourcer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSPresRemoveSourcer(inPresentation: QTSPresentation; inStream: QTSStream; inSourcer: ComponentInstance; inFlags: SInt32): OSErr; external name '_QTSPresRemoveSourcer';
+
+{
+ * QTSPresGetNumSourcers()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSPresGetNumSourcers(inPresentation: QTSPresentation; inStream: QTSStream): UInt32; external name '_QTSPresGetNumSourcers';
+
+{
+ * QTSPresGetIndSourcer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSPresGetIndSourcer(inPresentation: QTSPresentation; inStream: QTSStream; inIndex: UInt32; var outSourcer: ComponentInstance): OSErr; external name '_QTSPresGetIndSourcer';
+
+{============================================================================
+ Misc
+============================================================================}
+{ flags for Get/SetNetworkAppName }
+
+const
+ kQTSNetworkAppNameIsFullNameFlag = $00000001;
+
+ {
+ * QTSSetNetworkAppName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.1 and later
+ }
+function QTSSetNetworkAppName(inAppName: ConstCStringPtr; inFlags: SInt32): OSErr; external name '_QTSSetNetworkAppName';
+
+{
+ * QTSGetNetworkAppName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.1 and later
+ }
+function QTSGetNetworkAppName(inFlags: SInt32; var outCStringPtr: CStringPtr): OSErr; external name '_QTSGetNetworkAppName';
+
+{-----------------------------------------
+ Statistics Utilities
+-----------------------------------------}
+
+type
+ QTSStatHelperRecordPtr = ^QTSStatHelperRecord;
+ QTSStatHelperRecord = record
+ data: array [0..0] of SInt32;
+ end;
+
+ QTSStatHelper = ^QTSStatHelperRecord;
+
+const
+ kQTSInvalidStatHelper = 0;
+
+ { flags for QTSStatHelperNextParams }
+ kQTSStatHelperReturnPascalStringsFlag = $00000001;
+
+
+type
+ QTSStatHelperNextParamsPtr = ^QTSStatHelperNextParams;
+ QTSStatHelperNextParams = record
+ flags: SInt32;
+ returnedStatisticsType: OSType;
+ returnedStream: QTSStream;
+ maxStatNameLength: UInt32;
+ returnedStatName: CStringPtr; { NULL if you don't want it }
+ maxStatStringLength: UInt32;
+ returnedStatString: CStringPtr; { NULL if you don't want it }
+ maxStatUnitLength: UInt32;
+ returnedStatUnit: CStringPtr; { NULL if you don't want it }
+ end;
+
+ QTSStatisticsParamsPtr = ^QTSStatisticsParams;
+ QTSStatisticsParams = record
+ statisticsType: OSType;
+ container: QTAtomContainer;
+ parentAtom: QTAtom;
+ flags: SInt32;
+ end;
+
+ { general statistics types }
+
+const
+ kQTSAllStatisticsType = $616C6C20 (* 'all ' *);
+ kQTSShortStatisticsType = $73687274 (* 'shrt' *);
+ kQTSSummaryStatisticsType = $73756D6D (* 'summ' *);
+
+ { statistics flags }
+ kQTSGetNameStatisticsFlag = $00000001;
+ kQTSDontGetDataStatisticsFlag = $00000002;
+ kQTSUpdateAtomsStatisticsFlag = $00000004;
+ kQTSGetUnitsStatisticsFlag = $00000008;
+ kQTSUpdateAllIfNecessaryStatisticsFlag = $00010000;
+
+ { statistics atom types }
+ kQTSStatisticsStreamAtomType = $7374726D (* 'strm' *);
+ kQTSStatisticsNameAtomType = $6E616D65 (* 'name' *); { chars only, no length or terminator }
+ kQTSStatisticsDataFormatAtomType = $66726D74 (* 'frmt' *); { OSType }
+ kQTSStatisticsDataAtomType = $64617461 (* 'data' *);
+ kQTSStatisticsUnitsAtomType = $756E6974 (* 'unit' *); { OSType }
+ kQTSStatisticsUnitsNameAtomType = $756E696E (* 'unin' *); { chars only, no length or terminator }
+
+ { statistics data formats }
+ kQTSStatisticsSInt32DataFormat = $73693332 (* 'si32' *);
+ kQTSStatisticsUInt32DataFormat = $75693332 (* 'ui32' *);
+ kQTSStatisticsSInt16DataFormat = $73693136 (* 'si16' *);
+ kQTSStatisticsUInt16DataFormat = $75693136 (* 'ui16' *);
+ kQTSStatisticsFixedDataFormat = $66697864 (* 'fixd' *);
+ kQTSStatisticsUnsignedFixedDataFormat = $75666978 (* 'ufix' *);
+ kQTSStatisticsStringDataFormat = $73747267 (* 'strg' *);
+ kQTSStatisticsOSTypeDataFormat = $6F737470 (* 'ostp' *);
+ kQTSStatisticsRectDataFormat = $72656374 (* 'rect' *);
+ kQTSStatisticsPointDataFormat = $706F6E74 (* 'pont' *);
+
+ { statistics units types }
+ kQTSStatisticsNoUnitsType = 0;
+ kQTSStatisticsPercentUnitsType = $70636E74 (* 'pcnt' *);
+ kQTSStatisticsBitsPerSecUnitsType = $62707320 (* 'bps ' *);
+ kQTSStatisticsFramesPerSecUnitsType = $66707320 (* 'fps ' *);
+
+ { specific statistics types }
+ kQTSTotalDataRateStat = $64727474 (* 'drtt' *);
+ kQTSTotalDataRateInStat = $64727469 (* 'drti' *);
+ kQTSTotalDataRateOutStat = $6472746F (* 'drto' *);
+ kQTSNetworkIDStringStat = $6E696473 (* 'nids' *);
+
+ {
+ * QTSNewStatHelper()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSNewStatHelper(inPresentation: QTSPresentation; inStream: QTSStream; inStatType: OSType; inFlags: SInt32; var outStatHelper: QTSStatHelper): OSErr; external name '_QTSNewStatHelper';
+
+{
+ * QTSDisposeStatHelper()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSDisposeStatHelper(inStatHelper: QTSStatHelper): OSErr; external name '_QTSDisposeStatHelper';
+
+{
+ * QTSStatHelperGetStats()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSStatHelperGetStats(inStatHelper: QTSStatHelper): OSErr; external name '_QTSStatHelperGetStats';
+
+{
+ * QTSStatHelperResetIter()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSStatHelperResetIter(inStatHelper: QTSStatHelper): OSErr; external name '_QTSStatHelperResetIter';
+
+{
+ * QTSStatHelperNext()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSStatHelperNext(inStatHelper: QTSStatHelper; var ioParams: QTSStatHelperNextParams): boolean; external name '_QTSStatHelperNext';
+
+{
+ * QTSStatHelperGetNumStats()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSStatHelperGetNumStats(inStatHelper: QTSStatHelper): UInt32; external name '_QTSStatHelperGetNumStats';
+
+{ used by components to put statistics into the atom container }
+{
+ * QTSGetOrMakeStatAtomForStream()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSGetOrMakeStatAtomForStream(inContainer: QTAtomContainer; inStream: QTSStream; var outParentAtom: QTAtom): OSErr; external name '_QTSGetOrMakeStatAtomForStream';
+
+{
+ * QTSInsertStatistic()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSInsertStatistic(inContainer: QTAtomContainer; inParentAtom: QTAtom; inStatType: OSType; inStatData: UnivPtr; inStatDataLength: UInt32; inStatDataFormat: OSType; inFlags: SInt32): OSErr; external name '_QTSInsertStatistic';
+
+{
+ * QTSInsertStatisticName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSInsertStatisticName(inContainer: QTAtomContainer; inParentAtom: QTAtom; inStatType: OSType; inStatName: ConstCStringPtr; inStatNameLength: UInt32): OSErr; external name '_QTSInsertStatisticName';
+
+{
+ * QTSInsertStatisticUnits()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSInsertStatisticUnits(inContainer: QTAtomContainer; inParentAtom: QTAtom; inStatType: OSType; inUnitsType: OSType; inUnitsName: ConstCStringPtr; inUnitsNameLength: UInt32): OSErr; external name '_QTSInsertStatisticUnits';
+
+{============================================================================
+ Data Formats
+============================================================================}
+{-----------------------------------------
+ Data Types
+-----------------------------------------}
+{ universal data types }
+
+const
+ kQTSNullDataType = $4E554C4C (* 'NULL' *);
+ kQTSUnknownDataType = $6875683F (* 'huh?' *);
+ kQTSAtomContainerDataType = $71746163 (* 'qtac' *); { QTAtomContainer }
+ kQTSAtomDataType = $71746174 (* 'qtat' *); { QTSAtomContainerDataStruct* }
+ kQTSAliasDataType = $616C6973 (* 'alis' *);
+ kQTSFileDataType = $66737063 (* 'fspc' *); { FSSpec* }
+ kQTSFileSpecDataType = $66737063 (* 'fspc' *); { FSSpec* }
+ kQTSHandleDataType = $686E646C (* 'hndl' *); { Handle* }
+ kQTSDataRefDataType = $64726566 (* 'dref' *); { DataReferencePtr }
+
+ { these data types are specific to presentations }
+ kQTSRTSPDataType = $72747370 (* 'rtsp' *);
+ kQTSSDPDataType = $73647020 (* 'sdp ' *);
+
+ { -----------------------------------------
+ Atom IDs
+ ----------------------------------------- }
+ kQTSAtomType_Presentation = $70726573 (* 'pres' *);
+ kQTSAtomType_PresentationHeader = $70686472 (* 'phdr' *); { QTSPresentationHeaderAtom }
+ kQTSAtomType_MediaStream = $6D737472 (* 'mstr' *);
+ kQTSAtomType_MediaStreamHeader = $6D736864 (* 'mshd' *); { QTSMediaStreamHeaderAtom }
+ kQTSAtomType_MediaDescriptionText = $6D646573 (* 'mdes' *); { chars, no length }
+ kQTSAtomType_ClipRect = $636C6970 (* 'clip' *); { QTSClipRectAtom }
+ kQTSAtomType_Duration = $64757261 (* 'dura' *); { QTSDurationAtom }
+ kQTSAtomType_BufferTime = $62756672 (* 'bufr' *); { QTSBufferTimeAtom }
+
+
+type
+ QTSAtomContainerDataStructPtr = ^QTSAtomContainerDataStruct;
+ QTSAtomContainerDataStruct = record
+ container: QTAtomContainer;
+ parentAtom: QTAtom;
+ end;
+
+ { flags for QTSPresentationHeaderAtom }
+
+const
+ kQTSPresHeaderTypeIsData = $00000100;
+ kQTSPresHeaderDataIsHandle = $00000200;
+
+
+type
+ QTSPresentationHeaderAtomPtr = ^QTSPresentationHeaderAtom;
+ QTSPresentationHeaderAtom = record
+ versionAndFlags: SInt32;
+ conductorOrDataType: OSType;
+ dataAtomType: OSType; { where the data really is }
+ end;
+
+ QTSMediaStreamHeaderAtomPtr = ^QTSMediaStreamHeaderAtom;
+ QTSMediaStreamHeaderAtom = record
+ versionAndFlags: SInt32;
+ mediaTransportType: OSType;
+ mediaTransportDataAID: OSType; { where the data really is }
+ end;
+
+ QTSBufferTimeAtomPtr = ^QTSBufferTimeAtom;
+ QTSBufferTimeAtom = record
+ versionAndFlags: SInt32;
+ bufferTime: Fixed;
+ end;
+
+ QTSDurationAtomPtr = ^QTSDurationAtom;
+ QTSDurationAtom = record
+ versionAndFlags: SInt32;
+ timeScale: TimeScale_fix;
+ duration: TimeValue64;
+ end;
+
+ QTSClipRectAtomPtr = ^QTSClipRectAtom;
+ QTSClipRectAtom = record
+ versionAndFlags: SInt32;
+ clipRect: Rect;
+ end;
+
+
+const
+ kQTSEmptyEditStreamStartTime = -1;
+
+
+type
+ QTSStatus = UInt32;
+
+const
+ kQTSNullStatus = 0;
+ kQTSUninitializedStatus = 1;
+ kQTSConnectingStatus = 2;
+ kQTSOpeningConnectionDetailedStatus = 3;
+ kQTSMadeConnectionDetailedStatus = 4;
+ kQTSNegotiatingStatus = 5;
+ kQTSGettingDescriptionDetailedStatus = 6;
+ kQTSGotDescriptionDetailedStatus = 7;
+ kQTSSentSetupCmdDetailedStatus = 8;
+ kQTSReceivedSetupResponseDetailedStatus = 9;
+ kQTSSentPlayCmdDetailedStatus = 10;
+ kQTSReceivedPlayResponseDetailedStatus = 11;
+ kQTSBufferingStatus = 12;
+ kQTSPlayingStatus = 13;
+ kQTSPausedStatus = 14;
+ kQTSAutoConfiguringStatus = 15;
+ kQTSDownloadingStatus = 16;
+ kQTSBufferingWithTimeStatus = 17;
+ kQTSWaitingDisconnectStatus = 100;
+
+ { -----------------------------------------
+ QuickTime Preferences Types
+ ----------------------------------------- }
+ kQTSConnectionPrefsType = $7374636D (* 'stcm' *); { root atom that all other atoms are contained in }
+ { kQTSNotUsedForProxyPrefsType = 'nopr', // comma-delimited list of URLs that are never used for proxies }
+ kQTSConnectionMethodPrefsType = $6D746864 (* 'mthd' *); { connection method (OSType that matches one of the following three) }
+ kQTSDirectConnectPrefsType = $64726374 (* 'drct' *); { used if direct connect (QTSDirectConnectPrefsRecord) }
+ { kQTSRTSPProxyPrefsType = 'rtsp', // used if RTSP Proxy (QTSProxyPrefsRecord) }
+ kQTSSOCKSPrefsType = $736F636B (* 'sock' *); { used if SOCKS Proxy (QTSProxyPrefsRecord) }
+
+ kQTSDirectConnectHTTPProtocol = $68747470 (* 'http' *);
+ kQTSDirectConnectRTSPProtocol = $72747370 (* 'rtsp' *);
+
+
+type
+ QTSDirectConnectPrefsRecordPtr = ^QTSDirectConnectPrefsRecord;
+ QTSDirectConnectPrefsRecord = record
+ tcpPortID: UInt32;
+ protocol: OSType;
+ end;
+
+ QTSProxyPrefsRecordPtr = ^QTSProxyPrefsRecord;
+ QTSProxyPrefsRecord = record
+ serverNameStr: Str255;
+ portID: UInt32;
+ end;
+
+
+const
+ kConnectionActive = $00000001;
+ kConnectionUseSystemPref = $00000002;
+
+
+type
+ QTSTransportPrefPtr = ^QTSTransportPref;
+ QTSTransportPref = record
+ protocol: OSType; { udp, http, tcp, etc }
+ portID: SInt32; { port to use for this connection type }
+ flags: UInt32; { connection flags }
+ seed: UInt32; { seed value last time this setting was read from system prefs }
+ end;
+
+
+const
+ kProxyActive = $00000001;
+ kProxyUseSystemPref = $00000002;
+
+
+type
+ QTSProxyPrefPtr = ^QTSProxyPref;
+ QTSProxyPref = record
+ flags: UInt32; { proxy flags }
+ portID: SInt32; { port to use for this connection type }
+ seed: UInt32; { seed value last time this setting was read from system prefs }
+ serverNameStr: Str255; { proxy server url }
+ end;
+
+
+const
+ kNoProxyUseSystemPref = $00000001;
+
+
+type
+ QTSNoProxyPrefPtr = ^QTSNoProxyPref;
+ QTSNoProxyPref = record
+ flags: UInt32; { no-proxy flags }
+ seed: UInt32; { seed value last time this setting was read from system prefs }
+ urlList: SInt8; { NULL terminated, comma delimited list of urls }
+ end;
+
+
+const
+ kQTSInstantOnFlag_Enable = $00000001; { instant on is enabled (read/write) }
+ kQTSInstantOnFlag_Permitted = $00000002; { instant on is possible (read only) }
+
+
+type
+ QTSInstantOnPrefPtr = ^QTSInstantOnPref;
+ QTSInstantOnPref = record
+ flags: SInt32; { flags }
+ factor: SInt32; { 0-100; default is 50 }
+ end;
+
+
+const
+ kQTSTransAndProxyAtomType = $73747270 (* 'strp' *); { transport/proxy prefs root atom }
+ kQTSConnectionPrefsVersion = $76657273 (* 'vers' *); { prefs format version }
+ kQTSTransportPrefsAtomType = $74726E73 (* 'trns' *); { tranport prefs root atom }
+ kQTSConnectionAtomType = $636F6E6E (* 'conn' *); { connection prefs atom type, one for each transport type }
+ kQTSUDPTransportType = $75647020 (* 'udp ' *); { udp transport prefs }
+ kQTSHTTPTransportType = $68747470 (* 'http' *); { http transport prefs }
+ kQTSTCPTransportType = $74637020 (* 'tcp ' *); { tcp transport prefs }
+ kQTSProxyPrefsAtomType = $70727879 (* 'prxy' *); { proxy prefs root atom }
+ kQTSHTTPProxyPrefsType = $68747470 (* 'http' *); { http proxy settings }
+ kQTSRTSPProxyPrefsType = $72747370 (* 'rtsp' *); { rtsp proxy settings }
+ kQTSSOCKSProxyPrefsType = $736F636B (* 'sock' *); { socks proxy settings }
+ kQTSProxyUserInfoPrefsType = $75736572 (* 'user' *); { proxy username/password root atom }
+ kQTSDontProxyPrefsAtomType = $6E6F7072 (* 'nopr' *); { no-proxy prefs root atom }
+ kQTSDontProxyDataType = $64617461 (* 'data' *); { no proxy settings }
+ kQTSInstantOnPrefsAtomType = $696E6F6E (* 'inon' *); { instant on prefs }
+
+ {
+ * QTSPrefsAddProxySetting()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.1 and later
+ }
+function QTSPrefsAddProxySetting(proxyType: OSType; portID: SInt32; flags: UInt32; seed: UInt32; var srvrURL: Str255): OSErr; external name '_QTSPrefsAddProxySetting';
+
+{
+ * QTSPrefsFindProxyByType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.1 and later
+ }
+function QTSPrefsFindProxyByType(proxyType: OSType; flags: UInt32; flagsMask: UInt32; var proxyHndl: UnivPtr; var count: SInt16): OSErr; external name '_QTSPrefsFindProxyByType';
+
+{
+ * QTSPrefsAddConnectionSetting()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.1 and later
+ }
+function QTSPrefsAddConnectionSetting(protocol: OSType; portID: SInt32; flags: UInt32; seed: UInt32): OSErr; external name '_QTSPrefsAddConnectionSetting';
+
+{
+ * QTSPrefsFindConnectionByType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.1 and later
+ }
+function QTSPrefsFindConnectionByType(protocol: OSType; flags: UInt32; flagsMask: UInt32; var connectionHndl: UnivPtr; var count: SInt16): OSErr; external name '_QTSPrefsFindConnectionByType';
+
+{
+ * QTSPrefsGetActiveConnection()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.1 and later
+ }
+function QTSPrefsGetActiveConnection(protocol: OSType; var connectInfo: QTSTransportPref): OSErr; external name '_QTSPrefsGetActiveConnection';
+
+{
+ * QTSPrefsGetNoProxyURLs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.1 and later
+ }
+function QTSPrefsGetNoProxyURLs(var noProxyHndl: UnivPtr): OSErr; external name '_QTSPrefsGetNoProxyURLs';
+
+{
+ * QTSPrefsSetNoProxyURLs()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.1 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.1 and later
+ }
+function QTSPrefsSetNoProxyURLs(urls: CStringPtr; flags: UInt32; seed: UInt32): OSErr; external name '_QTSPrefsSetNoProxyURLs';
+
+{
+ * QTSPrefsAddProxyUserInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0.1 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.1 and later
+ * Windows: in QTSClient.lib 5.0.1 and later
+ }
+function QTSPrefsAddProxyUserInfo(proxyType: OSType; flags: SInt32; flagsMask: SInt32; username: StringPtr; password: StringPtr): OSErr; external name '_QTSPrefsAddProxyUserInfo';
+
+{
+ * QTSPrefsFindProxyUserInfoByType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0.1 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.1 and later
+ * Windows: in QTSClient.lib 5.0.1 and later
+ }
+function QTSPrefsFindProxyUserInfoByType(proxyType: OSType; flags: SInt32; flagsMask: SInt32; username: StringPtr; password: StringPtr): OSErr; external name '_QTSPrefsFindProxyUserInfoByType';
+
+{
+ * QTSPrefsGetInstantOnSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in QTSClient.lib 6.0 and later
+ }
+function QTSPrefsGetInstantOnSettings(var outPref: QTSInstantOnPref; inFlags: SInt32): OSErr; external name '_QTSPrefsGetInstantOnSettings';
+
+{
+ * QTSPrefsSetInstantOnSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in QTSClient.lib 6.0 and later
+ }
+function QTSPrefsSetInstantOnSettings(var inPref: QTSInstantOnPref; inFlags: SInt32): OSErr; external name '_QTSPrefsSetInstantOnSettings';
+
+
+{============================================================================
+ Memory Management Services
+============================================================================}
+{
+ These routines allocate normal pointers and handles,
+ but do the correct checking, etc.
+ Dispose using the normal DisposePtr and DisposeHandle
+ Call these routines for one time memory allocations.
+ You do not need to set any hints to use these calls.
+}
+
+{
+ * QTSNewPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSNewPtr(inByteCount: UInt32; inFlags: SInt32; var outFlags: SInt32): Ptr; external name '_QTSNewPtr';
+
+{
+ * QTSNewHandle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSNewHandle(inByteCount: UInt32; inFlags: SInt32; var outFlags: SInt32): Handle; external name '_QTSNewHandle';
+
+{ flags in }
+
+const
+ kQTSMemAllocClearMem = $00000001;
+ kQTSMemAllocDontUseTempMem = $00000002;
+ kQTSMemAllocTryTempMemFirst = $00000004;
+ kQTSMemAllocDontUseSystemMem = $00000008;
+ kQTSMemAllocTrySystemMemFirst = $00000010;
+ kQTSMemAllocHoldMemory = $00001000;
+ kQTSMemAllocIsInterruptTime = $01010000; { currently not supported for alloc }
+
+ { flags out }
+ kQTSMemAllocAllocatedInTempMem = $00000001;
+ kQTSMemAllocAllocatedInSystemMem = $00000002;
+
+
+type
+ QTSMemPtr = ^SInt32; { an opaque 32-bit type }
+ QTSMemPtrPtr = ^QTSMemPtr; { when a var xx:QTSMemPtr parameter can be nil, it is changed to xx: QTSMemPtrPtr }
+ {
+ These routines are for buffers that will be recirculated
+ you must use QTReleaseMemPtr instead of DisposePtr
+ QTSReleaseMemPtr can be used at interrupt time
+ but QTSAllocMemPtr currently cannot
+ }
+ {
+ * QTSAllocMemPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSAllocMemPtr(inByteCount: UInt32; inFlags: SInt32): QTSMemPtr; external name '_QTSAllocMemPtr';
+
+{
+ * QTSReleaseMemPtr()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+procedure QTSReleaseMemPtr(inMemPtr: QTSMemPtr; inFlags: SInt32); external name '_QTSReleaseMemPtr';
+
+
+{============================================================================
+ Buffer Management Services
+============================================================================}
+
+
+const
+ kQTSStreamBufferVersion1 = 1;
+
+
+type
+ QTSStreamBufferPtr = ^QTSStreamBuffer;
+ QTSStreamBuffer = record
+ reserved1: QTSStreamBufferPtr;
+ reserved2: QTSStreamBufferPtr;
+ next: QTSStreamBufferPtr; { next message block in a message }
+ rptr: Ptr; { first byte with real data in the DataBuffer }
+ wptr: Ptr; { last+1 byte with real data in the DataBuffer }
+ version: SInt32;
+ metadata: array [0..3] of UInt32; { usage defined by message sender }
+ flags: SInt32; { reserved }
+ reserved3: SInt32;
+ reserved4: SInt32;
+ reserved5: SInt32;
+ moreMeta: array [0..7] of UInt32;
+ end;
+
+ { flags for QTSDuplicateMessage }
+
+const
+ kQTSDuplicateBufferFlag_CopyData = $00000001;
+ kQTSDuplicateBufferFlag_FlattenMessage = $00000002;
+
+
+ {
+ * QTSNewStreamBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 5.0 and later
+ }
+function QTSNewStreamBuffer(inDataSize: UInt32; inFlags: SInt32; var outStreamBuffer: UnivPtr): OSErr; external name '_QTSNewStreamBuffer';
+
+{
+ * QTSFreeMessage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+procedure QTSFreeMessage(var inMessage: QTSStreamBuffer); external name '_QTSFreeMessage';
+
+{
+ kQTSDuplicateBufferFlag_CopyData - forces a copy of the data itself
+ kQTSCopyBufferFlag_FlattenMessage - copies the data if it needs to be flattened
+ QTSDuplicateMessage never frees the old message
+}
+{
+ * QTSDuplicateMessage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 5.0 and later
+ }
+function QTSDuplicateMessage(var inMessage: QTSStreamBuffer; inFlags: SInt32; var outDuplicatedMessage: UnivPtr): OSErr; external name '_QTSDuplicateMessage';
+
+{
+ * QTSMessageLength()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSMessageLength(var inMessage: QTSStreamBuffer): UInt32; external name '_QTSMessageLength';
+
+{
+ * QTSStreamBufferDataInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 5.0 and later
+ }
+procedure QTSStreamBufferDataInfo(var inStreamBuffer: QTSStreamBuffer; var outDataStart: UnivPtr; var outDataMaxLength: UInt32); external name '_QTSStreamBufferDataInfo';
+
+{ ---- old calls (don't use these) }
+
+{
+ * QTSAllocBuffer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSAllocBuffer(inSize: SInt32): QTSStreamBufferPtr; external name '_QTSAllocBuffer';
+
+{
+ * QTSDupMessage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSDupMessage(var inMessage: QTSStreamBuffer): QTSStreamBufferPtr; external name '_QTSDupMessage';
+
+{
+ * QTSCopyMessage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSCopyMessage(var inMessage: QTSStreamBuffer): QTSStreamBufferPtr; external name '_QTSCopyMessage';
+
+{
+ * QTSFlattenMessage()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSFlattenMessage(var inMessage: QTSStreamBuffer): QTSStreamBufferPtr; external name '_QTSFlattenMessage';
+
+
+{============================================================================
+ Misc
+============================================================================}
+{
+ * QTSGetErrorString()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSGetErrorString(inErrorCode: SInt32; inMaxErrorStringLength: UInt32; outErrorString: CStringPtr; inFlags: SInt32): boolean; external name '_QTSGetErrorString';
+
+{
+ * QTSInitializeMediaParams()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0.1 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.1 and later
+ * Windows: in QTSClient.lib 5.0.1 and later
+ }
+function QTSInitializeMediaParams(var inMediaParams: QTSMediaParams): OSErr; external name '_QTSInitializeMediaParams';
+
+
+{ UPP call backs }
+
+const
+ uppQTSNotificationProcInfo = $00003FF0;
+ uppQTSPanelFilterProcInfo = $000003D0;
+ uppQTSModalFilterProcInfo = $00003FD0;
+ {
+ * NewQTSNotificationUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewQTSNotificationUPP(userRoutine: QTSNotificationProcPtr): QTSNotificationUPP; external name '_NewQTSNotificationUPP'; { old name was NewQTSNotificationProc }
+{
+ * NewQTSPanelFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function NewQTSPanelFilterUPP(userRoutine: QTSPanelFilterProcPtr): QTSPanelFilterUPP; external name '_NewQTSPanelFilterUPP'; { old name was NewQTSPanelFilterProc }
+{
+ * NewQTSModalFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewQTSModalFilterUPP(userRoutine: QTSModalFilterProcPtr): QTSModalFilterUPP; external name '_NewQTSModalFilterUPP'; { old name was NewQTSModalFilterProc }
+{
+ * DisposeQTSNotificationUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeQTSNotificationUPP(userUPP: QTSNotificationUPP); external name '_DisposeQTSNotificationUPP';
+{
+ * DisposeQTSPanelFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.1 and later
+ }
+procedure DisposeQTSPanelFilterUPP(userUPP: QTSPanelFilterUPP); external name '_DisposeQTSPanelFilterUPP';
+{
+ * DisposeQTSModalFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeQTSModalFilterUPP(userUPP: QTSModalFilterUPP); external name '_DisposeQTSModalFilterUPP';
+{
+ * InvokeQTSNotificationUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeQTSNotificationUPP(inErr: ComponentResult; inNotificationType: OSType; inNotificationParams: UnivPtr; inRefCon: UnivPtr; userRoutine: QTSNotificationUPP): ComponentResult; external name '_InvokeQTSNotificationUPP'; { old name was CallQTSNotificationProc }
+{
+ * InvokeQTSPanelFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function InvokeQTSPanelFilterUPP(var inParams: QTSPanelFilterParams; inRefCon: UnivPtr; userRoutine: QTSPanelFilterUPP): boolean; external name '_InvokeQTSPanelFilterUPP'; { old name was CallQTSPanelFilterProc }
+{
+ * InvokeQTSModalFilterUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function InvokeQTSModalFilterUPP(inDialog: DialogPtr; const (*var*) inEvent: EventRecord; var ioItemHit: SInt16; inRefCon: UnivPtr; userRoutine: QTSModalFilterUPP): boolean; external name '_InvokeQTSModalFilterUPP'; { old name was CallQTSModalFilterProc }
+{$ALIGN MAC68K}
+
+
+{unit QTSMovie}
+{
+ File: QTSMovie.p
+
+ Contains: QuickTime Interfaces.
+
+ Version: Universal Interfaces 3.4.2
+
+ Copyright: © 1990-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+
+const
+ kQTSStreamMediaType = $7374726D (* 'strm' *);
+
+
+type
+ QTSSampleDescriptionPtr = ^QTSSampleDescription;
+ QTSSampleDescription = record
+ descSize: SInt32;
+ dataFormat: SInt32;
+ resvd1: SInt32; { set to 0 }
+ resvd2: SInt16; { set to 0 }
+ dataRefIndex: SInt16;
+ version: UInt32;
+ resvd3: UInt32; { set to 0 }
+ flags: SInt32;
+ { qt atoms follow: }
+ { long size, long type, some data }
+ { repeat as necessary }
+ end;
+
+ QTSSampleDescriptionHandle = ^QTSSampleDescriptionPtr;
+
+const
+ kQTSSampleDescriptionVersion1 = 1;
+
+ kQTSDefaultMediaTimeScale = 600;
+
+ { sample description flags }
+ kQTSSampleDescPassSampleDataAsHandleFlag = $00000001;
+
+
+ { ============================================================================
+ Stream Media Handler
+ ============================================================================ }
+ { -----------------------------------------
+ Info Selectors
+ ----------------------------------------- }
+ { all indexes start at 1 }
+
+ kQTSMediaPresentationInfo = $70726573 (* 'pres' *); { QTSMediaPresentationParams* }
+ kQTSMediaNotificationInfo = $6E6F7469 (* 'noti' *); { QTSMediaNotificationParams* }
+ kQTSMediaTotalDataRateInfo = $64747274 (* 'dtrt' *); { UInt32*, bits/sec }
+ kQTSMediaLostPercentInfo = $6C737063 (* 'lspc' *); { Fixed* }
+ kQTSMediaNumStreamsInfo = $6E737472 (* 'nstr' *); { UInt32* }
+ kQTSMediaIndSampleDescriptionInfo = $69736463 (* 'isdc' *); { QTSMediaIndSampleDescriptionParams* }
+
+
+type
+ QTSMediaPresentationParamsPtr = ^QTSMediaPresentationParams;
+ QTSMediaPresentationParams = record
+ presentationID: QTSPresentation;
+ end;
+
+ QTSMediaNotificationParamsPtr = ^QTSMediaNotificationParams;
+ QTSMediaNotificationParams = record
+ notificationProc: QTSNotificationUPP;
+ notificationRefCon: Ptr;
+ flags: SInt32;
+ end;
+
+ QTSMediaIndSampleDescriptionParamsPtr = ^QTSMediaIndSampleDescriptionParams;
+ QTSMediaIndSampleDescriptionParams = record
+ index: SInt32;
+ returnedMediaType: OSType;
+ returnedSampleDescription: SampleDescriptionHandle;
+ end;
+
+ { -----------------------------------------
+ QTS Media Handler Selectors
+ ----------------------------------------- }
+
+const
+ kQTSMediaSetInfoSelect = $0100;
+ kQTSMediaGetInfoSelect = $0101;
+ kQTSMediaSetIndStreamInfoSelect = $0102;
+ kQTSMediaGetIndStreamInfoSelect = $0103;
+
+ { -----------------------------------------
+ QTS Media Handler functions
+ ----------------------------------------- }
+ {
+ * QTSMediaSetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSMediaSetInfo(mh: MediaHandler; inSelector: OSType; ioParams: UnivPtr): ComponentResult; external name '_QTSMediaSetInfo';
+{
+ * QTSMediaGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSMediaGetInfo(mh: MediaHandler; inSelector: OSType; ioParams: UnivPtr): ComponentResult; external name '_QTSMediaGetInfo';
+{
+ * QTSMediaSetIndStreamInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSMediaSetIndStreamInfo(mh: MediaHandler; inIndex: SInt32; inSelector: OSType; ioParams: UnivPtr): ComponentResult; external name '_QTSMediaSetIndStreamInfo';
+{
+ * QTSMediaGetIndStreamInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSMediaGetIndStreamInfo(mh: MediaHandler; inIndex: SInt32; inSelector: OSType; ioParams: UnivPtr): ComponentResult; external name '_QTSMediaGetIndStreamInfo';
+{============================================================================
+ Hint Media Handler
+============================================================================}
+
+const
+ kQTSHintMediaType = $68696E74 (* 'hint' *);
+
+ kQTSHintTrackReference = $68696E74 (* 'hint' *);
+
+
+{$ALIGN MAC68K}
+
+
+{unit QTStreamingComponents}
+{
+ File: QTStreamingComponents.p
+
+ Contains: QuickTime Interfaces.
+
+ Version: Technology: QuickTime 6.0
+ Release: Universal Interfaces 3.4.2
+
+ Copyright: © 1990-2002 by Apple Computer, Inc., all rights reserved
+
+ Bugs?: For bug reports, consult the following page on
+ the World Wide Web:
+
+ http://www.freepascal.org/bugs.html
+
+}
+
+
+{
+ Modified for use with Free Pascal
+ Version 200
+ Please report any bugs to <gpc@microbizz.nl>
+}
+
+
+
+
+{$ALIGN MAC68K}
+
+{============================================================================
+ Stream Sourcer
+============================================================================}
+
+const
+ kQTSSourcerType = $73726372 (* 'srcr' *);
+
+
+type
+ QTSSourcer = ComponentInstance;
+
+const
+ kQTSSGChannelSourcerType = $73676368 (* 'sgch' *);
+ kQTSMovieTrackSourcerType = $7472616B (* 'trak' *);
+ kQTSPushDataSourcerType = $70757368 (* 'push' *);
+
+ { flags for sourcer data }
+ kQTSSourcerDataFlag_SyncSample = $00000001;
+ kQTSPushDataSourcerFlag_SampleTimeIsValid = $80000000;
+
+
+ kQTSSourcerInitParamsVersion1 = 1;
+
+
+type
+ QTSSourcerInitParamsPtr = ^QTSSourcerInitParams;
+ QTSSourcerInitParams = record
+ version: SInt32;
+ flags: SInt32;
+ dataType: OSType;
+ data: Ptr;
+ dataLength: UInt32;
+ end;
+
+ {
+ * QTSNewSourcer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSNewSourcer(params: UnivPtr; const (*var*) inInitParams: QTSSourcerInitParams; inFlags: SInt32; var outSourcer: ComponentInstance): OSErr; external name '_QTSNewSourcer';
+
+{ info selectors for sourcers - get and set }
+
+const
+ kQTSInfo_Track = $7472616B (* 'trak' *); { QTSTrackParams* }
+ kQTSInfo_Loop = $6C6F6F70 (* 'loop' *); { QTSLoopParams* }
+ kQTSInfo_SourcerTiming = $7374696D (* 'stim' *); { QTSSourcerTimingParams* }
+ kQTSInfo_TargetFrameRate = $74667073 (* 'tfps' *); { Fixed * in frames per second }
+ kQTSInfo_PushData = $70757368 (* 'push' *); { QTSPushDataParams* }
+ kQTSInfo_SourcerCallbackProc = $73636270 (* 'scbp' *); { QTSSourcerCallbackProcParams* }
+ kQTSInfo_TargetDataRate = $74647274 (* 'tdrt' *); { UInt32 * in bytes per second }
+ kQTSInfo_AudioAutoGainOnOff = $61676320 (* 'agc ' *); { Boolean* - error if unavailable }
+ kQTSInfo_AudioGain = $6761696E (* 'gain' *); { Fixed* kFixed1 is unity gain }
+ kQTSInfo_CroppedInputRect = $63727072 (* 'crpr' *); { Rect* - defined relative to kQTSInfo_FullInputRect below }
+ kQTSInfo_SpatialSettings = $7370746C (* 'sptl' *); { pointer to SCSpatialSettings struct }
+ kQTSInfo_TemporalSettings = $7470726C (* 'tprl' *); { pointer to SCTemporalSettings struct }
+ kQTSInfo_DataRateSettings = $64726174 (* 'drat' *); { pointer to SCDataRateSettings struct }
+ kQTSInfo_CodecFlags = $63666C67 (* 'cflg' *); { pointer to CodecFlags }
+ kQTSInfo_CodecSettings = $63646563 (* 'cdec' *); { pointer to Handle }
+ kQTSInfo_ForceKeyValue = $6B73696D (* 'ksim' *); { pointer to long }
+ kQTSInfo_SoundSampleRate = $73737274 (* 'ssrt' *); { pointer to UnsignedFixed }
+ kQTSInfo_SoundSampleSize = $73737373 (* 'ssss' *); { pointer to short }
+ kQTSInfo_SoundChannelCount = $73736363 (* 'sscc' *); { pointer to short }
+ kQTSInfo_SoundCompression = $73736374 (* 'ssct' *); { pointer to OSType }
+ kQTSInfo_CompressionList = $6374796C (* 'ctyl' *); { pointer to OSType Handle }
+ kQTSInfo_VideoHue = $68756520 (* 'hue ' *); { UInt16* }
+ kQTSInfo_VideoSaturation = $73617472 (* 'satr' *); { UInt16* }
+ kQTSInfo_VideoContrast = $74727374 (* 'trst' *); { UInt16* }
+ kQTSInfo_VideoBrightness = $62726974 (* 'brit' *); { UInt16* }
+ kQTSInfo_VideoSharpness = $73687270 (* 'shrp' *); { UInt16* }
+ kQTSInfo_TimeScale = $7363616C (* 'scal' *); { UInt32* }
+ kQTSInfo_SGChannelDeviceName = $696E6E6D (* 'innm' *); { Handle* }
+ kQTSInfo_SGChannelDeviceList = $7372646C (* 'srdl' *); { SGDeviceList* }
+ kQTSInfo_SGChannelDeviceInput = $73646969 (* 'sdii' *); { short* }
+ kQTSInfo_SGChannelSettings = $73657367 (* 'sesg' *); { QTSSGChannelSettingsParams }
+ kQTSInfo_PreviewWhileRecordingMode = $73727072 (* 'srpr' *); { Boolean* }
+ kQTSInfo_CompressionParams = $73636370 (* 'sccp' *); { QTAtomContainer* }
+
+ { info selectors for sourcers - get only }
+ kQTSInfo_SGChannel = $73676368 (* 'sgch' *); { SGChannel* }
+ kQTSInfo_SGChannelInputName = $73726E6D (* 'srnm' *); { Handle* }
+ kQTSInfo_FullInputRect = $66756C72 (* 'fulr' *); { Rect* }
+
+ { loop flags }
+ kQTSLoopFlag_Loop = $00000001;
+
+ kQTSLoopParamsVersion1 = 1;
+
+
+type
+ QTSLoopParamsPtr = ^QTSLoopParams;
+ QTSLoopParams = record
+ version: SInt32;
+ flags: SInt32;
+ loopFlags: SInt32;
+ flagsMask: SInt32;
+ numLoops: SInt32;
+ end;
+
+
+const
+ kQTSTrackParamsVersion1 = 1;
+
+
+type
+ QTSTrackParamsPtr = ^QTSTrackParams;
+ QTSTrackParams = record
+ version: SInt32;
+ flags: SInt32;
+ track: Track_fix;
+ trackStartOffset: TimeValue64; { to start other than at the beginning otherwise set to 0 }
+ duration: TimeValue64; { to limit the duration otherwise set to 0 }
+ loopParams: QTSLoopParamsPtr; { set to NULL if not using; default is no looping }
+ end;
+
+
+const
+ kQTSSourcerTimingParamsVersion1 = 1;
+
+
+type
+ QTSSourcerTimingParamsPtr = ^QTSSourcerTimingParams;
+ QTSSourcerTimingParams = record
+ version: SInt32;
+ flags: SInt32;
+ timeScale: TimeScale_fix;
+ presentationStartTime: TimeValue64;
+ presentationEndTime: TimeValue64;
+ presentationCurrentTime: TimeValue64;
+ localStartTime: TimeValue64;
+ localEndTime: TimeValue64;
+ localCurrentTime: TimeValue64;
+ end;
+
+
+const
+ kQTSPushDataParamsVersion1 = 1;
+
+ kQTSPushDataFlag_SampleTimeIsValid = $00000001;
+ kQTSPushDataFlag_DurationIsValid = $00000002;
+
+
+type
+ QTSPushDataParamsPtr = ^QTSPushDataParams;
+ QTSPushDataParams = record
+ version: SInt32;
+ flags: SInt32;
+ sampleDescription: SampleDescriptionHandle; { caller owns the handle }
+ sampleDescSeed: UInt32;
+ sampleTime: TimeValue64; { also set flag if you set this }
+ duration: TimeValue64; { also set flag if you set this }
+ dataLength: UInt32;
+ dataPtr: Ptr; { this does not have to be a real macintosh Ptr }
+ end;
+
+
+const
+ kQTSSourcerCallbackProcParamsVersion1 = 1;
+
+
+type
+ QTSSourcerCallbackProcParamsPtr = ^QTSSourcerCallbackProcParams;
+ QTSSourcerCallbackProcParams = record
+ version: SInt32;
+ flags: SInt32;
+ proc: QTSNotificationUPP;
+ refCon: Ptr;
+ end;
+
+ { track sourcer callback selectors }
+
+const
+ kQTSSourcerCallback_Done = $646F6E65 (* 'done' *); { QTSSourcerDoneParams* }
+
+
+ { push data sourcer callback selectors }
+ kQTSPushDataSourcerCallback_HasCharacteristic = $050D; { QTSPushDataHasCharacteristicParams* }
+ kQTSPushDataSourcerCallback_SetInfo = $0507; { QTSPushDataInfoParams* }
+ kQTSPushDataSourcerCallback_GetInfo = $0508; { QTSPushDataInfoParams* }
+
+
+type
+ QTSPushDataHasCharacteristicParamsPtr = ^QTSPushDataHasCharacteristicParams;
+ QTSPushDataHasCharacteristicParams = record
+ version: SInt32;
+ flags: SInt32;
+ characteristic: OSType;
+ returnedHasIt: boolean;
+ reserved1: SInt8;
+ reserved2: SInt8;
+ reserved3: SInt8;
+ end;
+
+ QTSPushDataInfoParamsPtr = ^QTSPushDataInfoParams;
+ QTSPushDataInfoParams = record
+ version: SInt32;
+ flags: SInt32;
+ selector: OSType;
+ ioParams: Ptr;
+ end;
+
+
+const
+ kQTSSourcerDoneParamsVersion1 = 1;
+
+
+type
+ QTSSourcerDoneParamsPtr = ^QTSSourcerDoneParams;
+ QTSSourcerDoneParams = record
+ version: SInt32;
+ flags: SInt32;
+ sourcer: ComponentInstance;
+ end;
+
+ QTSSGChannelSettingsParamsPtr = ^QTSSGChannelSettingsParams;
+ QTSSGChannelSettingsParams = record
+ settings: UserData;
+ flags: SInt32;
+ end;
+
+
+ { -----------------------------------------
+ Stream Sourcer Selectors
+ ----------------------------------------- }
+
+const
+ kQTSSourcerInitializeSelect = $0500;
+ kQTSSourcerSetEnableSelect = $0503;
+ kQTSSourcerGetEnableSelect = $0504;
+ kQTSSourcerSetInfoSelect = $0507;
+ kQTSSourcerGetInfoSelect = $0508;
+ kQTSSourcerSetTimeScaleSelect = $050E;
+ kQTSSourcerGetTimeScaleSelect = $050F;
+ kQTSSourcerIdleSelect = $0516;
+
+ { -----------------------------------------
+ Stream Sourcer Prototypes
+ ----------------------------------------- }
+ {
+ * QTSSourcerInitialize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0.1 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.1 and later
+ }
+function QTSSourcerInitialize(inSourcer: QTSSourcer; const (*var*) inInitParams: QTSSourcerInitParams): ComponentResult; external name '_QTSSourcerInitialize';
+{
+ * QTSSourcerIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSSourcerIdle(inSourcer: QTSSourcer; (*const*) var inTime: TimeValue64; inFlags: SInt32; var outFlags: SInt32): ComponentResult; external name '_QTSSourcerIdle';
+{
+ * QTSSourcerSetEnable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSSourcerSetEnable(inSourcer: QTSSourcer; inEnableMode: boolean; inFlags: SInt32): ComponentResult; external name '_QTSSourcerSetEnable';
+{
+ * QTSSourcerGetEnable()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSSourcerGetEnable(inSourcer: QTSSourcer; var outEnableMode: boolean; inFlags: SInt32): ComponentResult; external name '_QTSSourcerGetEnable';
+{
+ * QTSSourcerSetTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSSourcerSetTimeScale(inSourcer: QTSSourcer; inTimeScale: TimeScale): ComponentResult; external name '_QTSSourcerSetTimeScale';
+{
+ * QTSSourcerGetTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSSourcerGetTimeScale(inSourcer: QTSSourcer; var outTimeScale: TimeScale): ComponentResult; external name '_QTSSourcerGetTimeScale';
+{
+ * QTSSourcerSetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSSourcerSetInfo(inSourcer: QTSSourcer; inSelector: OSType; ioParams: UnivPtr): ComponentResult; external name '_QTSSourcerSetInfo';
+{
+ * QTSSourcerGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function QTSSourcerGetInfo(inSourcer: QTSSourcer; inSelector: OSType; ioParams: UnivPtr): ComponentResult; external name '_QTSSourcerGetInfo';
+const
+ kQTSInfo_InputDeviceName = $696E6E6D (* 'innm' *); { Handle* }
+ kQTSInfo_InputSourceName = $73726E6D (* 'srnm' *); { Handle* }
+
+
+ { ============================================================================
+ Stream Handler
+ ============================================================================ }
+
+ {
+ Server edits are only valid for the current chunk
+ }
+
+type
+ SHServerEditParametersPtr = ^SHServerEditParameters;
+ SHServerEditParameters = record
+ version: UInt32;
+ editRate: Fixed;
+ dataStartTime_mediaAxis: TimeValue64;
+ dataEndTime_mediaAxis: TimeValue64;
+ end;
+
+
+const
+ kSHNoChunkDispatchFlags = 0;
+ kSHChunkFlagSyncSample = $04;
+ kSHChunkFlagDataLoss = $10;
+ kSHChunkFlagExtended = $20;
+
+
+type
+ SHChunkRecordPtr = ^SHChunkRecord;
+ SHChunkRecord = record
+ version: UInt32;
+ reserved1: SInt32;
+ flags: SInt32;
+ dataSize: UInt32;
+ dataPtr: Ptr;
+ reserved2: SInt32;
+ reserved3: SInt32;
+ presentationTime: TimeValue64;
+ reserved4: SInt32;
+ reserved5: SInt32;
+ serverEditParameters: SHServerEditParametersPtr;
+ reserved6: SInt32;
+ reserved7: SInt32;
+ end;
+
+
+const
+ kSHNumExtendedDataLongs = 10;
+
+ kSHExtendedChunkFlag_HasSampleCount = $01;
+ kSHExtendedChunkFlag_HasFrameLengths = $02;
+
+
+type
+ SHExtendedChunkRecordPtr = ^SHExtendedChunkRecord;
+ SHExtendedChunkRecord = record
+ chunk: SHChunkRecord;
+ extendedFlags: SInt32;
+ extendedData: array [0..9] of SInt32;
+ end;
+
+
+ { ============================================================================
+ RTP Components
+ ============================================================================ }
+ RTPSSRC = UInt32;
+
+const
+ kRTPInvalidSSRC = 0;
+
+
+ { RTP standard content encodings for audio }
+ kRTPPayload_PCMU = 0; { 8kHz PCM mu-law mono }
+ kRTPPayload_1016 = 1; { 8kHz CELP (Fed Std 1016) mono }
+ kRTPPayload_G721 = 2; { 8kHz G.721 ADPCM mono }
+ kRTPPayload_GSM = 3; { 8kHz GSM mono }
+ kRTPPayload_G723 = 4; { 8kHz G.723 ADPCM mono }
+ kRTPPayload_DVI_8 = 5; { 8kHz Intel DVI ADPCM mono }
+ kRTPPayload_DVI_16 = 6; { 16kHz Intel DVI ADPCM mono }
+ kRTPPayload_LPC = 7; { 8kHz LPC }
+ kRTPPayload_PCMA = 8; { 8kHz PCM a-law mono }
+ kRTPPayload_L16_44_2 = 10; { 44.1kHz 16-bit linear stereo }
+ kRTPPayload_L16_44_1 = 11; { 44.1kHz 16-bit linear mono }
+ kRTPPayload_PureVoice = 12; { 8kHz PureVoice mono (QCELP) }
+ kRTPPayload_MPEGAUDIO = 14; { MPEG I and II audio }
+ kRTPPayload_DVI_11 = 16; { 11kHz Intel DVI ADPCM mono }
+ kRTPPayload_DVI_22 = 17; { 22kHz Intel DVI ADPCM mono }
+
+ { RTP standard content encodings for video }
+ kRTPPayload_CELLB = 25; { Sun CellB }
+ kRTPPayload_JPEG = 26; { JPEG }
+ kRTPPayload_CUSEEME = 27; { Cornell CU-SeeMe }
+ kRTPPayload_NV = 28; { Xerox PARC nv }
+ kRTPPayload_PICWIN = 29; { BBN Picture Window }
+ kRTPPayload_CPV = 30; { Bolter CPV }
+ kRTPPayload_H261 = 31; { CCITT H.261 }
+ kRTPPayload_MPEGVIDEO = 32; { MPEG I and II video }
+ kRTPPayload_H263 = 34; { CCITT H.263 }
+
+ { Other RTP standard content encodings }
+ kRTPPayload_MPEG2T = 33; { MPEG 2 Transport }
+
+ { Dynamic encodings }
+ kRTPPayload_FirstDynamic = 96;
+ kRTPPayload_LastDynamic = 127;
+ kRTPPayload_Unknown = $FF;
+
+
+ {
+ -----------------------------------------
+ RTP Info selectors
+ -----------------------------------------
+ }
+ { ----- these are get and set ----- }
+ kRTPInfo_SSRC = $73737263 (* 'ssrc' *); { UInt32* }
+ kRTPInfo_NextSeqNum = $726E736E (* 'rnsn' *); { UInt16* }
+
+ { -----------------------------------------
+ RTP Statistics
+ ----------------------------------------- }
+ kRTPTotalReceivedPktsStat = $74726370 (* 'trcp' *);
+ kRTPTotalLostPktsStat = $746C7370 (* 'tlsp' *);
+ kRTPTotalProcessedPktsStat = $74707270 (* 'tprp' *);
+ kRTPTotalDroppedPktsStat = $74647270 (* 'tdrp' *);
+ kRTPBadHeaderDroppedPktsStat = $62686470 (* 'bhdp' *);
+ kRTPOurHeaderDroppedPktsStat = $6F686470 (* 'ohdp' *);
+ kRTPNotReceivingSenderDroppedPktsStat = $6E736470 (* 'nsdp' *);
+ kRTPNotProcessingDroppedPktsStat = $6E706470 (* 'npdp' *);
+ kRTPBadSeqDroppedPktsStat = $62736470 (* 'bsdp' *);
+ kRTPArriveTooLatePktsStat = $6172746C (* 'artl' *);
+ kRTPWaitForSeqDroppedPktsStat = $77736470 (* 'wsdp' *);
+ kRTPBadStateDroppedPktsStat = $73746470 (* 'stdp' *);
+ kRTPBadPayloadDroppedPktsStat = $62706470 (* 'bpdp' *);
+ kRTPNoTimeScaleDroppedPktsStat = $6E746470 (* 'ntdp' *);
+ kRTPDupSeqNumDroppedPktsStat = $64736470 (* 'dsdp' *);
+ kRTPLostPktsPercentStat = $6C737070 (* 'lspp' *);
+ kRTPDroppedPktsPercentStat = $64707070 (* 'dppp' *);
+ kRTPTotalUnprocessedPktsPercentStat = $74757070 (* 'tupp' *);
+ kRTPRTCPDataRateStat = $72726364 (* 'rrcd' *);
+ kRTPPayloadIDStat = $72706964 (* 'rpid' *);
+ kRTPPayloadNameStat = $72706E6D (* 'rpnm' *);
+ kRTPNumPktsInQueueStat = $726E7071 (* 'rnpq' *);
+ kRTPTotalPktsInQueueStat = $72747071 (* 'rtpq' *);
+ kRTPTotalOutOfOrderPktsStat = $72746F6F (* 'rtoo' *);
+ kRTPRetransmissionStat = $72727478 (* 'rrtx' *);
+
+
+ { -----------------------------------------
+ Payload Info
+ ----------------------------------------- }
+ kRTPPayloadSpeedTag = $73706564 (* 'sped' *); { 0-255, 255 is fastest }
+ kRTPPayloadLossRecoveryTag = $6C6F7373 (* 'loss' *); { 0-255, 0 can't handle any loss, 128 can handle 50% packet loss }
+ kRTPPayloadConformanceTag = $636F6E66 (* 'conf' *); { more than one of these can be present }
+
+
+type
+ RTPPayloadCharacteristicPtr = ^RTPPayloadCharacteristic;
+ RTPPayloadCharacteristic = record
+ tag: OSType;
+ value: SInt32;
+ end;
+
+ {
+ pass RTPPayloadSortRequest to QTSFindMediaPacketizer or QTSFindMediaPacketizerForTrack.
+ define the characteristics to sort by. tag is key to sort on. value is positive for ascending
+ sort (low value first), negative for descending sort (high value first).
+ }
+ RTPPayloadSortRequestPtr = ^RTPPayloadSortRequest;
+ RTPPayloadSortRequest = record
+ characteristicCount: SInt32;
+ characteristic: array [0..0] of RTPPayloadCharacteristic; { tag is key to sort on, value is + for ascending, - for descending }
+ end;
+
+ { flags for RTPPayloadInfo }
+
+const
+ kRTPPayloadTypeStaticFlag = $00000001;
+ kRTPPayloadTypeDynamicFlag = $00000002;
+
+
+type
+ RTPPayloadInfoPtr = ^RTPPayloadInfo;
+ RTPPayloadInfo = record
+ payloadFlags: SInt32;
+ payloadID: SInt8;
+ reserved1: SInt8;
+ reserved2: SInt8;
+ reserved3: SInt8;
+ payloadName: SInt8;
+ end;
+
+ RTPPayloadInfoHandle = ^RTPPayloadInfoPtr;
+ { ============================================================================
+ RTP Reassembler
+ ============================================================================ }
+ RTPReassembler = ComponentInstance;
+
+const
+ kRTPReassemblerType = $72747072 (* 'rtpr' *);
+
+ kRTPBaseReassemblerType = $676E7263 (* 'gnrc' *);
+ kRTP261ReassemblerType = $68323631 (* 'h261' *);
+ kRTP263ReassemblerType = $68323633 (* 'h263' *);
+ kRTP263PlusReassemblerType = $3236332B (* '263+' *);
+ kRTPAudioReassemblerType = $736F756E (* 'soun' *);
+ kRTPQTReassemblerType = $7174696D (* 'qtim' *);
+ kRTPPureVoiceReassemblerType = $51636C70 (* 'Qclp' *);
+ kRTPJPEGReassemblerType = $6A706567 (* 'jpeg' *);
+ kRTPQDesign2ReassemblerType = $51444D32 (* 'QDM2' *);
+ kRTPSorensonReassemblerType = $53565131 (* 'SVQ1' *);
+ kRTPMP3ReassemblerType = $6D703320 (* 'mp3 ' *);
+ kRTPMPEG4AudioReassemblerType = $6D703461 (* 'mp4a' *);
+ kRTPMPEG4VideoReassemblerType = $6D703476 (* 'mp4v' *);
+
+
+type
+ RTPRssmInitParamsPtr = ^RTPRssmInitParams;
+ RTPRssmInitParams = record
+ ssrc: RTPSSRC;
+ payloadType: SInt8;
+ reserved1: SInt8;
+ reserved2: SInt8;
+ reserved3: SInt8;
+ timeBase: TimeBase_fix;
+ timeScale: TimeScale_fix;
+ end;
+
+ RTPDescParamsPtr = ^RTPDescParams;
+ RTPDescParams = record
+ container: QTAtomContainer;
+ presentationParentAtom: QTAtom;
+ streamParentAtom: QTAtom;
+ end;
+
+ RTPRssmMoreInitParamsPtr = ^RTPRssmMoreInitParams;
+ RTPRssmMoreInitParams = record
+ initParams: RTPRssmInitParams;
+ version: SInt32;
+ desc: RTPDescParams;
+ end;
+
+
+const
+ kRTPRssmMoreInitParamsVersion1 = 1;
+
+
+ { get/set info selectors }
+ kRTPRssmInfo_MoreInitParams = $72726D69 (* 'rrmi' *);
+
+
+type
+ RTPRssmPacketPtr = ^RTPRssmPacket;
+ RTPRssmPacket = record
+ next: RTPRssmPacketPtr;
+ prev: RTPRssmPacketPtr;
+ streamBuffer: QTSStreamBufferPtr;
+ paramsFilledIn: boolean;
+ reserved: SInt8;
+ sequenceNum: UInt16;
+ transportHeaderLength: UInt32; { filled in by base }
+ payloadHeaderLength: UInt32; { derived adjusts this }
+ dataLength: UInt32;
+ serverEditParams: SHServerEditParameters;
+ timeStamp: TimeValue64; { lower 32 bits is original rtp timestamp }
+ chunkFlags: SInt32; { these are or'd together }
+ flags: SInt32;
+ end;
+
+ { flags for RTPRssmPacket struct }
+
+const
+ kRTPRssmPacketHasMarkerBitSet = $00000001;
+ kRTPRssmPacketHasServerEditFlag = $00010000;
+
+ { flags for RTPRssmSendStreamBufferRange }
+ kRTPRssmCanRefStreamBuffer = $00000001;
+
+ { flags for RTPRssmSendPacketList }
+ kRTPRssmLostSomePackets = $00000001;
+
+ { flags for RTPRssmSetFlags }
+ kRTPRssmEveryPacketAChunkFlag = $00000001;
+ kRTPRssmQueueAndUseMarkerBitFlag = $00000002;
+ kRTPRssmTrackLostPacketsFlag = $00010000;
+ kRTPRssmNoReorderingRequiredFlag = $00020000;
+
+
+type
+ RTPSendStreamBufferRangeParamsPtr = ^RTPSendStreamBufferRangeParams;
+ RTPSendStreamBufferRangeParams = record
+ streamBuffer: QTSStreamBufferPtr;
+ presentationTime: TimeValue64;
+ chunkStartPosition: UInt32;
+ numDataBytes: UInt32;
+ chunkFlags: SInt32;
+ flags: SInt32;
+ serverEditParams: SHServerEditParametersPtr; { NULL if no edit }
+ end;
+
+ { characteristics }
+
+const
+ kRTPCharacteristic_RequiresOrderedPackets = $72726F70 (* 'rrop' *);
+ kRTPCharacteristic_TimeStampsNotMonoIncreasing = $74736D69 (* 'tsmi' *);
+
+
+ kRTPReassemblerInfoResType = $72736D69 (* 'rsmi' *);
+
+
+type
+ RTPReassemblerInfoPtr = ^RTPReassemblerInfo;
+ RTPReassemblerInfo = record
+ characteristicCount: SInt32;
+ characteristic: array [0..0] of RTPPayloadCharacteristic;
+ { after the last characteristic, the payload name (defined by the MediaPacketizerPayloadInfo }
+ { structure) is present. }
+ end;
+
+ RTPReassemblerInfoHandle = ^RTPReassemblerInfoPtr;
+ { RTPReassemblerInfoElement structs are padded to 32 bits }
+
+const
+ kRTPReassemblerInfoPadUpToBytes = 4;
+
+
+ {
+ * QTSFindReassemblerForPayloadID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSFindReassemblerForPayloadID(inPayloadID: ByteParameter; var inSortInfo: RTPPayloadSortRequest; var outReassemblerList: QTAtomContainer): OSErr; external name '_QTSFindReassemblerForPayloadID';
+
+{
+ * QTSFindReassemblerForPayloadName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSFindReassemblerForPayloadName(inPayloadName: ConstCStringPtr; var inSortInfo: RTPPayloadSortRequest; var outReassemblerList: QTAtomContainer): OSErr; external name '_QTSFindReassemblerForPayloadName';
+
+{-----------------------------------------
+ RTP Reassembler Selectors
+-----------------------------------------}
+
+const
+ kRTPRssmSetCapabilitiesSelect = $0100;
+ kRTPRssmGetCapabilitiesSelect = $0101;
+ kRTPRssmSetPayloadHeaderLengthSelect = $0102;
+ kRTPRssmGetPayloadHeaderLengthSelect = $0103;
+ kRTPRssmSetTimeScaleSelect = $0104;
+ kRTPRssmGetTimeScaleSelect = $0105;
+ kRTPRssmNewStreamHandlerSelect = $0106;
+ kRTPRssmSetStreamHandlerSelect = $0107;
+ kRTPRssmGetStreamHandlerSelect = $0108;
+ kRTPRssmSendStreamHandlerChangedSelect = $0109;
+ kRTPRssmSetSampleDescriptionSelect = $010A;
+ kRTPRssmGetChunkAndIncrRefCountSelect = $010D;
+ kRTPRssmSendChunkAndDecrRefCountSelect = $010E;
+ kRTPRssmSendLostChunkSelect = $010F;
+ kRTPRssmSendStreamBufferRangeSelect = $0110;
+ kRTPRssmClearCachedPackets = $0111;
+ kRTPRssmFillPacketListParamsSelect = $0113;
+ kRTPRssmReleasePacketListSelect = $0114;
+ kRTPRssmIncrChunkRefCountSelect = $0115;
+ kRTPRssmDecrChunkRefCountSelect = $0116;
+ kRTPRssmGetExtChunkAndIncrRefCountSelect = $0117;
+ kRTPRssmInitializeSelect = $0500;
+ kRTPRssmHandleNewPacketSelect = $0501;
+ kRTPRssmComputeChunkSizeSelect = $0502;
+ kRTPRssmAdjustPacketParamsSelect = $0503;
+ kRTPRssmCopyDataToChunkSelect = $0504;
+ kRTPRssmSendPacketListSelect = $0505;
+ kRTPRssmGetTimeScaleFromPacketSelect = $0506;
+ kRTPRssmSetInfoSelect = $0509;
+ kRTPRssmGetInfoSelect = $050A;
+ kRTPRssmHasCharacteristicSelect = $050B;
+ kRTPRssmResetSelect = $050C;
+
+ { -----------------------------------------
+ RTP Reassembler functions - base to derived
+ ----------------------------------------- }
+
+ {
+ * RTPRssmInitialize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmInitialize(rtpr: RTPReassembler; var inInitParams: RTPRssmInitParams): ComponentResult; external name '_RTPRssmInitialize';
+{
+ * RTPRssmHandleNewPacket()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmHandleNewPacket(rtpr: RTPReassembler; var inStreamBuffer: QTSStreamBuffer; inNumWraparounds: SInt32): ComponentResult; external name '_RTPRssmHandleNewPacket';
+{
+ * RTPRssmComputeChunkSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmComputeChunkSize(rtpr: RTPReassembler; var inPacketListHead: RTPRssmPacket; inFlags: SInt32; var outChunkDataSize: UInt32): ComponentResult; external name '_RTPRssmComputeChunkSize';
+{
+ * RTPRssmAdjustPacketParams()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmAdjustPacketParams(rtpr: RTPReassembler; var inPacket: RTPRssmPacket; inFlags: SInt32): ComponentResult; external name '_RTPRssmAdjustPacketParams';
+{
+ * RTPRssmCopyDataToChunk()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmCopyDataToChunk(rtpr: RTPReassembler; var inPacketListHead: RTPRssmPacket; inMaxChunkDataSize: UInt32; var inChunk: SHChunkRecord; inFlags: SInt32): ComponentResult; external name '_RTPRssmCopyDataToChunk';
+{
+ * RTPRssmSendPacketList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmSendPacketList(rtpr: RTPReassembler; var inPacketListHead: RTPRssmPacket; (*const*) var inLastChunkPresentationTime: TimeValue64; inFlags: SInt32): ComponentResult; external name '_RTPRssmSendPacketList';
+{
+ * RTPRssmGetTimeScaleFromPacket()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmGetTimeScaleFromPacket(rtpr: RTPReassembler; var inStreamBuffer: QTSStreamBuffer; var outTimeScale: TimeScale): ComponentResult; external name '_RTPRssmGetTimeScaleFromPacket';
+{
+ * RTPRssmSetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmSetInfo(rtpr: RTPReassembler; inSelector: OSType; ioParams: UnivPtr): ComponentResult; external name '_RTPRssmSetInfo';
+{
+ * RTPRssmGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmGetInfo(rtpr: RTPReassembler; inSelector: OSType; ioParams: UnivPtr): ComponentResult; external name '_RTPRssmGetInfo';
+{
+ * RTPRssmHasCharacteristic()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmHasCharacteristic(rtpr: RTPReassembler; inCharacteristic: OSType; var outHasIt: boolean): ComponentResult; external name '_RTPRssmHasCharacteristic';
+{
+ * RTPRssmReset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmReset(rtpr: RTPReassembler; inFlags: SInt32): ComponentResult; external name '_RTPRssmReset';
+{-----------------------------------------
+ RTP Reassembler functions - derived to base
+-----------------------------------------}
+{ ----- setup }
+{
+ * RTPRssmSetCapabilities()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmSetCapabilities(rtpr: RTPReassembler; inFlags: SInt32; inFlagsMask: SInt32): ComponentResult; external name '_RTPRssmSetCapabilities';
+{
+ * RTPRssmGetCapabilities()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmGetCapabilities(rtpr: RTPReassembler; var outFlags: SInt32): ComponentResult; external name '_RTPRssmGetCapabilities';
+{
+ * RTPRssmSetPayloadHeaderLength()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmSetPayloadHeaderLength(rtpr: RTPReassembler; inPayloadHeaderLength: UInt32): ComponentResult; external name '_RTPRssmSetPayloadHeaderLength';
+{
+ * RTPRssmGetPayloadHeaderLength()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmGetPayloadHeaderLength(rtpr: RTPReassembler; var outPayloadHeaderLength: UInt32): ComponentResult; external name '_RTPRssmGetPayloadHeaderLength';
+{
+ * RTPRssmSetTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmSetTimeScale(rtpr: RTPReassembler; inSHTimeScale: TimeScale): ComponentResult; external name '_RTPRssmSetTimeScale';
+{
+ * RTPRssmGetTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmGetTimeScale(rtpr: RTPReassembler; var outSHTimeScale: TimeScale): ComponentResult; external name '_RTPRssmGetTimeScale';
+{
+ * RTPRssmNewStreamHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmNewStreamHandler(rtpr: RTPReassembler; inSHType: OSType; inSampleDescription: SampleDescriptionHandle; inSHTimeScale: TimeScale; var outHandler: ComponentInstance): ComponentResult; external name '_RTPRssmNewStreamHandler';
+{
+ * RTPRssmSetStreamHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmSetStreamHandler(rtpr: RTPReassembler; inStreamHandler: ComponentInstance): ComponentResult; external name '_RTPRssmSetStreamHandler';
+{
+ * RTPRssmGetStreamHandler()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmGetStreamHandler(rtpr: RTPReassembler; var outStreamHandler: ComponentInstance): ComponentResult; external name '_RTPRssmGetStreamHandler';
+{
+ * RTPRssmSendStreamHandlerChanged()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmSendStreamHandlerChanged(rtpr: RTPReassembler): ComponentResult; external name '_RTPRssmSendStreamHandlerChanged';
+{
+ * RTPRssmSetSampleDescription()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmSetSampleDescription(rtpr: RTPReassembler; inSampleDescription: SampleDescriptionHandle): ComponentResult; external name '_RTPRssmSetSampleDescription';
+{ ----- manually sending chunks }
+{
+ * RTPRssmGetChunkAndIncrRefCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmGetChunkAndIncrRefCount(rtpr: RTPReassembler; inChunkDataSize: UInt32; (*const*) var inChunkPresentationTime: TimeValue64; var outChunk: UnivPtr): ComponentResult; external name '_RTPRssmGetChunkAndIncrRefCount';
+{
+ * RTPRssmGetExtChunkAndIncrRefCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 6.0 and later
+ * CarbonLib: in CarbonLib 1.6 and later
+ * Mac OS X: in version 10.2 and later
+ * Windows: in qtmlClient.lib 6.0 and later
+ }
+function RTPRssmGetExtChunkAndIncrRefCount(rtpr: RTPReassembler; inChunkDataSize: UInt32; (*const*) var inChunkPresentationTime: TimeValue64; inFlags: SInt32; var outChunk: UnivPtr): ComponentResult; external name '_RTPRssmGetExtChunkAndIncrRefCount';
+{
+ * RTPRssmSendChunkAndDecrRefCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmSendChunkAndDecrRefCount(rtpr: RTPReassembler; var inChunk: SHChunkRecord; const (*var*) inServerEdit: SHServerEditParameters): ComponentResult; external name '_RTPRssmSendChunkAndDecrRefCount';
+{
+ * RTPRssmSendLostChunk()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmSendLostChunk(rtpr: RTPReassembler; (*const*) var inChunkPresentationTime: TimeValue64): ComponentResult; external name '_RTPRssmSendLostChunk';
+{
+ * RTPRssmSendStreamBufferRange()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmSendStreamBufferRange(rtpr: RTPReassembler; var inParams: RTPSendStreamBufferRangeParams): ComponentResult; external name '_RTPRssmSendStreamBufferRange';
+{
+ * RTPRssmClearCachedPackets()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmClearCachedPackets(rtpr: RTPReassembler; inFlags: SInt32): ComponentResult; external name '_RTPRssmClearCachedPackets';
+{
+ * RTPRssmFillPacketListParams()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmFillPacketListParams(rtpr: RTPReassembler; var inPacketListHead: RTPRssmPacket; inNumWraparounds: SInt32; inFlags: SInt32): ComponentResult; external name '_RTPRssmFillPacketListParams';
+{
+ * RTPRssmReleasePacketList()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmReleasePacketList(rtpr: RTPReassembler; var inPacketListHead: RTPRssmPacket): ComponentResult; external name '_RTPRssmReleasePacketList';
+{
+ * RTPRssmIncrChunkRefCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmIncrChunkRefCount(rtpr: RTPReassembler; var inChunk: SHChunkRecord): ComponentResult; external name '_RTPRssmIncrChunkRefCount';
+{
+ * RTPRssmDecrChunkRefCount()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPRssmDecrChunkRefCount(rtpr: RTPReassembler; var inChunk: SHChunkRecord): ComponentResult; external name '_RTPRssmDecrChunkRefCount';
+{============================================================================
+ RTP Media Packetizer
+============================================================================}
+
+const
+ kRTPMediaPacketizerType = $7274706D (* 'rtpm' *);
+
+
+type
+ RTPMediaPacketizer = ComponentInstance;
+
+const
+ kRTPBaseMediaPacketizerType = $676E7263 (* 'gnrc' *);
+ kRTP261MediaPacketizerType = $68323631 (* 'h261' *);
+ kRTP263PlusMediaPacketizerType = $3236332B (* '263+' *);
+ kRTPAudioMediaPacketizerType = $736F756E (* 'soun' *);
+ kRTPQTMediaPacketizerType = $7174696D (* 'qtim' *);
+ kRTPPureVoiceMediaPacketizerType = $51636C70 (* 'Qclp' *);
+ kRTPJPEGMediaPacketizerType = $6A706567 (* 'jpeg' *);
+ kRTPQDesign2MediaPacketizerType = $51444D32 (* 'QDM2' *);
+ kRTPSorensonMediaPacketizerType = $53565131 (* 'SVQ1' *);
+ kRTPMP3MediaPacketizerType = $6D703320 (* 'mp3 ' *);
+ kRTPMPEG4AudioMediaPacketizerType = $6D703461 (* 'mp4a' *);
+ kRTPMPEG4VideoMediaPacketizerType = $6D703476 (* 'mp4v' *);
+
+
+type
+ RTPMPSampleRef = UInt32;
+{$ifc TYPED_FUNCTION_POINTERS}
+ RTPMPDataReleaseProcPtr = procedure(var inData: UInt8; inRefCon: UnivPtr);
+{$elsec}
+ RTPMPDataReleaseProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ RTPMPDataReleaseUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ RTPMPDataReleaseUPP = UniversalProcPtr;
+{$endc}
+
+const
+ kMediaPacketizerCanPackEditRate = $01;
+ kMediaPacketizerCanPackLayer = $02;
+ kMediaPacketizerCanPackVolume = $04;
+ kMediaPacketizerCanPackBalance = $08;
+ kMediaPacketizerCanPackGraphicsMode = $10;
+ kMediaPacketizerCanPackEmptyEdit = $20;
+
+
+type
+ MediaPacketizerRequirementsPtr = ^MediaPacketizerRequirements;
+ MediaPacketizerRequirements = record
+ mediaType: OSType; { media type supported (0 for all) }
+ dataFormat: OSType; { data format (e.g., compression) supported (0 for all) }
+ capabilityFlags: UInt32; { ability to handle non-standard track characteristics }
+ canPackMatrixType: SInt8; { can pack any matrix type up to this (identityMatrixType for identity only) }
+ reserved1: SInt8;
+ reserved2: SInt8;
+ reserved3: SInt8;
+ end;
+
+ MediaPacketizerInfoPtr = ^MediaPacketizerInfo;
+ MediaPacketizerInfo = record
+ mediaType: OSType; { media type supported (0 for all) }
+ dataFormat: OSType; { data format (e.g., compression) supported (0 for all) }
+ vendor: OSType; { manufacturer of this packetizer (e.g., 'appl' for Apple) }
+ capabilityFlags: UInt32; { ability to handle non-standard track characteristics }
+ canPackMatrixType: SInt8; { can pack any matrix type up to this (identityMatrixType for identity only) }
+ reserved1: SInt8;
+ reserved2: SInt8;
+ reserved3: SInt8;
+ characteristicCount: SInt32;
+ characteristic: array [0..0] of RTPPayloadCharacteristic;
+ { after the last characteristic, the payload name (defined by the RTPPayloadInfo }
+ { structure) is present. }
+ end;
+
+ MediaPacketizerInfoHandle = ^MediaPacketizerInfoPtr;
+ { MediaPacketizerInfo structs are padded to 32 bits }
+
+const
+ kMediaPacketizerInfoPadUpToBytes = 4;
+
+ {
+ * QTSFindMediaPacketizer()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSFindMediaPacketizer(inPacketizerinfo: MediaPacketizerRequirementsPtr; inSampleDescription: SampleDescriptionHandle; inSortInfo: RTPPayloadSortRequestPtr; var outPacketizerList: QTAtomContainer): OSErr; external name '_QTSFindMediaPacketizer';
+
+{
+ * QTSFindMediaPacketizerForTrack()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSFindMediaPacketizerForTrack(inTrack: Track; inSampleDescriptionIndex: SInt32; inSortInfo: RTPPayloadSortRequestPtr; var outPacketizerList: QTAtomContainer): OSErr; external name '_QTSFindMediaPacketizerForTrack';
+
+{
+ * QTSFindMediaPacketizerForPayloadID()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSFindMediaPacketizerForPayloadID(payloadID: SInt32; inSortInfo: RTPPayloadSortRequestPtr; var outPacketizerList: QTAtomContainer): OSErr; external name '_QTSFindMediaPacketizerForPayloadID';
+
+{
+ * QTSFindMediaPacketizerForPayloadName()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function QTSFindMediaPacketizerForPayloadName(payloadName: ConstCStringPtr; inSortInfo: RTPPayloadSortRequestPtr; var outPacketizerList: QTAtomContainer): OSErr; external name '_QTSFindMediaPacketizerForPayloadName';
+
+{ flags for RTPMPInitialize }
+
+const
+ kRTPMPRealtimeModeFlag = $00000001;
+
+ { flags for RTPMPSampleDataParams }
+ kRTPMPSyncSampleFlag = $00000001;
+ kRTPMPRespectDurationFlag = $00000002;
+
+
+type
+ RTPMPSampleDataParamsPtr = ^RTPMPSampleDataParams;
+ RTPMPSampleDataParams = record
+ version: UInt32;
+ timeStamp: UInt32;
+ duration: UInt32; { 0 = unknown duration }
+ playOffset: UInt32;
+ playRate: Fixed;
+ flags: SInt32;
+ sampleDescSeed: UInt32;
+ sampleDescription: Handle;
+ sampleRef: RTPMPSampleRef;
+ dataLength: UInt32;
+ data: Ptr;
+ releaseProc: RTPMPDataReleaseUPP;
+ refCon: Ptr;
+ end;
+
+ { out flags for idle, RTPMPSetSampleData, and RTPMPFlush }
+
+const
+ kRTPMPStillProcessingData = $00000001; { not done with data you've got }
+
+
+type
+ RTPMPPayloadTypeParamsPtr = ^RTPMPPayloadTypeParams;
+ RTPMPPayloadTypeParams = record
+ flags: UInt32;
+ payloadNumber: UInt32;
+ nameLength: SInt16; { in: size of payloadName buffer (counting null terminator) -- this will be reset to needed length and paramErr returned if too small }
+ payloadName: CStringPtr; { caller must provide buffer }
+ end;
+
+ { -----------------------------------------
+ RTP Media Packetizer Info selectors
+ ----------------------------------------- }
+ { info selectors - get only }
+
+const
+ kRTPMPPayloadTypeInfo = $72747070 (* 'rtpp' *); { RTPMPPayloadTypeParams* }
+ kRTPMPRTPTimeScaleInfo = $72747074 (* 'rtpt' *); { TimeScale* }
+ kRTPMPRequiredSampleDescriptionInfo = $73647363 (* 'sdsc' *); { SampleDescriptionHandle* }
+ kRTPMPMinPayloadSize = $6D696E73 (* 'mins' *); { UInt32* in bytes, does not include rtp header; default is 0 }
+ kRTPMPMinPacketDuration = $6D696E64 (* 'mind' *); { UInt3* in milliseconds; default is no min required }
+ kRTPMPSuggestedRepeatPktCountInfo = $73727063 (* 'srpc' *); { UInt32* }
+ kRTPMPSuggestedRepeatPktSpacingInfo = $73727073 (* 'srps' *); { UInt32* in milliseconds }
+ kRTPMPMaxPartialSampleSizeInfo = $6D707373 (* 'mpss' *); { UInt32* in bytes }
+ kRTPMPPreferredBufferDelayInfo = $70726264 (* 'prbd' *); { UInt32* in milliseconds }
+ kRTPMPPayloadNameInfo = $6E616D65 (* 'name' *); { StringPtr }
+ kRTPInfo_FormatString = $666D7470 (* 'fmtp' *); { char **, caller allocates ptr, callee disposes }
+
+ { -----------------------------------------
+ RTP Media Packetizer Characteristics
+ ----------------------------------------- }
+ { also supports relevant ones in Movies.h and QTSToolbox.h }
+ kRTPMPNoSampleDataRequiredCharacteristic = $6E736472 (* 'nsdr' *);
+ kRTPMPHasUserSettingsDialogCharacteristic = $73646C67 (* 'sdlg' *);
+ kRTPMPPrefersReliableTransportCharacteristic = $72656C79 (* 'rely' *);
+ kRTPMPRequiresOutOfBandDimensionsCharacteristic = $726F6264 (* 'robd' *);
+ kRTPMPReadsPartialSamplesCharacteristic = $72707370 (* 'rpsp' *);
+
+ { -----------------------------------------
+ RTP Media Packetizer selectors
+ ----------------------------------------- }
+ kRTPMPInitializeSelect = $0500;
+ kRTPMPPreflightMediaSelect = $0501;
+ kRTPMPIdleSelect = $0502;
+ kRTPMPSetSampleDataSelect = $0503;
+ kRTPMPFlushSelect = $0504;
+ kRTPMPResetSelect = $0505;
+ kRTPMPSetInfoSelect = $0506;
+ kRTPMPGetInfoSelect = $0507;
+ kRTPMPSetTimeScaleSelect = $0508;
+ kRTPMPGetTimeScaleSelect = $0509;
+ kRTPMPSetTimeBaseSelect = $050A;
+ kRTPMPGetTimeBaseSelect = $050B;
+ kRTPMPHasCharacteristicSelect = $050C;
+ kRTPMPSetPacketBuilderSelect = $050E;
+ kRTPMPGetPacketBuilderSelect = $050F;
+ kRTPMPSetMediaTypeSelect = $0510;
+ kRTPMPGetMediaTypeSelect = $0511;
+ kRTPMPSetMaxPacketSizeSelect = $0512;
+ kRTPMPGetMaxPacketSizeSelect = $0513;
+ kRTPMPSetMaxPacketDurationSelect = $0514;
+ kRTPMPGetMaxPacketDurationSelect = $0515; { for export component and apps who want to }
+ { access dialogs for Media-specific settings }
+ { (such as Pure Voice interleave factor) }
+ kRTPMPDoUserDialogSelect = $0516;
+ kRTPMPSetSettingsFromAtomContainerAtAtomSelect = $0517;
+ kRTPMPGetSettingsIntoAtomContainerAtAtomSelect = $0518;
+ kRTPMPGetSettingsAsTextSelect = $0519;
+ kRTPMPGetSettingsSelect = $051A;
+ kRTPMPSetSettingsSelect = $051B;
+
+ { -----------------------------------------
+ RTP Media Packetizer functions
+ ----------------------------------------- }
+
+ {
+ * RTPMPInitialize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPInitialize(rtpm: RTPMediaPacketizer; inFlags: SInt32): ComponentResult; external name '_RTPMPInitialize';
+{ return noErr if you can handle this media }
+{
+ * RTPMPPreflightMedia()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPPreflightMedia(rtpm: RTPMediaPacketizer; inMediaType: OSType; inSampleDescription: SampleDescriptionHandle): ComponentResult; external name '_RTPMPPreflightMedia';
+{
+ do work here if you need to - give up time periodically
+ if you're doing time consuming operations
+}
+{
+ * RTPMPIdle()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPIdle(rtpm: RTPMediaPacketizer; inFlags: SInt32; var outFlags: SInt32): ComponentResult; external name '_RTPMPIdle';
+{
+ caller owns the RTPMPSampleDataParams struct
+ media Packetizer must copy any fields of the struct it wants to keep
+ media Packetizer must call release proc when done with the data
+ you can do the processing work here if it does not take up too
+ much cpu time - otherwise do it in idle
+}
+{
+ * RTPMPSetSampleData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPSetSampleData(rtpm: RTPMediaPacketizer; const (*var*) inSampleData: RTPMPSampleDataParams; var outFlags: SInt32): ComponentResult; external name '_RTPMPSetSampleData';
+{
+ send everything you have buffered - you will get idles while
+ you set the kRTPMPStillProcessingData flag here and in idle
+}
+{
+ * RTPMPFlush()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPFlush(rtpm: RTPMediaPacketizer; inFlags: SInt32; var outFlags: SInt32): ComponentResult; external name '_RTPMPFlush';
+{
+ dispose of anything buffered and get rid of state
+ do not send the buffered data (because presumably
+ there is no connection for you to send on)
+ state should be the same as if you were just initialized
+}
+{
+ * RTPMPReset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPReset(rtpm: RTPMediaPacketizer; inFlags: SInt32): ComponentResult; external name '_RTPMPReset';
+{-----------------------------------------
+ RTP Media Packetizer get / set functions
+-----------------------------------------}
+{
+ * RTPMPSetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPSetInfo(rtpm: RTPMediaPacketizer; inSelector: OSType; ioParams: UnivPtr): ComponentResult; external name '_RTPMPSetInfo';
+{
+ * RTPMPGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPGetInfo(rtpm: RTPMediaPacketizer; inSelector: OSType; ioParams: UnivPtr): ComponentResult; external name '_RTPMPGetInfo';
+{
+ * RTPMPSetTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPSetTimeScale(rtpm: RTPMediaPacketizer; inTimeScale: TimeScale): ComponentResult; external name '_RTPMPSetTimeScale';
+{
+ * RTPMPGetTimeScale()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPGetTimeScale(rtpm: RTPMediaPacketizer; var outTimeScale: TimeScale): ComponentResult; external name '_RTPMPGetTimeScale';
+{
+ * RTPMPSetTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPSetTimeBase(rtpm: RTPMediaPacketizer; inTimeBase: TimeBase): ComponentResult; external name '_RTPMPSetTimeBase';
+{
+ * RTPMPGetTimeBase()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPGetTimeBase(rtpm: RTPMediaPacketizer; var outTimeBase: TimeBase): ComponentResult; external name '_RTPMPGetTimeBase';
+{
+ * RTPMPHasCharacteristic()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPHasCharacteristic(rtpm: RTPMediaPacketizer; inSelector: OSType; var outHasIt: boolean): ComponentResult; external name '_RTPMPHasCharacteristic';
+{
+ * RTPMPSetPacketBuilder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPSetPacketBuilder(rtpm: RTPMediaPacketizer; inPacketBuilder: ComponentInstance): ComponentResult; external name '_RTPMPSetPacketBuilder';
+{
+ * RTPMPGetPacketBuilder()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPGetPacketBuilder(rtpm: RTPMediaPacketizer; var outPacketBuilder: ComponentInstance): ComponentResult; external name '_RTPMPGetPacketBuilder';
+{
+ * RTPMPSetMediaType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPSetMediaType(rtpm: RTPMediaPacketizer; inMediaType: OSType): ComponentResult; external name '_RTPMPSetMediaType';
+{
+ * RTPMPGetMediaType()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPGetMediaType(rtpm: RTPMediaPacketizer; var outMediaType: OSType): ComponentResult; external name '_RTPMPGetMediaType';
+{ size is in bytes }
+{
+ * RTPMPSetMaxPacketSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPSetMaxPacketSize(rtpm: RTPMediaPacketizer; inMaxPacketSize: UInt32): ComponentResult; external name '_RTPMPSetMaxPacketSize';
+{
+ * RTPMPGetMaxPacketSize()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPGetMaxPacketSize(rtpm: RTPMediaPacketizer; var outMaxPacketSize: UInt32): ComponentResult; external name '_RTPMPGetMaxPacketSize';
+{ duration is in milliseconds }
+{
+ * RTPMPSetMaxPacketDuration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPSetMaxPacketDuration(rtpm: RTPMediaPacketizer; inMaxPacketDuration: UInt32): ComponentResult; external name '_RTPMPSetMaxPacketDuration';
+{
+ * RTPMPGetMaxPacketDuration()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPGetMaxPacketDuration(rtpm: RTPMediaPacketizer; var outMaxPacketDuration: UInt32): ComponentResult; external name '_RTPMPGetMaxPacketDuration';
+{
+ * RTPMPDoUserDialog()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPDoUserDialog(rtpm: RTPMediaPacketizer; inFilterUPP: ModalFilterUPP; var canceled: boolean): ComponentResult; external name '_RTPMPDoUserDialog';
+{
+ * RTPMPSetSettingsFromAtomContainerAtAtom()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPSetSettingsFromAtomContainerAtAtom(rtpm: RTPMediaPacketizer; inContainer: QTAtomContainer; inParentAtom: QTAtom): ComponentResult; external name '_RTPMPSetSettingsFromAtomContainerAtAtom';
+{
+ * RTPMPGetSettingsIntoAtomContainerAtAtom()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPGetSettingsIntoAtomContainerAtAtom(rtpm: RTPMediaPacketizer; inOutContainer: QTAtomContainer; inParentAtom: QTAtom): ComponentResult; external name '_RTPMPGetSettingsIntoAtomContainerAtAtom';
+{
+ * RTPMPGetSettingsAsText()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPMPGetSettingsAsText(rtpm: RTPMediaPacketizer; var text: Handle): ComponentResult; external name '_RTPMPGetSettingsAsText';
+{
+ * RTPMPGetSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 5.0 and later
+ }
+function RTPMPGetSettings(rtpm: RTPMediaPacketizer; var outSettings: QTAtomContainer; inFlags: SInt32): ComponentResult; external name '_RTPMPGetSettings';
+{
+ * RTPMPSetSettings()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 5.0 and later
+ }
+function RTPMPSetSettings(rtpm: RTPMediaPacketizer; inSettings: QTAtomSpecPtr; inFlags: SInt32): ComponentResult; external name '_RTPMPSetSettings';
+{============================================================================
+ RTP Packet Builder
+============================================================================}
+
+const
+ kRTPPacketBuilderType = $72747062 (* 'rtpb' *);
+
+
+type
+ RTPPacketBuilder = ComponentInstance;
+ RTPPacketGroupRef = ^SInt32; { an opaque 32-bit type }
+ RTPPacketGroupRefPtr = ^RTPPacketGroupRef; { when a var xx:RTPPacketGroupRef parameter can be nil, it is changed to xx: RTPPacketGroupRefPtr }
+ RTPPacketRef = ^SInt32; { an opaque 32-bit type }
+ RTPPacketRefPtr = ^RTPPacketRef; { when a var xx:RTPPacketRef parameter can be nil, it is changed to xx: RTPPacketRefPtr }
+ RTPPacketRepeatedDataRef = ^SInt32; { an opaque 32-bit type }
+ RTPPacketRepeatedDataRefPtr = ^RTPPacketRepeatedDataRef; { when a var xx:RTPPacketRepeatedDataRef parameter can be nil, it is changed to xx: RTPPacketRepeatedDataRefPtr }
+ { flags for RTPPBBegin/EndPacket, RTPPBBegin/EndPacketGroup }
+
+const
+ kRTPPBSetMarkerFlag = $00000001;
+ kRTPPBRepeatPacketFlag = $00000002;
+ kRTPPBSyncSampleFlag = $00010000;
+ kRTPPBBFrameFlag = $00020000;
+ kRTPPBDontSendFlag = $10000000; { when set in EndPacketGroup, will not add group }
+
+ kRTPPBUnknownPacketMediaDataLength = 0;
+
+ { flags for RTPPBGetSampleData }
+ kRTPPBEndOfDataFlag = $00000001;
+
+
+type
+{$ifc TYPED_FUNCTION_POINTERS}
+ RTPPBCallbackProcPtr = procedure(inSelector: OSType; ioParams: UnivPtr; inRefCon: UnivPtr);
+{$elsec}
+ RTPPBCallbackProcPtr = ProcPtr;
+{$endc}
+
+{$ifc OPAQUE_UPP_TYPES}
+ RTPPBCallbackUPP = ^SInt32; { an opaque UPP }
+{$elsec}
+ RTPPBCallbackUPP = UniversalProcPtr;
+{$endc}
+ { -----------------------------------------
+ RTP Packet Builder selectors
+ ----------------------------------------- }
+
+const
+ kRTPPBBeginPacketGroupSelect = $0500;
+ kRTPPBEndPacketGroupSelect = $0501;
+ kRTPPBBeginPacketSelect = $0502;
+ kRTPPBEndPacketSelect = $0503;
+ kRTPPBAddPacketLiteralDataSelect = $0504;
+ kRTPPBAddPacketSampleDataSelect = $0505;
+ kRTPPBAddPacketRepeatedDataSelect = $0506;
+ kRTPPBReleaseRepeatedDataSelect = $0507;
+ kRTPPBSetPacketSequenceNumberSelect = $0508;
+ kRTPPBGetPacketSequenceNumberSelect = $0509;
+ kRTPPBSetCallbackSelect = $050A;
+ kRTPPBGetCallbackSelect = $050B;
+ kRTPPBSetInfoSelect = $050C;
+ kRTPPBGetInfoSelect = $050D;
+ kRTPPBSetPacketTimeStampOffsetSelect = $050E;
+ kRTPPBGetPacketTimeStampOffsetSelect = $050F;
+ kRTPPBAddPacketSampleData64Select = $0510;
+ kRTPPBGetSampleDataSelect = $0511;
+ kRTPPBAddRepeatPacketSelect = $0512;
+
+ { -----------------------------------------
+ RTP Packet Builder functions
+ ----------------------------------------- }
+ {
+ * RTPPBBeginPacketGroup()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPPBBeginPacketGroup(rtpb: RTPPacketBuilder; inFlags: SInt32; inTimeStamp: UInt32; var outPacketGroup: RTPPacketGroupRef): ComponentResult; external name '_RTPPBBeginPacketGroup';
+{
+ * RTPPBEndPacketGroup()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPPBEndPacketGroup(rtpb: RTPPacketBuilder; inFlags: SInt32; inPacketGroup: RTPPacketGroupRef): ComponentResult; external name '_RTPPBEndPacketGroup';
+{
+ * RTPPBBeginPacket()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPPBBeginPacket(rtpb: RTPPacketBuilder; inFlags: SInt32; inPacketGroup: RTPPacketGroupRef; inPacketMediaDataLength: UInt32; var outPacket: RTPPacketRef): ComponentResult; external name '_RTPPBBeginPacket';
+{
+ * RTPPBEndPacket()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPPBEndPacket(rtpb: RTPPacketBuilder; inFlags: SInt32; inPacketGroup: RTPPacketGroupRef; inPacket: RTPPacketRef; inTransmissionTimeOffset: UInt32; inDuration: UInt32): ComponentResult; external name '_RTPPBEndPacket';
+{
+ non-NULL RTPPacketRepeatedDataRef means this data will be repeated later
+ pb must return a repeated data ref
+}
+{
+ * RTPPBAddPacketLiteralData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPPBAddPacketLiteralData(rtpb: RTPPacketBuilder; inFlags: SInt32; inPacketGroup: RTPPacketGroupRef; inPacket: RTPPacketRef; var inData: UInt8; inDataLength: UInt32; var outDataRef: RTPPacketRepeatedDataRef): ComponentResult; external name '_RTPPBAddPacketLiteralData';
+{
+ non-NULL RTPPacketRepeatedDataRef means this data will be repeated later
+ pb must return a repeated data ref
+}
+{
+ * RTPPBAddPacketSampleData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPPBAddPacketSampleData(rtpb: RTPPacketBuilder; inFlags: SInt32; inPacketGroup: RTPPacketGroupRef; inPacket: RTPPacketRef; var inSampleDataParams: RTPMPSampleDataParams; inSampleOffset: UInt32; inSampleDataLength: UInt32; var outDataRef: RTPPacketRepeatedDataRef): ComponentResult; external name '_RTPPBAddPacketSampleData';
+{
+ non-NULL RTPPacketRepeatedDataRef means this data will be repeated later
+ pb must return a repeated data ref
+}
+{
+ * RTPPBAddPacketSampleData64()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 5.0 and later
+ }
+function RTPPBAddPacketSampleData64(rtpb: RTPPacketBuilder; inFlags: SInt32; inPacketGroup: RTPPacketGroupRef; inPacket: RTPPacketRef; var inSampleDataParams: RTPMPSampleDataParams; (*const*) var inSampleOffset: UInt64; inSampleDataLength: UInt32; var outDataRef: RTPPacketRepeatedDataRef): ComponentResult; external name '_RTPPBAddPacketSampleData64';
+{
+ call to add the repeated data using the ref you got from
+ RTPPBAddPacketLiteralData or RTPPBAddPacketSampleData
+}
+{
+ * RTPPBAddPacketRepeatedData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPPBAddPacketRepeatedData(rtpb: RTPPacketBuilder; inFlags: SInt32; inPacketGroup: RTPPacketGroupRef; inPacket: RTPPacketRef; inDataRef: RTPPacketRepeatedDataRef): ComponentResult; external name '_RTPPBAddPacketRepeatedData';
+{ call when done with repeated data }
+{
+ * RTPPBReleaseRepeatedData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPPBReleaseRepeatedData(rtpb: RTPPacketBuilder; inDataRef: RTPPacketRepeatedDataRef): ComponentResult; external name '_RTPPBReleaseRepeatedData';
+{
+ seq number is just relative seq number
+ don't call if you don't care when seq # is used
+}
+{
+ * RTPPBSetPacketSequenceNumber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPPBSetPacketSequenceNumber(rtpb: RTPPacketBuilder; inFlags: SInt32; inPacketGroup: RTPPacketGroupRef; inPacket: RTPPacketRef; inSequenceNumber: UInt32): ComponentResult; external name '_RTPPBSetPacketSequenceNumber';
+{
+ * RTPPBGetPacketSequenceNumber()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPPBGetPacketSequenceNumber(rtpb: RTPPacketBuilder; inFlags: SInt32; inPacketGroup: RTPPacketGroupRef; inPacket: RTPPacketRef; var outSequenceNumber: UInt32): ComponentResult; external name '_RTPPBGetPacketSequenceNumber';
+{
+ * RTPPBSetPacketTimeStampOffset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 5.0 and later
+ }
+function RTPPBSetPacketTimeStampOffset(rtpb: RTPPacketBuilder; inFlags: SInt32; inPacketGroup: RTPPacketGroupRef; inPacket: RTPPacketRef; inTimeStampOffset: SInt32): ComponentResult; external name '_RTPPBSetPacketTimeStampOffset';
+{
+ * RTPPBGetPacketTimeStampOffset()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 5.0 and later
+ }
+function RTPPBGetPacketTimeStampOffset(rtpb: RTPPacketBuilder; inFlags: SInt32; inPacketGroup: RTPPacketGroupRef; inPacket: RTPPacketRef; var outTimeStampOffset: SInt32): ComponentResult; external name '_RTPPBGetPacketTimeStampOffset';
+{
+ * RTPPBAddRepeatPacket()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 5.0 and later
+ }
+function RTPPBAddRepeatPacket(rtpb: RTPPacketBuilder; inFlags: SInt32; inPacketGroup: RTPPacketGroupRef; inPacket: RTPPacketRef; inTransmissionOffset: TimeValue; inSequenceNumber: UInt32): ComponentResult; external name '_RTPPBAddRepeatPacket';
+{
+ used for communicating with the caller of the media packetizers if needed
+ NOT used for communicating with the media packetizers themselves
+}
+{
+ * RTPPBSetCallback()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPPBSetCallback(rtpb: RTPPacketBuilder; inCallback: RTPPBCallbackUPP; inRefCon: UnivPtr): ComponentResult; external name '_RTPPBSetCallback';
+{
+ * RTPPBGetCallback()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPPBGetCallback(rtpb: RTPPacketBuilder; var outCallback: RTPPBCallbackUPP; var outRefCon: UnivPtr): ComponentResult; external name '_RTPPBGetCallback';
+{
+ * RTPPBSetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPPBSetInfo(rtpb: RTPPacketBuilder; inSelector: OSType; ioParams: UnivPtr): ComponentResult; external name '_RTPPBSetInfo';
+{
+ * RTPPBGetInfo()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 4.0 and later
+ * CarbonLib: in CarbonLib 1.1 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 4.0 and later
+ }
+function RTPPBGetInfo(rtpb: RTPPacketBuilder; inSelector: OSType; ioParams: UnivPtr): ComponentResult; external name '_RTPPBGetInfo';
+{
+ * RTPPBGetSampleData()
+ *
+ * Availability:
+ * Non-Carbon CFM: in QTStreamLib 5.0 and later
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ * Windows: in QTSClient.lib 5.0 and later
+ }
+function RTPPBGetSampleData(rtpb: RTPPacketBuilder; var inParams: RTPMPSampleDataParams; (*const*) var inStartOffset: UInt64; var outDataBuffer: UInt8; inBytesToRead: UInt32; var outBytesRead: UInt32; var outFlags: SInt32): ComponentResult; external name '_RTPPBGetSampleData';
+{ UPP call backs }
+
+const
+ uppRTPMPDataReleaseProcInfo = $000003C0;
+ uppRTPPBCallbackProcInfo = $00000FC0;
+ {
+ * NewRTPMPDataReleaseUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewRTPMPDataReleaseUPP(userRoutine: RTPMPDataReleaseProcPtr): RTPMPDataReleaseUPP; external name '_NewRTPMPDataReleaseUPP'; { old name was NewRTPMPDataReleaseProc }
+{
+ * NewRTPPBCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+function NewRTPPBCallbackUPP(userRoutine: RTPPBCallbackProcPtr): RTPPBCallbackUPP; external name '_NewRTPPBCallbackUPP'; { old name was NewRTPPBCallbackProc }
+{
+ * DisposeRTPMPDataReleaseUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeRTPMPDataReleaseUPP(userUPP: RTPMPDataReleaseUPP); external name '_DisposeRTPMPDataReleaseUPP';
+{
+ * DisposeRTPPBCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure DisposeRTPPBCallbackUPP(userUPP: RTPPBCallbackUPP); external name '_DisposeRTPPBCallbackUPP';
+{
+ * InvokeRTPMPDataReleaseUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeRTPMPDataReleaseUPP(var inData: UInt8; inRefCon: UnivPtr; userRoutine: RTPMPDataReleaseUPP); external name '_InvokeRTPMPDataReleaseUPP'; { old name was CallRTPMPDataReleaseProc }
+{
+ * InvokeRTPPBCallbackUPP()
+ *
+ * Availability:
+ * Non-Carbon CFM: available as macro/inline
+ * CarbonLib: in CarbonLib 1.3 and later
+ * Mac OS X: in version 10.0 and later
+ }
+procedure InvokeRTPPBCallbackUPP(inSelector: OSType; ioParams: UnivPtr; inRefCon: UnivPtr; userRoutine: RTPPBCallbackUPP); external name '_InvokeRTPPBCallbackUPP'; { old name was CallRTPPBCallbackProc }
+{$ALIGN MAC68K}
+
+
+
+implementation
+
+{implementation of unit MixedMode}
+
+
+{$R-}
+
+function NewRoutineDescriptor( theProc: ProcPtr; theProcInfo: ProcInfoType; theISA: ISAType ): UniversalProcPtr; inline;
+begin
+ NewRoutineDescriptor := UniversalProcPtr(theProc);
+end;
+
+procedure DisposeRoutineDescriptor( theUPP: UniversalProcPtr ); inline;
+begin
+end;
+
+{implementation of unit CFByteOrders}
+
+{$R-}
+
+function CFByteOrderGetCurrent: CFByteOrder; inline;
+ var
+ x: UInt32 = (CFByteOrderBigEndian shl 24) or CFByteOrderLittleEndian;
+begin
+ CFByteOrderGetCurrent := CFByteOrder(UInt8Ptr(@x)^);
+end;
+
+function CFSwapInt16( arg: UInt16 ): UInt16; inline;
+begin
+ CFSwapInt16 := (( arg shl 8) and $0FF00) or (( arg shr 8) and $00FF);
+end;
+
+function CFSwapInt32( arg: UInt32 ): UInt32; inline;
+begin
+ CFSwapInt32 := ((arg and $FF) shl 24) or ((arg and $0FF00) shl 8) or ((arg shr 8) and $0FF00) or ((arg shr 24) and $FF);
+end;
+
+function CFSwapInt64( arg: UInt64 ): UInt64; inline;
+begin
+ CFSwapInt64 := (UInt64(CFSwapInt32( arg and $FFFFFFFF )) shl 32) or CFSwapInt32( (arg shr 32) and $FFFFFFFF );
+end;
+
+{$ifc TARGET_RT_BIG_ENDIAN}
+function CFSwapInt16BigToHost( arg: UInt16 ): UInt16; inline;
+begin
+ CFSwapInt16BigToHost := arg;
+end;
+
+function CFSwapInt32BigToHost( arg: UInt32 ): UInt32; inline;
+begin
+ CFSwapInt32BigToHost := arg;
+end;
+
+function CFSwapInt64BigToHost( arg: UInt64 ): UInt64; inline;
+begin
+ CFSwapInt64BigToHost := arg;
+end;
+
+function CFSwapInt16HostToBig( arg: UInt16 ): UInt16; inline;
+begin
+ CFSwapInt16HostToBig := arg;
+end;
+
+function CFSwapInt32HostToBig( arg: UInt32 ): UInt32; inline;
+begin
+ CFSwapInt32HostToBig := arg;
+end;
+
+function CFSwapInt64HostToBig( arg: UInt64 ): UInt64; inline;
+begin
+ CFSwapInt64HostToBig := arg;
+end;
+
+function CFSwapInt16LittleToHost( arg: UInt16 ): UInt16; inline;
+begin
+ CFSwapInt16LittleToHost := CFSwapInt16(arg);
+end;
+
+function CFSwapInt32LittleToHost( arg: UInt32 ): UInt32; inline;
+begin
+ CFSwapInt32LittleToHost := CFSwapInt32(arg);
+end;
+
+function CFSwapInt64LittleToHost( arg: UInt64 ): UInt64; inline;
+begin
+ CFSwapInt64LittleToHost := CFSwapInt64(arg);
+end;
+
+function CFSwapInt16HostToLittle( arg: UInt16 ): UInt16; inline;
+begin
+ CFSwapInt16HostToLittle := CFSwapInt16(arg);
+end;
+
+function CFSwapInt32HostToLittle( arg: UInt32 ): UInt32; inline;
+begin
+ CFSwapInt32HostToLittle := CFSwapInt32(arg);
+end;
+
+function CFSwapInt64HostToLittle( arg: UInt64 ): UInt64; inline;
+begin
+ CFSwapInt64HostToLittle := CFSwapInt64(arg);
+end;
+
+function CFConvertFloat32HostToSwapped( arg: Float32 ): CFSwappedFloat32; inline;
+begin
+ CFConvertFloat32HostToSwapped := CFSwappedFloat32(arg);
+end;
+
+function CFConvertFloat32SwappedToHost( arg: Float32 ): CFSwappedFloat32; inline;
+begin
+ CFConvertFloat32SwappedToHost := CFSwappedFloat32(arg);
+end;
+
+function CFConvertFloat64HostToSwapped( arg: Float64 ): CFSwappedFloat64; inline;
+begin
+ CFConvertFloat64HostToSwapped := CFSwappedFloat64(arg);
+end;
+
+function CFConvertFloat64SwappedToHost( arg: Float64 ): CFSwappedFloat64; inline;
+begin
+ CFConvertFloat64SwappedToHost := CFSwappedFloat64(arg);
+end;
+
+function CFConvertFloatHostToSwapped( arg: Float32 ): CFSwappedFloat32; inline;
+begin
+ CFConvertFloatHostToSwapped := CFSwappedFloat32(arg);
+end;
+
+function CFConvertFloatSwappedToHost( arg: Float32 ): CFSwappedFloat32; inline;
+begin
+ CFConvertFloatSwappedToHost := CFSwappedFloat32(arg);
+end;
+
+function CFConvertDoubleHostToSwapped( arg: Float64 ): CFSwappedFloat64; inline;
+begin
+ CFConvertDoubleHostToSwapped := CFSwappedFloat64(arg);
+end;
+
+function CFConvertDoubleSwappedToHost( arg: Float64 ): CFSwappedFloat64; inline;
+begin
+ CFConvertDoubleSwappedToHost := CFSwappedFloat64(arg);
+end;
+
+{$elsec}
+
+function CFSwapInt16LittleToHost( arg: UInt16 ): UInt16; inline;
+begin
+ CFSwapInt16LittleToHost := arg;
+end;
+
+function CFSwapInt32LittleToHost( arg: UInt32 ): UInt32; inline;
+begin
+ CFSwapInt32LittleToHost := arg;
+end;
+
+function CFSwapInt64LittleToHost( arg: UInt64 ): UInt64; inline;
+begin
+ CFSwapInt64LittleToHost := arg;
+end;
+
+function CFSwapInt16HostToLittle( arg: UInt16 ): UInt16; inline;
+begin
+ CFSwapInt16HostToLittle := arg;
+end;
+
+function CFSwapInt32HostToLittle( arg: UInt32 ): UInt32; inline;
+begin
+ CFSwapInt32HostToLittle := arg;
+end;
+
+function CFSwapInt64HostToLittle( arg: UInt64 ): UInt64; inline;
+begin
+ CFSwapInt64HostToLittle := arg;
+end;
+
+function CFSwapInt16BigToHost( arg: UInt16 ): UInt16; inline;
+begin
+ CFSwapInt16BigToHost := CFSwapInt16(arg);
+end;
+
+function CFSwapInt32BigToHost( arg: UInt32 ): UInt32; inline;
+begin
+ CFSwapInt32BigToHost := CFSwapInt32(arg);
+end;
+
+function CFSwapInt64BigToHost( arg: UInt64 ): UInt64; inline;
+begin
+ CFSwapInt64BigToHost := CFSwapInt64(arg);
+end;
+
+function CFSwapInt16HostToBig( arg: UInt16 ): UInt16; inline;
+begin
+ CFSwapInt16HostToBig := CFSwapInt16(arg);
+end;
+
+function CFSwapInt32HostToBig( arg: UInt32 ): UInt32; inline;
+begin
+ CFSwapInt32HostToBig := CFSwapInt32(arg);
+end;
+
+function CFSwapInt64HostToBig( arg: UInt64 ): UInt64; inline;
+begin
+ CFSwapInt64HostToBig := CFSwapInt64(arg);
+end;
+
+function CFConvertFloat32HostToSwapped( arg: Float32 ): CFSwappedFloat32; inline;
+begin
+ CFConvertFloat32HostToSwapped.v := CFSwapInt32(CFSwappedFloat32(arg).v);
+end;
+
+function CFConvertFloat32SwappedToHost( arg: Float32 ): CFSwappedFloat32; inline;
+begin
+ CFConvertFloat32SwappedToHost.v := CFSwapInt32(CFSwappedFloat32(arg).v);
+end;
+
+function CFConvertFloat64HostToSwapped( arg: Float64 ): CFSwappedFloat64; inline;
+begin
+ CFConvertFloat64HostToSwapped.v := CFSwapInt64(CFSwappedFloat64(arg).v);
+end;
+
+function CFConvertFloat64SwappedToHost( arg: Float64 ): CFSwappedFloat64; inline;
+begin
+ CFConvertFloat64SwappedToHost.v := CFSwapInt64(CFSwappedFloat64(arg).v);
+end;
+
+function CFConvertFloatHostToSwapped( arg: Float32 ): CFSwappedFloat32; inline;
+begin
+ CFConvertFloatHostToSwapped.v := CFSwapInt32(CFSwappedFloat32(arg).v);
+end;
+
+function CFConvertFloatSwappedToHost( arg: Float32 ): CFSwappedFloat32; inline;
+begin
+ CFConvertFloatSwappedToHost.v := CFSwapInt32(CFSwappedFloat32(arg).v);
+end;
+
+function CFConvertDoubleHostToSwapped( arg: Float64 ): CFSwappedFloat64; inline;
+begin
+ CFConvertDoubleHostToSwapped.v := CFSwapInt64(CFSwappedFloat64(arg).v);
+end;
+
+function CFConvertDoubleSwappedToHost( arg: Float64 ): CFSwappedFloat64; inline;
+begin
+ CFConvertDoubleSwappedToHost.v := CFSwapInt64(CFSwappedFloat64(arg).v);
+end;
+{$endc}
+
+
+{implementation of unit Endian}
+
+{$R-}
+
+function Endian16_Swap( arg: UInt16 ): UInt16; inline;
+begin
+ Endian16_Swap := (( arg shl 8) and $0FF00) or (( arg shr 8) and $00FF);
+end;
+
+function Endian32_Swap( arg: UInt32 ): UInt32; inline;
+begin
+ Endian32_Swap := ((arg and $FF) shl 24) or ((arg and $0FF00) shl 8) or ((arg shr 8) and $0FF00) or ((arg shr 24) and $FF);
+end;
+
+function Endian64_Swap_Pascal( arg: UInt64 ): UInt64; inline;
+begin
+ Endian64_Swap_Pascal := (Endian32_Swap( arg and $FFFFFFFF ) shl 32) or Endian32_Swap( (arg shr 32) and $FFFFFFFF );
+end;
+
+function Endian64_Swap( arg: UInt64 ): UInt64; inline;
+begin
+ Endian64_Swap := Endian64_Swap_Pascal(arg);
+end;
+
+function EndianS16_Swap( arg: SInt16 ): SInt16; inline;
+begin
+ EndianS16_Swap := (( arg shl 8) and $0FF00) or (( arg shr 8) and $00FF);
+end;
+
+function EndianS32_Swap( arg: SInt32 ): SInt32; inline;
+begin
+ EndianS32_Swap := ((arg and $FF) shl 24) or ((arg and $0FF00) shl 8) or ((arg shr 8) and $0FF00) or ((arg shr 24) and $FF);
+end;
+
+function EndianS64_Swap( arg: SInt64 ): SInt64; inline;
+begin
+ EndianS64_Swap := (Endian32_Swap( arg and $FFFFFFFF ) shl 32) or Endian32_Swap( (arg shr 32) and $FFFFFFFF );
+end;
+
+{$ifc TARGET_RT_BIG_ENDIAN}
+function EndianS16_BtoN( arg: SInt16 ): SInt16; inline;
+begin
+ EndianS16_BtoN := arg;
+end;
+
+function EndianS16_NtoB( arg: SInt16 ): SInt16; inline;
+begin
+ EndianS16_NtoB := arg;
+end;
+
+function EndianU16_BtoN( arg: UInt16 ): UInt16; inline;
+begin
+ EndianU16_BtoN := arg;
+end;
+
+function EndianU16_NtoB( arg: UInt16 ): UInt16; inline;
+begin
+ EndianU16_NtoB := arg;
+end;
+
+function EndianS32_BtoN( arg: SInt32 ): SInt32; inline;
+begin
+ EndianS32_BtoN := arg;
+end;
+
+function EndianS32_NtoB( arg: SInt32 ): SInt32; inline;
+begin
+ EndianS32_NtoB := arg;
+end;
+
+function EndianU32_BtoN( arg: UInt32 ): UInt32; inline;
+begin
+ EndianU32_BtoN := arg;
+end;
+
+function EndianU32_NtoB( arg: UInt32 ): UInt32; inline;
+begin
+ EndianU32_NtoB := arg;
+end;
+
+function EndianS64_BtoN( arg: SInt64 ): SInt64; inline;
+begin
+ EndianS64_BtoN := arg;
+end;
+
+function EndianS64_NtoB( arg: SInt64 ): SInt64; inline;
+begin
+ EndianS64_NtoB := arg;
+end;
+
+function EndianU64_BtoN( arg: UInt64 ): UInt64; inline;
+begin
+ EndianU64_BtoN := arg;
+end;
+
+function EndianU64_NtoB( arg: UInt64 ): UInt64; inline;
+begin
+ EndianU64_NtoB := arg;
+end;
+
+function EndianS16_LtoN( arg: SInt16 ): SInt16; inline;
+begin
+ EndianS16_LtoN := EndianS16_Swap(arg);
+end;
+
+function EndianS16_NtoL( arg: SInt16 ): SInt16; inline;
+begin
+ EndianS16_NtoL := EndianS16_Swap(arg);
+end;
+
+function EndianU16_LtoN( arg: UInt16 ): UInt16; inline;
+begin
+ EndianU16_LtoN := Endian16_Swap(arg);
+end;
+
+function EndianU16_NtoL( arg: UInt16 ): UInt16; inline;
+begin
+ EndianU16_NtoL := Endian16_Swap(arg);
+end;
+
+function EndianS32_LtoN( arg: SInt32 ): SInt32; inline;
+begin
+ EndianS32_LtoN := EndianS32_Swap(arg);
+end;
+
+function EndianS32_NtoL( arg: SInt32 ): SInt32; inline;
+begin
+ EndianS32_NtoL := EndianS32_Swap(arg);
+end;
+
+function EndianU32_LtoN( arg: UInt32 ): UInt32; inline;
+begin
+ EndianU32_LtoN := Endian32_Swap(arg);
+end;
+
+function EndianU32_NtoL( arg: UInt32 ): UInt32; inline;
+begin
+ EndianU32_NtoL := Endian32_Swap(arg);
+end;
+
+
+function EndianS64_LtoN( arg: SInt64 ): SInt64; inline;
+begin
+ EndianS64_LtoN := EndianS64_Swap(arg);
+end;
+
+function EndianS64_NtoL( arg: SInt64 ): SInt64; inline;
+begin
+ EndianS64_NtoL := EndianS64_Swap(arg);
+end;
+
+function EndianU64_LtoN( arg: UInt64 ): UInt64; inline;
+begin
+ EndianU64_LtoN := Endian64_Swap(arg);
+end;
+
+function EndianU64_NtoL( arg: UInt64 ): UInt64; inline;
+begin
+ EndianU64_NtoL := Endian64_Swap(arg);
+end;
+
+{$elsec}
+function EndianS16_BtoN( arg: SInt16 ): SInt16; inline;
+begin
+ EndianS16_BtoN := EndianS16_Swap(arg);
+end;
+
+function EndianS16_NtoB( arg: SInt16 ): SInt16; inline;
+begin
+ EndianS16_NtoB := EndianS16_Swap(arg);
+end;
+
+function EndianU16_BtoN( arg: UInt16 ): UInt16; inline;
+begin
+ EndianU16_BtoN := Endian16_Swap(arg);
+end;
+
+function EndianU16_NtoB( arg: UInt16 ): UInt16; inline;
+begin
+ EndianU16_NtoB := Endian16_Swap(arg);
+end;
+
+function EndianS32_BtoN( arg: SInt32 ): SInt32; inline;
+begin
+ EndianS32_BtoN := EndianS32_Swap(arg);
+end;
+
+function EndianS32_NtoB( arg: SInt32 ): SInt32; inline;
+begin
+ EndianS32_NtoB := EndianS32_Swap(arg);
+end;
+
+function EndianU32_BtoN( arg: UInt32 ): UInt32; inline;
+begin
+ EndianU32_BtoN := Endian32_Swap(arg);
+end;
+
+function EndianU32_NtoB( arg: UInt32 ): UInt32; inline;
+begin
+ EndianU32_NtoB := Endian32_Swap(arg);
+end;
+
+
+function EndianS64_BtoN( arg: SInt64 ): SInt64; inline;
+begin
+ EndianS64_BtoN := EndianS64_Swap(arg);
+end;
+
+function EndianS64_NtoB( arg: SInt64 ): SInt64; inline;
+begin
+ EndianS64_NtoB := EndianS64_Swap(arg);
+end;
+
+function EndianU64_BtoN( arg: UInt64 ): UInt64; inline;
+begin
+ EndianU64_BtoN := Endian64_Swap(arg);
+end;
+
+function EndianU64_NtoB( arg: UInt64 ): UInt64; inline;
+begin
+ EndianU64_NtoB := Endian64_Swap(arg);
+end;
+
+function EndianS16_LtoN( arg: SInt16 ): SInt16; inline;
+begin
+ EndianS16_LtoN := arg;
+end;
+
+function EndianS16_NtoL( arg: SInt16 ): SInt16; inline;
+begin
+ EndianS16_NtoL := arg;
+end;
+
+function EndianU16_LtoN( arg: UInt16 ): UInt16; inline;
+begin
+ EndianU16_LtoN := arg;
+end;
+
+function EndianU16_NtoL( arg: UInt16 ): UInt16; inline;
+begin
+ EndianU16_NtoL := arg;
+end;
+
+function EndianS32_LtoN( arg: SInt32 ): SInt32; inline;
+begin
+ EndianS32_LtoN := arg;
+end;
+
+function EndianS32_NtoL( arg: SInt32 ): SInt32; inline;
+begin
+ EndianS32_NtoL := arg;
+end;
+
+function EndianU32_LtoN( arg: UInt32 ): UInt32; inline;
+begin
+ EndianU32_LtoN := arg;
+end;
+
+function EndianU32_NtoL( arg: UInt32 ): UInt32; inline;
+begin
+ EndianU32_NtoL := arg;
+end;
+
+function EndianS64_LtoN( arg: SInt64 ): SInt64; inline;
+begin
+ EndianS64_LtoN := arg;
+end;
+
+function EndianS64_NtoL( arg: SInt64 ): SInt64; inline;
+begin
+ EndianS64_NtoL := arg;
+end;
+
+function EndianU64_LtoN( arg: UInt64 ): UInt64; inline;
+begin
+ EndianU64_LtoN := arg;
+end;
+
+function EndianU64_NtoL( arg: UInt64 ): UInt64; inline;
+begin
+ EndianU64_NtoL := arg;
+end;
+
+{$endc}
+
+
+{implementation of unit CFString}
+
+
+{implementation of unit OSUtils}
+
+
+{$R-}
+
+function GetMMUMode: SInt8; inline;
+begin
+ GetMMUMode:= true32b
+end;
+
+procedure SwapMMUMode( var mode: SInt8 ); inline;
+begin
+ mode := true32b;
+end;
+
+{implementation of unit CFUserNotification}
+
+
+{$R-}
+
+function CFUserNotificationCheckBoxChecked( i: CFIndex ): CFOptionFlags; inline;
+begin
+ CFUserNotificationCheckBoxChecked := CFOptionFlags(1 shl (8+i));
+end;
+
+function CFUserNotificationSecureTextField( i: CFIndex ): CFOptionFlags; inline;
+begin
+ CFUserNotificationSecureTextField := CFOptionFlags(1 shl (16+i));
+end;
+
+function CFUserNotificationPopUpSelection( n: CFIndex ): CFOptionFlags; inline;
+begin
+ CFUserNotificationPopUpSelection := CFOptionFlags(n shl 24);
+end;
+
+{implementation of unit CFBundle}
+
+
+{$R-}
+
+function CFCopyLocalizedString( key: CFStringRef; comment: PChar ): CFStringRef; inline;
+begin
+ CFCopyLocalizedString := CFBundleCopyLocalizedString( CFBundleGetMainBundle, key, key, nil );
+end;
+
+function CFCopyLocalizedStringFromTable( key: CFStringRef; tableName: CFStringRef; comment: PChar ): CFStringRef; inline;
+begin
+ CFCopyLocalizedStringFromTable := CFBundleCopyLocalizedString( CFBundleGetMainBundle, key, key, tableName );
+end;
+
+function CFCopyLocalizedStringFromTableInBundle( key: CFStringRef; tableName: CFStringRef; bundle: CFBundleRef; comment: PChar ): CFStringRef; inline;
+begin
+ CFCopyLocalizedStringFromTableInBundle := CFBundleCopyLocalizedString( bundle, key, key, tableName );
+end;
+
+function CFCopyLocalizedStringWithDefaultValue( key: CFStringRef; tableName: CFStringRef; bundle: CFBundleRef; value: CFStringRef; comment: PChar ): CFStringRef; inline;
+begin
+ CFCopyLocalizedStringWithDefaultValue := CFBundleCopyLocalizedString( bundle, key, value, tableName );
+end;
+
+
+{implementation of unit CFPlugInCOM}
+
+
+{$R-}
+
+function SUCCEEDED( Status: HRESULT ): Boolean; inline;
+begin
+ SUCCEEDED := Status >= 0;
+end;
+
+function FAILED( Status: HRESULT ): Boolean; inline;
+begin
+ FAILED := Status < 0;
+end;
+
+function IS_ERROR( Status: HRESULT ): Boolean; inline;
+begin
+ IS_ERROR := Status shr 31 = SEVERITY_ERROR;
+end;
+
+function HRESULT_CODE( hr: HRESULT ): HRESULT; inline;
+begin
+ HRESULT_CODE := hr and $FFFF;
+end;
+
+function HRESULT_FACILITY( hr: HRESULT ): HRESULT; inline;
+begin
+ HRESULT_FACILITY := (hr shr 16) and $1FFF;
+end;
+
+function HRESULT_SEVERITY( hr: HRESULT ): HRESULT; inline;
+begin
+ HRESULT_SEVERITY := (hr shr 31) and $01;
+end;
+
+function MAKE_HRESULT( sev, fac, code: ULONG ): HRESULT; inline;
+begin
+ MAKE_HRESULT := HRESULT((sev shl 31) or (fac shl 16) or code);
+end;
+
+function IUnknownUUID: CFUUIDRef; inline;
+begin
+ IUnknownUUID:= CFUUIDGetConstantUUIDWithBytes( nil, $00, $00, $00, $00, $00, $00, $00, $00, ByteParameter($C0), $00, $00, $00, $00, $00, $00, $46 )
+end;
+
+
+{implementation of unit ToolUtils}
+
+
+function HiWord(arg: SInt32): SInt16; inline;
+begin
+ HiWord := arg shr 16;
+end;
+
+
+function HiWord(arg: UInt32): UInt16; inline;
+begin
+ HiWord := arg shr 16;
+end;
+
+
+function LoWord(arg: SInt32): SInt16; inline;
+begin
+ LoWord := SInt16(arg);
+end;
+
+
+function LoWord(arg: UInt32): UInt16; inline;
+begin
+ LoWord := UInt16(arg);
+end;
+
+
+
+end.